@tangle-network/traces 0.8.26 → 0.9.0
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 +14 -16
- package/dist/{chunk-6N2KVDOU.js → chunk-5SBXL62V.js} +1989 -852
- package/dist/cli.js +104 -35
- package/dist/index.d.ts +221 -131
- package/dist/index.js +35 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -55,7 +55,9 @@ Add `--llm` for the **agentic analysts** (failure-mode / knowledge-gap / knowled
|
|
|
55
55
|
|
|
56
56
|
Every run also writes a **canonical OpenInference JSONL artifact**, so you can run external engines like [HALO](https://github.com/context-labs/halo) over it directly with `--analyzer halo`. See [External engines](#external-engines-bring-your-own). Analysis is never locked to one engine.
|
|
57
57
|
|
|
58
|
-
`traces improve` is the reviewable action path.
|
|
58
|
+
`traces improve` is the reviewable action path.
|
|
59
|
+
It writes one typed result, one report, flattened evidence rows, and the canonical OTLP trace.
|
|
60
|
+
Each finding already contains the claim, evidence, recommended action, confidence, and validation plan.
|
|
59
61
|
|
|
60
62
|
## What it finds
|
|
61
63
|
|
|
@@ -95,7 +97,7 @@ Every adapter captures the full conversation: the **user's prompt** and the **as
|
|
|
95
97
|
```bash
|
|
96
98
|
traces list --harness claude-code --last 20 # discover sessions
|
|
97
99
|
traces analyze --harness codex --last 1 # $0 deterministic report
|
|
98
|
-
traces investigate --all --last 10 --out report.md # typed findings +
|
|
100
|
+
traces investigate --all --last 10 --out report.md # typed findings with actions + checks
|
|
99
101
|
traces improve --all --last 10 --dir .traces/improvement
|
|
100
102
|
traces analyze --all --since 2026-06-18 --out report.md
|
|
101
103
|
traces convert --harness claude-code --last 1 --otlp spans.jsonl # OTLP only
|
|
@@ -124,7 +126,7 @@ traces upload --since 24h # upload last day to the Inte
|
|
|
124
126
|
| `--otlp <path>` | OTLP artifact path (also evidence provenance / dry-run upload preview) |
|
|
125
127
|
| `--format <kind>` | `export` / file `stream`: `auto`, `policy-evidence`, `sandbox-events`, or `openinference` |
|
|
126
128
|
| `--llm` / `--budget <usd>` | Enable agentic analysts (needs `OPENAI_API_KEY`) / cap their spend |
|
|
127
|
-
| `--config <path>` | `investigate` / `improve` / `stream`: load BYO analysts, live analysts, external analyzers
|
|
129
|
+
| `--config <path>` | `investigate` / `improve` / `stream`: load BYO analysts, live analysts, and external analyzers |
|
|
128
130
|
| `--interval <s>` / `--window <m>` | `watch` / live `stream`: poll seconds (default 5) / active-session window minutes (default 30) |
|
|
129
131
|
| `--min-loop <n>` | Identical repeated calls before flagging a loop (default 3) |
|
|
130
132
|
| `--mode <kind>` | `stream`: `visualizer` (spans + findings), `findings` (low-volume), or `agent` (findings + reports) |
|
|
@@ -195,15 +197,12 @@ The directory contains:
|
|
|
195
197
|
|
|
196
198
|
| File | Purpose |
|
|
197
199
|
|---|---|
|
|
198
|
-
| `
|
|
199
|
-
| `recommendations.json` | ranked actions derived from analyst, deterministic, and external findings |
|
|
200
|
-
| `proposals.json` | reviewable proposal-only artifacts linked to recommendation ids and evidence refs |
|
|
200
|
+
| `result.json` | findings, actions, checks, execution facts, and adoption data |
|
|
201
201
|
| `evidence.jsonl` | one row per evidence ref, suitable for downstream mining |
|
|
202
|
-
| `claims.json` | compact claim list for review agents and dashboards |
|
|
203
202
|
| `report.md` | human-readable report rendered from the typed data |
|
|
204
|
-
| `
|
|
203
|
+
| `traces.otlp.jsonl` | canonical trace used by the analysts and execution accounting |
|
|
205
204
|
|
|
206
|
-
Bring your own analysts
|
|
205
|
+
Bring your own analysts with a config file:
|
|
207
206
|
|
|
208
207
|
```bash
|
|
209
208
|
traces improve --last 5 --config examples/improvement-config.mjs --dir .traces/improvement
|
|
@@ -215,9 +214,8 @@ The config can export:
|
|
|
215
214
|
- `liveAnalysts`: deterministic online analysts that implement the `TraceLiveAnalyst` contract for `traces stream`
|
|
216
215
|
- `registry`: a prebuilt `AnalystRegistry`
|
|
217
216
|
- `externalAnalyzers`: HALO or any command/model adapter that reads the OTLP artifact
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
`traces` does not apply patches or open PRs by default. The public engine produces reviewable artifacts; hosted products can decide how to deliver, approve, or apply them.
|
|
217
|
+
Traces does not pretend that an action is a measured candidate.
|
|
218
|
+
Use `agent-eval` to propose and compare candidate changes, `agent-runtime` to package an approved improvement, and `agent-interface` to represent profile edits.
|
|
221
219
|
|
|
222
220
|
## Session index
|
|
223
221
|
|
|
@@ -344,11 +342,11 @@ The CLI is a thin consumer of these exports.
|
|
|
344
342
|
| Export | Signature | Use |
|
|
345
343
|
|---|---|---|
|
|
346
344
|
| `analyzeSpans` | `(spans, { registry?, ai?, budgetUsd? }) → AnalyzeResult` | run built-in analysts, or **your own** via `registry` |
|
|
347
|
-
| `runTraceInvestigation` | `(TraceInvestigationOptions) → TraceInvestigationResult` | typed findings
|
|
348
|
-
| `
|
|
349
|
-
| `buildTraceFindingPacket` | `({ findings }) → TraceFindingPacket` |
|
|
345
|
+
| `runTraceInvestigation` | `(TraceInvestigationOptions) → TraceInvestigationResult` | typed findings with actions/checks, execution facts, external analyzer output, and report |
|
|
346
|
+
| `runTraceImprovement` | `(TraceImprovementOptions) → TraceImprovementResult` | writes the full findings, evidence, report, and trace artifact pack |
|
|
347
|
+
| `buildTraceFindingPacket` | `({ findings }) → TraceFindingPacket` | render any `AnalystFinding[]` without changing its schema |
|
|
350
348
|
| `runTraceStoreInvestigation` | `({ traceStore }) → TraceStoreInvestigationResult` | run the same packet layer over a hosted/custom `TraceAnalysisStore` |
|
|
351
|
-
| `loadTracesConfig` | `(path?) → TracesConfig \| undefined` | load BYO analysts
|
|
349
|
+
| `loadTracesConfig` | `(path?) → TracesConfig \| undefined` | load BYO analysts and external analyzers |
|
|
352
350
|
| `watchSessions` | `(ObserverOptions) → Promise<void>` | live observer; `onLoop` / `onReport` / `signal` / `adapters` |
|
|
353
351
|
| `streamSessions` | `(TraceStreamOptions) → Promise<void>` | live JSONL-ready event stream over active sessions |
|
|
354
352
|
| `traceStreamEventsFromSpans` | `(spans, opts?) → TraceStreamEvent[]` | replay an existing span list as stream events |
|