← Catalog

pi-muse-msp

Muse MSP provider extension for Pi

Package

Install

Install with PiG

pig install npm:pi-muse-msp

Install with Pi

pi install npm:pi-muse-msp
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions"
  ]
}

README

Written by the package's publisher, shown as published in version 0.2.7 (README.md). PiG does not review it.

pi-muse-msp

Muse via muse serve MSP (stdio JSON-RPC) as a Pi coding agent provider (muse-msp).

Long-lived host, true streaming, live token usage, image input. One MSP session per Pi chat and process. Approvals are automatic by default with Pi UI as fallback.

Install

pi install npm:pi-muse-msp

Then /reload or restart Pi. You can also install the pinned GitHub release:

pi install git:github.com/jwise7/pi-muse-msp@v0.2.1

Or copy extensions/muse-msp.ts into your Pi extensions directory (~/.pi/agent/extensions/) manually.

Requires the muse CLI on PATH (override with PI_MUSE_BINARY).

Platform: macOS/Linux. Durable-log recovery reads Muse sessions under ~/.local/share/muse/sessions, which does not exist on other platforms.

Configure

EnvDefaultMeaning
PI_MUSE_BINARYmuseMuse CLI binary
PI_MUSE_MSP_SANDBOXEDunset (unsandboxed)1 to serve with workspace trust instead of --disable-sandbox
PI_MUSE_MSP_DEBUGunset1 for MSP wire debug on stderr
PI_MUSE_MSP_FINGERPRINTunset (no check)Expected muse serve schema fingerprint; when set, a mismatch warns in diagnostics
PI_MUSE_MSP_BACKGROUNDunset (enabled)0 disables idle background-completion delivery to the thread
PI_MUSE_MSP_BACKGROUND_MS15000Idle poll interval (ms, min 250) for background-completion delivery

Model list is live from model/list with a static fallback; live rows carry their real context/output limits, cost, and thinking tiers into Pi's model definitions. On macOS/Linux, chat models from Muse's local catalog (~/.local/share/muse/model-catalog/, or $XDG_DATA_HOME/muse/model-catalog) union behind the live rows, so tier-gated ids the server omits still reach the picker; image-generation and non-chat catalog rows are skipped. Spark sessions start with providerId: "meta" so retained tool-read images keep working.

To pin the fingerprint, copy the live value from /muse-msp-doctor into PI_MUSE_MSP_FINGERPRINT; future turns then warn if the host schema drifts.

Security

Defaults favor a trusted local machine: the host runs unsandboxed (muse serve --disable-sandbox) and tool approvals auto-approve (allowAll), with an auto-approved: <tool> activity row as the audit trail. A prompt-injected or malicious model output could therefore run arbitrary tools without asking.

If you run untrusted tasks, enable the sandbox (PI_MUSE_MSP_SANDBOXED=1 or --muse-msp-sandboxed), which serves with workspace trust and per-request approvals (still auto-decided first, Pi UI as fallback). Headless runs (pi -p) have no UI fallback: un-answerable approvals and clarifying questions fail the turn instead of asking.

Commands

CommandMeaning
/muse-msp-doctorCheck the host: binary, handshake, schema fingerprint, live/persisted session counts, loaded skills
/muse-msp-sessionsList Muse sessions kept for Pi chats (* = live) joined with the server inventory; pass prune to drop expired or dead entries
/muse-msp-forkFork this chat's live Muse session (whole history) and continue on the fork
/muse-msp-subagentShow a finished subagent's result (pass an item id prefix from its activity row)
/muse-msp-outputShow a tool's stored output (pass an item id prefix from its activity row)
/muse-msp-recover-completedRecover the newest completed plaintext answer from a Muse durable session log (defaults to the origin session)

Test

Requires the pi CLI on PATH.

python3 tests/muse-msp/regressions.py

Isolated fake-host checks: version sync, event recovery, bounded retry, duplicate/resolved approvals, JSONL tool-image recovery, vision retry, salvage-fresh, mid-turn steer, headless clarification cancel, hung-RPC timeouts, persisted cross-process resume, compaction context, host generation isolation, pre-ack durable recovery, terminal/usage/retry lifecycle, live model switch, todo/context/health subscribers, subagent drill-down, session fork. No live Muse sessions touched. Four machine-local suites (proposals inbox, session context, memory propose, ask/approve doc conformance) run when their non-repo dependencies are installed and otherwise print SKIP. See docs/STEERING.md for the live steering model.

Pinning

Built against the pi-ai / pi-ai/compat provider API. If muse serve or Pi changes the schema and PI_MUSE_MSP_FINGERPRINT is set, the status line reports a fingerprint mismatch — update the extension. The tested Pi revision is noted in CHANGELOG.md.