@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
31 lines • 1.99 kB
TypeScript
import type { CallFold } from "./compact-call-fold.ts";
import type { CompactLaneCurrent } from "./compact-lane-current.ts";
/** Recovery kinds take a sequence; responses and every other record keep FIFO order with none. */
export declare const SEQUENCED: ReadonlySet<string>;
/** Where the lane stands, or where an admitted record lands: its sequence and the turn it belongs to. */
export interface LanePlace {
readonly sequence: number;
readonly turnId: string | null;
}
/** An admitted record's place and what its call fold produced, if it is a call record. */
export interface AdmittedRecord extends LanePlace {
readonly call: CallFold | undefined;
}
/** The outer client correlation standing in the lane, and the sequence its transition took (C1.1). */
export interface AcceptedCorrelation {
readonly sequence: number;
readonly clientMessageId: unknown;
readonly clientTurnId: unknown;
readonly clientMessages: unknown;
}
export declare function field(record: object, key: string): unknown;
/**
* The calls component folds first, at the sequence and turn this record would take: an ignored call-only record
* changes no component, takes no sequence, mints no turn, commits no correlation and publishes no root
* (RULING-13 Q9), so the lane commits nothing before it decides. Returns the place the record takes, or undefined
* when it is ignored. `folds` false: the record was refused at the protocol depth limit and folds no call.
*/
export declare function admitRecord(current: CompactLaneCurrent, record: object, type: string, at: LanePlace, folds?: boolean, callKey?: string): AdmittedRecord | undefined;
/** A change of the outer client correlation is its own transition, sequenced just before its record (C1.1). */
export declare function correlationChange(standing: AcceptedCorrelation | null, turnId: string | null, record: object): Omit<AcceptedCorrelation, "sequence"> | undefined;
//# sourceMappingURL=session-acceptance-admission.d.ts.map