UNPKG

@code-yeongyu/senpi

Version:

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

42 lines • 1.75 kB
import type { SessionEntry, SessionManager } from "./session-manager.ts"; /** The desktop app's `ThreadSettledBy`: who or what settled the thread. */ export type ThreadSettledBy = { readonly kind: "user"; } | { readonly kind: "agent"; readonly threadId?: string; readonly threadTitle?: string; } | { readonly kind: "pr-merged" | "pr-closed"; readonly pullRequestNumber?: number; } | { readonly kind: "inactivity"; readonly days: number; }; export interface SessionSettled { readonly settled: boolean; readonly by?: ThreadSettledBy; } /** The fields a listing row, a status record, a worker snapshot and the change event carry. */ export interface SettledFields { readonly settled: boolean; readonly settledBy?: ThreadSettledBy; } export declare const NOT_SETTLED: SessionSettled; /** The arguments of `set_session_settled`; `by` is validated whenever present and dropped when unsettling. */ export declare function parseSessionSettled(command: { readonly settled?: unknown; readonly by?: unknown; }): { readonly ok: true; readonly value: SessionSettled; } | { readonly ok: false; readonly error: string; }; /** The state `entry` sets for session `sessionId`, or undefined when it sets none there. */ export declare function settledStateOf(entry: SessionEntry, sessionId: string): SessionSettled | undefined; export declare function settledFields(state: SessionSettled): SettledFields; export declare function readSessionSettled(manager: Pick<SessionManager, "getSettled">): SessionSettled; export declare function setSessionSettled(manager: Pick<SessionManager, "appendCustomEntry" | "getSessionId">, state: SessionSettled): void; //# sourceMappingURL=session-settled.d.ts.map