@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
24 lines • 1.05 kB
TypeScript
/**
* The cursor-based event feed a control client `subscribe`s to: state changes, assistant reports,
* question changes and turn completions, numbered by one sequence. A client that reconnects with the
* last `seq` it saw is replayed what the bounded ring still holds after it.
*/
export type ControlFeedKind = "state" | "report" | "question" | "completion";
export interface ControlFeedEvent {
readonly type: "session_control_event";
readonly seq: number;
readonly kind: ControlFeedKind;
readonly data: Readonly<Record<string, unknown>>;
}
export declare class ControlFeed {
private seq;
private stateVersionValue;
private readonly ring;
private readonly subscribers;
get stateVersion(): number;
publish(kind: ControlFeedKind, data?: Readonly<Record<string, unknown>>): void;
subscribe(connection: number, cursor: number | undefined, send: (event: ControlFeedEvent) => void): number;
unsubscribe(connection: number): void;
clear(): void;
}
//# sourceMappingURL=session-control-feed.d.ts.map