/** * Tool-approvals manifest — the single, codebase-controlled source of truth * for which senpi MCP tools the approval gate treats as trades (gated in the * default mode) and for the gate's defaults (mode, prompt timeout). * * The manifest is a checked-in JSON file (`tool-approvals-manifest.json`, * copied into `dist/` at build time) shipped *with the runtime*, so changing * the gated tool set or the fleet default is one reviewable diff — no env * vars, no scattered constants. Mirrors the skills-manager manifest pattern * (`src/skills-manager/manifest.ts`). * * Runtime overrides still win over the manifest default for the mode: * env `SENPI_TOOL_APPROVALS` > plugin config `toolApprovals` > manifest * `defaults.mode` (see `resolveToolApprovalsMode` in tool-approval-gate.ts). */ export type ToolApprovalsMode = "off" | "trades" | "all"; /** Parsed + validated manifest shape. */ export interface ToolApprovalsManifest { schemaVersion: number; defaults: { mode: ToolApprovalsMode; /** Prompt timeout; gateway clamps plugin approvals to max 600_000 ms. */ timeoutMs: number; }; /** Bare senpi MCP tool names (no `senpi__` prefix) gated in `trades` mode. */ tradeTools: string[]; } /** * Hardcoded fallback used only when the checked-in JSON cannot be read or * parsed (corrupt file, missing from dist). Keeps the plugin from crashing at * import time; logged loudly by {@link loadToolApprovalsManifest}. Kept in * sync with `tool-approvals-manifest.json` (a test asserts this). */ export declare const FALLBACK_TOOL_APPROVALS_MANIFEST: ToolApprovalsManifest; /** * Load + validate the manifest from disk, cached after first read. Resolves * the JSON path relative to this module so it works both from `src/` (vitest) * and `dist/` (the build copies the JSON next to the compiled module). * * On any read/parse/validation failure, logs a warning and returns * {@link FALLBACK_TOOL_APPROVALS_MANIFEST} — the gate must not fail to start * because of a packaging mistake. */ export declare function loadToolApprovalsManifest(): ToolApprovalsManifest; /** Reset the manifest cache. Test-only. */ export declare function resetToolApprovalsManifestCacheForTests(): void; //# sourceMappingURL=manifest.d.ts.map