mirror of
https://github.com/stablyai/orca.git
synced 2026-10-24 00:04:01 +00:00
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.
18 lines
735 B
TypeScript
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() } : {})
|
|
}
|
|
}
|