@stigmer/react 3.0.9-dev.20260616060535 → 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/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 +4 -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__/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__/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__/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/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 +35 -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
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { createContext, useContext } from "react";
|
|
2
|
+
import type { FileChangeSet } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/filereview_pb";
|
|
3
|
+
import {
|
|
4
|
+
fileReviewRowState,
|
|
5
|
+
type FileReviewRowState,
|
|
6
|
+
} from "./file-review-status";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Context value that carries the session's captured change sets to the
|
|
10
|
+
* transcript tool rows that reference them, so a stamped file-edit row
|
|
11
|
+
* (`ToolCall.file_change_set_id`) can badge itself with the set's live review
|
|
12
|
+
* state — pending review, kept, discarded — right where the edit happened.
|
|
13
|
+
*
|
|
14
|
+
* The sibling of {@link ApprovalContext}, and the same discipline: provided by
|
|
15
|
+
* {@link MessageThread}, keyed by a stable id, rebuilt only when the underlying
|
|
16
|
+
* change sets actually change (structural sharing keeps set references stable
|
|
17
|
+
* across streaming frames), and an empty default so consumers without a
|
|
18
|
+
* provider render no badge (backward compatible).
|
|
19
|
+
*
|
|
20
|
+
* Read-only by design: the row badge is presentation of the set's state, never
|
|
21
|
+
* a decision surface — decisions live exclusively on the set's decision bar
|
|
22
|
+
* ({@link FileReviewCard}).
|
|
23
|
+
*/
|
|
24
|
+
export interface FileReviewContextValue {
|
|
25
|
+
/** Every displayable change set across the session, keyed by `FileChangeSet.id`. */
|
|
26
|
+
readonly changeSetsById: ReadonlyMap<string, FileChangeSet>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const DEFAULT_VALUE: FileReviewContextValue = {
|
|
30
|
+
changeSetsById: new Map(),
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/** Context that supplies the session's change sets to stamped tool rows. */
|
|
34
|
+
export const FileReviewContext =
|
|
35
|
+
createContext<FileReviewContextValue>(DEFAULT_VALUE);
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* The review state a stamped tool row should badge, or `null` for no badge
|
|
39
|
+
* (unstamped row, unknown set, or a file absent from its set — see
|
|
40
|
+
* {@link fileReviewRowState} for the honest-degradation rules).
|
|
41
|
+
*
|
|
42
|
+
* @param fileChangeSetId The row's `ToolCall.file_change_set_id` (may be "").
|
|
43
|
+
* @param rowPath The row's file path (the presenter's primary arg), used to
|
|
44
|
+
* resolve this file's verdict once the set is decided.
|
|
45
|
+
*/
|
|
46
|
+
export function useFileReviewRowState(
|
|
47
|
+
fileChangeSetId: string,
|
|
48
|
+
rowPath: string | null,
|
|
49
|
+
): FileReviewRowState | null {
|
|
50
|
+
const { changeSetsById } = useContext(FileReviewContext);
|
|
51
|
+
if (!fileChangeSetId) return null;
|
|
52
|
+
return fileReviewRowState(changeSetsById.get(fileChangeSetId), rowPath);
|
|
53
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { memo, useCallback } from "react";
|
|
4
|
+
import type { FileChangeSet } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/filereview_pb";
|
|
5
|
+
import type { FileDecisionAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
6
|
+
import { cn } from "@stigmer/theme";
|
|
7
|
+
import { FileReviewCard } from "./FileReviewCard";
|
|
8
|
+
import type { FileDecisionOptions } from "./useFileReview";
|
|
9
|
+
|
|
10
|
+
/** Props for {@link FileReviewDock}. */
|
|
11
|
+
export interface FileReviewDockProps {
|
|
12
|
+
/**
|
|
13
|
+
* The change sets awaiting review. Renders nothing when empty. Feed this from
|
|
14
|
+
* `useSessionConversation().fileChangeSets` — the AWAITING_REVIEW sets of the
|
|
15
|
+
* active execution, the same seam whose `submitFileDecision` routes decisions
|
|
16
|
+
* to that execution, so what the dock shows and what it can decide are
|
|
17
|
+
* consistent by construction.
|
|
18
|
+
*/
|
|
19
|
+
readonly changeSets: readonly FileChangeSet[];
|
|
20
|
+
/**
|
|
21
|
+
* Called when the user makes a decision on one of the docked sets. Wire to
|
|
22
|
+
* `useSessionConversation().submitFileDecision` (or an equivalent
|
|
23
|
+
* {@link useFileReview}-backed handler bound to the owning execution).
|
|
24
|
+
*/
|
|
25
|
+
readonly onSubmit: (
|
|
26
|
+
changeSetId: string,
|
|
27
|
+
action: FileDecisionAction,
|
|
28
|
+
options?: FileDecisionOptions,
|
|
29
|
+
) => void;
|
|
30
|
+
/**
|
|
31
|
+
* Decision keys ({@link fileDecisionKey}) currently being submitted. Drives
|
|
32
|
+
* per-control loading state — see {@link FileReviewCardProps.submittingDecisionKeys}.
|
|
33
|
+
*/
|
|
34
|
+
readonly submittingDecisionKeys?: ReadonlySet<string>;
|
|
35
|
+
/**
|
|
36
|
+
* Per-decision failures, keyed like {@link submittingDecisionKeys} — surfaced
|
|
37
|
+
* in-card beside the control that failed.
|
|
38
|
+
*/
|
|
39
|
+
readonly decisionErrors?: ReadonlyMap<string, Error>;
|
|
40
|
+
/** Additional CSS class names for the root container. */
|
|
41
|
+
readonly className?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The composer-docked decision surface for pending file reviews: renders each
|
|
46
|
+
* AWAITING_REVIEW {@link FileChangeSet} as an interactive {@link FileReviewCard}
|
|
47
|
+
* decision bar, pinned in the fixed strip above the composer.
|
|
48
|
+
*
|
|
49
|
+
* WHY DOCKED, NOT IN-THREAD. The transcript's stamped edit rows are
|
|
50
|
+
* observational — they show what changed, badged with the live review state —
|
|
51
|
+
* but a *decision* the agent is blocked on must never scroll out of view. An
|
|
52
|
+
* in-thread card does exactly that on a long conversation. Docking the bar to
|
|
53
|
+
* the composer keeps the pending decision visible regardless of scroll
|
|
54
|
+
* position, matching the shape of Cursor's own review bar. Once decided, the
|
|
55
|
+
* dock empties and the thread's read-only record (and the rows' Kept/Discarded
|
|
56
|
+
* badges) carry the history.
|
|
57
|
+
*
|
|
58
|
+
* This placement deliberately diverges from tool approvals, which stay inline
|
|
59
|
+
* on their rows (with `ApprovalPeekBar` as the scroll backstop): an approval is
|
|
60
|
+
* call-anchored — "run *this* command" — while a file review is a turn-scoped
|
|
61
|
+
* aggregate over many calls, with no single row that owns it.
|
|
62
|
+
*
|
|
63
|
+
* The expanded per-file body is height-capped with internal scroll: a set that
|
|
64
|
+
* needs per-file attention starts expanded (see {@link FileReviewCard}), and an
|
|
65
|
+
* unconstrained list in a fixed strip would swallow the viewport.
|
|
66
|
+
*
|
|
67
|
+
* Purely presentational — the data and decision routing live in
|
|
68
|
+
* `useSessionConversation` (headless-first, DD-003). `SessionViewer` wires it
|
|
69
|
+
* in by default; platform builders composing a custom layout mount it over the
|
|
70
|
+
* same seam.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* const conv = useSessionConversation(sessionId);
|
|
75
|
+
* <FileReviewDock
|
|
76
|
+
* changeSets={conv.fileChangeSets}
|
|
77
|
+
* onSubmit={conv.submitFileDecision}
|
|
78
|
+
* submittingDecisionKeys={conv.submittingFileDecisionKeys}
|
|
79
|
+
* decisionErrors={conv.fileDecisionErrors}
|
|
80
|
+
* />
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
export function FileReviewDock({
|
|
84
|
+
changeSets,
|
|
85
|
+
onSubmit,
|
|
86
|
+
submittingDecisionKeys,
|
|
87
|
+
decisionErrors,
|
|
88
|
+
className,
|
|
89
|
+
}: FileReviewDockProps) {
|
|
90
|
+
if (changeSets.length === 0) return null;
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<div
|
|
94
|
+
role="region"
|
|
95
|
+
aria-label="File changes awaiting review"
|
|
96
|
+
data-cursor-target="file-review-dock"
|
|
97
|
+
className={cn("border-t border-border-muted", className)}
|
|
98
|
+
>
|
|
99
|
+
{/* The cap bounds the dock, not each card: with the (defensive) multi-set
|
|
100
|
+
case the whole surface stays within reach of the composer. */}
|
|
101
|
+
<div className="max-h-[40vh] space-y-2 overflow-y-auto px-4 py-2">
|
|
102
|
+
{changeSets.map((changeSet) => (
|
|
103
|
+
<DockedChangeSet
|
|
104
|
+
key={changeSet.id}
|
|
105
|
+
changeSet={changeSet}
|
|
106
|
+
onSubmit={onSubmit}
|
|
107
|
+
submittingDecisionKeys={submittingDecisionKeys}
|
|
108
|
+
decisionErrors={decisionErrors}
|
|
109
|
+
/>
|
|
110
|
+
))}
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
interface DockedChangeSetProps {
|
|
117
|
+
readonly changeSet: FileChangeSet;
|
|
118
|
+
readonly onSubmit: (
|
|
119
|
+
changeSetId: string,
|
|
120
|
+
action: FileDecisionAction,
|
|
121
|
+
options?: FileDecisionOptions,
|
|
122
|
+
) => void;
|
|
123
|
+
readonly submittingDecisionKeys?: ReadonlySet<string>;
|
|
124
|
+
readonly decisionErrors?: ReadonlyMap<string, Error>;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* One docked set — binds the set id into the card's `(action, options)` submit
|
|
129
|
+
* signature with a stable callback so `FileReviewCard`'s `React.memo` holds
|
|
130
|
+
* across unrelated stream frames.
|
|
131
|
+
*/
|
|
132
|
+
const DockedChangeSet = memo(function DockedChangeSet({
|
|
133
|
+
changeSet,
|
|
134
|
+
onSubmit,
|
|
135
|
+
submittingDecisionKeys,
|
|
136
|
+
decisionErrors,
|
|
137
|
+
}: DockedChangeSetProps) {
|
|
138
|
+
const handleSubmit = useCallback(
|
|
139
|
+
(action: FileDecisionAction, options?: FileDecisionOptions) => {
|
|
140
|
+
onSubmit(changeSet.id, action, options);
|
|
141
|
+
},
|
|
142
|
+
[onSubmit, changeSet.id],
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<FileReviewCard
|
|
147
|
+
fileChangeSet={changeSet}
|
|
148
|
+
onSubmit={handleSubmit}
|
|
149
|
+
submittingDecisionKeys={submittingDecisionKeys}
|
|
150
|
+
decisionErrors={decisionErrors}
|
|
151
|
+
// The transcript's stamped edit rows show every diff in place, so the
|
|
152
|
+
// docked card renders the compact file list — the decision surface never
|
|
153
|
+
// duplicates the thread's diffs.
|
|
154
|
+
showDiffs={false}
|
|
155
|
+
/>
|
|
156
|
+
);
|
|
157
|
+
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
3
4
|
import type { ToolCall } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
|
|
4
5
|
import { cn } from "@stigmer/theme";
|
|
5
6
|
import { formatDuration } from "./ToolCallDetail";
|
|
@@ -12,6 +13,10 @@ import {
|
|
|
12
13
|
isScalar,
|
|
13
14
|
humanizeArgKey,
|
|
14
15
|
} from "./tool-rendering-primitives";
|
|
16
|
+
import { execIdFromStorageKey } from "./useFileChangeContent";
|
|
17
|
+
import { useArtifactDownloadUrl } from "./useArtifactDownloadUrl";
|
|
18
|
+
import { useArtifactDownload } from "./useArtifactDownload";
|
|
19
|
+
import { useToolOutputContent } from "./useToolOutputContent";
|
|
15
20
|
|
|
16
21
|
/** Props for {@link McpToolDetail}. */
|
|
17
22
|
export interface McpToolDetailProps {
|
|
@@ -55,7 +60,7 @@ export function McpToolDetail({ toolCall, className }: McpToolDetailProps) {
|
|
|
55
60
|
<McpArgsView args={toolCall.args as Record<string, unknown>} />
|
|
56
61
|
)}
|
|
57
62
|
|
|
58
|
-
{toolCall.outputRef?.
|
|
63
|
+
{toolCall.outputRef?.storageKey ? (
|
|
59
64
|
<McpOffloadedOutputView outputRef={toolCall.outputRef} />
|
|
60
65
|
) : (
|
|
61
66
|
toolCall.result && <McpResultView result={toolCall.result} />
|
|
@@ -76,51 +81,112 @@ function formatBytes(n: number): string {
|
|
|
76
81
|
|
|
77
82
|
/**
|
|
78
83
|
* Renders an MCP result whose bytes were offloaded to artifact storage (e.g. a
|
|
79
|
-
* computer-use screenshot).
|
|
80
|
-
*
|
|
81
|
-
*
|
|
84
|
+
* computer-use screenshot). The bytes are resolved on demand from the stable
|
|
85
|
+
* `storageKey` — never from a baked URL, which expires. Images render inline via
|
|
86
|
+
* a freshly minted URL; other large output expands in-app. Mirrors ResultView's
|
|
87
|
+
* outputRef treatment so MCP and non-MCP offloads look consistent (DD-016).
|
|
82
88
|
*/
|
|
83
89
|
function McpOffloadedOutputView({
|
|
84
90
|
outputRef,
|
|
85
91
|
}: {
|
|
86
92
|
readonly outputRef: NonNullable<ToolCall["outputRef"]>;
|
|
87
93
|
}) {
|
|
88
|
-
const size = Number(outputRef.sizeBytes);
|
|
89
94
|
return (
|
|
90
95
|
<div className="space-y-1">
|
|
91
96
|
<span className="font-medium text-muted-foreground">Result</span>
|
|
92
97
|
{outputRef.isImage ? (
|
|
93
|
-
<
|
|
94
|
-
href={outputRef.downloadUrl}
|
|
95
|
-
target="_blank"
|
|
96
|
-
rel="noreferrer"
|
|
97
|
-
className="inline-block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
98
|
-
>
|
|
99
|
-
<img
|
|
100
|
-
src={outputRef.downloadUrl}
|
|
101
|
-
alt="Tool output screenshot"
|
|
102
|
-
loading="lazy"
|
|
103
|
-
className="max-h-96 w-auto rounded-md border border-border"
|
|
104
|
-
/>
|
|
105
|
-
</a>
|
|
98
|
+
<McpOffloadedImage storageKey={outputRef.storageKey} />
|
|
106
99
|
) : (
|
|
107
|
-
<
|
|
100
|
+
<McpOffloadedText outputRef={outputRef} />
|
|
101
|
+
)}
|
|
102
|
+
</div>
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/** Offloaded MCP image output, rendered from an always-fresh presigned URL. */
|
|
107
|
+
function McpOffloadedImage({ storageKey }: { readonly storageKey: string }) {
|
|
108
|
+
const executionId = useMemo(() => execIdFromStorageKey(storageKey), [storageKey]);
|
|
109
|
+
const { url, error } = useArtifactDownloadUrl(executionId, storageKey);
|
|
110
|
+
|
|
111
|
+
if (error) {
|
|
112
|
+
return <p className="text-xs text-destructive">Couldn't load image output.</p>;
|
|
113
|
+
}
|
|
114
|
+
if (!url) {
|
|
115
|
+
return (
|
|
116
|
+
<div
|
|
117
|
+
className="h-40 w-64 animate-pulse rounded-md border border-border bg-muted"
|
|
118
|
+
aria-busy="true"
|
|
119
|
+
aria-label="Loading image output"
|
|
120
|
+
/>
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
return (
|
|
124
|
+
<a
|
|
125
|
+
href={url}
|
|
126
|
+
target="_blank"
|
|
127
|
+
rel="noreferrer"
|
|
128
|
+
className="inline-block focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
129
|
+
>
|
|
130
|
+
<img
|
|
131
|
+
src={url}
|
|
132
|
+
alt="Tool output screenshot"
|
|
133
|
+
loading="lazy"
|
|
134
|
+
className="max-h-96 w-auto rounded-md border border-border"
|
|
135
|
+
/>
|
|
136
|
+
</a>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Offloaded MCP text output. Preview head + a "View full output" toggle that
|
|
142
|
+
* lazily fetches the full content in-app, with a download fallback when the
|
|
143
|
+
* server truncates it.
|
|
144
|
+
*/
|
|
145
|
+
function McpOffloadedText({
|
|
146
|
+
outputRef,
|
|
147
|
+
}: {
|
|
148
|
+
readonly outputRef: NonNullable<ToolCall["outputRef"]>;
|
|
149
|
+
}) {
|
|
150
|
+
const [expanded, setExpanded] = useState(false);
|
|
151
|
+
const executionId = useMemo(() => execIdFromStorageKey(outputRef.storageKey), [outputRef.storageKey]);
|
|
152
|
+
const { content, isLoading, isTruncated, error } = useToolOutputContent(outputRef, expanded);
|
|
153
|
+
const { download, isDownloading } = useArtifactDownload(executionId);
|
|
154
|
+
|
|
155
|
+
const size = Number(outputRef.sizeBytes);
|
|
156
|
+
const sizeSuffix = size ? ` (${formatBytes(size)})` : "";
|
|
157
|
+
const previewClass = "max-h-80 overflow-auto rounded-md border border-border bg-muted-subtle p-2 text-foreground";
|
|
158
|
+
const linkClass = "inline-block text-xs font-medium text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring";
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<div className="space-y-1">
|
|
162
|
+
{!expanded ? (
|
|
163
|
+
<>
|
|
108
164
|
{outputRef.truncatedPreview && (
|
|
109
|
-
<CollapsiblePre
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
165
|
+
<CollapsiblePre content={outputRef.truncatedPreview} className={previewClass} />
|
|
166
|
+
)}
|
|
167
|
+
<button type="button" onClick={() => setExpanded(true)} className={linkClass}>
|
|
168
|
+
View full output{sizeSuffix}
|
|
169
|
+
</button>
|
|
170
|
+
</>
|
|
171
|
+
) : isLoading ? (
|
|
172
|
+
<p className="text-xs text-muted-foreground">Loading full output…</p>
|
|
173
|
+
) : error ? (
|
|
174
|
+
<p className="text-xs text-destructive">Couldn't load full output. Try again.</p>
|
|
175
|
+
) : content !== null ? (
|
|
176
|
+
<div className="space-y-1">
|
|
177
|
+
<CollapsiblePre content={content} className={previewClass} />
|
|
178
|
+
{isTruncated && (
|
|
179
|
+
<button
|
|
180
|
+
type="button"
|
|
181
|
+
onClick={() => download(outputRef.storageKey)}
|
|
182
|
+
disabled={isDownloading}
|
|
183
|
+
className={cn(linkClass, "disabled:opacity-50")}
|
|
184
|
+
>
|
|
185
|
+
{isDownloading ? "Preparing download…" : `Output truncated — download full file${sizeSuffix}`}
|
|
186
|
+
</button>
|
|
113
187
|
)}
|
|
114
|
-
<a
|
|
115
|
-
href={outputRef.downloadUrl}
|
|
116
|
-
target="_blank"
|
|
117
|
-
rel="noreferrer"
|
|
118
|
-
className="inline-block text-xs font-medium text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
119
|
-
>
|
|
120
|
-
View full output{size ? ` (${formatBytes(size)})` : ""}
|
|
121
|
-
</a>
|
|
122
188
|
</div>
|
|
123
|
-
)}
|
|
189
|
+
) : null}
|
|
124
190
|
</div>
|
|
125
191
|
);
|
|
126
192
|
}
|