UNPKG

@code-yeongyu/senpi

Version:

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

27 lines • 1.49 kB
import { loadEntriesFromFileAsync } from "../session-manager.ts"; import type { LandingOutcome } from "./move-landing.ts"; import { type MoveId, type SessionOwnership } from "./ownership.ts"; /** * Where an accepted move landed, as `status` answers it (senpi#6436): the session file the move's record names, with * the id and the folder that file's header names. `gone` when no file is there, or the file there no longer records * the move: a move lands once, so nothing else stands in for it. * * `ownership` is who may write that file now, by the rule that refuses the writes (senpi#6473): a later move that * released the session from here, or this move's own revoke, leaves the path answered and the copy read-only. */ export type LandedFile = { readonly sessionPath: string; readonly sessionId: string; readonly cwd: string; readonly ownership: SessionOwnership; } | "gone"; type Entries = Awaited<ReturnType<typeof loadEntriesFromFileAsync>>; /** What a session file's entries record for the move: nothing, its import, or its import and then a revoke. */ export declare function outcomeIn(entries: Entries, moveId: MoveId): LandingOutcome; /** One read of the file at a move's landing target: what it records for the move, and where that puts the session. */ export declare function readLanding(target: string, moveId: MoveId): Promise<{ readonly outcome: LandingOutcome; readonly file: LandedFile; }>; export {}; //# sourceMappingURL=landed-file.d.ts.map