Skip to content

About

Muse Code plugin for Agentic Control Plane: checks every tool call before it runs. Install needs MUSE_EXPERIMENTAL_PLUGINS=1 (beta).

Topics

Resources

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Agentic Control Plane for Meta Muse Code

Policy-check every tool call Muse Code makes, before it runs, against your Agentic Control Plane workspace: allow / ask / deny per call, output scanning after the call, one receipt line per session, every decision in your activity log with the reason attached.

Install

This package is a Muse native plugin bundle (.muse-plugin/plugin.json at the package root):

npm install -g @agenticcontrolplane/muse-code
MUSE_EXPERIMENTAL_PLUGINS=1 muse plugins install "$(npm root -g)/@agenticcontrolplane/muse-code" --scope user
MUSE_EXPERIMENTAL_PLUGINS=1 muse plugins approve acp

Sign in once to get a credential:

  • a key in ~/.acp/credentials (written by the installer, one command, free up to 5 agents).

Muse Code runs hooks with a cleared environment, so ACP_BEARER_TOKEN does not reach them in live sessions. The file is the real path. Optional operational overrides live in ~/.acp/config.json: govern_base, console_base, agent_tier, check_timeout_ms, shadow.

Status: beta

Muse Code is in beta, and in the 0.2.1 binary hooks ship as plugin capabilities behind the MUSE_EXPERIMENTAL_PLUGINS flag (the flag gates only the management CLI; installed hooks fire in normal runs). The wire contract is Claude Code's hook schema, verified end-to-end against Muse's own muse plugins hook test runner: snake_case payloads in (hook_event_name, tool_name, tool_input, session_id, permission_mode), camelCase hookSpecificOutput decisions back, exit 2 + stderr as the fallback block channel, systemMessage for advisory lines.

Not yet verified against a live model run: the ask-prompt round trip in an interactive session, and the live PreToolUse payload. The offline echo provider makes no tool calls, so those two wait on a real session.

What it does

Event Gateway call Effect
PreToolUse POST /govern/tool-use allow / ask / deny before the tool runs
PermissionRequest POST /govern/tool-use a policy deny settles Muse's own approval; anything else lets the native prompt proceed
PostToolUse POST /govern/tool-output output scanning; a server block becomes a deny the model sees
Stop none one session receipt line with a deep link to the session timeline

If the gateway is unreachable

  • Interactive sessions fail open, loudly. The call proceeds, you get an [ACP] ⚠ UNGOVERNED warning, and a lapse line lands in ~/.acp/lapse.log.
  • Unattended tiers fail closed. CI/MUSE_HEADLESS/ACP_AGENT_TIER mark a run as unattended, and a run nobody is watching stays blocked when policy can't be consulted.
  • Policy denies are unaffected either way. The posture only covers the case where the policy can't be asked.

Security notes

  • Muse Code executes hooks outside its own sandbox, with a cleared environment. That is why this hook has zero dependencies and no build step: every transitive dependency on a control-plane hook is a credential-adjacent supply-chain target. It is one file of plain ESM you can read in two minutes.
  • managed_hooks_path hooks run with no trust step. If you deploy this hook through that channel, the managed file's write access is your control boundary. Treat it like sudoers.

Test

npm test

Offline suite against a mock gateway: decision mapping, both fail postures, retry-once transport behavior, payload shape, receipt.

About

Muse Code plugin for Agentic Control Plane: checks every tool call before it runs. Install needs MUSE_EXPERIMENTAL_PLUGINS=1 (beta).

Topics

Resources

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages