@stigmer/react 3.0.9-dev.20260615153829 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/execution/ApprovalCard.d.ts +47 -3
- package/execution/ApprovalCard.d.ts.map +1 -1
- package/execution/ApprovalCard.js +138 -70
- package/execution/ApprovalCard.js.map +1 -1
- package/execution/ApprovalContext.d.ts +72 -0
- package/execution/ApprovalContext.d.ts.map +1 -0
- package/execution/ApprovalContext.js +41 -0
- package/execution/ApprovalContext.js.map +1 -0
- package/execution/ArtifactCard.d.ts.map +1 -1
- package/execution/ArtifactCard.js +3 -1
- package/execution/ArtifactCard.js.map +1 -1
- package/execution/ArtifactPreviewModal.d.ts.map +1 -1
- package/execution/ArtifactPreviewModal.js +5 -3
- package/execution/ArtifactPreviewModal.js.map +1 -1
- package/execution/EmptyChangeNotice.d.ts +38 -0
- package/execution/EmptyChangeNotice.d.ts.map +1 -0
- package/execution/EmptyChangeNotice.js +27 -0
- package/execution/EmptyChangeNotice.js.map +1 -0
- package/execution/FileChangesView.d.ts +81 -0
- package/execution/FileChangesView.d.ts.map +1 -0
- package/execution/FileChangesView.js +164 -0
- package/execution/FileChangesView.js.map +1 -0
- package/execution/FilePathLink.d.ts +24 -4
- package/execution/FilePathLink.d.ts.map +1 -1
- package/execution/FilePathLink.js +31 -9
- package/execution/FilePathLink.js.map +1 -1
- package/execution/FileReviewCard.d.ts +111 -0
- package/execution/FileReviewCard.d.ts.map +1 -0
- package/execution/FileReviewCard.js +558 -0
- package/execution/FileReviewCard.js.map +1 -0
- package/execution/FileReviewContext.d.ts +35 -0
- package/execution/FileReviewContext.d.ts.map +1 -0
- package/execution/FileReviewContext.js +23 -0
- package/execution/FileReviewContext.js.map +1 -0
- package/execution/FileReviewDock.d.ts +73 -0
- package/execution/FileReviewDock.d.ts.map +1 -0
- package/execution/FileReviewDock.js +65 -0
- package/execution/FileReviewDock.js.map +1 -0
- package/execution/McpToolDetail.d.ts.map +1 -1
- package/execution/McpToolDetail.js +38 -5
- package/execution/McpToolDetail.js.map +1 -1
- package/execution/MessageThread.d.ts +42 -3
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +263 -18
- package/execution/MessageThread.js.map +1 -1
- package/execution/PlanArtifactCard.d.ts.map +1 -1
- package/execution/PlanArtifactCard.js +3 -1
- package/execution/PlanArtifactCard.js.map +1 -1
- package/execution/PlanCompletionCard.d.ts +1 -1
- package/execution/PlanCompletionCard.js +1 -1
- package/execution/ResultView.d.ts +19 -1
- package/execution/ResultView.d.ts.map +1 -1
- package/execution/ResultView.js +141 -40
- package/execution/ResultView.js.map +1 -1
- package/execution/SubAgentSection.d.ts.map +1 -1
- package/execution/SubAgentSection.js +45 -6
- package/execution/SubAgentSection.js.map +1 -1
- package/execution/TerminalSession.d.ts +34 -0
- package/execution/TerminalSession.d.ts.map +1 -0
- package/execution/TerminalSession.js +34 -0
- package/execution/TerminalSession.js.map +1 -0
- package/execution/TodoCard.d.ts +53 -0
- package/execution/TodoCard.d.ts.map +1 -0
- package/execution/TodoCard.js +77 -0
- package/execution/TodoCard.js.map +1 -0
- package/execution/ToolArgsView.d.ts +7 -1
- package/execution/ToolArgsView.d.ts.map +1 -1
- package/execution/ToolArgsView.js +10 -9
- package/execution/ToolArgsView.js.map +1 -1
- package/execution/ToolCallDetail.d.ts +10 -1
- package/execution/ToolCallDetail.d.ts.map +1 -1
- package/execution/ToolCallDetail.js +66 -19
- package/execution/ToolCallDetail.js.map +1 -1
- package/execution/ToolCallGroup.d.ts +28 -18
- package/execution/ToolCallGroup.d.ts.map +1 -1
- package/execution/ToolCallGroup.js +39 -148
- package/execution/ToolCallGroup.js.map +1 -1
- package/execution/ToolCallItem.d.ts +36 -8
- package/execution/ToolCallItem.d.ts.map +1 -1
- package/execution/ToolCallItem.js +140 -21
- package/execution/ToolCallItem.js.map +1 -1
- package/execution/ToolRunGroup.d.ts +48 -0
- package/execution/ToolRunGroup.d.ts.map +1 -0
- package/execution/ToolRunGroup.js +168 -0
- package/execution/ToolRunGroup.js.map +1 -0
- package/execution/approval-provenance.d.ts +2 -0
- package/execution/approval-provenance.d.ts.map +1 -0
- package/execution/approval-provenance.js +6 -0
- package/execution/approval-provenance.js.map +1 -0
- package/execution/artifact-utils.d.ts +0 -10
- package/execution/artifact-utils.d.ts.map +1 -1
- package/execution/artifact-utils.js +0 -17
- package/execution/artifact-utils.js.map +1 -1
- package/execution/execution-phases.d.ts +1 -6
- package/execution/execution-phases.d.ts.map +1 -1
- package/execution/execution-phases.js +4 -14
- package/execution/execution-phases.js.map +1 -1
- package/execution/file-path-resolver.d.ts +28 -0
- package/execution/file-path-resolver.d.ts.map +1 -1
- package/execution/file-path-resolver.js +24 -0
- package/execution/file-path-resolver.js.map +1 -1
- package/execution/file-review-status.d.ts +127 -0
- package/execution/file-review-status.d.ts.map +1 -0
- package/execution/file-review-status.js +135 -0
- package/execution/file-review-status.js.map +1 -0
- package/execution/index.d.ts +39 -5
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +23 -3
- package/execution/index.js.map +1 -1
- package/execution/segment-tool-calls.d.ts +46 -0
- package/execution/segment-tool-calls.d.ts.map +1 -0
- package/execution/segment-tool-calls.js +71 -0
- package/execution/segment-tool-calls.js.map +1 -0
- package/execution/tool-categories.d.ts +62 -1
- package/execution/tool-categories.d.ts.map +1 -1
- package/execution/tool-categories.js +96 -2
- package/execution/tool-categories.js.map +1 -1
- package/execution/tool-presenter.d.ts +38 -2
- package/execution/tool-presenter.d.ts.map +1 -1
- package/execution/tool-presenter.js +23 -1
- package/execution/tool-presenter.js.map +1 -1
- package/execution/tool-rendering-primitives.d.ts.map +1 -1
- package/execution/tool-rendering-primitives.js +3 -2
- package/execution/tool-rendering-primitives.js.map +1 -1
- package/execution/useArtifactDownload.d.ts +44 -0
- package/execution/useArtifactDownload.d.ts.map +1 -0
- package/execution/useArtifactDownload.js +80 -0
- package/execution/useArtifactDownload.js.map +1 -0
- package/execution/useArtifactDownloadUrl.d.ts +67 -0
- package/execution/useArtifactDownloadUrl.d.ts.map +1 -0
- package/execution/useArtifactDownloadUrl.js +59 -0
- package/execution/useArtifactDownloadUrl.js.map +1 -0
- package/execution/useFileChangeContent.d.ts +61 -0
- package/execution/useFileChangeContent.d.ts.map +1 -0
- package/execution/useFileChangeContent.js +89 -0
- package/execution/useFileChangeContent.js.map +1 -0
- package/execution/useFileReview.d.ts +89 -0
- package/execution/useFileReview.d.ts.map +1 -0
- package/execution/useFileReview.js +106 -0
- package/execution/useFileReview.js.map +1 -0
- package/execution/useSubmitApproval.d.ts +17 -2
- package/execution/useSubmitApproval.d.ts.map +1 -1
- package/execution/useSubmitApproval.js +27 -23
- package/execution/useSubmitApproval.js.map +1 -1
- package/execution/useToolOutputContent.d.ts +44 -0
- package/execution/useToolOutputContent.d.ts.map +1 -0
- package/execution/useToolOutputContent.js +31 -0
- package/execution/useToolOutputContent.js.map +1 -0
- package/index.d.ts +6 -6
- package/index.d.ts.map +1 -1
- package/index.js +3 -3
- package/index.js.map +1 -1
- package/internal/ApprovalPeekBar.d.ts +23 -0
- package/internal/ApprovalPeekBar.d.ts.map +1 -0
- package/internal/ApprovalPeekBar.js +25 -0
- package/internal/ApprovalPeekBar.js.map +1 -0
- package/internal/BoundedContent.d.ts +49 -0
- package/internal/BoundedContent.d.ts.map +1 -0
- package/internal/BoundedContent.js +50 -0
- package/internal/BoundedContent.js.map +1 -0
- package/internal/DecisionButton.d.ts +47 -0
- package/internal/DecisionButton.d.ts.map +1 -0
- package/internal/DecisionButton.js +42 -0
- package/internal/DecisionButton.js.map +1 -0
- package/internal/InCardDecisionError.d.ts +31 -0
- package/internal/InCardDecisionError.d.ts.map +1 -0
- package/internal/InCardDecisionError.js +23 -0
- package/internal/InCardDecisionError.js.map +1 -0
- package/internal/RevealToggle.d.ts +36 -0
- package/internal/RevealToggle.d.ts.map +1 -0
- package/internal/RevealToggle.js +32 -0
- package/internal/RevealToggle.js.map +1 -0
- package/internal/VirtualizedThread.d.ts +7 -1
- package/internal/VirtualizedThread.d.ts.map +1 -1
- package/internal/VirtualizedThread.js +7 -3
- package/internal/VirtualizedThread.js.map +1 -1
- package/internal/code-highlight.d.ts +24 -0
- package/internal/code-highlight.d.ts.map +1 -0
- package/internal/code-highlight.js +115 -0
- package/internal/code-highlight.js.map +1 -0
- package/internal/markdown-components.d.ts.map +1 -1
- package/internal/markdown-components.js +13 -2
- package/internal/markdown-components.js.map +1 -1
- package/internal/useAutoDisclosure.d.ts +34 -0
- package/internal/useAutoDisclosure.d.ts.map +1 -0
- package/internal/useAutoDisclosure.js +53 -0
- package/internal/useAutoDisclosure.js.map +1 -0
- package/internal/useElapsedSince.d.ts +30 -0
- package/internal/useElapsedSince.d.ts.map +1 -0
- package/internal/useElapsedSince.js +70 -0
- package/internal/useElapsedSince.js.map +1 -0
- package/internal/useIsOverflowing.d.ts +30 -0
- package/internal/useIsOverflowing.d.ts.map +1 -0
- package/internal/useIsOverflowing.js +47 -0
- package/internal/useIsOverflowing.js.map +1 -0
- package/internal/useIsTextTruncated.d.ts +24 -0
- package/internal/useIsTextTruncated.d.ts.map +1 -0
- package/internal/useIsTextTruncated.js +41 -0
- package/internal/useIsTextTruncated.js.map +1 -0
- package/internal/useKeyedSubmission.d.ts +49 -0
- package/internal/useKeyedSubmission.d.ts.map +1 -0
- package/internal/useKeyedSubmission.js +67 -0
- package/internal/useKeyedSubmission.js.map +1 -0
- package/package.json +7 -4
- package/session/SessionViewer.d.ts +2 -2
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +10 -4
- package/session/SessionViewer.js.map +1 -1
- package/session/index.d.ts +2 -0
- package/session/index.d.ts.map +1 -1
- package/session/index.js +1 -0
- package/session/index.js.map +1 -1
- package/session/inspector/ChangesTab.d.ts +8 -5
- package/session/inspector/ChangesTab.d.ts.map +1 -1
- package/session/inspector/ChangesTab.js +11 -8
- package/session/inspector/ChangesTab.js.map +1 -1
- package/session/inspector/SessionInspector.d.ts +4 -4
- package/session/inspector/SessionInspector.d.ts.map +1 -1
- package/session/inspector/SessionInspector.js +4 -4
- package/session/inspector/SessionInspector.js.map +1 -1
- package/session/inspector/index.d.ts +0 -2
- package/session/inspector/index.d.ts.map +1 -1
- package/session/inspector/index.js +0 -1
- package/session/inspector/index.js.map +1 -1
- package/session/inspector/useSessionInspector.d.ts +8 -4
- package/session/inspector/useSessionInspector.d.ts.map +1 -1
- package/session/inspector/useSessionInspector.js +27 -20
- package/session/inspector/useSessionInspector.js.map +1 -1
- package/session/useSessionConversation.d.ts +37 -3
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +18 -2
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionFileChanges.d.ts +74 -0
- package/session/useSessionFileChanges.d.ts.map +1 -0
- package/session/useSessionFileChanges.js +178 -0
- package/session/useSessionFileChanges.js.map +1 -0
- package/src/__tests__/styles-border-layer-invariant.test.ts +105 -0
- package/src/execution/ApprovalCard.tsx +368 -230
- package/src/execution/ApprovalContext.ts +109 -0
- package/src/execution/ArtifactCard.tsx +10 -6
- package/src/execution/ArtifactPreviewModal.tsx +12 -6
- package/src/execution/EmptyChangeNotice.tsx +62 -0
- package/src/execution/FileChangesView.tsx +383 -0
- package/src/execution/FilePathLink.tsx +65 -12
- package/src/execution/FileReviewCard.tsx +1118 -0
- package/src/execution/FileReviewContext.ts +53 -0
- package/src/execution/FileReviewDock.tsx +157 -0
- package/src/execution/McpToolDetail.tsx +98 -32
- package/src/execution/MessageThread.tsx +374 -9
- package/src/execution/PlanArtifactCard.tsx +9 -6
- package/src/execution/PlanCompletionCard.tsx +1 -1
- package/src/execution/ResultView.tsx +333 -162
- package/src/execution/SubAgentSection.tsx +58 -11
- package/src/execution/TerminalSession.tsx +91 -0
- package/src/execution/TodoCard.tsx +186 -0
- package/src/execution/ToolArgsView.tsx +28 -17
- package/src/execution/ToolCallDetail.tsx +137 -26
- package/src/execution/ToolCallGroup.tsx +68 -296
- package/src/execution/ToolCallItem.tsx +265 -67
- package/src/execution/ToolRunGroup.tsx +302 -0
- package/src/execution/__tests__/ApprovalCard.test.tsx +395 -5
- package/src/execution/__tests__/ArtifactContentRenderer.test.tsx +15 -0
- package/src/execution/__tests__/ArtifactPreviewModal.test.tsx +0 -1
- package/src/execution/__tests__/EmptyChangeNotice.test.tsx +24 -0
- package/src/execution/__tests__/FileChangesView.test.tsx +296 -0
- package/src/execution/__tests__/FilePathLink.test.tsx +92 -0
- package/src/execution/__tests__/FileReviewCard.test.tsx +1044 -0
- package/src/execution/__tests__/FileReviewDock.test.tsx +134 -0
- package/src/execution/__tests__/McpToolDetail.test.tsx +79 -0
- package/src/execution/__tests__/MessageThread.test.tsx +324 -0
- package/src/execution/__tests__/PlanArtifactCard.test.tsx +37 -16
- package/src/execution/__tests__/ResultView.test.tsx +280 -2
- package/src/execution/__tests__/SubAgentSection.test.tsx +180 -0
- package/src/execution/__tests__/TerminalSession.test.tsx +72 -0
- package/src/execution/__tests__/TodoCard.test.tsx +102 -0
- package/src/execution/__tests__/ToolArgsView.test.tsx +48 -0
- package/src/execution/__tests__/ToolCallDetail.test.tsx +195 -0
- package/src/execution/__tests__/ToolCallGroup.test.tsx +132 -0
- package/src/execution/__tests__/ToolCallItem.test.tsx +521 -0
- package/src/execution/__tests__/ToolRunGroup.test.tsx +137 -0
- package/src/execution/__tests__/blanked-narration.test.tsx +149 -0
- package/src/execution/__tests__/buildThreadItems-approvals.test.ts +304 -0
- package/src/execution/__tests__/buildThreadItems-file-review.test.ts +331 -0
- package/src/execution/__tests__/file-path-resolver.test.ts +44 -0
- package/src/execution/__tests__/file-review-status.test.ts +343 -0
- package/src/execution/__tests__/message-entry.test.tsx +16 -0
- package/src/execution/__tests__/segment-tool-calls.test.ts +124 -0
- package/src/execution/__tests__/subagent-file-review-badge.test.tsx +273 -0
- package/src/execution/__tests__/thread-keys.test.ts +195 -0
- package/src/execution/__tests__/tool-presenter.test.tsx +95 -0
- package/src/execution/__tests__/useArtifactDownload.test.tsx +67 -0
- package/src/execution/__tests__/useArtifactDownloadUrl.test.tsx +51 -0
- package/src/execution/__tests__/useFileChangeContent.test.tsx +240 -0
- package/src/execution/__tests__/useFileReview.test.tsx +236 -0
- package/src/execution/__tests__/useSubmitApproval.test.tsx +165 -0
- package/src/execution/__tests__/useToolOutputContent.test.tsx +82 -0
- package/src/execution/approval-provenance.ts +8 -0
- package/src/execution/artifact-utils.ts +0 -18
- package/src/execution/execution-phases.ts +4 -16
- package/src/execution/file-path-resolver.ts +38 -0
- package/src/execution/file-review-status.ts +219 -0
- package/src/execution/index.ts +84 -4
- package/src/execution/segment-tool-calls.ts +101 -0
- package/src/execution/tool-categories.ts +128 -1
- package/src/execution/tool-presenter.ts +58 -3
- package/src/execution/tool-rendering-primitives.tsx +11 -14
- package/src/execution/useArtifactDownload.ts +109 -0
- package/src/execution/useArtifactDownloadUrl.ts +116 -0
- package/src/execution/useFileChangeContent.ts +149 -0
- package/src/execution/useFileReview.ts +197 -0
- package/src/execution/useSubmitApproval.ts +49 -27
- package/src/execution/useToolOutputContent.ts +70 -0
- package/src/index.ts +60 -1
- package/src/internal/ApprovalPeekBar.tsx +73 -0
- package/src/internal/BoundedContent.tsx +97 -0
- package/src/internal/DecisionButton.tsx +127 -0
- package/src/internal/InCardDecisionError.tsx +47 -0
- package/src/internal/RevealToggle.tsx +91 -0
- package/src/internal/VirtualizedThread.tsx +28 -2
- package/src/internal/__tests__/ApprovalPeekBar.test.tsx +34 -0
- package/src/internal/__tests__/BoundedContent.test.tsx +92 -0
- package/src/internal/__tests__/DecisionButton.test.tsx +107 -0
- package/src/internal/__tests__/RevealToggle.test.tsx +61 -0
- package/src/internal/__tests__/code-highlight.test.tsx +59 -0
- package/src/internal/__tests__/markdown-components.test.tsx +68 -2
- package/src/internal/__tests__/useAutoDisclosure.test.ts +74 -0
- package/src/internal/__tests__/useElapsedSince.test.tsx +68 -0
- package/src/internal/__tests__/useIsOverflowing.test.ts +36 -0
- package/src/internal/__tests__/useKeyedSubmission.test.tsx +126 -0
- package/src/internal/code-highlight.tsx +120 -0
- package/src/internal/markdown-components.tsx +20 -3
- package/src/internal/useAutoDisclosure.ts +58 -0
- package/src/internal/useElapsedSince.ts +72 -0
- package/src/internal/useIsOverflowing.ts +61 -0
- package/src/internal/useIsTextTruncated.ts +55 -0
- package/src/internal/useKeyedSubmission.ts +101 -0
- package/src/session/SessionViewer.tsx +21 -4
- package/src/session/__tests__/SessionViewer-fileReviewDock.test.tsx +198 -0
- package/src/session/__tests__/audienceWiring.test.tsx +4 -0
- package/src/session/__tests__/useSessionFileChanges.test.ts +303 -0
- package/src/session/index.ts +3 -0
- package/src/session/inspector/ChangesTab.tsx +20 -17
- package/src/session/inspector/SessionInspector.tsx +12 -10
- package/src/session/inspector/__tests__/ArtifactsTab.test.tsx +0 -1
- package/src/session/inspector/__tests__/ChangesTab.test.tsx +38 -0
- package/src/session/inspector/__tests__/useSessionInspector.test.ts +46 -61
- package/src/session/inspector/index.ts +0 -3
- package/src/session/inspector/useSessionInspector.ts +27 -20
- package/src/session/useSessionConversation.ts +80 -3
- package/src/session/useSessionFileChanges.ts +207 -0
- package/src/styles.css +123 -10
- package/src/version-history/DiffViewer.tsx +10 -7
- package/src/version-history/UnifiedDiffView.tsx +66 -0
- package/src/version-history/__tests__/DiffViewer.test.tsx +57 -0
- package/src/version-history/__tests__/UnifiedDiffView.test.tsx +50 -0
- package/src/version-history/__tests__/computeDiff.test.ts +35 -0
- package/src/version-history/__tests__/parseUnifiedDiff.test.ts +82 -0
- package/src/version-history/computeDiff.ts +6 -37
- package/src/version-history/diff-hunks.ts +63 -0
- package/src/version-history/index.ts +1 -0
- package/src/version-history/parseUnifiedDiff.ts +34 -0
- package/src/workflow/WorkflowExecutionApprovalCard.tsx +49 -24
- package/src/workflow/WorkflowExecutionTimeline.tsx +15 -4
- package/src/workflow/WorkflowExecutionTimelineEvent.tsx +8 -3
- package/src/workflow/WorkflowExecutionViewer.tsx +72 -28
- package/src/workflow/WorkflowFileReviewList.tsx +152 -0
- package/src/workflow/WorkflowTaskApprovalCard.tsx +37 -85
- package/src/workflow/__tests__/ExecutionInspector.test.tsx +30 -2
- package/src/workflow/__tests__/WorkflowExecutionApprovalCard.test.tsx +129 -0
- package/src/workflow/__tests__/WorkflowFileReviewList.test.tsx +129 -0
- package/src/workflow/__tests__/WorkflowTaskApprovalCard.test.tsx +43 -11
- package/src/workflow/__tests__/useWorkflowExecutionActions.test.tsx +276 -0
- package/src/workflow/execution-inspector/ExecutionInspector.tsx +42 -18
- package/src/workflow/index.ts +5 -0
- package/src/workflow/useWorkflowExecutionActions.ts +177 -29
- package/styles.css +1 -1
- package/version-history/DiffViewer.d.ts.map +1 -1
- package/version-history/DiffViewer.js +9 -3
- package/version-history/DiffViewer.js.map +1 -1
- package/version-history/UnifiedDiffView.d.ts +29 -0
- package/version-history/UnifiedDiffView.d.ts.map +1 -0
- package/version-history/UnifiedDiffView.js +36 -0
- package/version-history/UnifiedDiffView.js.map +1 -0
- package/version-history/computeDiff.d.ts +3 -1
- package/version-history/computeDiff.d.ts.map +1 -1
- package/version-history/computeDiff.js +5 -35
- package/version-history/computeDiff.js.map +1 -1
- package/version-history/diff-hunks.d.ts +21 -0
- package/version-history/diff-hunks.d.ts.map +1 -0
- package/version-history/diff-hunks.js +58 -0
- package/version-history/diff-hunks.js.map +1 -0
- package/version-history/index.d.ts +1 -0
- package/version-history/index.d.ts.map +1 -1
- package/version-history/index.js +1 -0
- package/version-history/index.js.map +1 -1
- package/version-history/parseUnifiedDiff.d.ts +22 -0
- package/version-history/parseUnifiedDiff.d.ts.map +1 -0
- package/version-history/parseUnifiedDiff.js +34 -0
- package/version-history/parseUnifiedDiff.js.map +1 -0
- package/workflow/WorkflowExecutionApprovalCard.d.ts +8 -1
- package/workflow/WorkflowExecutionApprovalCard.d.ts.map +1 -1
- package/workflow/WorkflowExecutionApprovalCard.js +17 -3
- package/workflow/WorkflowExecutionApprovalCard.js.map +1 -1
- package/workflow/WorkflowExecutionTimeline.d.ts +11 -2
- package/workflow/WorkflowExecutionTimeline.d.ts.map +1 -1
- package/workflow/WorkflowExecutionTimeline.js +2 -2
- package/workflow/WorkflowExecutionTimeline.js.map +1 -1
- package/workflow/WorkflowExecutionTimelineEvent.d.ts +4 -1
- package/workflow/WorkflowExecutionTimelineEvent.d.ts.map +1 -1
- package/workflow/WorkflowExecutionTimelineEvent.js +2 -2
- package/workflow/WorkflowExecutionTimelineEvent.js.map +1 -1
- package/workflow/WorkflowExecutionViewer.d.ts.map +1 -1
- package/workflow/WorkflowExecutionViewer.js +18 -10
- package/workflow/WorkflowExecutionViewer.js.map +1 -1
- package/workflow/WorkflowFileReviewList.d.ts +46 -0
- package/workflow/WorkflowFileReviewList.d.ts.map +1 -0
- package/workflow/WorkflowFileReviewList.js +48 -0
- package/workflow/WorkflowFileReviewList.js.map +1 -0
- package/workflow/WorkflowTaskApprovalCard.d.ts +8 -1
- package/workflow/WorkflowTaskApprovalCard.d.ts.map +1 -1
- package/workflow/WorkflowTaskApprovalCard.js +12 -19
- package/workflow/WorkflowTaskApprovalCard.js.map +1 -1
- package/workflow/execution-inspector/ExecutionInspector.d.ts +21 -4
- package/workflow/execution-inspector/ExecutionInspector.d.ts.map +1 -1
- package/workflow/execution-inspector/ExecutionInspector.js +6 -3
- package/workflow/execution-inspector/ExecutionInspector.js.map +1 -1
- package/workflow/index.d.ts +1 -0
- package/workflow/index.d.ts.map +1 -1
- package/workflow/index.js +1 -0
- package/workflow/index.js.map +1 -1
- package/workflow/useWorkflowExecutionActions.d.ts +62 -4
- package/workflow/useWorkflowExecutionActions.d.ts.map +1 -1
- package/workflow/useWorkflowExecutionActions.js +94 -18
- package/workflow/useWorkflowExecutionActions.js.map +1 -1
- package/session/inspector/PlanTab.d.ts +0 -15
- package/session/inspector/PlanTab.d.ts.map +0 -1
- package/session/inspector/PlanTab.js +0 -19
- package/session/inspector/PlanTab.js.map +0 -1
- package/src/session/inspector/PlanTab.tsx +0 -31
|
@@ -13,6 +13,14 @@ export interface ApprovalCardProps {
|
|
|
13
13
|
readonly onSubmit: (action: ApprovalAction, comment?: string) => void;
|
|
14
14
|
/** True while the RPC for this specific tool call is in flight. */
|
|
15
15
|
readonly isSubmitting?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* This gate's last failed decision, or `null` — surfaced in-card, beside the
|
|
18
|
+
* action buttons (the optimistic spinner reverts on failure, so this explains
|
|
19
|
+
* the snap-back). A thread can hold many gates; the error must name the one it
|
|
20
|
+
* belongs to, which a single global banner cannot do. Supply the entry from
|
|
21
|
+
* {@link useSubmitApproval}'s `errorsByToolCallId` for this `toolCallId`.
|
|
22
|
+
*/
|
|
23
|
+
readonly error?: Error | null;
|
|
16
24
|
/** Additional CSS class names for the root container. */
|
|
17
25
|
readonly className?: string;
|
|
18
26
|
}
|
|
@@ -23,9 +31,11 @@ export interface ApprovalCardProps {
|
|
|
23
31
|
* The compact header row matches the ToolCallItem layout:
|
|
24
32
|
* [CategoryIcon] Label primaryArg [⏳ waiting Xm]
|
|
25
33
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
34
|
+
* The body shows the proposed change from the tool args (the
|
|
35
|
+
* pre-execution deny-gate has no captured `FileChangeSet` yet): the
|
|
36
|
+
* write/edit content when present, an {@link EmptyChangeNotice} when
|
|
37
|
+
* only a path is known, otherwise the shared {@link ToolArgsView}
|
|
38
|
+
* dispatch, keeping pixel-level parity with the detail view.
|
|
29
39
|
*
|
|
30
40
|
* Wrapped in `React.memo` — structural sharing (T04) preserves the
|
|
31
41
|
* `PendingApproval` reference when unchanged, so approval cards
|
|
@@ -41,4 +51,38 @@ export interface ApprovalCardProps {
|
|
|
41
51
|
* ```
|
|
42
52
|
*/
|
|
43
53
|
export declare const ApprovalCard: import("react").NamedExoticComponent<ApprovalCardProps>;
|
|
54
|
+
/** Props for {@link ApprovalCardHeader}. */
|
|
55
|
+
export interface ApprovalCardHeaderProps {
|
|
56
|
+
/** The pending approval to summarize. */
|
|
57
|
+
readonly pendingApproval: PendingApproval;
|
|
58
|
+
/** Adds a bottom divider, for use above {@link ApprovalCardBody}. */
|
|
59
|
+
readonly bordered?: boolean;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* The compact summary row of an approval — `[icon] Label primaryArg [via sub]
|
|
63
|
+
* [⏳ Xm]`. Used as the standalone {@link ApprovalCard}'s header. Not rendered
|
|
64
|
+
* inline on a {@link ToolCallItem}, whose own row already serves as the header.
|
|
65
|
+
*/
|
|
66
|
+
export declare function ApprovalCardHeader({ pendingApproval, bordered, }: ApprovalCardHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
67
|
+
/** Props for {@link ApprovalCardBody}. */
|
|
68
|
+
export interface ApprovalCardBodyProps {
|
|
69
|
+
/** The pending approval to render a decision panel for. */
|
|
70
|
+
readonly pendingApproval: PendingApproval;
|
|
71
|
+
/** Called when the user picks Approve / Approve-all / Skip / Reject. */
|
|
72
|
+
readonly onSubmit: (action: ApprovalAction, comment?: string) => void;
|
|
73
|
+
/** True while the RPC for this tool call is in flight. */
|
|
74
|
+
readonly isSubmitting?: boolean;
|
|
75
|
+
/** This gate's last failed decision, or `null` — surfaced in-card below the actions. */
|
|
76
|
+
readonly error?: Error | null;
|
|
77
|
+
/** Additional CSS class names for the body container. */
|
|
78
|
+
readonly className?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The decision panel of an approval: the optional message and gate reason, the
|
|
82
|
+
* file-changes / args preview, and the action buttons. Reused in two places —
|
|
83
|
+
* the standalone {@link ApprovalCard} (with {@link ApprovalCardHeader} above
|
|
84
|
+
* it) and inline inside a gated {@link ToolCallItem}'s expanded panel, where
|
|
85
|
+
* the item's own row is the header. One body, identical preview in both.
|
|
86
|
+
*/
|
|
87
|
+
export declare function ApprovalCardBody({ pendingApproval, onSubmit, isSubmitting, error, className, }: ApprovalCardBodyProps): import("react/jsx-runtime").JSX.Element;
|
|
44
88
|
//# sourceMappingURL=ApprovalCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApprovalCard.d.ts","sourceRoot":"","sources":["../../src/execution/ApprovalCard.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApprovalCard.d.ts","sourceRoot":"","sources":["../../src/execution/ApprovalCard.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kEAAkE,CAAC;AACxG,OAAO,EAAE,cAAc,EAAY,MAAM,8DAA8D,CAAC;AAqBxG,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,8CAA8C;IAC9C,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C;;;;;OAKG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,mEAAmE;IACnE,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;OAMG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,eAAO,MAAM,YAAY,yDA2CvB,CAAC;AAEH,4CAA4C;AAC5C,MAAM,WAAW,uBAAuB;IACtC,yCAAyC;IACzC,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,qEAAqE;IACrE,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,eAAe,EACf,QAAgB,GACjB,EAAE,uBAAuB,2CAsEzB;AAED,0CAA0C;AAC1C,MAAM,WAAW,qBAAqB;IACpC,2DAA2D;IAC3D,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,wEAAwE;IACxE,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,0DAA0D;IAC1D,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,wFAAwF;IACxF,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;IAC9B,yDAAyD;IACzD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,QAAQ,EACR,YAAoB,EACpB,KAAY,EACZ,SAAS,GACV,EAAE,qBAAqB,2CAsMvB"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { memo, useCallback, useEffect, useMemo, useState } from "react";
|
|
4
|
-
import { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
4
|
+
import { ApprovalAction, ToolKind } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
5
5
|
import { cn } from "@stigmer/theme";
|
|
6
|
-
import {
|
|
6
|
+
import { describeApprovalPolicySource, isInformativePolicySource, } from "./approval-provenance";
|
|
7
|
+
import { resolveToolCategoryFromKind, extractPrimaryArgFromPreview, extractWriteContentFromPreview, isFileCategory, } from "./tool-categories";
|
|
7
8
|
import { CATEGORY_ICON } from "./ToolCallItem";
|
|
8
9
|
import { ToolArgsView } from "./ToolArgsView";
|
|
10
|
+
import { EmptyChangeNotice } from "./EmptyChangeNotice";
|
|
11
|
+
import { FilePathLink } from "./FilePathLink";
|
|
12
|
+
import { DecisionButton } from "../internal/DecisionButton";
|
|
13
|
+
import { InCardDecisionError } from "../internal/InCardDecisionError";
|
|
14
|
+
import { useElapsedSince, formatElapsed } from "../internal/useElapsedSince";
|
|
9
15
|
/**
|
|
10
16
|
* Renders a pending tool-call approval request with the same visual
|
|
11
17
|
* structure as an expanded {@link ToolCallItem} in the history list.
|
|
@@ -13,9 +19,11 @@ import { ToolArgsView } from "./ToolArgsView";
|
|
|
13
19
|
* The compact header row matches the ToolCallItem layout:
|
|
14
20
|
* [CategoryIcon] Label primaryArg [⏳ waiting Xm]
|
|
15
21
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
22
|
+
* The body shows the proposed change from the tool args (the
|
|
23
|
+
* pre-execution deny-gate has no captured `FileChangeSet` yet): the
|
|
24
|
+
* write/edit content when present, an {@link EmptyChangeNotice} when
|
|
25
|
+
* only a path is known, otherwise the shared {@link ToolArgsView}
|
|
26
|
+
* dispatch, keeping pixel-level parity with the detail view.
|
|
19
27
|
*
|
|
20
28
|
* Wrapped in `React.memo` — structural sharing (T04) preserves the
|
|
21
29
|
* `PendingApproval` reference when unchanged, so approval cards
|
|
@@ -30,7 +38,51 @@ import { ToolArgsView } from "./ToolArgsView";
|
|
|
30
38
|
* />
|
|
31
39
|
* ```
|
|
32
40
|
*/
|
|
33
|
-
export const ApprovalCard = memo(function ApprovalCard({ pendingApproval, onSubmit, isSubmitting = false, className, }) {
|
|
41
|
+
export const ApprovalCard = memo(function ApprovalCard({ pendingApproval, onSubmit, isSubmitting = false, error = null, className, }) {
|
|
42
|
+
// Prefer the denormalized wire tool_kind (populated by the server-side
|
|
43
|
+
// PendingApproval projection); fall back to the name for legacy executions.
|
|
44
|
+
const categoryInfo = resolveToolCategoryFromKind(pendingApproval.toolKind, pendingApproval.toolName, pendingApproval.mcpServerSlug);
|
|
45
|
+
// Cursor-grade chrome: a thin neutral card (no amber "brown" fill), with the
|
|
46
|
+
// gate's "needs your decision" signal carried by one restrained cue — a 2px
|
|
47
|
+
// left accent bar — plus the warning-colored clock/elapsed in the header. A
|
|
48
|
+
// destructive (delete) gate keeps a red accent as a hard safety signal.
|
|
49
|
+
const accentClass = categoryInfo.category === "delete"
|
|
50
|
+
? "border-l-2 border-l-destructive"
|
|
51
|
+
: "border-l-2 border-l-warning";
|
|
52
|
+
return (_jsxs("div", { role: "alert", "aria-label": `Approval required for ${pendingApproval.toolName}`, className: cn("rounded-lg border border-border-prominent", accentClass, className), children: [_jsx(ApprovalCardHeader, { pendingApproval: pendingApproval, bordered: true }), _jsx(ApprovalCardBody, { pendingApproval: pendingApproval, onSubmit: onSubmit, isSubmitting: isSubmitting, error: error })] }));
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* The compact summary row of an approval — `[icon] Label primaryArg [via sub]
|
|
56
|
+
* [⏳ Xm]`. Used as the standalone {@link ApprovalCard}'s header. Not rendered
|
|
57
|
+
* inline on a {@link ToolCallItem}, whose own row already serves as the header.
|
|
58
|
+
*/
|
|
59
|
+
export function ApprovalCardHeader({ pendingApproval, bordered = false, }) {
|
|
60
|
+
const categoryInfo = resolveToolCategoryFromKind(pendingApproval.toolKind, pendingApproval.toolName, pendingApproval.mcpServerSlug);
|
|
61
|
+
const CategoryIcon = CATEGORY_ICON[categoryInfo.category];
|
|
62
|
+
const primaryArg = useMemo(() => extractPrimaryArgFromPreview(pendingApproval.toolName, pendingApproval.argsPreview, pendingApproval.mcpServerSlug, pendingApproval.toolKind), [
|
|
63
|
+
pendingApproval.toolName,
|
|
64
|
+
pendingApproval.argsPreview,
|
|
65
|
+
pendingApproval.mcpServerSlug,
|
|
66
|
+
pendingApproval.toolKind,
|
|
67
|
+
]);
|
|
68
|
+
return (_jsxs("div", { className: cn("flex items-center gap-2 px-2.5 py-1.5 text-xs", bordered && "border-b border-border-muted"), children: [_jsx("span", { className: "shrink-0 text-warning", "aria-hidden": "true", children: _jsx(CategoryIcon, {}) }), _jsxs("span", { className: "min-w-0 flex-1 flex items-center gap-1.5 overflow-hidden", children: [_jsx("span", { className: "shrink-0 font-medium text-foreground", children: categoryInfo.label }), primaryArg &&
|
|
69
|
+
categoryInfo.category !== "shell" &&
|
|
70
|
+
(isFileCategory(categoryInfo.category) ? (
|
|
71
|
+
// A file tool's primary arg is a path — render it filename-first
|
|
72
|
+
// with the full path on hover, matching the ToolCallItem header.
|
|
73
|
+
_jsx(FilePathLink, { path: primaryArg, className: "min-w-0 text-xs text-muted-foreground" })) : (
|
|
74
|
+
// Shell is the exception: its command is shown in the body's
|
|
75
|
+
// terminal session, so the header stays minimal (icon + label).
|
|
76
|
+
_jsx("span", { className: "min-w-0 truncate font-mono text-muted-foreground", children: primaryArg })))] }), pendingApproval.fromSubAgent && pendingApproval.subAgentName && (_jsxs("span", { className: "shrink-0 rounded bg-muted px-1 py-0.5 font-mono text-muted-foreground", children: ["via ", pendingApproval.subAgentSubject || pendingApproval.subAgentName] })), _jsx(WaitingDuration, { requestedAt: pendingApproval.requestedAt }), _jsx("span", { className: "shrink-0 text-warning", "aria-hidden": "true", children: _jsx(ClockIcon, {}) })] }));
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The decision panel of an approval: the optional message and gate reason, the
|
|
80
|
+
* file-changes / args preview, and the action buttons. Reused in two places —
|
|
81
|
+
* the standalone {@link ApprovalCard} (with {@link ApprovalCardHeader} above
|
|
82
|
+
* it) and inline inside a gated {@link ToolCallItem}'s expanded panel, where
|
|
83
|
+
* the item's own row is the header. One body, identical preview in both.
|
|
84
|
+
*/
|
|
85
|
+
export function ApprovalCardBody({ pendingApproval, onSubmit, isSubmitting = false, error = null, className, }) {
|
|
34
86
|
const [activeAction, setActiveAction] = useState(null);
|
|
35
87
|
const handleAction = useCallback((action) => {
|
|
36
88
|
setActiveAction(action);
|
|
@@ -41,15 +93,7 @@ export const ApprovalCard = memo(function ApprovalCard({ pendingApproval, onSubm
|
|
|
41
93
|
setActiveAction(null);
|
|
42
94
|
}
|
|
43
95
|
}, [isSubmitting]);
|
|
44
|
-
// Prefer the denormalized wire tool_kind (populated by the server-side
|
|
45
|
-
// PendingApproval projection); fall back to the name for legacy executions.
|
|
46
96
|
const categoryInfo = resolveToolCategoryFromKind(pendingApproval.toolKind, pendingApproval.toolName, pendingApproval.mcpServerSlug);
|
|
47
|
-
const CategoryIcon = CATEGORY_ICON[categoryInfo.category];
|
|
48
|
-
const primaryArg = useMemo(() => extractPrimaryArgFromPreview(pendingApproval.toolName, pendingApproval.argsPreview, pendingApproval.mcpServerSlug), [
|
|
49
|
-
pendingApproval.toolName,
|
|
50
|
-
pendingApproval.argsPreview,
|
|
51
|
-
pendingApproval.mcpServerSlug,
|
|
52
|
-
]);
|
|
53
97
|
const parsedArgs = useMemo(() => {
|
|
54
98
|
if (!pendingApproval.argsPreview)
|
|
55
99
|
return null;
|
|
@@ -64,74 +108,98 @@ export const ApprovalCard = memo(function ApprovalCard({ pendingApproval, onSubm
|
|
|
64
108
|
return null;
|
|
65
109
|
}
|
|
66
110
|
}, [pendingApproval.argsPreview]);
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
111
|
+
// APPROVE_ALL now grants a run-lifetime lease scoped to the clicked tool's
|
|
112
|
+
// CLASS — its MCP server for an MCP tool, else its approval category (where
|
|
113
|
+
// write and edit collapse to one "file edits" class, mirroring the runner's
|
|
114
|
+
// toolApprovalCategory). The label must name that exact class so the button
|
|
115
|
+
// never over-promises: it does NOT silence other classes.
|
|
116
|
+
const approveAllLabel = useMemo(() => buildApproveAllLabel(categoryInfo.category, pendingApproval.mcpServerSlug), [categoryInfo.category, pendingApproval.mcpServerSlug]);
|
|
117
|
+
// Why-gated: the authorization provenance the server projected onto the
|
|
118
|
+
// PendingApproval (approval_policy_source). Smart-suppressed — the everyday
|
|
119
|
+
// "this category needs approval" default is noise next to the action it gates,
|
|
120
|
+
// so only a genuinely informative provenance (an explicit override, a
|
|
121
|
+
// server-marked destructive tighten) earns a line; the full phrase is on hover.
|
|
122
|
+
const gateReason = useMemo(() => describeApprovalPolicySource(pendingApproval.approvalPolicySource), [pendingApproval.approvalPolicySource]);
|
|
123
|
+
const showGateReason = gateReason != null &&
|
|
124
|
+
isInformativePolicySource(pendingApproval.approvalPolicySource);
|
|
125
|
+
// The runner's message for a file tool ("Write file: <path>") only restates
|
|
126
|
+
// the header + diff, so it is suppressed; a message is shown only when it adds
|
|
127
|
+
// information (e.g. an MCP tool's human-authored prompt). Shell shows its
|
|
128
|
+
// command in the args view, never a message.
|
|
129
|
+
const showMessage = Boolean(pendingApproval.message) &&
|
|
130
|
+
categoryInfo.category !== "shell" &&
|
|
131
|
+
!isFileCategory(categoryInfo.category);
|
|
132
|
+
const isWriteEdit = categoryInfo.category === "write" || categoryInfo.category === "edit";
|
|
133
|
+
// The proposed write/edit content from the args preview, when the gate carries
|
|
134
|
+
// no authoritative file_changes capture. Drives the three-way fallback below.
|
|
135
|
+
const writeContent = useMemo(() => extractWriteContentFromPreview(pendingApproval.argsPreview), [pendingApproval.argsPreview]);
|
|
136
|
+
// The decision-relevant preview. The pre-execution deny-gate is an
|
|
137
|
+
// apply-then-review exception: the change has not been captured yet (the tool
|
|
138
|
+
// is DENIED, awaiting approval), so there is no `FileChangeSet` to render.
|
|
139
|
+
// Instead the gate shows the PROPOSED change from the tool args: the write/edit
|
|
140
|
+
// content when the args carry it (path suppressed — the header has it); a
|
|
141
|
+
// neutral "no preview" notice when only a path is known (the resume placeholder
|
|
142
|
+
// case); otherwise the shared args view for non-file tools. (Captured
|
|
143
|
+
// file-review — the apply-then-review path — renders via FileReviewCard, not
|
|
144
|
+
// here.)
|
|
145
|
+
let preview = null;
|
|
146
|
+
if (isWriteEdit && writeContent === null) {
|
|
147
|
+
// No proposed content in the args. A whole-file write is modeled as a create
|
|
148
|
+
// throughout the runner (FILE_WRITE -> CREATE), so the authoritative toolKind
|
|
149
|
+
// lets the gate say plainly that a new file is being written rather than the
|
|
150
|
+
// misleading non-committal "no preview". An edit (modify) cannot be proven a
|
|
151
|
+
// create, so it keeps the non-committal notice.
|
|
152
|
+
const kind = pendingApproval.toolKind === ToolKind.FILE_WRITE ? "create" : "no-preview";
|
|
153
|
+
preview = _jsx(EmptyChangeNotice, { kind: kind });
|
|
154
|
+
}
|
|
155
|
+
else if (parsedArgs) {
|
|
156
|
+
preview = (_jsx(ToolArgsView, { toolName: pendingApproval.toolName, args: parsedArgs, mcpServerSlug: pendingApproval.mcpServerSlug, showFileName: !isWriteEdit }));
|
|
157
|
+
}
|
|
158
|
+
return (_jsxs("div", { className: cn("px-3 py-2.5 space-y-2", className), children: [showMessage && (_jsx("p", { className: "text-xs text-foreground", children: pendingApproval.message })), preview, categoryInfo.category === "shell" && (_jsx("p", { className: "text-[11px] italic text-muted-foreground", children: "Files this command creates or changes are covered by this approval \u2014 they are kept automatically, with no second review." })), _jsxs("div", { className: "flex items-center gap-2 pt-1", children: [_jsx(DecisionButton, { label: "Approve", variant: "primary", onClick: () => handleAction(ApprovalAction.APPROVE), isActive: activeAction === ApprovalAction.APPROVE, isSubmitting: isSubmitting, cursorTarget: "approve-button" }), _jsx(DecisionButton, { label: "Skip", variant: "ghost", onClick: () => handleAction(ApprovalAction.SKIP), isActive: activeAction === ApprovalAction.SKIP, isSubmitting: isSubmitting }), _jsx(DecisionButton, { label: "Reject", variant: "danger", onClick: () => handleAction(ApprovalAction.REJECT), isActive: activeAction === ApprovalAction.REJECT, isSubmitting: isSubmitting }), _jsx(DecisionButton, { label: approveAllLabel, variant: "ghost", onClick: () => handleAction(ApprovalAction.APPROVE_ALL), isActive: activeAction === ApprovalAction.APPROVE_ALL, isSubmitting: isSubmitting, className: "ml-auto", cursorTarget: "approve-all-button" })] }), showGateReason && (_jsx("p", { className: "text-[11px] italic text-muted-foreground", title: gateReason ?? undefined, "data-cursor-target": "approval-gate-reason", children: gateReason })), error && (_jsx(InCardDecisionError, { error: error, leadIn: "submit decision", cursorTarget: "approval-error" }))] }));
|
|
159
|
+
}
|
|
72
160
|
// ---------------------------------------------------------------------------
|
|
73
|
-
// Internal
|
|
161
|
+
// Internal helpers
|
|
74
162
|
// ---------------------------------------------------------------------------
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
163
|
+
/**
|
|
164
|
+
* Builds the truthful APPROVE_ALL button label for a tool's lease class.
|
|
165
|
+
*
|
|
166
|
+
* The lease an APPROVE_ALL grants is scoped to ONE class: the MCP server for an
|
|
167
|
+
* MCP tool, otherwise the approval category (write/delete/shell) — where the
|
|
168
|
+
* presentation "write" and "edit" categories collapse to a single "file edits"
|
|
169
|
+
* class, exactly as the runner's `toolApprovalCategory` collapses FILE_WRITE and
|
|
170
|
+
* FILE_EDIT to "write". The label names that class so the button never implies a
|
|
171
|
+
* broader effect than the lease actually has. The generic fallback only applies
|
|
172
|
+
* to a tool with no leasable class, which is not normally gated for approval.
|
|
173
|
+
*/
|
|
174
|
+
function buildApproveAllLabel(category, mcpServerSlug) {
|
|
175
|
+
if (mcpServerSlug) {
|
|
176
|
+
return `Approve all ${mcpServerSlug} tools`;
|
|
177
|
+
}
|
|
178
|
+
switch (category) {
|
|
179
|
+
case "shell":
|
|
180
|
+
return "Approve all shell commands";
|
|
181
|
+
case "delete":
|
|
182
|
+
return "Approve all file deletions";
|
|
183
|
+
case "write":
|
|
184
|
+
case "edit":
|
|
185
|
+
return "Approve all file edits";
|
|
186
|
+
default:
|
|
187
|
+
return "Approve all of this kind";
|
|
188
|
+
}
|
|
85
189
|
}
|
|
190
|
+
// ---------------------------------------------------------------------------
|
|
191
|
+
// Internal sub-components
|
|
192
|
+
// ---------------------------------------------------------------------------
|
|
86
193
|
function WaitingDuration({ requestedAt }) {
|
|
87
|
-
const
|
|
88
|
-
if (!requestedAt)
|
|
89
|
-
return null;
|
|
90
|
-
const t = new Date(requestedAt).getTime();
|
|
91
|
-
return Number.isNaN(t) ? null : t;
|
|
92
|
-
}, [requestedAt]);
|
|
93
|
-
const [elapsed, setElapsed] = useState(null);
|
|
94
|
-
useEffect(() => {
|
|
95
|
-
if (startMs === null) {
|
|
96
|
-
setElapsed(null);
|
|
97
|
-
return;
|
|
98
|
-
}
|
|
99
|
-
setElapsed(Math.max(0, Date.now() - startMs));
|
|
100
|
-
const id = setInterval(() => {
|
|
101
|
-
setElapsed(Math.max(0, Date.now() - startMs));
|
|
102
|
-
}, 1000);
|
|
103
|
-
return () => clearInterval(id);
|
|
104
|
-
}, [startMs]);
|
|
194
|
+
const elapsed = useElapsedSince(requestedAt);
|
|
105
195
|
if (elapsed === null)
|
|
106
196
|
return null;
|
|
107
197
|
return (_jsx("span", { className: "shrink-0 text-xs text-muted-foreground", children: formatElapsed(elapsed) }));
|
|
108
198
|
}
|
|
109
|
-
function formatElapsed(ms) {
|
|
110
|
-
if (ms < 1000)
|
|
111
|
-
return "just now";
|
|
112
|
-
const seconds = Math.floor(ms / 1000);
|
|
113
|
-
if (seconds < 60)
|
|
114
|
-
return `${seconds}s`;
|
|
115
|
-
const minutes = Math.floor(seconds / 60);
|
|
116
|
-
const remainingSeconds = seconds % 60;
|
|
117
|
-
if (minutes < 60) {
|
|
118
|
-
return remainingSeconds > 0
|
|
119
|
-
? `${minutes}m ${remainingSeconds}s`
|
|
120
|
-
: `${minutes}m`;
|
|
121
|
-
}
|
|
122
|
-
const hours = Math.floor(minutes / 60);
|
|
123
|
-
const remainingMinutes = minutes % 60;
|
|
124
|
-
return remainingMinutes > 0
|
|
125
|
-
? `${hours}h ${remainingMinutes}m`
|
|
126
|
-
: `${hours}h`;
|
|
127
|
-
}
|
|
128
199
|
// ---------------------------------------------------------------------------
|
|
129
200
|
// Inline SVG icons
|
|
130
201
|
// ---------------------------------------------------------------------------
|
|
131
202
|
function ClockIcon() {
|
|
132
203
|
return (_jsxs("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", children: [_jsx("circle", { cx: "6", cy: "6", r: "4.5" }), _jsx("path", { d: "M6 3.5V6L7.5 7.5" })] }));
|
|
133
204
|
}
|
|
134
|
-
function SpinnerIcon() {
|
|
135
|
-
return (_jsx("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", className: "animate-spin", "aria-hidden": "true", children: _jsx("path", { d: "M6 1.5A4.5 4.5 0 1 1 1.5 6", strokeLinecap: "round" }) }));
|
|
136
|
-
}
|
|
137
205
|
//# sourceMappingURL=ApprovalCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApprovalCard.js","sourceRoot":"","sources":["../../src/execution/ApprovalCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ApprovalCard.js","sourceRoot":"","sources":["../../src/execution/ApprovalCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,8DAA8D,CAAC;AACxG,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EACL,4BAA4B,EAC5B,yBAAyB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,8BAA8B,EAC9B,cAAc,GAEf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,4BA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;IACtC,CAAC;AACH,CAAC;AAED,8EAA8E;AAC9E,0BAA0B;AAC1B,8EAA8E;AAE9E,SAAS,eAAe,CAAC,EAAE,WAAW,EAA2B;IAC/D,MAAM,OAAO,GAAG,eAAe,CAAC,WAAW,CAAC,CAAC;IAC7C,IAAI,OAAO,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAElC,OAAO,CACL,eAAM,SAAS,EAAC,wCAAwC,YACrD,aAAa,CAAC,OAAO,CAAC,GAClB,CACR,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,mBAAmB;AACnB,8EAA8E;AAE9E,SAAS,SAAS;IAChB,OAAO,CACL,eACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,aAEtB,iBAAQ,EAAE,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,CAAC,EAAC,KAAK,GAAG,EAChC,eAAM,CAAC,EAAC,kBAAkB,GAAG,IACzB,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { PendingApproval } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/approval_pb";
|
|
2
|
+
import type { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
3
|
+
/**
|
|
4
|
+
* Context value that carries the run's pending approvals to the tool rows
|
|
5
|
+
* that own them, so an approval gate can render *inline* on the exact tool
|
|
6
|
+
* call it blocks (parent thread and nested sub-agents alike) instead of as a
|
|
7
|
+
* detached card at the bottom of the thread.
|
|
8
|
+
*
|
|
9
|
+
* Provided by {@link MessageThread} (or a platform builder's custom wrapper),
|
|
10
|
+
* beside {@link FilePathContext} / `SandboxContext`. When no provider is
|
|
11
|
+
* present — or the consumer did not supply an `onApprovalSubmit` handler — the
|
|
12
|
+
* map is empty and {@link useApproval} returns `null`, so the inline UI is a
|
|
13
|
+
* no-op (backward compatible).
|
|
14
|
+
*
|
|
15
|
+
* The map is keyed by `tool_call_id` and rebuilt only when the underlying
|
|
16
|
+
* `pendingApprovals` list changes (not per streaming frame), so subscribing
|
|
17
|
+
* tool rows re-render on approval events, not on every snapshot — preserving
|
|
18
|
+
* the thread's streaming re-render isolation (DD-009 / DD-010).
|
|
19
|
+
*/
|
|
20
|
+
export interface ApprovalContextValue {
|
|
21
|
+
/** Unresolved approvals, keyed by the `tool_call_id` they gate. */
|
|
22
|
+
readonly approvalsByToolCallId: ReadonlyMap<string, PendingApproval>;
|
|
23
|
+
/**
|
|
24
|
+
* Submits a decision for a gated tool call. Wired to the same handler the
|
|
25
|
+
* bottom {@link ApprovalCard} backstop uses; when absent, no inline approval
|
|
26
|
+
* UI is shown.
|
|
27
|
+
*/
|
|
28
|
+
readonly onSubmit?: (toolCallId: string, action: ApprovalAction, comment?: string) => void;
|
|
29
|
+
/** Tool-call ids whose decision RPC is in flight, for per-card spinners. */
|
|
30
|
+
readonly submittingIds: ReadonlySet<string>;
|
|
31
|
+
/**
|
|
32
|
+
* Per-tool-call failures, keyed by `tool_call_id` (the parallel of
|
|
33
|
+
* {@link submittingIds}). A failed decision is surfaced in-card, beside the
|
|
34
|
+
* exact gate that failed, so the inline row can name *which* action did not
|
|
35
|
+
* take and why. Empty when no provider supplies it.
|
|
36
|
+
*/
|
|
37
|
+
readonly errorsByToolCallId: ReadonlyMap<string, Error>;
|
|
38
|
+
}
|
|
39
|
+
/** Context that supplies a run's pending approvals to the tool rows they gate. */
|
|
40
|
+
export declare const ApprovalContext: import("react").Context<ApprovalContextValue>;
|
|
41
|
+
/**
|
|
42
|
+
* Resolved inline-approval state for a single tool call. Its shape is a superset
|
|
43
|
+
* of the props {@link ApprovalCardBody} reads, so a consumer can spread it
|
|
44
|
+
* directly: `<ApprovalCardBody {...approval} />`.
|
|
45
|
+
*/
|
|
46
|
+
export interface UseApprovalResult {
|
|
47
|
+
/** The pending approval gating this tool call. */
|
|
48
|
+
readonly pendingApproval: PendingApproval;
|
|
49
|
+
/** Submits a decision for this tool call (id already bound). */
|
|
50
|
+
readonly onSubmit: (action: ApprovalAction, comment?: string) => void;
|
|
51
|
+
/** True while this tool call's decision RPC is in flight. */
|
|
52
|
+
readonly isSubmitting: boolean;
|
|
53
|
+
/** This gate's last failed decision, or `null` — surfaced in-card beside it. */
|
|
54
|
+
readonly error: Error | null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Returns the inline-approval state for a tool call, or `null` when the call
|
|
58
|
+
* is not currently gated (no matching approval, or no submit handler wired).
|
|
59
|
+
*
|
|
60
|
+
* The returned `onSubmit` is pre-bound to `toolCallId` and stable across
|
|
61
|
+
* renders, so it can flow straight into a memoized approval body.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* const approval = useApproval(toolCall.id);
|
|
66
|
+
* if (approval) {
|
|
67
|
+
* return <ApprovalCardBody {...approval} />;
|
|
68
|
+
* }
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
export declare function useApproval(toolCallId: string): UseApprovalResult | null;
|
|
72
|
+
//# sourceMappingURL=ApprovalContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApprovalContext.d.ts","sourceRoot":"","sources":["../../src/execution/ApprovalContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kEAAkE,CAAC;AACxG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAEnG;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,oBAAoB;IACnC,mEAAmE;IACnE,QAAQ,CAAC,qBAAqB,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACrE;;;;OAIG;IACH,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAClB,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,cAAc,EACtB,OAAO,CAAC,EAAE,MAAM,KACb,IAAI,CAAC;IACV,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IAC5C;;;;;OAKG;IACH,QAAQ,CAAC,kBAAkB,EAAE,WAAW,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;CACzD;AAQD,kFAAkF;AAClF,eAAO,MAAM,eAAe,+CACwB,CAAC;AAErD;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,QAAQ,CAAC,eAAe,EAAE,eAAe,CAAC;IAC1C,gEAAgE;IAChE,QAAQ,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtE,6DAA6D;IAC7D,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,gFAAgF;IAChF,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,WAAW,CAAC,UAAU,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAsBxE"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { createContext, useCallback, useContext } from "react";
|
|
2
|
+
const DEFAULT_VALUE = {
|
|
3
|
+
approvalsByToolCallId: new Map(),
|
|
4
|
+
submittingIds: new Set(),
|
|
5
|
+
errorsByToolCallId: new Map(),
|
|
6
|
+
};
|
|
7
|
+
/** Context that supplies a run's pending approvals to the tool rows they gate. */
|
|
8
|
+
export const ApprovalContext = createContext(DEFAULT_VALUE);
|
|
9
|
+
/**
|
|
10
|
+
* Returns the inline-approval state for a tool call, or `null` when the call
|
|
11
|
+
* is not currently gated (no matching approval, or no submit handler wired).
|
|
12
|
+
*
|
|
13
|
+
* The returned `onSubmit` is pre-bound to `toolCallId` and stable across
|
|
14
|
+
* renders, so it can flow straight into a memoized approval body.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* const approval = useApproval(toolCall.id);
|
|
19
|
+
* if (approval) {
|
|
20
|
+
* return <ApprovalCardBody {...approval} />;
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export function useApproval(toolCallId) {
|
|
25
|
+
const { approvalsByToolCallId, onSubmit, submittingIds, errorsByToolCallId } = useContext(ApprovalContext);
|
|
26
|
+
const handleSubmit = useCallback((action, comment) => {
|
|
27
|
+
onSubmit?.(toolCallId, action, comment);
|
|
28
|
+
}, [onSubmit, toolCallId]);
|
|
29
|
+
const pendingApproval = toolCallId
|
|
30
|
+
? approvalsByToolCallId.get(toolCallId)
|
|
31
|
+
: undefined;
|
|
32
|
+
if (!pendingApproval || !onSubmit)
|
|
33
|
+
return null;
|
|
34
|
+
return {
|
|
35
|
+
pendingApproval,
|
|
36
|
+
onSubmit: handleSubmit,
|
|
37
|
+
isSubmitting: submittingIds.has(toolCallId),
|
|
38
|
+
error: errorsByToolCallId.get(toolCallId) ?? null,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=ApprovalContext.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ApprovalContext.js","sourceRoot":"","sources":["../../src/execution/ApprovalContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AA6C/D,MAAM,aAAa,GAAyB;IAC1C,qBAAqB,EAAE,IAAI,GAAG,EAAE;IAChC,aAAa,EAAE,IAAI,GAAG,EAAE;IACxB,kBAAkB,EAAE,IAAI,GAAG,EAAE;CAC9B,CAAC;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAC1B,aAAa,CAAuB,aAAa,CAAC,CAAC;AAkBrD;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,WAAW,CAAC,UAAkB;IAC5C,MAAM,EAAE,qBAAqB,EAAE,QAAQ,EAAE,aAAa,EAAE,kBAAkB,EAAE,GAC1E,UAAU,CAAC,eAAe,CAAC,CAAC;IAE9B,MAAM,YAAY,GAAG,WAAW,CAC9B,CAAC,MAAsB,EAAE,OAAgB,EAAE,EAAE;QAC3C,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC,EACD,CAAC,QAAQ,EAAE,UAAU,CAAC,CACvB,CAAC;IAEF,MAAM,eAAe,GAAG,UAAU;QAChC,CAAC,CAAC,qBAAqB,CAAC,GAAG,CAAC,UAAU,CAAC;QACvC,CAAC,CAAC,SAAS,CAAC;IACd,IAAI,CAAC,eAAe,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE/C,OAAO;QACL,eAAe;QACf,QAAQ,EAAE,YAAY;QACtB,YAAY,EAAE,aAAa,CAAC,GAAG,CAAC,UAAU,CAAC;QAC3C,KAAK,EAAE,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,IAAI;KAClD,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArtifactCard.d.ts","sourceRoot":"","sources":["../../src/execution/ArtifactCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;
|
|
1
|
+
{"version":3,"file":"ArtifactCard.d.ts","sourceRoot":"","sources":["../../src/execution/ArtifactCard.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kEAAkE,CAAC;AAiB1G,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,wCAAwC;IACxC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,mFAAmF;IACnF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B;;;OAGG;IACH,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC3D;;;;;;;;OAQG;IACH,QAAQ,CAAC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IACpC,mDAAmD;IACnD,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,WAAW,EACX,GAAG,EACH,SAAS,EACT,gBAAwB,EACxB,SAAS,GACV,EAAE,iBAAiB,2CA+HnB"}
|
|
@@ -3,6 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { ExecutionArtifactKind } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
4
4
|
import { cn } from "@stigmer/theme";
|
|
5
5
|
import { useArtifactContent } from "./useArtifactContent";
|
|
6
|
+
import { useArtifactDownload } from "./useArtifactDownload";
|
|
6
7
|
import { isTextArtifact, formatArtifactSize } from "./artifact-utils";
|
|
7
8
|
import { useDetectStigmerResource } from "../library/useDetectStigmerResource";
|
|
8
9
|
import { useDetectSkillPackage } from "../library/useDetectSkillPackage";
|
|
@@ -85,13 +86,14 @@ export function ArtifactCard({ artifact, executionId, org, onPreview, hasNameCol
|
|
|
85
86
|
detectionLabel = `Skill \u00B7 ${count} ${count === 1 ? "file" : "files"}`;
|
|
86
87
|
}
|
|
87
88
|
const canPreview = !!onPreview && (isTextArtifact(artifact) || isDirectory);
|
|
89
|
+
const { download, isDownloading } = useArtifactDownload(executionId);
|
|
88
90
|
const parentDir = hasNameCollision && artifact.sandboxPath
|
|
89
91
|
? parentDirectory(artifact.sandboxPath)
|
|
90
92
|
: null;
|
|
91
93
|
// ---------------------------------------------------------------------------
|
|
92
94
|
// Render
|
|
93
95
|
// ---------------------------------------------------------------------------
|
|
94
|
-
return (_jsxs("div", { role: "article", "aria-label": artifact.name, className: cn("rounded-md border border-border p-3", className), children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: isDirectory ? _jsx(FolderIcon, {}) : _jsx(FileIcon, {}) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "truncate text-sm font-medium text-foreground", children: [artifact.name, isDirectory && "/"] }), parentDir && (_jsx("div", { className: "truncate text-xs text-muted-foreground", children: parentDir })), _jsx("div", { className: "text-xs tabular-nums text-muted-foreground", children: formatArtifactSize(artifact.sizeBytes) })] })] }), isDetecting && !isDetected && (_jsx("div", { className: "mt-1.5 h-5 w-28 animate-pulse rounded-full bg-muted", "aria-hidden": "true" })), detectionLabel && (_jsx("span", { className: "mt-1.5 inline-flex items-center rounded-full bg-primary-subtle px-2 py-0.5 text-xs font-medium text-primary", children: detectionLabel })), _jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1", children: [canPreview && (_jsx("button", { type: "button", onClick: () => onPreview(artifact), className: cn("text-xs font-medium text-primary transition-colors hover:text-primary-muted", FOCUS_RING_CLASSES), children: "Preview" })), _jsxs("
|
|
96
|
+
return (_jsxs("div", { role: "article", "aria-label": artifact.name, className: cn("rounded-md border border-border p-3", className), children: [_jsxs("div", { className: "flex items-start gap-2", children: [_jsx("span", { className: "mt-0.5 shrink-0 text-muted-foreground", children: isDirectory ? _jsx(FolderIcon, {}) : _jsx(FileIcon, {}) }), _jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "truncate text-sm font-medium text-foreground", children: [artifact.name, isDirectory && "/"] }), parentDir && (_jsx("div", { className: "truncate text-xs text-muted-foreground", children: parentDir })), _jsx("div", { className: "text-xs tabular-nums text-muted-foreground", children: formatArtifactSize(artifact.sizeBytes) })] })] }), isDetecting && !isDetected && (_jsx("div", { className: "mt-1.5 h-5 w-28 animate-pulse rounded-full bg-muted", "aria-hidden": "true" })), detectionLabel && (_jsx("span", { className: "mt-1.5 inline-flex items-center rounded-full bg-primary-subtle px-2 py-0.5 text-xs font-medium text-primary", children: detectionLabel })), _jsxs("div", { className: "mt-2 flex flex-wrap items-center gap-x-3 gap-y-1", children: [canPreview && (_jsx("button", { type: "button", onClick: () => onPreview(artifact), className: cn("text-xs font-medium text-primary transition-colors hover:text-primary-muted", FOCUS_RING_CLASSES), children: "Preview" })), _jsxs("button", { type: "button", onClick: () => download(artifact.storageKey, artifact.name), disabled: isDownloading, className: cn("inline-flex items-center gap-1 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground disabled:opacity-50", FOCUS_RING_CLASSES), children: [_jsx(DownloadIcon, {}), isDownloading ? "Preparing…" : isDirectory ? "Download ZIP" : "Download"] })] })] }));
|
|
95
97
|
}
|
|
96
98
|
// ---------------------------------------------------------------------------
|
|
97
99
|
// Helpers
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArtifactCard.js","sourceRoot":"","sources":["../../src/execution/ArtifactCard.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,qBAAqB,EAAE,MAAM,8DAA8D,CAAC;AACrG,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,GAAG,GAAG,IAAI,CAAC;AAkCtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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