@tangle-network/traces 0.10.1 → 0.10.2

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
@@ -376,6 +376,8 @@ See [`examples/external-engines.ts`](./examples/external-engines.ts).
376
376
  > The built-in agentic analysts (`--llm`) run on the Tangle router by default: set `TANGLE_API_KEY`.
377
377
  > `OPENAI_API_KEY` alone targets OpenAI instead, and `OPENAI_BASE_URL` overrides the endpoint for any other OpenAI-compatible gateway.
378
378
  > `--llm` also needs a Python interpreter with `agent-eval-rpc[dspy]` installed, because agent-eval's model-backed analysts run through the DSPy RLM engine out of process; set `TRACES_PYTHON` to choose the interpreter.
379
+ > The bridge protocol is version-locked: install the exact version matching this package's `@tangle-network/agent-eval` dependency (`pip install "agent-eval-rpc[dspy]==$(npm view @tangle-network/traces dependencies.@tangle-network/agent-eval)"`) — a skewed bridge kills every agentic analyst at startup.
380
+ > When `--llm` was requested and every agentic analyst fails, `analyze`/`investigate`/`improve` still write the deterministic report, then exit 1 with each analyst's underlying error.
379
381
  > Every deterministic command — `list`, `analyze` without `--llm`, `convert`, `index`, `inspect`, `export`, `evidence`, `stream`, `watch`, `analyze --supervisor-run-dir` — needs neither a key nor Python.
380
382
 
381
383
  ## Agent skills
@@ -8973,6 +8973,7 @@ async function analyzeSpans(spans, opts = {}) {
8973
8973
  const detRegistry = opts.registry ?? buildDefaultAnalystRegistry({ registry: { log: opts.log } });
8974
8974
  const result = await detRegistry.run(runId, { traceStore: detStore }, { signal: opts.signal });
8975
8975
  opts.signal?.throwIfAborted();
8976
+ let agenticPerAnalyst;
8976
8977
  if (opts.engine || opts.agenticRegistry) {
8977
8978
  const agStore = new OtlpFileTraceStore({ path: otlpPath, maxFileBytes: GENERATED_TRACE_FILE_CEILING });
8978
8979
  await agStore.ensureIndexed();
@@ -8988,6 +8989,7 @@ async function analyzeSpans(spans, opts = {}) {
8988
8989
  signal: opts.signal,
8989
8990
  ...opts.agenticPriorFindings?.length ? { priorFindings: { "*": opts.agenticPriorFindings } } : {}
8990
8991
  });
8992
+ agenticPerAnalyst = [...agResult.per_analyst];
8991
8993
  result.findings.push(...agResult.findings);
8992
8994
  result.per_analyst.push(...agResult.per_analyst);
8993
8995
  const totalCostUsd = result.total_cost_usd + agResult.total_cost_usd;
@@ -8999,7 +9001,7 @@ async function analyzeSpans(spans, opts = {}) {
8999
9001
  result.total_cost_usd = totalCostUsd;
9000
9002
  }
9001
9003
  opts.signal?.throwIfAborted();
9002
- return { otlpPath, execution, result };
9004
+ return { otlpPath, execution, result, ...agenticPerAnalyst ? { agenticPerAnalyst } : {} };
9003
9005
  }
9004
9006
 
9005
9007
  // src/reactions.ts
@@ -9125,6 +9127,27 @@ function workflowIssueText(issue) {
9125
9127
  function tableCell(value) {
9126
9128
  return value.replace(/\s+/g, " ").replaceAll("|", "\\|").trim();
9127
9129
  }
9130
+ var ANALYST_DETAIL_MAX_CHARS = 240;
9131
+ var BRIDGE_FAILURE_MARKER = "DSPY-BRIDGE-FAILURE:";
9132
+ function condenseAnalystError(raw, maxChars) {
9133
+ const flat = raw.replace(/\s+/g, " ").trim();
9134
+ const marker = flat.indexOf(BRIDGE_FAILURE_MARKER);
9135
+ let text2 = flat;
9136
+ if (marker >= 0) {
9137
+ const fromMarker = flat.slice(marker);
9138
+ const traceback = fromMarker.indexOf(" Traceback (most recent call last)");
9139
+ text2 = traceback > 0 ? fromMarker.slice(0, traceback) : fromMarker;
9140
+ }
9141
+ const chars = [...text2];
9142
+ if (chars.length <= maxChars) return text2;
9143
+ const headChars = Math.floor(maxChars * 0.4);
9144
+ return `${chars.slice(0, headChars).join("")} \u2026 ${chars.slice(chars.length - (maxChars - headChars)).join("")}`;
9145
+ }
9146
+ function analystRunDetail(summary) {
9147
+ const raw = summary.status === "failed" && summary.error ? [summary.error.class, summary.error.message].map((part) => part.trim()).filter(Boolean).join(": ") : summary.status === "skipped" && summary.reason ? summary.reason : "";
9148
+ const cell = tableCell(condenseAnalystError(raw, ANALYST_DETAIL_MAX_CHARS));
9149
+ return cell === "" ? "\u2014" : cell;
9150
+ }
9128
9151
  function count(value) {
9129
9152
  return Math.round(value).toLocaleString("en-US");
9130
9153
  }
@@ -9333,10 +9356,10 @@ function renderReport(result, meta) {
9333
9356
  }
9334
9357
  }
9335
9358
  }
9336
- lines.push("| Analyst | Status | Findings | Latency |");
9337
- lines.push("|---|---|---|---|");
9359
+ lines.push("| Analyst | Status | Findings | Latency | Detail |");
9360
+ lines.push("|---|---|---|---|---|");
9338
9361
  for (const s of result.per_analyst) {
9339
- lines.push(`| \`${s.analyst_id}\` | ${s.status} | ${s.findings_count} | ${s.latency_ms}ms |`);
9362
+ lines.push(`| \`${s.analyst_id}\` | ${s.status} | ${s.findings_count} | ${s.latency_ms}ms | ${analystRunDetail(s)} |`);
9340
9363
  }
9341
9364
  lines.push("");
9342
9365
  if (findings.length === 0 && deterministic.totalSignals === 0) {
@@ -10015,11 +10038,32 @@ async function runTraceInvestigation(opts) {
10015
10038
  reactions,
10016
10039
  adoption,
10017
10040
  ...agenticRoute ? { agenticRoute } : {},
10041
+ ...analysis.agenticPerAnalyst ? { agenticPerAnalyst: analysis.agenticPerAnalyst } : {},
10018
10042
  external
10019
10043
  };
10020
10044
  const result = { ...partial, report: "" };
10021
10045
  return { ...result, report: renderInvestigationReport(result, analysis.result) };
10022
10046
  }
10047
+ var AGENTIC_FAILURE_REASON_MAX_CHARS = 400;
10048
+ var BRIDGE_MISMATCH_PATTERN = /must contain exactly|No module named ['"]?agent_eval_rpc|could not start/;
10049
+ function condensedReason(summary) {
10050
+ const raw = summary.status === "skipped" ? `skipped \u2014 ${summary.reason ?? "no reason recorded"}` : summary.error ? `${summary.error.class}: ${summary.error.message}` : "failed without an error message";
10051
+ return condenseAnalystError(raw, AGENTIC_FAILURE_REASON_MAX_CHARS);
10052
+ }
10053
+ function totalAgenticFailureMessage(agenticPerAnalyst, opts = {}) {
10054
+ if (!agenticPerAnalyst || agenticPerAnalyst.length === 0) return void 0;
10055
+ if (agenticPerAnalyst.some((summary) => summary.status === "ok")) return void 0;
10056
+ const lines = [
10057
+ `LLM analysis produced nothing: none of the ${agenticPerAnalyst.length} agentic analyst(s) succeeded. The reported findings are from the deterministic pass only.`,
10058
+ ...agenticPerAnalyst.map((summary) => ` ${summary.analyst_id}: ${condensedReason(summary)}`)
10059
+ ];
10060
+ if (opts.requiredBridgeVersion && agenticPerAnalyst.some((summary) => BRIDGE_MISMATCH_PATTERN.test(summary.error?.message ?? ""))) {
10061
+ lines.push(
10062
+ `hint: the DSPy bridge protocol is version-locked \u2014 the TRACES_PYTHON interpreter needs agent-eval-rpc[dspy]==${opts.requiredBridgeVersion} (matching this package's @tangle-network/agent-eval).`
10063
+ );
10064
+ }
10065
+ return lines.join("\n");
10066
+ }
10023
10067
  async function runTraceStoreInvestigation(opts) {
10024
10068
  opts.signal?.throwIfAborted();
10025
10069
  const generatedAt = opts.generatedAt ?? (/* @__PURE__ */ new Date()).toISOString();
@@ -11527,6 +11571,7 @@ export {
11527
11571
  loadTracesConfig,
11528
11572
  mergeTracesConfig,
11529
11573
  runTraceInvestigation,
11574
+ totalAgenticFailureMessage,
11530
11575
  runTraceStoreInvestigation,
11531
11576
  writeTraceImprovementArtifacts,
11532
11577
  runTraceImprovement,
package/dist/cli.js CHANGED
@@ -37,6 +37,7 @@ import {
37
37
  serializeTraceStreamEvent,
38
38
  sessionIdFromAttributes,
39
39
  streamSessions,
40
+ totalAgenticFailureMessage,
40
41
  traceStreamEventsFromSpans,
41
42
  watchSessions,
42
43
  writeInspectionReportFile,
@@ -44,7 +45,7 @@ import {
44
45
  writePolicyEvidenceFile,
45
46
  writeSessionIndexFile,
46
47
  writeTraceEvidenceExportFile
47
- } from "./chunk-7BQ2CVEA.js";
48
+ } from "./chunk-LC66I5TE.js";
48
49
 
49
50
  // src/cli.ts
50
51
  import { readFileSync } from "fs";
@@ -347,7 +348,7 @@ async function resolveSelectedSession(args) {
347
348
  `session ID "${args.session}" is ambiguous across ${matches.length} files; select one harness or pass its explicit session path`
348
349
  );
349
350
  }
350
- function buildAnalysisEngine(model) {
351
+ function buildAnalysisEngine(model, budgetUsd) {
351
352
  const tangleKey = process.env.TANGLE_API_KEY;
352
353
  const openAiKey = process.env.OPENAI_API_KEY;
353
354
  const apiKey = tangleKey || openAiKey;
@@ -362,9 +363,37 @@ function buildAnalysisEngine(model) {
362
363
  apiKey,
363
364
  baseUrl,
364
365
  model,
366
+ // agent-eval 0.139.3's engine defaults are tuned below what real runs
367
+ // need. maxOutputTokens 4096 is under what current coding models emit for
368
+ // one findings array: glm-5.2 counts reasoning tokens in
369
+ // completion_tokens, the first oversized completion breaches its cost
370
+ // reservation, and the fail-closed ledger then refuses every later call
371
+ // in the run.
372
+ maxOutputTokens: 16384,
373
+ // maxCostUsd defaults to $1 per analyst — a proxy-side ceiling separate
374
+ // from --budget. With the larger token cap the per-call reservation grows
375
+ // ~4x, so that default binds before the registry's --budget allocation
376
+ // and kills analysts mid-run. --budget is the operator's spend authority
377
+ // and the registry still splits it across analysts, so forwarding it here
378
+ // only stops the engine's own default from cutting runs short.
379
+ ...budgetUsd !== void 0 && Number.isFinite(budgetUsd) && budgetUsd > 0 ? { maxCostUsd: budgetUsd } : {},
365
380
  ...python ? { runner: { command: python } } : {}
366
381
  });
367
382
  }
383
+ function requiredBridgeVersion() {
384
+ const pkg = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
385
+ const version = pkg.dependencies?.["@tangle-network/agent-eval"];
386
+ if (typeof version !== "string" || !version) {
387
+ throw new Error("package.json is missing the @tangle-network/agent-eval dependency");
388
+ }
389
+ return version;
390
+ }
391
+ function assertAgenticAnalystsRan(args, agenticPerAnalyst) {
392
+ if (!args.llm) return;
393
+ if (!totalAgenticFailureMessage(agenticPerAnalyst)) return;
394
+ const message = totalAgenticFailureMessage(agenticPerAnalyst, { requiredBridgeVersion: requiredBridgeVersion() });
395
+ throw new Error(message);
396
+ }
368
397
  async function cmdList(args) {
369
398
  const groups = await discover({ ...args, last: args.last || 20 });
370
399
  for (const { adapter, refs } of groups) {
@@ -636,6 +665,7 @@ async function cmdAnalyze(args) {
636
665
  } else {
637
666
  console.log(result.report);
638
667
  }
668
+ assertAgenticAnalystsRan(args, result.agenticPerAnalyst);
639
669
  }
640
670
  async function cmdAnalyzeSupervisorRun(runDir, args) {
641
671
  const nested = await findSupervisorRunDirs(runDir);
@@ -692,6 +722,13 @@ async function collectImportedSpans(args) {
692
722
  }, spans, sessionId))
693
723
  };
694
724
  }
725
+ function analystLog(msg, fields) {
726
+ const error = typeof fields?.error === "string" && fields.error ? fields.error : void 0;
727
+ const errorClass = typeof fields?.error_class === "string" && fields.error_class ? `${fields.error_class}: ` : "";
728
+ process.stderr.write(error ? `${msg} \u2014 ${errorClass}${error}
729
+ ` : `${msg}
730
+ `);
731
+ }
695
732
  function externalAnalyzersFromArgs(args) {
696
733
  return args.analyzers.map(
697
734
  (spec) => spec === "halo" ? haloAnalyzer({ defaultPrompt: args.analyzerPrompt, model: args.model }) : spec === "hodoscope" ? hodoscopeAnalyzer({ summarizeModel: args.model }) : commandAnalyzer({ name: spec, command: spec, args: (p, prompt) => prompt ? [p, prompt] : [p] })
@@ -705,13 +742,14 @@ async function cmdInvestigate(args) {
705
742
  } else {
706
743
  console.log(result.report);
707
744
  }
745
+ assertAgenticAnalystsRan(args, result.agenticPerAnalyst);
708
746
  }
709
747
  async function investigate(args, options = {}) {
710
748
  const { spans, harness, cwds, sources, workflow } = await collectSpans(args);
711
749
  if (spans.length === 0) throw new Error("no spans found for the given selection");
712
750
  const config = args.config !== void 0 || options.loadDefaultConfig !== false ? await loadTracesConfig(args.config) : void 0;
713
751
  const analystModel = args.model ?? process.env.TRACES_ANALYST_MODEL ?? DEFAULT_ANALYST_MODEL;
714
- const engine = args.llm ? buildAnalysisEngine(analystModel) : void 0;
752
+ const engine = args.llm ? buildAnalysisEngine(analystModel, args.budget) : void 0;
715
753
  return runTraceInvestigation(mergeTracesConfig({
716
754
  spans,
717
755
  harness,
@@ -725,8 +763,7 @@ async function investigate(args, options = {}) {
725
763
  otlpOutPath: args.otlp,
726
764
  externalAnalyzers: externalAnalyzersFromArgs(args),
727
765
  analyzerPrompt: args.analyzerPrompt,
728
- log: (msg) => process.stderr.write(`${msg}
729
- `)
766
+ log: analystLog
730
767
  }, config));
731
768
  }
732
769
  async function cmdImprove(args) {
@@ -734,7 +771,7 @@ async function cmdImprove(args) {
734
771
  if (spans.length === 0) throw new Error("no spans found for the given selection");
735
772
  const config = await loadTracesConfig(args.config);
736
773
  const analystModel = args.model ?? process.env.TRACES_ANALYST_MODEL ?? DEFAULT_ANALYST_MODEL;
737
- const engine = args.llm ? buildAnalysisEngine(analystModel) : void 0;
774
+ const engine = args.llm ? buildAnalysisEngine(analystModel, args.budget) : void 0;
738
775
  const result = await runTraceImprovement({
739
776
  ...mergeTracesConfig({
740
777
  spans,
@@ -749,8 +786,7 @@ async function cmdImprove(args) {
749
786
  otlpOutPath: args.otlp,
750
787
  externalAnalyzers: externalAnalyzersFromArgs(args),
751
788
  analyzerPrompt: args.analyzerPrompt,
752
- log: (msg) => process.stderr.write(`${msg}
753
- `)
789
+ log: analystLog
754
790
  }, config),
755
791
  outDir: args.dir ?? args.out
756
792
  });
@@ -759,6 +795,7 @@ async function cmdImprove(args) {
759
795
  console.log(
760
796
  `improvement artifacts \u2192 ${dir} (${result.findings.length} findings with actions and checks, OTLP: ${result.otlpPath})`
761
797
  );
798
+ assertAgenticAnalystsRan(args, result.agenticPerAnalyst);
762
799
  }
763
800
  function summarizeFindingEvidence(finding) {
764
801
  const first = finding.evidence[0];
@@ -1051,7 +1088,9 @@ Options:
1051
1088
  --llm Enable agentic RLM analysts. Runs on the Tangle router by
1052
1089
  default (TANGLE_API_KEY); OPENAI_API_KEY alone targets OpenAI,
1053
1090
  OPENAI_BASE_URL overrides the endpoint. Needs Python with
1054
- agent-eval-rpc[dspy] (TRACES_PYTHON selects the interpreter).
1091
+ agent-eval-rpc[dspy] (TRACES_PYTHON selects the interpreter),
1092
+ version-matched to this package's @tangle-network/agent-eval.
1093
+ Exits 1 when every agentic analyst fails, with each reason.
1055
1094
  --model <id> Model for --llm, HALO, and Hodoscope (default for --llm: ${DEFAULT_ANALYST_MODEL})
1056
1095
  --config <path> investigate/improve/stream: JS config with analysts, liveAnalysts, or external analyzers
1057
1096
  --budget <usd> USD cap for agentic analysts
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ToolUseMetrics, InMemoryTraceStore } from '@tangle-network/agent-eval';
2
2
  import { StuckLoopReport, FailureClusterReport } from '@tangle-network/agent-eval/pipelines';
3
- import { TraceAnalystDefinition, TraceAnalysisEngine, AnalystRegistry, AnalystFinding, buildDefaultAnalystRegistry, AnalystRunResult, Analyst } from '@tangle-network/agent-eval/analyst';
3
+ import { TraceAnalystDefinition, TraceAnalysisEngine, AnalystRegistry, AnalystFinding, buildDefaultAnalystRegistry, AnalystRunSummary, AnalystRunResult, Analyst } from '@tangle-network/agent-eval/analyst';
4
4
  export { Analyst, AnalystContext, AnalystFinding, AnalystRegistry, buildDefaultAnalystRegistry, makeFinding } from '@tangle-network/agent-eval/analyst';
5
5
  import { ExecutionReport } from '@tangle-network/agent-eval/contract';
6
6
  import { TraceAnalysisStore, RedactionRule, RedactionReport } from '@tangle-network/agent-eval/traces';
@@ -1223,6 +1223,13 @@ interface AnalyzeResult {
1223
1223
  otlpPath: string;
1224
1224
  execution: ExecutionReport;
1225
1225
  result: Awaited<ReturnType<ReturnType<typeof buildDefaultAnalystRegistry>['run']>>;
1226
+ /**
1227
+ * Per-analyst summaries from the agentic pass alone (also merged into
1228
+ * `result.per_analyst`). Present only when an agentic pass ran; callers use
1229
+ * it to tell "the engine produced nothing" apart from "deterministic-only
1230
+ * run", which the merged list cannot express.
1231
+ */
1232
+ agenticPerAnalyst?: readonly AnalystRunSummary[];
1226
1233
  }
1227
1234
  declare function analyzeSpans(spans: readonly OtlpSpan[], opts?: AnalyzeOptions): Promise<AnalyzeResult>;
1228
1235
 
@@ -1880,6 +1887,13 @@ interface TraceInvestigationResult {
1880
1887
  readonly adoption: AdoptionReport;
1881
1888
  /** Deterministic routing record for the agentic trace-analysis pass. */
1882
1889
  readonly agenticRoute?: TraceAgenticRoute;
1890
+ /**
1891
+ * Per-analyst summaries from the agentic pass alone. Present only when an
1892
+ * agentic pass ran; failed entries carry the engine's error (bridge stderr
1893
+ * included), so callers can fail loud instead of reporting the deterministic
1894
+ * findings as if the requested LLM analysis had happened.
1895
+ */
1896
+ readonly agenticPerAnalyst?: readonly AnalystRunSummary[];
1883
1897
  readonly external: readonly ExternalAnalysisResult[];
1884
1898
  readonly report: string;
1885
1899
  }
@@ -1923,6 +1937,16 @@ declare function buildTraceFindingPacket(opts: BuildTraceFindingPacketOptions):
1923
1937
  declare function loadTracesConfig(path?: string): Promise<TracesConfig | undefined>;
1924
1938
  declare function mergeTracesConfig(opts: TraceInvestigationOptions, config?: TracesConfig): TraceInvestigationOptions;
1925
1939
  declare function runTraceInvestigation(opts: TraceInvestigationOptions): Promise<TraceInvestigationResult>;
1940
+ /**
1941
+ * Operator-facing message for a fully dead agentic pass: non-empty exactly
1942
+ * when an agentic pass ran and NO analyst in it succeeded — failed and
1943
+ * skipped both count as "produced nothing", so one skip cannot silence the
1944
+ * alarm. Partial success returns undefined: some agentic findings were
1945
+ * produced, and the per-analyst report table carries the individual reasons.
1946
+ */
1947
+ declare function totalAgenticFailureMessage(agenticPerAnalyst: readonly AnalystRunSummary[] | undefined, opts?: {
1948
+ requiredBridgeVersion?: string;
1949
+ }): string | undefined;
1926
1950
  declare function runTraceStoreInvestigation(opts: TraceStoreInvestigationOptions): Promise<TraceStoreInvestigationResult>;
1927
1951
  declare function writeTraceImprovementArtifacts(result: Omit<TraceImprovementResult, 'artifacts'>, outDir?: string): Promise<TraceImprovementArtifacts>;
1928
1952
  declare function runTraceImprovement(opts: TraceImprovementOptions): Promise<TraceImprovementResult>;
@@ -2188,4 +2212,4 @@ interface ExecuteOptions {
2188
2212
  /** Send the final, new outbound items (or write their dry-run OTLP). */
2189
2213
  declare function executeUpload(plan: UploadPlan, opts?: ExecuteOptions): Promise<UploadResult>;
2190
2214
 
2191
- 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, type ChatTrajectory, type ChatTrajectoryMessage, type ChatTrajectoryOptions, ClaudeAdapter, type CodeTraceBenchFileRef, type CodeTraceBenchImportOptions, type CodeTraceBenchImportReceipt, type CodeTraceBenchImportResult, type CodeTraceBenchImportedTrace, type CodeTraceBenchStep, CodexAdapter, CodexExecAdapter, CodexExecStreamError, CodexTaskScopeError, type CollectOptions, type CollectPolicyEvidenceOptions, type CollectSessionIndexOptions, type CollectSessionSelectionOptions, type CollectSessionWorkflowOptions, CopilotAdapter, type CorruptionMode, DEFAULT_HARNESS, EmptySessionError, type ExecuteOptions, type ExternalAnalysisKind, type ExternalAnalysisPayload, type ExternalAnalysisResult, type ExternalAnalyzer, type ExternalAnalyzerOptions, type ExternalDiscoveryCandidate, FactoryAdapter, ForgeAdapter, GeminiAdapter, type HaloAnalyzerOptions, type HaloReasoningEffort, type HarnessTraceAdapter, type HodoscopeAnalyzerOptions, type HodoscopeInput, type HodoscopeMessage, type HodoscopeSourceMapEntry, type HodoscopeTrajectory, 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 ParentTaskResolution, 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 SessionRelationship, type SessionRole, type SessionSeedGroup, type SessionSelection, type SessionSelectionRow, type SessionSourceFile, type SessionWorkflow, SessionWorkflowError, type SessionWorkflowErrorCode, type SessionWorkflowIssue, type SessionWorkflowSession, type SessionWorkflowSummary, 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, chatTrajectoryToSpans, classifyLiveActions, classifyReaction, claudeActor, codexActor, collectPolicyEvidence, collectSessionIndex, collectSessionSelection, collectSessionWorkflow, collectSessions, commandAnalyzer, commandRedactor, countSkillRunsJsonl, cwdMatchesSelection, defaultTraceLiveAnalysts, describeSessionRelationship, equivalentGitCwds, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, haloAnalyzer, hodoscopeAnalyzer, importCodeTraceBench, indexSessionIdsByTrace, inspectSessionIndex, isChatTrajectory, isChatTrajectoryMessage, 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, validateOtlpSpans, watchSessions, writeHodoscopeInput, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts };
2215
+ 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, type ChatTrajectory, type ChatTrajectoryMessage, type ChatTrajectoryOptions, ClaudeAdapter, type CodeTraceBenchFileRef, type CodeTraceBenchImportOptions, type CodeTraceBenchImportReceipt, type CodeTraceBenchImportResult, type CodeTraceBenchImportedTrace, type CodeTraceBenchStep, CodexAdapter, CodexExecAdapter, CodexExecStreamError, CodexTaskScopeError, type CollectOptions, type CollectPolicyEvidenceOptions, type CollectSessionIndexOptions, type CollectSessionSelectionOptions, type CollectSessionWorkflowOptions, CopilotAdapter, type CorruptionMode, DEFAULT_HARNESS, EmptySessionError, type ExecuteOptions, type ExternalAnalysisKind, type ExternalAnalysisPayload, type ExternalAnalysisResult, type ExternalAnalyzer, type ExternalAnalyzerOptions, type ExternalDiscoveryCandidate, FactoryAdapter, ForgeAdapter, GeminiAdapter, type HaloAnalyzerOptions, type HaloReasoningEffort, type HarnessTraceAdapter, type HodoscopeAnalyzerOptions, type HodoscopeInput, type HodoscopeMessage, type HodoscopeSourceMapEntry, type HodoscopeTrajectory, 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 ParentTaskResolution, 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 SessionRelationship, type SessionRole, type SessionSeedGroup, type SessionSelection, type SessionSelectionRow, type SessionSourceFile, type SessionWorkflow, SessionWorkflowError, type SessionWorkflowErrorCode, type SessionWorkflowIssue, type SessionWorkflowSession, type SessionWorkflowSummary, 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, chatTrajectoryToSpans, classifyLiveActions, classifyReaction, claudeActor, codexActor, collectPolicyEvidence, collectSessionIndex, collectSessionSelection, collectSessionWorkflow, collectSessions, commandAnalyzer, commandRedactor, countSkillRunsJsonl, cwdMatchesSelection, defaultTraceLiveAnalysts, describeSessionRelationship, equivalentGitCwds, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, haloAnalyzer, hodoscopeAnalyzer, importCodeTraceBench, indexSessionIdsByTrace, inspectSessionIndex, isChatTrajectory, isChatTrajectoryMessage, 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, totalAgenticFailureMessage, traceAgenticKinds, traceStreamEventsFromSpans, uploadKey, userPromptSpan, validateOtlpSpans, watchSessions, writeHodoscopeInput, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts };
package/dist/index.js CHANGED
@@ -118,6 +118,7 @@ import {
118
118
  toOpenInferenceSpan,
119
119
  toRuntimeStore,
120
120
  toTraceSpanEvents,
121
+ totalAgenticFailureMessage,
121
122
  traceAgenticKinds,
122
123
  traceStreamEventsFromSpans,
123
124
  uploadKey,
@@ -131,7 +132,7 @@ import {
131
132
  writeSessionIndexFile,
132
133
  writeTraceEvidenceExportFile,
133
134
  writeTraceImprovementArtifacts
134
- } from "./chunk-7BQ2CVEA.js";
135
+ } from "./chunk-LC66I5TE.js";
135
136
 
136
137
  // src/collect.ts
137
138
  async function collectSessions(opts = {}) {
@@ -284,6 +285,7 @@ export {
284
285
  toOpenInferenceSpan,
285
286
  toRuntimeStore,
286
287
  toTraceSpanEvents,
288
+ totalAgenticFailureMessage,
287
289
  traceAgenticKinds,
288
290
  traceStreamEventsFromSpans,
289
291
  uploadKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/traces",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
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",