@flanksource/clicky-ui 0.3.71 → 0.3.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai.cjs +5 -0
- package/dist/ai.js +3 -1
- package/dist/comment-anchoring.cjs +3 -0
- package/dist/comment-anchoring.js +2 -1
- package/dist/comments/CommentCapture.cjs +6 -8
- package/dist/comments/CommentCapture.cjs.map +1 -1
- package/dist/comments/CommentCapture.d.ts.map +1 -1
- package/dist/comments/CommentCapture.js +6 -8
- package/dist/comments/CommentCapture.js.map +1 -1
- package/dist/comments/CommentComposer.cjs +12 -8
- package/dist/comments/CommentComposer.cjs.map +1 -1
- package/dist/comments/CommentComposer.d.ts.map +1 -1
- package/dist/comments/CommentComposer.js +12 -8
- package/dist/comments/CommentComposer.js.map +1 -1
- package/dist/comments/CommentThread.cjs +2 -1
- package/dist/comments/CommentThread.cjs.map +1 -1
- package/dist/comments/CommentThread.d.ts +1 -1
- package/dist/comments/CommentThread.d.ts.map +1 -1
- package/dist/comments/CommentThread.js +2 -1
- package/dist/comments/CommentThread.js.map +1 -1
- package/dist/comments/CommentThreadList.cjs +5 -3
- package/dist/comments/CommentThreadList.cjs.map +1 -1
- package/dist/comments/CommentThreadList.d.ts +1 -1
- package/dist/comments/CommentThreadList.d.ts.map +1 -1
- package/dist/comments/CommentThreadList.js +5 -3
- package/dist/comments/CommentThreadList.js.map +1 -1
- package/dist/comments/anchoring/dom-anchor.cjs +32 -4
- package/dist/comments/anchoring/dom-anchor.cjs.map +1 -1
- package/dist/comments/anchoring/dom-anchor.d.ts +8 -4
- package/dist/comments/anchoring/dom-anchor.d.ts.map +1 -1
- package/dist/comments/anchoring/dom-anchor.js +31 -5
- package/dist/comments/anchoring/dom-anchor.js.map +1 -1
- package/dist/comments/anchoring/frame-anchor.cjs +74 -0
- package/dist/comments/anchoring/frame-anchor.cjs.map +1 -0
- package/dist/comments/anchoring/frame-anchor.d.ts +21 -0
- package/dist/comments/anchoring/frame-anchor.d.ts.map +1 -0
- package/dist/comments/anchoring/frame-anchor.js +70 -0
- package/dist/comments/anchoring/frame-anchor.js.map +1 -0
- package/dist/comments/comment-detail.d.ts +1 -0
- package/dist/comments/comment-detail.d.ts.map +1 -1
- package/dist/comments/comment-types.cjs.map +1 -1
- package/dist/comments/comment-types.d.ts +2 -0
- package/dist/comments/comment-types.d.ts.map +1 -1
- package/dist/comments/comment-types.js.map +1 -1
- package/dist/comments/gavel/CommentInbox.cjs +49 -59
- package/dist/comments/gavel/CommentInbox.cjs.map +1 -1
- package/dist/comments/gavel/CommentInbox.d.ts +12 -8
- package/dist/comments/gavel/CommentInbox.d.ts.map +1 -1
- package/dist/comments/gavel/CommentInbox.js +51 -61
- package/dist/comments/gavel/CommentInbox.js.map +1 -1
- package/dist/comments/gavel/CommentInboxThread.cjs.map +1 -1
- package/dist/comments/gavel/CommentInboxThread.d.ts +1 -3
- package/dist/comments/gavel/CommentInboxThread.d.ts.map +1 -1
- package/dist/comments/gavel/CommentInboxThread.js.map +1 -1
- package/dist/comments/gavel/comment-agent-assignment.cjs +41 -0
- package/dist/comments/gavel/comment-agent-assignment.cjs.map +1 -0
- package/dist/comments/gavel/comment-agent-assignment.d.ts +15 -0
- package/dist/comments/gavel/comment-agent-assignment.d.ts.map +1 -0
- package/dist/comments/gavel/comment-agent-assignment.js +39 -0
- package/dist/comments/gavel/comment-agent-assignment.js.map +1 -0
- package/dist/comments/gavel/gavel-projection.cjs +43 -13
- package/dist/comments/gavel/gavel-projection.cjs.map +1 -1
- package/dist/comments/gavel/gavel-projection.d.ts +3 -0
- package/dist/comments/gavel/gavel-projection.d.ts.map +1 -1
- package/dist/comments/gavel/gavel-projection.js +43 -14
- package/dist/comments/gavel/gavel-projection.js.map +1 -1
- package/dist/comments/gavel/inbox-model.cjs +3 -12
- package/dist/comments/gavel/inbox-model.cjs.map +1 -1
- package/dist/comments/gavel/inbox-model.d.ts +2 -2
- package/dist/comments/gavel/inbox-model.d.ts.map +1 -1
- package/dist/comments/gavel/inbox-model.js +4 -12
- package/dist/comments/gavel/inbox-model.js.map +1 -1
- package/dist/comments/gavel/inbox-prompt.cjs +1 -0
- package/dist/comments/gavel/inbox-prompt.cjs.map +1 -1
- package/dist/comments/gavel/inbox-prompt.d.ts.map +1 -1
- package/dist/comments/gavel/inbox-prompt.js +1 -0
- package/dist/comments/gavel/inbox-prompt.js.map +1 -1
- package/dist/comments/gavel/index.d.ts +1 -0
- package/dist/comments/gavel/index.d.ts.map +1 -1
- package/dist/comments-gavel.cjs +5 -1
- package/dist/comments-gavel.js +4 -3
- package/dist/comments.cjs +5 -0
- package/dist/comments.d.ts +1 -0
- package/dist/comments.d.ts.map +1 -1
- package/dist/comments.js +3 -1
- package/dist/components/AccordionList.cjs +2 -2
- package/dist/components/AccordionList.cjs.map +1 -1
- package/dist/components/AccordionList.js +2 -2
- package/dist/components/AccordionList.js.map +1 -1
- package/dist/components/examples/form-extensions/extension.d.ts +1 -1
- package/dist/components/examples/form-extensions/extension.d.ts.map +1 -1
- package/dist/components/json-schema-form-array-add-menu.cjs +44 -0
- package/dist/components/json-schema-form-array-add-menu.cjs.map +1 -0
- package/dist/components/json-schema-form-array-add-menu.d.ts +10 -0
- package/dist/components/json-schema-form-array-add-menu.d.ts.map +1 -0
- package/dist/components/json-schema-form-array-add-menu.js +44 -0
- package/dist/components/json-schema-form-array-add-menu.js.map +1 -0
- package/dist/components/json-schema-form-exclusive-key-select.cjs +28 -0
- package/dist/components/json-schema-form-exclusive-key-select.cjs.map +1 -0
- package/dist/components/json-schema-form-exclusive-key-select.d.ts +12 -0
- package/dist/components/json-schema-form-exclusive-key-select.d.ts.map +1 -0
- package/dist/components/json-schema-form-exclusive-key-select.js +28 -0
- package/dist/components/json-schema-form-exclusive-key-select.js.map +1 -0
- package/dist/components/json-schema-form-exclusive-keys.cjs +23 -0
- package/dist/components/json-schema-form-exclusive-keys.cjs.map +1 -0
- package/dist/components/json-schema-form-exclusive-keys.d.ts +8 -0
- package/dist/components/json-schema-form-exclusive-keys.d.ts.map +1 -0
- package/dist/components/json-schema-form-exclusive-keys.js +22 -0
- package/dist/components/json-schema-form-exclusive-keys.js.map +1 -0
- package/dist/components/json-schema-form-layout.cjs +18 -5
- package/dist/components/json-schema-form-layout.cjs.map +1 -1
- package/dist/components/json-schema-form-layout.d.ts +3 -1
- package/dist/components/json-schema-form-layout.d.ts.map +1 -1
- package/dist/components/json-schema-form-layout.js +19 -6
- package/dist/components/json-schema-form-layout.js.map +1 -1
- package/dist/components/json-schema-form-object-array-view.cjs +13 -7
- package/dist/components/json-schema-form-object-array-view.cjs.map +1 -1
- package/dist/components/json-schema-form-object-array-view.d.ts.map +1 -1
- package/dist/components/json-schema-form-object-array-view.js +13 -7
- package/dist/components/json-schema-form-object-array-view.js.map +1 -1
- package/dist/components/json-schema-form-object.cjs +6 -0
- package/dist/components/json-schema-form-object.cjs.map +1 -1
- package/dist/components/json-schema-form-object.d.ts.map +1 -1
- package/dist/components/json-schema-form-object.js +6 -0
- package/dist/components/json-schema-form-object.js.map +1 -1
- package/dist/components/json-schema-form-render.cjs +56 -35
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts +1 -0
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +56 -35
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +1 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts +2 -1
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +1 -1
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-runtime-types.d.ts +8 -0
- package/dist/components/json-schema-form-runtime-types.d.ts.map +1 -1
- package/dist/components/json-schema-form-section-actions.cjs +12 -0
- package/dist/components/json-schema-form-section-actions.cjs.map +1 -0
- package/dist/components/json-schema-form-section-actions.d.ts +8 -0
- package/dist/components/json-schema-form-section-actions.d.ts.map +1 -0
- package/dist/components/json-schema-form-section-actions.js +11 -0
- package/dist/components/json-schema-form-section-actions.js.map +1 -0
- package/dist/components/json-schema-form-sibling-prefix.cjs +23 -0
- package/dist/components/json-schema-form-sibling-prefix.cjs.map +1 -0
- package/dist/components/json-schema-form-sibling-prefix.d.ts +9 -0
- package/dist/components/json-schema-form-sibling-prefix.d.ts.map +1 -0
- package/dist/components/json-schema-form-sibling-prefix.js +23 -0
- package/dist/components/json-schema-form-sibling-prefix.js.map +1 -0
- package/dist/components/json-schema-form-sibling-select.cjs +25 -0
- package/dist/components/json-schema-form-sibling-select.cjs.map +1 -0
- package/dist/components/json-schema-form-sibling-select.d.ts +9 -0
- package/dist/components/json-schema-form-sibling-select.d.ts.map +1 -0
- package/dist/components/json-schema-form-sibling-select.js +25 -0
- package/dist/components/json-schema-form-sibling-select.js.map +1 -0
- package/dist/components/json-schema-form-table-array.cjs +4 -3
- package/dist/components/json-schema-form-table-array.cjs.map +1 -1
- package/dist/components/json-schema-form-table-array.js +4 -3
- package/dist/components/json-schema-form-table-array.js.map +1 -1
- package/dist/components/json-schema-form-tags-combobox.cjs +54 -24
- package/dist/components/json-schema-form-tags-combobox.cjs.map +1 -1
- package/dist/components/json-schema-form-tags-combobox.d.ts.map +1 -1
- package/dist/components/json-schema-form-tags-combobox.js +55 -25
- package/dist/components/json-schema-form-tags-combobox.js.map +1 -1
- package/dist/components.cjs +2 -0
- package/dist/components.d.ts +2 -1
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +2 -1
- package/dist/data/LogViewer.cjs +90 -19
- package/dist/data/LogViewer.cjs.map +1 -1
- package/dist/data/LogViewer.d.ts +9 -5
- package/dist/data/LogViewer.d.ts.map +1 -1
- package/dist/data/LogViewer.js +91 -20
- package/dist/data/LogViewer.js.map +1 -1
- package/dist/data/TaskProgress.cjs +5 -5
- package/dist/data/TaskProgress.cjs.map +1 -1
- package/dist/data/TaskProgress.js +5 -5
- package/dist/data/TaskProgress.js.map +1 -1
- package/dist/data/ai/SessionChatComposer.cjs +44 -22
- package/dist/data/ai/SessionChatComposer.cjs.map +1 -1
- package/dist/data/ai/SessionChatComposer.d.ts.map +1 -1
- package/dist/data/ai/SessionChatComposer.js +44 -22
- package/dist/data/ai/SessionChatComposer.js.map +1 -1
- package/dist/data/ai/SessionInspector.cjs +1 -1
- package/dist/data/ai/SessionInspector.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.host-tabs.cjs +12 -0
- package/dist/data/ai/SessionInspector.host-tabs.cjs.map +1 -1
- package/dist/data/ai/SessionInspector.host-tabs.d.ts +4 -1
- package/dist/data/ai/SessionInspector.host-tabs.d.ts.map +1 -1
- package/dist/data/ai/SessionInspector.host-tabs.js +12 -1
- package/dist/data/ai/SessionInspector.host-tabs.js.map +1 -1
- package/dist/data/ai/SessionInspector.js +2 -2
- package/dist/data/ai/SessionInspector.js.map +1 -1
- package/dist/data/ai/SessionInspector.legacy.cjs +1 -1
- 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 +2 -2
- package/dist/data/ai/SessionInspector.legacy.js.map +1 -1
- package/dist/data/ai/SessionInspector.transcript.cjs +5 -19
- 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 +6 -20
- package/dist/data/ai/SessionInspector.transcript.js.map +1 -1
- package/dist/data/ai/SessionPicker.cjs +159 -0
- package/dist/data/ai/SessionPicker.cjs.map +1 -0
- package/dist/data/ai/SessionPicker.d.ts +39 -0
- package/dist/data/ai/SessionPicker.d.ts.map +1 -0
- package/dist/data/ai/SessionPicker.js +159 -0
- package/dist/data/ai/SessionPicker.js.map +1 -0
- package/dist/data/ai/SessionPicker.model.cjs +21 -0
- package/dist/data/ai/SessionPicker.model.cjs.map +1 -0
- package/dist/data/ai/SessionPicker.model.d.ts +26 -0
- package/dist/data/ai/SessionPicker.model.d.ts.map +1 -0
- package/dist/data/ai/SessionPicker.model.js +20 -0
- package/dist/data/ai/SessionPicker.model.js.map +1 -0
- package/dist/data/ai/SessionTail.cjs +25 -15
- package/dist/data/ai/SessionTail.cjs.map +1 -1
- package/dist/data/ai/SessionTail.d.ts.map +1 -1
- package/dist/data/ai/SessionTail.js +25 -15
- package/dist/data/ai/SessionTail.js.map +1 -1
- package/dist/data/ai/SessionViewer.input.cjs +59 -1
- package/dist/data/ai/SessionViewer.input.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.input.d.ts +22 -0
- package/dist/data/ai/SessionViewer.input.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.input.js +58 -2
- package/dist/data/ai/SessionViewer.input.js.map +1 -1
- package/dist/data/ai/SessionViewer.rows.cjs +10 -3
- package/dist/data/ai/SessionViewer.rows.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.rows.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.rows.js +11 -4
- package/dist/data/ai/SessionViewer.rows.js.map +1 -1
- package/dist/data/ai/SessionViewer.tool-details.cjs +35 -0
- package/dist/data/ai/SessionViewer.tool-details.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.tool-details.d.ts +10 -1
- package/dist/data/ai/SessionViewer.tool-details.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.tool-details.js +35 -1
- package/dist/data/ai/SessionViewer.tool-details.js.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.cjs +5 -1
- package/dist/data/ai/SessionViewer.tool-row.cjs.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.d.ts.map +1 -1
- package/dist/data/ai/SessionViewer.tool-row.js +7 -3
- package/dist/data/ai/SessionViewer.tool-row.js.map +1 -1
- package/dist/data/ai/index.d.ts +2 -0
- package/dist/data/ai/index.d.ts.map +1 -1
- package/dist/data/git/GitChangeList.cjs +40 -7
- package/dist/data/git/GitChangeList.cjs.map +1 -1
- package/dist/data/git/GitChangeList.d.ts +3 -0
- package/dist/data/git/GitChangeList.d.ts.map +1 -1
- package/dist/data/git/GitChangeList.js +40 -7
- package/dist/data/git/GitChangeList.js.map +1 -1
- package/dist/data/git/pickers/GitFilePicker.cjs +19 -7
- package/dist/data/git/pickers/GitFilePicker.cjs.map +1 -1
- package/dist/data/git/pickers/GitFilePicker.d.ts +4 -2
- package/dist/data/git/pickers/GitFilePicker.d.ts.map +1 -1
- package/dist/data/git/pickers/GitFilePicker.js +19 -7
- package/dist/data/git/pickers/GitFilePicker.js.map +1 -1
- package/dist/data/git/pickers/GitPickers.cjs +3 -3
- package/dist/data/git/pickers/GitPickers.cjs.map +1 -1
- package/dist/data/git/pickers/GitPickers.js +3 -3
- package/dist/data/git/pickers/GitPickers.js.map +1 -1
- package/dist/data/git/pickers/GitPickersDemo.d.ts.map +1 -1
- package/dist/data/git/pickers/GitSourcePicker.cjs +11 -4
- package/dist/data/git/pickers/GitSourcePicker.cjs.map +1 -1
- package/dist/data/git/pickers/GitSourcePicker.d.ts +4 -2
- package/dist/data/git/pickers/GitSourcePicker.d.ts.map +1 -1
- package/dist/data/git/pickers/GitSourcePicker.js +11 -4
- package/dist/data/git/pickers/GitSourcePicker.js.map +1 -1
- package/dist/data/git/pickers/ReferencePicker.cjs +27 -3
- package/dist/data/git/pickers/ReferencePicker.cjs.map +1 -1
- package/dist/data/git/pickers/ReferencePicker.d.ts.map +1 -1
- package/dist/data/git/pickers/ReferencePicker.js +27 -3
- package/dist/data/git/pickers/ReferencePicker.js.map +1 -1
- package/dist/data/git/pickers/RepositoryCatalogPicker.cjs +2 -1
- package/dist/data/git/pickers/RepositoryCatalogPicker.cjs.map +1 -1
- package/dist/data/git/pickers/RepositoryCatalogPicker.d.ts +3 -2
- package/dist/data/git/pickers/RepositoryCatalogPicker.d.ts.map +1 -1
- package/dist/data/git/pickers/RepositoryCatalogPicker.js +2 -1
- package/dist/data/git/pickers/RepositoryCatalogPicker.js.map +1 -1
- package/dist/data/git/pickers/types.d.ts +7 -0
- package/dist/data/git/pickers/types.d.ts.map +1 -1
- package/dist/data/lint/LintList.cjs +89 -89
- package/dist/data/lint/LintList.cjs.map +1 -1
- package/dist/data/lint/LintList.d.ts +3 -2
- package/dist/data/lint/LintList.d.ts.map +1 -1
- package/dist/data/lint/LintList.js +90 -90
- package/dist/data/lint/LintList.js.map +1 -1
- package/dist/data/log-sections.cjs +152 -21
- package/dist/data/log-sections.cjs.map +1 -1
- package/dist/data/log-sections.d.ts +31 -6
- package/dist/data/log-sections.d.ts.map +1 -1
- package/dist/data/log-sections.js +151 -22
- package/dist/data/log-sections.js.map +1 -1
- package/dist/data/test-runner/TestDetailPanel.cjs +1 -1
- package/dist/data/test-runner/TestDetailPanel.cjs.map +1 -1
- package/dist/data/test-runner/TestDetailPanel.js +1 -1
- package/dist/data/test-runner/TestDetailPanel.js.map +1 -1
- package/dist/data/test-runner/TestFailureDetail.cjs +10 -8
- package/dist/data/test-runner/TestFailureDetail.cjs.map +1 -1
- package/dist/data/test-runner/TestFailureDetail.d.ts +3 -2
- package/dist/data/test-runner/TestFailureDetail.d.ts.map +1 -1
- package/dist/data/test-runner/TestFailureDetail.js +10 -8
- package/dist/data/test-runner/TestFailureDetail.js.map +1 -1
- package/dist/data/test-runner/TestTreeNode.cjs +9 -4
- 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 +9 -4
- package/dist/data/test-runner/TestTreeNode.js.map +1 -1
- package/dist/data/test-runner/attempts.cjs +2 -1
- package/dist/data/test-runner/attempts.cjs.map +1 -1
- package/dist/data/test-runner/attempts.d.ts.map +1 -1
- package/dist/data/test-runner/attempts.js +2 -1
- package/dist/data/test-runner/attempts.js.map +1 -1
- package/dist/data/test-runner/copy.cjs +1 -2
- package/dist/data/test-runner/copy.cjs.map +1 -1
- package/dist/data/test-runner/copy.d.ts.map +1 -1
- package/dist/data/test-runner/copy.js +1 -2
- package/dist/data/test-runner/copy.js.map +1 -1
- package/dist/data/test-runner/types.d.ts +3 -0
- package/dist/data/test-runner/types.d.ts.map +1 -1
- package/dist/data/traces/GoProfileView.cjs +10 -7
- package/dist/data/traces/GoProfileView.cjs.map +1 -1
- package/dist/data/traces/GoProfileView.d.ts.map +1 -1
- package/dist/data/traces/GoProfileView.js +10 -7
- package/dist/data/traces/GoProfileView.js.map +1 -1
- package/dist/data/traces/TraceEventStream.cjs +37 -7
- package/dist/data/traces/TraceEventStream.cjs.map +1 -1
- package/dist/data/traces/TraceEventStream.d.ts.map +1 -1
- package/dist/data/traces/TraceEventStream.js +37 -7
- package/dist/data/traces/TraceEventStream.js.map +1 -1
- package/dist/data/traces/TraceFeed.cjs +71 -106
- package/dist/data/traces/TraceFeed.cjs.map +1 -1
- package/dist/data/traces/TraceFeed.d.ts +3 -10
- package/dist/data/traces/TraceFeed.d.ts.map +1 -1
- package/dist/data/traces/TraceFeed.js +72 -107
- package/dist/data/traces/TraceFeed.js.map +1 -1
- package/dist/data/traces/trace-feed.cjs.map +1 -1
- package/dist/data/traces/trace-feed.d.ts +15 -0
- package/dist/data/traces/trace-feed.d.ts.map +1 -1
- package/dist/data/traces/trace-feed.js.map +1 -1
- package/dist/data/traces/use-trace-feed.cjs +100 -0
- package/dist/data/traces/use-trace-feed.cjs.map +1 -0
- package/dist/data/traces/use-trace-feed.d.ts +11 -0
- package/dist/data/traces/use-trace-feed.d.ts.map +1 -0
- package/dist/data/traces/use-trace-feed.js +100 -0
- package/dist/data/traces/use-trace-feed.js.map +1 -0
- package/dist/data/verification/adapters.cjs +1 -0
- 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 +1 -0
- package/dist/data/verification/adapters.js.map +1 -1
- package/dist/data/version-info.cjs +3 -3
- package/dist/data/version-info.js +3 -3
- package/dist/data.cjs +2 -2
- package/dist/data.d.ts +1 -1
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +2 -2
- package/dist/hooks/event-hub.cjs +24 -2
- package/dist/hooks/event-hub.cjs.map +1 -1
- package/dist/hooks/event-hub.d.ts +2 -0
- package/dist/hooks/event-hub.d.ts.map +1 -1
- package/dist/hooks/event-hub.js +24 -2
- package/dist/hooks/event-hub.js.map +1 -1
- package/dist/hooks/event-stream.cjs +64 -0
- package/dist/hooks/event-stream.cjs.map +1 -0
- package/dist/hooks/event-stream.d.ts +13 -0
- package/dist/hooks/event-stream.d.ts.map +1 -0
- package/dist/hooks/event-stream.js +64 -0
- package/dist/hooks/event-stream.js.map +1 -0
- package/dist/hooks/log-tail-session.cjs +53 -0
- package/dist/hooks/log-tail-session.cjs.map +1 -0
- package/dist/hooks/log-tail-session.d.ts +31 -0
- package/dist/hooks/log-tail-session.d.ts.map +1 -0
- package/dist/hooks/log-tail-session.js +53 -0
- package/dist/hooks/log-tail-session.js.map +1 -0
- package/dist/hooks/tail-buffer.cjs +15 -0
- package/dist/hooks/tail-buffer.cjs.map +1 -0
- package/dist/hooks/tail-buffer.d.ts +11 -0
- package/dist/hooks/tail-buffer.d.ts.map +1 -0
- package/dist/hooks/tail-buffer.js +15 -0
- package/dist/hooks/tail-buffer.js.map +1 -0
- package/dist/hooks/use-live-snapshot.cjs +60 -0
- package/dist/hooks/use-live-snapshot.cjs.map +1 -0
- package/dist/hooks/use-live-snapshot.d.ts +9 -0
- package/dist/hooks/use-live-snapshot.d.ts.map +1 -0
- package/dist/hooks/use-live-snapshot.js +60 -0
- package/dist/hooks/use-live-snapshot.js.map +1 -0
- package/dist/hooks/use-log-tail.cjs +125 -112
- package/dist/hooks/use-log-tail.cjs.map +1 -1
- package/dist/hooks/use-log-tail.d.ts +2 -24
- package/dist/hooks/use-log-tail.d.ts.map +1 -1
- package/dist/hooks/use-log-tail.js +125 -112
- package/dist/hooks/use-log-tail.js.map +1 -1
- package/dist/hooks.cjs +6 -0
- package/dist/hooks.d.ts +3 -0
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +4 -1
- package/dist/index.cjs +14 -1
- package/dist/index.js +8 -2
- package/dist/runtime/barrels.json +7017 -6986
- package/dist/runtime/importmap.json +2129 -2115
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/comments/gavel/CommentInboxReview.cjs +0 -169
- package/dist/comments/gavel/CommentInboxReview.cjs.map +0 -1
- package/dist/comments/gavel/CommentInboxReview.d.ts +0 -20
- package/dist/comments/gavel/CommentInboxReview.d.ts.map +0 -1
- package/dist/comments/gavel/CommentInboxReview.js +0 -169
- package/dist/comments/gavel/CommentInboxReview.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.cjs","names":["ChecklistDetail","hasStepDetail","outcomeFor","readStepDetail","readStepSource","readQuery","stepQueryCopy","stepSourceCopy","stepKindCopy","UiTerminal","stepFormState","StepRowBadge","createTestRunnerRegistry","FixtureDetail","verifyNodeTest","StepOutputs","sourceTabLabel","StepSourceSection"],"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 type { ReactNode } from \"react\";\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport { StepOutputs, StepRowBadge, StepSourceSection } from \"./stepKindViews\";\nimport { verifyNodeTest } from \"./verifyReportTests\";\nimport { UiTerminal } from \"../../icons\";\nimport { hasStepDetail, readQuery, readStepDetail, stepFormState, stepKindCopy, stepQueryCopy, type WaitDetail } from \"./stepKind\";\nimport { readStepSource, sourceTabLabel, stepSourceCopy } from \"./stepSource\";\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\n// A typed step kind (services, todo, …) may report no command or CEL context at\n// all, so `detail.step` claims the node as well. A \"fixture\" leaf is a step whose\n// result has not arrived yet (a live or background step): it carries only the\n// execution node, which FixtureDetail renders as a header. Fixture parents\n// (markdown tables, runner steps) have children and stay with the default body.\nfunction isFixtureNode(node: Test): boolean {\n if (node.context !== undefined || hasStepDetail(node.detail)) return true;\n return node.framework === \"fixture\" && (node.children?.length ?? 0) === 0;\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 aborted: \"■\",\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 const stepDetail = readStepDetail(node.detail);\n const source = readStepSource(node.detail);\n const query = readQuery(node.detail);\n return {\n brief: [\n ...(query.kind === \"query\" ? stepQueryCopy(query.query) : commandSection(node, context)),\n ...assertionSection(node, context),\n ...(source.kind === \"source\" ? stepSourceCopy(source.source) : []),\n ...(stepDetail.kind === \"step\" ? stepKindCopy(stepDetail.step) : []),\n ...resultsSection(node),\n ],\n items: command ? [{ label: \"Copy command\", icon: UiTerminal, value: command }] : [],\n };\n}\n\n// gavel's FixtureResult.Type values plus \"fixture\" (a markdown table of rows)\n// and the typed step kinds. Table and runner-step parents carry no `context`,\n// so the fixture adapter never claims them; this copy-only adapter gives them\n// the same sections. \"playwright\" is also a test framework, so it counts as a\n// step only when the node carries `detail.step`.\nconst FIXTURE_STEP_FRAMEWORKS = new Set([\n \"exec\",\n \"query\",\n \"fixture\",\n \"test\",\n \"lint\",\n \"verify\",\n \"services\",\n \"todo\",\n \"todo_prompt\",\n \"ai\",\n \"browser\",\n \"playwright\",\n \"agent-browser\",\n]);\n\nfunction isFixtureStepNode(node: Test): boolean {\n const framework = node.framework ?? \"\";\n if (framework === \"playwright\") return hasStepDetail(node.detail);\n return FIXTURE_STEP_FRAMEWORKS.has(framework);\n}\n\nconst fixtureStepCopyAdapter: TestNodeAdapter = {\n id: \"verification-step-copy\",\n match: isFixtureStepNode,\n copy: ({ node }) => fixtureCopy(node),\n};\n\n// Claims only the rows it badges, so a host's own row decoration still wins for every other node.\nconst stepBadgeAdapter: TestNodeAdapter = {\n id: \"verification-step-badge\",\n match: (node) => node.waiting === true || stepFormState(node) !== undefined,\n renderRowLeading: ({ node }) => <StepRowBadge 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 type VerificationAdapterOptions = {\n /** Override the wait section while retaining the fixture's other detail sections. */\n renderWait?: (wait: WaitDetail) => ReactNode;\n /**\n * The answerable form of a step waiting on a person (`node.waiting`), shown in\n * its own section at the top of the step's detail. The host resolves which\n * pending prompt belongs to the node and answers it (e.g. with PromptForm).\n */\n renderPendingPrompt?: (node: Test) => ReactNode;\n};\n\n// The attempt a step is waiting in: it carries the step's name and task id (the\n// host finds the step's prompt by them) and `waiting`, and, when its result has\n// nothing marking it a fixture step, the step reference, so the fixture detail\n// (and its pending form) still renders it.\nfunction liveAttemptNode(step: Test, attempt: Test, ref: { id: string; kind: string }): Test {\n const live: Test = { ...attempt, name: step.name, ...(step.task_id !== undefined ? { task_id: step.task_id } : {}), waiting: true };\n if (isFixtureNode(live)) return live;\n // readStepDetail has already checked that an attempt result's detail is an object.\n return { ...live, detail: { ...(attempt.detail as Record<string, unknown> | undefined), step: ref } };\n}\n\nexport function verificationAdapters(options: VerificationAdapterOptions = {}): TestNodeAdapterRegistry {\n const fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} {...options} />,\n detailAttempts: ({ node }) => {\n const detail = readStepDetail(node.detail);\n if (detail.kind !== \"step\") return [];\n const live = detail.step.attempts.length - 1;\n return detail.step.attempts.map((attempt, index) => {\n const attemptNode: Test = attempt.result ? verifyNodeTest(attempt.result) : {\n name: node.name, message: `Attempt ${attempt.attempt}: execution evidence was not stored in this report.`,\n detail: { step: detail.step.step },\n };\n // The step waits in its last attempt; that one keeps the step's identity so the host finds its prompt.\n const waiting = node.waiting === true && index === live;\n return {\n id: attempt.attempt, status: attempt.status,\n ...(attempt.durationMs !== undefined ? { durationMs: attempt.durationMs } : {}),\n node: waiting ? liveAttemptNode(node, attemptNode, detail.step.step) : attemptNode,\n };\n });\n },\n detailTabs: ({ node }) => {\n const tabs = [];\n const detail = readStepDetail(node.detail);\n if (detail.kind === \"step\" && detail.step.outputs !== undefined) {\n tabs.push({ id: \"outputs\", label: \"Outputs\", render: () => <StepOutputs outputs={detail.step.outputs} /> });\n }\n const source = readStepSource(node.detail);\n if (source.kind !== \"none\") {\n tabs.push({ id: \"source\", label: sourceTabLabel(source), render: () => <StepSourceSection result={source} /> });\n }\n return tabs;\n },\n copy: ({ node }) => fixtureCopy(node),\n };\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter, stepBadgeAdapter]);\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAS,gBAAgB,MAAqB;CAC5C,OAAO,KAAK,cAAc;AAC5B;AAEA,SAAS,cAAc,MAAoB;CACzC,IAAI,KAAK,QAAQ,OAAO;CACxB,IAAI,KAAK,QAAQ,OAAO;CACxB,OAAO;AACT;;AAGA,SAAS,cAAc,MAA0B;CAK/C,OAAO,EAAE,OAAO,CAAC;EAAE,OAAO;EAAY,OAJxB,KAAK,YAAY,KAAK,SAAS,SAAS,IAAI,KAAK,WAAW,CAAC,IAAI,EAAA,CAC3D,KACjB,SAAS,KAAK,cAAc,IAAI,EAAE,GAAG,KAAK,OAAO,KAAK,UAAU,MAAM,KAAK,YAAY,IAE9C,CAAA,CAAM,KAAK,IAAI;CAAE,CAAC,EAAE;AAClE;AAEA,IAAM,mBAAoC;CACxC,IAAI;CACJ,OAAO;CACP,eAAe,EAAE,WAAW,iBAAA,GAAA,kBAAA,IAAA,CAACA,qBAAAA,iBAAD,EAAuB,KAAO,CAAA;CAC1D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AAQ;MAAS,QAAQ,QAAQ;MACrC,GAAI,QAAQ,eAAe,KAAA,IAAY,EAAE,YAAY,QAAQ,WAAW,IAAI,CAAC;MAC7E,MAAM,UAAU,gBAAgB,MAAM,aAAa,OAAO,KAAK,IAAI,IAAI;KACzE;IACF,CAAC;GACH;GACA,aAAa,EAAE,WAAW;IACxB,MAAM,OAAO,CAAC;IACd,MAAM,SAASX,iBAAAA,eAAe,KAAK,MAAM;IACzC,IAAI,OAAO,SAAS,UAAU,OAAO,KAAK,YAAY,KAAA,GACpD,KAAK,KAAK;KAAE,IAAI;KAAW,OAAO;KAAW,cAAc,iBAAA,GAAA,kBAAA,IAAA,CAACY,sBAAAA,aAAD,EAAa,SAAS,OAAO,KAAK,QAAU,CAAA;IAAE,CAAC;IAE5G,MAAM,SAASX,mBAAAA,eAAe,KAAK,MAAM;IACzC,IAAI,OAAO,SAAS,QAClB,KAAK,KAAK;KAAE,IAAI;KAAU,OAAOY,mBAAAA,eAAe,MAAM;KAAG,cAAc,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,mBAAD,EAAmB,QAAQ,OAAS,CAAA;IAAE,CAAC;IAEhH,OAAO;GACT;GACA,OAAO,EAAE,WAAW,YAAY,IAAI;EAEa;EAAgB;EAAwB;CAAgB,CAAC;AAC9G"}
|
|
1
|
+
{"version":3,"file":"adapters.cjs","names":["ChecklistDetail","hasStepDetail","outcomeFor","readStepDetail","readStepSource","readQuery","stepQueryCopy","stepSourceCopy","stepKindCopy","UiTerminal","stepFormState","StepRowBadge","createTestRunnerRegistry","FixtureDetail","verifyNodeTest","StepOutputs","sourceTabLabel","StepSourceSection"],"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 type { ReactNode } from \"react\";\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport { StepOutputs, StepRowBadge, StepSourceSection } from \"./stepKindViews\";\nimport { verifyNodeTest } from \"./verifyReportTests\";\nimport { UiTerminal } from \"../../icons\";\nimport { hasStepDetail, readQuery, readStepDetail, stepFormState, stepKindCopy, stepQueryCopy, type WaitDetail } from \"./stepKind\";\nimport { readStepSource, sourceTabLabel, stepSourceCopy } from \"./stepSource\";\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\n// A typed step kind (services, todo, …) may report no command or CEL context at\n// all, so `detail.step` claims the node as well. A \"fixture\" leaf is a step whose\n// result has not arrived yet (a live or background step): it carries only the\n// execution node, which FixtureDetail renders as a header. Fixture parents\n// (markdown tables, runner steps) have children and stay with the default body.\nfunction isFixtureNode(node: Test): boolean {\n if (node.context !== undefined || hasStepDetail(node.detail)) return true;\n return node.framework === \"fixture\" && (node.children?.length ?? 0) === 0;\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 aborted: \"■\",\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 const stepDetail = readStepDetail(node.detail);\n const source = readStepSource(node.detail);\n const query = readQuery(node.detail);\n return {\n brief: [\n ...(query.kind === \"query\" ? stepQueryCopy(query.query) : commandSection(node, context)),\n ...assertionSection(node, context),\n ...(source.kind === \"source\" ? stepSourceCopy(source.source) : []),\n ...(stepDetail.kind === \"step\" ? stepKindCopy(stepDetail.step) : []),\n ...resultsSection(node),\n ],\n items: command ? [{ label: \"Copy command\", icon: UiTerminal, value: command }] : [],\n };\n}\n\n// gavel's FixtureResult.Type values plus \"fixture\" (a markdown table of rows)\n// and the typed step kinds. Table and runner-step parents carry no `context`,\n// so the fixture adapter never claims them; this copy-only adapter gives them\n// the same sections. \"playwright\" is also a test framework, so it counts as a\n// step only when the node carries `detail.step`.\nconst FIXTURE_STEP_FRAMEWORKS = new Set([\n \"exec\",\n \"query\",\n \"fixture\",\n \"test\",\n \"lint\",\n \"verify\",\n \"services\",\n \"todo\",\n \"todo_prompt\",\n \"ai\",\n \"browser\",\n \"playwright\",\n \"agent-browser\",\n]);\n\nfunction isFixtureStepNode(node: Test): boolean {\n const framework = node.framework ?? \"\";\n if (framework === \"playwright\") return hasStepDetail(node.detail);\n return FIXTURE_STEP_FRAMEWORKS.has(framework);\n}\n\nconst fixtureStepCopyAdapter: TestNodeAdapter = {\n id: \"verification-step-copy\",\n match: isFixtureStepNode,\n copy: ({ node }) => fixtureCopy(node),\n};\n\n// Claims only the rows it badges, so a host's own row decoration still wins for every other node.\nconst stepBadgeAdapter: TestNodeAdapter = {\n id: \"verification-step-badge\",\n match: (node) => node.waiting === true || stepFormState(node) !== undefined,\n renderRowLeading: ({ node }) => <StepRowBadge 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 type VerificationAdapterOptions = {\n /** Override the wait section while retaining the fixture's other detail sections. */\n renderWait?: (wait: WaitDetail) => ReactNode;\n /**\n * The answerable form of a step waiting on a person (`node.waiting`), shown in\n * its own section at the top of the step's detail. The host resolves which\n * pending prompt belongs to the node and answers it (e.g. with PromptForm).\n */\n renderPendingPrompt?: (node: Test) => ReactNode;\n};\n\n// The attempt a step is waiting in: it carries the step's name and task id (the\n// host finds the step's prompt by them) and `waiting`, and, when its result has\n// nothing marking it a fixture step, the step reference, so the fixture detail\n// (and its pending form) still renders it.\nfunction liveAttemptNode(step: Test, attempt: Test, ref: { id: string; kind: string }): Test {\n const live: Test = { ...attempt, name: step.name, ...(step.task_id !== undefined ? { task_id: step.task_id } : {}), waiting: true };\n if (isFixtureNode(live)) return live;\n // readStepDetail has already checked that an attempt result's detail is an object.\n return { ...live, detail: { ...(attempt.detail as Record<string, unknown> | undefined), step: ref } };\n}\n\nexport function verificationAdapters(options: VerificationAdapterOptions = {}): TestNodeAdapterRegistry {\n const fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} {...options} />,\n detailAttempts: ({ node }) => {\n const detail = readStepDetail(node.detail);\n if (detail.kind !== \"step\") return [];\n const live = detail.step.attempts.length - 1;\n return detail.step.attempts.map((attempt, index) => {\n const attemptNode: Test = attempt.result ? verifyNodeTest(attempt.result) : {\n name: node.name, message: `Attempt ${attempt.attempt}: execution evidence was not stored in this report.`,\n detail: { step: detail.step.step },\n };\n // The step waits in its last attempt; that one keeps the step's identity so the host finds its prompt.\n const waiting = node.waiting === true && index === live;\n // A finished step's log is its last attempt's; a report's attempts carry none.\n if (index === live && node.log !== undefined && !node.running) attemptNode.log = node.log;\n return {\n id: attempt.attempt, status: attempt.status,\n ...(attempt.durationMs !== undefined ? { durationMs: attempt.durationMs } : {}),\n node: waiting ? liveAttemptNode(node, attemptNode, detail.step.step) : attemptNode,\n };\n });\n },\n detailTabs: ({ node }) => {\n const tabs = [];\n const detail = readStepDetail(node.detail);\n if (detail.kind === \"step\" && detail.step.outputs !== undefined) {\n tabs.push({ id: \"outputs\", label: \"Outputs\", render: () => <StepOutputs outputs={detail.step.outputs} /> });\n }\n const source = readStepSource(node.detail);\n if (source.kind !== \"none\") {\n tabs.push({ id: \"source\", label: sourceTabLabel(source), render: () => <StepSourceSection result={source} /> });\n }\n return tabs;\n },\n copy: ({ node }) => fixtureCopy(node),\n };\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter, stepBadgeAdapter]);\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAS,gBAAgB,MAAqB;CAC5C,OAAO,KAAK,cAAc;AAC5B;AAEA,SAAS,cAAc,MAAoB;CACzC,IAAI,KAAK,QAAQ,OAAO;CACxB,IAAI,KAAK,QAAQ,OAAO;CACxB,OAAO;AACT;;AAGA,SAAS,cAAc,MAA0B;CAK/C,OAAO,EA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W,YAAY,IAAI;EAEa;EAAgB;EAAwB;CAAgB,CAAC;AAC9G"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapters.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAwF,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnI,OAAO,EAML,KAAK,IAAI,EAET,KAAK,uBAAuB,EAG7B,MAAM,gBAAgB,CAAC;AA2LxB;;gFAEgF;AAChF,MAAM,MAAM,0BAA0B,GAAG;IACvC,qFAAqF;IACrF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC7C;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC;CACjD,CAAC;AAaF,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,0BAA+B,GAAG,uBAAuB,
|
|
1
|
+
{"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapters.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAwF,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnI,OAAO,EAML,KAAK,IAAI,EAET,KAAK,uBAAuB,EAG7B,MAAM,gBAAgB,CAAC;AA2LxB;;gFAEgF;AAChF,MAAM,MAAM,0BAA0B,GAAG;IACvC,qFAAqF;IACrF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC7C;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC;CACjD,CAAC;AAaF,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,0BAA+B,GAAG,uBAAuB,CAwCtG"}
|
|
@@ -207,6 +207,7 @@ function verificationAdapters(options = {}) {
|
|
|
207
207
|
detail: { step: detail.step.step }
|
|
208
208
|
};
|
|
209
209
|
const waiting = node.waiting === true && index === live;
|
|
210
|
+
if (index === live && node.log !== void 0 && !node.running) attemptNode.log = node.log;
|
|
210
211
|
return {
|
|
211
212
|
id: attempt.attempt,
|
|
212
213
|
status: attempt.status,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapters.js","names":[],"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 type { ReactNode } from \"react\";\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport { StepOutputs, StepRowBadge, StepSourceSection } from \"./stepKindViews\";\nimport { verifyNodeTest } from \"./verifyReportTests\";\nimport { UiTerminal } from \"../../icons\";\nimport { hasStepDetail, readQuery, readStepDetail, stepFormState, stepKindCopy, stepQueryCopy, type WaitDetail } from \"./stepKind\";\nimport { readStepSource, sourceTabLabel, stepSourceCopy } from \"./stepSource\";\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\n// A typed step kind (services, todo, …) may report no command or CEL context at\n// all, so `detail.step` claims the node as well. A \"fixture\" leaf is a step whose\n// result has not arrived yet (a live or background step): it carries only the\n// execution node, which FixtureDetail renders as a header. Fixture parents\n// (markdown tables, runner steps) have children and stay with the default body.\nfunction isFixtureNode(node: Test): boolean {\n if (node.context !== undefined || hasStepDetail(node.detail)) return true;\n return node.framework === \"fixture\" && (node.children?.length ?? 0) === 0;\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 aborted: \"■\",\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 const stepDetail = readStepDetail(node.detail);\n const source = readStepSource(node.detail);\n const query = readQuery(node.detail);\n return {\n brief: [\n ...(query.kind === \"query\" ? stepQueryCopy(query.query) : commandSection(node, context)),\n ...assertionSection(node, context),\n ...(source.kind === \"source\" ? stepSourceCopy(source.source) : []),\n ...(stepDetail.kind === \"step\" ? stepKindCopy(stepDetail.step) : []),\n ...resultsSection(node),\n ],\n items: command ? [{ label: \"Copy command\", icon: UiTerminal, value: command }] : [],\n };\n}\n\n// gavel's FixtureResult.Type values plus \"fixture\" (a markdown table of rows)\n// and the typed step kinds. Table and runner-step parents carry no `context`,\n// so the fixture adapter never claims them; this copy-only adapter gives them\n// the same sections. \"playwright\" is also a test framework, so it counts as a\n// step only when the node carries `detail.step`.\nconst FIXTURE_STEP_FRAMEWORKS = new Set([\n \"exec\",\n \"query\",\n \"fixture\",\n \"test\",\n \"lint\",\n \"verify\",\n \"services\",\n \"todo\",\n \"todo_prompt\",\n \"ai\",\n \"browser\",\n \"playwright\",\n \"agent-browser\",\n]);\n\nfunction isFixtureStepNode(node: Test): boolean {\n const framework = node.framework ?? \"\";\n if (framework === \"playwright\") return hasStepDetail(node.detail);\n return FIXTURE_STEP_FRAMEWORKS.has(framework);\n}\n\nconst fixtureStepCopyAdapter: TestNodeAdapter = {\n id: \"verification-step-copy\",\n match: isFixtureStepNode,\n copy: ({ node }) => fixtureCopy(node),\n};\n\n// Claims only the rows it badges, so a host's own row decoration still wins for every other node.\nconst stepBadgeAdapter: TestNodeAdapter = {\n id: \"verification-step-badge\",\n match: (node) => node.waiting === true || stepFormState(node) !== undefined,\n renderRowLeading: ({ node }) => <StepRowBadge 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 type VerificationAdapterOptions = {\n /** Override the wait section while retaining the fixture's other detail sections. */\n renderWait?: (wait: WaitDetail) => ReactNode;\n /**\n * The answerable form of a step waiting on a person (`node.waiting`), shown in\n * its own section at the top of the step's detail. The host resolves which\n * pending prompt belongs to the node and answers it (e.g. with PromptForm).\n */\n renderPendingPrompt?: (node: Test) => ReactNode;\n};\n\n// The attempt a step is waiting in: it carries the step's name and task id (the\n// host finds the step's prompt by them) and `waiting`, and, when its result has\n// nothing marking it a fixture step, the step reference, so the fixture detail\n// (and its pending form) still renders it.\nfunction liveAttemptNode(step: Test, attempt: Test, ref: { id: string; kind: string }): Test {\n const live: Test = { ...attempt, name: step.name, ...(step.task_id !== undefined ? { task_id: step.task_id } : {}), waiting: true };\n if (isFixtureNode(live)) return live;\n // readStepDetail has already checked that an attempt result's detail is an object.\n return { ...live, detail: { ...(attempt.detail as Record<string, unknown> | undefined), step: ref } };\n}\n\nexport function verificationAdapters(options: VerificationAdapterOptions = {}): TestNodeAdapterRegistry {\n const fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} {...options} />,\n detailAttempts: ({ node }) => {\n const detail = readStepDetail(node.detail);\n if (detail.kind !== \"step\") return [];\n const live = detail.step.attempts.length - 1;\n return detail.step.attempts.map((attempt, index) => {\n const attemptNode: Test = attempt.result ? verifyNodeTest(attempt.result) : {\n name: node.name, message: `Attempt ${attempt.attempt}: execution evidence was not stored in this report.`,\n detail: { step: detail.step.step },\n };\n // The step waits in its last attempt; that one keeps the step's identity so the host finds its prompt.\n const waiting = node.waiting === true && index === live;\n return {\n id: attempt.attempt, status: attempt.status,\n ...(attempt.durationMs !== undefined ? { durationMs: attempt.durationMs } : {}),\n node: waiting ? liveAttemptNode(node, attemptNode, detail.step.step) : attemptNode,\n };\n });\n },\n detailTabs: ({ node }) => {\n const tabs = [];\n const detail = readStepDetail(node.detail);\n if (detail.kind === \"step\" && detail.step.outputs !== undefined) {\n tabs.push({ id: \"outputs\", label: \"Outputs\", render: () => <StepOutputs outputs={detail.step.outputs} /> });\n }\n const source = readStepSource(node.detail);\n if (source.kind !== \"none\") {\n tabs.push({ id: \"source\", label: sourceTabLabel(source), render: () => <StepSourceSection result={source} /> });\n }\n return tabs;\n },\n copy: ({ node }) => fixtureCopy(node),\n };\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter, stepBadgeAdapter]);\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAS,gBAAgB,MAAqB;CAC5C,OAAO,KAAK,cAAc;AAC5B;AAEA,SAAS,cAAc,MAAoB;CACzC,IAAI,KAAK,QAAQ,OAAO;CACxB,IAAI,KAAK,QAAQ,OAAO;CACxB,OAAO;AACT;;AAGA,SAAS,cAAc,MAA0B;CAK/C,OAAO,EAAE,OAAO,CAAC;EAAE,OAAO;EAAY,OAJxB,KAAK,YAAY,KAAK,SAAS,SAAS,IAAI,KAAK,WAAW,CAAC,IAAI,EAAA,CAC3D,KACjB,SAAS,KAAK,cAAc,IAAI,EAAE,GAAG,KAAK,OAAO,KAAK,UAAU,MAAM,KAAK,YAAY,IAE9C,CAAA,CAAM,KAAK,IAAI;CAAE,CAAC,EAAE;AAClE;AAEA,IAAM,mBAAoC;CACxC,IAAI;CACJ,OAAO;CACP,eAAe,EAAE,WAAW,oBAAC,iBAAD,EAAuB,KAAO,CAAA;CAC1D,OAAO,EAAE,WAAW,cAAc,IAAI;AACxC;AAOA,SAAS,cAAc,MAAqB;CAC1C,IAAI,KAAK,YAAY,KAAA,KAAa,cAAc,KAAK,MAAM,GAAG,OAAO;CACrE,OAAO,KAAK,cAAc,cAAc,KAAK,UAAU,UAAU,OAAO;AAC1E;AAIA,SAAS,aAAa,QAAqC;CACzD,IAAI,UAAU,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,MAAM,GAAG;EAClE,MAAM,QAAS,OAAmC;EAClD,IAAI,OAAO,UAAU,YAAY,MAAM,SAAS,GAAG,OAAO;CAC5D;AAEF;AAIA,SAAS,gBAAgB,YAAqB,OAAyB;CACrE,IAAI,UAAU,KAAA,GAAW,O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GACA,OAAO,EAAE,WAAW,YAAY,IAAI;EAEa;EAAgB;EAAwB;CAAgB,CAAC;AAC9G"}
|
|
1
|
+
{"version":3,"file":"adapters.js","names":[],"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 type { ReactNode } from \"react\";\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport { StepOutputs, StepRowBadge, StepSourceSection } from \"./stepKindViews\";\nimport { verifyNodeTest } from \"./verifyReportTests\";\nimport { UiTerminal } from \"../../icons\";\nimport { hasStepDetail, readQuery, readStepDetail, stepFormState, stepKindCopy, stepQueryCopy, type WaitDetail } from \"./stepKind\";\nimport { readStepSource, sourceTabLabel, stepSourceCopy } from \"./stepSource\";\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\n// A typed step kind (services, todo, …) may report no command or CEL context at\n// all, so `detail.step` claims the node as well. A \"fixture\" leaf is a step whose\n// result has not arrived yet (a live or background step): it carries only the\n// execution node, which FixtureDetail renders as a header. Fixture parents\n// (markdown tables, runner steps) have children and stay with the default body.\nfunction isFixtureNode(node: Test): boolean {\n if (node.context !== undefined || hasStepDetail(node.detail)) return true;\n return node.framework === \"fixture\" && (node.children?.length ?? 0) === 0;\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 aborted: \"■\",\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 const stepDetail = readStepDetail(node.detail);\n const source = readStepSource(node.detail);\n const query = readQuery(node.detail);\n return {\n brief: [\n ...(query.kind === \"query\" ? stepQueryCopy(query.query) : commandSection(node, context)),\n ...assertionSection(node, context),\n ...(source.kind === \"source\" ? stepSourceCopy(source.source) : []),\n ...(stepDetail.kind === \"step\" ? stepKindCopy(stepDetail.step) : []),\n ...resultsSection(node),\n ],\n items: command ? [{ label: \"Copy command\", icon: UiTerminal, value: command }] : [],\n };\n}\n\n// gavel's FixtureResult.Type values plus \"fixture\" (a markdown table of rows)\n// and the typed step kinds. Table and runner-step parents carry no `context`,\n// so the fixture adapter never claims them; this copy-only adapter gives them\n// the same sections. \"playwright\" is also a test framework, so it counts as a\n// step only when the node carries `detail.step`.\nconst FIXTURE_STEP_FRAMEWORKS = new Set([\n \"exec\",\n \"query\",\n \"fixture\",\n \"test\",\n \"lint\",\n \"verify\",\n \"services\",\n \"todo\",\n \"todo_prompt\",\n \"ai\",\n \"browser\",\n \"playwright\",\n \"agent-browser\",\n]);\n\nfunction isFixtureStepNode(node: Test): boolean {\n const framework = node.framework ?? \"\";\n if (framework === \"playwright\") return hasStepDetail(node.detail);\n return FIXTURE_STEP_FRAMEWORKS.has(framework);\n}\n\nconst fixtureStepCopyAdapter: TestNodeAdapter = {\n id: \"verification-step-copy\",\n match: isFixtureStepNode,\n copy: ({ node }) => fixtureCopy(node),\n};\n\n// Claims only the rows it badges, so a host's own row decoration still wins for every other node.\nconst stepBadgeAdapter: TestNodeAdapter = {\n id: \"verification-step-badge\",\n match: (node) => node.waiting === true || stepFormState(node) !== undefined,\n renderRowLeading: ({ node }) => <StepRowBadge 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 type VerificationAdapterOptions = {\n /** Override the wait section while retaining the fixture's other detail sections. */\n renderWait?: (wait: WaitDetail) => ReactNode;\n /**\n * The answerable form of a step waiting on a person (`node.waiting`), shown in\n * its own section at the top of the step's detail. The host resolves which\n * pending prompt belongs to the node and answers it (e.g. with PromptForm).\n */\n renderPendingPrompt?: (node: Test) => ReactNode;\n};\n\n// The attempt a step is waiting in: it carries the step's name and task id (the\n// host finds the step's prompt by them) and `waiting`, and, when its result has\n// nothing marking it a fixture step, the step reference, so the fixture detail\n// (and its pending form) still renders it.\nfunction liveAttemptNode(step: Test, attempt: Test, ref: { id: string; kind: string }): Test {\n const live: Test = { ...attempt, name: step.name, ...(step.task_id !== undefined ? { task_id: step.task_id } : {}), waiting: true };\n if (isFixtureNode(live)) return live;\n // readStepDetail has already checked that an attempt result's detail is an object.\n return { ...live, detail: { ...(attempt.detail as Record<string, unknown> | undefined), step: ref } };\n}\n\nexport function verificationAdapters(options: VerificationAdapterOptions = {}): TestNodeAdapterRegistry {\n const fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} {...options} />,\n detailAttempts: ({ node }) => {\n const detail = readStepDetail(node.detail);\n if (detail.kind !== \"step\") return [];\n const live = detail.step.attempts.length - 1;\n return detail.step.attempts.map((attempt, index) => {\n const attemptNode: Test = attempt.result ? verifyNodeTest(attempt.result) : {\n name: node.name, message: `Attempt ${attempt.attempt}: execution evidence was not stored in this report.`,\n detail: { step: detail.step.step },\n };\n // The step waits in its last attempt; that one keeps the step's identity so the host finds its prompt.\n const waiting = node.waiting === true && index === live;\n // A finished step's log is its last attempt's; a report's attempts carry none.\n if (index === live && node.log !== undefined && !node.running) attemptNode.log = node.log;\n return {\n id: attempt.attempt, status: attempt.status,\n ...(attempt.durationMs !== undefined ? { durationMs: attempt.durationMs } : {}),\n node: waiting ? liveAttemptNode(node, attemptNode, detail.step.step) : attemptNode,\n };\n });\n },\n detailTabs: ({ node }) => {\n const tabs = [];\n const detail = readStepDetail(node.detail);\n if (detail.kind === \"step\" && detail.step.outputs !== undefined) {\n tabs.push({ id: \"outputs\", label: \"Outputs\", render: () => <StepOutputs outputs={detail.step.outputs} /> });\n }\n const source = readStepSource(node.detail);\n if (source.kind !== \"none\") {\n tabs.push({ id: \"source\", label: sourceTabLabel(source), render: () => <StepSourceSection result={source} /> });\n }\n return tabs;\n },\n copy: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AE,WAAW,YAAY,IAAI;EAEa;EAAgB;EAAwB;CAAgB,CAAC;AAC9G"}
|
|
@@ -14,9 +14,9 @@ function detectMode() {
|
|
|
14
14
|
/** Resolve build + runtime version metadata. */
|
|
15
15
|
function getVersionInfo() {
|
|
16
16
|
return {
|
|
17
|
-
commit: read(() => "
|
|
18
|
-
tag: read(() => "clicky-ui@0.3.
|
|
19
|
-
date: read(() => "2026-11-
|
|
17
|
+
commit: read(() => "a3e6af33a", ""),
|
|
18
|
+
tag: read(() => "clicky-ui@0.3.72", ""),
|
|
19
|
+
date: read(() => "2026-11-23T21:59:31.803Z", ""),
|
|
20
20
|
dirty: read(() => true, false),
|
|
21
21
|
mode: detectMode()
|
|
22
22
|
};
|
|
@@ -14,9 +14,9 @@ function detectMode() {
|
|
|
14
14
|
/** Resolve build + runtime version metadata. */
|
|
15
15
|
function getVersionInfo() {
|
|
16
16
|
return {
|
|
17
|
-
commit: read(() => "
|
|
18
|
-
tag: read(() => "clicky-ui@0.3.
|
|
19
|
-
date: read(() => "2026-11-
|
|
17
|
+
commit: read(() => "a3e6af33a", ""),
|
|
18
|
+
tag: read(() => "clicky-ui@0.3.72", ""),
|
|
19
|
+
date: read(() => "2026-11-23T21:58:50.731Z", ""),
|
|
20
20
|
dirty: read(() => true, false),
|
|
21
21
|
mode: detectMode()
|
|
22
22
|
};
|
package/dist/data.cjs
CHANGED
|
@@ -710,16 +710,16 @@ const require_TimeseriesGauge = require("./data/TimeseriesGauge.cjs");
|
|
|
710
710
|
const require_ProgressBars = require("./data/ProgressBars.cjs");
|
|
711
711
|
const require_ProgressBars_model = require("./data/ProgressBars.model.cjs");
|
|
712
712
|
const require_TimeseriesCoreBars = require("./data/TimeseriesCoreBars.cjs");
|
|
713
|
+
const require_GaugeHoverCard = require("./data/GaugeHoverCard.cjs");
|
|
713
714
|
const require_ClickyExportDialog = require("./data/clicky-export/ClickyExportDialog.cjs");
|
|
714
715
|
const require_useClickyExport = require("./data/clicky-export/useClickyExport.cjs");
|
|
715
|
-
const require_GaugeHoverCard = require("./data/GaugeHoverCard.cjs");
|
|
716
716
|
const require_ServerTimingBadge = require("./data/ServerTimingBadge.cjs");
|
|
717
717
|
const require_server_timing = require("./data/server-timing.cjs");
|
|
718
718
|
const require_gauge_stats = require("./data/gauge-stats.cjs");
|
|
719
|
+
const require_WorkloadCard = require("./data/WorkloadCard.cjs");
|
|
719
720
|
const require_fixture_blocks = require("./data/FixtureEditor/fixture-blocks.cjs");
|
|
720
721
|
const require_FixtureEditor = require("./data/FixtureEditor/FixtureEditor.cjs");
|
|
721
722
|
const require_fixture_frontmatter = require("./data/FixtureEditor/fixture-frontmatter.cjs");
|
|
722
|
-
const require_WorkloadCard = require("./data/WorkloadCard.cjs");
|
|
723
723
|
const require_WorkloadPanel = require("./data/workload-panel/WorkloadPanel.cjs");
|
|
724
724
|
const require_MemoryStack = require("./data/workload-panel/MemoryStack.cjs");
|
|
725
725
|
const require_WorkloadCard_model = require("./data/WorkloadCard.model.cjs");
|
package/dist/data.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export { buildSchemaTree, buildSchemaViewerTree, buildStepBranchTree, hasHoverMe
|
|
|
39
39
|
export { Properties, type PropertiesAction, type PropertiesDensity, type PropertiesItem, type PropertiesProps, } from './data/Properties.js';
|
|
40
40
|
export { formatPropertyLabel } from './data/properties-utils.js';
|
|
41
41
|
export { LogViewer, type LogViewerProps } from './data/LogViewer.js';
|
|
42
|
-
export { parseLogSections, type LogSection } from './data/log-sections.js';
|
|
42
|
+
export { parseLogSections, type LogSection, type ParsedLog } from './data/log-sections.js';
|
|
43
43
|
export { LogsTable, type LogsTableInput, type LogsTableProps, type LogsTableRow, } from './data/LogsTable.js';
|
|
44
44
|
export { normalizeLogsTableRows } from './data/logs-normalize.js';
|
|
45
45
|
export { MatrixTable, type MatrixTableColumn, type MatrixTableGroupRow, type MatrixTableProps, type MatrixTableRow, } from './data/MatrixTable.js';
|
package/dist/data.d.ts.map
CHANGED
|
@@ -1 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B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,GAC3B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AACxI,YAAY,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,UAAU,EACV,UAAU,EACV,OAAO,EACP,SAAS,EACT,MAAM,EACN,WAAW,GACZ,MAAM,kBAAkB,CAAC;AAE1B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC"}
|
package/dist/data.js
CHANGED
|
@@ -709,16 +709,16 @@ import { TimeseriesGauge } from "./data/TimeseriesGauge.js";
|
|
|
709
709
|
import { ProgressBars } from "./data/ProgressBars.js";
|
|
710
710
|
import { deriveProgressBars } from "./data/ProgressBars.model.js";
|
|
711
711
|
import { TimeseriesCoreBars } from "./data/TimeseriesCoreBars.js";
|
|
712
|
+
import { GaugeHoverCard } from "./data/GaugeHoverCard.js";
|
|
712
713
|
import { ClickyExportDialog } from "./data/clicky-export/ClickyExportDialog.js";
|
|
713
714
|
import { useClickyExport } from "./data/clicky-export/useClickyExport.js";
|
|
714
|
-
import { GaugeHoverCard } from "./data/GaugeHoverCard.js";
|
|
715
715
|
import { ServerTimingBadge } from "./data/ServerTimingBadge.js";
|
|
716
716
|
import { formatServerTimingDuration, parseServerTiming, serverTimingCounterSummary, serverTimingMetricLabel } from "./data/server-timing.js";
|
|
717
717
|
import { seriesStats } from "./data/gauge-stats.js";
|
|
718
|
+
import { WorkloadCard } from "./data/WorkloadCard.js";
|
|
718
719
|
import { createChecklistMarkdown, createFenceMarkdown, fixtureFenceKind, fixtureFenceSchemaAliases, fixtureFenceSnippetInfo, parseFixtureYaml, resolveFixtureFenceSchema, schemaKeys, stringifyFixtureYaml } from "./data/FixtureEditor/fixture-blocks.js";
|
|
719
720
|
import { FixtureEditor } from "./data/FixtureEditor/FixtureEditor.js";
|
|
720
721
|
import { applyFixtureFrontmatterRaw, applyFixtureFrontmatterState, fixtureFrontmatterState, parseFixtureFrontmatter } from "./data/FixtureEditor/fixture-frontmatter.js";
|
|
721
|
-
import { WorkloadCard } from "./data/WorkloadCard.js";
|
|
722
722
|
import { WorkloadPanel } from "./data/workload-panel/WorkloadPanel.js";
|
|
723
723
|
import { WorkloadMemoryLegend, WorkloadMemoryStack } from "./data/workload-panel/MemoryStack.js";
|
|
724
724
|
import { formatReplicaCounts, workloadKindLabel, workloadStatusLabel, workloadStatusTone, workloadTypeLabel } from "./data/WorkloadCard.model.js";
|
package/dist/hooks/event-hub.cjs
CHANGED
|
@@ -21,6 +21,7 @@ var Sub = class {
|
|
|
21
21
|
routedHandlers = /* @__PURE__ */ new Map();
|
|
22
22
|
resubscribeTimer = null;
|
|
23
23
|
disposed = false;
|
|
24
|
+
cursor = "";
|
|
24
25
|
constructor(id, url, hooks) {
|
|
25
26
|
this.id = id;
|
|
26
27
|
this.url = url;
|
|
@@ -59,7 +60,7 @@ function dispatch(sub, name, event) {
|
|
|
59
60
|
* reload guard) is per hub, so two hubs never share a connection.
|
|
60
61
|
*/
|
|
61
62
|
function createEventHub(options = {}) {
|
|
62
|
-
const { url: hubUrl = DEFAULT_URL, buildId = null, onBuildMismatch = () => window.location.reload() } = options;
|
|
63
|
+
const { url: hubUrl = DEFAULT_URL, buildId = null, onBuildMismatch = () => window.location.reload(), resume = false } = options;
|
|
63
64
|
let real = null;
|
|
64
65
|
let connId = null;
|
|
65
66
|
let subCounter = 0;
|
|
@@ -100,7 +101,11 @@ function createEventHub(options = {}) {
|
|
|
100
101
|
headers: { "Content-Type": "application/json" },
|
|
101
102
|
body: JSON.stringify({
|
|
102
103
|
id: sub.id,
|
|
103
|
-
path: sub.url
|
|
104
|
+
path: sub.url,
|
|
105
|
+
...resume ? {
|
|
106
|
+
resume,
|
|
107
|
+
cursor: sub.cursor || void 0
|
|
108
|
+
} : {}
|
|
104
109
|
})
|
|
105
110
|
});
|
|
106
111
|
if (stale()) return;
|
|
@@ -172,6 +177,23 @@ function createEventHub(options = {}) {
|
|
|
172
177
|
if (!real || name === "open" || sub.disposed || sub.routedHandlers.has(eventName)) return;
|
|
173
178
|
const handler = (event) => {
|
|
174
179
|
const message = event;
|
|
180
|
+
if (resume) {
|
|
181
|
+
let frame;
|
|
182
|
+
try {
|
|
183
|
+
frame = JSON.parse(message.data);
|
|
184
|
+
if (typeof frame.data !== "string" || frame.cursor !== void 0 && typeof frame.cursor !== "string") throw new Error("expected data and an optional cursor");
|
|
185
|
+
} catch (error) {
|
|
186
|
+
failSub(sub, `malformed event: ${String(error)}`);
|
|
187
|
+
closeSub(sub);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (frame.cursor) sub.cursor = frame.cursor;
|
|
191
|
+
dispatch(sub, name, new MessageEvent(name, {
|
|
192
|
+
data: frame.data,
|
|
193
|
+
lastEventId: frame.cursor ?? ""
|
|
194
|
+
}));
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
175
197
|
dispatch(sub, name, new MessageEvent(name, {
|
|
176
198
|
data: message.data,
|
|
177
199
|
lastEventId: message.lastEventId
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-hub.cjs","names":[],"sources":["../../src/hooks/event-hub.ts"],"sourcesContent":["import type { EventSourceFactory, EventSourceLike } from \"./event-source\";\n\n// Browsers allow only six HTTP/1.1 connections per host, shared across every\n// tab. An app that opens one native EventSource per topic (list view, status\n// badge, detail pane, activity feed, ...) lets a second tab or a reload starve\n// ordinary fetches behind a queue that never drains.\n//\n// An event hub multiplexes every topic a tab opens onto a single real\n// connection to the server's events endpoint (`/api/events` by default): one\n// native EventSource, with each logical stream registered as a \"sub\"\n// (POST {url}/{conn}/subs, DELETE {url}/{conn}/subs/{id}) whose frames arrive\n// prefixed `<subId>/<name>`. Callers never see any of this — the factory\n// returned by createEventHub() hands back an EventSourceLike that behaves like\n// `new EventSource(url)` from their point of view, so it plugs straight into\n// `<EventSourceProvider value={...}>`.\n\nexport interface EventHubOptions {\n /** Server endpoint of the multiplexed stream. Defaults to `/api/events`. */\n url?: string;\n /**\n * The build id this page was served with. When the server's hello frame\n * reports a different build, `onBuildMismatch` fires once. `null`/absent\n * (tests, Storybook, a bare dev server with no backend in front of it)\n * means the hub never reloads.\n */\n buildId?: string | null;\n /** Called once on a build mismatch. Defaults to `window.location.reload()`. */\n onBuildMismatch?: () => void;\n}\n\nconst DEFAULT_URL = \"/api/events\";\n\n// How long an idle hub (no subs left) keeps the real connection open before\n// tearing it down — long enough to survive React StrictMode's mount → unmount\n// → mount churn and a component swap that closes one stream and immediately\n// opens its replacement.\nconst TEARDOWN_GRACE_MS = 1000;\n\n// Delay before re-subscribing after a sub's handler ends with a 2xx status\n// (server-side stream completed normally and can be re-opened), mirroring\n// native EventSource's own reconnect delay.\nconst RESUBSCRIBE_DELAY_MS = 1000;\n\nconst READY_STATE_CONNECTING = 0;\nconst READY_STATE_OPEN = 1;\nconst READY_STATE_CLOSED = 2;\n\ntype DomListener = EventListenerOrEventListenerObject;\n\nfunction invokeListener(listener: DomListener, event: Event): void {\n if (typeof listener === \"function\") listener(event);\n else listener.handleEvent(event);\n}\n\n// Sub is both the internal bookkeeping for one logical stream and the public\n// EventSourceLike handed back to the caller — there is no separate wrapper\n// object, so `readyState`/`url` always reflect live state.\nclass Sub implements EventSourceLike {\n readyState = READY_STATE_CONNECTING;\n onopen: ((ev: Event) => unknown) | null = null;\n onmessage: ((ev: MessageEvent) => unknown) | null = null;\n onerror: ((ev: Event) => unknown) | null = null;\n\n readonly listeners = new Map<string, Set<DomListener>>();\n // Real-connection listeners this sub has registered, keyed by the prefixed\n // event name (`${id}/${name}`), so close() can remove exactly what it added.\n readonly routedHandlers = new Map<string, (ev: Event) => void>();\n resubscribeTimer: ReturnType<typeof setTimeout> | null = null;\n disposed = false;\n\n constructor(\n readonly id: string,\n readonly url: string,\n private readonly hooks: { route(sub: Sub, name: string): void; close(sub: Sub): void },\n ) {}\n\n addEventListener(type: string, listener: DomListener): void {\n let set = this.listeners.get(type);\n if (!set) {\n set = new Set();\n this.listeners.set(type, set);\n }\n set.add(listener);\n this.hooks.route(this, type);\n }\n\n removeEventListener(type: string, listener: DomListener): void {\n this.listeners.get(type)?.delete(listener);\n }\n\n close(): void {\n this.hooks.close(this);\n }\n}\n\nfunction dispatch(sub: Sub, name: string, event: Event): void {\n // Snapshot the set so a listener that (un)registers listeners mid-dispatch\n // doesn't change who receives this frame.\n for (const listener of Array.from(sub.listeners.get(name) ?? [])) invokeListener(listener, event);\n // onmessage/onerror/onopen mirror native EventSource: each is just the\n // single-slot form of addEventListener('message'|'error'|'open', ...), so a\n // frame named \"error\" (server-sent) reaches both a registered\n // addEventListener('error', ...) and .onerror, exactly like the browser.\n if (name === \"message\") sub.onmessage?.(event as MessageEvent);\n if (name === \"error\") sub.onerror?.(event);\n if (name === \"open\") sub.onopen?.(event);\n}\n\n/**\n * Creates an `EventSourceFactory` that multiplexes every stream it opens over\n * one real connection to `options.url`. Each returned stream behaves like\n * `new EventSource(url)` to the caller: CONNECTING until the subscription is\n * live, dispatches 'open'/'message'/'error' (and any server-named event), and\n * auto-reconnects the way native EventSource does.\n *\n * All state (real connection, connection id, sub registry, teardown timer,\n * reload guard) is per hub, so two hubs never share a connection.\n */\nexport function createEventHub(options: EventHubOptions = {}): EventSourceFactory {\n const { url: hubUrl = DEFAULT_URL, buildId = null, onBuildMismatch = () => window.location.reload() } = options;\n\n let real: EventSourceLike | null = null;\n let connId: string | null = null;\n let subCounter = 0;\n const subs = new Map<string, Sub>();\n let teardownTimer: ReturnType<typeof setTimeout> | null = null;\n // Guards against a reload loop within one page load: once triggered, further\n // __hello frames (e.g. after the reload's own new connection reconnects\n // mid-flight) never trigger a second one.\n let reloadedForBuildMismatch = false;\n\n // A stale tab still serving an old bundle would otherwise keep working\n // against a server that has moved on — including racing the six-connection\n // cap this hub exists to close, since an old bundle may hold raw\n // EventSources of its own. When the server's hello reports a different build\n // than the one this page was served with, reload once to pick up the\n // current bundle.\n function maybeReloadForBuildMismatch(helloBuildId: string | undefined): void {\n if (reloadedForBuildMismatch) return;\n if (!helloBuildId || !buildId) return;\n if (helloBuildId === buildId) return;\n reloadedForBuildMismatch = true;\n onBuildMismatch();\n }\n\n // failSub ends a sub for good. Its error event is an ErrorEvent whose\n // `message` is what the server said (a __closed frame's `error`, or a refused\n // subscribe's `{\"error\"}` body), so a consumer can show the real reason; a\n // transport-style drop stays a bare Event, as native EventSource sends.\n function failSub(sub: Sub, message: string, context: { status?: number; cause?: unknown } = {}): void {\n sub.readyState = READY_STATE_CLOSED;\n dispatch(sub, \"error\", new ErrorEvent(\"error\", { message }));\n const status = context.status === undefined ? \"\" : ` (status ${context.status})`;\n const line = `[event-hub] ${sub.url} failed${status}: ${message}`;\n if (context.cause !== undefined) console.error(line, context.cause);\n else console.error(line);\n }\n\n async function refusedSubscribeMessage(res: Response): Promise<string> {\n const body = (await res.text()).trim();\n if (body === \"\") return `subscribe failed with status ${res.status} and no error message`;\n let error: unknown;\n try {\n error = (JSON.parse(body) as { error?: unknown }).error;\n } catch {\n // Not the hub's JSON error shape (e.g. a proxy's HTML/text page): show it verbatim.\n }\n return typeof error === \"string\" && error !== \"\" ? error : `subscribe failed with status ${res.status}: ${body}`;\n }\n\n async function postSub(sub: Sub): Promise<void> {\n const conn = connId;\n if (!conn || sub.disposed || sub.readyState === READY_STATE_CLOSED) return;\n // A response for a connection that has since dropped (or a sub that has\n // since failed) is stale: the next __hello re-subscribes on the live one.\n const stale = () => sub.disposed || conn !== connId || sub.readyState === READY_STATE_CLOSED;\n try {\n const res = await fetch(`${hubUrl}/${conn}/subs`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ id: sub.id, path: sub.url }),\n });\n if (stale()) return;\n if (res.status === 204) {\n sub.readyState = READY_STATE_OPEN;\n dispatch(sub, \"open\", new Event(\"open\"));\n return;\n }\n if (res.status === 404) return; // stale conn id; the next __hello retries\n const message = await refusedSubscribeMessage(res);\n if (stale()) return;\n failSub(sub, message, { status: res.status });\n } catch (err) {\n if (stale()) return;\n failSub(sub, `subscribe request failed: ${err instanceof Error ? err.message : String(err)}`, { cause: err });\n }\n }\n\n function onHello(event: MessageEvent): void {\n const payload = JSON.parse(event.data) as { conn: string; build?: string };\n connId = payload.conn;\n maybeReloadForBuildMismatch(payload.build);\n // A hello means every currently-active sub needs a fresh subscription: the\n // first hello of a brand-new connection, or a reconnect hello after a\n // drop, both start from a server side with no subs registered yet.\n for (const sub of subs.values()) {\n if (!sub.disposed) void postSub(sub);\n }\n }\n\n function onRealError(es: EventSourceLike): void {\n connId = null;\n for (const sub of subs.values()) {\n if (sub.disposed || sub.readyState === READY_STATE_CLOSED) continue;\n sub.readyState = READY_STATE_CONNECTING;\n dispatch(sub, \"error\", new Event(\"error\"));\n }\n // Native EventSource reconnects on its own after a transient error; the\n // next __hello re-subscribes everything and dispatches 'open' again. A\n // CLOSED source (non-200 or wrong Content-Type) never reconnects, so drop\n // it and open a replacement after a delay.\n if (es.readyState !== READY_STATE_CLOSED || real !== es) return;\n for (const sub of subs.values()) {\n for (const [eventName, handler] of sub.routedHandlers) es.removeEventListener(eventName, handler);\n sub.routedHandlers.clear();\n }\n es.onerror = null;\n real = null;\n setTimeout(() => {\n if (!real && subs.size > 0) ensureRealOpen();\n }, RESUBSCRIBE_DELAY_MS);\n }\n\n function ensureRealOpen(): EventSourceLike {\n if (real) {\n if (teardownTimer) {\n clearTimeout(teardownTimer);\n teardownTimer = null;\n }\n return real;\n }\n connId = null;\n const es = new EventSource(hubUrl);\n es.addEventListener(\"__hello\", (event) => onHello(event as MessageEvent));\n es.onerror = () => onRealError(es);\n real = es;\n routeActiveSubs();\n return es;\n }\n\n // routeActiveSubs binds every live sub's routing onto a freshly created real\n // connection (a replacement after a terminal error has none yet).\n function routeActiveSubs(): void {\n for (const sub of subs.values()) {\n if (sub.disposed) continue;\n routeName(sub, \"message\");\n for (const name of sub.listeners.keys()) routeName(sub, name);\n routeClosed(sub);\n }\n }\n\n const eventNameFor = (sub: Sub, name: string) => `${sub.id}/${name}`;\n\n // routeName registers, at most once per sub+name, a real-connection listener\n // that re-dispatches `${sub.id}/${name}` frames to this sub's own listeners.\n // \"open\" is synthetic (dispatched locally on subscribe/reconnect) and never\n // arrives on the wire, so it is never routed. A closed sub has no routing to\n // register: its real connection may already be torn down, and no frame for\n // it can arrive. With no real connection (awaiting a replacement after a\n // terminal error) routing is deferred to routeActiveSubs.\n function routeName(sub: Sub, name: string): void {\n const eventName = eventNameFor(sub, name);\n if (!real || name === \"open\" || sub.disposed || sub.routedHandlers.has(eventName)) return;\n const handler = (event: Event) => {\n const message = event as MessageEvent;\n dispatch(sub, name, new MessageEvent(name, { data: message.data, lastEventId: message.lastEventId }));\n };\n real.addEventListener(eventName, handler);\n sub.routedHandlers.set(eventName, handler);\n }\n\n // A sub's __closed frame is clicky sse hubClosed: {\"status\": int,\n // \"error\"?: string}, `error` being the handler's (≤500 byte) response body.\n function onSubClosed(sub: Sub, event: MessageEvent): void {\n if (sub.disposed) return;\n let payload: { status: number; error?: string };\n try {\n payload = JSON.parse(event.data) as { status: number; error?: string };\n } catch (err) {\n failSub(sub, `sub closed with a malformed __closed frame: ${String(event.data)}`, { cause: err });\n return;\n }\n if (payload.status >= 200 && payload.status < 300) {\n // The server-side handler ended on its own with a success status — the\n // same shape as a native stream simply reconnecting.\n sub.readyState = READY_STATE_CONNECTING;\n dispatch(sub, \"error\", new Event(\"error\"));\n sub.resubscribeTimer = setTimeout(() => {\n sub.resubscribeTimer = null;\n if (!sub.disposed) void postSub(sub);\n }, RESUBSCRIBE_DELAY_MS);\n return;\n }\n // http.Error bodies end in a newline; only trailing whitespace is dropped.\n const error = payload.error?.trimEnd() ?? \"\";\n failSub(sub, error !== \"\" ? error : `sub closed with status ${payload.status} and no error message`, {\n status: payload.status,\n });\n }\n\n // routeClosed wires the sub's terminal frame: unlike every other name, its\n // payload drives re-subscription rather than being handed to consumers.\n function routeClosed(sub: Sub): void {\n const eventName = eventNameFor(sub, \"__closed\");\n if (!real || sub.routedHandlers.has(eventName)) return;\n const handler = (event: Event) => onSubClosed(sub, event as MessageEvent);\n real.addEventListener(eventName, handler);\n sub.routedHandlers.set(eventName, handler);\n }\n\n function scheduleTeardownIfIdle(): void {\n if (subs.size > 0 || teardownTimer) return;\n teardownTimer = setTimeout(() => {\n teardownTimer = null;\n if (subs.size > 0) return; // something re-subscribed during the grace window\n real?.close();\n real = null;\n connId = null;\n }, TEARDOWN_GRACE_MS);\n }\n\n function closeSub(sub: Sub): void {\n if (sub.disposed) return;\n sub.disposed = true;\n sub.readyState = READY_STATE_CLOSED;\n if (sub.resubscribeTimer) {\n clearTimeout(sub.resubscribeTimer);\n sub.resubscribeTimer = null;\n }\n for (const [eventName, handler] of sub.routedHandlers) real?.removeEventListener(eventName, handler);\n sub.routedHandlers.clear();\n subs.delete(sub.id);\n\n const conn = connId;\n if (conn) {\n fetch(`${hubUrl}/${conn}/subs/${sub.id}`, { method: \"DELETE\" })\n .then((res) => {\n if (!res.ok && res.status !== 404) console.error(`[event-hub] unsubscribe failed for ${sub.url}: ${res.status}`);\n })\n .catch((err) => console.error(`[event-hub] unsubscribe request failed for ${sub.url}:`, err));\n }\n scheduleTeardownIfIdle();\n }\n\n const hooks = { route: routeName, close: closeSub };\n\n return (url) => {\n const sub = new Sub(`s${++subCounter}`, url, hooks);\n subs.set(sub.id, sub);\n ensureRealOpen();\n // Routing must be registered before the subscribe POST is sent: frames can\n // start arriving on the real connection as soon as the server accepts the\n // subscription, which can race the POST's own response.\n routeName(sub, \"message\");\n routeClosed(sub);\n if (connId) void postSub(sub);\n return sub;\n };\n}\n"],"mappings":";AA8BA,IAAM,cAAc;AAMpB,IAAM,oBAAoB;AAK1B,IAAM,uBAAuB;AAE7B,IAAM,yBAAyB;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C,CAAC,CACD,OAAO,QAAQ,QAAQ,MAAM,8CAA8C,IAAI,IAAI,IAAI,GAAG,CAAC;EAEhG,uBAAuB;CACzB;CAEA,MAAM,QAAQ;EAAE,OAAO;EAAW,OAAO;CAAS;CAElD,QAAQ,QAAQ;EACd,MAAM,MAAM,IAAI,IAAI,IAAI,EAAE,cAAc,KAAK,KAAK;EAClD,KAAK,IAAI,IAAI,IAAI,GAAG;EACpB,eAAe;EAIf,UAAU,KAAK,SAAS;EACxB,YAAY,GAAG;EACf,IAAI,QAAQ,QAAa,GAAG;EAC5B,OAAO;CACT;AACF"}
|
|
1
|
+
{"version":3,"file":"event-hub.cjs","names":[],"sources":["../../src/hooks/event-hub.ts"],"sourcesContent":["import type { EventSourceFactory, EventSourceLike } from \"./event-source\";\n\n// Browsers allow only six HTTP/1.1 connections per host, shared across every\n// tab. An app that opens one native EventSource per topic (list view, status\n// badge, detail pane, activity feed, ...) lets a second tab or a reload starve\n// ordinary fetches behind a queue that never drains.\n//\n// An event hub multiplexes every topic a tab opens onto a single real\n// connection to the server's events endpoint (`/api/events` by default): one\n// native EventSource, with each logical stream registered as a \"sub\"\n// (POST {url}/{conn}/subs, DELETE {url}/{conn}/subs/{id}) whose frames arrive\n// prefixed `<subId>/<name>`. Callers never see any of this — the factory\n// returned by createEventHub() hands back an EventSourceLike that behaves like\n// `new EventSource(url)` from their point of view, so it plugs straight into\n// `<EventSourceProvider value={...}>`.\n\nexport interface EventHubOptions {\n /** Server endpoint of the multiplexed stream. Defaults to `/api/events`. */\n url?: string;\n /**\n * The build id this page was served with. When the server's hello frame\n * reports a different build, `onBuildMismatch` fires once. `null`/absent\n * (tests, Storybook, a bare dev server with no backend in front of it)\n * means the hub never reloads.\n */\n buildId?: string | null;\n /** Called once on a build mismatch. Defaults to `window.location.reload()`. */\n onBuildMismatch?: () => void;\n /** Resume each logical stream using its own last event ID. */\n resume?: boolean;\n}\n\nconst DEFAULT_URL = \"/api/events\";\n\n// How long an idle hub (no subs left) keeps the real connection open before\n// tearing it down — long enough to survive React StrictMode's mount → unmount\n// → mount churn and a component swap that closes one stream and immediately\n// opens its replacement.\nconst TEARDOWN_GRACE_MS = 1000;\n\n// Delay before re-subscribing after a sub's handler ends with a 2xx status\n// (server-side stream completed normally and can be re-opened), mirroring\n// native EventSource's own reconnect delay.\nconst RESUBSCRIBE_DELAY_MS = 1000;\n\nconst READY_STATE_CONNECTING = 0;\nconst READY_STATE_OPEN = 1;\nconst READY_STATE_CLOSED = 2;\n\ntype DomListener = EventListenerOrEventListenerObject;\n\nfunction invokeListener(listener: DomListener, event: Event): void {\n if (typeof listener === \"function\") listener(event);\n else listener.handleEvent(event);\n}\n\n// Sub is both the internal bookkeeping for one logical stream and the public\n// EventSourceLike handed back to the caller — there is no separate wrapper\n// object, so `readyState`/`url` always reflect live state.\nclass Sub implements EventSourceLike {\n readyState = READY_STATE_CONNECTING;\n onopen: ((ev: Event) => unknown) | null = null;\n onmessage: ((ev: MessageEvent) => unknown) | null = null;\n onerror: ((ev: Event) => unknown) | null = null;\n\n readonly listeners = new Map<string, Set<DomListener>>();\n // Real-connection listeners this sub has registered, keyed by the prefixed\n // event name (`${id}/${name}`), so close() can remove exactly what it added.\n readonly routedHandlers = new Map<string, (ev: Event) => void>();\n resubscribeTimer: ReturnType<typeof setTimeout> | null = null;\n disposed = false;\n cursor = \"\";\n\n constructor(\n readonly id: string,\n readonly url: string,\n private readonly hooks: { route(sub: Sub, name: string): void; close(sub: Sub): void },\n ) {}\n\n addEventListener(type: string, listener: DomListener): void {\n let set = this.listeners.get(type);\n if (!set) {\n set = new Set();\n this.listeners.set(type, set);\n }\n set.add(listener);\n this.hooks.route(this, type);\n }\n\n removeEventListener(type: string, listener: DomListener): void {\n this.listeners.get(type)?.delete(listener);\n }\n\n close(): void {\n this.hooks.close(this);\n }\n}\n\nfunction dispatch(sub: Sub, name: string, event: Event): void {\n // Snapshot the set so a listener that (un)registers listeners mid-dispatch\n // doesn't change who receives this frame.\n for (const listener of Array.from(sub.listeners.get(name) ?? [])) invokeListener(listener, event);\n // onmessage/onerror/onopen mirror native EventSource: each is just the\n // single-slot form of addEventListener('message'|'error'|'open', ...), so a\n // frame named \"error\" (server-sent) reaches both a registered\n // addEventListener('error', ...) and .onerror, exactly like the browser.\n if (name === \"message\") sub.onmessage?.(event as MessageEvent);\n if (name === \"error\") sub.onerror?.(event);\n if (name === \"open\") sub.onopen?.(event);\n}\n\n/**\n * Creates an `EventSourceFactory` that multiplexes every stream it opens over\n * one real connection to `options.url`. Each returned stream behaves like\n * `new EventSource(url)` to the caller: CONNECTING until the subscription is\n * live, dispatches 'open'/'message'/'error' (and any server-named event), and\n * auto-reconnects the way native EventSource does.\n *\n * All state (real connection, connection id, sub registry, teardown timer,\n * reload guard) is per hub, so two hubs never share a connection.\n */\nexport function createEventHub(options: EventHubOptions = {}): EventSourceFactory {\n const { url: hubUrl = DEFAULT_URL, buildId = null, onBuildMismatch = () => window.location.reload(), resume = false } = options;\n\n let real: EventSourceLike | null = null;\n let connId: string | null = null;\n let subCounter = 0;\n const subs = new Map<string, Sub>();\n let teardownTimer: ReturnType<typeof setTimeout> | null = null;\n // Guards against a reload loop within one page load: once triggered, further\n // __hello frames (e.g. after the reload's own new connection reconnects\n // mid-flight) never trigger a second one.\n let reloadedForBuildMismatch = false;\n\n // A stale tab still serving an old bundle would otherwise keep working\n // against a server that has moved on — including racing the six-connection\n // cap this hub exists to close, since an old bundle may hold raw\n // EventSources of its own. When the server's hello reports a different build\n // than the one this page was served with, reload once to pick up the\n // current bundle.\n function maybeReloadForBuildMismatch(helloBuildId: string | undefined): void {\n if (reloadedForBuildMismatch) return;\n if (!helloBuildId || !buildId) return;\n if (helloBuildId === buildId) return;\n reloadedForBuildMismatch = true;\n onBuildMismatch();\n }\n\n // failSub ends a sub for good. Its error event is an ErrorEvent whose\n // `message` is what the server said (a __closed frame's `error`, or a refused\n // subscribe's `{\"error\"}` body), so a consumer can show the real reason; a\n // transport-style drop stays a bare Event, as native EventSource sends.\n function failSub(sub: Sub, message: string, context: { status?: number; cause?: unknown } = {}): void {\n sub.readyState = READY_STATE_CLOSED;\n dispatch(sub, \"error\", new ErrorEvent(\"error\", { message }));\n const status = context.status === undefined ? \"\" : ` (status ${context.status})`;\n const line = `[event-hub] ${sub.url} failed${status}: ${message}`;\n if (context.cause !== undefined) console.error(line, context.cause);\n else console.error(line);\n }\n\n async function refusedSubscribeMessage(res: Response): Promise<string> {\n const body = (await res.text()).trim();\n if (body === \"\") return `subscribe failed with status ${res.status} and no error message`;\n let error: unknown;\n try {\n error = (JSON.parse(body) as { error?: unknown }).error;\n } catch {\n // Not the hub's JSON error shape (e.g. a proxy's HTML/text page): show it verbatim.\n }\n return typeof error === \"string\" && error !== \"\" ? error : `subscribe failed with status ${res.status}: ${body}`;\n }\n\n async function postSub(sub: Sub): Promise<void> {\n const conn = connId;\n if (!conn || sub.disposed || sub.readyState === READY_STATE_CLOSED) return;\n // A response for a connection that has since dropped (or a sub that has\n // since failed) is stale: the next __hello re-subscribes on the live one.\n const stale = () => sub.disposed || conn !== connId || sub.readyState === READY_STATE_CLOSED;\n try {\n const res = await fetch(`${hubUrl}/${conn}/subs`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify({ id: sub.id, path: sub.url, ...(resume ? { resume, cursor: sub.cursor || undefined } : {}) }),\n });\n if (stale()) return;\n if (res.status === 204) {\n sub.readyState = READY_STATE_OPEN;\n dispatch(sub, \"open\", new Event(\"open\"));\n return;\n }\n if (res.status === 404) return; // stale conn id; the next __hello retries\n const message = await refusedSubscribeMessage(res);\n if (stale()) return;\n failSub(sub, message, { status: res.status });\n } catch (err) {\n if (stale()) return;\n failSub(sub, `subscribe request failed: ${err instanceof Error ? err.message : String(err)}`, { cause: err });\n }\n }\n\n function onHello(event: MessageEvent): void {\n const payload = JSON.parse(event.data) as { conn: string; build?: string };\n connId = payload.conn;\n maybeReloadForBuildMismatch(payload.build);\n // A hello means every currently-active sub needs a fresh subscription: the\n // first hello of a brand-new connection, or a reconnect hello after a\n // drop, both start from a server side with no subs registered yet.\n for (const sub of subs.values()) {\n if (!sub.disposed) void postSub(sub);\n }\n }\n\n function onRealError(es: EventSourceLike): void {\n connId = null;\n for (const sub of subs.values()) {\n if (sub.disposed || sub.readyState === READY_STATE_CLOSED) continue;\n sub.readyState = READY_STATE_CONNECTING;\n dispatch(sub, \"error\", new Event(\"error\"));\n }\n // Native EventSource reconnects on its own after a transient error; the\n // next __hello re-subscribes everything and dispatches 'open' again. A\n // CLOSED source (non-200 or wrong Content-Type) never reconnects, so drop\n // it and open a replacement after a delay.\n if (es.readyState !== READY_STATE_CLOSED || real !== es) return;\n for (const sub of subs.values()) {\n for (const [eventName, handler] of sub.routedHandlers) es.removeEventListener(eventName, handler);\n sub.routedHandlers.clear();\n }\n es.onerror = null;\n real = null;\n setTimeout(() => {\n if (!real && subs.size > 0) ensureRealOpen();\n }, RESUBSCRIBE_DELAY_MS);\n }\n\n function ensureRealOpen(): EventSourceLike {\n if (real) {\n if (teardownTimer) {\n clearTimeout(teardownTimer);\n teardownTimer = null;\n }\n return real;\n }\n connId = null;\n const es = new EventSource(hubUrl);\n es.addEventListener(\"__hello\", (event) => onHello(event as MessageEvent));\n es.onerror = () => onRealError(es);\n real = es;\n routeActiveSubs();\n return es;\n }\n\n // routeActiveSubs binds every live sub's routing onto a freshly created real\n // connection (a replacement after a terminal error has none yet).\n function routeActiveSubs(): void {\n for (const sub of subs.values()) {\n if (sub.disposed) continue;\n routeName(sub, \"message\");\n for (const name of sub.listeners.keys()) routeName(sub, name);\n routeClosed(sub);\n }\n }\n\n const eventNameFor = (sub: Sub, name: string) => `${sub.id}/${name}`;\n\n // routeName registers, at most once per sub+name, a real-connection listener\n // that re-dispatches `${sub.id}/${name}` frames to this sub's own listeners.\n // \"open\" is synthetic (dispatched locally on subscribe/reconnect) and never\n // arrives on the wire, so it is never routed. A closed sub has no routing to\n // register: its real connection may already be torn down, and no frame for\n // it can arrive. With no real connection (awaiting a replacement after a\n // terminal error) routing is deferred to routeActiveSubs.\n function routeName(sub: Sub, name: string): void {\n const eventName = eventNameFor(sub, name);\n if (!real || name === \"open\" || sub.disposed || sub.routedHandlers.has(eventName)) return;\n const handler = (event: Event) => {\n const message = event as MessageEvent;\n if (resume) {\n let frame: { data: string; cursor?: string };\n try {\n frame = JSON.parse(message.data) as typeof frame;\n if (typeof frame.data !== \"string\" || (frame.cursor !== undefined && typeof frame.cursor !== \"string\")) {\n throw new Error(\"expected data and an optional cursor\");\n }\n } catch (error) {\n failSub(sub, `malformed event: ${String(error)}`);\n closeSub(sub);\n return;\n }\n if (frame.cursor) sub.cursor = frame.cursor;\n dispatch(sub, name, new MessageEvent(name, { data: frame.data, lastEventId: frame.cursor ?? \"\" }));\n return;\n }\n dispatch(sub, name, new MessageEvent(name, { data: message.data, lastEventId: message.lastEventId }));\n };\n real.addEventListener(eventName, handler);\n sub.routedHandlers.set(eventName, handler);\n }\n\n // A sub's __closed frame is clicky sse hubClosed: {\"status\": int,\n // \"error\"?: string}, `error` being the handler's (≤500 byte) response body.\n function onSubClosed(sub: Sub, event: MessageEvent): void {\n if (sub.disposed) return;\n let payload: { status: number; error?: string };\n try {\n payload = JSON.parse(event.data) as { status: number; error?: string };\n } catch (err) {\n failSub(sub, `sub closed with a malformed __closed frame: ${String(event.data)}`, { cause: err });\n return;\n }\n if (payload.status >= 200 && payload.status < 300) {\n // The server-side handler ended on its own with a success status — the\n // same shape as a native stream simply reconnecting.\n sub.readyState = READY_STATE_CONNECTING;\n dispatch(sub, \"error\", new Event(\"error\"));\n sub.resubscribeTimer = setTimeout(() => {\n sub.resubscribeTimer = null;\n if (!sub.disposed) void postSub(sub);\n }, RESUBSCRIBE_DELAY_MS);\n return;\n }\n // http.Error bodies end in a newline; only trailing whitespace is dropped.\n const error = payload.error?.trimEnd() ?? \"\";\n failSub(sub, error !== \"\" ? error : `sub closed with status ${payload.status} and no error message`, {\n status: payload.status,\n });\n }\n\n // routeClosed wires the sub's terminal frame: unlike every other name, its\n // payload drives re-subscription rather than being handed to consumers.\n function routeClosed(sub: Sub): void {\n const eventName = eventNameFor(sub, \"__closed\");\n if (!real || sub.routedHandlers.has(eventName)) return;\n const handler = (event: Event) => onSubClosed(sub, event as MessageEvent);\n real.addEventListener(eventName, handler);\n sub.routedHandlers.set(eventName, handler);\n }\n\n function scheduleTeardownIfIdle(): void {\n if (subs.size > 0 || teardownTimer) return;\n teardownTimer = setTimeout(() => {\n teardownTimer = null;\n if (subs.size > 0) return; // something re-subscribed during the grace window\n real?.close();\n real = null;\n connId = null;\n }, TEARDOWN_GRACE_MS);\n }\n\n function closeSub(sub: Sub): void {\n if (sub.disposed) return;\n sub.disposed = true;\n sub.readyState = READY_STATE_CLOSED;\n if (sub.resubscribeTimer) {\n clearTimeout(sub.resubscribeTimer);\n sub.resubscribeTimer = null;\n }\n for (const [eventName, handler] of sub.routedHandlers) real?.removeEventListener(eventName, handler);\n sub.routedHandlers.clear();\n subs.delete(sub.id);\n\n const conn = connId;\n if (conn) {\n fetch(`${hubUrl}/${conn}/subs/${sub.id}`, { method: \"DELETE\" })\n .then((res) => {\n if (!res.ok && res.status !== 404) console.error(`[event-hub] unsubscribe failed for ${sub.url}: ${res.status}`);\n })\n .catch((err) => console.error(`[event-hub] unsubscribe request failed for ${sub.url}:`, err));\n }\n scheduleTeardownIfIdle();\n }\n\n const hooks = { route: routeName, close: closeSub };\n\n return (url) => {\n const sub = new Sub(`s${++subCounter}`, url, hooks);\n subs.set(sub.id, sub);\n ensureRealOpen();\n // Routing must be registered before the subscribe POST is sent: frames can\n // start arriving on the real connection as soon as the server accepts the\n // subscription, which can race the POST's own response.\n routeName(sub, \"message\");\n routeClosed(sub);\n if (connId) void postSub(sub);\n return sub;\n };\n}\n"],"mappings":";AAgCA,IAAM,cAAc;AAMpB,IAAM,oBAAoB;AAK1B,IAAM,uBAAuB;AAE7B,IAAM,yBAAyB;AAC/B,IAAM,mBAAmB;AACzB,IAAM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I,IAAI,UAAU;EAClB,IAAI,WAAW;EACf,IAAI,aAAa;EACjB,IAAI,IAAI,kBAAkB;GACxB,aAAa,IAAI,gBAAgB;GACjC,IAAI,mBAAmB;EACzB;EACA,KAAK,MAAM,CAAC,WAAW,YAAY,IAAI,gBAAgB,MAAM,oBAAoB,WAAW,OAAO;EACnG,IAAI,eAAe,MAAM;EACzB,KAAK,OAAO,IAAI,EAAE;EAElB,MAAM,OAAO;EACb,IAAI,MACF,MAAM,GAAG,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,EAAE,QAAQ,SAAS,CAAC,CAAC,CAC5D,MAAM,QAAQ;GACb,IAAI,CAAC,IAAI,MAAM,IAAI,WAAW,KAAK,QAAQ,MAAM,sCAAsC,IAAI,IAAI,IAAI,IAAI,QAAQ;EACjH,CAAC,CAAC,CACD,OAAO,QAAQ,QAAQ,MAAM,8CAA8C,IAAI,IAAI,IAAI,GAAG,CAAC;EAEhG,uBAAuB;CACzB;CAEA,MAAM,QAAQ;EAAE,OAAO;EAAW,OAAO;CAAS;CAElD,QAAQ,QAAQ;EACd,MAAM,MAAM,IAAI,IAAI,IAAI,EAAE,cAAc,KAAK,KAAK;EAClD,KAAK,IAAI,IAAI,IAAI,GAAG;EACpB,eAAe;EAIf,UAAU,KAAK,SAAS;EACxB,YAAY,GAAG;EACf,IAAI,QAAQ,QAAa,GAAG;EAC5B,OAAO;CACT;AACF"}
|
|
@@ -11,6 +11,8 @@ export interface EventHubOptions {
|
|
|
11
11
|
buildId?: string | null;
|
|
12
12
|
/** Called once on a build mismatch. Defaults to `window.location.reload()`. */
|
|
13
13
|
onBuildMismatch?: () => void;
|
|
14
|
+
/** Resume each logical stream using its own last event ID. */
|
|
15
|
+
resume?: boolean;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Creates an `EventSourceFactory` that multiplexes every stream it opens over
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-hub.d.ts","sourceRoot":"","sources":["../../src/hooks/event-hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,gBAAgB,CAAC;AAgB1E,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"event-hub.d.ts","sourceRoot":"","sources":["../../src/hooks/event-hub.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAmB,MAAM,gBAAgB,CAAC;AAgB1E,MAAM,WAAW,eAAe;IAC9B,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,+EAA+E;IAC/E,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAiFD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,eAAoB,GAAG,kBAAkB,CA0QhF"}
|
package/dist/hooks/event-hub.js
CHANGED
|
@@ -21,6 +21,7 @@ var Sub = class {
|
|
|
21
21
|
routedHandlers = /* @__PURE__ */ new Map();
|
|
22
22
|
resubscribeTimer = null;
|
|
23
23
|
disposed = false;
|
|
24
|
+
cursor = "";
|
|
24
25
|
constructor(id, url, hooks) {
|
|
25
26
|
this.id = id;
|
|
26
27
|
this.url = url;
|
|
@@ -59,7 +60,7 @@ function dispatch(sub, name, event) {
|
|
|
59
60
|
* reload guard) is per hub, so two hubs never share a connection.
|
|
60
61
|
*/
|
|
61
62
|
function createEventHub(options = {}) {
|
|
62
|
-
const { url: hubUrl = DEFAULT_URL, buildId = null, onBuildMismatch = () => window.location.reload() } = options;
|
|
63
|
+
const { url: hubUrl = DEFAULT_URL, buildId = null, onBuildMismatch = () => window.location.reload(), resume = false } = options;
|
|
63
64
|
let real = null;
|
|
64
65
|
let connId = null;
|
|
65
66
|
let subCounter = 0;
|
|
@@ -100,7 +101,11 @@ function createEventHub(options = {}) {
|
|
|
100
101
|
headers: { "Content-Type": "application/json" },
|
|
101
102
|
body: JSON.stringify({
|
|
102
103
|
id: sub.id,
|
|
103
|
-
path: sub.url
|
|
104
|
+
path: sub.url,
|
|
105
|
+
...resume ? {
|
|
106
|
+
resume,
|
|
107
|
+
cursor: sub.cursor || void 0
|
|
108
|
+
} : {}
|
|
104
109
|
})
|
|
105
110
|
});
|
|
106
111
|
if (stale()) return;
|
|
@@ -172,6 +177,23 @@ function createEventHub(options = {}) {
|
|
|
172
177
|
if (!real || name === "open" || sub.disposed || sub.routedHandlers.has(eventName)) return;
|
|
173
178
|
const handler = (event) => {
|
|
174
179
|
const message = event;
|
|
180
|
+
if (resume) {
|
|
181
|
+
let frame;
|
|
182
|
+
try {
|
|
183
|
+
frame = JSON.parse(message.data);
|
|
184
|
+
if (typeof frame.data !== "string" || frame.cursor !== void 0 && typeof frame.cursor !== "string") throw new Error("expected data and an optional cursor");
|
|
185
|
+
} catch (error) {
|
|
186
|
+
failSub(sub, `malformed event: ${String(error)}`);
|
|
187
|
+
closeSub(sub);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
if (frame.cursor) sub.cursor = frame.cursor;
|
|
191
|
+
dispatch(sub, name, new MessageEvent(name, {
|
|
192
|
+
data: frame.data,
|
|
193
|
+
lastEventId: frame.cursor ?? ""
|
|
194
|
+
}));
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
175
197
|
dispatch(sub, name, new MessageEvent(name, {
|
|
176
198
|
data: message.data,
|
|
177
199
|
lastEventId: message.lastEventId
|