UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

16 lines • 1.16 kB
/** * Places a session's lifecycle events in its event stream by cause (senpi#4360, R10.c). The lifecycle state updates * synchronously when an agent event arrives, but the session delivers that agent event later, through its ordered * queue. A lifecycle event emitted while the session handles an agent event is held and delivered immediately before * that event in the same queue, so its position no longer depends on how fast either side runs. A lifecycle event * raised outside that window (holds, settles, startup) is delivered at once, unless held events are still waiting in * the queue: then it joins the queue's tail, so a newer snapshot never reaches a listener before an older one. */ export declare class LifecycleEventSequencer<Event> { #private; emit(event: Event, deliver: (event: Event) => void, enqueue: (run: () => void) => void): void; hold(handle: () => void, deliver: (event: Event) => void): readonly Event[]; /** Delivers the events {@link hold} returned, from the session's queue. */ release(held: readonly Event[], deliver: (event: Event) => void): void; } //# sourceMappingURL=lifecycle-event-sequencer.d.ts.map