pi:
Methods
| Method | Purpose | When to call |
|---|---|---|
registerTool(tool) | Register a model-callable sandbox tool | During extension initialization |
on(event, handler) | Subscribe to a hosted lifecycle event | During extension initialization |
setModel(selection) | Select a model and optional thinking level | Inside before_agent_start |
setActiveTools(names) | Select tools for the turn/session | Inside before_agent_start |
Context boundary
Tools and hook handlers run inside the sandbox extension host. They can use projected agent resources and the mutable agent workspace. They do not execute in trusted worker memory. The runtime handler context currently exposes:JavaScript contract
Salambo currently documents runnable.mjs modules. There is no published TypeScript extension SDK to import. You may use your own build step, but the declared entrypoint must be JavaScript that the managed runtime can import.