import { type ListRecentSessionsResult } from "./recent-sessions"; import { type SessionCreateOutcome, type SessionLifecycleActor, SessionLifecycleService, type SessionResumeOutcome } from "./service"; export type ExternalSessionCreateTarget = { readonly kind: "existing_path"; readonly path: string; } | { readonly kind: "worktree"; readonly repo: string; readonly branch: string; } | { readonly kind: "plain_dir"; readonly path: string; }; export interface ExternalSessionResumeTarget { readonly sessionIdOrPrefix: string; readonly path?: string; } export type ExternalSessionResumeResult = { readonly kind: "result"; readonly outcome: SessionResumeOutcome; } | { readonly kind: "not_found"; } | { readonly kind: "ambiguous"; readonly candidates: readonly { readonly sessionId: string; readonly path?: string; }[]; } | { readonly kind: "unavailable"; readonly message: string; }; export declare class AgentDirSessionLifecycleService extends SessionLifecycleService { #private; constructor(agentDir: string); createExternal(request: { readonly actor: SessionLifecycleActor; readonly capability: "session.create"; readonly requestKey: string; readonly target: ExternalSessionCreateTarget; readonly modelPreset?: string; readonly readinessTimeoutMs?: number; }): Promise; listRecent(input: { readonly cwd: string; readonly limit?: number; readonly includeInternal?: boolean; readonly allWorkspaces?: boolean; }): Promise; resumeExternal(request: { readonly actor: SessionLifecycleActor; readonly capability: "session.resume"; readonly requestKey: string; readonly target: ExternalSessionResumeTarget; readonly modelPreset?: string; readonly readinessTimeoutMs?: number; }): Promise; } export declare function createSessionLifecycleService(agentDir: string): AgentDirSessionLifecycleService;