@tangle-network/traces 0.15.0 → 0.15.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.
package/README.md CHANGED
@@ -214,7 +214,7 @@ not the way to integrate a system you own — for that, [emit the contract](#int
214
214
 
215
215
  | Harness (aliases) | Reads from | Status |
216
216
  |---|---|---|
217
- | `claude-code` (`claude`, `claudish`, `openclaw`, `nanoclaw`) | `~/.claude/projects/<cwd>/*.jsonl` (+ subagent sidechains) | verified |
217
+ | `claude-code` (`claude`, `claudish`, `openclaw`, `nanoclaw`) | `~/.claude/projects/<cwd>/*.jsonl` (+ subagent sidechains), or an explicit `claude -p --output-format stream-json --verbose` JSONL file | verified |
218
218
  | `codex` (`codex-acp`) | `~/.codex/sessions/**/rollout-*.jsonl` | verified |
219
219
  | `codex-exec` (`codex-json`) | explicit `codex exec --json` JSONL file | fixture |
220
220
  | `opencode` | `~/.local/share/opencode/storage/` | verified |
@@ -228,6 +228,8 @@ not the way to integrate a system you own — for that, [emit the contract](#int
228
228
 
229
229
  Every adapter captures the conversation stored in one session file: the **user's prompt** and the **assistant's response** text, plus tool calls/results and token usage.
230
230
  Claude Code's nested subagent files are folded into the parent trace.
231
+ Claude Code's stream-json output also records the tools the harness offered the model and whether the run failed.
232
+ The root span keeps them as `gen_ai.tool.definitions` and `run.status`, so a trace contract can check what the harness enforced.
231
233
  Claude source UUIDs remain searchable in `traces.claude.source_*` attributes, while exported OTLP IDs use deterministic `deriveHexId` values.
232
234
  The Claude transcript proves turns and tool calls, but does not prove loop iterations or causal links, so those fields remain absent.
233
235
  Codex stores each worker in a separate session file; add `--workflow` to resolve the connected coordinator and worker files.
@@ -257,6 +259,7 @@ traces convert --harness claude-code --last 1 --otlp-out spans.jsonl # OTLP o
257
259
  traces index --all --since 24h --out session-index.json
258
260
  traces bundle --harness claude-code --session <id|path> --out bundle-dir # one session's durable evidence dir
259
261
  traces bundle-view bundle-dir --view evidence-only --out writer-dir # same session, without its own words
262
+ traces bundle verify bundle-dir # every file against its manifest SHA-256
260
263
  traces inspect session-index.json --out inspection-report.md
261
264
  traces evidence --harness codex --last 20 --out policy-evidence.jsonl
262
265
  traces evidence --harness codex-exec --session /tmp/codex.jsonl --cwd "$PWD" --out policy-evidence.jsonl
@@ -612,6 +615,18 @@ The allow-list is the structure. A content check is the proof it is right: befor
612
615
 
613
616
  A projected view also carries the full bundle's `manifest.json` hash, so an auditor can prove which record it came from. Projecting a view of a view is refused.
614
617
 
618
+ ### Verify a bundle
619
+
620
+ ```bash
621
+ traces bundle verify bundle-dir # VERIFIED, or FAILED with each difference; exit 1 on failure
622
+ traces bundle verify writer-dir --format json
623
+ ```
624
+
625
+ `bundle verify` checks every file the manifest lists for its recorded size and SHA-256.
626
+ It reports a listed file that is missing, a file on disk that the manifest does not list, a manifest path that is absolute or climbs out of the directory, and any symbolic link.
627
+ For a projected view it also checks that the full bundle it names still has the manifest bytes the view recorded; a moved or deleted source is `unavailable`, not a failure.
628
+ It proves the bytes are the bytes `traces` wrote. It does not prove who wrote them: anyone who can rewrite a file can rewrite the manifest.
629
+
615
630
  ## Policy-mining evidence
616
631
 
617
632
  `traces` does **not** emit benchmark campaign cells. It emits normalized coding-agent session evidence that another system can mine.
@@ -665,7 +680,7 @@ halo spans.openinference.jsonl --prompt "Analyze this trace slice" --max-turns 1
665
680
  `traces export` accepts:
666
681
 
667
682
  - compact `traces.policy_evidence.session` JSONL from `traces evidence`
668
- - JSON arrays with `start`, `raw`, `result`, `done`, and `error` events
683
+ - JSON arrays with `start`, `raw`, `result`, `done`, and `error` events. A tool call becomes one span, keyed by its message part id, however many events report on that part. The Sandbox SDK records each call as a `message.part.updated` event and again as the harness's raw `tool_use` event. The span takes its start from the part's first event, its final state from the last, and `ERROR` if any event reported one. The root span's `traces.event.tool_part_updates_merged` counts the events folded in.
669
684
  - existing OpenInference JSONL, rewritten through the local redaction path
670
685
  - chat message arrays and objects with a `messages` array
671
686