Skip to content

DiagnosticChannel

Defined in: packages/client/src/lib/diagnostic-channel.ts:36

Per-client observation seam shared by optional library integrations.

new DiagnosticChannel(sessionId): DiagnosticChannel

Defined in: packages/client/src/lib/diagnostic-channel.ts:47

Creates an isolated stream for one application session.

SessionId

DiagnosticChannel

get diagnosticsObserved(): boolean

Defined in: packages/client/src/lib/diagnostic-channel.ts:60

Whether a consumer holds full diagnostics, including optional remote and capture sources.

boolean


get locallyObserved(): boolean

Defined in: packages/client/src/lib/diagnostic-channel.ts:55

Whether local producer work has a metadata or full diagnostic consumer.

boolean


get observed(): boolean

Defined in: packages/client/src/lib/diagnostic-channel.ts:50

Whether a full diagnostic consumer is attached.

boolean

addDiagnosticSource(start): () => void

Defined in: packages/client/src/lib/diagnostic-channel.ts:110

Registers remote or content observation work available only to full diagnostic consumers.

() => () => void

() => void


addLocalSource(start): () => void

Defined in: packages/client/src/lib/diagnostic-channel.ts:105

Registers local metadata producer work, started for metadata or full diagnostic consumers.

() => () => void

() => void


addSource(start): () => void

Defined in: packages/client/src/lib/diagnostic-channel.ts:100

Registers full diagnostic observation work.

() => () => void

() => void


dispose(): void

Defined in: packages/client/src/lib/diagnostic-channel.ts:191

Releases observers and optional sources.

void


emit<Kind>(kind, …args): void

Defined in: packages/client/src/lib/diagnostic-channel.ts:129

Emits an isolated observation. Observer failures never change application behavior.

Kind extends string

Kind

…[...ObservationArguments<NoInfer<Kind>>[], () => unknown, string]

void


emitDiagnostic(kind, metadata?, readContent?, requestId?, runId?): void

Defined in: packages/client/src/lib/diagnostic-channel.ts:158

Emits diagnostic-only evidence without notifying operational metadata observers.

requestId names the chart request that owns the evidence and runId names the Agent Run. The event carries runId only when one is given. Neither identifier reaches metadata observers or telemetry.

string

DiagnosticMetadata = {}

() => unknown

string

string

void


observeControls(listener): () => void

Defined in: packages/client/src/lib/diagnostic-channel.ts:76

Replays current controls and observes changes without keeping collection sources alive.

(event) => void

() => void


subscribe(listener): () => void

Defined in: packages/client/src/lib/diagnostic-channel.ts:87

Observes events; unsubscribe releases optional sources after the last observer.

(observation) => void

() => void


subscribeMetadata(listener): () => void

Defined in: packages/client/src/lib/diagnostic-channel.ts:65

Observes local producer metadata; forwarded and diagnostic-only evidence is excluded.

TelemetryMetadataObserver

() => void