agent-inspect 6.12.0 → 6.12.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 (38) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +27 -6
  3. package/docs/ADOPTION.md +1 -1
  4. package/docs/DEMO-SCRIPT.md +30 -25
  5. package/docs/DESIGN-PARTNER-GUIDE.md +23 -10
  6. package/docs/FIRST-TRACE-IN-5-MINUTES.md +5 -2
  7. package/docs/GOLDEN-PATH.md +2 -2
  8. package/docs/KNOWN-ISSUES.md +1 -0
  9. package/docs/PRE-V7-PILOT-KIT.md +41 -15
  10. package/docs/SUPPORT-LEVELS.md +1 -1
  11. package/docs/TEAM-WORKFLOWS.md +1 -1
  12. package/docs/TECHNICAL-GUIDE.md +2 -2
  13. package/docs/USE-CASES.md +34 -10
  14. package/package.json +2 -2
  15. package/packages/cli/dist/{chunk-XTAA733P.mjs → chunk-4WA7DQCM.mjs} +316 -55
  16. package/packages/cli/dist/chunk-4WA7DQCM.mjs.map +1 -0
  17. package/packages/cli/dist/index.cjs +337 -70
  18. package/packages/cli/dist/index.cjs.map +1 -1
  19. package/packages/cli/dist/index.mjs +4 -4
  20. package/packages/cli/dist/index.mjs.map +1 -1
  21. package/packages/cli/dist/{src-G7PM24W2.mjs → src-YAASTXGE.mjs} +3 -3
  22. package/packages/cli/dist/{src-G7PM24W2.mjs.map → src-YAASTXGE.mjs.map} +1 -1
  23. package/packages/core/dist/advanced.cjs +290 -30
  24. package/packages/core/dist/advanced.cjs.map +1 -1
  25. package/packages/core/dist/advanced.d.cts +1 -1
  26. package/packages/core/dist/advanced.d.ts +1 -1
  27. package/packages/core/dist/advanced.mjs +1 -1
  28. package/packages/core/dist/checks.cjs +295 -30
  29. package/packages/core/dist/checks.cjs.map +1 -1
  30. package/packages/core/dist/checks.d.cts +2 -2
  31. package/packages/core/dist/checks.d.ts +2 -2
  32. package/packages/core/dist/checks.mjs +1 -1
  33. package/packages/core/dist/{chunk-QT6CQ2XA.mjs → chunk-KJICERSD.mjs} +296 -33
  34. package/packages/core/dist/chunk-KJICERSD.mjs.map +1 -0
  35. package/packages/core/dist/{index-mdFcxSOR.d.cts → index-BOP33T4O.d.cts} +72 -1
  36. package/packages/core/dist/{index-BO7l0iAe.d.ts → index-CgCH8NE9.d.ts} +72 -1
  37. package/packages/cli/dist/chunk-XTAA733P.mjs.map +0 -1
  38. package/packages/core/dist/chunk-QT6CQ2XA.mjs.map +0 -1
@@ -3,6 +3,62 @@ import { a as InspectRunTree, b as InspectNode, A as AttributionConfidence } fro
3
3
  import { P as PersistedInspectEvent } from './persisted-inspect-event-ChE7pGb7.js';
4
4
  import { O as ObservedOutcomeStatus } from './types-B562HgN_.js';
5
5
 
6
+ /**
7
+ * Logical lifecycle projection for trace checks.
8
+ *
9
+ * Projects raw persisted rows (including v0.1 start/complete bridges) into
10
+ * completed lifecycle events for semantic/structure rules. Does not mutate
11
+ * input; does not replace public experimental `events` (raw rows).
12
+ *
13
+ * @experimental Available through `agent-inspect/checks`; may evolve.
14
+ */
15
+
16
+ /**
17
+ * Diagnostic emitted while projecting logical lifecycle events.
18
+ *
19
+ * @experimental
20
+ */
21
+ interface LogicalProjectionDiagnostic {
22
+ code: "AI_LOGICAL_PAIR_AMBIGUOUS" | "AI_LOGICAL_PAIR_UNMATCHED_START" | "AI_LOGICAL_PAIR_UNMATCHED_COMPLETE" | "AI_LOGICAL_PARENT_REMAPPED" | "AI_LOGICAL_PARENT_UNRESOLVED";
23
+ message: string;
24
+ eventIds?: readonly string[];
25
+ }
26
+ /**
27
+ * A persisted event after lifecycle pairing and parent normalization.
28
+ * Compatible with rule helpers that read PersistedInspectEvent fields.
29
+ *
30
+ * @experimental
31
+ */
32
+ type LogicalTraceEvent = PersistedInspectEvent & {
33
+ /** Raw event ids merged into this logical row (start first when paired). */
34
+ readonly sourceEventIds: readonly string[];
35
+ readonly projection: {
36
+ readonly paired: boolean;
37
+ readonly absorbedEventIds: readonly string[];
38
+ readonly parentNormalized: boolean;
39
+ readonly originalParentId?: string;
40
+ };
41
+ };
42
+ interface ProjectLogicalEventsResult {
43
+ readonly logicalEvents: readonly LogicalTraceEvent[];
44
+ readonly diagnostics: readonly LogicalProjectionDiagnostic[];
45
+ }
46
+ /**
47
+ * Pair v0.1 run/step start+complete rows and normalize parent references.
48
+ *
49
+ * - Keeps start kind/name; applies terminal status/timing/error from complete.
50
+ * - Absorbs matching complete rows (not emitted as separate logical events).
51
+ * - Remaps parentId from stepId or absorbed complete eventId → logical eventId.
52
+ */
53
+ declare function projectLogicalEvents(events: readonly PersistedInspectEvent[]): ProjectLogicalEventsResult;
54
+ /**
55
+ * Resolve a human-meaningful tool name from a (logical or raw) event.
56
+ * Precedence: toolName → tool → metadata.toolName → metadata.tool → name prefixes.
57
+ *
58
+ * @experimental
59
+ */
60
+ declare function resolveCanonicalToolName(event: PersistedInspectEvent): string;
61
+
6
62
  /**
7
63
  * Experimental trace-check finding severity.
8
64
  *
@@ -147,7 +203,22 @@ interface TraceCheckInput {
147
203
  interface TraceCheckFacts {
148
204
  format: string;
149
205
  runs: readonly InspectRunTree[];
206
+ /**
207
+ * Raw persisted rows (public experimental contract; unchanged meaning).
208
+ */
150
209
  events: readonly PersistedInspectEvent[];
210
+ /**
211
+ * Lifecycle-paired projection for built-in semantic/structure rules.
212
+ *
213
+ * @experimental Additive in 6.12.2; formal TraceFacts land in 6.13.
214
+ */
215
+ logicalEvents: readonly LogicalTraceEvent[];
216
+ /**
217
+ * Non-fatal projection notes (ambiguous pairs, remapped parents, etc.).
218
+ *
219
+ * @experimental
220
+ */
221
+ logicalProjectionDiagnostics: readonly LogicalProjectionDiagnostic[];
151
222
  readerWarnings: readonly TraceReadWarning[];
152
223
  unsupportedFields: readonly string[];
153
224
  sourceFiles: readonly string[];
@@ -658,4 +729,4 @@ declare function createObservedOutcomeRule(options?: ObservedOutcomeRuleOptions)
658
729
  */
659
730
  declare function runTraceChecks(input: TraceCheckInput, options?: RunTraceChecksOptions): TraceCheckResult;
660
731
 
661
- export { createRunStatusRule as $, type TraceCheckFindingStatus as A, type BaselineRegressionRuleOptions as B, type TraceCheckRule as C, type DecisionRuleOptions as D, type TraceCheckRuleCategory as E, type TraceCheckSeverity as F, type GuardrailRuleOptions as G, type TraceCheckStatus as H, type TraceCheckSummary as I, type TraceSignalRuleOptions as J, createBaselineRegressionRule as K, type LlmUsageRuleOptions as L, type MaxStepDurationRuleOptions as M, createDecisionRule as N, type ObservedOutcomeRuleOptions as O, createGuardrailRule as P, createLlmUsageRule as Q, type RetrievalRuleOptions as R, type SafetyFindingCategory as S, type TraceCheckInput as T, createMaxStepDurationRule as U, createObservedOutcomeRule as V, createRequireCompletedRule as W, createRetrievalRule as X, createRunDepthRule as Y, createRunDurationRule as Z, createRunEventCountRule as _, type TraceCheckResult as a, createSafetyOversizedAttributeRule as a0, createSafetyRawContentRule as a1, createSafetyRedactionRule as a2, createSafetySecretPatternRule as a3, createStallDetectionRule as a4, createStructureCycleRule as a5, createStructureIncompleteRule as a6, createStructureOrphanRule as a7, createStructureParallelWidthRule as a8, createStructureRelationshipRule as a9, createToolFailureRule as aa, createToolOrderingRule as ab, createToolUsageRule as ac, runTraceChecks as ad, type RunDepthRuleOptions as b, type RunDurationRuleOptions as c, type RunEventCountRuleOptions as d, type RunStatusRuleOptions as e, type RunTraceChecksOptions as f, type SafetyFindingConfidence as g, type SafetyOversizedAttributeRuleOptions as h, type SafetyRawContentRuleOptions as i, type SafetyRedactionRuleOptions as j, type SafetySecretPattern as k, type SafetySecretPatternRuleOptions as l, type StallDetectionRuleOptions as m, type StructureIncompleteRuleOptions as n, type StructureOrphanRuleOptions as o, type StructureParallelWidthRuleOptions as p, type StructureRelationshipRuleOptions as q, type ToolFailureRuleOptions as r, type ToolOrderingRuleOptions as s, type ToolUsageRuleOptions as t, type TraceCheckContext as u, type TraceCheckDiagnostic as v, type TraceCheckDiagnosticCode as w, type TraceCheckEvidence as x, type TraceCheckFacts as y, type TraceCheckFinding as z };
732
+ export { createRunDurationRule as $, type TraceCheckFacts as A, type BaselineRegressionRuleOptions as B, type TraceCheckFinding as C, type DecisionRuleOptions as D, type TraceCheckFindingStatus as E, type TraceCheckRule as F, type GuardrailRuleOptions as G, type TraceCheckRuleCategory as H, type TraceCheckSeverity as I, type TraceCheckStatus as J, type TraceCheckSummary as K, type LlmUsageRuleOptions as L, type MaxStepDurationRuleOptions as M, type TraceSignalRuleOptions as N, type ObservedOutcomeRuleOptions as O, createBaselineRegressionRule as P, createDecisionRule as Q, type RetrievalRuleOptions as R, type SafetyFindingCategory as S, type TraceCheckInput as T, createGuardrailRule as U, createLlmUsageRule as V, createMaxStepDurationRule as W, createObservedOutcomeRule as X, createRequireCompletedRule as Y, createRetrievalRule as Z, createRunDepthRule as _, type TraceCheckResult as a, createRunEventCountRule as a0, createRunStatusRule as a1, createSafetyOversizedAttributeRule as a2, createSafetyRawContentRule as a3, createSafetyRedactionRule as a4, createSafetySecretPatternRule as a5, createStallDetectionRule as a6, createStructureCycleRule as a7, createStructureIncompleteRule as a8, createStructureOrphanRule as a9, createStructureParallelWidthRule as aa, createStructureRelationshipRule as ab, createToolFailureRule as ac, createToolOrderingRule as ad, createToolUsageRule as ae, projectLogicalEvents as af, resolveCanonicalToolName as ag, runTraceChecks as ah, type LogicalProjectionDiagnostic as b, type LogicalTraceEvent as c, type RunDepthRuleOptions as d, type RunDurationRuleOptions as e, type RunEventCountRuleOptions as f, type RunStatusRuleOptions as g, type RunTraceChecksOptions as h, type SafetyFindingConfidence as i, type SafetyOversizedAttributeRuleOptions as j, type SafetyRawContentRuleOptions as k, type SafetyRedactionRuleOptions as l, type SafetySecretPattern as m, type SafetySecretPatternRuleOptions as n, type StallDetectionRuleOptions as o, type StructureIncompleteRuleOptions as p, type StructureOrphanRuleOptions as q, type StructureParallelWidthRuleOptions as r, type StructureRelationshipRuleOptions as s, type ToolFailureRuleOptions as t, type ToolOrderingRuleOptions as u, type ToolUsageRuleOptions as v, type TraceCheckContext as w, type TraceCheckDiagnostic as x, type TraceCheckDiagnosticCode as y, type TraceCheckEvidence as z };