Skip to content

feat: Muse Code as a first-class provider (#873) - #876

Merged
currentbits merged 15 commits into
mainfrom
coder/i-want-you-to-research-meta-muse-spark-a-afffce
Sep 3, 2026
Merged

currentbits merged 15 commits into
mainfrom
coder/i-want-you-to-research-meta-muse-spark-a-afffce

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #873.

Adds Muse Code (muse) as a Solenta agent harness, same shape as kimi/cursor: spawn muse exec --json, resume with --session-id, isolate MCP/hooks in a per-thread XDG overlay.

What landed

  • Provider id muse, display name Muse Code, default model muse-spark-1.3 (1M context).
  • Argv: exec --json --trust-workspace, prompt last. default maps to --approval-mode never; bypassPermissions to --disable-approval. Never --yolo or Muse --worktree.
  • Overlay under userDataPath/muse-homes/<threadId> with child XDG_CONFIG_HOME / XDG_DATA_HOME. Fail-closed. Auth, sessions, and skills are symlinked; settings.json is written with schema_version: 1 and Solenta MCP only.
  • PreToolUse hook via managed_hooks_path. Ask-tier is deny.
  • JSONL extractors from live --provider echo captures (stream.id is the session handle; assistant text is payload.text).
  • Ask, commit-message, workflow phase resume, ssh/WSL deploy with POSIX env and remote reclaim.

Spec: docs/superpowers/specs/2026-09-03-muse-code-provider-design.md
Plan: docs/superpowers/plans/2026-09-03-muse-code-provider.md

Tests

Focused suite: 165 pass (muse*, providers, permission-modes, ask, commitmsg, skills, remote-overlay-reclaim) plus typecheck. Overlay IPC/skills/sessions follow-up: 18 pass.

Known v1 gaps (do not invent)

  • Echo capture has no tool or thinking events (META_API_KEY was unset). Tool cards and thinking are no-ops until a Spark recapture.
  • PreToolUse deny under --disable-approval is unproven. Optional MUSE_LIVE canary later.
  • ssh Muse writes empty mcp_servers and has no per-phase overlayKey (kimi remote parity).
  • Windows: no official muse binary; the row stays available: false until PATH has it.

Review read order

  1. electron/providers.js (muse row / buildArgs)
  2. electron/muse.js + electron/muse-guardrail-hook.js
  3. electron/runner.js startMuseRun
  4. Tests under electron/test/muse*.js and workflow-muse-resume.test.js
  5. Fan-out (skills, install hint, ask, commitmsg, workflow, remote overlay)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-03T20:08:11.935902Z 9bc2851 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@currentbits
currentbits merged commit 676c8e0 into main Sep 3, 2026
3 of 6 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9bc2851ba4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread electron/ask.js
Comment on lines +340 to +342
"--trust-workspace",
"--approval-mode",
"never",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Disable Muse tools in read-only helper runs

When fm is unavailable, Ask mode runs this argv directly, and the identical Muse argv in electron/commitmsg.js runs against the thread worktree. --approval-mode never controls approval behavior; it does not make the agent tool-free. The captured CLI help explicitly provides --disable-write and --disable-shell for that purpose (electron/test/fixtures/muse/help.txt:162-183). If the model follows prompt-injected content or independently invokes a tool, a supposedly read-only question or commit-message request can execute shell commands or alter files, so both helper argv builders should disable those capabilities rather than relying on prompt text.

Useful? React with 👍 / 👎.

Comment thread electron/muse.js
Comment on lines +49 to +55
mcp_servers[name] = {
transport: "stdio",
command: entry.command || "",
args: Array.isArray(entry.args) ? entry.args : [],
enabled: true,
mode: "optional",
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve environment and cwd for stdio MCP servers

For any configured stdio MCP server that relies on environment variables or a working directory, this conversion silently drops both fields. kimiMcpServersForRun deliberately supplies env and optional cwd on each stdio entry (electron/memory-sup.js:657-665), but the generated Muse settings retain only command and args; common servers needing credentials or relative paths therefore fail to start or run with the wrong configuration under Muse.

Useful? React with 👍 / 👎.

Comment thread electron/muse.js
Comment on lines +58 to +60
mcp_servers[name] = {
transport: "streamable_http",
url: entry.url || "",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not relabel legacy SSE servers as Streamable HTTP

When an enabled MCP server has transport sse, kimiMcpServersForRun preserves that distinction as entry.type === "sse", but this catch-all branch rewrites it to streamable_http. Legacy HTTP+SSE and Streamable HTTP use different connection protocols, so an SSE-only endpoint advertised as supported in the import UI will fail when Muse connects. Preserve a Muse SSE transport if supported, or reject/omit SSE for Muse instead of silently changing its protocol.

Useful? React with 👍 / 👎.

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.

Research Meta Muse Spark / Muse Code and map Solenta integration

1 participant