Repository navigation
Structured launch availability per registered agent, with legacy-chat fallback on decline #78
Copy link
Copy link
Open
Labels
acp-migrationOMP Native Chat ACP migrationOMP Native Chat ACP migrationphase-APhase A parity baselinePhase A parity baseline
Description
Summary
Add a host-side, per-registration launch-availability gate for structured agents and make every declined structured launch land on the surface it gets today (legacy native chat for transcript-backed agents). Provider-neutral prerequisite for registering OMP without changing anyone's default.
Context
44madfire/orca#20Phase A: OMP is registered as a structured provider while unsupported builds/environments stay on the old path, gated by capability/version.agentSession.agentspublishes every registration statically (src/main/native-chat/agent-session-wire/structured-agent-session-host.ts:211@76d1b7b); the same list bounds which saved chats a client renders (comment at:213), so dropping an agent from it would hide existing tabs.- The renderer routes any listed agent structured (
src/shared/structured-native-chat-launch-route.ts:102-106@76d1b7b). There is no per-agent opt-in or version gate. - Host create-support already consults a per-registration hook:
structuredAgentRuntimeRegistration(agent)?.supportsLocation(location)(src/main/runtime/orca-runtime-get-structured-agent-session-create-support.ts:52@76d1b7b);agent.launchand orchestration read it (src/main/agent-launch/agent-launch-mode.ts:192-222@76d1b7b). - A local structured launch opens immediately with no decline path (
src/renderer/src/lib/launch-agent-in-new-tab-structured-route.ts:36-58@76d1b7b); a paired decline opensterminal-tui(:72-75), not the legacy chat today's OMP launch gets. - Structured children on Windows need process start-time proof (
src/main/provider-process/supervised-provider-child-location.ts:9,14@76d1b7b); WSL/SSH are blocked atstructured-native-chat-launch-route.ts:97-99,111-113. - Remote wire compatibility (
docs/reference/remote-wire-compatibility.md): a new optional field is safe; a new opcode is not.
Scope
- Optional async
launchAvailabilityon structured agent registrations, evaluated on the execution host, cached with single-flight; absent hook = available (Grok and built-ins unchanged). getStructuredAgentSessionCreateSupportrefuses with a named reason when availability says no.agentSession.agentsentries gain optionallaunchable: falseand a reason; rendererhostStructuredAgentsexcludes non-launchable agents while their existing tabs still render and close.- Declines (paired host decline, local availability refusal) route to what
decideInitialAgentTabViewModewould choose without the structured preference (legacy native chat when the agent supports it), not hard-codedterminal-tui. - ACP registrations report non-launchable on Windows hosts without process start-time proof.
Non-goals
- No OMP registration (Register omp acp as an opt-in structured ACP agent behind the availability gate #68). No change to the structured-chat preference settings. No new stream opcodes. No SSH/WSL structured support.
Depends on
- None.
Parity rows owned
- P-ROPT-01, P-ROPT-02, P-ROPT-03, P-ROPT-04, P-ROPT-05, P-ROPT-06, P-ROPT-07.
Acceptance criteria
- Grok and built-in agents route exactly as before on every surface.
- A non-launchable agent is never chosen structured by desktop, paired desktop,
agent.launch, or orchestration; its existing structured tabs still render and close. - Old clients ignore the new field; new clients treat a missing field as launchable.
- A declined structured launch opens legacy native chat when the agent supports it and the user's default is chat; terminal otherwise.
- Windows without start-time proof reports ACP agents non-launchable with a reason.
- Routing outcomes for desktop local, WSL, plain SSH, paired runtime, runtime-owned SSH target, Windows without proof, and folder workspaces (inside root / custom start dir) are pinned for a non-launchable agent and unchanged for launchable ones.
Required tests
- Availability cache: single in-flight probe under concurrent reads; invalidation on binary change; probe timeout → non-launchable, no hang.
- Mixed versions: old client + new host, new client + old host (field absent), paired client whose host declines after a provisional tab → exactly one surface opens.
- Probes run on the execution host only; an SSH or paired workspace never probes on the client (SSH boundary rule).
- Routing matrix table test over the seven
P-ROPTrows.
Base branch
acp-migration (44madfire/orca).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
acp-migrationOMP Native Chat ACP migrationOMP Native Chat ACP migrationphase-APhase A parity baselinePhase A parity baseline
Activity