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
docs: document Qwen Code as a supported hook runtime
Claude0c2f15a7d797
diff --git a/README.md b/README.mdindex cad6eb60..b265e0db 100644--- a/README.md+++ b/README.md@@ -91,6 +91,7 @@ CI, and cloud surfaces.| [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 telemetry || [OpenCode](https://docs.asymptotelabs.ai/cli/supported-runtimes-opencode) | Managed plugin hooks | Prompts, assistant output/reasoning, model usage/cost, tool lifecycle/results, commands, file/web/MCP activity, approvals, and session errors || [Pi](https://docs.asymptotelabs.ai/runtimes/pi) | Managed extension hooks | Session lifecycle, prompts, tool lifecycle/results, commands including operator `!` commands, file reads/writes/edits with diffs, agent reasoning, and token usage/cost |+| [Qwen Code](https://docs.asymptotelabs.ai/runtimes/qwen-code) | Native hooks | Session, prompt, pre-tool, post-tool, failed tool, permission request/approval, subagent, stop, session-end, command, and file telemetry merged into Qwen's own `settings.json` || [VS Code](https://docs.asymptotelabs.ai/cli/supported-runtimes-vscode) | Copilot Chat OTel plus optional preview hooks | Copilot session, prompt, model, and tool activity through OTel; optional hooks for extra lifecycle and cross-agent detail |##### Knowledge Worker Agent Harnessesdiff --git a/docs/cli/endpoint-discover.mdx b/docs/cli/endpoint-discover.mdxindex a77bff84..82e61993 100644--- a/docs/cli/endpoint-discover.mdx+++ b/docs/cli/endpoint-discover.mdx@@ -13,7 +13,7 @@ beacon endpoint discoverBeacon discovers local runtime surfaces and reports their telemetry configuration state, including whether supported configuration appears Beacon-managed or customer-managed. By default, discover prints detected targets. Add `--all` to include every supported runtime target, including runtimes that are not detected on the host. OpenClaw Gateway is validated through the `beacon endpoint integrations openclaw` commands after Gateway diagnostics export is configured.-Gemini CLI discovery looks for the `gemini` executable and `~/.gemini/settings.json`, then checks whether local OTLP telemetry is enabled for Beacon. VS Code discovery checks Copilot Chat OpenTelemetry configuration and reports Beacon-managed state when the OTLP endpoint points at Beacon's local receiver. GitHub Copilot CLI discovery looks for the `copilot` executable or `~/.copilot/config.json`, then validates that `COPILOT_OTEL_ENABLED=true` and the effective OTLP endpoint points at Beacon's local HTTP receiver, usually `http://127.0.0.1:4318`. Claude Code discovery looks for the `claude` executable and Claude settings paths; optional Claude hook status is available through `beacon endpoint hooks status --harness claude`. Antigravity CLI discovery looks for the `antigravity` or `antigravity-cli` executable, `~/.gemini/config`, or `./.agents`, then checks whether Beacon endpoint hooks are installed in `~/.gemini/config/hooks.json` or `./.agents/hooks.json`. Grok Build discovery checks whether Beacon's managed hook file is installed at `~/.grok/hooks/beacon-endpoint.json` or `./.grok/hooks/beacon-endpoint.json`. Hermes Agent discovery looks for the `hermes` executable or `~/.hermes`, then checks `~/.hermes/config.yaml` for Beacon-managed hooks, identified by the endpoint settings flags (`--log`, `--config`, `--cli`) or a legacy `BEACON_ENDPOINT_MODE=1` prefix, together with `--platform hermes`. OpenCode discovery looks for the `opencode` executable or `~/.config/opencode`, then checks whether Beacon's managed plugin is installed at `~/.config/opencode/plugins/beacon.ts`. Cline discovery looks for `~/.cline` and treats a `cline` executable as an additional signal rather than the deciding one, because Cline's VS Code and JetBrains hosts ship no executable; it then checks whether Beacon's managed plugin is installed at `~/.cline/plugins/beacon.ts`. Pi discovery looks for the `pi` executable and treats `~/.pi/agent` as an additional signal, because an npm, pnpm, or bun install is often absent from the inherited `PATH` while its state directory is not; it then reports whether Beacon's managed extension is installed at `~/.pi/agent/extensions/beacon.ts`, and reports a `beacon.ts` without Beacon's marker as disabled rather than enabled. Devin CLI discovery looks for the `devin` executable, `~/.config/devin`, or `./.devin`, then checks whether Beacon endpoint hooks are installed in `~/.config/devin/config.json` or `./.devin/hooks.v1.json`; `devin` remains a legacy alias for `devin-cli`. Devin Desktop discovery checks Cascade/Windsurf hook files at `~/.codeium/windsurf/hooks.json` or `./.windsurf/hooks.json`. Factory Droid discovery looks for the `droid` executable and validates the effective `OTEL_TELEMETRY_ENDPOINT` launch environment without treating customer-managed shell export values as Beacon-owned configuration. Set MDM-managed launch environments to Beacon's local OTLP HTTP receiver through MDM or another customer-owned launch policy.+Gemini CLI discovery looks for the `gemini` executable and `~/.gemini/settings.json`, then checks whether local OTLP telemetry is enabled for Beacon. VS Code discovery checks Copilot Chat OpenTelemetry configuration and reports Beacon-managed state when the OTLP endpoint points at Beacon's local receiver. GitHub Copilot CLI discovery looks for the `copilot` executable or `~/.copilot/config.json`, then validates that `COPILOT_OTEL_ENABLED=true` and the effective OTLP endpoint points at Beacon's local HTTP receiver, usually `http://127.0.0.1:4318`. Claude Code discovery looks for the `claude` executable and Claude settings paths; optional Claude hook status is available through `beacon endpoint hooks status --harness claude`. Antigravity CLI discovery looks for the `antigravity` or `antigravity-cli` executable, `~/.gemini/config`, or `./.agents`, then checks whether Beacon endpoint hooks are installed in `~/.gemini/config/hooks.json` or `./.agents/hooks.json`. Grok Build discovery checks whether Beacon's managed hook file is installed at `~/.grok/hooks/beacon-endpoint.json` or `./.grok/hooks/beacon-endpoint.json`. Hermes Agent discovery looks for the `hermes` executable or `~/.hermes`, then checks `~/.hermes/config.yaml` for Beacon-managed hooks, identified by the endpoint settings flags (`--log`, `--config`, `--cli`) or a legacy `BEACON_ENDPOINT_MODE=1` prefix, together with `--platform hermes`. OpenCode discovery looks for the `opencode` executable or `~/.config/opencode`, then checks whether Beacon's managed plugin is installed at `~/.config/opencode/plugins/beacon.ts`. Cline discovery looks for `~/.cline` and treats a `cline` executable as an additional signal rather than the deciding one, because Cline's VS Code and JetBrains hosts ship no executable; it then checks whether Beacon's managed plugin is installed at `~/.cline/plugins/beacon.ts`. Pi discovery looks for the `pi` executable and treats `~/.pi/agent` as an additional signal, because an npm, pnpm, or bun install is often absent from the inherited `PATH` while its state directory is not; it then reports whether Beacon's managed extension is installed at `~/.pi/agent/extensions/beacon.ts`, and reports a `beacon.ts` without Beacon's marker as disabled rather than enabled. Qwen Code discovery looks for the `qwen` executable and treats `~/.qwen` as an additional signal, because an npm or version-manager install is often absent from the inherited `PATH` while its config directory is not; it then checks `~/.qwen/settings.json` for Beacon hook commands carrying `--platform qwen`, reporting hooks turned off by `disableAllHooks` as disabled and invalid settings JSON as misconfigured rather than missing. Devin CLI discovery looks for the `devin` executable, `~/.config/devin`, or `./.devin`, then checks whether Beacon endpoint hooks are installed in `~/.config/devin/config.json` or `./.devin/hooks.v1.json`; `devin` remains a legacy alias for `devin-cli`. Devin Desktop discovery checks Cascade/Windsurf hook files at `~/.codeium/windsurf/hooks.json` or `./.windsurf/hooks.json`. Factory Droid discovery looks for the `droid` executable and validates the effective `OTEL_TELEMETRY_ENDPOINT` launch environment without treating customer-managed shell export values as Beacon-owned configuration. Set MDM-managed launch environments to Beacon's local OTLP HTTP receiver through MDM or another customer-owned launch policy.## Flagsdiff --git a/docs/cli/endpoint-install.mdx b/docs/cli/endpoint-install.mdxindex f2da64fb..7023eef7 100644--- a/docs/cli/endpoint-install.mdx+++ b/docs/cli/endpoint-install.mdx@@ -22,7 +22,7 @@ By default, Beacon configures Claude Code and Codex CLI telemetry for local or c| `--user` | Use per-user endpoint paths. Enabled by default || `--system` | Use system endpoint paths and launch daemon. Requires root || `--log-path <path>` | Runtime JSONL log path |-| `--harness <list>` | Comma-separated harnesses to configure. Defaults to `claude,codex`; include `gemini` for Gemini CLI, `vscode` for VS Code Copilot telemetry, `devin-cli` for Devin CLI hooks, or `devin-desktop` for Devin Desktop hooks. Claude Code, Grok Build, Hermes Agent, Cursor, Factory, OpenCode, Cline, and optional VS Code hook telemetry are managed with `beacon endpoint hooks`. GitHub Copilot CLI and Factory Droid OTLP endpoints are managed through their launch environments |+| `--harness <list>` | Comma-separated harnesses to configure. Defaults to `claude,codex`; include `gemini` for Gemini CLI, `vscode` for VS Code Copilot telemetry, `devin-cli` for Devin CLI hooks, or `devin-desktop` for Devin Desktop hooks. Claude Code, Grok Build, Hermes Agent, Cursor, Factory, OpenCode, Cline, Qwen Code, and optional VS Code hook telemetry are managed with `beacon endpoint hooks`. GitHub Copilot CLI and Factory Droid OTLP endpoints are managed through their launch environments || `--otlp-grpc-port <port>` | Local OTLP gRPC port. Defaults to `4317` || `--otlp-http-port <port>` | Local OTLP HTTP port. Defaults to `4318` || `--collector <path>` | Path to a `beacon-otelcol` binary |@@ -127,7 +127,7 @@ export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:4318"For richer hook telemetry, install runtime hooks after the endpoint configuration exists:```bash title="Install runtime hooks"-beacon endpoint hooks install --harness antigravity,claude,cline,cursor,devin-cli,devin-desktop,factory,grok,hermes,opencode+beacon endpoint hooks install --harness antigravity,claude,cline,cursor,devin-cli,devin-desktop,factory,grok,hermes,opencode,qwen```Install Claude Code hooks at the user level:@@ -150,6 +150,14 @@ beacon endpoint hooks install --harness hermesHermes hooks write `~/.hermes/config.yaml` and support user-level installs only.+Install Qwen Code hooks at the user level:++```bash title="Install Qwen Code hooks at the user level"+beacon endpoint hooks install --harness qwen+```++Qwen Code hooks merge into `~/.qwen/settings.json`. Qwen Code has no OpenTelemetry export to configure, so `beacon endpoint install --harness qwen` fails with a message pointing at `beacon endpoint hooks install` rather than appearing to succeed.+Project-level Grok Build hooks write `./.grok/hooks/beacon-endpoint.json` and require `/hooks-trust` in Grok before they execute:```bash title="Install project-level Grok Build hooks"diff --git a/docs/cli/endpoint-inventory.mdx b/docs/cli/endpoint-inventory.mdxindex 4a303848..d7ddd6b4 100644--- a/docs/cli/endpoint-inventory.mdx+++ b/docs/cli/endpoint-inventory.mdx@@ -21,7 +21,7 @@ Inventory can include:- Endpoint config path, runtime log path, and configured OTLP harnesses- Detected supported runtimes and telemetry status, including MDM-managed launch-environment state for GitHub Copilot CLI and Factory Droid-- Hook integration status for Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory Droid, Grok Build, Hermes Agent, and OpenCode+- Hook integration status for Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory Droid, Grok Build, Hermes Agent, OpenCode, and Qwen Code- Supported agent configuration files and MCP server configuration context where Beacon can inspect them locally, including Claude Code `~/.claude.json` and Cursor `mcp.json`- Local agent skill manifests discovered under supported skill roots, including symlinked Claude Code skill directories, reported as metadata and hashes by default (add `--contents` for redacted full bodies)- Recently observed Beacon runtime events when the runtime log existsdiff --git a/docs/cli/endpoint-paths.mdx b/docs/cli/endpoint-paths.mdxindex 56a85aef..bac705c3 100644--- a/docs/cli/endpoint-paths.mdx+++ b/docs/cli/endpoint-paths.mdx@@ -45,7 +45,7 @@ A supervised collector is a plain background process tracked by a pidfile. It worestarts it if it exits or when the machine reboots — `beacon endpoint status` says so explicitlyrather than reporting the same health as a real service.-Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, and OpenCode hooks install an embedded `beacon-hooks` adapter under the Beacon endpoint base directory.+Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, OpenCode, and Qwen Code hooks install an embedded `beacon-hooks` adapter under the Beacon endpoint base directory.Hook and plugin configuration is written to:@@ -61,6 +61,7 @@ Hook and plugin configuration is written to:| Hermes Agent | `~/.hermes/config.yaml` | — || OpenCode | `~/.config/opencode/plugins/beacon.ts` | `./.opencode/plugins/beacon.ts` || Cline | `~/.cline/plugins/beacon.ts` | `./.cline/plugins/beacon.ts` |+| Qwen Code | `~/.qwen/settings.json` | `./.qwen/settings.json` |## Relateddiff --git a/docs/cli/endpoint-repair.mdx b/docs/cli/endpoint-repair.mdxindex 4afdcfce..1587e58b 100644--- a/docs/cli/endpoint-repair.mdx+++ b/docs/cli/endpoint-repair.mdx@@ -22,7 +22,7 @@ During repair, Beacon removes the existing managed service before reinstalling i| `--user` | Use per-user endpoint paths. Enabled by default || `--system` | Use system endpoint paths and launch daemon || `--log-path <path>` | Runtime JSONL log path |-| `--harness <list>` | Comma-separated harnesses to configure. Defaults to `claude,codex`; include `gemini` to opt in Gemini CLI telemetry, `vscode` for VS Code Copilot telemetry, `devin-cli` for Devin CLI hooks, or `devin-desktop` for Devin Desktop hooks. Claude Code, Grok Build, Cursor, Factory, OpenCode, and Cline hook telemetry are managed with `beacon endpoint hooks`. GitHub Copilot CLI and Factory Droid OTLP endpoints are managed through their launch environments |+| `--harness <list>` | Comma-separated harnesses to configure. Defaults to `claude,codex`; include `gemini` to opt in Gemini CLI telemetry, `vscode` for VS Code Copilot telemetry, `devin-cli` for Devin CLI hooks, or `devin-desktop` for Devin Desktop hooks. Claude Code, Grok Build, Cursor, Factory, OpenCode, Cline, and Qwen Code hook telemetry are managed with `beacon endpoint hooks`. GitHub Copilot CLI and Factory Droid OTLP endpoints are managed through their launch environments || `--otlp-grpc-port <port>` | Local OTLP gRPC port. Defaults to `4317` || `--otlp-http-port <port>` | Local OTLP HTTP port. Defaults to `4318` || `--collector <path>` | Path to a `beacon-otelcol` binary |diff --git a/docs/cli/hooks.mdx b/docs/cli/hooks.mdxindex 4137a15f..c741cca1 100644--- a/docs/cli/hooks.mdx+++ b/docs/cli/hooks.mdx@@ -40,6 +40,7 @@ beacon endpoint hooks [command]| Hermes Agent | `~/.hermes/config.yaml` | Not supported | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || OpenCode | `~/.config/opencode/plugins/beacon.ts` | `./.opencode/plugins/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || Cline | `~/.cline/plugins/beacon.ts` | `./.cline/plugins/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` |+| Qwen Code | `~/.qwen/settings.json` | `./.qwen/settings.json` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` |In system mode, the hook binary is written under `/Library/Application Support/Beacon/Endpoint/hooks/` and the default runtime log is `/var/log/beacon-agent/runtime.jsonl`.@@ -47,7 +48,7 @@ In system mode, the hook binary is written under `/Library/Application Support/B| Flag | Description ||------|-------------|-| `--harness <list>` | Comma-separated hook harnesses, such as `antigravity`, `claude`, `cline`, `codex`, `cursor`, `devin-cli`, `devin-desktop`, `factory`, `grok`, `hermes`, `opencode`, or `antigravity,claude,cline,codex,cursor,devin-cli,devin-desktop,factory,grok,hermes,opencode`. `devin` remains a legacy alias for `devin-cli`; `hermes-agent` maps to `hermes`. Defaults to `cursor` |+| `--harness <list>` | Comma-separated hook harnesses, such as `antigravity`, `claude`, `cline`, `codex`, `cursor`, `devin-cli`, `devin-desktop`, `factory`, `grok`, `hermes`, `opencode`, `qwen`, or `antigravity,claude,cline,codex,cursor,devin-cli,devin-desktop,factory,grok,hermes,opencode,qwen`. `devin` remains a legacy alias for `devin-cli`; `hermes-agent` maps to `hermes`; `qwen-code` maps to `qwen`. Defaults to `cursor` || `--level <level>` | Hook install level: `user` or `project` || `--user` | Use per-user endpoint paths. Enabled by default || `--system` | Use system endpoint paths and launch daemon |@@ -160,6 +161,12 @@ Install Hermes Agent hooks at the user level:beacon endpoint hooks install --harness hermes```+Install Qwen Code hooks at the user level:++```bash title="Install Qwen Code hooks at the user level"+beacon endpoint hooks install --harness qwen+```+Install Grok Build hooks at the project level:```bash title="Install Grok Build hooks at the project level"@@ -168,6 +175,14 @@ beacon endpoint hooks install --harness grok --level projectProject-level Grok Build hooks require `/hooks-trust` in Grok before they execute.+Install Qwen Code hooks at the project level:++```bash title="Install Qwen Code hooks at the project level"+beacon endpoint hooks install --harness qwen --level project+```++Project-level Qwen Code hooks are only executed in a folder Qwen trusts, so a user-level install is the one that collects without further interaction.+Hermes Agent hooks support user-level config only. `beacon endpoint hooks install --harness hermes --level project` returns an error instead of writing project files.Install all supported hook integrations:@@ -178,10 +193,10 @@ beacon endpoint hooks install --allWhen `--all` is used with `--level project`, Beacon skips Hermes Agent because Hermes shell hooks are user-level only.-Install Antigravity, Claude Code, Codex CLI, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, and OpenCode hooks with the same runtime log:+Install Antigravity, Claude Code, Codex CLI, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, OpenCode, and Qwen Code hooks with the same runtime log:-```bash title="Install Antigravity, Claude Code, Codex CLI, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, and OpenCode hooks with the same runtime log"-beacon endpoint hooks install --harness antigravity,claude,codex,cursor,devin-cli,devin-desktop,factory,grok,hermes,opencode+```bash title="Install Antigravity, Claude Code, Codex CLI, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, OpenCode, and Qwen Code hooks with the same runtime log"+beacon endpoint hooks install --harness antigravity,claude,codex,cursor,devin-cli,devin-desktop,factory,grok,hermes,opencode,qwen```Use a custom runtime log:@@ -262,6 +277,12 @@ Check Hermes Agent hook status:beacon endpoint hooks status --harness hermes```+Check Qwen Code hook status:++```bash title="Check Qwen Code hook status"+beacon endpoint hooks status --harness qwen+```+Print hook status as JSON:```bash title="Print hook status as JSON"@@ -374,6 +395,12 @@ Remove user-level Hermes Agent hooks:beacon endpoint hooks uninstall --harness hermes```+Remove user-level Qwen Code hooks:++```bash title="Remove user-level Qwen Code hooks"+beacon endpoint hooks uninstall --harness qwen+```+Remove project-level Grok Build hooks:```bash title="Remove project-level Grok Build hooks"@@ -398,6 +425,21 @@ Beacon merges Hermes Agent hooks into `~/.hermes/config.yaml`. Hermes hooks areIf Hermes telemetry is missing, confirm `~/.hermes/config.yaml` contains commands with `--platform hermes`, restart Hermes, and verify hook consent. Hermes prompts for first-use consent for each `(event, command)` pair; for non-interactive gateway, cron, or CI runs, set `HERMES_ACCEPT_HOOKS=1`, start Hermes with `--accept-hooks`, or configure `hooks_auto_accept: true`.+## Qwen Code troubleshooting++Beacon merges its hooks into Qwen Code's own `settings.json` — `~/.qwen/settings.json` for user-level installs, `./.qwen/settings.json` for project-level installs. Unrelated top-level keys and non-Beacon hooks in the same event group are preserved, and a re-install replaces Beacon's own entries instead of adding a second copy. Beacon identifies its entries by the `--platform qwen` argument in the hook command, since it has no file of its own in `~/.qwen` to stamp.++Qwen Code is a Gemini CLI fork without Gemini's OpenTelemetry export, so hooks are the only collection path for this runtime. `beacon endpoint install --harness qwen` fails with a message pointing here rather than appearing to succeed.++Two Qwen-specific details are worth knowing before hand-editing the file:++- **Timeouts are milliseconds, not seconds.** Claude Code reads `timeout` as seconds, so a Claude-style `10` means 10 ms to Qwen and every tool event is killed mid-write while the install still reports success. Beacon writes millisecond values (30000 for prompt submission, 10000 for tool events, 45000 for stop); events with no entry inherit Qwen's own 60000 ms default.+- **Hooks declare `shell: bash`.** Qwen only uses bash when the hook configuration asks for it. Left unset on Windows it falls back to `cmd.exe`, which cannot parse Beacon's POSIX-quoted command, so every hook fails to start. This requires `bash` on `PATH` on Windows — the same requirement Claude Code already carries there.++If Qwen telemetry is missing, check the selected level, confirm `settings.json` contains commands with `--platform qwen`, confirm `disableAllHooks` is not set in Qwen's settings, confirm hook timeouts are millisecond values, trust the folder for a project-level install, and restart Qwen so new sessions pick up the updated settings.++Beacon's `PreToolUse` hook answers with an empty object on purpose. Qwen reads `hookSpecificOutput.permissionDecision` from that hook, where `allow` means *run the tool without the usual approval prompt* — so an observing hook that answered `allow` would silently disarm your own permission prompts. Approval telemetry comes from Qwen's `PermissionRequest` event instead.+## Codex CLI troubleshootingBeacon writes Codex CLI inventory hooks to `~/.codex/hooks.json` for user-level installs or `./.codex/hooks.json` for project-level installs. These hooks trigger inventory heartbeats on `SessionStart` and `UserPromptSubmit`; they do not replace the Codex OTLP runtime telemetry path for prompt, tool, or token events.diff --git a/docs/docs.json b/docs/docs.jsonindex 278ef041..f67ef078 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -149,6 +149,7 @@"runtimes/grok-build","runtimes/opencode","runtimes/pi",+ "runtimes/qwen-code","runtimes/vscode"]},diff --git a/docs/guides/local-testing/health.mdx b/docs/guides/local-testing/health.mdxindex df07cb9f..fae2bf1d 100644--- a/docs/guides/local-testing/health.mdx+++ b/docs/guides/local-testing/health.mdx@@ -82,7 +82,7 @@ Use discovery to compare configured and detected local runtimes before testing rbeacon endpoint discover --json```-Confirm that discovered harnesses match the local test scope. Hook-based runtimes such as Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, and OpenCode may require user or project scoped hook installation before real activity appears.+Confirm that discovered harnesses match the local test scope. Hook-based runtimes such as Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, OpenCode, and Qwen Code may require user or project scoped hook installation before real activity appears.## Key Signalsdiff --git a/docs/mdm/index.mdx b/docs/mdm/index.mdxindex 72acb405..294e3524 100644--- a/docs/mdm/index.mdx+++ b/docs/mdm/index.mdx@@ -63,7 +63,7 @@ Environment variables take precedence over MDM script parameters:| Environment variable | Default ||----------------------|---------|| `BEACON_ENDPOINT_HARNESSES` | `claude,codex` |-| `BEACON_HOOK_HARNESSES` | Optional user-context hooks such as `antigravity,claude,cline,cursor,devin,factory,grok,hermes,opencode` |+| `BEACON_HOOK_HARNESSES` | Optional user-context hooks such as `antigravity,claude,cline,cursor,devin,factory,grok,hermes,opencode,qwen` || `BEACON_OTLP_GRPC_PORT` | `4317` || `BEACON_OTLP_HTTP_PORT` | `4318` || `BEACON_COLLECTOR` | `/opt/beacon/bin/beacon-otelcol` when present |diff --git a/docs/mdm/jamf.mdx b/docs/mdm/jamf.mdxindex f8743618..0ffa77cf 100644--- a/docs/mdm/jamf.mdx+++ b/docs/mdm/jamf.mdx@@ -145,7 +145,7 @@ Suggested Smart Groups:- Runtime log writability is not `writable` or `creatable`.- Splunk HEC forwarding is `not_configured` when HEC export is required.-Use `/opt/beacon/jamf/scripts/install-cursor-hooks.sh` as a separate user-context policy for hook telemetry. Set `BEACON_HOOK_HARNESSES=antigravity,claude,cline,cursor,devin-cli,devin-desktop,factory,grok,hermes,opencode` when you want Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, and OpenCode hook integrations. Hook configuration is per user and should run only when an interactive console user is present. Gemini CLI is configured through the endpoint harness list instead; add `gemini` to Jamf parameter 4, for example `claude,codex,gemini`. GitHub Copilot CLI is MDM-managed outside the Beacon harness list; configure `COPILOT_OTEL_ENABLED=true` and `OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318` in Copilot's launch environment. OpenClaw Gateway is configured in OpenClaw, not through Jamf hook helpers.+Use `/opt/beacon/jamf/scripts/install-cursor-hooks.sh` as a separate user-context policy for hook telemetry. Set `BEACON_HOOK_HARNESSES=antigravity,claude,cline,cursor,devin-cli,devin-desktop,factory,grok,hermes,opencode,qwen` when you want Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, OpenCode, and Qwen Code hook integrations. Hook configuration is per user and should run only when an interactive console user is present. Gemini CLI is configured through the endpoint harness list instead; add `gemini` to Jamf parameter 4, for example `claude,codex,gemini`. GitHub Copilot CLI is MDM-managed outside the Beacon harness list; configure `COPILOT_OTEL_ENABLED=true` and `OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4318` in Copilot's launch environment. OpenClaw Gateway is configured in OpenClaw, not through Jamf hook helpers.For Google Cloud Storage, the package includes`/opt/beacon/jamf/claude/gcs/{install-forwarder.sh,run-forwarder.sh,repair-hooks-and-forwarder.sh}`.diff --git a/docs/runtimes/index.mdx b/docs/runtimes/index.mdxindex d17f1dfb..0be94c67 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| [Grok Build](/runtimes/grok-build) | Native hooks | Session, prompt, pre-tool, post-tool, failed tool, stop, session-end, command, and file telemetry || [OpenCode](/runtimes/opencode) | Managed plugin hooks | Chat messages, session events, command execution, permission activity, diffs, and errors || [Pi](/runtimes/pi) | Managed extension hooks | Discovery and harness attribution today; the managed extension that collects prompt, tool, command, and file telemetry is not shipped yet |+| [Qwen Code](/runtimes/qwen-code) | Native hooks | Session, prompt, pre-tool, post-tool, failed tool, permission request, subagent, stop, session-end, command, and file telemetry || [VS Code](/runtimes/vscode) | Copilot Chat OTel plus optional preview hooks | Copilot session, prompt, model, and tool activity through OTel; optional hooks for extra lifecycle and cross-agent detail |### Local Knowledge Worker Agent Harnessesdiff --git a/docs/runtimes/integration-model.mdx b/docs/runtimes/integration-model.mdxindex a9b40f75..0be77a10 100644--- a/docs/runtimes/integration-model.mdx+++ b/docs/runtimes/integration-model.mdx@@ -22,6 +22,7 @@ Beacon supports multiple [runtime surfaces](/concepts/core-concepts#runtime-surf| [OpenCode](/runtimes/opencode) | Looks for the `opencode` executable or `~/.config/opencode`, then checks the managed Beacon plugin || [Cline](/runtimes/cline) | Looks for `~/.cline`, treating a `cline` executable as an extra signal because the VS Code and JetBrains hosts ship none, then checks the managed Beacon plugin || [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` |+| [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` || [Factory Droid](/runtimes/factory-droid) | Looks for the `droid` executable and validates `OTEL_TELEMETRY_ENDPOINT` in the effective launch environment |@@ -42,7 +43,7 @@ During install, Beacon configures the runtime surfaces it can safely manage:| [GitHub Copilot CLI](/runtimes/github-copilot-cli) | Copilot's OTLP HTTP endpoint remains under MDM or customer-owned launch-environment policy. Beacon validates `COPILOT_OTEL_ENABLED=true` and a localhost OTLP endpoint but does not write Copilot configuration. || [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. |-| 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), and [OpenCode](/runtimes/opencode) hooks 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), [OpenCode](/runtimes/opencode), and [Qwen Code](/runtimes/qwen-code) hooks 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@@ -59,6 +60,7 @@ During install, Beacon configures the runtime surfaces it can safely manage:| [OpenCode](/runtimes/opencode) | Managed local plugin through `beacon-hooks` | Plugin invokes Beacon for chat, session, command, permission, diff, and error events where payloads are available. || [Cline](/runtimes/cline) | Managed local plugin through `beacon-hooks` | One plugin covers the VS Code, JetBrains, and CLI hosts; it forwards run and tool hooks for prompt, task lifecycle, tool, command, file, MCP, and token telemetry. || [Pi](/runtimes/pi) | Managed local extension through `beacon-hooks` | Pi has no hooks file and no OTLP export, so the TypeScript extension API is the only observation surface. Discovery and harness attribution ship today; the extension itself does not, so no Pi hook events are collected yet. |+| [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. || [Factory Droid](/runtimes/factory-droid) | OTLP HTTP launch environment plus optional hooks | Beacon validates Factory OTLP state but does not mutate shell profiles for Droid. |@@ -68,7 +70,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, OpenCode, 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, OpenCode, Qwen Code, and optional VS Code hooks cover activity that is better represented as runtime events than generic OTLP spans.| Runtime | Hook telemetry ||---------|----------------|@@ -83,6 +85,7 @@ Antigravity CLI, Claude Code, Cline, Cursor, Devin CLI, Devin Desktop, Factory,| [Hermes Agent](/runtimes/hermes-agent) | Session lifecycle, prompt submission, observed tool calls, post-tool command and file activity, approval request and response events, and subagent stop metadata where Hermes exposes payloads. Hermes hooks are user-level only. || [OpenCode](/runtimes/opencode) | Chat messages, session events, command execution, permission activity, diffs, and errors where payloads are available. || [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. |+| [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/qwen-code.mdx b/docs/runtimes/qwen-code.mdxnew file mode 100644index 00000000..d86180d7--- /dev/null+++ b/docs/runtimes/qwen-code.mdx@@ -0,0 +1,316 @@+---+title: "Qwen Code"+description: "Asymptote support details for Qwen Code endpoint telemetry"+---++## Runtime Overview++Asymptote supports Qwen Code through native hook payloads sent to `beacon-hooks`.++Qwen Code is a Gemini CLI fork, but it does not carry Gemini's OpenTelemetry export, so there is no+endpoint to point at the local collector and no OTLP path for this runtime. What it does expose is a+documented hook system, so the integration is hook-shaped: Asymptote merges a managed hook block into+Qwen's own `settings.json`, the same shape as the Claude Code and Factory Droid installers.++Install it with:++```bash+beacon endpoint hooks install --harness qwen+```++`--harness qwen-code` is accepted as well. `qwen-cli` is not — the product is Qwen Code.++## Prerequisites++- Qwen Code is installed and available as the `qwen` executable, or has a local config directory at `~/.qwen`.+- `beacon endpoint install` has run so shared endpoint config and runtime log paths exist.+- Qwen Code is restarted after hook install or removal so new sessions load the updated settings.+- On Windows, `bash` is on `PATH`. Asymptote's hooks declare `shell: bash`; see [Hook shell](#hook-shell).+- Project-level hooks are only executed in a folder Qwen Code trusts. See [Known gaps](#known-gaps).++## Collection path++Qwen Code resolves settings from two locations, with project settings taking precedence over user+settings:++| Level | Settings path |+|-------|---------------|+| User | `~/.qwen/settings.json` |+| Project | `./.qwen/settings.json` |++The user level is the default because a project-level install only takes effect once Qwen trusts the+folder. The user path is also the one `beacon endpoint discover` reports on, so a project-level+install is not reflected in discovery output.++`settings.json` is shared with the user's own configuration — model, theme, MCP servers, their own+hooks — so install goes through a merge rather than a rewrite. Unrelated top-level keys are preserved+verbatim, non-Asymptote hooks in the same event group survive, and a re-install replaces Asymptote's+own entries instead of stacking a second copy beside them. Asymptote identifies its own entries by+the `--platform qwen` argument in the hook command, since it has no file of its own in `~/.qwen` to+stamp.++### Registered events++Asymptote registers every Qwen event that carries endpoint signal:++| Qwen event | Adapter subcommand | Matcher | Timeout |+|------------|--------------------|---------|---------|+| `SessionStart` | `session-start` | — | Qwen default |+| `UserPromptSubmit` | `prompt-submit` | — | 30000 ms |+| `PreToolUse` | `pre-tool` | `*` | 10000 ms |+| `PostToolUse` | `post-tool` | `*` | 10000 ms |+| `PostToolUseFailure` | `post-tool` | `*` | 10000 ms |+| `PermissionRequest` | `permission-request` | `*` | 10000 ms |+| `Stop` | `stop` | — | 45000 ms |+| `SubagentStart` | `subagent-start` | — | Qwen default |+| `SubagentStop` | `subagent-stop` | — | Qwen default |+| `SessionEnd` | `session-end` | — | Qwen default |++`PostToolUseFailure` is registered alongside `PostToolUse` because a failed tool is a separate event+in Qwen and would otherwise be invisible. `PermissionRequest` is what makes an approval prompt+observable at all. Events with no timeout entry inherit Qwen's own default of 60000 ms, which is the+right answer for the ones that do no work beyond writing a line.++<Warning>+**Qwen hook timeouts are milliseconds, not seconds.** This is the one place Qwen's settings format+diverges from Claude Code's while looking identical, and it fails quietly in the direction that+hurts. Claude Code reads `timeout` as seconds, so a Claude-style `10` means 10 ms to Qwen — not+enough for a hook process to start, read stdin, resolve a git branch, and append to a JSONL file, so+every tool event would be killed mid-write. The install would report success and the settings file+would look right while the runtime log stayed empty or truncated. Asymptote writes millisecond values+for this runtime; keep the unit in mind if you hand-edit them.+</Warning>++### Hook shell++Every hook Asymptote writes for Qwen carries `shell: bash`. Qwen runs hook commands through a shell+of its choosing and documents exactly two values a hook may ask for, `bash` and `powershell`. Unlike+Claude Code, which runs hook commands through Git Bash on Windows regardless, Qwen only uses bash+when the hook configuration asks for it.++Asymptote builds its hook command with POSIX single-quoting, which is what a Windows path needs — in+double quotes, bash still expands `$` and eats a doubled backslash, so a profile directory containing+a `$` would vanish and a UNC path would lose a separator. Left unset on Windows, a Node-hosted+runtime lands on the platform default of `cmd.exe`, where those quotes are literal characters and+every hook fails to start while the install still reports success. That is the same silent-failure+shape as a seconds-valued timeout, so it gets the same care. On macOS and Linux, `bash` names the+shell that would have run anyway.++### Events that are deliberately not collected++Qwen offers several fire-and-forget events Asymptote does not register: `MessageDisplay`,+`StopFailure`, `PostCompact`, `SessionDelete`, and the todo pair. `MessageDisplay` alone fires roughly+every 200 ms for the length of every reply, and spawning a process that often to record assistant+text Asymptote does not otherwise retain would cost more than it tells anyone.++## Discovery and status++Asymptote detects Qwen Code through the `qwen` executable, treating the `~/.qwen` config directory as+an additional signal. Qwen Code installs through npm, and a version manager, a shell alias, or a+per-project install all hide the binary from the `PATH` the endpoint process inherited while+`~/.qwen` is still there. Treating that directory as evidence keeps discovery from reporting "not+detected" for a runtime someone is actively using — the same fallback the OpenCode, Cursor, Pi, and+Hermes probes make for the same reason.++```bash title="Show Qwen Code discovery state"+beacon endpoint discover --all --json+```++Qwen Code reports as the `qwen_code` harness with capability `hooks`:++| Telemetry status | Meaning |+|------------------|---------|+| `missing` | No `~/.qwen/settings.json`, or it could not be read |+| `misconfigured` | `settings.json` exists but its JSON is invalid, so install will refuse to touch it |+| `disabled` | Hooks are turned off by `disableAllHooks`, or the file exists with no Asymptote `--platform qwen` entry |+| `enabled` | Asymptote's Qwen Code hooks are configured |++Two of these are worth spelling out. A settings file carrying hooks that are not Asymptote's reports+`disabled`, not `enabled`, because reporting it as enabled would claim telemetry Asymptote is not+collecting. Invalid JSON reports `misconfigured` rather than `missing`, because install will refuse to+write to that file and "not found" would send you looking for a file that is right there.++`disableAllHooks` is Qwen's own kill switch. Asymptote's hooks can be present in the file and still+never run, and that is fixed in Qwen's settings rather than by re-running the installer.++```bash title="Show Qwen Code hook status"+beacon endpoint hooks status --harness qwen+```++## Install or configuration support++`beacon endpoint install` prepares shared endpoint config and runtime log paths. Qwen Code hooks are+installed separately, because Qwen loads them from the user's own profile rather than from a+machine-wide location:++```bash+beacon endpoint hooks install --harness qwen # user level (default)+beacon endpoint hooks install --harness qwen --level project+beacon endpoint hooks status --harness qwen+beacon endpoint hooks uninstall --harness qwen+```++A project-level install reports that Qwen Code runs project hooks only in a trusted folder, because+an install that reported plain success into an untrusted folder would be reporting something untrue:+the file is written, and nothing runs.++`beacon endpoint install` does not configure Qwen Code. Passing `--harness qwen` to it fails with a+message pointing at `beacon endpoint hooks install`, rather than silently doing nothing.++## Telemetry coverage++| Area | Support |+|------|---------|+| Runtime discovery | Supported — executable and `~/.qwen` detection, settings path, and telemetry status |+| Harness attribution | Supported — `qwen`, `qwen_code`, `qwen-code`, `qwen code`, `qwencode`, `qwen_cli`, `qwen-cli`, `qwen cli`, `qwen_coder`, `qwen-coder`, and `qwen coder` all normalize to `qwen_code` |+| Hook install, status, uninstall, and repair | Supported |+| Session lifecycle | Supported — `SessionStart` and `SessionEnd`, with the start `source` preserved |+| Prompts | Supported — `prompt.submitted` from `UserPromptSubmit` |+| Tool use | Supported — pre-tool and post-tool activity, with `tool.failed` for `PostToolUseFailure` |+| Commands | Supported — `command.executed` for `run_shell_command` |+| File activity | Supported — `file.read`, `file.modified`, and file paths with an operation, including diffs on an edit |+| Subagents | Supported — `SubagentStart` and `SubagentStop` |+| Approval decisions | Supported — observed from `PermissionRequest`, not synthesized from pre-tool |+| Tool call identity | Supported — Qwen's own `tool_use_id` / `tool_call_id` is promoted to `gen_ai.tool.call.id` as the join key between pre-tool and post-tool events |+| Token usage and cost | Not normalized — see [Known gaps](#known-gaps) |+| Local JSONL and dashboard | Supported |+| MDM deployment | Supported for the endpoint agent; Qwen hooks are installed separately in the logged-in user's context or project context |++Qwen Code's harness name is matched by equality against a closed set of spellings rather than by+substring, and the reason is specific to this runtime: every Qwen model id begins with the same four+letters the harness does — `qwen3-coder-plus`, `qwen-max`, `qwen-turbo`. A substring rule would report+any event whose harness attribute happened to carry a model string as a Qwen Code session, which is+how a model name ends up masquerading as a runtime in a dashboard grouped by `harness.name`.++Both `qwen` and `qwen_code` arrive in practice — the hook path installs with `--platform qwen`, while+an OTLP resource attribute carries whatever the runtime calls itself — and pinning both is what keeps+one session from being recorded under two names.++### Tool taxonomy++Qwen sends the Claude Code payload *shape* but not Claude's tool *names*: its built-ins are+snake_case ids inherited from the Gemini CLI it forked. Asymptote classifies them against a closed+set, matched by equality:++| Qwen built-in | Action | `file.operation` |+|---------------|--------|------------------|+| `run_shell_command` | `command.executed` | — |+| `read_file`, `read_many_files`, `list_directory`, `glob`, `grep_search`, `search_file_content` | `file.read` | `read` |+| `write_file` | `file.modified` | `create` |+| `edit`, `replace`, `notebook_edit` | `file.modified` | `modify` |++Without this mapping, the generic substring classifier is wrong in both directions that matter:+`write_file`, `edit`, `replace`, and `notebook_edit` would fall through to `tool.invoked` because the+default only recognizes Claude's `Write`/`Edit`/`MultiEdit`, and `list_directory`, `glob`, and+`grep_search` would not be recorded as reads. Both are misclassification rather than absence, which is+the worse failure: the event is there, the action is wrong, and nothing looks broken.++`read_many_files`, `search_file_content`, and `replace` are the Gemini CLI spellings that Qwen Code+renamed. They are kept because a hook installed against one version can receive payloads from another+after an upgrade; an id that no longer exists costs one dead map entry, while a missing one costs a+misclassified event.++The set is closed rather than substring-matched so that an MCP tool whose name happens to contain+`edit` or `glob` is not classified as a Qwen built-in — MCP tools are named by whoever wrote the+server. Qwen's non-filesystem built-ins (`web_fetch`, `web_search`, `todo_write`, `save_memory`,+`task`, `skill`) stay on the shared path, where the MCP rule and the `tool.invoked` fallback already+give the right answer.++A tool that failed is classified as a failure before its name is consulted, so a `write_file` that hit+`EACCES` is recorded as `tool.failed` rather than as a successful `file.modified`, and it is not sent+down the diff path. Asymptote reads three independent failure signals, because any of them can arrive+alone: the `PostToolUseFailure` event name, a non-empty `error`, and Qwen's `is_interrupt` flag for an+interrupt reported with an empty message.++## Approvals and enforcement++Approval telemetry comes from Qwen's `PermissionRequest` event and is recorded as observed — an+operator was actually asked. Asymptote does not synthesize an approval from a pre-tool notification+for this runtime.++Asymptote's `PreToolUse` hook answers with an empty object, which is a security property rather than+a convention. Qwen's `PreToolUse` contract reads a decision from+`hookSpecificOutput.permissionDecision`, where `allow` means *run the tool without the usual approval+prompt*. An observing hook that answered `allow` would therefore not be observing — it would silently+disarm the user's own permission prompts for every tool call, on a runtime where the hook was+installed to watch. An empty object carries no decision, so Qwen's normal permission flow runs+untouched.++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.+When a provider denies a call, Qwen shares Claude Code's deny shape exactly:+`hookSpecificOutput.permissionDecision` with a `permissionDecisionReason`.++## Data handling++Qwen Code content is handled the same way as every other runtime: prompts, tool arguments, commands,+paths, and diffs retained in local or customer-controlled logs, with local secret redaction and+per-string limits applied before writing, a hash and byte count on each content-bearing event, and+events over the 64 KiB limit dropping raw and retained content while preserving stable metadata and+setting `field_truncated`.++Qwen carries real signal with no endpoint-schema field of its own — `permission_mode` on every tool+event, `source` on `SessionStart`, `stop_hook_active` and the `context_usage` / `context_limit` /+`input_tokens` trio on `Stop`. The verbatim payload is preserved under `raw.qwen` rather than+inventing schema fields for one runtime. It travels the whole event's own 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++- **No OTLP path.** Qwen Code is a Gemini CLI fork without Gemini's OpenTelemetry export, so there is+ no collector endpoint to configure. Hooks are the only collection path for this runtime, and+ `beacon endpoint install --harness qwen` says so rather than appearing to succeed.+- **Token usage is not normalized.** Qwen's `Stop` payload carries `context_usage`, `context_limit`,+ and `input_tokens`, which are session-level context counters rather than per-call usage. They are+ preserved under `raw.qwen` but are not normalized into `gen_ai.usage`, so Qwen Code activity does+ not appear in `beacon token-usage` reports or the dashboard token view. Cline, OpenCode, and Pi+ report usage their runtimes expose per message.+- **A policy deny is honored in one of two phases.** The seam runs in both the `pre-tool` and+ `permission-request` hooks, and Asymptote returns Claude Code's deny shape, which Qwen's+ `PreToolUse` contract honors. Qwen's `PermissionRequest` event reads a differently shaped+ `hookSpecificOutput.decision` object, so a deny raised from that phase is not honored there. Because+ the seam fails open, the cost is a deny that does not take effect on one phase, never a tool call+ blocked for the wrong reason.+- **Assistant text is not collected.** `MessageDisplay` is deliberately not registered, so Asymptote+ records no assistant output or reasoning for Qwen Code. See+ [Events that are deliberately not collected](#events-that-are-deliberately-not-collected).+- **Project-level installs need a trusted folder.** Qwen gates project hooks behind trusted-folder+ status, so a user-level install is the one that works without further interaction. Grok Build+ carries the same caveat for the same reason.+- **Payload fixtures are built from documentation.** Asymptote's Qwen fixtures are constructed from+ Qwen Code's published hooks documentation rather than captured from a running install. The+ documentation specifies the envelope and per-event fields precisely, so the shapes are the+ documented contract — but they are not evidence that a shipped build sends exactly this. Qwen+ documents its hook input as a forward-extensible contract, so the mapper reads the fields it needs+ and ignores the rest.++## Deployment notes++Settings are read when Qwen Code starts, so an install taken while Qwen is running takes effect on its+next launch. Restart Qwen after installing or removing hooks.++Confirm discovery sees the runtime, then generate one Qwen Code event and check the log:++```bash+/opt/beacon/bin/beacon endpoint discover --all --json+/opt/beacon/bin/beacon endpoint hooks status --harness qwen+/opt/beacon/bin/beacon endpoint doctor --system+grep '"name":"qwen_code"' ~/.beacon/endpoint/logs/runtime.jsonl | tail -3+```++If Qwen telemetry is missing, check the selected level, confirm `settings.json` contains commands with+`--platform qwen`, confirm `disableAllHooks` is not set, confirm hook timeouts are millisecond values,+trust the folder for a project-level install, and restart Qwen so new sessions pick up the updated+settings.++## 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>diff --git a/docs/security/data-inventory.mdx b/docs/security/data-inventory.mdxindex 7ed3fb67..4eff37e8 100644--- a/docs/security/data-inventory.mdx+++ b/docs/security/data-inventory.mdx@@ -17,6 +17,7 @@ Beacon writes normalized endpoint events only when supported runtimes provide te| Grok Build | Native hooks | Session, prompt, pre-tool, post-tool, failed tool, stop, session-end, command, and file telemetry || OpenCode | Managed plugin hooks | Prompts, assistant text/reasoning, model and usage metadata, tool inputs/results/failures, commands and output, file activity/diffs, web/MCP calls, approvals, and session lifecycle/errors || Cline | Managed plugin hooks | Prompts, model and task usage metadata, tool inputs/results/failures, commands and output, file activity/diffs, MCP calls, and task lifecycle/errors |+| Qwen Code | Native hooks | Session, prompt, pre-tool, post-tool, failed tool, permission request/approval, subagent, stop, session-end, command, and file telemetry; the verbatim hook payload is retained under `raw.qwen` || Devin CLI | Native hooks | Session, prompt, pre-tool, post-tool, permission request, stop, session-end, approval, and file telemetry || Devin Desktop | Cascade/Windsurf hooks | Prompt, command, MCP tool, file read, and file write telemetry where Desktop exposes Cascade hook payloads || Factory Droid | OTLP HTTP plus optional hooks | Session, prompt, write/edit/create tool use, stop, session-end, and available OTLP telemetry |diff --git a/docs/security/endpoint-operations.mdx b/docs/security/endpoint-operations.mdxindex 29572ad2..49945722 100644--- a/docs/security/endpoint-operations.mdx+++ b/docs/security/endpoint-operations.mdx@@ -51,6 +51,7 @@ System endpoint install creates root-managed runtime state:| Devin Desktop | `~/.codeium/windsurf/hooks.json` | `./.windsurf/hooks.json` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || Factory Droid | `~/.factory/settings.json` | `./.factory/settings.json` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || Grok Build | `~/.grok/hooks/beacon-endpoint.json` | `./.grok/hooks/beacon-endpoint.json` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` |+| Qwen Code | `~/.qwen/settings.json` | `./.qwen/settings.json` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || OpenCode | `~/.config/opencode/plugins/beacon.ts` | `./.opencode/plugins/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` || Cline | `~/.cline/plugins/beacon.ts` | `./.cline/plugins/beacon.ts` | `~/.beacon/endpoint/hooks/beacon-hooks` | `~/.beacon/endpoint/logs/runtime.jsonl` |diff --git a/docs/telemetry-schema/normalization.mdx b/docs/telemetry-schema/normalization.mdxindex e2d8286b..e4d559fe 100644--- a/docs/telemetry-schema/normalization.mdx+++ b/docs/telemetry-schema/normalization.mdx@@ -98,7 +98,7 @@ Every event carries two identity fields, and both are filled on the hook path an`gen_ai.tool.call.id` is the runtime's own name for one tool invocation, read from whicheverattribute that runtime uses: Claude Code writes `tool_use_id`, Codex and OpenCode write `call_id`,-Cline writes `callId`. It is what links a tool call to its result, an approval to the execution it+Cline writes `callId`, and Qwen Code writes `tool_use_id` or `tool_call_id`. It is what links a tool call to its result, an approval to the execution itapproved, and a hook event to the OTLP event describing the same action. Where two events shareone, they describe one call, and the writer records that call once rather than twice.