@agenttrail/cli 0.2.12 → 0.2.26

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/README.md CHANGED
@@ -197,8 +197,10 @@ website describes [how data is handled](https://www.agenttrail.sh/security).
197
197
  turn runs, and `backfill` imports only the project you run it in.
198
198
  - **Hooks fetch the latest release.** The hooks run `npx -y @agenttrail/cli@latest`, so each
199
199
  session start and turn end contacts the npm registry and uses the newest published
200
- version. When the registry cannot be reached, that run is skipped, and a later run sends
201
- the turns it missed.
200
+ version. A `--global` install's `SessionStart` hook in your personal `~/.claude/settings.json`
201
+ is the exception: it runs the CLI version that wrote it, while hooks in a project's shared
202
+ `.claude/settings.json` keep `@latest`. When the registry cannot be reached, that run is
203
+ skipped, and a later run sends the turns it missed.
202
204
 
203
205
  ### Cursor's limits
204
206
 
@@ -352,7 +354,10 @@ API keys work with Claude Code only.
352
354
  pointing Claude Code's own OpenTelemetry exporter at AgentTrail from `~/.claude/settings.json`.
353
355
  It prints a warning first. Setup refuses if that file is inside a git or dotfiles repository,
354
356
  because it would hold your credential. In this mode Claude Code sends the content itself, so
355
- it is scrubbed at ingest only, not on your machine.
357
+ it is scrubbed at ingest only, not on your machine. Its `SessionStart` hook in
358
+ `~/.claude/settings.json` runs the CLI version that wrote it
359
+ (`npx -y @agenttrail/cli@<version>`); a project's shared `.claude/settings.json` keeps
360
+ `@latest`, so teammates on different versions don't keep rewriting it.
356
361
  - **`--team`** writes key-free settings to `.claude/settings.json` that are meant to be
357
362
  committed. Each developer supplies their own key through the environment. It never writes
358
363
  the enforcement switch or a token.
@@ -414,10 +419,18 @@ stand down in Cursor. Remove them with
414
419
 
415
420
  **Claude Code: `logout --agent claude`** revokes this device's sign-in, deletes
416
421
  `~/.agenttrail/credentials.json`, removes the enforcement plugin and its marketplace, and
417
- strips the enforcement settings from your settings files. It keeps the capture hooks in
418
- `.claude/settings.json`, `.agenttrail.json`, and the `.git/info/exclude` lines. With no
419
- credential the hooks upload nothing; delete them from `.claude/settings.json` to remove them
420
- completely.
422
+ strips the enforcement settings from `.claude/settings.local.json`. From
423
+ `~/.claude/settings.json` and `~/.claude/settings.local.json` it removes what sign-in added:
424
+ tokens, hooks, attributes and the exporter block. From a project's `.claude/settings.json`,
425
+ which your team may commit, it removes only an AgentTrail device token, if one is there (as an
426
+ older enforcement setup could leave it), and only when that file is a regular file you own, not
427
+ a link. It keeps every other setting in that file, and prints which file it changed: if the
428
+ token was ever committed or pushed, treat it as exposed and revoke that device in the AgentTrail
429
+ app, under Governance ▸ Devices. If it finds a device token there but can't remove it (the file
430
+ is a link, in a linked folder, someone else's, or not plain JSON), it says so and why: remove it
431
+ by hand and revoke the device. It then prints which other AgentTrail entries are left there,
432
+ so you can remove them and commit that. It also keeps `.agenttrail.json` and the
433
+ `.git/info/exclude` lines. With no credential the hooks upload nothing.
421
434
 
422
435
  **Cursor: `logout --agent cursor`** sends what is still queued, removes the CLI's entries from
423
436
  every connected folder and from `~/.cursor/hooks.json`, deletes this machine's Cursor state,
@@ -426,7 +439,10 @@ including the import checkpoint, and revokes the device.
426
439
  **Cursor: `setup --agent cursor --unregister`** disconnects just this project and keeps the
427
440
  device signed in.
428
441
 
429
- You can also revoke a device from the AgentTrail app, under Governance ▸ Devices.
442
+ You can also revoke a device from the AgentTrail app, under Governance ▸ Devices. If `logout`
443
+ cannot reach AgentTrail to revoke the sign-in (offline, or an error answer), it still removes the
444
+ credential from this machine and says so: the device's tokens may still work until you revoke it
445
+ there.
430
446
 
431
447
  </details>
432
448
 
@@ -513,7 +529,7 @@ A name can be up to 64 characters. One that starts with `-` goes after `--`.
513
529
  | `--stand-down-guard` | `setup --agent claude`: stand Guard down here now, after you have applied your import in the app. |
514
530
  | `--unregister` | `setup --agent cursor` only: disconnect this project. |
515
531
  | `--endpoint <url>` | Session upload address. Defaults to `$AGENTTRAIL_INGEST_ENDPOINT`, then `https://ingest.agenttrail.sh`. |
516
- | `--api-endpoint <url>` | Sign-in and policy address. Defaults to `$AGENTTRAIL_API_ENDPOINT`, then `https://api.agenttrail.sh`. |
532
+ | `--api-endpoint <url>` | Sign-in and policy address. Defaults to `$AGENTTRAIL_API_ENDPOINT`, then `https://api.agenttrail.sh`. A refresh (the `SessionStart` hook, `device rename`, the backfill pre-flight) and `logout`'s revoke go back to the address the credential signed in against, whatever this says; sign in again to move a device. |
517
533
  | `--refresh` | `login` only: refresh the credential if it expires within a day; otherwise do nothing. |
518
534
 
519
535
  Backfill options are in [Backfill](#backfill), and `--help` lists them all.
@@ -563,7 +579,7 @@ entries.
563
579
  | --- | --- |
564
580
  | `https://api.agenttrail.sh` | Sign-in and refresh; fetching the policy snapshot at setup and session start; each policy check when enforcement is on; reporting at session start whether enforcement is on for this device. |
565
581
  | `https://ingest.agenttrail.sh` | Uploading sessions after each turn, from the Cursor sender, and from `backfill`; checking which sessions AgentTrail already holds before an import. |
566
- | The npm registry | The hooks run `npx -y @agenttrail/cli@latest`. |
582
+ | The npm registry | The hooks run `npx -y @agenttrail/cli@latest`; a `--global` install's `SessionStart` hook names the installed version instead. |
567
583
  | `https://www.agenttrail.sh/device` | Opened in your browser during sign-in. |
568
584
 
569
585
  `status`, `backfill --scan` and `backfill --status` make no network calls, and nothing is sent