/** * Small shared helpers for the authoring tools (see tools.ts). Kept separate so * the per-tool files (find.ts, propose.ts, replay.ts) and the inline tools in * tools.ts share one copy without a circular import. */ import type { JSONSchema } from 'zod/v4/core'; import type { CapturedRequest } from '../provider/schema.ts'; import type { AuthoringBackend } from './backend.ts'; /** * Resolves the session backend for a tool call. The MCP keys it by * `args.captureId` (multi-session); the cloud loop returns its one run backend. * Each authoring tool closes over this so the same tool works for both hosts. */ export type ResolveBackend = (args: Record) => AuthoringBackend; /** Build an `object` JSON Schema for a tool input — a small literal shortener, * not a tool abstraction. */ export declare function objectSchema(properties: Record, required?: string[]): JSONSchema.ObjectSchema; /** Secret-free projection of a captured request for tool output. */ export declare function publicRequest(r: CapturedRequest): { graphqlOp?: string | undefined; requestId: string; method: string; url: string; status: number; contentType: string; size: number; };