/** * Sandbox Context * * React context and hook for accessing the nearest Sandbox in the component tree. */ import type { Sandbox } from "./types.js"; export declare const SandboxContext: import("react").Context; /** * Access the nearest Sandbox from the component tree. * * @throws Error if no `` provider is found in the tree. * * @example * ```tsx * const Bash = createTool({ * name: 'bash', * use: () => ({ sandbox: useSandbox() }), * handler: async ({ command }, deps) => { * const result = await deps!.sandbox.exec(command); * return [{ type: 'text', text: result.stdout }]; * }, * }); * ``` */ export declare function useSandbox(): Sandbox; //# sourceMappingURL=context.d.ts.map