@threadbase-sh/scanner 0.19.4 → 0.20.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 CHANGED
@@ -20,7 +20,7 @@ Combines the best parts of four independent scanner implementations (VS Code, El
20
20
  - **Filtering** — by project, account, time range, conversation type (conversations/subagents/teammates)
21
21
  - **5 sort modes** — recent, oldest, messages-desc, messages-asc, alphabetical
22
22
  - **Pagination** — limit/offset on all operations
23
- - **Multi-provider** — index Threadbase/Claude history, local OpenAI Codex CLI sessions, and Cursor agent-transcripts through one normalized pipeline (Codex and Cursor are opt-in)
23
+ - **Multi-provider** — index Threadbase/Claude history, local OpenAI Codex CLI sessions, Cursor agent-transcripts, and GitHub Copilot CLI sessions through one normalized pipeline (all but Claude are opt-in)
24
24
  - **Multi-profile** — scan multiple Claude config directories
25
25
  - **LRU caching** — metadata and conversation caches for fast repeated access
26
26
  - **Git branch detection** — reads `.git/HEAD` with parent directory walking
@@ -127,14 +127,15 @@ import { join } from 'node:path'
127
127
  const scanner = new ConversationScanner()
128
128
 
129
129
  const result = await scanner.scan({
130
- providers: ['claude-code', 'codex-cli', 'cursor'],
130
+ providers: ['claude-code', 'codex-cli', 'cursor', 'copilot'],
131
131
  codexRoots: [join(homedir(), '.codex/sessions')],
132
132
  cursorRoots: [join(homedir(), '.cursor/projects')],
133
+ copilotRoots: [join(homedir(), '.copilot/session-state')],
133
134
  })
134
135
 
135
136
  // Each meta carries its source provider
136
137
  for (const c of result.conversations) {
137
- console.log(c.provider) // 'claude-code' | 'codex-cli' | 'cursor'
138
+ console.log(c.provider) // 'claude-code' | 'codex-cli' | 'cursor' | 'copilot'
138
139
  }
139
140
 
140
141
  // Search across all, or filter to one provider
@@ -154,6 +155,15 @@ name `cursor-cli` is still accepted as an alias. Not `cursor-agent`. Cursor copi
154
155
  set `isImportedFromClaude` or `isImportedFromCodex`; `isImportedFromCursor` is
155
156
  reserved for Claude/Codex providers.
156
157
 
158
+ **GitHub Copilot CLI** (wire name **`copilot`**) keeps one directory per
159
+ session, `<root>/<sessionId>/events.jsonl`. Pass the `session-state` directory
160
+ (or the Copilot home above it; `COPILOT_HOME` moves it) as `copilotRoots`. The
161
+ prompt is indexed as typed (`user.message`), with the assistant's replies and
162
+ tool calls (`assistant.message`). A Copilot `sessionId` is the id in
163
+ `session.start`, which is also the directory name. Tool results, reasoning and
164
+ the `session-store.db` SQLite index are not read, and Copilot Chat in VS Code is
165
+ a different store that is not indexed.
166
+
157
167
  #### Resolving an id to its transcript file
158
168
 
159
169
  Don't rebuild a provider's directory layout to find a file. Ask the index. This
@@ -349,7 +359,7 @@ Every scanned conversation produces a `ConversationMeta` with the full superset
349
359
  | `isTeammate` | boolean | VS Code |
350
360
  | `teamName` | string \| null | VS Code |
351
361
  | `toolNames` | string[] | CLI |
352
- | `provider` | `'claude-code' \| 'codex-cli' \| 'cursor'` | Provider that produced the meta |
362
+ | `provider` | `'claude-code' \| 'codex-cli' \| 'cursor' \| 'copilot'` | Provider that produced the meta |
353
363
  | `kind` | `'conversation' \| 'task'` | Codex / Cursor (optional) |
354
364
  | `externalSessionId` | string | Provider-native session id (optional) |
355
365
  | `isImportedFromClaude` | boolean | Cursor copy of a Claude session (optional; omit when false) |