@tangle-network/traces 0.8.22 → 0.8.24

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
@@ -55,7 +55,7 @@ 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. It writes typed artifacts: findings, recommendations, evidence rows, claims, report, and before/after replay metadata. Another agent, CI job, or hosted product can consume the result without scraping prose.
58
+ `traces improve` is the reviewable action path. It writes typed artifacts: findings, recommendations, proposal-only artifacts, evidence rows, claims, report, and before/after replay metadata. Another agent, CI job, or hosted product can consume the result without scraping prose.
59
59
 
60
60
  ## What it finds
61
61
 
@@ -197,6 +197,7 @@ The directory contains:
197
197
  |---|---|
198
198
  | `findings.json` | typed `AnalystFinding[]`; finding ids, severity, evidence refs, recommended action, validation plan |
199
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
201
  | `evidence.jsonl` | one row per evidence ref, suitable for downstream mining |
201
202
  | `claims.json` | compact claim list for review agents and dashboards |
202
203
  | `report.md` | human-readable report rendered from the typed data |
@@ -214,7 +215,7 @@ The config can export:
214
215
  - `liveAnalysts`: deterministic online analysts that implement the `TraceLiveAnalyst` contract for `traces stream`
215
216
  - `registry`: a prebuilt `AnalystRegistry`
216
217
  - `externalAnalyzers`: HALO or any command/model adapter that reads the OTLP artifact
217
- - `improvementAdapter`: a proposal writer that maps recommendations to patches, profile edits, prompts, or validation commands
218
+ - `improvementAdapter`: a proposal writer that replaces the default proposal set with product-specific patches, profile edits, prompts, or validation commands
218
219
 
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.
220
221
 
@@ -344,7 +345,7 @@ The CLI is a thin consumer of these exports.
344
345
  |---|---|---|
345
346
  | `analyzeSpans` | `(spans, { registry?, ai?, budgetUsd? }) → AnalyzeResult` | run built-in analysts, or **your own** via `registry` |
346
347
  | `runTraceInvestigation` | `(TraceInvestigationOptions) → TraceInvestigationResult` | typed findings, recommendations, claims, external analyzer output, and report |
347
- | `runTraceImprovementLoop` | `(TraceImprovementOptions) → TraceImprovementResult` | writes the full improvement artifact pack and optional proposal output |
348
+ | `runTraceImprovementLoop` | `(TraceImprovementOptions) → TraceImprovementResult` | writes the full improvement artifact pack and proposal-only output |
348
349
  | `buildTraceFindingPacket` | `({ findings }) → TraceFindingPacket` | turn any `AnalystFinding[]` into recommendations, claims, and a report |
349
350
  | `runTraceStoreInvestigation` | `({ traceStore }) → TraceStoreInvestigationResult` | run the same packet layer over a hosted/custom `TraceAnalysisStore` |
350
351
  | `loadTracesConfig` | `(path?) → TracesConfig \| undefined` | load BYO analysts, external analyzers, and proposal adapters |
@@ -2164,6 +2164,49 @@ async function readGit(cwd) {
2164
2164
  commit
2165
2165
  };
2166
2166
  }
2167
+ async function gitOutput(cwd, args) {
2168
+ const { execFile } = await import("child_process");
2169
+ const { promisify } = await import("util");
2170
+ const run = promisify(execFile);
2171
+ try {
2172
+ const { stdout } = await run("git", ["-C", cwd, ...args], { timeout: 5e3 });
2173
+ const v = stdout.trim();
2174
+ return v.length > 0 ? v : null;
2175
+ } catch {
2176
+ return null;
2177
+ }
2178
+ }
2179
+ function uniqNormalized(paths) {
2180
+ const out = [];
2181
+ const seen = /* @__PURE__ */ new Set();
2182
+ for (const path of paths) {
2183
+ const n = normalize(path);
2184
+ if (seen.has(n)) continue;
2185
+ seen.add(n);
2186
+ out.push(n);
2187
+ }
2188
+ return out;
2189
+ }
2190
+ function parseWorktreePorcelain(output) {
2191
+ return output.split("\n").filter((line) => line.startsWith("worktree ")).map((line) => line.slice("worktree ".length).trim()).filter(Boolean);
2192
+ }
2193
+ async function equivalentGitCwds(cwd) {
2194
+ if (!cwd) return [];
2195
+ const selected = normalize(cwd);
2196
+ if (!isAbsolute(selected)) return [selected];
2197
+ const top = await gitOutput(selected, ["rev-parse", "--show-toplevel"]);
2198
+ if (!top) return [selected];
2199
+ const worktrees = await gitOutput(top, ["worktree", "list", "--porcelain"]);
2200
+ return uniqNormalized([selected, top, ...worktrees ? parseWorktreePorcelain(worktrees) : []]);
2201
+ }
2202
+ function cwdMatchesSelection(cwd, selections) {
2203
+ if (!cwd) return false;
2204
+ const value = normalize(cwd);
2205
+ return selections.some((selection) => {
2206
+ const prefix = normalize(selection);
2207
+ return value === prefix || value.startsWith(`${prefix}/`);
2208
+ });
2209
+ }
2167
2210
  async function pathStat(path) {
2168
2211
  try {
2169
2212
  return await stat11(path);
@@ -2383,12 +2426,26 @@ async function parseSession(adapter, ref) {
2383
2426
  stampRepoAttrs(spans, repo.attrs);
2384
2427
  return spans;
2385
2428
  }
2429
+ function refKey(ref) {
2430
+ return `${ref.harness}\0${ref.path}\0${ref.sessionId}`;
2431
+ }
2432
+ async function locateSessions(adapter, opts = {}) {
2433
+ if (!opts.cwd) return adapter.locate({ sinceMs: opts.sinceMs });
2434
+ const cwdSelections = await equivalentGitCwds(opts.cwd);
2435
+ const refs = await adapter.locate({ sinceMs: opts.sinceMs });
2436
+ const byKey = /* @__PURE__ */ new Map();
2437
+ for (const ref of refs) {
2438
+ if (!cwdMatchesSelection(ref.cwd, cwdSelections)) continue;
2439
+ byKey.set(refKey(ref), ref);
2440
+ }
2441
+ return [...byKey.values()].sort((a, b) => b.mtimeMs - a.mtimeMs);
2442
+ }
2386
2443
  async function* scanSessions(opts) {
2387
2444
  for (const adapter of selectAdapters(opts)) {
2388
2445
  if (opts.signal?.aborted) return;
2389
2446
  let refs;
2390
2447
  try {
2391
- refs = await adapter.locate({ cwd: opts.cwd, sinceMs: opts.sinceMs });
2448
+ refs = await locateSessions(adapter, { cwd: opts.cwd, sinceMs: opts.sinceMs });
2392
2449
  } catch (err) {
2393
2450
  opts.onError?.(err);
2394
2451
  continue;
@@ -4034,6 +4091,27 @@ function buildTraceFindingPacket(opts) {
4034
4091
  };
4035
4092
  return { ...packet, report: renderFindingPacket(packet, opts.title) };
4036
4093
  }
4094
+ function buildDefaultImprovementProposals(input) {
4095
+ return input.recommendations.slice(0, 5).map((recommendation, index) => {
4096
+ const matchingFindings = input.findings.filter((finding2) => recommendation.findingIds.includes(finding2.finding_id));
4097
+ const evidenceRefs = recommendation.evidenceRefs.length > 0 ? recommendation.evidenceRefs : matchingFindings.flatMap((finding2) => finding2.evidence_refs);
4098
+ return {
4099
+ id: `proposal-${index + 1}-${slug(recommendation.title)}`,
4100
+ title: recommendation.title,
4101
+ description: [
4102
+ recommendation.action,
4103
+ "",
4104
+ `Why: ${recommendation.rationale}`,
4105
+ `Validation: ${recommendation.validationPlan}`,
4106
+ "",
4107
+ "This is a proposal-only artifact. It does not mutate code, prompts, skills, tools, MCP config, hooks, subagents, or external systems until a human applies it and reruns validation."
4108
+ ].join("\n"),
4109
+ recommendationIds: [recommendation.id],
4110
+ validationCommand: "traces improve --last 1 --dir .traces/improvement",
4111
+ evidenceRefs
4112
+ };
4113
+ });
4114
+ }
4037
4115
  function renderExternal(results) {
4038
4116
  if (results.length === 0) return "";
4039
4117
  const lines = ["## external analyzers", ""];
@@ -4201,6 +4279,7 @@ async function writeTraceImprovementArtifacts(result, outDir) {
4201
4279
  directory,
4202
4280
  findings: join16(directory, "findings.json"),
4203
4281
  recommendations: join16(directory, "recommendations.json"),
4282
+ proposals: join16(directory, "proposals.json"),
4204
4283
  evidence: join16(directory, "evidence.jsonl"),
4205
4284
  claims: join16(directory, "claims.json"),
4206
4285
  report: join16(directory, "report.md"),
@@ -4209,6 +4288,7 @@ async function writeTraceImprovementArtifacts(result, outDir) {
4209
4288
  await Promise.all([
4210
4289
  writeFile4(paths.findings, json(result.findings), "utf8"),
4211
4290
  writeFile4(paths.recommendations, json(result.recommendations), "utf8"),
4291
+ writeFile4(paths.proposals, json(result.proposals), "utf8"),
4212
4292
  writeFile4(paths.evidence, jsonl(buildEvidenceRows(result.findings)), "utf8"),
4213
4293
  writeFile4(paths.claims, json(result.claims), "utf8"),
4214
4294
  writeFile4(paths.report, result.report, "utf8"),
@@ -4218,13 +4298,14 @@ async function writeTraceImprovementArtifacts(result, outDir) {
4218
4298
  }
4219
4299
  async function runTraceImprovementLoop(opts) {
4220
4300
  const investigation = await runTraceInvestigation(opts);
4221
- const proposals = opts.adapter ? await opts.adapter.propose({
4301
+ const adapterInput = {
4222
4302
  findings: investigation.findings,
4223
4303
  recommendations: investigation.recommendations,
4224
4304
  claims: investigation.claims,
4225
4305
  spans: opts.spans,
4226
4306
  otlpPath: investigation.otlpPath
4227
- }) : [];
4307
+ };
4308
+ const proposals = opts.adapter ? await opts.adapter.propose(adapterInput) : buildDefaultImprovementProposals(adapterInput);
4228
4309
  const replay = replayProof(investigation, proposals);
4229
4310
  const result = {
4230
4311
  ...investigation,
@@ -5150,10 +5231,13 @@ export {
5150
5231
  knownHarnesses,
5151
5232
  selectAdapters,
5152
5233
  normalizeRemote,
5234
+ equivalentGitCwds,
5235
+ cwdMatchesSelection,
5153
5236
  resolveRepoAttrs,
5154
5237
  resolveSessionRepoAttrs,
5155
5238
  stampRepoAttrs,
5156
5239
  parseSession,
5240
+ locateSessions,
5157
5241
  scanSessions,
5158
5242
  buildPolicyEvidenceRecord,
5159
5243
  collectPolicyEvidence,
package/dist/cli.js CHANGED
@@ -13,6 +13,7 @@ import {
13
13
  inspectSessionIndex,
14
14
  knownHarnesses,
15
15
  loadTracesConfig,
16
+ locateSessions,
16
17
  mergeTracesConfig,
17
18
  parseSession,
18
19
  parseSince,
@@ -43,7 +44,7 @@ import {
43
44
  writePolicyEvidenceFile,
44
45
  writeSessionIndexFile,
45
46
  writeTraceEvidenceExportFile
46
- } from "./chunk-FCTZLWP7.js";
47
+ } from "./chunk-4LLOYL36.js";
47
48
 
48
49
  // src/cli.ts
49
50
  import { readFileSync } from "fs";
@@ -205,7 +206,7 @@ async function discover(args) {
205
206
  const sinceMs = args.since ? Date.parse(args.since) : void 0;
206
207
  const out = [];
207
208
  for (const adapter of adaptersFor(args)) {
208
- let refs = await adapter.locate({ cwd: args.cwd, sinceMs });
209
+ let refs = await locateSessions(adapter, { cwd: args.cwd, sinceMs });
209
210
  if (args.last > 0) refs = refs.slice(0, args.last);
210
211
  out.push({ adapter, refs });
211
212
  }
package/dist/index.d.ts CHANGED
@@ -219,6 +219,12 @@ declare function selectAdapters(opts: AdapterSelection): HarnessTraceAdapter[];
219
219
  * computed ONCE per session; it is fail-safe and never throws.
220
220
  */
221
221
  declare function parseSession(adapter: HarnessTraceAdapter, ref: SessionRef): Promise<OtlpSpan[]>;
222
+ /** Locate through every equivalent git worktree for the selected cwd, then
223
+ * dedupe and apply a boundary-aware final filter. */
224
+ declare function locateSessions(adapter: HarnessTraceAdapter, opts?: {
225
+ cwd?: string;
226
+ sinceMs?: number;
227
+ }): Promise<SessionRef[]>;
222
228
  interface ScanOptions extends AdapterSelection {
223
229
  /** Filter by working directory (exact/prefix). */
224
230
  cwd?: string;
@@ -258,6 +264,10 @@ interface RepoResolution {
258
264
  * `git@host:owner/repo.git` SCP-style forms. Returns null when unparseable.
259
265
  */
260
266
  declare function normalizeRemote(url: string): string | null;
267
+ /** Expand a selected cwd to every checked-out worktree for the same git repo. */
268
+ declare function equivalentGitCwds(cwd: string | null | undefined): Promise<string[]>;
269
+ /** Boundary-aware cwd matching; `/repo` matches `/repo/src`, not `/repo-old`. */
270
+ declare function cwdMatchesSelection(cwd: string | null | undefined, selections: readonly string[]): boolean;
261
271
  /**
262
272
  * Resolve per-session repo/git resource attributes from a session's cwd.
263
273
  * Fail-safe and never throws; see the module doc for the derivation contract.
@@ -1371,6 +1381,7 @@ interface TraceImprovementArtifacts {
1371
1381
  readonly directory: string;
1372
1382
  readonly findings: string;
1373
1383
  readonly recommendations: string;
1384
+ readonly proposals: string;
1374
1385
  readonly evidence: string;
1375
1386
  readonly claims: string;
1376
1387
  readonly report: string;
@@ -1438,7 +1449,7 @@ declare function loadTracesConfig(path?: string): Promise<TracesConfig | undefin
1438
1449
  declare function mergeTracesConfig(opts: TraceInvestigationOptions, config?: TracesConfig): TraceInvestigationOptions;
1439
1450
  declare function runTraceInvestigation(opts: TraceInvestigationOptions): Promise<TraceInvestigationResult>;
1440
1451
  declare function runTraceStoreInvestigation(opts: TraceStoreInvestigationOptions): Promise<TraceStoreInvestigationResult>;
1441
- declare function writeTraceImprovementArtifacts(result: Pick<TraceImprovementResult, 'findings' | 'recommendations' | 'claims' | 'report' | 'replay'>, outDir?: string): Promise<TraceImprovementArtifacts>;
1452
+ declare function writeTraceImprovementArtifacts(result: Pick<TraceImprovementResult, 'findings' | 'recommendations' | 'proposals' | 'claims' | 'report' | 'replay'>, outDir?: string): Promise<TraceImprovementArtifacts>;
1442
1453
  declare function runTraceImprovementLoop(opts: TraceImprovementOptions): Promise<TraceImprovementResult>;
1443
1454
  declare function saveReport(path: string, report: string): Promise<void>;
1444
1455
 
@@ -1639,4 +1650,4 @@ interface ExecuteOptions {
1639
1650
  /** Send the NEW items (or, on dryRun, write the redacted OTLP that would send). */
1640
1651
  declare function executeUpload(plan: UploadPlan, opts?: ExecuteOptions): Promise<UploadResult>;
1641
1652
 
1642
- 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, DEFAULT_HARNESS, type ExecuteOptions, type ExternalAnalysisResult, type ExternalAnalyzer, FactoryAdapter, type FindingStore, ForgeAdapter, GeminiAdapter, type HarnessTraceAdapter, INGEST_SOURCE_CLI, type ImprovementAdapter, type ImprovementAdapterInput, type ImprovementProposal, type InspectSessionIndexOptions, type LiveBatchOptions, type LocateOptions, type ObservedLoop, type ObserverOptions, OpencodeAdapter, type OtlpSpan, type OtlpSpanKind, type OtlpStatusCode, PiAdapter, type PipelineOptions, type PipelineReport, type PlanOptions, type PolicyEvidenceLoopSummary, type PolicyEvidenceRecord, type PolicyEvidenceToolSummary, QwenAdapter, REACTIONS, type Reaction, type ReactionReport, type ReactionSessionReport, type RecommendationWriter, type Redactor, type RepoAttrs, type RepoResolution, type RepoResolutionSource, type RunResult, type RuntimeTrace, type ScanOptions, type ScannedSession, type SessionBatch, type SessionRef, type SpanInput, type SpanRedaction, TRACES_REDACTION_RULES, type TraceClaim, type TraceContextIndex, type TraceContextRoot, type TraceEvidenceExportOptions, type TraceEvidenceExportResult, type TraceEvidenceFormatOption, type TraceEvidenceInputFormat, type TraceEvidenceRow, 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 TraceRecommendation, type TraceReplayProof, type TraceSessionIndex, type TraceSessionIndexRow, type TraceStoreInvestigationOptions, type TraceStoreInvestigationResult, type TraceStreamEvent, type TraceStreamOptions, type TraceStreamReplayOptions, type TraceStreamSession, type TracesConfig, type TriggerPair, type UploadBackend, 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, defaultTraceLiveAnalysts, executeUpload, exportTraceEvidenceFile, exportTraceEvidenceRows, exportTraceEvidenceText, haloAnalyzer, inspectSessionIndex, knownHarnesses, listAdapters, loadState, loadTracesConfig, looksLikeAgentPrompt, mergeTracesConfig, normalizeRemote, parseIsoToEpochMs, parseSession, parseSince, planUpload, readSessionIndexFile, redactSpans, renderInspectionReport, resolveAdapter, resolveRepoAttrs, resolveSessionRepoAttrs, runCommand, runExternalAnalyzers, runPipelines, runTraceImprovementLoop, runTraceInvestigation, runTraceStoreInvestigation, saveReport, saveState, scanSessions, selectAdapters, serializeInspectionReport, serializePolicyEvidence, serializeSessionIndex, serializeSpans, serializeTraceStreamEvent, sessionHash, span, stampRepoAttrs, streamSessions, textIsSynthetic, toOpenInferenceSpan, toRuntimeStore, toTraceSpanEvents, traceStreamEventsFromSpans, uploadKey, userPromptSpan, watchSessions, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts };
1653
+ 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, DEFAULT_HARNESS, type ExecuteOptions, type ExternalAnalysisResult, type ExternalAnalyzer, FactoryAdapter, type FindingStore, ForgeAdapter, GeminiAdapter, type HarnessTraceAdapter, INGEST_SOURCE_CLI, type ImprovementAdapter, type ImprovementAdapterInput, type ImprovementProposal, type InspectSessionIndexOptions, type LiveBatchOptions, type LocateOptions, type ObservedLoop, type ObserverOptions, OpencodeAdapter, type OtlpSpan, type OtlpSpanKind, type OtlpStatusCode, PiAdapter, type PipelineOptions, type PipelineReport, type PlanOptions, type PolicyEvidenceLoopSummary, type PolicyEvidenceRecord, type PolicyEvidenceToolSummary, QwenAdapter, REACTIONS, type Reaction, type ReactionReport, type ReactionSessionReport, type RecommendationWriter, type Redactor, type RepoAttrs, type RepoResolution, type RepoResolutionSource, type RunResult, type RuntimeTrace, type ScanOptions, type ScannedSession, type SessionBatch, type SessionRef, type SpanInput, type SpanRedaction, TRACES_REDACTION_RULES, type TraceClaim, type TraceContextIndex, type TraceContextRoot, type TraceEvidenceExportOptions, type TraceEvidenceExportResult, type TraceEvidenceFormatOption, type TraceEvidenceInputFormat, type TraceEvidenceRow, 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 TraceRecommendation, type TraceReplayProof, type TraceSessionIndex, type TraceSessionIndexRow, type TraceStoreInvestigationOptions, type TraceStoreInvestigationResult, type TraceStreamEvent, type TraceStreamOptions, type TraceStreamReplayOptions, type TraceStreamSession, type TracesConfig, type TriggerPair, type UploadBackend, 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, inspectSessionIndex, knownHarnesses, listAdapters, loadState, loadTracesConfig, locateSessions, looksLikeAgentPrompt, mergeTracesConfig, normalizeRemote, parseIsoToEpochMs, parseSession, parseSince, planUpload, readSessionIndexFile, redactSpans, renderInspectionReport, resolveAdapter, resolveRepoAttrs, resolveSessionRepoAttrs, runCommand, runExternalAnalyzers, runPipelines, runTraceImprovementLoop, runTraceInvestigation, runTraceStoreInvestigation, saveReport, saveState, scanSessions, selectAdapters, serializeInspectionReport, serializePolicyEvidence, serializeSessionIndex, serializeSpans, serializeTraceStreamEvent, sessionHash, span, stampRepoAttrs, streamSessions, textIsSynthetic, toOpenInferenceSpan, toRuntimeStore, toTraceSpanEvents, traceStreamEventsFromSpans, uploadKey, userPromptSpan, watchSessions, writeInspectionReportFile, writeOtlpFile, writePolicyEvidenceFile, writeSessionIndexFile, writeTraceEvidenceExportFile, writeTraceImprovementArtifacts };
package/dist/index.js CHANGED
@@ -38,7 +38,9 @@ import {
38
38
  commandAnalyzer,
39
39
  commandRedactor,
40
40
  countSkillRunsJsonl,
41
+ cwdMatchesSelection,
41
42
  defaultTraceLiveAnalysts,
43
+ equivalentGitCwds,
42
44
  executeUpload,
43
45
  exportTraceEvidenceFile,
44
46
  exportTraceEvidenceRows,
@@ -49,6 +51,7 @@ import {
49
51
  listAdapters,
50
52
  loadState,
51
53
  loadTracesConfig,
54
+ locateSessions,
52
55
  looksLikeAgentPrompt,
53
56
  mergeTracesConfig,
54
57
  normalizeRemote,
@@ -95,7 +98,7 @@ import {
95
98
  writeSessionIndexFile,
96
99
  writeTraceEvidenceExportFile,
97
100
  writeTraceImprovementArtifacts
98
- } from "./chunk-FCTZLWP7.js";
101
+ } from "./chunk-4LLOYL36.js";
99
102
 
100
103
  // src/collect.ts
101
104
  async function collectSessions(opts = {}) {
@@ -164,7 +167,9 @@ export {
164
167
  commandRedactor,
165
168
  countSkillRunsJsonl,
166
169
  createHostedClient,
170
+ cwdMatchesSelection,
167
171
  defaultTraceLiveAnalysts,
172
+ equivalentGitCwds,
168
173
  executeUpload,
169
174
  exportTraceEvidenceFile,
170
175
  exportTraceEvidenceRows,
@@ -176,6 +181,7 @@ export {
176
181
  listAdapters,
177
182
  loadState,
178
183
  loadTracesConfig,
184
+ locateSessions,
179
185
  looksLikeAgentPrompt,
180
186
  makeFinding,
181
187
  mergeTracesConfig,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/traces",
3
- "version": "0.8.22",
3
+ "version": "0.8.24",
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",