@agenttrail/cli 0.2.0 → 0.2.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/README.md +20 -7
- package/dist/chunk-FHYZ2UTD.js +168 -0
- package/dist/cli/index.cjs +46 -41
- package/dist/cli/index.js +1 -1
- package/dist/cursor/capture-hook.mjs +2 -2
- package/dist/cursor/pep-hook.mjs +74 -20
- package/dist/index.cjs +50 -45
- package/dist/index.d.cts +41 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/plugin/.claude-plugin/marketplace.json +2 -2
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/scripts/pep-hook.mjs +74 -20
- package/dist/chunk-WMGYTOQC.js +0 -163
package/README.md
CHANGED
|
@@ -12,11 +12,24 @@ nothing.
|
|
|
12
12
|
Claude Code and Cursor are connected by different means, because they expose different
|
|
13
13
|
things:
|
|
14
14
|
|
|
15
|
-
- **Claude Code**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
- **Claude Code** is connected per project, opt-in — not an MCP server, not an in-process
|
|
16
|
+
SDK, and not a long-running process. Claude Code ignores the OpenTelemetry exporter
|
|
17
|
+
variables in a repository's `.claude/settings.json` and `.claude/settings.local.json`, so a
|
|
18
|
+
per-project `setup` registers `Stop` and `SessionEnd` hooks in `.claude/settings.json`
|
|
19
|
+
instead. After each turn they run `agenttrail capture --agent claude` in the background,
|
|
20
|
+
which uploads the session from its local transcript (the same mapping, ids and edge scrub
|
|
21
|
+
as `backfill --import`; a turn already sent is not sent again). `setup --global` keeps
|
|
22
|
+
pointing Claude Code's own OpenTelemetry exporter at AgentTrail from
|
|
23
|
+
`~/.claude/settings.json`, and a project-only install on such a machine leaves delivery to
|
|
24
|
+
it. The upload logs each run to `~/.agenttrail/session-upload.log`; `status` says which path
|
|
25
|
+
delivers this project's sessions and when the last upload succeeded.
|
|
26
|
+
A project connected by an earlier `setup` (device login or `--key`) gets the hooks by itself at
|
|
27
|
+
its next Claude Code session start, through the SessionStart refresh hook, as long as the repo
|
|
28
|
+
does not track `.claude/settings.json`. A `--team` install, a repo that tracks that file, and a
|
|
29
|
+
session start where `npx` can't reach the registry don't heal: re-run
|
|
30
|
+
`npx -y @agenttrail/cli@latest setup --agent claude` there. `status` says `NOT SENT` until then.
|
|
31
|
+
The upload sends prompt and tool content only when no scope Claude Code honours (managed,
|
|
32
|
+
user or local settings, or the environment) switches it off.
|
|
20
33
|
- **Cursor** exports no traces you can redirect, so this package supplies the
|
|
21
34
|
runtime instead: `setup --agent cursor` registers **Cursor hook entries** in the
|
|
22
35
|
project's `.cursor/hooks.json` that run a small capture hook, which answers `{}`,
|
|
@@ -108,8 +121,8 @@ What differs from `--agent claude`:
|
|
|
108
121
|
|
|
109
122
|
| | Claude Code | Cursor |
|
|
110
123
|
|---|---|---|
|
|
111
|
-
| How spans are produced | Claude Code's own exporter, configured by us | our capture hook + a detached sender, both under `~/.agenttrail/cursor/runtime/` |
|
|
112
|
-
| What is written in the repo |
|
|
124
|
+
| How spans are produced | per project: our `Stop` / `SessionEnd` hooks upload each session from its transcript; `--global`: Claude Code's own exporter, configured by us | our capture hook + a detached sender, both under `~/.agenttrail/cursor/runtime/` |
|
|
125
|
+
| What is written in the repo | the capture hooks and resource attributes in `.claude/settings.json`; everything per-machine in `.claude/settings.local.json`, kept out of git via `.git/info/exclude` | `.cursor/hooks.json`, kept out of git via `.git/info/exclude` |
|
|
113
126
|
| State | `~/.agenttrail/credentials.json` | `~/.agenttrail/cursor/` (its own credential, registry, queue and checkpoint) |
|
|
114
127
|
| Auth | device login, or `--key` / `--team` for CI | device login only — `--key`, `--team` and `--global` are refused |
|
|
115
128
|
| Content capture | **on by default** (`--no-capture-content` opts out); scrubbed at ingest | off by default (`--capture-content` turns it on); scrubbed **on this machine** before it is queued, then server-side as well |
|