@tangle-network/traces 0.12.0 → 0.15.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/dist/index.js CHANGED
@@ -3,6 +3,8 @@ import {
3
3
  ATTR,
4
4
  AmpAdapter,
5
5
  BLOBS_DIR,
6
+ CHANGED_FILE_LIST_CAP,
7
+ CITATION_NORMALIZATION_VERSION,
6
8
  CODING_REDACTION_RULES,
7
9
  CONTENT_CAP,
8
10
  COORDINATION_LOG_FILE,
@@ -13,46 +15,68 @@ import {
13
15
  CodexExecStreamError,
14
16
  CodexTaskScopeError,
15
17
  CopilotAdapter,
18
+ DEFAULT_ANALYST_MODEL,
19
+ DEFAULT_ASK_CONCURRENCY,
16
20
  DEFAULT_HARNESS,
17
21
  DEFAULT_SANDBOX_BASE_URL,
18
22
  EMPTY_SPAN_RUN_SNAPSHOT,
19
23
  EXPORT_RULE,
20
24
  EmptySessionError,
25
+ FACT_LIST_CAP,
26
+ FACT_TEXT_CAP,
21
27
  FactoryAdapter,
22
28
  ForgeAdapter,
23
29
  GeminiAdapter,
24
30
  INGEST_SOURCE_CLI,
31
+ INHERITED_SOURCE_ATTR,
32
+ INHERITED_SPANS_OMITTED_ATTR,
33
+ INHERITED_SPAN_ATTR,
34
+ INHERITED_SPAN_COUNT_ATTR,
25
35
  JsonSourceError,
26
36
  JsonlParseError,
37
+ MAX_SHELL_DEPTH,
38
+ MAX_TRACE_QUESTION_CHARS,
27
39
  OpencodeAdapter,
28
40
  POLICY_EVIDENCE_NOTE,
41
+ PREPARED_CONTEXT_BYTE_CEILING,
29
42
  PartialUploadError,
30
43
  PiAdapter,
31
44
  QwenAdapter,
32
45
  REACTIONS,
33
46
  RESULT_FILE,
34
47
  RULE,
48
+ SESSION_FACTS_VERSION_SUFFIX,
49
+ SESSION_TOKEN_TOTAL_ATTR,
50
+ SOURCE_ATTRIBUTE_PREFIX,
51
+ SPAN_SYNTHESIZED_ATTR,
35
52
  SPAWN_JOURNAL_FILE,
36
53
  STATUS_MARK,
37
54
  SUBMIT_ACTION_SIGNATURE,
55
+ SYNTHESIZED_SOURCE_ATTR,
56
+ SYNTHESIZED_SPAN_ATTR,
38
57
  SandboxCounterfactualRunner,
39
58
  SessionWorkflowError,
40
59
  TRACES_REDACTION_RULES,
60
+ TRACE_QUESTION_PREVIEW_HEAD_CHARS,
41
61
  ZERO_ROLL,
42
62
  addSpend,
43
63
  alreadyUploaded,
64
+ analysisEngineFromEnv,
44
65
  analyzeAdoption,
45
66
  analyzeLiveBatch,
46
67
  analyzeLoopConvergence,
47
68
  analyzeReactions,
48
69
  analyzeSpans,
49
70
  analyzeSteeringChain,
71
+ answerSchemaErrors,
50
72
  applyRedactor,
51
73
  assembleSessionBundle,
74
+ assertAnswerSchema,
52
75
  assertSandboxReachable,
53
76
  buildFixPrompt,
54
77
  buildPolicyEvidenceRecord,
55
78
  buildRetryFixPrompt,
79
+ buildSessionFactsReport,
56
80
  buildSessionIndex,
57
81
  buildSessionIndexFromRows,
58
82
  buildSpanRunTree,
@@ -76,10 +100,14 @@ import {
76
100
  collectSessionWorkflow,
77
101
  commandAnalyzer,
78
102
  commandRedactor,
103
+ commandTextFromInput,
104
+ computeSessionFacts,
79
105
  conformanceOfSpans,
80
106
  connectors,
81
107
  countScriptCommands,
82
108
  countSkillRunsJsonl,
109
+ createBundleSourceReader,
110
+ createFindingRejectionTally,
83
111
  cwdMatchesSelection,
84
112
  cwdMatchesSelectionResolved,
85
113
  defaultTraceLiveAnalysts,
@@ -87,6 +115,7 @@ import {
87
115
  derivedImageTag,
88
116
  describeSessionRelationship,
89
117
  dockerImagePreparer,
118
+ engineCallReservationFloorUsd,
90
119
  enumerateReplayableCases,
91
120
  environmentAttributes,
92
121
  environmentFromSpanAttributes,
@@ -95,14 +124,19 @@ import {
95
124
  exportTraceEvidenceFile,
96
125
  exportTraceEvidenceRows,
97
126
  exportTraceEvidenceText,
127
+ externalFailureMessage,
98
128
  extractFixCommand,
99
129
  fileRunContextSupervisorRunReader,
130
+ fileSha256,
100
131
  findContextRoot,
101
132
  findSessionTextLeaks,
102
133
  findSpanSourceFiles,
134
+ findingRejection,
135
+ findingRejectionDetail,
103
136
  findingReplayStep,
104
137
  findingTrajectoryId,
105
138
  forEachTreeNode,
139
+ formatFindingRejections,
106
140
  generateFixCommand,
107
141
  goldIncorrectSteps,
108
142
  haloAnalyzer,
@@ -117,26 +151,33 @@ import {
117
151
  ingestCodeTraceBenchSteps,
118
152
  inspectSessionIndex,
119
153
  int,
154
+ isBridgeMismatchError,
120
155
  isChatTrajectory,
121
156
  isChatTrajectoryMessage,
122
157
  isFileRunContextDir,
158
+ isInheritedSpan,
123
159
  isSubmitAction,
160
+ isSynthesizedSpan,
124
161
  knownHarnesses,
125
162
  listAdapters,
126
163
  listSessionBundleFiles,
127
164
  loadState,
165
+ loadTraceQuestionsFile,
128
166
  loadTracesConfig,
129
167
  locateSessions,
130
168
  looksLikeAgentPrompt,
131
169
  mergeRolls,
132
170
  mergeTracesConfig,
133
171
  ms,
172
+ normalizeAnalystCitations,
134
173
  normalizeRemote,
174
+ normalizeTraceQuestions,
135
175
  otlpRowToSpan,
136
176
  outboundHash,
137
177
  parseCorpusFlag,
138
178
  parseIncorrectStepsSubject,
139
179
  parseIsoToEpochMs,
180
+ parseJsonAnswer,
140
181
  parseObservationOutput,
141
182
  parseRecordedReturncode,
142
183
  parseReplayBatchArgs,
@@ -155,6 +196,7 @@ import {
155
196
  readJsonl,
156
197
  readLabelEntries,
157
198
  readOtlpInput,
199
+ readPullRequests,
158
200
  readRunContextJournal,
159
201
  readRunContextSnapshot,
160
202
  readRunWatchSnapshot,
@@ -168,7 +210,12 @@ import {
168
210
  renderInspectionReport,
169
211
  renderRunContextSnapshot,
170
212
  renderRunWatchSnapshot,
213
+ renderSessionFacts,
214
+ renderSessionFactsContext,
171
215
  renderSpanRunSnapshot,
216
+ renderTraceQuestionInstructions,
217
+ renderTraceQuestionPrompt,
218
+ renderTraceQuestionsReport,
172
219
  renderValidation,
173
220
  renderVerifiedFindingsSection,
174
221
  replayBatchUsage,
@@ -192,6 +239,7 @@ import {
192
239
  runTotals,
193
240
  runTraceImprovement,
194
241
  runTraceInvestigation,
242
+ runTraceQuestions,
195
243
  runTraceStoreInvestigation,
196
244
  sandboxReplayBackend,
197
245
  saveReport,
@@ -204,10 +252,12 @@ import {
204
252
  serializeSessionIndex,
205
253
  serializeSpans,
206
254
  serializeTraceStreamEvent,
255
+ sessionFactsContext,
207
256
  sessionHash,
208
257
  sessionIdFromAttributes,
209
258
  sessionIntegrityAttributes,
210
259
  sessionTextSignatures,
260
+ shellCommands,
211
261
  skippedAnalyses,
212
262
  span,
213
263
  spanRunTotals,
@@ -227,7 +277,9 @@ import {
227
277
  toTraceSpanEvents,
228
278
  tokens,
229
279
  totalAgenticFailureMessage,
280
+ totalFindingRejections,
230
281
  traceAgenticKinds,
282
+ traceCitationsInText,
231
283
  traceStreamEventsFromSpans,
232
284
  unavailableCapabilities,
233
285
  uploadKey,
@@ -239,6 +291,7 @@ import {
239
291
  verifyFindingsUsage,
240
292
  watchRunTarget,
241
293
  watchSessions,
294
+ withSessionFactsContext,
242
295
  wrap,
243
296
  wrapActionForExec,
244
297
  writeHodoscopeInput,
@@ -249,9 +302,10 @@ import {
249
302
  writeSessionIndexFile,
250
303
  writeTraceEvidenceExportFile,
251
304
  writeTraceImprovementArtifacts,
305
+ writeTraceQuestionsArtifacts,
252
306
  zaiChatCaller,
253
307
  zeroPricedCost
254
- } from "./chunk-CV22VGCK.js";
308
+ } from "./chunk-7DOBU7BJ.js";
255
309
 
256
310
  // src/collect.ts
257
311
  async function collectSessions(opts = {}) {
@@ -281,6 +335,8 @@ export {
281
335
  AmpAdapter,
282
336
  AnalystRegistry,
283
337
  BLOBS_DIR,
338
+ CHANGED_FILE_LIST_CAP,
339
+ CITATION_NORMALIZATION_VERSION,
284
340
  CODING_REDACTION_RULES,
285
341
  CONTENT_CAP,
286
342
  COORDINATION_LOG_FILE,
@@ -291,48 +347,70 @@ export {
291
347
  CodexExecStreamError,
292
348
  CodexTaskScopeError,
293
349
  CopilotAdapter,
350
+ DEFAULT_ANALYST_MODEL,
351
+ DEFAULT_ASK_CONCURRENCY,
294
352
  DEFAULT_HARNESS,
295
353
  DEFAULT_REDACTION_RULES,
296
354
  DEFAULT_SANDBOX_BASE_URL,
297
355
  EMPTY_SPAN_RUN_SNAPSHOT,
298
356
  EXPORT_RULE,
299
357
  EmptySessionError,
358
+ FACT_LIST_CAP,
359
+ FACT_TEXT_CAP,
300
360
  FactoryAdapter,
301
361
  ForgeAdapter,
302
362
  GeminiAdapter,
303
363
  INGEST_SOURCE_CLI,
364
+ INHERITED_SOURCE_ATTR,
365
+ INHERITED_SPANS_OMITTED_ATTR,
366
+ INHERITED_SPAN_ATTR,
367
+ INHERITED_SPAN_COUNT_ATTR,
304
368
  JsonSourceError,
305
369
  JsonlParseError,
370
+ MAX_SHELL_DEPTH,
371
+ MAX_TRACE_QUESTION_CHARS,
306
372
  OpencodeAdapter,
307
373
  POLICY_EVIDENCE_NOTE,
374
+ PREPARED_CONTEXT_BYTE_CEILING,
308
375
  PartialUploadError,
309
376
  PiAdapter,
310
377
  QwenAdapter,
311
378
  REACTIONS,
312
379
  RESULT_FILE,
313
380
  RULE,
381
+ SESSION_FACTS_VERSION_SUFFIX,
382
+ SESSION_TOKEN_TOTAL_ATTR,
383
+ SOURCE_ATTRIBUTE_PREFIX,
384
+ SPAN_SYNTHESIZED_ATTR,
314
385
  SPAWN_JOURNAL_FILE,
315
386
  STATUS_MARK,
316
387
  SUBMIT_ACTION_SIGNATURE,
388
+ SYNTHESIZED_SOURCE_ATTR,
389
+ SYNTHESIZED_SPAN_ATTR,
317
390
  SandboxCounterfactualRunner,
318
391
  SessionWorkflowError,
319
392
  TRACES_REDACTION_RULES,
393
+ TRACE_QUESTION_PREVIEW_HEAD_CHARS,
320
394
  ZERO_ROLL,
321
395
  addSpend,
322
396
  alreadyUploaded,
397
+ analysisEngineFromEnv,
323
398
  analyzeAdoption,
324
399
  analyzeLiveBatch,
325
400
  analyzeLoopConvergence,
326
401
  analyzeReactions,
327
402
  analyzeSpans,
328
403
  analyzeSteeringChain,
404
+ answerSchemaErrors,
329
405
  applyRedactor,
330
406
  assembleSessionBundle,
407
+ assertAnswerSchema,
331
408
  assertSandboxReachable,
332
409
  buildDefaultAnalystRegistry,
333
410
  buildFixPrompt,
334
411
  buildPolicyEvidenceRecord,
335
412
  buildRetryFixPrompt,
413
+ buildSessionFactsReport,
336
414
  buildSessionIndex,
337
415
  buildSessionIndexFromRows,
338
416
  buildSpanRunTree,
@@ -357,10 +435,14 @@ export {
357
435
  collectSessions,
358
436
  commandAnalyzer,
359
437
  commandRedactor,
438
+ commandTextFromInput,
439
+ computeSessionFacts,
360
440
  conformanceOfSpans,
361
441
  connectors,
362
442
  countScriptCommands,
363
443
  countSkillRunsJsonl,
444
+ createBundleSourceReader,
445
+ createFindingRejectionTally,
364
446
  createHostedClient,
365
447
  cwdMatchesSelection,
366
448
  cwdMatchesSelectionResolved,
@@ -369,6 +451,7 @@ export {
369
451
  derivedImageTag,
370
452
  describeSessionRelationship,
371
453
  dockerImagePreparer,
454
+ engineCallReservationFloorUsd,
372
455
  enumerateReplayableCases,
373
456
  environmentAttributes,
374
457
  environmentFromSpanAttributes,
@@ -377,14 +460,19 @@ export {
377
460
  exportTraceEvidenceFile,
378
461
  exportTraceEvidenceRows,
379
462
  exportTraceEvidenceText,
463
+ externalFailureMessage,
380
464
  extractFixCommand,
381
465
  fileRunContextSupervisorRunReader,
466
+ fileSha256,
382
467
  findContextRoot,
383
468
  findSessionTextLeaks,
384
469
  findSpanSourceFiles,
470
+ findingRejection,
471
+ findingRejectionDetail,
385
472
  findingReplayStep,
386
473
  findingTrajectoryId,
387
474
  forEachTreeNode,
475
+ formatFindingRejections,
388
476
  generateFixCommand,
389
477
  goldIncorrectSteps,
390
478
  haloAnalyzer,
@@ -400,14 +488,18 @@ export {
400
488
  ingestCodeTraceBenchSteps,
401
489
  inspectSessionIndex,
402
490
  int,
491
+ isBridgeMismatchError,
403
492
  isChatTrajectory,
404
493
  isChatTrajectoryMessage,
405
494
  isFileRunContextDir,
495
+ isInheritedSpan,
406
496
  isSubmitAction,
497
+ isSynthesizedSpan,
407
498
  knownHarnesses,
408
499
  listAdapters,
409
500
  listSessionBundleFiles,
410
501
  loadState,
502
+ loadTraceQuestionsFile,
411
503
  loadTracesConfig,
412
504
  locateSessions,
413
505
  looksLikeAgentPrompt,
@@ -415,12 +507,15 @@ export {
415
507
  mergeRolls,
416
508
  mergeTracesConfig,
417
509
  ms,
510
+ normalizeAnalystCitations,
418
511
  normalizeRemote,
512
+ normalizeTraceQuestions,
419
513
  otlpRowToSpan,
420
514
  outboundHash,
421
515
  parseCorpusFlag,
422
516
  parseIncorrectStepsSubject,
423
517
  parseIsoToEpochMs,
518
+ parseJsonAnswer,
424
519
  parseObservationOutput,
425
520
  parseRecordedReturncode,
426
521
  parseReplayBatchArgs,
@@ -439,6 +534,7 @@ export {
439
534
  readJsonl,
440
535
  readLabelEntries,
441
536
  readOtlpInput,
537
+ readPullRequests,
442
538
  readRunContextJournal,
443
539
  readRunContextSnapshot,
444
540
  readRunWatchSnapshot,
@@ -454,7 +550,12 @@ export {
454
550
  renderInspectionReport,
455
551
  renderRunContextSnapshot,
456
552
  renderRunWatchSnapshot,
553
+ renderSessionFacts,
554
+ renderSessionFactsContext,
457
555
  renderSpanRunSnapshot,
556
+ renderTraceQuestionInstructions,
557
+ renderTraceQuestionPrompt,
558
+ renderTraceQuestionsReport,
458
559
  renderValidation,
459
560
  renderVerifiedFindingsSection,
460
561
  replayBatchUsage,
@@ -478,6 +579,7 @@ export {
478
579
  runTotals,
479
580
  runTraceImprovement,
480
581
  runTraceInvestigation,
582
+ runTraceQuestions,
481
583
  runTraceStoreInvestigation,
482
584
  sandboxReplayBackend,
483
585
  saveReport,
@@ -490,10 +592,12 @@ export {
490
592
  serializeSessionIndex,
491
593
  serializeSpans,
492
594
  serializeTraceStreamEvent,
595
+ sessionFactsContext,
493
596
  sessionHash,
494
597
  sessionIdFromAttributes,
495
598
  sessionIntegrityAttributes,
496
599
  sessionTextSignatures,
600
+ shellCommands,
497
601
  skippedAnalyses,
498
602
  span,
499
603
  spanRunTotals,
@@ -513,7 +617,9 @@ export {
513
617
  toTraceSpanEvents,
514
618
  tokens,
515
619
  totalAgenticFailureMessage,
620
+ totalFindingRejections,
516
621
  traceAgenticKinds,
622
+ traceCitationsInText,
517
623
  traceStreamEventsFromSpans,
518
624
  unavailableCapabilities,
519
625
  uploadKey,
@@ -525,6 +631,7 @@ export {
525
631
  verifyFindingsUsage,
526
632
  watchRunTarget,
527
633
  watchSessions,
634
+ withSessionFactsContext,
528
635
  wrap,
529
636
  wrapActionForExec,
530
637
  writeHodoscopeInput,
@@ -535,6 +642,7 @@ export {
535
642
  writeSessionIndexFile,
536
643
  writeTraceEvidenceExportFile,
537
644
  writeTraceImprovementArtifacts,
645
+ writeTraceQuestionsArtifacts,
538
646
  zaiChatCaller,
539
647
  zeroPricedCost
540
648
  };