/** * One log line per code-mode invocation. * * A classic tool call is one request, and the client's own transcript is the * record of it. A dispatched call can issue sixty, and a write made through * jsm_apply does not carry its operation in the tool name — so "what did this * server do with my credential" stops being answerable from the transcript * alone. This makes it answerable again. * * What is logged: the operations called, the counts, the duration, the outcome. * What is not: arguments, request bodies and response bodies. Alert messages, * descriptions and notes are written by whatever integration fired them, so * they are untrusted input that may contain anything, and a log file is a place * people forget to treat as sensitive. * * Writes log unconditionally, at info. A write made through a dispatcher has to * be as traceable as one made through its own tool, or code mode is a way to * make changes that leave less of a trail. */ import { type Logger } from "../../services/log.js"; import { type CallContext } from "./context.js"; export interface AuditEntry { /** The MCP tool the call arrived through. */ tool: string; ctx: CallContext; startedAt: number; error?: unknown; /** Extra fields, e.g. whether the sweep completed. */ fields?: Record; } export declare function auditInvocation(entry: AuditEntry, logger?: Logger): void; //# sourceMappingURL=audit.d.ts.map