@tangle-network/traces 0.9.2 → 0.9.4

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
@@ -51,7 +51,7 @@ traces stream --all --mode findings
51
51
 
52
52
  That's the command in the demo above. The **deterministic pass** checks stuck loops, token growth, output decay, missing self-verification, tool failures, and human corrections. Each supported issue is returned as a finding with evidence, an action, confidence, and a validation plan. It needs no API key and costs nothing.
53
53
 
54
- Add `--llm` for the **agentic analysts** (failure-mode / knowledge-gap / knowledge-poisoning / improvement); they call OpenAI and respect `--budget <usd>`.
54
+ Add `--llm` for the **agentic analysts**. `traces` first uses free local signals to choose the smallest useful set: a failure review always runs, while knowledge and edit reviews run only when failures, repeated calls, or corrective feedback support them. They call OpenAI and respect `--budget <usd>`.
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
 
@@ -71,7 +71,7 @@ The deterministic pass (free, no key) surfaces:
71
71
  | **No self-verification** | state-mutating actions never followed by an eval/inspect/check |
72
72
  | **Tool mix / retry / error rates** | repeated, retried, and failed tool calls |
73
73
 
74
- `--llm` adds agentic analysts that read the conversation and cluster higher-order failure and improvement signals.
74
+ `--llm` adds agentic analysts that read the conversation and cluster higher-order failure and improvement signals. They receive the compact deterministic findings first, then share their earlier findings with later analysts. With `traces improve`, the selected analysts and reasons are saved in `result.json` and the report, so another agent can reuse the packet without rereading the raw trace.
75
75
 
76
76
  ## Supported harnesses
77
77
 
@@ -198,7 +198,7 @@ The directory contains:
198
198
 
199
199
  | File | Purpose |
200
200
  |---|---|
201
- | `result.json` | findings, actions, checks, execution facts, and adoption data |
201
+ | `result.json` | findings, actions, checks, execution facts, adoption data, and the chosen LLM analysis route |
202
202
  | `evidence.jsonl` | one row per evidence ref, suitable for downstream mining |
203
203
  | `report.md` | human-readable report rendered from the typed data |
204
204
  | `traces.otlp.jsonl` | canonical trace used by the analysts and execution accounting |
@@ -4632,8 +4632,56 @@ async function analyzeAdoption(spans, opts = {}) {
4632
4632
  };
4633
4633
  }
4634
4634
 
4635
+ // src/agentic-routing.ts
4636
+ import {
4637
+ DEFAULT_TRACE_ANALYST_KINDS
4638
+ } from "@tangle-network/agent-eval/analyst";
4639
+ function planTraceAgenticRoute(pipelines, reactions) {
4640
+ const reasons = [{
4641
+ code: "requested-baseline",
4642
+ detail: "LLM trace analysis was explicitly requested; start with one bounded failure-mode pass."
4643
+ }];
4644
+ const ids = /* @__PURE__ */ new Set(["failure-mode"]);
4645
+ const hasFailures = pipelines.failureClusters.totalFailures > 0;
4646
+ const hasLoops = pipelines.stuckLoops.findings.length > 0;
4647
+ const corrective = reactions.signals.correction + reactions.signals.frustration + reactions.signals.jargon + reactions.signals.structure;
4648
+ if (hasFailures) {
4649
+ reasons.push({
4650
+ code: "execution-failures",
4651
+ detail: `${pipelines.failureClusters.totalFailures} execution failure(s) require a concrete edit proposal.`
4652
+ });
4653
+ }
4654
+ if (hasLoops) {
4655
+ reasons.push({
4656
+ code: "repeated-tool-loops",
4657
+ detail: `${pipelines.stuckLoops.findings.length} repeated tool-call loop(s) require a concrete edit proposal.`
4658
+ });
4659
+ }
4660
+ if (corrective > 0) {
4661
+ ids.add("knowledge-gap");
4662
+ ids.add("knowledge-poisoning");
4663
+ reasons.push({
4664
+ code: "corrective-human-feedback",
4665
+ detail: `${corrective} corrective human reaction signal(s) warrant gap and contradiction analysis.`
4666
+ });
4667
+ }
4668
+ if (hasFailures || hasLoops || corrective > 0) ids.add("improvement");
4669
+ return {
4670
+ schemaVersion: 1,
4671
+ kind: "traces.agentic_route",
4672
+ analystIds: DEFAULT_TRACE_ANALYST_KINDS.map((spec) => spec.id).filter((id) => ids.has(id)),
4673
+ reasons
4674
+ };
4675
+ }
4676
+ function traceAgenticKinds(route) {
4677
+ const selected = new Set(route.analystIds);
4678
+ return DEFAULT_TRACE_ANALYST_KINDS.filter((spec) => selected.has(spec.id));
4679
+ }
4680
+
4635
4681
  // src/analyze.ts
4636
- import { buildDefaultAnalystRegistry } from "@tangle-network/agent-eval/analyst";
4682
+ import {
4683
+ buildDefaultAnalystRegistry
4684
+ } from "@tangle-network/agent-eval/analyst";
4637
4685
  import { OtlpFileTraceStore } from "@tangle-network/agent-eval/traces";
4638
4686
  var GENERATED_TRACE_FILE_CEILING = 512 * 1024 * 1024;
4639
4687
  async function analyzeSpans(spans, opts = {}) {
@@ -4651,17 +4699,20 @@ async function analyzeSpans(spans, opts = {}) {
4651
4699
  await detStore.ensureIndexed();
4652
4700
  const detRegistry = opts.registry ?? buildDefaultAnalystRegistry({ registry: { log: opts.log } });
4653
4701
  const result = await detRegistry.run(runId, { traceStore: detStore });
4654
- if (opts.ai) {
4702
+ if (opts.ai || opts.agenticRegistry) {
4655
4703
  const agStore = new OtlpFileTraceStore({ path: otlpPath, maxFileBytes: GENERATED_TRACE_FILE_CEILING });
4656
4704
  await agStore.ensureIndexed();
4657
- const agRegistry = buildDefaultAnalystRegistry({
4705
+ const agRegistry = opts.agenticRegistry ?? buildDefaultAnalystRegistry({
4658
4706
  ai: opts.ai,
4659
4707
  model: opts.model,
4708
+ kinds: opts.agenticKinds,
4660
4709
  includeBehavioral: false,
4661
4710
  registry: { log: opts.log }
4662
4711
  });
4663
4712
  const agResult = await agRegistry.run(runId, { traceStore: agStore }, {
4664
- budget: opts.budgetUsd != null ? { totalUsd: opts.budgetUsd } : void 0
4713
+ budget: opts.budgetUsd != null ? { totalUsd: opts.budgetUsd } : void 0,
4714
+ chainFindings: true,
4715
+ ...opts.agenticPriorFindings?.length ? { priorFindings: { "*": opts.agenticPriorFindings } } : {}
4665
4716
  });
4666
4717
  result.findings.push(...agResult.findings);
4667
4718
  result.per_analyst.push(...agResult.per_analyst);
@@ -5500,6 +5551,14 @@ function renderExternal(results) {
5500
5551
  }
5501
5552
  return lines.join("\n");
5502
5553
  }
5554
+ function renderAgenticRoute(route) {
5555
+ if (!route) return "";
5556
+ const lines = ["## LLM trace analysis", ""];
5557
+ lines.push(`- **Selected analysts:** ${route.analystIds.map((id) => `\`${id}\``).join(", ")}`);
5558
+ for (const reason of route.reasons) lines.push(`- **${reason.code}:** ${reason.detail}`);
5559
+ lines.push("");
5560
+ return lines.join("\n");
5561
+ }
5503
5562
  function renderInvestigationReport(result, analystResult) {
5504
5563
  const base = `${renderReport({ ...analystResult, findings: [...result.findings] }, {
5505
5564
  harness: result.harness,
@@ -5511,7 +5570,7 @@ function renderInvestigationReport(result, analystResult) {
5511
5570
  deterministic: summarizeDeterministicSignals(result.pipelines, result.reactions),
5512
5571
  sources: result.sources
5513
5572
  })}
5514
- ${renderPipelines(result.pipelines)}
5573
+ ${renderAgenticRoute(result.agenticRoute)}${renderPipelines(result.pipelines)}
5515
5574
  ${renderReactions(result.reactions)}
5516
5575
  ${renderAdoption(result.adoption)}`;
5517
5576
  const external = renderExternal(result.external);
@@ -5567,24 +5626,29 @@ function mergeTracesConfig(opts, config) {
5567
5626
  async function runTraceInvestigation(opts) {
5568
5627
  if (opts.spans.length === 0) throw new Error("runTraceInvestigation: no spans to analyze");
5569
5628
  const generatedAt = opts.generatedAt ?? (/* @__PURE__ */ new Date()).toISOString();
5570
- const [analysis, pipelines, reactions, adoption] = await Promise.all([
5571
- analyzeSpans(opts.spans, {
5572
- ai: opts.ai,
5573
- model: opts.model,
5574
- budgetUsd: opts.budgetUsd,
5575
- registry: opts.registry,
5576
- otlpOutPath: opts.otlpOutPath,
5577
- runId: `traces-investigation-${Date.parse(generatedAt) || Date.now()}`,
5578
- log: opts.log
5579
- }),
5629
+ const [pipelines, reactions, adoption] = await Promise.all([
5580
5630
  runPipelines(opts.spans, { minLoopOccurrences: opts.minLoopOccurrences }),
5581
5631
  Promise.resolve(analyzeReactions(opts.spans)),
5582
5632
  analyzeAdoption(opts.spans, { cwds: opts.cwds })
5583
5633
  ]);
5634
+ const deterministic = deterministicFindings(pipelines, reactions, adoption);
5635
+ const agenticRoute = opts.ai && !opts.agenticRegistry ? planTraceAgenticRoute(pipelines, reactions) : void 0;
5636
+ const analysis = await analyzeSpans(opts.spans, {
5637
+ ai: opts.ai,
5638
+ model: opts.model,
5639
+ budgetUsd: opts.budgetUsd,
5640
+ registry: opts.registry,
5641
+ agenticRegistry: opts.agenticRegistry,
5642
+ agenticKinds: agenticRoute ? traceAgenticKinds(agenticRoute) : void 0,
5643
+ agenticPriorFindings: deterministic,
5644
+ otlpOutPath: opts.otlpOutPath,
5645
+ runId: `traces-investigation-${Date.parse(generatedAt) || Date.now()}`,
5646
+ log: opts.log
5647
+ });
5584
5648
  const external = opts.externalAnalyzers?.length ? await runExternalAnalyzers(analysis.otlpPath, opts.externalAnalyzers, { prompt: opts.analyzerPrompt }) : [];
5585
5649
  const findings = [
5586
5650
  ...analysis.result.findings,
5587
- ...deterministicFindings(pipelines, reactions, adoption),
5651
+ ...deterministic,
5588
5652
  ...normalizeExternalFindings(external)
5589
5653
  ];
5590
5654
  const partial = {
@@ -5602,6 +5666,7 @@ async function runTraceInvestigation(opts) {
5602
5666
  pipelines,
5603
5667
  reactions,
5604
5668
  adoption,
5669
+ ...agenticRoute ? { agenticRoute } : {},
5605
5670
  external
5606
5671
  };
5607
5672
  const result = { ...partial, report: "" };
@@ -5616,7 +5681,8 @@ async function runTraceStoreInvestigation(opts) {
5616
5681
  });
5617
5682
  const runId = opts.runId ?? `traces-store-investigation-${Date.parse(generatedAt) || Date.now()}`;
5618
5683
  const analystResult = await registry.run(runId, { traceStore: opts.traceStore }, {
5619
- budget: opts.budgetUsd != null ? { totalUsd: opts.budgetUsd } : void 0
5684
+ budget: opts.budgetUsd != null ? { totalUsd: opts.budgetUsd } : void 0,
5685
+ chainFindings: true
5620
5686
  });
5621
5687
  const packet = buildTraceFindingPacket({
5622
5688
  findings: analystResult.findings,
@@ -6678,6 +6744,8 @@ export {
6678
6744
  writeInspectionReportFile,
6679
6745
  countSkillRunsJsonl,
6680
6746
  analyzeAdoption,
6747
+ planTraceAgenticRoute,
6748
+ traceAgenticKinds,
6681
6749
  analyzeSpans,
6682
6750
  REACTIONS,
6683
6751
  analyzeReactions,
package/dist/cli.js CHANGED
@@ -40,12 +40,20 @@ import {
40
40
  writePolicyEvidenceFile,
41
41
  writeSessionIndexFile,
42
42
  writeTraceEvidenceExportFile
43
- } from "./chunk-RUG26PIS.js";
43
+ } from "./chunk-BKGWYQR4.js";
44
44
 
45
45
  // src/cli.ts
46
46
  import { readFileSync } from "fs";
47
47
  import { readFile, stat } from "fs/promises";
48
48
  import { basename, resolve } from "path";
49
+ import {
50
+ analyzeSupervisorRun,
51
+ findSupervisorRunDirs,
52
+ isUnavailable,
53
+ renderSupervisorRollupMarkdown,
54
+ renderSupervisorRunMarkdown,
55
+ rollupSupervisorRuns
56
+ } from "@tangle-network/agent-eval/supervisor-run";
49
57
  function packageVersion() {
50
58
  const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
51
59
  if (typeof pkg.version !== "string" || !pkg.version) throw new Error("package.json is missing version");
@@ -92,6 +100,9 @@ function parseArgs(argv) {
92
100
  case "--cwd":
93
101
  a.cwd = next();
94
102
  break;
103
+ case "--supervisor-run-dir":
104
+ a.supervisorRunDir = next();
105
+ break;
95
106
  case "--since":
96
107
  a.since = next();
97
108
  break;
@@ -453,6 +464,7 @@ async function loadExportAttributes(args) {
453
464
  return attributes;
454
465
  }
455
466
  async function cmdAnalyze(args) {
467
+ if (args.supervisorRunDir) return cmdAnalyzeSupervisorRun(args.supervisorRunDir, args);
456
468
  const result = await investigate(args, { loadDefaultConfig: false });
457
469
  if (args.out) {
458
470
  await saveReport(args.out, result.report);
@@ -463,6 +475,32 @@ async function cmdAnalyze(args) {
463
475
  console.log(result.report);
464
476
  }
465
477
  }
478
+ async function cmdAnalyzeSupervisorRun(runDir, args) {
479
+ const nested = await findSupervisorRunDirs(runDir);
480
+ let markdown;
481
+ if (nested.length > 0) {
482
+ markdown = renderSupervisorRollupMarkdown(
483
+ rollupSupervisorRuns(await Promise.all(nested.map((dir) => analyzeSupervisorRun(dir)))),
484
+ `Supervisor rollup \u2014 ${runDir}`
485
+ );
486
+ } else {
487
+ const report = await analyzeSupervisorRun(runDir);
488
+ if (isUnavailable(report.orchestration.workersSpawned)) {
489
+ throw new Error(
490
+ `no supervisor run found at ${runDir} \u2014 expected <runDir>/ws/.loops/supervisor/<id>, or a parent directory containing such runs`
491
+ );
492
+ }
493
+ markdown = renderSupervisorRunMarkdown(report);
494
+ }
495
+ if (args.out) {
496
+ await saveReport(args.out, markdown);
497
+ console.log(
498
+ `supervisor report \u2192 ${args.out} (${nested.length > 0 ? `${nested.length} runs` : "1 run"})`
499
+ );
500
+ } else {
501
+ console.log(markdown);
502
+ }
503
+ }
466
504
  async function collectImportedSpans(args) {
467
505
  if (!args.input) throw new Error("input file missing");
468
506
  const attributes = await loadExportAttributes(args);
@@ -787,6 +825,7 @@ function usage() {
787
825
  Commands:
788
826
  list List discovered sessions
789
827
  analyze Run analyst suite + loop/waste pipelines over sessions or an input file
828
+ (--supervisor-run-dir <dir> reports a supervision tree instead)
790
829
  investigate Run typed investigation flow, including BYO config + evidence-backed actions
791
830
  improve Write findings, evidence, report, and canonical trace artifacts
792
831
  convert Emit OTLP-JSONL only (HALO: use analyze --analyzer halo)
@@ -804,6 +843,10 @@ Options:
804
843
  --last <n> Most-recent N sessions
805
844
  --session <id|path> Analyze one listed session ID or one explicit harness session file
806
845
  --cwd <dir> Filter sessions by working directory
846
+ --supervisor-run-dir <dir>
847
+ analyze: report a SUPERVISION TREE instead of harness sessions \u2014
848
+ steers, spawn waves, concurrency, idle wall, cost by role,
849
+ accepted vs rejected. Rolls up when the dir holds many runs.
807
850
  --since <t> upload: window, 30m / 2h / 7d or an ISO date (default 24h); analyze: ISO cutoff
808
851
  --out <path> Write report to a file
809
852
  --dir <path> improve: write artifacts to this directory
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { ToolUseMetrics, InMemoryTraceStore } from '@tangle-network/agent-eval';
2
2
  import { StuckLoopReport, FailureClusterReport } from '@tangle-network/agent-eval/pipelines';
3
+ import { TraceAnalystKindSpec, AnalystRegistry, AnalystFinding, buildDefaultAnalystRegistry, AnalystRunResult, Analyst } from '@tangle-network/agent-eval/analyst';
4
+ export { Analyst, AnalystContext, AnalystFinding, AnalystRegistry, buildDefaultAnalystRegistry, makeFinding } from '@tangle-network/agent-eval/analyst';
3
5
  import { AxAIService } from '@ax-llm/ax';
4
6
  import { ExecutionReport } from '@tangle-network/agent-eval/contract';
5
- import { AnalystRegistry, buildDefaultAnalystRegistry, AnalystFinding, AnalystRunResult, Analyst } from '@tangle-network/agent-eval/analyst';
6
- export { Analyst, AnalystContext, AnalystFinding, AnalystRegistry, buildDefaultAnalystRegistry, makeFinding } from '@tangle-network/agent-eval/analyst';
7
7
  import { TraceAnalysisStore, RedactionRule, RedactionReport } from '@tangle-network/agent-eval/traces';
8
8
  export { DEFAULT_REDACTION_RULES, RedactionReport, RedactionRule, redactString, redactValue } from '@tangle-network/agent-eval/traces';
9
9
  import { TraceSpanEvent } from '@tangle-network/agent-eval/hosted';
@@ -874,6 +874,31 @@ interface AdoptionOptions {
874
874
  }
875
875
  declare function analyzeAdoption(spans: readonly OtlpSpan[], opts?: AdoptionOptions): Promise<AdoptionReport>;
876
876
 
877
+ type TraceAgenticRouteReasonCode = 'requested-baseline' | 'execution-failures' | 'repeated-tool-loops' | 'corrective-human-feedback';
878
+ interface TraceAgenticRouteReason {
879
+ readonly code: TraceAgenticRouteReasonCode;
880
+ readonly detail: string;
881
+ }
882
+ /** A deterministic selection record for the agent-eval trace analysts. */
883
+ interface TraceAgenticRoute {
884
+ readonly schemaVersion: 1;
885
+ readonly kind: 'traces.agentic_route';
886
+ /** Agent ids in execution order. Later agents receive earlier findings. */
887
+ readonly analystIds: readonly string[];
888
+ /** Why each extra analyst earned model spend. */
889
+ readonly reasons: readonly TraceAgenticRouteReason[];
890
+ }
891
+ /**
892
+ * Select the smallest useful agent-eval trace-analysis suite.
893
+ *
894
+ * A caller explicitly requesting LLM analysis always gets one failure-mode
895
+ * pass. The remaining lenses require a local signal first, and the edit
896
+ * designer runs only when there is something concrete to improve.
897
+ */
898
+ declare function planTraceAgenticRoute(pipelines: PipelineReport, reactions: ReactionReport): TraceAgenticRoute;
899
+ /** Resolve a route into the maintained agent-eval kind specifications. */
900
+ declare function traceAgenticKinds(route: TraceAgenticRoute): readonly TraceAnalystKindSpec[];
901
+
877
902
  /**
878
903
  * Project normalized `OtlpSpan[]` onto agent-eval's runtime trace store.
879
904
  *
@@ -920,6 +945,13 @@ interface AnalyzeOptions {
920
945
  * `@tangle-network/agent-eval`'s `AnalystRegistry`.
921
946
  */
922
947
  registry?: AnalystRegistry;
948
+ /** Agentic registry override. Unlike `registry`, this runs after the local
949
+ * deterministic pass and receives its compact findings as prior context. */
950
+ agenticRegistry?: AnalystRegistry;
951
+ /** Select a subset of agent-eval's maintained trace analyst kinds. */
952
+ agenticKinds?: readonly TraceAnalystKindSpec[];
953
+ /** Compact deterministic findings that agents receive before reading spans. */
954
+ agenticPriorFindings?: readonly AnalystFinding[];
923
955
  /** Where to write the OTLP-JSONL artifact. Defaults to a temp file. */
924
956
  otlpOutPath?: string;
925
957
  runId?: string;
@@ -1453,6 +1485,8 @@ interface TraceInvestigationOptions {
1453
1485
  readonly model?: string;
1454
1486
  readonly budgetUsd?: number;
1455
1487
  readonly registry?: AnalystRegistry;
1488
+ /** Agentic registry override for custom trace-analysis agents. */
1489
+ readonly agenticRegistry?: AnalystRegistry;
1456
1490
  readonly externalAnalyzers?: readonly ExternalAnalyzer[];
1457
1491
  readonly analyzerPrompt?: string;
1458
1492
  readonly otlpOutPath?: string;
@@ -1492,6 +1526,8 @@ interface TraceInvestigationResult {
1492
1526
  readonly pipelines: PipelineReport;
1493
1527
  readonly reactions: ReactionReport;
1494
1528
  readonly adoption: AdoptionReport;
1529
+ /** Deterministic routing record for the agentic trace-analysis pass. */
1530
+ readonly agenticRoute?: TraceAgenticRoute;
1495
1531
  readonly external: readonly ExternalAnalysisResult[];
1496
1532
  readonly report: string;
1497
1533
  }
@@ -1744,4 +1780,4 @@ interface ExecuteOptions {
1744
1780
  /** Send the final, new outbound items (or write their dry-run OTLP). */
1745
1781
  declare function executeUpload(plan: UploadPlan, opts?: ExecuteOptions): Promise<UploadResult>;
1746
1782
 
1747
- export { ACTOR_ATTR, ATTR, type Actor, type AdoptionOptions, type AdoptionReport, AmpAdapter, type AnalyzeOptions, type AnalyzeResult, type BuildPolicyEvidenceOptions, type BuildSessionIndexOptions, type BuildTraceFindingPacketOptions, CODING_REDACTION_RULES, CONTENT_CAP, CORRECTIVE_REACTIONS, ClaudeAdapter, CodexAdapter, type CollectOptions, type CollectPolicyEvidenceOptions, type CollectSessionIndexOptions, CopilotAdapter, type CorruptionMode, DEFAULT_HARNESS, EmptySessionError, type ExecuteOptions, type ExternalAnalysisResult, type ExternalAnalyzer, FactoryAdapter, ForgeAdapter, GeminiAdapter, type HarnessTraceAdapter, INGEST_SOURCE_CLI, type InspectSessionIndexOptions, JsonSourceError, type JsonlCorruptionReceipt, JsonlParseError, type JsonlReadOptions, type LiveBatchOptions, type LocateOptions, type ObservedLoop, type ObserverOptions, OpencodeAdapter, type OtlpSpan, type OtlpSpanKind, type OtlpStatusCode, type ParseOptions, PartialUploadError, PiAdapter, type PipelineOptions, type PipelineReport, type PlanOptions, type PolicyEvidenceLoopSummary, type PolicyEvidenceRecord, type PolicyEvidenceToolSummary, QwenAdapter, REACTIONS, type Reaction, type ReactionReport, type ReactionSessionReport, type Redactor, type RepoAttrs, type RepoResolution, type RepoResolutionSource, type RunResult, type RuntimeTrace, type ScanOptions, type ScannedSession, type SessionBatch, type SessionCorruptionReceipt, type SessionIdentityConflict, type SessionIdentityIndex, type SessionIntegrity, type SessionRef, type SpanInput, type SpanRedaction, TRACES_REDACTION_RULES, type TraceContextIndex, type TraceContextRoot, type TraceEvidenceExportOptions, type TraceEvidenceExportResult, type TraceEvidenceFormatOption, type TraceEvidenceInputFormat, type TraceEvidenceRow, type TraceExecutionOptions, type TraceFindingPacket, type TraceImprovementArtifacts, type TraceImprovementOptions, type TraceImprovementResult, type TraceIndexedFile, type TraceInspectionArea, type TraceInspectionFinding, type TraceInspectionReport, type TraceInspectionSeverity, type TraceInvestigationOptions, type TraceInvestigationResult, type TraceLiveAction, type TraceLiveActionKind, type TraceLiveAnalysisContext, type TraceLiveAnalyst, type TraceLiveBatch, type TraceLiveEvidence, type TraceLiveFinding, type TraceLiveLoop, type TraceLiveSeverity, type TraceSessionIndex, type TraceSessionIndexRow, type TraceStoreInvestigationOptions, type TraceStoreInvestigationResult, type TraceStreamEvent, type TraceStreamOptions, type TraceStreamReplayOptions, type TraceStreamSession, type TracesConfig, type TriggerPair, type UploadBackend, type UploadIdentity, type UploadItem, type UploadPlan, type UploadRecord, type UploadResult, type UploadState, type UserPromptInput, alreadyUploaded, analyzeAdoption, analyzeLiveBatch, analyzeReactions, analyzeSpans, applyRedactor, buildPolicyEvidenceRecord, buildSessionIndex, buildSessionIndexFromRows, buildTraceFindingPacket, capText, classifyLiveActions, classifyReaction, claudeActor, codexActor, collectPolicyEvidence, collectSessionIndex, collectSessions, commandAnalyzer, commandRedactor, countSkillRunsJsonl, cwdMatchesSelection, defaultTraceLiveAnalysts, equivalentGitCwds, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, haloAnalyzer, indexSessionIdsByTrace, inspectSessionIndex, knownHarnesses, listAdapters, loadState, loadTracesConfig, locateSessions, looksLikeAgentPrompt, mergeTracesConfig, normalizeRemote, outboundHash, parseIsoToEpochMs, parseSession, parseSince, planUpload, readJsonFile, readJsonl, readSessionIndexFile, recordSessionCorruption, redactSpans, renderInspectionReport, resolveAdapter, resolveRepoAttrs, resolveSessionRepoAttrs, runCommand, runExternalAnalyzers, runPipelines, runTraceImprovement, runTraceInvestigation, runTraceStoreInvestigation, saveReport, saveState, scanSessions, selectAdapters, serializeInspectionReport, serializePolicyEvidence, serializeSessionIndex, serializeSpans, serializeTraceStreamEvent, sessionHash, sessionIdFromAttributes, sessionIntegrityAttributes, span, stampRepoAttrs, stampSessionIdentity, stampSessionIntegrity, stampSpanWorkdirRepoAttrs, streamSessions, summarizeOtlpExecution, summarizeSpanExecution, takeJsonl, textIsSynthetic, toOpenInferenceSpan, toRuntimeStore, toTraceSpanEvents, traceStreamEventsFromSpans, uploadKey, userPromptSpan, watchSessions, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts };
1783
+ export { ACTOR_ATTR, ATTR, type Actor, type AdoptionOptions, type AdoptionReport, AmpAdapter, type AnalyzeOptions, type AnalyzeResult, type BuildPolicyEvidenceOptions, type BuildSessionIndexOptions, type BuildTraceFindingPacketOptions, CODING_REDACTION_RULES, CONTENT_CAP, CORRECTIVE_REACTIONS, ClaudeAdapter, CodexAdapter, type CollectOptions, type CollectPolicyEvidenceOptions, type CollectSessionIndexOptions, CopilotAdapter, type CorruptionMode, DEFAULT_HARNESS, EmptySessionError, type ExecuteOptions, type ExternalAnalysisResult, type ExternalAnalyzer, FactoryAdapter, ForgeAdapter, GeminiAdapter, type HarnessTraceAdapter, INGEST_SOURCE_CLI, type InspectSessionIndexOptions, JsonSourceError, type JsonlCorruptionReceipt, JsonlParseError, type JsonlReadOptions, type LiveBatchOptions, type LocateOptions, type ObservedLoop, type ObserverOptions, OpencodeAdapter, type OtlpSpan, type OtlpSpanKind, type OtlpStatusCode, type ParseOptions, PartialUploadError, PiAdapter, type PipelineOptions, type PipelineReport, type PlanOptions, type PolicyEvidenceLoopSummary, type PolicyEvidenceRecord, type PolicyEvidenceToolSummary, QwenAdapter, REACTIONS, type Reaction, type ReactionReport, type ReactionSessionReport, type Redactor, type RepoAttrs, type RepoResolution, type RepoResolutionSource, type RunResult, type RuntimeTrace, type ScanOptions, type ScannedSession, type SessionBatch, type SessionCorruptionReceipt, type SessionIdentityConflict, type SessionIdentityIndex, type SessionIntegrity, type SessionRef, type SpanInput, type SpanRedaction, TRACES_REDACTION_RULES, type TraceAgenticRoute, type TraceAgenticRouteReason, type TraceAgenticRouteReasonCode, type TraceContextIndex, type TraceContextRoot, type TraceEvidenceExportOptions, type TraceEvidenceExportResult, type TraceEvidenceFormatOption, type TraceEvidenceInputFormat, type TraceEvidenceRow, type TraceExecutionOptions, type TraceFindingPacket, type TraceImprovementArtifacts, type TraceImprovementOptions, type TraceImprovementResult, type TraceIndexedFile, type TraceInspectionArea, type TraceInspectionFinding, type TraceInspectionReport, type TraceInspectionSeverity, type TraceInvestigationOptions, type TraceInvestigationResult, type TraceLiveAction, type TraceLiveActionKind, type TraceLiveAnalysisContext, type TraceLiveAnalyst, type TraceLiveBatch, type TraceLiveEvidence, type TraceLiveFinding, type TraceLiveLoop, type TraceLiveSeverity, type TraceSessionIndex, type TraceSessionIndexRow, type TraceStoreInvestigationOptions, type TraceStoreInvestigationResult, type TraceStreamEvent, type TraceStreamOptions, type TraceStreamReplayOptions, type TraceStreamSession, type TracesConfig, type TriggerPair, type UploadBackend, type UploadIdentity, type UploadItem, type UploadPlan, type UploadRecord, type UploadResult, type UploadState, type UserPromptInput, alreadyUploaded, analyzeAdoption, analyzeLiveBatch, analyzeReactions, analyzeSpans, applyRedactor, buildPolicyEvidenceRecord, buildSessionIndex, buildSessionIndexFromRows, buildTraceFindingPacket, capText, classifyLiveActions, classifyReaction, claudeActor, codexActor, collectPolicyEvidence, collectSessionIndex, collectSessions, commandAnalyzer, commandRedactor, countSkillRunsJsonl, cwdMatchesSelection, defaultTraceLiveAnalysts, equivalentGitCwds, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, haloAnalyzer, indexSessionIdsByTrace, inspectSessionIndex, knownHarnesses, listAdapters, loadState, loadTracesConfig, locateSessions, looksLikeAgentPrompt, mergeTracesConfig, normalizeRemote, outboundHash, parseIsoToEpochMs, parseSession, parseSince, planTraceAgenticRoute, planUpload, readJsonFile, readJsonl, readSessionIndexFile, recordSessionCorruption, redactSpans, renderInspectionReport, resolveAdapter, resolveRepoAttrs, resolveSessionRepoAttrs, runCommand, runExternalAnalyzers, runPipelines, runTraceImprovement, runTraceInvestigation, runTraceStoreInvestigation, saveReport, saveState, scanSessions, selectAdapters, serializeInspectionReport, serializePolicyEvidence, serializeSessionIndex, serializeSpans, serializeTraceStreamEvent, sessionHash, sessionIdFromAttributes, sessionIntegrityAttributes, span, stampRepoAttrs, stampSessionIdentity, stampSessionIntegrity, stampSpanWorkdirRepoAttrs, streamSessions, summarizeOtlpExecution, summarizeSpanExecution, takeJsonl, textIsSynthetic, toOpenInferenceSpan, toRuntimeStore, toTraceSpanEvents, traceAgenticKinds, traceStreamEventsFromSpans, uploadKey, userPromptSpan, watchSessions, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts };
package/dist/index.js CHANGED
@@ -64,6 +64,7 @@ import {
64
64
  parseIsoToEpochMs,
65
65
  parseSession,
66
66
  parseSince,
67
+ planTraceAgenticRoute,
67
68
  planUpload,
68
69
  readJsonFile,
69
70
  readJsonl,
@@ -105,6 +106,7 @@ import {
105
106
  toOpenInferenceSpan,
106
107
  toRuntimeStore,
107
108
  toTraceSpanEvents,
109
+ traceAgenticKinds,
108
110
  traceStreamEventsFromSpans,
109
111
  uploadKey,
110
112
  userPromptSpan,
@@ -115,7 +117,7 @@ import {
115
117
  writeSessionIndexFile,
116
118
  writeTraceEvidenceExportFile,
117
119
  writeTraceImprovementArtifacts
118
- } from "./chunk-RUG26PIS.js";
120
+ } from "./chunk-BKGWYQR4.js";
119
121
 
120
122
  // src/collect.ts
121
123
  async function collectSessions(opts = {}) {
@@ -212,6 +214,7 @@ export {
212
214
  parseIsoToEpochMs,
213
215
  parseSession,
214
216
  parseSince,
217
+ planTraceAgenticRoute,
215
218
  planUpload,
216
219
  readJsonFile,
217
220
  readJsonl,
@@ -255,6 +258,7 @@ export {
255
258
  toOpenInferenceSpan,
256
259
  toRuntimeStore,
257
260
  toTraceSpanEvents,
261
+ traceAgenticKinds,
258
262
  traceStreamEventsFromSpans,
259
263
  uploadKey,
260
264
  userPromptSpan,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/traces",
3
- "version": "0.9.2",
3
+ "version": "0.9.4",
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",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "dependencies": {
47
47
  "@ax-llm/ax": "^23.0.1",
48
- "@tangle-network/agent-eval": "^0.122.8"
48
+ "@tangle-network/agent-eval": "^0.124.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^22.0.0",