@agent-watch-ai/edge 0.7.0 → 0.7.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.
Files changed (82) hide show
  1. package/CHANGELOG.md +69 -0
  2. package/README.md +4 -1
  3. package/dist/billing/session-billing.d.ts +5 -2
  4. package/dist/billing/session-billing.js +27 -6
  5. package/dist/capture/captured-step.js +24 -0
  6. package/dist/capture/constants/capture.constants.d.ts +15 -0
  7. package/dist/capture/constants/capture.constants.js +15 -0
  8. package/dist/capture/launched-runs.d.ts +27 -0
  9. package/dist/capture/launched-runs.js +15 -9
  10. package/dist/capture/python/sitecustomize.py +11 -2
  11. package/dist/capture/venv-loader.d.ts +68 -0
  12. package/dist/capture/venv-loader.js +189 -0
  13. package/dist/cli/constants/cli.constants.d.ts +21 -0
  14. package/dist/cli/constants/cli.constants.js +21 -0
  15. package/dist/cli/doctor-run-capture.d.ts +8 -0
  16. package/dist/cli/doctor-run-capture.js +14 -0
  17. package/dist/cli/doctor.js +6 -2
  18. package/dist/cli/hook-check.d.ts +7 -2
  19. package/dist/cli/hook-check.js +30 -15
  20. package/dist/cli/hook.js +44 -3
  21. package/dist/cli/npm-global.d.ts +24 -0
  22. package/dist/cli/npm-global.js +77 -0
  23. package/dist/cli/npx-install.js +22 -6
  24. package/dist/cli/replay.js +42 -7
  25. package/dist/cli/setup.js +47 -6
  26. package/dist/cli/uninstall.js +34 -1
  27. package/dist/cli/update.js +3 -2
  28. package/dist/config/config-store.d.ts +15 -4
  29. package/dist/config/config-store.js +31 -7
  30. package/dist/config/constants/config.constants.d.ts +8 -1
  31. package/dist/config/constants/config.constants.js +8 -1
  32. package/dist/config/schemas/config.schema.d.ts +2 -2
  33. package/dist/config/schemas/config.schema.js +10 -2
  34. package/dist/credentials/cloud-claim.d.ts +2 -0
  35. package/dist/credentials/cloud-claim.js +21 -2
  36. package/dist/credentials/constants/credentials.constants.d.ts +8 -0
  37. package/dist/credentials/constants/credentials.constants.js +8 -0
  38. package/dist/credentials/credential-status.js +1 -1
  39. package/dist/credentials/credentials.d.ts +3 -3
  40. package/dist/credentials/credentials.js +26 -12
  41. package/dist/credentials/identity.d.ts +2 -2
  42. package/dist/credentials/identity.js +2 -2
  43. package/dist/credentials/install-key.d.ts +31 -0
  44. package/dist/credentials/install-key.js +58 -0
  45. package/dist/credentials/migration.d.ts +9 -7
  46. package/dist/credentials/migration.js +58 -18
  47. package/dist/credentials/secret-store.d.ts +12 -0
  48. package/dist/credentials/secret-store.js +18 -1
  49. package/dist/enforcement/enforcement.js +1 -1
  50. package/dist/events/enrich.d.ts +14 -0
  51. package/dist/events/enrich.js +1 -1
  52. package/dist/git/constants/git.constants.d.ts +2 -0
  53. package/dist/git/constants/git.constants.js +9 -0
  54. package/dist/git/repo-snapshot.js +8 -2
  55. package/dist/git/types/snapshot.types.d.ts +4 -0
  56. package/dist/pipeline/hook-pipeline.js +2 -1
  57. package/dist/providers/claude/claude.provider.js +9 -5
  58. package/dist/providers/types/provider.types.d.ts +5 -5
  59. package/dist/replay/checkout-resolver.d.ts +41 -14
  60. package/dist/replay/checkout-resolver.js +134 -30
  61. package/dist/replay/replay-runner.d.ts +3 -1
  62. package/dist/replay/replay-runner.js +74 -22
  63. package/dist/replay/replay-scan.d.ts +2 -1
  64. package/dist/replay/replay-scan.js +14 -2
  65. package/dist/replay/throttle.d.ts +2 -1
  66. package/dist/replay/throttle.js +4 -1
  67. package/dist/replay/transcript-turns.js +29 -3
  68. package/dist/replay/turn-event.d.ts +4 -2
  69. package/dist/replay/turn-event.js +22 -11
  70. package/dist/replay/types/replay.types.d.ts +39 -3
  71. package/dist/replay/worktree-map.d.ts +42 -0
  72. package/dist/replay/worktree-map.js +134 -0
  73. package/dist/snapshot/snapshot-pipeline.js +15 -4
  74. package/dist/snapshot/types/snapshot.types.d.ts +2 -0
  75. package/dist/turns/constants/turns.constants.d.ts +16 -0
  76. package/dist/turns/constants/turns.constants.js +16 -0
  77. package/dist/turns/turn-state.d.ts +33 -0
  78. package/dist/turns/turn-state.js +80 -1
  79. package/dist/turns/turn-tracker.js +2 -2
  80. package/docs/DATA_HANDLING.md +8 -6
  81. package/docs/ENTERPRISE_DEPLOYMENT.md +2 -2
  82. package/package.json +1 -1
@@ -709,9 +709,11 @@ their own session/account/resource identifiers independently.
709
709
  Global configuration is stored in `~/.agentwatch/config.json` (0600). The
710
710
  organization install key written by setup (from `--token`, `$AGENTWATCH_TOKEN`
711
711
  or the prompt) is exchanged once through `POST /v1/devices/enroll` for a device
712
- credential of this machine's own, and the config records `device: { id, store }`
713
- beside the key. The key stays in the file to enroll again when the device
714
- secret expires. The Claude hooks and header helper send the device's access
712
+ credential of this machine's own, and the config records `device: { id, store }`.
713
+ The key then leaves the file: it is kept in the same store as the device secret
714
+ (account `<id>.install-key`), only to enroll again when the secret expires, and
715
+ `uninstall` removes it. A config written by an earlier version loses the key on
716
+ the next setup. The Claude hooks and header helper send the device's access
715
717
  token and never the key once the device is recorded; Codex and Gemini get the
716
718
  same access token in their own config, rewritten by each hook as it rotates
717
719
  (docs/NATIVE_OTLP_TOKENS.md). The device reference is an id
@@ -735,7 +737,7 @@ revoked or secret expired) are permanent; anything else is retried after the
735
737
  cooldown. A refused refresh stops sends for that identity,
736
738
  queues every record, is said once on stderr and stays visible in `status` and
737
739
  `doctor` until the machine is enrolled again: by itself when the secret only
738
- expired (hourly backoff), and only by `setup --token <install key>` when the
740
+ expired (hourly backoff), and only by `setup` (with the stored key, or `--token <install key>`) when the
739
741
  device was revoked or is unknown, so a hook never undoes a revocation. `uninstall` (all agents)
740
742
  first revokes the device on the platform (`POST /v1/devices/revoke`, the
741
743
  secret in the body), then removes the device secret, the cached token and the
@@ -865,7 +867,7 @@ Enforcement is fail-open on unexpected errors, timeouts, invalid responses and
865
867
  unreachable services. A refused root base has no usable decision route; doctor
866
868
  reports that budget caps are not enforced, with a failure and a repair instruction.
867
869
  It does not send that root's bearer to machine enforcement as a fallback. A supported hook blocks only on an explicit backend block
868
- decision. Defaults are a 300 ms request timeout and 60-second local decision
870
+ decision. Defaults are a 500 ms request timeout and 60-second local decision
869
871
  cache. Antigravity has no verified blocking response. This is not a local signed
870
872
  enforcement policy or tamper-resistant control.
871
873
 
@@ -885,7 +887,7 @@ answered as it is today.
885
887
 
886
888
  **The gate makes a network request.** Before a turn starts, the pre-prompt hook
887
889
  reads a local decision cache and, on a miss, asks the platform — one bounded
888
- request, 300 ms ceiling, every failure allowing the turn. Stating the model adds
890
+ request, 500 ms ceiling, every failure allowing the turn. Stating the model adds
889
891
  one read of a small local file to that, and nothing else: no subprocess, no
890
892
  second request, and a file that cannot be read means no model is stated rather
891
893
  than a gate that waits. Two consequences are worth stating rather than leaving
@@ -43,8 +43,8 @@ sends nothing until its developer runs `agentwatch setup` and signs in.
43
43
 
44
44
  A legacy MDM rollout that sets `$AGENTWATCH_TOKEN` hands setup the install key as
45
45
  before; the edge exchanges it for a device credential during that setup run, or
46
- on the first later run that reaches the backend. The key stays in `config.json`
47
- (0600) beside the device, to enroll again when the device secret expires; Codex
46
+ on the first later run that reaches the backend. The key then leaves `config.json`
47
+ and is kept in the device secret's store, to enroll again when the secret expires; Codex
48
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
49
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
50
50
  `agentwatch doctor` reports the credential check as a warning.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-watch-ai/edge",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
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",