agent-inspect 6.14.0 → 6.14.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +22 -6
  2. package/README.md +47 -45
  3. package/docs/DEMO-SCRIPT.md +2 -2
  4. package/docs/GOLDEN-PATH.md +18 -18
  5. package/docs/KNOWN-ISSUES.md +2 -1
  6. package/docs/SUPPORT-LEVELS.md +2 -2
  7. package/docs/TRACE-CONTRACTS.md +13 -3
  8. package/package.json +15 -6
  9. package/packages/cli/dist/{chunk-MEO2Z3KE.mjs → chunk-AACUXCHT.mjs} +205 -35
  10. package/packages/cli/dist/chunk-AACUXCHT.mjs.map +1 -0
  11. package/packages/cli/dist/index.cjs +265 -35
  12. package/packages/cli/dist/index.cjs.map +1 -1
  13. package/packages/cli/dist/index.mjs +59 -6
  14. package/packages/cli/dist/index.mjs.map +1 -1
  15. package/packages/cli/dist/{src-6VZNGIF6.mjs → src-ABTS4GO4.mjs} +3 -3
  16. package/packages/cli/dist/{src-6VZNGIF6.mjs.map → src-ABTS4GO4.mjs.map} +1 -1
  17. package/packages/core/dist/advanced.cjs +156 -19
  18. package/packages/core/dist/advanced.cjs.map +1 -1
  19. package/packages/core/dist/advanced.d.cts +17 -9
  20. package/packages/core/dist/advanced.d.ts +17 -9
  21. package/packages/core/dist/advanced.mjs +6 -6
  22. package/packages/core/dist/checks.cjs +108 -18
  23. package/packages/core/dist/checks.cjs.map +1 -1
  24. package/packages/core/dist/checks.d.cts +4 -4
  25. package/packages/core/dist/checks.d.ts +4 -4
  26. package/packages/core/dist/checks.mjs +1 -1
  27. package/packages/core/dist/{chunk-CTA6XNDP.mjs → chunk-5N2OBM7S.mjs} +3 -3
  28. package/packages/core/dist/{chunk-CTA6XNDP.mjs.map → chunk-5N2OBM7S.mjs.map} +1 -1
  29. package/packages/core/dist/chunk-AK5EN4U2.mjs +174 -0
  30. package/packages/core/dist/chunk-AK5EN4U2.mjs.map +1 -0
  31. package/packages/core/dist/{chunk-BS2QCAJX.mjs → chunk-BHMXLDLK.mjs} +110 -20
  32. package/packages/core/dist/chunk-BHMXLDLK.mjs.map +1 -0
  33. package/packages/core/dist/{chunk-UOPVGCOB.mjs → chunk-NXQF73EC.mjs} +3 -3
  34. package/packages/core/dist/{chunk-UOPVGCOB.mjs.map → chunk-NXQF73EC.mjs.map} +1 -1
  35. package/packages/core/dist/{chunk-LFWZEO2L.mjs → chunk-SGL4JGCD.mjs} +3 -3
  36. package/packages/core/dist/{chunk-LFWZEO2L.mjs.map → chunk-SGL4JGCD.mjs.map} +1 -1
  37. package/packages/core/dist/{context-BHAgRjOe.d.cts → context-Ca5yK8Cs.d.cts} +3 -3
  38. package/packages/core/dist/{context-Blyjb5my.d.ts → context-D6cS4XIL.d.ts} +3 -3
  39. package/packages/core/dist/diff.d.cts +3 -3
  40. package/packages/core/dist/diff.d.ts +3 -3
  41. package/packages/core/dist/exporters.d.cts +3 -3
  42. package/packages/core/dist/exporters.d.ts +3 -3
  43. package/packages/core/dist/exporters.mjs +1 -1
  44. package/packages/core/dist/{index-CmXMS-MF.d.cts → index-BY6XZ5aG.d.cts} +3 -3
  45. package/packages/core/dist/{index-Bu_vOjql.d.ts → index-D9HBequ_.d.ts} +3 -3
  46. package/packages/core/dist/index.d.cts +6 -6
  47. package/packages/core/dist/index.d.ts +6 -6
  48. package/packages/core/dist/{inspect-event-DVg84S4v.d.cts → inspect-event-DRthdZlf.d.cts} +9 -0
  49. package/packages/core/dist/{inspect-event-DVg84S4v.d.ts → inspect-event-DRthdZlf.d.ts} +9 -0
  50. package/packages/core/dist/{log-config-BG1WmWf2.d.cts → log-config-CFlIJHTf.d.cts} +1 -1
  51. package/packages/core/dist/{log-config-Ck0aT_Ou.d.ts → log-config-OZRfpHED.d.ts} +1 -1
  52. package/packages/core/dist/logs.cjs +95 -15
  53. package/packages/core/dist/logs.cjs.map +1 -1
  54. package/packages/core/dist/logs.d.cts +3 -3
  55. package/packages/core/dist/logs.d.ts +3 -3
  56. package/packages/core/dist/logs.mjs +2 -2
  57. package/packages/core/dist/{persisted-inspect-event-ChE7pGb7.d.ts → persisted-inspect-event-BVucFVrP.d.ts} +1 -1
  58. package/packages/core/dist/{persisted-inspect-event-d-mSP8kd.d.cts → persisted-inspect-event-CVZWZldL.d.cts} +1 -1
  59. package/packages/core/dist/persisted.cjs +95 -15
  60. package/packages/core/dist/persisted.cjs.map +1 -1
  61. package/packages/core/dist/persisted.d.cts +5 -5
  62. package/packages/core/dist/persisted.d.ts +5 -5
  63. package/packages/core/dist/persisted.mjs +3 -3
  64. package/packages/core/dist/readers.cjs +95 -15
  65. package/packages/core/dist/readers.cjs.map +1 -1
  66. package/packages/core/dist/readers.d.cts +2 -2
  67. package/packages/core/dist/readers.d.ts +2 -2
  68. package/packages/core/dist/readers.mjs +3 -3
  69. package/packages/core/dist/{types-MuwXSJ4b.d.ts → types--ainI31J.d.ts} +1 -1
  70. package/packages/core/dist/{types-BLX3tiOW.d.cts → types-UnrNaTo2.d.cts} +1 -1
  71. package/packages/core/dist/writers.d.cts +2 -2
  72. package/packages/core/dist/writers.d.ts +2 -2
  73. package/packages/cli/dist/chunk-MEO2Z3KE.mjs.map +0 -1
  74. package/packages/core/dist/chunk-BS2QCAJX.mjs.map +0 -1
  75. package/packages/core/dist/chunk-T5MASTIW.mjs +0 -94
  76. package/packages/core/dist/chunk-T5MASTIW.mjs.map +0 -1
@@ -1,15 +1,15 @@
1
- export { C as CreateInspectorOptions, D as DEFAULT_MAX_EVENT_BYTES, f as DEFAULT_MAX_METADATA_VALUE_LENGTH, h as DEFAULT_MAX_PREVIEW_LENGTH, I as Inspector, a as InspectorCaptureOptions, b as InspectorObserveOptions, c as InspectorRunOptions, i as InspectorRuntime, j as InspectorRuntimeContext, k as InspectorRuntimeDiagnostics, l as InspectorRuntimeOptions, d as InspectorStepOptions, T as TraceSafetyOptions, e as createInspector, n as createInspectorRuntime, o as getCurrentContext, g as getCurrentCorrelationMetadata, p as getCurrentDepth, q as getCurrentRunId, r as getCurrentRunName, s as getCurrentStepId, t as getParentStepId, u as getTraceDirFromContext, v as getTraceSafetyFromContext, w as hasActiveContext, x as isAgentInspectEnabled, y as isSilentContext, m as maybeInspectRun, z as prepareMetadataForDisk, A as prepareTraceEventForDisk, B as resolveTraceSafetyOptions, E as runWithContext, F as runWithStepContext } from './context-BHAgRjOe.cjs';
2
- import { R as RedactionProfile, h as TraceEvent, E as ErrorInfo, b as RunStatus, e as StepStatus, j as RunSummary, k as TraceMetadata, l as TraceMetadataStatus, f as StepType, g as TraceCorrelationMetadata } from './types-BLX3tiOW.cjs';
3
- export { A as ActiveStepContext, i as ExecutionContext, I as InspectRunOptions, O as ObserveOptions, a as Run, m as RunCompletedEvent, n as RunStartedEvent, c as Step, o as StepCompletedEvent, d as StepMetadata, S as StepOptions, p as StepStartedEvent, T as TokenMetadata, q as TraceEventBase, r as TraceSchemaVersion, s as isStepStatus, t as isStepType, u as isTraceEvent } from './types-BLX3tiOW.cjs';
4
- import { a as InspectRunTree } from './inspect-event-DVg84S4v.cjs';
5
- export { A as AttributionConfidence, E as EventSource, c as InspectEvent, I as InspectKind, b as InspectNode } from './inspect-event-DVg84S4v.cjs';
6
- import { P as PersistedInspectEvent } from './persisted-inspect-event-d-mSP8kd.cjs';
1
+ export { C as CreateInspectorOptions, D as DEFAULT_MAX_EVENT_BYTES, f as DEFAULT_MAX_METADATA_VALUE_LENGTH, h as DEFAULT_MAX_PREVIEW_LENGTH, I as Inspector, a as InspectorCaptureOptions, b as InspectorObserveOptions, c as InspectorRunOptions, i as InspectorRuntime, j as InspectorRuntimeContext, k as InspectorRuntimeDiagnostics, l as InspectorRuntimeOptions, d as InspectorStepOptions, T as TraceSafetyOptions, e as createInspector, n as createInspectorRuntime, o as getCurrentContext, g as getCurrentCorrelationMetadata, p as getCurrentDepth, q as getCurrentRunId, r as getCurrentRunName, s as getCurrentStepId, t as getParentStepId, u as getTraceDirFromContext, v as getTraceSafetyFromContext, w as hasActiveContext, x as isAgentInspectEnabled, y as isSilentContext, m as maybeInspectRun, z as prepareMetadataForDisk, A as prepareTraceEventForDisk, B as resolveTraceSafetyOptions, E as runWithContext, F as runWithStepContext } from './context-Ca5yK8Cs.cjs';
2
+ import { R as RedactionProfile, h as TraceEvent, E as ErrorInfo, b as RunStatus, e as StepStatus, j as RunSummary, k as TraceMetadata, l as TraceMetadataStatus, f as StepType, g as TraceCorrelationMetadata } from './types-UnrNaTo2.cjs';
3
+ export { A as ActiveStepContext, i as ExecutionContext, I as InspectRunOptions, O as ObserveOptions, a as Run, m as RunCompletedEvent, n as RunStartedEvent, c as Step, o as StepCompletedEvent, d as StepMetadata, S as StepOptions, p as StepStartedEvent, T as TokenMetadata, q as TraceEventBase, r as TraceSchemaVersion, s as isStepStatus, t as isStepType, u as isTraceEvent } from './types-UnrNaTo2.cjs';
4
+ import { a as InspectRunTree } from './inspect-event-DRthdZlf.cjs';
5
+ export { A as AttributionConfidence, E as EventSource, c as InspectEvent, I as InspectKind, b as InspectNode } from './inspect-event-DRthdZlf.cjs';
6
+ import { P as PersistedInspectEvent } from './persisted-inspect-event-CVZWZldL.cjs';
7
7
  import { Stats } from 'node:fs';
8
8
  import { b as ObservedOutcome } from './types-B562HgN_.cjs';
9
9
  export { O as ObservedOutcomeStatus } from './types-B562HgN_.cjs';
10
- import { b as TraceCheckResult, J as TraceCheckStatus } from './index-CmXMS-MF.cjs';
10
+ import { b as TraceCheckResult, J as TraceCheckStatus } from './index-BY6XZ5aG.cjs';
11
11
  import './writers.cjs';
12
- import './log-config-BG1WmWf2.cjs';
12
+ import './log-config-CFlIJHTf.cjs';
13
13
  import './readers.cjs';
14
14
 
15
15
  interface ResolvedRedactionProfile {
@@ -398,6 +398,14 @@ interface TraceStatsOptions {
398
398
  slowStepLimit?: number;
399
399
  }
400
400
  declare function buildTraceStats(metas: TraceMetadata[], options: TraceStatsOptions): Promise<TraceStats>;
401
+ /**
402
+ * Formats a step label for display. `step.tool`/`step.llm` already store the
403
+ * name with its type prefix (e.g. "tool:lookup"), while plain `step()` stores a
404
+ * bare name, so prefixing unconditionally would double the prefix. Add the type
405
+ * prefix only when the name does not already carry it, matching what list/view
406
+ * show for the same step.
407
+ */
408
+ declare function formatStepLabel(stepType: string, stepName: string): string;
401
409
  declare function renderTraceStats(stats: TraceStats): string;
402
410
 
403
411
  interface TraceSearchOptions {
@@ -1435,4 +1443,4 @@ declare function renderGateGithubStepSummary(result: GateResult): string;
1435
1443
  declare function renderGateJUnit(result: GateResult): string;
1436
1444
  declare function renderGateReport(result: GateResult, options?: RenderGateReportOptions): string;
1437
1445
 
1438
- export { type ActivityEntry, type ActivitySummary, type AnalyzeCohortOptions, type BuildActivitySummaryOptions, type BuildSessionIndexOptions, type BundleCheckResults, type BundleCheckRunResult, type BundleMetadata, type BundlePlaceholderArtifact, type BundleRedactionProfile, type BundleRedactionReport, type BundleRedactionReportRun, type BundleResolveOptions, type BundleResolveResult, type BundleSafeStatus, type BundleSafeStatusMetadata, COHORT_METRIC_IDS, type CausalContractFindingInput, type CausalFailureKind, type CohortAggregateMetrics, type CohortAnalysisResult, type CohortMetricComparison, type CohortMetricId, type CohortRunMetrics, type CriticalPathStep, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, DEFAULT_TRACE_DIR_NAME, type DurationStats, EVIDENCE_ASSESSMENT_NOTE, EVIDENCE_FORMAT_VERSION, EVIDENCE_HTML_FILENAME, EVIDENCE_MANIFEST_FILENAME, EVIDENCE_VIEW_CSS, EVIDENCE_VIEW_IDS, type EnrichSessionSummaryOptions, ErrorInfo, type EvidenceCheckFindingSummary, type EvidenceCiPackageFiles, type EvidenceCiPackageInput, type EvidenceContractsViewInput, type EvidenceFileEntry, type EvidenceFileRole, type EvidenceFormatVersion, type EvidenceHtmlShellInput, type EvidenceManifest, type EvidencePackagedFile, type EvidenceProvenanceViewInput, type EvidenceRedactionProfile, type EvidenceSafeStatus, type EvidenceSafetyViewInput, type EvidenceSourceHash, type EvidenceVerificationPolicy, type EvidenceVerifyIssue, type EvidenceVerifyOptions, type EvidenceVerifyResult, type EvidenceVerifyStatus, type EvidenceViewId, type ExplainFact, type ExplainInference, type ExplainMode, type ExplainOptions, type ExplainResult, FALLBACK_TRACE_DIR, type FindFirstCausalFailureOptions, type FirstCausalFailure, type GateCheckId, type GateCheckResult, type GateExitCode, type GateResult, type GroupSessionCohortsOptions, type HandoffEdge, InspectRunTree, type LoadSuiteConfigOptions, MAX_NAME_LENGTH, MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, ObservedOutcome, type ParseTraceJsonlOptions, type ParseTraceJsonlResult, type ParsedDurationFilter, RUNS_DIR_NAME, RedactionProfile, type RenderCohortReportOptions, type RenderGateReportOptions, type RenderSuiteReportOptions, type RenderTimelineOptions, type RenderWhatOptions, type ResolvedRedactionProfile, type ResolvedSuiteCase, type RetryLink, type RunGateOptions, RunStatus, type RunSuiteOptions, RunSummary, type RunTimeline, type RunWhatSummary, SESSION_WORKFLOW_KEYS, SUITE_TEMPLATE_IDS, type SessionCheckSummary, type SessionCohort, type SessionCohortKind, type SessionConfidence, type SessionEdgeSource, type SessionGroup, type SessionIndex, type SessionLastError, type SessionRunRecord, type SessionScopeOptions, type SessionScopeResult, type SessionStatus, type SessionSummary, type SessionWarning, type SessionWorkflowKey, type SessionWorkflowMetadata, StepStatus, StepType, type SuiteArtifactsConfig, type SuiteCaseConfig, type SuiteCaseResult, type SuiteCaseStatus, type SuiteChecksConfig, type SuiteConfig, type SuiteDiagnostic, type SuiteDiagnosticCode, type SuiteEvalConfig, type SuiteRunResult, type SuiteRunSummary, type SuiteTemplateId, TERMINAL_INDENT, type TimelineEntry, type TimelineFocus, type TimelineOptions, TraceCorrelationMetadata, TraceDirectory, type TraceDirectoryOptions, TraceEvent, type TraceFilterOptions, type TraceJsonlFormat, TraceMetadata, TraceMetadataStatus, type TraceSearchOptions, type TraceSearchResult, type TraceSessionCheckResult, type TraceStats, type TraceStatsOptions, type TraceStatsRankedRun, type TraceStatsRankedStep, type ValidateSuiteConfigResult, type ZipEntry, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, assertBundlePathContained, assertEvidenceRelativePath, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildEvidenceCausalFailureViewHtml, buildEvidenceCiPackage, buildEvidenceCircuitViewHtml, buildEvidenceContractsViewHtml, buildEvidenceDiffViewHtml, buildEvidenceFileEntries, buildEvidenceHtmlShell, buildEvidenceHtmlShellFromManifest, buildEvidenceManifest, buildEvidenceOutcomesViewHtml, buildEvidenceProvenanceViewHtml, buildEvidenceSafetyViewHtml, buildEvidenceTimelineViewHtml, buildEvidenceToolsLlmViewHtml, buildEvidenceTreeViewHtml, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, buildZipArchive, bundleFailsOnSafety, bundleRunAssetRelativePath, collectTraceSchemaVersions, compareCohortAggregates, createRunId, createStepId, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, encodeEmbeddedEvidenceJson, enrichSessionRunRecord, enrichSessionSummary, ensureTraceDir, extractMetadata, extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, findFirstCausalFailure, formatDuration, formatError, formatTerminalName, formatTimestamp, gateHasThresholds, getDefaultTraceDir, getIndent, getRunIdFromTraceFileName, getSuiteTemplate, getTraceFilePath, groupSessionCohorts, inferEvidenceFileRole, initializeTraceFile, isAgentInspectTrace, isSha256Hex, listSuiteTemplates, listTraceFiles, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDuration, parseDurationFilter, parseEvidenceManifestJson, parseGateList, parseGateNumber, parseGroupBySpec, parseTraceJsonl, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, readTraceEvents, readTraceFile, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderErrorLine, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderRunSummary, renderRunWhat, renderStepLine, renderSuiteReport, renderSuiteReportMarkdown, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, sanitizeBundleRunId, searchTraces, serializeEvent, serializeEvidenceManifest, sessionKeyForRun, sha256Equals, sha256Hex, toMetadataSafeStatus, traceMetasToSessionRunRecords, truncateName, unknownTraceFormatMessage, validateEvent, validateEvidenceManifest, validateSuiteConfig, verifyEvidenceDirectory, warn, writeTraceEvent };
1446
+ export { type ActivityEntry, type ActivitySummary, type AnalyzeCohortOptions, type BuildActivitySummaryOptions, type BuildSessionIndexOptions, type BundleCheckResults, type BundleCheckRunResult, type BundleMetadata, type BundlePlaceholderArtifact, type BundleRedactionProfile, type BundleRedactionReport, type BundleRedactionReportRun, type BundleResolveOptions, type BundleResolveResult, type BundleSafeStatus, type BundleSafeStatusMetadata, COHORT_METRIC_IDS, type CausalContractFindingInput, type CausalFailureKind, type CohortAggregateMetrics, type CohortAnalysisResult, type CohortMetricComparison, type CohortMetricId, type CohortRunMetrics, type CriticalPathStep, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, DEFAULT_TRACE_DIR_NAME, type DurationStats, EVIDENCE_ASSESSMENT_NOTE, EVIDENCE_FORMAT_VERSION, EVIDENCE_HTML_FILENAME, EVIDENCE_MANIFEST_FILENAME, EVIDENCE_VIEW_CSS, EVIDENCE_VIEW_IDS, type EnrichSessionSummaryOptions, ErrorInfo, type EvidenceCheckFindingSummary, type EvidenceCiPackageFiles, type EvidenceCiPackageInput, type EvidenceContractsViewInput, type EvidenceFileEntry, type EvidenceFileRole, type EvidenceFormatVersion, type EvidenceHtmlShellInput, type EvidenceManifest, type EvidencePackagedFile, type EvidenceProvenanceViewInput, type EvidenceRedactionProfile, type EvidenceSafeStatus, type EvidenceSafetyViewInput, type EvidenceSourceHash, type EvidenceVerificationPolicy, type EvidenceVerifyIssue, type EvidenceVerifyOptions, type EvidenceVerifyResult, type EvidenceVerifyStatus, type EvidenceViewId, type ExplainFact, type ExplainInference, type ExplainMode, type ExplainOptions, type ExplainResult, FALLBACK_TRACE_DIR, type FindFirstCausalFailureOptions, type FirstCausalFailure, type GateCheckId, type GateCheckResult, type GateExitCode, type GateResult, type GroupSessionCohortsOptions, type HandoffEdge, InspectRunTree, type LoadSuiteConfigOptions, MAX_NAME_LENGTH, MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, ObservedOutcome, type ParseTraceJsonlOptions, type ParseTraceJsonlResult, type ParsedDurationFilter, RUNS_DIR_NAME, RedactionProfile, type RenderCohortReportOptions, type RenderGateReportOptions, type RenderSuiteReportOptions, type RenderTimelineOptions, type RenderWhatOptions, type ResolvedRedactionProfile, type ResolvedSuiteCase, type RetryLink, type RunGateOptions, RunStatus, type RunSuiteOptions, RunSummary, type RunTimeline, type RunWhatSummary, SESSION_WORKFLOW_KEYS, SUITE_TEMPLATE_IDS, type SessionCheckSummary, type SessionCohort, type SessionCohortKind, type SessionConfidence, type SessionEdgeSource, type SessionGroup, type SessionIndex, type SessionLastError, type SessionRunRecord, type SessionScopeOptions, type SessionScopeResult, type SessionStatus, type SessionSummary, type SessionWarning, type SessionWorkflowKey, type SessionWorkflowMetadata, StepStatus, StepType, type SuiteArtifactsConfig, type SuiteCaseConfig, type SuiteCaseResult, type SuiteCaseStatus, type SuiteChecksConfig, type SuiteConfig, type SuiteDiagnostic, type SuiteDiagnosticCode, type SuiteEvalConfig, type SuiteRunResult, type SuiteRunSummary, type SuiteTemplateId, TERMINAL_INDENT, type TimelineEntry, type TimelineFocus, type TimelineOptions, TraceCorrelationMetadata, TraceDirectory, type TraceDirectoryOptions, TraceEvent, type TraceFilterOptions, type TraceJsonlFormat, TraceMetadata, TraceMetadataStatus, type TraceSearchOptions, type TraceSearchResult, type TraceSessionCheckResult, type TraceStats, type TraceStatsOptions, type TraceStatsRankedRun, type TraceStatsRankedStep, type ValidateSuiteConfigResult, type ZipEntry, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, assertBundlePathContained, assertEvidenceRelativePath, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildEvidenceCausalFailureViewHtml, buildEvidenceCiPackage, buildEvidenceCircuitViewHtml, buildEvidenceContractsViewHtml, buildEvidenceDiffViewHtml, buildEvidenceFileEntries, buildEvidenceHtmlShell, buildEvidenceHtmlShellFromManifest, buildEvidenceManifest, buildEvidenceOutcomesViewHtml, buildEvidenceProvenanceViewHtml, buildEvidenceSafetyViewHtml, buildEvidenceTimelineViewHtml, buildEvidenceToolsLlmViewHtml, buildEvidenceTreeViewHtml, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, buildZipArchive, bundleFailsOnSafety, bundleRunAssetRelativePath, collectTraceSchemaVersions, compareCohortAggregates, createRunId, createStepId, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, encodeEmbeddedEvidenceJson, enrichSessionRunRecord, enrichSessionSummary, ensureTraceDir, extractMetadata, extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, findFirstCausalFailure, formatDuration, formatError, formatStepLabel, formatTerminalName, formatTimestamp, gateHasThresholds, getDefaultTraceDir, getIndent, getRunIdFromTraceFileName, getSuiteTemplate, getTraceFilePath, groupSessionCohorts, inferEvidenceFileRole, initializeTraceFile, isAgentInspectTrace, isSha256Hex, listSuiteTemplates, listTraceFiles, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDuration, parseDurationFilter, parseEvidenceManifestJson, parseGateList, parseGateNumber, parseGroupBySpec, parseTraceJsonl, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, readTraceEvents, readTraceFile, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderErrorLine, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderRunSummary, renderRunWhat, renderStepLine, renderSuiteReport, renderSuiteReportMarkdown, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, sanitizeBundleRunId, searchTraces, serializeEvent, serializeEvidenceManifest, sessionKeyForRun, sha256Equals, sha256Hex, toMetadataSafeStatus, traceMetasToSessionRunRecords, truncateName, unknownTraceFormatMessage, validateEvent, validateEvidenceManifest, validateSuiteConfig, verifyEvidenceDirectory, warn, writeTraceEvent };
@@ -1,15 +1,15 @@
1
- export { C as CreateInspectorOptions, D as DEFAULT_MAX_EVENT_BYTES, f as DEFAULT_MAX_METADATA_VALUE_LENGTH, h as DEFAULT_MAX_PREVIEW_LENGTH, I as Inspector, a as InspectorCaptureOptions, b as InspectorObserveOptions, c as InspectorRunOptions, i as InspectorRuntime, j as InspectorRuntimeContext, k as InspectorRuntimeDiagnostics, l as InspectorRuntimeOptions, d as InspectorStepOptions, T as TraceSafetyOptions, e as createInspector, n as createInspectorRuntime, o as getCurrentContext, g as getCurrentCorrelationMetadata, p as getCurrentDepth, q as getCurrentRunId, r as getCurrentRunName, s as getCurrentStepId, t as getParentStepId, u as getTraceDirFromContext, v as getTraceSafetyFromContext, w as hasActiveContext, x as isAgentInspectEnabled, y as isSilentContext, m as maybeInspectRun, z as prepareMetadataForDisk, A as prepareTraceEventForDisk, B as resolveTraceSafetyOptions, E as runWithContext, F as runWithStepContext } from './context-Blyjb5my.js';
2
- import { R as RedactionProfile, h as TraceEvent, E as ErrorInfo, b as RunStatus, e as StepStatus, j as RunSummary, k as TraceMetadata, l as TraceMetadataStatus, f as StepType, g as TraceCorrelationMetadata } from './types-MuwXSJ4b.js';
3
- export { A as ActiveStepContext, i as ExecutionContext, I as InspectRunOptions, O as ObserveOptions, a as Run, m as RunCompletedEvent, n as RunStartedEvent, c as Step, o as StepCompletedEvent, d as StepMetadata, S as StepOptions, p as StepStartedEvent, T as TokenMetadata, q as TraceEventBase, r as TraceSchemaVersion, s as isStepStatus, t as isStepType, u as isTraceEvent } from './types-MuwXSJ4b.js';
4
- import { a as InspectRunTree } from './inspect-event-DVg84S4v.js';
5
- export { A as AttributionConfidence, E as EventSource, c as InspectEvent, I as InspectKind, b as InspectNode } from './inspect-event-DVg84S4v.js';
6
- import { P as PersistedInspectEvent } from './persisted-inspect-event-ChE7pGb7.js';
1
+ export { C as CreateInspectorOptions, D as DEFAULT_MAX_EVENT_BYTES, f as DEFAULT_MAX_METADATA_VALUE_LENGTH, h as DEFAULT_MAX_PREVIEW_LENGTH, I as Inspector, a as InspectorCaptureOptions, b as InspectorObserveOptions, c as InspectorRunOptions, i as InspectorRuntime, j as InspectorRuntimeContext, k as InspectorRuntimeDiagnostics, l as InspectorRuntimeOptions, d as InspectorStepOptions, T as TraceSafetyOptions, e as createInspector, n as createInspectorRuntime, o as getCurrentContext, g as getCurrentCorrelationMetadata, p as getCurrentDepth, q as getCurrentRunId, r as getCurrentRunName, s as getCurrentStepId, t as getParentStepId, u as getTraceDirFromContext, v as getTraceSafetyFromContext, w as hasActiveContext, x as isAgentInspectEnabled, y as isSilentContext, m as maybeInspectRun, z as prepareMetadataForDisk, A as prepareTraceEventForDisk, B as resolveTraceSafetyOptions, E as runWithContext, F as runWithStepContext } from './context-D6cS4XIL.js';
2
+ import { R as RedactionProfile, h as TraceEvent, E as ErrorInfo, b as RunStatus, e as StepStatus, j as RunSummary, k as TraceMetadata, l as TraceMetadataStatus, f as StepType, g as TraceCorrelationMetadata } from './types--ainI31J.js';
3
+ export { A as ActiveStepContext, i as ExecutionContext, I as InspectRunOptions, O as ObserveOptions, a as Run, m as RunCompletedEvent, n as RunStartedEvent, c as Step, o as StepCompletedEvent, d as StepMetadata, S as StepOptions, p as StepStartedEvent, T as TokenMetadata, q as TraceEventBase, r as TraceSchemaVersion, s as isStepStatus, t as isStepType, u as isTraceEvent } from './types--ainI31J.js';
4
+ import { a as InspectRunTree } from './inspect-event-DRthdZlf.js';
5
+ export { A as AttributionConfidence, E as EventSource, c as InspectEvent, I as InspectKind, b as InspectNode } from './inspect-event-DRthdZlf.js';
6
+ import { P as PersistedInspectEvent } from './persisted-inspect-event-BVucFVrP.js';
7
7
  import { Stats } from 'node:fs';
8
8
  import { b as ObservedOutcome } from './types-B562HgN_.js';
9
9
  export { O as ObservedOutcomeStatus } from './types-B562HgN_.js';
10
- import { b as TraceCheckResult, J as TraceCheckStatus } from './index-Bu_vOjql.js';
10
+ import { b as TraceCheckResult, J as TraceCheckStatus } from './index-D9HBequ_.js';
11
11
  import './writers.js';
12
- import './log-config-Ck0aT_Ou.js';
12
+ import './log-config-OZRfpHED.js';
13
13
  import './readers.js';
14
14
 
15
15
  interface ResolvedRedactionProfile {
@@ -398,6 +398,14 @@ interface TraceStatsOptions {
398
398
  slowStepLimit?: number;
399
399
  }
400
400
  declare function buildTraceStats(metas: TraceMetadata[], options: TraceStatsOptions): Promise<TraceStats>;
401
+ /**
402
+ * Formats a step label for display. `step.tool`/`step.llm` already store the
403
+ * name with its type prefix (e.g. "tool:lookup"), while plain `step()` stores a
404
+ * bare name, so prefixing unconditionally would double the prefix. Add the type
405
+ * prefix only when the name does not already carry it, matching what list/view
406
+ * show for the same step.
407
+ */
408
+ declare function formatStepLabel(stepType: string, stepName: string): string;
401
409
  declare function renderTraceStats(stats: TraceStats): string;
402
410
 
403
411
  interface TraceSearchOptions {
@@ -1435,4 +1443,4 @@ declare function renderGateGithubStepSummary(result: GateResult): string;
1435
1443
  declare function renderGateJUnit(result: GateResult): string;
1436
1444
  declare function renderGateReport(result: GateResult, options?: RenderGateReportOptions): string;
1437
1445
 
1438
- export { type ActivityEntry, type ActivitySummary, type AnalyzeCohortOptions, type BuildActivitySummaryOptions, type BuildSessionIndexOptions, type BundleCheckResults, type BundleCheckRunResult, type BundleMetadata, type BundlePlaceholderArtifact, type BundleRedactionProfile, type BundleRedactionReport, type BundleRedactionReportRun, type BundleResolveOptions, type BundleResolveResult, type BundleSafeStatus, type BundleSafeStatusMetadata, COHORT_METRIC_IDS, type CausalContractFindingInput, type CausalFailureKind, type CohortAggregateMetrics, type CohortAnalysisResult, type CohortMetricComparison, type CohortMetricId, type CohortRunMetrics, type CriticalPathStep, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, DEFAULT_TRACE_DIR_NAME, type DurationStats, EVIDENCE_ASSESSMENT_NOTE, EVIDENCE_FORMAT_VERSION, EVIDENCE_HTML_FILENAME, EVIDENCE_MANIFEST_FILENAME, EVIDENCE_VIEW_CSS, EVIDENCE_VIEW_IDS, type EnrichSessionSummaryOptions, ErrorInfo, type EvidenceCheckFindingSummary, type EvidenceCiPackageFiles, type EvidenceCiPackageInput, type EvidenceContractsViewInput, type EvidenceFileEntry, type EvidenceFileRole, type EvidenceFormatVersion, type EvidenceHtmlShellInput, type EvidenceManifest, type EvidencePackagedFile, type EvidenceProvenanceViewInput, type EvidenceRedactionProfile, type EvidenceSafeStatus, type EvidenceSafetyViewInput, type EvidenceSourceHash, type EvidenceVerificationPolicy, type EvidenceVerifyIssue, type EvidenceVerifyOptions, type EvidenceVerifyResult, type EvidenceVerifyStatus, type EvidenceViewId, type ExplainFact, type ExplainInference, type ExplainMode, type ExplainOptions, type ExplainResult, FALLBACK_TRACE_DIR, type FindFirstCausalFailureOptions, type FirstCausalFailure, type GateCheckId, type GateCheckResult, type GateExitCode, type GateResult, type GroupSessionCohortsOptions, type HandoffEdge, InspectRunTree, type LoadSuiteConfigOptions, MAX_NAME_LENGTH, MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, ObservedOutcome, type ParseTraceJsonlOptions, type ParseTraceJsonlResult, type ParsedDurationFilter, RUNS_DIR_NAME, RedactionProfile, type RenderCohortReportOptions, type RenderGateReportOptions, type RenderSuiteReportOptions, type RenderTimelineOptions, type RenderWhatOptions, type ResolvedRedactionProfile, type ResolvedSuiteCase, type RetryLink, type RunGateOptions, RunStatus, type RunSuiteOptions, RunSummary, type RunTimeline, type RunWhatSummary, SESSION_WORKFLOW_KEYS, SUITE_TEMPLATE_IDS, type SessionCheckSummary, type SessionCohort, type SessionCohortKind, type SessionConfidence, type SessionEdgeSource, type SessionGroup, type SessionIndex, type SessionLastError, type SessionRunRecord, type SessionScopeOptions, type SessionScopeResult, type SessionStatus, type SessionSummary, type SessionWarning, type SessionWorkflowKey, type SessionWorkflowMetadata, StepStatus, StepType, type SuiteArtifactsConfig, type SuiteCaseConfig, type SuiteCaseResult, type SuiteCaseStatus, type SuiteChecksConfig, type SuiteConfig, type SuiteDiagnostic, type SuiteDiagnosticCode, type SuiteEvalConfig, type SuiteRunResult, type SuiteRunSummary, type SuiteTemplateId, TERMINAL_INDENT, type TimelineEntry, type TimelineFocus, type TimelineOptions, TraceCorrelationMetadata, TraceDirectory, type TraceDirectoryOptions, TraceEvent, type TraceFilterOptions, type TraceJsonlFormat, TraceMetadata, TraceMetadataStatus, type TraceSearchOptions, type TraceSearchResult, type TraceSessionCheckResult, type TraceStats, type TraceStatsOptions, type TraceStatsRankedRun, type TraceStatsRankedStep, type ValidateSuiteConfigResult, type ZipEntry, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, assertBundlePathContained, assertEvidenceRelativePath, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildEvidenceCausalFailureViewHtml, buildEvidenceCiPackage, buildEvidenceCircuitViewHtml, buildEvidenceContractsViewHtml, buildEvidenceDiffViewHtml, buildEvidenceFileEntries, buildEvidenceHtmlShell, buildEvidenceHtmlShellFromManifest, buildEvidenceManifest, buildEvidenceOutcomesViewHtml, buildEvidenceProvenanceViewHtml, buildEvidenceSafetyViewHtml, buildEvidenceTimelineViewHtml, buildEvidenceToolsLlmViewHtml, buildEvidenceTreeViewHtml, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, buildZipArchive, bundleFailsOnSafety, bundleRunAssetRelativePath, collectTraceSchemaVersions, compareCohortAggregates, createRunId, createStepId, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, encodeEmbeddedEvidenceJson, enrichSessionRunRecord, enrichSessionSummary, ensureTraceDir, extractMetadata, extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, findFirstCausalFailure, formatDuration, formatError, formatTerminalName, formatTimestamp, gateHasThresholds, getDefaultTraceDir, getIndent, getRunIdFromTraceFileName, getSuiteTemplate, getTraceFilePath, groupSessionCohorts, inferEvidenceFileRole, initializeTraceFile, isAgentInspectTrace, isSha256Hex, listSuiteTemplates, listTraceFiles, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDuration, parseDurationFilter, parseEvidenceManifestJson, parseGateList, parseGateNumber, parseGroupBySpec, parseTraceJsonl, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, readTraceEvents, readTraceFile, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderErrorLine, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderRunSummary, renderRunWhat, renderStepLine, renderSuiteReport, renderSuiteReportMarkdown, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, sanitizeBundleRunId, searchTraces, serializeEvent, serializeEvidenceManifest, sessionKeyForRun, sha256Equals, sha256Hex, toMetadataSafeStatus, traceMetasToSessionRunRecords, truncateName, unknownTraceFormatMessage, validateEvent, validateEvidenceManifest, validateSuiteConfig, verifyEvidenceDirectory, warn, writeTraceEvent };
1446
+ export { type ActivityEntry, type ActivitySummary, type AnalyzeCohortOptions, type BuildActivitySummaryOptions, type BuildSessionIndexOptions, type BundleCheckResults, type BundleCheckRunResult, type BundleMetadata, type BundlePlaceholderArtifact, type BundleRedactionProfile, type BundleRedactionReport, type BundleRedactionReportRun, type BundleResolveOptions, type BundleResolveResult, type BundleSafeStatus, type BundleSafeStatusMetadata, COHORT_METRIC_IDS, type CausalContractFindingInput, type CausalFailureKind, type CohortAggregateMetrics, type CohortAnalysisResult, type CohortMetricComparison, type CohortMetricId, type CohortRunMetrics, type CriticalPathStep, DEFAULT_SUITE_ARTIFACTS_DIR, DEFAULT_SUITE_CONFIG_NAMES, DEFAULT_TRACE_DIR_NAME, type DurationStats, EVIDENCE_ASSESSMENT_NOTE, EVIDENCE_FORMAT_VERSION, EVIDENCE_HTML_FILENAME, EVIDENCE_MANIFEST_FILENAME, EVIDENCE_VIEW_CSS, EVIDENCE_VIEW_IDS, type EnrichSessionSummaryOptions, ErrorInfo, type EvidenceCheckFindingSummary, type EvidenceCiPackageFiles, type EvidenceCiPackageInput, type EvidenceContractsViewInput, type EvidenceFileEntry, type EvidenceFileRole, type EvidenceFormatVersion, type EvidenceHtmlShellInput, type EvidenceManifest, type EvidencePackagedFile, type EvidenceProvenanceViewInput, type EvidenceRedactionProfile, type EvidenceSafeStatus, type EvidenceSafetyViewInput, type EvidenceSourceHash, type EvidenceVerificationPolicy, type EvidenceVerifyIssue, type EvidenceVerifyOptions, type EvidenceVerifyResult, type EvidenceVerifyStatus, type EvidenceViewId, type ExplainFact, type ExplainInference, type ExplainMode, type ExplainOptions, type ExplainResult, FALLBACK_TRACE_DIR, type FindFirstCausalFailureOptions, type FirstCausalFailure, type GateCheckId, type GateCheckResult, type GateExitCode, type GateResult, type GroupSessionCohortsOptions, type HandoffEdge, InspectRunTree, type LoadSuiteConfigOptions, MAX_NAME_LENGTH, MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, ObservedOutcome, type ParseTraceJsonlOptions, type ParseTraceJsonlResult, type ParsedDurationFilter, RUNS_DIR_NAME, RedactionProfile, type RenderCohortReportOptions, type RenderGateReportOptions, type RenderSuiteReportOptions, type RenderTimelineOptions, type RenderWhatOptions, type ResolvedRedactionProfile, type ResolvedSuiteCase, type RetryLink, type RunGateOptions, RunStatus, type RunSuiteOptions, RunSummary, type RunTimeline, type RunWhatSummary, SESSION_WORKFLOW_KEYS, SUITE_TEMPLATE_IDS, type SessionCheckSummary, type SessionCohort, type SessionCohortKind, type SessionConfidence, type SessionEdgeSource, type SessionGroup, type SessionIndex, type SessionLastError, type SessionRunRecord, type SessionScopeOptions, type SessionScopeResult, type SessionStatus, type SessionSummary, type SessionWarning, type SessionWorkflowKey, type SessionWorkflowMetadata, StepStatus, StepType, type SuiteArtifactsConfig, type SuiteCaseConfig, type SuiteCaseResult, type SuiteCaseStatus, type SuiteChecksConfig, type SuiteConfig, type SuiteDiagnostic, type SuiteDiagnosticCode, type SuiteEvalConfig, type SuiteRunResult, type SuiteRunSummary, type SuiteTemplateId, TERMINAL_INDENT, type TimelineEntry, type TimelineFocus, type TimelineOptions, TraceCorrelationMetadata, TraceDirectory, type TraceDirectoryOptions, TraceEvent, type TraceFilterOptions, type TraceJsonlFormat, TraceMetadata, TraceMetadataStatus, type TraceSearchOptions, type TraceSearchResult, type TraceSessionCheckResult, type TraceStats, type TraceStatsOptions, type TraceStatsRankedRun, type TraceStatsRankedStep, type ValidateSuiteConfigResult, type ZipEntry, aggregateBundleSafeStatus, aggregateSessionCheckResults, analyzeCohort, assertBundlePathContained, assertEvidenceRelativePath, buildActivitySummary, buildBundleMetadata, buildBundleSummaryMarkdown, buildEvidenceCausalFailureViewHtml, buildEvidenceCiPackage, buildEvidenceCircuitViewHtml, buildEvidenceContractsViewHtml, buildEvidenceDiffViewHtml, buildEvidenceFileEntries, buildEvidenceHtmlShell, buildEvidenceHtmlShellFromManifest, buildEvidenceManifest, buildEvidenceOutcomesViewHtml, buildEvidenceProvenanceViewHtml, buildEvidenceSafetyViewHtml, buildEvidenceTimelineViewHtml, buildEvidenceToolsLlmViewHtml, buildEvidenceTreeViewHtml, buildLocalExplanation, buildPlaceholderArtifact, buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildSessionIndex, buildTraceStats, buildZipArchive, bundleFailsOnSafety, bundleRunAssetRelativePath, collectTraceSchemaVersions, compareCohortAggregates, createRunId, createStepId, defaultBundleOutputPath, defaultSuiteConfigTemplate, deriveSessionStatus, encodeEmbeddedEvidenceJson, enrichSessionRunRecord, enrichSessionSummary, ensureTraceDir, extractMetadata, extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents, extractSessionWorkflowMetadata, filterMetasBySessionScope, filterTraces, findFirstCausalFailure, formatDuration, formatError, formatStepLabel, formatTerminalName, formatTimestamp, gateHasThresholds, getDefaultTraceDir, getIndent, getRunIdFromTraceFileName, getSuiteTemplate, getTraceFilePath, groupSessionCohorts, inferEvidenceFileRole, initializeTraceFile, isAgentInspectTrace, isSha256Hex, listSuiteTemplates, listTraceFiles, loadSessionRunRecords, loadSuiteConfig, loadTraceMetadataList, normalizeBundleOutputPath, normalizeSuiteConfig, parseCohortMetricList, parseDuration, parseDurationFilter, parseEvidenceManifestJson, parseGateList, parseGateNumber, parseGroupBySpec, parseTraceJsonl, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, readTraceEvents, readTraceFile, renderActivitySummaryHuman, renderCohortReport, renderCohortSummaryMarkdown, renderErrorLine, renderGateGithubStepSummary, renderGateJUnit, renderGateReport, renderGateSummaryMarkdown, renderRunSummary, renderRunWhat, renderStepLine, renderSuiteReport, renderSuiteReportMarkdown, renderTimeline, renderTraceStats, resolveBundleRunIds, resolveRedactionProfile, resolveSuiteCaseTrace, resolveSuiteConfigPath, resolveSuiteTemplate, resolveTraceDir, runGate, runSuite, sanitizeBundleRunId, searchTraces, serializeEvent, serializeEvidenceManifest, sessionKeyForRun, sha256Equals, sha256Hex, toMetadataSafeStatus, traceMetasToSessionRunRecords, truncateName, unknownTraceFormatMessage, validateEvent, validateEvidenceManifest, validateSuiteConfig, verifyEvidenceDirectory, warn, writeTraceEvent };
@@ -1,7 +1,7 @@
1
- import { runTraceChecks, createRunStatusRule, createToolUsageRule, createRunDurationRule, createLlmUsageRule, createObservedOutcomeRule } from './chunk-BS2QCAJX.mjs';
1
+ import { runTraceChecks, createRunStatusRule, createToolUsageRule, createRunDurationRule, createLlmUsageRule, createObservedOutcomeRule } from './chunk-BHMXLDLK.mjs';
2
2
  export { MAX_TERMINAL_DEPTH, MAX_TERMINAL_NAME_LENGTH, TERMINAL_INDENT, TraceDirectory, createInspector, createInspectorRuntime, formatTerminalName, getCurrentContext, getCurrentCorrelationMetadata, getCurrentDepth, getCurrentRunId, getCurrentRunName, getCurrentStepId, getIndent, getParentStepId, getTraceDirFromContext, getTraceSafetyFromContext, hasActiveContext, isAgentInspectEnabled, isSilentContext, maybeInspectRun, printError, printFailedAt, printRunComplete, printRunStart, printStepComplete, printStepStart, renderErrorLine, renderRunSummary, renderStepLine, resolveTraceDir, runWithContext, runWithStepContext } from './chunk-ZWA5RWMV.mjs';
3
- import { buildRunTimeline, filterTraces, extractMetadata, buildRunSummary } from './chunk-LFWZEO2L.mjs';
4
- export { buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildTraceStats, extractMetadata, filterTraces, renderRunWhat, renderTimeline, renderTraceStats } from './chunk-LFWZEO2L.mjs';
3
+ import { buildRunTimeline, filterTraces, extractMetadata, buildRunSummary } from './chunk-SGL4JGCD.mjs';
4
+ export { buildRunSummary, buildRunTimeline, buildRunWhatSummary, buildTraceStats, extractMetadata, filterTraces, formatStepLabel, renderRunWhat, renderTimeline, renderTraceStats } from './chunk-SGL4JGCD.mjs';
5
5
  import { extractOutcomesFromTraceEvents, parseObservationFilter, summarizeObservedOutcomes, extractOutcomesFromPersistedEvents, renderObservedOutcomesHtml } from './chunk-VFO76UH3.mjs';
6
6
  export { extractOutcomesFromPersistedEvents, extractOutcomesFromTraceEvents } from './chunk-VFO76UH3.mjs';
7
7
  import { diffTraceEvents, renderRunDiff } from './chunk-F7STQ5JF.mjs';
@@ -10,10 +10,10 @@ import { escapeHtml, flattenTree } from './chunk-CAWPF22J.mjs';
10
10
  import { resolveRedactionProfile, readTraceEventsFromFile } from './chunk-ULCGIRTC.mjs';
11
11
  export { DEFAULT_MAX_EVENT_BYTES, DEFAULT_MAX_METADATA_VALUE_LENGTH, DEFAULT_MAX_PREVIEW_LENGTH, getRunIdFromTraceFileName, initializeTraceFile, listTraceFiles, prepareMetadataForDisk, prepareTraceEventForDisk, readTraceEvents, readTraceFile, resolveRedactionProfile, resolveTraceSafetyOptions, serializeEvent, validateEvent, writeTraceEvent } from './chunk-ULCGIRTC.mjs';
12
12
  import { Redactor } from './chunk-VU6O5QAH.mjs';
13
- import { openTrace } from './chunk-CTA6XNDP.mjs';
14
- import './chunk-UOPVGCOB.mjs';
13
+ import { openTrace } from './chunk-5N2OBM7S.mjs';
14
+ import './chunk-NXQF73EC.mjs';
15
15
  import './chunk-S4YWKV4G.mjs';
16
- import './chunk-T5MASTIW.mjs';
16
+ import './chunk-AK5EN4U2.mjs';
17
17
  import { parseDuration, isTraceEvent, getTraceFilePath } from './chunk-WRE4CNPF.mjs';
18
18
  export { DEFAULT_TRACE_DIR_NAME, FALLBACK_TRACE_DIR, MAX_NAME_LENGTH, RUNS_DIR_NAME, createRunId, createStepId, ensureTraceDir, formatDuration, formatError, formatTimestamp, getDefaultTraceDir, getTraceFilePath, isStepStatus, isStepType, isTraceEvent, parseDuration, parseTraceJsonl, truncateName, unknownTraceFormatMessage, warn } from './chunk-WRE4CNPF.mjs';
19
19
  import { persistedInspectEventsToTraceEvents } from './chunk-P366CCL2.mjs';
@@ -64,6 +64,73 @@ function outcomesMatchingStatus(outcomes, statuses) {
64
64
  return outcomes.filter((outcome) => set.has(outcome.status));
65
65
  }
66
66
 
67
+ // packages/core/src/safety/sensitive-key.ts
68
+ function normalizeSensitiveKey(value) {
69
+ return value.toLowerCase().replace(/[^a-z0-9_]/g, "");
70
+ }
71
+ var NON_CREDENTIAL_TOKEN_CONFIG_KEYS = new Set(
72
+ [
73
+ "tokens",
74
+ "max_tokens",
75
+ "min_tokens",
76
+ "ls_max_tokens",
77
+ "token_count",
78
+ "token_limit",
79
+ "token_budget",
80
+ "input_tokens",
81
+ "output_tokens",
82
+ "total_tokens",
83
+ "cached_tokens",
84
+ "prompt_tokens",
85
+ "completion_tokens"
86
+ ].map(normalizeSensitiveKey)
87
+ );
88
+ var DEFAULT_CREDENTIAL_SENSITIVE_KEYS = [
89
+ "authorization",
90
+ "cookie",
91
+ "token",
92
+ "access_token",
93
+ "accesstoken",
94
+ "auth_token",
95
+ "authtoken",
96
+ "refresh_token",
97
+ "refreshtoken",
98
+ "id_token",
99
+ "idtoken",
100
+ "bearer_token",
101
+ "bearertoken",
102
+ "api_token",
103
+ "apitoken",
104
+ "apikey",
105
+ "api_key",
106
+ "password",
107
+ "secret",
108
+ "email"
109
+ ];
110
+ function isTokenCredentialKey(normalized) {
111
+ if (NON_CREDENTIAL_TOKEN_CONFIG_KEYS.has(normalized)) return false;
112
+ if (normalized === "token") return true;
113
+ if (normalized.endsWith("tokens")) return false;
114
+ return normalized.endsWith("token");
115
+ }
116
+ function isCredentialSensitiveKey(key, sensitiveKeys = DEFAULT_CREDENTIAL_SENSITIVE_KEYS) {
117
+ if (!key) return false;
118
+ const normalized = normalizeSensitiveKey(key);
119
+ if (!normalized) return false;
120
+ if (NON_CREDENTIAL_TOKEN_CONFIG_KEYS.has(normalized)) return false;
121
+ for (const sensitive of sensitiveKeys) {
122
+ const s = normalizeSensitiveKey(sensitive);
123
+ if (!s) continue;
124
+ if (s === "token") {
125
+ if (isTokenCredentialKey(normalized)) return true;
126
+ continue;
127
+ }
128
+ if (normalized === s) return true;
129
+ if (normalized.endsWith(`_${s}`) || normalized.startsWith(`${s}_`)) return true;
130
+ }
131
+ return false;
132
+ }
133
+
67
134
  // packages/core/src/checks/logical-events.ts
68
135
  function isRecord(value) {
69
136
  return typeof value === "object" && value !== null && !Array.isArray(value);
@@ -259,6 +326,23 @@ function projectLogicalEvents(events) {
259
326
  }
260
327
  }
261
328
  if (!remapped) {
329
+ if (originalParentId === event.eventId) {
330
+ diagnostics.push({
331
+ code: "AI_LOGICAL_SELF_PARENT_REMOVED",
332
+ message: `Removed self-parent edge on ${event.eventId}.`,
333
+ eventIds: [event.eventId]
334
+ });
335
+ const { parentId: _drop, ...rest } = event;
336
+ normalized.push({
337
+ ...rest,
338
+ projection: {
339
+ ...event.projection,
340
+ parentNormalized: true,
341
+ originalParentId
342
+ }
343
+ });
344
+ continue;
345
+ }
262
346
  if (!logicalById.has(originalParentId) && !logicalByRawId.has(originalParentId)) {
263
347
  const mapping = event.attributes?.parentMapping;
264
348
  const unresolved = mapping === "unresolved" || event.attributes?.parentUnresolved === true || event.attributes?.unresolvedParent === true || // LangGraph/framework scaffolding sentinel labels are not event ids.
@@ -274,6 +358,23 @@ function projectLogicalEvents(events) {
274
358
  normalized.push(event);
275
359
  continue;
276
360
  }
361
+ if (nextParent === event.eventId) {
362
+ diagnostics.push({
363
+ code: "AI_LOGICAL_SELF_PARENT_REMOVED",
364
+ message: `Removed self-parent edge on ${event.eventId} (was ${originalParentId}).`,
365
+ eventIds: [event.eventId]
366
+ });
367
+ const { parentId: _drop, ...rest } = event;
368
+ normalized.push({
369
+ ...rest,
370
+ projection: {
371
+ ...event.projection,
372
+ parentNormalized: true,
373
+ originalParentId
374
+ }
375
+ });
376
+ continue;
377
+ }
277
378
  diagnostics.push({
278
379
  code: "AI_LOGICAL_PARENT_REMAPPED",
279
380
  message: `Remapped parent ${originalParentId} \u2192 ${nextParent} for ${event.eventId}.`,
@@ -569,16 +670,7 @@ var CONFIDENCE_RANK = {
569
670
  correlated: 2,
570
671
  explicit: 3
571
672
  };
572
- var DEFAULT_SENSITIVE_KEYS = [
573
- "authorization",
574
- "cookie",
575
- "token",
576
- "apikey",
577
- "api_key",
578
- "password",
579
- "secret",
580
- "email"
581
- ];
673
+ var DEFAULT_SENSITIVE_KEYS = DEFAULT_CREDENTIAL_SENSITIVE_KEYS;
582
674
  var DEFAULT_RAW_CONTENT_KEYS = [
583
675
  "body",
584
676
  "headers",
@@ -1011,9 +1103,7 @@ function hasRedactionMarker(value, markers) {
1011
1103
  return markers.some((marker) => value.includes(marker)) || /^\[HASH:[A-Za-z0-9_-]+\]$/.test(value);
1012
1104
  }
1013
1105
  function isSensitiveKey(key, sensitiveKeys) {
1014
- if (!key) return false;
1015
- const normalized = normalizedKey(key);
1016
- return sensitiveKeys.some((sensitive) => normalized.includes(normalizedKey(sensitive)));
1106
+ return isCredentialSensitiveKey(key, sensitiveKeys);
1017
1107
  }
1018
1108
  function isRawContentKey(key, forbiddenKeys) {
1019
1109
  if (!key) return false;
@@ -1372,7 +1462,7 @@ function createToolUsageRule(options) {
1372
1462
  }
1373
1463
  }
1374
1464
  const forbidden = new Set(options.forbidden ?? []);
1375
- const allowed = options.allowed ? new Set(options.allowed) : void 0;
1465
+ const allowed = options.allowed?.length ? new Set(options.allowed) : void 0;
1376
1466
  for (const event of tools) {
1377
1467
  const name = toolName(event);
1378
1468
  if (forbidden.has(name)) {
@@ -1472,9 +1562,9 @@ function createLlmUsageRule(options) {
1472
1562
  evaluate(context) {
1473
1563
  const llms = finishedEvents(context, "LLM");
1474
1564
  const findings = [];
1475
- const allowedModels = options.allowedModels ? new Set(options.allowedModels) : void 0;
1476
- const allowedProviders = options.allowedProviders ? new Set(options.allowedProviders) : void 0;
1477
- const finishReasons = options.finishReasons ? new Set(options.finishReasons) : void 0;
1565
+ const allowedModels = options.allowedModels?.length ? new Set(options.allowedModels) : void 0;
1566
+ const allowedProviders = options.allowedProviders?.length ? new Set(options.allowedProviders) : void 0;
1567
+ const finishReasons = options.finishReasons?.length ? new Set(options.finishReasons) : void 0;
1478
1568
  if (options.maxCalls !== void 0 && llms.length > options.maxCalls) {
1479
1569
  findings.push(
1480
1570
  failFinding(
@@ -1815,7 +1905,7 @@ function createSignalRule(ruleId, label, options, selectEvents, nameForEvent) {
1815
1905
  }
1816
1906
  }
1817
1907
  const forbidden = new Set(options.forbidden ?? []);
1818
- const allowed = options.allowed ? new Set(options.allowed) : void 0;
1908
+ const allowed = options.allowed?.length ? new Set(options.allowed) : void 0;
1819
1909
  for (const event of events) {
1820
1910
  const name = nameForEvent(event);
1821
1911
  if (forbidden.has(name)) {