The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
Document Muse Code support
Claude6f33624095d9
diff --git a/CLAUDE.md b/CLAUDE.mdindex d99cc8ce..e22b1c99 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -35,6 +35,7 @@ Supported runtime surfaces today:- Cline hook telemetry through a Beacon-managed local plugin (`~/.cline/plugins/beacon.ts`) covering prompts, task lifecycle, tool lifecycle, commands, file reads/edits with diffs, MCP activity, and task token usage. One plugin serves Cline's VS Code, JetBrains, and CLI hosts; Cline's own OTel export and hosted prompt storage are not used. Approval decisions are not exposed by Cline's hook payloads and are not synthesized.- Pi hook telemetry through a Beacon-managed local extension (`~/.pi/agent/extensions/beacon.ts`, or `.pi/extensions/beacon.ts` at project level) covering session lifecycle, prompts, tool lifecycle and results, commands including operator `!` commands, file reads/creates/edits with the unified patch, agent reasoning from assistant thinking parts, and token usage/cost. The extension subscribes to seven Pi event types and ignores the streaming and provider internals. Approval decisions are not exposed by Pi's extension API -- its `tool_call` handler can block, but that is an extension deciding rather than an operator being asked -- and are not synthesized, matching the Cline decision.- Oh My Pi (`omp`) hook telemetry through a Beacon-managed local extension (`~/.omp/agent/extensions/beacon.ts`, or `.omp/extensions/beacon.ts` at project level) covering session lifecycle, prompts, tool lifecycle and results, operator approval decisions, commands including operator `!` and `$` Python commands, file reads/creates/edits with the unified patch, MCP tool activity, agent reasoning, and token usage/cost. Oh My Pi is a fork of pi-mono and kept Pi's event payload shapes, so the two share one mapper (`cli/beacon-hooks/cmd/pi_family.go`) but never share identity: separate harness names, separate extension markers, separate install directories. Unlike Pi and Cline it does expose real operator approval decisions (`tool_approval_requested`/`tool_approval_resolved`), so those are recorded as `observed` approvals rather than withheld -- Beacon still never synthesizes one from a blocking `tool_call` handler. Those events carry no tool arguments, so the extension remembers each `tool_call`'s input by `toolCallId` and attaches it to the approval; without it the approval rules, which all match on `command.command` or `file.path`, could not read Oh My Pi approvals at all. The user-level install path honors `PI_CODING_AGENT_DIR` and `PI_CONFIG_DIR`; the project path is always `.omp/extensions`. `mcp_notification` is deliberately not subscribed to.+- Muse Code (Meta) hook telemetry through a Beacon-owned managed hooks file (`$XDG_CONFIG_HOME/muse/beacon-endpoint-hooks.json`, else `~/.config/muse/...`) that Muse's own `settings.json` points at with the `managed_hooks_path` key. Covers session start, prompts, tool lifecycle, operator approval decisions from `PermissionRequest`, subagent start/stop, context compaction, commands, and file activity. Muse Spark is the model and Muse Code is the agent: the harness is `muse_code`, and Muse Spark spellings are deliberately unmapped in `NormalizeHarnessName` so a model id cannot masquerade as the runtime. `PreLLMCall`/`PostLLMCall` are deliberately not subscribed to -- both carry the full `messages` array and tool schemas on every model call, and `PostLLMCall` fires per response chunk. Not collected, because Muse exposes none of it on a hook: token usage/cost, a session-end event, and subagent-to-parent correlation. Muse publishes no hook API, so the contract is reverse-engineered from a shipped build and a bad hooks file is rejected in total silence -- which is why the installer's emitted shape and the payload readers are both pinned by tests. Implementation lives in `cli/beacon/internal/endpoint/hooks/muse.go` and the `muse` platform branches in `cli/beacon-hooks/cmd`.- fx (vercel-labs/fx) telemetry read from the session store fx commits under `~/.fx/sessions/`, covering session start, prompts, tool calls, commands with exit codes and output, file reads/creates/edits with diffs, MCP tool calls, agent messages, history compaction, and per-turn token usage plus reported cost. fx exposes no third-party hook, plugin, or OTLP surface -- its lifecycle hooks are compiled into the binary -- so collection is a read of fx's own records, run by `beacon endpoint fx sync`. Every event carries `harness.collection_method=poll`; approvals are not synthesized (fx persists permission feedback text, not a per-call decision, matching the Cline and Pi posture) and no session-end event is invented, since fx sessions are resumable. Implementation lives in `cli/beacon/internal/fxsession` and `cli/beacon/cmd/endpoint_fx.go`.- Claude Cowork admin-configured OpenTelemetry setup guidance and local validation.- Browser chat telemetry through an optional Chrome MV3 extension (`browser-extension/`) covering claude.ai and chatgpt.com. A main-world interceptor tees the streamed response, a per-site adapter parses it into a normalized turn, and the service worker POSTs OTLP GenAI logs to the local collector on `127.0.0.1:4318`; the extension never writes files and never contacts a remote endpoint. `harness.name` resolves to `claude_web` or `chatgpt_web` (already handled by `NormalizeHarnessName` in `pkg/asymptoteobserve/harness.go`, where the browser cases must stay above the generic `claude` rule) and `harness.collection_method` is `otlp`. Scope is deliberately narrow: only those origins' chat streams, never other tabs or general browsing. Retention defaults to `full`, so prompt and response text is retained by default; this is documented rather than defaulted down, because browser chat telemetry without content has no investigative value. Treat the adapters as experimental, since both sites' stream formats are private and undocumented.diff --git a/README.md b/README.mdindex 4c9812dd..7159f9a3 100644--- a/README.md+++ b/README.md@@ -100,6 +100,7 @@ to compare it with the managed path.| [GitHub Copilot CLI](https://docs.asymptotelabs.ai/cli/supported-runtimes-github-copilot-cli) | MDM-managed OTLP HTTP | Prompt, session, tool, and approval-like activity || [Grok Build](https://docs.asymptotelabs.ai/cli/supported-runtimes-grok-build) | Native hooks | Session, prompt, pre-tool, post-tool, failed tool, stop, session end, command, and file || [Hermes Agent](https://docs.asymptotelabs.ai/cli/supported-runtimes-hermes-agent) | Shell hooks | Prompt, observed tool, command, file, approval request and response, session lifecycle, and subagent stop |+| [Muse Code](https://docs.asymptotelabs.ai/runtimes/muse-code) | Native hooks through a managed hooks file | Session start, prompt, pre-tool, post-tool, permission request/approval, subagent, context compaction, stop, command, and file. No session end or token usage, because Muse emits neither on a hook || [Oh My Pi](https://docs.asymptotelabs.ai/runtimes/oh-my-pi) | Managed extension hooks | Session lifecycle, prompts, tool lifecycle and results, approval decisions with the session's approval mode, commands including operator `!` and `$`, file reads/writes/edits with diffs, MCP activity, agent reasoning, and token usage/cost || [OpenClaw Gateway](https://docs.asymptotelabs.ai/cli/supported-runtimes-openclaw-gateway) | Gateway-configured OTLP/HTTP | OTLP logs, traces, and metrics from the Gateway diagnostics plugin || [OpenCode](https://docs.asymptotelabs.ai/cli/supported-runtimes-opencode) | Managed plugin hooks | Prompts, assistant output and reasoning, model usage/cost, tool lifecycle and results, commands, file/web/MCP activity, approvals, and session errors |diff --git a/cli/beacon/README.md b/cli/beacon/README.mdindex 3762bdbb..9dcab4a6 100644--- a/cli/beacon/README.md+++ b/cli/beacon/README.md@@ -509,6 +509,9 @@ tooling, not in Beacon endpoint configuration../beacon endpoint hooks install --harness grok./beacon endpoint hooks status --harness grok+./beacon endpoint hooks install --harness muse+./beacon endpoint hooks status --harness muse+./beacon endpoint hooks install --harness hermes./beacon endpoint hooks status --harness hermes@@ -555,6 +558,17 @@ The Grok Build integration writes Beacon's owned local hook file atfor project-level installs. Project hooks require trusting the project in Grokwith `/hooks-trust` before they execute.+The Muse Code integration writes Beacon's owned managed hooks file at+`$XDG_CONFIG_HOME/muse/beacon-endpoint-hooks.json` (or `~/.config/muse/...`) and+points Muse's own `settings.json` at it with the `managed_hooks_path` key. Both+halves are required: a hooks file nothing points at is never read, and a+`managed_hooks_path` with no file behind it registers nothing, so `status` checks+and prints both. Muse reads exactly one managed hooks file, so install refuses+rather than replacing a registration that is already somebody else's, and+uninstall clears the key only while it still names Beacon's file. User scope+only -- Muse's project `.muse/hooks.json` is ignored by the shipping build, so a+project install would report success and collect nothing.+The Hermes Agent integration writes shell-hook entries into`~/.hermes/config.yaml`. Hermes prompts for first-use consent for each`(event, command)` pair; for non-interactive gateway, cron, or CI runs, setdiff --git a/docs/docs.json b/docs/docs.jsonindex 8f4202c2..7f0b2e0d 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -148,6 +148,7 @@"runtimes/gemini-cli","runtimes/github-copilot-cli","runtimes/grok-build",+ "runtimes/muse-code","runtimes/oh-my-pi","runtimes/opencode","runtimes/pi",diff --git a/docs/runtimes/index.mdx b/docs/runtimes/index.mdxindex bd72f634..cbe5b988 100644--- a/docs/runtimes/index.mdx+++ b/docs/runtimes/index.mdx@@ -32,6 +32,7 @@ These integrations are grouped by where the agent runs and how telemetry is coll| [Gemini CLI](/runtimes/gemini-cli) | Opt-in local OTLP | Prompts, tool calls, MCP activity, file operations, and approval-related events emitted through OTLP || [GitHub Copilot CLI](/runtimes/github-copilot-cli) | MDM-managed OTLP HTTP | Prompt, session, tool, and approval-like activity emitted through Copilot CLI spans || [Grok Build](/runtimes/grok-build) | Native hooks | Session, prompt, pre-tool, post-tool, failed tool, stop, session-end, command, and file telemetry |+| [Muse Code](/runtimes/muse-code) | Native hooks through a managed hooks file | Session start, prompt, pre-tool, post-tool, permission request, subagent, context compaction, stop, command, and file telemetry || [Oh My Pi](/runtimes/oh-my-pi) | Managed extension hooks | Session lifecycle, prompts, tool lifecycle, operator approval decisions, commands including operator `!` and `$` commands, file reads and edits with the unified patch, MCP tool activity, agent reasoning, and token usage || [OpenCode](/runtimes/opencode) | Managed plugin hooks | Chat messages, session events, command execution, permission activity, diffs, and errors || [Pi](/runtimes/pi) | Managed extension hooks | Session lifecycle, prompts, tool lifecycle, commands including operator `!` commands, file reads and edits with the unified patch, agent reasoning, and token usage |@@ -112,7 +113,7 @@ MDM assets, meaning Jamf Pro Extension Attributes, Fleet osquery queries, and Ri| Factory Droid | Configure launch environment with `OTEL_TELEMETRY_ENDPOINT=http://127.0.0.1:4318`. Asymptote discovers the runtime and validates the endpoint but does not edit shell profiles or launch environments. || OpenClaw Gateway | Configure OTLP in OpenClaw. Use [`beacon endpoint integrations openclaw`](/cli/openclaw) to print local Gateway settings and validate events. |-Install hooks separately in the logged-in user's context when you need richer hook telemetry or inventory heartbeat triggers. This applies to Antigravity CLI, Claude Code, Cline, Codex CLI inventory hooks, Cursor, Devin CLI, Devin Desktop, Factory Droid, Grok Build, Hermes Agent, Oh My Pi, OpenCode, Pi, Qwen Code, and the optional VS Code hooks. fx is the exception with no hooks to install: schedule [`beacon endpoint fx sync`](/cli/endpoint-fx) instead.+Install hooks separately in the logged-in user's context when you need richer hook telemetry or inventory heartbeat triggers. This applies to Antigravity CLI, Claude Code, Cline, Codex CLI inventory hooks, Cursor, Devin CLI, Devin Desktop, Factory Droid, Grok Build, Hermes Agent, Muse Code, Oh My Pi, OpenCode, Pi, Qwen Code, and the optional VS Code hooks. fx is the exception with no hooks to install: schedule [`beacon endpoint fx sync`](/cli/endpoint-fx) instead.If a system collector is running while the CLI is reading the default per-user log, `beacon endpoint status` and the local dashboard surface a runtime-log source warning so you can tell where OTLP events are being written.diff --git a/docs/runtimes/integration-model.mdx b/docs/runtimes/integration-model.mdxindex 57ec32d6..ccda066b 100644--- a/docs/runtimes/integration-model.mdx+++ b/docs/runtimes/integration-model.mdx@@ -24,6 +24,7 @@ Beacon supports multiple [runtime surfaces](/concepts/core-concepts#runtime-surf| [Pi](/runtimes/pi) | Looks for the `pi` executable, treating `~/.pi/agent` as an extra signal because an npm or version-manager install is often off the inherited `PATH`, then checks for Beacon's managed extension at `~/.pi/agent/extensions/beacon.ts` || [Oh My Pi](/runtimes/oh-my-pi) | Looks for the `omp` executable, treating the resolved agent directory as an extra signal for the same reason as Pi, then checks for Beacon's managed extension at `~/.omp/agent/extensions/beacon.ts` || [fx (Vercel Labs)](/runtimes/vercel-fx) | Looks for the `fx` executable, treating `~/.fx` as an extra signal, then reports how much of the session store under `~/.fx/sessions` a sweep has actually collected. There is no managed file to check, so collection progress is the only honest evidence telemetry is flowing |+| [Muse Code](/runtimes/muse-code) | Checks Muse's config directory (`$XDG_CONFIG_HOME/muse`, else `~/.config/muse`) for Beacon's managed hooks file and for the `managed_hooks_path` key in Muse's own `settings.json`. Both are reported, because either one alone is a broken install that Muse says nothing about || [Qwen Code](/runtimes/qwen-code) | Looks for the `qwen` executable, treating `~/.qwen` as an extra signal because an npm or version-manager install is often off the inherited `PATH`, then checks `~/.qwen/settings.json` for Beacon's `--platform qwen` hook entries || [Devin CLI](/runtimes/devin) | Looks for the `devin` executable, `~/.config/devin`, or `./.devin`, then checks Beacon hook configuration || [Devin Desktop](/runtimes/devin-desktop) | Checks Cascade/Windsurf hook configuration at `~/.codeium/windsurf/hooks.json` or `./.windsurf/hooks.json` |@@ -46,7 +47,7 @@ During install, Beacon configures the runtime surfaces it can safely manage:| [Factory Droid](/runtimes/factory-droid) | Droid's OTLP endpoint remains under its launch environment, commonly managed through MDM or another customer-owned policy. || [OpenClaw Gateway](/runtimes/openclaw-gateway) | Configure OpenClaw with the `diagnostics-otel` plugin. Beacon prints local OTLP/HTTP setup guidance and validates observed events. || [fx (Vercel Labs)](/runtimes/vercel-fx) | Nothing is installed or configured. fx has no hook file, plugin directory, or OTLP endpoint, so collection is an action: run or schedule [`beacon endpoint fx sync`](/cli/endpoint-fx). |-| Hook-based runtimes | [Antigravity CLI](/runtimes/antigravity-cli), [Claude Code](/runtimes/claude-code), [Cline](/runtimes/cline), [Cursor](/runtimes/cursor), [Devin CLI](/runtimes/devin), [Devin Desktop](/runtimes/devin-desktop), [Factory](/runtimes/factory-droid), [Grok Build](/runtimes/grok-build), [Hermes Agent](/runtimes/hermes-agent), [Oh My Pi](/runtimes/oh-my-pi), [OpenCode](/runtimes/opencode), [Pi](/runtimes/pi), and [Qwen Code](/runtimes/qwen-code) hooks and managed plugins are installed separately with [`beacon endpoint hooks`](/cli/hooks), because hooks are per-user or per-project runtime configuration rather than base collector service configuration. |+| Hook-based runtimes | [Antigravity CLI](/runtimes/antigravity-cli), [Claude Code](/runtimes/claude-code), [Cline](/runtimes/cline), [Cursor](/runtimes/cursor), [Devin CLI](/runtimes/devin), [Devin Desktop](/runtimes/devin-desktop), [Factory](/runtimes/factory-droid), [Grok Build](/runtimes/grok-build), [Hermes Agent](/runtimes/hermes-agent), [Muse Code](/runtimes/muse-code), [Oh My Pi](/runtimes/oh-my-pi), [OpenCode](/runtimes/opencode), [Pi](/runtimes/pi), and [Qwen Code](/runtimes/qwen-code) hooks and managed plugins are installed separately with [`beacon endpoint hooks`](/cli/hooks), because hooks are per-user or per-project runtime configuration rather than base collector service configuration. |## Integration paths@@ -66,6 +67,7 @@ During install, Beacon configures the runtime surfaces it can safely manage:| [Oh My Pi](/runtimes/oh-my-pi) | Managed local extension through `beacon-hooks` | A pi-mono fork that kept Pi's event payload shapes, so the two share one mapper but never share identity: separate harness names, separate extension markers, separate install directories. Unlike Pi it exposes real operator approval decisions, which are recorded as `observed` approvals. || [Prime Agent](/runtimes/prime-agent) | Not yet collected | Another pi-mono fork with the same extension API. Harness identity and the plugin collection method ship today; the managed extension, discovery probe, and install target do not, so no Prime Agent events are collected yet. || [fx (Vercel Labs)](/runtimes/vercel-fx) | Poll of fx's own session store | fx exposes no third-party observation surface: its lifecycle hooks are compiled into the binary, it has no OpenTelemetry export, and its plugin story is MCP. Beacon reads the append-only session records under `~/.fx/sessions` and marks every event `harness.collection_method=poll`, so a consumer knows nothing on this path could have been intercepted. |+| [Muse Code](/runtimes/muse-code) | Native hook payloads through `beacon-hooks` | Beacon writes a managed hooks file it owns outright and points Muse's own `settings.json` at it with the `managed_hooks_path` key, then maps session, prompt, tool, command, file, approval, subagent, and compaction events into endpoint events. Muse ships an OTLP export that cannot be pointed at a local collector, so hooks are the only collection path. || [Qwen Code](/runtimes/qwen-code) | Native hook payloads through `beacon-hooks` | Beacon merges a managed hook block into Qwen's own `settings.json` and maps session, prompt, tool, command, file, failed-tool, approval, and subagent events into endpoint events. Qwen Code is a Gemini CLI fork without Gemini's OTLP export, so hooks are the only collection path. || [Devin CLI](/runtimes/devin) | Native hook payloads through `beacon-hooks` | Hooks emit session, prompt, pre-tool, post-tool, permission request, stop, session-end, approval, and file telemetry where Devin CLI exposes payloads. || [Devin Desktop](/runtimes/devin-desktop) | Cascade/Windsurf hook payloads through `beacon-hooks` | Hooks emit prompt, command, MCP tool, file read, and file write telemetry where Devin Desktop exposes Cascade/Windsurf payloads. |@@ -77,7 +79,7 @@ During install, Beacon configures the runtime surfaces it can safely manage:## Hook telemetry-Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, Oh My Pi, OpenCode, Pi, Qwen Code, and optional VS Code hooks cover activity that is better represented as runtime events than generic OTLP spans.+Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, Muse Code, Oh My Pi, OpenCode, Pi, Qwen Code, and optional VS Code hooks cover activity that is better represented as runtime events than generic OTLP spans.| Runtime | Hook telemetry ||---------|----------------|@@ -94,6 +96,7 @@ Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory,| [Cline](/runtimes/cline) | Prompt submission, task start and end, task errors, tool invocation and completion, command execution with exit code, file reads and edits with diffs, MCP tool activity, and task token usage. Approval decisions are not exposed by Cline's hook payloads. || [Pi](/runtimes/pi) | Session lifecycle, prompt submission, tool invocation and results, command execution including operator `!` commands, file reads, creates, and edits with the unified patch, agent reasoning from assistant thinking parts, and token usage and cost. Approval decisions are not exposed by Pi's extension API and are not synthesized. || [Oh My Pi](/runtimes/oh-my-pi) | Everything Pi reports, plus real operator approval decisions carrying the command or file being decided on, the session's approval mode, and the tool call id. Commands include operator `!` shell and `$` Python prefixes, and MCP tool activity is resolved from Oh My Pi's `mcp__<server>_<tool>` naming. |+| [Muse Code](/runtimes/muse-code) | Session start, prompt submission, pre-tool and post-tool activity, permission requests, subagent start and stop, context compaction, stop events, command execution, and file activity. Hook timeouts are second values. User scope only: Muse's project `.muse/hooks.json` is ignored by the shipping build. || [Qwen Code](/runtimes/qwen-code) | Session lifecycle, prompt submission, pre-tool and post-tool activity, post-tool failures, permission requests, subagent start and stop, stop events, session-end events, command execution, and file activity where payloads are available. Hook timeouts are millisecond values, and project-level hooks require a trusted folder in Qwen. |Hook events include metadata such as file path, operation, language, diff hash, and diff byte count. Raw diffs are subject to Beacon's redaction, sanitization, truncation, and event-size limits before writing.diff --git a/docs/runtimes/muse-code.mdx b/docs/runtimes/muse-code.mdxnew file mode 100644index 00000000..6b602462--- /dev/null+++ b/docs/runtimes/muse-code.mdx@@ -0,0 +1,192 @@+---+title: "Muse Code"+description: "Asymptote support details for Meta Muse Code endpoint telemetry"+---++## Runtime overview++Asymptote supports Muse Code, Meta's terminal coding agent, through native hook payloads sent to `beacon-hooks`.++```bash+beacon endpoint hooks install --harness muse+```++`--harness muse-code` is also accepted.++<Note>+**Muse Spark is the model; Muse Code is the agent.** Asymptote hooks the agent, so the harness name is `muse_code` and the Muse Spark model id rides on each event in the `model` field. Muse Spark spellings are deliberately **not** accepted as harness aliases: asking to install hooks for a model would otherwise produce an install for the agent under a different name.+</Note>++Muse Code ships its own OpenTelemetry export, but it cannot be pointed at a local collector. Its `telemetry.destination` setting is an enum (`legacy`, `consolidated`, `edge`, `external`), not a URL: choosing `external` with a local `OTEL_EXPORTER_OTLP_ENDPOINT` causes the binary to detect the non-baseline destination and withhold its credential, disabling export, and the other values name internal destinations unavailable in public builds. Hooks are therefore the only collection path for this runtime, not merely the chosen one.++## Prerequisites++Before enabling Muse Code telemetry, make sure:++- Muse Code is installed and available as the `muse` executable, on macOS or Linux. There is no Windows build.+- `beacon endpoint install` has run so shared endpoint config and runtime log paths exist.+- Muse Code is restarted after hook install or removal so new sessions load the updated registration.++## Collection path++Muse Code registers hooks through a **managed hooks file** named by the `managed_hooks_path` key in its own `settings.json`. Managed hooks are pre-approved and run without a trust step.++| File | Owner | Purpose |+|------|-------|---------|+| `~/.config/muse/beacon-endpoint-hooks.json` | Asymptote, written outright | The hook registrations themselves |+| `~/.config/muse/settings.json` | You; Asymptote edits one key | `managed_hooks_path` points Muse at the file above |++`$XDG_CONFIG_HOME/muse` is used instead when that variable is set, matching how Muse resolves the directory itself.++Install edits `settings.json` by exactly one key. Unrelated settings — including ones Asymptote has never heard of — survive the round trip byte for byte. A `settings.json` whose JSON is invalid is reported rather than replaced; its only problem might be a trailing comma.++<Warning>+**An install is only complete with both files, and Muse reports nothing when it is not.** A hooks file with no `managed_hooks_path` pointing at it is a file Muse never opens. A `managed_hooks_path` with no file behind it registers nothing. `beacon endpoint hooks status --harness muse` therefore checks both halves and prints both paths — checking one would confidently claim telemetry that is not being collected.+</Warning>++### Registered events++Asymptote registers every Muse Code lifecycle event that carries endpoint signal:++| Muse event | Adapter subcommand | Matcher | Timeout |+|------------|--------------------|---------|---------|+| `SessionStart` | `session-start` | `*` | Muse default |+| `UserPromptSubmit` | `prompt-submit` | `*` | 30 s |+| `PreToolUse` | `pre-tool` | `*` | 10 s |+| `PermissionRequest` | `permission-request` | `*` | 10 s |+| `PostToolUse` | `post-tool` | `*` | 10 s |+| `PreCompact` | `pre-compact` | `*` | Muse default |+| `PostCompact` | `post-compact` | `*` | Muse default |+| `SubagentStart` | `subagent-start` | `*` | Muse default |+| `SubagentStop` | `subagent-stop` | `*` | Muse default |+| `Stop` | `stop` | `*` | 45 s |++<Warning>+**Muse hook timeouts are seconds, not milliseconds.** The same `timeout` field is milliseconds on [Qwen Code](/runtimes/qwen-code), in a settings file that looks nearly identical. Asymptote writes second values for this runtime. Keep the unit in mind if you hand-edit them.+</Warning>++### Events that are not collected++`PreLLMCall` and `PostLLMCall` are deliberately not registered.++Both carry the full `messages` array and the tool schemas — the entire conversation on every model call, not a preview — so subscribing would turn a telemetry install into a full transcript capture. `PostLLMCall` is also expected to fire per response chunk, making it by far the highest-volume event Muse emits. `UserPromptSubmit` already captures prompt text under the usual retention and redaction controls.++### The file format fails silently++Everything about Muse's managed hooks file rejects quietly. There is no `muse hooks validate` command, and a bad file produces no warning, no exit code and no log line — so a broken registration looks exactly like a working one. Asymptote's installer is shaped around that, and each of these is covered by a test:++- **The nesting is mandatory.** The `hooks` wrapper and the matcher-group level between the event name and the handlers are both load-bearing. Hoisting event names to the top level, or listing handlers directly under an event name, produces a file Muse ignores entirely.+- **Unknown keys inside a group or handler are fatal.** One unrecognized key and that whole event is skipped while the rest of the file keeps working — so a typo removes monitoring from one event and leaves the install looking healthy. `env`, `shell`, and a group's `enabled` are all rejected. Asymptote emits only `type`, `command`, `timeout`, and `statusMessage`.+- **Unknown keys at the top level are tolerated**, which is where Asymptote's `beacon` marker lives.++### The hook environment++Muse runs hook commands with the environment filtered down to a fixed allowlist. No `BEACON_*` or `OTEL_*` shell export reaches a hook, and `XDG_CONFIG_HOME` is stripped too.++This costs Asymptote nothing, because the endpoint log and config locations are passed to `beacon-hooks` as `--log` and `--config` flags rather than through the environment. It is worth knowing when reading a hook command by hand, and when debugging why a hook cannot find a path you can see from your shell.++## Discovery and status++```bash title="Show Muse Code hook status"+beacon endpoint hooks status --harness muse+```++Muse Code reports as the `muse_code` harness with capability `hooks`. `beacon endpoint inventory` reports both files, so a half-install is visible as a half-install rather than as a clean one.++## Install or configuration support++`beacon endpoint install` prepares shared endpoint config and runtime log paths. Muse Code hooks are installed separately, because Muse loads them from the user's own config directory:++```bash+beacon endpoint hooks install --harness muse # user level+beacon endpoint hooks status --harness muse+beacon endpoint hooks uninstall --harness muse+```++**User level only.** Muse documents a project-level `.muse/hooks.json`, but the shipping build ignores it, so `--level project` is refused with an error naming the scope that works. Writing that file would report success and collect nothing.++**Install refuses to take over an existing registration.** Muse reads exactly one managed hooks file, so if `managed_hooks_path` already names somebody else's, Asymptote stops and says so rather than replacing it — overwriting would look like a clean install and quietly end their monitoring. The check runs before anything is written, so a refusal leaves nothing behind. The uninstall is the same property in reverse: it clears the key only while it still names Asymptote's file, and leaves a hooks file Asymptote did not write alone.++## Telemetry coverage++| Area | Support |+|------|---------|+| Runtime discovery | Supported through the managed hooks file and `settings.json` |+| Harness attribution | Supported. `muse`, `muse_code`, `muse-code`, `muse code`, `musecode`, `muse_cli`, `muse-cli`, and `muse cli` normalize to `muse_code` |+| Hook install, status, uninstall, and repair | Supported |+| Session lifecycle | Supported through `SessionStart`, with the start `source` preserved. See [Known gaps](#known-gaps) for session end |+| Prompts | Supported. `prompt.submitted` from `UserPromptSubmit` |+| Tool use | Supported for pre-tool and post-tool activity |+| Commands | Supported. `command.executed` on post-tool |+| File activity | Supported. `file.read`, `file.modified`, and file paths with an operation, including diffs on an edit |+| Subagents | Supported through `SubagentStart` and `SubagentStop`. See [Known gaps](#known-gaps) for parent correlation |+| Approval decisions | Supported. Observed from `PermissionRequest`, not synthesized from pre-tool |+| Context compaction | Supported. `session.compacting` and `session.compacted` |+| Tool call identity | Supported. Muse's `tool_use_id` is promoted to `gen_ai.tool.call.id` and joins pre-tool, approval and post-tool events |+| Token usage and cost | Not collected. See [Known gaps](#known-gaps) |+| Local JSONL and dashboard | Supported |+| MDM deployment | Supported for the endpoint agent. Muse hooks are installed separately in the logged-in user's context |++Harness names are matched against a closed set of spellings rather than by substring, and this runtime is the sharpest case for that rule: every Muse Spark model id starts with the same four letters as the harness (`muse-spark-1.2`, `muse-spark-1.3`). A substring rule would report any event carrying a Muse Spark model string as a Muse Code session — and because the model and the agent share a brand, a reader could not tell the misattribution from the real thing. Muse Spark spellings are left unmapped so they appear as themselves, which is visible as an anomaly. `muse` is also an ordinary English word, which the closed set covers for the same reason.++### Tool taxonomy++Muse Code sends the Claude Code payload shape but does not publish its tool names. The names that are confirmed are snake_case (`read_skill`, and the six `subagent_*` control tools), so Asymptote matches file-edit tools with a substring rule over `edit`, `write`, `create` and `patch` rather than a guessed literal list — a wrong literal list would capture nothing, silently.++The false-positive direction is bounded: a `file` block is only attached when the tool's own arguments carry a path, so a non-file tool whose name happens to contain `write` yields an action with no fabricated path. None of `subagent_spawn`, `subagent_status`, `subagent_send_message`, `subagent_cancel`, `subagent_wait` or `subagent_read_result` match, so the lead agent's own fan-out control loop stays out of the file-modification stream.++## Approvals and enforcement++Approval telemetry comes from Muse's `PermissionRequest` event and is recorded as `observed`, because an operator was actually asked. Asymptote does not synthesize an approval from a pre-tool notification for this runtime — doing so would put an invented decision next to a reported one for the same call.++Asymptote's `PreToolUse` hook answers with an empty object, for two independent reasons. Muse reads a tool decision from `hookSpecificOutput`, so answering `allow` would disarm the user's own permission prompt on a runtime the hook was installed only to watch. And Muse rejects a stdout object carrying keys it does not know, so a differently shaped permissive answer would not read as permissive — it would fail the hook run.++Enforcement stays behind the optional, off-by-default policy provider seam (`BEACON_POLICY_PROVIDER`), which is inert unless it names an executable and fails open on any error. See [Known gaps](#known-gaps) for the status of Muse's deny contract.++## Data handling++Muse Code content is handled like every other runtime. Prompts, tool arguments, commands, paths, and diffs are retained in local or customer-controlled logs, with local secret redaction and per-string limits applied before writing, and a hash and byte count on each content-bearing event. Events over the 64 KiB limit drop raw and retained content, preserve stable metadata, and set `field_truncated`.++Muse carries signal with no endpoint-schema field of its own — most importantly `turn_id`, which is the only per-turn boundary anything in its payload offers, plus `permission_mode` on tool events and `source` on `SessionStart`. Asymptote preserves the verbatim payload under `raw.muse` rather than inventing schema fields for one runtime. It travels the event's normal path through sanitization, so `raw` is secret-redacted and string-limited like every other field, and it is the first thing dropped when an event exceeds the size ceiling.++## Known gaps++- **The hook contract is reverse-engineered, not documented.** Meta publishes no hook API for Muse Code, and `muse --help` does not mention hooks. Asymptote's integration is built from observed behaviour of a shipped build (`muse 0.1.0-R708.1`) rather than from a specification. None of it is a supported interface and any of it can change without notice — which is exactly why the tests pin the payload readers and the emitted file shape: the host rejects a bad hook file silently, so a contract change would otherwise appear as telemetry quietly going missing rather than as an error.+- **Token usage and cost are not collected.** Muse's usage counts arrive on `PostLLMCall` and in its own session log, neither of which Asymptote reads. Muse Code activity therefore does not appear in `beacon token-usage` reports or the dashboard token view.+- **No session-end event.** Muse emits `Stop` at the end of a turn but no session-end lifecycle event, so Asymptote records no `session.ended` for this runtime.+- **Subagents cannot be correlated to their parent.** On `SubagentStart` the payload's own `session_id` is the *child's*, and no parent id is present, so `session.id` on a subagent event identifies the subagent's session rather than the one that spawned it. Muse's on-disk session log does carry `parent_session_id`, but reading it is a poll path Asymptote does not implement; synthesizing a parent from a payload that does not name one would be a fabricated join key in a security log.+- **Assistant text is not collected.** `Stop` carries `last_assistant_message`, which is preserved under `raw.muse` but not promoted to an `agent.response` event.+- **The policy deny shape is inferred, not measured.** Muse is fail-open on everything except `{"decision":"block"}` and exit code 2. That JSON shape is confirmed to block, but only on `UserPromptSubmit`, where blocking cancels the whole turn — emitting it from a tool phase would escalate "do not run this command" into "abandon what the user asked for", so Asymptote does not use it. The tool-family shape it sends instead (`hookSpecificOutput.permissionDecision`) comes from the binary's own validation strings and has never been exercised against a live tool call. Because sending the wrong shape is ignored silently and the seam fails open, the cost of that inference being wrong is a deny that does not take effect — never a tool call blocked for the wrong reason. Exit code 2 is not used: it is a confirmed deny channel, but it would also fire on a hook crash.+- **No Windows support.** Muse Code has no Windows build, so there is no host to hook.++## Deployment notes++Settings are read when Muse Code starts, so an install taken while Muse is running takes effect on the next launch. Restart Muse after installing or removing hooks.++Confirm status, then generate one Muse Code event and check the log:++```bash+beacon endpoint hooks status --harness muse+beacon endpoint doctor --system+grep '"name":"muse_code"' ~/.beacon/endpoint/logs/runtime.jsonl | tail -3+```++If Muse telemetry is missing:++- Confirm `~/.config/muse/settings.json` has `managed_hooks_path` pointing at Asymptote's hooks file, and that the file exists. Either half alone collects nothing.+- Check `$XDG_CONFIG_HOME`: if it is set, Muse reads `$XDG_CONFIG_HOME/muse`, not `~/.config/muse`.+- Confirm the hooks file contains commands with `--platform muse`.+- Confirm hook timeouts are second values, not milliseconds.+- Confirm nothing else has claimed `managed_hooks_path` since the install. Muse reads only one file.+- Restart Muse so new sessions pick up the updated registration.++## Related++<Columns cols={2}>+ <Card title="Supported agent harnesses" icon="list-check" href="/runtimes">+ Return to the runtime support overview.+ </Card>+ <Card title="Agent harness integration model" icon="plug" href="/runtimes/integration-model">+ See how Asymptote discovers and configures each runtime.+ </Card>+</Columns>