@gobing-ai/ts-llm-jsonl-importer 0.4.66 → 0.4.67

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
@@ -19,7 +19,7 @@ Generic JSONL import pipeline for AI-agent history-style files: discover files,
19
19
  | `sha256()` / `stableJson()` | Stable hash helpers used by the ledger |
20
20
  | `HISTORY_IMPORT_SCHEMA_SQL` | SQL schema string for explicit migration flows |
21
21
 
22
- Built-in source keys are `claude`, `codex`, `gemini`, `pi`, `opencode`, `antigravity`, `openclaw`, `omp`, `grok`, and `agy`. The `agy` source scans `~/.gemini/antigravity-cli`, covering both `history.jsonl` and `brain/**` transcripts; conversation `.db` stores under `conversations/` are not imported.
22
+ Built-in source keys are `claude`, `codex`, `gemini`, `pi`, `opencode`, `antigravity`, `openclaw`, `omp`, `grok`, `agy`, and `deepseek`. The `agy` source scans `~/.gemini/antigravity-cli`, covering both `history.jsonl` and `brain/**` transcripts; conversation `.db` stores under `conversations/` are not imported.
23
23
 
24
24
  The `deepseek` source scans `$DSH_HOME/sessions` (falling back to `~/.dsh/sessions`) for `session-<uuid>/` directories containing `session.v3.jsonl` or `session.v3.jsonl.zstd`. Compressed session logs are decompressed through the system `zstd` CLI — zstd must be on `PATH`, else the import fails with an actionable error naming zstd and the file. The session header line is imported as a `meta` row with the session `cwd`; `user/message` and `assistant/message` events map to user/assistant message rows (joined text content, epoch-ms `time` → ISO timestamp, `source.model` when present), while any other plugin-extensible event type (compaction, hooks, titles) is tolerated and skipped; torn crash tails are skipped (`corruptLinePolicy: 'skip'`).
25
25
 
@@ -63,17 +63,25 @@ All modes preserve parse and validation issues in the returned `ImportResult`; m
63
63
 
64
64
  ## Streaming
65
65
 
66
- The importer uses `FileSystem.readFileStream` when available (ADR-021), reading one line at a time
67
- for **O(line) memory usage** — enabling multi-MB or multi-GB LLM history files without buffering
68
- the entire file. Behavior is identical to the previous `readFile` + split approach (same `source_line`
69
- values, same `ImportResult`).
66
+ For uncompressed JSONL, the importer uses `FileSystem.readFileStream` when available (ADR-021), reading
67
+ one line at a time — **O(line) memory** for the line-reading component, so multi-MB or multi-GB history
68
+ files need no full-text buffer. Behavior is identical to the previous `readFile` + split approach (same
69
+ `source_line` values, same `ImportResult`).
70
70
 
71
- When `readFileStream` is unavailable (e.g. Cloudflare Workers), the importer falls back to
72
- `readFile` + split transparently.
71
+ Two paths buffer the complete text before line splitting, so their memory scales with the **decompressed
72
+ or file size** rather than the line count:
73
+
74
+ - `*.jsonl.zstd` files (the `deepseek` source) are decompressed whole through the system `zstd` CLI
75
+ before splitting.
76
+ - When `readFileStream` is unavailable (e.g. Cloudflare Workers), the importer falls back to
77
+ `readFile` + split transparently.
78
+
79
+ The `O(line)` bound describes the line reader only — registry discovery, checkpoint maps, and ledger
80
+ batches are outside that claim.
73
81
 
74
82
  ## Cancellation
75
83
 
76
- Both entry points accept a cooperative `signal` (`AbortSignal`, feature A21 / ADR-112):
84
+ Both entry points accept a cooperative `signal` (`AbortSignal`, [Spur feature A21](https://github.com/gobing-ai/spur/blob/main/docs/features/A21_reusable-execution-deadlines-and-unlimited-jobs.md) / [Spur ADR-112](https://github.com/gobing-ai/spur/blob/main/docs/00_ADR.md)):
77
85
 
78
86
  ```ts
79
87
  const controller = new AbortController();
package/dist/mappers.d.ts CHANGED
@@ -95,11 +95,13 @@ export declare function geminiSplit(raw: Record<string, unknown>, context?: Tran
95
95
  /**
96
96
  * Map one DeepSeek dsh `session.v3.jsonl` line into forensic ETL entries (task 0067 R2).
97
97
  *
98
- * dsh layout: line 1 is the session header `{type:"session", version:3, id, createdAt, cwd, ...}`;
98
+ * dsh layout: line 1 is the session header `{type:"session", version:3, id, createdAt, cwd, ...}` and is
99
+ * persisted as one `history_message` metadata row (role/disposition `meta`) carrying session
100
+ * identity, cwd and creation time;
99
101
  *
100
102
  * any remaining lines are append-only events `{type, seq, time, data}` whose
101
103
  * vocabulary is plugin-extensible. Only chat events (`user/message`,
102
- * `assistant/message`) become history_message rows (content is an array of
104
+ * `assistant/message`) become conversational `keep` rows (content is an array of
103
105
  * `{text}` blocks — the existing extractContentText joined-text rule); every
104
106
  * unrecognized event type (compaction/*, hook/*, turn/*, session/title, …) is
105
107
  * tolerated and skipped, and torn crash tails never reach the mapper because
@@ -1 +1 @@
1
- {"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../src/mappers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAmF9F;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CASzD;AAED,4FAA4F;AAC5F,MAAM,WAAW,iBAAiB;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACtC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC7B,GAAG,EAAE,UAAU,EACf,OAAO,EAAE,gBAAgB,GAAG,SAAS,EACrC,QAAQ,EAAE,iBAAiB,GAC5B,SAAS,oBAAoB,EAAE,CAmBjC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,oBAAoB,GAAG,UAAU,CAIvE;AA+LD,kFAAkF;AAClF,wBAAgB,UAAU,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,CAGhD;AAwHD;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAwBjG;AAMD,yEAAyE;AACzE,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,E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,GAAG,SAAS,UAAU,EAAE,CAkTzG;AAgFD,wGAAwG;AACxG,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,CAKxD;AAMD,gDAAgD;AAChD,eAAO,MAAM,gBAAgB,wBAE5B,CAAC;AACF,4CAA4C;AAC5C,eAAO,MAAM,YAAY,wBAA8F,CAAC;AACxH,6CAA6C;AAC7C,eAAO,MAAM,aAAa,wBAEzB,CAAC;AACF,+CAA+C;AAC/C,eAAO,MAAM,eAAe,wBAE3B,CAAC;AACF,6CAA6C;AAC7C,eAAO,MAAM,aAAa,wBAEzB,CAAC;AACF,8CAA8C;AAC9C,eAAO,MAAM,cAAc,wBAE1B,CAAC;AACF,gDAAgD;AAChD,eAAO,MAAM,gBAAgB,wBAE5B,CAAC;AACF,6FAA6F;AAC7F,eAAO,MAAM,aAAa,wBAAqE,CAAC;AAQhG,oDAAoD;AACpD,eAAO,MAAM,aAAa,gCAAoB,CAAC;AAC/C,gDAAgD;AAChD,eAAO,MAAM,SAAS,gCAAoB,CAAC;AAC3C,iDAAiD;AACjD,eAAO,MAAM,UAAU,gCAAoB,CAAC;AAC5C,mDAAmD;AACnD,eAAO,MAAM,YAAY,gCAAoB,CAAC;AAC9C,iDAAiD;AACjD,eAAO,MAAM,UAAU,gCAAoB,CAAC;AAC5C,kDAAkD;AAClD,eAAO,MAAM,WAAW,gCAAoB,CAAC;AAC7C,oDAAoD;AACpD,eAAO,MAAM,aAAa,gCAAoB,CAAC;AAC/C,0DAA0D;AAC1D,eAAO,MAAM,UAAU,gCAAoB,CAAC"}
package/dist/mappers.js CHANGED
@@ -1331,11 +1331,13 @@ export function geminiSplit(raw, context) {
1331
1331
  /**
1332
1332
  * Map one DeepSeek dsh `session.v3.jsonl` line into forensic ETL entries (task 0067 R2).
1333
1333
  *
1334
- * dsh layout: line 1 is the session header `{type:"session", version:3, id, createdAt, cwd, ...}`;
1334
+ * dsh layout: line 1 is the session header `{type:"session", version:3, id, createdAt, cwd, ...}` and is
1335
+ * persisted as one `history_message` metadata row (role/disposition `meta`) carrying session
1336
+ * identity, cwd and creation time;
1335
1337
  *
1336
1338
  * any remaining lines are append-only events `{type, seq, time, data}` whose
1337
1339
  * vocabulary is plugin-extensible. Only chat events (`user/message`,
1338
- * `assistant/message`) become history_message rows (content is an array of
1340
+ * `assistant/message`) become conversational `keep` rows (content is an array of
1339
1341
  * `{text}` blocks — the existing extractContentText joined-text rule); every
1340
1342
  * unrecognized event type (compaction/*, hook/*, turn/*, session/title, …) is
1341
1343
  * tolerated and skipped, and torn crash tails never reach the mapper because
@@ -4,7 +4,7 @@
4
4
  * Guaranteed to match the package version; a bump-or-fail test enforces that
5
5
  * any modification to HISTORY_IMPORT_SCHEMA_SQL must be accompanied by a version bump.
6
6
  */
7
- export declare const HISTORY_IMPORT_SCHEMA_VERSION = "0.4.66";
7
+ export declare const HISTORY_IMPORT_SCHEMA_VERSION = "0.4.67";
8
8
  /**
9
9
  * DDL string that creates the history import checkpoint, ledger, and typed contract tables.
10
10
  *
@@ -4,7 +4,7 @@
4
4
  * Guaranteed to match the package version; a bump-or-fail test enforces that
5
5
  * any modification to HISTORY_IMPORT_SCHEMA_SQL must be accompanied by a version bump.
6
6
  */
7
- export const HISTORY_IMPORT_SCHEMA_VERSION = '0.4.66';
7
+ export const HISTORY_IMPORT_SCHEMA_VERSION = '0.4.67';
8
8
  /**
9
9
  * DDL string that creates the history import checkpoint, ledger, and typed contract tables.
10
10
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gobing-ai/ts-llm-jsonl-importer",
3
- "version": "0.4.66",
3
+ "version": "0.4.67",
4
4
  "description": "@gobing-ai/ts-llm-jsonl-importer — Generic JSONL importer for LLM agent history files.",
5
5
  "keywords": [
6
6
  "typescript",
@@ -47,9 +47,9 @@
47
47
  "release": "echo 'Manual publish is disabled. Releases go through GitHub Actions via Trusted Publishing — push a tag: git tag @gobing-ai/ts-llm-jsonl-importer-v<version> && git push --tags' && exit 1"
48
48
  },
49
49
  "dependencies": {
50
- "@gobing-ai/ts-db": "^0.4.66",
51
- "@gobing-ai/ts-runtime": "^0.4.66",
52
- "@gobing-ai/ts-utils": "^0.4.66",
50
+ "@gobing-ai/ts-db": "^0.4.67",
51
+ "@gobing-ai/ts-runtime": "^0.4.67",
52
+ "@gobing-ai/ts-utils": "^0.4.67",
53
53
  "zod": "^4.1.0"
54
54
  },
55
55
  "devDependencies": {
package/src/mappers.ts CHANGED
@@ -1447,11 +1447,13 @@ export function geminiSplit(raw: Record<string, unknown>, context?: TransformCon
1447
1447
  /**
1448
1448
  * Map one DeepSeek dsh `session.v3.jsonl` line into forensic ETL entries (task 0067 R2).
1449
1449
  *
1450
- * dsh layout: line 1 is the session header `{type:"session", version:3, id, createdAt, cwd, ...}`;
1450
+ * dsh layout: line 1 is the session header `{type:"session", version:3, id, createdAt, cwd, ...}` and is
1451
+ * persisted as one `history_message` metadata row (role/disposition `meta`) carrying session
1452
+ * identity, cwd and creation time;
1451
1453
  *
1452
1454
  * any remaining lines are append-only events `{type, seq, time, data}` whose
1453
1455
  * vocabulary is plugin-extensible. Only chat events (`user/message`,
1454
- * `assistant/message`) become history_message rows (content is an array of
1456
+ * `assistant/message`) become conversational `keep` rows (content is an array of
1455
1457
  * `{text}` blocks — the existing extractContentText joined-text rule); every
1456
1458
  * unrecognized event type (compaction/*, hook/*, turn/*, session/title, …) is
1457
1459
  * tolerated and skipped, and torn crash tails never reach the mapper because
package/src/schema-sql.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Guaranteed to match the package version; a bump-or-fail test enforces that
5
5
  * any modification to HISTORY_IMPORT_SCHEMA_SQL must be accompanied by a version bump.
6
6
  */
7
- export const HISTORY_IMPORT_SCHEMA_VERSION = '0.4.66';
7
+ export const HISTORY_IMPORT_SCHEMA_VERSION = '0.4.67';
8
8
 
9
9
  /**
10
10
  * DDL string that creates the history import checkpoint, ledger, and typed contract tables.