@nessielabs/daemon 0.3.1 → 0.3.2

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.
@@ -4,7 +4,11 @@ import { asRecord, readJsonl, stringValue } from "./jsonl.js";
4
4
  export async function parseClaudeCodeSession(path) {
5
5
  const records = await readJsonl(path);
6
6
  const messages = [];
7
- let sessionId = basename(path, ".jsonl");
7
+ // Anchor session identity to the JSONL filename, matching the macOS client.
8
+ // The in-file `sessionId` is reused across files for worktree/resumed
9
+ // sessions, so keying on it collapses distinct transcripts into one
10
+ // conversation id and makes their deterministic message ids collide (409).
11
+ const sessionId = basename(path, ".jsonl");
8
12
  let title = null;
9
13
  let createdAt = null;
10
14
  let updatedAt = null;
@@ -19,7 +23,6 @@ export async function parseClaudeCodeSession(path) {
19
23
  cwd ??= stringValue(record.cwd);
20
24
  if (record.isSidechain === true)
21
25
  continue;
22
- sessionId = stringValue(record.sessionId) ?? stringValue(record.session_id) ?? sessionId;
23
26
  const timestamp = stringValue(record.timestamp);
24
27
  if (timestamp) {
25
28
  createdAt ??= timestamp;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nessielabs/daemon",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Headless Linux ingestion daemon for Nessie agent traces.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",