import type { ScriptToolResult } from "./wave-protocol.js"; export type RegistryEntry = { name: string; source: string; createdAt: number; updatedAt: number; }; export type RegistryRunOptions = { args?: Record; }; export type RegistryCallTool = (name: string, args: unknown) => Promise; /** * File-based script registry stored under the opencode state dir. * * When CHATGPT_WEB_CODE_REGISTRY === "0", every method throws a disabled * error and performs no disk I/O. * * Names must match ^[a-zA-Z][a-zA-Z0-9_-]{0,63}$. Nested `run` calls are * capped at depth 2 to prevent unbounded recursion. * * Pass an optional `callTool` to wire `run` through `tools.bash`. Without it, * `run` still performs arg substitution but returns the substituted source * string for the caller to dispatch. */ export declare function createRegistry(callTool?: RegistryCallTool): { define(name: string, source: string): Promise; run(name: string, options?: RegistryRunOptions): Promise; list(): Promise; get(name: string): Promise; delete(name: string): Promise; }; //# sourceMappingURL=registry.d.ts.map