@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
13 lines • 1.17 kB
TypeScript
/**
* The one projection of a session's events into RPC records: invocation metadata and `agent_end` go through
* client-message correlation; `queue_update` entries lose their host-minted ids; model and thinking changes
* carry the selection provenance; an aborted `agent_end` names its abort source and the client that aborted
* (`abortedBy`), and a deadline-stopped one its `deadline`; `session_abort` names the client that aborted. A
* host connection and a terminal control endpoint both stream a session through this, so an attached client
* reads the same records from either.
*/
import type { AgentAbortSource } from "../../core/agent-abort-provenance.ts";
import type { AgentSession, AgentSessionEventListener } from "../../core/agent-session.ts";
/** Subscribes `output` to the session's records (from `source`, by default `session.subscribe`); returns the unsubscribe. */
export declare function subscribeSessionRecords(session: AgentSession, output: (record: object) => void, onAbortSource?: (source: AgentAbortSource) => void, source?: (listener: AgentSessionEventListener) => () => void): () => void;
//# sourceMappingURL=session-record-stream.d.ts.map