Skip to content

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

deprecate content retention

Justin D'Souza8a63154dd6fb
diff --git a/CLAUDE.md b/CLAUDE.md
index f569e064..11817e49 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -20,7 +20,7 @@ Do not recreate or depend on removed `asymptote` mirror trees. Keep new work foc
- Do not add dependency vulnerability scanning, OSV/GHSA lookups, package remediation, or other vulnerability-enforcement flows to the public hook path.
- Do not add broad runtime enforcement unless explicitly requested. Current control behavior is limited to hook-native approvals/denials exposed by supported agent runtimes.
- Keep direct destination support scoped to local JSONL/Wazuh unless explicitly requested. Elastic support is a file-tailing pack over local JSONL; Beacon itself must not store Elastic credentials or require a hosted Elastic dependency.
-- Default content retention is `full`: configured prompt text, command output, raw tool inputs, raw OTLP attributes, and raw diffs may be written to local or customer-controlled logs, still subject to local redaction and size limits where supported. Keep `metadata` and `redacted` modes available for stricter deployments.
+- Beacon writes retained prompt text, command output, raw tool inputs, raw OTLP attributes, and raw diffs to local or customer-controlled logs, subject to local redaction and size limits where supported.
## Telemetry Scope
@@ -208,7 +208,7 @@ git worktree remove --force .tmp/release-<tag>
- 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`, `tool`, `file`, `command`, `mcp`, `approval`, `content`, `model`, `repository`, and `branch`) without changing existing required field semantics.
-- When adding a new signal, include stable identifiers/counts/hashes alongside any retained raw content, and route raw fields through the configured content retention mode.
+- When adding a new signal, include stable identifiers/counts/hashes alongside any retained raw content, and route raw fields through redaction, sanitization, truncation, and event-size controls.
- Keep the dashboard read-only. It should inspect local status and JSONL events but must not mutate endpoint configuration or telemetry.
- Keep the release readiness guidance in `README.md` up to date when install, packaging, collector, or dashboard behavior changes.
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 81078675..bd8de8be 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -145,8 +145,8 @@ explain why.
- **Protect event contracts:** Keep `vendor`, `product`, `schema_version`,
required event fields, and Wazuh-compatible JSONL output stable. When adding a
new signal, include stable identifiers, counts, or hashes alongside retained
- raw content, and route raw fields through the configured content retention and
- redaction behavior.
+ raw content, and route raw fields through redaction, sanitization, truncation,
+ and event-size controls.
- **Keep the dashboard read-only:** It should inspect local status and JSONL
events, not mutate endpoint configuration or telemetry.
- **Write deterministic tests:** Prefer `t.TempDir()`, `t.Setenv("HOME", ...)`,
diff --git a/SECURITY.md b/SECURITY.md
index d870538c..28d79218 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -13,7 +13,7 @@ For the full enterprise review package, see the
| Area | Default behavior |
| --- | --- |
| Collection | Local OpenTelemetry receivers on `127.0.0.1` or local `beacon-hooks` adapter execution |
-| Content retention | Configurable as `metadata`, `redacted`, or `full` |
+| Content handling | Retained local telemetry is subject to secret redaction, sanitization, truncation, and event-size limits |
| Forwarding | Optional and customer configured |
| Hosted dependency | None required for normal endpoint collection or hook execution |
| Removal | Endpoint uninstall removes managed service and configuration files, with explicit flags to keep logs or config |
@@ -34,20 +34,20 @@ Read the full
Beacon writes normalized endpoint events only when a supported runtime provides
telemetry through a configured local surface. Required event fields identify the
event, endpoint, and harness; optional entities add session, tool, command,
-file, approval, MCP-like, prompt, content, destination, and health context when
-available and allowed by retention settings.
+file, approval, MCP-like, prompt, destination, and health context when
+available.
Review the full
[data inventory](https://docs.asymptotelabs.ai/cli/security-review-data-inventory).
-## Retention and Redaction
+## Redaction and Size Limits
-Content retention controls how much prompt text, command output, raw attributes,
-tool input, and diff content Beacon can write to local JSONL. Use `metadata` to
-exclude retained content, `redacted` to apply local redaction and size limits, or
-`full` only when full local or customer-controlled content capture is approved.
+Beacon may write prompt text, command output, raw attributes, tool input, and
+diff content to local JSONL. Secret redaction, sanitization, truncation, and
+event-size limits are applied before events are written or forwarded through
+supported customer-managed destinations.
-Compare the retention modes in
+Review the controls in
[retention and redaction](https://docs.asymptotelabs.ai/cli/security-review-retention-redaction).
## Endpoint Operations
diff --git a/action.yml b/action.yml
index f5047b08..31836716 100644
--- a/action.yml
+++ b/action.yml
@@ -25,10 +25,6 @@ inputs:
beacon-otelcol collector must sit beside it.
required: false
default: ""
- content-retention:
- description: "Content retention mode: full, metadata, or redacted."
- required: false
- default: "full"
min-events:
description: "Minimum Beacon events required for telemetry validation to pass."
required: false
@@ -145,7 +141,6 @@ runs:
env:
BEACON_BIN: ${{ steps.resolve.outputs.beacon-bin }}
INPUT_COMMAND: ${{ inputs.command }}
- INPUT_CONTENT_RETENTION: ${{ inputs.content-retention }}
INPUT_MIN_EVENTS: ${{ inputs.min-events }}
INPUT_REQUIRE_TELEMETRY: ${{ inputs.require-telemetry }}
INPUT_FORWARD: ${{ inputs.forward }}
@@ -161,7 +156,6 @@ runs:
args=(ci exec
--log-path "${log_path}"
- --content-retention "${INPUT_CONTENT_RETENTION}"
--min-events "${INPUT_MIN_EVENTS}"
"--require-telemetry=${INPUT_REQUIRE_TELEMETRY}"
)
diff --git a/beacon-release-validation-runbook.md b/beacon-release-validation-runbook.md
index 0dfd81eb..7ef1c1c1 100644
--- a/beacon-release-validation-runbook.md
+++ b/beacon-release-validation-runbook.md
@@ -178,7 +178,7 @@ Acceptance criteria:
- Hook status reports Cursor installed.
- The user confirms the prompt was submitted, or the optional headless command exits successfully.
-- Runtime log contains a Cursor prompt event with the marker when content retention is `full`.
+- Runtime log contains a Cursor prompt event with the marker.
- Event has stable Beacon fields including `vendor`, `product`, `schema_version`, `event`, timestamp, and a Cursor/session context where available.
- Cursor remains usable if hook telemetry fails; if the prompt succeeds but no event appears, record this as an integration or hook-coverage finding.
@@ -223,7 +223,7 @@ Acceptance criteria:
- The user confirms the prompt was submitted, or the optional headless command exits successfully.
- Runtime log receives Claude OTLP-derived events.
-- Prompt content appears only when retention mode permits it.
+- Prompt content appears when emitted by the configured Claude telemetry surface.
- If no events appear, status output makes collector/log path issues diagnosable.
Repo areas to research later:
@@ -266,7 +266,7 @@ Acceptance criteria:
- The user confirms the prompt was submitted, or the optional noninteractive command exits successfully.
- Runtime log receives Codex OTLP-derived events.
-- Prompt text behavior matches docs: Beacon config disables Codex prompt logging by default, so absence of raw prompt text may be expected, but agent activity events should still appear.
+- Prompt text appears when emitted by Codex; agent activity events should still appear if raw prompt text is absent.
- Noisy internal transport spans should not dominate the log.
Repo areas to research later:
@@ -312,7 +312,7 @@ Acceptance criteria:
- `~/.gemini/settings.json` contains Beacon-managed local OTLP telemetry settings with `target` set to `local`, `otlpProtocol` set to `grpc`, `useCollector` set to `true`, and no `outfile`.
- The user confirms the prompt was submitted, or the optional noninteractive command exits successfully.
- Runtime log receives Gemini OTLP-derived events with `harness.name=gemini_cli`.
-- Prompt content appears only when retention mode permits it.
+- Prompt content appears when emitted by Gemini.
- If no events appear, check for project Gemini settings or `GEMINI_TELEMETRY_*` environment variables overriding the user settings.
Repo areas to research later:
@@ -358,7 +358,7 @@ Acceptance criteria:
- Hook status reports OpenCode plugin installed.
- The user confirms the prompt was submitted, or the optional noninteractive command exits successfully.
-- Runtime log contains OpenCode chat/session activity with the marker when content retention is `full`.
+- Runtime log contains OpenCode chat/session activity with the marker.
- OpenCode remains usable if Beacon hook execution fails; if the prompt succeeds but no event appears, record this as an integration or hook-coverage finding.
Repo areas to research later:
@@ -411,7 +411,7 @@ After all tests, review `beacon-installation-notes.md` and group findings:
- Docs fixes: docs command, prerequisite, expected-output, broken-link, or troubleshooting updates.
- CLI fixes: command flags, status clarity, install/repair behavior, error messages, or path mismatch.
-- Hook fixes: Cursor/OpenCode install/status, hook payload parsing, runtime resilience, or content retention.
+- Hook fixes: Cursor/OpenCode install/status, hook payload parsing, runtime resilience, or event content handling.
- Exporter fixes: Claude/Codex OTLP normalization, filtering, field mapping, or event schema consistency.
- Elastic fixes: generated pack, Docker Compose stack, Filebeat config, index templates, ingest pipeline, Kibana assets, or docs.
diff --git a/cli/beacon-hooks/cmd/endpoint_events.go b/cli/beacon-hooks/cmd/endpoint_events.go
index 19a44718..9cac2c67 100644
--- a/cli/beacon-hooks/cmd/endpoint_events.go
+++ b/cli/beacon-hooks/cmd/endpoint_events.go
@@ -7,7 +7,6 @@ import (
"path/filepath"
"strings"
- "github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/config"
"github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/logging"
)
@@ -97,9 +96,7 @@ func diffFields(filePath, diffStr string) map[string]interface{} {
sum := sha256.Sum256([]byte(diffStr))
file["diff_hash"] = hex.EncodeToString(sum[:])
file["diff_bytes"] = len(diffStr)
- if config.ContentRetentionMode() != config.ContentRetentionMetadata {
- file["diff"] = diffStr
- }
+ file["diff"] = diffStr
}
return map[string]interface{}{"file": file}
}
diff --git a/cli/beacon-hooks/cmd/grok_hooks_test.go b/cli/beacon-hooks/cmd/grok_hooks_test.go
index 1f83e4b7..4feda6f3 100644
--- a/cli/beacon-hooks/cmd/grok_hooks_test.go
+++ b/cli/beacon-hooks/cmd/grok_hooks_test.go
@@ -40,7 +40,7 @@ func TestGrokPromptSubmitRecordsPromptAndRawPayload(t *testing.T) {
}
}
-func TestGrokMetadataRetentionOmitsPromptAndRawPayload(t *testing.T) {
+func TestGrokIgnoresLegacyRetentionEnv(t *testing.T) {
setupHookConfigDirs(t)
platformFlag = "grok"
logPath := filepath.Join(t.TempDir(), "runtime.jsonl")
@@ -54,12 +54,15 @@ func TestGrokMetadataRetentionOmitsPromptAndRawPayload(t *testing.T) {
"prompt": "secret prompt",
})
event := lastEndpointEvent(t, logPath)
- if _, ok := event["prompt"]; ok {
- t.Fatalf("metadata retention should omit prompt: %#v", event["prompt"])
+ if got := event["prompt"].(map[string]interface{})["text"]; got != "secret prompt" {
+ t.Fatalf("prompt.text = %q, want legacy retention env ignored", got)
}
raw := event["raw"].(map[string]interface{})
- if _, ok := raw["grok"]; ok {
- t.Fatalf("metadata retention should omit raw grok payload: %#v", raw)
+ if _, ok := raw["grok"]; !ok {
+ t.Fatalf("legacy retention env should not omit raw grok payload: %#v", raw)
+ }
+ if _, ok := event["content"]; ok {
+ t.Fatalf("legacy retention env should not emit content marker: %#v", event["content"])
}
}
diff --git a/cli/beacon-hooks/cmd/opencode_event.go b/cli/beacon-hooks/cmd/opencode_event.go
index 82ca93c8..17b7a100 100644
--- a/cli/beacon-hooks/cmd/opencode_event.go
+++ b/cli/beacon-hooks/cmd/opencode_event.go
@@ -5,7 +5,6 @@ import (
"github.com/spf13/cobra"
- "github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/config"
"github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/logging"
)
@@ -54,10 +53,8 @@ func opencodeEndpointEvent(input map[string]interface{}, sessionID string) (stri
switch eventType {
case "chat.message":
- if config.ContentRetentionMode() != config.ContentRetentionMetadata {
- if prompt := opencodePromptText(input); prompt != "" {
- fields["prompt"] = map[string]interface{}{"text": prompt}
- }
+ if prompt := opencodePromptText(input); prompt != "" {
+ fields["prompt"] = map[string]interface{}{"text": prompt}
}
return "prompt.submitted", "prompt", "info", "Prompt submitted to opencode", fields
case "session.created":
diff --git a/cli/beacon-hooks/cmd/opencode_event_test.go b/cli/beacon-hooks/cmd/opencode_event_test.go
index aa338375..c91a8315 100644
--- a/cli/beacon-hooks/cmd/opencode_event_test.go
+++ b/cli/beacon-hooks/cmd/opencode_event_test.go
@@ -63,7 +63,7 @@ func TestOpenCodeEventFixtureRecordsPrompt(t *testing.T) {
}
}
-func TestOpenCodeEventMetadataOmitsPromptAndRawPayload(t *testing.T) {
+func TestOpenCodeEventIgnoresLegacyRetentionEnv(t *testing.T) {
setupHookConfigDirs(t)
platformFlag = "opencode"
logPath := filepath.Join(t.TempDir(), "runtime.jsonl")
@@ -81,12 +81,15 @@ func TestOpenCodeEventMetadataOmitsPromptAndRawPayload(t *testing.T) {
},
})
event := lastEndpointEvent(t, logPath)
- if _, ok := event["prompt"]; ok {
- t.Fatalf("metadata retention should omit prompt: %#v", event["prompt"])
+ if got := event["prompt"].(map[string]interface{})["text"]; got != "secret prompt" {
+ t.Fatalf("prompt.text = %q, want legacy retention env ignored", got)
}
raw := event["raw"].(map[string]interface{})
- if _, ok := raw["opencode"]; ok {
- t.Fatalf("metadata retention should omit raw opencode payload: %#v", raw)
+ if _, ok := raw["opencode"]; !ok {
+ t.Fatalf("legacy retention env should not omit raw opencode payload: %#v", raw)
+ }
+ if _, ok := event["content"]; ok {
+ t.Fatalf("legacy retention env should not emit content marker: %#v", event["content"])
}
}
diff --git a/cli/beacon-hooks/cmd/post_tool.go b/cli/beacon-hooks/cmd/post_tool.go
index 659fb93d..2096a96e 100644
--- a/cli/beacon-hooks/cmd/post_tool.go
+++ b/cli/beacon-hooks/cmd/post_tool.go
@@ -15,7 +15,7 @@ var postToolCmd = &cobra.Command{
Use: "post-tool",
Short: "Record file-edit telemetry",
Long: `PostToolUse hook - triggered after Write, Edit, or MultiEdit operations.
-The public Beacon build writes local endpoint telemetry using the configured content retention mode.`,
+The public Beacon build writes local endpoint telemetry with local redaction and size limits.`,
Run: runPostTool,
}
diff --git a/cli/beacon-hooks/cmd/pre_tool.go b/cli/beacon-hooks/cmd/pre_tool.go
index 1408a2f6..c9963ca0 100644
--- a/cli/beacon-hooks/cmd/pre_tool.go
+++ b/cli/beacon-hooks/cmd/pre_tool.go
@@ -9,7 +9,6 @@ import (
"github.com/spf13/cobra"
- "github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/config"
"github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/logging"
"github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/state"
)
@@ -107,9 +106,7 @@ func emitAntigravityPromptFromTranscript(logger *logging.Logger, input map[strin
return
}
fields := sessionFields(sessionID, input)
- if config.ContentRetentionMode() != config.ContentRetentionMetadata {
- fields["prompt"] = map[string]interface{}{"text": prompt}
- }
+ fields["prompt"] = map[string]interface{}{"text": prompt}
emitHookEvent(logger, "prompt.submitted", "prompt", "info", "Prompt submitted to agent", input, fields)
if err := st.SetPromptEmitted(); err != nil {
logger.Warn("Failed to persist prompt state", "error", err.Error())
diff --git a/cli/beacon-hooks/cmd/pre_tool_test.go b/cli/beacon-hooks/cmd/pre_tool_test.go
index 0772f6f7..9d69e2a1 100644
--- a/cli/beacon-hooks/cmd/pre_tool_test.go
+++ b/cli/beacon-hooks/cmd/pre_tool_test.go
@@ -86,7 +86,7 @@ func TestVSCodeHooksEmitLowNoiseTelemetry(t *testing.T) {
t.Fatalf("raw.vscode missing: %#v", event["raw"])
}
if _, ok := event["prompt"]; ok {
- t.Fatalf("metadata retention should omit prompt: %#v", event["prompt"])
+ t.Fatalf("tool invocation should not include prompt: %#v", event["prompt"])
}
}
@@ -207,7 +207,7 @@ func TestRunPromptSubmitEmitsAntigravityUserPromptEvent(t *testing.T) {
}
}
-func TestRunPromptSubmitOmitsAntigravityPromptForMetadataRetention(t *testing.T) {
+func TestRunPromptSubmitIgnoresLegacyRetentionEnvForAntigravity(t *testing.T) {
setupHookConfigDirs(t)
platformFlag = "antigravity"
logPath := filepath.Join(t.TempDir(), "runtime.jsonl")
@@ -223,8 +223,8 @@ func TestRunPromptSubmitOmitsAntigravityPromptForMetadataRetention(t *testing.T)
}
event := lastEndpointEvent(t, logPath)
- if _, ok := event["prompt"]; ok {
- t.Fatalf("metadata retention should omit prompt field: %#v", event["prompt"])
+ if got := event["prompt"].(map[string]interface{})["text"]; got != "summarize this file" {
+ t.Fatalf("prompt.text = %q, want legacy retention env ignored", got)
}
}
@@ -320,7 +320,7 @@ func TestRunPromptSubmitEmitsDevinDesktopPromptWithDesktopHarness(t *testing.T)
}
}
-func TestRunPromptSubmitOmitsDevinDesktopPromptForMetadataRetention(t *testing.T) {
+func TestRunPromptSubmitIgnoresLegacyRetentionEnvForDevinDesktop(t *testing.T) {
setupHookConfigDirs(t)
platformFlag = "devin-desktop"
logPath := filepath.Join(t.TempDir(), "runtime.jsonl")
@@ -339,12 +339,11 @@ func TestRunPromptSubmitOmitsDevinDesktopPromptForMetadataRetention(t *testing.T
}
event := lastEndpointEvent(t, logPath)
- if _, ok := event["prompt"]; ok {
- t.Fatalf("metadata retention should omit prompt: %#v", event["prompt"])
+ if got := event["prompt"].(map[string]interface{})["text"]; got != "summarize token=[REDACTED]" {
+ t.Fatalf("prompt.text = %q, want redacted prompt", got)
}
- content := event["content"].(map[string]interface{})
- if content["included"] != false {
- t.Fatalf("content = %#v, want included=false", content)
+ if _, ok := event["content"]; ok {
+ t.Fatalf("legacy retention env should not emit content marker: %#v", event["content"])
}
}
@@ -678,7 +677,7 @@ func TestRunPromptSubmitEmitsTypedPromptForFullRetention(t *testing.T) {
}
}
-func TestRunPromptSubmitOmitsPromptForMetadataRetention(t *testing.T) {
+func TestRunPromptSubmitIgnoresLegacyRetentionEnv(t *testing.T) {
setupHookConfigDirs(t)
platformFlag = "cursor"
logPath := filepath.Join(t.TempDir(), "runtime.jsonl")
@@ -694,8 +693,11 @@ func TestRunPromptSubmitOmitsPromptForMetadataRetention(t *testing.T) {
}
event := lastEndpointEvent(t, logPath)
- if _, ok := event["prompt"]; ok {
- t.Fatalf("metadata retention should omit prompt field: %#v", event["prompt"])
+ if got := event["prompt"].(map[string]interface{})["text"]; got != "summarize this file" {
+ t.Fatalf("prompt.text = %q, want legacy retention env ignored", got)
+ }
+ if _, ok := event["content"]; ok {
+ t.Fatalf("legacy retention env should not emit content marker: %#v", event["content"])
}
}
diff --git a/cli/beacon-hooks/cmd/prompt_submit.go b/cli/beacon-hooks/cmd/prompt_submit.go
index f410fabb..95542594 100644
--- a/cli/beacon-hooks/cmd/prompt_submit.go
+++ b/cli/beacon-hooks/cmd/prompt_submit.go
@@ -3,7 +3,6 @@ package cmd
import (
"github.com/spf13/cobra"
- "github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/config"
"github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/logging"
"github.com/asymptote-labs/agent-beacon/cli/beacon-hooks/internal/state"
)
@@ -53,7 +52,7 @@ func runPromptSubmit(cmd *cobra.Command, args []string) {
prompt = cascadePrompt(input)
}
hasPrompt := prompt != ""
- if hasPrompt && config.ContentRetentionMode() != config.ContentRetentionMetadata {
+ if hasPrompt {
fields["prompt"] = map[string]interface{}{"text": prompt}
}
emitHookEvent(logger, "prompt.submitted", "prompt", "info", "Prompt submitted to agent", input, fields)
diff --git a/cli/beacon-hooks/internal/config/config.go b/cli/beacon-hooks/internal/config/config.go
index 86eb9fac..ed8ee43e 100644
--- a/cli/beacon-hooks/internal/config/config.go
+++ b/cli/beacon-hooks/internal/config/config.go
@@ -1,7 +1,6 @@
package config
import (
- "encoding/json"
"fmt"
"os"
"path/filepath"
@@ -30,16 +29,6 @@ const (
LogRotateArchives = 5
)
-type ContentRetention string
-
-const (
- ContentRetentionMetadata ContentRetention = "metadata"
- ContentRetentionRedacted ContentRetention = "redacted"
- ContentRetentionFull ContentRetention = "full"
-)
-
-var SystemEndpointConfigPath = "/Library/Application Support/Beacon/Endpoint/config.json"
-
// Scannable extensions
var scannableExtensions = map[string]bool{
// JavaScript/TypeScript
@@ -195,52 +184,3 @@ func removeOverflowArchives(path string, archives int) error {
func EnsureStateDir(platform string) error {
return os.MkdirAll(GetStateDir(platform), 0755)
}
-
-func ContentRetentionMode() ContentRetention {
- if mode, ok := parseContentRetention(os.Getenv("BEACON_CONTENT_RETENTION")); ok {
- return mode
- }
- for _, endpointPath := range endpointConfigPaths() {
- data, err := os.ReadFile(endpointPath)
- if err != nil {
- continue
- }
- var cfg map[string]interface{}
- if err := json.Unmarshal(data, &cfg); err != nil {
- continue
- }
- if mode, ok := parseContentRetention(cfg["content_retention"]); ok {
- return mode
- }
- }
- return ContentRetentionFull
-}
-
-func endpointConfigPaths() []string {
- if endpointPath := os.Getenv("BEACON_ENDPOINT_CONFIG"); endpointPath != "" {
- return []string{endpointPath}
- }
- userPath := filepath.Join(BeaconDir, "endpoint", "config.json")
- if usesSystemEndpointLog(os.Getenv("BEACON_ENDPOINT_LOG")) {
- return []string{SystemEndpointConfigPath, userPath}
- }
- return []string{userPath, SystemEndpointConfigPath}
-}
-
-func usesSystemEndpointLog(path string) bool {
- return strings.HasPrefix(path, "/var/log/") || strings.HasPrefix(path, "/Library/")
-}
-
-func parseContentRetention(value interface{}) (ContentRetention, bool) {
- mode, _ := value.(string)
- switch ContentRetention(mode) {
- case ContentRetentionMetadata:
- return ContentRetentionMetadata, true
- case ContentRetentionRedacted:
- return ContentRetentionRedacted, true
- case ContentRetentionFull:
- return ContentRetentionFull, true
- default:
- return ContentRetentionFull, false
- }
-}
diff --git a/cli/beacon-hooks/internal/config/config_test.go b/cli/beacon-hooks/internal/config/config_test.go
index 59523df6..15c94960 100644
--- a/cli/beacon-hooks/internal/config/config_test.go
+++ b/cli/beacon-hooks/internal/config/config_test.go
@@ -110,72 +110,6 @@ func TestCursorDirPath(t *testing.T) {
}
}
-func TestContentRetentionModeReadsExplicitEndpointConfig(t *testing.T) {
- path := filepath.Join(t.TempDir(), "config.json")
- if err := os.WriteFile(path, []byte(`{"content_retention":"full"}`), 0644); err != nil {
- t.Fatalf("write endpoint config: %v", err)
- }
- t.Setenv("BEACON_ENDPOINT_CONFIG", path)
-
- if got := ContentRetentionMode(); got != ContentRetentionFull {
- t.Fatalf("ContentRetentionMode() = %q, want %q", got, ContentRetentionFull)
- }
-}
-
-func TestContentRetentionModePrefersSystemConfigForSystemLog(t *testing.T) {
- home := t.TempDir()
- oldBeaconDir := BeaconDir
- oldSystemPath := SystemEndpointConfigPath
- BeaconDir = filepath.Join(home, ".beacon")
- SystemEndpointConfigPath = filepath.Join(t.TempDir(), "system-config.json")
- t.Cleanup(func() {
- BeaconDir = oldBeaconDir
- SystemEndpointConfigPath = oldSystemPath
- })
- userPath := filepath.Join(BeaconDir, "endpoint", "config.json")
- if err := os.MkdirAll(filepath.Dir(userPath), 0755); err != nil {
- t.Fatalf("mkdir user endpoint config dir: %v", err)
- }
- if err := os.WriteFile(userPath, []byte(`{"content_retention":"metadata"}`), 0644); err != nil {
- t.Fatalf("write user endpoint config: %v", err)
- }
- if err := os.WriteFile(SystemEndpointConfigPath, []byte(`{"content_retention":"full"}`), 0644); err != nil {
- t.Fatalf("write system endpoint config: %v", err)
- }
- t.Setenv("BEACON_ENDPOINT_LOG", "/var/log/beacon-agent/runtime.jsonl")
-
- if got := ContentRetentionMode(); got != ContentRetentionFull {
- t.Fatalf("ContentRetentionMode() = %q, want %q", got, ContentRetentionFull)
- }
-}
-
-func TestContentRetentionModeDefaultsToFull(t *testing.T) {
- oldBeaconDir := BeaconDir
- oldSystemPath := SystemEndpointConfigPath
- BeaconDir = filepath.Join(t.TempDir(), ".beacon")
- SystemEndpointConfigPath = filepath.Join(t.TempDir(), "missing-config.json")
- t.Cleanup(func() {
- BeaconDir = oldBeaconDir
- SystemEndpointConfigPath = oldSystemPath
- })
-
- if got := ContentRetentionMode(); got != ContentRetentionFull {
- t.Fatalf("ContentRetentionMode() = %q, want %q", got, ContentRetentionFull)
- }
-}
-
-func TestContentRetentionModePreservesExplicitMetadata(t *testing.T) {
- path := filepath.Join(t.TempDir(), "config.json")
- if err := os.WriteFile(path, []byte(`{"content_retention":"metadata"}`), 0644); err != nil {
- t.Fatalf("write endpoint config: %v", err)
- }
- t.Setenv("BEACON_ENDPOINT_CONFIG", path)
-
- if got := ContentRetentionMode(); got != ContentRetentionMetadata {
- t.Fatalf("ContentRetentionMode() = %q, want %q", got, ContentRetentionMetadata)
- }
-}
-
func TestRotateLogIfNeededForPlatformArchivesExistingLog(t *testing.T) {
dir := t.TempDir()
oldCursorDir := CursorDir
diff --git a/cli/beacon-hooks/internal/logging/logging.go b/cli/beacon-hooks/internal/logging/logging.go
index ba61aa22..12100f24 100644
--- a/cli/beacon-hooks/internal/logging/logging.go
+++ b/cli/beacon-hooks/internal/logging/logging.go
@@ -109,18 +109,6 @@ func (l *Logger) EndpointEvent(action, category, severity, message string, field
}
event[key] = value
}
- retention := string(config.ContentRetentionMode())
- if retention == "" {
- retention = "full"
- }
- event["content"] = map[string]interface{}{
- "retention": retention,
- "included": retention != "metadata",
- "redacted": retention == "redacted",
- }
- if raw, ok := event["raw"].(map[string]interface{}); ok {
- event["raw"] = retentionAwareRaw(raw, retention)
- }
if err := writeEndpointJSON(path, event); err != nil {
fmt.Fprintf(os.Stderr, "logging: failed to write endpoint event to %s: %v\n", path, err)
return err
@@ -197,10 +185,6 @@ func redactEndpointString(value string) string {
return asymptotetrace.RedactString(value)
}
-func retentionAwareRaw(raw map[string]interface{}, retention string) map[string]interface{} {
- return asymptotetrace.RetentionAwareRaw(raw, retention)
-}
-
func sanitizeEndpointMap(input map[string]interface{}) map[string]interface{} {
return asymptotetrace.SanitizeMap(input, asymptotetrace.PrivacyOptions{
RedactSecrets: true,
diff --git a/cli/beacon/cmd/ci.go b/cli/beacon/cmd/ci.go
index 45fe427d..f44b8e3c 100644
--- a/cli/beacon/cmd/ci.go
+++ b/cli/beacon/cmd/ci.go
@@ -71,7 +71,9 @@ func init() {
ciExecCmd.Flags().StringVar(&ciOpts.collectorPath, "collector", "", "Path to a beacon-otelcol binary")
ciExecCmd.Flags().IntVar(&ciOpts.grpcPort, "otlp-grpc-port", endpointconfig.DefaultGRPCPort, "Local OTLP gRPC port")
ciExecCmd.Flags().IntVar(&ciOpts.httpPort, "otlp-http-port", endpointconfig.DefaultHTTPPort, "Local OTLP HTTP port")
- ciExecCmd.Flags().StringVar(&ciOpts.contentRetention, "content-retention", string(endpointconfig.ContentRetentionFull), "Content retention mode: metadata, redacted, or full")
+ ciExecCmd.Flags().StringVar(&ciOpts.contentRetention, "content-retention", "", "Deprecated no-op; Beacon always captures full content subject to redaction and size limits")
+ _ = ciExecCmd.Flags().MarkHidden("content-retention")
+ _ = ciExecCmd.Flags().MarkDeprecated("content-retention", "Beacon now always captures full content; this flag is ignored")
ciExecCmd.Flags().BoolVar(&ciOpts.keepArtifacts, "keep-artifacts", true, "Keep CI runtime log and collector config after exit")
ciExecCmd.Flags().StringVar(&ciOpts.forward, "forward", "", "Optionally forward events to a customer-managed SIEM: splunk or falcon (token read from the environment)")
ciExecCmd.Flags().StringVar(&ciOpts.forwardEndpoint, "forward-endpoint", "", "SIEM HEC endpoint URL for --forward (token comes from BEACON_CI_*_HEC_TOKEN)")
@@ -86,18 +88,17 @@ func runCIExec(cmd *cobra.Command, args []string) error {
runCtx, stopSignals := signal.NotifyContext(cmd.Context(), os.Interrupt, syscall.SIGTERM)
defer stopSignals()
session, err := beaconci.Provision(beaconci.Options{
- BaseDir: ciOpts.baseDir,
- LogPath: ciOpts.logPath,
- WorkDir: ciOpts.workDir,
- CollectorPath: ciOpts.collectorPath,
- GRPCPort: ciOpts.grpcPort,
- HTTPPort: ciOpts.httpPort,
- Harness: ciOpts.harness,
- ContentRetention: endpointconfig.ContentRetention(ciOpts.contentRetention),
- KeepArtifacts: ciOpts.keepArtifacts,
- Forward: ciOpts.forward,
- ForwardEndpoint: ciOpts.forwardEndpoint,
- Uploads: ciOpts.uploads,
+ BaseDir: ciOpts.baseDir,
+ LogPath: ciOpts.logPath,
+ WorkDir: ciOpts.workDir,
+ CollectorPath: ciOpts.collectorPath,
+ GRPCPort: ciOpts.grpcPort,
+ HTTPPort: ciOpts.httpPort,
+ Harness: ciOpts.harness,
+ KeepArtifacts: ciOpts.keepArtifacts,
+ Forward: ciOpts.forward,
+ ForwardEndpoint: ciOpts.forwardEndpoint,
+ Uploads: ciOpts.uploads,
})
if err != nil {
return err
diff --git a/cli/beacon/cmd/endpoint.go b/cli/beacon/cmd/endpoint.go
index 7de2f64e..d5659cfe 100644
--- a/cli/beacon/cmd/endpoint.go
+++ b/cli/beacon/cmd/endpoint.go
@@ -139,14 +139,6 @@ var endpointConfigValidateCmd = &cobra.Command{
RunE: runEndpointConfigValidate,
}
-var endpointConfigSetRetentionCmd = &cobra.Command{
- Use: "set-retention <metadata|redacted|full>",
- Short: "Set endpoint content retention mode",
- Args: cobra.ExactArgs(1),
- SilenceUsage: true,
- RunE: runEndpointConfigSetRetention,
-}
-
var topLevelDoctorCmd = &cobra.Command{
Use: "doctor",
Short: "Alias for beacon endpoint doctor",
@@ -359,7 +351,6 @@ func init() {
endpointCmd.AddCommand(endpointConfigCmd)
endpointConfigCmd.AddCommand(endpointConfigShowCmd)
endpointConfigCmd.AddCommand(endpointConfigValidateCmd)
- endpointConfigCmd.AddCommand(endpointConfigSetRetentionCmd)
endpointIntegrationsCmd.AddCommand(endpointIntegrationsValidateCmd)
endpointIntegrationsCmd.AddCommand(endpointCoworkCmd)
endpointIntegrationsCmd.AddCommand(endpointOpenClawCmd)
@@ -379,7 +370,7 @@ func init() {
endpointVSCodeCmd.AddCommand(endpointVSCodeStatusCmd)
endpointVSCodeCmd.AddCommand(endpointVSCodeValidateCmd)
- for _, c := range []*cobra.Command{endpointInstallCmd, endpointStatusCmd, endpointDoctorCmd, endpointInventoryCmd, endpointDiscoverCmd, endpointTestEventCmd, endpointBundleDiagnosticsCmd, endpointUninstallCmd, endpointRepairCmd, endpointConfigShowCmd, endpointConfigValidateCmd, endpointConfigSetRetentionCmd, endpointIntegrationsValidateCmd, topLevelDoctorCmd, topLevelStatusCmd, topLevelInventoryCmd} {
+ for _, c := range []*cobra.Command{endpointInstallCmd, endpointStatusCmd, endpointDoctorCmd, endpointInventoryCmd, endpointDiscoverCmd, endpointTestEventCmd, endpointBundleDiagnosticsCmd, endpointUninstallCmd, endpointRepairCmd, endpointConfigShowCmd, endpointConfigValidateCmd, endpointIntegrationsValidateCmd, topLevelDoctorCmd, topLevelStatusCmd, topLevelInventoryCmd} {
c.Flags().BoolVar(&endpointOpts.userMode, "user", true, "Use per-user endpoint paths")
c.Flags().BoolVar(&endpointOpts.systemMode, "system", false, "Use system endpoint paths and launch daemon")
c.Flags().StringVar(&endpointOpts.logPath, "log-path", "", "Runtime JSONL log path")
@@ -393,7 +384,9 @@ func init() {
endpointInstallCmd.Flags().BoolVar(&endpointOpts.includeCodexSpans, "include-codex-spans", false, "Include high-volume Codex OTLP spans for troubleshooting")
endpointInstallCmd.Flags().BoolVar(&endpointOpts.noStart, "no-start", false, "Write files without starting the launchd service")
endpointInstallCmd.Flags().BoolVar(&endpointOpts.dryRun, "dry-run", false, "Print planned actions without changing endpoint files or services")
- endpointInstallCmd.Flags().StringVar(&endpointOpts.contentRetention, "content-retention", "full", "Content retention mode: metadata, redacted, or full")
+ endpointInstallCmd.Flags().StringVar(&endpointOpts.contentRetention, "content-retention", "", "Deprecated no-op; Beacon always captures full content subject to redaction and size limits")
+ _ = endpointInstallCmd.Flags().MarkHidden("content-retention")
+ _ = endpointInstallCmd.Flags().MarkDeprecated("content-retention", "Beacon now always captures full content; this flag is ignored")
registerSplunkFlags(endpointInstallCmd)
registerFalconFlags(endpointInstallCmd)
endpointRepairCmd.Flags().StringVar(&endpointOpts.harnesses, "harness", "claude,codex", "Comma-separated harnesses to configure")
@@ -404,7 +397,9 @@ func init() {
endpointRepairCmd.Flags().BoolVar(&endpointOpts.includeCodexSpans, "include-codex-spans", false, "Include high-volume Codex OTLP spans for troubleshooting")
endpointRepairCmd.Flags().BoolVar(&endpointOpts.noStart, "no-start", false, "Write files without starting the launchd service")
endpointRepairCmd.Flags().BoolVar(&endpointOpts.dryRun, "dry-run", false, "Print planned actions without changing endpoint files or services")
- endpointRepairCmd.Flags().StringVar(&endpointOpts.contentRetention, "content-retention", "full", "Content retention mode: metadata, redacted, or full")
+ endpointRepairCmd.Flags().StringVar(&endpointOpts.contentRetention, "content-retention", "", "Deprecated no-op; Beacon always captures full content subject to redaction and size limits")
+ _ = endpointRepairCmd.Flags().MarkHidden("content-retention")
+ _ = endpointRepairCmd.Flags().MarkDeprecated("content-retention", "Beacon now always captures full content; this flag is ignored")
registerSplunkFlags(endpointRepairCmd)
registerFalconFlags(endpointRepairCmd)
endpointDashboardCmd.Flags().BoolVar(&endpointOpts.userMode, "user", true, "Use per-user endpoint paths")
diff --git a/cli/beacon/cmd/endpoint_diagnostics.go b/cli/beacon/cmd/endpoint_diagnostics.go
index 4c3409e0..ead7d6d6 100644
--- a/cli/beacon/cmd/endpoint_diagnostics.go
+++ b/cli/beacon/cmd/endpoint_diagnostics.go
@@ -38,18 +38,17 @@ type doctorResult struct {
}
type inventoryResult struct {
- GeneratedAt string `json:"generated_at"`
- RuntimeLog lifecycle.RuntimeLogSource `json:"runtime_log"`
- ConfigPath string `json:"config_path"`
- LogPath string `json:"log_path"`
- ContentRetention endpointconfig.ContentRetention `json:"content_retention"`
- Harnesses []harness.Harness `json:"harnesses"`
- Hooks map[string]hookTargetResult `json:"hooks,omitempty"`
- Destinations lifecycle.DestinationStatus `json:"destinations"`
- LastEventObserved bool `json:"last_event_observed"`
- Configs []endpointinventory.Config `json:"configs,omitempty"`
- MCPServers []endpointinventory.MCPServer `json:"mcp_servers,omitempty"`
- UserScope endpointinventory.UserScope `json:"user_scope"`
+ GeneratedAt string `json:"generated_at"`
+ RuntimeLog lifecycle.RuntimeLogSource `json:"runtime_log"`
+ ConfigPath string `json:"config_path"`
+ LogPath string `json:"log_path"`
+ Harnesses []harness.Harness `json:"harnesses"`
+ Hooks map[string]hookTargetResult `json:"hooks,omitempty"`
+ Destinations lifecycle.DestinationStatus `json:"destinations"`
+ LastEventObserved bool `json:"last_event_observed"`
+ Configs []endpointinventory.Config `json:"configs,omitempty"`
+ MCPServers []endpointinventory.MCPServer `json:"mcp_servers,omitempty"`
+ UserScope endpointinventory.UserScope `json:"user_scope"`
}
type hookTargetResult struct {
@@ -211,13 +210,12 @@ func runEndpointInventory(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}
- configInventory := endpointinventory.Scan(endpointinventory.Options{ContentRetention: string(effectiveCfg.ContentRetention)})
+ configInventory := endpointinventory.Scan(endpointinventory.Options{})
result := inventoryResult{
GeneratedAt: time.Now().UTC().Format(time.RFC3339),
RuntimeLog: status.RuntimeLog,
ConfigPath: status.ConfigPath,
LogPath: status.LogPath,
- ContentRetention: effectiveCfg.ContentRetention,
Harnesses: status.Harnesses,
Hooks: hookStatusesWithConfig(hookTargetNames, effectiveCfg),
Destinations: status.Destinations,
@@ -264,7 +262,6 @@ func runEndpointInventory(cmd *cobra.Command, args []string) error {
}
fmt.Printf("Config: %s\n", result.ConfigPath)
fmt.Printf("Runtime log: %s\n", result.LogPath)
- fmt.Printf("Content retention: %s\n", result.ContentRetention)
for _, h := range result.Harnesses {
if !endpointOpts.allTargets && !h.Detected {
continue
@@ -316,11 +313,6 @@ func writeInventoryEvents(cfg endpointconfig.Config, result endpointinventory.Re
},
Message: fmt.Sprintf("%s config inventory observed", config.Runtime),
})
- event.Content = &schema.ContentInfo{
- Retention: string(cfg.ContentRetention),
- Included: cfg.ContentRetention != endpointconfig.ContentRetentionMetadata,
- Redacted: cfg.ContentRetention == endpointconfig.ContentRetentionRedacted,
- }
event.Raw = map[string]interface{}{
"inventory": map[string]interface{}{
"config": config,
@@ -423,9 +415,6 @@ func runEndpointConfigShow(cmd *cobra.Command, args []string) error {
func runEndpointConfigValidate(cmd *cobra.Command, args []string) error {
cfg := loadOrDefaultConfig()
- if err := endpointconfig.ValidateContentRetention(cfg.ContentRetention); err != nil {
- return err
- }
if err := endpointconfig.ValidateDestinations(cfg.Destinations); err != nil {
return err
}
@@ -433,21 +422,6 @@ func runEndpointConfigValidate(cmd *cobra.Command, args []string) error {
return nil
}
-func runEndpointConfigSetRetention(cmd *cobra.Command, args []string) error {
- mode := endpointconfig.ContentRetention(args[0])
- if err := endpointconfig.ValidateContentRetention(mode); err != nil {
- return err
- }
- cfg := loadOrDefaultConfig()
- cfg.ContentRetention = mode
- path, err := endpointconfig.Save(cfg)
- if err != nil {
- return err
- }
- fmt.Printf("Content retention set to %s in %s\n", mode, path)
- return nil
-}
-
func runEndpointIntegrationsValidate(cmd *cobra.Command, args []string) error {
targets := []string{"claude-cowork", "openclaw"}
if !endpointOpts.allTargets {
diff --git a/cli/beacon/cmd/endpoint_install.go b/cli/beacon/cmd/endpoint_install.go
index 957fd874..edb49738 100644
--- a/cli/beacon/cmd/endpoint_install.go
+++ b/cli/beacon/cmd/endpoint_install.go
@@ -5,7 +5,6 @@ import (
"fmt"
"os"
- endpointconfig "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/config"
"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/dashboard"
"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/harness"
"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/lifecycle"
@@ -103,7 +102,6 @@ func runEndpointInstall(cmd *cobra.Command, args []string) error {
HTTPPort: endpointOpts.httpPort,
CollectorPath: endpointOpts.collectorPath,
StartService: !endpointOpts.noStart,
- ContentRetention: endpointconfig.ContentRetention(endpointOpts.contentRetention),
IncludeRuntimeMetrics: endpointOpts.includeRuntimeMetrics,
IncludeCodexSpans: endpointOpts.includeCodexSpans,
SplunkHEC: splunkHECOptions(),
@@ -241,7 +239,6 @@ func runEndpointRepair(cmd *cobra.Command, args []string) error {
HTTPPort: endpointOpts.httpPort,
CollectorPath: endpointOpts.collectorPath,
StartService: !endpointOpts.noStart,
- ContentRetention: endpointconfig.ContentRetention(endpointOpts.contentRetention),
IncludeRuntimeMetrics: endpointOpts.includeRuntimeMetrics,
IncludeCodexSpans: endpointOpts.includeCodexSpans,
SplunkHEC: splunkHECOptions(),
diff --git a/cli/beacon/cmd/endpoint_test.go b/cli/beacon/cmd/endpoint_test.go
index 3efddfea..6d223600 100644
--- a/cli/beacon/cmd/endpoint_test.go
+++ b/cli/beacon/cmd/endpoint_test.go
@@ -158,9 +158,8 @@ func TestRepairCollectorServiceRollsBackWhenReadinessFails(t *testing.T) {
collectorConfigPath := filepath.Join(home, "otelcol.yaml")
plistPath := filepath.Join(home, "agent.plist")
cfg := endpointconfig.Config{
- UserMode: true,
- LogPath: filepath.Join(home, "old-runtime.jsonl"),
- ContentRetention: endpointconfig.ContentRetentionFull,
+ UserMode: true,
+ LogPath: filepath.Join(home, "old-runtime.jsonl"),
Collector: endpointconfig.Collector{
ConfigPath: collectorConfigPath,
SpoolPath: filepath.Join(home, "spool", "otlp.jsonl"),
@@ -666,7 +665,6 @@ func TestRobustEndpointCommandsRegistered(t *testing.T) {
{"bundle-diagnostics"},
{"config", "show"},
{"config", "validate"},
- {"config", "set-retention"},
{"integrations", "validate"},
} {
cmd, _, err := endpointCmd.Find(path)
@@ -692,7 +690,7 @@ func TestWriteInventoryEventsAppendsConfigInventory(t *testing.T) {
Exists: true,
Readable: true,
ParserStatus: endpointinventory.StatusOK,
- Redaction: endpointinventory.RedactionRedacted,
+ Redaction: endpointinventory.RedactionFull,
},
{
Runtime: "cursor",
@@ -700,7 +698,7 @@ func TestWriteInventoryEventsAppendsConfigInventory(t *testing.T) {
Scope: endpointinventory.ScopeUser,
Exists: false,
ParserStatus: endpointinventory.StatusNotFound,
- Redaction: endpointinventory.RedactionRedacted,
+ Redaction: endpointinventory.RedactionFull,
},
},
MCPServers: []endpointinventory.MCPServer{
@@ -712,7 +710,7 @@ func TestWriteInventoryEventsAppendsConfigInventory(t *testing.T) {
Transport: endpointinventory.TransportStdio,
DefinitionHash: "sha256:def",
ParserStatus: endpointinventory.StatusOK,
- Redaction: endpointinventory.RedactionRedacted,
+ Redaction: endpointinventory.RedactionFull,
},
},
}
diff --git a/cli/beacon/cmd/mcp.go b/cli/beacon/cmd/mcp.go
index bc4d7e30..316596b4 100644
--- a/cli/beacon/cmd/mcp.go
+++ b/cli/beacon/cmd/mcp.go
@@ -103,7 +103,6 @@ func runMCPDoctor(cmd *cobra.Command, args []string) error {
return err
}
runtimeLog := resolveMCPRuntimeLog()
- cfg := loadConfigForMode(runtimeLog.EffectiveUserMode, runtimeLog.EffectiveLogPath)
fmt.Println("Beacon MCP doctor")
fmt.Println()
fmt.Printf("Transport: %s\n", normalizedTransport())
@@ -122,7 +121,6 @@ func runMCPDoctor(cmd *cobra.Command, args []string) error {
if runtimeLog.Warning != "" {
fmt.Printf("Runtime log warning: %s\n", runtimeLog.Warning)
}
- fmt.Printf("Content retention: %s\n", cfg.ContentRetention)
if _, statErr := os.Stat(runtimeLog.EffectiveLogPath); statErr != nil && os.IsNotExist(statErr) {
fmt.Println("Runtime log check: no log file yet")
fmt.Println("Beacon MCP can still start, but activity answers will be empty until endpoint telemetry writes events.")
diff --git a/cli/beacon/internal/ci/harness.go b/cli/beacon/internal/ci/harness.go
index fa2e7bc8..bcb9fafe 100644
--- a/cli/beacon/internal/ci/harness.go
+++ b/cli/beacon/internal/ci/harness.go
@@ -5,11 +5,10 @@ import (
"net/url"
"strings"
- endpointconfig "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/config"
"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/schema"
)
-func ClaudeEnv(base []string, endpoint string, retention endpointconfig.ContentRetention) []string {
+func ClaudeEnv(base []string, endpoint string) []string {
env := envMap(base)
env["CLAUDE_CODE_ENABLE_TELEMETRY"] = "1"
env["OTEL_LOGS_EXPORTER"] = "otlp"
@@ -19,11 +18,7 @@ func ClaudeEnv(base []string, endpoint string, retention endpointconfig.ContentR
delete(env, "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT")
delete(env, "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT")
delete(env, "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT")
- if retention == endpointconfig.ContentRetentionMetadata {
- delete(env, "OTEL_LOG_USER_PROMPTS")
- } else {
- env["OTEL_LOG_USER_PROMPTS"] = "1"
- }
+ env["OTEL_LOG_USER_PROMPTS"] = "1"
return flattenEnv(env)
}
diff --git a/cli/beacon/internal/ci/harness_test.go b/cli/beacon/internal/ci/harness_test.go
index f7b9a3ed..2c4f6189 100644
--- a/cli/beacon/internal/ci/harness_test.go
+++ b/cli/beacon/internal/ci/harness_test.go
@@ -3,12 +3,10 @@ package ci
import (
"strings"
"testing"
-
- endpointconfig "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/config"
)
-func TestClaudeEnvFullRetentionIncludesPromptLogging(t *testing.T) {
- env := strings.Join(ClaudeEnv([]string{"PATH=/bin", "OTEL_LOG_USER_PROMPTS=0"}, "http://127.0.0.1:4317", endpointconfig.ContentRetentionFull), "\n")
+func TestClaudeEnvIncludesPromptLogging(t *testing.T) {
+ env := strings.Join(ClaudeEnv([]string{"PATH=/bin", "OTEL_LOG_USER_PROMPTS=0"}, "http://127.0.0.1:4317"), "\n")
for _, want := range []string{
"CLAUDE_CODE_ENABLE_TELEMETRY=1",
"OTEL_EXPORTER_OTLP_ENDPOINT=http://127.0.0.1:4317",
@@ -19,10 +17,3 @@ func TestClaudeEnvFullRetentionIncludesPromptLogging(t *testing.T) {
}
}
}
-
-func TestClaudeEnvMetadataRetentionOmitsPromptLogging(t *testing.T) {
- env := strings.Join(ClaudeEnv([]string{"OTEL_LOG_USER_PROMPTS=1"}, "http://127.0.0.1:4317", endpointconfig.ContentRetentionMetadata), "\n")
- if strings.Contains(env, "OTEL_LOG_USER_PROMPTS=") {
- t.Fatalf("ClaudeEnv metadata retention should omit OTEL_LOG_USER_PROMPTS:\n%s", env)
- }
-}
diff --git a/cli/beacon/internal/ci/session.go b/cli/beacon/internal/ci/session.go
index d29e8e64..7caaaa25 100644
--- a/cli/beacon/internal/ci/session.go
+++ b/cli/beacon/internal/ci/session.go
@@ -33,15 +33,14 @@ var (
)
type Options struct {
- BaseDir string
- LogPath string
- WorkDir string
- CollectorPath string
- GRPCPort int
- HTTPPort int
- Harness string
- ContentRetention endpointconfig.ContentRetention
- KeepArtifacts bool
+ BaseDir string
+ LogPath string
+ WorkDir string
+ CollectorPath string
+ GRPCPort int
+ HTTPPort int
+ Harness string
+ KeepArtifacts bool
// Forward selects an optional SIEM forwarder ("splunk" or "falcon") for the
// ephemeral collector. ForwardEndpoint supplies the destination URL; the
// token is read from the environment only.
@@ -85,12 +84,6 @@ func Provision(opts Options) (*Session, error) {
if err := validateHarness(opts.Harness); err != nil {
return nil, err
}
- if opts.ContentRetention == "" {
- opts.ContentRetention = endpointconfig.ContentRetentionFull
- }
- if err := endpointconfig.ValidateContentRetention(opts.ContentRetention); err != nil {
- return nil, err
- }
baseDir, err := resolveBaseDir(opts.BaseDir, opts.LogPath)
if err != nil {
return nil, err
@@ -114,7 +107,6 @@ func Provision(opts Options) (*Session, error) {
}
cfg := endpointconfig.Default(true, logPath)
cfg.Harnesses = []string{DefaultHarness}
- cfg.ContentRetention = opts.ContentRetention
cfg.Collector.BinaryPath = opts.CollectorPath
cfg.Collector.ConfigPath = filepath.Join(baseDir, "otelcol.yaml")
cfg.Collector.SpoolPath = filepath.Join(baseDir, "spool", "otlp.jsonl")
@@ -252,7 +244,7 @@ func (s *Session) RunChild(ctx context.Context, args []string, stdout, stderr io
}
cmd := childCommandContext(ctx, args[0], args[1:]...)
cmd.Dir = s.WorkDir
- env := append(WithCIResourceAttributes(ClaudeEnv(os.Environ(), s.GRPCEndpoint, s.cfg.ContentRetention), s.Run),
+ env := append(WithCIResourceAttributes(ClaudeEnv(os.Environ(), s.GRPCEndpoint), s.Run),
"BEACON_CI_BASE_DIR="+s.BaseDir,
"BEACON_CI_CONFIG_PATH="+s.ConfigPath,
"BEACON_CI_LOG_PATH="+s.LogPath,
diff --git a/cli/beacon/internal/endpoint/activity/activity.go b/cli/beacon/internal/endpoint/activity/activity.go
index 268ec05f..c9bf6adf 100644
--- a/cli/beacon/internal/endpoint/activity/activity.go
+++ b/cli/beacon/internal/endpoint/activity/activity.go
@@ -293,7 +293,6 @@ func InspectLog(logPath string) (sampledEvents, malformedLines int, archives []s
return len(result.Events), result.MalformedLines, archives, nil
}
-
func read(query Query) (dashboard.EventResult, error) {
if query.LogPath == "" {
return dashboard.EventResult{}, fmt.Errorf("runtime log path is required")
@@ -406,9 +405,6 @@ func contentCaveats(content *ContentSummary) []string {
return nil
}
var caveats []string
- if content.Retention == schema.ContentRetentionMetadata {
- caveats = append(caveats, "content retention is metadata; prompt/tool details may be omitted")
- }
if content.Redacted {
caveats = append(caveats, "content was redacted")
}
diff --git a/cli/beacon/internal/endpoint/activity/activity_test.go b/cli/beacon/internal/endpoint/activity/activity_test.go
index 99c85ea6..75c57434 100644
--- a/cli/beacon/internal/endpoint/activity/activity_test.go
+++ b/cli/beacon/internal/endpoint/activity/activity_test.go
@@ -9,11 +9,11 @@ import (
"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/schema"
)
-func TestSearchReturnsCompactRetentionAwareDTOs(t *testing.T) {
+func TestSearchReturnsHistoricalContentSummary(t *testing.T) {
path := filepath.Join(t.TempDir(), "runtime.jsonl")
event := testEvent("2026-05-13T01:00:00Z", "claude", "prompt.submitted", "prompt")
event.Prompt = &schema.PromptInfo{Text: "summarize local MCP use"}
- event.Content = &schema.ContentInfo{Retention: schema.ContentRetentionMetadata, Included: false}
+ event.Content = &schema.ContentInfo{Retention: "metadata", Included: false}
writeLog(t, path, event)
result, err := Search(Query{LogPath: path, Harness: "claude", Limit: 10})
@@ -27,11 +27,11 @@ func TestSearchReturnsCompactRetentionAwareDTOs(t *testing.T) {
if got.ID == "" || got.Action != "prompt.submitted" || got.Harness != "claude" {
t.Fatalf("unexpected event summary: %#v", got)
}
- if got.Content == nil || got.Content.Retention != schema.ContentRetentionMetadata {
- t.Fatalf("content summary = %#v, want metadata retention", got.Content)
+ if got.Content == nil || got.Content.Retention != "metadata" {
+ t.Fatalf("content summary = %#v, want historical content metadata", got.Content)
}
- if len(got.Caveats) == 0 {
- t.Fatal("expected retention caveat")
+ if len(got.Caveats) != 0 {
+ t.Fatalf("unexpected retention caveat for historical content metadata: %#v", got.Caveats)
}
}
diff --git a/cli/beacon/internal/endpoint/cloudwatch/cloudwatch_test.go b/cli/beacon/internal/endpoint/cloudwatch/cloudwatch_test.go
index 7605fef9..a9b7dcb6 100644
--- a/cli/beacon/internal/endpoint/cloudwatch/cloudwatch_test.go
+++ b/cli/beacon/internal/endpoint/cloudwatch/cloudwatch_test.go
@@ -125,7 +125,7 @@ func TestPackREADMEMentionsAWSCloudWatchLogsSetupAndProductionForwarding(t *test
"vendor=beacon product=endpoint-agent destination.type=cloudwatch destination.mode=aws_cloudwatch_logs",
"vector.toml",
"customer-managed host-agent",
- "content retention",
+ "Content Handling",
"/var/log/beacon-agent/runtime.jsonl",
"Do not store AWS destination secrets",
"encryption",
diff --git a/cli/beacon/internal/endpoint/cloudwatch/pack/README.md b/cli/beacon/internal/endpoint/cloudwatch/pack/README.md
index d09a5606..95092c29 100644
--- a/cli/beacon/internal/endpoint/cloudwatch/pack/README.md
+++ b/cli/beacon/internal/endpoint/cloudwatch/pack/README.md
@@ -135,9 +135,8 @@ Expected validation fields:
vendor=beacon product=endpoint-agent destination.type=cloudwatch destination.mode=aws_cloudwatch_logs
```
-## Content Retention
+## Content Handling
-Beacon content retention defaults to `full`, so prompt text, tool input, command
-output, raw tool payloads, and other retained content may be forwarded to AWS
-CloudWatch Logs. Use Beacon's `metadata` or `redacted` content retention modes
-for stricter deployments.
+Beacon forwards retained prompt text, tool input, command output, raw tool
+payloads, and related local telemetry to AWS CloudWatch Logs subject to Beacon's
+secret redaction, sanitization, truncation, and event-size limits.
diff --git a/cli/beacon/internal/endpoint/cloudwatch/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/cloudwatch/pack/sample-event.jsonl
index 9b4f2784..06f4301d 100644
--- a/cli/beacon/internal/endpoint/cloudwatch/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/cloudwatch/pack/sample-event.jsonl
@@ -1,3 +1,3 @@
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"cloudwatch","mode":"aws_cloudwatch_logs","status":"configured"},"message":"Beacon endpoint AWS CloudWatch Logs validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
diff --git a/cli/beacon/internal/endpoint/collector/collector.go b/cli/beacon/internal/endpoint/collector/collector.go
index 5cac3e90..300aac7a 100644
--- a/cli/beacon/internal/endpoint/collector/collector.go
+++ b/cli/beacon/internal/endpoint/collector/collector.go
@@ -155,7 +155,6 @@ exporters:
rotate_bytes: 10485760
rotate_archives: 5
redact_secrets: true
- content_retention: %q
%s
extensions:
health_check:
@@ -179,7 +178,7 @@ service:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: %s
-`, cfg.Collector.GRPCPort, cfg.Collector.HTTPPort, cfg.LogPath, cfg.ContentRetention, runtimeMetricsYAML+codexSpansYAML+splunkExporter+falconExporter, exporters, exporters, exporters)
+`, cfg.Collector.GRPCPort, cfg.Collector.HTTPPort, cfg.LogPath, runtimeMetricsYAML+codexSpansYAML+splunkExporter+falconExporter, exporters, exporters, exporters)
}
func splunkHECYAML(cfg endpointconfig.Config) string {
@@ -221,7 +220,6 @@ func falconHECYAML(cfg endpointconfig.Config) string {
fmt.Fprintf(&b, " falcon_hec:\n")
fmt.Fprintf(&b, " token: %q\n", falcon.Token)
fmt.Fprintf(&b, " endpoint: %q\n", falcon.Endpoint)
- fmt.Fprintf(&b, " content_retention: %q\n", cfg.ContentRetention)
if cfg.Collector.IncludeRuntimeMetrics {
fmt.Fprintf(&b, " include_runtime_metrics: true\n")
}
diff --git a/cli/beacon/internal/endpoint/collector/collector_test.go b/cli/beacon/internal/endpoint/collector/collector_test.go
index e265edbb..98cb1d38 100644
--- a/cli/beacon/internal/endpoint/collector/collector_test.go
+++ b/cli/beacon/internal/endpoint/collector/collector_test.go
@@ -113,7 +113,6 @@ func TestConfigYAMLIncludesSplunkHECWhenConfigured(t *testing.T) {
func TestConfigYAMLIncludesFalconHECWhenConfigured(t *testing.T) {
cfg := testConfig(t)
- cfg.ContentRetention = endpointconfig.ContentRetentionRedacted
cfg.Collector.IncludeRuntimeMetrics = true
cfg.Collector.IncludeCodexSpans = true
cfg.Destinations = &endpointconfig.Destinations{FalconHEC: &endpointconfig.FalconHEC{
@@ -132,7 +131,6 @@ func TestConfigYAMLIncludesFalconHECWhenConfigured(t *testing.T) {
"falcon_hec:",
`token: "ingest-token"`,
`endpoint: "https://cloud.us.humio.com/api/v1/ingest/hec"`,
- `content_retention: "redacted"`,
"include_runtime_metrics: true",
"include_codex_spans: true",
`index: "beacon-repo"`,
diff --git a/cli/beacon/internal/endpoint/config/config.go b/cli/beacon/internal/endpoint/config/config.go
index c1cdc844..01e133da 100644
--- a/cli/beacon/internal/endpoint/config/config.go
+++ b/cli/beacon/internal/endpoint/config/config.go
@@ -21,22 +21,13 @@ const (
DefaultFalconSourcetype = "json"
)
-type ContentRetention string
-
-const (
- ContentRetentionMetadata ContentRetention = "metadata"
- ContentRetentionRedacted ContentRetention = "redacted"
- ContentRetentionFull ContentRetention = "full"
-)
-
type Config struct {
- UserMode bool `json:"user_mode"`
- LogPath string `json:"log_path"`
- Collector Collector `json:"collector"`
- Harnesses []string `json:"harnesses"`
- EventCategories []string `json:"event_categories,omitempty"`
- ContentRetention ContentRetention `json:"content_retention"`
- Destinations *Destinations `json:"destinations,omitempty"`
+ UserMode bool `json:"user_mode"`
+ LogPath string `json:"log_path"`
+ Collector Collector `json:"collector"`
+ Harnesses []string `json:"harnesses"`
+ EventCategories []string `json:"event_categories,omitempty"`
+ Destinations *Destinations `json:"destinations,omitempty"`
}
type Collector struct {
@@ -79,10 +70,9 @@ type FalconHEC struct {
func Default(userMode bool, logPath string) Config {
base := BaseDir(userMode)
return Config{
- UserMode: userMode,
- LogPath: logPath,
- Harnesses: []string{"claude", "codex"},
- ContentRetention: ContentRetentionFull,
+ UserMode: userMode,
+ LogPath: logPath,
+ Harnesses: []string{"claude", "codex"},
Collector: Collector{
ConfigPath: filepath.Join(base, "otelcol.yaml"),
GRPCPort: DefaultGRPCPort,
@@ -124,12 +114,6 @@ func Load(userMode bool) (Config, error) {
if err := json.Unmarshal(data, &cfg); err != nil {
return Config{}, err
}
- if cfg.ContentRetention == "" {
- cfg.ContentRetention = ContentRetentionFull
- }
- if err := ValidateContentRetention(cfg.ContentRetention); err != nil {
- return Config{}, err
- }
NormalizeDestinations(&cfg)
if err := ValidateDestinations(cfg.Destinations); err != nil {
return Config{}, err
@@ -138,12 +122,6 @@ func Load(userMode bool) (Config, error) {
}
func Save(cfg Config) (string, error) {
- if cfg.ContentRetention == "" {
- cfg.ContentRetention = ContentRetentionFull
- }
- if err := ValidateContentRetention(cfg.ContentRetention); err != nil {
- return "", err
- }
NormalizeDestinations(&cfg)
if err := ValidateDestinations(cfg.Destinations); err != nil {
return "", err
@@ -169,15 +147,6 @@ func Save(cfg Config) (string, error) {
return path, nil
}
-func ValidateContentRetention(mode ContentRetention) error {
- switch mode {
- case "", ContentRetentionMetadata, ContentRetentionRedacted, ContentRetentionFull:
- return nil
- default:
- return fmt.Errorf("content retention must be metadata, redacted, or full")
- }
-}
-
func NormalizeDestinations(cfg *Config) {
if cfg == nil || cfg.Destinations == nil {
return
diff --git a/cli/beacon/internal/endpoint/config/config_test.go b/cli/beacon/internal/endpoint/config/config_test.go
index 76f337fd..c23a80b3 100644
--- a/cli/beacon/internal/endpoint/config/config_test.go
+++ b/cli/beacon/internal/endpoint/config/config_test.go
@@ -3,6 +3,7 @@ package config
import (
"os"
"path/filepath"
+ "strings"
"testing"
)
@@ -27,9 +28,6 @@ func TestDefaultUserConfigUsesHomeScopedPaths(t *testing.T) {
if len(cfg.Harnesses) != 2 || cfg.Harnesses[0] != "claude" || cfg.Harnesses[1] != "codex" {
t.Fatalf("unexpected default harnesses: %#v", cfg.Harnesses)
}
- if cfg.ContentRetention != ContentRetentionFull {
- t.Fatalf("ContentRetention = %q, want %q", cfg.ContentRetention, ContentRetentionFull)
- }
}
func TestSaveLoadRoundTrip(t *testing.T) {
@@ -42,7 +40,6 @@ func TestSaveLoadRoundTrip(t *testing.T) {
cfg.Collector.IncludeRuntimeMetrics = true
cfg.Collector.IncludeCodexSpans = true
cfg.EventCategories = []string{"tool", "session"}
- cfg.ContentRetention = ContentRetentionRedacted
path, err := Save(cfg)
if err != nil {
@@ -71,8 +68,12 @@ func TestSaveLoadRoundTrip(t *testing.T) {
if len(loaded.EventCategories) != 2 || loaded.EventCategories[1] != "session" {
t.Fatalf("EventCategories did not round-trip: %#v", loaded.EventCategories)
}
- if loaded.ContentRetention != ContentRetentionRedacted {
- t.Fatalf("ContentRetention = %q, want %q", loaded.ContentRetention, ContentRetentionRedacted)
+ data, err := os.ReadFile(path)
+ if err != nil {
+ t.Fatalf("read saved config: %v", err)
+ }
+ if strings.Contains(string(data), "content_retention") {
+ t.Fatalf("saved config unexpectedly contains legacy content_retention: %s", string(data))
}
}
@@ -174,14 +175,14 @@ func TestSaveRejectsIncompleteFalconHEC(t *testing.T) {
}
}
-func TestLoadDefaultsMissingContentRetentionToFull(t *testing.T) {
+func TestLoadIgnoresLegacyContentRetention(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
path := filepath.Join(home, UserConfigPath)
if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
t.Fatalf("mkdir config dir: %v", err)
}
- if err := os.WriteFile(path, []byte(`{"user_mode":true}`), 0644); err != nil {
+ if err := os.WriteFile(path, []byte(`{"user_mode":true,"content_retention":"metadata"}`), 0644); err != nil {
t.Fatalf("write config: %v", err)
}
@@ -189,8 +190,18 @@ func TestLoadDefaultsMissingContentRetentionToFull(t *testing.T) {
if err != nil {
t.Fatalf("Load returned error: %v", err)
}
- if loaded.ContentRetention != ContentRetentionFull {
- t.Fatalf("ContentRetention = %q, want %q", loaded.ContentRetention, ContentRetentionFull)
+ if !loaded.UserMode {
+ t.Fatal("UserMode = false, want true")
+ }
+ if _, err := Save(loaded); err != nil {
+ t.Fatalf("Save returned error: %v", err)
+ }
+ data, err := os.ReadFile(path)
+ if err != nil {
+ t.Fatalf("read saved config: %v", err)
+ }
+ if strings.Contains(string(data), "content_retention") {
+ t.Fatalf("saved config unexpectedly preserved legacy content_retention: %s", string(data))
}
}
diff --git a/cli/beacon/internal/endpoint/dashboard/server.go b/cli/beacon/internal/endpoint/dashboard/server.go
index e5140ee1..2402acbd 100644
--- a/cli/beacon/internal/endpoint/dashboard/server.go
+++ b/cli/beacon/internal/endpoint/dashboard/server.go
@@ -13,7 +13,6 @@ import (
"strings"
"time"
- endpointconfig "github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/config"
"github.com/asymptote-labs/agent-beacon/cli/beacon/internal/endpoint/lifecycle"
)
@@ -29,15 +28,14 @@ type Options struct {
}
type StatusResponse struct {
- Version string `json:"version"`
- ConfigPath string `json:"config_path"`
- LogPath string `json:"log_path"`
- RuntimeLog lifecycle.RuntimeLogSource `json:"runtime_log"`
- ContentRetention endpointconfig.ContentRetention `json:"content_retention"`
- Harnesses interface{} `json:"harnesses"`
- Collector interface{} `json:"collector"`
- Service interface{} `json:"service"`
- Diagnostics interface{} `json:"diagnostics"`
+ Version string `json:"version"`
+ ConfigPath string `json:"config_path"`
+ LogPath string `json:"log_path"`
+ RuntimeLog lifecycle.RuntimeLogSource `json:"runtime_log"`
+ Harnesses interface{} `json:"harnesses"`
+ Collector interface{} `json:"collector"`
+ Service interface{} `json:"service"`
+ Diagnostics interface{} `json:"diagnostics"`
}
func Handler(opts Options) (http.Handler, error) {
@@ -55,23 +53,15 @@ func Handler(opts Options) (http.Handler, error) {
return
}
status := lifecycle.GetStatus(opts.UserMode, opts.LogPath)
- cfg, err := endpointconfig.Load(opts.UserMode)
- if err != nil {
- cfg = endpointconfig.Default(opts.UserMode, opts.LogPath)
- }
- if opts.LogPath != "" {
- cfg.LogPath = opts.LogPath
- }
writeJSON(w, StatusResponse{
- Version: status.Version,
- ConfigPath: status.ConfigPath,
- LogPath: status.LogPath,
- RuntimeLog: runtimeLog,
- ContentRetention: cfg.ContentRetention,
- Harnesses: status.Harnesses,
- Collector: status.Collector,
- Service: status.Service,
- Diagnostics: status.Diagnostics,
+ Version: status.Version,
+ ConfigPath: status.ConfigPath,
+ LogPath: status.LogPath,
+ RuntimeLog: runtimeLog,
+ Harnesses: status.Harnesses,
+ Collector: status.Collector,
+ Service: status.Service,
+ Diagnostics: status.Diagnostics,
})
})
mux.HandleFunc("/api/summary", func(w http.ResponseWriter, r *http.Request) {
diff --git a/cli/beacon/internal/endpoint/dashboard/static/app.js b/cli/beacon/internal/endpoint/dashboard/static/app.js
index 42d1bd72..7e85d6f0 100644
--- a/cli/beacon/internal/endpoint/dashboard/static/app.js
+++ b/cli/beacon/internal/endpoint/dashboard/static/app.js
@@ -122,7 +122,6 @@ async function load({ updateLocation = false, mode = "replace" } = {}) {
function render() {
setText("#log-path", state.status?.log_path || "Runtime log unavailable");
- setText("#retention", `Data retention: ${state.status?.content_retention || "metadata"}`);
setText("#last-updated", state.summary?.last_event_time ? `Last event ${formatTime(state.summary.last_event_time)}` : "");
renderNewEventsIndicator();
renderFilterOptions();
diff --git a/cli/beacon/internal/endpoint/dashboard/static/overview.html b/cli/beacon/internal/endpoint/dashboard/static/overview.html
index 2c52d2c4..3b0f0ae1 100644
--- a/cli/beacon/internal/endpoint/dashboard/static/overview.html
+++ b/cli/beacon/internal/endpoint/dashboard/static/overview.html
@@ -25,7 +25,6 @@
<h2>Endpoint</h2>
<p id="log-path" class="muted">Loading runtime log...</p>
</div>
- <div id="retention" class="pill">metadata</div>
</section>
<section>
diff --git a/cli/beacon/internal/endpoint/datadog/datadog_test.go b/cli/beacon/internal/endpoint/datadog/datadog_test.go
index 141802fd..edaa769c 100644
--- a/cli/beacon/internal/endpoint/datadog/datadog_test.go
+++ b/cli/beacon/internal/endpoint/datadog/datadog_test.go
@@ -86,7 +86,7 @@ func TestPackREADMEMentionsValidationRetentionAndMacOSPermissions(t *testing.T)
"beacon endpoint datadog validate",
"service:beacon-endpoint-agent",
"Beacon endpoint datadog validation event",
- "content retention",
+ "Content Handling",
"_dd-agent",
"/var/log/beacon-agent/runtime.jsonl",
} {
diff --git a/cli/beacon/internal/endpoint/datadog/pack/README.md b/cli/beacon/internal/endpoint/datadog/pack/README.md
index df45379d..088099d4 100644
--- a/cli/beacon/internal/endpoint/datadog/pack/README.md
+++ b/cli/beacon/internal/endpoint/datadog/pack/README.md
@@ -76,11 +76,11 @@ facet or parsing pipeline:
service:beacon-endpoint-agent "Beacon endpoint datadog validation event"
```
-## Content Retention
+## Content Handling
-Beacon content retention defaults to `full`, so prompt text, tool input, command
-output, and other retained content may be forwarded to Datadog. Use Beacon's
-`metadata` or `redacted` content retention modes for stricter deployments.
+Beacon forwards retained prompt text, tool input, command output, and related
+local telemetry to Datadog subject to Beacon's secret redaction, sanitization,
+truncation, and event-size limits.
## OpenTelemetry Note
diff --git a/cli/beacon/internal/endpoint/datadog/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/datadog/pack/sample-event.jsonl
index 40f0a15e..dcf475f5 100644
--- a/cli/beacon/internal/endpoint/datadog/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/datadog/pack/sample-event.jsonl
@@ -1,3 +1,3 @@
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"datadog","mode":"agent_file","status":"configured"},"message":"Beacon endpoint Datadog validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
diff --git a/cli/beacon/internal/endpoint/elastic/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/elastic/pack/sample-event.jsonl
index 32b45fdb..1bfde409 100644
--- a/cli/beacon/internal/endpoint/elastic/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/elastic/pack/sample-event.jsonl
@@ -1,2 +1,2 @@
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
diff --git a/cli/beacon/internal/endpoint/gcs/gcs_test.go b/cli/beacon/internal/endpoint/gcs/gcs_test.go
index 92434717..4a0bcab8 100644
--- a/cli/beacon/internal/endpoint/gcs/gcs_test.go
+++ b/cli/beacon/internal/endpoint/gcs/gcs_test.go
@@ -147,7 +147,7 @@ func TestPackREADMEMentionsGCSSetupAndProductionForwarding(t *testing.T) {
"vector.toml",
"customer-managed host-agent",
"without a Vector wrapper",
- "content retention",
+ "Content Handling",
"/var/log/beacon-agent/runtime.jsonl",
"Beacon does not store Google Cloud credentials",
"encryption",
diff --git a/cli/beacon/internal/endpoint/gcs/pack/README.md b/cli/beacon/internal/endpoint/gcs/pack/README.md
index 6e2254ed..c10477a8 100644
--- a/cli/beacon/internal/endpoint/gcs/pack/README.md
+++ b/cli/beacon/internal/endpoint/gcs/pack/README.md
@@ -143,9 +143,8 @@ Expected validation fields:
vendor=beacon product=endpoint-agent destination.type=gcs destination.mode=google_cloud_storage_jsonl
```
-## Content Retention
+## Content Handling
-Beacon content retention defaults to `full`, so prompt text, tool input, command
-output, raw tool payloads, and other retained content may be forwarded to GCS.
-Use Beacon's `metadata` or `redacted` content retention modes for stricter
-deployments.
+Beacon forwards retained prompt text, tool input, command output, raw tool
+payloads, and related local telemetry to GCS subject to Beacon's secret
+redaction, sanitization, truncation, and event-size limits.
diff --git a/cli/beacon/internal/endpoint/gcs/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/gcs/pack/sample-event.jsonl
index f89a1c48..cd29a1f0 100644
--- a/cli/beacon/internal/endpoint/gcs/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/gcs/pack/sample-event.jsonl
@@ -1,3 +1,3 @@
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"gcs","mode":"google_cloud_storage_jsonl","status":"configured"},"message":"Beacon endpoint GCS validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
diff --git a/cli/beacon/internal/endpoint/harness/gemini.go b/cli/beacon/internal/endpoint/harness/gemini.go
index 4d34dce7..24ef7b77 100644
--- a/cli/beacon/internal/endpoint/harness/gemini.go
+++ b/cli/beacon/internal/endpoint/harness/gemini.go
@@ -49,8 +49,8 @@ func ConfigureGemini(opts ConfigureOptions) (string, error) {
telemetry["otlpEndpoint"] = opts.Endpoint
telemetry["otlpProtocol"] = "grpc"
telemetry["useCollector"] = true
- telemetry["logPrompts"] = opts.ContentRetention != "metadata"
- telemetry["traces"] = opts.ContentRetention != "metadata"
+ telemetry["logPrompts"] = true
+ telemetry["traces"] = true
delete(telemetry, "outfile")
settings["telemetry"] = telemetry
diff --git a/cli/beacon/internal/endpoint/harness/harness.go b/cli/beacon/internal/endpoint/harness/harness.go
index c9560fa7..b3544549 100644
--- a/cli/beacon/internal/endpoint/harness/harness.go
+++ b/cli/beacon/internal/endpoint/harness/harness.go
@@ -35,9 +35,8 @@ type Harness struct {
}
type ConfigureOptions struct {
- Endpoint string
- UserMode bool
- ContentRetention string
+ Endpoint string
+ UserMode bool
}
type ValidationResult struct {
@@ -309,11 +308,7 @@ func ConfigureClaude(opts ConfigureOptions) (string, error) {
env["OTEL_METRICS_EXPORTER"] = "otlp"
env["OTEL_EXPORTER_OTLP_PROTOCOL"] = "grpc"
env["OTEL_EXPORTER_OTLP_ENDPOINT"] = opts.Endpoint
- if opts.ContentRetention == "metadata" {
- delete(env, "OTEL_LOG_USER_PROMPTS")
- } else {
- env["OTEL_LOG_USER_PROMPTS"] = "1"
- }
+ env["OTEL_LOG_USER_PROMPTS"] = "1"
settings["env"] = env
if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
return "", err
@@ -338,7 +333,7 @@ func ConfigureCodex(opts ConfigureOptions) (string, error) {
return "", err
}
}
- updated := mergeCodexOTELWithPrompt(existing, opts.Endpoint, opts.ContentRetention != "metadata")
+ updated := mergeCodexOTELWithPrompt(existing, opts.Endpoint, true)
if err := os.MkdirAll(filepath.Dir(path), 0755); err != nil {
return "", err
}
diff --git a/cli/beacon/internal/endpoint/harness/harness_test.go b/cli/beacon/internal/endpoint/harness/harness_test.go
index 2ac7499f..01a1deff 100644
--- a/cli/beacon/internal/endpoint/harness/harness_test.go
+++ b/cli/beacon/internal/endpoint/harness/harness_test.go
@@ -83,7 +83,7 @@ func TestConfigureClaudeWritesTelemetryEnvAndBackup(t *testing.T) {
}
}
-func TestConfigureClaudeDisablesPromptLoggingForMetadataRetention(t *testing.T) {
+func TestConfigureClaudeEnablesPromptLogging(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
path := filepath.Join(home, ".claude", "settings.json")
@@ -95,9 +95,8 @@ func TestConfigureClaudeDisablesPromptLoggingForMetadataRetention(t *testing.T)
}
written, err := ConfigureClaude(ConfigureOptions{
- Endpoint: "http://127.0.0.1:4317",
- UserMode: true,
- ContentRetention: "metadata",
+ Endpoint: "http://127.0.0.1:4317",
+ UserMode: true,
})
if err != nil {
t.Fatalf("ConfigureClaude returned error: %v", err)
@@ -113,8 +112,8 @@ func TestConfigureClaudeDisablesPromptLoggingForMetadataRetention(t *testing.T)
if err := json.Unmarshal(data, &settings); err != nil {
t.Fatalf("unmarshal claude config: %v", err)
}
- if _, ok := settings["env"]["OTEL_LOG_USER_PROMPTS"]; ok {
- t.Fatalf("metadata retention should remove OTEL_LOG_USER_PROMPTS: %#v", settings["env"])
+ if got := settings["env"]["OTEL_LOG_USER_PROMPTS"]; got != "1" {
+ t.Fatalf("OTEL_LOG_USER_PROMPTS = %q, want 1; env=%#v", got, settings["env"])
}
}
@@ -198,14 +197,13 @@ func TestConfigureCodexWritesTelemetryBlockAndBackup(t *testing.T) {
}
}
-func TestConfigureCodexDisablesPromptLoggingForMetadataRetention(t *testing.T) {
+func TestConfigureCodexEnablesPromptLogging(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
path, err := ConfigureCodex(ConfigureOptions{
- Endpoint: "http://127.0.0.1:4317",
- UserMode: true,
- ContentRetention: "metadata",
+ Endpoint: "http://127.0.0.1:4317",
+ UserMode: true,
})
if err != nil {
t.Fatalf("ConfigureCodex returned error: %v", err)
@@ -214,8 +212,8 @@ func TestConfigureCodexDisablesPromptLoggingForMetadataRetention(t *testing.T) {
if err != nil {
t.Fatalf("read codex config: %v", err)
}
- if !strings.Contains(string(data), "log_user_prompt = false") {
- t.Fatalf("metadata retention should disable Codex prompt logging:\n%s", string(data))
+ if !strings.Contains(string(data), "log_user_prompt = true") {
+ t.Fatalf("ConfigureCodex should enable prompt logging:\n%s", string(data))
}
}
@@ -334,7 +332,7 @@ func TestConfigureGeminiWritesTelemetryAndBackup(t *testing.T) {
t.Fatalf("write existing gemini config: %v", err)
}
- written, err := ConfigureGemini(ConfigureOptions{Endpoint: "http://127.0.0.1:4317", UserMode: true, ContentRetention: "full"})
+ written, err := ConfigureGemini(ConfigureOptions{Endpoint: "http://127.0.0.1:4317", UserMode: true})
if err != nil {
t.Fatalf("ConfigureGemini returned error: %v", err)
}
@@ -379,14 +377,13 @@ func TestConfigureGeminiWritesTelemetryAndBackup(t *testing.T) {
}
}
-func TestConfigureGeminiDisablesPromptLoggingForMetadataRetention(t *testing.T) {
+func TestConfigureGeminiEnablesPromptLoggingAndTraces(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
path, err := ConfigureGemini(ConfigureOptions{
- Endpoint: "http://127.0.0.1:4317",
- UserMode: true,
- ContentRetention: "metadata",
+ Endpoint: "http://127.0.0.1:4317",
+ UserMode: true,
})
if err != nil {
t.Fatalf("ConfigureGemini returned error: %v", err)
@@ -400,11 +397,11 @@ func TestConfigureGeminiDisablesPromptLoggingForMetadataRetention(t *testing.T)
t.Fatalf("unmarshal gemini config: %v", err)
}
telemetry := settings["telemetry"]
- if telemetry["logPrompts"] != false {
- t.Fatalf("metadata retention should disable prompt logging: %#v", telemetry)
+ if telemetry["logPrompts"] != true {
+ t.Fatalf("ConfigureGemini should enable prompt logging: %#v", telemetry)
}
- if telemetry["traces"] != false {
- t.Fatalf("metadata retention should disable detailed traces: %#v", telemetry)
+ if telemetry["traces"] != true {
+ t.Fatalf("ConfigureGemini should enable detailed traces: %#v", telemetry)
}
}
diff --git a/cli/beacon/internal/endpoint/integrations/cowork/cowork.go b/cli/beacon/internal/endpoint/integrations/cowork/cowork.go
index 6e0ce71c..c68e4084 100644
--- a/cli/beacon/internal/endpoint/integrations/cowork/cowork.go
+++ b/cli/beacon/internal/endpoint/integrations/cowork/cowork.go
@@ -74,7 +74,7 @@ Notes:
- Claude Cowork export is configured by a Team/Enterprise admin.
- Claude Desktop must be version %s or newer.
- The OTLP endpoint must be reachable by Claude Cowork. Use a public HTTPS collector or an authenticated tunnel for local testing.
-- Cowork may include prompt text and tool parameters. Beacon's collector writes configured content fields by default; choose metadata or redacted retention for stricter deployments.
+- Cowork may include prompt text and tool parameters. Beacon applies local redaction and size limits before writing endpoint events.
`, AdminURL, cfg.Endpoint, cfg.Protocol, headerText(cfg.Headers), resourceAttributesText(cfg.ResourceAttributes), MinVersion)
}
diff --git a/cli/beacon/internal/endpoint/inventory/inventory.go b/cli/beacon/internal/endpoint/inventory/inventory.go
index 945abec0..b2f3cba6 100644
--- a/cli/beacon/internal/endpoint/inventory/inventory.go
+++ b/cli/beacon/internal/endpoint/inventory/inventory.go
@@ -48,16 +48,13 @@ const (
StatusUnreadable = "unreadable"
StatusUnsupported = "unsupported"
- RedactionMetadata = "metadata"
- RedactionRedacted = "redacted"
- RedactionFull = "full"
+ RedactionFull = "full"
)
type Options struct {
- ContentRetention string
- HomeDir string
- WorkingDir string
- Now func() time.Time
+ HomeDir string
+ WorkingDir string
+ Now func() time.Time
}
type Result struct {
@@ -122,7 +119,7 @@ type candidate struct {
}
func Scan(opts Options) Result {
- redaction := normalizeRedaction(opts.ContentRetention)
+ redaction := RedactionFull
home := opts.HomeDir
if home == "" {
home, _ = os.UserHomeDir()
@@ -480,35 +477,15 @@ func dedupeServers(servers []MCPServer) []MCPServer {
return out
}
-func normalizeRedaction(retention string) string {
- switch retention {
- case RedactionMetadata:
- return RedactionMetadata
- case RedactionFull:
- return RedactionFull
- default:
- return RedactionRedacted
- }
-}
-
func valueForPath(value, redaction string) string {
- if redaction == RedactionMetadata {
- return ""
- }
return value
}
func valueForName(value, redaction string) string {
- if redaction == RedactionMetadata {
- return ""
- }
return value
}
func valuesForEnvKeys(keys []string, redaction string) []string {
- if redaction != RedactionRedacted && redaction != RedactionFull {
- return nil
- }
out := make([]string, 0, len(keys))
for _, key := range keys {
if safeEnvKey(key) {
diff --git a/cli/beacon/internal/endpoint/inventory/inventory_test.go b/cli/beacon/internal/endpoint/inventory/inventory_test.go
index 3153edfb..3917f231 100644
--- a/cli/beacon/internal/endpoint/inventory/inventory_test.go
+++ b/cli/beacon/internal/endpoint/inventory/inventory_test.go
@@ -37,10 +37,9 @@ GITHUB_TOKEN = "secret"
}`)
result := Scan(Options{
- ContentRetention: RedactionRedacted,
- HomeDir: home,
- WorkingDir: work,
- Now: fixedNow,
+ HomeDir: home,
+ WorkingDir: work,
+ Now: fixedNow,
})
if got, want := len(result.MCPServers), 3; got != want {
@@ -73,7 +72,7 @@ GITHUB_TOKEN = "secret"
}
}
-func TestMetadataRedactionOmitsNamesAndPaths(t *testing.T) {
+func TestScanIncludesNamesAndPaths(t *testing.T) {
home := t.TempDir()
work := t.TempDir()
writeFile(t, filepath.Join(home, ".claude", "settings.json"), `{
@@ -83,25 +82,24 @@ func TestMetadataRedactionOmitsNamesAndPaths(t *testing.T) {
}`)
result := Scan(Options{
- ContentRetention: RedactionMetadata,
- HomeDir: home,
- WorkingDir: work,
- Now: fixedNow,
+ HomeDir: home,
+ WorkingDir: work,
+ Now: fixedNow,
})
if len(result.MCPServers) != 1 {
t.Fatalf("MCPServers len = %d, want 1", len(result.MCPServers))
}
server := result.MCPServers[0]
- if server.ServerName != "" || server.CommandName != "" || server.SourcePath != "" || len(server.EnvKeys) != 0 {
- t.Fatalf("metadata server leaked redacted fields: %#v", server)
+ if server.ServerName != "filesystem" || server.CommandName != "npx" || server.SourcePath == "" || len(server.EnvKeys) != 1 {
+ t.Fatalf("server missing full inventory fields: %#v", server)
}
if server.ServerNameHash == "" || server.CommandNameHash == "" || server.SourcePathHash == "" || server.DefinitionHash == "" {
- t.Fatalf("metadata server missing hashes: %#v", server)
+ t.Fatalf("server missing hashes: %#v", server)
}
for _, config := range result.Configs {
- if config.Exists && config.Path != "" {
- t.Fatalf("metadata config leaked path: %#v", config)
+ if config.Exists && config.Path == "" {
+ t.Fatalf("config missing path: %#v", config)
}
}
}
@@ -116,10 +114,9 @@ command = "gh"
`)
result := Scan(Options{
- ContentRetention: RedactionRedacted,
- HomeDir: home,
- WorkingDir: work,
- Now: fixedNow,
+ HomeDir: home,
+ WorkingDir: work,
+ Now: fixedNow,
})
var malformedFound bool
@@ -139,10 +136,9 @@ command = "gh"
func TestMissingCandidatesAreReportedAsNotFound(t *testing.T) {
result := Scan(Options{
- ContentRetention: RedactionRedacted,
- HomeDir: t.TempDir(),
- WorkingDir: t.TempDir(),
- Now: fixedNow,
+ HomeDir: t.TempDir(),
+ WorkingDir: t.TempDir(),
+ Now: fixedNow,
})
if len(result.Configs) == 0 {
t.Fatal("expected candidate config results")
@@ -166,10 +162,9 @@ func TestScanIncludesAllSupportedCurrentUserAndProjectConfigs(t *testing.T) {
t.Setenv("SHELL", "/bin/bash")
result := Scan(Options{
- ContentRetention: RedactionRedacted,
- HomeDir: home,
- WorkingDir: work,
- Now: fixedNow,
+ HomeDir: home,
+ WorkingDir: work,
+ Now: fixedNow,
})
expected := []candidate{
@@ -234,10 +229,9 @@ mcpServers:
writeFile(t, filepath.Join(home, ".zshrc"), `export OTEL_TELEMETRY_ENDPOINT=http://127.0.0.1:4318`)
result := Scan(Options{
- ContentRetention: RedactionRedacted,
- HomeDir: home,
- WorkingDir: work,
- Now: fixedNow,
+ HomeDir: home,
+ WorkingDir: work,
+ Now: fixedNow,
})
assertServer(t, result.MCPServers, "hermes", "memory", TransportStdio, true, 1, 0, 0)
@@ -325,10 +319,9 @@ func TestCopilotManagedDetectionFalsePositives(t *testing.T) {
writeFile(t, filepath.Join(home, ".zshrc"), tc.content)
result := Scan(Options{
- ContentRetention: RedactionRedacted,
- HomeDir: home,
- WorkingDir: work,
- Now: fixedNow,
+ HomeDir: home,
+ WorkingDir: work,
+ Now: fixedNow,
})
copilotProfile := findConfig(result.Configs, "copilot_cli", filepath.Join(home, ".zshrc"))
diff --git a/cli/beacon/internal/endpoint/lifecycle/lifecycle.go b/cli/beacon/internal/endpoint/lifecycle/lifecycle.go
index d67d0edc..7e46c154 100644
--- a/cli/beacon/internal/endpoint/lifecycle/lifecycle.go
+++ b/cli/beacon/internal/endpoint/lifecycle/lifecycle.go
@@ -32,7 +32,6 @@ type InstallOptions struct {
HTTPPort int
CollectorPath string
StartService bool
- ContentRetention endpointconfig.ContentRetention
IncludeRuntimeMetrics bool
IncludeCodexSpans bool
SplunkHEC *endpointconfig.SplunkHEC
@@ -363,9 +362,6 @@ func buildConfig(opts InstallOptions) endpointconfig.Config {
cfg.Collector.BinaryPath = opts.CollectorPath
cfg.Collector.IncludeRuntimeMetrics = opts.IncludeRuntimeMetrics
cfg.Collector.IncludeCodexSpans = opts.IncludeCodexSpans
- if opts.ContentRetention != "" {
- cfg.ContentRetention = opts.ContentRetention
- }
if opts.SplunkHEC != nil {
if cfg.Destinations == nil {
cfg.Destinations = &endpointconfig.Destinations{}
@@ -463,9 +459,6 @@ func restoreFile(path string, snapshot fileSnapshot) {
}
func preflight(cfg endpointconfig.Config, startService bool) error {
- if err := endpointconfig.ValidateContentRetention(cfg.ContentRetention); err != nil {
- return err
- }
if err := endpointconfig.ValidateDestinations(cfg.Destinations); err != nil {
return err
}
@@ -506,19 +499,19 @@ func configureHarnesses(cfg endpointconfig.Config) ([]string, error) {
for _, name := range cfg.Harnesses {
switch name {
case "claude", "claude_code":
- path, err := harness.ConfigureClaude(harness.ConfigureOptions{Endpoint: grpcEndpoint, UserMode: cfg.UserMode, ContentRetention: string(cfg.ContentRetention)})
+ path, err := harness.ConfigureClaude(harness.ConfigureOptions{Endpoint: grpcEndpoint, UserMode: cfg.UserMode})
if err != nil {
return paths, err
}
paths = append(paths, path)
case "codex", "codex_cli":
- path, err := harness.ConfigureCodex(harness.ConfigureOptions{Endpoint: grpcEndpoint, UserMode: cfg.UserMode, ContentRetention: string(cfg.ContentRetention)})
+ path, err := harness.ConfigureCodex(harness.ConfigureOptions{Endpoint: grpcEndpoint, UserMode: cfg.UserMode})
if err != nil {
return paths, err
}
paths = append(paths, path)
case "gemini", "gemini_cli":
- path, err := harness.ConfigureGemini(harness.ConfigureOptions{Endpoint: grpcEndpoint, UserMode: cfg.UserMode, ContentRetention: string(cfg.ContentRetention)})
+ path, err := harness.ConfigureGemini(harness.ConfigureOptions{Endpoint: grpcEndpoint, UserMode: cfg.UserMode})
if err != nil {
return paths, err
}
diff --git a/cli/beacon/internal/endpoint/lifecycle/lifecycle_test.go b/cli/beacon/internal/endpoint/lifecycle/lifecycle_test.go
index 6ab74dad..d0abb03a 100644
--- a/cli/beacon/internal/endpoint/lifecycle/lifecycle_test.go
+++ b/cli/beacon/internal/endpoint/lifecycle/lifecycle_test.go
@@ -201,9 +201,8 @@ func TestConfigureHarnessesAcceptsGemini(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
cfg := endpointconfig.Config{
- UserMode: true,
- Harnesses: []string{"gemini"},
- ContentRetention: endpointconfig.ContentRetentionMetadata,
+ UserMode: true,
+ Harnesses: []string{"gemini"},
Collector: endpointconfig.Collector{
GRPCPort: 54317,
},
@@ -222,8 +221,8 @@ func TestConfigureHarnessesAcceptsGemini(t *testing.T) {
t.Fatalf("read Gemini settings: %v", err)
}
text := string(data)
- if !strings.Contains(text, `"otlpEndpoint": "http://127.0.0.1:54317"`) || !strings.Contains(text, `"logPrompts": false`) {
- t.Fatalf("Gemini settings were not configured for metadata retention:\n%s", text)
+ if !strings.Contains(text, `"otlpEndpoint": "http://127.0.0.1:54317"`) || !strings.Contains(text, `"logPrompts": true`) {
+ t.Fatalf("Gemini settings were not configured for local OTLP with prompt logging:\n%s", text)
}
}
@@ -585,10 +584,9 @@ func TestConfigureHarnessesAcceptsClaude(t *testing.T) {
home := t.TempDir()
t.Setenv("HOME", home)
cfg := endpointconfig.Config{
- UserMode: true,
- Harnesses: []string{"claude"},
- ContentRetention: endpointconfig.ContentRetentionFull,
- Collector: endpointconfig.Collector{GRPCPort: 54317},
+ UserMode: true,
+ Harnesses: []string{"claude"},
+ Collector: endpointconfig.Collector{GRPCPort: 54317},
}
paths, err := configureHarnesses(cfg)
@@ -642,13 +640,12 @@ func TestLoadOrDefaultFallsBackToDefaultThenLoadsSavedConfig(t *testing.T) {
// Persist a config and confirm it is loaded back.
saved := endpointconfig.Default(true, filepath.Join(home, "saved.jsonl"))
- saved.ContentRetention = endpointconfig.ContentRetentionMetadata
if _, err := endpointconfig.Save(saved); err != nil {
t.Fatalf("Save returned error: %v", err)
}
loaded := loadOrDefault(true, "")
- if loaded.ContentRetention != endpointconfig.ContentRetentionMetadata {
- t.Fatalf("loaded ContentRetention = %q, want metadata", loaded.ContentRetention)
+ if loaded.LogPath != saved.LogPath {
+ t.Fatalf("loaded LogPath = %q, want %q", loaded.LogPath, saved.LogPath)
}
// An explicit log path overrides the saved value.
overridden := loadOrDefault(true, logPath)
@@ -703,7 +700,7 @@ func TestInstallRollbackTracksAndRestoresFiles(t *testing.T) {
rollback := newInstallRollback(service.Manager{UserMode: true})
rollback.Track(existing)
rollback.Track(created)
- rollback.Track("") // ignored
+ rollback.Track("") // ignored
rollback.Track(existing) // de-duplicated
if err := os.WriteFile(existing, []byte("after"), 0640); err != nil {
diff --git a/cli/beacon/internal/endpoint/rapid7/pack/README.md b/cli/beacon/internal/endpoint/rapid7/pack/README.md
index 0fc8dc0b..b8e3cf1a 100644
--- a/cli/beacon/internal/endpoint/rapid7/pack/README.md
+++ b/cli/beacon/internal/endpoint/rapid7/pack/README.md
@@ -125,9 +125,8 @@ You can also confirm normalized Beacon fields are present:
vendor=beacon product=endpoint-agent destination.type=rapid7
```
-## Content Retention
+## Content Handling
-Beacon content retention defaults to `full`, so prompt text, tool input, command
-output, raw tool payloads, and other retained content may be forwarded to
-Rapid7. Use Beacon's `metadata` or `redacted` content retention modes for
-stricter deployments.
+Beacon forwards retained prompt text, tool input, command output, raw tool
+payloads, and related local telemetry to Rapid7 subject to Beacon's secret
+redaction, sanitization, truncation, and event-size limits.
diff --git a/cli/beacon/internal/endpoint/rapid7/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/rapid7/pack/sample-event.jsonl
index a2c4fdee..9a76f3cf 100644
--- a/cli/beacon/internal/endpoint/rapid7/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/rapid7/pack/sample-event.jsonl
@@ -1,6 +1,6 @@
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"rapid7","mode":"custom_logs_webhook","status":"configured"},"message":"Beacon endpoint Rapid7 validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"rapid7","mode":"custom_logs_webhook_ndjson","status":"configured"},"message":"Beacon endpoint Rapid7 validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
diff --git a/cli/beacon/internal/endpoint/rapid7/rapid7_test.go b/cli/beacon/internal/endpoint/rapid7/rapid7_test.go
index 8e227fd4..4c2fe607 100644
--- a/cli/beacon/internal/endpoint/rapid7/rapid7_test.go
+++ b/cli/beacon/internal/endpoint/rapid7/rapid7_test.go
@@ -134,7 +134,7 @@ func TestPackREADMEMentionsRapid7SetupAndProductionForwarding(t *testing.T) {
"vector.toml",
"customer-managed host-agent",
"without a Vector wrapper",
- "content retention",
+ "Content Handling",
"/var/log/beacon-agent/runtime.jsonl",
} {
if !strings.Contains(readme, want) {
diff --git a/cli/beacon/internal/endpoint/s3/pack/README.md b/cli/beacon/internal/endpoint/s3/pack/README.md
index 6dba692d..437f38a0 100644
--- a/cli/beacon/internal/endpoint/s3/pack/README.md
+++ b/cli/beacon/internal/endpoint/s3/pack/README.md
@@ -155,9 +155,8 @@ Expected validation fields:
vendor=beacon product=endpoint-agent destination.type=s3 destination.mode=aws_s3_jsonl
```
-## Content Retention
+## Content Handling
-Beacon content retention defaults to `full`, so prompt text, tool input, command
-output, raw tool payloads, and other retained content may be forwarded to S3.
-Use Beacon's `metadata` or `redacted` content retention modes for stricter
-deployments.
+Beacon forwards retained prompt text, tool input, command output, raw tool
+payloads, and related local telemetry to S3 subject to Beacon's secret
+redaction, sanitization, truncation, and event-size limits.
diff --git a/cli/beacon/internal/endpoint/s3/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/s3/pack/sample-event.jsonl
index 0792cef3..67a9c73f 100644
--- a/cli/beacon/internal/endpoint/s3/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/s3/pack/sample-event.jsonl
@@ -1,3 +1,3 @@
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"s3","mode":"aws_s3_jsonl","status":"configured"},"message":"Beacon endpoint S3 validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
diff --git a/cli/beacon/internal/endpoint/s3/s3_test.go b/cli/beacon/internal/endpoint/s3/s3_test.go
index 4f4cab61..62717b73 100644
--- a/cli/beacon/internal/endpoint/s3/s3_test.go
+++ b/cli/beacon/internal/endpoint/s3/s3_test.go
@@ -147,7 +147,7 @@ func TestPackREADMEMentionsS3SetupAndProductionForwarding(t *testing.T) {
"vector.toml",
"customer-managed host-agent",
"without a Vector wrapper",
- "content retention",
+ "Content Handling",
"/var/log/beacon-agent/runtime.jsonl",
"Beacon does not store AWS credentials",
"server-side encryption",
diff --git a/cli/beacon/internal/endpoint/schema/event.go b/cli/beacon/internal/endpoint/schema/event.go
index e6801db3..b7a5cf7b 100644
--- a/cli/beacon/internal/endpoint/schema/event.go
+++ b/cli/beacon/internal/endpoint/schema/event.go
@@ -65,10 +65,4 @@ type Event = asymptotetrace.Event
type NewEventOptions = asymptotetrace.NewEventOptions
type Envelope = asymptotetrace.Envelope
-const (
- ContentRetentionMetadata = asymptotetrace.ContentRetentionMetadata
- ContentRetentionRedacted = asymptotetrace.ContentRetentionRedacted
- ContentRetentionFull = asymptotetrace.ContentRetentionFull
-)
-
var NewEvent = asymptotetrace.NewEvent
diff --git a/cli/beacon/internal/endpoint/schema/event_test.go b/cli/beacon/internal/endpoint/schema/event_test.go
index f9ee0a15..f2a7fab8 100644
--- a/cli/beacon/internal/endpoint/schema/event_test.go
+++ b/cli/beacon/internal/endpoint/schema/event_test.go
@@ -38,25 +38,20 @@ func TestNewEventSetsRequiredInvariants(t *testing.T) {
event.Command = &CommandInfo{Command: "go test ./..."}
event.MCP = &MCPInfo{Server: "github", Tool: "get_issue"}
event.Prompt = &PromptInfo{Text: "Summarize this file"}
- event.Content = &ContentInfo{Retention: ContentRetentionFull, Included: true}
if err := event.Validate(); err != nil {
t.Fatalf("Validate rejected optional telemetry fields: %v", err)
}
}
-func TestValidateContentRetentionValues(t *testing.T) {
- for _, retention := range []string{ContentRetentionMetadata, ContentRetentionRedacted, ContentRetentionFull} {
- t.Run(retention, func(t *testing.T) {
- event := NewEvent(NewEventOptions{
- Action: "tool.invoked",
- Harness: HarnessInfo{Name: "cursor"},
- })
- event.Content = &ContentInfo{Retention: retention, Included: retention != ContentRetentionMetadata}
+func TestValidateToleratesHistoricalContentField(t *testing.T) {
+ event := NewEvent(NewEventOptions{
+ Action: "tool.invoked",
+ Harness: HarnessInfo{Name: "cursor"},
+ })
+ event.Content = &ContentInfo{Retention: "metadata", Included: false}
- if err := event.Validate(); err != nil {
- t.Fatalf("Validate rejected retention %q: %v", retention, err)
- }
- })
+ if err := event.Validate(); err != nil {
+ t.Fatalf("Validate rejected historical content field: %v", err)
}
}
@@ -107,11 +102,6 @@ func TestValidateRejectsMissingOrInvalidRequiredFields(t *testing.T) {
edit: func(e *Event) { e.Harness.Name = "" },
want: "harness.name is required",
},
- {
- name: "content retention",
- edit: func(e *Event) { e.Content = &ContentInfo{Retention: "raw", Included: true} },
- want: "content.retention must be metadata, redacted, or full",
- },
}
for _, tt := range tests {
diff --git a/cli/beacon/internal/endpoint/sentinel/pack/README.md b/cli/beacon/internal/endpoint/sentinel/pack/README.md
index bc2a8fe5..02eb048a 100644
--- a/cli/beacon/internal/endpoint/sentinel/pack/README.md
+++ b/cli/beacon/internal/endpoint/sentinel/pack/README.md
@@ -73,8 +73,7 @@ The target table must exist before the DCR can route transformed records to it.
Use `queries.kql` for validation and starter hunting queries. Use
`detections.kql` as example analytics rule logic; review and tune thresholds,
-repository names, content retention policy, and severity mappings before
-enabling alerts in production.
+repository names, and severity mappings before enabling alerts in production.
## CEF and Syslog
@@ -93,9 +92,8 @@ credentials, DCR identifiers, ingestion endpoints, batching, retries, and
network failure handling. Keep those concerns outside Beacon's local endpoint
collector unless you are building a separate managed forwarder.
-## Content Retention
+## Content Handling
-Beacon content retention defaults to `full`, so prompt text, tool input, command
-output, raw tool payloads, and other retained content may be forwarded to
-Microsoft Sentinel. Use Beacon's `metadata` or `redacted` content retention
-modes for stricter deployments.
+Beacon forwards retained prompt text, tool input, command output, raw tool
+payloads, and related local telemetry to Microsoft Sentinel subject to Beacon's
+secret redaction, sanitization, truncation, and event-size limits.
diff --git a/cli/beacon/internal/endpoint/sentinel/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/sentinel/pack/sample-event.jsonl
index 4011f1bf..43070fe3 100644
--- a/cli/beacon/internal/endpoint/sentinel/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/sentinel/pack/sample-event.jsonl
@@ -1,3 +1,3 @@
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"sentinel","mode":"azure_monitor_agent_custom_json_logs","status":"configured"},"message":"Beacon endpoint Sentinel validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
diff --git a/cli/beacon/internal/endpoint/sentinel/pack/table-schema.json b/cli/beacon/internal/endpoint/sentinel/pack/table-schema.json
index 49921816..c2ebedc6 100644
--- a/cli/beacon/internal/endpoint/sentinel/pack/table-schema.json
+++ b/cli/beacon/internal/endpoint/sentinel/pack/table-schema.json
@@ -21,7 +21,6 @@
{ "name": "Repository", "type": "string" },
{ "name": "Branch", "type": "string" },
{ "name": "Message", "type": "string" },
- { "name": "ContentRetention", "type": "string" },
{ "name": "RawData", "type": "dynamic" }
]
}
diff --git a/cli/beacon/internal/endpoint/sentinel/sentinel_test.go b/cli/beacon/internal/endpoint/sentinel/sentinel_test.go
index 5413a6ab..3b3e495f 100644
--- a/cli/beacon/internal/endpoint/sentinel/sentinel_test.go
+++ b/cli/beacon/internal/endpoint/sentinel/sentinel_test.go
@@ -133,7 +133,7 @@ func TestPackREADMEMentionsSentinelSetupAndSecretBoundaries(t *testing.T) {
"Data Collection Rule",
"BeaconRuntime_CL",
"Microsoft Sentinel",
- "content retention",
+ "Content Handling",
"/var/log/beacon-agent/runtime.jsonl",
"not in Beacon endpoint configuration",
"Direct Logs Ingestion API",
diff --git a/cli/beacon/internal/endpoint/sumo/pack/README.md b/cli/beacon/internal/endpoint/sumo/pack/README.md
index e7e578fe..89faff58 100644
--- a/cli/beacon/internal/endpoint/sumo/pack/README.md
+++ b/cli/beacon/internal/endpoint/sumo/pack/README.md
@@ -141,9 +141,8 @@ _sourceCategory=security/agentbeacon product=agentbeacon telemetry=ai_agent
_sourceCategory=security/agentbeacon "Beacon endpoint Sumo validation event"
```
-## Content Retention
+## Content Handling
-Beacon content retention defaults to `full`, so prompt text, tool input, command
-output, raw tool payloads, and other retained content may be forwarded to Sumo.
-Use Beacon's `metadata` or `redacted` content retention modes for stricter
-deployments.
+Beacon forwards retained prompt text, tool input, command output, raw tool
+payloads, and related local telemetry to Sumo subject to Beacon's secret
+redaction, sanitization, truncation, and event-size limits.
diff --git a/cli/beacon/internal/endpoint/sumo/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/sumo/pack/sample-event.jsonl
index 63efece1..3545435b 100644
--- a/cli/beacon/internal/endpoint/sumo/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/sumo/pack/sample-event.jsonl
@@ -1,3 +1,3 @@
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"sumo","mode":"http_source_jsonl","status":"configured"},"message":"Beacon endpoint Sumo validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"content":{"retention":"full","included":true},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
-{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"content":{"retention":"full","included":true},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user","uid":"501"},"harness":{"name":"cursor","version":"0.50.0"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./...","path":"/bin/zsh"},"command":{"command":"go test ./...","exit_code":0,"duration_ms":1234},"repository":"file:///Users/local-user/repo","branch":"main","message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:22:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"metric.observed","category":"metric"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"codex_cli"},"raw":{"otel_signal":"metrics","metric_name":"codex.tool.call.duration_ms","metric_description":"Codex tool call duration","metric_unit":"ms","attributes":{"service.name":"codex","session.id":"conversation-2"}},"message":"codex.tool.call.duration_ms"}
diff --git a/cli/beacon/internal/endpoint/sumo/sumo_test.go b/cli/beacon/internal/endpoint/sumo/sumo_test.go
index c7e2b748..56c5984a 100644
--- a/cli/beacon/internal/endpoint/sumo/sumo_test.go
+++ b/cli/beacon/internal/endpoint/sumo/sumo_test.go
@@ -140,7 +140,7 @@ func TestPackREADMEMentionsSumoSetupAndProductionForwarding(t *testing.T) {
"customer-managed host-agent",
"SUMO_URL",
"without a Vector wrapper",
- "content retention",
+ "Content Handling",
"/var/log/beacon-agent/runtime.jsonl",
} {
if !strings.Contains(readme, want) {
diff --git a/cli/beacon/internal/endpoint/wazuh/pack/sample-event.jsonl b/cli/beacon/internal/endpoint/wazuh/pack/sample-event.jsonl
index 541e46bc..0a4d81c6 100644
--- a/cli/beacon/internal/endpoint/wazuh/pack/sample-event.jsonl
+++ b/cli/beacon/internal/endpoint/wazuh/pack/sample-event.jsonl
@@ -1,2 +1,2 @@
{"timestamp":"2026-05-11T22:20:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"agent.detected","category":"validation"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"test_harness","version":"test"},"destination":{"type":"wazuh","mode":"localfile","status":"configured"},"message":"Beacon endpoint Wazuh validation event"}
-{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"cursor"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./..."},"command":{"command":"go test ./..."},"content":{"retention":"full","included":true},"message":"Shell command executed"}
+{"timestamp":"2026-05-11T22:21:00Z","vendor":"beacon","product":"endpoint-agent","schema_version":"1.0","event":{"kind":"agent_runtime","action":"command.executed","category":"command"},"severity":"info","endpoint":{"hostname":"example-mac","os":"darwin","agent_version":"0.1.0"},"user":{"name":"local-user"},"harness":{"name":"cursor"},"session":{"id":"conversation-1","working_directory":"/Users/local-user/repo"},"tool":{"name":"Shell","command":"go test ./..."},"command":{"command":"go test ./..."},"message":"Shell command executed"}
diff --git a/cli/beacon/internal/endpoint/wazuh/wazuh_test.go b/cli/beacon/internal/endpoint/wazuh/wazuh_test.go
index 99fd4b31..b549494e 100644
--- a/cli/beacon/internal/endpoint/wazuh/wazuh_test.go
+++ b/cli/beacon/internal/endpoint/wazuh/wazuh_test.go
@@ -37,8 +37,11 @@ func TestRulesCoverAgentWorkflowActions(t *testing.T) {
}
}
sample := mustRead("pack/sample-event.jsonl")
- if !strings.Contains(sample, `"content":{"retention":"full","included":true}`) {
- t.Fatalf("sample event missing full retention: %s", sample)
+ if !strings.Contains(sample, `"action":"command.executed"`) {
+ t.Fatalf("sample event missing command action: %s", sample)
+ }
+ if strings.Contains(sample, `"content":{"retention"`) {
+ t.Fatalf("sample event should not include retention marker: %s", sample)
}
}
diff --git a/collector-builder/exporter/beaconjsonexporter/config.go b/collector-builder/exporter/beaconjsonexporter/config.go
index b91065cb..5807160b 100644
--- a/collector-builder/exporter/beaconjsonexporter/config.go
+++ b/collector-builder/exporter/beaconjsonexporter/config.go
@@ -10,11 +10,12 @@ const (
// Config controls local JSONL export for Beacon endpoint events.
type Config struct {
- Path string `mapstructure:"path"`
- MaxEventBytes int `mapstructure:"max_event_bytes"`
- RotateBytes int64 `mapstructure:"rotate_bytes"`
- RotateArchives int `mapstructure:"rotate_archives"`
- RedactSecrets bool `mapstructure:"redact_secrets"`
+ Path string `mapstructure:"path"`
+ MaxEventBytes int `mapstructure:"max_event_bytes"`
+ RotateBytes int64 `mapstructure:"rotate_bytes"`
+ RotateArchives int `mapstructure:"rotate_archives"`
+ RedactSecrets bool `mapstructure:"redact_secrets"`
+ // Deprecated no-op retained so older generated collector configs still load.
ContentRetention string `mapstructure:"content_retention"`
IncludeRuntimeMetrics bool `mapstructure:"include_runtime_metrics"`
IncludeCodexSpans bool `mapstructure:"include_codex_spans"`
@@ -22,11 +23,10 @@ type Config struct {
func createDefaultConfig() *Config {
return &Config{
- MaxEventBytes: defaultMaxEventBytes,
- RotateBytes: defaultRotateBytes,
- RotateArchives: defaultRotateArchives,
- RedactSecrets: true,
- ContentRetention: "full",
+ MaxEventBytes: defaultMaxEventBytes,
+ RotateBytes: defaultRotateBytes,
+ RotateArchives: defaultRotateArchives,
+ RedactSecrets: true,
}
}
@@ -37,10 +37,5 @@ func (c *Config) Validate() error {
if c.MaxEventBytes <= 0 {
return fmt.Errorf("max_event_bytes must be positive")
}
- switch c.ContentRetention {
- case "", "metadata", "redacted", "full":
- return nil
- default:
- return fmt.Errorf("content_retention must be metadata, redacted, or full")
- }
+ return nil
}
diff --git a/collector-builder/exporter/beaconjsonexporter/exporter.go b/collector-builder/exporter/beaconjsonexporter/exporter.go
index 65bbe16b..74be3c60 100644
--- a/collector-builder/exporter/beaconjsonexporter/exporter.go
+++ b/collector-builder/exporter/beaconjsonexporter/exporter.go
@@ -44,9 +44,6 @@ func newExporter(raw component.Config, set exporter.Settings) (*beaconExporter,
if cfg.RotateArchives <= 0 {
cfg.RotateArchives = defaultRotateArchives
}
- if cfg.ContentRetention == "" {
- cfg.ContentRetention = "full"
- }
if err := cfg.Validate(); err != nil {
return nil, err
}
@@ -61,7 +58,6 @@ func newExporter(raw component.Config, set exporter.Settings) (*beaconExporter,
},
logger: set.Logger,
converter: beaconevent.NewConverter(beaconevent.Options{
- ContentRetention: cfg.ContentRetention,
IncludeRuntimeMetrics: cfg.IncludeRuntimeMetrics,
IncludeCodexSpans: cfg.IncludeCodexSpans,
}),
@@ -150,7 +146,6 @@ func (e *beaconExporter) eventConverter() beaconevent.Converter {
return beaconevent.NewConverter(beaconevent.Options{})
}
return beaconevent.NewConverter(beaconevent.Options{
- ContentRetention: e.cfg.ContentRetention,
IncludeRuntimeMetrics: e.cfg.IncludeRuntimeMetrics,
IncludeCodexSpans: e.cfg.IncludeCodexSpans,
})
diff --git a/collector-builder/exporter/beaconjsonexporter/exporter_test.go b/collector-builder/exporter/beaconjsonexporter/exporter_test.go
index 60a1f252..f4983e18 100644
--- a/collector-builder/exporter/beaconjsonexporter/exporter_test.go
+++ b/collector-builder/exporter/beaconjsonexporter/exporter_test.go
@@ -28,10 +28,10 @@ func TestConfigValidateRequiresPath(t *testing.T) {
}
}
-func TestDefaultConfigUsesFullRetention(t *testing.T) {
+func TestDefaultConfigLeavesLegacyRetentionUnset(t *testing.T) {
cfg := createDefaultConfig()
- if cfg.ContentRetention != "full" {
- t.Fatalf("ContentRetention = %q, want full", cfg.ContentRetention)
+ if cfg.ContentRetention != "" {
+ t.Fatalf("ContentRetention = %q, want empty legacy no-op", cfg.ContentRetention)
}
}
@@ -45,7 +45,7 @@ func TestDefaultConfigUsesBoundedRotation(t *testing.T) {
}
}
-func TestNewExporterDefaultsEmptyRetentionToFull(t *testing.T) {
+func TestNewExporterAcceptsEmptyLegacyRetention(t *testing.T) {
cfg := &Config{
Path: filepath.Join(t.TempDir(), "runtime.jsonl"),
MaxEventBytes: defaultMaxEventBytes,
@@ -56,8 +56,8 @@ func TestNewExporterDefaultsEmptyRetentionToFull(t *testing.T) {
if err != nil {
t.Fatalf("newExporter returned error: %v", err)
}
- if exp.cfg.ContentRetention != "full" {
- t.Fatalf("ContentRetention = %q, want full", exp.cfg.ContentRetention)
+ if exp.cfg.ContentRetention != "" {
+ t.Fatalf("ContentRetention = %q, want empty legacy no-op", exp.cfg.ContentRetention)
}
}
@@ -274,7 +274,7 @@ func TestConsumeLogsMapsPromptForFullRetention(t *testing.T) {
}
}
-func TestMetadataRetentionOmitsTypedPrompt(t *testing.T) {
+func TestLegacyMetadataRetentionDoesNotOmitTypedPrompt(t *testing.T) {
exp, err := newExporter(&Config{
Path: filepath.Join(t.TempDir(), "runtime.jsonl"),
MaxEventBytes: defaultMaxEventBytes,
@@ -296,8 +296,11 @@ func TestMetadataRetentionOmitsTypedPrompt(t *testing.T) {
}
event := exp.eventFromLog(nil, record)
- if event.Prompt != nil {
- t.Fatalf("metadata retention should omit prompt: %#v", event.Prompt)
+ if event.Prompt == nil || event.Prompt.Text != "summarize this file" {
+ t.Fatalf("legacy metadata retention should not omit prompt: %#v", event.Prompt)
+ }
+ if event.Content != nil {
+ t.Fatalf("legacy metadata retention should not emit content marker: %#v", event.Content)
}
}
@@ -866,7 +869,7 @@ func TestCodexToolResultExtractsShellCommand(t *testing.T) {
}
}
-func TestMetadataRetentionOmitsCodexPromptMessage(t *testing.T) {
+func TestLegacyMetadataRetentionDoesNotOmitCodexPromptMessage(t *testing.T) {
exp, err := newExporter(&Config{
Path: filepath.Join(t.TempDir(), "runtime.jsonl"),
MaxEventBytes: defaultMaxEventBytes,
@@ -884,14 +887,14 @@ func TestMetadataRetentionOmitsCodexPromptMessage(t *testing.T) {
rec.Attributes().PutStr("prompt", "do not leak token=codex-secret")
event := exp.eventFromLog(nil, rec)
- if event.Prompt != nil {
- t.Fatalf("metadata retention should omit prompt: %#v", event.Prompt)
+ if event.Prompt == nil || !strings.Contains(event.Prompt.Text, "do not leak") {
+ t.Fatalf("legacy metadata retention should not omit prompt: %#v", event.Prompt)
}
- if strings.Contains(event.Message, "do not leak") || strings.Contains(event.Message, "codex-secret") {
- t.Fatalf("metadata retention leaked prompt in message: %q", event.Message)
+ if strings.Contains(event.Message, "codex-secret") {
+ t.Fatalf("message leaked unredacted prompt secret: %q", event.Message)
}
- if event.Message != "Codex prompt submitted" {
- t.Fatalf("message = %q, want metadata-safe placeholder", event.Message)
+ if event.Content != nil {
+ t.Fatalf("legacy metadata retention should not emit content marker: %#v", event.Content)
}
}
@@ -1028,7 +1031,7 @@ func TestInferActionMapsGeminiApprovalEvents(t *testing.T) {
}
}
-func TestMetadataRetentionDropsRawAttributes(t *testing.T) {
+func TestLegacyMetadataRetentionKeepsRawAttributes(t *testing.T) {
exp, err := newExporter(&Config{
Path: filepath.Join(t.TempDir(), "runtime.jsonl"),
MaxEventBytes: defaultMaxEventBytes,
@@ -1041,11 +1044,8 @@ func TestMetadataRetentionDropsRawAttributes(t *testing.T) {
}
raw := exp.rawPayload(map[string]interface{}{"prompt": "do a thing"}, map[string]interface{}{"otel_signal": "logs"})
- if _, ok := raw["attributes"]; ok {
- t.Fatalf("metadata retention should not include raw attributes: %#v", raw)
- }
- if raw["attribute_count"] != 1 {
- t.Fatalf("attribute count missing: %#v", raw)
+ if attrs, ok := raw["attributes"].(map[string]interface{}); !ok || attrs["prompt"] != "do a thing" {
+ t.Fatalf("legacy metadata retention should keep raw attributes: %#v", raw)
}
}
@@ -1172,7 +1172,7 @@ func TestHarnessNameSeparatesClaudeCodeAndCowork(t *testing.T) {
}
func TestCopilotSpanActions(t *testing.T) {
- exp := &beaconExporter{cfg: &Config{ContentRetention: "metadata"}}
+ exp := &beaconExporter{cfg: &Config{}}
tests := []struct {
name string
spanName string
diff --git a/collector-builder/exporter/beaconjsonexporter/falconhecexporter/config.go b/collector-builder/exporter/beaconjsonexporter/falconhecexporter/config.go
index 92f24e8e..a0786ca4 100644
--- a/collector-builder/exporter/beaconjsonexporter/falconhecexporter/config.go
+++ b/collector-builder/exporter/beaconjsonexporter/falconhecexporter/config.go
@@ -12,29 +12,29 @@ import (
const defaultTimeout = 10 * time.Second
type Config struct {
- Endpoint string `mapstructure:"endpoint"`
- Token string `mapstructure:"token"`
- Source string `mapstructure:"source"`
- Sourcetype string `mapstructure:"sourcetype"`
- Index string `mapstructure:"index"`
- InsecureSkipVerify bool `mapstructure:"insecure_skip_verify"`
- CAFile string `mapstructure:"ca_file"`
- Timeout time.Duration `mapstructure:"timeout"`
- QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"`
- RetrySettings configretry.BackOffConfig `mapstructure:"retry_on_failure"`
- ContentRetention string `mapstructure:"content_retention"`
- IncludeRuntimeMetrics bool `mapstructure:"include_runtime_metrics"`
- IncludeCodexSpans bool `mapstructure:"include_codex_spans"`
+ Endpoint string `mapstructure:"endpoint"`
+ Token string `mapstructure:"token"`
+ Source string `mapstructure:"source"`
+ Sourcetype string `mapstructure:"sourcetype"`
+ Index string `mapstructure:"index"`
+ InsecureSkipVerify bool `mapstructure:"insecure_skip_verify"`
+ CAFile string `mapstructure:"ca_file"`
+ Timeout time.Duration `mapstructure:"timeout"`
+ QueueSettings exporterhelper.QueueConfig `mapstructure:"sending_queue"`
+ RetrySettings configretry.BackOffConfig `mapstructure:"retry_on_failure"`
+ // Deprecated no-op retained so older generated collector configs still load.
+ ContentRetention string `mapstructure:"content_retention"`
+ IncludeRuntimeMetrics bool `mapstructure:"include_runtime_metrics"`
+ IncludeCodexSpans bool `mapstructure:"include_codex_spans"`
}
func createDefaultConfig() *Config {
queue := exporterhelper.NewDefaultQueueConfig()
queue.QueueSize = 256
return &Config{
- Timeout: defaultTimeout,
- QueueSettings: queue,
- RetrySettings: configretry.NewDefaultBackOffConfig(),
- ContentRetention: "full",
+ Timeout: defaultTimeout,
+ QueueSettings: queue,
+ RetrySettings: configretry.NewDefaultBackOffConfig(),
}
}
@@ -57,10 +57,5 @@ func (c *Config) Validate() error {
if err := c.RetrySettings.Validate(); err != nil {
return err
}
- switch c.ContentRetention {
- case "", "metadata", "redacted", "full":
- return nil
- default:
- return fmt.Errorf("content_retention must be metadata, redacted, or full")
- }
+ return nil
}
diff --git a/collector-builder/exporter/beaconjsonexporter/falconhecexporter/exporter.go b/collector-builder/exporter/beaconjsonexporter/falconhecexporter/exporter.go
index ab864a5f..bfd23c91 100644
--- a/collector-builder/exporter/beaconjsonexporter/falconhecexporter/exporter.go
+++ b/collector-builder/exporter/beaconjsonexporter/falconhecexporter/exporter.go
@@ -47,9 +47,6 @@ func newExporter(raw component.Config, set exporter.Settings) (*falconExporter,
if cfg.Timeout == 0 {
cfg.Timeout = defaultTimeout
}
- if cfg.ContentRetention == "" {
- cfg.ContentRetention = "full"
- }
if err := cfg.Validate(); err != nil {
return nil, err
}
@@ -62,7 +59,6 @@ func newExporter(raw component.Config, set exporter.Settings) (*falconExporter,
client: client,
logger: set.Logger,
converter: beaconevent.NewConverter(beaconevent.Options{
- ContentRetention: cfg.ContentRetention,
IncludeRuntimeMetrics: cfg.IncludeRuntimeMetrics,
IncludeCodexSpans: cfg.IncludeCodexSpans,
}),
diff --git a/collector-builder/exporter/beaconjsonexporter/internal/beaconevent/converter.go b/collector-builder/exporter/beaconjsonexporter/internal/beaconevent/converter.go
index 3eb7c158..e6f9c07e 100644
--- a/collector-builder/exporter/beaconjsonexporter/internal/beaconevent/converter.go
+++ b/collector-builder/exporter/beaconjsonexporter/internal/beaconevent/converter.go
@@ -42,7 +42,6 @@ var noisyCodexLogMessages = []string{
}
type Options struct {
- ContentRetention string
IncludeRuntimeMetrics bool
IncludeCodexSpans bool
}
@@ -52,9 +51,6 @@ type Converter struct {
}
func NewConverter(opts Options) Converter {
- if opts.ContentRetention == "" {
- opts.ContentRetention = "full"
- }
return Converter{opts: opts}
}
@@ -442,12 +438,11 @@ func (c Converter) PopulateCommon(event *Event, attrs map[string]interface{}) {
Reason: FirstString(attrs, "approval.reason", "policy.reason", "approval_mode", "active_approval_mode"),
}
}
- if c.opts.ContentRetention != "metadata" && event.Event.Category == "prompt" {
+ if event.Event.Category == "prompt" {
if text := FirstString(attrs, "gen_ai.prompt", "prompt", "user_prompt", "input.prompt", "copilot_chat.user_request"); text != "" {
event.Prompt = &PromptInfo{Text: text}
}
}
- event.Content = &ContentInfo{Retention: c.opts.ContentRetention, Included: c.opts.ContentRetention != "metadata", Redacted: c.opts.ContentRetention == "redacted"}
}
func populateRunContext(event *Event, attrs map[string]interface{}) {
@@ -482,10 +477,6 @@ func (c Converter) RawPayload(attrs map[string]interface{}, extra map[string]int
for k, v := range extra {
raw[k] = v
}
- if c.opts.ContentRetention == "metadata" {
- raw["attribute_count"] = len(attrs)
- return raw
- }
raw["attributes"] = attrs
return raw
}
diff --git a/packaging/macos/README.md b/packaging/macos/README.md
index 4ca7148f..c7564bd7 100644
--- a/packaging/macos/README.md
+++ b/packaging/macos/README.md
@@ -136,7 +136,6 @@ Environment variables take precedence, followed by MDM script parameters:
```text
BEACON_ENDPOINT_HARNESSES: default claude,codex
-BEACON_CONTENT_RETENTION: default full
BEACON_OTLP_GRPC_PORT: default 4317
BEACON_OTLP_HTTP_PORT: default 4318
BEACON_COLLECTOR: default /opt/beacon/bin/beacon-otelcol when present
@@ -164,19 +163,18 @@ export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:4318"
export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT="true"
```
-`OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` is optional and should
-match deployments that intentionally use Beacon's `full` content retention.
-Beacon validates Copilot CLI through endpoint discovery/status and normalizes
-events when the MDM-managed environment sends OTLP. Copilot CLI currently
-exports OTLP over HTTP, not gRPC.
+`OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` is optional. Beacon
+validates Copilot CLI through endpoint discovery/status and normalizes events
+when the MDM-managed environment sends OTLP. Copilot CLI currently exports OTLP
+over HTTP, not gRPC.
Recommended rollout:
1. Upload the signed/notarized package to a pilot group.
2. Confirm the LaunchDaemon is running and `beacon endpoint wazuh validate`
writes a validation event.
-3. Add inventory signals for version, service health, log freshness, retention,
- harnesses, and log writability.
+3. Add inventory signals for version, service health, log freshness, harnesses,
+ and log writability.
4. Scope repair/remediation to unhealthy devices.
5. Broaden deployment in stages after inventory and validation stay healthy.
@@ -268,18 +266,17 @@ Jamf script parameters:
```text
Parameter 4: harnesses, default claude,codex
-Parameter 5: content retention, default full
-Parameter 6: OTLP gRPC port, default 4317
-Parameter 7: OTLP HTTP port, default 4318
-Parameter 8: collector path, default /opt/beacon/bin/beacon-otelcol
-Parameter 9: no-start flag for install.sh only
-Parameter 10: Splunk HEC endpoint for install.sh only
-Parameter 11: Splunk HEC token for install.sh only
-Parameter 12: Splunk index for install.sh only
-Parameter 13: Splunk source for install.sh only
-Parameter 14: Splunk sourcetype for install.sh only
-Parameter 15: Splunk insecure TLS skip verify for install.sh only
-Parameter 16: Splunk CA file for install.sh only
+Parameter 5: OTLP gRPC port, default 4317
+Parameter 6: OTLP HTTP port, default 4318
+Parameter 7: collector path, default /opt/beacon/bin/beacon-otelcol
+Parameter 8: no-start flag for install.sh only
+Parameter 9: Splunk HEC endpoint for install.sh only
+Parameter 10: Splunk HEC token for install.sh only
+Parameter 11: Splunk index for install.sh only
+Parameter 12: Splunk source for install.sh only
+Parameter 13: Splunk sourcetype for install.sh only
+Parameter 14: Splunk insecure TLS skip verify for install.sh only
+Parameter 15: Splunk CA file for install.sh only
```
To opt in Gemini CLI telemetry through Jamf, include `gemini` in parameter 4,
@@ -313,7 +310,6 @@ Upload scripts from `packaging/macos/jamf/extension-attributes` to inventory:
- Beacon version
- Collector service health
- Last runtime event age in seconds
-- Content retention mode
- Configured harnesses
- Runtime log writability
- Splunk HEC forwarding state
@@ -323,7 +319,6 @@ Suggested Smart Groups:
- Beacon version is `not_installed`
- Collector service health is not `running`
- Last runtime event age is greater than `86400`
-- Content retention is not `full`
- Runtime log writability is not `writable` or `creatable`
### Jamf Validation
@@ -354,34 +349,32 @@ Fleet install script positional arguments:
```text
install.sh argument 1: harnesses, default claude,codex
-install.sh argument 2: content retention, default full
-install.sh argument 3: OTLP gRPC port, default 4317
-install.sh argument 4: OTLP HTTP port, default 4318
-install.sh argument 5: collector path, default /opt/beacon/bin/beacon-otelcol
-install.sh argument 6: no-start flag, accepts 1/true/yes
-install.sh argument 7: Splunk HEC endpoint
-install.sh argument 8: Splunk HEC token
-install.sh argument 9: Splunk index
-install.sh argument 10: Splunk source
-install.sh argument 11: Splunk sourcetype
-install.sh argument 12: Splunk insecure TLS skip verify
-install.sh argument 13: Splunk CA file
+install.sh argument 2: OTLP gRPC port, default 4317
+install.sh argument 3: OTLP HTTP port, default 4318
+install.sh argument 4: collector path, default /opt/beacon/bin/beacon-otelcol
+install.sh argument 5: no-start flag, accepts 1/true/yes
+install.sh argument 6: Splunk HEC endpoint
+install.sh argument 7: Splunk HEC token
+install.sh argument 8: Splunk index
+install.sh argument 9: Splunk source
+install.sh argument 10: Splunk sourcetype
+install.sh argument 11: Splunk insecure TLS skip verify
+install.sh argument 12: Splunk CA file
```
Fleet repair script positional arguments:
```text
repair.sh argument 1: harnesses, default claude,codex
-repair.sh argument 2: content retention, default full
-repair.sh argument 3: OTLP gRPC port, default 4317
-repair.sh argument 4: OTLP HTTP port, default 4318
-repair.sh argument 5: Splunk HEC endpoint
-repair.sh argument 6: Splunk HEC token
-repair.sh argument 7: Splunk index
-repair.sh argument 8: Splunk source
-repair.sh argument 9: Splunk sourcetype
-repair.sh argument 10: Splunk insecure TLS skip verify
-repair.sh argument 11: Splunk CA file
+repair.sh argument 2: OTLP gRPC port, default 4317
+repair.sh argument 3: OTLP HTTP port, default 4318
+repair.sh argument 4: Splunk HEC endpoint
+repair.sh argument 5: Splunk HEC token
+repair.sh argument 6: Splunk index
+repair.sh argument 7: Splunk source
+repair.sh argument 8: Splunk sourcetype
+repair.sh argument 9: Splunk insecure TLS skip verify
+repair.sh argument 10: Splunk CA file
```
To opt in Gemini CLI telemetry through Fleet, include `gemini` in the harness
@@ -395,12 +388,11 @@ Beacon does not write Copilot shell profiles or `~/.copilot/config.json`.
Add queries from `packaging/macos/fleet/queries` as Fleet policies or labels.
They cover package/service/log/config presence and freshness; run
`/opt/beacon/fleet/scripts/validate.sh` for full CLI-level validation of status,
-content retention, harness configuration, Wazuh validation, and launchd health.
+harness configuration, Wazuh validation, and launchd health.
- `beacon-version.sql`
- `collector-service-health.sql`
- `last-event-age-seconds.sql`
-- `content-retention.sql`
- `configured-harnesses.sql`
- `runtime-log-writable.sql`
- `splunk-hec-forwarding.sql`
diff --git a/packaging/macos/fleet/queries/content-retention.sql b/packaging/macos/fleet/queries/content-retention.sql
deleted file mode 100644
index 0c100b2b..00000000
--- a/packaging/macos/fleet/queries/content-retention.sql
+++ /dev/null
@@ -1,7 +0,0 @@
-SELECT
- CASE
- WHEN COUNT(*) = 0 THEN 'missing'
- ELSE 'present'
- END AS endpoint_config_state
-FROM file
-WHERE path = '/Library/Application Support/Beacon/Endpoint/config.json';
diff --git a/packaging/macos/fleet/scripts/install.sh b/packaging/macos/fleet/scripts/install.sh
index 01136e06..70c65db3 100755
--- a/packaging/macos/fleet/scripts/install.sh
+++ b/packaging/macos/fleet/scripts/install.sh
@@ -2,23 +2,22 @@
set -eu
BEACON_BIN="${BEACON_BIN:-/opt/beacon/bin/beacon}"
-BEACON_COLLECTOR="${BEACON_COLLECTOR:-${5:-/opt/beacon/bin/beacon-otelcol}}"
+BEACON_COLLECTOR="${BEACON_COLLECTOR:-${4:-/opt/beacon/bin/beacon-otelcol}}"
BEACON_INSTALL_SCRIPT="${BEACON_INSTALL_SCRIPT:-/opt/beacon/scripts/install-endpoint.sh}"
BEACON_BIN="$BEACON_BIN" \
BEACON_ENDPOINT_HARNESSES="${BEACON_ENDPOINT_HARNESSES:-${1:-claude,codex}}" \
-BEACON_CONTENT_RETENTION="${BEACON_CONTENT_RETENTION:-${2:-full}}" \
-BEACON_OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${3:-4317}}" \
-BEACON_OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${4:-4318}}" \
+BEACON_OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${2:-4317}}" \
+BEACON_OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${3:-4318}}" \
BEACON_COLLECTOR="$BEACON_COLLECTOR" \
-BEACON_NO_START="${BEACON_NO_START:-${6:-0}}" \
-BEACON_SPLUNK_HEC_ENDPOINT="${BEACON_SPLUNK_HEC_ENDPOINT:-${7:-}}" \
-BEACON_SPLUNK_HEC_TOKEN="${BEACON_SPLUNK_HEC_TOKEN:-${8:-}}" \
-BEACON_SPLUNK_INDEX="${BEACON_SPLUNK_INDEX:-${9:-}}" \
-BEACON_SPLUNK_SOURCE="${BEACON_SPLUNK_SOURCE:-${10:-}}" \
-BEACON_SPLUNK_SOURCETYPE="${BEACON_SPLUNK_SOURCETYPE:-${11:-}}" \
-BEACON_SPLUNK_INSECURE_SKIP_VERIFY="${BEACON_SPLUNK_INSECURE_SKIP_VERIFY:-${12:-0}}" \
-BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-${13:-}}" \
+BEACON_NO_START="${BEACON_NO_START:-${5:-0}}" \
+BEACON_SPLUNK_HEC_ENDPOINT="${BEACON_SPLUNK_HEC_ENDPOINT:-${6:-}}" \
+BEACON_SPLUNK_HEC_TOKEN="${BEACON_SPLUNK_HEC_TOKEN:-${7:-}}" \
+BEACON_SPLUNK_INDEX="${BEACON_SPLUNK_INDEX:-${8:-}}" \
+BEACON_SPLUNK_SOURCE="${BEACON_SPLUNK_SOURCE:-${9:-}}" \
+BEACON_SPLUNK_SOURCETYPE="${BEACON_SPLUNK_SOURCETYPE:-${10:-}}" \
+BEACON_SPLUNK_INSECURE_SKIP_VERIFY="${BEACON_SPLUNK_INSECURE_SKIP_VERIFY:-${11:-0}}" \
+BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-${12:-}}" \
BEACON_FALCON_HEC_ENDPOINT="${BEACON_FALCON_HEC_ENDPOINT:-}" \
BEACON_FALCON_HEC_TOKEN="${BEACON_FALCON_HEC_TOKEN:-}" \
BEACON_FALCON_INDEX="${BEACON_FALCON_INDEX:-}" \
diff --git a/packaging/macos/fleet/scripts/repair.sh b/packaging/macos/fleet/scripts/repair.sh
index fb23093e..d081c83b 100755
--- a/packaging/macos/fleet/scripts/repair.sh
+++ b/packaging/macos/fleet/scripts/repair.sh
@@ -4,16 +4,15 @@ set -eu
BEACON_BIN="${BEACON_BIN:-/opt/beacon/bin/beacon}"
BEACON_COLLECTOR="${BEACON_COLLECTOR:-/opt/beacon/bin/beacon-otelcol}"
BEACON_ENDPOINT_HARNESSES="${BEACON_ENDPOINT_HARNESSES:-${1:-claude,codex}}"
-BEACON_CONTENT_RETENTION="${BEACON_CONTENT_RETENTION:-${2:-full}}"
-BEACON_OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${3:-4317}}"
-BEACON_OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${4:-4318}}"
-BEACON_SPLUNK_HEC_ENDPOINT="${BEACON_SPLUNK_HEC_ENDPOINT:-${5:-}}"
-BEACON_SPLUNK_HEC_TOKEN="${BEACON_SPLUNK_HEC_TOKEN:-${6:-}}"
-BEACON_SPLUNK_INDEX="${BEACON_SPLUNK_INDEX:-${7:-}}"
-BEACON_SPLUNK_SOURCE="${BEACON_SPLUNK_SOURCE:-${8:-}}"
-BEACON_SPLUNK_SOURCETYPE="${BEACON_SPLUNK_SOURCETYPE:-${9:-}}"
-BEACON_SPLUNK_INSECURE_SKIP_VERIFY="${BEACON_SPLUNK_INSECURE_SKIP_VERIFY:-${10:-0}}"
-BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-${11:-}}"
+BEACON_OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${2:-4317}}"
+BEACON_OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${3:-4318}}"
+BEACON_SPLUNK_HEC_ENDPOINT="${BEACON_SPLUNK_HEC_ENDPOINT:-${4:-}}"
+BEACON_SPLUNK_HEC_TOKEN="${BEACON_SPLUNK_HEC_TOKEN:-${5:-}}"
+BEACON_SPLUNK_INDEX="${BEACON_SPLUNK_INDEX:-${6:-}}"
+BEACON_SPLUNK_SOURCE="${BEACON_SPLUNK_SOURCE:-${7:-}}"
+BEACON_SPLUNK_SOURCETYPE="${BEACON_SPLUNK_SOURCETYPE:-${8:-}}"
+BEACON_SPLUNK_INSECURE_SKIP_VERIFY="${BEACON_SPLUNK_INSECURE_SKIP_VERIFY:-${9:-0}}"
+BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-${10:-}}"
BEACON_FALCON_HEC_ENDPOINT="${BEACON_FALCON_HEC_ENDPOINT:-}"
BEACON_FALCON_HEC_TOKEN="${BEACON_FALCON_HEC_TOKEN:-}"
BEACON_FALCON_INDEX="${BEACON_FALCON_INDEX:-}"
@@ -25,7 +24,6 @@ BEACON_FALCON_CA_FILE="${BEACON_FALCON_CA_FILE:-}"
set -- endpoint repair \
--collector "$BEACON_COLLECTOR" \
--harness "$BEACON_ENDPOINT_HARNESSES" \
- --content-retention "$BEACON_CONTENT_RETENTION" \
--otlp-grpc-port "$BEACON_OTLP_GRPC_PORT" \
--otlp-http-port "$BEACON_OTLP_HTTP_PORT"
diff --git a/packaging/macos/install-endpoint.sh b/packaging/macos/install-endpoint.sh
index d37d20e3..ef50be6d 100755
--- a/packaging/macos/install-endpoint.sh
+++ b/packaging/macos/install-endpoint.sh
@@ -10,18 +10,17 @@ if [ -z "${BEACON_BIN:-}" ]; then
fi
BEACON_ENDPOINT_HARNESSES="${BEACON_ENDPOINT_HARNESSES:-${4:-claude,codex}}"
-BEACON_CONTENT_RETENTION="${BEACON_CONTENT_RETENTION:-${5:-full}}"
-BEACON_OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${6:-4317}}"
-BEACON_OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${7:-4318}}"
-BEACON_COLLECTOR="${BEACON_COLLECTOR:-${8:-}}"
-BEACON_NO_START="${BEACON_NO_START:-${9:-0}}"
-BEACON_SPLUNK_HEC_ENDPOINT="${BEACON_SPLUNK_HEC_ENDPOINT:-${10:-}}"
-BEACON_SPLUNK_HEC_TOKEN="${BEACON_SPLUNK_HEC_TOKEN:-${11:-}}"
-BEACON_SPLUNK_INDEX="${BEACON_SPLUNK_INDEX:-${12:-}}"
-BEACON_SPLUNK_SOURCE="${BEACON_SPLUNK_SOURCE:-${13:-}}"
-BEACON_SPLUNK_SOURCETYPE="${BEACON_SPLUNK_SOURCETYPE:-${14:-}}"
-BEACON_SPLUNK_INSECURE_SKIP_VERIFY="${BEACON_SPLUNK_INSECURE_SKIP_VERIFY:-${15:-0}}"
-BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-${16:-}}"
+BEACON_OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${5:-4317}}"
+BEACON_OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${6:-4318}}"
+BEACON_COLLECTOR="${BEACON_COLLECTOR:-${7:-}}"
+BEACON_NO_START="${BEACON_NO_START:-${8:-0}}"
+BEACON_SPLUNK_HEC_ENDPOINT="${BEACON_SPLUNK_HEC_ENDPOINT:-${9:-}}"
+BEACON_SPLUNK_HEC_TOKEN="${BEACON_SPLUNK_HEC_TOKEN:-${10:-}}"
+BEACON_SPLUNK_INDEX="${BEACON_SPLUNK_INDEX:-${11:-}}"
+BEACON_SPLUNK_SOURCE="${BEACON_SPLUNK_SOURCE:-${12:-}}"
+BEACON_SPLUNK_SOURCETYPE="${BEACON_SPLUNK_SOURCETYPE:-${13:-}}"
+BEACON_SPLUNK_INSECURE_SKIP_VERIFY="${BEACON_SPLUNK_INSECURE_SKIP_VERIFY:-${14:-0}}"
+BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-${15:-}}"
BEACON_FALCON_HEC_ENDPOINT="${BEACON_FALCON_HEC_ENDPOINT:-}"
BEACON_FALCON_HEC_TOKEN="${BEACON_FALCON_HEC_TOKEN:-}"
BEACON_FALCON_INDEX="${BEACON_FALCON_INDEX:-}"
@@ -37,7 +36,6 @@ fi
set -- endpoint install \
--system \
--harness "$BEACON_ENDPOINT_HARNESSES" \
- --content-retention "$BEACON_CONTENT_RETENTION" \
--otlp-grpc-port "$BEACON_OTLP_GRPC_PORT" \
--otlp-http-port "$BEACON_OTLP_HTTP_PORT"
diff --git a/packaging/macos/jamf/extension-attributes/content-retention.sh b/packaging/macos/jamf/extension-attributes/content-retention.sh
deleted file mode 100755
index 7ac11620..00000000
--- a/packaging/macos/jamf/extension-attributes/content-retention.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-set -eu
-
-CONFIG_PATH="${BEACON_ENDPOINT_CONFIG:-/Library/Application Support/Beacon/Endpoint/config.json}"
-
-if [ ! -f "$CONFIG_PATH" ]; then
- echo "<result>missing</result>"
- exit 0
-fi
-
-RETENTION="$(awk -F'"' '/"content_retention"[[:space:]]*:/ {print $4; exit}' "$CONFIG_PATH")"
-if [ -z "$RETENTION" ]; then
- RETENTION="unknown"
-fi
-
-echo "<result>$RETENTION</result>"
diff --git a/packaging/macos/jamf/scripts/repair.sh b/packaging/macos/jamf/scripts/repair.sh
index 19593f0c..fc078158 100755
--- a/packaging/macos/jamf/scripts/repair.sh
+++ b/packaging/macos/jamf/scripts/repair.sh
@@ -4,16 +4,15 @@ set -eu
BEACON_BIN="${BEACON_BIN:-/opt/beacon/bin/beacon}"
BEACON_COLLECTOR="${BEACON_COLLECTOR:-/opt/beacon/bin/beacon-otelcol}"
BEACON_ENDPOINT_HARNESSES="${BEACON_ENDPOINT_HARNESSES:-${4:-claude,codex}}"
-BEACON_CONTENT_RETENTION="${BEACON_CONTENT_RETENTION:-${5:-full}}"
-BEACON_OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${6:-4317}}"
-BEACON_OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${7:-4318}}"
-BEACON_SPLUNK_HEC_ENDPOINT="${BEACON_SPLUNK_HEC_ENDPOINT:-${8:-}}"
-BEACON_SPLUNK_HEC_TOKEN="${BEACON_SPLUNK_HEC_TOKEN:-${9:-}}"
-BEACON_SPLUNK_INDEX="${BEACON_SPLUNK_INDEX:-${10:-}}"
-BEACON_SPLUNK_SOURCE="${BEACON_SPLUNK_SOURCE:-${11:-}}"
-BEACON_SPLUNK_SOURCETYPE="${BEACON_SPLUNK_SOURCETYPE:-${12:-}}"
-BEACON_SPLUNK_INSECURE_SKIP_VERIFY="${BEACON_SPLUNK_INSECURE_SKIP_VERIFY:-${13:-0}}"
-BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-${14:-}}"
+BEACON_OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${5:-4317}}"
+BEACON_OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${6:-4318}}"
+BEACON_SPLUNK_HEC_ENDPOINT="${BEACON_SPLUNK_HEC_ENDPOINT:-${7:-}}"
+BEACON_SPLUNK_HEC_TOKEN="${BEACON_SPLUNK_HEC_TOKEN:-${8:-}}"
+BEACON_SPLUNK_INDEX="${BEACON_SPLUNK_INDEX:-${9:-}}"
+BEACON_SPLUNK_SOURCE="${BEACON_SPLUNK_SOURCE:-${10:-}}"
+BEACON_SPLUNK_SOURCETYPE="${BEACON_SPLUNK_SOURCETYPE:-${11:-}}"
+BEACON_SPLUNK_INSECURE_SKIP_VERIFY="${BEACON_SPLUNK_INSECURE_SKIP_VERIFY:-${12:-0}}"
+BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-${13:-}}"
BEACON_FALCON_HEC_ENDPOINT="${BEACON_FALCON_HEC_ENDPOINT:-}"
BEACON_FALCON_HEC_TOKEN="${BEACON_FALCON_HEC_TOKEN:-}"
BEACON_FALCON_INDEX="${BEACON_FALCON_INDEX:-}"
@@ -25,7 +24,6 @@ BEACON_FALCON_CA_FILE="${BEACON_FALCON_CA_FILE:-}"
set -- endpoint repair \
--collector "$BEACON_COLLECTOR" \
--harness "$BEACON_ENDPOINT_HARNESSES" \
- --content-retention "$BEACON_CONTENT_RETENTION" \
--otlp-grpc-port "$BEACON_OTLP_GRPC_PORT" \
--otlp-http-port "$BEACON_OTLP_HTTP_PORT"
diff --git a/packaging/macos/pkgbuild.md b/packaging/macos/pkgbuild.md
index cefc8d06..aedd5dad 100644
--- a/packaging/macos/pkgbuild.md
+++ b/packaging/macos/pkgbuild.md
@@ -73,8 +73,7 @@ NOTARYTOOL_PROFILE="beacon-notary-profile" \
The package installs files under `/opt/beacon` and runs
`/opt/beacon/scripts/install-endpoint.sh` in `postinstall` with explicit
-collector and retention settings. The default packaged content retention is
-`full`, matching the shared MDM install wrapper.
+collector settings, matching the shared MDM install wrapper.
opencode support is intentionally not part of the default package install. To
enable opencode prompt/session/tool telemetry, run Beacon's hook installer in the
@@ -110,9 +109,8 @@ Use these optional Jamf policy parameters when calling
```text
Parameter 4: harnesses, default claude,codex
-Parameter 5: content retention, default full
-Parameter 6: OTLP gRPC port, default 4317
-Parameter 7: OTLP HTTP port, default 4318
+Parameter 5: OTLP gRPC port, default 4317
+Parameter 6: OTLP HTTP port, default 4318
Parameter 8: collector path, default /opt/beacon/bin/beacon-otelcol
Parameter 9: no-start flag for install.sh only
Parameter 10: Splunk HEC endpoint for install.sh only
diff --git a/packaging/macos/smoke-endpoint.sh b/packaging/macos/smoke-endpoint.sh
index f065c568..c3accb88 100755
--- a/packaging/macos/smoke-endpoint.sh
+++ b/packaging/macos/smoke-endpoint.sh
@@ -60,8 +60,7 @@ run_beacon endpoint install \
--log-path "$LOG_PATH" \
--harness claude,codex \
--otlp-grpc-port 55317 \
- --otlp-http-port 55318 \
- --content-retention full
+ --otlp-http-port 55318
test -f "$HOME_DIR/.beacon/endpoint/config.json"
test -f "$HOME_DIR/.beacon/endpoint/otelcol.yaml"
diff --git a/packaging/macos/smoke-vscode-endpoint.sh b/packaging/macos/smoke-vscode-endpoint.sh
index 568e1b38..313f8a31 100755
--- a/packaging/macos/smoke-vscode-endpoint.sh
+++ b/packaging/macos/smoke-vscode-endpoint.sh
@@ -27,15 +27,15 @@ go build -o "$TMPDIR/beacon-hooks" .
"$TMPDIR/beacon" endpoint integrations vscode print-config --log-path "$LOG" >/dev/null
-cat <<JSON | BEACON_ENDPOINT_MODE=1 BEACON_ENDPOINT_LOG="$LOG" BEACON_CONTENT_RETENTION=metadata "$TMPDIR/beacon-hooks" --platform vscode prompt-submit >/dev/null
+cat <<JSON | BEACON_ENDPOINT_MODE=1 BEACON_ENDPOINT_LOG="$LOG" "$TMPDIR/beacon-hooks" --platform vscode prompt-submit >/dev/null
{"sessionId":"vscode-smoke","hookEventName":"UserPromptSubmit","cwd":"$WORKSPACE","prompt":"summarize this repository"}
JSON
-cat <<JSON | BEACON_ENDPOINT_MODE=1 BEACON_ENDPOINT_LOG="$LOG" BEACON_CONTENT_RETENTION=metadata "$TMPDIR/beacon-hooks" --platform vscode pre-tool >/dev/null
+cat <<JSON | BEACON_ENDPOINT_MODE=1 BEACON_ENDPOINT_LOG="$LOG" "$TMPDIR/beacon-hooks" --platform vscode pre-tool >/dev/null
{"sessionId":"vscode-smoke","hookEventName":"PreToolUse","cwd":"$WORKSPACE","tool_name":"runCommand","tool_input":{"command":"go test ./..."}}
JSON
-cat <<JSON | BEACON_ENDPOINT_MODE=1 BEACON_ENDPOINT_LOG="$LOG" BEACON_CONTENT_RETENTION=metadata "$TMPDIR/beacon-hooks" --platform vscode post-tool >/dev/null
+cat <<JSON | BEACON_ENDPOINT_MODE=1 BEACON_ENDPOINT_LOG="$LOG" "$TMPDIR/beacon-hooks" --platform vscode post-tool >/dev/null
{"sessionId":"vscode-smoke","hookEventName":"PostToolUse","cwd":"$WORKSPACE","tool_name":"runCommand","tool_input":{"command":"go test ./..."},"tool_response":"ok"}
JSON
diff --git a/packaging/macos/test-endpoint-scripts.sh b/packaging/macos/test-endpoint-scripts.sh
index 2a9e899d..dfbdbeef 100644
--- a/packaging/macos/test-endpoint-scripts.sh
+++ b/packaging/macos/test-endpoint-scripts.sh
@@ -49,7 +49,7 @@ STUB_LOG="$STUB_LOG" \
INSTALL_ARGS="$(cat "$STUB_LOG")"
case "$INSTALL_ARGS" in
- "endpoint install --system --harness claude,codex,cursor --content-retention full --otlp-grpc-port 5317 --otlp-http-port 5318 --collector /tmp/beacon-otelcol --splunk-hec-endpoint https://splunk.example:8088/services/collector --splunk-hec-token hec-token --splunk-index beacon --splunk-source beacon-source --splunk-sourcetype beacon:sourcetype --splunk-insecure-skip-verify --splunk-ca-file /tmp/splunk-ca.pem --falcon-hec-endpoint https://cloud.us.humio.com/api/v1/ingest/hec --falcon-hec-token falcon-token --falcon-index beacon-repo --falcon-source falcon-source --falcon-sourcetype json --falcon-insecure-skip-verify --falcon-ca-file /tmp/falcon-ca.pem") ;;
+ "endpoint install --system --harness claude,codex,cursor --otlp-grpc-port 5317 --otlp-http-port 5318 --collector /tmp/beacon-otelcol --splunk-hec-endpoint https://splunk.example:8088/services/collector --splunk-hec-token hec-token --splunk-index beacon --splunk-source beacon-source --splunk-sourcetype beacon:sourcetype --splunk-insecure-skip-verify --splunk-ca-file /tmp/splunk-ca.pem --falcon-hec-endpoint https://cloud.us.humio.com/api/v1/ingest/hec --falcon-hec-token falcon-token --falcon-index beacon-repo --falcon-source falcon-source --falcon-sourcetype json --falcon-insecure-skip-verify --falcon-ca-file /tmp/falcon-ca.pem") ;;
*)
echo "unexpected install args: $INSTALL_ARGS" >&2
exit 1
@@ -67,7 +67,7 @@ STUB_LOG="$STUB_LOG" \
REPAIR_ARGS="$(cat "$STUB_LOG")"
case "$REPAIR_ARGS" in
- "endpoint repair --collector /tmp/beacon-otelcol --harness claude,codex --content-retention full --otlp-grpc-port 4317 --otlp-http-port 4318 --splunk-hec-endpoint https://splunk.example:8088/services/collector --splunk-hec-token hec-token --falcon-hec-endpoint https://cloud.us.humio.com/api/v1/ingest/hec --falcon-hec-token falcon-token") ;;
+ "endpoint repair --collector /tmp/beacon-otelcol --harness claude,codex --otlp-grpc-port 4317 --otlp-http-port 4318 --splunk-hec-endpoint https://splunk.example:8088/services/collector --splunk-hec-token hec-token --falcon-hec-endpoint https://cloud.us.humio.com/api/v1/ingest/hec --falcon-hec-token falcon-token") ;;
*)
echo "unexpected repair args: $REPAIR_ARGS" >&2
exit 1
@@ -122,11 +122,11 @@ esac
BEACON_BIN="$STUB_BIN" \
STUB_LOG="$STUB_LOG" \
-"$INSTALL_SCRIPT" _ _ _ "claude" "metadata" "6317" "6318" "/tmp/jamf-otelcol" "1" "https://jamf-splunk.example:8088/services/collector" "jamf-token" "jamf-index" "jamf-source" "jamf:sourcetype" "true" "/tmp/jamf-ca.pem"
+"$INSTALL_SCRIPT" _ _ _ "claude" "6317" "6318" "/tmp/jamf-otelcol" "1" "https://jamf-splunk.example:8088/services/collector" "jamf-token" "jamf-index" "jamf-source" "jamf:sourcetype" "true" "/tmp/jamf-ca.pem"
INSTALL_ARGS="$(cat "$STUB_LOG")"
case "$INSTALL_ARGS" in
- "endpoint install --system --harness claude --content-retention metadata --otlp-grpc-port 6317 --otlp-http-port 6318 --collector /tmp/jamf-otelcol --splunk-hec-endpoint https://jamf-splunk.example:8088/services/collector --splunk-hec-token jamf-token --splunk-index jamf-index --splunk-source jamf-source --splunk-sourcetype jamf:sourcetype --splunk-insecure-skip-verify --splunk-ca-file /tmp/jamf-ca.pem --no-start") ;;
+ "endpoint install --system --harness claude --otlp-grpc-port 6317 --otlp-http-port 6318 --collector /tmp/jamf-otelcol --splunk-hec-endpoint https://jamf-splunk.example:8088/services/collector --splunk-hec-token jamf-token --splunk-index jamf-index --splunk-source jamf-source --splunk-sourcetype jamf:sourcetype --splunk-insecure-skip-verify --splunk-ca-file /tmp/jamf-ca.pem --no-start") ;;
*)
echo "unexpected Jamf positional install args: $INSTALL_ARGS" >&2
exit 1
@@ -164,11 +164,11 @@ esac
BEACON_BIN="$STUB_BIN" \
BEACON_INSTALL_SCRIPT="$INSTALL_SCRIPT" \
STUB_LOG="$STUB_LOG" \
-"$ROOT_DIR/packaging/macos/fleet/scripts/install.sh" "cursor" "redacted" "7317" "7318" "/tmp/fleet-otelcol" "1" "https://fleet-splunk.example:8088/services/collector" "fleet-token" "fleet-index" "fleet-source" "fleet:sourcetype" "1" "/tmp/fleet-ca.pem"
+"$ROOT_DIR/packaging/macos/fleet/scripts/install.sh" "cursor" "7317" "7318" "/tmp/fleet-otelcol" "1" "https://fleet-splunk.example:8088/services/collector" "fleet-token" "fleet-index" "fleet-source" "fleet:sourcetype" "1" "/tmp/fleet-ca.pem"
INSTALL_ARGS="$(cat "$STUB_LOG")"
case "$INSTALL_ARGS" in
- "endpoint install --system --harness cursor --content-retention redacted --otlp-grpc-port 7317 --otlp-http-port 7318 --collector /tmp/fleet-otelcol --splunk-hec-endpoint https://fleet-splunk.example:8088/services/collector --splunk-hec-token fleet-token --splunk-index fleet-index --splunk-source fleet-source --splunk-sourcetype fleet:sourcetype --splunk-insecure-skip-verify --splunk-ca-file /tmp/fleet-ca.pem --no-start") ;;
+ "endpoint install --system --harness cursor --otlp-grpc-port 7317 --otlp-http-port 7318 --collector /tmp/fleet-otelcol --splunk-hec-endpoint https://fleet-splunk.example:8088/services/collector --splunk-hec-token fleet-token --splunk-index fleet-index --splunk-source fleet-source --splunk-sourcetype fleet:sourcetype --splunk-insecure-skip-verify --splunk-ca-file /tmp/fleet-ca.pem --no-start") ;;
*)
echo "unexpected Fleet positional install args: $INSTALL_ARGS" >&2
exit 1
@@ -184,11 +184,11 @@ BEACON_FALCON_HEC_ENDPOINT="https://cloud.us.humio.com/api/v1/ingest/hec" \
BEACON_FALCON_HEC_TOKEN="falcon-token" \
BEACON_FALCON_INDEX="beacon-repo" \
STUB_LOG="$STUB_LOG" \
-"$FLEET_REPAIR_SCRIPT" "claude,cursor" "metadata" "8317" "8318"
+"$FLEET_REPAIR_SCRIPT" "claude,cursor" "8317" "8318"
REPAIR_ARGS="$(cat "$STUB_LOG")"
case "$REPAIR_ARGS" in
- "endpoint repair --collector /tmp/beacon-otelcol --harness claude,cursor --content-retention metadata --otlp-grpc-port 8317 --otlp-http-port 8318 --splunk-hec-endpoint https://splunk.example:8088/services/collector --splunk-hec-token hec-token --splunk-index beacon --falcon-hec-endpoint https://cloud.us.humio.com/api/v1/ingest/hec --falcon-hec-token falcon-token --falcon-index beacon-repo") ;;
+ "endpoint repair --collector /tmp/beacon-otelcol --harness claude,cursor --otlp-grpc-port 8317 --otlp-http-port 8318 --splunk-hec-endpoint https://splunk.example:8088/services/collector --splunk-hec-token hec-token --splunk-index beacon --falcon-hec-endpoint https://cloud.us.humio.com/api/v1/ingest/hec --falcon-hec-token falcon-token --falcon-index beacon-repo") ;;
*)
echo "unexpected Fleet positional repair args: $REPAIR_ARGS" >&2
exit 1
@@ -218,7 +218,6 @@ cat >"$CONFIG_PATH" <<'JSON'
"claude",
"codex"
],
- "content_retention": "full",
"destinations": {
"splunk_hec": {
"enabled": true,
@@ -229,15 +228,6 @@ cat >"$CONFIG_PATH" <<'JSON'
}
JSON
-RETENTION="$(BEACON_ENDPOINT_CONFIG="$CONFIG_PATH" "$ROOT_DIR/packaging/macos/jamf/extension-attributes/content-retention.sh")"
-case "$RETENTION" in
- "<result>full</result>") ;;
- *)
- echo "unexpected retention extension attribute result: $RETENTION" >&2
- exit 1
- ;;
-esac
-
HARNESSES="$(BEACON_ENDPOINT_CONFIG="$CONFIG_PATH" "$ROOT_DIR/packaging/macos/jamf/extension-attributes/configured-harnesses.sh")"
case "$HARNESSES" in
"<result>claude,codex</result>") ;;
diff --git a/pkg/asymptotetrace/event.go b/pkg/asymptotetrace/event.go
index 84e9bbec..b63dd2f6 100644
--- a/pkg/asymptotetrace/event.go
+++ b/pkg/asymptotetrace/event.go
@@ -146,12 +146,6 @@ type ContentInfo struct {
Truncated bool `json:"truncated,omitempty"`
}
-const (
- ContentRetentionMetadata = "metadata"
- ContentRetentionRedacted = "redacted"
- ContentRetentionFull = "full"
-)
-
type DestinationInfo struct {
Type string `json:"type,omitempty"`
Mode string `json:"mode,omitempty"`
@@ -272,12 +266,5 @@ func (e Event) Validate() error {
return errors.New("origin must be local, cloud, or ci")
}
}
- if e.Content != nil {
- switch e.Content.Retention {
- case ContentRetentionMetadata, ContentRetentionRedacted, ContentRetentionFull:
- default:
- return errors.New("content.retention must be metadata, redacted, or full")
- }
- }
return nil
}
diff --git a/pkg/asymptotetrace/event_test.go b/pkg/asymptotetrace/event_test.go
index 7a96b58b..6074b089 100644
--- a/pkg/asymptotetrace/event_test.go
+++ b/pkg/asymptotetrace/event_test.go
@@ -39,25 +39,20 @@ func TestNewEventSetsRequiredInvariants(t *testing.T) {
event.Command = &CommandInfo{Command: "go test ./..."}
event.MCP = &MCPInfo{Server: "github", Tool: "get_issue"}
event.Prompt = &PromptInfo{Text: "Summarize this file"}
- event.Content = &ContentInfo{Retention: ContentRetentionFull, Included: true}
if err := event.Validate(); err != nil {
t.Fatalf("Validate rejected optional telemetry fields: %v", err)
}
}
-func TestValidateContentRetentionValues(t *testing.T) {
- for _, retention := range []string{ContentRetentionMetadata, ContentRetentionRedacted, ContentRetentionFull} {
- t.Run(retention, func(t *testing.T) {
- event := NewEvent(NewEventOptions{
- Action: "tool.invoked",
- Harness: HarnessInfo{Name: "cursor"},
- })
- event.Content = &ContentInfo{Retention: retention, Included: retention != ContentRetentionMetadata}
+func TestValidateToleratesHistoricalContentField(t *testing.T) {
+ event := NewEvent(NewEventOptions{
+ Action: "tool.invoked",
+ Harness: HarnessInfo{Name: "cursor"},
+ })
+ event.Content = &ContentInfo{Retention: "metadata", Included: false}
- if err := event.Validate(); err != nil {
- t.Fatalf("Validate rejected retention %q: %v", retention, err)
- }
- })
+ if err := event.Validate(); err != nil {
+ t.Fatalf("Validate rejected historical content field: %v", err)
}
}
@@ -161,11 +156,6 @@ func TestValidateRejectsMissingOrInvalidRequiredFields(t *testing.T) {
edit: func(e *Event) { e.Harness.Name = "" },
want: "harness.name is required",
},
- {
- name: "content retention",
- edit: func(e *Event) { e.Content = &ContentInfo{Retention: "raw", Included: true} },
- want: "content.retention must be metadata, redacted, or full",
- },
}
for _, tt := range tests {
diff --git a/pkg/asymptotetrace/pipeline.go b/pkg/asymptotetrace/pipeline.go
index 2ccfd49e..07360447 100644
--- a/pkg/asymptotetrace/pipeline.go
+++ b/pkg/asymptotetrace/pipeline.go
@@ -129,17 +129,10 @@ func hasPrivacyProcessor(processors []Processor) bool {
return false
}
-func prepareEventForSink(event Event, retention string, maxBytes int) Event {
+func prepareEventForSink(event Event, maxBytes int) Event {
out := copyEvent(event)
- if out.Content == nil {
- out.Content = &ContentInfo{}
- }
- out.Content.Retention = retention
- out.Content.Included = retention != ContentRetentionMetadata
- out.Content.Redacted = retention == ContentRetentionRedacted
if out.Raw != nil {
out.Raw = SanitizeMap(out.Raw, PrivacyOptions{RedactSecrets: true, StringLimit: DefaultRawStringLimit})
- out.Raw = RetentionAwareRaw(out.Raw, retention)
}
return SanitizeEvent(out, maxBytes)
}
@@ -193,12 +186,3 @@ func copyEvent(event Event) Event {
}
return out
}
-
-func validContentRetention(retention string) bool {
- switch retention {
- case ContentRetentionMetadata, ContentRetentionRedacted, ContentRetentionFull:
- return true
- default:
- return false
- }
-}
diff --git a/pkg/asymptotetrace/pipeline_test.go b/pkg/asymptotetrace/pipeline_test.go
index ae6354d3..f036f72e 100644
--- a/pkg/asymptotetrace/pipeline_test.go
+++ b/pkg/asymptotetrace/pipeline_test.go
@@ -156,7 +156,7 @@ func TestPipelinePrivacyBeforeSinkAndNoEnvelopeMutation(t *testing.T) {
pipeline := NewPipeline(PipelineOptions{
Source: staticSource{NewEnvelopeRecord(envelope)},
Sink: sink,
- Privacy: &PrivacyPolicy{Retention: ContentRetentionFull, MaxEventBytes: DefaultMaxEventBytes},
+ Privacy: &PrivacyPolicy{MaxEventBytes: DefaultMaxEventBytes},
})
if err := pipeline.Run(context.Background()); err != nil {
t.Fatalf("Run returned error: %v", err)
@@ -210,7 +210,7 @@ func TestPipelinePrivacyRunsBeforeAdditionalProcessors(t *testing.T) {
Source: staticSource{NewEnvelopeRecord(envelope)},
Processors: []Processor{processor},
Sink: sink,
- Privacy: &PrivacyPolicy{Retention: ContentRetentionFull},
+ Privacy: &PrivacyPolicy{},
})
if err := pipeline.Run(context.Background()); err != nil {
t.Fatalf("Run returned error: %v", err)
@@ -223,53 +223,7 @@ func TestPipelinePrivacyRunsBeforeAdditionalProcessors(t *testing.T) {
}
}
-func TestPipelineMetadataRetentionRemovesRawDetails(t *testing.T) {
- sink := &captureEventSink{}
- pipeline := NewPipeline(PipelineOptions{
- Source: staticSource{NewEnvelopeRecord(testEnvelope())},
- Sink: sink,
- Privacy: &PrivacyPolicy{Retention: ContentRetentionMetadata},
- })
-
- if err := pipeline.Run(context.Background()); err != nil {
- t.Fatalf("Run returned error: %v", err)
- }
- events, _, _ := sink.snapshot()
- if len(events) != 1 {
- t.Fatalf("events = %d, want 1", len(events))
- }
- if events[0].Raw["field_count"] != 2 {
- t.Fatalf("metadata raw = %#v, want field_count 2", events[0].Raw)
- }
- if _, ok := events[0].Raw["prompt"]; ok {
- t.Fatalf("metadata retention leaked prompt: %#v", events[0].Raw)
- }
- if events[0].Content == nil || events[0].Content.Retention != ContentRetentionMetadata || events[0].Content.Included {
- t.Fatalf("content metadata not set correctly: %#v", events[0].Content)
- }
-}
-
-func TestPipelineInvalidRetentionFailsClosed(t *testing.T) {
- sink := &captureEventSink{}
- pipeline := NewPipeline(PipelineOptions{
- Source: staticSource{NewEnvelopeRecord(testEnvelope())},
- Sink: sink,
- Privacy: &PrivacyPolicy{Retention: "metdata"},
- })
-
- if err := pipeline.Run(context.Background()); err != nil {
- t.Fatalf("Run returned error: %v", err)
- }
- events, _, _ := sink.snapshot()
- if len(events) != 1 {
- t.Fatalf("events = %d, want 1", len(events))
- }
- if events[0].Raw["field_count"] != 2 {
- t.Fatalf("invalid retention did not fail closed: %#v", events[0].Raw)
- }
-}
-
-func TestPipelinePrivacyDefaultRetentionIsFull(t *testing.T) {
+func TestPipelinePrivacyDoesNotSetContentMetadata(t *testing.T) {
sink := &captureEventSink{}
pipeline := NewPipeline(PipelineOptions{
Source: staticSource{NewEnvelopeRecord(testEnvelope())},
@@ -284,11 +238,11 @@ func TestPipelinePrivacyDefaultRetentionIsFull(t *testing.T) {
if len(events) != 1 {
t.Fatalf("events = %d, want 1", len(events))
}
- if events[0].Content == nil || events[0].Content.Retention != ContentRetentionFull || !events[0].Content.Included {
- t.Fatalf("privacy default did not use full retention: %#v", events[0].Content)
+ if events[0].Content != nil {
+ t.Fatalf("privacy unexpectedly set content metadata: %#v", events[0].Content)
}
if events[0].Raw["prompt"] != "summarize" {
- t.Fatalf("full retention unexpectedly removed raw: %#v", events[0].Raw)
+ t.Fatalf("privacy unexpectedly removed raw: %#v", events[0].Raw)
}
}
diff --git a/pkg/asymptotetrace/privacy.go b/pkg/asymptotetrace/privacy.go
index a60b5833..0cda1909 100644
--- a/pkg/asymptotetrace/privacy.go
+++ b/pkg/asymptotetrace/privacy.go
@@ -98,13 +98,6 @@ func SanitizeSlice(input []interface{}, opts PrivacyOptions) []interface{} {
return out
}
-func RetentionAwareRaw(raw map[string]interface{}, retention string) map[string]interface{} {
- if retention != ContentRetentionMetadata {
- return raw
- }
- return map[string]interface{}{"field_count": len(raw)}
-}
-
func SanitizeEvent(event Event, maxBytes int) Event {
event.Message = CleanString(event.Message, DefaultStringLimit, true)
if event.Tool != nil {
diff --git a/pkg/asymptotetrace/privacy_test.go b/pkg/asymptotetrace/privacy_test.go
index c0006043..d0013eb5 100644
--- a/pkg/asymptotetrace/privacy_test.go
+++ b/pkg/asymptotetrace/privacy_test.go
@@ -43,13 +43,6 @@ func TestSanitizeMapDoesNotMutateInput(t *testing.T) {
}
}
-func TestRetentionAwareRawMetadataMode(t *testing.T) {
- got := RetentionAwareRaw(map[string]interface{}{"a": 1, "b": 2}, ContentRetentionMetadata)
- if got["field_count"] != 2 {
- t.Fatalf("field_count = %v, want 2", got["field_count"])
- }
-}
-
func TestSanitizeEventRedactsAndTruncates(t *testing.T) {
event := NewEvent(NewEventOptions{
Action: "tool.invoked",
diff --git a/pkg/asymptotetrace/processor.go b/pkg/asymptotetrace/processor.go
index a3794b7f..b7f26e07 100644
--- a/pkg/asymptotetrace/processor.go
+++ b/pkg/asymptotetrace/processor.go
@@ -7,13 +7,12 @@ type Processor interface {
Process(ctx context.Context, events []Event) ([]Event, error)
}
-// PrivacyPolicy controls retention and size limits before events reach sinks.
+// PrivacyPolicy controls size limits before events reach sinks.
type PrivacyPolicy struct {
- Retention string
MaxEventBytes int
}
-// PrivacyProcessor applies redaction, truncation, and retention to events.
+// PrivacyProcessor applies redaction and truncation to events.
type PrivacyProcessor struct {
policy PrivacyPolicy
}
@@ -31,18 +30,12 @@ func (p PrivacyProcessor) Process(ctx context.Context, events []Event) ([]Event,
}
out := make([]Event, 0, len(events))
for _, event := range events {
- out = append(out, prepareEventForSink(event, p.policy.Retention, p.policy.MaxEventBytes))
+ out = append(out, prepareEventForSink(event, p.policy.MaxEventBytes))
}
return out, nil
}
func (policy PrivacyPolicy) withDefaults() PrivacyPolicy {
- if policy.Retention == "" {
- policy.Retention = ContentRetentionFull
- }
- if !validContentRetention(policy.Retention) {
- policy.Retention = ContentRetentionMetadata
- }
if policy.MaxEventBytes <= 0 {
policy.MaxEventBytes = DefaultMaxEventBytes
}