UNPKG

@code-yeongyu/senpi

Version:

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

23 lines • 1.32 kB
import type { EffectActor } from "./effect-record.ts"; import type { RpcCommand, RpcResponse } from "./rpc-types.ts"; import type { RpcSessionEntry } from "./session-registry.ts"; import { type ReleaseSettlePort } from "./session-release-interrupt.ts"; export type UnloadSessionCommand = Extract<RpcCommand, { type: "unload_session"; }>; export interface SessionUnloadPort extends ReleaseSettlePort { readonly draining: () => boolean; readonly by: EffectActor; lookup(sessionId: string): RpcSessionEntry; code(cause: unknown): string; /** Requests for the session in flight on any connection, the unload itself not counted. */ otherRequests(sessionId: string): number; /** Attachments held by connections other than the caller's. */ otherAttachments(sessionId: string): number; /** Open worker sessions on this host whose context names `durableSessionId` as parent or root. */ openChildSessions(durableSessionId: string): number; /** The park teardown, sealed `session_parked { reason: "unloaded" }`. `false` when another close owns it. */ tearDown(sessionId: string, sessionPath: string): Promise<boolean>; } export declare function unloadSession(port: SessionUnloadPort, command: UnloadSessionCommand): Promise<RpcResponse>; //# sourceMappingURL=session-unload.d.ts.map