feat(desktop): node-advertised harness picker, capability-filtered Run-on, Nodes settings - #8
Merged
Merged
Conversation
…n-on, Nodes settings
Eliminate three execution-node UX band-aids that forced local adapter
installs and CLI-only node approval:
(a) The node-target harness picker offers the runtimes the selected node
advertises (labelled "(on node)") even when the adapter is not
installed on this Mac — the node runs the adapter, not the desktop.
New pure helper runtimeAdapterCommand.ts maps a runtime id to its
adapter command (mirrors the Rust KNOWN_ACP_RUNTIMES table) and
synthesizes the AcpRuntime for a node target from the local catalog
entry (which lists every known runtime regardless of local
availability). Both create-gates (submitCreate, handleSubmit) resolve
it instead of erroring; instanceInputForDefinition falls back to the
adapter command when the local command is null. No more installing
codex-acp / claude-agent-acp on the Mac just to create a node agent.
(b) Re-add the "Nodes" entry to Settings (lost after an upstream merge)
so approving an execution node is a click, not a CLI dance.
(c) Capability-filter the "Run on" picker to nodes that can host the
picked harness (legacy "acp" advertisement = wildcard), with a
mismatch warning when a prior node selection stops matching.
selectedRuntimeIsAvailable is now node-aware: on a node target only
the node's advertised runtimes count (local adapter availability is
irrelevant), so a harness the node can't run is blocked at submit,
not merely warned — closing the crash-loop path where a locally
installed adapter let an incompatible node create through.
AgentDefinitionDialog's provider/model dropdown builders are extracted to
agentDialogDropdownOptions.ts (behavior-preserving) to stay under the
file-size ratchet.
Gates: biome, tsc, check:px-text, and the file-size ratchet all clean;
agents unit suite 1541 pass (6 new for the helper).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: shiv <shivchander.s30@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Eliminates three execution-node UX band-aids that made creating a node-hosted
agent painful (local adapter installs, CLI-only node approval) and could
crash-loop a node.
(a) Node-target harness picker uses the node's advertised runtimes
Previously the harness picker probed this Mac for adapters even when the
agent was going to run on a remote node, so you had to
npm install -gcodex-acp/claude-agent-acplocally just to create a node agent.Now, when the "Run on" target is a node, the picker offers the runtimes that
node advertises (labelled
(on node)) — even if the adapter is missinglocally. The node runs the adapter, not the desktop.
runtimeAdapterCommand.ts:adapterCommandForRuntimeId— runtime id → adapter command, mirroring theRust
KNOWN_ACP_RUNTIMEStable (discovery.rs).nodeAdvertisesRuntime— id match, treating the legacy"acp"id as awildcard.
nodeRuntimeForCreate— synthesizes theAcpRuntimefor a node target fromthe local catalog entry (discovery lists every known runtime regardless
of local availability, so the entry exists even when the adapter isn't
installed).
useAgentManagement.submitCreate,usePersonaActions.handleSubmit) resolve a node runtime instead of erroring.instanceInputForDefinitionfalls back to the adapter command when the localcommand is
null.(b) Re-add the "Nodes" entry to Settings
The execution-node approval panel lost its Settings nav entry after an upstream
merge (Settings → Compute is the unrelated mesh-LLM feature). Approving a
node was a CLI dance. Settings → Nodes is back (pubkey → Approve).
(c) Capability-filter the "Run on" picker
The picker now only offers nodes that can host the picked harness (legacy
"acp"advertisement = wildcard), with a warning when a prior node selectionstops matching after a harness change.
selectedRuntimeIsAvailableis now node-aware: on a node target only thenode's advertised runtimes count — local adapter availability is irrelevant.
This blocks a harness the node can't run at submit, not merely with a
warning, closing the path where a locally-installed adapter let an incompatible
node create through and crash-loop the node.
Notes
AgentDefinitionDialog's provider/model dropdown builders were extracted toagentDialogDropdownOptions.ts(behavior-preserving) to stay under thefile-size ratchet.
Testing
biome,tsc --noEmit,check:px-text, and the differential file-sizeratchet — all clean.
Follow-ups (not in this PR)
reboot-durability (autostart).
🤖 Generated with Claude Code