@stigmer/react 3.1.17 → 3.2.1
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/useNewSessionFlow.d.ts +4 -0
- package/session/useNewSessionFlow.d.ts.map +1 -1
- package/session/useNewSessionFlow.js +33 -4
- package/session/useNewSessionFlow.js.map +1 -1
- package/session/usePersistedModel.d.ts +11 -0
- package/session/usePersistedModel.d.ts.map +1 -1
- package/session/usePersistedModel.js +14 -3
- package/session/usePersistedModel.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/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +12 -1
- package/session/useSessionPageFlow.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__/useNewSessionFlow.test.tsx +64 -0
- package/src/session/__tests__/usePersistedModel.test.tsx +36 -0
- package/src/session/__tests__/useSessionPageFlow.guest.test.tsx +48 -1
- 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/useNewSessionFlow.ts +35 -4
- package/src/session/usePersistedModel.ts +25 -3
- package/src/session/useSessionFileChanges.ts +12 -153
- package/src/session/useSessionPageFlow.ts +13 -2
- 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,54 @@
|
|
|
1
|
+
// Identity of agent-execution transcript tabs in the workspace surface's
|
|
2
|
+
// editor group. Domain: execution (the transcript renderer and the
|
|
3
|
+
// AgentExecution data model are execution-domain; the workflow panel is the
|
|
4
|
+
// first host, and a future session-side consumer — e.g. sub-agent expansion —
|
|
5
|
+
// would share this identity rather than minting a divergent one).
|
|
6
|
+
//
|
|
7
|
+
// Kept in its own module (not in a component file) so behavior-only
|
|
8
|
+
// consumers — the panel controller opens the tabs, the viewer routes them —
|
|
9
|
+
// depend on the identity without pulling the transcript renderer into their
|
|
10
|
+
// module graph (DD-003 headless-first). Mirrors artifact-document.ts and
|
|
11
|
+
// file-change-document.ts.
|
|
12
|
+
|
|
13
|
+
import { virtualEntryId } from "../internal/store/index.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Virtual entry id of the agent-execution transcript document FAMILY. Like
|
|
17
|
+
* artifacts and file changes (and unlike the session's single plan tab),
|
|
18
|
+
* transcripts are many: every opened child AgentExecution shares this one
|
|
19
|
+
* entry id and is distinguished by its id-derived tab path, so
|
|
20
|
+
* `editorKey(AGENT_EXECUTION_DOCUMENT_ENTRY_ID, path)` yields one tab per
|
|
21
|
+
* child execution — the VS Code "each file is a tab" model. The
|
|
22
|
+
* NUL-namespaced virtual id can never alias a real workspace entry, and its
|
|
23
|
+
* distinct `"agentexec"` kind can never collide with the
|
|
24
|
+
* `"artifact"`/`"filechange"`/`"plan"` families.
|
|
25
|
+
*/
|
|
26
|
+
export const AGENT_EXECUTION_DOCUMENT_ENTRY_ID = virtualEntryId("agentexec");
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* The identity of a child AgentExecution's transcript tab within the family.
|
|
30
|
+
*
|
|
31
|
+
* The path deliberately CARRIES the child execution id (unlike artifact tabs,
|
|
32
|
+
* which need an owner-level record map to resolve content): a transcript
|
|
33
|
+
* needs only the id to fetch/stream itself, so the viewer parses it straight
|
|
34
|
+
* back out with {@link parseAgentExecutionTabPath} — no lookup map to keep in
|
|
35
|
+
* sync. The suffix is the AGENT_CALL task name because the editor tab's LABEL
|
|
36
|
+
* is the path's basename: the task name correlates the tab with the DAG node
|
|
37
|
+
* the user opened it from, and keeps two calls to the same agent distinct.
|
|
38
|
+
*/
|
|
39
|
+
export function agentExecutionTabPath(
|
|
40
|
+
childExecutionId: string,
|
|
41
|
+
taskName: string,
|
|
42
|
+
): string {
|
|
43
|
+
return `${childExecutionId}/${taskName}`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Recovers the child execution id from a transcript tab's path — the inverse
|
|
48
|
+
* of {@link agentExecutionTabPath}. Splits on the FIRST separator: execution
|
|
49
|
+
* ids never contain `/`, so a task name that does still round-trips.
|
|
50
|
+
*/
|
|
51
|
+
export function parseAgentExecutionTabPath(path: string): string {
|
|
52
|
+
const separator = path.indexOf("/");
|
|
53
|
+
return separator === -1 ? path : path.slice(0, separator);
|
|
54
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// Identity of artifact document tabs in the workspace surface's editor group.
|
|
2
|
+
// Domain: execution (shared — both the session and workflow panels open
|
|
3
|
+
// artifact tabs, and a single identity source prevents the two viewers from
|
|
4
|
+
// minting divergent virtual ids for the same tab family).
|
|
5
|
+
//
|
|
6
|
+
// Kept in its own module (not in a component file) so behavior-only
|
|
7
|
+
// consumers — the session/workflow panel controllers open artifact tabs, the
|
|
8
|
+
// viewers route to them — depend on the identity without pulling a component
|
|
9
|
+
// (and its content renderer) into their module graph (DD-003 headless-first).
|
|
10
|
+
// Mirrors session/plan-document.ts.
|
|
11
|
+
|
|
12
|
+
import { virtualEntryId } from "../internal/store/index.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Virtual entry id of the artifact document FAMILY. Unlike the plan (one tab
|
|
16
|
+
* per session), artifacts are many: every opened artifact shares this one
|
|
17
|
+
* entry id and is distinguished by its identity-derived `path` (the session's
|
|
18
|
+
* `artifactKey`, the workflow's `Artifact` id), so
|
|
19
|
+
* `editorKey(ARTIFACT_DOCUMENT_ENTRY_ID, path)` yields one tab per artifact —
|
|
20
|
+
* the VS Code "each file is a tab" model. The NUL-namespaced virtual id can
|
|
21
|
+
* never alias a real workspace entry, and its distinct `"artifact"` kind can
|
|
22
|
+
* never collide with the plan tab's `"plan"` kind.
|
|
23
|
+
*/
|
|
24
|
+
export const ARTIFACT_DOCUMENT_ENTRY_ID = virtualEntryId("artifact");
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// Type-agnostic view-model for artifact list rows, with adapters from both
|
|
2
|
+
// artifact data models. Domain: execution (shared by session + workflow).
|
|
3
|
+
|
|
4
|
+
import type { ExecutionArtifact } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/artifact_pb";
|
|
5
|
+
import { ExecutionArtifactKind } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
6
|
+
import type { Artifact } from "@stigmer/protos/ai/stigmer/agentic/artifact/v1/api_pb";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* What an artifact row displays, independent of which artifact data model
|
|
10
|
+
* produced it.
|
|
11
|
+
*
|
|
12
|
+
* Two artifact models exist and are deliberately unified ONLY at this
|
|
13
|
+
* presentational layer, never at the data layer: the session's
|
|
14
|
+
* `ExecutionArtifact` (embedded in `AgentExecution.status.artifacts`) and the
|
|
15
|
+
* workflow's first-class `Artifact` resource. Their identity, provenance, and
|
|
16
|
+
* download mechanics differ — so the view-model carries no identity; list
|
|
17
|
+
* keys and open/download behavior stay with the domain-specific hosts.
|
|
18
|
+
*/
|
|
19
|
+
export interface ArtifactRowItem {
|
|
20
|
+
/** Display label (file or directory name). */
|
|
21
|
+
readonly name: string;
|
|
22
|
+
/** Hover title — the fullest location/name known for the artifact. */
|
|
23
|
+
readonly tooltip: string;
|
|
24
|
+
/**
|
|
25
|
+
* Disambiguation subtitle rendered after the name when another row shares
|
|
26
|
+
* the same display name: the parent directory for sandbox-backed artifacts,
|
|
27
|
+
* the producing task for workflow artifacts. `null` when not needed.
|
|
28
|
+
*/
|
|
29
|
+
readonly subtitlePath: string | null;
|
|
30
|
+
/** Content size in bytes (protobuf `int64` is `bigint`). */
|
|
31
|
+
readonly sizeBytes: bigint | number;
|
|
32
|
+
/** Directory artifacts render a folder icon, a `/` suffix, and ZIP download copy. */
|
|
33
|
+
readonly isDirectory: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Adapts a session `ExecutionArtifact` to a row item.
|
|
38
|
+
*
|
|
39
|
+
* @param hasNameCollision - When `true`, the artifact's parent directory (from
|
|
40
|
+
* `sandbox_path`) becomes the disambiguation subtitle. Typically supplied
|
|
41
|
+
* from `SessionArtifactEntry.hasNameCollision`.
|
|
42
|
+
*/
|
|
43
|
+
export function fromExecutionArtifact(
|
|
44
|
+
artifact: ExecutionArtifact,
|
|
45
|
+
hasNameCollision = false,
|
|
46
|
+
): ArtifactRowItem {
|
|
47
|
+
return {
|
|
48
|
+
name: artifact.name,
|
|
49
|
+
tooltip: artifact.sandboxPath || artifact.name,
|
|
50
|
+
subtitlePath:
|
|
51
|
+
hasNameCollision && artifact.sandboxPath
|
|
52
|
+
? parentDirectory(artifact.sandboxPath)
|
|
53
|
+
: null,
|
|
54
|
+
sizeBytes: artifact.sizeBytes,
|
|
55
|
+
isDirectory: artifact.kind === ExecutionArtifactKind.DIRECTORY,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Adapts a workflow `Artifact` resource to a row item.
|
|
61
|
+
*
|
|
62
|
+
* A workflow artifact is always a single content-typed blob — the resource
|
|
63
|
+
* model has no directory concept — so `isDirectory` is always `false`. Name
|
|
64
|
+
* collisions disambiguate by the producing task (`source.task_name`), the
|
|
65
|
+
* workflow analog of the session's parent-directory subtitle.
|
|
66
|
+
*
|
|
67
|
+
* @param hasNameCollision - When `true` and the artifact has a source task,
|
|
68
|
+
* that task name becomes the disambiguation subtitle.
|
|
69
|
+
*/
|
|
70
|
+
export function fromArtifact(
|
|
71
|
+
artifact: Artifact,
|
|
72
|
+
hasNameCollision = false,
|
|
73
|
+
): ArtifactRowItem {
|
|
74
|
+
const name =
|
|
75
|
+
artifact.spec?.displayName || artifact.metadata?.name || "Unnamed";
|
|
76
|
+
const taskName = artifact.spec?.source?.taskName ?? "";
|
|
77
|
+
return {
|
|
78
|
+
name,
|
|
79
|
+
tooltip: name,
|
|
80
|
+
subtitlePath: hasNameCollision && taskName ? taskName : null,
|
|
81
|
+
sizeBytes: artifact.status?.sizeBytes ?? BigInt(0),
|
|
82
|
+
isDirectory: false,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Extracts a human-readable parent directory label from a sandbox path.
|
|
88
|
+
* Given `/workspace/configs/agent.yaml` returns `configs/`.
|
|
89
|
+
* Returns `null` when the path has no meaningful parent segment.
|
|
90
|
+
*/
|
|
91
|
+
export function parentDirectory(sandboxPath: string): string | null {
|
|
92
|
+
const lastSlash = sandboxPath.lastIndexOf("/");
|
|
93
|
+
if (lastSlash <= 0) return null;
|
|
94
|
+
const parent = sandboxPath.slice(0, lastSlash);
|
|
95
|
+
const segment = parent.slice(parent.lastIndexOf("/") + 1);
|
|
96
|
+
return segment ? `${segment}/` : null;
|
|
97
|
+
}
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
// Pure derivation of net file changes across a chronological list of agent
|
|
2
|
+
// executions, plus the FileChange → FileDiffEntry projection for file lists.
|
|
3
|
+
// Domain: execution (shared — the session's Changes surface and the workflow
|
|
4
|
+
// panel's Changes facet both collapse per-execution captures into one net
|
|
5
|
+
// change per path, and a single core prevents the two from drifting on the
|
|
6
|
+
// non-trivial net-diff semantics below).
|
|
7
|
+
//
|
|
8
|
+
// Not a hook: callers memoize on their executions reference
|
|
9
|
+
// (`useSessionFileChanges` for sessions; `useWorkflowExecutionFileChanges`
|
|
10
|
+
// aggregates a workflow's AGENT_CALL children).
|
|
11
|
+
|
|
12
|
+
import { create } from "@bufbuild/protobuf";
|
|
13
|
+
import type { AgentExecution } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/api_pb";
|
|
14
|
+
import type { FileChange } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
|
|
15
|
+
import { FileChangeSchema } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
|
|
16
|
+
import {
|
|
17
|
+
FileChangeCaptureLevel,
|
|
18
|
+
FileChangeType,
|
|
19
|
+
} from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/enum_pb";
|
|
20
|
+
import { displayFileChangeSets, toDisplayFileChange } from "@stigmer/sdk";
|
|
21
|
+
import { computeDiff } from "../version-history/computeDiff.js";
|
|
22
|
+
import type { DiffHunk, FileDiffEntry } from "../version-history/types.js";
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Collapses the file changes captured across `executions` into one *net*
|
|
26
|
+
* {@link FileChange} per path, ordered for a file list (modified, then
|
|
27
|
+
* created/renamed, then deleted; alphabetical within each group).
|
|
28
|
+
*
|
|
29
|
+
* **Source (ledger-first).** Under apply-then-review the changes live in the
|
|
30
|
+
* file-review ledger; {@link displayFileChangeSets} reads the server's live
|
|
31
|
+
* projection or folds the durable ledger for a terminal execution (whose
|
|
32
|
+
* projection is nil), and each captured change is projected onto the display
|
|
33
|
+
* {@link FileChange} via {@link toDisplayFileChange}. The execution-scoped
|
|
34
|
+
* ledger already includes sub-agent captures (DD-19), so one pass per
|
|
35
|
+
* execution suffices.
|
|
36
|
+
*
|
|
37
|
+
* **Net-diff (not latest-wins).** A {@link FileChange} is a *delta* — an
|
|
38
|
+
* agent often rewrites the same file several times, and showing only the last
|
|
39
|
+
* edit's diff would misrepresent what changed. So changes to the same path
|
|
40
|
+
* are reduced to a single net change: `before` from the first change, `after`
|
|
41
|
+
* from the last. Because a WHOLE_FILE `after` is a complete file snapshot,
|
|
42
|
+
* `first.before → last.after` is exactly the net change. A group with one
|
|
43
|
+
* change (the common case) is passed through untouched; multi-edit groups
|
|
44
|
+
* synthesize a net {@link FileChange} so every consumer speaks one proto
|
|
45
|
+
* type (DD-007).
|
|
46
|
+
*
|
|
47
|
+
* **Ordering is a correctness input.** `executions` MUST be chronological:
|
|
48
|
+
* the net collapse anchors on each path's first and last change, so two
|
|
49
|
+
* executions touching the same path (a session's follow-up turns; two
|
|
50
|
+
* workflow agent-call tasks) produce a wrong net diff if visited out of
|
|
51
|
+
* order.
|
|
52
|
+
*
|
|
53
|
+
* Counts and unified diffs for whole-file captures stay derivable by the
|
|
54
|
+
* presentation layer (the runner emits 0/"" sentinels), matching the
|
|
55
|
+
* contract the SDK `tool-view` established.
|
|
56
|
+
*/
|
|
57
|
+
export function deriveExecutionFileChanges(
|
|
58
|
+
executions: readonly AgentExecution[],
|
|
59
|
+
): readonly FileChange[] {
|
|
60
|
+
// Path -> chronological list of raw changes to that path.
|
|
61
|
+
const groups = new Map<string, FileChange[]>();
|
|
62
|
+
// Preserve first-seen path order as a stable tiebreaker before sorting.
|
|
63
|
+
const collect = (change: FileChange) => {
|
|
64
|
+
const key = change.path || change.absolutePath;
|
|
65
|
+
if (!key) return;
|
|
66
|
+
const list = groups.get(key);
|
|
67
|
+
if (list) list.push(change);
|
|
68
|
+
else groups.set(key, [change]);
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
for (const execution of executions) {
|
|
72
|
+
const capturedChanges = displayFileChangeSets(execution.status).flatMap(
|
|
73
|
+
(set) => set.changes,
|
|
74
|
+
);
|
|
75
|
+
for (const captured of capturedChanges) collect(toDisplayFileChange(captured));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
const fileChanges = Array.from(groups.values(), netChange);
|
|
79
|
+
fileChanges.sort(fileChangeComparator);
|
|
80
|
+
return fileChanges;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Reduces a path's chronological change list to a single net change.
|
|
85
|
+
* A one-change group is returned as-is (the common path, no allocation);
|
|
86
|
+
* multi-edit groups synthesize a net {@link FileChange}.
|
|
87
|
+
*/
|
|
88
|
+
function netChange(changes: FileChange[]): FileChange {
|
|
89
|
+
if (changes.length === 1) return changes[0];
|
|
90
|
+
|
|
91
|
+
const first = changes[0];
|
|
92
|
+
const last = changes[changes.length - 1];
|
|
93
|
+
const changeType = netChangeType(first, last);
|
|
94
|
+
|
|
95
|
+
// Whole-file only when both chosen sides come from whole-file captures;
|
|
96
|
+
// otherwise fall back to the last change's hunk diff. A path edited by a
|
|
97
|
+
// single harness won't mix levels — this just stays honest if it ever does.
|
|
98
|
+
const wholeFile =
|
|
99
|
+
first.captureLevel === FileChangeCaptureLevel.WHOLE_FILE &&
|
|
100
|
+
last.captureLevel === FileChangeCaptureLevel.WHOLE_FILE;
|
|
101
|
+
|
|
102
|
+
if (wholeFile) {
|
|
103
|
+
return create(FileChangeSchema, {
|
|
104
|
+
path: last.path,
|
|
105
|
+
absolutePath: last.absolutePath,
|
|
106
|
+
changeType,
|
|
107
|
+
captureLevel: FileChangeCaptureLevel.WHOLE_FILE,
|
|
108
|
+
before: first.before,
|
|
109
|
+
after: last.after,
|
|
110
|
+
renameFrom: changeType === FileChangeType.RENAME ? first.renameFrom : "",
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return create(FileChangeSchema, {
|
|
115
|
+
path: last.path,
|
|
116
|
+
absolutePath: last.absolutePath,
|
|
117
|
+
changeType,
|
|
118
|
+
captureLevel: FileChangeCaptureLevel.HUNK_ONLY,
|
|
119
|
+
unifiedDiff: last.unifiedDiff,
|
|
120
|
+
linesAdded: last.linesAdded,
|
|
121
|
+
linesRemoved: last.linesRemoved,
|
|
122
|
+
renameFrom: changeType === FileChangeType.RENAME ? first.renameFrom : "",
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Reconciles the net `change_type` of a path from its first and last change.
|
|
128
|
+
*
|
|
129
|
+
* Intent: the badge should describe the file's journey across the *whole*
|
|
130
|
+
* span of executions, anchored on its two endpoints, in this precedence:
|
|
131
|
+
*
|
|
132
|
+
* 1. Ends deleted (`last` is DELETE) → DELETE. The file is gone, regardless of
|
|
133
|
+
* how it got there — this includes create-then-delete, which we deliberately
|
|
134
|
+
* surface as DELETE rather than hiding the path. (`before` then comes from
|
|
135
|
+
* the first change, which for a created-then-deleted file is empty, so the
|
|
136
|
+
* diff reads as the removal of whatever briefly existed.)
|
|
137
|
+
* 2. Started created (`first` is CREATE) and still exists → CREATE. A file born
|
|
138
|
+
* in this span and later modified is, on net, a new file.
|
|
139
|
+
* 3. Started renamed (`first` is RENAME) and still exists → RENAME, carrying the
|
|
140
|
+
* original `rename_from` so the move is preserved across later edits.
|
|
141
|
+
* 4. Otherwise → MODIFY (the common multi-edit case).
|
|
142
|
+
*/
|
|
143
|
+
function netChangeType(first: FileChange, last: FileChange): FileChangeType {
|
|
144
|
+
if (last.changeType === FileChangeType.DELETE) return FileChangeType.DELETE;
|
|
145
|
+
if (first.changeType === FileChangeType.CREATE) return FileChangeType.CREATE;
|
|
146
|
+
if (first.changeType === FileChangeType.RENAME) return FileChangeType.RENAME;
|
|
147
|
+
return FileChangeType.MODIFY;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Most-actionable first (modified), then additions (create/rename), then
|
|
151
|
+
// deletions — mirroring GitHub's file-list convention — alphabetical within
|
|
152
|
+
// each group so the list is stable and scannable.
|
|
153
|
+
const CHANGE_TYPE_ORDER: Readonly<Record<FileChangeType, number>> = {
|
|
154
|
+
[FileChangeType.MODIFY]: 0,
|
|
155
|
+
[FileChangeType.CREATE]: 1,
|
|
156
|
+
[FileChangeType.RENAME]: 1,
|
|
157
|
+
[FileChangeType.DELETE]: 2,
|
|
158
|
+
[FileChangeType.UNSPECIFIED]: 3,
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
function fileChangeComparator(a: FileChange, b: FileChange): number {
|
|
162
|
+
const order =
|
|
163
|
+
(CHANGE_TYPE_ORDER[a.changeType] ?? 3) -
|
|
164
|
+
(CHANGE_TYPE_ORDER[b.changeType] ?? 3);
|
|
165
|
+
if (order !== 0) return order;
|
|
166
|
+
return a.path.localeCompare(b.path, undefined, { sensitivity: "base" });
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
// ---------------------------------------------------------------------------
|
|
170
|
+
// FileChange → FileDiffEntry projection (file lists)
|
|
171
|
+
// ---------------------------------------------------------------------------
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Projects a {@link FileChange} into a {@link FileDiffEntry} for a file list
|
|
175
|
+
* (`DiffFileList`).
|
|
176
|
+
*
|
|
177
|
+
* Counts: hunk-only uses the runner's authoritative numbers; whole-file inline
|
|
178
|
+
* is derived from the content (identical to the runner's capture-time counts by
|
|
179
|
+
* construction — same diff algorithm). A whole-file side with no synchronous
|
|
180
|
+
* content (offloaded / binary) falls back to the runner's capture-time
|
|
181
|
+
* `linesAdded`/`linesRemoved` — zero when no count exists, which the list
|
|
182
|
+
* renders as no stat.
|
|
183
|
+
*/
|
|
184
|
+
export function toFileDiffEntry(change: FileChange): FileDiffEntry {
|
|
185
|
+
const changeType =
|
|
186
|
+
change.changeType === FileChangeType.CREATE
|
|
187
|
+
? "added"
|
|
188
|
+
: change.changeType === FileChangeType.DELETE
|
|
189
|
+
? "removed"
|
|
190
|
+
: "modified";
|
|
191
|
+
|
|
192
|
+
if (change.captureLevel === FileChangeCaptureLevel.HUNK_ONLY) {
|
|
193
|
+
return {
|
|
194
|
+
path: change.path,
|
|
195
|
+
changeType,
|
|
196
|
+
additions: change.linesAdded,
|
|
197
|
+
deletions: change.linesRemoved,
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
const before = inlineSide(change.before);
|
|
202
|
+
const after = inlineSide(change.after);
|
|
203
|
+
if (before !== null && after !== null) {
|
|
204
|
+
const { additions, deletions } = countHunks(computeDiff(before, after));
|
|
205
|
+
return { path: change.path, changeType, additions, deletions };
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
return {
|
|
209
|
+
path: change.path,
|
|
210
|
+
changeType,
|
|
211
|
+
additions: change.linesAdded,
|
|
212
|
+
deletions: change.linesRemoved,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
/** Sums added/removed line counts across rendered diff hunks. */
|
|
217
|
+
export function countHunks(hunks: readonly DiffHunk[]): {
|
|
218
|
+
additions: number;
|
|
219
|
+
deletions: number;
|
|
220
|
+
} {
|
|
221
|
+
let additions = 0;
|
|
222
|
+
let deletions = 0;
|
|
223
|
+
for (const hunk of hunks) {
|
|
224
|
+
for (const line of hunk.lines) {
|
|
225
|
+
if (line.type === "added") additions++;
|
|
226
|
+
else if (line.type === "removed") deletions++;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
return { additions, deletions };
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/** Inline text of a side, or null when absent/offloaded/binary. */
|
|
233
|
+
function inlineSide(side: FileChange["before"]): string | null {
|
|
234
|
+
if (!side) return "";
|
|
235
|
+
if (side.isBinary) return null;
|
|
236
|
+
return side.body.case === "inline" ? side.body.value : null;
|
|
237
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// Identity of file-change diff document tabs in the workspace surface's
|
|
2
|
+
// editor group. Domain: execution (the diff renderer and the FileChange data
|
|
3
|
+
// model are execution-domain; the workflow panel is the first host, and a
|
|
4
|
+
// future session-side consumer would share this identity rather than minting
|
|
5
|
+
// a divergent one).
|
|
6
|
+
//
|
|
7
|
+
// Kept in its own module (not in a component file) so behavior-only
|
|
8
|
+
// consumers — the panel controller opens the tabs, the viewer routes them —
|
|
9
|
+
// depend on the identity without pulling the diff renderer into their module
|
|
10
|
+
// graph (DD-003 headless-first). Mirrors artifact-document.ts.
|
|
11
|
+
|
|
12
|
+
import type { FileChange } from "@stigmer/protos/ai/stigmer/agentic/agentexecution/v1/message_pb";
|
|
13
|
+
import { virtualEntryId } from "../internal/store/index.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Virtual entry id of the file-change diff document FAMILY. Like artifacts
|
|
17
|
+
* (and unlike the session's single plan tab), file changes are many: every
|
|
18
|
+
* opened diff shares this one entry id and is distinguished by its
|
|
19
|
+
* change-path-derived tab path, so
|
|
20
|
+
* `editorKey(FILE_CHANGE_DOCUMENT_ENTRY_ID, path)` yields one tab per changed
|
|
21
|
+
* file — the VS Code "each file is a tab" model. The NUL-namespaced virtual
|
|
22
|
+
* id can never alias a real workspace entry, and its distinct `"filechange"`
|
|
23
|
+
* kind can never collide with the `"artifact"`/`"plan"` families.
|
|
24
|
+
*/
|
|
25
|
+
export const FILE_CHANGE_DOCUMENT_ENTRY_ID = virtualEntryId("filechange");
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The identity of a file change's diff tab within the family. The net rollup
|
|
29
|
+
* carries at most one {@link FileChange} per path, so the change's path IS
|
|
30
|
+
* the identity — and, as the tab path, its basename is exactly the tab label
|
|
31
|
+
* (no prefixing needed, unlike artifact tabs whose ids are opaque).
|
|
32
|
+
* `absolutePath` is the fallback for captures without a workspace-relative
|
|
33
|
+
* path, matching the keying inside the net-collapse core.
|
|
34
|
+
*/
|
|
35
|
+
export function fileChangeTabPath(change: FileChange): string {
|
|
36
|
+
return change.path || change.absolutePath;
|
|
37
|
+
}
|
package/src/execution/index.ts
CHANGED
|
@@ -12,6 +12,9 @@ export { isTerminalPhase } from "./execution-phases.js";
|
|
|
12
12
|
export { useExecutionStream } from "./useExecutionStream.js";
|
|
13
13
|
export type { UseExecutionStreamReturn } from "./useExecutionStream.js";
|
|
14
14
|
|
|
15
|
+
export { useLiveAgentExecution } from "./useLiveAgentExecution.js";
|
|
16
|
+
export type { UseLiveAgentExecutionReturn } from "./useLiveAgentExecution.js";
|
|
17
|
+
|
|
15
18
|
export { useAgentExecutionActions } from "./useAgentExecutionActions.js";
|
|
16
19
|
export type {
|
|
17
20
|
UseAgentExecutionActionsOptions,
|
|
@@ -55,6 +58,9 @@ export type { UseExecutionArtifactsReturn } from "./useExecutionArtifacts.js";
|
|
|
55
58
|
export { useArtifactContent } from "./useArtifactContent.js";
|
|
56
59
|
export type { UseArtifactContentReturn } from "./useArtifactContent.js";
|
|
57
60
|
|
|
61
|
+
export { useArtifactContentById } from "./useArtifactContentById.js";
|
|
62
|
+
export type { UseArtifactContentByIdReturn } from "./useArtifactContentById.js";
|
|
63
|
+
|
|
58
64
|
export { useArtifactDownloadUrl } from "./useArtifactDownloadUrl.js";
|
|
59
65
|
export type {
|
|
60
66
|
UseArtifactDownloadUrlReturn,
|
|
@@ -92,6 +98,11 @@ export type { DiffStatSummary } from "./write-back-utils.js";
|
|
|
92
98
|
export { FileChangesView, FileChangeDiff } from "./FileChangesView.js";
|
|
93
99
|
export type { FileChangesViewProps, FileChangeDiffProps } from "./FileChangesView.js";
|
|
94
100
|
|
|
101
|
+
export {
|
|
102
|
+
deriveExecutionFileChanges,
|
|
103
|
+
toFileDiffEntry,
|
|
104
|
+
} from "./deriveExecutionFileChanges.js";
|
|
105
|
+
|
|
95
106
|
export { EmptyChangeNotice } from "./EmptyChangeNotice.js";
|
|
96
107
|
export type { EmptyChangeNoticeProps, EmptyChangeKind } from "./EmptyChangeNotice.js";
|
|
97
108
|
|
|
@@ -264,9 +275,34 @@ export type { FileReviewContextValue } from "./FileReviewContext.js";
|
|
|
264
275
|
export { ArtifactRow } from "./ArtifactRow.js";
|
|
265
276
|
export type { ArtifactRowProps } from "./ArtifactRow.js";
|
|
266
277
|
|
|
278
|
+
export { ArtifactRowView } from "./ArtifactRowView.js";
|
|
279
|
+
export type { ArtifactRowViewProps } from "./ArtifactRowView.js";
|
|
280
|
+
|
|
281
|
+
export {
|
|
282
|
+
fromExecutionArtifact,
|
|
283
|
+
fromArtifact,
|
|
284
|
+
} from "./artifact-row-item.js";
|
|
285
|
+
export type { ArtifactRowItem } from "./artifact-row-item.js";
|
|
286
|
+
|
|
287
|
+
export { ARTIFACT_DOCUMENT_ENTRY_ID } from "./artifact-document.js";
|
|
288
|
+
|
|
289
|
+
export {
|
|
290
|
+
FILE_CHANGE_DOCUMENT_ENTRY_ID,
|
|
291
|
+
fileChangeTabPath,
|
|
292
|
+
} from "./file-change-document.js";
|
|
293
|
+
|
|
294
|
+
export {
|
|
295
|
+
AGENT_EXECUTION_DOCUMENT_ENTRY_ID,
|
|
296
|
+
agentExecutionTabPath,
|
|
297
|
+
parseAgentExecutionTabPath,
|
|
298
|
+
} from "./agent-execution-document.js";
|
|
299
|
+
|
|
267
300
|
export { ArtifactContentRenderer } from "./ArtifactContentRenderer.js";
|
|
268
301
|
export type { ArtifactContentRendererProps } from "./ArtifactContentRenderer.js";
|
|
269
302
|
|
|
303
|
+
export { ArtifactFileContent } from "./ArtifactFileContent.js";
|
|
304
|
+
export type { ArtifactFileContentProps } from "./ArtifactFileContent.js";
|
|
305
|
+
|
|
270
306
|
export { ArtifactContentBody } from "./ArtifactContentBody.js";
|
|
271
307
|
export type { ArtifactContentBodyProps } from "./ArtifactContentBody.js";
|
|
272
308
|
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
// Data hook that reads an Artifact resource's content by artifact id.
|
|
4
|
+
// Domain: execution (the Artifact-resource counterpart of useArtifactContent).
|
|
5
|
+
|
|
6
|
+
import { create } from "@bufbuild/protobuf";
|
|
7
|
+
import { GetArtifactContentRequestSchema } from "@stigmer/protos/ai/stigmer/agentic/artifact/v1/io_pb";
|
|
8
|
+
import { useStigmer } from "../hooks.js";
|
|
9
|
+
import { useFetch } from "../internal/useFetch.js";
|
|
10
|
+
|
|
11
|
+
interface ArtifactContentData {
|
|
12
|
+
content: string | null;
|
|
13
|
+
contentType: string | null;
|
|
14
|
+
totalSizeBytes: bigint;
|
|
15
|
+
isTruncated: boolean;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const EMPTY_ARTIFACT: ArtifactContentData = {
|
|
19
|
+
content: null,
|
|
20
|
+
contentType: null,
|
|
21
|
+
totalSizeBytes: BigInt(0),
|
|
22
|
+
isTruncated: false,
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** Return value of {@link useArtifactContentById}. */
|
|
26
|
+
export interface UseArtifactContentByIdReturn {
|
|
27
|
+
/**
|
|
28
|
+
* Decoded text content of the artifact, or `null` when:
|
|
29
|
+
* - Fetching is skipped (`artifactId` is `null`)
|
|
30
|
+
* - The request is in-flight
|
|
31
|
+
* - The request failed
|
|
32
|
+
*/
|
|
33
|
+
readonly content: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* MIME content type recorded at artifact creation
|
|
36
|
+
* (`ArtifactSpec.content_type`). `null` before the first successful fetch.
|
|
37
|
+
*/
|
|
38
|
+
readonly contentType: string | null;
|
|
39
|
+
/**
|
|
40
|
+
* Actual total size of the artifact in bytes — larger than the returned
|
|
41
|
+
* content when `isTruncated` is `true` ("showing 512 KB of 2.1 MB").
|
|
42
|
+
*/
|
|
43
|
+
readonly totalSizeBytes: bigint;
|
|
44
|
+
/**
|
|
45
|
+
* Whether the returned content was truncated by the server's `max_bytes`
|
|
46
|
+
* limit. When `true`, offer the full artifact via `getDownloadUrl` instead.
|
|
47
|
+
*/
|
|
48
|
+
readonly isTruncated: boolean;
|
|
49
|
+
/** `true` while the content request is in-flight. */
|
|
50
|
+
readonly isLoading: boolean;
|
|
51
|
+
/** `true` while a background refetch is in flight and stale data is shown. */
|
|
52
|
+
readonly isRefetching: boolean;
|
|
53
|
+
/** Error from the last failed attempt, or `null` when healthy. */
|
|
54
|
+
readonly error: Error | null;
|
|
55
|
+
/** Re-fetch the artifact content. */
|
|
56
|
+
readonly refetch: () => void;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Data hook that fetches the text content of an `Artifact` resource via
|
|
61
|
+
* `stigmer.artifact.getContent()`.
|
|
62
|
+
*
|
|
63
|
+
* The server proxies the artifact bytes through the Stigmer API rather than
|
|
64
|
+
* handing out a presigned URL — embedded SDK consumers on third-party origins
|
|
65
|
+
* avoid the CORS exposure of fetching storage URLs from the browser (the same
|
|
66
|
+
* rationale as the agent-execution side's `useArtifactContent`, which this
|
|
67
|
+
* hook mirrors; artifacts here are addressed by artifact ID, the artifact
|
|
68
|
+
* store's identity, instead of `executionId` + `storageKey`).
|
|
69
|
+
*
|
|
70
|
+
* Pass `null` for `artifactId` to skip fetching — the caller controls when to
|
|
71
|
+
* fetch based on artifact metadata (e.g. only for text content types below a
|
|
72
|
+
* size threshold), consistent with the `useArtifactContent(null)` convention.
|
|
73
|
+
*
|
|
74
|
+
* The server enforces a content size limit (default 512 KB). Content
|
|
75
|
+
* exceeding it comes back with `isTruncated: true`; offer a full download via
|
|
76
|
+
* `getDownloadUrl` in that case. The returned `content` is decoded as UTF-8 —
|
|
77
|
+
* for binary artifacts, use `getDownloadUrl` instead of this hook.
|
|
78
|
+
*
|
|
79
|
+
* @param artifactId - The `Artifact` resource id (`art_…`), or `null` to skip.
|
|
80
|
+
* @param cacheKey - Optional cross-mount cache key (DD-014). When set, a
|
|
81
|
+
* remount with the same key renders previously-fetched content instantly
|
|
82
|
+
* and refetches in the background — used by the workflow artifact document
|
|
83
|
+
* so switching back to a recently-viewed tab is instant.
|
|
84
|
+
*/
|
|
85
|
+
export function useArtifactContentById(
|
|
86
|
+
artifactId: string | null,
|
|
87
|
+
cacheKey?: string,
|
|
88
|
+
): UseArtifactContentByIdReturn {
|
|
89
|
+
const stigmer = useStigmer();
|
|
90
|
+
|
|
91
|
+
const { data, isLoading, isRefetching, error, refetch } = useFetch(
|
|
92
|
+
artifactId
|
|
93
|
+
? () =>
|
|
94
|
+
stigmer.artifact
|
|
95
|
+
.getContent(
|
|
96
|
+
create(GetArtifactContentRequestSchema, { artifactId }),
|
|
97
|
+
)
|
|
98
|
+
.then((result): ArtifactContentData => ({
|
|
99
|
+
content: new TextDecoder().decode(result.content),
|
|
100
|
+
contentType: result.contentType || null,
|
|
101
|
+
totalSizeBytes: result.totalSizeBytes,
|
|
102
|
+
isTruncated: result.truncated,
|
|
103
|
+
}))
|
|
104
|
+
: null,
|
|
105
|
+
[artifactId, stigmer],
|
|
106
|
+
EMPTY_ARTIFACT,
|
|
107
|
+
cacheKey ? { cacheKey } : undefined,
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
content: data.content,
|
|
112
|
+
contentType: data.contentType,
|
|
113
|
+
totalSizeBytes: data.totalSizeBytes,
|
|
114
|
+
isTruncated: data.isTruncated,
|
|
115
|
+
isLoading,
|
|
116
|
+
isRefetching,
|
|
117
|
+
error,
|
|
118
|
+
refetch,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
@@ -28,9 +28,10 @@ export interface UseArtifactDownloadReturn {
|
|
|
28
28
|
/**
|
|
29
29
|
* Behavior hook that downloads an execution artifact on demand.
|
|
30
30
|
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* Implements the click → mint fresh URL → browser download flow so every
|
|
32
|
+
* artifact "Download" affordance shares one implementation (the workflow's
|
|
33
|
+
* `Artifact`-resource counterpart is `useWorkflowArtifactDownload`). The URL
|
|
34
|
+
* is minted at click time from
|
|
34
35
|
* the stable `storageKey` via `getArtifactDownloadUrl`, so it is always valid —
|
|
35
36
|
* unlike the previously persisted, short-lived URL that expired after an hour.
|
|
36
37
|
*
|
|
@@ -72,7 +72,7 @@ export interface SharedAgentExecutionFields {
|
|
|
72
72
|
* the Environment Flow instead (store secrets in an Environment
|
|
73
73
|
* resource and bind them via an AgentInstance).
|
|
74
74
|
*
|
|
75
|
-
* @see {@link https://
|
|
75
|
+
* @see {@link https://stigmer.ai/docs/product/how-to-provide-secrets | How to Provide Secrets}
|
|
76
76
|
*/
|
|
77
77
|
readonly runtimeEnv?: Record<string, EnvVarInput>;
|
|
78
78
|
/**
|