/** * wiki_query — reading the graph, which nothing could do. * * The SessionStart index has told the model to "call wiki_query with a key for * detail" in twelve shipped copies of the injected text since injection landed. * The tool did not exist. So the design's escape hatch for the hard per-touch * budget -- "everything else reachable through wiki_query" -- was not reachable * at all, and anything the 500-token cap dropped was simply gone. * * IT ALSO FIXES A DEAD METRIC. `indexBudget` earns the session index its token * allowance from `queries / listed`, and nothing in the product had ever written * a `query` event -- only the test suite. So the ratio was 0 for every project * on earth, and the budget ratcheted to its floor and stayed there. Recording * the event here is the numerator. */ /** Closed set, so a typo cannot compile. */ export declare enum WikiQueryOperation { Get = "get", Search = "search", Node = "node", Audit = "audit", Balance = "balance", Overview = "overview" } /** The operation names as they cross the wire, derived from the enum. */ export declare const WIKI_QUERY_OPERATIONS: string[]; /** Finding types a search may be restricted to. Mirrors wiki_write's set. */ export declare const WIKI_QUERY_FINDING_TYPES: string[]; export interface WikiQueryOptions { operation: WikiQueryOperation | `${WikiQueryOperation}`; /** `get`: the finding key. */ key?: string; /** `search`: the search terms. */ query?: string; /** `search`: restrict to one finding type. */ type?: string; /** `node`: a node id. */ nodeId?: string; /** Max rows returned. Default 20, capped at 100. */ limit?: number; /** Explicit graph directory. Tests use it; callers normally omit it. */ graphDir?: string; /** Explicit project root, when the caller knows better than inference. */ projectRoot?: string; /** Recorded with the query event so hit rate can be attributed to a session. */ sessionId?: string; } export interface WikiQueryResult { operation: string; found: boolean; finding?: unknown; findings?: unknown[]; node?: unknown; neighbours?: unknown[]; audit?: unknown; balance?: unknown; overview?: unknown; note?: string; } export declare const WIKI_QUERY_TOOL_DEFINITION: { name: string; description: string; annotations: { title: string; readOnlyHint: boolean; destructiveHint: boolean; idempotentHint: boolean; openWorldHint: boolean; }; inputSchema: { type: string; properties: { operation: { type: string; enum: string[]; description: string; }; key: { type: string; description: string; }; query: { type: string; description: string; }; type: { type: string; enum: string[]; description: string; }; nodeId: { type: string; description: string; }; limit: { type: string; description: string; }; graphDir: { type: string; description: string; }; projectRoot: { type: string; description: string; }; sessionId: { type: string; description: string; }; }; required: string[]; }; }; export declare function wikiQuery(options: WikiQueryOptions): Promise; //# sourceMappingURL=wiki-query.d.ts.map