agentel 0.2.5 → 0.2.6
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 +35 -22
- package/docs/code-reference.md +19 -10
- package/docs/history-source-handling.md +116 -52
- package/docs/release.md +1 -1
- package/package.json +1 -1
- package/src/archive.js +1 -1
- package/src/canonical-events.js +74 -25
- package/src/cli.js +760 -93
- package/src/doctor.js +2 -0
- package/src/importers/claude.js +309 -11
- package/src/importers/providers.js +22 -0
- package/src/importers.js +403 -14
- package/src/parser-versions.js +1 -0
- package/src/search.js +1 -0
- package/src/sources.js +1 -0
- package/src/web-export-instructions.js +77 -0
package/README.md
CHANGED
|
@@ -9,8 +9,8 @@ Core capabilities:
|
|
|
9
9
|
- markdown-primary, redacted local archive under `~/.agentlog/data/agentlog/`
|
|
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
|
-
- Codex CLI, Codex Desktop, ChatGPT export, Claude Code CLI,
|
|
13
|
-
Desktop, Claude Workspace, Claude.ai export, Gemini CLI, Antigravity,
|
|
12
|
+
- Codex CLI, Codex Desktop, Codex SDK jobs, ChatGPT export, Claude Code CLI,
|
|
13
|
+
Claude Code Desktop, Claude Workspace, Claude.ai export, Gemini CLI, Antigravity,
|
|
14
14
|
Devin CLI, and Cursor imports
|
|
15
15
|
- event-first `agentlog history` search with markdown/transcript fallback
|
|
16
16
|
- `agentlog-recall` MCP stdio server exposing `search_past_sessions`
|
|
@@ -41,7 +41,7 @@ ref for repeatable installs:
|
|
|
41
41
|
```sh
|
|
42
42
|
npm install -g brianlzhou/agentlog
|
|
43
43
|
# or
|
|
44
|
-
npm install -g brianlzhou/agentlog#v0.2.
|
|
44
|
+
npm install -g brianlzhou/agentlog#v0.2.6
|
|
45
45
|
agentlog init
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -77,6 +77,8 @@ npm test
|
|
|
77
77
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js init --yes --skip-import --no-autostart --no-claude --no-recall --no-telemetry
|
|
78
78
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source codex-cli --since 30d
|
|
79
79
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source codex-desktop --since all
|
|
80
|
+
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import chatgpt
|
|
81
|
+
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import claude-web
|
|
80
82
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import chatgpt ~/Downloads/chatgpt-export.zip --username you@example.com
|
|
81
83
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import claude-web ~/Downloads/claude-export --username you --display-name "Personal Claude"
|
|
82
84
|
AGENTLOG_HOME=/tmp/agentlog-demo node ./bin/agentlog.js import --source claude --since 30d
|
|
@@ -219,7 +221,7 @@ build step. Archives still keep stable `path:<hash>` keys for folders without
|
|
|
219
221
|
git identity, but the UI displays the local path.
|
|
220
222
|
|
|
221
223
|
Provider filters use one stable order: OpenAI (`codex-cli`, `codex-desktop`,
|
|
222
|
-
`chatgpt`), Anthropic (`claude`, `claude-code-desktop`, `claude-workspace`,
|
|
224
|
+
`codex-sdk`, `chatgpt`), Anthropic (`claude`, `claude-code-desktop`, `claude-workspace`,
|
|
223
225
|
`claude-web`, `claude-sdk`), Google (`gemini-cli`, `antigravity`), Cognition
|
|
224
226
|
(`devin-cli`), then other local tools (`cursor`, `cline`, `opencode`,
|
|
225
227
|
`aider`).
|
|
@@ -363,22 +365,28 @@ For large multi-session stores such as Cursor SQLite, the per-session raw
|
|
|
363
365
|
manifest may reference one shared copy under `raw-sources/` instead of copying
|
|
364
366
|
the same database into every session folder.
|
|
365
367
|
|
|
366
|
-
`events.jsonl` uses the local `agentlog.events.
|
|
368
|
+
`events.jsonl` uses the local `agentlog.events.v2` canonical event shape:
|
|
367
369
|
`session.started`, `prompt.submitted`, `response.generated`, `tool.called`, and
|
|
368
|
-
`tool.completed
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
370
|
+
`tool.completed`; completed tool events link back to the matching call when the
|
|
371
|
+
source exposes stable ids or matching names. Parser versions are stamped by
|
|
372
|
+
source type so importer output changes can trigger reimport with a new
|
|
373
|
+
fingerprint. Recall/search builds a keyword index over event text first and
|
|
374
|
+
falls back to transcript/markdown for legacy archives without events. The local
|
|
375
|
+
search index stores compact term postings for CLI compatibility plus a SQLite
|
|
376
|
+
FTS5 sidecar for fast web queries; when either index format changes,
|
|
377
|
+
`agentlog history` and `agentlog index` rebuild it from archived
|
|
378
|
+
transcripts/events without a full source
|
|
375
379
|
reimport. The web viewer avoids doing that rebuild on a keystroke so a large
|
|
376
380
|
old index, or a full-archive Markdown fallback, cannot block interactive
|
|
377
381
|
search.
|
|
378
382
|
|
|
379
383
|
Stats are import-time metadata, not viewer-time transcript repair. Archive
|
|
380
384
|
metadata stores message counts, user-message counts, token usage, and models for
|
|
381
|
-
each session, and the web stats view reads those fields directly.
|
|
385
|
+
each session, and the web stats view reads those fields directly. Codex SDK and
|
|
386
|
+
Claude SDK batch jobs are kept out of primary activity totals, streaks, folder
|
|
387
|
+
rankings, and provider/model charts; the stats payload and web view expose them
|
|
388
|
+
as a separate SDK jobs section so high-volume automation does not drown out
|
|
389
|
+
interactive work. Cursor sessions
|
|
382
390
|
without provider-reported token usage can also carry separately labeled
|
|
383
391
|
`estimatedUsage`, which the stats view includes while reporting estimated token
|
|
384
392
|
coverage. ChatGPT and Claude.ai exports without provider usage get estimated
|
|
@@ -388,10 +396,12 @@ parts. During pre-v1 development, if those stats fields or parser semantics
|
|
|
388
396
|
change, rebuild the local archive with
|
|
389
397
|
`agentlog update --yes --since all`.
|
|
390
398
|
|
|
391
|
-
ChatGPT and Claude.ai
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
399
|
+
ChatGPT and Claude.ai are manual export providers. Run `agentlog import chatgpt`
|
|
400
|
+
or `agentlog import claude-web` for current export instructions; after the
|
|
401
|
+
provider emails a download link, pass the official `.zip`, unzipped export
|
|
402
|
+
folder, or direct JSON file back to agentlog. These imports are stored as local
|
|
403
|
+
scoped web-chat archives and displayed through virtual conversation roots such
|
|
404
|
+
as `[chatgpt]conversations/<account-id>` and
|
|
395
405
|
`[claude]conversations/<account-id>/<project>`. The importer records account
|
|
396
406
|
metadata in `~/.agentlog/state/web-accounts.json`; use
|
|
397
407
|
`agentlog import accounts list` to inspect mappings and
|
|
@@ -471,15 +481,15 @@ local stores.
|
|
|
471
481
|
After discovery, init offers a checkbox-style source picker. Rows marked `[x]`
|
|
472
482
|
are selected; type one or more row numbers, such as `1 3 8`, to toggle sources
|
|
473
483
|
on or off, then press Enter with no input to accept the current selection.
|
|
474
|
-
Claude SDK jobs are shown as
|
|
475
|
-
can exceed interactive sessions. The selected sources are
|
|
476
|
-
used by later `agentlog import --source all` runs unless
|
|
477
|
-
explicitly.
|
|
484
|
+
Codex SDK jobs and Claude SDK jobs are shown as separate opt-in sources because
|
|
485
|
+
batch SDK traffic can exceed interactive sessions. The selected sources are
|
|
486
|
+
saved in config and used by later `agentlog import --source all` runs unless
|
|
487
|
+
`--sources` is provided explicitly.
|
|
478
488
|
|
|
479
489
|
Default init sources:
|
|
480
490
|
|
|
481
491
|
- Codex CLI sessions and Codex Desktop sessions from Codex state, shown as
|
|
482
|
-
separate toggles
|
|
492
|
+
separate toggles; Codex SDK jobs are available as an opt-in batch source
|
|
483
493
|
- Claude Code CLI transcripts from `~/.claude/projects`
|
|
484
494
|
- Claude Code Desktop metadata and Claude Workspace/local-agent sessions from
|
|
485
495
|
the Claude app data, shown as separate toggles
|
|
@@ -531,6 +541,9 @@ agentlog import --source all --since all
|
|
|
531
541
|
agentlog import --sources codex-cli,codex-desktop,claude,claude-code-desktop,claude-workspace,gemini-cli,antigravity,devin-cli,cursor,cline,opencode-cli,opencode-desktop,opencode-web,aider --since all
|
|
532
542
|
agentlog import --source codex-desktop --since 90d
|
|
533
543
|
agentlog import --source codex-cli --since 30d
|
|
544
|
+
agentlog import --source codex-sdk --since all
|
|
545
|
+
agentlog import chatgpt
|
|
546
|
+
agentlog import claude-web
|
|
534
547
|
agentlog import chatgpt ~/Downloads/chatgpt-export.zip --username you@example.com
|
|
535
548
|
agentlog import claude-web ~/Downloads/claude-export --username you --display-name "Personal Claude"
|
|
536
549
|
agentlog import --source claude --since 30d
|
package/docs/code-reference.md
CHANGED
|
@@ -99,11 +99,12 @@ low-signal filtering.
|
|
|
99
99
|
Exports:
|
|
100
100
|
|
|
101
101
|
- `CANONICAL_EVENT_SCHEMA_VERSION`: current event schema id,
|
|
102
|
-
`agentlog.events.
|
|
102
|
+
`agentlog.events.v2`.
|
|
103
103
|
- `EVENT_KINDS`: constants for `session.started`, `prompt.submitted`,
|
|
104
104
|
`response.generated`, `tool.called`, and `tool.completed`.
|
|
105
105
|
- `normalizeSessionEvents(session, messages, options)`: maps transcript
|
|
106
|
-
messages into canonical events.
|
|
106
|
+
messages into canonical events and links `tool.completed` events to matching
|
|
107
|
+
`tool.called` parents.
|
|
107
108
|
- `messageToCanonicalEvents(message, session, options)`: maps one message into
|
|
108
109
|
zero or more canonical events.
|
|
109
110
|
- `stableEventId(sessionId, messageIndex, kind, ordinal, content)`: creates a
|
|
@@ -219,7 +220,9 @@ Command handlers:
|
|
|
219
220
|
- `integrationsCommand(args, env)`: canonical integration command group for
|
|
220
221
|
recall surfaces.
|
|
221
222
|
- `mcpCommand(args, flags, env)`: canonical MCP server command group.
|
|
222
|
-
- `importCommand(args, flags, env)`: imports local sources
|
|
223
|
+
- `importCommand(args, flags, env)`: imports local sources and downloaded web
|
|
224
|
+
export files, or prints manual ChatGPT/Claude.ai export instructions when no
|
|
225
|
+
web export path is supplied.
|
|
223
226
|
- `recallCommand(args, env)`: handles recall server/install/show/reindex flows.
|
|
224
227
|
- `showRecallSession(sessionId, env)`: prints a session through the recall path.
|
|
225
228
|
- `showCommand(sessionId, flags, env)`: prints, opens, or JSON-serializes a
|
|
@@ -555,9 +558,9 @@ Import dispatch and generic providers:
|
|
|
555
558
|
Desktop/Workspace metadata and audit sessions.
|
|
556
559
|
- `matchesImportedSessionRepo(session, repo, wantedRepos)`: checks repo filters
|
|
557
560
|
for sessions with repo or scope attribution.
|
|
558
|
-
- `importCodexProvider(provider, since, options, env)`: imports Codex CLI
|
|
559
|
-
Desktop threads from state DB, rollout files, and Codex
|
|
560
|
-
summaries when available.
|
|
561
|
+
- `importCodexProvider(provider, since, options, env)`: imports Codex CLI,
|
|
562
|
+
Desktop, or opt-in exec/SDK threads from state DB, rollout files, and Codex
|
|
563
|
+
supplementary summaries when available.
|
|
561
564
|
- `importCursorProvider(provider, since, options, env)`: imports Cursor SQLite
|
|
562
565
|
and Cursor project transcript sessions; supervisor calls set
|
|
563
566
|
`cursorRecovery=false` to skip raw SQLite salvage/backfill.
|
|
@@ -581,7 +584,10 @@ Generic parsing helpers:
|
|
|
581
584
|
shapes.
|
|
582
585
|
- `extractClaudeMessagesFromEvent(event, provider, context)`: Claude Code/SDK
|
|
583
586
|
JSONL parser for text, thinking, tool calls/results, model, request id, and
|
|
584
|
-
usage metadata, including
|
|
587
|
+
usage metadata, including lineage fields, agent/slug/tool-use ids, MCP
|
|
588
|
+
structured content, API error metadata, richer Claude usage extras, Remote
|
|
589
|
+
Control lifecycle context messages, tool result name repair from prior
|
|
590
|
+
`tool_use` ids, and `apply_patch` shell calls promoted to edit diffs.
|
|
585
591
|
- `updateClaudeParseContext(event, provider, context)`: keeps Claude model,
|
|
586
592
|
session, and cwd context while parsing JSONL records.
|
|
587
593
|
- `extractCodexSummaryMessage(event, provider)`: extracts readable Codex
|
|
@@ -599,6 +605,8 @@ Generic parsing helpers:
|
|
|
599
605
|
summary for tool-call metadata.
|
|
600
606
|
- `normalizeWebConversations(provider, data)`: normalizes web export
|
|
601
607
|
conversations.
|
|
608
|
+
- `webExportInstructions(source)`: returns the provider-specific manual export
|
|
609
|
+
instruction payload used by ChatGPT and Claude.ai import commands.
|
|
602
610
|
- `chatgptMessages(conversation)`: parses ChatGPT export conversation nodes
|
|
603
611
|
and attaches provider or estimated message usage.
|
|
604
612
|
- `claudeMessages(conversation)`: parses Claude.ai export messages, separating
|
|
@@ -610,8 +618,8 @@ Discovery and summary helpers:
|
|
|
610
618
|
|
|
611
619
|
- `summarizeFiles(files)`: counts files, projects, and oldest mtime.
|
|
612
620
|
- `summarizeCodex(env, source)`: summary wrapper for Codex threads.
|
|
613
|
-
- `summarizeCodexThreads(allThreads, source)`: summarizes Codex CLI/Desktop
|
|
614
|
-
counts.
|
|
621
|
+
- `summarizeCodexThreads(allThreads, source)`: summarizes Codex CLI/Desktop or
|
|
622
|
+
opt-in exec/SDK counts.
|
|
615
623
|
- `summarizeClaude()`: summarizes Claude Code CLI files.
|
|
616
624
|
- `summarizeClaudeScan(scan)`: formats Claude scan results.
|
|
617
625
|
- `summarizeClaudeSdk()`: summarizes Claude SDK job files.
|
|
@@ -643,7 +651,8 @@ Source location and file helpers:
|
|
|
643
651
|
- `scanClaudeProjectFiles(options)`: scans and classifies Claude project JSONL.
|
|
644
652
|
- `isClaudeConversationFile(file)`: tests whether a Claude file is interactive.
|
|
645
653
|
- `classifyClaudeFile(file)`: classifies Claude JSONL as conversation, SDK job,
|
|
646
|
-
or other
|
|
654
|
+
or other; Remote Control `sdk-cli` transcripts with Remote Control deferred
|
|
655
|
+
tool names are kept with interactive Claude Code conversations.
|
|
647
656
|
- `readInitialLines(file, maxLines, maxBytes)`: reads a bounded prefix of a
|
|
648
657
|
large JSONL file.
|
|
649
658
|
- `readCodexThreads(env)`: queries Codex state DB for top-level threads and
|
|
@@ -77,6 +77,13 @@ without a specific archived model group as `claude-unknown`, because the model
|
|
|
77
77
|
family is still known. Favorite-model stats still use known archived model
|
|
78
78
|
metadata.
|
|
79
79
|
|
|
80
|
+
SDK source types (`codex-sdk-history` and `claude-sdk-history`) are excluded from
|
|
81
|
+
the primary stats totals, daily activity, streaks, folder rankings, and
|
|
82
|
+
provider/model/company charts by default. The stats payload still exposes their
|
|
83
|
+
own SDK aggregate fields plus `split_stats.sdk`, and the web view renders an SDK
|
|
84
|
+
jobs card and heatmap. This keeps high-volume batch automation searchable and
|
|
85
|
+
auditable without letting it swamp interactive usage stats.
|
|
86
|
+
|
|
80
87
|
Cursor sessions that still lack provider-reported usage get a separate
|
|
81
88
|
`estimatedUsage` metadata field instead of synthetic `usage`. The estimate uses
|
|
82
89
|
empirical per-assistant-turn Cursor rates by model family, with visible
|
|
@@ -130,7 +137,7 @@ agentlog does not blindly copy entire source directories.
|
|
|
130
137
|
## Canonical Events
|
|
131
138
|
|
|
132
139
|
`events.jsonl` is the provider-independent archive/search substrate. It uses
|
|
133
|
-
schema version `agentlog.events.
|
|
140
|
+
schema version `agentlog.events.v2` and these event kinds:
|
|
134
141
|
|
|
135
142
|
- `session.started`
|
|
136
143
|
- `prompt.submitted`
|
|
@@ -150,9 +157,14 @@ events add viewer-facing display metadata:
|
|
|
150
157
|
- `metadata.toolCalls[]`: `id`, `name`, `displayName`, `category`, `title`,
|
|
151
158
|
`status`, `argument`, `rawInputSummary`, `inputPreview`, `target`, `icon`,
|
|
152
159
|
`categoryLabel`, and `provider`.
|
|
153
|
-
- `metadata.toolResult`: `provider`, `kind`, `title`, `summary`,
|
|
154
|
-
`lineCount`, `collapsed`, `category`, `categoryLabel`, `icon`, and
|
|
155
|
-
`status`.
|
|
160
|
+
- `metadata.toolResult`: `id`, `name`, `provider`, `kind`, `title`, `summary`,
|
|
161
|
+
`output`, `lineCount`, `collapsed`, `category`, `categoryLabel`, `icon`, and
|
|
162
|
+
optional `status`.
|
|
163
|
+
|
|
164
|
+
`tool.completed.parentEventId` links to the matching `tool.called` event when a
|
|
165
|
+
provider exposes stable ids or matching tool names. When those are absent,
|
|
166
|
+
canonical event derivation falls back to the next unmatched tool call so streams
|
|
167
|
+
such as Devin CLI still preserve the call/result relationship.
|
|
156
168
|
|
|
157
169
|
The viewer reads canonical events or normalized metadata first. Text patterns
|
|
158
170
|
such as `Grep(...)` are legacy fallback only.
|
|
@@ -183,35 +195,36 @@ package-prefixed scheme.
|
|
|
183
195
|
|
|
184
196
|
| Source type | Version |
|
|
185
197
|
| --- | --- |
|
|
186
|
-
| `codex-cli-history` | `0.2.
|
|
187
|
-
| `codex-desktop-history` | `0.2.
|
|
188
|
-
| `
|
|
189
|
-
| `
|
|
190
|
-
| `claude-
|
|
191
|
-
| `claude-
|
|
192
|
-
| `
|
|
193
|
-
| `cursor-
|
|
194
|
-
| `cursor-
|
|
195
|
-
| `cursor-
|
|
196
|
-
| `
|
|
197
|
-
| `
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
| `opencode-cli-
|
|
201
|
-
| `opencode-
|
|
202
|
-
| `opencode-desktop-
|
|
203
|
-
| `opencode-
|
|
204
|
-
| `opencode-history` | `0.2.
|
|
205
|
-
| `opencode-
|
|
206
|
-
| `
|
|
207
|
-
| `
|
|
208
|
-
| `antigravity-
|
|
209
|
-
| `
|
|
210
|
-
| `
|
|
211
|
-
| `
|
|
212
|
-
| `
|
|
213
|
-
| `claude-web-
|
|
214
|
-
| `
|
|
198
|
+
| `codex-cli-history` | `0.2.6.0` |
|
|
199
|
+
| `codex-desktop-history` | `0.2.6.0` |
|
|
200
|
+
| `codex-sdk-history` | `0.2.6.0` |
|
|
201
|
+
| `cli-history` | `0.2.6.0` |
|
|
202
|
+
| `claude-sdk-history` | `0.2.6.0` |
|
|
203
|
+
| `claude-code-desktop-metadata` | `0.2.6.0` |
|
|
204
|
+
| `claude-workspace-desktop` | `0.2.6.0` |
|
|
205
|
+
| `cursor-workspace-sqlite` | `0.2.6.0` |
|
|
206
|
+
| `cursor-global-sqlite` | `0.2.6.0` |
|
|
207
|
+
| `cursor-raw-sqlite-salvage` | `0.2.6.0` |
|
|
208
|
+
| `cursor-agent-transcripts` | `0.2.6.0` |
|
|
209
|
+
| `devin-cli-history` | `0.2.6.0` |
|
|
210
|
+
| `gemini-cli-history` | `0.2.6.0` |
|
|
211
|
+
| `cline-task-history` | `0.2.6.0` |
|
|
212
|
+
| `opencode-cli-history` | `0.2.6.0` |
|
|
213
|
+
| `opencode-cli-sqlite-history` | `0.2.6.0` |
|
|
214
|
+
| `opencode-desktop-history` | `0.2.6.0` |
|
|
215
|
+
| `opencode-desktop-sqlite-history` | `0.2.6.0` |
|
|
216
|
+
| `opencode-web-sqlite-history` | `0.2.6.0` |
|
|
217
|
+
| `opencode-history` | `0.2.6.0` |
|
|
218
|
+
| `opencode-sqlite-history` | `0.2.6.0` |
|
|
219
|
+
| `aider-chat-history` | `0.2.6.0` |
|
|
220
|
+
| `antigravity-history` | `0.2.6.0` |
|
|
221
|
+
| `antigravity-trajectory-summary` | `0.2.6.0` |
|
|
222
|
+
| `windsurf-trajectory-export` | `0.2.6.0` |
|
|
223
|
+
| `web-chat-export` | `0.2.6.0` |
|
|
224
|
+
| `chatgpt-export` | `0.2.6.0` |
|
|
225
|
+
| `claude-web-export` | `0.2.6.0` |
|
|
226
|
+
| `claude-web-memory` | `0.2.6.0` |
|
|
227
|
+
| `import` | `0.2.6.0` |
|
|
215
228
|
|
|
216
229
|
`cursor-sqlite-history` and `antigravity-brain` are compatibility aliases for
|
|
217
230
|
older labels. Fingerprints include the parser version prefix, so changing the
|
|
@@ -249,7 +262,7 @@ real-world query should reliably find a representative archived session.
|
|
|
249
262
|
|
|
250
263
|
The setup UI, import defaults, and history source filters use this grouped order:
|
|
251
264
|
|
|
252
|
-
1. OpenAI: Codex CLI, Codex Desktop, ChatGPT
|
|
265
|
+
1. OpenAI: Codex CLI, Codex Desktop, Codex SDK jobs, ChatGPT
|
|
253
266
|
2. Anthropic: Claude Code CLI, Claude Code Desktop, Claude Workspace,
|
|
254
267
|
Claude.ai, Claude SDK jobs
|
|
255
268
|
3. Google: Gemini CLI, Antigravity
|
|
@@ -260,10 +273,10 @@ The setup UI, import defaults, and history source filters use this grouped order
|
|
|
260
273
|
`src/sources.js`: `codex-cli`, `codex-desktop`, `claude`,
|
|
261
274
|
`claude-code-desktop`, `claude-workspace`, `gemini-cli`, `antigravity`,
|
|
262
275
|
`devin-cli`, `cursor`, `cline`, `opencode-cli`, `opencode-desktop`,
|
|
263
|
-
`opencode-web`, `aider`. Claude SDK jobs are
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
276
|
+
`opencode-web`, `aider`. Codex SDK jobs and Claude SDK jobs are intentionally
|
|
277
|
+
opt-in. Windsurf local cache scanning is disabled for now because current
|
|
278
|
+
Cascade transcripts are encrypted binary stores, but downloaded trajectory
|
|
279
|
+
Markdown exports are importable with an explicit path.
|
|
267
280
|
|
|
268
281
|
The background watcher polls the watcher source list selected near the end of
|
|
269
282
|
`agentlog init`. New configs still support `imports.autoDiscoverSources=true`,
|
|
@@ -327,6 +340,7 @@ stable local command for the archived source.
|
|
|
327
340
|
| --- | --- | --- |
|
|
328
341
|
| Codex CLI | `codex resume <session-id>` | Uses the Codex thread id from `~/.codex/state_5.sqlite`. |
|
|
329
342
|
| Codex Desktop | `codex resume <session-id>` | Uses the same Codex thread id. Codex decides whether the resumed session opens in the terminal flow. |
|
|
343
|
+
| Codex SDK jobs | No interactive resume command. | These are Codex `exec`/SDK-style batch runs. |
|
|
330
344
|
| Claude Code CLI | `claude -r <session-id>` | Uses the Claude Code JSONL session id. |
|
|
331
345
|
| Devin CLI | `devin -r <session-id>` | agentlog archives these as `devin-<session-id>` and strips that prefix for the resume command, for example `devin -r selective-lotus`. |
|
|
332
346
|
| Claude Code Desktop | No stable local resume command known. | Use Claude's own desktop/history surface or `agentlog show <session-id>`. |
|
|
@@ -389,17 +403,38 @@ rollout parser as Codex CLI. The only distinction is the `threads.source` value.
|
|
|
389
403
|
This is why the web source dropdown can split Codex CLI and Codex Desktop even
|
|
390
404
|
though both archive under the same `codex` provider.
|
|
391
405
|
|
|
406
|
+
## Codex SDK Jobs
|
|
407
|
+
|
|
408
|
+
- Import selector: `codex-sdk`
|
|
409
|
+
- Provider: `codex`
|
|
410
|
+
- Source type: `codex-sdk-history`
|
|
411
|
+
- Primary store: `~/.codex/state_5.sqlite`
|
|
412
|
+
- Session files: rollout paths referenced by the `threads` table
|
|
413
|
+
- Source split: `threads.source = "exec"`
|
|
414
|
+
- Overrides: same as Codex CLI
|
|
415
|
+
|
|
416
|
+
Codex SDK jobs use the same rollout parser as Codex CLI/Desktop, but they are
|
|
417
|
+
shown as a separate opt-in source because `codex exec` batch traffic can produce
|
|
418
|
+
hundreds or thousands of short prompt/response sessions. They are useful for
|
|
419
|
+
programmatic jobs such as Siftly bookmark enrichment and Polymarket vote
|
|
420
|
+
labeling, but should not be silently mixed into the default interactive import.
|
|
421
|
+
When imported, these sessions remain searchable, but the stats view keeps them
|
|
422
|
+
in the separate SDK jobs aggregate instead of primary interactive totals.
|
|
423
|
+
|
|
392
424
|
## ChatGPT Export
|
|
393
425
|
|
|
394
|
-
-
|
|
426
|
+
- Instructions command: `agentlog import chatgpt`
|
|
427
|
+
- Import command: `agentlog import chatgpt <path> [--scope local|team]`
|
|
395
428
|
- Provider: `chatgpt`
|
|
396
429
|
- Source type: `chatgpt-export`
|
|
397
430
|
- Source file: ChatGPT JSON export or ZIP containing a JSON export
|
|
398
431
|
- Default archive scope: `chatgpt`
|
|
399
432
|
|
|
400
|
-
ChatGPT is not scanned automatically from a desktop app. The
|
|
401
|
-
|
|
402
|
-
|
|
433
|
+
ChatGPT is not scanned automatically from a desktop app. The import command
|
|
434
|
+
without a path prints official export instructions for OpenAI's Privacy Portal
|
|
435
|
+
and ChatGPT Data Controls. The user then provides the downloaded official export
|
|
436
|
+
file. ZIP imports prefer `conversations.json`, then another JSON file with
|
|
437
|
+
`chat` in the name, then the first JSON file in the ZIP.
|
|
403
438
|
|
|
404
439
|
For OpenAI export mappings, agentlog reads each node message, normalizes
|
|
405
440
|
`author.role`, extracts `content.parts`, and uses `create_time` or `update_time`
|
|
@@ -419,15 +454,40 @@ usage as estimated.
|
|
|
419
454
|
Claude Code CLI files are discovered under `~/.claude/projects`. Each JSONL file
|
|
420
455
|
is classified before import. A file is treated as an interactive conversation
|
|
421
456
|
when the initial records include `type = "user"` or `type = "assistant"` with a
|
|
422
|
-
`message` object and no `entrypoint = "sdk-cli"`.
|
|
457
|
+
`message` object and no `entrypoint = "sdk-cli"`. Remote Control transcripts
|
|
458
|
+
also use `entrypoint = "sdk-cli"`, but include a deferred tool delta with
|
|
459
|
+
Remote Control tool names such as `RemoteTrigger`, `TaskOutput`, `TaskStop`,
|
|
460
|
+
`PushNotification`, `AskUserQuestion`, task tools, cron tools, or monitor tools;
|
|
461
|
+
those are imported as interactive Claude Code conversations rather than SDK
|
|
462
|
+
jobs.
|
|
423
463
|
|
|
424
464
|
The Claude-specific JSONL parser extracts session ids, titles, cwd fields,
|
|
425
465
|
message roles, text content, timestamps, assistant thinking summaries,
|
|
426
466
|
`tool_use` calls, `tool_result` outputs, model, request id, stop status, and
|
|
427
|
-
token usage.
|
|
467
|
+
token usage. It also preserves Claude JSONL lineage fields (`uuid`,
|
|
468
|
+
`parentUuid`, `logicalParentUuid`, `leafUuid`, `promptId`,
|
|
469
|
+
`sourceToolAssistantUUID`, `sourceToolUseID`, `parentToolUseID`, `toolUseID`,
|
|
470
|
+
`agentId`, `slug`, `isSidechain`), execution metadata (`entrypoint`,
|
|
471
|
+
`userType`, Claude Code version, git branch, permission mode), attribution skill,
|
|
472
|
+
MCP structured-content metadata, API error metadata, Remote Control
|
|
473
|
+
queue/tool-surface summaries, and richer usage extras such as service tier,
|
|
474
|
+
speed, server-tool usage, and cache creation detail.
|
|
475
|
+
Tool calls and results are normalized into the shared
|
|
428
476
|
`metadata.toolCalls[]`, `metadata.toolResult`, and `metadata.usage` shapes.
|
|
429
477
|
Bash or shell tool calls that invoke `apply_patch` are reclassified as edit
|
|
430
478
|
calls and retain the patch text under `arguments.diff`.
|
|
479
|
+
Tool results are matched back to prior `tool_use` ids when possible so result
|
|
480
|
+
cards inherit the tool name instead of displaying only the raw tool-use id.
|
|
481
|
+
Remote Control lifecycle records are also converted into provider-generated
|
|
482
|
+
system/context messages for queue operations, deferred tool catalog changes,
|
|
483
|
+
MCP instruction updates, skill listings, nested memories, queued commands,
|
|
484
|
+
command permissions, edited text files, date changes, max-turn notices,
|
|
485
|
+
file-history snapshots, hook progress, and stop-hook summaries. These messages
|
|
486
|
+
carry compact metadata and previews rather than copying large attachment bodies;
|
|
487
|
+
the byte-perfect source records remain in the raw archive. Session summaries
|
|
488
|
+
also include Remote Control attachment counts/details, available tool names,
|
|
489
|
+
MCP server names, queue timing/content, agent ids, slugs, API error counts, and
|
|
490
|
+
MCP structured-content counts.
|
|
431
491
|
|
|
432
492
|
When the Claude desktop app has a matching
|
|
433
493
|
`~/Library/Application Support/Claude/claude-code-sessions/**/local_*.json`
|
|
@@ -436,7 +496,8 @@ record with `cliSessionId`, the CLI importer uses that sidecar's generated
|
|
|
436
496
|
archive storage. This is the source of Claude's readable auto names such as
|
|
437
497
|
"Fix cursor import paths handling"; the transcript JSONL itself may only contain
|
|
438
498
|
the user prompt ("Can you fix these?"). Without a sidecar title, the importer
|
|
439
|
-
|
|
499
|
+
uses Claude JSONL `ai-title` events when present, then falls back to the first
|
|
500
|
+
real user prompt. Repo attribution uses sidecar
|
|
440
501
|
`originCwd` when available, otherwise the parsed `cwd`; Claude-created
|
|
441
502
|
`.claude/worktrees/<name>` directories are attributed to their parent project
|
|
442
503
|
when that project still exists, even if the temporary worktree has been deleted.
|
|
@@ -468,7 +529,8 @@ sessions. agentlog separates them by scanning the initial JSONL records for
|
|
|
468
529
|
batch runs can be much higher volume than interactive sessions.
|
|
469
530
|
|
|
470
531
|
When imported, SDK jobs use the same Claude-specific JSONL parser as Claude Code
|
|
471
|
-
CLI but archive under `claude_sdk`.
|
|
532
|
+
CLI but archive under `claude_sdk`. Stats keep them in the separate SDK jobs
|
|
533
|
+
aggregate instead of primary interactive totals.
|
|
472
534
|
|
|
473
535
|
## Claude Code Desktop
|
|
474
536
|
|
|
@@ -520,16 +582,18 @@ uncategorized.
|
|
|
520
582
|
|
|
521
583
|
## Claude.ai Export
|
|
522
584
|
|
|
523
|
-
-
|
|
585
|
+
- Instructions command: `agentlog import claude-web`
|
|
586
|
+
- Import command: `agentlog import claude-web <path> [--scope local|team]`
|
|
524
587
|
- Provider: `claude_web`
|
|
525
588
|
- Source types: `claude-web-export`, `claude-web-memory`
|
|
526
589
|
- Source file: Claude.ai JSON export or ZIP containing a JSON export
|
|
527
590
|
- Default archive scope: `claude_web`
|
|
528
591
|
|
|
529
|
-
Claude.ai is not scanned automatically from the desktop app. The
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
`
|
|
592
|
+
Claude.ai is not scanned automatically from the desktop app. The import command
|
|
593
|
+
without a path prints official export instructions for Claude Settings >
|
|
594
|
+
Privacy. The user then provides the downloaded official export file. agentlog
|
|
595
|
+
reads `chat_messages`, `messages`, or `children`, normalizes sender/role fields,
|
|
596
|
+
extracts text content, and uses `created_at`, `updated_at`, or `timestamp`.
|
|
533
597
|
For official `conversations.json` exports, the top-level conversation `summary`
|
|
534
598
|
is archived as both `sessionSummary.summary` and a supplementary transcript row.
|
|
535
599
|
Assistant messages prefer structured `content[]` parts over the legacy top-level
|
|
@@ -555,7 +619,7 @@ are marked `recovered-time-unknown` in history views instead of being displayed
|
|
|
555
619
|
as if they happened at import time. This keeps project folders from implying
|
|
556
620
|
that account-level conversations were reliably tagged to Claude projects when
|
|
557
621
|
the export did not preserve that relationship. Re-run
|
|
558
|
-
`agentlog import claude-web
|
|
622
|
+
`agentlog import claude-web <path>` after importing an export that
|
|
559
623
|
contains conversation project ids or after Claude web parser semantics change.
|
|
560
624
|
|
|
561
625
|
Like ChatGPT export imports, Claude.ai imports are scope-based by default because
|
package/docs/release.md
CHANGED
package/package.json
CHANGED
package/src/archive.js
CHANGED
|
@@ -1060,7 +1060,7 @@ function ensureConversationMarkdown(session, env = process.env) {
|
|
|
1060
1060
|
return conversationPath;
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
|
-
const VIEW_SCHEMA_VERSION =
|
|
1063
|
+
const VIEW_SCHEMA_VERSION = 3;
|
|
1064
1064
|
|
|
1065
1065
|
function sessionViewPathFromMetadata(metadataPath) {
|
|
1066
1066
|
if (!metadataPath) return "";
|