UNPKG

@code-yeongyu/senpi

Version:

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

57 lines • 2.29 kB
import type { CompactContentStore } from "./compact-content-store.ts"; import { type ValueRef } from "./compact-values.ts"; export type CompactRunState = "idle" | "running"; /** * One open dialog as a cut holds it. A broadcast question keeps its request, which a late peer may be shown; a targeted * dialog keeps only its identity, method and deadline, so no reader of a cut can present it (RULING-25 Q4). */ export interface CompactDialog { readonly id: string; readonly audience: "broadcast" | "targeted"; readonly method: string; readonly deadlineAtMs?: number; readonly request?: object; } export interface FrozenComponents { readonly runState: CompactRunState; readonly lifecycle: ValueRef | undefined; readonly dialogs: ValueRef | undefined; readonly dialogCounts: { readonly broadcast: number; readonly targeted: number; }; } /** The host-origin records that change lifecycle, run state or dialogs; each folds at its own lane sequence. */ export declare const COMPONENT_RECORDS: ReadonlySet<string>; /** * Run state, the latest lifecycle description and the open dialogs of one epoch (S03b-3b, RULING-26 Q4): current * values only, never a log of notifications. Each change replaces a persistent root; a cut pins the roots it froze. */ export declare class CompactCurrentComponents { private runState; private lifecycle; private dialogs; private readonly open; private opened; private readonly store; private readonly values; private readonly dialogRoots; constructor(store: CompactContentStore); get openBroadcast(): number; /** `record` is JSON-normal (the acceptance unit's producer boundary). */ apply(record: object): void; freeze(): FrozenComponents; release(frozen: FrozenComponents): void; /** The cut's components; dialogs in the order they opened. Called under the cut's operation lease. */ read(frozen: FrozenComponents, valid: () => void): Promise<{ runState: CompactRunState; lifecycle: unknown; dialogs: CompactDialog[]; dialogCounts: { readonly broadcast: number; readonly targeted: number; }; }>; private put; } //# sourceMappingURL=compact-current-components.d.ts.map