@tangle-network/harness-sessions 0.1.2 → 0.1.3

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.
@@ -44,6 +44,8 @@ export function createFold(ref, mode, stats) {
44
44
  let aborted = null;
45
45
  let errors = 0;
46
46
  let identified = false;
47
+ // A resumed agent's file writes its earlier records again, each with the uuid it had.
48
+ const seenUuids = new Set();
47
49
  const observe = (record) => {
48
50
  if (!subagent && record.isSidechain === true) {
49
51
  sidechainSkipped += 1;
@@ -52,6 +54,11 @@ export function createFold(ref, mode, stats) {
52
54
  const type = record.type;
53
55
  if (type !== 'user' && type !== 'assistant' && type !== 'system')
54
56
  return;
57
+ if (typeof record.uuid === 'string') {
58
+ if (seenUuids.has(record.uuid))
59
+ return;
60
+ seenUuids.add(record.uuid);
61
+ }
55
62
  const at = builder.seen(record.timestamp);
56
63
  if (builder.cwd === null && typeof record.cwd === 'string')
57
64
  builder.cwd = record.cwd;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/harness-sessions",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "One reader for every coding-agent harness's native session (Claude Code, Codex, OpenCode, Pi): store layouts, a normalized session with messages, tool calls, served models, usage and ending errors, and projections to chat messages, OTLP spans and turns",
5
5
  "type": "module",
6
6
  "sideEffects": false,