@code-yeongyu/senpi
Version:
Coding agent CLI with read, bash, edit, write tools and session management
67 lines • 2.22 kB
TypeScript
import { type RepositoryIdentity } from "../../core/repository-identity.ts";
import type { InlineBundleFile } from "../../core/session-move/inline-bundle.ts";
import { type MoveAnswer } from "../../core/session-move/move-ledger.ts";
import type { MoveId } from "../../core/session-move/ownership.ts";
/** The file a `status` names: the copy the import returned, or the place the move would have landed. */
export type StatusNamedFile = {
readonly kind: "path";
readonly sessionPath: string;
} | {
readonly kind: "landing";
readonly cwd: string;
readonly sessionFileName: string;
readonly sessionDir: string | undefined;
};
export type MoveRequest = {
readonly op: "prepare";
readonly moveId: MoveId;
readonly cwd: string | undefined;
readonly repository: RepositoryIdentity | undefined;
} | {
readonly op: "cancel";
readonly moveId: MoveId;
} | {
readonly op: "identity";
readonly sessionPath: string;
} | {
readonly op: "identity";
readonly cwd: string;
} | {
readonly op: "status";
readonly moveId: MoveId;
readonly named: StatusNamedFile | undefined;
} | {
readonly op: "export";
readonly sessionPath: string;
readonly moveId: MoveId;
readonly target: string;
readonly dropped: readonly string[];
/** The most bytes the bundle may hold to be answered inline; `undefined` when the caller did not ask. */
readonly inlineMaxBytes: number | undefined;
} | {
readonly op: "import";
readonly bundle: {
readonly dir: string;
} | {
readonly files: readonly InlineBundleFile[];
};
readonly cwd: string;
readonly from: string;
readonly sessionDir: string | undefined;
} | {
readonly op: "finish";
readonly sessionPath: string;
readonly moveId: MoveId;
readonly answer: MoveAnswer;
} | {
readonly op: "revoke";
readonly sessionPath: string;
readonly moveId: MoveId;
} | {
readonly op: "copy";
readonly sessionPath: string;
readonly sessionId: string;
readonly sessionDir: string | undefined;
};
export declare function parseMoveRequest(raw: Record<string, unknown>): MoveRequest | string;
//# sourceMappingURL=session-move-request.d.ts.map