The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
update mdm packages
Justin D'Souza4df6cf8bc045
diff --git a/docs/docs.json b/docs/docs.jsonindex 7aecb069..906cf71b 100644--- a/docs/docs.json+++ b/docs/docs.json@@ -189,6 +189,7 @@"root": "mdm/index","pages": ["mdm/jamf",+ "mdm/claude/s3","mdm/fleet"]},diff --git a/docs/log-forwarding/falcon.mdx b/docs/log-forwarding/falcon.mdxindex de228a00..7c33ccdb 100644--- a/docs/log-forwarding/falcon.mdx+++ b/docs/log-forwarding/falcon.mdx@@ -194,11 +194,17 @@ The package installs:```text/opt/beacon/bin/vector-/opt/beacon/jamf/scripts/install-falcon-vector-forwarder.sh-/opt/beacon/jamf/scripts/repair-falcon-claude-hooks-vector.sh-/opt/beacon/scripts/run-falcon-forwarder.sh+/opt/beacon/jamf/claude/falcon/install-forwarder.sh+/opt/beacon/jamf/claude/falcon/repair-hooks-and-forwarder.sh+/opt/beacon/jamf/claude/falcon/run-forwarder.sh```+These packaged helpers come from the repository paths:++- [`packaging/macos/jamf/claude/falcon/install-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/falcon/install-forwarder.sh)+- [`packaging/macos/jamf/claude/falcon/repair-hooks-and-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/falcon/repair-hooks-and-forwarder.sh)+- [`packaging/macos/jamf/claude/falcon/run-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/falcon/run-forwarder.sh)+### Manual setup without JamfTo simulate the Jamf setup on one Mac, install the Beacon package, then run the packaged helper manually. Jamf reserves script arguments 1-3, so pass `_ _ _` before the custom parameters:@@ -207,7 +213,7 @@ To simulate the Jamf setup on one Mac, install the Beacon package, then run theexport FALCON_HEC_ENDPOINT="https://<tenant>.ingest.<region>.crowdstrike.com/services/collector"export FALCON_HEC_TOKEN="PASTE_TOKEN_HERE"-sudo /opt/beacon/jamf/scripts/repair-falcon-claude-hooks-vector.sh \+sudo /opt/beacon/jamf/claude/falcon/repair-hooks-and-forwarder.sh \_ _ _ \"$FALCON_HEC_ENDPOINT" \"$FALCON_HEC_TOKEN" \@@ -225,7 +231,7 @@ The script:### Jamf parameters-Use `repair-falcon-claude-hooks-vector.sh` when one policy should repair Beacon, install Claude hooks, and start the Vector forwarder.+Use `/opt/beacon/jamf/claude/falcon/repair-hooks-and-forwarder.sh` when one policy should repair Beacon, install Claude hooks, and start the Vector forwarder.| Parameter | Value ||-----------|-------|@@ -237,7 +243,7 @@ Use `repair-falcon-claude-hooks-vector.sh` when one policy should repair Beacon,| 9 | OTLP HTTP port, default `4318` || 10 | Optional repository/index |-For a forwarder-only policy, use `install-falcon-vector-forwarder.sh` with the same endpoint and token.+For a forwarder-only policy, use `/opt/beacon/jamf/claude/falcon/install-forwarder.sh` with the same endpoint and token.### Validate hook-only forwardingdiff --git a/docs/mdm/claude/s3.mdx b/docs/mdm/claude/s3.mdxnew file mode 100644index 00000000..9dbf4215--- /dev/null+++ b/docs/mdm/claude/s3.mdx@@ -0,0 +1,152 @@+---+title: "Claude to S3 with Jamf"+description: "Run an end-to-end Jamf pilot that installs Claude Code hooks and forwards Beacon runtime JSONL to AWS S3 with Vector."+---++## Overview++Use this flow to test a managed Claude Code deployment on a pilot Mac where Beacon writes local endpoint events to `/var/log/beacon-agent/runtime.jsonl` and a packaged Vector service forwards those events to AWS S3.++Beacon remains the local JSONL producer. AWS credentials, bucket policy, encryption, lifecycle, retention, and access logging stay in AWS, host identity, or MDM secret tooling.++```mermaid+flowchart LR+ claudeCode["Claude Code"] -->|"user hooks"| runtimeLog["runtime.jsonl"]+ beaconEndpoint["Beacon endpoint repair"] --> runtimeLog+ runtimeLog -->|"file source"| vectorForwarder["Vector LaunchDaemon"]+ vectorForwarder -->|"gzip NDJSON"| s3Bucket["AWS S3 bucket"]+ jamfPolicy["Jamf policy"] -->|"bucket, region, prefix"| vectorForwarder+```++## Package requirements++Build or obtain a signed and notarized Beacon macOS package that includes:++```text+/opt/beacon/bin/beacon+/opt/beacon/bin/beacon-otelcol+/opt/beacon/bin/vector+/opt/beacon/jamf/claude/common/repair-hooks.sh+/opt/beacon/jamf/claude/s3/install-forwarder.sh+/opt/beacon/jamf/claude/s3/repair-hooks-and-forwarder.sh+/opt/beacon/jamf/claude/s3/run-forwarder.sh+```++These packaged helpers come from the repository paths:++- [`packaging/macos/jamf/claude/common/repair-hooks.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/common/repair-hooks.sh)+- [`packaging/macos/jamf/claude/s3/install-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/s3/install-forwarder.sh)+- [`packaging/macos/jamf/claude/s3/repair-hooks-and-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/s3/repair-hooks-and-forwarder.sh)+- [`packaging/macos/jamf/claude/s3/run-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/s3/run-forwarder.sh)++When building from source, pass a Vector binary into the package build:++```bash+BEACON_VECTOR_BIN=/path/to/vector \+PKG_SIGN_IDENTITY="Developer ID Installer: Example Team" \+NOTARYTOOL_PROFILE="notarytool-profile" \+ sh packaging/macos/build-pkg.sh+```++`PKG_SIGN_IDENTITY` signs the package with `pkgbuild`. `NOTARYTOOL_PROFILE` submits the package to Apple notary service and staples the result.++## AWS setup++Create a dedicated bucket prefix for the pilot and grant the identity used by the Vector process permission to write only that prefix:++```json+{+ "Version": "2012-10-17",+ "Statement": [+ {+ "Effect": "Allow",+ "Action": ["s3:PutObject"],+ "Resource": "arn:aws:s3:::example-security-logs/beacon/claude/*"+ }+ ]+}+```++Provide AWS credentials through host identity, MDM secret tooling, or the standard AWS credential provider chain available to the LaunchDaemon. Do not place AWS access keys in Beacon endpoint configuration.++## Jamf policy++Install the Beacon package first, then run the combined helper from a policy scoped to the pilot Mac:++```bash+/opt/beacon/jamf/claude/s3/repair-hooks-and-forwarder.sh "$@"+```++Environment variables take precedence over Jamf parameters:++| Parameter | Environment variable | Value |+| --- | --- | --- |+| 4 | `BEACON_S3_BUCKET` | Required S3 bucket name |+| 5 | `AWS_REGION` | Required AWS region |+| 6 | `BEACON_S3_PREFIX` | Optional prefix, default `beacon/runtime` |+| 7 | `BEACON_S3_STORAGE_CLASS` | Optional storage class, default `STANDARD` |+| 8 | `BEACON_VECTOR_READ_FROM` | Optional Vector read position, default `end` |+| 9 | `BEACON_OTLP_GRPC_PORT` | Optional Beacon OTLP gRPC port, default `4317` |+| 10 | `BEACON_OTLP_HTTP_PORT` | Optional Beacon OTLP HTTP port, default `4318` |++The helper:++- writes `/Library/Application Support/Beacon/Forwarders/s3-vector.toml`+- writes `/Library/Application Support/Beacon/Forwarders/s3-vector.env` with mode `0600`+- starts `com.beacon.endpoint.s3-forwarder`+- repairs the Beacon system endpoint+- prepares `/var/log/beacon-agent/runtime.jsonl` for user-run hooks+- installs Claude Code hooks for the interactive console user+- writes a manual Claude hook smoke event++## Manual pilot command++For a one-Mac pilot without Jamf policy parameters, install the signed package and run:++```bash+sudo BEACON_S3_BUCKET="example-security-logs" \+ AWS_REGION="us-west-2" \+ BEACON_S3_PREFIX="beacon/claude" \+ /opt/beacon/jamf/claude/s3/repair-hooks-and-forwarder.sh+```++Fully restart Claude Code after the hook install, then start a new Claude session to generate real hook events.++## Validate delivery++Confirm local state on the Mac:++```bash+sudo /opt/beacon/bin/beacon endpoint status --system --json+sudo test -r /var/log/beacon-agent/runtime.jsonl+sudo launchctl print system/com.beacon.endpoint.s3-forwarder+```++Write a Beacon S3 validation event:++```bash+sudo /opt/beacon/bin/beacon endpoint s3 validate --system+```++Confirm an object arrives in S3:++```bash+aws s3 ls "s3://${BEACON_S3_BUCKET}/${BEACON_S3_PREFIX}/" \+ --recursive \+ --region "$AWS_REGION"++aws s3 cp "s3://${BEACON_S3_BUCKET}/${BEACON_S3_PREFIX}/date=<date>/<object>.jsonl.gz" - \+ --region "$AWS_REGION" | gzip -dc | grep "Beacon endpoint S3 validation event"+```++S3 objects are gzip-compressed newline-delimited JSON with non-overwriting names under:++```text+s3://<bucket>/<prefix>/date=YYYY-MM-DD/<timestamp>-<uuid>.jsonl.gz+```++## Troubleshooting++If objects do not arrive, check that Vector is running, that `/tmp/com.beacon.endpoint.s3-forwarder.err` is empty or actionable, that the env file contains the expected bucket and region, and that the identity available to the Vector LaunchDaemon has `s3:PutObject` for the selected prefix.++If Claude hook events do not appear in `/var/log/beacon-agent/runtime.jsonl`, rerun the policy while an interactive user is logged in, then fully restart Claude Code.diff --git a/packaging/macos/README.md b/packaging/macos/README.mdindex 1ba05aee..57a0a039 100644--- a/packaging/macos/README.md+++ b/packaging/macos/README.md@@ -144,7 +144,7 @@ config, a direct HEC smoke test, sample events, and validation search guidance:For Jamf-managed hook-only Claude deployments, the Beacon package can include aVector binary at `/opt/beacon/bin/vector` and run-`/opt/beacon/jamf/scripts/install-falcon-vector-forwarder.sh`. Provide the exact+`/opt/beacon/jamf/claude/falcon/install-forwarder.sh`. Provide the exactCrowdStrike connector URL shown by Falcon, for example`https://<tenant>.ingest.<region>.crowdstrike.com/services/collector` forNext-Gen SIEM HEC connectors or `/api/v1/ingest/hec` for LogScale-style HEC@@ -322,30 +322,24 @@ policy for hook telemetry. Setintegrations; the helper writes hook events to`/var/log/beacon-agent/runtime.jsonl` by default.-Use `/opt/beacon/jamf/scripts/repair-falcon-claude-hooks.sh` when a Jamf policy-needs to repair the system endpoint, configure Falcon LogScale HEC forwarding,-prepare `/var/log/beacon-agent/runtime.jsonl` for user-run hooks, reinstall-Claude Code hooks for the interactive console user, and run a manual Claude hook-smoke test in one step.+Use `/opt/beacon/jamf/claude/common/repair-hooks.sh` when a Jamf policy+needs only to repair the system endpoint, prepare+`/var/log/beacon-agent/runtime.jsonl` for user-run hooks, reinstall Claude Code+hooks for the interactive console user, and run a manual Claude hook smoke test.-`repair-falcon-claude-hooks.sh` Jamf script parameters:+`repair-hooks.sh` Jamf script parameters:```text-Parameter 4: Falcon LogScale HEC endpoint-Parameter 5: Falcon LogScale HEC token-Parameter 6: Falcon source, default beacon-endpoint-agent-Parameter 7: Falcon sourcetype, default json-Parameter 8: OTLP gRPC port, default 4317-Parameter 9: OTLP HTTP port, default 4318-Parameter 10: Falcon repository/index+Parameter 4: OTLP gRPC port, default 4317+Parameter 5: OTLP HTTP port, default 4318```-Use `/opt/beacon/jamf/scripts/install-falcon-vector-forwarder.sh` when a Jamf+Use `/opt/beacon/jamf/claude/falcon/install-forwarder.sh` when a Jamfpolicy should install only the Vector runtime-log forwarder. This is therecommended path when Claude events are produced by user-level hooks and thecustomer's managed Claude OTLP settings bypass Beacon's local collector.-`install-falcon-vector-forwarder.sh` Jamf script parameters:+`install-forwarder.sh` Jamf script parameters:```textParameter 4: Falcon HEC endpoint, exact connector URL@@ -357,11 +351,21 @@ Parameter 9: Runtime log paths, default /var/log/beacon-agent/runtime.jsonl,/UseParameter 10: Vector read_from, default end```-Use `/opt/beacon/jamf/scripts/repair-falcon-claude-hooks-vector.sh` when one+Use `/opt/beacon/jamf/claude/falcon/repair-hooks-and-forwarder.sh` when onepolicy should repair Beacon, prepare `/var/log/beacon-agent/runtime.jsonl`,install Claude hooks for the console user, and install the Falcon Vectorforwarder without relying on collector-based Falcon forwarding.+The Jamf Claude helper source paths map into the package as:++- [`packaging/macos/jamf/claude/common/repair-hooks.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/common/repair-hooks.sh) -> `/opt/beacon/jamf/claude/common/repair-hooks.sh`+- [`packaging/macos/jamf/claude/falcon/install-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/falcon/install-forwarder.sh) -> `/opt/beacon/jamf/claude/falcon/install-forwarder.sh`+- [`packaging/macos/jamf/claude/falcon/repair-hooks-and-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/falcon/repair-hooks-and-forwarder.sh) -> `/opt/beacon/jamf/claude/falcon/repair-hooks-and-forwarder.sh`+- [`packaging/macos/jamf/claude/falcon/run-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/falcon/run-forwarder.sh) -> `/opt/beacon/jamf/claude/falcon/run-forwarder.sh`+- [`packaging/macos/jamf/claude/s3/install-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/s3/install-forwarder.sh) -> `/opt/beacon/jamf/claude/s3/install-forwarder.sh`+- [`packaging/macos/jamf/claude/s3/repair-hooks-and-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/s3/repair-hooks-and-forwarder.sh) -> `/opt/beacon/jamf/claude/s3/repair-hooks-and-forwarder.sh`+- [`packaging/macos/jamf/claude/s3/run-forwarder.sh`](https://github.com/Asymptote-Labs/agent-beacon/blob/main/packaging/macos/jamf/claude/s3/run-forwarder.sh) -> `/opt/beacon/jamf/claude/s3/run-forwarder.sh`+The managed forwarder writes:```textdiff --git a/packaging/macos/build-pkg.sh b/packaging/macos/build-pkg.shindex bab1dc44..dbed70a9 100755--- a/packaging/macos/build-pkg.sh+++ b/packaging/macos/build-pkg.sh@@ -44,7 +44,6 @@ copy_file "$BEACON_BIN" "$PKG_ROOT/opt/beacon/bin/beacon"copy_file "$COLLECTOR_BIN" "$PKG_ROOT/opt/beacon/bin/beacon-otelcol"copy_file "$ROOT_DIR/packaging/macos/install-endpoint.sh" "$PKG_ROOT/opt/beacon/scripts/install-endpoint.sh"copy_file "$ROOT_DIR/packaging/macos/uninstall-endpoint.sh" "$PKG_ROOT/opt/beacon/scripts/uninstall-endpoint.sh"-copy_file "$ROOT_DIR/packaging/macos/run-falcon-forwarder.sh" "$PKG_ROOT/opt/beacon/scripts/run-falcon-forwarder.sh"copy_file "$ROOT_DIR/packaging/macos/scripts/postinstall" "$PKG_SCRIPTS/postinstall"copy_file "$ROOT_DIR/packaging/macos/scripts/preinstall" "$PKG_SCRIPTS/preinstall"@@ -79,7 +78,7 @@ chmod 755 "$PKG_ROOT/opt/beacon/bin/beacon" "$PKG_ROOT/opt/beacon/bin/beacon-oteif [ -n "$VECTOR_BIN" ]; thenchmod 755 "$PKG_ROOT/opt/beacon/bin/vector"fi-chmod 755 "$PKG_ROOT/opt/beacon/scripts/install-endpoint.sh" "$PKG_ROOT/opt/beacon/scripts/uninstall-endpoint.sh" "$PKG_ROOT/opt/beacon/scripts/run-falcon-forwarder.sh"+chmod 755 "$PKG_ROOT/opt/beacon/scripts/install-endpoint.sh" "$PKG_ROOT/opt/beacon/scripts/uninstall-endpoint.sh"find "$PKG_ROOT/opt/beacon/jamf" -type f -name '*.sh' -exec chmod 755 {} \;find "$PKG_ROOT/opt/beacon/fleet" -type f -name '*.sh' -exec chmod 755 {} \;chmod 755 "$PKG_SCRIPTS/postinstall" "$PKG_SCRIPTS/preinstall"diff --git a/packaging/macos/jamf/scripts/repair-falcon-claude-hooks.sh b/packaging/macos/jamf/claude/common/repair-hooks.shsimilarity index 78%rename from packaging/macos/jamf/scripts/repair-falcon-claude-hooks.shrename to packaging/macos/jamf/claude/common/repair-hooks.shindex b97fd251..8a9c87de 100755--- a/packaging/macos/jamf/scripts/repair-falcon-claude-hooks.sh+++ b/packaging/macos/jamf/claude/common/repair-hooks.sh@@ -1,20 +1,15 @@#!/bin/bashset -euo pipefail-BEACON_BIN="/opt/beacon/bin/beacon"-BEACON_COLLECTOR="/opt/beacon/bin/beacon-otelcol"+BEACON_BIN="${BEACON_BIN:-/opt/beacon/bin/beacon}"+BEACON_COLLECTOR="${BEACON_COLLECTOR:-/opt/beacon/bin/beacon-otelcol}"-RUNTIME_LOG="/var/log/beacon-agent/runtime.jsonl"+RUNTIME_LOG="${BEACON_RUNTIME_LOG:-/var/log/beacon-agent/runtime.jsonl}"RUNTIME_DIR="$(dirname "$RUNTIME_LOG")"RUNTIME_LOCK="${RUNTIME_LOG}.lock"-FALCON_HEC_ENDPOINT="${4:-}"-FALCON_HEC_TOKEN="${5:-}"-FALCON_SOURCE="${6:-beacon-endpoint-agent}"-FALCON_SOURCETYPE="${7:-json}"-OTLP_GRPC_PORT="${8:-4317}"-OTLP_HTTP_PORT="${9:-4318}"-FALCON_INDEX="${10:-}"+OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${4:-4317}}"+OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${5:-4318}}"if [ ! -x "$BEACON_BIN" ]; thenecho "Beacon binary not found or not executable at $BEACON_BIN" >&2@@ -36,25 +31,6 @@ ARGS=(--otlp-http-port "$OTLP_HTTP_PORT")-if [ -n "$FALCON_HEC_ENDPOINT" ]; then- ARGS+=(--falcon-hec-endpoint "$FALCON_HEC_ENDPOINT")-fi--if [ -n "$FALCON_HEC_TOKEN" ]; then- ARGS+=(--falcon-hec-token "$FALCON_HEC_TOKEN")-fi--if [ -n "$FALCON_INDEX" ]; then- ARGS+=(--falcon-index "$FALCON_INDEX")-fi--if [ -n "$FALCON_HEC_ENDPOINT" ] || [ -n "$FALCON_HEC_TOKEN" ] || [ -n "$FALCON_INDEX" ]; then- ARGS+=(- --falcon-source "$FALCON_SOURCE"- --falcon-sourcetype "$FALCON_SOURCETYPE"- )-fi-echo "Repairing Beacon system endpoint...""$BEACON_BIN" "${ARGS[@]}"@@ -117,10 +93,10 @@ sudo -u "$CONSOLE_USER" HOME="$HOME_DIR" test -w "$RUNTIME_LOG"sudo -u "$CONSOLE_USER" HOME="$HOME_DIR" sh -c ": >> '$RUNTIME_LOCK'"echo "Running manual Claude hook smoke test..."-sudo -u "$CONSOLE_USER" HOME="$HOME_DIR" sh -lc '-printf "{\"session_id\":\"jamf-smoke\"}" | \+sudo -u "$CONSOLE_USER" HOME="$HOME_DIR" BEACON_SMOKE_RUNTIME_LOG="$RUNTIME_LOG" sh -lc '+printf "{\"session_id\":\"jamf-claude-smoke\"}" | \BEACON_ENDPOINT_MODE=1 \-BEACON_ENDPOINT_LOG="/var/log/beacon-agent/runtime.jsonl" \+BEACON_ENDPOINT_LOG="$BEACON_SMOKE_RUNTIME_LOG" \BEACON_ENDPOINT_CONFIG="/Library/Application Support/Beacon/Endpoint/config.json" \"$HOME/.beacon/endpoint/hooks/beacon-hooks" --platform claude session-start'diff --git a/packaging/macos/jamf/scripts/install-falcon-vector-forwarder.sh b/packaging/macos/jamf/claude/falcon/install-forwarder.shsimilarity index 98%rename from packaging/macos/jamf/scripts/install-falcon-vector-forwarder.shrename to packaging/macos/jamf/claude/falcon/install-forwarder.shindex ba603516..3b76d292 100755--- a/packaging/macos/jamf/scripts/install-falcon-vector-forwarder.sh+++ b/packaging/macos/jamf/claude/falcon/install-forwarder.sh@@ -3,7 +3,7 @@ set -euLABEL="${BEACON_FALCON_FORWARDER_LABEL:-com.beacon.endpoint.falcon-forwarder}"VECTOR_BIN="${BEACON_VECTOR_BIN:-/opt/beacon/bin/vector}"-WRAPPER="${BEACON_FALCON_FORWARDER_WRAPPER:-/opt/beacon/scripts/run-falcon-forwarder.sh}"+WRAPPER="${BEACON_FALCON_FORWARDER_WRAPPER:-/opt/beacon/jamf/claude/falcon/run-forwarder.sh}"BASE_DIR="${BEACON_FORWARDER_BASE_DIR:-/Library/Application Support/Beacon/Forwarders}"LAUNCHDAEMONS_DIR="${BEACON_LAUNCHDAEMONS_DIR:-/Library/LaunchDaemons}"CONFIG_PATH="${BEACON_FALCON_VECTOR_CONFIG:-$BASE_DIR/falcon-vector.toml}"diff --git a/packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.sh b/packaging/macos/jamf/claude/falcon/repair-hooks-and-forwarder.shsimilarity index 82%rename from packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.shrename to packaging/macos/jamf/claude/falcon/repair-hooks-and-forwarder.shindex 05b285e2..34e68771 100755--- a/packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.sh+++ b/packaging/macos/jamf/claude/falcon/repair-hooks-and-forwarder.sh@@ -1,8 +1,8 @@#!/bin/shset -eu-REPAIR_SCRIPT="${BEACON_REPAIR_HOOKS_SCRIPT:-/opt/beacon/jamf/scripts/repair-falcon-claude-hooks.sh}"-FORWARDER_SCRIPT="${BEACON_FALCON_VECTOR_SCRIPT:-/opt/beacon/jamf/scripts/install-falcon-vector-forwarder.sh}"+REPAIR_SCRIPT="${BEACON_REPAIR_HOOKS_SCRIPT:-/opt/beacon/jamf/claude/common/repair-hooks.sh}"+FORWARDER_SCRIPT="${BEACON_FALCON_VECTOR_SCRIPT:-/opt/beacon/jamf/claude/falcon/install-forwarder.sh}"FALCON_HEC_ENDPOINT="${BEACON_FALCON_HEC_ENDPOINT:-${4:-}}"FALCON_HEC_TOKEN="${BEACON_FALCON_HEC_TOKEN:-${5:-}}"@@ -26,4 +26,4 @@ echo "Installing Falcon Vector runtime-log forwarder...""$FORWARDER_SCRIPT" _ _ _ "$FALCON_HEC_ENDPOINT" "$FALCON_HEC_TOKEN" "$FALCON_SOURCE" "$FALCON_SOURCETYPE" "$FALCON_INDEX"echo "Repairing endpoint and Claude hooks without collector-based Falcon forwarding..."-"$REPAIR_SCRIPT" _ _ _ "" "" "" "" "$OTLP_GRPC_PORT" "$OTLP_HTTP_PORT" ""+"$REPAIR_SCRIPT" _ _ _ "$OTLP_GRPC_PORT" "$OTLP_HTTP_PORT"diff --git a/packaging/macos/run-falcon-forwarder.sh b/packaging/macos/jamf/claude/falcon/run-forwarder.shsimilarity index 100%rename from packaging/macos/run-falcon-forwarder.shrename to packaging/macos/jamf/claude/falcon/run-forwarder.shdiff --git a/packaging/macos/jamf/claude/s3/install-forwarder.sh b/packaging/macos/jamf/claude/s3/install-forwarder.shnew file mode 100755index 00000000..a9eedc7f--- /dev/null+++ b/packaging/macos/jamf/claude/s3/install-forwarder.sh@@ -0,0 +1,193 @@+#!/bin/sh+set -eu++LABEL="${BEACON_S3_FORWARDER_LABEL:-com.beacon.endpoint.s3-forwarder}"+VECTOR_BIN="${BEACON_VECTOR_BIN:-/opt/beacon/bin/vector}"+WRAPPER="${BEACON_S3_FORWARDER_WRAPPER:-/opt/beacon/jamf/claude/s3/run-forwarder.sh}"+BASE_DIR="${BEACON_FORWARDER_BASE_DIR:-/Library/Application Support/Beacon/Forwarders}"+LAUNCHDAEMONS_DIR="${BEACON_LAUNCHDAEMONS_DIR:-/Library/LaunchDaemons}"+CONFIG_PATH="${BEACON_S3_VECTOR_CONFIG:-$BASE_DIR/s3-vector.toml}"+ENV_PATH="${BEACON_S3_VECTOR_ENV:-$BASE_DIR/s3-vector.env}"+DATA_DIR="${BEACON_S3_VECTOR_DATA_DIR:-$BASE_DIR/vector-data/s3}"+PLIST_PATH="$LAUNCHDAEMONS_DIR/$LABEL.plist"++S3_BUCKET="${BEACON_S3_BUCKET:-${4:-}}"+AWS_REGION_VALUE="${AWS_REGION:-${5:-}}"+S3_PREFIX="${BEACON_S3_PREFIX:-${6:-beacon/runtime}}"+S3_STORAGE_CLASS="${BEACON_S3_STORAGE_CLASS:-${7:-STANDARD}}"+VECTOR_READ_FROM="${BEACON_VECTOR_READ_FROM:-${8:-end}}"+RUNTIME_LOG_PATHS="${BEACON_RUNTIME_LOG_PATHS:-/var/log/beacon-agent/runtime.jsonl}"+NO_START="${BEACON_NO_START:-0}"++if [ -z "$S3_BUCKET" ]; then+ echo "S3 bucket is required (BEACON_S3_BUCKET or Jamf parameter 4)" >&2+ exit 1+fi++if [ -z "$AWS_REGION_VALUE" ]; then+ echo "AWS region is required (AWS_REGION or Jamf parameter 5)" >&2+ exit 1+fi++if [ ! -x "$VECTOR_BIN" ]; then+ echo "Vector binary not found or not executable at $VECTOR_BIN" >&2+ exit 1+fi++if [ ! -x "$WRAPPER" ]; then+ echo "S3 forwarder wrapper not found or not executable at $WRAPPER" >&2+ exit 1+fi++"$VECTOR_BIN" --version >/dev/null++shell_quote() {+ printf "'%s'" "$(printf '%s' "$1" | sed "s/'/'\\\\''/g")"+}++toml_quote() {+ printf '"%s"' "$(printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g')"+}++xml_escape() {+ printf '%s' "$1" | sed 's/&/\&/g; s/</\</g; s/>/\>/g; s/"/\"/g'+}++include_array() {+ old_ifs="$IFS"+ IFS=,+ first=1+ printf '['+ for raw in $RUNTIME_LOG_PATHS; do+ path="$(printf '%s' "$raw" | sed 's/^ *//; s/ *$//')"+ [ -n "$path" ] || continue+ if [ "$first" -eq 0 ]; then+ printf ', '+ fi+ toml_quote "$path"+ first=0+ case "$path" in+ *'*'*|*'?'*|*'['*) ;;+ *)+ mkdir -p "$(dirname "$path")"+ touch "$path"+ chmod 0644 "$path" || true+ ;;+ esac+ done+ printf ']'+ IFS="$old_ifs"+}++mkdir -p "$BASE_DIR" "$DATA_DIR" "$LAUNCHDAEMONS_DIR"+chmod 0755 "$BASE_DIR" "$DATA_DIR" "$LAUNCHDAEMONS_DIR" 2>/dev/null || true++INCLUDES="$(include_array)"++cat >"$CONFIG_PATH" <<EOF+# Managed by Beacon. Do not edit by hand.+# AWS credentials are resolved by Vector through the standard AWS provider chain.+data_dir = "$(printf '%s' "$DATA_DIR" | sed 's/\\/\\\\/g; s/"/\\"/g')"++[sources.beacon_runtime]+type = "file"+include = $INCLUDES+read_from = "\${BEACON_VECTOR_READ_FROM:-end}"++[transforms.beacon_json]+type = "remap"+inputs = ["beacon_runtime"]+source = '''+. = parse_json!(.message)+'''++[sinks.beacon_s3]+type = "aws_s3"+inputs = ["beacon_json"]+bucket = "\${BEACON_S3_BUCKET}"+region = "\${AWS_REGION}"+key_prefix = "\${BEACON_S3_PREFIX:-beacon/runtime}/date=%F/"+filename_time_format = "%s"+filename_append_uuid = true+filename_extension = "jsonl.gz"+compression = "gzip"+content_encoding = "gzip"+content_type = "application/x-ndjson"+storage_class = "\${BEACON_S3_STORAGE_CLASS:-STANDARD}"++[sinks.beacon_s3.encoding]+codec = "json"++[sinks.beacon_s3.framing]+method = "newline_delimited"++[sinks.beacon_s3.batch]+max_bytes = 10000000+timeout_secs = 300++[sinks.beacon_s3.request]+retry_attempts = 10+retry_initial_backoff_secs = 1+retry_max_duration_secs = 300+EOF++chmod 0644 "$CONFIG_PATH"++{+ printf 'export BEACON_S3_BUCKET=%s\n' "$(shell_quote "$S3_BUCKET")"+ printf 'export AWS_REGION=%s\n' "$(shell_quote "$AWS_REGION_VALUE")"+ printf 'export BEACON_S3_PREFIX=%s\n' "$(shell_quote "$S3_PREFIX")"+ printf 'export BEACON_S3_STORAGE_CLASS=%s\n' "$(shell_quote "$S3_STORAGE_CLASS")"+ printf 'export BEACON_VECTOR_READ_FROM=%s\n' "$(shell_quote "$VECTOR_READ_FROM")"+} >"$ENV_PATH"+chmod 0600 "$ENV_PATH"++cat >"$PLIST_PATH" <<EOF+<?xml version="1.0" encoding="UTF-8"?>+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">+<plist version="1.0">+<dict>+ <key>Label</key>+ <string>$(xml_escape "$LABEL")</string>+ <key>ProgramArguments</key>+ <array>+ <string>$(xml_escape "$WRAPPER")</string>+ </array>+ <key>RunAtLoad</key>+ <true/>+ <key>KeepAlive</key>+ <true/>+ <key>StandardOutPath</key>+ <string>/tmp/$LABEL.out</string>+ <key>StandardErrorPath</key>+ <string>/tmp/$LABEL.err</string>+</dict>+</plist>+EOF+chmod 0644 "$PLIST_PATH"++echo "S3 Vector config: $CONFIG_PATH"+echo "S3 Vector env: $ENV_PATH"+echo "S3 Vector LaunchDaemon: $PLIST_PATH"++case "$NO_START" in+ 1|true|TRUE|yes|YES)+ echo "BEACON_NO_START is set; not loading $LABEL"+ exit 0+ ;;+esac++if command -v launchctl >/dev/null 2>&1; then+ launchctl bootout "system/$LABEL" >/dev/null 2>&1 || true+ launchctl bootstrap system "$PLIST_PATH" >/dev/null 2>&1 || {+ launchctl print "system/$LABEL" >/dev/null 2>&1 || exit 1+ }+ launchctl print "system/$LABEL" || true+else+ echo "launchctl unavailable; wrote config but did not start $LABEL" >&2+fi++if [ -f "/tmp/$LABEL.err" ]; then+ echo "Last S3 Vector stderr lines:"+ tail -n 20 "/tmp/$LABEL.err" || true+fidiff --git a/packaging/macos/jamf/claude/s3/repair-hooks-and-forwarder.sh b/packaging/macos/jamf/claude/s3/repair-hooks-and-forwarder.shnew file mode 100755index 00000000..b07caa9c--- /dev/null+++ b/packaging/macos/jamf/claude/s3/repair-hooks-and-forwarder.sh@@ -0,0 +1,29 @@+#!/bin/sh+set -eu++REPAIR_SCRIPT="${BEACON_REPAIR_HOOKS_SCRIPT:-/opt/beacon/jamf/claude/common/repair-hooks.sh}"+FORWARDER_SCRIPT="${BEACON_S3_VECTOR_SCRIPT:-/opt/beacon/jamf/claude/s3/install-forwarder.sh}"++S3_BUCKET="${BEACON_S3_BUCKET:-${4:-}}"+AWS_REGION_VALUE="${AWS_REGION:-${5:-}}"+S3_PREFIX="${BEACON_S3_PREFIX:-${6:-beacon/runtime}}"+S3_STORAGE_CLASS="${BEACON_S3_STORAGE_CLASS:-${7:-STANDARD}}"+VECTOR_READ_FROM="${BEACON_VECTOR_READ_FROM:-${8:-end}}"+OTLP_GRPC_PORT="${BEACON_OTLP_GRPC_PORT:-${9:-4317}}"+OTLP_HTTP_PORT="${BEACON_OTLP_HTTP_PORT:-${10:-4318}}"++if [ ! -x "$REPAIR_SCRIPT" ]; then+ echo "Repair script not found or not executable at $REPAIR_SCRIPT" >&2+ exit 1+fi++if [ ! -x "$FORWARDER_SCRIPT" ]; then+ echo "S3 Vector forwarder script not found or not executable at $FORWARDER_SCRIPT" >&2+ exit 1+fi++echo "Installing S3 Vector runtime-log forwarder..."+"$FORWARDER_SCRIPT" _ _ _ "$S3_BUCKET" "$AWS_REGION_VALUE" "$S3_PREFIX" "$S3_STORAGE_CLASS" "$VECTOR_READ_FROM"++echo "Repairing endpoint and Claude hooks..."+"$REPAIR_SCRIPT" _ _ _ "$OTLP_GRPC_PORT" "$OTLP_HTTP_PORT"diff --git a/packaging/macos/jamf/claude/s3/run-forwarder.sh b/packaging/macos/jamf/claude/s3/run-forwarder.shnew file mode 100755index 00000000..76a5530a--- /dev/null+++ b/packaging/macos/jamf/claude/s3/run-forwarder.sh@@ -0,0 +1,23 @@+#!/bin/sh+set -eu++VECTOR_BIN="${BEACON_VECTOR_BIN:-/opt/beacon/bin/vector}"+CONFIG_PATH="${BEACON_S3_VECTOR_CONFIG:-/Library/Application Support/Beacon/Forwarders/s3-vector.toml}"+ENV_PATH="${BEACON_S3_VECTOR_ENV:-/Library/Application Support/Beacon/Forwarders/s3-vector.env}"++if [ -f "$ENV_PATH" ]; then+ # shellcheck disable=SC1090+ . "$ENV_PATH"+fi++if [ ! -x "$VECTOR_BIN" ]; then+ echo "Vector binary not found or not executable at $VECTOR_BIN" >&2+ exit 1+fi++if [ ! -f "$CONFIG_PATH" ]; then+ echo "Vector config not found at $CONFIG_PATH" >&2+ exit 1+fi++exec "$VECTOR_BIN" --config "$CONFIG_PATH"diff --git a/packaging/macos/pkgbuild.md b/packaging/macos/pkgbuild.mdindex 8eaeadf1..f54e7578 100644--- a/packaging/macos/pkgbuild.md+++ b/packaging/macos/pkgbuild.md@@ -144,12 +144,12 @@ multi-repository ingest tokens. Repository-scoped ingest tokens already choosethe target repository.The packaged Jamf samples also include-`/opt/beacon/jamf/scripts/repair-falcon-claude-hooks.sh` for pilots that need a-single policy to repair the system endpoint, configure Falcon LogScale HEC,-prepare the shared runtime log for user-run hooks, reinstall Claude Code hooks-for the console user, and run a manual hook smoke test. It accepts Falcon HEC-settings as Jamf parameters 4-7, OTLP ports as parameters 8-9, and an optional-Falcon repository/index as parameter 10.+`/opt/beacon/jamf/claude/common/repair-hooks.sh` for pilots that need a+single policy to repair the system endpoint, prepare the shared runtime log for+user-run hooks, reinstall Claude Code hooks for the console user, and run a+manual hook smoke test. Destination-specific forwarding policies live under+`/opt/beacon/jamf/claude/<destination>`, sourced from+[`packaging/macos/jamf/claude/<destination>`](https://github.com/Asymptote-Labs/agent-beacon/tree/main/packaging/macos/jamf/claude).Upload Extension Attributes from`packaging/macos/jamf/extension-attributes` and build Smart Groups for missing,diff --git a/packaging/macos/scripts/postinstall b/packaging/macos/scripts/postinstallindex 6e86c453..fb9ae5ad 100755--- a/packaging/macos/scripts/postinstall+++ b/packaging/macos/scripts/postinstall@@ -17,17 +17,29 @@ BEACON_SPLUNK_CA_FILE="${BEACON_SPLUNK_CA_FILE:-}" \BEACON_NO_START=1 \/opt/beacon/scripts/install-endpoint.sh+restart_optional_forwarder() {+ label="$1"+ plist_path="$2"++ if [ ! -f "$plist_path" ]; then+ return 0+ fi++ launchctl bootout "system/$label" >/dev/null 2>&1 || true+ launchctl bootstrap system "$plist_path" >/dev/null 2>&1 || {+ if ! launchctl print "system/$label" >/dev/null 2>&1; then+ echo "Warning: could not restart optional forwarder $label" >&2+ fi+ }+}+if command -v launchctl >/dev/null 2>&1; thenlaunchctl bootout system/com.beacon.endpoint.collector >/dev/null 2>&1 || truelaunchctl bootstrap system /Library/LaunchDaemons/com.beacon.endpoint.collector.plist >/dev/null 2>&1 || {launchctl print system/com.beacon.endpoint.collector >/dev/null 2>&1 || exit 1}- if [ -f /Library/LaunchDaemons/com.beacon.endpoint.falcon-forwarder.plist ]; then- launchctl bootout system/com.beacon.endpoint.falcon-forwarder >/dev/null 2>&1 || true- launchctl bootstrap system /Library/LaunchDaemons/com.beacon.endpoint.falcon-forwarder.plist >/dev/null 2>&1 || {- launchctl print system/com.beacon.endpoint.falcon-forwarder >/dev/null 2>&1 || exit 1- }- fi+ restart_optional_forwarder "com.beacon.endpoint.falcon-forwarder" "/Library/LaunchDaemons/com.beacon.endpoint.falcon-forwarder.plist"+ restart_optional_forwarder "com.beacon.endpoint.s3-forwarder" "/Library/LaunchDaemons/com.beacon.endpoint.s3-forwarder.plist"fiexit 0diff --git a/packaging/macos/test-endpoint-scripts.sh b/packaging/macos/test-endpoint-scripts.shindex 1bd33c03..55e65a3a 100644--- a/packaging/macos/test-endpoint-scripts.sh+++ b/packaging/macos/test-endpoint-scripts.sh@@ -13,9 +13,9 @@ trap 'rm -rf "$TMP_DIR"' EXIT INT TERMsh -n "$INSTALL_SCRIPT"sh -n "$UNINSTALL_SCRIPT"sh -n "$PKG_BUILD_SCRIPT"-for script in "$ROOT_DIR"/packaging/macos/scripts/* "$ROOT_DIR"/packaging/macos/jamf/scripts/*.sh "$ROOT_DIR"/packaging/macos/jamf/extension-attributes/*.sh "$ROOT_DIR"/packaging/macos/fleet/scripts/*.sh; do+for script in "$ROOT_DIR"/packaging/macos/scripts/* "$ROOT_DIR"/packaging/macos/jamf/scripts/*.sh "$ROOT_DIR"/packaging/macos/jamf/claude/*/*.sh "$ROOT_DIR"/packaging/macos/jamf/extension-attributes/*.sh "$ROOT_DIR"/packaging/macos/fleet/scripts/*.sh; docase "$script" in- */repair-falcon-claude-hooks.sh)+ */repair-hooks.sh)bash -n "$script";;*)@@ -285,11 +285,11 @@ FORWARDER_BASE="$TMP_DIR/forwarders"LAUNCHDAEMONS_DIR="$TMP_DIR/launchdaemons"mkdir -p "$LAUNCHDAEMONS_DIR"BEACON_VECTOR_BIN="$FAKE_VECTOR" \-BEACON_FALCON_FORWARDER_WRAPPER="$ROOT_DIR/packaging/macos/run-falcon-forwarder.sh" \+BEACON_FALCON_FORWARDER_WRAPPER="$ROOT_DIR/packaging/macos/jamf/claude/falcon/run-forwarder.sh" \BEACON_FORWARDER_BASE_DIR="$FORWARDER_BASE" \BEACON_LAUNCHDAEMONS_DIR="$LAUNCHDAEMONS_DIR" \BEACON_NO_START="1" \-"$ROOT_DIR/packaging/macos/jamf/scripts/install-falcon-vector-forwarder.sh" _ _ _ "https://falcon.example/services/collector" "falcon-token" "beacon-source" "json" "beacon-index" "$TMP_DIR/runtime.jsonl,/Users/*/.beacon/endpoint/logs/runtime.jsonl" "end" >/dev/null+"$ROOT_DIR/packaging/macos/jamf/claude/falcon/install-forwarder.sh" _ _ _ "https://falcon.example/services/collector" "falcon-token" "beacon-source" "json" "beacon-index" "$TMP_DIR/runtime.jsonl,/Users/*/.beacon/endpoint/logs/runtime.jsonl" "end" >/dev/nullif [ ! -f "$FORWARDER_BASE/falcon-vector.toml" ]; thenecho "Falcon Vector config was not written" >&2@@ -347,7 +347,7 @@ BEACON_FALCON_VECTOR_SCRIPT="$FAKE_FORWARDER" \BEACON_FALCON_HEC_ENDPOINT="https://falcon.example/services/collector" \BEACON_FALCON_HEC_TOKEN="falcon-token" \FORWARDER_MARKER="$FORWARDER_MARKER" \-"$ROOT_DIR/packaging/macos/jamf/scripts/repair-falcon-claude-hooks-vector.sh" >/dev/null 2>&1 && {+"$ROOT_DIR/packaging/macos/jamf/claude/falcon/repair-hooks-and-forwarder.sh" >/dev/null 2>&1 && {echo "combined Falcon Vector repair should return the failing repair status" >&2exit 1}@@ -355,3 +355,98 @@ if [ ! -f "$FORWARDER_MARKER" ]; thenecho "combined Falcon Vector repair should run forwarder before failing repair" >&2exit 1fi++S3_FORWARDER_BASE="$TMP_DIR/s3-forwarders"+S3_LAUNCHDAEMONS_DIR="$TMP_DIR/s3-launchdaemons"+mkdir -p "$S3_LAUNCHDAEMONS_DIR"+BEACON_VECTOR_BIN="$FAKE_VECTOR" \+BEACON_S3_FORWARDER_WRAPPER="$ROOT_DIR/packaging/macos/jamf/claude/s3/run-forwarder.sh" \+BEACON_FORWARDER_BASE_DIR="$S3_FORWARDER_BASE" \+BEACON_LAUNCHDAEMONS_DIR="$S3_LAUNCHDAEMONS_DIR" \+BEACON_RUNTIME_LOG_PATHS="$TMP_DIR/s3-runtime.jsonl" \+BEACON_NO_START="1" \+AWS_SECRET_ACCESS_KEY="dont-write-me" \+"$ROOT_DIR/packaging/macos/jamf/claude/s3/install-forwarder.sh" _ _ _ "beacon-test-bucket" "us-west-2" "beacon/claude" "STANDARD_IA" "end" >/dev/null++if [ ! -f "$S3_FORWARDER_BASE/s3-vector.toml" ]; then+ echo "S3 Vector config was not written" >&2+ exit 1+fi+if [ ! -f "$S3_FORWARDER_BASE/s3-vector.env" ]; then+ echo "S3 Vector env was not written" >&2+ exit 1+fi+if [ ! -f "$S3_LAUNCHDAEMONS_DIR/com.beacon.endpoint.s3-forwarder.plist" ]; then+ echo "S3 Vector plist was not written" >&2+ exit 1+fi+if ! grep -q 'sinks.beacon_s3' "$S3_FORWARDER_BASE/s3-vector.toml"; then+ echo "S3 Vector config missing sink" >&2+ exit 1+fi+if ! grep -q 'compression = "gzip"' "$S3_FORWARDER_BASE/s3-vector.toml"; then+ echo "S3 Vector config missing gzip compression" >&2+ exit 1+fi+if ! grep -q 'filename_append_uuid = true' "$S3_FORWARDER_BASE/s3-vector.toml"; then+ echo "S3 Vector config missing non-overwriting object keys" >&2+ exit 1+fi+if ! grep -q 'bucket = "${BEACON_S3_BUCKET}"' "$S3_FORWARDER_BASE/s3-vector.toml"; then+ echo "S3 Vector config should reference bucket env var" >&2+ exit 1+fi+if grep -q 'beacon-test-bucket\|dont-write-me' "$S3_FORWARDER_BASE/s3-vector.toml"; then+ echo "S3 Vector config should not contain bucket values or AWS secrets" >&2+ exit 1+fi+if ! grep -q "beacon-test-bucket" "$S3_FORWARDER_BASE/s3-vector.env"; then+ echo "S3 Vector env missing bucket" >&2+ exit 1+fi+if ! grep -q "us-west-2" "$S3_FORWARDER_BASE/s3-vector.env"; then+ echo "S3 Vector env missing region" >&2+ exit 1+fi+if grep -q "dont-write-me" "$S3_FORWARDER_BASE/s3-vector.env"; then+ echo "S3 Vector env should not contain AWS secrets" >&2+ exit 1+fi+case "$(ls -l "$S3_FORWARDER_BASE/s3-vector.env" | awk '{print $1}')" in+ -rw-------*) ;;+ *)+ echo "S3 Vector env should be 0600" >&2+ exit 1+ ;;+esac+if ! grep -q 'RunAtLoad' "$S3_LAUNCHDAEMONS_DIR/com.beacon.endpoint.s3-forwarder.plist"; then+ echo "S3 Vector plist missing RunAtLoad" >&2+ exit 1+fi++S3_FAKE_REPAIR="$TMP_DIR/fake-s3-repair-fails.sh"+S3_FAKE_FORWARDER="$TMP_DIR/fake-s3-forwarder-runs.sh"+S3_FORWARDER_MARKER="$TMP_DIR/s3-forwarder-ran"+cat >"$S3_FAKE_REPAIR" <<'STUB'+#!/bin/sh+exit 9+STUB+cat >"$S3_FAKE_FORWARDER" <<'STUB'+#!/bin/sh+printf '%s\n' "$*" > "$S3_FORWARDER_MARKER"+STUB+chmod +x "$S3_FAKE_REPAIR" "$S3_FAKE_FORWARDER"++BEACON_REPAIR_HOOKS_SCRIPT="$S3_FAKE_REPAIR" \+BEACON_S3_VECTOR_SCRIPT="$S3_FAKE_FORWARDER" \+BEACON_S3_BUCKET="beacon-test-bucket" \+AWS_REGION="us-west-2" \+S3_FORWARDER_MARKER="$S3_FORWARDER_MARKER" \+"$ROOT_DIR/packaging/macos/jamf/claude/s3/repair-hooks-and-forwarder.sh" >/dev/null 2>&1 && {+ echo "combined S3 Vector repair should return the failing repair status" >&2+ exit 1+}+if [ ! -f "$S3_FORWARDER_MARKER" ]; then+ echo "combined S3 Vector repair should run forwarder before failing repair" >&2+ exit 1+fi