@agent-watch-ai/edge 0.3.1 → 0.5.0
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 +75 -0
- package/README.md +10 -6
- package/SECURITY.md +7 -4
- package/dist/cli/constants/cli.constants.d.ts +2 -0
- package/dist/cli/constants/cli.constants.js +3 -1
- package/dist/cli/doctor.js +13 -2
- package/dist/cli/setup.js +138 -29
- package/dist/cli/toggle.js +5 -1
- package/dist/cli/types/cli.types.d.ts +6 -0
- package/dist/cli/uninstall.js +1 -1
- package/dist/cli.js +14 -3
- package/dist/config/config-store.d.ts +1 -1
- package/dist/config/config-store.js +2 -2
- package/dist/config/constants/config.constants.d.ts +4 -1
- package/dist/config/constants/config.constants.js +7 -2
- package/dist/config/repo-config.js +1 -1
- package/dist/config/schemas/config.schema.d.ts +113 -767
- package/dist/config/schemas/config.schema.js +17 -8
- package/dist/credentials/constants/credentials.constants.d.ts +8 -0
- package/dist/credentials/constants/credentials.constants.js +9 -1
- package/dist/credentials/credential-status.js +8 -4
- package/dist/credentials/credentials.d.ts +16 -2
- package/dist/credentials/credentials.js +30 -5
- package/dist/credentials/device-api.d.ts +10 -1
- package/dist/credentials/device-api.js +12 -1
- package/dist/credentials/identity.d.ts +12 -1
- package/dist/credentials/identity.js +12 -1
- package/dist/credentials/migration.d.ts +1 -1
- package/dist/credentials/migration.js +1 -1
- package/dist/credentials/schemas/device-api.schema.d.ts +4 -51
- package/dist/credentials/schemas/device-state.schema.d.ts +3 -38
- package/dist/credentials/sign-in.d.ts +14 -1
- package/dist/credentials/sign-in.js +24 -5
- package/dist/credentials/types/credentials.types.d.ts +12 -1
- package/dist/enforcement/decision-client.js +2 -1
- package/dist/enforcement/enforcement.js +7 -5
- package/dist/enforcement/types/enforcement.types.d.ts +2 -2
- package/dist/git/code-state.d.ts +33 -0
- package/dist/git/code-state.js +44 -0
- package/dist/git/constants/git.constants.d.ts +6 -0
- package/dist/git/constants/git.constants.js +6 -0
- package/dist/git/index.d.ts +2 -1
- package/dist/git/index.js +1 -0
- package/dist/git/types/git.types.d.ts +6 -0
- package/dist/pipeline/constants/pipeline.constants.d.ts +3 -0
- package/dist/pipeline/constants/pipeline.constants.js +3 -0
- package/dist/pipeline/hook-pipeline.js +56 -7
- package/dist/privacy/command-fingerprint.d.ts +42 -0
- package/dist/privacy/command-fingerprint.js +249 -0
- package/dist/privacy/constants/command-fingerprint.constants.d.ts +34 -0
- package/dist/privacy/constants/command-fingerprint.constants.js +38 -0
- package/dist/privacy/index.d.ts +3 -1
- package/dist/privacy/index.js +2 -0
- package/dist/privacy/product-capture.js +20 -0
- package/dist/privacy/types/privacy.types.d.ts +7 -0
- package/dist/providers/antigravity/antigravity.adapter.js +3 -0
- package/dist/providers/antigravity/schemas/antigravity.schema.d.ts +18 -492
- package/dist/providers/claude/claude.adapter.js +12 -1
- package/dist/providers/claude/constants/claude.constants.d.ts +6 -0
- package/dist/providers/claude/constants/claude.constants.js +6 -0
- package/dist/providers/claude/schemas/claude.schema.d.ts +1 -43
- package/dist/providers/codex/codex.adapter.js +14 -0
- package/dist/providers/codex/codex.otel.d.ts +12 -1
- package/dist/providers/codex/codex.otel.js +61 -11
- 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/codex/schemas/codex.schema.d.ts +1 -41
- package/dist/providers/constants/provider.constants.d.ts +8 -0
- package/dist/providers/constants/provider.constants.js +8 -0
- package/dist/providers/cursor/constants/cursor.constants.d.ts +2 -0
- package/dist/providers/cursor/constants/cursor.constants.js +2 -0
- package/dist/providers/cursor/cursor.adapter.js +84 -5
- package/dist/providers/cursor/schemas/cursor.schema.d.ts +5 -85
- package/dist/providers/gemini/constants/gemini.constants.d.ts +2 -0
- package/dist/providers/gemini/constants/gemini.constants.js +2 -0
- package/dist/providers/gemini/constants/gemini.otel.constants.d.ts +16 -1
- package/dist/providers/gemini/constants/gemini.otel.constants.js +16 -1
- package/dist/providers/gemini/gemini.detect.d.ts +11 -0
- package/dist/providers/gemini/gemini.detect.js +14 -1
- package/dist/providers/gemini/gemini.hooks.d.ts +3 -3
- package/dist/providers/gemini/gemini.hooks.js +5 -5
- package/dist/providers/gemini/gemini.otel.d.ts +14 -4
- package/dist/providers/gemini/gemini.otel.js +418 -107
- package/dist/providers/gemini/schemas/gemini.schema.d.ts +1 -49
- package/dist/providers/shared/bearer-rewrite.d.ts +19 -0
- package/dist/providers/shared/bearer-rewrite.js +46 -0
- package/dist/providers/shared/constants/tooling.constants.d.ts +6 -0
- package/dist/providers/shared/constants/tooling.constants.js +6 -0
- package/dist/providers/shared/event-builder.d.ts +17 -2
- package/dist/providers/shared/event-builder.js +43 -3
- package/dist/providers/shared/install-record.d.ts +2 -0
- package/dist/providers/shared/install-record.js +3 -2
- package/dist/providers/shared/tooling.d.ts +35 -0
- package/dist/providers/shared/tooling.js +61 -1
- package/dist/providers/shared/types/adapter.types.d.ts +18 -0
- package/dist/providers/types/provider.types.d.ts +24 -0
- package/dist/storage/atomic-file.d.ts +14 -0
- package/dist/storage/atomic-file.js +19 -0
- package/dist/storage/constants/storage.constants.d.ts +2 -0
- package/dist/storage/constants/storage.constants.js +2 -0
- package/dist/storage/schemas/storage.schema.d.ts +11 -175
- package/dist/storage/schemas/storage.schema.js +7 -1
- package/dist/transport/schemas/queue.schema.d.ts +1 -16
- package/dist/transport/schemas/queue.schema.js +1 -1
- package/dist/turns/constants/turns.constants.d.ts +17 -0
- package/dist/turns/constants/turns.constants.js +17 -0
- package/dist/turns/index.d.ts +3 -2
- package/dist/turns/index.js +1 -0
- package/dist/turns/tool-events.d.ts +15 -0
- package/dist/turns/tool-events.js +59 -0
- package/dist/turns/turn-state.js +2 -2
- package/dist/turns/turn-summary.d.ts +1 -1
- package/dist/turns/turn-summary.js +1 -0
- package/dist/turns/turn-tracker.js +138 -7
- package/dist/turns/types/turn-state.types.d.ts +28 -1
- package/dist/turns/types/turn-summary.types.d.ts +30 -0
- package/dist/turns/types/turn-tracker.types.d.ts +10 -0
- package/dist/turns/work-checkout.d.ts +5 -3
- package/dist/turns/work-checkout.js +46 -12
- package/docs/AUDIT_PROMPT.md +11 -0
- package/docs/DATA_HANDLING.md +69 -14
- package/docs/ENTERPRISE_DEPLOYMENT.md +21 -5
- package/package.json +9 -8
|
@@ -26,7 +26,8 @@ list the package's ownership rules are built on. Everything else lives under
|
|
|
26
26
|
| --- | --- | --- |
|
|
27
27
|
| `~/.claude/settings.json` | AgentWatch hook entries, and `otelHeadersHelper` plus OTel env keys when native telemetry is configured | `uninstall` removes exactly the entries recorded as owned; unrelated hooks and settings are preserved |
|
|
28
28
|
| `~/.codex/config.toml` | A managed `[otel]` block; the file is set to 0600 **only** when that block carries a bearer token | `uninstall` removes the block and restores the permission bits the file had before AgentWatch tightened it |
|
|
29
|
-
| `~/.gemini/settings.json` | AgentWatch hook entries
|
|
29
|
+
| `~/.gemini/settings.json` | AgentWatch hook entries | `uninstall` removes the entries it recorded |
|
|
30
|
+
| `~/.gemini/.env` | Native telemetry lines including `OTEL_EXPORTER_OTLP_HEADERS`; 0600 **only** when they carry a bearer token | `uninstall` removes the owned lines and restores the original mode; a file AgentWatch created and left empty is deleted |
|
|
30
31
|
| Cursor / Antigravity hook configuration | AgentWatch hook entries only; neither has a managed native exporter | `uninstall` removes the entries it recorded |
|
|
31
32
|
| Nothing else | No daemon, no launchd/systemd unit, no PATH change, no shell profile edit, no root requirement, no file outside the paths above | — |
|
|
32
33
|
|
|
@@ -36,11 +37,15 @@ or the Secret Service keyring (Linux with a desktop session). `uninstall` withou
|
|
|
36
37
|
`--agent` removes it; a Windows DPAPI blob or the no-keychain fallback file lives
|
|
37
38
|
in `~/.agentwatch/credentials/` and goes with `--purge` as well.
|
|
38
39
|
|
|
39
|
-
|
|
40
|
+
The MDM templates in `examples/mdm/` deploy no key: `agentwatch setup
|
|
41
|
+
<enrollment-url> --defer-sign-in` configures the organization, and the machine
|
|
42
|
+
sends nothing until its developer runs `agentwatch setup` and signs in.
|
|
43
|
+
|
|
44
|
+
A legacy MDM rollout that sets `$AGENTWATCH_TOKEN` hands setup the install key as
|
|
40
45
|
before; the edge exchanges it for a device credential during that setup run, or
|
|
41
46
|
on the first later run that reaches the backend. The key stays in `config.json`
|
|
42
|
-
(0600) beside the device
|
|
43
|
-
|
|
47
|
+
(0600) beside the device, to enroll again when the device secret expires; Codex
|
|
48
|
+
and Gemini get the device's access token, and the key only until the exchange succeeds. Re-running setup with the same key keeps the existing device rather than
|
|
44
49
|
enrolling a new one. On Windows the exchange happens in setup only. Headless Linux has no keychain: the secret is a 0600 file and
|
|
45
50
|
`agentwatch doctor` reports the credential check as a warning.
|
|
46
51
|
|
|
@@ -84,7 +89,18 @@ The npm package itself is never removed by `uninstall`; `npm rm -g
|
|
|
84
89
|
|
|
85
90
|
## Release operation
|
|
86
91
|
|
|
87
|
-
Nothing runs on
|
|
92
|
+
Nothing runs on PRs or branch pushes. The runtime packages `@agent-watch-ai/otel`
|
|
93
|
+
and `agent-watch-otel` are released together by pushing an `otel-vX.Y.Z` tag on
|
|
94
|
+
`main` (`otel-release.yml`, gated by the `otel-release` environment, trusted
|
|
95
|
+
publishing on npm and PyPI). Before the first tag: on PyPI, change the
|
|
96
|
+
`agent-watch-otel` trusted publisher from `python-release.yml` / `pypi-release`
|
|
97
|
+
to `otel-release.yml` / `otel-release`. npm trusted publishing can only be set
|
|
98
|
+
up on a package that exists, so the first publish uses a short-lived granular
|
|
99
|
+
npm token (read and write on the `@agent-watch-ai` scope, 2FA bypass) stored as
|
|
100
|
+
the `NPM_TOKEN` secret of the `otel-release` environment; then add the npm
|
|
101
|
+
trusted publisher (`otel-release.yml`, `otel-release`), delete the secret
|
|
102
|
+
and revoke the token. The workflow publishes PyPI first, then npm; a rerun skips
|
|
103
|
+
what is already published. The CLI release starts with a `workflow_dispatch` of
|
|
88
104
|
`release.yml`, which verifies and builds artifacts; locally the same is: run
|
|
89
105
|
`npm ci`, the test/lint/typecheck/build checks, then `npm run release:artifacts`
|
|
90
106
|
to create a verified tarball, production dependency SBOM, and `SHA256SUMS`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-watch-ai/edge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Usage and cost telemetry for Claude Code, Codex, Cursor, Gemini CLI and Antigravity. No daemon, no proxy.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -81,19 +81,20 @@
|
|
|
81
81
|
"hooks"
|
|
82
82
|
],
|
|
83
83
|
"dependencies": {
|
|
84
|
-
"smol-toml": "^1.
|
|
85
|
-
"zod": "^
|
|
84
|
+
"smol-toml": "^1.9.1",
|
|
85
|
+
"zod": "^4.6.7"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@eslint/js": "^
|
|
88
|
+
"@eslint/js": "^10.0.1",
|
|
89
89
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
90
|
-
"@types/node": "^
|
|
91
|
-
"@vitest/coverage-v8": "^
|
|
92
|
-
"eslint": "^
|
|
90
|
+
"@types/node": "^26.6.5",
|
|
91
|
+
"@vitest/coverage-v8": "^4.1.11",
|
|
92
|
+
"eslint": "^10.13.0",
|
|
93
93
|
"eslint-plugin-import-x": "^4.17.1",
|
|
94
94
|
"eslint-plugin-jsdoc": "^63.3.3",
|
|
95
95
|
"typescript": "^5.7.0",
|
|
96
96
|
"typescript-eslint": "^8.19.0",
|
|
97
|
-
"
|
|
97
|
+
"vite-node": "^6.0.0",
|
|
98
|
+
"vitest": "^4.1.11"
|
|
98
99
|
}
|
|
99
100
|
}
|