UNPKG

@code-yeongyu/senpi

Version:

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

39 lines • 2.38 kB
import type { RecoveryCarrier } from "../../core/session-recovery-identity.ts"; import type { TranscriptTransition } from "../../core/session-transcript-journal.ts"; import type { CallFold } from "./compact-call-fold.ts"; import type { CompactLaneCurrent } from "./compact-lane-current.ts"; import type { CanonicalUnit } from "./compact-lane-transitions.ts"; import type { LiveIdentity } from "./compact-message-identity.ts"; import type { CompactSettledMessages } from "./compact-settled-messages.ts"; /** The compact components one lane epoch feeds: its settled terminals and its current state. */ export interface CompactComponents { readonly settled: CompactSettledMessages; readonly current: CompactLaneCurrent; } export interface AcceptedRecord { readonly record: object; readonly type: string; readonly carrier: RecoveryCarrier | undefined; readonly canonical: CanonicalUnit | undefined; readonly sequence: number; readonly turnId: string | null; /** * The call fold of a call record: the projection of the outstanding call a toolResult terminal settles (RULING-13 Q2), * stored with it, and the call an execution or hook record changed (RULING-123). */ readonly call?: CallFold | undefined; } /** * One accepted transcript transition: its owned join, then the cold flow and persistence it carries. Returns the * message an append joined, the id its `join-<n>` member records. */ export declare function foldCompactTransition({ settled, current }: CompactComponents, transition: TranscriptTransition, transcriptAvailable: boolean, epoch: string): string | undefined; /** * The compact side of one accepted record: canonical and component folds, its terminal, its persistence. The call * records fold before the lane commits this sequence (RULING-13 Q9), so they are not here. Returns the identity the * settled store recorded for this record's message (RULING-120), or the call a live call record belongs to: the one its * fold changed, or for a `toolcall_*` update the call owning the streamed block once it folded (RULING-123); undefined * when there is none. */ export declare function foldCompactRecord({ settled, current }: CompactComponents, { record, type, carrier, canonical, sequence, turnId, call }: AcceptedRecord): LiveIdentity | undefined; //# sourceMappingURL=session-acceptance-compact.d.ts.map