MCPcopy
hub / github.com/CopilotKit/CopilotKit / CapturingPbWriter

Class CapturingPbWriter

showcase/harness/src/cvdiag/emit.test.ts:85–91  ·  view source on GitHub ↗

* A `CvdiagPbWriter` test double that captures every batch handed to * `writeBatch`. Resolves (never rejects), matching the best-effort seam * contract.

Source from the content-addressed store, hash-verified

83 * contract.
84 */
85class CapturingPbWriter implements CvdiagPbWriter {
86 readonly batches: CvdiagEnvelope[][] = [];
87 async writeBatch(events: CvdiagEnvelope[]): Promise<void> {
88 // Capture a snapshot (callers may mutate/reuse arrays).
89 this.batches.push([...events]);
90 }
91}
92
93/** Emit N data-plane events that pass the default-tier filter. */
94function emitN(emitter: CvdiagEmitter, n: number): void {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…