@tangle-network/traces 0.9.12 → 0.9.13

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.
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Add support for a new harness: implement HarnessTraceAdapter (locate + parse),
3
+ * then use it via the `adapters` option. No registry edit and no fork.
4
+ *
5
+ * tsx examples/register-harness.ts
6
+ */
7
+ import { collectSessions, type HarnessTraceAdapter, span } from '@tangle-network/traces'
8
+
9
+ const myAdapter: HarnessTraceAdapter = {
10
+ harness: 'my-agent',
11
+ async locate() {
12
+ // Discover this harness's session files on disk and return refs.
13
+ return [{ harness: 'my-agent', sessionId: 'demo', path: '/tmp/demo', cwd: null, mtimeMs: Date.now() }]
14
+ },
15
+ async parse(ref) {
16
+ // Project the harness's native log onto normalized OTLP spans.
17
+ const now = new Date().toISOString()
18
+ return [
19
+ span({ traceId: ref.sessionId, spanId: 'root', name: 'session', kind: 'AGENT', startTime: now }),
20
+ span({ traceId: ref.sessionId, spanId: 's1', parentSpanId: 'root', name: 'tool.bash', kind: 'TOOL', startTime: now, tool: 'bash', content: 'ls' }),
21
+ ]
22
+ },
23
+ }
24
+
25
+ const [batch] = await collectSessions({ adapters: [myAdapter] })
26
+ console.log(`${batch?.spans.length ?? 0} spans from ${batch?.ref.harness}`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/traces",
3
- "version": "0.9.12",
3
+ "version": "0.9.13",
4
4
  "description": "Point it at your coding-agent session traces (Claude Code, Codex, OpenCode, Gemini, Pi, …) and get failure-mode + efficiency findings. CLI + SDK over the @tangle-network/agent-eval analyst suite — observe live sessions, run your own analysts, redact, and upload to the Tangle Intelligence Platform.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -36,7 +36,8 @@
36
36
  },
37
37
  "files": [
38
38
  "dist",
39
- "docs/stream-findings.svg",
39
+ "docs",
40
+ "examples",
40
41
  "install.sh",
41
42
  "README.md"
42
43
  ],
@@ -44,17 +45,17 @@
44
45
  "node": ">=22"
45
46
  },
46
47
  "dependencies": {
47
- "@ax-llm/ax": "^23.0.1",
48
- "@tangle-network/agent-eval": "0.135.1"
48
+ "@ax-llm/ax": "^23.0.6",
49
+ "@tangle-network/agent-eval": "0.137.0"
49
50
  },
50
51
  "devDependencies": {
51
52
  "@types/node": "^22.0.0",
52
- "postcss": "^8.5.24",
53
+ "postcss": "^8.5.25",
53
54
  "tsup": "^8.0.0",
54
- "tsx": "^4.19.0",
55
+ "tsx": "^4.23.1",
55
56
  "typescript": "^5.7.0",
56
- "vite": "^8.1.2",
57
- "vitest": "^4.1.9"
57
+ "vite": "^8.1.5",
58
+ "vitest": "^4.1.10"
58
59
  },
59
60
  "scripts": {
60
61
  "dev": "tsx src/cli.ts",