/** * ToolTelemetryBridge — forwards local tool execution events to the HQ * publisher as `tool.started` and `tool.completed` envelopes, so the command * center can surface live tool activity (what's running, durations, success * rates) across every connected machine. * * Sources: * - `tool.started` (EventBus) → `tool.started` envelope. Raw tool input is * shaped via {@link summarizeHqToolArgs} according to the active HQ policy. * - `tool.executed` (EventBus) → `tool.completed` envelope (carries the * richer post-execution signal: duration, ok/error, output bytes). * * All payload fields are plain serializable data — no closures. The * `tool.started.input` raw args follow the publisher redaction policy before * publishing. * * @module hq/tool-bridge */ import type { EventBus } from '../kernel/events.js'; import type { HqEventEnvelope } from './protocol.js'; import { type BridgeContextOptions } from './bridge-context.js'; export interface ToolTelemetryBridgeOptions extends BridgeContextOptions { /** Local EventBus emitting `tool.started` and `tool.executed` events. */ events: EventBus; /** Project root for path redaction in tool input summaries. */ projectRoot?: string; } /** * Start forwarding tool execution events to HQ. Returns a disposer that * unsubscribes all listeners — call on shutdown. */ export declare function startToolTelemetryBridge(opts: ToolTelemetryBridgeOptions): () => void; /** Re-export for type-only consumers. */ export type { HqEventEnvelope }; //# sourceMappingURL=tool-bridge.d.ts.map