@stigmer/react 3.1.16 → 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.
Files changed (824) hide show
  1. package/README.md +16 -1
  2. package/agent-instance/AgentInstanceList.d.ts.map +1 -1
  3. package/agent-instance/AgentInstanceList.js +11 -3
  4. package/agent-instance/AgentInstanceList.js.map +1 -1
  5. package/channel/AgentChannelsPanel.d.ts +60 -0
  6. package/channel/AgentChannelsPanel.d.ts.map +1 -0
  7. package/channel/AgentChannelsPanel.js +255 -0
  8. package/channel/AgentChannelsPanel.js.map +1 -0
  9. package/channel/ChannelConversationsDialog.d.ts +41 -0
  10. package/channel/ChannelConversationsDialog.d.ts.map +1 -0
  11. package/channel/ChannelConversationsDialog.js +94 -0
  12. package/channel/ChannelConversationsDialog.js.map +1 -0
  13. package/channel/ChannelCredentialsDialog.d.ts +37 -0
  14. package/channel/ChannelCredentialsDialog.d.ts.map +1 -0
  15. package/channel/ChannelCredentialsDialog.js +75 -0
  16. package/channel/ChannelCredentialsDialog.js.map +1 -0
  17. package/channel/ChannelToolCredentials.d.ts +31 -0
  18. package/channel/ChannelToolCredentials.d.ts.map +1 -0
  19. package/channel/ChannelToolCredentials.js +41 -0
  20. package/channel/ChannelToolCredentials.js.map +1 -0
  21. package/channel/ConnectSlackDialog.d.ts +61 -0
  22. package/channel/ConnectSlackDialog.d.ts.map +1 -0
  23. package/channel/ConnectSlackDialog.js +238 -0
  24. package/channel/ConnectSlackDialog.js.map +1 -0
  25. package/channel/ConnectWhatsAppDialog.d.ts +70 -0
  26. package/channel/ConnectWhatsAppDialog.d.ts.map +1 -0
  27. package/channel/ConnectWhatsAppDialog.js +256 -0
  28. package/channel/ConnectWhatsAppDialog.js.map +1 -0
  29. package/channel/SlackMarkIcon.d.ts +11 -0
  30. package/channel/SlackMarkIcon.d.ts.map +1 -0
  31. package/channel/SlackMarkIcon.js +13 -0
  32. package/channel/SlackMarkIcon.js.map +1 -0
  33. package/channel/WhatsAppMarkIcon.d.ts +12 -0
  34. package/channel/WhatsAppMarkIcon.d.ts.map +1 -0
  35. package/channel/WhatsAppMarkIcon.js +14 -0
  36. package/channel/WhatsAppMarkIcon.js.map +1 -0
  37. package/channel/connect/ServingAppSection.d.ts +57 -0
  38. package/channel/connect/ServingAppSection.d.ts.map +1 -0
  39. package/channel/connect/ServingAppSection.js +49 -0
  40. package/channel/connect/ServingAppSection.js.map +1 -0
  41. package/channel/connect/ToolCredentialsSection.d.ts +20 -0
  42. package/channel/connect/ToolCredentialsSection.d.ts.map +1 -0
  43. package/channel/connect/ToolCredentialsSection.js +22 -0
  44. package/channel/connect/ToolCredentialsSection.js.map +1 -0
  45. package/channel/connect/VerbatimRefusal.d.ts +16 -0
  46. package/channel/connect/VerbatimRefusal.d.ts.map +1 -0
  47. package/channel/connect/VerbatimRefusal.js +18 -0
  48. package/channel/connect/VerbatimRefusal.js.map +1 -0
  49. package/channel/connect/icons.d.ts +16 -0
  50. package/channel/connect/icons.d.ts.map +1 -0
  51. package/channel/connect/icons.js +21 -0
  52. package/channel/connect/icons.js.map +1 -0
  53. package/channel/index.d.ts +36 -0
  54. package/channel/index.d.ts.map +1 -0
  55. package/channel/index.js +19 -0
  56. package/channel/index.js.map +1 -0
  57. package/channel/providerPresentation.d.ts +44 -0
  58. package/channel/providerPresentation.d.ts.map +1 -0
  59. package/channel/providerPresentation.js +106 -0
  60. package/channel/providerPresentation.js.map +1 -0
  61. package/channel/providers.d.ts +62 -0
  62. package/channel/providers.d.ts.map +1 -0
  63. package/channel/providers.js +26 -0
  64. package/channel/providers.js.map +1 -0
  65. package/channel/useAgentChannel.d.ts +31 -0
  66. package/channel/useAgentChannel.d.ts.map +1 -0
  67. package/channel/useAgentChannel.js +34 -0
  68. package/channel/useAgentChannel.js.map +1 -0
  69. package/channel/useAgentChannelList.d.ts +43 -0
  70. package/channel/useAgentChannelList.d.ts.map +1 -0
  71. package/channel/useAgentChannelList.js +39 -0
  72. package/channel/useAgentChannelList.js.map +1 -0
  73. package/channel/useChannelSessions.d.ts +47 -0
  74. package/channel/useChannelSessions.d.ts.map +1 -0
  75. package/channel/useChannelSessions.js +38 -0
  76. package/channel/useChannelSessions.js.map +1 -0
  77. package/channel/useChannelToolReadiness.d.ts +23 -0
  78. package/channel/useChannelToolReadiness.d.ts.map +1 -0
  79. package/channel/useChannelToolReadiness.js +28 -0
  80. package/channel/useChannelToolReadiness.js.map +1 -0
  81. package/channel/useConnectSlackChannel.d.ts +75 -0
  82. package/channel/useConnectSlackChannel.d.ts.map +1 -0
  83. package/channel/useConnectSlackChannel.js +115 -0
  84. package/channel/useConnectSlackChannel.js.map +1 -0
  85. package/channel/useCreateAgentChannel.d.ts +42 -0
  86. package/channel/useCreateAgentChannel.d.ts.map +1 -0
  87. package/channel/useCreateAgentChannel.js +48 -0
  88. package/channel/useCreateAgentChannel.js.map +1 -0
  89. package/channel/useDeleteAgentChannel.d.ts +40 -0
  90. package/channel/useDeleteAgentChannel.d.ts.map +1 -0
  91. package/channel/useDeleteAgentChannel.js +44 -0
  92. package/channel/useDeleteAgentChannel.js.map +1 -0
  93. package/channel/useInstallChannel.d.ts +60 -0
  94. package/channel/useInstallChannel.d.ts.map +1 -0
  95. package/channel/useInstallChannel.js +63 -0
  96. package/channel/useInstallChannel.js.map +1 -0
  97. package/channel/useOrgAgentChannelList.d.ts +32 -0
  98. package/channel/useOrgAgentChannelList.d.ts.map +1 -0
  99. package/channel/useOrgAgentChannelList.js +29 -0
  100. package/channel/useOrgAgentChannelList.js.map +1 -0
  101. package/channel/useSaveAgentChannel.d.ts +63 -0
  102. package/channel/useSaveAgentChannel.d.ts.map +1 -0
  103. package/channel/useSaveAgentChannel.js +104 -0
  104. package/channel/useSaveAgentChannel.js.map +1 -0
  105. package/channel-app/ChannelAppDetailPanel.d.ts +46 -0
  106. package/channel-app/ChannelAppDetailPanel.d.ts.map +1 -0
  107. package/channel-app/ChannelAppDetailPanel.js +142 -0
  108. package/channel-app/ChannelAppDetailPanel.js.map +1 -0
  109. package/channel-app/ChannelAppListPanel.d.ts +36 -0
  110. package/channel-app/ChannelAppListPanel.d.ts.map +1 -0
  111. package/channel-app/ChannelAppListPanel.js +63 -0
  112. package/channel-app/ChannelAppListPanel.js.map +1 -0
  113. package/channel-app/CreateChannelAppForm.d.ts +54 -0
  114. package/channel-app/CreateChannelAppForm.d.ts.map +1 -0
  115. package/channel-app/CreateChannelAppForm.js +140 -0
  116. package/channel-app/CreateChannelAppForm.js.map +1 -0
  117. package/channel-app/index.d.ts +18 -0
  118. package/channel-app/index.d.ts.map +1 -0
  119. package/channel-app/index.js +10 -0
  120. package/channel-app/index.js.map +1 -0
  121. package/channel-app/internal.d.ts +33 -0
  122. package/channel-app/internal.d.ts.map +1 -0
  123. package/channel-app/internal.js +44 -0
  124. package/channel-app/internal.js.map +1 -0
  125. package/channel-app/slackAppSetup.d.ts +80 -0
  126. package/channel-app/slackAppSetup.d.ts.map +1 -0
  127. package/channel-app/slackAppSetup.js +123 -0
  128. package/channel-app/slackAppSetup.js.map +1 -0
  129. package/channel-app/useChannelAppList.d.ts +35 -0
  130. package/channel-app/useChannelAppList.d.ts.map +1 -0
  131. package/channel-app/useChannelAppList.js +34 -0
  132. package/channel-app/useChannelAppList.js.map +1 -0
  133. package/channel-app/useCreateChannelApp.d.ts +39 -0
  134. package/channel-app/useCreateChannelApp.d.ts.map +1 -0
  135. package/channel-app/useCreateChannelApp.js +50 -0
  136. package/channel-app/useCreateChannelApp.js.map +1 -0
  137. package/channel-app/useDeleteChannelApp.d.ts +31 -0
  138. package/channel-app/useDeleteChannelApp.d.ts.map +1 -0
  139. package/channel-app/useDeleteChannelApp.js +43 -0
  140. package/channel-app/useDeleteChannelApp.js.map +1 -0
  141. package/channel-app/useUpdateChannelApp.d.ts +39 -0
  142. package/channel-app/useUpdateChannelApp.d.ts.map +1 -0
  143. package/channel-app/useUpdateChannelApp.js +50 -0
  144. package/channel-app/useUpdateChannelApp.js.map +1 -0
  145. package/channel-app/whatsappAppSetup.d.ts +51 -0
  146. package/channel-app/whatsappAppSetup.d.ts.map +1 -0
  147. package/channel-app/whatsappAppSetup.js +57 -0
  148. package/channel-app/whatsappAppSetup.js.map +1 -0
  149. package/environment/index.d.ts +2 -0
  150. package/environment/index.d.ts.map +1 -1
  151. package/environment/index.js +1 -0
  152. package/environment/index.js.map +1 -1
  153. package/environment/useToolCredentialsReadiness.d.ts +52 -0
  154. package/environment/useToolCredentialsReadiness.d.ts.map +1 -0
  155. package/environment/useToolCredentialsReadiness.js +84 -0
  156. package/environment/useToolCredentialsReadiness.js.map +1 -0
  157. package/execution/ArtifactContentBody.d.ts.map +1 -1
  158. package/execution/ArtifactContentBody.js +5 -21
  159. package/execution/ArtifactContentBody.js.map +1 -1
  160. package/execution/ArtifactFileContent.d.ts +28 -0
  161. package/execution/ArtifactFileContent.d.ts.map +1 -0
  162. package/execution/ArtifactFileContent.js +36 -0
  163. package/execution/ArtifactFileContent.js.map +1 -0
  164. package/execution/ArtifactRow.d.ts +8 -20
  165. package/execution/ArtifactRow.d.ts.map +1 -1
  166. package/execution/ArtifactRow.js +12 -45
  167. package/execution/ArtifactRow.js.map +1 -1
  168. package/execution/ArtifactRowView.d.ts +43 -0
  169. package/execution/ArtifactRowView.d.ts.map +1 -0
  170. package/execution/ArtifactRowView.js +35 -0
  171. package/execution/ArtifactRowView.js.map +1 -0
  172. package/execution/FileChangesView.d.ts.map +1 -1
  173. package/execution/FileChangesView.js +1 -61
  174. package/execution/FileChangesView.js.map +1 -1
  175. package/execution/SubAgentSection.d.ts.map +1 -1
  176. package/execution/SubAgentSection.js +4 -15
  177. package/execution/SubAgentSection.js.map +1 -1
  178. package/execution/ToolCallItem.d.ts.map +1 -1
  179. package/execution/ToolCallItem.js +16 -61
  180. package/execution/ToolCallItem.js.map +1 -1
  181. package/execution/agent-execution-document.d.ts +31 -0
  182. package/execution/agent-execution-document.d.ts.map +1 -0
  183. package/execution/agent-execution-document.js +48 -0
  184. package/execution/agent-execution-document.js.map +1 -0
  185. package/{session → execution}/artifact-document.d.ts +2 -3
  186. package/execution/artifact-document.d.ts.map +1 -0
  187. package/execution/artifact-document.js +23 -0
  188. package/execution/artifact-document.js.map +1 -0
  189. package/execution/artifact-row-item.d.ts +56 -0
  190. package/execution/artifact-row-item.d.ts.map +1 -0
  191. package/execution/artifact-row-item.js +57 -0
  192. package/execution/artifact-row-item.js.map +1 -0
  193. package/execution/deriveExecutionFileChanges.d.ts +55 -0
  194. package/execution/deriveExecutionFileChanges.d.ts.map +1 -0
  195. package/execution/deriveExecutionFileChanges.js +216 -0
  196. package/execution/deriveExecutionFileChanges.js.map +1 -0
  197. package/execution/file-change-document.d.ts +22 -0
  198. package/execution/file-change-document.d.ts.map +1 -0
  199. package/execution/file-change-document.js +34 -0
  200. package/execution/file-change-document.js.map +1 -0
  201. package/execution/index.d.ts +14 -0
  202. package/execution/index.d.ts.map +1 -1
  203. package/execution/index.js +9 -0
  204. package/execution/index.js.map +1 -1
  205. package/execution/useArtifactContentById.d.ts +61 -0
  206. package/execution/useArtifactContentById.d.ts.map +1 -0
  207. package/execution/useArtifactContentById.js +63 -0
  208. package/execution/useArtifactContentById.js.map +1 -0
  209. package/execution/useArtifactDownload.d.ts +4 -3
  210. package/execution/useArtifactDownload.d.ts.map +1 -1
  211. package/execution/useArtifactDownload.js +4 -3
  212. package/execution/useArtifactDownload.js.map +1 -1
  213. package/execution/useCreateAgentExecution.d.ts +1 -1
  214. package/execution/useLiveAgentExecution.d.ts +59 -0
  215. package/execution/useLiveAgentExecution.d.ts.map +1 -0
  216. package/execution/useLiveAgentExecution.js +73 -0
  217. package/execution/useLiveAgentExecution.js.map +1 -0
  218. package/index.d.ts +15 -10
  219. package/index.d.ts.map +1 -1
  220. package/index.js +21 -6
  221. package/index.js.map +1 -1
  222. package/internal/DecisionButton.d.ts +4 -3
  223. package/internal/DecisionButton.d.ts.map +1 -1
  224. package/internal/DecisionButton.js +4 -3
  225. package/internal/DecisionButton.js.map +1 -1
  226. package/internal/oauthPopup.d.ts +101 -0
  227. package/internal/oauthPopup.d.ts.map +1 -0
  228. package/internal/oauthPopup.js +208 -0
  229. package/internal/oauthPopup.js.map +1 -0
  230. package/internal/store/index.d.ts +0 -2
  231. package/internal/store/index.d.ts.map +1 -1
  232. package/internal/store/index.js +0 -1
  233. package/internal/store/index.js.map +1 -1
  234. package/internal/store/workflow-execution-event-store.d.ts +34 -1
  235. package/internal/store/workflow-execution-event-store.d.ts.map +1 -1
  236. package/internal/store/workflow-execution-event-store.js +81 -3
  237. package/internal/store/workflow-execution-event-store.js.map +1 -1
  238. package/internal/store/workspace-file-selection-store.d.ts +1 -2
  239. package/internal/store/workspace-file-selection-store.d.ts.map +1 -1
  240. package/internal/store/workspace-file-selection-store.js +2 -5
  241. package/internal/store/workspace-file-selection-store.js.map +1 -1
  242. package/internal/thread-card/ThreadCardShell.d.ts +91 -0
  243. package/internal/thread-card/ThreadCardShell.d.ts.map +1 -0
  244. package/internal/thread-card/ThreadCardShell.js +41 -0
  245. package/internal/thread-card/ThreadCardShell.js.map +1 -0
  246. package/internal/thread-card/glyphs.d.ts +34 -0
  247. package/internal/thread-card/glyphs.d.ts.map +1 -0
  248. package/internal/thread-card/glyphs.js +50 -0
  249. package/internal/thread-card/glyphs.js.map +1 -0
  250. package/internal/thread-card/index.d.ts +3 -0
  251. package/internal/thread-card/index.d.ts.map +1 -0
  252. package/internal/thread-card/index.js +3 -0
  253. package/internal/thread-card/index.js.map +1 -0
  254. package/internal/useRevealLine.d.ts +2 -2
  255. package/internal/useRevealLine.js +2 -2
  256. package/mcp-server/OAuthCallbackHandler.js +1 -1
  257. package/mcp-server/OAuthCallbackHandler.js.map +1 -1
  258. package/mcp-server/useMcpServerOAuthConnect.d.ts +4 -23
  259. package/mcp-server/useMcpServerOAuthConnect.d.ts.map +1 -1
  260. package/mcp-server/useMcpServerOAuthConnect.js +12 -145
  261. package/mcp-server/useMcpServerOAuthConnect.js.map +1 -1
  262. package/package.json +4 -4
  263. package/provider.d.ts +32 -0
  264. package/provider.d.ts.map +1 -1
  265. package/provider.js +25 -1
  266. package/provider.js.map +1 -1
  267. package/session/NewSessionViewer.d.ts.map +1 -1
  268. package/session/NewSessionViewer.js +0 -1
  269. package/session/NewSessionViewer.js.map +1 -1
  270. package/session/SessionPanelChip.d.ts +7 -22
  271. package/session/SessionPanelChip.d.ts.map +1 -1
  272. package/session/SessionPanelChip.js +8 -36
  273. package/session/SessionPanelChip.js.map +1 -1
  274. package/session/SessionViewer.d.ts +7 -4
  275. package/session/SessionViewer.d.ts.map +1 -1
  276. package/session/SessionViewer.js +32 -30
  277. package/session/SessionViewer.js.map +1 -1
  278. package/session/audience.d.ts +15 -1
  279. package/session/audience.d.ts.map +1 -1
  280. package/session/channelOrigin.d.ts +33 -0
  281. package/session/channelOrigin.d.ts.map +1 -0
  282. package/session/channelOrigin.js +36 -0
  283. package/session/channelOrigin.js.map +1 -0
  284. package/session/facets/index.d.ts +0 -2
  285. package/session/facets/index.d.ts.map +1 -1
  286. package/session/facets/index.js +0 -1
  287. package/session/facets/index.js.map +1 -1
  288. package/session/index.d.ts +2 -2
  289. package/session/index.d.ts.map +1 -1
  290. package/session/index.js +5 -3
  291. package/session/index.js.map +1 -1
  292. package/session/useSessionFileChanges.d.ts +10 -34
  293. package/session/useSessionFileChanges.d.ts.map +1 -1
  294. package/session/useSessionFileChanges.js +9 -141
  295. package/session/useSessionFileChanges.js.map +1 -1
  296. package/session/useSessionPanel.d.ts +5 -15
  297. package/session/useSessionPanel.d.ts.map +1 -1
  298. package/session/useSessionPanel.js +3 -35
  299. package/session/useSessionPanel.js.map +1 -1
  300. package/session/useSessionRailViews.d.ts +3 -6
  301. package/session/useSessionRailViews.d.ts.map +1 -1
  302. package/session/useSessionRailViews.js +3 -17
  303. package/session/useSessionRailViews.js.map +1 -1
  304. package/settings/ChannelAppsSection.d.ts +13 -0
  305. package/settings/ChannelAppsSection.d.ts.map +1 -0
  306. package/settings/ChannelAppsSection.js +48 -0
  307. package/settings/ChannelAppsSection.js.map +1 -0
  308. package/settings/index.d.ts +1 -0
  309. package/settings/index.d.ts.map +1 -1
  310. package/settings/index.js +1 -0
  311. package/settings/index.js.map +1 -1
  312. package/settings/settings-nav.d.ts.map +1 -1
  313. package/settings/settings-nav.js +6 -1
  314. package/settings/settings-nav.js.map +1 -1
  315. package/sharing/AgentShareList.d.ts.map +1 -1
  316. package/sharing/AgentShareList.js +11 -3
  317. package/sharing/AgentShareList.js.map +1 -1
  318. package/sharing/ShareAgentDialog.js +1 -1
  319. package/sharing/useShareToolReadiness.d.ts +9 -38
  320. package/sharing/useShareToolReadiness.d.ts.map +1 -1
  321. package/sharing/useShareToolReadiness.js +7 -72
  322. package/sharing/useShareToolReadiness.js.map +1 -1
  323. package/src/__tests__/provider-container.layout.test.tsx +165 -0
  324. package/src/__tests__/provider-theme-scope.test.tsx +31 -0
  325. package/src/agent-instance/AgentInstanceList.tsx +60 -42
  326. package/src/agent-instance/__tests__/AgentInstanceList.test.tsx +161 -0
  327. package/src/channel/AgentChannelsPanel.tsx +688 -0
  328. package/src/channel/ChannelConversationsDialog.tsx +267 -0
  329. package/src/channel/ChannelCredentialsDialog.tsx +219 -0
  330. package/src/channel/ChannelToolCredentials.tsx +124 -0
  331. package/src/channel/ConnectSlackDialog.tsx +611 -0
  332. package/src/channel/ConnectWhatsAppDialog.tsx +624 -0
  333. package/src/channel/SlackMarkIcon.tsx +21 -0
  334. package/src/channel/WhatsAppMarkIcon.tsx +22 -0
  335. package/src/channel/__tests__/AgentChannelsPanel.test.tsx +638 -0
  336. package/src/channel/__tests__/ChannelConversationsDialog.test.tsx +114 -0
  337. package/src/channel/__tests__/ChannelCredentialsDialog.test.tsx +240 -0
  338. package/src/channel/__tests__/ConnectSlackDialog.test.tsx +659 -0
  339. package/src/channel/__tests__/ConnectWhatsAppDialog.test.tsx +564 -0
  340. package/src/channel/__tests__/providers.test.ts +118 -0
  341. package/src/channel/__tests__/useAgentChannel.test.tsx +116 -0
  342. package/src/channel/__tests__/useAgentChannelList.test.tsx +166 -0
  343. package/src/channel/__tests__/useChannelSessions.test.tsx +95 -0
  344. package/src/channel/__tests__/useChannelToolReadiness.test.tsx +158 -0
  345. package/src/channel/__tests__/useConnectSlackChannel.test.tsx +276 -0
  346. package/src/channel/__tests__/useDeleteAgentChannel.test.tsx +97 -0
  347. package/src/channel/__tests__/useInstallChannel.test.tsx +177 -0
  348. package/src/channel/__tests__/useSaveAgentChannel.test.tsx +294 -0
  349. package/src/channel/connect/ServingAppSection.tsx +185 -0
  350. package/src/channel/connect/ToolCredentialsSection.tsx +67 -0
  351. package/src/channel/connect/VerbatimRefusal.tsx +27 -0
  352. package/src/channel/connect/icons.tsx +42 -0
  353. package/src/channel/index.ts +65 -0
  354. package/src/channel/providerPresentation.ts +154 -0
  355. package/src/channel/providers.ts +73 -0
  356. package/src/channel/useAgentChannel.ts +58 -0
  357. package/src/channel/useAgentChannelList.ts +69 -0
  358. package/src/channel/useChannelSessions.ts +73 -0
  359. package/src/channel/useChannelToolReadiness.ts +39 -0
  360. package/src/channel/useConnectSlackChannel.ts +195 -0
  361. package/src/channel/useCreateAgentChannel.ts +73 -0
  362. package/src/channel/useDeleteAgentChannel.ts +71 -0
  363. package/src/channel/useInstallChannel.ts +117 -0
  364. package/src/channel/useOrgAgentChannelList.ts +60 -0
  365. package/src/channel/useSaveAgentChannel.ts +133 -0
  366. package/src/channel-app/ChannelAppDetailPanel.tsx +510 -0
  367. package/src/channel-app/ChannelAppListPanel.tsx +201 -0
  368. package/src/channel-app/CreateChannelAppForm.tsx +529 -0
  369. package/src/channel-app/__tests__/channelAppWhatsApp.test.tsx +270 -0
  370. package/src/channel-app/__tests__/slackAppSetup.test.ts +75 -0
  371. package/src/channel-app/__tests__/useChannelAppHooks.test.tsx +157 -0
  372. package/src/channel-app/__tests__/whatsappAppSetup.test.ts +39 -0
  373. package/src/channel-app/index.ts +30 -0
  374. package/src/channel-app/internal.tsx +180 -0
  375. package/src/channel-app/slackAppSetup.ts +153 -0
  376. package/src/channel-app/useChannelAppList.ts +59 -0
  377. package/src/channel-app/useCreateChannelApp.ts +70 -0
  378. package/src/channel-app/useDeleteChannelApp.ts +62 -0
  379. package/src/channel-app/useUpdateChannelApp.ts +70 -0
  380. package/src/channel-app/whatsappAppSetup.ts +62 -0
  381. package/src/environment/index.ts +2 -0
  382. package/src/environment/useToolCredentialsReadiness.ts +122 -0
  383. package/src/execution/ArtifactContentBody.tsx +6 -88
  384. package/src/execution/ArtifactFileContent.tsx +110 -0
  385. package/src/execution/ArtifactRow.tsx +28 -118
  386. package/src/execution/ArtifactRowView.tsx +137 -0
  387. package/src/execution/FileChangesView.tsx +4 -69
  388. package/src/execution/SubAgentSection.tsx +2 -36
  389. package/src/execution/ToolCallItem.tsx +48 -175
  390. package/src/execution/__tests__/ArtifactFileContent.test.tsx +60 -0
  391. package/src/execution/__tests__/ArtifactRowView.test.tsx +78 -0
  392. package/src/execution/__tests__/agent-execution-document.test.ts +45 -0
  393. package/src/execution/__tests__/artifact-row-item.test.ts +128 -0
  394. package/src/execution/__tests__/deriveExecutionFileChanges.test.ts +270 -0
  395. package/src/execution/__tests__/useArtifactContentById.test.tsx +85 -0
  396. package/src/execution/__tests__/useLiveAgentExecution.test.tsx +202 -0
  397. package/src/execution/agent-execution-document.ts +54 -0
  398. package/src/execution/artifact-document.ts +24 -0
  399. package/src/execution/artifact-row-item.ts +97 -0
  400. package/src/execution/deriveExecutionFileChanges.ts +237 -0
  401. package/src/execution/file-change-document.ts +37 -0
  402. package/src/execution/index.ts +36 -0
  403. package/src/execution/useArtifactContentById.ts +120 -0
  404. package/src/execution/useArtifactDownload.ts +4 -3
  405. package/src/execution/useCreateAgentExecution.ts +1 -1
  406. package/src/execution/useLiveAgentExecution.ts +127 -0
  407. package/src/index.ts +155 -11
  408. package/src/internal/DecisionButton.tsx +4 -3
  409. package/src/internal/__tests__/ThreadCardShell.test.tsx +105 -0
  410. package/src/internal/__tests__/oauthPopup.test.ts +245 -0
  411. package/src/internal/oauthPopup.ts +261 -0
  412. package/src/internal/store/__tests__/workflow-execution-event-store.test.ts +375 -5
  413. package/src/internal/store/index.ts +0 -3
  414. package/src/internal/store/workflow-execution-event-store.ts +123 -4
  415. package/src/internal/store/workspace-file-selection-store.ts +2 -5
  416. package/src/internal/thread-card/ThreadCardShell.tsx +189 -0
  417. package/src/internal/thread-card/glyphs.tsx +108 -0
  418. package/src/internal/thread-card/index.ts +19 -0
  419. package/src/internal/useRevealLine.ts +2 -2
  420. package/src/mcp-server/OAuthCallbackHandler.tsx +2 -2
  421. package/src/mcp-server/useMcpServerOAuthConnect.ts +22 -184
  422. package/src/provider.tsx +42 -0
  423. package/src/session/NewSessionViewer.tsx +0 -1
  424. package/src/session/SessionPanelChip.tsx +10 -96
  425. package/src/session/SessionViewer.tsx +170 -144
  426. package/src/session/__tests__/SessionViewer-artifactTabs.test.tsx +1 -1
  427. package/src/session/__tests__/observerAudience.test.tsx +241 -0
  428. package/src/session/__tests__/useSessionPanel.test.ts +6 -61
  429. package/src/session/__tests__/useSessionRailViews.test.tsx +5 -27
  430. package/src/session/audience.ts +15 -1
  431. package/src/session/channelOrigin.ts +45 -0
  432. package/src/session/facets/index.ts +0 -3
  433. package/src/session/index.ts +9 -6
  434. package/src/session/useSessionFileChanges.ts +12 -153
  435. package/src/session/useSessionPanel.ts +8 -51
  436. package/src/session/useSessionRailViews.tsx +2 -27
  437. package/src/settings/ChannelAppsSection.tsx +133 -0
  438. package/src/settings/index.ts +1 -0
  439. package/src/settings/settings-nav.ts +6 -0
  440. package/src/sharing/AgentShareList.tsx +85 -64
  441. package/src/sharing/ShareAgentDialog.tsx +1 -1
  442. package/src/sharing/__tests__/AgentShareList.test.tsx +92 -12
  443. package/src/sharing/useShareToolReadiness.ts +13 -101
  444. package/src/styles.css +14 -0
  445. package/src/workflow/WorkflowAgentExecutionDocument.tsx +283 -0
  446. package/src/workflow/WorkflowApprovalList.tsx +158 -0
  447. package/src/workflow/WorkflowArtifactDocument.tsx +257 -0
  448. package/src/workflow/WorkflowExecutionGraph.tsx +40 -78
  449. package/src/workflow/WorkflowExecutionViewer.tsx +610 -287
  450. package/src/workflow/WorkflowFileReviewList.tsx +1 -1
  451. package/src/workflow/WorkflowTaskApprovalCard.tsx +5 -4
  452. package/src/workflow/WorkflowTaskApprovalSummary.tsx +6 -6
  453. package/src/workflow/__tests__/WorkflowAgentExecutionDocument.test.tsx +651 -0
  454. package/src/workflow/__tests__/WorkflowApprovalList.test.tsx +229 -0
  455. package/src/workflow/__tests__/WorkflowArtifactDocument.test.tsx +90 -0
  456. package/src/workflow/__tests__/WorkflowArtifactsTab.test.tsx +85 -0
  457. package/src/workflow/__tests__/WorkflowChangesTab.test.tsx +113 -0
  458. package/src/workflow/__tests__/WorkflowExecutionViewer.approvals.test.tsx +473 -0
  459. package/src/workflow/__tests__/WorkflowExecutionViewer.reconciliation.test.tsx +632 -0
  460. package/src/workflow/__tests__/WorkflowTaskApprovalSummary.test.tsx +1 -1
  461. package/src/workflow/__tests__/WorkflowTaskThread.test.tsx +947 -0
  462. package/src/workflow/__tests__/WorkflowUsageTab.test.tsx +163 -0
  463. package/src/workflow/__tests__/agent-call-live-experience.test.ts +6 -53
  464. package/src/workflow/__tests__/derive-execution-overlays.test.ts +4 -0
  465. package/src/workflow/__tests__/deriveWorkflowArtifactItems.test.ts +71 -0
  466. package/src/workflow/__tests__/deriveWorkflowUsageItems.test.ts +132 -0
  467. package/src/workflow/__tests__/execution-graph.test.ts +8 -0
  468. package/src/workflow/__tests__/project-thread-items.test.ts +428 -0
  469. package/src/workflow/__tests__/structured-data-viewer.test.tsx +1 -1
  470. package/src/workflow/__tests__/task-approval.test.ts +149 -0
  471. package/src/workflow/__tests__/task-detail-io.test.ts +40 -0
  472. package/src/workflow/__tests__/task-presentation.test.ts +479 -0
  473. package/src/workflow/__tests__/useActiveTaskName.test.ts +4 -0
  474. package/src/workflow/__tests__/useApprovalBoundary.test.ts +158 -0
  475. package/src/workflow/__tests__/useExecutionAnnouncements.test.ts +4 -0
  476. package/src/workflow/__tests__/useFollowExecution.test.ts +2 -89
  477. package/src/workflow/__tests__/useWorkflowExecutionFileChanges.test.tsx +412 -0
  478. package/src/workflow/__tests__/useWorkflowExecutionPanel.test.ts +297 -0
  479. package/src/workflow/__tests__/useWorkflowExecutionRailViews.test.tsx +115 -0
  480. package/src/workflow/deriveWorkflowArtifactItems.ts +59 -0
  481. package/src/workflow/deriveWorkflowUsageItems.ts +73 -0
  482. package/src/workflow/diagnosis-document.ts +31 -0
  483. package/src/workflow/execution/index.ts +0 -15
  484. package/src/workflow/facets/WorkflowArtifactsTab.tsx +99 -0
  485. package/src/workflow/facets/WorkflowChangesTab.tsx +129 -0
  486. package/src/workflow/facets/WorkflowUsageTab.tsx +258 -0
  487. package/src/workflow/format-utils.ts +2 -3
  488. package/src/workflow/index.ts +106 -62
  489. package/src/workflow/inspector/index.ts +0 -4
  490. package/src/workflow/instance/WorkflowInstanceList.tsx +59 -41
  491. package/src/workflow/instance/__tests__/WorkflowInstanceList.test.tsx +156 -0
  492. package/src/workflow/task-detail/index.ts +11 -0
  493. package/src/workflow/task-detail/task-approval.ts +158 -0
  494. package/src/workflow/task-detail/task-detail-io.ts +65 -0
  495. package/src/workflow/thread/WorkflowTaskThread.tsx +845 -0
  496. package/src/workflow/thread/project-thread-items.ts +235 -0
  497. package/src/workflow/thread/task-presentation.ts +427 -0
  498. package/src/workflow/thread/thread-presentation.ts +59 -0
  499. package/src/workflow/thread/useWorkflowThreadItems.ts +34 -0
  500. package/src/workflow/useApprovalBoundary.ts +72 -0
  501. package/src/workflow/useFollowExecution.ts +0 -26
  502. package/src/workflow/useWorkflowArtifactDownload.ts +68 -0
  503. package/src/workflow/useWorkflowExecutionActions.ts +3 -2
  504. package/src/workflow/useWorkflowExecutionFileChanges.ts +341 -0
  505. package/src/workflow/useWorkflowExecutionGraph.ts +3 -43
  506. package/src/workflow/useWorkflowExecutionPanel.ts +292 -0
  507. package/src/workflow/useWorkflowExecutionRailViews.tsx +173 -0
  508. package/src/workspace/FileViewer.tsx +3 -3
  509. package/src/workspace/PanelChip.tsx +103 -0
  510. package/src/workspace/WorkspaceSurface.tsx +50 -6
  511. package/src/workspace/__tests__/WorkspaceSurface.test.tsx +110 -0
  512. package/src/workspace/index.ts +3 -0
  513. package/styles.css +1 -1
  514. package/workflow/WorkflowAgentExecutionDocument.d.ts +79 -0
  515. package/workflow/WorkflowAgentExecutionDocument.d.ts.map +1 -0
  516. package/workflow/WorkflowAgentExecutionDocument.js +87 -0
  517. package/workflow/WorkflowAgentExecutionDocument.js.map +1 -0
  518. package/workflow/WorkflowApprovalList.d.ts +62 -0
  519. package/workflow/WorkflowApprovalList.d.ts.map +1 -0
  520. package/workflow/WorkflowApprovalList.js +52 -0
  521. package/workflow/WorkflowApprovalList.js.map +1 -0
  522. package/workflow/WorkflowArtifactDocument.d.ts +29 -0
  523. package/workflow/WorkflowArtifactDocument.d.ts.map +1 -0
  524. package/workflow/WorkflowArtifactDocument.js +89 -0
  525. package/workflow/WorkflowArtifactDocument.js.map +1 -0
  526. package/workflow/WorkflowExecutionGraph.d.ts +15 -13
  527. package/workflow/WorkflowExecutionGraph.d.ts.map +1 -1
  528. package/workflow/WorkflowExecutionGraph.js +18 -53
  529. package/workflow/WorkflowExecutionGraph.js.map +1 -1
  530. package/workflow/WorkflowExecutionViewer.d.ts +8 -5
  531. package/workflow/WorkflowExecutionViewer.d.ts.map +1 -1
  532. package/workflow/WorkflowExecutionViewer.js +329 -54
  533. package/workflow/WorkflowExecutionViewer.js.map +1 -1
  534. package/workflow/WorkflowFileReviewList.d.ts +1 -1
  535. package/workflow/WorkflowFileReviewList.js +1 -1
  536. package/workflow/WorkflowTaskApprovalCard.d.ts +4 -3
  537. package/workflow/WorkflowTaskApprovalCard.d.ts.map +1 -1
  538. package/workflow/WorkflowTaskApprovalCard.js +5 -4
  539. package/workflow/WorkflowTaskApprovalCard.js.map +1 -1
  540. package/workflow/WorkflowTaskApprovalSummary.d.ts +6 -6
  541. package/workflow/WorkflowTaskApprovalSummary.js +5 -5
  542. package/workflow/deriveWorkflowArtifactItems.d.ts +30 -0
  543. package/workflow/deriveWorkflowArtifactItems.d.ts.map +1 -0
  544. package/workflow/deriveWorkflowArtifactItems.js +38 -0
  545. package/workflow/deriveWorkflowArtifactItems.js.map +1 -0
  546. package/workflow/deriveWorkflowUsageItems.d.ts +36 -0
  547. package/workflow/deriveWorkflowUsageItems.d.ts.map +1 -0
  548. package/workflow/deriveWorkflowUsageItems.js +50 -0
  549. package/workflow/deriveWorkflowUsageItems.js.map +1 -0
  550. package/workflow/diagnosis-document.d.ts +17 -0
  551. package/workflow/diagnosis-document.d.ts.map +1 -0
  552. package/workflow/diagnosis-document.js +29 -0
  553. package/workflow/diagnosis-document.js.map +1 -0
  554. package/workflow/execution/index.d.ts +0 -2
  555. package/workflow/execution/index.d.ts.map +1 -1
  556. package/workflow/execution/index.js +0 -2
  557. package/workflow/execution/index.js.map +1 -1
  558. package/workflow/facets/WorkflowArtifactsTab.d.ts +26 -0
  559. package/workflow/facets/WorkflowArtifactsTab.d.ts.map +1 -0
  560. package/workflow/facets/WorkflowArtifactsTab.js +34 -0
  561. package/workflow/facets/WorkflowArtifactsTab.js.map +1 -0
  562. package/workflow/facets/WorkflowChangesTab.d.ts +37 -0
  563. package/workflow/facets/WorkflowChangesTab.d.ts.map +1 -0
  564. package/workflow/facets/WorkflowChangesTab.js +50 -0
  565. package/workflow/facets/WorkflowChangesTab.js.map +1 -0
  566. package/workflow/facets/WorkflowUsageTab.d.ts +27 -0
  567. package/workflow/facets/WorkflowUsageTab.d.ts.map +1 -0
  568. package/workflow/facets/WorkflowUsageTab.js +87 -0
  569. package/workflow/facets/WorkflowUsageTab.js.map +1 -0
  570. package/workflow/format-utils.d.ts +2 -3
  571. package/workflow/format-utils.d.ts.map +1 -1
  572. package/workflow/format-utils.js +2 -3
  573. package/workflow/format-utils.js.map +1 -1
  574. package/workflow/index.d.ts +21 -10
  575. package/workflow/index.d.ts.map +1 -1
  576. package/workflow/index.js +29 -14
  577. package/workflow/index.js.map +1 -1
  578. package/workflow/inspector/index.d.ts +0 -2
  579. package/workflow/inspector/index.d.ts.map +1 -1
  580. package/workflow/inspector/index.js +0 -2
  581. package/workflow/inspector/index.js.map +1 -1
  582. package/workflow/instance/WorkflowInstanceList.d.ts.map +1 -1
  583. package/workflow/instance/WorkflowInstanceList.js +11 -3
  584. package/workflow/instance/WorkflowInstanceList.js.map +1 -1
  585. package/workflow/task-detail/StructuredDataViewer.d.ts.map +1 -0
  586. package/workflow/task-detail/StructuredDataViewer.js.map +1 -0
  587. package/workflow/task-detail/index.d.ts +4 -0
  588. package/workflow/task-detail/index.d.ts.map +1 -0
  589. package/workflow/task-detail/index.js +4 -0
  590. package/workflow/task-detail/index.js.map +1 -0
  591. package/workflow/task-detail/task-approval.d.ts +89 -0
  592. package/workflow/task-detail/task-approval.d.ts.map +1 -0
  593. package/workflow/task-detail/task-approval.js +84 -0
  594. package/workflow/task-detail/task-approval.js.map +1 -0
  595. package/workflow/task-detail/task-detail-io.d.ts +39 -0
  596. package/workflow/task-detail/task-detail-io.d.ts.map +1 -0
  597. package/workflow/task-detail/task-detail-io.js +42 -0
  598. package/workflow/task-detail/task-detail-io.js.map +1 -0
  599. package/workflow/thread/WorkflowTaskThread.d.ts +91 -0
  600. package/workflow/thread/WorkflowTaskThread.d.ts.map +1 -0
  601. package/workflow/thread/WorkflowTaskThread.js +318 -0
  602. package/workflow/thread/WorkflowTaskThread.js.map +1 -0
  603. package/workflow/thread/project-thread-items.d.ts +108 -0
  604. package/workflow/thread/project-thread-items.d.ts.map +1 -0
  605. package/workflow/thread/project-thread-items.js +126 -0
  606. package/workflow/thread/project-thread-items.js.map +1 -0
  607. package/workflow/thread/task-presentation.d.ts +73 -0
  608. package/workflow/thread/task-presentation.d.ts.map +1 -0
  609. package/workflow/thread/task-presentation.js +331 -0
  610. package/workflow/thread/task-presentation.js.map +1 -0
  611. package/workflow/thread/thread-presentation.d.ts +28 -0
  612. package/workflow/thread/thread-presentation.d.ts.map +1 -0
  613. package/workflow/thread/thread-presentation.js +28 -0
  614. package/workflow/thread/thread-presentation.js.map +1 -0
  615. package/workflow/thread/useWorkflowThreadItems.d.ts +16 -0
  616. package/workflow/thread/useWorkflowThreadItems.d.ts.map +1 -0
  617. package/workflow/thread/useWorkflowThreadItems.js +22 -0
  618. package/workflow/thread/useWorkflowThreadItems.js.map +1 -0
  619. package/workflow/useApprovalBoundary.d.ts +38 -0
  620. package/workflow/useApprovalBoundary.d.ts.map +1 -0
  621. package/workflow/useApprovalBoundary.js +55 -0
  622. package/workflow/useApprovalBoundary.js.map +1 -0
  623. package/workflow/useFollowExecution.d.ts +0 -20
  624. package/workflow/useFollowExecution.d.ts.map +1 -1
  625. package/workflow/useFollowExecution.js +0 -17
  626. package/workflow/useFollowExecution.js.map +1 -1
  627. package/workflow/useWorkflowArtifactDownload.d.ts +28 -0
  628. package/workflow/useWorkflowArtifactDownload.d.ts.map +1 -0
  629. package/workflow/useWorkflowArtifactDownload.js +45 -0
  630. package/workflow/useWorkflowArtifactDownload.js.map +1 -0
  631. package/workflow/useWorkflowExecutionActions.d.ts +3 -2
  632. package/workflow/useWorkflowExecutionActions.d.ts.map +1 -1
  633. package/workflow/useWorkflowExecutionActions.js.map +1 -1
  634. package/workflow/useWorkflowExecutionFileChanges.d.ts +107 -0
  635. package/workflow/useWorkflowExecutionFileChanges.d.ts.map +1 -0
  636. package/workflow/useWorkflowExecutionFileChanges.js +244 -0
  637. package/workflow/useWorkflowExecutionFileChanges.js.map +1 -0
  638. package/workflow/useWorkflowExecutionGraph.d.ts +1 -14
  639. package/workflow/useWorkflowExecutionGraph.d.ts.map +1 -1
  640. package/workflow/useWorkflowExecutionGraph.js +2 -25
  641. package/workflow/useWorkflowExecutionGraph.js.map +1 -1
  642. package/workflow/useWorkflowExecutionPanel.d.ts +108 -0
  643. package/workflow/useWorkflowExecutionPanel.d.ts.map +1 -0
  644. package/workflow/useWorkflowExecutionPanel.js +103 -0
  645. package/workflow/useWorkflowExecutionPanel.js.map +1 -0
  646. package/workflow/useWorkflowExecutionRailViews.d.ts +46 -0
  647. package/workflow/useWorkflowExecutionRailViews.d.ts.map +1 -0
  648. package/workflow/useWorkflowExecutionRailViews.js +81 -0
  649. package/workflow/useWorkflowExecutionRailViews.js.map +1 -0
  650. package/workspace/FileViewer.d.ts +1 -1
  651. package/workspace/FileViewer.js +3 -3
  652. package/workspace/FileViewer.js.map +1 -1
  653. package/workspace/PanelChip.d.ts +27 -0
  654. package/workspace/PanelChip.d.ts.map +1 -0
  655. package/workspace/PanelChip.js +42 -0
  656. package/workspace/PanelChip.js.map +1 -0
  657. package/workspace/WorkspaceSurface.d.ts +25 -1
  658. package/workspace/WorkspaceSurface.d.ts.map +1 -1
  659. package/workspace/WorkspaceSurface.js +21 -9
  660. package/workspace/WorkspaceSurface.js.map +1 -1
  661. package/workspace/index.d.ts +3 -1
  662. package/workspace/index.d.ts.map +1 -1
  663. package/workspace/index.js +1 -0
  664. package/workspace/index.js.map +1 -1
  665. package/execution/ThreadSelectionContext.d.ts +0 -17
  666. package/execution/ThreadSelectionContext.d.ts.map +0 -1
  667. package/execution/ThreadSelectionContext.js +0 -18
  668. package/execution/ThreadSelectionContext.js.map +0 -1
  669. package/execution/useThreadSelection.d.ts +0 -35
  670. package/execution/useThreadSelection.d.ts.map +0 -1
  671. package/execution/useThreadSelection.js +0 -65
  672. package/execution/useThreadSelection.js.map +0 -1
  673. package/internal/store/selection-store.d.ts +0 -53
  674. package/internal/store/selection-store.d.ts.map +0 -1
  675. package/internal/store/selection-store.js +0 -88
  676. package/internal/store/selection-store.js.map +0 -1
  677. package/session/artifact-document.d.ts.map +0 -1
  678. package/session/artifact-document.js +0 -22
  679. package/session/artifact-document.js.map +0 -1
  680. package/session/facets/InspectTab.d.ts +0 -13
  681. package/session/facets/InspectTab.d.ts.map +0 -1
  682. package/session/facets/InspectTab.js +0 -19
  683. package/session/facets/InspectTab.js.map +0 -1
  684. package/src/execution/ThreadSelectionContext.tsx +0 -20
  685. package/src/execution/useThreadSelection.ts +0 -95
  686. package/src/internal/store/__tests__/selection-store.test.ts +0 -115
  687. package/src/internal/store/selection-store.ts +0 -112
  688. package/src/session/artifact-document.ts +0 -23
  689. package/src/session/facets/InspectTab.tsx +0 -57
  690. package/src/workflow/WorkflowExecutionApprovalCard.tsx +0 -154
  691. package/src/workflow/WorkflowExecutionArtifactPanel.tsx +0 -107
  692. package/src/workflow/WorkflowExecutionCostPanel.tsx +0 -120
  693. package/src/workflow/WorkflowExecutionTaskPanel.tsx +0 -129
  694. package/src/workflow/WorkflowExecutionTimeline.tsx +0 -151
  695. package/src/workflow/WorkflowExecutionTimelineEvent.tsx +0 -497
  696. package/src/workflow/__tests__/ExecutionInspector.test.tsx +0 -155
  697. package/src/workflow/__tests__/WorkflowExecutionApprovalCard.test.tsx +0 -129
  698. package/src/workflow/__tests__/derive-task-detail.test.ts +0 -1265
  699. package/src/workflow/__tests__/derive-waterfall-entries.test.ts +0 -521
  700. package/src/workflow/__tests__/execution-inspector.test.tsx +0 -332
  701. package/src/workflow/execution/derive-waterfall-entries.ts +0 -377
  702. package/src/workflow/execution/useWaterfallEntries.ts +0 -125
  703. package/src/workflow/execution-inspector/AgentCallTab.tsx +0 -169
  704. package/src/workflow/execution-inspector/ErrorTab.tsx +0 -110
  705. package/src/workflow/execution-inspector/EventLogTab.tsx +0 -79
  706. package/src/workflow/execution-inspector/ExecutionInspector.tsx +0 -341
  707. package/src/workflow/execution-inspector/InputOutputTab.tsx +0 -325
  708. package/src/workflow/execution-inspector/RetriesTab.tsx +0 -68
  709. package/src/workflow/execution-inspector/SummaryTab.tsx +0 -62
  710. package/src/workflow/execution-inspector/derive-task-detail.ts +0 -584
  711. package/src/workflow/execution-inspector/index.ts +0 -14
  712. package/src/workflow/execution-inspector/useExecutionTaskDetail.ts +0 -55
  713. package/src/workflow/inspector/ExecutionInspectorAdapter.tsx +0 -40
  714. package/src/workflow/waterfall/WaterfallBar.tsx +0 -167
  715. package/src/workflow/waterfall/WaterfallRow.tsx +0 -112
  716. package/src/workflow/waterfall/WaterfallScale.tsx +0 -52
  717. package/src/workflow/waterfall/WaterfallTimeline.tsx +0 -138
  718. package/src/workflow/waterfall/WaterfallTooltip.tsx +0 -74
  719. package/src/workflow/waterfall/index.ts +0 -5
  720. package/workflow/WorkflowExecutionApprovalCard.d.ts +0 -34
  721. package/workflow/WorkflowExecutionApprovalCard.d.ts.map +0 -1
  722. package/workflow/WorkflowExecutionApprovalCard.js +0 -46
  723. package/workflow/WorkflowExecutionApprovalCard.js.map +0 -1
  724. package/workflow/WorkflowExecutionArtifactPanel.d.ts +0 -15
  725. package/workflow/WorkflowExecutionArtifactPanel.d.ts.map +0 -1
  726. package/workflow/WorkflowExecutionArtifactPanel.js +0 -46
  727. package/workflow/WorkflowExecutionArtifactPanel.js.map +0 -1
  728. package/workflow/WorkflowExecutionCostPanel.d.ts +0 -18
  729. package/workflow/WorkflowExecutionCostPanel.d.ts.map +0 -1
  730. package/workflow/WorkflowExecutionCostPanel.js +0 -31
  731. package/workflow/WorkflowExecutionCostPanel.js.map +0 -1
  732. package/workflow/WorkflowExecutionTaskPanel.d.ts +0 -24
  733. package/workflow/WorkflowExecutionTaskPanel.d.ts.map +0 -1
  734. package/workflow/WorkflowExecutionTaskPanel.js +0 -51
  735. package/workflow/WorkflowExecutionTaskPanel.js.map +0 -1
  736. package/workflow/WorkflowExecutionTimeline.d.ts +0 -42
  737. package/workflow/WorkflowExecutionTimeline.d.ts.map +0 -1
  738. package/workflow/WorkflowExecutionTimeline.js +0 -52
  739. package/workflow/WorkflowExecutionTimeline.js.map +0 -1
  740. package/workflow/WorkflowExecutionTimelineEvent.d.ts +0 -25
  741. package/workflow/WorkflowExecutionTimelineEvent.d.ts.map +0 -1
  742. package/workflow/WorkflowExecutionTimelineEvent.js +0 -179
  743. package/workflow/WorkflowExecutionTimelineEvent.js.map +0 -1
  744. package/workflow/execution/derive-waterfall-entries.d.ts +0 -85
  745. package/workflow/execution/derive-waterfall-entries.d.ts.map +0 -1
  746. package/workflow/execution/derive-waterfall-entries.js +0 -268
  747. package/workflow/execution/derive-waterfall-entries.js.map +0 -1
  748. package/workflow/execution/useWaterfallEntries.d.ts +0 -25
  749. package/workflow/execution/useWaterfallEntries.d.ts.map +0 -1
  750. package/workflow/execution/useWaterfallEntries.js +0 -67
  751. package/workflow/execution/useWaterfallEntries.js.map +0 -1
  752. package/workflow/execution-inspector/AgentCallTab.d.ts +0 -21
  753. package/workflow/execution-inspector/AgentCallTab.d.ts.map +0 -1
  754. package/workflow/execution-inspector/AgentCallTab.js +0 -36
  755. package/workflow/execution-inspector/AgentCallTab.js.map +0 -1
  756. package/workflow/execution-inspector/ErrorTab.d.ts +0 -9
  757. package/workflow/execution-inspector/ErrorTab.d.ts.map +0 -1
  758. package/workflow/execution-inspector/ErrorTab.js +0 -29
  759. package/workflow/execution-inspector/ErrorTab.js.map +0 -1
  760. package/workflow/execution-inspector/EventLogTab.d.ts +0 -11
  761. package/workflow/execution-inspector/EventLogTab.d.ts.map +0 -1
  762. package/workflow/execution-inspector/EventLogTab.js +0 -47
  763. package/workflow/execution-inspector/EventLogTab.js.map +0 -1
  764. package/workflow/execution-inspector/ExecutionInspector.d.ts +0 -69
  765. package/workflow/execution-inspector/ExecutionInspector.d.ts.map +0 -1
  766. package/workflow/execution-inspector/ExecutionInspector.js +0 -145
  767. package/workflow/execution-inspector/ExecutionInspector.js.map +0 -1
  768. package/workflow/execution-inspector/InputOutputTab.d.ts +0 -20
  769. package/workflow/execution-inspector/InputOutputTab.d.ts.map +0 -1
  770. package/workflow/execution-inspector/InputOutputTab.js +0 -124
  771. package/workflow/execution-inspector/InputOutputTab.js.map +0 -1
  772. package/workflow/execution-inspector/RetriesTab.d.ts +0 -7
  773. package/workflow/execution-inspector/RetriesTab.d.ts.map +0 -1
  774. package/workflow/execution-inspector/RetriesTab.js +0 -11
  775. package/workflow/execution-inspector/RetriesTab.js.map +0 -1
  776. package/workflow/execution-inspector/StructuredDataViewer.d.ts.map +0 -1
  777. package/workflow/execution-inspector/StructuredDataViewer.js.map +0 -1
  778. package/workflow/execution-inspector/SummaryTab.d.ts +0 -7
  779. package/workflow/execution-inspector/SummaryTab.d.ts.map +0 -1
  780. package/workflow/execution-inspector/SummaryTab.js +0 -10
  781. package/workflow/execution-inspector/SummaryTab.js.map +0 -1
  782. package/workflow/execution-inspector/derive-task-detail.d.ts +0 -140
  783. package/workflow/execution-inspector/derive-task-detail.d.ts.map +0 -1
  784. package/workflow/execution-inspector/derive-task-detail.js +0 -366
  785. package/workflow/execution-inspector/derive-task-detail.js.map +0 -1
  786. package/workflow/execution-inspector/index.d.ts +0 -4
  787. package/workflow/execution-inspector/index.d.ts.map +0 -1
  788. package/workflow/execution-inspector/index.js +0 -4
  789. package/workflow/execution-inspector/index.js.map +0 -1
  790. package/workflow/execution-inspector/useExecutionTaskDetail.d.ts +0 -38
  791. package/workflow/execution-inspector/useExecutionTaskDetail.d.ts.map +0 -1
  792. package/workflow/execution-inspector/useExecutionTaskDetail.js +0 -37
  793. package/workflow/execution-inspector/useExecutionTaskDetail.js.map +0 -1
  794. package/workflow/inspector/ExecutionInspectorAdapter.d.ts +0 -26
  795. package/workflow/inspector/ExecutionInspectorAdapter.d.ts.map +0 -1
  796. package/workflow/inspector/ExecutionInspectorAdapter.js +0 -23
  797. package/workflow/inspector/ExecutionInspectorAdapter.js.map +0 -1
  798. package/workflow/waterfall/WaterfallBar.d.ts +0 -19
  799. package/workflow/waterfall/WaterfallBar.d.ts.map +0 -1
  800. package/workflow/waterfall/WaterfallBar.js +0 -70
  801. package/workflow/waterfall/WaterfallBar.js.map +0 -1
  802. package/workflow/waterfall/WaterfallRow.d.ts +0 -18
  803. package/workflow/waterfall/WaterfallRow.d.ts.map +0 -1
  804. package/workflow/waterfall/WaterfallRow.js +0 -45
  805. package/workflow/waterfall/WaterfallRow.js.map +0 -1
  806. package/workflow/waterfall/WaterfallScale.d.ts +0 -14
  807. package/workflow/waterfall/WaterfallScale.d.ts.map +0 -1
  808. package/workflow/waterfall/WaterfallScale.js +0 -22
  809. package/workflow/waterfall/WaterfallScale.js.map +0 -1
  810. package/workflow/waterfall/WaterfallTimeline.d.ts +0 -46
  811. package/workflow/waterfall/WaterfallTimeline.d.ts.map +0 -1
  812. package/workflow/waterfall/WaterfallTimeline.js +0 -60
  813. package/workflow/waterfall/WaterfallTimeline.js.map +0 -1
  814. package/workflow/waterfall/WaterfallTooltip.d.ts +0 -15
  815. package/workflow/waterfall/WaterfallTooltip.d.ts.map +0 -1
  816. package/workflow/waterfall/WaterfallTooltip.js +0 -20
  817. package/workflow/waterfall/WaterfallTooltip.js.map +0 -1
  818. package/workflow/waterfall/index.d.ts +0 -6
  819. package/workflow/waterfall/index.d.ts.map +0 -1
  820. package/workflow/waterfall/index.js +0 -6
  821. package/workflow/waterfall/index.js.map +0 -1
  822. /package/src/workflow/{execution-inspector → task-detail}/StructuredDataViewer.tsx +0 -0
  823. /package/workflow/{execution-inspector → task-detail}/StructuredDataViewer.d.ts +0 -0
  824. /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
+ }
@@ -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
- * Mirrors the click → mint fresh URL → browser download flow established by
32
- * `WorkflowExecutionArtifactPanel`, generalized so every artifact "Download"
33
- * affordance shares one implementation. The URL is minted at click time from
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://docs.stigmer.ai/product/how-to-provide-secrets | How to Provide Secrets}
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
  /**