//#region src/tool-schemas.d.ts /** * Tool parameter schemas shared by every surface (MCP server, Pi and OMP * extensions). Each surface owns a different TypeBox build (the extensions * must use their host's facade), so the schemas are a factory over a minimal * structural builder instead of importing typebox here. */ /** * The subset of the TypeBox builder the tool schemas need. `I` is the schema * type the builder accepts as input, `S` the (possibly narrower) type it * returns; OMP's facade accepts its own `AnySchema` while producing schemas * that satisfy the host's stricter `TSchema`. */ interface McpSchemaBuilder { Object(properties: Readonly>, options?: object): S; String(options?: object): I; Integer(options?: object): I; Boolean(options?: object): I; Array(item: I, options?: object): I; Record(key: I, value: I, options?: object): I; Union(schemas: readonly I[], options?: object): I; Literal(value: string, options?: object): I; Optional(schema: I): I; } declare const HARNESS_INFO_MAX_ITEMS = 20; declare const RUN_TIMEOUT_DEFAULT_SECONDS = 600; /** * Builds the parameter schemas for all harness tools with the host's TypeBox. * * @param Type - Host-provided TypeBox-compatible schema builder. * @returns {Record} Schemas keyed by harness tool operation. */ declare function harnessToolSchemas(Type: McpSchemaBuilder): { /** Open on purpose: nothing to misread, and some models send a placeholder `_` here. */ detect: S; info: S; models: S; run: S; mcpList: S; mcpSync: S; agentsSync: S; promptsSync: S; skillsSync: S; mcpAdd: S; mcpRemove: S; }; /** * Parameter types matching the schemas above. The generic factory erases the * builders' literal types, so hosts annotate their execute callbacks with * these instead of TypeBox Static inference. */ interface InfoParams { id: string | string[]; } interface ModelsParams { id: string; search?: string; cwd?: string; timeoutSeconds?: number; } interface RunParams { id: string; prompt: string; cwd?: string; model?: string; effort?: string; timeoutSeconds?: number; structured?: boolean; tools: boolean; readOnly?: boolean; } interface McpListParams { id?: string; } interface McpSyncParams { id?: string; } interface AgentsSyncParams { id?: string; check?: boolean; } interface PromptsSyncParams { id?: string; check?: boolean; } interface SkillsSyncParams { id?: string; check?: boolean; } interface McpAddParams { id: string; name: string; command?: string; args?: string[]; env?: Record; url?: string; transport?: "stdio" | "http" | "sse"; headers?: Record; scope?: "user" | "project"; } interface McpRemoveParams { id: string; name: string; scope?: "user" | "project"; } //#endregion export { McpListParams as a, McpSyncParams as c, RUN_TIMEOUT_DEFAULT_SECONDS as d, RunParams as f, McpAddParams as i, ModelsParams as l, harnessToolSchemas as m, HARNESS_INFO_MAX_ITEMS as n, McpRemoveParams as o, SkillsSyncParams as p, InfoParams as r, McpSchemaBuilder as s, AgentsSyncParams as t, PromptsSyncParams as u }; //# sourceMappingURL=tool-schemas.d.mts.map