/** * Privacy-preserving summarizers for tool input/output. * * Plugins must NEVER record raw tool content (commands, file bodies, * URLs with query strings, prompts) directly into activity attributes. * These helpers emit only: * - byte size (proxy for "how much data") * - sha256-truncated content hash (for dedup / "we've seen this before") * - a small set of safe per-tool fields (exit code and path/host hashes) * * Anything that could reflect content goes through here so the redaction * policy lives in one place. */ export interface ToolInputSummary { inputBytes?: number; inputHash?: string; /** Bash/shell — not the command itself. */ bashCommandBytes?: number; bashCommandHash?: string; /** File ops — raw paths can contain user/workspace names. */ filePathBytes?: number; filePathHash?: string; /** Network ops — even hosts can identify private infrastructure. */ urlHostHash?: string; } export interface ToolOutputSummary { outputBytes?: number; outputHash?: string; /** Bash/shell exit code. */ bashExitCode?: number; bashStdoutBytes?: number; bashStderrBytes?: number; } /** * Summarize a tool input value. `input` is whatever the harness passed — * usually an object like `{ command: "..." }` or `{ file_path: "..." }`. */ export declare function summarizeToolInput(toolName: string, input: unknown): ToolInputSummary; /** * Summarize a tool output/response value. */ export declare function summarizeToolOutput(toolName: string, output: unknown): ToolOutputSummary;