@sema-agent/core
Version:
Stateless, task-oriented AI agent core
9 lines (8 loc) • 588 B
TypeScript
/** A leg's frame seat: the run binds its sink once, and observes after every step that may have moved what the frame reports. */
export interface SnapshotFrameSeat<S> {
/** Bind this leg's frame sink and send the leg-start snapshot through it. The first binding wins; a later one is ignored. */
subscribe(push: (snapshot: S) => void): void;
/** Re-project, and send iff the snapshot differs from the last one sent. Nothing is sent before the sink is bound. */
observe(): void;
}
export declare function createSnapshotFrameSeat<S>(project: () => S): SnapshotFrameSeat<S>;