@flanksource/clicky-ui 0.3.45 → 0.3.47
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/NOTICE.md +11 -0
- package/README.md +22 -0
- package/dist/ai.cjs +13 -8
- package/dist/ai.cjs.map +1 -1
- package/dist/ai.js +7 -2
- package/dist/ai.js.map +1 -1
- package/dist/components/ErrorWrapper.cjs +2 -3
- package/dist/components/ErrorWrapper.cjs.map +1 -1
- package/dist/components/ErrorWrapper.d.ts.map +1 -1
- package/dist/components/ErrorWrapper.js +3 -4
- package/dist/components/ErrorWrapper.js.map +1 -1
- package/dist/data/AccessMark.cjs +23 -0
- package/dist/data/AccessMark.cjs.map +1 -0
- package/dist/data/AccessMark.d.ts +11 -0
- package/dist/data/AccessMark.d.ts.map +1 -0
- package/dist/data/AccessMark.js +23 -0
- package/dist/data/AccessMark.js.map +1 -0
- package/dist/data/Clicky.cjs +3 -0
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.js +3 -0
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/CodeDiff.cjs +116 -23
- package/dist/data/CodeDiff.cjs.map +1 -1
- package/dist/data/CodeDiff.d.ts +26 -0
- package/dist/data/CodeDiff.d.ts.map +1 -1
- package/dist/data/CodeDiff.js +116 -23
- package/dist/data/CodeDiff.js.map +1 -1
- package/dist/data/FilterPill.cjs +15 -2
- package/dist/data/FilterPill.cjs.map +1 -1
- package/dist/data/FilterPill.d.ts +1 -1
- package/dist/data/FilterPill.d.ts.map +1 -1
- package/dist/data/FilterPill.js +15 -2
- package/dist/data/FilterPill.js.map +1 -1
- package/dist/data/GraphDiagram.cjs +65 -13
- package/dist/data/GraphDiagram.cjs.map +1 -1
- package/dist/data/GraphDiagram.d.ts +9 -2
- package/dist/data/GraphDiagram.d.ts.map +1 -1
- package/dist/data/GraphDiagram.js +66 -14
- package/dist/data/GraphDiagram.js.map +1 -1
- package/dist/data/GraphDiagramGroups.cjs +100 -0
- package/dist/data/GraphDiagramGroups.cjs.map +1 -0
- package/dist/data/GraphDiagramGroups.d.ts +24 -0
- package/dist/data/GraphDiagramGroups.d.ts.map +1 -0
- package/dist/data/GraphDiagramGroups.js +100 -0
- package/dist/data/GraphDiagramGroups.js.map +1 -0
- package/dist/data/GraphDiagramNodes.cjs +17 -31
- package/dist/data/GraphDiagramNodes.cjs.map +1 -1
- package/dist/data/GraphDiagramNodes.d.ts +6 -13
- package/dist/data/GraphDiagramNodes.d.ts.map +1 -1
- package/dist/data/GraphDiagramNodes.js +17 -31
- package/dist/data/GraphDiagramNodes.js.map +1 -1
- package/dist/data/LogViewer.cjs +27 -8
- package/dist/data/LogViewer.cjs.map +1 -1
- package/dist/data/LogViewer.d.ts +11 -3
- package/dist/data/LogViewer.d.ts.map +1 -1
- package/dist/data/LogViewer.js +27 -8
- package/dist/data/LogViewer.js.map +1 -1
- package/dist/data/Properties.cjs +2 -15
- package/dist/data/Properties.cjs.map +1 -1
- package/dist/data/Properties.d.ts +4 -0
- package/dist/data/Properties.d.ts.map +1 -1
- package/dist/data/Properties.js +2 -15
- package/dist/data/Properties.js.map +1 -1
- package/dist/data/PropertyValue.cjs +37 -0
- package/dist/data/PropertyValue.cjs.map +1 -0
- package/dist/data/PropertyValue.d.ts +6 -0
- package/dist/data/PropertyValue.d.ts.map +1 -0
- package/dist/data/PropertyValue.js +37 -0
- package/dist/data/PropertyValue.js.map +1 -0
- package/dist/data/Tree.cjs +4 -3
- package/dist/data/Tree.cjs.map +1 -1
- package/dist/data/Tree.d.ts +3 -1
- package/dist/data/Tree.d.ts.map +1 -1
- package/dist/data/Tree.js +4 -3
- package/dist/data/Tree.js.map +1 -1
- package/dist/data/TreeNode.cjs +1 -1
- package/dist/data/TreeNode.cjs.map +1 -1
- package/dist/data/TreeNode.d.ts.map +1 -1
- package/dist/data/TreeNode.js +1 -1
- package/dist/data/TreeNode.js.map +1 -1
- package/dist/data/ai/ChatFab.cjs +1 -1
- package/dist/data/ai/ChatFab.cjs.map +1 -1
- package/dist/data/ai/ChatFab.js +1 -1
- package/dist/data/ai/ChatFab.js.map +1 -1
- package/dist/data/ai/ChatWindow.cjs +106 -171
- package/dist/data/ai/ChatWindow.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.d.ts +6 -2
- package/dist/data/ai/ChatWindow.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.header.cjs +104 -0
- package/dist/data/ai/ChatWindow.header.cjs.map +1 -0
- package/dist/data/ai/ChatWindow.header.d.ts +29 -0
- package/dist/data/ai/ChatWindow.header.d.ts.map +1 -0
- package/dist/data/ai/ChatWindow.header.js +104 -0
- package/dist/data/ai/ChatWindow.header.js.map +1 -0
- package/dist/data/ai/ChatWindow.js +107 -172
- package/dist/data/ai/ChatWindow.js.map +1 -1
- package/dist/data/ai/ChatWindow.placement.cjs +95 -0
- package/dist/data/ai/ChatWindow.placement.cjs.map +1 -0
- package/dist/data/ai/ChatWindow.placement.d.ts +32 -0
- package/dist/data/ai/ChatWindow.placement.d.ts.map +1 -0
- package/dist/data/ai/ChatWindow.placement.js +95 -0
- package/dist/data/ai/ChatWindow.placement.js.map +1 -0
- package/dist/data/ai/SessionChatComposer.cjs +3 -1
- package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts +4 -1
- package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
- package/dist/data/ai/SessionChatComposer.js +3 -1
- package/dist/data/ai/SessionChatComposer.js.map +1 -1
- package/dist/data/ai/SessionInspector.cjs +68 -72
- package/dist/data/ai/SessionInspector.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.composer-slot.cjs +8 -0
- package/dist/data/ai/SessionInspector.composer-slot.cjs.map +1 -0
- package/dist/data/ai/SessionInspector.composer-slot.d.ts +9 -0
- package/dist/data/ai/SessionInspector.composer-slot.d.ts.map +1 -0
- package/dist/data/ai/SessionInspector.composer-slot.js +8 -0
- package/dist/data/ai/SessionInspector.composer-slot.js.map +1 -0
- package/dist/data/ai/SessionInspector.d.ts +6 -1
- package/dist/data/ai/SessionInspector.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.js +69 -73
- package/dist/data/ai/SessionInspector.js.map +1 -1
- package/dist/data/ai/SessionInspector.legacy.cjs +41 -42
- package/dist/data/ai/SessionInspector.legacy.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.legacy.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.legacy.js +41 -42
- package/dist/data/ai/SessionInspector.legacy.js.map +1 -1
- package/dist/data/ai/SessionInspector.remote-view.cjs +14 -9
- package/dist/data/ai/SessionInspector.remote-view.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.remote-view.d.ts +6 -2
- package/dist/data/ai/SessionInspector.remote-view.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.remote-view.js +14 -9
- package/dist/data/ai/SessionInspector.remote-view.js.map +1 -1
- package/dist/data/ai/SessionInspector.remote.cjs +84 -16
- package/dist/data/ai/SessionInspector.remote.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.remote.d.ts +42 -7
- package/dist/data/ai/SessionInspector.remote.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.remote.js +86 -18
- package/dist/data/ai/SessionInspector.remote.js.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.cjs +5 -0
- package/dist/data/ai/SessionInspector.transcript.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.js +5 -0
- package/dist/data/ai/SessionInspector.transcript.js.map +1 -1
- package/dist/data/ai/SessionTail.cjs +63 -0
- package/dist/data/ai/SessionTail.cjs.map +1 -0
- package/dist/data/ai/SessionTail.d.ts +14 -0
- package/dist/data/ai/SessionTail.d.ts.map +1 -0
- package/dist/data/ai/SessionTail.js +63 -0
- package/dist/data/ai/SessionTail.js.map +1 -0
- package/dist/data/ai/SessionViewer.cjs +10 -3
- package/dist/data/ai/SessionViewer.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.d.ts +7 -1
- package/dist/data/ai/SessionViewer.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.js +10 -3
- package/dist/data/ai/SessionViewer.js.map +1 -1
- package/dist/data/ai/SessionViewer.unified.d.ts +14 -0
- package/dist/data/ai/SessionViewer.unified.d.ts.map +1 -1
- package/dist/data/ai/index.d.ts +4 -3
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/ai/use-session-scroll.cjs +30 -6
- package/dist/data/ai/use-session-scroll.cjs.map +1 -1
- package/dist/data/ai/use-session-scroll.d.ts +7 -0
- package/dist/data/ai/use-session-scroll.d.ts.map +1 -1
- package/dist/data/ai/use-session-scroll.js +30 -6
- package/dist/data/ai/use-session-scroll.js.map +1 -1
- package/dist/data/call-graph/CallGraph.cjs +50 -31
- package/dist/data/call-graph/CallGraph.cjs.map +1 -1
- package/dist/data/call-graph/CallGraph.d.ts +10 -1
- package/dist/data/call-graph/CallGraph.d.ts.map +1 -1
- package/dist/data/call-graph/CallGraph.js +52 -33
- package/dist/data/call-graph/CallGraph.js.map +1 -1
- package/dist/data/call-graph/CallGraphMembers.cjs +5 -4
- package/dist/data/call-graph/CallGraphMembers.cjs.map +1 -1
- package/dist/data/call-graph/CallGraphMembers.d.ts +1 -1
- package/dist/data/call-graph/CallGraphMembers.d.ts.map +1 -1
- package/dist/data/call-graph/CallGraphMembers.js +5 -4
- package/dist/data/call-graph/CallGraphMembers.js.map +1 -1
- package/dist/data/call-graph/CallGraphToolbar.cjs +17 -5
- package/dist/data/call-graph/CallGraphToolbar.cjs.map +1 -1
- package/dist/data/call-graph/CallGraphToolbar.d.ts +10 -0
- package/dist/data/call-graph/CallGraphToolbar.d.ts.map +1 -1
- package/dist/data/call-graph/CallGraphToolbar.js +18 -6
- package/dist/data/call-graph/CallGraphToolbar.js.map +1 -1
- package/dist/data/call-graph/call-graph-model.cjs +169 -18
- package/dist/data/call-graph/call-graph-model.cjs.map +1 -1
- package/dist/data/call-graph/call-graph-model.d.ts +40 -4
- package/dist/data/call-graph/call-graph-model.d.ts.map +1 -1
- package/dist/data/call-graph/call-graph-model.js +170 -19
- package/dist/data/call-graph/call-graph-model.js.map +1 -1
- package/dist/data/call-graph/call-graph-vocabulary.cjs +19 -1
- package/dist/data/call-graph/call-graph-vocabulary.cjs.map +1 -1
- package/dist/data/call-graph/call-graph-vocabulary.d.ts +4 -0
- package/dist/data/call-graph/call-graph-vocabulary.d.ts.map +1 -1
- package/dist/data/call-graph/call-graph-vocabulary.js +19 -1
- package/dist/data/call-graph/call-graph-vocabulary.js.map +1 -1
- package/dist/data/call-graph/call-graph.fixtures.d.ts.map +1 -1
- package/dist/data/call-graph/index.d.ts +2 -2
- package/dist/data/call-graph/index.d.ts.map +1 -1
- package/dist/data/call-graph/types.cjs.map +1 -1
- package/dist/data/call-graph/types.d.ts +7 -2
- package/dist/data/call-graph/types.d.ts.map +1 -1
- package/dist/data/call-graph/types.js.map +1 -1
- package/dist/data/chat/Chat.cjs +1 -1
- package/dist/data/chat/Chat.cjs.map +1 -1
- package/dist/data/chat/Chat.js +1 -1
- package/dist/data/chat/Chat.js.map +1 -1
- package/dist/data/chat/ChatRuntimeToolbar.cjs +4 -4
- package/dist/data/chat/ChatRuntimeToolbar.cjs.map +1 -1
- package/dist/data/chat/ChatRuntimeToolbar.d.ts.map +1 -1
- package/dist/data/chat/ChatRuntimeToolbar.js +4 -4
- package/dist/data/chat/ChatRuntimeToolbar.js.map +1 -1
- package/dist/data/chat/PromptInput.cjs +4 -2
- package/dist/data/chat/PromptInput.cjs.map +1 -1
- package/dist/data/chat/PromptInput.d.ts +5 -1
- package/dist/data/chat/PromptInput.d.ts.map +1 -1
- package/dist/data/chat/PromptInput.js +4 -2
- package/dist/data/chat/PromptInput.js.map +1 -1
- package/dist/data/data-access.cjs +8 -0
- package/dist/data/data-access.cjs.map +1 -0
- package/dist/data/data-access.d.ts +5 -0
- package/dist/data/data-access.d.ts.map +1 -0
- package/dist/data/data-access.js +8 -0
- package/dist/data/data-access.js.map +1 -0
- package/dist/data/diagnostics/ErrorDetails.cjs +13 -2
- package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts +3 -1
- package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
- package/dist/data/diagnostics/ErrorDetails.js +14 -3
- package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.cjs +3 -2
- package/dist/data/diagnostics/FrameSourceWindow.cjs.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.d.ts.map +1 -1
- package/dist/data/diagnostics/FrameSourceWindow.js +3 -2
- package/dist/data/diagnostics/FrameSourceWindow.js.map +1 -1
- package/dist/data/diagnostics/error-diagnostics.cjs +5 -0
- package/dist/data/diagnostics/error-diagnostics.cjs.map +1 -1
- package/dist/data/diagnostics/error-diagnostics.d.ts +1 -0
- package/dist/data/diagnostics/error-diagnostics.d.ts.map +1 -1
- package/dist/data/diagnostics/error-diagnostics.js +6 -1
- package/dist/data/diagnostics/error-diagnostics.js.map +1 -1
- package/dist/data/git/GitChangeList.cjs +6 -2
- package/dist/data/git/GitChangeList.cjs.map +1 -1
- package/dist/data/git/GitChangeList.d.ts +6 -1
- package/dist/data/git/GitChangeList.d.ts.map +1 -1
- package/dist/data/git/GitChangeList.js +6 -2
- package/dist/data/git/GitChangeList.js.map +1 -1
- package/dist/data/graph-columns-layout.cjs +47 -16
- package/dist/data/graph-columns-layout.cjs.map +1 -1
- package/dist/data/graph-columns-layout.d.ts +34 -0
- package/dist/data/graph-columns-layout.d.ts.map +1 -1
- package/dist/data/graph-columns-layout.js +47 -16
- package/dist/data/graph-columns-layout.js.map +1 -1
- package/dist/data/graph-diagram-model.cjs +5 -0
- package/dist/data/graph-diagram-model.cjs.map +1 -1
- package/dist/data/graph-diagram-model.d.ts +19 -0
- package/dist/data/graph-diagram-model.d.ts.map +1 -1
- package/dist/data/graph-diagram-model.js +5 -0
- package/dist/data/graph-diagram-model.js.map +1 -1
- package/dist/data/graph-group-window.cjs +60 -0
- package/dist/data/graph-group-window.cjs.map +1 -0
- package/dist/data/graph-group-window.d.ts +33 -0
- package/dist/data/graph-group-window.d.ts.map +1 -0
- package/dist/data/graph-group-window.js +60 -0
- package/dist/data/graph-group-window.js.map +1 -0
- package/dist/data/har/HarPanel.cjs +3 -1
- package/dist/data/har/HarPanel.cjs.map +1 -1
- package/dist/data/har/HarPanel.d.ts +4 -1
- package/dist/data/har/HarPanel.d.ts.map +1 -1
- package/dist/data/har/HarPanel.js +3 -1
- package/dist/data/har/HarPanel.js.map +1 -1
- package/dist/data/test-runner/Expectation.cjs +57 -0
- package/dist/data/test-runner/Expectation.cjs.map +1 -0
- package/dist/data/test-runner/Expectation.d.ts +19 -0
- package/dist/data/test-runner/Expectation.d.ts.map +1 -0
- package/dist/data/test-runner/Expectation.js +57 -0
- package/dist/data/test-runner/Expectation.js.map +1 -0
- package/dist/data/test-runner/MarkIcons.cjs +38 -0
- package/dist/data/test-runner/MarkIcons.cjs.map +1 -0
- package/dist/data/test-runner/MarkIcons.d.ts +15 -0
- package/dist/data/test-runner/MarkIcons.d.ts.map +1 -0
- package/dist/data/test-runner/MarkIcons.js +38 -0
- package/dist/data/test-runner/MarkIcons.js.map +1 -0
- package/dist/data/test-runner/TestDetailPanel.cjs +74 -42
- package/dist/data/test-runner/TestDetailPanel.cjs.map +1 -1
- package/dist/data/test-runner/TestDetailPanel.d.ts.map +1 -1
- package/dist/data/test-runner/TestDetailPanel.js +76 -44
- package/dist/data/test-runner/TestDetailPanel.js.map +1 -1
- package/dist/data/test-runner/TestFailureDetail.cjs +23 -27
- package/dist/data/test-runner/TestFailureDetail.cjs.map +1 -1
- package/dist/data/test-runner/TestFailureDetail.d.ts +2 -2
- package/dist/data/test-runner/TestFailureDetail.d.ts.map +1 -1
- package/dist/data/test-runner/TestFailureDetail.js +23 -27
- package/dist/data/test-runner/TestFailureDetail.js.map +1 -1
- package/dist/data/test-runner/TestFilterBar.cjs +87 -93
- package/dist/data/test-runner/TestFilterBar.cjs.map +1 -1
- package/dist/data/test-runner/TestFilterBar.d.ts +3 -2
- package/dist/data/test-runner/TestFilterBar.d.ts.map +1 -1
- package/dist/data/test-runner/TestFilterBar.js +89 -95
- package/dist/data/test-runner/TestFilterBar.js.map +1 -1
- package/dist/data/test-runner/TestRunSummary.cjs +35 -21
- package/dist/data/test-runner/TestRunSummary.cjs.map +1 -1
- package/dist/data/test-runner/TestRunSummary.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunSummary.js +35 -21
- package/dist/data/test-runner/TestRunSummary.js.map +1 -1
- package/dist/data/test-runner/TestRunner.cjs +52 -30
- package/dist/data/test-runner/TestRunner.cjs.map +1 -1
- package/dist/data/test-runner/TestRunner.d.ts +3 -2
- package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
- package/dist/data/test-runner/TestRunner.js +52 -30
- package/dist/data/test-runner/TestRunner.js.map +1 -1
- package/dist/data/test-runner/TestTree.cjs +5 -2
- package/dist/data/test-runner/TestTree.cjs.map +1 -1
- package/dist/data/test-runner/TestTree.d.ts +5 -2
- package/dist/data/test-runner/TestTree.d.ts.map +1 -1
- package/dist/data/test-runner/TestTree.js +5 -2
- package/dist/data/test-runner/TestTree.js.map +1 -1
- package/dist/data/test-runner/TestTreeNode.cjs +27 -19
- package/dist/data/test-runner/TestTreeNode.cjs.map +1 -1
- package/dist/data/test-runner/TestTreeNode.d.ts.map +1 -1
- package/dist/data/test-runner/TestTreeNode.js +28 -20
- package/dist/data/test-runner/TestTreeNode.js.map +1 -1
- package/dist/data/test-runner/adapter.cjs +11 -0
- package/dist/data/test-runner/adapter.cjs.map +1 -1
- package/dist/data/test-runner/adapter.d.ts +18 -7
- package/dist/data/test-runner/adapter.d.ts.map +1 -1
- package/dist/data/test-runner/adapter.js +11 -0
- package/dist/data/test-runner/adapter.js.map +1 -1
- package/dist/data/test-runner/copy.cjs +114 -0
- package/dist/data/test-runner/copy.cjs.map +1 -0
- package/dist/data/test-runner/copy.d.ts +47 -0
- package/dist/data/test-runner/copy.d.ts.map +1 -0
- package/dist/data/test-runner/copy.js +114 -0
- package/dist/data/test-runner/copy.js.map +1 -0
- package/dist/data/test-runner/index.d.ts +5 -2
- package/dist/data/test-runner/index.d.ts.map +1 -1
- package/dist/data/test-runner/marks.cjs +143 -0
- package/dist/data/test-runner/marks.cjs.map +1 -0
- package/dist/data/test-runner/marks.d.ts +30 -0
- package/dist/data/test-runner/marks.d.ts.map +1 -0
- package/dist/data/test-runner/marks.js +143 -0
- package/dist/data/test-runner/marks.js.map +1 -0
- package/dist/data/test-runner/status.cjs +27 -44
- package/dist/data/test-runner/status.cjs.map +1 -1
- package/dist/data/test-runner/status.d.ts +12 -3
- package/dist/data/test-runner/status.d.ts.map +1 -1
- package/dist/data/test-runner/status.js +27 -44
- package/dist/data/test-runner/status.js.map +1 -1
- package/dist/data/use-group-windows.cjs +50 -0
- package/dist/data/use-group-windows.cjs.map +1 -0
- package/dist/data/use-group-windows.d.ts +27 -0
- package/dist/data/use-group-windows.d.ts.map +1 -0
- package/dist/data/use-group-windows.js +50 -0
- package/dist/data/use-group-windows.js.map +1 -0
- package/dist/data/verification/adapterViews.cjs +16 -41
- package/dist/data/verification/adapterViews.cjs.map +1 -1
- package/dist/data/verification/adapterViews.d.ts.map +1 -1
- package/dist/data/verification/adapterViews.js +16 -41
- package/dist/data/verification/adapterViews.js.map +1 -1
- package/dist/data/verification/adapters.cjs +115 -3
- package/dist/data/verification/adapters.cjs.map +1 -1
- package/dist/data/verification/adapters.d.ts.map +1 -1
- package/dist/data/verification/adapters.js +115 -3
- package/dist/data/verification/adapters.js.map +1 -1
- package/dist/data/verification/verifyReportTests.cjs.map +1 -1
- package/dist/data/verification/verifyReportTests.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +54 -3
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +6 -2
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +58 -7
- package/dist/data.js.map +1 -1
- package/dist/hooks/event-hub.cjs +229 -0
- package/dist/hooks/event-hub.cjs.map +1 -0
- package/dist/hooks/event-hub.d.ts +26 -0
- package/dist/hooks/event-hub.d.ts.map +1 -0
- package/dist/hooks/event-hub.js +229 -0
- package/dist/hooks/event-hub.js.map +1 -0
- package/dist/hooks.cjs +2 -0
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.d.ts +1 -0
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +2 -0
- package/dist/hooks.js.map +1 -1
- package/dist/icons/components/UiLogoEslint.cjs +10 -0
- package/dist/icons/components/UiLogoEslint.cjs.map +1 -0
- package/dist/icons/components/UiLogoEslint.d.ts +9 -0
- package/dist/icons/components/UiLogoEslint.d.ts.map +1 -0
- package/dist/icons/components/UiLogoEslint.js +10 -0
- package/dist/icons/components/UiLogoEslint.js.map +1 -0
- package/dist/icons/components/UiLogoGo.cjs +10 -0
- package/dist/icons/components/UiLogoGo.cjs.map +1 -0
- package/dist/icons/components/UiLogoGo.d.ts +9 -0
- package/dist/icons/components/UiLogoGo.d.ts.map +1 -0
- package/dist/icons/components/UiLogoGo.js +10 -0
- package/dist/icons/components/UiLogoGo.js.map +1 -0
- package/dist/icons/components/UiLogoJest.cjs +10 -0
- package/dist/icons/components/UiLogoJest.cjs.map +1 -0
- package/dist/icons/components/UiLogoJest.d.ts +9 -0
- package/dist/icons/components/UiLogoJest.d.ts.map +1 -0
- package/dist/icons/components/UiLogoJest.js +10 -0
- package/dist/icons/components/UiLogoJest.js.map +1 -0
- package/dist/icons/components/UiLogoMarkdown.cjs +10 -0
- package/dist/icons/components/UiLogoMarkdown.cjs.map +1 -0
- package/dist/icons/components/UiLogoMarkdown.d.ts +9 -0
- package/dist/icons/components/UiLogoMarkdown.d.ts.map +1 -0
- package/dist/icons/components/UiLogoMarkdown.js +10 -0
- package/dist/icons/components/UiLogoMarkdown.js.map +1 -0
- package/dist/icons/components/UiLogoOxc.cjs +10 -0
- package/dist/icons/components/UiLogoOxc.cjs.map +1 -0
- package/dist/icons/components/UiLogoOxc.d.ts +9 -0
- package/dist/icons/components/UiLogoOxc.d.ts.map +1 -0
- package/dist/icons/components/UiLogoOxc.js +10 -0
- package/dist/icons/components/UiLogoOxc.js.map +1 -0
- package/dist/icons/components/UiLogoPlaywright.cjs +10 -0
- package/dist/icons/components/UiLogoPlaywright.cjs.map +1 -0
- package/dist/icons/components/UiLogoPlaywright.d.ts +9 -0
- package/dist/icons/components/UiLogoPlaywright.d.ts.map +1 -0
- package/dist/icons/components/UiLogoPlaywright.js +10 -0
- package/dist/icons/components/UiLogoPlaywright.js.map +1 -0
- package/dist/icons/components/UiLogoPython.cjs +10 -0
- package/dist/icons/components/UiLogoPython.cjs.map +1 -0
- package/dist/icons/components/UiLogoPython.d.ts +9 -0
- package/dist/icons/components/UiLogoPython.d.ts.map +1 -0
- package/dist/icons/components/UiLogoPython.js +10 -0
- package/dist/icons/components/UiLogoPython.js.map +1 -0
- package/dist/icons/components/UiLogoReact.cjs +10 -0
- package/dist/icons/components/UiLogoReact.cjs.map +1 -0
- package/dist/icons/components/UiLogoReact.d.ts +9 -0
- package/dist/icons/components/UiLogoReact.d.ts.map +1 -0
- package/dist/icons/components/UiLogoReact.js +10 -0
- package/dist/icons/components/UiLogoReact.js.map +1 -0
- package/dist/icons/components/UiLogoRuff.cjs +10 -0
- package/dist/icons/components/UiLogoRuff.cjs.map +1 -0
- package/dist/icons/components/UiLogoRuff.d.ts +9 -0
- package/dist/icons/components/UiLogoRuff.d.ts.map +1 -0
- package/dist/icons/components/UiLogoRuff.js +10 -0
- package/dist/icons/components/UiLogoRuff.js.map +1 -0
- package/dist/icons/components/UiLogoTypescript.cjs +10 -0
- package/dist/icons/components/UiLogoTypescript.cjs.map +1 -0
- package/dist/icons/components/UiLogoTypescript.d.ts +9 -0
- package/dist/icons/components/UiLogoTypescript.d.ts.map +1 -0
- package/dist/icons/components/UiLogoTypescript.js +10 -0
- package/dist/icons/components/UiLogoTypescript.js.map +1 -0
- package/dist/icons/components/UiLogoVitest.cjs +10 -0
- package/dist/icons/components/UiLogoVitest.cjs.map +1 -0
- package/dist/icons/components/UiLogoVitest.d.ts +9 -0
- package/dist/icons/components/UiLogoVitest.d.ts.map +1 -0
- package/dist/icons/components/UiLogoVitest.js +10 -0
- package/dist/icons/components/UiLogoVitest.js.map +1 -0
- package/dist/icons/index.d.ts +11 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/registry.cjs +22 -0
- package/dist/icons/registry.cjs.map +1 -1
- package/dist/icons/registry.d.ts.map +1 -1
- package/dist/icons/registry.js +22 -0
- package/dist/icons/registry.js.map +1 -1
- package/dist/icons.cjs +22 -0
- package/dist/icons.cjs.map +1 -1
- package/dist/icons.js +22 -0
- package/dist/icons.js.map +1 -1
- package/dist/index.cjs +56 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +60 -7
- package/dist/index.js.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.cjs +4 -4
- package/dist/overlay/DropdownMenuSubmenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenuSubmenu.js +4 -4
- package/dist/overlay/DropdownMenuSubmenu.js.map +1 -1
- package/dist/overlay/modalStack.cjs +13 -6
- package/dist/overlay/modalStack.cjs.map +1 -1
- package/dist/overlay/modalStack.d.ts.map +1 -1
- package/dist/overlay/modalStack.js +13 -6
- package/dist/overlay/modalStack.js.map +1 -1
- package/dist/rpc/InlineError.cjs +12 -43
- package/dist/rpc/InlineError.cjs.map +1 -1
- package/dist/rpc/InlineError.d.ts.map +1 -1
- package/dist/rpc/InlineError.js +13 -44
- package/dist/rpc/InlineError.js.map +1 -1
- package/dist/rpc/OperationScheduleDialog.cjs +63 -10
- package/dist/rpc/OperationScheduleDialog.cjs.map +1 -1
- package/dist/rpc/OperationScheduleDialog.d.ts +4 -0
- package/dist/rpc/OperationScheduleDialog.d.ts.map +1 -1
- package/dist/rpc/OperationScheduleDialog.js +63 -10
- package/dist/rpc/OperationScheduleDialog.js.map +1 -1
- package/dist/rpc/OperationSchedules.cjs +12 -2
- package/dist/rpc/OperationSchedules.cjs.map +1 -1
- package/dist/rpc/OperationSchedules.d.ts.map +1 -1
- package/dist/rpc/OperationSchedules.js +12 -2
- package/dist/rpc/OperationSchedules.js.map +1 -1
- package/dist/rpc/operation-schedule-model.cjs +2 -0
- package/dist/rpc/operation-schedule-model.cjs.map +1 -1
- package/dist/rpc/operation-schedule-model.d.ts.map +1 -1
- package/dist/rpc/operation-schedule-model.js +2 -0
- package/dist/rpc/operation-schedule-model.js.map +1 -1
- package/dist/rpc/operation-schedule-types.d.ts +7 -1
- package/dist/rpc/operation-schedule-types.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/data/test-runner/frameworkIcon.cjs +0 -27
- package/dist/data/test-runner/frameworkIcon.cjs.map +0 -1
- package/dist/data/test-runner/frameworkIcon.d.ts +0 -3
- package/dist/data/test-runner/frameworkIcon.d.ts.map +0 -1
- package/dist/data/test-runner/frameworkIcon.js +0 -27
- package/dist/data/test-runner/frameworkIcon.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapterViews.cjs","sources":["../../../src/data/verification/adapterViews.tsx"],"sourcesContent":["// Detail-body components for the verification node adapters. Split from\n// adapters.ts (react/only-export-components: a file mixing component\n// declarations with the plain TestNodeAdapter/registry exports loses Fast\n// Refresh). Ported from gavel's VerificationStepOutput.tsx (the checklist list\n// and the CelDetails block).\n\nimport { cn } from \"../../lib/utils\";\nimport { Icon, type StaticIconComponent } from \"../Icon\";\nimport { UiError, UiPass, UiPause } from \"../../icons\";\nimport { JsonView } from \"../JsonView\";\nimport { TestOutput, type Test, type FixtureContext } from \"../test-runner\";\n\n// ── Checklist: the synthesized \"Acceptance criteria\" node and its items ────\n\ntype ChecklistState = \"passed\" | \"failed\" | \"pending\";\n\nfunction checklistItemState(item: Test): ChecklistState {\n if (item.failed) return \"failed\";\n if (item.passed) return \"passed\";\n return \"pending\";\n}\n\nconst CHECKLIST_ICONS: Record<ChecklistState, { icon: StaticIconComponent; tone: string }> = {\n passed: { icon: UiPass, tone: \"text-emerald-600\" },\n failed: { icon: UiError, tone: \"text-red-600\" },\n pending: { icon: UiPause, tone: \"text-muted-foreground\" },\n};\n\nfunction ChecklistItemRow({ item }: { item: Test }) {\n const { icon, tone } = CHECKLIST_ICONS[checklistItemState(item)];\n return (\n <li className=\"flex items-start gap-1.5 text-xs\">\n <Icon icon={icon} className={cn(\"mt-0.5 shrink-0 text-sm\", tone)} />\n <span className=\"min-w-0\">\n {item.name}\n {item.message ? (\n <span className=\"block text-[11px] text-muted-foreground\">{item.message}</span>\n ) : null}\n </span>\n </li>\n );\n}\n\n/** Renders every checklist item for the \"Acceptance criteria\" parent, or the\n * single item itself when a leaf criterion is selected directly. */\nexport function ChecklistDetail({ node }: { node: Test }) {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n return (\n <div className=\"space-y-2 p-density-4\">\n <ul className=\"space-y-1\">\n {items.map((item, index) => (\n <ChecklistItemRow key={item.task_id ?? index} item={item} />\n ))}\n </ul>\n </div>\n );\n}\n\n// ── Fixture / CEL: the failing-step detail (command + CelDetails) ──────────\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// A command step with no CEL assertion stores the whole command result object\n// in `actual` — the command/output is already rendered above, so dumping it\n// again as JSON is noise. Anything a CEL expression compared is shown as-is,\n// structured values included. `hasCelGate` mirrors gavel's own gate: a plain\n// `context.cel_expression`, or a trace recorded in `node.detail` when the\n// expression itself wasn't preserved on `context`.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\nfunction formatCelValue(value: unknown): string {\n if (typeof value === \"string\") return value;\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}\n\n// CEL detail is rendered only for a failing node: the expression and the\n// values it saw are what explain the verdict.\nexport function CelDetails({ node }: { node: Test }) {\n if (node.passed) return null;\n const context = node.context as FixtureContext | undefined;\n const vars = Object.entries(context?.cel_vars ?? {});\n const expression = readCelTrace(node.detail) || context?.cel_expression;\n const hasCelGate = !!expression;\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const hasComparison = expected !== undefined || actual !== undefined;\n if (!expression && vars.length === 0 && !hasComparison) return null;\n return (\n <div className=\"space-y-1 rounded border border-border bg-muted/30 px-2 py-1.5\">\n {expression && (\n <div>\n <span className=\"text-[10px] uppercase text-muted-foreground\">expression</span>\n <code className=\"block overflow-x-auto whitespace-pre text-[11px]\">{expression}</code>\n </div>\n )}\n {vars.length > 0 && (\n <table className=\"w-full table-fixed text-[11px]\">\n <tbody>\n {vars.map(([name, value]) => (\n <tr key={name} className=\"align-top\">\n <td className=\"w-1/3 truncate pr-2 font-medium text-muted-foreground\">{name}</td>\n <td className=\"break-words font-mono\">{formatCelValue(value)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n )}\n {expected !== undefined && (\n <div className=\"text-[11px]\">\n <span className=\"text-muted-foreground\">expected </span>\n <span className=\"font-mono\">{formatCelValue(expected)}</span>\n </div>\n )}\n {actual !== undefined && (\n <div className=\"text-[11px]\">\n <span className=\"text-muted-foreground\">actual </span>\n <span className=\"font-mono\">{formatCelValue(actual)}</span>\n </div>\n )}\n </div>\n );\n}\n\nexport function FixtureDetail({ node }: { node: Test }) {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n const cwd = context?.cwd ?? node.work_dir;\n return (\n <div className=\"space-y-4 p-density-4\">\n {node.message && (\n <p className=\"whitespace-pre-wrap break-words text-sm\">{node.message}</p>\n )}\n {command && (\n <div className=\"min-w-0 space-y-1\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Command</div>\n <code className=\"block overflow-x-auto whitespace-pre rounded bg-muted px-2 py-1.5 text-xs\">\n {command}\n </code>\n <div className=\"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground\">\n {cwd && <span>in {cwd}</span>}\n {typeof context?.exit_code === \"number\" && (\n <span className={context.exit_code === 0 ? undefined : \"text-red-600\"}>\n exit {context.exit_code}\n </span>\n )}\n </div>\n </div>\n )}\n <TestOutput node={node} />\n <CelDetails node={node} />\n {node.detail != null && (\n <div className=\"space-y-1\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Detail</div>\n <JsonView data={node.detail} />\n </div>\n )}\n </div>\n );\n}\n"],"names":["UiPass","UiError","UiPause","jsxs","jsx","Icon","cn","TestOutput","JsonView"],"mappings":";;;;;;;;;;AAgBA,SAAS,mBAAmB,MAA4B;AACtD,MAAI,KAAK,OAAQ,QAAO;AACxB,MAAI,KAAK,OAAQ,QAAO;AACxB,SAAO;AACT;AAEA,MAAM,kBAAuF;AAAA,EAC3F,QAAQ,EAAE,MAAMA,eAAQ,MAAM,mBAAA;AAAA,EAC9B,QAAQ,EAAE,MAAMC,iBAAS,MAAM,eAAA;AAAA,EAC/B,SAAS,EAAE,MAAMC,QAAAA,SAAS,MAAM,wBAAA;AAClC;AAEA,SAAS,iBAAiB,EAAE,QAAwB;AAClD,QAAM,EAAE,MAAM,KAAA,IAAS,gBAAgB,mBAAmB,IAAI,CAAC;AAC/D,SACEC,2BAAAA,KAAC,MAAA,EAAG,WAAU,oCACZ,UAAA;AAAA,IAAAC,+BAACC,KAAAA,QAAK,MAAY,WAAWC,MAAAA,GAAG,2BAA2B,IAAI,GAAG;AAAA,IAClEH,2BAAAA,KAAC,QAAA,EAAK,WAAU,WACb,UAAA;AAAA,MAAA,KAAK;AAAA,MACL,KAAK,UACJC,+BAA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AACtD,QAAM,UAAU,KAAK;AACrB,QAAM,WAAU,mCAAS,YAAW,KAAK;AACzC,QAAM,OAAM,mCAAS,QAAO,KAAK;AACjC,SACED,2BAAAA,KAAC,OAAA,EAAI,WAAU,yBACZ,UAAA;AAAA,IAAA,KAAK,WACJC,2BAAAA,IAAC,KAAA,EAAE,WAAU,2CAA2C,eAAK,SAAQ;AAAA,IAEtE,WACCD,2BAAAA,KAAC,OAAA,EAAI,WAAU,qBACb,UAAA;AAAA,MAAAC,2BAAAA,IAAC,OAAA,EAAI,WAAU,6DAA4D,UAAA,WAAO;AAAA,MAClFA,2BAAAA,IAAC,QAAA,EAAK,WAAU,6EACb,UAAA,SACH;AAAA,MACAD,2BAAAA,KAAC,OAAA,EAAI,WAAU,uEACZ,UAAA;AAAA,QAAA,uCAAQ,QAAA,EAAK,UAAA;AAAA,UAAA;AAAA,UAAI;AAAA,QAAA,GAAI;AAAA,QACrB,QAAO,mCAAS,eAAc,YAC7BA,2BAAAA,KAAC,QAAA,EAAK,WAAW,QAAQ,cAAc,IAAI,SAAY,gBAAgB,UAAA;AAAA,UAAA;AAAA,UAC/D,QAAQ;AAAA,QAAA,EAAA,CAChB;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,GACF;AAAA,IAEFC,+BAACG,kBAAAA,cAAW,MAAY;AAAA,IACxBH,+BAAC,cAAW,MAAY;AAAA,IACvB,KAAK,UAAU,QACdD,2BAAAA,KAAC,OAAA,EAAI,WAAU,aACb,UAAA;AAAA,MAAAC,2BAAAA,IAAC,OAAA,EAAI,WAAU,6DAA4D,UAAA,UAAM;AAAA,MACjFA,2BAAAA,IAACI,SAAAA,UAAA,EAAS,MAAM,KAAK,OAAA,CAAQ;AAAA,IAAA,EAAA,CAC/B;AAAA,EAAA,GAEJ;AAEJ;;;;"}
|
|
1
|
+
{"version":3,"file":"adapterViews.cjs","sources":["../../../src/data/verification/adapterViews.tsx"],"sourcesContent":["// Detail-body components for the verification node adapters. Split from\n// adapters.ts (react/only-export-components: a file mixing component\n// declarations with the plain TestNodeAdapter/registry exports loses Fast\n// Refresh). Ported from gavel's VerificationStepOutput.tsx (the checklist list\n// and the CelDetails block).\n\nimport { JsonView } from \"../JsonView\";\nimport {\n Expectation,\n OutcomeIcon,\n TestOutput,\n type FixtureContext,\n type Test,\n type TestOutcome,\n} from \"../test-runner\";\n\n// ── Checklist: the synthesized \"Acceptance criteria\" node and its items ────\n\nfunction checklistItemOutcome(item: Test): TestOutcome {\n if (item.failed) return \"failed\";\n if (item.passed) return \"passed\";\n return \"pending\";\n}\n\nfunction ChecklistItemRow({ item }: { item: Test }) {\n return (\n <li className=\"flex items-start gap-1.5 text-xs\">\n <OutcomeIcon outcome={checklistItemOutcome(item)} className=\"mt-0.5 text-sm\" />\n <span className=\"min-w-0\">\n {item.name}\n {item.message ? (\n <span className=\"block text-[11px] text-muted-foreground\">{item.message}</span>\n ) : null}\n </span>\n </li>\n );\n}\n\n/** Renders every checklist item for the \"Acceptance criteria\" parent, or the\n * single item itself when a leaf criterion is selected directly. */\nexport function ChecklistDetail({ node }: { node: Test }) {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n return (\n <div className=\"space-y-2 p-density-4\">\n <ul className=\"space-y-1\">\n {items.map((item, index) => (\n <ChecklistItemRow key={item.task_id ?? index} item={item} />\n ))}\n </ul>\n </div>\n );\n}\n\n// ── Fixture / CEL: the failing-step detail (command + CelDetails) ──────────\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// A command step with no CEL assertion stores the whole command result object\n// in `actual` — the command/output is already rendered above, so dumping it\n// again as JSON is noise. Anything a CEL expression compared is shown as-is,\n// structured values included. `hasCelGate` mirrors gavel's own gate: a plain\n// `context.cel_expression`, or a trace recorded in `node.detail` when the\n// expression itself wasn't preserved on `context`.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\n// CEL detail is rendered only for a failing node: the expression and the\n// values it saw are what explain the verdict.\nexport function CelDetails({ node }: { node: Test }) {\n if (node.passed) return null;\n const context = node.context as FixtureContext | undefined;\n const vars = context?.cel_vars ?? {};\n const expression = readCelTrace(node.detail) || context?.cel_expression;\n const hasCelGate = !!expression;\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const hasComparison = expected !== undefined || actual !== undefined;\n if (!expression && Object.keys(vars).length === 0 && !hasComparison) return null;\n return (\n <Expectation\n check={expression}\n checkLabel=\"expression\"\n vars={vars}\n expected={expected}\n actual={actual}\n />\n );\n}\n\nexport function FixtureDetail({ node }: { node: Test }) {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n const cwd = context?.cwd ?? node.work_dir;\n return (\n <div className=\"space-y-4 p-density-4\">\n {node.message && (\n <p className=\"whitespace-pre-wrap break-words text-sm\">{node.message}</p>\n )}\n {command && (\n <div className=\"min-w-0 space-y-1\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Command</div>\n <code className=\"block overflow-x-auto whitespace-pre rounded bg-muted px-2 py-1.5 text-xs\">\n {command}\n </code>\n <div className=\"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground\">\n {cwd && <span>in {cwd}</span>}\n {typeof context?.exit_code === \"number\" && (\n <span className={context.exit_code === 0 ? undefined : \"text-red-600\"}>\n exit {context.exit_code}\n </span>\n )}\n </div>\n </div>\n )}\n <TestOutput node={node} />\n <CelDetails node={node} />\n {node.detail != null && (\n <div className=\"space-y-1\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Detail</div>\n <JsonView data={node.detail} />\n </div>\n )}\n </div>\n );\n}\n"],"names":["jsxs","jsx","OutcomeIcon","Expectation","TestOutput","Js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AAA;AAAA,UAC/D,QAAQ;AAAA,QAAA,EAAA,CAChB;AAAA,MAAA,EAAA,CAEJ;AAAA,IAAA,GACF;AAAA,IAEFC,+BAACG,kBAAAA,cAAW,MAAY;AAAA,IACxBH,+BAAC,cAAW,MAAY;AAAA,IACvB,KAAK,UAAU,QACdD,2BAAAA,KAAC,OAAA,EAAI,WAAU,aACb,UAAA;AAAA,MAAAC,2BAAAA,IAAC,OAAA,EAAI,WAAU,6DAA4D,UAAA,UAAM;AAAA,MACjFA,2BAAAA,IAACI,SAAAA,UAAA,EAAS,MAAM,KAAK,OAAA,CAAQ;AAAA,IAAA,EAAA,CAC/B;AAAA,EAAA,GAEJ;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapterViews.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapterViews.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapterViews.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapterViews.tsx"],"names":[],"mappings":"AAOA,OAAO,EAKL,KAAK,IAAI,EAEV,MAAM,gBAAgB,CAAC;AAwBxB;qEACqE;AACrE,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,+BAWvD;AA2BD,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,sCAmBlD;AAED,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,+BAmCrD"}
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { cn } from "../../lib/utils.js";
|
|
3
|
-
import { Icon } from "../Icon.js";
|
|
4
2
|
import { JsonView } from "../JsonView.js";
|
|
5
3
|
import { TestOutput } from "../test-runner/TestFailureDetail.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
function checklistItemState(item) {
|
|
4
|
+
import { OutcomeIcon } from "../test-runner/MarkIcons.js";
|
|
5
|
+
import { Expectation } from "../test-runner/Expectation.js";
|
|
6
|
+
function checklistItemOutcome(item) {
|
|
10
7
|
if (item.failed) return "failed";
|
|
11
8
|
if (item.passed) return "passed";
|
|
12
9
|
return "pending";
|
|
13
10
|
}
|
|
14
|
-
const CHECKLIST_ICONS = {
|
|
15
|
-
passed: { icon: UiPass, tone: "text-emerald-600" },
|
|
16
|
-
failed: { icon: UiError, tone: "text-red-600" },
|
|
17
|
-
pending: { icon: UiPause, tone: "text-muted-foreground" }
|
|
18
|
-
};
|
|
19
11
|
function ChecklistItemRow({ item }) {
|
|
20
|
-
const { icon, tone } = CHECKLIST_ICONS[checklistItemState(item)];
|
|
21
12
|
return /* @__PURE__ */ jsxs("li", { className: "flex items-start gap-1.5 text-xs", children: [
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
13
|
+
/* @__PURE__ */ jsx(OutcomeIcon, { outcome: checklistItemOutcome(item), className: "mt-0.5 text-sm" }),
|
|
23
14
|
/* @__PURE__ */ jsxs("span", { className: "min-w-0", children: [
|
|
24
15
|
item.name,
|
|
25
16
|
item.message ? /* @__PURE__ */ jsx("span", { className: "block text-[11px] text-muted-foreground", children: item.message }) : null
|
|
@@ -43,42 +34,26 @@ function comparisonValue(hasCelGate, value) {
|
|
|
43
34
|
if (value !== null && typeof value === "object" && !Array.isArray(value)) return void 0;
|
|
44
35
|
return value;
|
|
45
36
|
}
|
|
46
|
-
function formatCelValue(value) {
|
|
47
|
-
if (typeof value === "string") return value;
|
|
48
|
-
try {
|
|
49
|
-
return JSON.stringify(value);
|
|
50
|
-
} catch {
|
|
51
|
-
return String(value);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
37
|
function CelDetails({ node }) {
|
|
55
38
|
if (node.passed) return null;
|
|
56
39
|
const context = node.context;
|
|
57
|
-
const vars =
|
|
40
|
+
const vars = (context == null ? void 0 : context.cel_vars) ?? {};
|
|
58
41
|
const expression = readCelTrace(node.detail) || (context == null ? void 0 : context.cel_expression);
|
|
59
42
|
const hasCelGate = !!expression;
|
|
60
43
|
const expected = comparisonValue(hasCelGate, context == null ? void 0 : context.expected);
|
|
61
44
|
const actual = comparisonValue(hasCelGate, context == null ? void 0 : context.actual);
|
|
62
45
|
const hasComparison = expected !== void 0 || actual !== void 0;
|
|
63
|
-
if (!expression && vars.length === 0 && !hasComparison) return null;
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "expected " }),
|
|
75
|
-
/* @__PURE__ */ jsx("span", { className: "font-mono", children: formatCelValue(expected) })
|
|
76
|
-
] }),
|
|
77
|
-
actual !== void 0 && /* @__PURE__ */ jsxs("div", { className: "text-[11px]", children: [
|
|
78
|
-
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: "actual " }),
|
|
79
|
-
/* @__PURE__ */ jsx("span", { className: "font-mono", children: formatCelValue(actual) })
|
|
80
|
-
] })
|
|
81
|
-
] });
|
|
46
|
+
if (!expression && Object.keys(vars).length === 0 && !hasComparison) return null;
|
|
47
|
+
return /* @__PURE__ */ jsx(
|
|
48
|
+
Expectation,
|
|
49
|
+
{
|
|
50
|
+
check: expression,
|
|
51
|
+
checkLabel: "expression",
|
|
52
|
+
vars,
|
|
53
|
+
expected,
|
|
54
|
+
actual
|
|
55
|
+
}
|
|
56
|
+
);
|
|
82
57
|
}
|
|
83
58
|
function FixtureDetail({ node }) {
|
|
84
59
|
const context = node.context;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapterViews.js","sources":["../../../src/data/verification/adapterViews.tsx"],"sourcesContent":["// Detail-body components for the verification node adapters. Split from\n// adapters.ts (react/only-export-components: a file mixing component\n// declarations with the plain TestNodeAdapter/registry exports loses Fast\n// Refresh). Ported from gavel's VerificationStepOutput.tsx (the checklist list\n// and the CelDetails block).\n\nimport { cn } from \"../../lib/utils\";\nimport { Icon, type StaticIconComponent } from \"../Icon\";\nimport { UiError, UiPass, UiPause } from \"../../icons\";\nimport { JsonView } from \"../JsonView\";\nimport { TestOutput, type Test, type FixtureContext } from \"../test-runner\";\n\n// ── Checklist: the synthesized \"Acceptance criteria\" node and its items ────\n\ntype ChecklistState = \"passed\" | \"failed\" | \"pending\";\n\nfunction checklistItemState(item: Test): ChecklistState {\n if (item.failed) return \"failed\";\n if (item.passed) return \"passed\";\n return \"pending\";\n}\n\nconst CHECKLIST_ICONS: Record<ChecklistState, { icon: StaticIconComponent; tone: string }> = {\n passed: { icon: UiPass, tone: \"text-emerald-600\" },\n failed: { icon: UiError, tone: \"text-red-600\" },\n pending: { icon: UiPause, tone: \"text-muted-foreground\" },\n};\n\nfunction ChecklistItemRow({ item }: { item: Test }) {\n const { icon, tone } = CHECKLIST_ICONS[checklistItemState(item)];\n return (\n <li className=\"flex items-start gap-1.5 text-xs\">\n <Icon icon={icon} className={cn(\"mt-0.5 shrink-0 text-sm\", tone)} />\n <span className=\"min-w-0\">\n {item.name}\n {item.message ? (\n <span className=\"block text-[11px] text-muted-foreground\">{item.message}</span>\n ) : null}\n </span>\n </li>\n );\n}\n\n/** Renders every checklist item for the \"Acceptance criteria\" parent, or the\n * single item itself when a leaf criterion is selected directly. */\nexport function ChecklistDetail({ node }: { node: Test }) {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n return (\n <div className=\"space-y-2 p-density-4\">\n <ul className=\"space-y-1\">\n {items.map((item, index) => (\n <ChecklistItemRow key={item.task_id ?? index} item={item} />\n ))}\n </ul>\n </div>\n );\n}\n\n// ── Fixture / CEL: the failing-step detail (command + CelDetails) ──────────\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// A command step with no CEL assertion stores the whole command result object\n// in `actual` — the command/output is already rendered above, so dumping it\n// again as JSON is noise. Anything a CEL expression compared is shown as-is,\n// structured values included. `hasCelGate` mirrors gavel's own gate: a plain\n// `context.cel_expression`, or a trace recorded in `node.detail` when the\n// expression itself wasn't preserved on `context`.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\nfunction formatCelValue(value: unknown): string {\n if (typeof value === \"string\") return value;\n try {\n return JSON.stringify(value);\n } catch {\n return String(value);\n }\n}\n\n// CEL detail is rendered only for a failing node: the expression and the\n// values it saw are what explain the verdict.\nexport function CelDetails({ node }: { node: Test }) {\n if (node.passed) return null;\n const context = node.context as FixtureContext | undefined;\n const vars = Object.entries(context?.cel_vars ?? {});\n const expression = readCelTrace(node.detail) || context?.cel_expression;\n const hasCelGate = !!expression;\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const hasComparison = expected !== undefined || actual !== undefined;\n if (!expression && vars.length === 0 && !hasComparison) return null;\n return (\n <div className=\"space-y-1 rounded border border-border bg-muted/30 px-2 py-1.5\">\n {expression && (\n <div>\n <span className=\"text-[10px] uppercase text-muted-foreground\">expression</span>\n <code className=\"block overflow-x-auto whitespace-pre text-[11px]\">{expression}</code>\n </div>\n )}\n {vars.length > 0 && (\n <table className=\"w-full table-fixed text-[11px]\">\n <tbody>\n {vars.map(([name, value]) => (\n <tr key={name} className=\"align-top\">\n <td className=\"w-1/3 truncate pr-2 font-medium text-muted-foreground\">{name}</td>\n <td className=\"break-words font-mono\">{formatCelValue(value)}</td>\n </tr>\n ))}\n </tbody>\n </table>\n )}\n {expected !== undefined && (\n <div className=\"text-[11px]\">\n <span className=\"text-muted-foreground\">expected </span>\n <span className=\"font-mono\">{formatCelValue(expected)}</span>\n </div>\n )}\n {actual !== undefined && (\n <div className=\"text-[11px]\">\n <span className=\"text-muted-foreground\">actual </span>\n <span className=\"font-mono\">{formatCelValue(actual)}</span>\n </div>\n )}\n </div>\n );\n}\n\nexport function FixtureDetail({ node }: { node: Test }) {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n const cwd = context?.cwd ?? node.work_dir;\n return (\n <div className=\"space-y-4 p-density-4\">\n {node.message && (\n <p className=\"whitespace-pre-wrap break-words text-sm\">{node.message}</p>\n )}\n {command && (\n <div className=\"min-w-0 space-y-1\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Command</div>\n <code className=\"block overflow-x-auto whitespace-pre rounded bg-muted px-2 py-1.5 text-xs\">\n {command}\n </code>\n <div className=\"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground\">\n {cwd && <span>in {cwd}</span>}\n {typeof context?.exit_code === \"number\" && (\n <span className={context.exit_code === 0 ? undefined : \"text-red-600\"}>\n exit {context.exit_code}\n </span>\n )}\n </div>\n </div>\n )}\n <TestOutput node={node} />\n <CelDetails node={node} />\n {node.detail != null && (\n <div className=\"space-y-1\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Detail</div>\n <JsonView data={node.detail} />\n </div>\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;AAgBA,SAAS,mBAAmB,MAA4B;AACtD,MAAI,KAAK,OAAQ,QAAO;AACxB,MAAI,KAAK,OAAQ,QAAO;AACxB,SAAO;AACT;AAEA,MAAM,kBAAuF;AAAA,EAC3F,QAAQ,EAAE,MAAM,QAAQ,MAAM,mBAAA;AAAA,EAC9B,QAAQ,EAAE,MAAM,SAAS,MAAM,eAAA;AAAA,EAC/B,SAAS,EAAE,MAAM,SAAS,MAAM,wBAAA;AAClC;AAEA,SAAS,iBAAiB,EAAE,QAAwB;AAClD,QAAM,EAAE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ews.js","sources":["../../../src/data/verification/adapterViews.tsx"],"sourcesContent":["// Detail-body components for the verification node adapters. Split from\n// adapters.ts (react/only-export-components: a file mixing component\n// declarations with the plain TestNodeAdapter/registry exports loses Fast\n// Refresh). Ported from gavel's VerificationStepOutput.tsx (the checklist list\n// and the CelDetails block).\n\nimport { JsonView } from \"../JsonView\";\nimport {\n Expectation,\n OutcomeIcon,\n TestOutput,\n type FixtureContext,\n type Test,\n type TestOutcome,\n} from \"../test-runner\";\n\n// ── Checklist: the synthesized \"Acceptance criteria\" node and its items ────\n\nfunction checklistItemOutcome(item: Test): TestOutcome {\n if (item.failed) return \"failed\";\n if (item.passed) return \"passed\";\n return \"pending\";\n}\n\nfunction ChecklistItemRow({ item }: { item: Test }) {\n return (\n <li className=\"flex items-start gap-1.5 text-xs\">\n <OutcomeIcon outcome={checklistItemOutcome(item)} className=\"mt-0.5 text-sm\" />\n <span className=\"min-w-0\">\n {item.name}\n {item.message ? (\n <span className=\"block text-[11px] text-muted-foreground\">{item.message}</span>\n ) : null}\n </span>\n </li>\n );\n}\n\n/** Renders every checklist item for the \"Acceptance criteria\" parent, or the\n * single item itself when a leaf criterion is selected directly. */\nexport function ChecklistDetail({ node }: { node: Test }) {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n return (\n <div className=\"space-y-2 p-density-4\">\n <ul className=\"space-y-1\">\n {items.map((item, index) => (\n <ChecklistItemRow key={item.task_id ?? index} item={item} />\n ))}\n </ul>\n </div>\n );\n}\n\n// ── Fixture / CEL: the failing-step detail (command + CelDetails) ──────────\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// A command step with no CEL assertion stores the whole command result object\n// in `actual` — the command/output is already rendered above, so dumping it\n// again as JSON is noise. Anything a CEL expression compared is shown as-is,\n// structured values included. `hasCelGate` mirrors gavel's own gate: a plain\n// `context.cel_expression`, or a trace recorded in `node.detail` when the\n// expression itself wasn't preserved on `context`.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\n// CEL detail is rendered only for a failing node: the expression and the\n// values it saw are what explain the verdict.\nexport function CelDetails({ node }: { node: Test }) {\n if (node.passed) return null;\n const context = node.context as FixtureContext | undefined;\n const vars = context?.cel_vars ?? {};\n const expression = readCelTrace(node.detail) || context?.cel_expression;\n const hasCelGate = !!expression;\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const hasComparison = expected !== undefined || actual !== undefined;\n if (!expression && Object.keys(vars).length === 0 && !hasComparison) return null;\n return (\n <Expectation\n check={expression}\n checkLabel=\"expression\"\n vars={vars}\n expected={expected}\n actual={actual}\n />\n );\n}\n\nexport function FixtureDetail({ node }: { node: Test }) {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n const cwd = context?.cwd ?? node.work_dir;\n return (\n <div className=\"space-y-4 p-density-4\">\n {node.message && (\n <p className=\"whitespace-pre-wrap break-words text-sm\">{node.message}</p>\n )}\n {command && (\n <div className=\"min-w-0 space-y-1\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Command</div>\n <code className=\"block overflow-x-auto whitespace-pre rounded bg-muted px-2 py-1.5 text-xs\">\n {command}\n </code>\n <div className=\"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground\">\n {cwd && <span>in {cwd}</span>}\n {typeof context?.exit_code === \"number\" && (\n <span className={context.exit_code === 0 ? undefined : \"text-red-600\"}>\n exit {context.exit_code}\n </span>\n )}\n </div>\n </div>\n )}\n <TestOutput node={node} />\n <CelDetails node={node} />\n {node.detail != null && (\n <div className=\"space-y-1\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Detail</div>\n <Json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A,CAEJ;AAAA,IAAA,GACF;AAAA,IAEF,oBAAC,cAAW,MAAY;AAAA,IACxB,oBAAC,cAAW,MAAY;AAAA,IACvB,KAAK,UAAU,QACd,qBAAC,OAAA,EAAI,WAAU,aACb,UAAA;AAAA,MAAA,oBAAC,OAAA,EAAI,WAAU,6DAA4D,UAAA,UAAM;AAAA,MACjF,oBAAC,UAAA,EAAS,MAAM,KAAK,OAAA,CAAQ;AAAA,IAAA,EAAA,CAC/B;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -3,24 +3,136 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const adapterViews = require("./adapterViews.cjs");
|
|
5
5
|
const adapter = require("../test-runner/adapter.cjs");
|
|
6
|
+
const UiTerminal = require("../../icons/components/UiTerminal.cjs");
|
|
7
|
+
const status = require("../test-runner/status.cjs");
|
|
6
8
|
function isChecklistNode(node) {
|
|
7
9
|
return node.framework === "checklist";
|
|
8
10
|
}
|
|
11
|
+
function checklistMark(item) {
|
|
12
|
+
if (item.failed) return "[ ]";
|
|
13
|
+
if (item.passed) return "[x]";
|
|
14
|
+
return "[?]";
|
|
15
|
+
}
|
|
16
|
+
function checklistCopy(node) {
|
|
17
|
+
const items = node.children && node.children.length > 0 ? node.children : [node];
|
|
18
|
+
const lines = items.map(
|
|
19
|
+
(item) => `- ${checklistMark(item)} ${item.name}${item.message ? ` — ${item.message}` : ""}`
|
|
20
|
+
);
|
|
21
|
+
return { brief: [{ title: "Criteria", body: lines.join("\n") }] };
|
|
22
|
+
}
|
|
9
23
|
const checklistAdapter = {
|
|
10
24
|
id: "verification-checklist",
|
|
11
25
|
match: isChecklistNode,
|
|
12
|
-
renderDetail: ({ node }) => /* @__PURE__ */ jsxRuntime.jsx(adapterViews.ChecklistDetail, { node })
|
|
26
|
+
renderDetail: ({ node }) => /* @__PURE__ */ jsxRuntime.jsx(adapterViews.ChecklistDetail, { node }),
|
|
27
|
+
copy: ({ node }) => checklistCopy(node)
|
|
13
28
|
};
|
|
14
29
|
function isFixtureNode(node) {
|
|
15
30
|
return node.context !== void 0;
|
|
16
31
|
}
|
|
32
|
+
function readCelTrace(detail) {
|
|
33
|
+
if (detail && typeof detail === "object" && !Array.isArray(detail)) {
|
|
34
|
+
const value = detail.cel_trace;
|
|
35
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
36
|
+
}
|
|
37
|
+
return void 0;
|
|
38
|
+
}
|
|
39
|
+
function comparisonValue(hasCelGate, value) {
|
|
40
|
+
if (value === void 0) return void 0;
|
|
41
|
+
if (hasCelGate) return value;
|
|
42
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value)) return void 0;
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
function formatValue(value) {
|
|
46
|
+
return typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
47
|
+
}
|
|
48
|
+
function commandSection(node, context) {
|
|
49
|
+
const command = (context == null ? void 0 : context.command) ?? node.command;
|
|
50
|
+
if (!command) return [];
|
|
51
|
+
const cwd = (context == null ? void 0 : context.cwd) ?? node.work_dir;
|
|
52
|
+
const exit = context == null ? void 0 : context.exit_code;
|
|
53
|
+
const lines = [`$ ${command}`, cwd && `cwd: ${cwd}`, exit !== void 0 && `exit: ${exit}`];
|
|
54
|
+
return [{ title: "Command", lang: "sh", body: lines.filter(Boolean).join("\n") }];
|
|
55
|
+
}
|
|
56
|
+
function assertionSection(node, context) {
|
|
57
|
+
const expression = context == null ? void 0 : context.cel_expression;
|
|
58
|
+
const trace = readCelTrace(node.detail);
|
|
59
|
+
const hasCelGate = !!(expression || trace);
|
|
60
|
+
const vars = (context == null ? void 0 : context.cel_vars) ?? {};
|
|
61
|
+
const expected = comparisonValue(hasCelGate, context == null ? void 0 : context.expected);
|
|
62
|
+
const actual = comparisonValue(hasCelGate, context == null ? void 0 : context.actual);
|
|
63
|
+
const lines = [
|
|
64
|
+
expression && `expression: ${expression}`,
|
|
65
|
+
trace && `trace:
|
|
66
|
+
${trace}`,
|
|
67
|
+
Object.keys(vars).length > 0 && `vars: ${formatValue(vars)}`,
|
|
68
|
+
expected !== void 0 && `expected: ${formatValue(expected)}`,
|
|
69
|
+
actual !== void 0 && `actual: ${formatValue(actual)}`
|
|
70
|
+
].filter(Boolean);
|
|
71
|
+
return lines.length > 0 ? [{ title: "Assertion", body: lines.join("\n") }] : [];
|
|
72
|
+
}
|
|
73
|
+
const OUTCOME_GLYPH = {
|
|
74
|
+
passed: "✓",
|
|
75
|
+
failed: "✗",
|
|
76
|
+
errored: "✗",
|
|
77
|
+
timedout: "⏱",
|
|
78
|
+
warned: "!",
|
|
79
|
+
skipped: "-",
|
|
80
|
+
pending: "○",
|
|
81
|
+
running: "…"
|
|
82
|
+
};
|
|
83
|
+
function childLine(child) {
|
|
84
|
+
var _a;
|
|
85
|
+
const outcome = status.outcomeFor(child);
|
|
86
|
+
const exit = (_a = child.context) == null ? void 0 : _a.exit_code;
|
|
87
|
+
const reason = child.message ?? (exit ? `exit ${exit}` : void 0);
|
|
88
|
+
return `${outcome ? OUTCOME_GLYPH[outcome] : "·"} ${child.name}${reason ? ` — ${reason}` : ""}`;
|
|
89
|
+
}
|
|
90
|
+
function summaryLine(summary) {
|
|
91
|
+
const counts = [
|
|
92
|
+
[summary.Passed, "passed"],
|
|
93
|
+
[summary.Failed, "failed"],
|
|
94
|
+
[summary.Warned, "warned"],
|
|
95
|
+
[summary.Timedout, "timed out"],
|
|
96
|
+
[summary.Skipped, "skipped"],
|
|
97
|
+
[summary.Pending, "pending"],
|
|
98
|
+
[summary.Running, "running"]
|
|
99
|
+
];
|
|
100
|
+
const parts = counts.filter(([n]) => !!n).map(([n, label]) => `${n} ${label}`);
|
|
101
|
+
return [`${summary.Total} total`, ...parts].join(" · ");
|
|
102
|
+
}
|
|
103
|
+
function resultsSection(node) {
|
|
104
|
+
const lines = [
|
|
105
|
+
...node.summary ? [summaryLine(node.summary)] : [],
|
|
106
|
+
...(node.children ?? []).map(childLine)
|
|
107
|
+
];
|
|
108
|
+
return lines.length > 0 ? [{ title: "Results", body: lines.join("\n") }] : [];
|
|
109
|
+
}
|
|
110
|
+
function fixtureCopy(node) {
|
|
111
|
+
const context = node.context;
|
|
112
|
+
const command = (context == null ? void 0 : context.command) ?? node.command;
|
|
113
|
+
return {
|
|
114
|
+
brief: [
|
|
115
|
+
...commandSection(node, context),
|
|
116
|
+
...assertionSection(node, context),
|
|
117
|
+
...resultsSection(node)
|
|
118
|
+
],
|
|
119
|
+
items: command ? [{ label: "Copy command", icon: UiTerminal.UiTerminal, value: command }] : []
|
|
120
|
+
};
|
|
121
|
+
}
|
|
17
122
|
const fixtureAdapter = {
|
|
18
123
|
id: "verification-fixture",
|
|
19
124
|
match: isFixtureNode,
|
|
20
|
-
renderDetail: ({ node }) => /* @__PURE__ */ jsxRuntime.jsx(adapterViews.FixtureDetail, { node })
|
|
125
|
+
renderDetail: ({ node }) => /* @__PURE__ */ jsxRuntime.jsx(adapterViews.FixtureDetail, { node }),
|
|
126
|
+
copy: ({ node }) => fixtureCopy(node)
|
|
127
|
+
};
|
|
128
|
+
const FIXTURE_STEP_FRAMEWORKS = /* @__PURE__ */ new Set(["exec", "query", "fixture", "test", "lint", "verify"]);
|
|
129
|
+
const fixtureStepCopyAdapter = {
|
|
130
|
+
id: "verification-step-copy",
|
|
131
|
+
match: (node) => FIXTURE_STEP_FRAMEWORKS.has(node.framework ?? ""),
|
|
132
|
+
copy: ({ node }) => fixtureCopy(node)
|
|
21
133
|
};
|
|
22
134
|
function verificationAdapters() {
|
|
23
|
-
return adapter.createTestRunnerRegistry([checklistAdapter, fixtureAdapter]);
|
|
135
|
+
return adapter.createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter]);
|
|
24
136
|
}
|
|
25
137
|
exports.verificationAdapters = verificationAdapters;
|
|
26
138
|
//# sourceMappingURL=adapters.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.cjs","sources":["../../../src/data/verification/adapters.tsx"],"sourcesContent":["// Domain node adapters for VerificationResults: a checklist adapter for the\n// synthesized \"Acceptance criteria\" node and its items, and a fixture/CEL\n// adapter for the failing-step detail. Rendering lives in adapterViews.tsx —\n// split out so this file's only exports are the registry (react/only-export-\n// components forbids mixing component declarations with plain exports).\n\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport {\n createTestRunnerRegistry,\n type Test,\n type TestNodeAdapter,\n type TestNodeAdapterRegistry,\n} from \"../test-runner\";\n\nfunction isChecklistNode(node: Test): boolean {\n return node.framework === \"checklist\";\n}\n\nconst checklistAdapter: TestNodeAdapter = {\n id: \"verification-checklist\",\n match: isChecklistNode,\n renderDetail: ({ node }) => <ChecklistDetail node={node} />,\n};\n\nfunction isFixtureNode(node: Test): boolean {\n return node.context !== undefined;\n}\n\nconst fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} />,\n};\n\n/** Default node adapters for VerificationResults: checklist items and\n * fixture/CEL steps. Registration order matters only when a node could match\n * both — a checklist node never carries a `context`, so the two never race. */\nexport function verificationAdapters(): TestNodeAdapterRegistry {\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter]);\n}\n"],"names":["jsx","ChecklistDetail","FixtureDetail","createTestRunnerRegistry"],"mappings":";;;;;AAcA,SAAS,gBAAgB,MAAqB;AAC5C,SAAO,KAAK,cAAc;AAC5B;AAEA,MAAM,mBAAoC;AAAA,EACxC,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,cAAc,CAAC,EAAE,WAAWA,2BAAAA,IAACC,aAAAA,mBAAgB,KAAA,CAAY;AAC3D;AAEA,SAAS,cAAc,MAAqB;AAC1C,SAAO,KAAK,YAAY;AAC1B;AAEA,MAAM,iBAAkC;AAAA,EACtC,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,cAAc,CAAC,EAAE,WAAWD,2BAAAA,IAACE,aAAAA,iBAAc,KAAA,CAAY;AACzD;AAKO,SAAS,uBAAgD;AAC9D,SAAOC,iCAAyB,CAAC,kBAAkB,cAAc,CAAC;AACpE;;"}
|
|
1
|
+
{"version":3,"file":"adapters.cjs","sources":["../../../src/data/verification/adapters.tsx"],"sourcesContent":["// Domain node adapters for VerificationResults: a checklist adapter for the\n// synthesized \"Acceptance criteria\" node and its items, and a fixture/CEL\n// adapter for the failing-step detail. Rendering lives in adapterViews.tsx —\n// split out so this file's only exports are the registry (react/only-export-\n// components forbids mixing component declarations with plain exports).\n\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport { UiTerminal } from \"../../icons\";\nimport {\n createTestRunnerRegistry,\n outcomeFor,\n type BriefSection,\n type CopySections,\n type FixtureContext,\n type Test,\n type TestNodeAdapter,\n type TestNodeAdapterRegistry,\n type TestOutcome,\n type TestSummary,\n} from \"../test-runner\";\n\nfunction isChecklistNode(node: Test): boolean {\n return node.framework === \"checklist\";\n}\n\nfunction checklistMark(item: Test): string {\n if (item.failed) return \"[ ]\";\n if (item.passed) return \"[x]\";\n return \"[?]\";\n}\n\n/** `- [x]/[ ]/[?] criterion — reason` for each item, or the leaf itself. */\nfunction checklistCopy(node: Test): CopySections {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n const lines = items.map(\n (item) => `- ${checklistMark(item)} ${item.name}${item.message ? ` — ${item.message}` : \"\"}`,\n );\n return { brief: [{ title: \"Criteria\", body: lines.join(\"\\n\") }] };\n}\n\nconst checklistAdapter: TestNodeAdapter = {\n id: \"verification-checklist\",\n match: isChecklistNode,\n renderDetail: ({ node }) => <ChecklistDetail node={node} />,\n copy: ({ node }) => checklistCopy(node),\n};\n\nfunction isFixtureNode(node: Test): boolean {\n return node.context !== undefined;\n}\n\n// ── Copy sections for fixture steps (exec / query / table / test / lint) ───\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// Mirrors CelDetails: without a CEL gate, a command step's `actual` is the whole\n// command result object, already covered by the Command section and output.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\nfunction formatValue(value: unknown): string {\n return typeof value === \"string\" ? value : JSON.stringify(value, null, 2);\n}\n\nfunction commandSection(node: Test, context: FixtureContext | undefined): BriefSection[] {\n const command = context?.command ?? node.command;\n if (!command) return [];\n const cwd = context?.cwd ?? node.work_dir;\n const exit = context?.exit_code;\n const lines = [`$ ${command}`, cwd && `cwd: ${cwd}`, exit !== undefined && `exit: ${exit}`];\n return [{ title: \"Command\", lang: \"sh\", body: lines.filter(Boolean).join(\"\\n\") }];\n}\n\nfunction assertionSection(node: Test, context: FixtureContext | undefined): BriefSection[] {\n const expression = context?.cel_expression;\n const trace = readCelTrace(node.detail);\n const hasCelGate = !!(expression || trace);\n const vars = context?.cel_vars ?? {};\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const lines = [\n expression && `expression: ${expression}`,\n trace && `trace:\\n${trace}`,\n Object.keys(vars).length > 0 && `vars: ${formatValue(vars)}`,\n expected !== undefined && `expected: ${formatValue(expected)}`,\n actual !== undefined && `actual: ${formatValue(actual)}`,\n ].filter(Boolean);\n return lines.length > 0 ? [{ title: \"Assertion\", body: lines.join(\"\\n\") }] : [];\n}\n\nconst OUTCOME_GLYPH: Record<TestOutcome, string> = {\n passed: \"✓\",\n failed: \"✗\",\n errored: \"✗\",\n timedout: \"⏱\",\n warned: \"!\",\n skipped: \"-\",\n pending: \"○\",\n running: \"…\",\n};\n\nfunction childLine(child: Test): string {\n const outcome = outcomeFor(child);\n const exit = (child.context as FixtureContext | undefined)?.exit_code;\n const reason = child.message ?? (exit ? `exit ${exit}` : undefined);\n return `${outcome ? OUTCOME_GLYPH[outcome] : \"·\"} ${child.name}${reason ? ` — ${reason}` : \"\"}`;\n}\n\nfunction summaryLine(summary: TestSummary): string {\n const counts: [number | undefined, string][] = [\n [summary.Passed, \"passed\"],\n [summary.Failed, \"failed\"],\n [summary.Warned, \"warned\"],\n [summary.Timedout, \"timed out\"],\n [summary.Skipped, \"skipped\"],\n [summary.Pending, \"pending\"],\n [summary.Running, \"running\"],\n ];\n const parts = counts.filter(([n]) => !!n).map(([n, label]) => `${n} ${label}`);\n return [`${summary.Total} total`, ...parts].join(\" · \");\n}\n\nfunction resultsSection(node: Test): BriefSection[] {\n const lines = [\n ...(node.summary ? [summaryLine(node.summary)] : []),\n ...(node.children ?? []).map(childLine),\n ];\n return lines.length > 0 ? [{ title: \"Results\", body: lines.join(\"\\n\") }] : [];\n}\n\n/** Command, CEL assertion and per-child verdicts for a fixture step or its parent. */\nfunction fixtureCopy(node: Test): CopySections {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n return {\n brief: [\n ...commandSection(node, context),\n ...assertionSection(node, context),\n ...resultsSection(node),\n ],\n items: command ? [{ label: \"Copy command\", icon: UiTerminal, value: command }] : [],\n };\n}\n\nconst fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} />,\n copy: ({ node }) => fixtureCopy(node),\n};\n\n// gavel's FixtureResult.Type values plus \"fixture\" (a markdown table of rows).\n// Table and runner-step parents carry no `context`, so the fixture adapter\n// never claims them; this copy-only adapter gives them the same sections.\nconst FIXTURE_STEP_FRAMEWORKS = new Set([\"exec\", \"query\", \"fixture\", \"test\", \"lint\", \"verify\"]);\n\nconst fixtureStepCopyAdapter: TestNodeAdapter = {\n id: \"verification-step-copy\",\n match: (node) => FIXTURE_STEP_FRAMEWORKS.has(node.framework ?? \"\"),\n copy: ({ node }) => fixtureCopy(node),\n};\n\n/** Default node adapters for VerificationResults: checklist items and\n * fixture/CEL steps. Registration order matters only when a node could match\n * both — a checklist node never carries a `context`, so the two never race. */\nexport function verificationAdapters(): TestNodeAdapterRegistry {\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter]);\n}\n"],"names":["jsx","ChecklistDetail","outcomeFor","UiTerminal","FixtureDetail","createTestRunnerRegistry"],"mappings":";;;;;;;AAqBA,SAAS,gBAAgB,MAAqB;AAC5C,SAAO,KAAK,cAAc;AAC5B;AAEA,SAAS,cAAc,MAAoB;AACzC,MAAI,KAAK,OAAQ,QAAO;AACxB,MAAI,KAAK,OAAQ,QAAO;AACxB,SAAO;AACT;AAGA,SAAS,cAAc,MAA0B;AAC/C,QAAM,QAAQ,KAAK,YAAY,KAAK,SAAS,SAAS,IAAI,KAAK,WAAW,CAAC,IAAI;AAC/E,QAAM,QAAQ,MAAM;AAAA,IAClB,CAAC,SAAS,KAAK,cAAc,IAAI,CAAC,IAAI,KAAK,IAAI,GAAG,KAAK,UAAU,MAAM,KAAK,OAAO,KAAK,EAAE;AAAA,EAAA;AAE5F,SAAO,EAAE,OAAO,CAAC,EAAE,OAAO,YAAY,MAAM,MAAM,KAAK,IAAI,EAAA,CAAG,EAAA;AAChE;AAEA,MAAM,mBAAoC;AAAA,EACxC,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,cAAc,CAAC,EAAE,WAAWA,2BAAAA,IAACC,aAAAA,mBAAgB,MAAY;AAAA,EACzD,MAAM,CAAC,EAAE,KAAA,MAAW,cAAc,IAAI;AACxC;AAEA,SAAS,cAAc,MAAqB;AAC1C,SAAO,KAAK,YAAY;AAC1B;AAIA,SAAS,aAAa,QAAqC;AACzD,MAAI,UAAU,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,MAAM,GAAG;AAClE,UAAM,QAAS,OAAmC;AAClD,QAAI,OAAO,UAAU,YAAY,MAAM,SAAS,EAAG,QAAO;AAAA,EAC5D;AACA,SAAO;AACT;AAIA,S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IAAI,SAAS;AAAA,EAAA;AAExC,SAAO,MAAM,SAAS,IAAI,CAAC,EAAE,OAAO,WAAW,MAAM,MAAM,KAAK,IAAI,EAAA,CAAG,IAAI,CAAA;AAC7E;AAGA,SAAS,YAAY,MAA0B;AAC7C,QAAM,UAAU,KAAK;AACrB,QAAM,WAAU,mCAAS,YAAW,KAAK;AACzC,SAAO;AAAA,IACL,OAAO;AAAA,MACL,GAAG,eAAe,MAAM,OAAO;AAAA,MAC/B,GAAG,iBAAiB,MAAM,OAAO;AAAA,MACjC,GAAG,eAAe,IAAI;AAAA,IAAA;AAAA,IAExB,OAAO,UAAU,CAAC,EAAE,OAAO,gBAAgB,MAAMC,uBAAY,OAAO,QAAA,CAAS,IAAI,CAAA;AAAA,EAAC;AAEtF;AAEA,MAAM,iBAAkC;AAAA,EACtC,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,cAAc,CAAC,EAAE,WAAWH,2BAAAA,IAACI,aAAAA,iBAAc,MAAY;AAAA,EACvD,MAAM,CAAC,EAAE,KAAA,MAAW,YAAY,IAAI;AACtC;AAKA,MAAM,0BAA0B,oBAAI,IAAI,CAAC,QAAQ,SAAS,WAAW,QAAQ,QAAQ,QAAQ,CAAC;AAE9F,MAAM,yBAA0C;AAAA,EAC9C,IAAI;AAAA,EACJ,OAAO,CAAC,SAAS,wBAAwB,IAAI,KAAK,aAAa,EAAE;AAAA,EACjE,MAAM,CAAC,EAAE,KAAA,MAAW,YAAY,IAAI;AACtC;AAKO,SAAS,uBAAgD;AAC9D,SAAOC,QAAAA,yBAAyB,CAAC,kBAAkB,gBAAgB,sBAAsB,CAAC;AAC5F;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapters.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapters.tsx"],"names":[],"mappings":"AAQA,OAAO,EAQL,KAAK,uBAAuB,EAG7B,MAAM,gBAAgB,CAAC;AAyJxB;;gFAEgF;AAChF,wBAAgB,oBAAoB,IAAI,uBAAuB,CAE9D"}
|
|
@@ -1,24 +1,136 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ChecklistDetail, FixtureDetail } from "./adapterViews.js";
|
|
3
3
|
import { createTestRunnerRegistry } from "../test-runner/adapter.js";
|
|
4
|
+
import { UiTerminal } from "../../icons/components/UiTerminal.js";
|
|
5
|
+
import { outcomeFor } from "../test-runner/status.js";
|
|
4
6
|
function isChecklistNode(node) {
|
|
5
7
|
return node.framework === "checklist";
|
|
6
8
|
}
|
|
9
|
+
function checklistMark(item) {
|
|
10
|
+
if (item.failed) return "[ ]";
|
|
11
|
+
if (item.passed) return "[x]";
|
|
12
|
+
return "[?]";
|
|
13
|
+
}
|
|
14
|
+
function checklistCopy(node) {
|
|
15
|
+
const items = node.children && node.children.length > 0 ? node.children : [node];
|
|
16
|
+
const lines = items.map(
|
|
17
|
+
(item) => `- ${checklistMark(item)} ${item.name}${item.message ? ` — ${item.message}` : ""}`
|
|
18
|
+
);
|
|
19
|
+
return { brief: [{ title: "Criteria", body: lines.join("\n") }] };
|
|
20
|
+
}
|
|
7
21
|
const checklistAdapter = {
|
|
8
22
|
id: "verification-checklist",
|
|
9
23
|
match: isChecklistNode,
|
|
10
|
-
renderDetail: ({ node }) => /* @__PURE__ */ jsx(ChecklistDetail, { node })
|
|
24
|
+
renderDetail: ({ node }) => /* @__PURE__ */ jsx(ChecklistDetail, { node }),
|
|
25
|
+
copy: ({ node }) => checklistCopy(node)
|
|
11
26
|
};
|
|
12
27
|
function isFixtureNode(node) {
|
|
13
28
|
return node.context !== void 0;
|
|
14
29
|
}
|
|
30
|
+
function readCelTrace(detail) {
|
|
31
|
+
if (detail && typeof detail === "object" && !Array.isArray(detail)) {
|
|
32
|
+
const value = detail.cel_trace;
|
|
33
|
+
if (typeof value === "string" && value.length > 0) return value;
|
|
34
|
+
}
|
|
35
|
+
return void 0;
|
|
36
|
+
}
|
|
37
|
+
function comparisonValue(hasCelGate, value) {
|
|
38
|
+
if (value === void 0) return void 0;
|
|
39
|
+
if (hasCelGate) return value;
|
|
40
|
+
if (value !== null && typeof value === "object" && !Array.isArray(value)) return void 0;
|
|
41
|
+
return value;
|
|
42
|
+
}
|
|
43
|
+
function formatValue(value) {
|
|
44
|
+
return typeof value === "string" ? value : JSON.stringify(value, null, 2);
|
|
45
|
+
}
|
|
46
|
+
function commandSection(node, context) {
|
|
47
|
+
const command = (context == null ? void 0 : context.command) ?? node.command;
|
|
48
|
+
if (!command) return [];
|
|
49
|
+
const cwd = (context == null ? void 0 : context.cwd) ?? node.work_dir;
|
|
50
|
+
const exit = context == null ? void 0 : context.exit_code;
|
|
51
|
+
const lines = [`$ ${command}`, cwd && `cwd: ${cwd}`, exit !== void 0 && `exit: ${exit}`];
|
|
52
|
+
return [{ title: "Command", lang: "sh", body: lines.filter(Boolean).join("\n") }];
|
|
53
|
+
}
|
|
54
|
+
function assertionSection(node, context) {
|
|
55
|
+
const expression = context == null ? void 0 : context.cel_expression;
|
|
56
|
+
const trace = readCelTrace(node.detail);
|
|
57
|
+
const hasCelGate = !!(expression || trace);
|
|
58
|
+
const vars = (context == null ? void 0 : context.cel_vars) ?? {};
|
|
59
|
+
const expected = comparisonValue(hasCelGate, context == null ? void 0 : context.expected);
|
|
60
|
+
const actual = comparisonValue(hasCelGate, context == null ? void 0 : context.actual);
|
|
61
|
+
const lines = [
|
|
62
|
+
expression && `expression: ${expression}`,
|
|
63
|
+
trace && `trace:
|
|
64
|
+
${trace}`,
|
|
65
|
+
Object.keys(vars).length > 0 && `vars: ${formatValue(vars)}`,
|
|
66
|
+
expected !== void 0 && `expected: ${formatValue(expected)}`,
|
|
67
|
+
actual !== void 0 && `actual: ${formatValue(actual)}`
|
|
68
|
+
].filter(Boolean);
|
|
69
|
+
return lines.length > 0 ? [{ title: "Assertion", body: lines.join("\n") }] : [];
|
|
70
|
+
}
|
|
71
|
+
const OUTCOME_GLYPH = {
|
|
72
|
+
passed: "✓",
|
|
73
|
+
failed: "✗",
|
|
74
|
+
errored: "✗",
|
|
75
|
+
timedout: "⏱",
|
|
76
|
+
warned: "!",
|
|
77
|
+
skipped: "-",
|
|
78
|
+
pending: "○",
|
|
79
|
+
running: "…"
|
|
80
|
+
};
|
|
81
|
+
function childLine(child) {
|
|
82
|
+
var _a;
|
|
83
|
+
const outcome = outcomeFor(child);
|
|
84
|
+
const exit = (_a = child.context) == null ? void 0 : _a.exit_code;
|
|
85
|
+
const reason = child.message ?? (exit ? `exit ${exit}` : void 0);
|
|
86
|
+
return `${outcome ? OUTCOME_GLYPH[outcome] : "·"} ${child.name}${reason ? ` — ${reason}` : ""}`;
|
|
87
|
+
}
|
|
88
|
+
function summaryLine(summary) {
|
|
89
|
+
const counts = [
|
|
90
|
+
[summary.Passed, "passed"],
|
|
91
|
+
[summary.Failed, "failed"],
|
|
92
|
+
[summary.Warned, "warned"],
|
|
93
|
+
[summary.Timedout, "timed out"],
|
|
94
|
+
[summary.Skipped, "skipped"],
|
|
95
|
+
[summary.Pending, "pending"],
|
|
96
|
+
[summary.Running, "running"]
|
|
97
|
+
];
|
|
98
|
+
const parts = counts.filter(([n]) => !!n).map(([n, label]) => `${n} ${label}`);
|
|
99
|
+
return [`${summary.Total} total`, ...parts].join(" · ");
|
|
100
|
+
}
|
|
101
|
+
function resultsSection(node) {
|
|
102
|
+
const lines = [
|
|
103
|
+
...node.summary ? [summaryLine(node.summary)] : [],
|
|
104
|
+
...(node.children ?? []).map(childLine)
|
|
105
|
+
];
|
|
106
|
+
return lines.length > 0 ? [{ title: "Results", body: lines.join("\n") }] : [];
|
|
107
|
+
}
|
|
108
|
+
function fixtureCopy(node) {
|
|
109
|
+
const context = node.context;
|
|
110
|
+
const command = (context == null ? void 0 : context.command) ?? node.command;
|
|
111
|
+
return {
|
|
112
|
+
brief: [
|
|
113
|
+
...commandSection(node, context),
|
|
114
|
+
...assertionSection(node, context),
|
|
115
|
+
...resultsSection(node)
|
|
116
|
+
],
|
|
117
|
+
items: command ? [{ label: "Copy command", icon: UiTerminal, value: command }] : []
|
|
118
|
+
};
|
|
119
|
+
}
|
|
15
120
|
const fixtureAdapter = {
|
|
16
121
|
id: "verification-fixture",
|
|
17
122
|
match: isFixtureNode,
|
|
18
|
-
renderDetail: ({ node }) => /* @__PURE__ */ jsx(FixtureDetail, { node })
|
|
123
|
+
renderDetail: ({ node }) => /* @__PURE__ */ jsx(FixtureDetail, { node }),
|
|
124
|
+
copy: ({ node }) => fixtureCopy(node)
|
|
125
|
+
};
|
|
126
|
+
const FIXTURE_STEP_FRAMEWORKS = /* @__PURE__ */ new Set(["exec", "query", "fixture", "test", "lint", "verify"]);
|
|
127
|
+
const fixtureStepCopyAdapter = {
|
|
128
|
+
id: "verification-step-copy",
|
|
129
|
+
match: (node) => FIXTURE_STEP_FRAMEWORKS.has(node.framework ?? ""),
|
|
130
|
+
copy: ({ node }) => fixtureCopy(node)
|
|
19
131
|
};
|
|
20
132
|
function verificationAdapters() {
|
|
21
|
-
return createTestRunnerRegistry([checklistAdapter, fixtureAdapter]);
|
|
133
|
+
return createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter]);
|
|
22
134
|
}
|
|
23
135
|
export {
|
|
24
136
|
verificationAdapters
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.js","sources":["../../../src/data/verification/adapters.tsx"],"sourcesContent":["// Domain node adapters for VerificationResults: a checklist adapter for the\n// synthesized \"Acceptance criteria\" node and its items, and a fixture/CEL\n// adapter for the failing-step detail. Rendering lives in adapterViews.tsx —\n// split out so this file's only exports are the registry (react/only-export-\n// components forbids mixing component declarations with plain exports).\n\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport {\n createTestRunnerRegistry,\n type Test,\n type TestNodeAdapter,\n type TestNodeAdapterRegistry,\n} from \"../test-runner\";\n\nfunction isChecklistNode(node: Test): boolean {\n return node.framework === \"checklist\";\n}\n\nconst checklistAdapter: TestNodeAdapter = {\n id: \"verification-checklist\",\n match: isChecklistNode,\n renderDetail: ({ node }) => <ChecklistDetail node={node} />,\n};\n\nfunction isFixtureNode(node: Test): boolean {\n return node.context !== undefined;\n}\n\nconst fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} />,\n};\n\n/** Default node adapters for VerificationResults: checklist items and\n * fixture/CEL steps. Registration order matters only when a node could match\n * both — a checklist node never carries a `context`, so the two never race. */\nexport function verificationAdapters(): TestNodeAdapterRegistry {\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter]);\n}\n"],"names":[],"mappings":";;;AAcA,SAAS,gBAAgB,MAAqB;AAC5C,SAAO,KAAK,cAAc;AAC5B;AAEA,MAAM,mBAAoC;AAAA,EACxC,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,cAAc,CAAC,EAAE,WAAW,oBAAC,mBAAgB,KAAA,CAAY;AAC3D;AAEA,SAAS,cAAc,MAAqB;AAC1C,SAAO,KAAK,YAAY;AAC1B;AAEA,MAAM,iBAAkC;AAAA,EACtC,IAAI;AAAA,EACJ,OAAO;AAAA,EACP,cAAc,CAAC,EAAE,WAAW,oBAAC,iBAAc,KAAA,CAAY;AACzD;AAKO,SAAS,uBAAgD;AAC9D,SAAO,yBAAyB,CAAC,kBAAkB,cAAc,CAAC;AACpE;"}
|
|
1
|
+
{"version":3,"file":"adapters.js","sources":["../../../src/data/verification/adapters.tsx"],"sourcesContent":["// Domain node adapters for VerificationResults: a checklist adapter for the\n// synthesized \"Acceptance criteria\" node and its items, and a fixture/CEL\n// adapter for the failing-step detail. Rendering lives in adapterViews.tsx —\n// split out so this file's only exports are the registry (react/only-export-\n// components forbids mixing component declarations with plain exports).\n\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport { UiTerminal } from \"../../icons\";\nimport {\n createTestRunnerRegistry,\n outcomeFor,\n type BriefSection,\n type CopySections,\n type FixtureContext,\n type Test,\n type TestNodeAdapter,\n type TestNodeAdapterRegistry,\n type TestOutcome,\n type TestSummary,\n} from \"../test-runner\";\n\nfunction isChecklistNode(node: Test): boolean {\n return node.framework === \"checklist\";\n}\n\nfunction checklistMark(item: Test): string {\n if (item.failed) return \"[ ]\";\n if (item.passed) return \"[x]\";\n return \"[?]\";\n}\n\n/** `- [x]/[ ]/[?] criterion — reason` for each item, or the leaf itself. */\nfunction checklistCopy(node: Test): CopySections {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n const lines = items.map(\n (item) => `- ${checklistMark(item)} ${item.name}${item.message ? ` — ${item.message}` : \"\"}`,\n );\n return { brief: [{ title: \"Criteria\", body: lines.join(\"\\n\") }] };\n}\n\nconst checklistAdapter: TestNodeAdapter = {\n id: \"verification-checklist\",\n match: isChecklistNode,\n renderDetail: ({ node }) => <ChecklistDetail node={node} />,\n copy: ({ node }) => checklistCopy(node),\n};\n\nfunction isFixtureNode(node: Test): boolean {\n return node.context !== undefined;\n}\n\n// ── Copy sections for fixture steps (exec / query / table / test / lint) ───\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// Mirrors CelDetails: without a CEL gate, a command step's `actual` is the whole\n// command result object, already covered by the Command section and output.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\nfunction formatValue(value: unknown): string {\n return typeof value === \"string\" ? value : JSON.stringify(value, null, 2);\n}\n\nfunction commandSection(node: Test, context: FixtureContext | undefined): BriefSection[] {\n const command = context?.command ?? node.command;\n if (!command) return [];\n const cwd = context?.cwd ?? node.work_dir;\n const exit = context?.exit_code;\n const lines = [`$ ${command}`, cwd && `cwd: ${cwd}`, exit !== undefined && `exit: ${exit}`];\n return [{ title: \"Command\", lang: \"sh\", body: lines.filter(Boolean).join(\"\\n\") }];\n}\n\nfunction assertionSection(node: Test, context: FixtureContext | undefined): BriefSection[] {\n const expression = context?.cel_expression;\n const trace = readCelTrace(node.detail);\n const hasCelGate = !!(expression || trace);\n const vars = context?.cel_vars ?? {};\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const lines = [\n expression && `expression: ${expression}`,\n trace && `trace:\\n${trace}`,\n Object.keys(vars).length > 0 && `vars: ${formatValue(vars)}`,\n expected !== undefined && `expected: ${formatValue(expected)}`,\n actual !== undefined && `actual: ${formatValue(actual)}`,\n ].filter(Boolean);\n return lines.length > 0 ? [{ title: \"Assertion\", body: lines.join(\"\\n\") }] : [];\n}\n\nconst OUTCOME_GLYPH: Record<TestOutcome, string> = {\n passed: \"✓\",\n failed: \"✗\",\n errored: \"✗\",\n timedout: \"⏱\",\n warned: \"!\",\n skipped: \"-\",\n pending: \"○\",\n running: \"…\",\n};\n\nfunction childLine(child: Test): string {\n const outcome = outcomeFor(child);\n const exit = (child.context as FixtureContext | undefined)?.exit_code;\n const reason = child.message ?? (exit ? `exit ${exit}` : undefined);\n return `${outcome ? OUTCOME_GLYPH[outcome] : \"·\"} ${child.name}${reason ? ` — ${reason}` : \"\"}`;\n}\n\nfunction summaryLine(summary: TestSummary): string {\n const counts: [number | undefined, string][] = [\n [summary.Passed, \"passed\"],\n [summary.Failed, \"failed\"],\n [summary.Warned, \"warned\"],\n [summary.Timedout, \"timed out\"],\n [summary.Skipped, \"skipped\"],\n [summary.Pending, \"pending\"],\n [summary.Running, \"running\"],\n ];\n const parts = counts.filter(([n]) => !!n).map(([n, label]) => `${n} ${label}`);\n return [`${summary.Total} total`, ...parts].join(\" · \");\n}\n\nfunction resultsSection(node: Test): BriefSection[] {\n const lines = [\n ...(node.summary ? [summaryLine(node.summary)] : []),\n ...(node.children ?? []).map(childLine),\n ];\n return lines.length > 0 ? [{ title: \"Results\", body: lines.join(\"\\n\") }] : [];\n}\n\n/** Command, CEL assertion and per-child verdicts for a fixture step or its parent. */\nfunction fixtureCopy(node: Test): CopySections {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n return {\n brief: [\n ...commandSection(node, context),\n ...assertionSection(node, context),\n ...resultsSection(node),\n ],\n items: command ? [{ label: \"Copy command\", icon: UiTerminal, value: command }] : [],\n };\n}\n\nconst fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} />,\n copy: ({ node }) => fixtureCopy(node),\n};\n\n// gavel's FixtureResult.Type values plus \"fixture\" (a markdown table of rows).\n// Table and runner-step parents carry no `context`, so the fixture adapter\n// never claims them; this copy-only adapter gives them the same sections.\nconst FIXTURE_STEP_FRAMEWORKS = new Set([\"exec\", \"query\", \"fixture\", \"test\", \"lint\", \"verify\"]);\n\nconst fixtureStepCopyAdapter: TestNodeAdapter = {\n id: \"verification-step-copy\",\n match: (node) => FIXTURE_STEP_FRAMEWORKS.has(node.framework ?? \"\"),\n copy: ({ node }) => fixtureCopy(node),\n};\n\n/** Default node adapters for VerificationResults: checklist items and\n * fixture/CEL steps. Registration order matters only when a node could match\n * both — a checklist node never carries a `context`, so the two never race. */\nexport function verificationAdapters(): TestNodeAdapterRegistry {\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter]);\n}\n"],"names":[],"mappings":";;;;;AAqBA,SAAS,gBAAgB,MAAqB;AAC5C,SAAO,KAAK,cAAc;AAC5B;AAEA,SAAS,cAAc,MAAoB;AACzC,MAAI,KAAK,OAAQ,QAAO;AACxB,MAAI,KAAK,OAAQ,QAAO;AACxB,SAAO;AACT;AAGA,SAAS,cAAc,MAA0B;AAC/C,QAAM,QAAQ,KAAK,YAAY,KAAK,SAAS,SAAS,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A,EACJ,OAAO;AAAA,EACP,cAAc,CAAC,EAAE,WAAW,oBAAC,iBAAc,MAAY;AAAA,EACvD,MAAM,CAAC,EAAE,KAAA,MAAW,YAAY,IAAI;AACtC;AAKA,MAAM,0BAA0B,oBAAI,IAAI,CAAC,QAAQ,SAAS,WAAW,QAAQ,QAAQ,QAAQ,CAAC;AAE9F,MAAM,yBAA0C;AAAA,EAC9C,IAAI;AAAA,EACJ,OAAO,CAAC,SAAS,wBAAwB,IAAI,KAAK,aAAa,EAAE;AAAA,EACjE,MAAM,CAAC,EAAE,KAAA,MAAW,YAAY,IAAI;AACtC;AAKO,SAAS,uBAAgD;AAC9D,SAAO,yBAAyB,CAAC,kBAAkB,gBAAgB,sBAAsB,CAAC;AAC5F;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verifyReportTests.cjs","sources":["../../../src/data/verification/verifyReportTests.ts"],"sourcesContent":["// Projects a captain VerifyReport onto the shared test-runner Test model, so\n// VerificationResults can render it with the same TestRunner every other\n// fixture/test surface uses. Ported from gavel's verificationAttempts.ts\n// (executionNodeTest / checklistTest), adapted to VerifyReport's node shape\n// (which already carries boolean status flags, unlike gavel's execution\n// snapshot which carried a single `state` string to translate).\n\nimport { aggregateStatusCounts, type StatusCounts, type Test, type TestSummary } from \"../test-runner\";\nimport type { VerifyChecklistItem, VerifyNode, VerifyReport, VerifySummary } from \"./verify-report\";\n\nconst ACCEPTANCE_CRITERIA_ID = \"acceptance-criteria\";\n\nfunction coerceDuration(duration: unknown): number | undefined {\n return typeof duration === \"number\" && Number.isFinite(duration) ? duration : undefined;\n}\n\n/**\n * Projects a `VerifySummary` onto the test-runner's `TestSummary` shape (see\n * `test-runner/types.ts`), so `sum()`/`aggregateStatusCounts` (test-runner\n * `status.ts`) read a summary-carrying node's counts directly instead of\n * recursing into (possibly elided) children.\n *\n * `Duration` is not carried by `VerifySummary`, so it is reported as 0.\n */\nfunction verifySummaryToTestSummary(summary: VerifySummary): TestSummary {\n return {\n Total: summary.total,\n Passed: summary.passed,\n Failed: summary.failed,\n Warned: summary.warned,\n Skipped: summary.skipped,\n Pending: summary.pending,\n Running: summary.running,\n Timedout: summary.timedout,\n Duration: 0,\n };\n}\n\n// Every field below is optional on both VerifyNode and Test, and the project\n// compiles with exactOptionalPropertyTypes — so an absent field must be an\n// absent key, not a key explicitly set to undefined. Each is assigned only\n// when present rather than copied through in one object literal.\nfunction verifyNodeTest(node: VerifyNode): Test {\n const test: Test = { name: node.name };\n if (node.framework !== undefined) test.framework = node.framework;\n if (node.task_id !== undefined) test.task_id = node.task_id;\n if (node.file !== undefined) test.file = node.file;\n if (node.line !== undefined) test.line = node.line;\n if (node.message !== undefined) test.message = node.message;\n if (node.command !== undefined) test.command = node.command;\n if (node.work_dir !== undefined) test.work_dir = node.work_dir;\n if (node.stdout !== undefined) test.stdout = node.stdout;\n if (node.stderr !== undefined) test.stderr = node.stderr;\n const duration = coerceDuration(node.duration);\n if (duration !== undefined) test.duration = duration;\n if (node.passed !== undefined) test.passed = node.passed;\n if (node.failed !== undefined) test.failed = node.failed;\n if (node.warned !== undefined) test.warned = node.warned;\n if (node.skipped !== undefined) test.skipped = node.skipped;\n if (node.pending !== undefined) test.pending = node.pending;\n if (node.running !== undefined) test.running = node.running;\n if (node.timed_out !== undefined) test.timed_out = node.timed_out;\n if (node.progress !== undefined) test.progress = node.progress;\n if (node.context !== undefined) test.context = node.context;\n if (node.detail !== undefined) test.detail = node.detail;\n // A node carrying its own `summary` (elided children) contributes that\n // summary directly and is never recursed into, even if `children` is also\n // present — parity with Go's `SummarizeNodes` and `summarizeVerifyNodes`.\n if (node.summary !== undefined) {\n test.summary = verifySummaryToTestSummary(node.summary);\n } else if (node.children !== undefined) {\n test.children = node.children.map(verifyNodeTest);\n }\n return test;\n}\n\nfunction checklistItemTest(item: VerifyChecklistItem, index: number): Test {\n const test: Test = {\n name: item.item || `Criterion ${index + 1}`,\n framework: \"checklist\",\n task_id: `${ACCEPTANCE_CRITERIA_ID}:${index}`,\n passed: item.passed === true,\n failed: item.passed === false,\n pending: item.passed !== true && item.passed !== false,\n detail: item,\n };\n if (item.message !== undefined) test.message = item.message;\n return test;\n}\n\n/**\n * Synthesizes the \"Acceptance criteria\" parent node gavel's checklistTest\n * ports. Deliberately carries no status flags of its own — `status.ts`'s\n * `testStatus` checks `pending` before `failed`, so a container explicitly\n * flagged both `failed` and `pending` (one item failed, another is still\n * unjudged) would render as queued instead of failed. Leaving the container\n * status-less lets the shared roll-up (`
|
|
1
|
+
{"version":3,"file":"verifyReportTests.cjs","sources":["../../../src/data/verification/verifyReportTests.ts"],"sourcesContent":["// Projects a captain VerifyReport onto the shared test-runner Test model, so\n// VerificationResults can render it with the same TestRunner every other\n// fixture/test surface uses. Ported from gavel's verificationAttempts.ts\n// (executionNodeTest / checklistTest), adapted to VerifyReport's node shape\n// (which already carries boolean status flags, unlike gavel's execution\n// snapshot which carried a single `state` string to translate).\n\nimport { aggregateStatusCounts, type StatusCounts, type Test, type TestSummary } from \"../test-runner\";\nimport type { VerifyChecklistItem, VerifyNode, VerifyReport, VerifySummary } from \"./verify-report\";\n\nconst ACCEPTANCE_CRITERIA_ID = \"acceptance-criteria\";\n\nfunction coerceDuration(duration: unknown): number | undefined {\n return typeof duration === \"number\" && Number.isFinite(duration) ? duration : undefined;\n}\n\n/**\n * Projects a `VerifySummary` onto the test-runner's `TestSummary` shape (see\n * `test-runner/types.ts`), so `sum()`/`aggregateStatusCounts` (test-runner\n * `status.ts`) read a summary-carrying node's counts directly instead of\n * recursing into (possibly elided) children.\n *\n * `Duration` is not carried by `VerifySummary`, so it is reported as 0.\n */\nfunction verifySummaryToTestSummary(summary: VerifySummary): TestSummary {\n return {\n Total: summary.total,\n Passed: summary.passed,\n Failed: summary.failed,\n Warned: summary.warned,\n Skipped: summary.skipped,\n Pending: summary.pending,\n Running: summary.running,\n Timedout: summary.timedout,\n Duration: 0,\n };\n}\n\n// Every field below is optional on both VerifyNode and Test, and the project\n// compiles with exactOptionalPropertyTypes — so an absent field must be an\n// absent key, not a key explicitly set to undefined. Each is assigned only\n// when present rather than copied through in one object literal.\nfunction verifyNodeTest(node: VerifyNode): Test {\n const test: Test = { name: node.name };\n if (node.framework !== undefined) test.framework = node.framework;\n if (node.task_id !== undefined) test.task_id = node.task_id;\n if (node.file !== undefined) test.file = node.file;\n if (node.line !== undefined) test.line = node.line;\n if (node.message !== undefined) test.message = node.message;\n if (node.command !== undefined) test.command = node.command;\n if (node.work_dir !== undefined) test.work_dir = node.work_dir;\n if (node.stdout !== undefined) test.stdout = node.stdout;\n if (node.stderr !== undefined) test.stderr = node.stderr;\n const duration = coerceDuration(node.duration);\n if (duration !== undefined) test.duration = duration;\n if (node.passed !== undefined) test.passed = node.passed;\n if (node.failed !== undefined) test.failed = node.failed;\n if (node.warned !== undefined) test.warned = node.warned;\n if (node.skipped !== undefined) test.skipped = node.skipped;\n if (node.pending !== undefined) test.pending = node.pending;\n if (node.running !== undefined) test.running = node.running;\n if (node.timed_out !== undefined) test.timed_out = node.timed_out;\n if (node.progress !== undefined) test.progress = node.progress;\n if (node.context !== undefined) test.context = node.context;\n if (node.detail !== undefined) test.detail = node.detail;\n // A node carrying its own `summary` (elided children) contributes that\n // summary directly and is never recursed into, even if `children` is also\n // present — parity with Go's `SummarizeNodes` and `summarizeVerifyNodes`.\n if (node.summary !== undefined) {\n test.summary = verifySummaryToTestSummary(node.summary);\n } else if (node.children !== undefined) {\n test.children = node.children.map(verifyNodeTest);\n }\n return test;\n}\n\nfunction checklistItemTest(item: VerifyChecklistItem, index: number): Test {\n const test: Test = {\n name: item.item || `Criterion ${index + 1}`,\n framework: \"checklist\",\n task_id: `${ACCEPTANCE_CRITERIA_ID}:${index}`,\n passed: item.passed === true,\n failed: item.passed === false,\n pending: item.passed !== true && item.passed !== false,\n detail: item,\n };\n if (item.message !== undefined) test.message = item.message;\n return test;\n}\n\n/**\n * Synthesizes the \"Acceptance criteria\" parent node gavel's checklistTest\n * ports. Deliberately carries no status flags of its own — `status.ts`'s\n * `testStatus` checks `pending` before `failed`, so a container explicitly\n * flagged both `failed` and `pending` (one item failed, another is still\n * unjudged) would render as queued instead of failed. Leaving the container\n * status-less lets the shared roll-up (`outcomeFor`/`statusToneFor`: failed\n * → warned → running → pending → passed, via `sum()` over the children) decide\n * instead.\n */\nfunction checklistTest(checklist: VerifyChecklistItem[]): Test | null {\n if (checklist.length === 0) return null;\n const children = checklist.map(checklistItemTest);\n return {\n name: \"Acceptance criteria\",\n framework: \"checklist\",\n task_id: ACCEPTANCE_CRITERIA_ID,\n children,\n };\n}\n\n/** Maps a VerifyReport onto the TestRunner's Test forest, appending a\n * synthesized \"Acceptance criteria\" node for the checklist when present. */\nexport function verifyReportTests(report: VerifyReport): Test[] {\n const tests = (report.tests ?? []).map(verifyNodeTest);\n const checklist = checklistTest(report.checklist ?? []);\n return checklist ? [...tests, checklist] : tests;\n}\n\n/**\n * Status roll-up across the *rendered* forest: `report.tests` plus the\n * synthesized checklist leaves. This is **not** `report.summary` — the\n * producer's tests-only tally (see `summarizeVerifyNodes` in ./verify-report)\n * — since it also counts checklist items, which never appear in `tests`.\n */\nexport function verifyReportCounts(report: VerifyReport): StatusCounts {\n return aggregateStatusCounts(verifyReportTests(report));\n}\n"],"names":["aggregateStatusCounts"],"mappings":";;;AAUA,MAAM,yBAAyB;AAE/B,SAAS,eAAe,UAAuC;AAC7D,SAAO,OAAO,aAAa,YAAY,OAAO,SAAS,QAAQ,IAAI,WAAW;AAChF;AAUA,SAAS,2BAA2B,SAAqC;AACvE,SAAO;AAAA,IACL,OAAO,QAAQ;AAAA,IACf,QAAQ,QAAQ;AAAA,IAChB,QAAQ,QAAQ;AAAA,IAChB,QAAQ,QAAQ;AAAA,IAChB,SAAS,QAAQ;AAAA,IACjB,SAAS,QAAQ;AAAA,IACjB,SAAS,QAAQ;AAAA,IACjB,UAAU,QAAQ;AAAA,IAClB,UAAU;AAAA,EAAA;AAEd;AAMA,SAAS,eAAe,MAAwB;A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