Files
orca/src/shared/sleeping-agent-launch-config.ts
T
Mark Xian e3adb20917 fix(agents): include OMP terminals in cold session restoration (#8991)
Preserve OMP session identity and exact resume paths across cold restoration, AI Vault, mobile, WSL/SSH, and host-authority routes. Add mixed-version fallback and completed-session recovery coverage.
2026-07-23 19:05:22 -07:00

18 lines
735 B
TypeScript

import type { SleepingAgentLaunchConfig } from './agent-session-resume'
export function buildSleepingAgentLaunchConfig(args: {
agentCommand?: string | null
agentArgs?: string | null
agentEnv?: Record<string, string> | null
ompResumeFilePath?: string | null
}): SleepingAgentLaunchConfig {
return {
...(args.agentCommand?.trim() ? { agentCommand: args.agentCommand } : {}),
agentArgs: args.agentArgs ?? '',
// Why: startup env may include prompt transport or pane identity values;
// durable resume state is limited to Orca-managed agent inputs.
agentEnv: args.agentEnv ? { ...args.agentEnv } : {},
...(args.ompResumeFilePath?.trim() ? { ompResumeFilePath: args.ompResumeFilePath.trim() } : {})
}
}