* Build a TelemetryTrackFn wrapper bound to the underlying * harness so the AcpSession (and its reverse-RPC bridges in * Phase 13) can emit PII-free breadcrumbs through the same * `harness.track` channel. The wrapper * shape is required by the broader `Record<string, unkn
()
| 876 | * via {@link safeTrack}. |
| 877 | */ |
| 878 | private makeTelemetryTrack(): TelemetryTrackFn | undefined { |
| 879 | const harness = this.harness; |
| 880 | if (typeof harness.track !== 'function') return undefined; |
| 881 | return (event, properties) => { |
| 882 | // Cast: the harness expects the narrower `TelemetryProperties` |
| 883 | // shape (Readonly<Record<string, primitive>>); Phase 13 callers |
| 884 | // only pass primitive values so the runtime contract holds. |
| 885 | harness.track(event, properties as Parameters<typeof harness.track>[1]); |
| 886 | }; |
| 887 | } |
| 888 | |
| 889 | private scheduleAvailableCommandsUpdate(sessionId: string): void { |
| 890 | setTimeout(() => { |
no test coverage detected