Repository navigation
Native chat: answer 'can this agent do X' from each agent's registration - #27078
brennanb2025 wants to merge 3 commits into
Conversation
…he agent registration Claude and Codex's transcript importers and Session History ownership (row id, resume-command grammar) move onto their runtime registrations as required-nullable fields; every other agent writes null. agentSession.agents publishes the derived transcriptAdoption/sessionHistory flags, and a client reads a host that omits them (or lists nothing) as the old build's answer. Strict parity: only Claude and Codex answer yes anywhere.
…w agents, fork offer from fork argv Review round 1: the duplicate-adoption check and Session History ownership read one index keyed by the registration's row id (an importer now requires sessionHistory); resume-command binaries derive from rowAgents through the TUI agent config; the Resume in New CLI offer asks getAgentForkArgv instead of naming Claude and Codex. Strict parity: only Claude and Codex answer yes.
…hat-capability-record
Review status: ready for your review (draft, not merged)The problem. Features like "bring a terminal conversation into a chat", "show a chat's conversation as that chat in Session History, and refuse a terminal resume that would write into it at the same time", and "chat tab history actions" decided which agents qualify with a hard-coded "Claude or Codex" check, repeated in about ten places. Newer agents (OpenCode, Grok, OMP, Pi) kept missing features because one of those places wasn't updated. The visible case today: an OpenCode chat's conversation shows in Session History as a plain terminal row, and "resume" starts a second writer on it. What this PR changes for users. Nothing. Only Claude and Codex answer "yes", exactly as before. Each agent's registration now answers these questions (two new required fields), and clients read the answer from the host's existing agent list. The follow-up #27183 turns the features on for the other four agents by filling those fields in. Fixed during review:
Deferred (nits):
Verified:
Not verified:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to The reviewed capability changes preserve the investigated resume and host-list behavior. No issue identified here prevents merging after normal checks. Pre-merge checks |
|
|
Folded into #27183 in slimmer form and closing this one. The registration fields that answer "which history rows does this agent's chat own" and "can this agent's CLI transcripts be adopted" now live there. The two capability flags this PR sent from host to client, and the client code that read them, are dropped: each flag's only reader could already answer from what it had, and a new field would need reconciling between old and new clients and hosts. |
ELI5
Orca's native chat runs several agents: Claude, Codex, OpenCode, Grok, OMP and Pi. A few features ask "can this agent do X?":
Today the answer is a hard-coded "only if it's Claude or Codex", repeated in about ten places. Every time a newer agent was added, one of those places was missed. This PR makes each agent's own registration answer those questions, in one place. Nothing changes for users yet.
What Changed
User-facing: nothing. Only Claude and Codex answer "yes", exactly as before. This is a refactor so that a follow-up can turn these features on for OpenCode, Grok, OMP and Pi by filling in their registrations, without touching shared code.
Mechanism:
modelCatalog, every agent has to state an answer, so a new agent can't silently be left out:transcriptImport: how to bring an outside CLI conversation into a chat. Null when the agent can't.sessionHistory: which Session History row types the agent's chats own, how a stored conversation maps to a row id, and how to read that agent's terminal resume command. Null when the agent's chats don't own rows.claude-cli-conversations.tsandcodex-cli-conversations.ts. OpenCode, Grok, OMP and Pi writenull.codex|claudepattern.transcriptAdoptionandsessionHistory, in its existing agent list. They are computed from the registration fields, not stored a second time. The screen code reads them through the same helper image support already uses.getAgentForkArgv). Today that is Claude and Codex.Hard-coded Claude/Codex checks that remain, and why:
Why
Three bugs of the same kind came from these scattered checks:
Moving each answer onto the agent's registration removes that class of bug: shared code no longer branches on agent names, and a new agent must state each answer.
Alternatives considered:
Mixed versions:
Linked Issue
N/A (maintainer refactor; follow-up to the floating-workspace links fix, #26981, and the workers fix, #26776).
Visual Proof
N/A: no user-visible change; this is a strict-parity refactor.
Testing
.exe, capitals, quoting,--resume=,-c, fork flags,--, several binaries in one command): 0 differences.pnpm tc:node,pnpm tc:web, the code-quality gate, oxlint, and an import-cycle check with no depth limit on all touched files.Review
Agent skill upstream boundary
Notes
.exe.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)