Skip to main content
Observes an existing session’s live updates and Cognition extension notifications and records each turn as spans. Record the prompt text with SessionTracer.recordPrompt before sending it; the ACP stream does not echo the driving client’s own prompt. Prefer traceSessions, which records prompts itself.

Constructor

Parameters

Returns

SessionTracer

Methods

end()

Stop observing, end any unfinished turn, and restore onExtension. Flush the tracer provider afterwards to export before the process exits.

Returns

Promise<void>

recordPrompt()

The prompt text for the next turn, recorded as its input.

Parameters

string
required