Skip to content

feat(bots): run bots and chats on Muse over ACP - #46422

Open
com-junkawasaki wants to merge 1 commit into
stablyai:mainfrom
mithril-lang:feat/muse-acp-chat-and-bots
Open

com-junkawasaki wants to merge 1 commit into
stablyai:mainfrom
mithril-lang:feat/muse-acp-chat-and-bots

Conversation

@com-junkawasaki

Copy link
Copy Markdown

ELI5

Orca already knows Muse (Meta's Muse Code CLI) as a terminal agent, but you could not pick it for a bot or open it as a chat. This lets a bot or a chat run on Muse, the same way they run on Copilot, Cursor or Qwen.

What Changed

Before: New bot → Agent did not offer Muse, and a Muse chat could not start, because Muse had no chat backend.

After: Muse is offered for bots and chats on a host where muse is installed. A new bot on Muse sends its first message and answers.

Mechanism: Muse serves the Agent Client Protocol with muse acp, so this adds one ACP launch spec and lists Muse where the other ACP agents are listed.

  • src/main/muse/muse-acp-launch-spec.ts (new): launches muse acp --trust-workspace (trust matches the terminal launch command). Standing instructions go in as the host setting run.system_prompt_append (-c, a JSON string). Permission modes are Muse's own: Ask → promptUnmatched, Full access → allowAll. The launcher's update, login and install steps are switched off (MUSE_NO_AUTO_UPDATE, MUSE_LOGIN, MUSE_LAUNCHER_INSTALL) because they would write to the stdout ACP owns; these are the same variables the usage reader already sets.
  • ACP_LAUNCH_SPECS, NATIVE_CHAT_AGENTS and its permission-mode table, BOT_AGENTS, the sign-in command (muse login), and the chat agent profile (null: Muse reports its skills among its commands at rest).

Why

Muse users can only use it in a terminal today. ACP is the path Orca already has for most chat agents, so this is 73 added lines and no new protocol code. The alternative in #31997 is an adapter for Muse's own MSP (muse serve); that would expose more (fork, steer, media upload) but is a much larger change, and nothing here blocks it later.

Linked Issue

Fixes #31997

That issue reports that a Muse chat is unavailable on every host and proposes an MSP adapter. This PR makes the chat available through ACP instead; if maintainers prefer to keep the issue open for the MSP adapter, please treat this as addressing only the "no chat" symptom.

Visual Proof

Before: the Agent picker in New bot had no Muse entry (no screenshot; the entry is simply absent).

After, New bot with Muse selected:

New bot with Muse selected

After, a new bot on Muse answering:

A Muse bot answering

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below
  • Every added test fails without this change and avoids the test anti-patterns

Tested on macOS (arm64) only, with Muse Code 1.4.24, on this branch over main at c9c4247, in a dev build with a worktree profile (ORCA_BACKGROUND_LAUNCH=1 pnpm dev --worktree-profile, driven over CDP):

  1. New bot → Agent lists Muse; selecting it shows Muse's models and efforts.
  2. Create a bot on Muse: its first message arrives ("Hi! What should I start on?").
  3. Send one message: the bot answers in 11 s with its own bot name, so the standing instructions reached Muse's system prompt.
  4. A bot created on the previous build reopened with its chat history shown.

Also checked directly against muse acp with a minimal ACP client: initialize, session/new, session/prompt, and that -c run.system_prompt_append=... reaches the model.

pnpm check:changed --base=HEAD: 29 checks passed.

No tests added: the change is a launch spec and list entries (constants), which the repo rules say not to test.

Not tested: Ask mode approval prompts, /compact, continuing a reopened chat, model switching from the chat, remote/SSH hosts, Linux, Windows, mobile.

Risk

Level: Low

Muse appears as a new choice only where muse is installed; existing agents and saved bots are untouched. The riskiest parts:

  • The account binding uses XDG_CONFIG_HOME (Muse keeps its sign-in under $XDG_CONFIG_HOME/muse), so a Muse chat's child processes see XDG_CONFIG_HOME set to the default ~/.config when it was unset. If Orca has a better way to bind an agent that has no home variable of its own, I am happy to change it.
  • Standing instructions travel on the command line, so very long instructions could hit the OS argument limit. Muse refuses a setting value it reads as a secret reference (a whole-value ${VAR}), which instructions text is not.
  • minimumVersions is 1.4.24, the only version tested.
  • Windows: the launcher env and muse acp were not exercised there.

Back out with a plain revert. A bot already created on Muse would then have no chat backend.

AI Disclosure

Written and tested with Claude Code (Claude Fable 5.2), directed and reviewed by me.

Review

  • Cross-platform: no platform-specific code added; only macOS was run.
  • SSH/remote: uses the shared ACP launch path; not run on a remote host.
  • Agent and integration compatibility: additive; one more ACP spec and list entries. Session History adoption for Muse rows is not wired (transcriptImport: null).
  • Performance: none; no hot path touched.
  • UI quality: no new UI; Muse reuses the existing agent row and icon.
  • Security: Full access maps to Muse's allowAll; Ask maps to promptUnmatched. --trust-workspace loads the folder's skills and rules, as the terminal launch already does.

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out

🤖 Generated with Claude Code

Add a Muse ACP launch spec (muse acp) and list Muse among the native-chat
and bot agents. Standing instructions travel as run.system_prompt_append;
approval modes are Muse's own (promptUnmatched / allowAll).

Checked on macOS with Muse Code 1.4.24 in an isolated dev profile: New bot
offers Muse, and a new bot's first message and one exchange complete.

Refs JUN-1433

Co-Authored-By: Claude Fable 5.2 <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 21, 2026

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change adds Muse as an ACP launch target. It configures Muse launch behavior, session-history parsing, and instruction delivery. It also adds Muse to shared bot-agent, native chat permission, setup-command, and profile declarations.

Merge Risk: Minimal · up to 5ef59

This adds Muse as an agent for bots and chats over ACP. Registration and permission mapping look consistent, and Ask mode fails loudly instead of silently running with full access. The main remaining gap is untested Ask-mode approval prompts and some platforms, which is not a merge blocker.

Pre-merge checks: Passed 3 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Linked Issues check Inconclusive Linked issue #31997 reports that Muse structured chat shows 'No chat on this host'. Its stated root cause is a missing Muse entry in the host structured-agent catalog (`STRUCTURED_AGENT_RUNTIME_CATALO… Maintainers must decide whether #31997 requires the MSP adapter or accepts the ACP path for the 'no chat' symptom. If the ACP path is accepted, the PR should not close #31997 in full. If the MSP adapter is required, the PR must add it. Also…
Passed Passed checks: 3 passed

Check name Status Explanation
Title check Passed The title "feat(bots): run bots and chats on Muse over ACP" matches the changeset. The diff adds a Muse ACP launch spec and lists Muse in the ACP launch registry, native chat agents, bot agents, sign-…
Description check Passed The description follows the repository template and covers each required section. It gives a plain-language summary (ELI5), a before/after with the mechanism, and the reasons for choosing ACP over the…
Out of Scope Changes check Passed The changed files all concern Muse integration: the new MUSE_LAUNCH_SPEC, its registration in ACP_LAUNCH_SPECS, the muse entries in NATIVE_CHAT_AGENTS and its permission table, BOT_AGENTS, t…
Full details: Title check

Explanation

The title "feat(bots): run bots and chats on Muse over ACP" matches the changeset. The diff adds a Muse ACP launch spec and lists Muse in the ACP launch registry, native chat agents, bot agents, sign-in commands, and chat profiles. This lets bots and chats run on Muse through muse acp, so the title names the main change.

Full details: Description check

Explanation

The description follows the repository template and covers each required section. It gives a plain-language summary (ELI5), a before/after with the mechanism, and the reasons for choosing ACP over the MSP adapter. It links issue #31997 and includes visual proof. Testing lists the platform tested (macOS arm64 only) and the untested areas. It states a Low risk level with a back-out plan, a Performance line, and an AI disclosure. The author left the template's unchecked test-anti-pattern box unchecked and explained why no tests were added. The Linked Issue section says "Fixes #31997" but also says the issue's MSP adapter proposal is not addressed, which leaves the scope of the link unclear.

Full details: Out of Scope Changes check

Explanation

The changed files all concern Muse integration: the new MUSE_LAUNCH_SPEC, its registration in ACP_LAUNCH_SPECS, the muse entries in NATIVE_CHAT_AGENTS and its permission table, BOT_AGENTS, the setup and login command entry, and the native chat agent profile. The spec's env overrides (MUSE_NO_AUTO_UPDATE, MUSE_LOGIN, MUSE_LAUNCHER_INSTALL), the XDG_CONFIG_HOME account binding, the session history parser, and the instruction delivery all serve the Muse launch and chat path. No unrelated change was found in the reviewed summary. Supporting code and tests were not needed for this scope check.

Full details: Linked Issues check

Explanation

Linked issue #31997 reports that Muse structured chat shows 'No chat on this host'. Its stated root cause is a missing Muse entry in the host structured-agent catalog (STRUCTURED_AGENT_RUNTIME_CATALOG in src/main/runtime/structured-agent-runtime-metadata.ts). That file does not exist at the reviewed head (5ef59a8), so this root cause cannot be checked against the code. The PR does not add a Muse entry to any structured-agent catalog. It adds MUSE_LAUNCH_SPEC (src/main/muse/muse-acp-launch-spec.ts) to ACP_LAUNCH_SPECS, which gives Muse an ACP chat path. The issue proposes an MSP adapter (muse serve) with model catalog, session history, transcript import, and location support. The PR does not implement MSP. Its spec sets modelDiscovery to unavailable, transcriptImport to null, and reports no location support. The PR author asks that the issue stay open if the MSP adapter is still wanted. Whether the ACP path satisfies the issue's requirement is a scope decision that the issue text does not settle. The 'No chat' symptom appears addressed by the ACP registration, based on the author's manual test. Automated tests were not added. Those facts do not establish the full issue outcome.

Resolution

Maintainers must decide whether #31997 requires the MSP adapter or accepts the ACP path for the 'no chat' symptom. If the ACP path is accepted, the PR should not close #31997 in full. If the MSP adapter is required, the PR must add it. Also confirm that the new-tab menu reports Muse as available on a host where muse is installed. Name the current file that holds the host structured-agent roster, so the root cause can be checked.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1d75186d-eb07-4361-970a-56e5fe44e57b
Commits

Reviewing files that changed from the base of the PR and between f29e273 and 5ef59a8.

Files selected for processing: 6

  • src/main/acp/launch/acp-launch-registry.ts
  • src/main/muse/muse-acp-launch-spec.ts
  • src/shared/agent-launch/permissions/agent-chat-permission-support.ts
  • src/shared/agent-session/lifecycle/launch/agent-session-setup-commands.ts
  • src/shared/bot-types.ts
  • src/shared/native-chat/input/commands/native-chat-agent-profiles.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(structured-chat): Muse shows 'No chat on this host' everywhere, needs MSP host adapter

1 participant