Skip to content

feat(agents): add Muse Spark CLI agent support - #18791

Closed
jeffhuen wants to merge 6 commits into
stablyai:mainfrom
jeffhuen:feat/muse-spark-agent-support
Closed

jeffhuen wants to merge 6 commits into
stablyai:mainfrom
jeffhuen:feat/muse-spark-agent-support

Conversation

@jeffhuen

@jeffhuen jeffhuen commented Sep 5, 2026

Copy link
Copy Markdown

Closes #14901.

Registers muse (Muse Spark / Muse Code CLI) across the agent surface so worker-start, dispatch --inject process detection (derived from expectedProcess), and the agent picker recognize it:

  • TuiAgent union + TUI_AGENT_CONFIG (detectCmd: muse, launchCmd: muse --yolo, stdin-after-start)
  • display names, telemetry kind, auto-pick order, type labels, skills-CLI key (null — no verified community key, per that file's rule), iconable set
  • renderer agent catalog entry + locale keys (all six locales, English brand fallback)
  • registry/startup tests covering the muse wiring

Verification notes (Muse Code 1.0.3, macOS):

  • Bare muse blocks on a first-launch workspace-trust menu that swallows drafted preambles — --yolo covers trust plus approvals (neither answerable by a supervised worker), matching agy --dangerously-skip-permissions.
  • stdin-after-start over argv: positional-prompt auto-submit is undocumented; paste-after-start verified end-to-end via orca terminal send (prompt delivered, worker replied).
  • tsc --noEmit passes on node/cli/web projects; targeted vitest files pass (tui-agent-config, tui-agent-startup incl. new muse cases, skills-cli-agent-keys, agent-kind, inject-rejection-message, paste-draft, followup-delivery, keybindings, skills discovery); oxlint clean; localization extraction + catalog verifiers pass.

Out of scope / follow-ups:

  • Muse hook-listener provider (transcript parsing for worker-read) — Muse documents hooks + session JSONL; left for a follow-up once maintainers confirm the preferred provider shape.
  • --model/--effort launch preferences currently apply to Claude/Codex/Cursor only.

Registers muse (Muse Spark / Muse Code CLI) across the agent
surface so worker-start, dispatch --inject detection, and the
agent picker recognize it:

- TuiAgent union, TUI_AGENT_CONFIG (detectCmd muse,
  launchCmd 'muse --yolo', stdin-after-start injection)
- display names, telemetry kind, auto-pick order, type labels,
  skills-CLI key (null: no verified community key), iconable set
- renderer agent catalog entry + locale keys (all six locales)
- registry/startup tests covering the muse wiring

--yolo covers first-launch workspace trust plus approvals (both
swallow drafted preambles), matching agy
--dangerously-skip-permissions. stdin-after-start chosen over
argv: positional-prompt auto-submit is undocumented; verified
end-to-end via terminal send against Muse Code 1.0.3.

Closes stablyai#14901

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ One minor cosmetic omission worth addressing before merge — muse ships with no bundled or mobile icon asset. Nothing blocking.

Reviewed changes

  • Agent registry wiring — registers muse across the full TuiAgent surface: the union, TUI_AGENT_CONFIG (detectCmd: muse, launchCmd: muse --yolo, stdin-after-start), display name, telemetry kind, auto-pick order, type label, iconable set, and a null skills-CLI key with a justifying comment.
  • Renderer catalog + i18n — adds a desktop catalog entry (cmd: muse, faviconDomain: dev.meta.ai, homepage) and the 0fda695f70 label key to all six locales with the English brand fallback.
  • Tests — extends tui-agent-config and tui-agent-startup with muse cases covering the launch command, expected process, and followup-prompt delivery.

ℹ️ Muse ships without a bundled or mobile icon asset

Every other favicon-path agent bundles a PNG so its icon renders without a live network request (#8451), but muse adds no src/shared/agent-icons/muse.png and no AGENT_FAVICON_ASSETS entry, so desktop falls back to Google's favicon service — the exact path that is unreachable offline and in some regions. Mobile is worse: muse is appended to TUI_AGENT_AUTO_PICK_ORDER, which drives MOBILE_AGENT_CATALOG, so it appears in the mobile picker, yet MOBILE_TUI_AGENT_FAVICON_DOMAINS has no muse entry and MOBILE_AGENT_ICON_ASSETS has no bundled icon, so mobile renders a bare letter "M".

Technical details
# Muse icon asset omission

## Affected sites
- `src/renderer/src/lib/agent-catalog.tsx:314` — `faviconDomain: 'dev.meta.ai'` is the only icon source; no bundled PNG, so desktop uses the live favicon service.
- `mobile/src/tasks/mobile-tui-agents.ts:16` — `MOBILE_TUI_AGENT_FAVICON_DOMAINS` has no `muse` entry (not in the diff).
- `mobile/src/components/mobile-agent-icon-assets.ts:12` — `MOBILE_AGENT_ICON_ASSETS` has no `muse` entry (not in the diff).

## Required outcome
- Add `src/shared/agent-icons/muse.png`, wire it into `AGENT_FAVICON_ASSETS` (desktop) and `MOBILE_AGENT_ICON_ASSETS` (mobile), and add `muse: 'dev.meta.ai'` to `MOBILE_TUI_AGENT_FAVICON_DOMAINS`.

## Open questions for the human
- Is `dev.meta.ai` the correct favicon domain for Muse Code? The homepage URL points at `dev.meta.ai/docs/muse-code`.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@coderabbitai

coderabbitai Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 0c0f3d29-02c5-4395-be0d-963a48a68f0d

📥 Commits

Reviewing files that changed from the base of the PR and between b4b25f1 and 174f53d.

📒 Files selected for processing (14)
  • README.md
  • docs/readme/README.es.md
  • docs/readme/README.fr.md
  • docs/readme/README.ja.md
  • docs/readme/README.ko.md
  • docs/readme/README.pt.md
  • docs/readme/README.zh-CN.md
  • docs/site/content/docs/agents/supported.mdx
  • src/shared/constants.test.ts
  • src/shared/tui-agent-config.test.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-permissions.test.ts
  • src/shared/tui-agent-permissions.ts
  • src/shared/tui-agent-startup.test.ts

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


📝 Walkthrough

Walkthrough

The change adds Muse as a supported TUI agent. It defines muse --trust-workspace startup behavior and separate permission-mode arguments. It updates agent selection, display, catalog, icon, telemetry, label, and skills mappings. It adds Muse to the agent-kind schema and union type. It adds Muse labels to six locale files and documents Muse in supported-agent lists.

Priority: ➖ Normal

Merge Risk: ⚪ Minimal · up to 174f5

Muse support adds selectable CLI integration, workspace trust launch behavior, configurable Yolo mode, and related presentation and documentation updates. Current coverage indicates the supported launch paths are ready to merge.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 18 files. (8 skipped: 8… Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning The description explains the implementation, rationale, linked issue, testing, and out-of-scope work. However, it omits the required template sections and checklist items, including Visual Proof or an… Format the description using the repository template. Add the missing sections, provide visual proof or write N/A with a reason, complete the Agent skill upstream boundary declaration, address the Notes items, and complete the Testing and C…
✅ Passed checks (3 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #14901 by adding Muse as a supported agent with process detection, launch configuration, agent selection, metadata, icons, localization, documentation, and tests.
Out of Scope Changes check ✅ Passed The changes remain aligned with issue #14901. Documentation, localization, icons, mobile mappings, telemetry, and tests support first-class Muse agent integration. The stated hook-listener and model/e…
Title check ✅ Passed The title clearly identifies the main change: adding Muse Spark CLI agent support.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 18 files. (8 skipped: 8 unsupported.)

Full details: Description check

Explanation

The description explains the implementation, rationale, linked issue, testing, and out-of-scope work. However, it omits the required template sections and checklist items, including Visual Proof or an explicit N/A explanation, Agent skill upstream boundary, Notes, and the required checklist confirmations.

Resolution

Format the description using the repository template. Add the missing sections, provide visual proof or write N/A with a reason, complete the Agent skill upstream boundary declaration, address the Notes items, and complete the Testing and Checklist confirmations.

  • Fix all pre-merge checks with AI

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

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Team

Run ID: d185e73b-cded-49b6-b8a1-08af42c696bc

📥 Commits

Reviewing files that changed from the base of the PR and between 436ef82 and 451f737.

📒 Files selected for processing (18)
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/lib/agent-catalog.tsx
  • src/renderer/src/lib/agent-status.ts
  • src/shared/agent-kind.ts
  • src/shared/agent-type-label.ts
  • src/shared/skills-cli-agent-keys.ts
  • src/shared/telemetry-property-schemas.ts
  • src/shared/tui-agent-config.test.ts
  • src/shared/tui-agent-config.ts
  • src/shared/tui-agent-display-names.ts
  • src/shared/tui-agent-selection.ts
  • src/shared/tui-agent-startup.test.ts
  • src/shared/tui-agent.ts

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

Comment thread src/renderer/src/lib/agent-catalog.tsx Resolved
Renames auto.lib.agent.catalog.0fda695f70 to muse_label per
config/i18n-translation-source.md (new keys must be intent-named;
hash IDs are grandfathered only).
@jeffhuen

jeffhuen commented Sep 5, 2026

Copy link
Copy Markdown
Author

Follow-up pushed (2a4c44a):

  • coderabbit: locale key renamed to intent-named auto.lib.agent.catalog.muse_label across the catalog entry and all six locales, per config/i18n-translation-source.md. Extraction + catalog verifiers pass.
  • pullfrog (icon assets): investigated, not yet fixed — there is no first-party Muse product icon to bundle. dev.meta.ai serves the generic Meta/Facebook favicon, and Google's favicon service returns a generic globe glyph for the domain (verified visually), which would be wrong to ship as the brand. Desktop falls back to the live favicon service and mobile to the letter glyph until a real asset is available. Happy to wire muse.png + AGENT_FAVICON_ASSETS / mobile entries the moment maintainers point at an official source.

Adds src/shared/agent-icons/muse.png (32x32 Meta mark; 32px
matches existing amp/autohand/copilot precedents, no minimum
size is enforced) and wires it into AGENT_FAVICON_ASSETS,
MOBILE_AGENT_ICON_ASSETS, and MOBILE_TUI_AGENT_FAVICON_DOMAINS
so neither surface falls back to the live favicon service or a
bare letter glyph (stablyai#8451).
@jeffhuen

jeffhuen commented Sep 5, 2026

Copy link
Copy Markdown
Author

Icon follow-up pushed (b4b25f1): bundled src/shared/agent-icons/muse.png (32x32 Meta mark from Meta's own favicon — no minimum size is enforced; 32px matches existing amp/autohand/copilot assets) and wired it into AGENT_FAVICON_ASSETS, MOBILE_AGENT_ICON_ASSETS, and MOBILE_TUI_AGENT_FAVICON_DOMAINS. Web typecheck, lint, and the combobox tests pass.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Intent-named locale ID — renames the Muse catalog label key from the hash-based 0fda695f70 to muse_label across all six locale files and the renderer agent-catalog.tsx reference, satisfying the renderer intent-named-ID rule.

The rename is applied consistently with no stray 0fda695f70 references remaining in the repo, and the translate(…, 'Muse') fallback keeps the rendered label unchanged, so there is no behavioral surface.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Bundled Muse icon assets — adds src/shared/agent-icons/muse.png (valid 32×32 PNG) and wires it into the desktop AGENT_FAVICON_ASSETS and the mobile MOBILE_AGENT_ICON_ASSETS + MOBILE_TUI_AGENT_FAVICON_DOMAINS maps, resolving the prior offline/region icon concern.

Both desktop and mobile now render the Muse icon from a bundled asset with no live favicon-service request, and the mobile ratchet test now covers muse since it keys off MOBILE_TUI_AGENT_FAVICON_DOMAINS.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@John-Cusack John-Cusack left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking on current main: Muse hardcodes --yolo in TUI_AGENT_CONFIG.launchCmd. Orca now manages permission bypasses through YOLO_TUI_AGENT_ARGS, allowing Settings → Agents → Agent Permissions to switch between Yolo and Manual. Because the bypass is embedded in the base launch command, Manual mode cannot remove it and every Muse session disables approval and sandboxing and trusts the workspace. muse --help from Muse Code 1.0.3 confirms those --yolo semantics.

Please leave the Muse launch command bare (muse / omit launchCmd), add muse: "--yolo" to YOLO_TUI_AGENT_ARGS, and add coverage showing Yolo launches with the flag while Manual launches without it.

For context, I rebased this patch locally onto current main; typecheck, changed-file quality checks, and 208 focused tests passed, and a real Muse 1.0.3 echo-provider smoke test launched successfully. The current tests do not exercise Muse through Manual permission mode.

@John-Cusack

Copy link
Copy Markdown
Contributor

I prepared a focused follow-up branch from this PR exact head to address the permission finding and complete the public docs:

  • e9f52c80e8 — keep --trust-workspace in the base Muse command so the startup menu cannot consume the drafted task, move --yolo into YOLO_TUI_AGENT_ARGS, and cover Yolo/Manual launch construction across Linux, macOS, PowerShell, and cmd.
  • c7bb442d87 — list Muse in the README and supported-agent docs, including the macOS/Linux platform note and launch trust boundary.

Branch: https://github.com/John-Cusack/orca/tree/John-Cusack/muse-pr-readiness-fixes

Validation:

  • pnpm lint, pnpm tc, changed-code quality, and pnpm build: pass
  • Muse-focused matrix: 246 tests pass
  • Isolated docs tests/typecheck/production build: pass
  • Muse Code 1.0.3 Linux smoke: both Yolo and Manual launches reach the TUI; Manual uses --trust-workspace with approval/sandbox still enabled and accepts the drafted prompt
  • Official launcher platform dispatch supports macOS and Linux; native Windows is not supplied. Orca command construction is covered for Windows shells, and WSL uses the Linux execution path.

The full unsharded root test run completed with 72,443 passing tests and 29 failures outside these changed files, including missing local xvfb-run and host-installed real CLI state; authoritative sharded CI is still needed.

These two commits appear ready to cherry-pick into this PR for CI and maintainer review. I have not opened a competing upstream PR.

@jeffhuen

jeffhuen commented Sep 8, 2026

Copy link
Copy Markdown
Author

Done. I cherry-picked both commits onto this branch: a41184c (permission fix) and b57d42a (docs). I also added the Muse badge to the six READMEs in docs/readme/ (174f53d), with image paths fixed for that folder.

Checks on my side pass: typecheck, lint, 159 focused tests, docs tests. I confirmed against muse 1.0.3 that --trust-workspace keeps approvals on.

CI runs show action_required, so a maintainer must approve the run before it starts.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • Muse permission mode respected — moved --yolo out of TUI_AGENT_CONFIG.launchCmd and into YOLO_TUI_AGENT_ARGS, with the base command now muse --trust-workspace. Settings → Agents → Agent Permissions now switches Muse between Yolo (muse --trust-workspace --yolo) and Manual (muse --trust-workspace), directly resolving the prior blocker.
  • Startup + permission coverage — replaced the single assertion with an it.each table spanning yolo/manual across linux/darwin/win32 (posix/powershell/cmd), and added an applyAgentPermissionMode test asserting Manual strips the --yolo flag.
  • Docs — added Muse to the supported-agents table (macOS/Linux; trusts the workspace at launch) and its badge to README.md plus the six localized READMEs.

I verified --trust-workspace is a real Muse Code flag that skips the first-launch trust menu without disabling approval/sandbox, so the trust/permission split is correct. The only note — in yolo mode --trust-workspace is redundant alongside --yolo — is harmless.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@jeffhuen

jeffhuen commented Sep 8, 2026

Copy link
Copy Markdown
Author

brennanb2025 — ready for review. Two asks: approve the four pending workflow runs, then review when you can.

@arseniizakharov

Copy link
Copy Markdown

@brennanb2025 No rush, but quite a useful change to review

@facmartoni

Copy link
Copy Markdown

What @arseniizakharov?? Of course it's a useful change, this is the only reason why I'm thinking about switching to Orca 😂

@facmartoni

Copy link
Copy Markdown

Please @brennanb2025 come here! This is the real deal

@facundopadilla

Copy link
Copy Markdown

GO GO GO GO MUSE ON ORCA

@facundopadilla

Copy link
Copy Markdown
image

@contrera-lean

Copy link
Copy Markdown

We need Muse on ORCA!

@palinejs

Copy link
Copy Markdown

LGTM

@nwparker

Copy link
Copy Markdown
Contributor

Thank you for this! First-class Muse Code support has now landed in #22216, which builds on its baseline agent registration, permissions, mobile, icon and docs from this PR (credited in the PR description). Closing as superseded.

@nwparker nwparker closed this Sep 23, 2026
@FrancoDuran23

Copy link
Copy Markdown

Up

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.

[Feature]: Add support for Muse Spark CLI

9 participants