/** * v2.ts — OpenCode 2 (beta plugin API) entrypoint. * * opencode2 requires the default export to be `Plugin.define({ id, setup })` * and custom tools to be added via `ctx.tool.transform((tools) => tools.add(...))` * with JSON-Schema inputs. The v1 `{ tool: {...} }` hooks shape is silently * ignored there, so this module bridges the two: * * - invokes the shared v1 `plugin()` factory once with a minimal context, * - registers every returned hook tool as a native v2 tool (zod args schemas * satisfy the Standard-JSON-Schema interface Tool.Info.input accepts), * - injects the hashline system prompt through ctx.session.hook("context"). */ declare const v2Plugin: { id: string; setup: (ctx: { tool: { transform: (cb: (tools: { add(tool: { name: string; description: string; input: unknown; execute: (input: unknown) => Promise<{ content?: string; }>; }): void; }) => void) => Promise; }; session: { hook(event: "context", callback: (input: { system: unknown[]; }) => Promise): Promise; }; }) => Promise; }; export default v2Plugin; //# sourceMappingURL=v2.d.ts.map