agentel 0.2.6 → 0.3.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/README.md +260 -79
- package/docs/code-reference.md +130 -42
- package/docs/history-source-handling.md +685 -153
- package/docs/release.md +35 -8
- package/npm-shrinkwrap.json +478 -0
- package/package.json +20 -4
- package/scripts/postinstall.js +156 -0
- package/src/archive.js +1342 -50
- package/src/canonical-events.js +346 -35
- package/src/cli.js +8835 -843
- package/src/collector.js +42 -4
- package/src/config.js +26 -4
- package/src/diffs.js +156 -0
- package/src/doctor.js +48 -5
- package/src/importers/claude.js +51 -4
- package/src/importers/copilot.js +385 -0
- package/src/importers/cursor-recovery.js +22 -0
- package/src/importers/factory.js +396 -0
- package/src/importers/gemini.js +41 -1
- package/src/importers/grok.js +367 -0
- package/src/importers/pi.js +422 -0
- package/src/importers/providers.js +64 -5
- package/src/importers.js +6429 -747
- package/src/mcp.js +1 -0
- package/src/memory-sources.js +671 -0
- package/src/memory-store.js +0 -0
- package/src/parser-versions.js +13 -0
- package/src/pricing.js +84 -0
- package/src/search.js +641 -215
- package/src/session-store.js +405 -0
- package/src/source-watch.js +293 -0
- package/src/sources.js +60 -11
- package/src/supervisor.js +197 -9
- package/src/sync.js +6 -0
- package/src/unavailable-sources.js +358 -0
- package/src/web-export-instructions.js +6 -4
package/README.md
CHANGED
|
@@ -10,11 +10,11 @@ Core capabilities:
|
|
|
10
10
|
- canonical event JSONL alongside each transcript for provider-independent search
|
|
11
11
|
- canonical repo keying from git remotes, first commits, or path hashes
|
|
12
12
|
- Codex CLI, Codex Desktop, Codex SDK jobs, ChatGPT export, Claude Code CLI,
|
|
13
|
-
Claude Code Desktop, Claude
|
|
14
|
-
Devin CLI, and Cursor imports
|
|
15
|
-
- event
|
|
13
|
+
Claude Code Desktop, Claude Cowork, Claude.ai export, Gemini CLI, Antigravity,
|
|
14
|
+
Devin CLI, Devin Desktop, Windsurf, and Cursor imports
|
|
15
|
+
- canonical-event `agentlog history` search with explicit markdown recovery
|
|
16
16
|
- `agentlog-recall` MCP stdio server exposing `search_past_sessions`
|
|
17
|
-
- installable recall commands, workflows, skills, and MCP hooks for common
|
|
17
|
+
- installable recall and continue-from commands, workflows, skills, and MCP hooks for common
|
|
18
18
|
coding agents
|
|
19
19
|
- local web viewer for full conversation history inspection
|
|
20
20
|
- device-scoped S3-compatible upload sync for backup and future multi-device recall
|
|
@@ -27,7 +27,7 @@ services.
|
|
|
27
27
|
|
|
28
28
|
## Install
|
|
29
29
|
|
|
30
|
-
Install the CLI globally so agent-facing recall commands can call `agentlog`
|
|
30
|
+
Install the CLI globally so agent-facing recall and continue-from commands can call `agentlog`
|
|
31
31
|
from PATH:
|
|
32
32
|
|
|
33
33
|
```sh
|
|
@@ -35,13 +35,19 @@ npm install -g agentel
|
|
|
35
35
|
agentlog init
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
On direct installs, agentlog includes a small postinstall helper. When npm runs
|
|
39
|
+
that helper in an interactive terminal, it offers `agentlog update` if an
|
|
40
|
+
existing config is present and `agentlog init` otherwise. It skips CI, `npx`,
|
|
41
|
+
and indirect dependency installs, and you can suppress it with
|
|
42
|
+
`AGENTLOG_SKIP_POSTINSTALL=1`.
|
|
43
|
+
|
|
38
44
|
You can also install directly from the GitHub repository. Use a tag or commit
|
|
39
45
|
ref for repeatable installs:
|
|
40
46
|
|
|
41
47
|
```sh
|
|
42
48
|
npm install -g brianlzhou/agentlog
|
|
43
49
|
# or
|
|
44
|
-
npm install -g brianlzhou/agentlog#v0.
|
|
50
|
+
npm install -g brianlzhou/agentlog#v0.3.0
|
|
45
51
|
agentlog init
|
|
46
52
|
```
|
|
47
53
|
|
|
@@ -61,6 +67,7 @@ npx agentel init
|
|
|
61
67
|
Requirements:
|
|
62
68
|
|
|
63
69
|
- Node.js 20 or newer
|
|
70
|
+
- npm 11.10 or newer when developing from source or publishing releases
|
|
64
71
|
- `sqlite3` for Codex, Cursor, and Devin local database imports
|
|
65
72
|
- `rg`/ripgrep for faster history search
|
|
66
73
|
- `unzip` for ZIP web exports
|
|
@@ -69,6 +76,23 @@ Requirements:
|
|
|
69
76
|
Run `agentlog doctor` after install to check optional tools and configured
|
|
70
77
|
sources.
|
|
71
78
|
|
|
79
|
+
## Single-file binary (optional)
|
|
80
|
+
|
|
81
|
+
An optional standalone executable can be built via Bun's `--compile`:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
npm install
|
|
85
|
+
npm run build:binary # dist/agentlog for the current platform
|
|
86
|
+
npm run build:binary -- --target=bun-linux-x64 --outfile=dist/agentlog-linux-x64
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
The binary (~62MB) bundles the Bun runtime and the `better-sqlite3` native
|
|
90
|
+
module, so it runs standalone without `node_modules`. Useful for distributing
|
|
91
|
+
`agentlog` to environments that can't `npm install`, and shaves ~30ms off
|
|
92
|
+
the `agentlog show` cold-start that agents hit on each `/recall` invocation.
|
|
93
|
+
Supported Bun targets: `bun-darwin-arm64`, `bun-darwin-x64`, `bun-linux-x64`,
|
|
94
|
+
`bun-linux-arm64`, `bun-windows-x64`.
|
|
95
|
+
|
|
72
96
|
## Try From Source
|
|
73
97
|
|
|
74
98
|
```sh
|
|
@@ -80,10 +104,11 @@ AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source codex-de
|
|
|
80
104
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import chatgpt
|
|
81
105
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import claude-web
|
|
82
106
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import chatgpt ~/Downloads/chatgpt-export.zip --username you@example.com
|
|
107
|
+
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import chatgpt "~/Downloads/OpenAI-export/User Online Activity" --username you@example.com
|
|
83
108
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import claude-web ~/Downloads/claude-export --username you --display-name "Personal Claude"
|
|
84
109
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source claude --since 30d
|
|
85
110
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source claude-code-desktop --since all
|
|
86
|
-
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source claude-
|
|
111
|
+
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source claude-cowork --since all
|
|
87
112
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source gemini-cli --since all
|
|
88
113
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source antigravity --since all
|
|
89
114
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source devin-cli --since all
|
|
@@ -118,6 +143,7 @@ Before publishing a release, run:
|
|
|
118
143
|
|
|
119
144
|
```sh
|
|
120
145
|
npm run check
|
|
146
|
+
npm run security
|
|
121
147
|
npm test
|
|
122
148
|
npm run pack:dry
|
|
123
149
|
npm run smoke:pack
|
|
@@ -137,22 +163,22 @@ agentlog integrations add-to opencode
|
|
|
137
163
|
agentlog integrations add-to aider
|
|
138
164
|
```
|
|
139
165
|
|
|
140
|
-
`integrations add-to codex` installs the MCP server plus
|
|
141
|
-
`integrations add-to claude` installs the MCP server plus
|
|
142
|
-
|
|
143
|
-
`integrations add-to gemini` installs the MCP server plus
|
|
144
|
-
under `~/.gemini/commands
|
|
166
|
+
`integrations add-to codex` installs the MCP server plus Codex recall and
|
|
167
|
+
continue-from skills. `integrations add-to claude` installs the MCP server plus
|
|
168
|
+
Claude `/recall` and `/continue-from` commands plus matching Claude skills.
|
|
169
|
+
`integrations add-to gemini` installs the MCP server plus Gemini `/recall` and
|
|
170
|
+
`/continue-from` commands under `~/.gemini/commands/`.
|
|
145
171
|
|
|
146
172
|
Additional native surfaces are installed where the client exposes one:
|
|
147
173
|
|
|
148
174
|
| Agent | Recall surface |
|
|
149
175
|
| --- | --- |
|
|
150
|
-
| Antigravity | MCP config in `~/.gemini/antigravity/mcp_config.json` plus
|
|
151
|
-
| Devin | MCP config in `~/.config/devin/config.json` plus `/recall`
|
|
152
|
-
| Cursor | MCP config in `~/.cursor/mcp.json` plus project files `.cursor/commands/recall.md` and `.cursor/rules/agentlog
|
|
153
|
-
| Cline | MCP config in `~/.cline/data/settings/cline_mcp_settings.json` plus `/recall.md`
|
|
154
|
-
| OpenCode | MCP config in `~/.config/opencode/opencode.json` plus `/recall`
|
|
155
|
-
| Aider | Loadable recall instructions under `~/.agentlog/aider/`; Aider does not expose a documented custom slash-command registry, so load them with `/load ~/.agentlog/aider/load-recall.aider` or configure the generated markdown as `read:` in `.aider.conf.yml` |
|
|
176
|
+
| Antigravity | MCP config in `~/.gemini/antigravity/mcp_config.json` plus Agent Skills at `~/.gemini/antigravity/skills/{recall,continue-from}/SKILL.md` |
|
|
177
|
+
| Devin | MCP config in `~/.config/devin/config.json` plus `/recall` and `/continue-from` skills under `~/.config/devin/skills/` |
|
|
178
|
+
| Cursor | MCP config in `~/.cursor/mcp.json` plus project files `.cursor/commands/{recall,continue-from}.md` and matching `.cursor/rules/agentlog-*.mdc` rules |
|
|
179
|
+
| Cline | MCP config in `~/.cline/data/settings/cline_mcp_settings.json` plus `/recall.md` and `/continue-from.md` workflows under `~/Documents/Cline/Workflows/` |
|
|
180
|
+
| OpenCode | MCP config in `~/.config/opencode/opencode.json` plus `/recall` and `/continue-from` commands under `~/.config/opencode/commands/` |
|
|
181
|
+
| Aider | Loadable recall and continue-from instructions under `~/.agentlog/aider/`; Aider does not expose a documented custom slash-command registry, so load them with `/load ~/.agentlog/aider/load-recall.aider` or configure the generated markdown as `read:` in `.aider.conf.yml` |
|
|
156
182
|
|
|
157
183
|
The generated recall files use a skill-style layout with command tables,
|
|
158
184
|
workflow steps, query-selection guidance, archive layout notes, and
|
|
@@ -161,6 +187,14 @@ troubleshooting. They ask the agent to infer a focused search query, then call
|
|
|
161
187
|
access to `~/.agentlog`. Users can ask for context naturally, such as `/recall
|
|
162
188
|
the migration bug and update the test`.
|
|
163
189
|
|
|
190
|
+
The generated continue-from files are stricter: after selecting a session they
|
|
191
|
+
instruct the agent to read both the first window
|
|
192
|
+
(`agentlog show <session_id> --json --msg-offset 0 --msg-limit 8`) and latest
|
|
193
|
+
window (`agentlog show <session_id> --json --msg-limit 12`). The first window
|
|
194
|
+
recovers the original goal and constraints; the latest window recovers the
|
|
195
|
+
current state, files touched, test status, blockers, and next action before the
|
|
196
|
+
agent resumes work.
|
|
197
|
+
|
|
164
198
|
Skill/command files can also be installed directly:
|
|
165
199
|
|
|
166
200
|
```sh
|
|
@@ -215,30 +249,43 @@ opened. Search runs as you type with a short debounce. The web endpoint uses a
|
|
|
215
249
|
warm compatible index when available, but it will not synchronously parse or
|
|
216
250
|
rebuild an obsolete index during an interactive query or scan every rendered
|
|
217
251
|
conversation as a fallback; rebuilds are left to `agentlog index rebuild` or
|
|
218
|
-
the supervisor.
|
|
252
|
+
the supervisor. Session lists and stats are backed by derived indexes under
|
|
253
|
+
`agentlog/indexes/`, so repeat page loads avoid walking every metadata file.
|
|
254
|
+
The static viewer uses shadcn/ui-style design tokens
|
|
219
255
|
and compact button/input/select/sidebar patterns without requiring a frontend
|
|
220
256
|
build step. Archives still keep stable `path:<hash>` keys for folders without
|
|
221
257
|
git identity, but the UI displays the local path.
|
|
222
258
|
|
|
223
259
|
Provider filters use one stable order: OpenAI (`codex-cli`, `codex-desktop`,
|
|
224
|
-
`codex-sdk`, `chatgpt`), Anthropic (`claude`, `claude-code-desktop`, `claude-
|
|
260
|
+
`codex-sdk`, `chatgpt`), Anthropic (`claude`, `claude-code-desktop`, `claude-cowork`,
|
|
225
261
|
`claude-web`, `claude-sdk`), Google (`gemini-cli`, `antigravity`), Cognition
|
|
226
|
-
(`devin-cli`), then other local tools (`cursor`, `cline`, `opencode`,
|
|
262
|
+
(`devin-cli`, `devin-desktop`), then other local tools (`cursor`, `cline`, `opencode`,
|
|
227
263
|
`aider`).
|
|
228
264
|
|
|
229
265
|
The supervisor is agentlog's local background watcher. When it is running, it
|
|
230
|
-
|
|
231
|
-
|
|
266
|
+
watches each source's on-disk history roots with filesystem events (FSEvents
|
|
267
|
+
on macOS): writes mark the source dirty and an import runs a few seconds
|
|
268
|
+
later, so new conversation turns usually land in the archive within seconds.
|
|
269
|
+
SQLite-backed stores such as Cursor's `state.vscdb` use a wider ~20-second
|
|
270
|
+
coalesce window because their databases churn while the app is open. Events
|
|
271
|
+
are a latency optimization, never the source of truth — watched sources are
|
|
272
|
+
still re-polled on a 15-minute heartbeat to catch dropped events, sources
|
|
273
|
+
whose roots can't be watched (Aider project folders, JetBrains Cline) keep
|
|
274
|
+
the original 30-second poll with a 5-minute idle cadence, and failing sources
|
|
275
|
+
retry with exponential backoff, so an idle machine isn't spawning import
|
|
276
|
+
workers all day. Imports use the configured import window, defaulting to the
|
|
277
|
+
last 30 days. If you opt out of
|
|
232
278
|
starting it at login, agentlog does not install a login item. During setup,
|
|
233
279
|
uncheck `Start watcher at login` or run `agentlog init --no-autostart`; you can
|
|
234
280
|
still run `agentlog import --source all` for a one-time catch-up,
|
|
235
281
|
`agentlog watcher start` to watch for the current session, or
|
|
236
282
|
`agentlog watcher login enable` later. The default
|
|
237
283
|
watcher choices are Codex CLI, Codex Desktop, Claude Code CLI, Claude Code
|
|
238
|
-
Desktop, Claude
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
284
|
+
Desktop, Claude Cowork, Gemini CLI, Antigravity CLI, Antigravity 2.0, Antigravity IDE, Devin CLI, Devin Desktop, Windsurf,
|
|
285
|
+
GitHub Copilot CLI, Factory Droid, Grok Build, pi, Cursor,
|
|
286
|
+
Cline, OpenCode CLI, OpenCode Desktop, OpenCode Web, and Aider. New configs
|
|
287
|
+
still support `imports.autoDiscoverSources=true`, but init records the chosen
|
|
288
|
+
watcher list exactly by setting `imports.autoDiscoverSources=false`.
|
|
242
289
|
Cursor raw SQLite recovery is intentionally left to explicit imports such as
|
|
243
290
|
`agentlog import --source cursor --since all`; the supervisor handles
|
|
244
291
|
incremental Cursor logs going forward and prunes duplicate transcript snapshots.
|
|
@@ -283,6 +330,13 @@ after the initial backfill. If the watcher is allowed to start at login, init
|
|
|
283
330
|
also asks for a cloud autosync cadence; the supervisor then uploads new archive
|
|
284
331
|
changes on that interval whenever it is running.
|
|
285
332
|
|
|
333
|
+
Init always records a device name in the main agentlog config. New session
|
|
334
|
+
metadata includes that device identity, and remote sync uses the same slug so
|
|
335
|
+
multiple machines stay distinguishable in one archive bucket.
|
|
336
|
+
Existing archived sessions are not rewritten by init; run
|
|
337
|
+
`agentlog import --source all --since all` if you want to reimport old local
|
|
338
|
+
history with the current device metadata.
|
|
339
|
+
|
|
286
340
|
Remote objects are namespaced by device so multiple machines can upload into
|
|
287
341
|
one bucket without overwriting each other's archive roots:
|
|
288
342
|
|
|
@@ -292,13 +346,20 @@ s3://<bucket>/agentlog/
|
|
|
292
346
|
work-laptop/
|
|
293
347
|
sessions/...
|
|
294
348
|
raw-sources/...
|
|
295
|
-
|
|
349
|
+
memory/...
|
|
350
|
+
telemetry/...
|
|
296
351
|
snapshots/
|
|
297
352
|
20260504T173000Z/
|
|
298
353
|
work-laptop/
|
|
299
354
|
sessions/...
|
|
300
355
|
```
|
|
301
356
|
|
|
357
|
+
Sync uploads every object under the local archive root, so memory items and
|
|
358
|
+
their snapshot history (the Memories tab data) ride along automatically next to
|
|
359
|
+
sessions. The one exception is derived local indexes under `agentlog/indexes/`,
|
|
360
|
+
which are intentionally excluded; each device rebuilds those caches from the
|
|
361
|
+
canonical archive objects.
|
|
362
|
+
|
|
302
363
|
In a terminal, `agentlog sync` asks you to choose the remote target, previews
|
|
303
364
|
the upload-only plan, and requires a confirmation phrase before writing. This is
|
|
304
365
|
intentional even when only one remote is configured, because multiple remotes
|
|
@@ -364,32 +425,87 @@ alongside it:
|
|
|
364
425
|
For large multi-session stores such as Cursor SQLite, the per-session raw
|
|
365
426
|
manifest may reference one shared copy under `raw-sources/` instead of copying
|
|
366
427
|
the same database into every session folder.
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
search
|
|
428
|
+
Web chat imports may also reference a shared raw export archive; ChatGPT
|
|
429
|
+
attachments remain preserved there and fresh imports render image/file cards in
|
|
430
|
+
the readable transcript when the export includes the file bytes.
|
|
431
|
+
|
|
432
|
+
`events.jsonl` uses the local `agentlog.events.v5` canonical event shape:
|
|
433
|
+
`session.started`, `prompt.submitted`, `response.generated`, `tool.called`,
|
|
434
|
+
`tool.completed`, `memory.read`, `memory.write`, and `memory.loaded`;
|
|
435
|
+
completed tool events link back to the matching call when the source exposes
|
|
436
|
+
stable ids or matching names. Tool calls and results may include provider diff
|
|
437
|
+
hunk metadata such as `structuredPatch` for numbered viewer diffs. Parser
|
|
438
|
+
versions are stamped by source type so importer output changes can trigger
|
|
439
|
+
reimport with a new fingerprint. Recall/search builds the interactive index
|
|
440
|
+
from canonical event text; legacy transcript/markdown scanning is an explicit
|
|
441
|
+
recovery path rather than a hidden fallback during normal queries. The normal
|
|
442
|
+
local search rebuild
|
|
443
|
+
writes a small JSON summary plus a SQLite FTS5 sidecar for fast web, terminal,
|
|
444
|
+
and MCP queries. The older full BM25 JSON index remains available only to
|
|
445
|
+
explicit compatibility callers, avoiding huge JSON serializations during
|
|
446
|
+
`agentlog update` on large web-chat archives. Both index paths are keyed by the
|
|
447
|
+
session-list fingerprint so stale checks avoid statting every archived file.
|
|
448
|
+
When the index contract changes, run
|
|
449
|
+
`agentlog index rebuild` to rederive search and common stats payloads from the
|
|
450
|
+
archive without a full source reimport.
|
|
451
|
+
When canonical diff metadata changes, run
|
|
452
|
+
`agentlog update --yes --since all --sources codex` or
|
|
453
|
+
`agentlog import --source codex --since all` for older Codex archives that need
|
|
454
|
+
fresh `patch_apply_end` structured hunks from raw source events; the bumped
|
|
455
|
+
view schema rederives `.view.json` on read.
|
|
456
|
+
Memory read/write/load events are also rendered as memory activity in the web
|
|
457
|
+
and Markdown views, so memory-file edits do not appear as ordinary source-code
|
|
458
|
+
diffs after the view payload is regenerated.
|
|
382
459
|
|
|
383
460
|
Stats are import-time metadata, not viewer-time transcript repair. Archive
|
|
384
461
|
metadata stores message counts, user-message counts, token usage, and models for
|
|
385
|
-
each session, and the web stats view reads those fields directly.
|
|
462
|
+
each session, and the web stats view reads those fields directly. Token totals
|
|
463
|
+
include cache-read/cache-write tokens when providers report them, while the
|
|
464
|
+
stats payload and UI also keep input, output, cache, and reasoning sub-counts
|
|
465
|
+
separately when available. New archive metadata also stores compact tool-usage
|
|
466
|
+
summaries and provider/export cost fields when present; the stats view uses
|
|
467
|
+
those fields for most-used tools, session-time summaries, and estimated spend
|
|
468
|
+
charts. Archive schema v6 also stores compact output-token work metadata
|
|
469
|
+
(`text`, `toolUse`, `reasoning`, `unknown`) and lightweight outcome counts
|
|
470
|
+
(`editToolCalls`, `filesTouched`, `knowledgeCaptures`, `memoryReads`,
|
|
471
|
+
`memoryWrites`, `memoryLoads`) at import time. Canonical events v5 include
|
|
472
|
+
`memory.read`, `memory.write`, and `memory.loaded` events for provider memory
|
|
473
|
+
files and instruction files such as `AGENTS.md` and `CLAUDE.md`. The web stats
|
|
474
|
+
view uses only those metadata fields for output job-mix charts and
|
|
475
|
+
tokens-per-meaningful-event ratios; it does not reread transcripts or events in
|
|
476
|
+
the request path. Existing archives need `agentlog update --yes --since all` or
|
|
477
|
+
a clean reimport before these new charts have full coverage. Subagent child
|
|
478
|
+
sessions stay direct-addressable, but aggregate stats exclude them by default so
|
|
479
|
+
parent-thread provider counters are not counted again;
|
|
480
|
+
the web stats view can include them with the Subagents toggle. Spend is labeled
|
|
481
|
+
as an estimate unless a provider supplied an actual
|
|
482
|
+
cost field, and unpriced tokens stay visible instead of being folded into a
|
|
483
|
+
blended-rate guess. The model-pricing table lives in `src/pricing.js` with an
|
|
484
|
+
explicit `pricing_version`, and the stats payload exposes a 30-day usage capsule
|
|
485
|
+
with latest-day spend, 7-day spend, 30-day spend, tokens, prompts, sessions, and
|
|
486
|
+
top model. The web stats endpoint keeps the first payload light by shipping the
|
|
487
|
+
current chart window and rolling activity heatmap first; all-time daily series
|
|
488
|
+
are fetched only when the viewer asks for the all-time range or an older
|
|
489
|
+
activity year. Codex imports preserve `threads.tokens_used` as the
|
|
490
|
+
provider total and split rollout `token_count` events into fresh input, cache
|
|
491
|
+
read, output, and reasoning metadata. Codex SDK and
|
|
386
492
|
Claude SDK batch jobs are kept out of primary activity totals, streaks, folder
|
|
387
493
|
rankings, and provider/model charts; the stats payload and web view expose them
|
|
388
494
|
as a separate SDK jobs section so high-volume automation does not drown out
|
|
389
495
|
interactive work. Cursor sessions
|
|
390
496
|
without provider-reported token usage can also carry separately labeled
|
|
391
497
|
`estimatedUsage`, which the stats view includes while reporting estimated token
|
|
392
|
-
coverage.
|
|
498
|
+
coverage. Cursor `agent-transcripts` imports also preserve Composer model
|
|
499
|
+
configuration in session metadata, including the canonical model and reasoning
|
|
500
|
+
effort parameters. They infer working directories from explicit transcript
|
|
501
|
+
paths before falling back to Cursor's project-folder slug, which avoids stale
|
|
502
|
+
slug attribution when Cursor writes an agent transcript under the wrong project
|
|
503
|
+
directory; existing Cursor transcript archives need `agentlog update --yes
|
|
504
|
+
--since all` or a clean Cursor reimport to gain that metadata and attribution.
|
|
505
|
+
Cursor transcript imports are the preferred v1 source when both
|
|
506
|
+
modern transcript files and legacy Cursor SQLite rows describe the same
|
|
507
|
+
Composer conversation, and a full Cursor reimport prunes those older duplicate
|
|
508
|
+
copies. ChatGPT and Claude.ai exports without provider usage get estimated
|
|
393
509
|
`metadata.usage` on their native chat messages, split into non-assistant input,
|
|
394
510
|
assistant output, and Claude thinking output where the export provides separate
|
|
395
511
|
parts. During pre-v1 development, if those stats fields or parser semantics
|
|
@@ -406,13 +522,24 @@ as `[chatgpt]conversations/<account-id>` and
|
|
|
406
522
|
metadata in `~/.agentlog/state/web-accounts.json`; use
|
|
407
523
|
`agentlog import accounts list` to inspect mappings and
|
|
408
524
|
`agentlog import accounts rename <provider> <account-id-or-username> --display-name <name>`
|
|
409
|
-
to change the viewer display name.
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
525
|
+
to change the viewer display name.
|
|
526
|
+
|
|
527
|
+
For newer OpenAI privacy exports named `OpenAI-export`, unzip the download and
|
|
528
|
+
import the `User Online Activity` folder. Running `agentlog import chatgpt`
|
|
529
|
+
without a path starts a walkthrough that asks for export paths one at a time,
|
|
530
|
+
then account username/email and display name. ChatGPT
|
|
531
|
+
conversations may be split across multiple
|
|
532
|
+
`Conversations__...chatgpt...part-000N` ZIPs or folders; passing the parent
|
|
533
|
+
folder is best, but the walkthrough can also collect the split part folders
|
|
534
|
+
individually and preserve `chat.html`, manifests, ZIPs, and attached files in
|
|
535
|
+
the shared raw export archive. Claude.ai exports preserve conversation summaries
|
|
536
|
+
and split structured
|
|
537
|
+
thinking parts from visible assistant answers when the export includes that
|
|
538
|
+
detail. Repeated manual uploads are incremental: unchanged conversations are
|
|
539
|
+
skipped, and updated conversations replace the stable session for that
|
|
540
|
+
provider/account/conversation id. Existing malformed pre-v1 web-chat archives
|
|
541
|
+
are not migrated automatically; reimport from the original export after a reset
|
|
542
|
+
or cleanup.
|
|
416
543
|
|
|
417
544
|
Tool calls and tool results are normalized before archive write where provider
|
|
418
545
|
data is available. For example, Devin tool calls live in
|
|
@@ -421,6 +548,9 @@ being appended to assistant prose as synthetic `Grep(...)` text. Canonical
|
|
|
421
548
|
tool events also carry viewer-facing `category`, `categoryLabel`, `icon`,
|
|
422
549
|
`inputPreview`, and `target` fields so the web viewer can render Bash, edit,
|
|
423
550
|
read, search, web, task, skill, and MCP calls consistently across providers.
|
|
551
|
+
Devin CLI imports also read `tool_call_state` and same-session subagent roots
|
|
552
|
+
from `sessions.db`; existing Devin CLI archives created before parser v2 should
|
|
553
|
+
be rebuilt with `agentlog import --source devin-cli --since all`.
|
|
424
554
|
|
|
425
555
|
Use `agentlog reset` to stop agentlog, disable autostart, and remove agentlog's
|
|
426
556
|
local home, config, state, cache, logs, and archive objects. Source application
|
|
@@ -432,16 +562,34 @@ importer/parser logic to rebuild the local archive without redoing setup:
|
|
|
432
562
|
|
|
433
563
|
```sh
|
|
434
564
|
npm install -g agentel@latest
|
|
435
|
-
agentlog update --yes
|
|
565
|
+
agentlog update --yes
|
|
436
566
|
```
|
|
437
567
|
|
|
438
568
|
`agentlog update` preserves `config.json`, redaction settings, web account
|
|
439
|
-
labels,
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
569
|
+
labels, manually imported ChatGPT/Claude.ai archives, local archives whose
|
|
570
|
+
original source files are no longer present, source histories, and recall
|
|
571
|
+
integrations. It removes derived local archive, import, index, cache, and sync
|
|
572
|
+
bookkeeping, then reimports configured local sources from the stored
|
|
573
|
+
preferences. If a source application has already aged out a transcript, such as
|
|
574
|
+
Claude Code's default local cleanup, the previous agentlog archive is restored
|
|
575
|
+
instead of being silently dropped, with a source/provider/sourceType breakdown.
|
|
576
|
+
When Agentlog has raw backups for missing Claude Code source files, repair them
|
|
577
|
+
explicitly before a clean reimport:
|
|
578
|
+
|
|
579
|
+
```sh
|
|
580
|
+
agentlog repair claude-code-backups --dry-run
|
|
581
|
+
agentlog repair claude-code-backups --yes
|
|
582
|
+
agentlog update --yes --since all --sources claude
|
|
583
|
+
```
|
|
584
|
+
|
|
585
|
+
`agentlog doctor` reports preserved unavailable source archives and recommends
|
|
586
|
+
the same repair helper when applicable. The rebuild window comes from the initial
|
|
587
|
+
backfill or an explicit all-source import such as
|
|
588
|
+
`agentlog import --source all --since all`; the fallback for legacy configs is
|
|
589
|
+
`all`. The watcher's rolling
|
|
590
|
+
`imports.defaultSinceDays` is not used by `agentlog update`. It does not touch
|
|
591
|
+
remote sync objects by default; use `agentlog sync replace` when the remote
|
|
592
|
+
should match the rebuilt local archive.
|
|
445
593
|
|
|
446
594
|
Use `agentlog config` to change `~/.agentlog/config.json` without rerunning the
|
|
447
595
|
init wizard:
|
|
@@ -456,7 +604,7 @@ agentlog config set sync.intervalMinutes manual
|
|
|
456
604
|
agentlog config sources edit
|
|
457
605
|
agentlog config sources set codex-cli,cursor,cline
|
|
458
606
|
agentlog config sources add gemini-cli
|
|
459
|
-
agentlog config sources remove claude-
|
|
607
|
+
agentlog config sources remove claude-cowork
|
|
460
608
|
```
|
|
461
609
|
|
|
462
610
|
`agentlog config setup` reopens the preferences parts of init, including what
|
|
@@ -467,14 +615,15 @@ with the current config preselected.
|
|
|
467
615
|
|
|
468
616
|
## Import Windows
|
|
469
617
|
|
|
470
|
-
`agentlog init` starts with interactive setup: choose archive
|
|
471
|
-
choose the full local archive/cache path, choose whether the local
|
|
472
|
-
at login, and install recall commands or skills, then discover
|
|
473
|
-
optionally backfill history.
|
|
618
|
+
`agentlog init` starts with interactive setup: name this device, choose archive
|
|
619
|
+
destinations, choose the full local archive/cache path, choose whether the local
|
|
620
|
+
watcher starts at login, and install recall commands or skills, then discover
|
|
621
|
+
sources and optionally backfill history.
|
|
474
622
|
After backfill, init asks which sources the background watcher should keep
|
|
475
623
|
polling, then offers local OTel bridges for Claude Code, Gemini CLI, and Cline.
|
|
476
624
|
Local archive storage is always enabled; R2, S3, and custom remote sync targets
|
|
477
|
-
can be added as upload-only optional destinations
|
|
625
|
+
can be added as upload-only optional destinations. The configured device name is
|
|
626
|
+
stored in `config.json`, stamped into new session metadata, and used for the
|
|
478
627
|
remote namespace. Discovery and import phases show progress bars while they scan
|
|
479
628
|
local stores.
|
|
480
629
|
|
|
@@ -489,19 +638,42 @@ saved in config and used by later `agentlog import --source all` runs unless
|
|
|
489
638
|
Default init sources:
|
|
490
639
|
|
|
491
640
|
- Codex CLI sessions and Codex Desktop sessions from Codex state, shown as
|
|
492
|
-
separate toggles
|
|
493
|
-
|
|
494
|
-
-
|
|
641
|
+
separate toggles, including linked Codex subagent child sessions when
|
|
642
|
+
`thread_spawn_edges` metadata is present; Codex SDK jobs are available as an
|
|
643
|
+
opt-in batch source
|
|
644
|
+
- Claude Code CLI transcripts from `~/.claude/projects`, including subagent
|
|
645
|
+
definition snapshots and `subagents/*.jsonl` runs imported as child sessions
|
|
646
|
+
- Claude Code Desktop metadata and Claude Cowork/local-agent sessions from
|
|
495
647
|
the Claude app data, shown as separate toggles
|
|
496
648
|
- Gemini CLI saved chats/checkpoints under `~/.gemini/tmp`, plus session/export JSONL stores with tool, usage, and checkpoint metadata
|
|
497
|
-
- Antigravity task/plan/walkthrough artifacts under `~/.gemini/antigravity/brain`, plus partial trajectory summaries from Antigravity app state when no readable artifacts exist
|
|
498
|
-
-
|
|
649
|
+
- Antigravity transcript logs and task/plan/walkthrough artifacts under `~/.gemini/antigravity/brain`, including linked subagent child sessions when `INVOKE_SUBAGENT` steps point at spawned conversations, plus partial trajectory summaries from Antigravity app state when no readable artifacts exist
|
|
650
|
+
- Antigravity CLI sessions (the Gemini CLI successor) from `~/.gemini/antigravity-cli/brain`
|
|
651
|
+
transcript logs and artifacts, with workspace attribution from the CLI's
|
|
652
|
+
`history.jsonl` prompt log, imported as a separate source from the 2.0 app
|
|
653
|
+
- Antigravity IDE sessions from `~/.gemini/antigravity-ide/brain`, imported as
|
|
654
|
+
a third separate source; stale migration copies of 2.0 conversations are skipped
|
|
655
|
+
- Devin for Terminal sessions from `~/.local/share/devin/cli/sessions.db`,
|
|
656
|
+
including tool-call state, visible thinking-duration traces, and same-session
|
|
657
|
+
subagent roots imported as linked child sessions
|
|
658
|
+
- Devin Desktop ACP event logs from `~/Library/Application Support/Devin/User/acp-events`, indexed by Devin's global `state.vscdb`
|
|
499
659
|
- Cursor chats from older workspace `state.vscdb` SQLite stores and global
|
|
500
660
|
`cursorDiskKV` Composer/Agent rows, including `aiService` prompt/generation
|
|
501
661
|
fallbacks, raw SQLite salvage from Cursor global/workspace backups and WAL
|
|
502
662
|
files, conservative matching of raw assistant/tool companion fragments back
|
|
503
663
|
to same-project workspace sessions, duplicate prefix pruning, and newer
|
|
504
|
-
`~/.cursor/projects/<project>/agent-transcripts` files
|
|
664
|
+
`~/.cursor/projects/<project>/agent-transcripts` files, including subagent
|
|
665
|
+
child transcripts when Cursor writes `subagents/` folders
|
|
666
|
+
- GitHub Copilot CLI sessions from `~/.copilot/session-state/<id>/events.jsonl`
|
|
667
|
+
with workspace metadata, tool calls, model changes, and per-model token/premium-request
|
|
668
|
+
usage from clean-shutdown events
|
|
669
|
+
- Factory Droid JSONL transcripts from `~/.factory/sessions` (legacy flat and
|
|
670
|
+
per-project layouts), joined with `.settings.json` sidecars for model, token
|
|
671
|
+
usage, Factory credits, and subagent attribution
|
|
672
|
+
- Grok Build ACP update streams from `~/.grok/sessions/<encoded-cwd>/<id>/updates.jsonl`,
|
|
673
|
+
with chunked message reassembly plus `summary.json`/`signals.json` rollups
|
|
674
|
+
- pi coding agent JSONL session trees from `~/.pi/agent/sessions` (v1–v3 formats),
|
|
675
|
+
including branches, compactions, per-message usage with dollar cost, and
|
|
676
|
+
`!` shell executions
|
|
505
677
|
- Cline task folders from VS Code/JetBrains globalStorage, including checkpoint diffs when present
|
|
506
678
|
- OpenCode CLI/core SQLite and project JSON storage under `~/.local/share/opencode`, plus OpenCode Desktop app storage and Web sessions when present
|
|
507
679
|
- Aider repo-local `.aider.chat.history.md` transcripts, with `.aider.llm.history`
|
|
@@ -509,14 +681,21 @@ Default init sources:
|
|
|
509
681
|
|
|
510
682
|
The Claude Code desktop registry mostly stores metadata pointing back to the
|
|
511
683
|
standard Claude Code transcript, so agentlog imports the transcript when it exists
|
|
512
|
-
and only imports Claude
|
|
684
|
+
and only imports Claude Cowork sessions that contain actual prompt
|
|
513
685
|
content.
|
|
514
686
|
|
|
515
|
-
Windsurf local
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
687
|
+
Windsurf local imports read Cascade plan artifacts from
|
|
688
|
+
`~/.codeium/windsurf/brain` when present and preserve matching
|
|
689
|
+
`~/.codeium/windsurf/cascade/*.pb` files as raw sources, but those local
|
|
690
|
+
protobufs are not decoded into full transcripts. Agentlog also reads Windsurf's
|
|
691
|
+
global metadata cache to identify protobuf-only conversations by title, working
|
|
692
|
+
directory, and timestamp. Protobuf-only conversations are archived as
|
|
693
|
+
zero-message repair stubs so they are visible in the web viewer but excluded
|
|
694
|
+
from recall/search indexing. Open a stub in `agentlog web` to copy its repair
|
|
695
|
+
token, then import the Windsurf "Download trajectory" Markdown export with
|
|
696
|
+
`agentlog import windsurf --claim <token> <path-to-downloaded-trajectory.md>`.
|
|
697
|
+
Unclaimed exports can still be imported directly with
|
|
698
|
+
`agentlog import windsurf <path>`. If you bulk-export multiple trajectories to a
|
|
520
699
|
folder, import the folder directly, for example
|
|
521
700
|
`agentlog import windsurf ~/windsurf-cascade-export`.
|
|
522
701
|
|
|
@@ -538,20 +717,22 @@ The same choices can be run directly:
|
|
|
538
717
|
|
|
539
718
|
```sh
|
|
540
719
|
agentlog import --source all --since all
|
|
541
|
-
agentlog import --sources codex-cli,codex-desktop,claude,claude-code-desktop,claude-
|
|
720
|
+
agentlog import --sources codex-cli,codex-desktop,claude,claude-code-desktop,claude-cowork,gemini-cli,antigravity,devin-cli,devin-desktop,windsurf,cursor,cline,opencode-cli,opencode-desktop,opencode-web,aider --since all
|
|
542
721
|
agentlog import --source codex-desktop --since 90d
|
|
543
722
|
agentlog import --source codex-cli --since 30d
|
|
544
723
|
agentlog import --source codex-sdk --since all
|
|
545
724
|
agentlog import chatgpt
|
|
546
725
|
agentlog import claude-web
|
|
547
726
|
agentlog import chatgpt ~/Downloads/chatgpt-export.zip --username you@example.com
|
|
727
|
+
agentlog import chatgpt "~/Downloads/OpenAI-export/User Online Activity" --username you@example.com
|
|
548
728
|
agentlog import claude-web ~/Downloads/claude-export --username you --display-name "Personal Claude"
|
|
549
729
|
agentlog import --source claude --since 30d
|
|
550
730
|
agentlog import --source claude-code-desktop --since all
|
|
551
|
-
agentlog import --source claude-
|
|
731
|
+
agentlog import --source claude-cowork --since all
|
|
552
732
|
agentlog import --source gemini-cli --since all
|
|
553
733
|
agentlog import --source antigravity --since all
|
|
554
734
|
agentlog import --source devin-cli --since all
|
|
735
|
+
agentlog import --source devin-desktop --since all
|
|
555
736
|
agentlog import --source cursor --since all
|
|
556
737
|
agentlog import --source cursor --since all --explain-skips
|
|
557
738
|
agentlog import --source cline --since all
|