@stigmer/react 3.1.17 → 3.2.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/agent-instance/AgentInstanceList.d.ts.map +1 -1
- package/agent-instance/AgentInstanceList.js +11 -3
- package/agent-instance/AgentInstanceList.js.map +1 -1
- package/channel/AgentChannelsPanel.d.ts +60 -0
- package/channel/AgentChannelsPanel.d.ts.map +1 -0
- package/channel/AgentChannelsPanel.js +255 -0
- package/channel/AgentChannelsPanel.js.map +1 -0
- package/channel/ChannelConversationsDialog.d.ts +41 -0
- package/channel/ChannelConversationsDialog.d.ts.map +1 -0
- package/channel/ChannelConversationsDialog.js +94 -0
- package/channel/ChannelConversationsDialog.js.map +1 -0
- package/channel/ChannelCredentialsDialog.d.ts +37 -0
- package/channel/ChannelCredentialsDialog.d.ts.map +1 -0
- package/channel/ChannelCredentialsDialog.js +75 -0
- package/channel/ChannelCredentialsDialog.js.map +1 -0
- package/channel/ChannelToolCredentials.d.ts +31 -0
- package/channel/ChannelToolCredentials.d.ts.map +1 -0
- package/channel/ChannelToolCredentials.js +41 -0
- package/channel/ChannelToolCredentials.js.map +1 -0
- package/channel/ConnectSlackDialog.d.ts +61 -0
- package/channel/ConnectSlackDialog.d.ts.map +1 -0
- package/channel/ConnectSlackDialog.js +238 -0
- package/channel/ConnectSlackDialog.js.map +1 -0
- package/channel/ConnectWhatsAppDialog.d.ts +70 -0
- package/channel/ConnectWhatsAppDialog.d.ts.map +1 -0
- package/channel/ConnectWhatsAppDialog.js +256 -0
- package/channel/ConnectWhatsAppDialog.js.map +1 -0
- package/channel/SlackMarkIcon.d.ts +11 -0
- package/channel/SlackMarkIcon.d.ts.map +1 -0
- package/channel/SlackMarkIcon.js +13 -0
- package/channel/SlackMarkIcon.js.map +1 -0
- package/channel/WhatsAppMarkIcon.d.ts +12 -0
- package/channel/WhatsAppMarkIcon.d.ts.map +1 -0
- package/channel/WhatsAppMarkIcon.js +14 -0
- package/channel/WhatsAppMarkIcon.js.map +1 -0
- package/channel/connect/ServingAppSection.d.ts +57 -0
- package/channel/connect/ServingAppSection.d.ts.map +1 -0
- package/channel/connect/ServingAppSection.js +49 -0
- package/channel/connect/ServingAppSection.js.map +1 -0
- package/channel/connect/ToolCredentialsSection.d.ts +20 -0
- package/channel/connect/ToolCredentialsSection.d.ts.map +1 -0
- package/channel/connect/ToolCredentialsSection.js +22 -0
- package/channel/connect/ToolCredentialsSection.js.map +1 -0
- package/channel/connect/VerbatimRefusal.d.ts +16 -0
- package/channel/connect/VerbatimRefusal.d.ts.map +1 -0
- package/channel/connect/VerbatimRefusal.js +18 -0
- package/channel/connect/VerbatimRefusal.js.map +1 -0
- package/channel/connect/icons.d.ts +16 -0
- package/channel/connect/icons.d.ts.map +1 -0
- package/channel/connect/icons.js +21 -0
- package/channel/connect/icons.js.map +1 -0
- package/channel/index.d.ts +36 -0
- package/channel/index.d.ts.map +1 -0
- package/channel/index.js +19 -0
- package/channel/index.js.map +1 -0
- package/channel/providerPresentation.d.ts +44 -0
- package/channel/providerPresentation.d.ts.map +1 -0
- package/channel/providerPresentation.js +106 -0
- package/channel/providerPresentation.js.map +1 -0
- package/channel/providers.d.ts +62 -0
- package/channel/providers.d.ts.map +1 -0
- package/channel/providers.js +26 -0
- package/channel/providers.js.map +1 -0
- package/channel/useAgentChannel.d.ts +31 -0
- package/channel/useAgentChannel.d.ts.map +1 -0
- package/channel/useAgentChannel.js +34 -0
- package/channel/useAgentChannel.js.map +1 -0
- package/channel/useAgentChannelList.d.ts +43 -0
- package/channel/useAgentChannelList.d.ts.map +1 -0
- package/channel/useAgentChannelList.js +39 -0
- package/channel/useAgentChannelList.js.map +1 -0
- package/channel/useChannelSessions.d.ts +47 -0
- package/channel/useChannelSessions.d.ts.map +1 -0
- package/channel/useChannelSessions.js +38 -0
- package/channel/useChannelSessions.js.map +1 -0
- package/channel/useChannelToolReadiness.d.ts +23 -0
- package/channel/useChannelToolReadiness.d.ts.map +1 -0
- package/channel/useChannelToolReadiness.js +28 -0
- package/channel/useChannelToolReadiness.js.map +1 -0
- package/channel/useConnectSlackChannel.d.ts +75 -0
- package/channel/useConnectSlackChannel.d.ts.map +1 -0
- package/channel/useConnectSlackChannel.js +115 -0
- package/channel/useConnectSlackChannel.js.map +1 -0
- package/channel/useCreateAgentChannel.d.ts +42 -0
- package/channel/useCreateAgentChannel.d.ts.map +1 -0
- package/channel/useCreateAgentChannel.js +48 -0
- package/channel/useCreateAgentChannel.js.map +1 -0
- package/channel/useDeleteAgentChannel.d.ts +40 -0
- package/channel/useDeleteAgentChannel.d.ts.map +1 -0
- package/channel/useDeleteAgentChannel.js +44 -0
- package/channel/useDeleteAgentChannel.js.map +1 -0
- package/channel/useInstallChannel.d.ts +60 -0
- package/channel/useInstallChannel.d.ts.map +1 -0
- package/channel/useInstallChannel.js +63 -0
- package/channel/useInstallChannel.js.map +1 -0
- package/channel/useOrgAgentChannelList.d.ts +32 -0
- package/channel/useOrgAgentChannelList.d.ts.map +1 -0
- package/channel/useOrgAgentChannelList.js +29 -0
- package/channel/useOrgAgentChannelList.js.map +1 -0
- package/channel/useSaveAgentChannel.d.ts +63 -0
- package/channel/useSaveAgentChannel.d.ts.map +1 -0
- package/channel/useSaveAgentChannel.js +104 -0
- package/channel/useSaveAgentChannel.js.map +1 -0
- package/channel-app/ChannelAppDetailPanel.d.ts +46 -0
- package/channel-app/ChannelAppDetailPanel.d.ts.map +1 -0
- package/channel-app/ChannelAppDetailPanel.js +142 -0
- package/channel-app/ChannelAppDetailPanel.js.map +1 -0
- package/channel-app/ChannelAppListPanel.d.ts +36 -0
- package/channel-app/ChannelAppListPanel.d.ts.map +1 -0
- package/channel-app/ChannelAppListPanel.js +63 -0
- package/channel-app/ChannelAppListPanel.js.map +1 -0
- package/channel-app/CreateChannelAppForm.d.ts +54 -0
- package/channel-app/CreateChannelAppForm.d.ts.map +1 -0
- package/channel-app/CreateChannelAppForm.js +140 -0
- package/channel-app/CreateChannelAppForm.js.map +1 -0
- package/channel-app/index.d.ts +18 -0
- package/channel-app/index.d.ts.map +1 -0
- package/channel-app/index.js +10 -0
- package/channel-app/index.js.map +1 -0
- package/channel-app/internal.d.ts +33 -0
- package/channel-app/internal.d.ts.map +1 -0
- package/channel-app/internal.js +44 -0
- package/channel-app/internal.js.map +1 -0
- package/channel-app/slackAppSetup.d.ts +80 -0
- package/channel-app/slackAppSetup.d.ts.map +1 -0
- package/channel-app/slackAppSetup.js +123 -0
- package/channel-app/slackAppSetup.js.map +1 -0
- package/channel-app/useChannelAppList.d.ts +35 -0
- package/channel-app/useChannelAppList.d.ts.map +1 -0
- package/channel-app/useChannelAppList.js +34 -0
- package/channel-app/useChannelAppList.js.map +1 -0
- package/channel-app/useCreateChannelApp.d.ts +39 -0
- package/channel-app/useCreateChannelApp.d.ts.map +1 -0
- package/channel-app/useCreateChannelApp.js +50 -0
- package/channel-app/useCreateChannelApp.js.map +1 -0
- package/channel-app/useDeleteChannelApp.d.ts +31 -0
- package/channel-app/useDeleteChannelApp.d.ts.map +1 -0
- package/channel-app/useDeleteChannelApp.js +43 -0
- package/channel-app/useDeleteChannelApp.js.map +1 -0
- package/channel-app/useUpdateChannelApp.d.ts +39 -0
- package/channel-app/useUpdateChannelApp.d.ts.map +1 -0
- package/channel-app/useUpdateChannelApp.js +50 -0
- package/channel-app/useUpdateChannelApp.js.map +1 -0
- package/channel-app/whatsappAppSetup.d.ts +51 -0
- package/channel-app/whatsappAppSetup.d.ts.map +1 -0
- package/channel-app/whatsappAppSetup.js +57 -0
- package/channel-app/whatsappAppSetup.js.map +1 -0
- package/environment/index.d.ts +2 -0
- package/environment/index.d.ts.map +1 -1
- package/environment/index.js +1 -0
- package/environment/index.js.map +1 -1
- package/environment/useToolCredentialsReadiness.d.ts +52 -0
- package/environment/useToolCredentialsReadiness.d.ts.map +1 -0
- package/environment/useToolCredentialsReadiness.js +84 -0
- package/environment/useToolCredentialsReadiness.js.map +1 -0
- package/execution/ArtifactContentBody.d.ts.map +1 -1
- package/execution/ArtifactContentBody.js +5 -21
- package/execution/ArtifactContentBody.js.map +1 -1
- package/execution/ArtifactFileContent.d.ts +28 -0
- package/execution/ArtifactFileContent.d.ts.map +1 -0
- package/execution/ArtifactFileContent.js +36 -0
- package/execution/ArtifactFileContent.js.map +1 -0
- package/execution/ArtifactRow.d.ts +8 -20
- package/execution/ArtifactRow.d.ts.map +1 -1
- package/execution/ArtifactRow.js +12 -45
- package/execution/ArtifactRow.js.map +1 -1
- package/execution/ArtifactRowView.d.ts +43 -0
- package/execution/ArtifactRowView.d.ts.map +1 -0
- package/execution/ArtifactRowView.js +35 -0
- package/execution/ArtifactRowView.js.map +1 -0
- package/execution/FileChangesView.d.ts.map +1 -1
- package/execution/FileChangesView.js +1 -61
- package/execution/FileChangesView.js.map +1 -1
- package/execution/SubAgentSection.d.ts.map +1 -1
- package/execution/SubAgentSection.js +4 -15
- package/execution/SubAgentSection.js.map +1 -1
- package/execution/ToolCallItem.d.ts.map +1 -1
- package/execution/ToolCallItem.js +16 -61
- package/execution/ToolCallItem.js.map +1 -1
- package/execution/agent-execution-document.d.ts +31 -0
- package/execution/agent-execution-document.d.ts.map +1 -0
- package/execution/agent-execution-document.js +48 -0
- package/execution/agent-execution-document.js.map +1 -0
- package/{session → execution}/artifact-document.d.ts +2 -3
- package/execution/artifact-document.d.ts.map +1 -0
- package/execution/artifact-document.js +23 -0
- package/execution/artifact-document.js.map +1 -0
- package/execution/artifact-row-item.d.ts +56 -0
- package/execution/artifact-row-item.d.ts.map +1 -0
- package/execution/artifact-row-item.js +57 -0
- package/execution/artifact-row-item.js.map +1 -0
- package/execution/deriveExecutionFileChanges.d.ts +55 -0
- package/execution/deriveExecutionFileChanges.d.ts.map +1 -0
- package/execution/deriveExecutionFileChanges.js +216 -0
- package/execution/deriveExecutionFileChanges.js.map +1 -0
- package/execution/file-change-document.d.ts +22 -0
- package/execution/file-change-document.d.ts.map +1 -0
- package/execution/file-change-document.js +34 -0
- package/execution/file-change-document.js.map +1 -0
- package/execution/index.d.ts +14 -0
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js +9 -0
- package/execution/index.js.map +1 -1
- package/execution/useArtifactContentById.d.ts +61 -0
- package/execution/useArtifactContentById.d.ts.map +1 -0
- package/execution/useArtifactContentById.js +63 -0
- package/execution/useArtifactContentById.js.map +1 -0
- package/execution/useArtifactDownload.d.ts +4 -3
- package/execution/useArtifactDownload.d.ts.map +1 -1
- package/execution/useArtifactDownload.js +4 -3
- package/execution/useArtifactDownload.js.map +1 -1
- package/execution/useCreateAgentExecution.d.ts +1 -1
- package/execution/useLiveAgentExecution.d.ts +59 -0
- package/execution/useLiveAgentExecution.d.ts.map +1 -0
- package/execution/useLiveAgentExecution.js +73 -0
- package/execution/useLiveAgentExecution.js.map +1 -0
- package/index.d.ts +15 -10
- package/index.d.ts.map +1 -1
- package/index.js +21 -6
- package/index.js.map +1 -1
- package/internal/DecisionButton.d.ts +4 -3
- package/internal/DecisionButton.d.ts.map +1 -1
- package/internal/DecisionButton.js +4 -3
- package/internal/DecisionButton.js.map +1 -1
- package/internal/oauthPopup.d.ts +101 -0
- package/internal/oauthPopup.d.ts.map +1 -0
- package/internal/oauthPopup.js +208 -0
- package/internal/oauthPopup.js.map +1 -0
- package/internal/store/index.d.ts +0 -2
- package/internal/store/index.d.ts.map +1 -1
- package/internal/store/index.js +0 -1
- package/internal/store/index.js.map +1 -1
- package/internal/store/workflow-execution-event-store.d.ts +34 -1
- package/internal/store/workflow-execution-event-store.d.ts.map +1 -1
- package/internal/store/workflow-execution-event-store.js +81 -3
- package/internal/store/workflow-execution-event-store.js.map +1 -1
- package/internal/store/workspace-file-selection-store.d.ts +1 -2
- package/internal/store/workspace-file-selection-store.d.ts.map +1 -1
- package/internal/store/workspace-file-selection-store.js +2 -5
- package/internal/store/workspace-file-selection-store.js.map +1 -1
- package/internal/thread-card/ThreadCardShell.d.ts +91 -0
- package/internal/thread-card/ThreadCardShell.d.ts.map +1 -0
- package/internal/thread-card/ThreadCardShell.js +41 -0
- package/internal/thread-card/ThreadCardShell.js.map +1 -0
- package/internal/thread-card/glyphs.d.ts +34 -0
- package/internal/thread-card/glyphs.d.ts.map +1 -0
- package/internal/thread-card/glyphs.js +50 -0
- package/internal/thread-card/glyphs.js.map +1 -0
- package/internal/thread-card/index.d.ts +3 -0
- package/internal/thread-card/index.d.ts.map +1 -0
- package/internal/thread-card/index.js +3 -0
- package/internal/thread-card/index.js.map +1 -0
- package/internal/useRevealLine.d.ts +2 -2
- package/internal/useRevealLine.js +2 -2
- package/mcp-server/OAuthCallbackHandler.js +1 -1
- package/mcp-server/OAuthCallbackHandler.js.map +1 -1
- package/mcp-server/useMcpServerOAuthConnect.d.ts +4 -23
- package/mcp-server/useMcpServerOAuthConnect.d.ts.map +1 -1
- package/mcp-server/useMcpServerOAuthConnect.js +12 -145
- package/mcp-server/useMcpServerOAuthConnect.js.map +1 -1
- package/package.json +4 -4
- package/session/NewSessionViewer.d.ts.map +1 -1
- package/session/NewSessionViewer.js +0 -1
- package/session/NewSessionViewer.js.map +1 -1
- package/session/SessionPanelChip.d.ts +7 -22
- package/session/SessionPanelChip.d.ts.map +1 -1
- package/session/SessionPanelChip.js +8 -36
- package/session/SessionPanelChip.js.map +1 -1
- package/session/SessionViewer.d.ts +7 -4
- package/session/SessionViewer.d.ts.map +1 -1
- package/session/SessionViewer.js +32 -30
- package/session/SessionViewer.js.map +1 -1
- package/session/audience.d.ts +15 -1
- package/session/audience.d.ts.map +1 -1
- package/session/channelOrigin.d.ts +33 -0
- package/session/channelOrigin.d.ts.map +1 -0
- package/session/channelOrigin.js +36 -0
- package/session/channelOrigin.js.map +1 -0
- package/session/facets/index.d.ts +0 -2
- package/session/facets/index.d.ts.map +1 -1
- package/session/facets/index.js +0 -1
- package/session/facets/index.js.map +1 -1
- package/session/index.d.ts +2 -2
- package/session/index.d.ts.map +1 -1
- package/session/index.js +5 -3
- package/session/index.js.map +1 -1
- package/session/useSessionFileChanges.d.ts +10 -34
- package/session/useSessionFileChanges.d.ts.map +1 -1
- package/session/useSessionFileChanges.js +9 -141
- package/session/useSessionFileChanges.js.map +1 -1
- package/session/useSessionPanel.d.ts +5 -15
- package/session/useSessionPanel.d.ts.map +1 -1
- package/session/useSessionPanel.js +3 -35
- package/session/useSessionPanel.js.map +1 -1
- package/session/useSessionRailViews.d.ts +3 -6
- package/session/useSessionRailViews.d.ts.map +1 -1
- package/session/useSessionRailViews.js +3 -17
- package/session/useSessionRailViews.js.map +1 -1
- package/settings/ChannelAppsSection.d.ts +13 -0
- package/settings/ChannelAppsSection.d.ts.map +1 -0
- package/settings/ChannelAppsSection.js +48 -0
- package/settings/ChannelAppsSection.js.map +1 -0
- package/settings/index.d.ts +1 -0
- package/settings/index.d.ts.map +1 -1
- package/settings/index.js +1 -0
- package/settings/index.js.map +1 -1
- package/settings/settings-nav.d.ts.map +1 -1
- package/settings/settings-nav.js +6 -1
- package/settings/settings-nav.js.map +1 -1
- package/sharing/AgentShareList.d.ts.map +1 -1
- package/sharing/AgentShareList.js +11 -3
- package/sharing/AgentShareList.js.map +1 -1
- package/sharing/ShareAgentDialog.js +1 -1
- package/sharing/useShareToolReadiness.d.ts +9 -38
- package/sharing/useShareToolReadiness.d.ts.map +1 -1
- package/sharing/useShareToolReadiness.js +7 -72
- package/sharing/useShareToolReadiness.js.map +1 -1
- package/src/agent-instance/AgentInstanceList.tsx +60 -42
- package/src/agent-instance/__tests__/AgentInstanceList.test.tsx +161 -0
- package/src/channel/AgentChannelsPanel.tsx +688 -0
- package/src/channel/ChannelConversationsDialog.tsx +267 -0
- package/src/channel/ChannelCredentialsDialog.tsx +219 -0
- package/src/channel/ChannelToolCredentials.tsx +124 -0
- package/src/channel/ConnectSlackDialog.tsx +611 -0
- package/src/channel/ConnectWhatsAppDialog.tsx +624 -0
- package/src/channel/SlackMarkIcon.tsx +21 -0
- package/src/channel/WhatsAppMarkIcon.tsx +22 -0
- package/src/channel/__tests__/AgentChannelsPanel.test.tsx +638 -0
- package/src/channel/__tests__/ChannelConversationsDialog.test.tsx +114 -0
- package/src/channel/__tests__/ChannelCredentialsDialog.test.tsx +240 -0
- package/src/channel/__tests__/ConnectSlackDialog.test.tsx +659 -0
- package/src/channel/__tests__/ConnectWhatsAppDialog.test.tsx +564 -0
- package/src/channel/__tests__/providers.test.ts +118 -0
- package/src/channel/__tests__/useAgentChannel.test.tsx +116 -0
- package/src/channel/__tests__/useAgentChannelList.test.tsx +166 -0
- package/src/channel/__tests__/useChannelSessions.test.tsx +95 -0
- package/src/channel/__tests__/useChannelToolReadiness.test.tsx +158 -0
- package/src/channel/__tests__/useConnectSlackChannel.test.tsx +276 -0
- package/src/channel/__tests__/useDeleteAgentChannel.test.tsx +97 -0
- package/src/channel/__tests__/useInstallChannel.test.tsx +177 -0
- package/src/channel/__tests__/useSaveAgentChannel.test.tsx +294 -0
- package/src/channel/connect/ServingAppSection.tsx +185 -0
- package/src/channel/connect/ToolCredentialsSection.tsx +67 -0
- package/src/channel/connect/VerbatimRefusal.tsx +27 -0
- package/src/channel/connect/icons.tsx +42 -0
- package/src/channel/index.ts +65 -0
- package/src/channel/providerPresentation.ts +154 -0
- package/src/channel/providers.ts +73 -0
- package/src/channel/useAgentChannel.ts +58 -0
- package/src/channel/useAgentChannelList.ts +69 -0
- package/src/channel/useChannelSessions.ts +73 -0
- package/src/channel/useChannelToolReadiness.ts +39 -0
- package/src/channel/useConnectSlackChannel.ts +195 -0
- package/src/channel/useCreateAgentChannel.ts +73 -0
- package/src/channel/useDeleteAgentChannel.ts +71 -0
- package/src/channel/useInstallChannel.ts +117 -0
- package/src/channel/useOrgAgentChannelList.ts +60 -0
- package/src/channel/useSaveAgentChannel.ts +133 -0
- package/src/channel-app/ChannelAppDetailPanel.tsx +510 -0
- package/src/channel-app/ChannelAppListPanel.tsx +201 -0
- package/src/channel-app/CreateChannelAppForm.tsx +529 -0
- package/src/channel-app/__tests__/channelAppWhatsApp.test.tsx +270 -0
- package/src/channel-app/__tests__/slackAppSetup.test.ts +75 -0
- package/src/channel-app/__tests__/useChannelAppHooks.test.tsx +157 -0
- package/src/channel-app/__tests__/whatsappAppSetup.test.ts +39 -0
- package/src/channel-app/index.ts +30 -0
- package/src/channel-app/internal.tsx +180 -0
- package/src/channel-app/slackAppSetup.ts +153 -0
- package/src/channel-app/useChannelAppList.ts +59 -0
- package/src/channel-app/useCreateChannelApp.ts +70 -0
- package/src/channel-app/useDeleteChannelApp.ts +62 -0
- package/src/channel-app/useUpdateChannelApp.ts +70 -0
- package/src/channel-app/whatsappAppSetup.ts +62 -0
- package/src/environment/index.ts +2 -0
- package/src/environment/useToolCredentialsReadiness.ts +122 -0
- package/src/execution/ArtifactContentBody.tsx +6 -88
- package/src/execution/ArtifactFileContent.tsx +110 -0
- package/src/execution/ArtifactRow.tsx +28 -118
- package/src/execution/ArtifactRowView.tsx +137 -0
- package/src/execution/FileChangesView.tsx +4 -69
- package/src/execution/SubAgentSection.tsx +2 -36
- package/src/execution/ToolCallItem.tsx +48 -175
- package/src/execution/__tests__/ArtifactFileContent.test.tsx +60 -0
- package/src/execution/__tests__/ArtifactRowView.test.tsx +78 -0
- package/src/execution/__tests__/agent-execution-document.test.ts +45 -0
- package/src/execution/__tests__/artifact-row-item.test.ts +128 -0
- package/src/execution/__tests__/deriveExecutionFileChanges.test.ts +270 -0
- package/src/execution/__tests__/useArtifactContentById.test.tsx +85 -0
- package/src/execution/__tests__/useLiveAgentExecution.test.tsx +202 -0
- package/src/execution/agent-execution-document.ts +54 -0
- package/src/execution/artifact-document.ts +24 -0
- package/src/execution/artifact-row-item.ts +97 -0
- package/src/execution/deriveExecutionFileChanges.ts +237 -0
- package/src/execution/file-change-document.ts +37 -0
- package/src/execution/index.ts +36 -0
- package/src/execution/useArtifactContentById.ts +120 -0
- package/src/execution/useArtifactDownload.ts +4 -3
- package/src/execution/useCreateAgentExecution.ts +1 -1
- package/src/execution/useLiveAgentExecution.ts +127 -0
- package/src/index.ts +155 -11
- package/src/internal/DecisionButton.tsx +4 -3
- package/src/internal/__tests__/ThreadCardShell.test.tsx +105 -0
- package/src/internal/__tests__/oauthPopup.test.ts +245 -0
- package/src/internal/oauthPopup.ts +261 -0
- package/src/internal/store/__tests__/workflow-execution-event-store.test.ts +375 -5
- package/src/internal/store/index.ts +0 -3
- package/src/internal/store/workflow-execution-event-store.ts +123 -4
- package/src/internal/store/workspace-file-selection-store.ts +2 -5
- package/src/internal/thread-card/ThreadCardShell.tsx +189 -0
- package/src/internal/thread-card/glyphs.tsx +108 -0
- package/src/internal/thread-card/index.ts +19 -0
- package/src/internal/useRevealLine.ts +2 -2
- package/src/mcp-server/OAuthCallbackHandler.tsx +2 -2
- package/src/mcp-server/useMcpServerOAuthConnect.ts +22 -184
- package/src/session/NewSessionViewer.tsx +0 -1
- package/src/session/SessionPanelChip.tsx +10 -96
- package/src/session/SessionViewer.tsx +170 -144
- package/src/session/__tests__/SessionViewer-artifactTabs.test.tsx +1 -1
- package/src/session/__tests__/observerAudience.test.tsx +241 -0
- package/src/session/__tests__/useSessionPanel.test.ts +6 -61
- package/src/session/__tests__/useSessionRailViews.test.tsx +5 -27
- package/src/session/audience.ts +15 -1
- package/src/session/channelOrigin.ts +45 -0
- package/src/session/facets/index.ts +0 -3
- package/src/session/index.ts +9 -6
- package/src/session/useSessionFileChanges.ts +12 -153
- package/src/session/useSessionPanel.ts +8 -51
- package/src/session/useSessionRailViews.tsx +2 -27
- package/src/settings/ChannelAppsSection.tsx +133 -0
- package/src/settings/index.ts +1 -0
- package/src/settings/settings-nav.ts +6 -0
- package/src/sharing/AgentShareList.tsx +85 -64
- package/src/sharing/ShareAgentDialog.tsx +1 -1
- package/src/sharing/__tests__/AgentShareList.test.tsx +92 -12
- package/src/sharing/useShareToolReadiness.ts +13 -101
- package/src/workflow/WorkflowAgentExecutionDocument.tsx +283 -0
- package/src/workflow/WorkflowApprovalList.tsx +158 -0
- package/src/workflow/WorkflowArtifactDocument.tsx +257 -0
- package/src/workflow/WorkflowExecutionGraph.tsx +40 -78
- package/src/workflow/WorkflowExecutionViewer.tsx +610 -287
- package/src/workflow/WorkflowFileReviewList.tsx +1 -1
- package/src/workflow/WorkflowTaskApprovalCard.tsx +5 -4
- package/src/workflow/WorkflowTaskApprovalSummary.tsx +6 -6
- package/src/workflow/__tests__/WorkflowAgentExecutionDocument.test.tsx +651 -0
- package/src/workflow/__tests__/WorkflowApprovalList.test.tsx +229 -0
- package/src/workflow/__tests__/WorkflowArtifactDocument.test.tsx +90 -0
- package/src/workflow/__tests__/WorkflowArtifactsTab.test.tsx +85 -0
- package/src/workflow/__tests__/WorkflowChangesTab.test.tsx +113 -0
- package/src/workflow/__tests__/WorkflowExecutionViewer.approvals.test.tsx +473 -0
- package/src/workflow/__tests__/WorkflowExecutionViewer.reconciliation.test.tsx +632 -0
- package/src/workflow/__tests__/WorkflowTaskApprovalSummary.test.tsx +1 -1
- package/src/workflow/__tests__/WorkflowTaskThread.test.tsx +947 -0
- package/src/workflow/__tests__/WorkflowUsageTab.test.tsx +163 -0
- package/src/workflow/__tests__/agent-call-live-experience.test.ts +6 -53
- package/src/workflow/__tests__/derive-execution-overlays.test.ts +4 -0
- package/src/workflow/__tests__/deriveWorkflowArtifactItems.test.ts +71 -0
- package/src/workflow/__tests__/deriveWorkflowUsageItems.test.ts +132 -0
- package/src/workflow/__tests__/execution-graph.test.ts +8 -0
- package/src/workflow/__tests__/project-thread-items.test.ts +428 -0
- package/src/workflow/__tests__/structured-data-viewer.test.tsx +1 -1
- package/src/workflow/__tests__/task-approval.test.ts +149 -0
- package/src/workflow/__tests__/task-detail-io.test.ts +40 -0
- package/src/workflow/__tests__/task-presentation.test.ts +479 -0
- package/src/workflow/__tests__/useActiveTaskName.test.ts +4 -0
- package/src/workflow/__tests__/useApprovalBoundary.test.ts +158 -0
- package/src/workflow/__tests__/useExecutionAnnouncements.test.ts +4 -0
- package/src/workflow/__tests__/useFollowExecution.test.ts +2 -89
- package/src/workflow/__tests__/useWorkflowExecutionFileChanges.test.tsx +412 -0
- package/src/workflow/__tests__/useWorkflowExecutionPanel.test.ts +297 -0
- package/src/workflow/__tests__/useWorkflowExecutionRailViews.test.tsx +115 -0
- package/src/workflow/deriveWorkflowArtifactItems.ts +59 -0
- package/src/workflow/deriveWorkflowUsageItems.ts +73 -0
- package/src/workflow/diagnosis-document.ts +31 -0
- package/src/workflow/execution/index.ts +0 -15
- package/src/workflow/facets/WorkflowArtifactsTab.tsx +99 -0
- package/src/workflow/facets/WorkflowChangesTab.tsx +129 -0
- package/src/workflow/facets/WorkflowUsageTab.tsx +258 -0
- package/src/workflow/format-utils.ts +2 -3
- package/src/workflow/index.ts +106 -62
- package/src/workflow/inspector/index.ts +0 -4
- package/src/workflow/instance/WorkflowInstanceList.tsx +59 -41
- package/src/workflow/instance/__tests__/WorkflowInstanceList.test.tsx +156 -0
- package/src/workflow/task-detail/index.ts +11 -0
- package/src/workflow/task-detail/task-approval.ts +158 -0
- package/src/workflow/task-detail/task-detail-io.ts +65 -0
- package/src/workflow/thread/WorkflowTaskThread.tsx +845 -0
- package/src/workflow/thread/project-thread-items.ts +235 -0
- package/src/workflow/thread/task-presentation.ts +427 -0
- package/src/workflow/thread/thread-presentation.ts +59 -0
- package/src/workflow/thread/useWorkflowThreadItems.ts +34 -0
- package/src/workflow/useApprovalBoundary.ts +72 -0
- package/src/workflow/useFollowExecution.ts +0 -26
- package/src/workflow/useWorkflowArtifactDownload.ts +68 -0
- package/src/workflow/useWorkflowExecutionActions.ts +3 -2
- package/src/workflow/useWorkflowExecutionFileChanges.ts +341 -0
- package/src/workflow/useWorkflowExecutionGraph.ts +3 -43
- package/src/workflow/useWorkflowExecutionPanel.ts +292 -0
- package/src/workflow/useWorkflowExecutionRailViews.tsx +173 -0
- package/src/workspace/FileViewer.tsx +3 -3
- package/src/workspace/PanelChip.tsx +103 -0
- package/src/workspace/WorkspaceSurface.tsx +50 -6
- package/src/workspace/__tests__/WorkspaceSurface.test.tsx +110 -0
- package/src/workspace/index.ts +3 -0
- package/styles.css +1 -1
- package/workflow/WorkflowAgentExecutionDocument.d.ts +79 -0
- package/workflow/WorkflowAgentExecutionDocument.d.ts.map +1 -0
- package/workflow/WorkflowAgentExecutionDocument.js +87 -0
- package/workflow/WorkflowAgentExecutionDocument.js.map +1 -0
- package/workflow/WorkflowApprovalList.d.ts +62 -0
- package/workflow/WorkflowApprovalList.d.ts.map +1 -0
- package/workflow/WorkflowApprovalList.js +52 -0
- package/workflow/WorkflowApprovalList.js.map +1 -0
- package/workflow/WorkflowArtifactDocument.d.ts +29 -0
- package/workflow/WorkflowArtifactDocument.d.ts.map +1 -0
- package/workflow/WorkflowArtifactDocument.js +89 -0
- package/workflow/WorkflowArtifactDocument.js.map +1 -0
- package/workflow/WorkflowExecutionGraph.d.ts +15 -13
- package/workflow/WorkflowExecutionGraph.d.ts.map +1 -1
- package/workflow/WorkflowExecutionGraph.js +18 -53
- package/workflow/WorkflowExecutionGraph.js.map +1 -1
- package/workflow/WorkflowExecutionViewer.d.ts +8 -5
- package/workflow/WorkflowExecutionViewer.d.ts.map +1 -1
- package/workflow/WorkflowExecutionViewer.js +329 -54
- package/workflow/WorkflowExecutionViewer.js.map +1 -1
- package/workflow/WorkflowFileReviewList.d.ts +1 -1
- package/workflow/WorkflowFileReviewList.js +1 -1
- package/workflow/WorkflowTaskApprovalCard.d.ts +4 -3
- package/workflow/WorkflowTaskApprovalCard.d.ts.map +1 -1
- package/workflow/WorkflowTaskApprovalCard.js +5 -4
- package/workflow/WorkflowTaskApprovalCard.js.map +1 -1
- package/workflow/WorkflowTaskApprovalSummary.d.ts +6 -6
- package/workflow/WorkflowTaskApprovalSummary.js +5 -5
- package/workflow/deriveWorkflowArtifactItems.d.ts +30 -0
- package/workflow/deriveWorkflowArtifactItems.d.ts.map +1 -0
- package/workflow/deriveWorkflowArtifactItems.js +38 -0
- package/workflow/deriveWorkflowArtifactItems.js.map +1 -0
- package/workflow/deriveWorkflowUsageItems.d.ts +36 -0
- package/workflow/deriveWorkflowUsageItems.d.ts.map +1 -0
- package/workflow/deriveWorkflowUsageItems.js +50 -0
- package/workflow/deriveWorkflowUsageItems.js.map +1 -0
- package/workflow/diagnosis-document.d.ts +17 -0
- package/workflow/diagnosis-document.d.ts.map +1 -0
- package/workflow/diagnosis-document.js +29 -0
- package/workflow/diagnosis-document.js.map +1 -0
- package/workflow/execution/index.d.ts +0 -2
- package/workflow/execution/index.d.ts.map +1 -1
- package/workflow/execution/index.js +0 -2
- package/workflow/execution/index.js.map +1 -1
- package/workflow/facets/WorkflowArtifactsTab.d.ts +26 -0
- package/workflow/facets/WorkflowArtifactsTab.d.ts.map +1 -0
- package/workflow/facets/WorkflowArtifactsTab.js +34 -0
- package/workflow/facets/WorkflowArtifactsTab.js.map +1 -0
- package/workflow/facets/WorkflowChangesTab.d.ts +37 -0
- package/workflow/facets/WorkflowChangesTab.d.ts.map +1 -0
- package/workflow/facets/WorkflowChangesTab.js +50 -0
- package/workflow/facets/WorkflowChangesTab.js.map +1 -0
- package/workflow/facets/WorkflowUsageTab.d.ts +27 -0
- package/workflow/facets/WorkflowUsageTab.d.ts.map +1 -0
- package/workflow/facets/WorkflowUsageTab.js +87 -0
- package/workflow/facets/WorkflowUsageTab.js.map +1 -0
- package/workflow/format-utils.d.ts +2 -3
- package/workflow/format-utils.d.ts.map +1 -1
- package/workflow/format-utils.js +2 -3
- package/workflow/format-utils.js.map +1 -1
- package/workflow/index.d.ts +21 -10
- package/workflow/index.d.ts.map +1 -1
- package/workflow/index.js +29 -14
- package/workflow/index.js.map +1 -1
- package/workflow/inspector/index.d.ts +0 -2
- package/workflow/inspector/index.d.ts.map +1 -1
- package/workflow/inspector/index.js +0 -2
- package/workflow/inspector/index.js.map +1 -1
- package/workflow/instance/WorkflowInstanceList.d.ts.map +1 -1
- package/workflow/instance/WorkflowInstanceList.js +11 -3
- package/workflow/instance/WorkflowInstanceList.js.map +1 -1
- package/workflow/task-detail/StructuredDataViewer.d.ts.map +1 -0
- package/workflow/task-detail/StructuredDataViewer.js.map +1 -0
- package/workflow/task-detail/index.d.ts +4 -0
- package/workflow/task-detail/index.d.ts.map +1 -0
- package/workflow/task-detail/index.js +4 -0
- package/workflow/task-detail/index.js.map +1 -0
- package/workflow/task-detail/task-approval.d.ts +89 -0
- package/workflow/task-detail/task-approval.d.ts.map +1 -0
- package/workflow/task-detail/task-approval.js +84 -0
- package/workflow/task-detail/task-approval.js.map +1 -0
- package/workflow/task-detail/task-detail-io.d.ts +39 -0
- package/workflow/task-detail/task-detail-io.d.ts.map +1 -0
- package/workflow/task-detail/task-detail-io.js +42 -0
- package/workflow/task-detail/task-detail-io.js.map +1 -0
- package/workflow/thread/WorkflowTaskThread.d.ts +91 -0
- package/workflow/thread/WorkflowTaskThread.d.ts.map +1 -0
- package/workflow/thread/WorkflowTaskThread.js +318 -0
- package/workflow/thread/WorkflowTaskThread.js.map +1 -0
- package/workflow/thread/project-thread-items.d.ts +108 -0
- package/workflow/thread/project-thread-items.d.ts.map +1 -0
- package/workflow/thread/project-thread-items.js +126 -0
- package/workflow/thread/project-thread-items.js.map +1 -0
- package/workflow/thread/task-presentation.d.ts +73 -0
- package/workflow/thread/task-presentation.d.ts.map +1 -0
- package/workflow/thread/task-presentation.js +331 -0
- package/workflow/thread/task-presentation.js.map +1 -0
- package/workflow/thread/thread-presentation.d.ts +28 -0
- package/workflow/thread/thread-presentation.d.ts.map +1 -0
- package/workflow/thread/thread-presentation.js +28 -0
- package/workflow/thread/thread-presentation.js.map +1 -0
- package/workflow/thread/useWorkflowThreadItems.d.ts +16 -0
- package/workflow/thread/useWorkflowThreadItems.d.ts.map +1 -0
- package/workflow/thread/useWorkflowThreadItems.js +22 -0
- package/workflow/thread/useWorkflowThreadItems.js.map +1 -0
- package/workflow/useApprovalBoundary.d.ts +38 -0
- package/workflow/useApprovalBoundary.d.ts.map +1 -0
- package/workflow/useApprovalBoundary.js +55 -0
- package/workflow/useApprovalBoundary.js.map +1 -0
- package/workflow/useFollowExecution.d.ts +0 -20
- package/workflow/useFollowExecution.d.ts.map +1 -1
- package/workflow/useFollowExecution.js +0 -17
- package/workflow/useFollowExecution.js.map +1 -1
- package/workflow/useWorkflowArtifactDownload.d.ts +28 -0
- package/workflow/useWorkflowArtifactDownload.d.ts.map +1 -0
- package/workflow/useWorkflowArtifactDownload.js +45 -0
- package/workflow/useWorkflowArtifactDownload.js.map +1 -0
- package/workflow/useWorkflowExecutionActions.d.ts +3 -2
- package/workflow/useWorkflowExecutionActions.d.ts.map +1 -1
- package/workflow/useWorkflowExecutionActions.js.map +1 -1
- package/workflow/useWorkflowExecutionFileChanges.d.ts +107 -0
- package/workflow/useWorkflowExecutionFileChanges.d.ts.map +1 -0
- package/workflow/useWorkflowExecutionFileChanges.js +244 -0
- package/workflow/useWorkflowExecutionFileChanges.js.map +1 -0
- package/workflow/useWorkflowExecutionGraph.d.ts +1 -14
- package/workflow/useWorkflowExecutionGraph.d.ts.map +1 -1
- package/workflow/useWorkflowExecutionGraph.js +2 -25
- package/workflow/useWorkflowExecutionGraph.js.map +1 -1
- package/workflow/useWorkflowExecutionPanel.d.ts +108 -0
- package/workflow/useWorkflowExecutionPanel.d.ts.map +1 -0
- package/workflow/useWorkflowExecutionPanel.js +103 -0
- package/workflow/useWorkflowExecutionPanel.js.map +1 -0
- package/workflow/useWorkflowExecutionRailViews.d.ts +46 -0
- package/workflow/useWorkflowExecutionRailViews.d.ts.map +1 -0
- package/workflow/useWorkflowExecutionRailViews.js +81 -0
- package/workflow/useWorkflowExecutionRailViews.js.map +1 -0
- package/workspace/FileViewer.d.ts +1 -1
- package/workspace/FileViewer.js +3 -3
- package/workspace/FileViewer.js.map +1 -1
- package/workspace/PanelChip.d.ts +27 -0
- package/workspace/PanelChip.d.ts.map +1 -0
- package/workspace/PanelChip.js +42 -0
- package/workspace/PanelChip.js.map +1 -0
- package/workspace/WorkspaceSurface.d.ts +25 -1
- package/workspace/WorkspaceSurface.d.ts.map +1 -1
- package/workspace/WorkspaceSurface.js +21 -9
- package/workspace/WorkspaceSurface.js.map +1 -1
- package/workspace/index.d.ts +3 -1
- package/workspace/index.d.ts.map +1 -1
- package/workspace/index.js +1 -0
- package/workspace/index.js.map +1 -1
- package/execution/ThreadSelectionContext.d.ts +0 -17
- package/execution/ThreadSelectionContext.d.ts.map +0 -1
- package/execution/ThreadSelectionContext.js +0 -18
- package/execution/ThreadSelectionContext.js.map +0 -1
- package/execution/useThreadSelection.d.ts +0 -35
- package/execution/useThreadSelection.d.ts.map +0 -1
- package/execution/useThreadSelection.js +0 -65
- package/execution/useThreadSelection.js.map +0 -1
- package/internal/store/selection-store.d.ts +0 -53
- package/internal/store/selection-store.d.ts.map +0 -1
- package/internal/store/selection-store.js +0 -88
- package/internal/store/selection-store.js.map +0 -1
- package/session/artifact-document.d.ts.map +0 -1
- package/session/artifact-document.js +0 -22
- package/session/artifact-document.js.map +0 -1
- package/session/facets/InspectTab.d.ts +0 -13
- package/session/facets/InspectTab.d.ts.map +0 -1
- package/session/facets/InspectTab.js +0 -19
- package/session/facets/InspectTab.js.map +0 -1
- package/src/execution/ThreadSelectionContext.tsx +0 -20
- package/src/execution/useThreadSelection.ts +0 -95
- package/src/internal/store/__tests__/selection-store.test.ts +0 -115
- package/src/internal/store/selection-store.ts +0 -112
- package/src/session/artifact-document.ts +0 -23
- package/src/session/facets/InspectTab.tsx +0 -57
- package/src/workflow/WorkflowExecutionApprovalCard.tsx +0 -154
- package/src/workflow/WorkflowExecutionArtifactPanel.tsx +0 -107
- package/src/workflow/WorkflowExecutionCostPanel.tsx +0 -120
- package/src/workflow/WorkflowExecutionTaskPanel.tsx +0 -129
- package/src/workflow/WorkflowExecutionTimeline.tsx +0 -151
- package/src/workflow/WorkflowExecutionTimelineEvent.tsx +0 -497
- package/src/workflow/__tests__/ExecutionInspector.test.tsx +0 -155
- package/src/workflow/__tests__/WorkflowExecutionApprovalCard.test.tsx +0 -129
- package/src/workflow/__tests__/derive-task-detail.test.ts +0 -1265
- package/src/workflow/__tests__/derive-waterfall-entries.test.ts +0 -521
- package/src/workflow/__tests__/execution-inspector.test.tsx +0 -332
- package/src/workflow/execution/derive-waterfall-entries.ts +0 -377
- package/src/workflow/execution/useWaterfallEntries.ts +0 -125
- package/src/workflow/execution-inspector/AgentCallTab.tsx +0 -169
- package/src/workflow/execution-inspector/ErrorTab.tsx +0 -110
- package/src/workflow/execution-inspector/EventLogTab.tsx +0 -79
- package/src/workflow/execution-inspector/ExecutionInspector.tsx +0 -341
- package/src/workflow/execution-inspector/InputOutputTab.tsx +0 -325
- package/src/workflow/execution-inspector/RetriesTab.tsx +0 -68
- package/src/workflow/execution-inspector/SummaryTab.tsx +0 -62
- package/src/workflow/execution-inspector/derive-task-detail.ts +0 -584
- package/src/workflow/execution-inspector/index.ts +0 -14
- package/src/workflow/execution-inspector/useExecutionTaskDetail.ts +0 -55
- package/src/workflow/inspector/ExecutionInspectorAdapter.tsx +0 -40
- package/src/workflow/waterfall/WaterfallBar.tsx +0 -167
- package/src/workflow/waterfall/WaterfallRow.tsx +0 -112
- package/src/workflow/waterfall/WaterfallScale.tsx +0 -52
- package/src/workflow/waterfall/WaterfallTimeline.tsx +0 -138
- package/src/workflow/waterfall/WaterfallTooltip.tsx +0 -74
- package/src/workflow/waterfall/index.ts +0 -5
- package/workflow/WorkflowExecutionApprovalCard.d.ts +0 -34
- package/workflow/WorkflowExecutionApprovalCard.d.ts.map +0 -1
- package/workflow/WorkflowExecutionApprovalCard.js +0 -46
- package/workflow/WorkflowExecutionApprovalCard.js.map +0 -1
- package/workflow/WorkflowExecutionArtifactPanel.d.ts +0 -15
- package/workflow/WorkflowExecutionArtifactPanel.d.ts.map +0 -1
- package/workflow/WorkflowExecutionArtifactPanel.js +0 -46
- package/workflow/WorkflowExecutionArtifactPanel.js.map +0 -1
- package/workflow/WorkflowExecutionCostPanel.d.ts +0 -18
- package/workflow/WorkflowExecutionCostPanel.d.ts.map +0 -1
- package/workflow/WorkflowExecutionCostPanel.js +0 -31
- package/workflow/WorkflowExecutionCostPanel.js.map +0 -1
- package/workflow/WorkflowExecutionTaskPanel.d.ts +0 -24
- package/workflow/WorkflowExecutionTaskPanel.d.ts.map +0 -1
- package/workflow/WorkflowExecutionTaskPanel.js +0 -51
- package/workflow/WorkflowExecutionTaskPanel.js.map +0 -1
- package/workflow/WorkflowExecutionTimeline.d.ts +0 -42
- package/workflow/WorkflowExecutionTimeline.d.ts.map +0 -1
- package/workflow/WorkflowExecutionTimeline.js +0 -52
- package/workflow/WorkflowExecutionTimeline.js.map +0 -1
- package/workflow/WorkflowExecutionTimelineEvent.d.ts +0 -25
- package/workflow/WorkflowExecutionTimelineEvent.d.ts.map +0 -1
- package/workflow/WorkflowExecutionTimelineEvent.js +0 -179
- package/workflow/WorkflowExecutionTimelineEvent.js.map +0 -1
- package/workflow/execution/derive-waterfall-entries.d.ts +0 -85
- package/workflow/execution/derive-waterfall-entries.d.ts.map +0 -1
- package/workflow/execution/derive-waterfall-entries.js +0 -268
- package/workflow/execution/derive-waterfall-entries.js.map +0 -1
- package/workflow/execution/useWaterfallEntries.d.ts +0 -25
- package/workflow/execution/useWaterfallEntries.d.ts.map +0 -1
- package/workflow/execution/useWaterfallEntries.js +0 -67
- package/workflow/execution/useWaterfallEntries.js.map +0 -1
- package/workflow/execution-inspector/AgentCallTab.d.ts +0 -21
- package/workflow/execution-inspector/AgentCallTab.d.ts.map +0 -1
- package/workflow/execution-inspector/AgentCallTab.js +0 -36
- package/workflow/execution-inspector/AgentCallTab.js.map +0 -1
- package/workflow/execution-inspector/ErrorTab.d.ts +0 -9
- package/workflow/execution-inspector/ErrorTab.d.ts.map +0 -1
- package/workflow/execution-inspector/ErrorTab.js +0 -29
- package/workflow/execution-inspector/ErrorTab.js.map +0 -1
- package/workflow/execution-inspector/EventLogTab.d.ts +0 -11
- package/workflow/execution-inspector/EventLogTab.d.ts.map +0 -1
- package/workflow/execution-inspector/EventLogTab.js +0 -47
- package/workflow/execution-inspector/EventLogTab.js.map +0 -1
- package/workflow/execution-inspector/ExecutionInspector.d.ts +0 -69
- package/workflow/execution-inspector/ExecutionInspector.d.ts.map +0 -1
- package/workflow/execution-inspector/ExecutionInspector.js +0 -145
- package/workflow/execution-inspector/ExecutionInspector.js.map +0 -1
- package/workflow/execution-inspector/InputOutputTab.d.ts +0 -20
- package/workflow/execution-inspector/InputOutputTab.d.ts.map +0 -1
- package/workflow/execution-inspector/InputOutputTab.js +0 -124
- package/workflow/execution-inspector/InputOutputTab.js.map +0 -1
- package/workflow/execution-inspector/RetriesTab.d.ts +0 -7
- package/workflow/execution-inspector/RetriesTab.d.ts.map +0 -1
- package/workflow/execution-inspector/RetriesTab.js +0 -11
- package/workflow/execution-inspector/RetriesTab.js.map +0 -1
- package/workflow/execution-inspector/StructuredDataViewer.d.ts.map +0 -1
- package/workflow/execution-inspector/StructuredDataViewer.js.map +0 -1
- package/workflow/execution-inspector/SummaryTab.d.ts +0 -7
- package/workflow/execution-inspector/SummaryTab.d.ts.map +0 -1
- package/workflow/execution-inspector/SummaryTab.js +0 -10
- package/workflow/execution-inspector/SummaryTab.js.map +0 -1
- package/workflow/execution-inspector/derive-task-detail.d.ts +0 -140
- package/workflow/execution-inspector/derive-task-detail.d.ts.map +0 -1
- package/workflow/execution-inspector/derive-task-detail.js +0 -366
- package/workflow/execution-inspector/derive-task-detail.js.map +0 -1
- package/workflow/execution-inspector/index.d.ts +0 -4
- package/workflow/execution-inspector/index.d.ts.map +0 -1
- package/workflow/execution-inspector/index.js +0 -4
- package/workflow/execution-inspector/index.js.map +0 -1
- package/workflow/execution-inspector/useExecutionTaskDetail.d.ts +0 -38
- package/workflow/execution-inspector/useExecutionTaskDetail.d.ts.map +0 -1
- package/workflow/execution-inspector/useExecutionTaskDetail.js +0 -37
- package/workflow/execution-inspector/useExecutionTaskDetail.js.map +0 -1
- package/workflow/inspector/ExecutionInspectorAdapter.d.ts +0 -26
- package/workflow/inspector/ExecutionInspectorAdapter.d.ts.map +0 -1
- package/workflow/inspector/ExecutionInspectorAdapter.js +0 -23
- package/workflow/inspector/ExecutionInspectorAdapter.js.map +0 -1
- package/workflow/waterfall/WaterfallBar.d.ts +0 -19
- package/workflow/waterfall/WaterfallBar.d.ts.map +0 -1
- package/workflow/waterfall/WaterfallBar.js +0 -70
- package/workflow/waterfall/WaterfallBar.js.map +0 -1
- package/workflow/waterfall/WaterfallRow.d.ts +0 -18
- package/workflow/waterfall/WaterfallRow.d.ts.map +0 -1
- package/workflow/waterfall/WaterfallRow.js +0 -45
- package/workflow/waterfall/WaterfallRow.js.map +0 -1
- package/workflow/waterfall/WaterfallScale.d.ts +0 -14
- package/workflow/waterfall/WaterfallScale.d.ts.map +0 -1
- package/workflow/waterfall/WaterfallScale.js +0 -22
- package/workflow/waterfall/WaterfallScale.js.map +0 -1
- package/workflow/waterfall/WaterfallTimeline.d.ts +0 -46
- package/workflow/waterfall/WaterfallTimeline.d.ts.map +0 -1
- package/workflow/waterfall/WaterfallTimeline.js +0 -60
- package/workflow/waterfall/WaterfallTimeline.js.map +0 -1
- package/workflow/waterfall/WaterfallTooltip.d.ts +0 -15
- package/workflow/waterfall/WaterfallTooltip.d.ts.map +0 -1
- package/workflow/waterfall/WaterfallTooltip.js +0 -20
- package/workflow/waterfall/WaterfallTooltip.js.map +0 -1
- package/workflow/waterfall/index.d.ts +0 -6
- package/workflow/waterfall/index.d.ts.map +0 -1
- package/workflow/waterfall/index.js +0 -6
- package/workflow/waterfall/index.js.map +0 -1
- /package/src/workflow/{execution-inspector → task-detail}/StructuredDataViewer.tsx +0 -0
- /package/workflow/{execution-inspector → task-detail}/StructuredDataViewer.d.ts +0 -0
- /package/workflow/{execution-inspector → task-detail}/StructuredDataViewer.js +0 -0
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// Editor-area document rendering one child AgentExecution's full transcript.
|
|
4
|
+
// Domain: workflow (the AGENT_CALL counterpart of WorkflowArtifactDocument).
|
|
5
|
+
|
|
6
|
+
import { memo, useCallback, useMemo } from "react";
|
|
7
|
+
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
8
|
+
import {
|
|
9
|
+
FileChangeSetStatus,
|
|
10
|
+
type FileDecisionAction,
|
|
11
|
+
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
12
|
+
import type { FileChangeSet } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/filereview_pb";
|
|
13
|
+
import { displayFileChangeSets } from "@stigmer/sdk";
|
|
14
|
+
import { cn } from "@stigmer/theme";
|
|
15
|
+
import { useLiveAgentExecution } from "../execution/useLiveAgentExecution.js";
|
|
16
|
+
import { MessageThread } from "../execution/MessageThread.js";
|
|
17
|
+
import { ThreadSkeleton } from "../execution/ThreadSkeleton.js";
|
|
18
|
+
import { ExecutionPhaseBadge } from "../execution/ExecutionPhaseBadge.js";
|
|
19
|
+
import { FileReviewDock } from "../execution/FileReviewDock.js";
|
|
20
|
+
import type { FileDecisionOptions } from "../execution/useFileReview.js";
|
|
21
|
+
import { isTerminalPhase } from "../execution/execution-phases.js";
|
|
22
|
+
import type { UseWorkflowExecutionActionsReturn } from "./useWorkflowExecutionActions.js";
|
|
23
|
+
|
|
24
|
+
/** Stable empty list so the thread's memoized rows keep identity (DD-010). */
|
|
25
|
+
const EMPTY_EXECUTIONS: readonly AgentExecution[] = [];
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The HITL wiring for a child transcript: the slice of
|
|
29
|
+
* {@link UseWorkflowExecutionActionsReturn} the document needs to submit
|
|
30
|
+
* child-gate decisions at the WORKFLOW level.
|
|
31
|
+
*
|
|
32
|
+
* A `Pick` (not a new shape) so the bundle can never drift from the actions
|
|
33
|
+
* hook — the viewer builds it from its single `useWorkflowExecutionActions`
|
|
34
|
+
* instance, which is the same keyed in-flight/error state the bottom
|
|
35
|
+
* Approvals tab renders. One instance, two surfaces: a spinner or failure on
|
|
36
|
+
* a gate is identical wherever that gate is shown.
|
|
37
|
+
*/
|
|
38
|
+
export type WorkflowAgentExecutionHitl = Pick<
|
|
39
|
+
UseWorkflowExecutionActionsReturn,
|
|
40
|
+
| "submitApproval"
|
|
41
|
+
| "approvalSubmittingToolCallIds"
|
|
42
|
+
| "approvalErrorsByToolCallId"
|
|
43
|
+
| "submitFileDecision"
|
|
44
|
+
| "fileDecisionSubmittingKeys"
|
|
45
|
+
| "fileDecisionErrorsByKey"
|
|
46
|
+
>;
|
|
47
|
+
|
|
48
|
+
/** Props for {@link WorkflowAgentExecutionDocument}. */
|
|
49
|
+
export interface WorkflowAgentExecutionDocumentProps {
|
|
50
|
+
/** ID of the child AgentExecution whose transcript to render. */
|
|
51
|
+
readonly childExecutionId: string;
|
|
52
|
+
/** The AGENT_CALL task that spawned the child — the document's title. */
|
|
53
|
+
readonly taskName: string;
|
|
54
|
+
/** Slug of the agent the task called, when known (subtitle context). */
|
|
55
|
+
readonly agentSlug?: string;
|
|
56
|
+
/**
|
|
57
|
+
* Open the child execution as a standalone page — the pop-out escape hatch
|
|
58
|
+
* preserved from the inspector's Agent tab. Host-routed (DD-004).
|
|
59
|
+
*/
|
|
60
|
+
readonly onNavigateToAgentExecution?: (agentExecutionId: string) => void;
|
|
61
|
+
/**
|
|
62
|
+
* Workflow-level HITL handlers (S5 of the UX-parity project). When
|
|
63
|
+
* provided, the transcript becomes interactive: tool-approval gates render
|
|
64
|
+
* their decision cards inline on the gated rows, and pending file reviews
|
|
65
|
+
* dock at the bottom of the document. When omitted, the transcript is
|
|
66
|
+
* read-only — gates show status only (backward compatible, DD-011).
|
|
67
|
+
*/
|
|
68
|
+
readonly hitl?: WorkflowAgentExecutionHitl;
|
|
69
|
+
/** Additional CSS classes for the root element. */
|
|
70
|
+
readonly className?: string;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The editor-pane rendering of a child AgentExecution's transcript — the
|
|
75
|
+
* `SurfaceVirtualDocument` body the workflow execution panel mounts when an
|
|
76
|
+
* AGENT_CALL task is opened in place (S4 of the UX-parity project). This is
|
|
77
|
+
* the full session-grade experience — streaming `MessageThread` with tool
|
|
78
|
+
* calls, sub-agents, plan cards, and (with {@link
|
|
79
|
+
* WorkflowAgentExecutionDocumentProps.hitl | hitl}) in-place HITL —
|
|
80
|
+
* replacing the inspector's cramped `max-h-[50vh]` thumbnail.
|
|
81
|
+
*
|
|
82
|
+
* HITL ROUTING. Child gates are decided through the WORKFLOW-level RPCs
|
|
83
|
+
* (`WorkflowExecution.submitApproval` / `submitFileDecision`), never the
|
|
84
|
+
* child's own `agentExecution.*` submit path. The two paths are
|
|
85
|
+
* server-equivalent (the workflow RPC forwards to the child — see
|
|
86
|
+
* workflowexecution command.proto), but they differ in authorization: the
|
|
87
|
+
* workflow RPC checks `can_edit` on the workflow execution — the resource
|
|
88
|
+
* the operator owns — while the child path checks the runner-spawned
|
|
89
|
+
* AgentExecution, which the operator may not. Every workflow HITL surface
|
|
90
|
+
* (bottom Approvals tab, inspector) routes this way; the transcript joins
|
|
91
|
+
* them via the same actions instance, so in-flight/error state never forks.
|
|
92
|
+
*
|
|
93
|
+
* FILE-REVIEW DOCK. Pending (AWAITING_REVIEW) sets derive from the CHILD's
|
|
94
|
+
* own live stream — the freshest source this document already holds — not
|
|
95
|
+
* from the parent's `status.pending_file_reviews`: the parent snapshot is
|
|
96
|
+
* fetched once at mount and may lag a mid-run gate, which would blank the
|
|
97
|
+
* dock exactly when the reviewer is watching live. The server validates
|
|
98
|
+
* routing against its own (fresh) stored status at submit time, so a
|
|
99
|
+
* too-early decision degrades to a retryable in-card error, the same
|
|
100
|
+
* treatment tool approvals get. Docked below the thread (mirroring the
|
|
101
|
+
* session's composer dock) so a decision the agent is blocked on can never
|
|
102
|
+
* scroll out of view; settled sets render as read-only records in-thread
|
|
103
|
+
* (`showFileReviewRecords`), never in the dock — the two surfaces partition
|
|
104
|
+
* by the same pending test `MessageThread` uses.
|
|
105
|
+
*
|
|
106
|
+
* Lifecycle: the surface's editor area mounts only the ACTIVE virtual
|
|
107
|
+
* document, so `useLiveAgentExecution` fetches/streams only while this tab
|
|
108
|
+
* is foregrounded (DD-LIVE-006 — at most one child stream is ever live) and
|
|
109
|
+
* a tab-return re-renders instantly from the DD-014 fetch cache.
|
|
110
|
+
*
|
|
111
|
+
* All visual properties flow through `--stgm-*` tokens (DD-005).
|
|
112
|
+
*/
|
|
113
|
+
export const WorkflowAgentExecutionDocument = memo(
|
|
114
|
+
function WorkflowAgentExecutionDocument({
|
|
115
|
+
childExecutionId,
|
|
116
|
+
taskName,
|
|
117
|
+
agentSlug,
|
|
118
|
+
onNavigateToAgentExecution,
|
|
119
|
+
hitl,
|
|
120
|
+
className,
|
|
121
|
+
}: WorkflowAgentExecutionDocumentProps) {
|
|
122
|
+
const { execution, phase, isLoading, isStreaming, isReconnecting, error, reconnect } =
|
|
123
|
+
useLiveAgentExecution(childExecutionId);
|
|
124
|
+
|
|
125
|
+
// Pending file reviews from the child's own (streamed) status — see the
|
|
126
|
+
// component doc for why the parent's pending_file_reviews is not the
|
|
127
|
+
// source. Terminal executions never dock: their AWAITING_REVIEW sets are
|
|
128
|
+
// settled history ("not reviewed") and render as in-thread records — the
|
|
129
|
+
// exact complement of MessageThread's pending test, so no set ever
|
|
130
|
+
// appears in both surfaces.
|
|
131
|
+
const terminal = isTerminalPhase(phase);
|
|
132
|
+
const pendingReviewSets = useMemo<readonly FileChangeSet[]>(() => {
|
|
133
|
+
if (terminal) return [];
|
|
134
|
+
return displayFileChangeSets(execution?.status).filter(
|
|
135
|
+
(cs) =>
|
|
136
|
+
cs.status === FileChangeSetStatus.AWAITING_REVIEW &&
|
|
137
|
+
cs.changes.length > 0,
|
|
138
|
+
);
|
|
139
|
+
}, [execution?.status, terminal]);
|
|
140
|
+
|
|
141
|
+
// Bind the child id into the dock's card-level submit signature. Deps are
|
|
142
|
+
// the specific method (DD-010), so the callback survives unrelated
|
|
143
|
+
// in-flight churn on the actions instance.
|
|
144
|
+
const submitFileDecision = hitl?.submitFileDecision;
|
|
145
|
+
const handleFileDecision = useCallback(
|
|
146
|
+
(changeSetId: string, action: FileDecisionAction, options?: FileDecisionOptions) => {
|
|
147
|
+
submitFileDecision?.(childExecutionId, changeSetId, action, options);
|
|
148
|
+
},
|
|
149
|
+
[submitFileDecision, childExecutionId],
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
return (
|
|
153
|
+
<div
|
|
154
|
+
role="article"
|
|
155
|
+
aria-label={`Agent execution for task ${taskName}`}
|
|
156
|
+
className={cn("flex h-full min-w-0 flex-col", className)}
|
|
157
|
+
>
|
|
158
|
+
{/* Slim identity header: task name (the DAG node this transcript
|
|
159
|
+
belongs to), agent slug, live/phase state, and the standalone
|
|
160
|
+
pop-out. Wraps on narrow panes rather than overflowing. */}
|
|
161
|
+
<div className="flex min-w-0 shrink-0 flex-wrap items-center gap-x-3 gap-y-1 border-b border-border bg-background px-4 py-2">
|
|
162
|
+
<span className="truncate text-sm font-medium text-foreground">
|
|
163
|
+
{taskName}
|
|
164
|
+
</span>
|
|
165
|
+
{agentSlug && (
|
|
166
|
+
<span className="shrink-0 text-xs text-muted-foreground">
|
|
167
|
+
{agentSlug}
|
|
168
|
+
</span>
|
|
169
|
+
)}
|
|
170
|
+
|
|
171
|
+
<span className="shrink-0">
|
|
172
|
+
{isStreaming ? (
|
|
173
|
+
<span className="inline-flex items-center gap-1.5 text-xs font-medium text-primary">
|
|
174
|
+
<span className="inline-block size-1.5 animate-pulse rounded-full bg-primary" aria-hidden="true" />
|
|
175
|
+
Live
|
|
176
|
+
</span>
|
|
177
|
+
) : isReconnecting ? (
|
|
178
|
+
<span className="text-xs text-muted-foreground">Reconnecting…</span>
|
|
179
|
+
) : isTerminalPhase(phase) ? (
|
|
180
|
+
<ExecutionPhaseBadge phase={phase} />
|
|
181
|
+
) : null}
|
|
182
|
+
</span>
|
|
183
|
+
|
|
184
|
+
{onNavigateToAgentExecution && (
|
|
185
|
+
<button
|
|
186
|
+
type="button"
|
|
187
|
+
onClick={() => onNavigateToAgentExecution(childExecutionId)}
|
|
188
|
+
className="ml-auto inline-flex shrink-0 items-center gap-1.5 text-xs font-medium text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:rounded-sm"
|
|
189
|
+
>
|
|
190
|
+
<PopOutIcon />
|
|
191
|
+
Open standalone
|
|
192
|
+
</button>
|
|
193
|
+
)}
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
{/* The thread owns the scrolling (its auto-scroll machine + jump-to-
|
|
197
|
+
latest need the scroll container); h-full keeps the surrounding
|
|
198
|
+
editor-pane wrapper inert, so there is exactly one scrollbar. */}
|
|
199
|
+
<div className="min-h-0 min-w-0 flex-1">
|
|
200
|
+
{execution ? (
|
|
201
|
+
<MessageThread
|
|
202
|
+
executions={EMPTY_EXECUTIONS}
|
|
203
|
+
activeStreamExecution={execution}
|
|
204
|
+
onApprovalSubmit={hitl?.submitApproval}
|
|
205
|
+
submittingApprovalIds={hitl?.approvalSubmittingToolCallIds}
|
|
206
|
+
approvalErrors={hitl?.approvalErrorsByToolCallId}
|
|
207
|
+
showFileReviewRecords={hitl != null}
|
|
208
|
+
className="h-full"
|
|
209
|
+
/>
|
|
210
|
+
) : isLoading ? (
|
|
211
|
+
<ThreadSkeleton className="px-4 py-4" />
|
|
212
|
+
) : error ? (
|
|
213
|
+
<div
|
|
214
|
+
role="alert"
|
|
215
|
+
className="mx-auto flex w-full max-w-3xl flex-col items-center gap-2 px-4 py-8 text-center"
|
|
216
|
+
>
|
|
217
|
+
<p className="text-xs text-destructive">{error.message}</p>
|
|
218
|
+
<button
|
|
219
|
+
type="button"
|
|
220
|
+
onClick={reconnect}
|
|
221
|
+
className="rounded border border-border px-3 py-1.5 text-xs font-medium text-foreground hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"
|
|
222
|
+
>
|
|
223
|
+
Retry
|
|
224
|
+
</button>
|
|
225
|
+
</div>
|
|
226
|
+
) : (
|
|
227
|
+
<div
|
|
228
|
+
role="status"
|
|
229
|
+
className="mx-auto flex w-full max-w-3xl flex-col items-center gap-1 px-4 py-8 text-center"
|
|
230
|
+
>
|
|
231
|
+
<p className="text-xs font-medium text-foreground">
|
|
232
|
+
This agent execution is no longer available.
|
|
233
|
+
</p>
|
|
234
|
+
<p className="text-xs text-muted-foreground">
|
|
235
|
+
It may have been removed, or the workflow run predates
|
|
236
|
+
transcript retention.
|
|
237
|
+
</p>
|
|
238
|
+
</div>
|
|
239
|
+
)}
|
|
240
|
+
</div>
|
|
241
|
+
|
|
242
|
+
{/* Pending file reviews dock here — pinned below the thread (the
|
|
243
|
+
document has no composer, so the panel bottom is the fixed strip)
|
|
244
|
+
where the decision the child is blocked on can never scroll out
|
|
245
|
+
of view. Same shape as the session's composer dock. */}
|
|
246
|
+
{hitl && pendingReviewSets.length > 0 && (
|
|
247
|
+
<FileReviewDock
|
|
248
|
+
changeSets={pendingReviewSets}
|
|
249
|
+
onSubmit={handleFileDecision}
|
|
250
|
+
submittingDecisionKeys={hitl.fileDecisionSubmittingKeys}
|
|
251
|
+
decisionErrors={hitl.fileDecisionErrorsByKey}
|
|
252
|
+
className="shrink-0"
|
|
253
|
+
/>
|
|
254
|
+
)}
|
|
255
|
+
</div>
|
|
256
|
+
);
|
|
257
|
+
},
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
// ---------------------------------------------------------------------------
|
|
261
|
+
// Inline SVG icons (SDK independence — no lucide dependency)
|
|
262
|
+
// ---------------------------------------------------------------------------
|
|
263
|
+
|
|
264
|
+
function PopOutIcon() {
|
|
265
|
+
return (
|
|
266
|
+
<svg
|
|
267
|
+
width="12"
|
|
268
|
+
height="12"
|
|
269
|
+
viewBox="0 0 12 12"
|
|
270
|
+
fill="none"
|
|
271
|
+
stroke="currentColor"
|
|
272
|
+
strokeWidth="1.3"
|
|
273
|
+
strokeLinecap="round"
|
|
274
|
+
strokeLinejoin="round"
|
|
275
|
+
className="shrink-0"
|
|
276
|
+
aria-hidden="true"
|
|
277
|
+
>
|
|
278
|
+
<path d="M10.5 4.5V1.5H7.5" />
|
|
279
|
+
<path d="M10.5 1.5L6 6" />
|
|
280
|
+
<path d="M8.5 7v3a1 1 0 0 1-1 1h-5a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h3" />
|
|
281
|
+
</svg>
|
|
282
|
+
);
|
|
283
|
+
}
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { memo, useCallback } from "react";
|
|
4
|
+
import type { ApprovalAction } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
5
|
+
import type { PendingApproval } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/approval_pb";
|
|
6
|
+
import type { WorkflowPendingApproval } from "@stigmer/protos/ai/stigmer/agentic/workflowexecution/v1/api_pb";
|
|
7
|
+
import { cn } from "@stigmer/theme";
|
|
8
|
+
import { ApprovalCard } from "../execution/ApprovalCard.js";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Submit handler for a workflow-level tool-approval decision, matching
|
|
12
|
+
* `useWorkflowExecutionActions().submitApproval`. The tool-call id is bound per
|
|
13
|
+
* card so the shared {@link ApprovalCard} only needs the card-level
|
|
14
|
+
* `(action, comment)`.
|
|
15
|
+
*/
|
|
16
|
+
export type WorkflowApprovalSubmit = (
|
|
17
|
+
toolCallId: string,
|
|
18
|
+
action: ApprovalAction,
|
|
19
|
+
comment?: string,
|
|
20
|
+
) => Promise<unknown> | void;
|
|
21
|
+
|
|
22
|
+
/** Props for {@link WorkflowApprovalList}. */
|
|
23
|
+
export interface WorkflowApprovalListProps {
|
|
24
|
+
/**
|
|
25
|
+
* The parent workflow's surfaced tool-approval gates
|
|
26
|
+
* (`status.pending_approvals`) — each pairs a child's full
|
|
27
|
+
* `PendingApproval` with the child agent execution to route the decision to.
|
|
28
|
+
*/
|
|
29
|
+
readonly pendingApprovals: readonly WorkflowPendingApproval[];
|
|
30
|
+
/** Forwards a decision to the child (see {@link WorkflowApprovalSubmit}). */
|
|
31
|
+
readonly onSubmitApproval: WorkflowApprovalSubmit;
|
|
32
|
+
/**
|
|
33
|
+
* Tool-call ids whose decision is in flight (pass
|
|
34
|
+
* `approvalSubmittingToolCallIds` straight through). Keyed per gate so
|
|
35
|
+
* deciding one never spins another.
|
|
36
|
+
*/
|
|
37
|
+
readonly submittingToolCallIds?: ReadonlySet<string>;
|
|
38
|
+
/**
|
|
39
|
+
* Per-gate failures, keyed by `toolCallId` (pass `approvalErrorsByToolCallId`
|
|
40
|
+
* straight through) — surfaced in-card beside the gate that failed.
|
|
41
|
+
*/
|
|
42
|
+
readonly approvalErrors?: ReadonlyMap<string, Error>;
|
|
43
|
+
/**
|
|
44
|
+
* Optional deep-link to open the gate's child agent execution in its own
|
|
45
|
+
* view. When provided, each gate renders a "View agent execution"
|
|
46
|
+
* affordance — with parallel children, it names which child a gate belongs
|
|
47
|
+
* to. Routing is the host's responsibility (DD-004).
|
|
48
|
+
*/
|
|
49
|
+
readonly onNavigateToAgentExecution?: (agentExecutionId: string) => void;
|
|
50
|
+
/** Additional CSS class names for the root container. */
|
|
51
|
+
readonly className?: string;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Renders the child agent tool approvals surfaced on a parent
|
|
56
|
+
* WorkflowExecution — the tool-approval sibling of {@link WorkflowFileReviewList},
|
|
57
|
+
* reusing the session's canonical {@link ApprovalCard} so a gate reads
|
|
58
|
+
* identically everywhere it appears (workflow bottom tab, inspector, in-place
|
|
59
|
+
* transcript, agent session): same 4-action decision model (Approve / Skip /
|
|
60
|
+
* Reject / Approve-all-of-class), same preview, same gate provenance.
|
|
61
|
+
*
|
|
62
|
+
* Unlike the file sibling, this list does NOT stream the referenced children:
|
|
63
|
+
* `WorkflowPendingApproval.approval` already carries the child's full
|
|
64
|
+
* projected `PendingApproval` (file-review content is reference-only on the
|
|
65
|
+
* parent and must be dereferenced; approvals are copied whole). Same role,
|
|
66
|
+
* simpler body.
|
|
67
|
+
*
|
|
68
|
+
* Decisions route through the WORKFLOW-level RPC (the supplied
|
|
69
|
+
* `onSubmitApproval`, normally `useWorkflowExecutionActions().submitApproval`)
|
|
70
|
+
* — never the child's own `agentExecution.*` path, whose authorization checks
|
|
71
|
+
* the runner-spawned child rather than the workflow execution the operator
|
|
72
|
+
* owns. Empty `pendingApprovals` renders nothing.
|
|
73
|
+
*/
|
|
74
|
+
export function WorkflowApprovalList({
|
|
75
|
+
pendingApprovals,
|
|
76
|
+
onSubmitApproval,
|
|
77
|
+
submittingToolCallIds,
|
|
78
|
+
approvalErrors,
|
|
79
|
+
onNavigateToAgentExecution,
|
|
80
|
+
className,
|
|
81
|
+
}: WorkflowApprovalListProps): React.ReactElement | null {
|
|
82
|
+
if (pendingApprovals.length === 0) return null;
|
|
83
|
+
|
|
84
|
+
return (
|
|
85
|
+
<div className={cn("stgm space-y-3", className)}>
|
|
86
|
+
{pendingApprovals.map((ref) => {
|
|
87
|
+
// A surfaced gate without its approval payload cannot be decided
|
|
88
|
+
// (there is no toolCallId to route) — skip rather than render a
|
|
89
|
+
// dead card.
|
|
90
|
+
if (!ref.approval) return null;
|
|
91
|
+
const toolCallId = ref.approval.toolCallId;
|
|
92
|
+
return (
|
|
93
|
+
<WorkflowApprovalItem
|
|
94
|
+
key={toolCallId || ref.childAgentExecutionId}
|
|
95
|
+
approval={ref.approval}
|
|
96
|
+
childAgentExecutionId={ref.childAgentExecutionId}
|
|
97
|
+
onSubmitApproval={onSubmitApproval}
|
|
98
|
+
isSubmitting={submittingToolCallIds?.has(toolCallId) ?? false}
|
|
99
|
+
error={approvalErrors?.get(toolCallId) ?? null}
|
|
100
|
+
onNavigateToAgentExecution={onNavigateToAgentExecution}
|
|
101
|
+
/>
|
|
102
|
+
);
|
|
103
|
+
})}
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
interface WorkflowApprovalItemProps {
|
|
109
|
+
readonly approval: PendingApproval;
|
|
110
|
+
readonly childAgentExecutionId: string;
|
|
111
|
+
readonly onSubmitApproval: WorkflowApprovalSubmit;
|
|
112
|
+
readonly isSubmitting: boolean;
|
|
113
|
+
readonly error: Error | null;
|
|
114
|
+
readonly onNavigateToAgentExecution?: (agentExecutionId: string) => void;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* One gate: binds `toolCallId` into the card-level submit signature — the same
|
|
119
|
+
* stabilization `MessageThread`'s internal `ApprovalCardRow` performs — so the
|
|
120
|
+
* memoized {@link ApprovalCard} re-renders only when ITS gate's state moves,
|
|
121
|
+
* not when a sibling gate is decided.
|
|
122
|
+
*/
|
|
123
|
+
const WorkflowApprovalItem = memo(function WorkflowApprovalItem({
|
|
124
|
+
approval,
|
|
125
|
+
childAgentExecutionId,
|
|
126
|
+
onSubmitApproval,
|
|
127
|
+
isSubmitting,
|
|
128
|
+
error,
|
|
129
|
+
onNavigateToAgentExecution,
|
|
130
|
+
}: WorkflowApprovalItemProps) {
|
|
131
|
+
const toolCallId = approval.toolCallId;
|
|
132
|
+
const handleSubmit = useCallback(
|
|
133
|
+
(action: ApprovalAction, comment?: string) => {
|
|
134
|
+
onSubmitApproval(toolCallId, action, comment);
|
|
135
|
+
},
|
|
136
|
+
[onSubmitApproval, toolCallId],
|
|
137
|
+
);
|
|
138
|
+
|
|
139
|
+
return (
|
|
140
|
+
<div className="space-y-2">
|
|
141
|
+
{onNavigateToAgentExecution && (
|
|
142
|
+
<button
|
|
143
|
+
type="button"
|
|
144
|
+
onClick={() => onNavigateToAgentExecution(childAgentExecutionId)}
|
|
145
|
+
className="text-xs text-muted-foreground hover:text-foreground underline underline-offset-2"
|
|
146
|
+
>
|
|
147
|
+
View agent execution
|
|
148
|
+
</button>
|
|
149
|
+
)}
|
|
150
|
+
<ApprovalCard
|
|
151
|
+
pendingApproval={approval}
|
|
152
|
+
onSubmit={handleSubmit}
|
|
153
|
+
isSubmitting={isSubmitting}
|
|
154
|
+
error={error}
|
|
155
|
+
/>
|
|
156
|
+
</div>
|
|
157
|
+
);
|
|
158
|
+
});
|