@agent-watch-ai/edge 0.2.5 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +512 -0
- package/README.md +217 -96
- package/SECURITY.md +69 -0
- package/dist/billing/session-billing.d.ts +19 -0
- package/dist/billing/session-billing.js +52 -0
- package/dist/cli/args.d.ts +10 -0
- package/dist/cli/args.js +20 -0
- package/dist/cli/constants/cli.constants.d.ts +50 -4
- package/dist/cli/constants/cli.constants.js +54 -5
- package/dist/cli/context.d.ts +33 -2
- package/dist/cli/context.js +84 -14
- package/dist/cli/doctor.js +309 -32
- package/dist/cli/hook-check.d.ts +23 -0
- package/dist/cli/hook-check.js +114 -0
- package/dist/cli/hook.js +118 -7
- package/dist/cli/index.d.ts +3 -1
- package/dist/cli/index.js +3 -1
- package/dist/cli/misc.d.ts +11 -0
- package/dist/cli/misc.js +80 -4
- package/dist/cli/npx-install.d.ts +37 -0
- package/dist/cli/npx-install.js +79 -0
- package/dist/cli/open-browser.d.ts +39 -0
- package/dist/cli/open-browser.js +62 -0
- package/dist/cli/setup.d.ts +17 -8
- package/dist/cli/setup.js +439 -98
- package/dist/cli/status.js +82 -13
- package/dist/cli/toggle.d.ts +9 -0
- package/dist/cli/toggle.js +113 -0
- package/dist/cli/types/cli.types.d.ts +37 -3
- package/dist/cli/ui.d.ts +7 -0
- package/dist/cli/ui.js +10 -1
- package/dist/cli/uninstall.js +39 -2
- package/dist/cli/update.d.ts +17 -0
- package/dist/cli/update.js +76 -0
- package/dist/cli.js +100 -13
- package/dist/config/config-store.d.ts +57 -0
- package/dist/config/config-store.js +250 -12
- package/dist/config/config.d.ts +53 -6
- package/dist/config/config.js +66 -6
- package/dist/config/constants/config.constants.d.ts +113 -6
- package/dist/config/constants/config.constants.js +126 -8
- package/dist/config/destination.d.ts +24 -0
- package/dist/config/destination.js +33 -0
- package/dist/config/index.d.ts +7 -4
- package/dist/config/index.js +5 -3
- package/dist/config/repo-config.d.ts +11 -7
- package/dist/config/repo-config.js +64 -15
- package/dist/config/root-config.d.ts +72 -0
- package/dist/config/root-config.js +170 -0
- package/dist/config/schemas/config.schema.d.ts +721 -84
- package/dist/config/schemas/config.schema.js +388 -15
- package/dist/config/types/config.types.d.ts +15 -1
- package/dist/config/types/destination.types.d.ts +8 -0
- package/dist/core/async.d.ts +36 -0
- package/dist/core/async.js +68 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/object.d.ts +5 -0
- package/dist/core/object.js +9 -4
- package/dist/core/pipe.d.ts +0 -13
- package/dist/core/pipe.js +1 -9
- package/dist/core/types/core.types.d.ts +9 -0
- package/dist/core/types/core.types.js +0 -3
- package/dist/core/which.d.ts +14 -0
- package/dist/core/which.js +43 -3
- package/dist/credentials/budget.d.ts +9 -0
- package/dist/credentials/budget.js +16 -0
- package/dist/credentials/command-runner.d.ts +16 -0
- package/dist/credentials/command-runner.js +37 -0
- package/dist/credentials/constants/credentials.constants.d.ts +111 -0
- package/dist/credentials/constants/credentials.constants.js +112 -0
- package/dist/credentials/credential-status.d.ts +14 -0
- package/dist/credentials/credential-status.js +34 -0
- package/dist/credentials/credentials.d.ts +72 -0
- package/dist/credentials/credentials.js +253 -0
- package/dist/credentials/device-api.d.ts +64 -0
- package/dist/credentials/device-api.js +150 -0
- package/dist/credentials/device-state.d.ts +31 -0
- package/dist/credentials/device-state.js +51 -0
- package/dist/credentials/identity.d.ts +62 -0
- package/dist/credentials/identity.js +90 -0
- package/dist/credentials/index.d.ts +7 -0
- package/dist/credentials/index.js +5 -0
- package/dist/credentials/migration.d.ts +46 -0
- package/dist/credentials/migration.js +164 -0
- package/dist/credentials/schemas/device-api.schema.d.ts +77 -0
- package/dist/credentials/schemas/device-api.schema.js +33 -0
- package/dist/credentials/schemas/device-state.schema.d.ts +51 -0
- package/dist/credentials/schemas/device-state.schema.js +20 -0
- package/dist/credentials/secret-store.d.ts +54 -0
- package/dist/credentials/secret-store.js +217 -0
- package/dist/credentials/sign-in.d.ts +18 -0
- package/dist/credentials/sign-in.js +86 -0
- package/dist/credentials/token-refresher.d.ts +39 -0
- package/dist/credentials/token-refresher.js +185 -0
- package/dist/credentials/types/credentials.types.d.ts +195 -0
- package/dist/credentials/types/credentials.types.js +1 -0
- package/dist/enforcement/constants/enforcement.constants.d.ts +47 -1
- package/dist/enforcement/constants/enforcement.constants.js +56 -0
- package/dist/enforcement/decision-cache.d.ts +20 -1
- package/dist/enforcement/decision-cache.js +65 -2
- package/dist/enforcement/decision-client.d.ts +9 -8
- package/dist/enforcement/decision-client.js +62 -16
- package/dist/enforcement/enforcement.d.ts +23 -2
- package/dist/enforcement/enforcement.js +103 -15
- package/dist/enforcement/index.d.ts +4 -3
- package/dist/enforcement/index.js +3 -2
- package/dist/enforcement/types/enforcement.types.d.ts +64 -0
- package/dist/enrollment/constants/enrollment.constants.d.ts +2 -6
- package/dist/enrollment/constants/enrollment.constants.js +2 -6
- package/dist/enrollment/enrollment.d.ts +16 -0
- package/dist/enrollment/enrollment.js +54 -0
- package/dist/enrollment/index.d.ts +3 -7
- package/dist/enrollment/index.js +1 -1
- package/dist/enrollment/types/enrollment.types.d.ts +9 -13
- package/dist/events/constants/enrich.constants.d.ts +15 -0
- package/dist/events/constants/enrich.constants.js +15 -0
- package/dist/events/constants/events.constants.d.ts +6 -2
- package/dist/events/constants/events.constants.js +5 -1
- package/dist/events/enrich.js +92 -10
- package/dist/events/event-id.d.ts +0 -8
- package/dist/events/event-id.js +0 -10
- package/dist/events/index.d.ts +2 -2
- package/dist/events/index.js +1 -1
- package/dist/events/product-event.d.ts +9 -6
- package/dist/events/types/repo-snapshot.types.d.ts +7 -0
- package/dist/events/types/session-billing.types.d.ts +16 -0
- package/dist/events/types/session-billing.types.js +1 -0
- package/dist/feature/constants/feature.constants.d.ts +7 -0
- package/dist/feature/constants/feature.constants.js +7 -0
- package/dist/feature/index.d.ts +1 -1
- package/dist/feature/index.js +1 -1
- package/dist/feature/ticket-candidates.d.ts +14 -0
- package/dist/feature/ticket-candidates.js +26 -8
- package/dist/git/blob-hash.d.ts +21 -0
- package/dist/git/blob-hash.js +69 -0
- package/dist/git/checkout-root.d.ts +27 -0
- package/dist/git/checkout-root.js +75 -0
- package/dist/git/constants/git.constants.d.ts +160 -0
- package/dist/git/constants/git.constants.js +181 -0
- package/dist/git/fingerprint.d.ts +74 -0
- package/dist/git/fingerprint.js +219 -0
- package/dist/git/gate-checkout.d.ts +44 -0
- package/dist/git/gate-checkout.js +201 -0
- package/dist/git/git-context.d.ts +45 -0
- package/dist/git/git-context.js +61 -3
- package/dist/git/index.d.ts +4 -2
- package/dist/git/index.js +2 -1
- package/dist/git/manifest-repository.d.ts +13 -0
- package/dist/git/manifest-repository.js +92 -0
- package/dist/git/repo-snapshot.d.ts +29 -3
- package/dist/git/repo-snapshot.js +110 -7
- package/dist/git/repository-root.d.ts +39 -0
- package/dist/git/repository-root.js +131 -0
- package/dist/git/types/git.types.d.ts +55 -0
- package/dist/git/types/repository-root.types.d.ts +11 -0
- package/dist/git/types/repository-root.types.js +1 -0
- package/dist/git/types/snapshot.types.d.ts +9 -0
- package/dist/pipeline/constants/pipeline.constants.d.ts +7 -0
- package/dist/pipeline/constants/pipeline.constants.js +7 -0
- package/dist/pipeline/hook-pipeline.js +360 -32
- package/dist/pipeline/types/pipeline.types.d.ts +39 -4
- package/dist/privacy/constants/privacy.constants.js +15 -1
- package/dist/privacy/index.d.ts +1 -0
- package/dist/privacy/index.js +1 -0
- package/dist/privacy/product-capture.d.ts +12 -0
- package/dist/privacy/product-capture.js +73 -0
- package/dist/privacy/sanitizer.d.ts +21 -3
- package/dist/privacy/sanitizer.js +52 -8
- package/dist/process/ancestors.d.ts +39 -0
- package/dist/process/ancestors.js +121 -0
- package/dist/process/constants/process.constants.d.ts +34 -0
- package/dist/process/constants/process.constants.js +34 -0
- package/dist/process/index.d.ts +7 -0
- package/dist/process/index.js +2 -0
- package/dist/process/types/process.types.d.ts +23 -0
- package/dist/process/types/process.types.js +1 -0
- package/dist/providers/antigravity/antigravity.adapter.d.ts +12 -1
- package/dist/providers/antigravity/antigravity.adapter.js +21 -3
- package/dist/providers/antigravity/antigravity.detect.d.ts +0 -9
- package/dist/providers/antigravity/antigravity.detect.js +1 -1
- package/dist/providers/antigravity/antigravity.provider.js +3 -2
- package/dist/providers/antigravity/constants/antigravity.constants.d.ts +2 -0
- package/dist/providers/antigravity/constants/antigravity.constants.js +2 -0
- package/dist/providers/claude/claude.adapter.d.ts +11 -1
- package/dist/providers/claude/claude.adapter.js +26 -5
- package/dist/providers/claude/claude.otel.d.ts +32 -18
- package/dist/providers/claude/claude.otel.js +81 -6
- package/dist/providers/claude/claude.provider.js +5 -2
- package/dist/providers/claude/constants/claude.constants.d.ts +2 -0
- package/dist/providers/claude/constants/claude.constants.js +2 -0
- package/dist/providers/claude/constants/claude.otel.constants.d.ts +4 -0
- package/dist/providers/claude/constants/claude.otel.constants.js +8 -0
- package/dist/providers/codex/codex.adapter.d.ts +15 -1
- package/dist/providers/codex/codex.adapter.js +29 -5
- package/dist/providers/codex/codex.otel.d.ts +24 -2
- package/dist/providers/codex/codex.otel.js +147 -30
- package/dist/providers/codex/codex.provider.js +5 -2
- package/dist/providers/codex/constants/codex.constants.d.ts +2 -0
- package/dist/providers/codex/constants/codex.constants.js +16 -0
- package/dist/providers/codex/constants/codex.otel.constants.d.ts +5 -0
- package/dist/providers/codex/constants/codex.otel.constants.js +5 -0
- package/dist/providers/constants/provider.constants.d.ts +0 -3
- package/dist/providers/constants/provider.constants.js +0 -3
- package/dist/providers/cursor/constants/cursor.constants.d.ts +7 -0
- package/dist/providers/cursor/constants/cursor.constants.js +7 -0
- package/dist/providers/cursor/cursor.adapter.d.ts +33 -1
- package/dist/providers/cursor/cursor.adapter.js +52 -3
- package/dist/providers/cursor/cursor.detect.d.ts +0 -7
- package/dist/providers/cursor/cursor.detect.js +1 -1
- package/dist/providers/cursor/cursor.provider.js +5 -2
- package/dist/providers/gemini/constants/gemini.constants.d.ts +9 -0
- package/dist/providers/gemini/constants/gemini.constants.js +9 -0
- package/dist/providers/gemini/constants/gemini.otel.constants.d.ts +3 -1
- package/dist/providers/gemini/constants/gemini.otel.constants.js +3 -0
- package/dist/providers/gemini/gemini.adapter.d.ts +14 -1
- package/dist/providers/gemini/gemini.adapter.js +25 -5
- package/dist/providers/gemini/gemini.detect.d.ts +0 -7
- package/dist/providers/gemini/gemini.detect.js +1 -1
- package/dist/providers/gemini/gemini.otel.d.ts +19 -20
- package/dist/providers/gemini/gemini.otel.js +121 -17
- package/dist/providers/gemini/gemini.provider.js +2 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/providers/loaders.d.ts +10 -0
- package/dist/providers/loaders.js +40 -0
- package/dist/providers/provider.d.ts +11 -0
- package/dist/providers/provider.js +1 -1
- package/dist/providers/registry.d.ts +11 -8
- package/dist/providers/registry.js +11 -15
- package/dist/providers/shared/constants/hook-refusal.constants.d.ts +7 -0
- package/dist/providers/shared/constants/hook-refusal.constants.js +7 -0
- package/dist/providers/shared/constants/shell-directories.constants.d.ts +30 -0
- package/dist/providers/shared/constants/shell-directories.constants.js +39 -0
- package/dist/providers/shared/constants/tooling.constants.d.ts +18 -2
- package/dist/providers/shared/constants/tooling.constants.js +19 -3
- package/dist/providers/shared/event-builder.d.ts +12 -14
- package/dist/providers/shared/event-builder.js +20 -14
- package/dist/providers/shared/exporter-allowlist.d.ts +20 -0
- package/dist/providers/shared/exporter-allowlist.js +49 -0
- package/dist/providers/shared/hook-config.d.ts +2 -21
- package/dist/providers/shared/hook-config.js +5 -4
- package/dist/providers/shared/hook-refusal.d.ts +12 -0
- package/dist/providers/shared/hook-refusal.js +17 -1
- package/dist/providers/shared/install-record.d.ts +12 -2
- package/dist/providers/shared/install-record.js +5 -2
- package/dist/providers/shared/shell-directories.d.ts +24 -0
- package/dist/providers/shared/shell-directories.js +90 -0
- package/dist/providers/shared/tooling.d.ts +12 -1
- package/dist/providers/shared/tooling.js +18 -0
- package/dist/providers/shared/types/adapter.types.d.ts +1 -2
- package/dist/providers/types/provider.types.d.ts +57 -1
- package/dist/snapshot/constants/snapshot.constants.d.ts +32 -0
- package/dist/snapshot/constants/snapshot.constants.js +33 -0
- package/dist/snapshot/snapshot-event.js +52 -11
- package/dist/snapshot/snapshot-pipeline.js +1 -1
- package/dist/snapshot/types/snapshot.types.d.ts +2 -0
- package/dist/storage/atomic-file.d.ts +7 -0
- package/dist/storage/atomic-file.js +1 -1
- package/dist/storage/constants/storage.constants.d.ts +17 -0
- package/dist/storage/constants/storage.constants.js +17 -0
- package/dist/storage/disabled.d.ts +13 -0
- package/dist/storage/disabled.js +24 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.js +2 -0
- package/dist/storage/paths.js +3 -2
- package/dist/storage/schemas/storage.schema.d.ts +72 -0
- package/dist/storage/schemas/storage.schema.js +6 -0
- package/dist/storage/sweep-marker.d.ts +19 -0
- package/dist/storage/sweep-marker.js +55 -0
- package/dist/storage/types/storage.types.d.ts +2 -0
- package/dist/storage/uninstalled.d.ts +58 -0
- package/dist/storage/uninstalled.js +107 -0
- package/dist/transport/auth-block.d.ts +66 -0
- package/dist/transport/auth-block.js +129 -0
- package/dist/transport/constants/transport.constants.d.ts +82 -3
- package/dist/transport/constants/transport.constants.js +83 -4
- package/dist/transport/cooldown.js +8 -1
- package/dist/transport/delivery.d.ts +14 -6
- package/dist/transport/delivery.js +80 -55
- package/dist/transport/http-transport.d.ts +1 -0
- package/dist/transport/http-transport.js +52 -10
- package/dist/transport/index.d.ts +6 -3
- package/dist/transport/index.js +3 -0
- package/dist/transport/queue-partition.d.ts +91 -0
- package/dist/transport/queue-partition.js +143 -0
- package/dist/transport/queue.d.ts +99 -20
- package/dist/transport/queue.js +210 -69
- package/dist/transport/response-body.d.ts +25 -0
- package/dist/transport/response-body.js +64 -0
- package/dist/transport/send.d.ts +11 -0
- package/dist/transport/send.js +17 -0
- package/dist/transport/types/delivery-flow.types.d.ts +19 -0
- package/dist/transport/types/delivery-flow.types.js +1 -0
- package/dist/transport/types/transport.types.d.ts +45 -0
- package/dist/turns/claude-transcript.d.ts +19 -1
- package/dist/turns/claude-transcript.js +46 -1
- package/dist/turns/codex-originator.d.ts +11 -0
- package/dist/turns/codex-originator.js +31 -0
- package/dist/turns/codex-transcript.d.ts +30 -0
- package/dist/turns/codex-transcript.js +88 -0
- package/dist/turns/constants/turns.constants.d.ts +141 -5
- package/dist/turns/constants/turns.constants.js +155 -5
- package/dist/turns/file-identity.d.ts +27 -0
- package/dist/turns/file-identity.js +48 -0
- package/dist/turns/gemini-transcript.d.ts +30 -0
- package/dist/turns/gemini-transcript.js +96 -0
- package/dist/turns/index.d.ts +3 -3
- package/dist/turns/index.js +1 -1
- package/dist/turns/inherited-checkout.d.ts +54 -0
- package/dist/turns/inherited-checkout.js +155 -0
- package/dist/turns/native-session-titles.d.ts +26 -0
- package/dist/turns/native-session-titles.js +102 -0
- package/dist/turns/transcript.d.ts +3 -2
- package/dist/turns/transcript.js +5 -1
- package/dist/turns/turn-state.d.ts +224 -3
- package/dist/turns/turn-state.js +456 -21
- package/dist/turns/turn-summary.d.ts +1 -14
- package/dist/turns/turn-summary.js +87 -51
- package/dist/turns/turn-tracker.d.ts +21 -2
- package/dist/turns/turn-tracker.js +379 -56
- package/dist/turns/types/transcript.types.d.ts +5 -0
- package/dist/turns/types/turn-state.types.d.ts +116 -5
- package/dist/turns/types/turn-summary.types.d.ts +64 -14
- package/dist/turns/types/turn-tracker.types.d.ts +27 -1
- package/dist/turns/work-checkout.d.ts +65 -0
- package/dist/turns/work-checkout.js +666 -0
- package/dist/untraced/constants/untraced.constants.d.ts +31 -0
- package/dist/untraced/constants/untraced.constants.js +63 -0
- package/dist/untraced/untraced.d.ts +35 -0
- package/dist/untraced/untraced.js +105 -0
- package/dist/update/constants/update.constants.d.ts +18 -0
- package/dist/update/constants/update.constants.js +20 -0
- package/dist/update/update-check.d.ts +52 -0
- package/dist/update/update-check.js +113 -0
- package/docs/AUDIT_PROMPT.md +129 -0
- package/docs/DATA_HANDLING.md +648 -0
- package/docs/ENTERPRISE_DEPLOYMENT.md +179 -0
- package/docs/PERFORMANCE.md +81 -0
- package/package.json +14 -4
- package/dist/enrollment/enrollment-provider.d.ts +0 -5
- package/dist/enrollment/manual-enrollment.d.ts +0 -32
- package/dist/enrollment/manual-enrollment.js +0 -72
- package/example/README.md +0 -43
- package/example/server.mjs +0 -240
- /package/dist/{enrollment/enrollment-provider.js → config/types/destination.types.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,507 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.3.1
|
|
6
|
+
|
|
7
|
+
- `agentwatch <command> --help` prints the help and exits 0 without running the
|
|
8
|
+
command; `agentwatch setup --help` used to run setup.
|
|
9
|
+
- Gemini token usage is read from its own chat file
|
|
10
|
+
(`~/.gemini/tmp/<project>/chats/session-*.jsonl`): numbers only, no prompt or
|
|
11
|
+
tool content, so Gemini spend reaches the platform on a default install
|
|
12
|
+
without native telemetry or content consent. After a browser sign-in, setup
|
|
13
|
+
no longer warns that Codex and Gemini native telemetry is refused.
|
|
14
|
+
- `agentwatch setup <enrollment-url>` opens the sign-in link in the default
|
|
15
|
+
browser (`open`, `xdg-open` or `rundll32`, no shell; http(s) links only) and
|
|
16
|
+
still prints it with the code. It opens nothing under CI, over SSH, without a
|
|
17
|
+
terminal, or with the new `--no-browser` flag.
|
|
18
|
+
- After a browser sign-in, setup names the account that approved it as the
|
|
19
|
+
developer (`developer: you@company.com (signed in)`) and stores that email,
|
|
20
|
+
instead of this checkout's git email. A gateway that does not yet send the
|
|
21
|
+
approver (before AWT-555) gets the email stored on this machine with a note that the
|
|
22
|
+
platform credits the approver; an approver that is not a plain email is
|
|
23
|
+
ignored. The approver also replaces an explicit `--developer-email` for that
|
|
24
|
+
scope, and it is the email hooks send with each turn and match per-developer
|
|
25
|
+
policies on. The platform already credited the approver, so attribution does
|
|
26
|
+
not change; the output, the config and local policy matching now agree with it.
|
|
27
|
+
|
|
28
|
+
## 0.3.0
|
|
29
|
+
|
|
30
|
+
### Behaviour change: uninstall revokes the device credential
|
|
31
|
+
|
|
32
|
+
`agentwatch uninstall` (all agents) now switches this machine's device
|
|
33
|
+
credential off on the platform (`POST /v1/devices/revoke`) before it deletes
|
|
34
|
+
the secret from the keychain. Offline, rate limited or on a server error it
|
|
35
|
+
still finishes locally, exits 0, and says the credential is still active and
|
|
36
|
+
that an admin can revoke the machine in Settings → Install. `uninstall --agent`
|
|
37
|
+
leaves the credential alone. A config uninstall cannot update (another process
|
|
38
|
+
holds it, or it is invalid) is a failure: it exits non-zero and says to re-run.
|
|
39
|
+
Until `setup` runs again for an entry (the machine, or a `--root`), nothing
|
|
40
|
+
enrolls a new device from the install key uninstall keeps in the config, and
|
|
41
|
+
nothing sends that key: hooks queue, the header helper prints no bearer, and
|
|
42
|
+
`status` and `doctor` report the entry as uninstalled. Devices are revoked at
|
|
43
|
+
the endpoint they were enrolled with.
|
|
44
|
+
|
|
45
|
+
### Behaviour change: the install key is exchanged for a device credential in the OS keychain
|
|
46
|
+
|
|
47
|
+
On its first run that reaches the backend, the edge trades the install key in
|
|
48
|
+
`~/.agentwatch/config.json` for a per-device credential (`POST /v1/devices/enroll`),
|
|
49
|
+
keeps the device secret in the macOS Keychain, libsecret or Windows DPAPI, and
|
|
50
|
+
records the device beside the key in the config (the key stays until Codex and
|
|
51
|
+
Gemini move to short-lived tokens, AWT-357). Hooks, `status`, `doctor` and the Claude Code
|
|
52
|
+
header helper send a one-hour access token, refreshed by one process per machine.
|
|
53
|
+
Without a keychain the secret is a 0600 file and `status`/`doctor` say so. A
|
|
54
|
+
revoked device queues events and is reported once. `uninstall` removes the secret.
|
|
55
|
+
Codex and Gemini keep the static header setup wrote. Needs a gateway that serves
|
|
56
|
+
`/v1/devices/*`; until then the install key keeps working and the exchange is
|
|
57
|
+
retried hourly. Credential work in a hook takes at most half the delivery
|
|
58
|
+
budget and backs off with the backend cooldown; on Windows a hook never starts
|
|
59
|
+
PowerShell itself (setup exchanges the key, and a due refresh runs in one
|
|
60
|
+
detached `agentwatch refresh-credential`). An expired device secret is enrolled
|
|
61
|
+
again automatically; a revoked device only by `setup --token <install key>`.
|
|
62
|
+
Keychain tools are run from the system directories, never from `PATH`, and a
|
|
63
|
+
repo `.agentwatch.json` cannot set `device`. See `SECURITY.md` and `docs/DATA_HANDLING.md`.
|
|
64
|
+
|
|
65
|
+
### Behaviour change: a review in a detached checkout reports its pull request's branch
|
|
66
|
+
|
|
67
|
+
A turn in a checkout with no branch checked out (an automated reviewer's
|
|
68
|
+
worktree, or `git checkout <sha>`) now reports, as its branch, the one
|
|
69
|
+
remote-tracking branch whose tip is the checked-out commit, without its remote's
|
|
70
|
+
prefix, and that branch's ticket keys (AWT-439). When no branch or several point
|
|
71
|
+
there, or one of them is the repository's default branch (`<remote>/HEAD` names
|
|
72
|
+
it, else `main` or `master`), the turn reports no branch, as before. A branch another
|
|
73
|
+
active session changed is still withheld.
|
|
74
|
+
|
|
75
|
+
The end-of-turn hook runs one `git for-each-ref --points-at` for a detached
|
|
76
|
+
checkout it reports; the prompt hook runs no added git process, and nothing new
|
|
77
|
+
is sent beyond the branch name a checked-out branch would have sent.
|
|
78
|
+
|
|
79
|
+
### Behaviour change: sessions sharing a checkout are judged by their own work
|
|
80
|
+
|
|
81
|
+
When several agent sessions work in one checkout, a turn no longer takes another
|
|
82
|
+
session's work as its own (AWT-438):
|
|
83
|
+
|
|
84
|
+
- A branch switch, pull or reset with no commit of the turn's own is no change.
|
|
85
|
+
Before, it counted as a lesser change. An empty commit of the turn's own still
|
|
86
|
+
counts.
|
|
87
|
+
- A file that another session still active on the machine changed is not this
|
|
88
|
+
turn's: its edit tool named the file, or its turn already reported it.
|
|
89
|
+
- A turn that changed nothing reports the repository without a branch, commit or
|
|
90
|
+
ticket keys from the branch when another active session changed that
|
|
91
|
+
checkout's current branch: one of its turns changed that branch, its open
|
|
92
|
+
turn's edit tool is changing it, or its open turn first saw the checkout on
|
|
93
|
+
another branch (a switch made through the shell, before that turn closed). This
|
|
94
|
+
applies to `carried`, `referenced` and `cwd` turns. A session that changed that
|
|
95
|
+
branch itself still reports it.
|
|
96
|
+
|
|
97
|
+
This uses only local turn state already on the machine. The prompt hook runs no
|
|
98
|
+
added git process, and nothing new is sent. When another session's state cannot
|
|
99
|
+
be read, the turn behaves as before.
|
|
100
|
+
|
|
101
|
+
### Behaviour change: a branch snapshot names the files its commits changed
|
|
102
|
+
|
|
103
|
+
Each commit in a `repo.snapshot` now carries `files`: the repository-relative paths that
|
|
104
|
+
commit changed, with git's name-status letter, so the platform can compare branches by
|
|
105
|
+
content however the edits were made (a shell command, another tool, a commit made
|
|
106
|
+
outside an agent). Names only, never contents; credential-like file names are left out;
|
|
107
|
+
at most 200 files and 16 KiB of path per branch, newest commit first. One more `git log` per branch that
|
|
108
|
+
moved, inside the existing snapshot budget. `capture.git: false` still withholds the
|
|
109
|
+
whole snapshot. See `docs/DATA_HANDLING.md` and `docs/PERFORMANCE.md`.
|
|
110
|
+
|
|
111
|
+
### Behaviour change: a launcher can name the session that started an agent
|
|
112
|
+
|
|
113
|
+
A child agent started with `AGENTWATCH_PARENT_SESSION=<parent session id>` in its
|
|
114
|
+
environment (a spinoff in a new terminal tab, a review bot, your own orchestrator)
|
|
115
|
+
sends that id as `parent_session_id` on every turn summary, whatever its
|
|
116
|
+
`work_evidence`, ahead of a parent the ancestor walk finds. Not a plain session id,
|
|
117
|
+
or the session's own id: ignored. `capture.git: false` withholds it. See
|
|
118
|
+
`docs/DATA_HANDLING.md`, "Declared parent".
|
|
119
|
+
|
|
120
|
+
### Behaviour change: ticket keys named in a prompt are sent as `prompt_jira_ids`
|
|
121
|
+
|
|
122
|
+
The edge now extracts ticket keys (same syntax as branch keys) from a session's
|
|
123
|
+
opening prompt, on the machine, and sends them as `prompt_jira_ids` on every turn
|
|
124
|
+
summary, at every tier, with no consent step. Every candidate key is sent, with no
|
|
125
|
+
prefix filter, and the platform keeps only keys it knows; the edge no longer
|
|
126
|
+
calls `GET /v1/ticket-prefixes` (AWT-326). The prompt text still leaves
|
|
127
|
+
only with `capture.promptText`. The keys are kept in a local memo,
|
|
128
|
+
`prompt-tickets.json`, whose 24-hour expiry counts from SessionEnd.
|
|
129
|
+
`capture.git: false` withholds `prompt_jira_ids`. See `docs/DATA_HANDLING.md`.
|
|
130
|
+
|
|
131
|
+
### Behaviour change: prompt text, tool inputs and out-of-repo files, opt-in
|
|
132
|
+
|
|
133
|
+
Reverses the prompt half of "developer prompts are never collected" below, on the
|
|
134
|
+
founder's decision of 2026-10-01: sessions with no repository (finance in a
|
|
135
|
+
spreadsheet, marketing in a deck) need the backend to see what they were about.
|
|
136
|
+
|
|
137
|
+
- New `capture.promptText`, off by default and gated by `contentCaptureConsent`
|
|
138
|
+
like the tool flags. On, the turn summary carries `prompt_text`: the first prompt,
|
|
139
|
+
`<system-reminder>` blocks the harness injected removed, secrets scrubbed over the
|
|
140
|
+
whole text, then cut at 4,000 characters. A new key on purpose: an old config's
|
|
141
|
+
`capture.prompts: true` still turns nothing on.
|
|
142
|
+
- Under `capture.toolInput`, the turn summary carries `tool_inputs`: per shell or
|
|
143
|
+
connector (MCP) call, the command, or the server, tool and arguments (JSON text).
|
|
144
|
+
At most 50 a turn, each string cut at 2,000 characters after scrubbing.
|
|
145
|
+
- Under `capture.files` and `capture.git` (both on by default), a file outside every checkout is kept as
|
|
146
|
+
`external_files_touched` / `external_files_read`, home-relative
|
|
147
|
+
(`~/Documents/Sample Budget.xlsx`). `files_touched` / `files_read` are unchanged
|
|
148
|
+
(repo-relative, or a bare basename outside any checkout, as before).
|
|
149
|
+
- Response text is still never collected.
|
|
150
|
+
- With `promptText` and `toolInput` off the summary is built and sent as before, without
|
|
151
|
+
those fields. External file paths are on by default with `files` and `git`.
|
|
152
|
+
|
|
153
|
+
### Behaviour change: sessions outside a git checkout report their repository
|
|
154
|
+
|
|
155
|
+
- `work_evidence: inherited`: a session started in a folder with no git takes the
|
|
156
|
+
checkout of the process that started the agent, with `parent_session_id` when it
|
|
157
|
+
came from a live parent agent session (or when a launcher declared one, above). The first hook reads the process table
|
|
158
|
+
locally (one 100 ms deadline); nothing of it is sent but the checkout fields.
|
|
159
|
+
With roots configured, it is sent only if a root claims the checkout, as that root.
|
|
160
|
+
- With `capture.files` and `capture.git` on and no git context, the summary carries
|
|
161
|
+
`content_hashes` (up to 20 `{path, blob_sha}`, git's blob ids of files the agent's
|
|
162
|
+
tools named, read in memory) and `manifest_repository` (the repository address in
|
|
163
|
+
the nearest project manifest). No file content is sent.
|
|
164
|
+
|
|
165
|
+
### Behaviour change: every turn reports the checkout its work changed
|
|
166
|
+
|
|
167
|
+
- A turn's `repository`, `branch`, `commit` and `jira_ids` now describe the checkout
|
|
168
|
+
the turn changed — a worktree it committed in through the shell, say — not only
|
|
169
|
+
the folder the agent sat in. New optional `work_evidence`: `changed`, `carried`,
|
|
170
|
+
`referenced`, `cwd` or, for a session started in a folder that is no checkout,
|
|
171
|
+
`inherited` (see "Sessions that start outside a checkout" in `docs/DATA_HANDLING.md`).
|
|
172
|
+
- `files_changed` lists the files this turn changed there (cap 500), no longer the
|
|
173
|
+
whole dirty tree (cap 50).
|
|
174
|
+
- The repository snapshot is taken at that checkout.
|
|
175
|
+
- To find it, the hook reads a shell command's text in memory for directory names
|
|
176
|
+
and discards it; nothing of the command is stored, queued, logged or sent.
|
|
177
|
+
- Every git call the edge makes passes `--no-optional-locks`.
|
|
178
|
+
- From a session's second turn on, the budget gate asks about the checkout the
|
|
179
|
+
session last changed, not the folder the agent sits in. The first prompt, and a
|
|
180
|
+
session that has changed nothing, are asked about exactly as before; the prompt
|
|
181
|
+
hook still starts no git process.
|
|
182
|
+
- Codex, Cursor, Gemini CLI and Antigravity shell calls are read the same way.
|
|
183
|
+
Gemini's `run_shell_command` now counts as a shell call. A working directory the
|
|
184
|
+
agent reports for the call (Cursor's shell `cwd`, Gemini's absolute `dir_path`,
|
|
185
|
+
Antigravity's `Cwd`) is a candidate as it stands, and so are Cursor's workspace
|
|
186
|
+
roots. A Cursor hook that reports no `cwd` now resolves to its first workspace
|
|
187
|
+
root, not the directory Cursor started the hook process in.
|
|
188
|
+
|
|
189
|
+
### Behaviour change: developer prompts are never collected
|
|
190
|
+
|
|
191
|
+
- `capture.prompts` and `capture.responses` are removed. Prompt and response text
|
|
192
|
+
is never sent, queued or kept in turn state, whatever the config says; a prompt
|
|
193
|
+
or response is still recorded as a length and a SHA-256.
|
|
194
|
+
- A config that still sets either key collects nothing. `agentwatch setup` removes
|
|
195
|
+
them and warns once; `agentwatch doctor` reports them until then.
|
|
196
|
+
- Turn summaries an older release queued with `prompt` / `response` text are sent
|
|
197
|
+
without it.
|
|
198
|
+
- Gemini detailed traces, which can carry prompts, are no longer configured.
|
|
199
|
+
Native prompt logging stays forced off for Claude, Codex and Gemini.
|
|
200
|
+
- `contentCaptureConsent` now gates tool input/output only.
|
|
201
|
+
|
|
202
|
+
### Behaviour change: hook delivery timeout
|
|
203
|
+
|
|
204
|
+
Existing configurations need no schema migration, but `delivery.timeoutMs`
|
|
205
|
+
changes from a per-request timeout to a shared hook delivery budget for direct
|
|
206
|
+
send, drain and isolation. It starts at the first send, not at transport
|
|
207
|
+
construction. A low existing value can leave no time to drain after a direct
|
|
208
|
+
send; those records wait for a later hook or an explicit `agentwatch status`
|
|
209
|
+
retry. Review custom values during upgrade. The default remains 1,500 ms.
|
|
210
|
+
There is no separate drain setting: keeping one hook budget bounds its network
|
|
211
|
+
latency without introducing competing timeout controls. CLI/status transports
|
|
212
|
+
remain reusable with a fresh timeout per request (3 seconds in status), including
|
|
213
|
+
bounded isolation probes. Local budget deferrals do not spend retry attempts.
|
|
214
|
+
|
|
215
|
+
### New: browser sign-in enrollment (AWT-538)
|
|
216
|
+
|
|
217
|
+
`agentwatch setup "https://<backend>?organization=<organization id>"` starts a
|
|
218
|
+
device-code session, prints the verification link and code, and polls until the
|
|
219
|
+
developer approves in the browser. The device credential goes to the OS keychain
|
|
220
|
+
and is bound to this installation; no install key is read or sent on that path,
|
|
221
|
+
and `--token` / `$AGENTWATCH_TOKEN` beside a URL is refused. `agentwatch
|
|
222
|
+
uninstall` revokes the credential as for any device.
|
|
223
|
+
|
|
224
|
+
### New: update notice and `agentwatch update`
|
|
225
|
+
|
|
226
|
+
When a newer release is on npm, Claude Code and Codex show one line as a
|
|
227
|
+
session starts: `Agent Watch x.y.z is available (you have a.b.c). Run
|
|
228
|
+
\`agentwatch update\` to install it.` The hook never waits on the network: it
|
|
229
|
+
reads a local cache (`<data dir>/update-check.json`) and, at most once a day,
|
|
230
|
+
starts a detached `agentwatch update --check` that asks
|
|
231
|
+
`registry.npmjs.org` for the `latest` dist-tag — a plain GET carrying nothing
|
|
232
|
+
about the machine. `agentwatch update` installs that release with
|
|
233
|
+
`npm install -g`; it refuses a copy run from a source checkout (`npm link`).
|
|
234
|
+
Set `"updateNotices": false` in `~/.agentwatch/config.json` to turn both the
|
|
235
|
+
check and the notice off (global-only, for fleets that pin the version).
|
|
236
|
+
|
|
237
|
+
### New: an audit prompt for security reviewers
|
|
238
|
+
|
|
239
|
+
- `docs/AUDIT_PROMPT.md`, shipped in the package, is a prompt a reviewer pastes into
|
|
240
|
+
their own coding agent to audit this package from source, citing file:line for
|
|
241
|
+
every claim. `docs/DATA_HANDLING.md` and `SECURITY.md` link it.
|
|
242
|
+
|
|
243
|
+
### New: `agent-watch-otel`, a Python OpenTelemetry span processor
|
|
244
|
+
|
|
245
|
+
`python/agent-watch-otel/` is this repository's first Python package and its
|
|
246
|
+
second published artefact. It is versioned and released on its own
|
|
247
|
+
(`python-release.yml`, PyPI trusted publishing with attestations); the npm
|
|
248
|
+
package's version is unaffected.
|
|
249
|
+
|
|
250
|
+
A Phoenix customer adds one line after `phoenix.otel.register()` and their
|
|
251
|
+
production LLM spend reaches Agent Watch hashed in their own process. It reports
|
|
252
|
+
`service.name` and `service.version`, which Phoenix drops at ingest and no poller
|
|
253
|
+
can recover. Prompt text, tool arguments and responses never leave the process:
|
|
254
|
+
digests are computed in `on_end`, so the send queue holds only hashes. `on_end`
|
|
255
|
+
never touches the network and never raises; the queue is bounded and drops are
|
|
256
|
+
counted. Phoenix keeps receiving every span unchanged.
|
|
257
|
+
|
|
258
|
+
Depends on `opentelemetry-sdk` and nothing else, which a test enforces.
|
|
259
|
+
|
|
260
|
+
### Claude Code, Codex and Cursor turns can carry their session title
|
|
261
|
+
|
|
262
|
+
A new content flag, `capture.sessionTitle`, default off, sends a provider's
|
|
263
|
+
native title on every `turn.summary`: Claude Code's transcript name and title,
|
|
264
|
+
Codex's local thread name and title, or Cursor's conversation display title.
|
|
265
|
+
Like the other content flags it needs the global `contentCaptureConsent` marker;
|
|
266
|
+
without it, or with a missing or corrupt config, neither is sent. Each is
|
|
267
|
+
scrubbed, then cut to 200 characters. A generated title can paraphrase the first
|
|
268
|
+
prompt, and a name can be set by a person or hook. Gemini CLI and Antigravity
|
|
269
|
+
expose no native title, so the edge does not invent one. See
|
|
270
|
+
`docs/DATA_HANDLING.md`.
|
|
271
|
+
|
|
272
|
+
### Codex turns report their tokens without native telemetry
|
|
273
|
+
|
|
274
|
+
A Codex `turn.summary` now carries the turn's input, cached-input and output tokens and
|
|
275
|
+
its model, read locally from the `token_count` rows of Codex's own rollout file, the
|
|
276
|
+
way Claude Code's transcript already is. Before, a metadata-only install (where Codex's
|
|
277
|
+
native OTel stays off because its logs carry tool content) sent Codex turns with no usage
|
|
278
|
+
at all, so their spend never reached the platform. Only token numbers and the model name
|
|
279
|
+
are read; nothing else in the rollout is. See `docs/DATA_HANDLING.md`.
|
|
280
|
+
|
|
281
|
+
### Fix: a branch snapshot no longer lists trunk commits when local main is behind
|
|
282
|
+
|
|
283
|
+
The branch delta is now taken against `origin/<default>` (what the last fetch left), falling back to the local default branch when there is no remote-tracking ref. No network call is added.
|
|
284
|
+
|
|
285
|
+
### Fixes and verification
|
|
286
|
+
|
|
287
|
+
- Empty token flags fall back to the environment or stored credential. Tokenless
|
|
288
|
+
configurations cannot own a backlog migration. Queue inspection before consent
|
|
289
|
+
never adopts legacy records; shared-owner warnings require actual pending events.
|
|
290
|
+
Migration prompts name both source owner and target URL and explain attribution.
|
|
291
|
+
Doctor compares policy and configured destination hosts instead of URL field
|
|
292
|
+
presence. Tests pin the 9/10/11 ms send boundary and usable larger remainders.
|
|
293
|
+
|
|
294
|
+
- Backlog migration requires exclusive source and destination identities;
|
|
295
|
+
skipped migrations warn on endpoint-only changes and consent names the owner.
|
|
296
|
+
Setup reuses existing canonical-equivalent root keys and refuses ambiguous
|
|
297
|
+
duplicates. Doctor names the enforcement host and warns when the policy host differs from the root’s configured destination hosts.
|
|
298
|
+
|
|
299
|
+
- **Backlog migration requires an existing exclusive identity.** A new root
|
|
300
|
+
inherits no machine/parent backlog; a shared token's queue stays in place.
|
|
301
|
+
Collector warnings use the same effective-route check as the credential
|
|
302
|
+
helper. Doctor explicitly fails when a configured identity has no budget
|
|
303
|
+
decision route, including a refused root endpoint.
|
|
304
|
+
|
|
305
|
+
- **Delivery follows one ordered flow:** choose whether to send, attempt,
|
|
306
|
+
preserve unsent records, update diagnostics, then drain or sweep the queue.
|
|
307
|
+
A thrown transport error or gateway 503 keeps the records for retry with
|
|
308
|
+
their original IDs. Accepted-batch rejection counters remain diagnostic.
|
|
309
|
+
- **One network budget per delivery pass.** Direct delivery, backlog sends and
|
|
310
|
+
isolation probes share `delivery.timeoutMs` (1,500 ms by default). Deferred
|
|
311
|
+
requests consume no retry attempts and do not trip backend cooldown. A 401/403
|
|
312
|
+
during isolation stops further probes and persists the credential block.
|
|
313
|
+
- **Response cleanup is bounded.** Unread bodies are cancelled, including
|
|
314
|
+
oversized declared responses and diagnostic probes; readers release their locks.
|
|
315
|
+
- **Linux and macOS are checked on Node 20 and 24.** CI also publishes repeatable
|
|
316
|
+
hook/queue timing reports. Windows and managed-fleet rollout remain separate
|
|
317
|
+
verification work.
|
|
318
|
+
|
|
319
|
+
Production-installation readiness. Everything below either changes what an
|
|
320
|
+
operator sees or what the package does on the hook path; read the first two
|
|
321
|
+
items before upgrading a fleet.
|
|
322
|
+
|
|
323
|
+
- **A refused credential now suspends sending instead of retrying.** After a 401
|
|
324
|
+
or 403 from the events endpoint, a block is persisted per (destination,
|
|
325
|
+
credential fingerprint) — the fingerprint is the token digest the queue
|
|
326
|
+
already uses to name its partition, never the token — and automatic sends for
|
|
327
|
+
that pair stop. **The refusal does not discard queued records**: normal age and size
|
|
328
|
+
retention limits still apply; what stops is the retrying, not the queueing, and no attempt is spent against an entry for a
|
|
329
|
+
refusal that is not its fault. The block never expires on a timer. It is
|
|
330
|
+
lifted by configuring a different token, or by `agentwatch doctor` proving the
|
|
331
|
+
current one good. `agentwatch status` reports the refusing status and when the
|
|
332
|
+
refusals started.
|
|
333
|
+
- **`agentwatch doctor` diagnoses the install, not an anonymous request.** The
|
|
334
|
+
backend probe now sends the same credentials a real delivery sends, and
|
|
335
|
+
distinguishes four states in its verdict and its exit code: healthy, credential
|
|
336
|
+
rejected (a **failure**, not a warning, naming a wrong, expired or revoked
|
|
337
|
+
token), unreachable, and no backend configured yet. A healthy install whose
|
|
338
|
+
backend requires authentication no longer warns. The probe always asks the
|
|
339
|
+
backend, whatever local state says, so it is also what lifts a standing block.
|
|
340
|
+
- **A delivery pass costs the same whatever the backlog holds.** One pass reads
|
|
341
|
+
at most `delivery.drainBatchSize` queue entries instead of reading and
|
|
342
|
+
validating all of them — up to 2000 file reads on every hook during a backend
|
|
343
|
+
outage. The scan resumes where the previous one stopped and wraps around, so
|
|
344
|
+
every entry is still examined within one rotation and none is deferred
|
|
345
|
+
forever. Expiry is no longer enforced only inside a pass: a throttled sweep
|
|
346
|
+
removes aged-out entries hourly, including during an outage, when a pass is
|
|
347
|
+
skipped for the whole cooldown window and nothing used to age out at all.
|
|
348
|
+
- **A hook loads one agent, and reads its configuration once.** Providers are
|
|
349
|
+
imported lazily, so a hook pays for the agent it was invoked for rather than
|
|
350
|
+
all five; the global configuration file is read once per invocation; the
|
|
351
|
+
credential scrub and capture gate are applied once to a record this invocation
|
|
352
|
+
produced (a record coming out of the backlog is still re-gated against current
|
|
353
|
+
settings before it is sent); the session-state sweep is throttled; and the
|
|
354
|
+
transcript settle loop stops re-zeroing its read buffer on every attempt.
|
|
355
|
+
- **The hook's answer is flushed before the process exits.** A budget refusal
|
|
356
|
+
travels as a JSON document on stdout, and a write to a pipe is asynchronous:
|
|
357
|
+
`process.exit` could drop it, which for Antigravity reads as "no decision".
|
|
358
|
+
- **Secrets in object keys are scrubbed.** The sanitizer pattern-scrubbed values
|
|
359
|
+
only, so a credential used as a *key* in a captured map was transmitted
|
|
360
|
+
verbatim. Two keys that scrub to the same string keep distinct spellings
|
|
361
|
+
rather than silently merging into one entry. Redaction also runs *before* the
|
|
362
|
+
length cap rather than after it: a credential straddling the 64KiB boundary
|
|
363
|
+
was cut short first, so no pattern matched it any more and the surviving
|
|
364
|
+
prefix shipped in the clear — for a JWT, a header and payload that decode to
|
|
365
|
+
the claims the sanitizer exists to withhold. The URL-credentials pattern is
|
|
366
|
+
bounded, which is what makes scrubbing the whole string affordable; unbounded,
|
|
367
|
+
it cost 1.8s of CPU on a single 64KiB prompt, on the hook path.
|
|
368
|
+
- **A backend URL is validated on every load, not only when setup writes it.**
|
|
369
|
+
Every URL in the configuration must be `https:`, or `http:` to loopback, so a
|
|
370
|
+
hand-edited or MDM-templated config cannot send a bearer and captured content
|
|
371
|
+
in cleartext. An offending URL is *refused* and named — on stderr from the
|
|
372
|
+
hook, and by `status` and `doctor` — rather than invalidating the whole file:
|
|
373
|
+
a failed parse falls back to a config with no token, which orphaned the
|
|
374
|
+
existing backlog under a partition nothing would drain again, and one bad URL
|
|
375
|
+
in one `roots[]` entry would have stopped delivery for every other project on
|
|
376
|
+
the machine. A refused field reads as "configured but unusable" and never as
|
|
377
|
+
absent — through `endpoint`, `eventsUrl` and `otlpUrl` alike. A `roots[]`
|
|
378
|
+
entry that names a backend of its own now takes its routes from its own fields
|
|
379
|
+
or from none: the machine's `eventsUrl` and `otlpUrl` are explicit strings
|
|
380
|
+
that used to win before a root's own `endpoint` was ever consulted, so one
|
|
381
|
+
tenant's prompts reached the other's ingest under the first tenant's bearer
|
|
382
|
+
whether or not a refusal was involved, and `otel-headers` handed that bearer
|
|
383
|
+
to the machine-wide collector. An entry that repeats the machine's endpoint —
|
|
384
|
+
a second seat on the same backend — still inherits its routes and its bearer. `enforcementUrl` is the one
|
|
385
|
+
accessor a refusal deliberately does *not* make unusable: no decision URL means
|
|
386
|
+
`ALLOW`, so a typo there would switch every `block` cap off silently, and the
|
|
387
|
+
derived route is a path on an already-validated `https:` endpoint.
|
|
388
|
+
`setup` names a refused URL and leaves the line the developer wrote exactly
|
|
389
|
+
where it is: the value is carried over the write from the file rather than
|
|
390
|
+
replaced by the parse, re-enrolling merges into the entry instead of replacing
|
|
391
|
+
it, so refused fields survive until repaired and another tenant's typo does
|
|
392
|
+
not block setup. A route override survives a run that leaves the destination
|
|
393
|
+
where it was (including trailing-slash normalization) and is dropped by one
|
|
394
|
+
that moves it or cannot establish the previous destination — for a `roots[]` entry and
|
|
395
|
+
for the machine identity alike, so winding one engagement down and enrolling
|
|
396
|
+
the next no longer keeps POSTing to the first one's ingest under the second
|
|
397
|
+
one's bearer. Every cleared live route is printed before the write, including
|
|
398
|
+
during endpoint repair. The same rule includes machine `enforcementUrl`; a
|
|
399
|
+
foreign root derives enforcement from its own base. Root token rotation keeps
|
|
400
|
+
its stored backend when `--endpoint` is omitted, and backlog migration asks
|
|
401
|
+
about the selected identity's queue. `config` warns about unavailable root
|
|
402
|
+
routes and `doctor` names refused endpoints explicitly. `setup` still refuses a non-deliverable `--endpoint` outright.
|
|
403
|
+
Response bodies the hook decodes are capped, and neither the batch send nor
|
|
404
|
+
the enforcement check follows a redirect — both carry a bearer.
|
|
405
|
+
- **`status` and `doctor` act as the identity of the directory they run in.**
|
|
406
|
+
Both read the machine-global token where the hooks in a `roots[]` project use
|
|
407
|
+
that root's own. A 401 inside such a project raised a block under the root
|
|
408
|
+
credential's fingerprint that `status` could not see and `doctor` could not
|
|
409
|
+
lift — it probed the global token, and a 2xx cleared a block that was never
|
|
410
|
+
the one standing — leaving that project's telemetry suspended, with no timer
|
|
411
|
+
to end it and no diagnostic naming it.
|
|
412
|
+
- **Retention holds on the paths that never send.** The whole-partition sweep ran
|
|
413
|
+
inside a delivery pass, and both skips — a tripped cooldown and a refused
|
|
414
|
+
credential — return before one. A revoked token therefore aged nothing out for
|
|
415
|
+
as long as the block stood, while the queue bound quietly shed the oldest
|
|
416
|
+
entries at the ceiling without counting them, so `status` reported nothing
|
|
417
|
+
lost. The sweep now runs on every path that skips a pass — including the one
|
|
418
|
+
where no usable endpoint is configured, which a refused URL makes a durable
|
|
419
|
+
state rather than a pre-setup one — its hourly throttle is read from the clock
|
|
420
|
+
the marker is written in (an injected or backward-stepped clock silenced it
|
|
421
|
+
permanently), and the bound reports what it sacrifices.
|
|
422
|
+
- **Every registered agent is loadable.** The eager provider list and the lazy
|
|
423
|
+
loader map are two hand-maintained lists of the same agents; a test now asserts
|
|
424
|
+
they agree. An agent in only one of them installed hooks that resolved no
|
|
425
|
+
provider on every invocation and dropped all of that agent's telemetry, while
|
|
426
|
+
`setup`, `status` and `doctor` all reported success.
|
|
427
|
+
- **A degraded turn summary is attributed to the same developer as a healthy
|
|
428
|
+
one.** On a machine that takes its identity from git rather than from
|
|
429
|
+
configuration, a summary emitted after turn assembly failed carried no
|
|
430
|
+
developer at all: counted in organization totals, in nobody's budget.
|
|
431
|
+
- **Agent config files are no longer permanently tightened.** `0600` is set only
|
|
432
|
+
when the block being written actually carries a bearer token, and `uninstall`
|
|
433
|
+
restores the mode the file had before AgentWatch touched it.
|
|
434
|
+
- **Supply chain.** Actions pinned by commit SHA, `npm ci --ignore-scripts` in
|
|
435
|
+
the job that builds the published tarball, `npm audit --omit=dev
|
|
436
|
+
--audit-level=high`, grouped weekly Dependabot updates, and a CI matrix over Node 20 and Node 24 so the declared
|
|
437
|
+
floor is verified rather than declared. Coverage is measured with enforced
|
|
438
|
+
per-directory thresholds for the privacy, enforcement, transport and turn
|
|
439
|
+
paths.
|
|
440
|
+
- **Fewer moving parts.** Dead exports deleted and the compiler set to reject
|
|
441
|
+
unused locals and parameters; enrollment collapsed from four files and an
|
|
442
|
+
interface to one function; one definition each of the content-capture flag
|
|
443
|
+
list, the product-record guard and the hook-command quoting patterns.
|
|
444
|
+
|
|
445
|
+
### Release: published without provenance
|
|
446
|
+
|
|
447
|
+
The repository is private, and npm issues provenance only for public
|
|
448
|
+
repositories, so `release.yml` publishes without `--provenance`. Publishing goes
|
|
449
|
+
through npm trusted publishing; like 0.2.5, the package carries no provenance
|
|
450
|
+
attestation.
|
|
451
|
+
|
|
452
|
+
### Release: no CodeQL scan
|
|
453
|
+
|
|
454
|
+
GitHub code scanning is not available on the private repository, so nothing runs
|
|
455
|
+
CodeQL and `release.yml` does not gate on it. The verify matrix (tests with
|
|
456
|
+
coverage, lint, typecheck, `npm audit` and the package checks) gates every
|
|
457
|
+
publish.
|
|
458
|
+
|
|
459
|
+
### Earlier changes, never published, shipping in 0.3.0
|
|
460
|
+
|
|
461
|
+
- **Content capture is now off by default.** `capture.prompts`, `capture.responses`,
|
|
462
|
+
`capture.toolInput` and `capture.toolOutput` default to `false`: a fresh install collects
|
|
463
|
+
metadata only, and shipping prompts or tool I/O off the machine is a deliberate opt-in.
|
|
464
|
+
`capture.git` and `capture.files` stay `true` — they gate the repo remote/branch/SHA and the
|
|
465
|
+
per-file *path*, which is what feature and project attribution is built from, not content.
|
|
466
|
+
`prompt_evidence`/`response_evidence` (length + SHA-256, never the text) are unaffected, so turn
|
|
467
|
+
counts and cost attribution work with capture fully off.
|
|
468
|
+
- **Content capture also requires explicit consent.** A new global-only `contentCaptureConsent`
|
|
469
|
+
marker gates the four content flags: a config carrying `prompts: true` without it collects
|
|
470
|
+
nothing, so replacing the npm package cannot silently carry an older install's decision forward.
|
|
471
|
+
The gate is applied on every read and never written back, so a machine that adds the marker later
|
|
472
|
+
turns its existing flags back on instead of finding them erased; setup names the flags that are
|
|
473
|
+
set but inert. The gate lives in the config schema, so it also reaches records that
|
|
474
|
+
were queued before the policy changed — a summary loses text whose flag is off, and a
|
|
475
|
+
`repo.snapshot` is dropped whole once `capture.git` is off.
|
|
476
|
+
- **Native exporters are gated separately.** Provider logs are not filterable per field, so Codex
|
|
477
|
+
and Gemini usage logs are configured only with consent for both tool flags, Gemini detailed
|
|
478
|
+
traces additionally require prompt and response capture, and Claude's own content-logging
|
|
479
|
+
switches are forced off. This can leave `llm.call` usage unavailable for Codex and Gemini in
|
|
480
|
+
metadata-only mode. Rerun `agentwatch setup` after upgrading and restart your agents: nothing
|
|
481
|
+
about replacing the CLI changes an exporter already live inside a running agent.
|
|
482
|
+
`~/.gemini/settings.json` is now written `0600` — it carries a static bearer token.
|
|
483
|
+
- **`agentwatch off` / `agentwatch on`.** A local marker stops hooks before stdin, withholds the
|
|
484
|
+
OTLP authorization header, and removes managed native exporters through the same ownership and
|
|
485
|
+
backup machinery as uninstall — keeping config and queued data. Failures keep the marker, and a
|
|
486
|
+
repeated `off` re-runs the removal. Restart running agents to make it take effect.
|
|
487
|
+
- `agentwatch doctor` now probes the hook command each provider actually has installed: it never
|
|
488
|
+
runs the stored shell string, only a verified CLI with a bounded `--version`, and it reports
|
|
489
|
+
consent, capture and off-switch state.
|
|
490
|
+
- Release: `npm run release:artifacts` packs a verified tarball, a production-only CycloneDX SBOM
|
|
491
|
+
and `SHA256SUMS`. Publishing is an explicit `workflow_dispatch` on `main` through npm trusted
|
|
492
|
+
publishing. New [docs/DATA_HANDLING.md](docs/DATA_HANDLING.md) states the
|
|
493
|
+
collection contract; [docs/ENTERPRISE_DEPLOYMENT.md](docs/ENTERPRISE_DEPLOYMENT.md) states what
|
|
494
|
+
is deliberately not built.
|
|
495
|
+
- MDM deployment templates in `examples/mdm/`: a Jamf/Kandji script, an Intune script, and a
|
|
496
|
+
Claude Code `managed-settings.json` policy file, with a per-agent table of what an
|
|
497
|
+
administrator can and cannot lock. `agentwatch setup` now also reads the enrollment token
|
|
498
|
+
from `AGENTWATCH_TOKEN`, because a policy running as root has no private channel other than
|
|
499
|
+
the environment and `--token` is visible to `ps`. The flag still wins.
|
|
500
|
+
- A committed `.agentwatch.json` can now only ever *narrow* capture. A repository file that sets a
|
|
501
|
+
capture flag the machine has off is ignored and reported — `agentwatch config` and
|
|
502
|
+
`agentwatch doctor` both print the refusal — so checking a repository out can never start
|
|
503
|
+
collecting content on someone else's machine. The `capture` block also drops unknown keys instead
|
|
504
|
+
of passing them through.
|
|
505
|
+
|
|
5
506
|
- `agentwatch setup` now refuses an install it cannot attribute: with no `--developer-email` and no
|
|
6
507
|
`git config user.email`, it exits non-zero with the two remedies on stderr and writes no config
|
|
7
508
|
file. An unknown identity is allowed silently by the enforcement gate, so an unattributable
|
|
@@ -29,6 +530,17 @@
|
|
|
29
530
|
- A refused prompt records no turn state — it never reached a model — while the offline queue still
|
|
30
531
|
drains on that hook. `agentwatch status` reports whether enforcement is on, and the example
|
|
31
532
|
backend gained the route (`BLOCK=1 npm run example` refuses everything).
|
|
533
|
+
- The gate now also states the session's model (`&model=…`), so a budget can be set on one model.
|
|
534
|
+
Codex, Cursor, Gemini and Antigravity name their model on every hook they send; Claude Code
|
|
535
|
+
names it only when a session starts, so that one event remembers it in a `session.json` beside
|
|
536
|
+
that session's turn records (mode 0600, in a directory named by a hash of the session id, never
|
|
537
|
+
by the id itself) and it is cleared with the rest of the session at SessionEnd, or by the
|
|
538
|
+
24-hour sweep for a session that crashed. A session that starts naming no model forgets any
|
|
539
|
+
model remembered under that id rather than inheriting it. It is spelled as the agent names it,
|
|
540
|
+
which for every agent but Claude Code is the same event the reported usage comes from. The model is part of the local cache key, so an answer about one model
|
|
541
|
+
is never reused for a prompt on another. The added cost is that one file read: no subprocess, no
|
|
542
|
+
extra request, and an unreadable memo states no model rather than waiting. A collector that never
|
|
543
|
+
learns a model asks exactly what it asks today and is answered exactly as today.
|
|
32
544
|
|
|
33
545
|
## 0.2.0
|
|
34
546
|
|