UNPKG

@code-yeongyu/senpi

Version:

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

31 lines • 1.82 kB
import { type Landing } from "./move-landing.ts"; import type { MoveRecordLocks } from "./move-ledger-lock.ts"; import { type MoveRecord } from "./move-record.ts"; import type { MoveId } from "./ownership.ts"; export declare class MoveRecordFile { #private; readonly dir: string; /** * `locks` is the ledger's own registry: a write here needs the lock the ledger took for the move. `stamp` is what * every write carries beside its time, so a reader on the same machine can age it without the wall clock. */ constructor(dir: string, locks: MoveRecordLocks, stamp?: () => Readonly<Record<string, unknown>>); path(moveId: MoveId): string; raw(moveId: MoveId): Promise<unknown>; read(moveId: MoveId): Promise<MoveRecord | undefined>; /** The record in what `raw` read: none for no file, and an error for a file that does not hold one. */ private recordIn; /** Where this move lands (recorded by its first receive) and whether its commit began. */ landing(moveId: MoveId): Promise<Landing>; /** Writes the record and answers the time it stamped it with. */ write(moveId: MoveId, record: MoveRecord, landing?: Landing): Promise<string>; /** A commit goes on only for a receiving move whose commit has not begun, into its target; else what the record says. */ assertLandsAt(moveId: MoveId, target: string): Promise<Landing>; /** * A commit renames only while it still holds the move's lock and the record still carries its own stamp. A holder * that stalled past the lock's stale bound may find the move settled by whoever took the lock: it then renames * nothing, and the refusal says what the record says. */ assertStampStands(moveId: MoveId, stamp: string): Promise<void>; } //# sourceMappingURL=move-record-file.d.ts.map