import { type JinnMcpTool } from "./toolkit.js"; /** * GRS-020b — the knowledge tool group of the `jinn` MCP server: agents search * the company's institutional knowledge (`~/.jinn/knowledge/*.md` + * `~/.jinn/docs/*.md`) and read ONE instance file — replacing the ~100-file knowledge * index pasted into every MCP-attached bootstrap (the conditional diet in * sessions/context.ts). * * Domain rules this module owns: * - INSTANCE-ROOT INVARIANT (enforced in notes/store.ts behind the * routes): reads accept any relative instance file, while realpath * containment rejects `..`, absolute paths, and symlink escapes. * - CONTEXT-BOMB GUARDS: search returns ≤20 {path,title,snippet,matchCount} * hits (snippets ~12 words, never bodies); read returns ONE slice of ONE file, * capped at KNOWLEDGE_FILE_CHAR_CAP chars, with `offset` to page the rest. * - NO FABRICATED READS (PLA-100): a response missing `content`, `truncated`, * or the char counts is an error, never a defaulted "complete" read. * - READ TIER: these are privileged company reads. Tool-marked or * caller-session-claimed requests must carry a valid bound session * capability; operator/browser reads without those headers remain unchanged. * - LENGTH CAPS (the 020a-fix finding-3 pattern): query/path are capped * tool-side with a structured error BEFORE the HTTP call. * - TEACHING lives on search_knowledge; read_knowledge stays short. */ /** Tool-side query cap (route backstop is 1,024 — the tool fails first, friendlier). */ export declare const KNOWLEDGE_QUERY_CHAR_CAP = 512; /** Tool-side relative-path cap (real paths are far shorter). */ export declare const KNOWLEDGE_PATH_CHAR_CAP = 300; export declare function buildKnowledgeTools(): JinnMcpTool[]; //# sourceMappingURL=knowledge-tools.d.ts.map