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 fx coverage and its limits
Claude57a92193f7ad
diff --git a/CLAUDE.md b/CLAUDE.mdindex 2dc8d5a0..97d2feff 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -34,6 +34,7 @@ Supported runtime surfaces today:- Cursor hook telemetry for sessions, prompt submission, tool use, command execution, MCP-like tool activity, approval decisions, file edits, and agent reasoning (`afterAgentThought` thinking text recorded as `agent.reasoning` events in the OTel GenAI `gen_ai.output.messages` reasoning-part shape) where hook payloads expose those fields.- 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.+- 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.- `beaconjson` OpenTelemetry Collector exporter that converts OTLP logs, traces, metrics, and resource attributes into Beacon endpoint JSONL.@@ -134,6 +135,14 @@ npx playwright install chromium # one-timenpm test # builds dist/, runs the replay e2e```+Collect fx session telemetry during manual testing:++```bash+cd cli/beacon+go run . endpoint fx status # sessions fx has written and how much Beacon has read+go run . endpoint fx sync --print # map records to events without writing anything+```+Run the local dashboard during manual testing:```bash@@ -416,6 +425,7 @@ unpacked through Chrome's developer mode.- For macOS-only behavior, gate tests with `runtime.GOOS == "darwin"` or assert the non-Darwin contract explicitly.- Keep endpoint event schema fields stable: `vendor`, `product`, `schema_version`, required event fields, and Wazuh-compatible JSONL output are release contracts.- Preserve optional event fields for agent-native metadata (`session`, `trace`, `tool`, `file`, `command`, `mcp`, `approval`, `content`, `model`, `repository`, and `branch`) without changing existing required field semantics.+- Reading a runtime's own on-disk session store is a `poll` collection path, not a new method: it is a pull that sees committed records after the fact, which is what `poll` means. fx is the case that exercises it (`cli/beacon/internal/fxsession`); a future runtime with the same shape uses `poll` too rather than adding a fifth value to a release-contract field.- Set the provenance markers on every new collection path. `harness.collection_method` (`hook`, `otlp`, `plugin`, `poll`) records the mechanism; `event.fidelity` (`observed`, `inferred`) records whether the source named the action or Beacon derived it. Both are defined in `pkg/asymptoteobserve/provenance.go` and are the only sanctioned way to express that difference — do not add per-runtime confidence fields, and do not leave a derived action unmarked. A new plugin-shaped runtime must be added to `CollectionMethodForPlatform`, whose default is `hook`. An action synthesized from an adjacent observation, such as an approval built from a pre-tool notification on a runtime with no approval hook, is `inferred`.- Keep event identity derivable rather than asserted. `gen_ai.tool.call.id` carries the runtime's own name for one tool invocation, promoted on every capture path from the shared alias list in `pkg/asymptoteobserve.ToolCallIDKeys`; a new runtime adds its spelling there rather than in a mapper. `event.id` is a deterministic UUID derived by `EventIDForLine` from the event about to be written, so both capture paths name one action the same way. Its namespace constant and derivation are a contract: changing either renames every event ID Beacon has written, and a test pins the value.- Keep `gen_ai.usage` as the single canonical token-usage representation: normalize all runtime token telemetry (span attributes, metric datapoints, legacy `llm.usage.*` aliases) into it, mirror OTel GenAI semconv JSON names exactly, and never add parallel or per-harness token fields. `gen_ai.usage.cost_usd` carries runtime-reported cost only; do not derive cost from local pricing tables.diff --git a/README.md b/README.mdindex c2531f26..e54d22ad 100644--- a/README.md+++ b/README.md@@ -87,6 +87,7 @@ CI, and cloud surfaces.| [Devin CLI](https://docs.asymptotelabs.ai/cli/supported-runtimes-devin) | Native hooks | Session, prompt, pre-tool, post-tool, permission request, stop, session-end, approval, and file telemetry || [Devin Desktop](https://docs.asymptotelabs.ai/cli/supported-runtimes-devin-desktop) | Cascade/Windsurf hooks | Prompt, command, MCP tool, file read, and file write telemetry where Desktop exposes Cascade hook payloads || [Factory Droid](https://docs.asymptotelabs.ai/cli/supported-runtimes-factory-droid) | OTLP HTTP plus optional hooks | Session, prompt, write/edit/create tool use, stop, session-end, and available OTLP telemetry |+| [fx (Vercel Labs)](https://github.com/vercel-labs/fx) | Session-log collection through `beacon endpoint fx sync` | Session start, prompts, tool calls with arguments, 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 || [Gemini CLI](https://docs.asymptotelabs.ai/cli/supported-runtimes-gemini-cli) | Opt-in local OTLP | Prompts, tool calls, MCP activity, file operations, and approval-related events emitted through OTLP || [GitHub Copilot CLI](https://docs.asymptotelabs.ai/cli/supported-runtimes-github-copilot-cli) | MDM-managed OTLP HTTP | Prompt, session, tool, and approval-like activity emitted through Copilot CLI spans || [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 |@@ -95,6 +96,31 @@ CI, and cloud surfaces.| [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 |+fx is the one supported runtime with no third-party observation surface: its lifecycle hooks are+compiled into the binary, it ships no OpenTelemetry export, and MCP describes the tools it calls+rather than what it did. What it does have is a durable, append-only record of every session under+`~/.fx/sessions/`, so Beacon reads that:++```bash+beacon endpoint fx status # fx sessions on this machine and how much has been collected+beacon endpoint fx sync --print # show what would be collected, writing nothing+beacon endpoint fx sync # read new records into the runtime log+beacon endpoint fx sync --watch # keep reading on an interval+```++Every fx event carries `harness.collection_method=poll`, and that marker is the honest limit of this+integration. Beacon reads what a turn did after fx committed it, so nothing here can hold, deny, or+delay a tool call the way a hook can, and activity appears in the log a turn late rather than+live. What the records do carry is fx's own account of what happened -- the tool, the call id, the+file, the exit code, the diff -- so the events are `event.fidelity=observed` rather than inferred.++Two things fx does not record, and Beacon does not invent: there is no per-call approve/deny+decision (fx keeps the feedback a person typed at a permission prompt, which Beacon records as+evidence rather than as an approval event), and there is no session-end record, since fx sessions+are resumable. One gap is worth knowing about: fx compacts a long session's log by folding older+turns into an opaque blob, so a turn committed after the last sweep and before a compaction is not+recoverable. Sweeping on a schedule keeps that window small.+##### Knowledge Worker Agent Harnesses| Agent harness | Collection path | Telemetry coverage |diff --git a/pkg/asymptoteobserve/provenance.go b/pkg/asymptoteobserve/provenance.goindex 81da922a..48d34106 100644--- a/pkg/asymptoteobserve/provenance.go+++ b/pkg/asymptoteobserve/provenance.go@@ -35,8 +35,11 @@ const (// because Beacon ships and versions the plugin source, so its coverage is Beacon's to fix// rather than the vendor's to expose.CollectionMethodPlugin = "plugin"- // CollectionMethodPoll is a periodic pull from a runtime's API, where Beacon sees whatever- // the API returns after the fact rather than observing the agent as it works.+ // CollectionMethodPoll is a periodic pull from a source the runtime maintains -- its API, or+ // the session store it commits to disk -- where Beacon sees whatever that source holds after+ // the fact rather than observing the agent as it works. The Devin sessions API and fx's+ // ~/.fx/sessions log are both this: different transports, the same posture, and the same thing+ // a consumer needs to know, which is that nothing on this path could have been intercepted.CollectionMethodPoll = "poll")