Files
orca/src/shared/agent-launch-surface.ts
T
Brennan Benson 6e973fa6d4 A launch can name chat or terminal: agent.launch gets a surface pick and the CLI gets --surface chat|terminal (#31191)
* feat(agent.launch): a launch can name chat or terminal, and the CLI gets --surface chat|terminal

agent.launch gains an optional `surface` field, read by hosts advertising
agent.launch.surface.v1. `terminal` always runs the agent's CLI; `chat` runs a
chat even when the user's default is a terminal, and one the host can prove it
cannot open is refused with a typed no-effects error before anything is
created, so a retry answers with the same refusal. The pick is part of the
replay fingerprint. `orca agent launch` and `orca worktree create --agent`
accept --surface chat|terminal and refuse it on a host that would drop it,
including the legacy worktree.create fallback.

* test(agent.launch): pin the surface pick beside the other pre-start failures

* fix(agent.launch): settle requested surfaces from resolved workspace facts

* fix(agent.launch): describe fallback boundaries and correct test types
2026-10-20 16:45:05 -07:00

7 lines
421 B
TypeScript

/** Which surface a caller asked one launch to open: the agent's chat, or its CLI in a terminal. */
export const AGENT_LAUNCH_SURFACES = ['chat', 'terminal'] as const
export type AgentLaunchSurface = (typeof AGENT_LAUNCH_SURFACES)[number]
/** An explicit chat the host proved it cannot open, refused before anything was created. */
export const AGENT_LAUNCH_SURFACE_UNAVAILABLE_CODE = 'agent_launch_surface_unavailable'