/** * session-patch handler — FORBIDDEN_PATH-gated session file patch. * * Validates the target path against 4 canonical prefixes BEFORE any * plugin dispatch. If the path matches a canonical prefix, returns * FORBIDDEN_PATH with HTTP 200 (no plugin dispatch). * * Per AC-S02-08, D-SC01-03. * * @module sidecar/server/tool-proxy/handlers/session-patch */ import type { SidecarDependencyRegistry } from "../../registry.js"; export interface SessionPatchArgs { path?: string; content?: string; sessionId?: string; } /** * Handle a session-patch tool call. * * Gating sequence: * 1. If path is missing → INVALID_ARGS * 2. If path matches canonical prefix → FORBIDDEN_PATH (no dispatch) * 3. Otherwise → patch allowed * * @param options.args - Patch args (path, content). * @param options.registry - Sidecar dependency registry. * @returns Ok with patched status or error. */ export declare function handleSessionPatch(options: { args: SessionPatchArgs; registry: SidecarDependencyRegistry; }): Promise<{ ok: false; error: { code: string; message: string; }; data?: undefined; } | { ok: true; data: { patched: boolean; }; error?: undefined; }>; //# sourceMappingURL=session-patch.d.ts.map