agentel 0.2.8 → 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 +222 -68
- package/docs/code-reference.md +121 -37
- package/docs/history-source-handling.md +555 -124
- package/docs/release.md +35 -8
- package/npm-shrinkwrap.json +478 -0
- package/package.json +18 -5
- package/scripts/postinstall.js +156 -0
- package/src/archive.js +1174 -65
- package/src/canonical-events.js +346 -35
- package/src/cli.js +7121 -819
- package/src/collector.js +42 -4
- package/src/config.js +15 -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 +39 -0
- 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 +4524 -383
- 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 +256 -70
- 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/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
|
|
@@ -84,7 +108,7 @@ AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import chatgpt "~/Downlo
|
|
|
84
108
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import claude-web ~/Downloads/claude-export --username you --display-name "Personal Claude"
|
|
85
109
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source claude --since 30d
|
|
86
110
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source claude-code-desktop --since all
|
|
87
|
-
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
|
|
88
112
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source gemini-cli --since all
|
|
89
113
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source antigravity --since all
|
|
90
114
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source devin-cli --since all
|
|
@@ -119,6 +143,7 @@ Before publishing a release, run:
|
|
|
119
143
|
|
|
120
144
|
```sh
|
|
121
145
|
npm run check
|
|
146
|
+
npm run security
|
|
122
147
|
npm test
|
|
123
148
|
npm run pack:dry
|
|
124
149
|
npm run smoke:pack
|
|
@@ -138,22 +163,22 @@ agentlog integrations add-to opencode
|
|
|
138
163
|
agentlog integrations add-to aider
|
|
139
164
|
```
|
|
140
165
|
|
|
141
|
-
`integrations add-to codex` installs the MCP server plus
|
|
142
|
-
`integrations add-to claude` installs the MCP server plus
|
|
143
|
-
|
|
144
|
-
`integrations add-to gemini` installs the MCP server plus
|
|
145
|
-
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/`.
|
|
146
171
|
|
|
147
172
|
Additional native surfaces are installed where the client exposes one:
|
|
148
173
|
|
|
149
174
|
| Agent | Recall surface |
|
|
150
175
|
| --- | --- |
|
|
151
|
-
| Antigravity | MCP config in `~/.gemini/antigravity/mcp_config.json` plus
|
|
152
|
-
| Devin | MCP config in `~/.config/devin/config.json` plus `/recall`
|
|
153
|
-
| Cursor | MCP config in `~/.cursor/mcp.json` plus project files `.cursor/commands/recall.md` and `.cursor/rules/agentlog
|
|
154
|
-
| Cline | MCP config in `~/.cline/data/settings/cline_mcp_settings.json` plus `/recall.md`
|
|
155
|
-
| OpenCode | MCP config in `~/.config/opencode/opencode.json` plus `/recall`
|
|
156
|
-
| 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` |
|
|
157
182
|
|
|
158
183
|
The generated recall files use a skill-style layout with command tables,
|
|
159
184
|
workflow steps, query-selection guidance, archive layout notes, and
|
|
@@ -162,6 +187,14 @@ troubleshooting. They ask the agent to infer a focused search query, then call
|
|
|
162
187
|
access to `~/.agentlog`. Users can ask for context naturally, such as `/recall
|
|
163
188
|
the migration bug and update the test`.
|
|
164
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
|
+
|
|
165
198
|
Skill/command files can also be installed directly:
|
|
166
199
|
|
|
167
200
|
```sh
|
|
@@ -216,30 +249,43 @@ opened. Search runs as you type with a short debounce. The web endpoint uses a
|
|
|
216
249
|
warm compatible index when available, but it will not synchronously parse or
|
|
217
250
|
rebuild an obsolete index during an interactive query or scan every rendered
|
|
218
251
|
conversation as a fallback; rebuilds are left to `agentlog index rebuild` or
|
|
219
|
-
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
|
|
220
255
|
and compact button/input/select/sidebar patterns without requiring a frontend
|
|
221
256
|
build step. Archives still keep stable `path:<hash>` keys for folders without
|
|
222
257
|
git identity, but the UI displays the local path.
|
|
223
258
|
|
|
224
259
|
Provider filters use one stable order: OpenAI (`codex-cli`, `codex-desktop`,
|
|
225
|
-
`codex-sdk`, `chatgpt`), Anthropic (`claude`, `claude-code-desktop`, `claude-
|
|
260
|
+
`codex-sdk`, `chatgpt`), Anthropic (`claude`, `claude-code-desktop`, `claude-cowork`,
|
|
226
261
|
`claude-web`, `claude-sdk`), Google (`gemini-cli`, `antigravity`), Cognition
|
|
227
|
-
(`devin-cli`), then other local tools (`cursor`, `cline`, `opencode`,
|
|
262
|
+
(`devin-cli`, `devin-desktop`), then other local tools (`cursor`, `cline`, `opencode`,
|
|
228
263
|
`aider`).
|
|
229
264
|
|
|
230
265
|
The supervisor is agentlog's local background watcher. When it is running, it
|
|
231
|
-
|
|
232
|
-
|
|
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
|
|
233
278
|
starting it at login, agentlog does not install a login item. During setup,
|
|
234
279
|
uncheck `Start watcher at login` or run `agentlog init --no-autostart`; you can
|
|
235
280
|
still run `agentlog import --source all` for a one-time catch-up,
|
|
236
281
|
`agentlog watcher start` to watch for the current session, or
|
|
237
282
|
`agentlog watcher login enable` later. The default
|
|
238
283
|
watcher choices are Codex CLI, Codex Desktop, Claude Code CLI, Claude Code
|
|
239
|
-
Desktop, Claude
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
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`.
|
|
243
289
|
Cursor raw SQLite recovery is intentionally left to explicit imports such as
|
|
244
290
|
`agentlog import --source cursor --since all`; the supervisor handles
|
|
245
291
|
incremental Cursor logs going forward and prunes duplicate transcript snapshots.
|
|
@@ -284,6 +330,13 @@ after the initial backfill. If the watcher is allowed to start at login, init
|
|
|
284
330
|
also asks for a cloud autosync cadence; the supervisor then uploads new archive
|
|
285
331
|
changes on that interval whenever it is running.
|
|
286
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
|
+
|
|
287
340
|
Remote objects are namespaced by device so multiple machines can upload into
|
|
288
341
|
one bucket without overwriting each other's archive roots:
|
|
289
342
|
|
|
@@ -293,13 +346,20 @@ s3://<bucket>/agentlog/
|
|
|
293
346
|
work-laptop/
|
|
294
347
|
sessions/...
|
|
295
348
|
raw-sources/...
|
|
296
|
-
|
|
349
|
+
memory/...
|
|
350
|
+
telemetry/...
|
|
297
351
|
snapshots/
|
|
298
352
|
20260504T173000Z/
|
|
299
353
|
work-laptop/
|
|
300
354
|
sessions/...
|
|
301
355
|
```
|
|
302
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
|
+
|
|
303
363
|
In a terminal, `agentlog sync` asks you to choose the remote target, previews
|
|
304
364
|
the upload-only plan, and requires a confirmation phrase before writing. This is
|
|
305
365
|
intentional even when only one remote is configured, because multiple remotes
|
|
@@ -369,27 +429,64 @@ Web chat imports may also reference a shared raw export archive; ChatGPT
|
|
|
369
429
|
attachments remain preserved there and fresh imports render image/file cards in
|
|
370
430
|
the readable transcript when the export includes the file bytes.
|
|
371
431
|
|
|
372
|
-
`events.jsonl` uses the local `agentlog.events.
|
|
373
|
-
`session.started`, `prompt.submitted`, `response.generated`, `tool.called`,
|
|
374
|
-
`tool.completed
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
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.
|
|
386
459
|
|
|
387
460
|
Stats are import-time metadata, not viewer-time transcript repair. Archive
|
|
388
461
|
metadata stores message counts, user-message counts, token usage, and models for
|
|
389
462
|
each session, and the web stats view reads those fields directly. Token totals
|
|
390
463
|
include cache-read/cache-write tokens when providers report them, while the
|
|
391
464
|
stats payload and UI also keep input, output, cache, and reasoning sub-counts
|
|
392
|
-
separately when available.
|
|
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
|
|
393
490
|
provider total and split rollout `token_count` events into fresh input, cache
|
|
394
491
|
read, output, and reasoning metadata. Codex SDK and
|
|
395
492
|
Claude SDK batch jobs are kept out of primary activity totals, streaks, folder
|
|
@@ -398,7 +495,17 @@ as a separate SDK jobs section so high-volume automation does not drown out
|
|
|
398
495
|
interactive work. Cursor sessions
|
|
399
496
|
without provider-reported token usage can also carry separately labeled
|
|
400
497
|
`estimatedUsage`, which the stats view includes while reporting estimated token
|
|
401
|
-
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
|
|
402
509
|
`metadata.usage` on their native chat messages, split into non-assistant input,
|
|
403
510
|
assistant output, and Claude thinking output where the export provides separate
|
|
404
511
|
parts. During pre-v1 development, if those stats fields or parser semantics
|
|
@@ -441,6 +548,9 @@ being appended to assistant prose as synthetic `Grep(...)` text. Canonical
|
|
|
441
548
|
tool events also carry viewer-facing `category`, `categoryLabel`, `icon`,
|
|
442
549
|
`inputPreview`, and `target` fields so the web viewer can render Bash, edit,
|
|
443
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`.
|
|
444
554
|
|
|
445
555
|
Use `agentlog reset` to stop agentlog, disable autostart, and remove agentlog's
|
|
446
556
|
local home, config, state, cache, logs, and archive objects. Source application
|
|
@@ -456,12 +566,27 @@ agentlog update --yes
|
|
|
456
566
|
```
|
|
457
567
|
|
|
458
568
|
`agentlog update` preserves `config.json`, redaction settings, web account
|
|
459
|
-
labels, manually imported ChatGPT/Claude.ai archives,
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
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
|
|
465
590
|
`imports.defaultSinceDays` is not used by `agentlog update`. It does not touch
|
|
466
591
|
remote sync objects by default; use `agentlog sync replace` when the remote
|
|
467
592
|
should match the rebuilt local archive.
|
|
@@ -479,7 +604,7 @@ agentlog config set sync.intervalMinutes manual
|
|
|
479
604
|
agentlog config sources edit
|
|
480
605
|
agentlog config sources set codex-cli,cursor,cline
|
|
481
606
|
agentlog config sources add gemini-cli
|
|
482
|
-
agentlog config sources remove claude-
|
|
607
|
+
agentlog config sources remove claude-cowork
|
|
483
608
|
```
|
|
484
609
|
|
|
485
610
|
`agentlog config setup` reopens the preferences parts of init, including what
|
|
@@ -490,14 +615,15 @@ with the current config preselected.
|
|
|
490
615
|
|
|
491
616
|
## Import Windows
|
|
492
617
|
|
|
493
|
-
`agentlog init` starts with interactive setup: choose archive
|
|
494
|
-
choose the full local archive/cache path, choose whether the local
|
|
495
|
-
at login, and install recall commands or skills, then discover
|
|
496
|
-
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.
|
|
497
622
|
After backfill, init asks which sources the background watcher should keep
|
|
498
623
|
polling, then offers local OTel bridges for Claude Code, Gemini CLI, and Cline.
|
|
499
624
|
Local archive storage is always enabled; R2, S3, and custom remote sync targets
|
|
500
|
-
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
|
|
501
627
|
remote namespace. Discovery and import phases show progress bars while they scan
|
|
502
628
|
local stores.
|
|
503
629
|
|
|
@@ -517,17 +643,37 @@ Default init sources:
|
|
|
517
643
|
opt-in batch source
|
|
518
644
|
- Claude Code CLI transcripts from `~/.claude/projects`, including subagent
|
|
519
645
|
definition snapshots and `subagents/*.jsonl` runs imported as child sessions
|
|
520
|
-
- Claude Code Desktop metadata and Claude
|
|
646
|
+
- Claude Code Desktop metadata and Claude Cowork/local-agent sessions from
|
|
521
647
|
the Claude app data, shown as separate toggles
|
|
522
648
|
- Gemini CLI saved chats/checkpoints under `~/.gemini/tmp`, plus session/export JSONL stores with tool, usage, and checkpoint metadata
|
|
523
|
-
- Antigravity task/plan/walkthrough artifacts under `~/.gemini/antigravity/brain`, plus partial trajectory summaries from Antigravity app state when no readable artifacts exist
|
|
524
|
-
-
|
|
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`
|
|
525
659
|
- Cursor chats from older workspace `state.vscdb` SQLite stores and global
|
|
526
660
|
`cursorDiskKV` Composer/Agent rows, including `aiService` prompt/generation
|
|
527
661
|
fallbacks, raw SQLite salvage from Cursor global/workspace backups and WAL
|
|
528
662
|
files, conservative matching of raw assistant/tool companion fragments back
|
|
529
663
|
to same-project workspace sessions, duplicate prefix pruning, and newer
|
|
530
|
-
`~/.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
|
|
531
677
|
- Cline task folders from VS Code/JetBrains globalStorage, including checkpoint diffs when present
|
|
532
678
|
- OpenCode CLI/core SQLite and project JSON storage under `~/.local/share/opencode`, plus OpenCode Desktop app storage and Web sessions when present
|
|
533
679
|
- Aider repo-local `.aider.chat.history.md` transcripts, with `.aider.llm.history`
|
|
@@ -535,14 +681,21 @@ Default init sources:
|
|
|
535
681
|
|
|
536
682
|
The Claude Code desktop registry mostly stores metadata pointing back to the
|
|
537
683
|
standard Claude Code transcript, so agentlog imports the transcript when it exists
|
|
538
|
-
and only imports Claude
|
|
684
|
+
and only imports Claude Cowork sessions that contain actual prompt
|
|
539
685
|
content.
|
|
540
686
|
|
|
541
|
-
Windsurf local
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
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
|
|
546
699
|
folder, import the folder directly, for example
|
|
547
700
|
`agentlog import windsurf ~/windsurf-cascade-export`.
|
|
548
701
|
|
|
@@ -564,7 +717,7 @@ The same choices can be run directly:
|
|
|
564
717
|
|
|
565
718
|
```sh
|
|
566
719
|
agentlog import --source all --since all
|
|
567
|
-
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
|
|
568
721
|
agentlog import --source codex-desktop --since 90d
|
|
569
722
|
agentlog import --source codex-cli --since 30d
|
|
570
723
|
agentlog import --source codex-sdk --since all
|
|
@@ -575,10 +728,11 @@ agentlog import chatgpt "~/Downloads/OpenAI-export/User Online Activity" --usern
|
|
|
575
728
|
agentlog import claude-web ~/Downloads/claude-export --username you --display-name "Personal Claude"
|
|
576
729
|
agentlog import --source claude --since 30d
|
|
577
730
|
agentlog import --source claude-code-desktop --since all
|
|
578
|
-
agentlog import --source claude-
|
|
731
|
+
agentlog import --source claude-cowork --since all
|
|
579
732
|
agentlog import --source gemini-cli --since all
|
|
580
733
|
agentlog import --source antigravity --since all
|
|
581
734
|
agentlog import --source devin-cli --since all
|
|
735
|
+
agentlog import --source devin-desktop --since all
|
|
582
736
|
agentlog import --source cursor --since all
|
|
583
737
|
agentlog import --source cursor --since all --explain-skips
|
|
584
738
|
agentlog import --source cline --since all
|