Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/sessions / / SessionReplayer
Interface: SessionReplayer
Defined in: packages/sessions/src/replay/replayer.ts:61
Convenience surface returned by createSessionReplayer. The replayer is async-iterable; the agent runtime drives it under for await.
Stable
Methods
run()
ts
run(options): AsyncIterable<SessionReplayEvent>;Defined in: packages/sessions/src/replay/replayer.ts:73
Run the replay engine. The caller threads in:
traceSource: an iterable ofSpanRecords (from the observability trace log).target: e.g.'session:<id>'.liveInvocation(record): a callback the engine invokes for every cassettetool-callrecord so the runtime can supply the liveargs+ theidempotencyKeycallback output. The callback returns the live invocation surface; when omitted, the engine treats the recorded args as the live args.
Parameters
| Parameter | Type |
|---|---|
options | SessionReplayOptions & { liveInvocation?: (record) => Promise<{ args: unknown; idempotencyKey?: string; validateRecordedOutput?: (output) => string | null; }>; target: string; traceSource?: | AsyncIterable<SpanRecord<SpanType>, any, any> | Iterable<SpanRecord<SpanType>, any, any>; } |
Returns
AsyncIterable<SessionReplayEvent>