/** * Protocol-layer logging: call-scoped inputs, outputs, and context for debugging. * Use protocolLogger('ComponentName') for the logger, then wrap calls with * withCallLogging. All protocol code should log inputs at call start and * outputs (or summary) + duration at end. */ import type { LoggerWithSource } from "./log.js"; export type { LoggerWithSource }; /** Create a protocol logger for a given source (e.g. "ChatTools", "DiscoverNodes"). */ export declare function protocolLogger(source: string): LoggerWithSource; export interface CallLogOptions { /** Log full output on success (default: true). Set false for very large payloads. */ logOutput?: boolean; /** Extra context to include in both start and end (e.g. userId, networkId). */ context?: Record; } /** * Wraps an async call with consistent logging: inputs at start, outputs + duration at end, * error + duration on failure. All payloads are sanitized (embeddings redacted). */ export declare function withCallLogging(logger: LoggerWithSource, callName: string, inputs: Record, fn: () => Promise, options?: CallLogOptions): Promise;