@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.7

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 (323) hide show
  1. package/README.md +564 -2
  2. package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
  3. package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
  4. package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
  5. package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
  6. package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
  7. package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
  8. package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
  9. package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
  10. package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
  11. package/dist/DateTimeField-B1qR4ruo.js +51 -0
  12. package/dist/Disclosure-BNKij7-v.js +45 -0
  13. package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
  14. package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
  15. package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
  16. package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
  17. package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
  18. package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
  19. package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
  20. package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
  21. package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
  22. package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
  23. package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
  24. package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
  25. package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
  26. package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
  27. package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
  28. package/dist/FluidGridsMark-CE2blT7K.js +74 -0
  29. package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
  30. package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
  31. package/dist/HistoryPage-BSBISXoj.js +2835 -0
  32. package/dist/Icon-BtQ0HXLh.js +160 -0
  33. package/dist/InsightsPage-D7ybj8N9.js +11245 -0
  34. package/dist/IsolationSetting-vy911E8b.js +1153 -0
  35. package/dist/LibraryParts-DOeNgR8A.js +413 -0
  36. package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
  37. package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
  38. package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
  39. package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
  40. package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
  41. package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
  42. package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
  43. package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
  44. package/dist/NodesPage-O7KeeKtd.js +653 -0
  45. package/dist/OfflineIcon-TwMKYWjA.js +207 -0
  46. package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
  47. package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
  48. package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
  49. package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
  50. package/dist/RunActionsMenu-DodOgIQm.js +59 -0
  51. package/dist/RunnerStatusPill-C1v967iq.js +24 -0
  52. package/dist/RunnersPage-dB0RSdY_.js +1929 -0
  53. package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
  54. package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
  55. package/dist/SearchBox-BGtYjvfs.js +49 -0
  56. package/dist/SequenceEditor-CFiHeHkR.js +497 -0
  57. package/dist/SettingsPage-0CQBNPZV.js +8695 -0
  58. package/dist/StewardPages-DAJhepen.js +47 -0
  59. package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
  60. package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
  61. package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
  62. package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
  63. package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
  64. package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
  65. package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
  66. package/dist/TemplatePreview-cx7-NOeG.js +868 -0
  67. package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
  68. package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
  69. package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
  70. package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
  71. package/dist/TranslationBridge-Da-TPgQm.js +68 -0
  72. package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
  73. package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
  74. package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
  75. package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
  76. package/dist/VariablesPage-ChfGuW22.js +2243 -0
  77. package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
  78. package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
  79. package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
  80. package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
  81. package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
  82. package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
  83. package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
  84. package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
  85. package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
  86. package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
  87. package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
  88. package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
  89. package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
  90. package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
  91. package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
  92. package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
  93. package/dist/WorkflowsList--hR2_8gf.js +4593 -0
  94. package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
  95. package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
  96. package/dist/addonCatalog-CbZS4deh.js +58 -0
  97. package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
  98. package/dist/addons.d.ts +3 -0
  99. package/dist/addons.js +4 -0
  100. package/dist/agent-form-Bfvm32j1.js +83 -0
  101. package/dist/agent-tools.d.ts +3 -0
  102. package/dist/agent-tools.js +5 -0
  103. package/dist/agentTools-CyL7DLOF.js +320 -0
  104. package/dist/ai-usage-BrxDgvdR.js +240 -0
  105. package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
  106. package/dist/api-BKq-nIOZ.js +2286 -0
  107. package/dist/api-Ol7I8NxE.js +8289 -0
  108. package/dist/apollo-type-policies.d.ts +11 -0
  109. package/dist/apollo-type-policies.js +64 -0
  110. package/dist/askAboutBridge-ByYsQams.js +106 -0
  111. package/dist/askQuestions-Cmx7VnMm.js +742 -0
  112. package/dist/assert-rules-lfYEMc99.js +318 -0
  113. package/dist/assistant.d.ts +94 -0
  114. package/dist/assistant.js +99 -0
  115. package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
  116. package/dist/badge-CXfPhoMH.js +26 -0
  117. package/dist/basil.generated-BK-EHbwN.js +10 -0
  118. package/dist/browser-steps-DMpS5TyB.js +533 -0
  119. package/dist/builderTimings-pvGnK1m-.js +510 -0
  120. package/dist/button-DG7y_FVJ.js +48 -0
  121. package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
  122. package/dist/card-Bomy_1UG.js +44 -0
  123. package/dist/catalogGrid-BOrfMgi-.js +41 -0
  124. package/dist/channel-CPyQ1NR1.js +212 -0
  125. package/dist/chips-CvNrYJZa.js +27 -0
  126. package/dist/client-holder-C0M5Cfwl.js +68 -0
  127. package/dist/cn-QqidFIgr.js +10 -0
  128. package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
  129. package/dist/code-editor-field-x_JrY8KR.js +113 -0
  130. package/dist/codec-client-DPuD6mw7.js +515 -0
  131. package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
  132. package/dist/config-DO68jw5k.js +322 -0
  133. package/dist/constants-DgbVc24O.d.ts +296 -0
  134. package/dist/constants-DlRnHBfQ.js +217 -0
  135. package/dist/convert-browser-action-pfecelF7.js +347 -0
  136. package/dist/convert-dialog-B_o22NiJ.js +382 -0
  137. package/dist/create-workflow-first-Azg3JUdX.js +120 -0
  138. package/dist/definition-canvas-Bsda-rDT.js +31 -0
  139. package/dist/dialog-BVd152GS.js +94 -0
  140. package/dist/durable-nodes-BXyYCLxT.js +91 -0
  141. package/dist/duration-CDb7-mT_.js +33 -0
  142. package/dist/edge-mapper-wEAdGVU2.js +4477 -0
  143. package/dist/element-library-DkSlg_VE.js +727 -0
  144. package/dist/entities-I_0kio3q.js +38 -0
  145. package/dist/error-advice-QLr5NCm7.js +65 -0
  146. package/dist/errors-ClKb5sEt.js +188 -0
  147. package/dist/executions.d.ts +3 -0
  148. package/dist/executions.js +5 -0
  149. package/dist/feature-flags-B2qetXKd.js +385 -0
  150. package/dist/field-label-DPZRmE_B.js +153 -0
  151. package/dist/firstWorkflow-C_h0KMB2.js +133 -0
  152. package/dist/flags.d.ts +3 -0
  153. package/dist/flags.js +4 -0
  154. package/dist/flow-builder-DIvLOhz0.js +28038 -0
  155. package/dist/flow-store-holder-CUN7Terz.js +52 -0
  156. package/dist/fluent.generated-CA_e6-4l.js +14 -0
  157. package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
  158. package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
  159. package/dist/global-client-BQPuFrFa.js +433 -0
  160. package/dist/global-operations-BG6YgxrM.js +136 -0
  161. package/dist/graphql-types-UTYtujY9.js +21358 -0
  162. package/dist/history.d.ts +3 -0
  163. package/dist/history.js +4 -0
  164. package/dist/index-AoJAa5vU.d.ts +164958 -0
  165. package/dist/index-DEMT3iAM.d.ts +120 -0
  166. package/dist/index-ROZzNGyY.d.ts +76 -0
  167. package/dist/index.d.ts +20 -0
  168. package/dist/index.js +8123 -0
  169. package/dist/ion.generated-mbajjcAg.js +10 -0
  170. package/dist/label-Lzb8ZXf_.js +29 -0
  171. package/dist/labels-rXd9gYQz.js +1236 -0
  172. package/dist/liveCanvas-D5ytXDp8.js +103 -0
  173. package/dist/logos.generated-X6_0kjVR.js +21 -0
  174. package/dist/logs-panel-Cw0DkG0l.js +468 -0
  175. package/dist/lucide.generated-B6NVd3GT.js +29 -0
  176. package/dist/marksStore-a9oIMMot.js +175 -0
  177. package/dist/mcp-trigger-D0nRdvq5.js +307 -0
  178. package/dist/mdi.generated-D1BV74d6.js +292 -0
  179. package/dist/menus-CU3hDGYl.js +160 -0
  180. package/dist/mynaui.generated-DMWr5cXz.js +66 -0
  181. package/dist/navigation-v2.d.ts +3 -0
  182. package/dist/navigation-v2.js +5 -0
  183. package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
  184. package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
  185. package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
  186. package/dist/node-registry-refresh-s3okf83X.js +27 -0
  187. package/dist/node-role-TMbnkmeP.js +132 -0
  188. package/dist/node-type-icon-BZa8n4iG.js +33 -0
  189. package/dist/nodes.d.ts +3 -0
  190. package/dist/nodes.js +4 -0
  191. package/dist/notesKey-5EaREBGA.js +12 -0
  192. package/dist/observability.d.ts +3 -0
  193. package/dist/observability.js +5 -0
  194. package/dist/offset-pages-zghoClB3.js +55 -0
  195. package/dist/operations-BBmT9ToP.js +663 -0
  196. package/dist/operations-WxRJWeqO.js +3133 -0
  197. package/dist/output-files-Ba8bu5lv.js +196 -0
  198. package/dist/page-operation-DrWuhd6Y.js +129 -0
  199. package/dist/page-twins.d.ts +13 -0
  200. package/dist/page-twins.js +186 -0
  201. package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
  202. package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
  203. package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
  204. package/dist/panels-PfBBAToE.js +346 -0
  205. package/dist/parts-B7fBcw-B.js +346 -0
  206. package/dist/popover-Dms9Vz3j.js +3389 -0
  207. package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
  208. package/dist/proactive.d.ts +66 -0
  209. package/dist/proactive.js +237 -0
  210. package/dist/quick-config-panel-DFd77xho.js +451 -0
  211. package/dist/quota-DeA_CJ2e.js +175 -0
  212. package/dist/quota.d.ts +3 -0
  213. package/dist/quota.js +4 -0
  214. package/dist/read-only-context-Dt9N9SIG.js +18 -0
  215. package/dist/relative-time-Dxt8ZIIu.js +55 -0
  216. package/dist/results-CwK_yDxK.js +325 -0
  217. package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
  218. package/dist/route-data.d.ts +12 -0
  219. package/dist/route-data.js +69 -0
  220. package/dist/route-match-C-0_EnAt.d.ts +5 -0
  221. package/dist/route-match-DMkUICYV.js +41 -0
  222. package/dist/route-preload-C4DlGoCd.js +120 -0
  223. package/dist/run-display-UjLAoYqQ.js +81 -0
  224. package/dist/run-history-arGiHzGU.js +285 -0
  225. package/dist/run-list-links-DJn4Mf1T.js +98 -0
  226. package/dist/run-mode-USmM0-Uo.js +82 -0
  227. package/dist/run-parity-CWXqEJqM.js +144 -0
  228. package/dist/runsQuota-B6SyTbne.js +100 -0
  229. package/dist/runsQuota-DsniKiSg.d.ts +20 -0
  230. package/dist/safe-expression-Cw7-SCsm.js +1251 -0
  231. package/dist/save-status-store-C7nEYpfb.js +631 -0
  232. package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
  233. package/dist/schedule-rules-ggVKRkBH.js +358 -0
  234. package/dist/secrets-Re_wSiE3.js +153 -0
  235. package/dist/settings.d.ts +4 -0
  236. package/dist/settings.js +6 -0
  237. package/dist/shared-DAWGGMSM.js +177 -0
  238. package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
  239. package/dist/solar.generated-CGYuUQAC.js +10 -0
  240. package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
  241. package/dist/start-url-CT6Yz96K.js +24 -0
  242. package/dist/status-CessxGpm.js +55 -0
  243. package/dist/store-icon-OctYp5zP.js +155 -0
  244. package/dist/styles-WGmTnZ2n.js +26 -0
  245. package/dist/styles.css +139 -0
  246. package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
  247. package/dist/template-code-CzN6JWNV.js +191 -0
  248. package/dist/template-graph-DLF9dygU.js +20 -0
  249. package/dist/template-preview-DcIIKOOL.js +32 -0
  250. package/dist/template-price-CdUHZRMF.js +40 -0
  251. package/dist/templates.d.ts +3 -0
  252. package/dist/templates.js +5 -0
  253. package/dist/theme-provider-CntfC4_i.js +23 -0
  254. package/dist/transient-DgZfhDfN.js +57 -0
  255. package/dist/typed-calls-C5tO03wq.js +26 -0
  256. package/dist/ui-script-By74Guk3.js +1094 -0
  257. package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
  258. package/dist/ui-step-fix-8uM2_Hft.js +67 -0
  259. package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
  260. package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
  261. package/dist/ui-target-editor-D2JhB_lD.js +673 -0
  262. package/dist/uiMarkTools-CSznnO1i.js +1054 -0
  263. package/dist/upgradePrompt-BAFBKKW5.js +72 -0
  264. package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
  265. package/dist/use-browser-available-hj8wc3Kb.js +241 -0
  266. package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
  267. package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
  268. package/dist/use-mobile-BTqCUjzS.js +27 -0
  269. package/dist/use-sdk-query-C697xZVv.js +116 -0
  270. package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
  271. package/dist/useActionParam-B2tU2BlY.js +85 -0
  272. package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
  273. package/dist/useBrowserClients-3v95-gSh.js +103 -0
  274. package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
  275. package/dist/useConnections-DsgEJs05.js +439 -0
  276. package/dist/useDebouncedValue-BFekcv6n.js +18 -0
  277. package/dist/useDurableParity-8fnMZmBc.js +1787 -0
  278. package/dist/useEntityTags-D0spL6Ut.js +460 -0
  279. package/dist/useExecutions-2u5nGJJk.js +681 -0
  280. package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
  281. package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
  282. package/dist/useHumanRequests-zlYDp3l1.js +221 -0
  283. package/dist/useNavigationV2-C2WeqN7d.js +29 -0
  284. package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
  285. package/dist/useObservability-BRlQ0tOA.js +285 -0
  286. package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
  287. package/dist/useRunHistory-CXCMUPyf.js +2759 -0
  288. package/dist/useRunLive-D0JvVZT2.js +1060 -0
  289. package/dist/useRunnerList-Dbi59i1K.js +446 -0
  290. package/dist/useRunners-URUc5quU.js +173 -0
  291. package/dist/useRunsPage-DG656UCK.js +2709 -0
  292. package/dist/useVariables-BIelxcWr.js +463 -0
  293. package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
  294. package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
  295. package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
  296. package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
  297. package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
  298. package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
  299. package/dist/utils-fvBb5qOD.js +89 -0
  300. package/dist/webhook-deliveries-AvQujaZy.js +99 -0
  301. package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
  302. package/dist/workflow-builder.d.ts +3 -0
  303. package/dist/workflow-builder.js +8 -0
  304. package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
  305. package/dist/workflow-embed.d.ts +3 -0
  306. package/dist/workflow-embed.js +4 -0
  307. package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
  308. package/dist/workflow-host.d.ts +6 -0
  309. package/dist/workflow-host.js +11 -0
  310. package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
  311. package/dist/workflow-pages.d.ts +3 -0
  312. package/dist/workflow-pages.js +115 -0
  313. package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
  314. package/dist/workflow-preview.d.ts +65 -0
  315. package/dist/workflow-preview.js +4 -0
  316. package/dist/workflow-route.d.ts +33 -0
  317. package/dist/workflow-route.js +4 -0
  318. package/dist/workflow-save-state-D0l-DkLf.js +767 -0
  319. package/dist/workflow-transfer-CQnQC-ke.js +104 -0
  320. package/dist/workflowRouteData-BkfVOc-O.js +169 -0
  321. package/dist/workflows-list.d.ts +10 -0
  322. package/dist/workflows-list.js +5 -0
  323. package/package.json +320 -4
@@ -0,0 +1,1236 @@
1
+ "use client";
2
+ import { s as throwIfResultError } from "./errors-ClKb5sEt.js";
3
+ import { n as getFluidGridsClient, r as getFluidGridsClientSafe } from "./client-holder-C0M5Cfwl.js";
4
+ import { useEffect } from "react";
5
+ import { create } from "zustand";
6
+ import { gql } from "@apollo/client";
7
+
8
+ // src/generated/documents/wspace/RunLogsDocument.ts
9
+ const RunLogsDocument = {
10
+ "kind": "Document",
11
+ "definitions": [{
12
+ "kind": "OperationDefinition",
13
+ "operation": "query",
14
+ "name": {
15
+ "kind": "Name",
16
+ "value": "RunLogs"
17
+ },
18
+ "variableDefinitions": [
19
+ {
20
+ "kind": "VariableDefinition",
21
+ "variable": {
22
+ "kind": "Variable",
23
+ "name": {
24
+ "kind": "Name",
25
+ "value": "runId"
26
+ }
27
+ },
28
+ "type": {
29
+ "kind": "NonNullType",
30
+ "type": {
31
+ "kind": "NamedType",
32
+ "name": {
33
+ "kind": "Name",
34
+ "value": "ID"
35
+ }
36
+ }
37
+ },
38
+ "directives": []
39
+ },
40
+ {
41
+ "kind": "VariableDefinition",
42
+ "variable": {
43
+ "kind": "Variable",
44
+ "name": {
45
+ "kind": "Name",
46
+ "value": "after"
47
+ }
48
+ },
49
+ "type": {
50
+ "kind": "NamedType",
51
+ "name": {
52
+ "kind": "Name",
53
+ "value": "String"
54
+ }
55
+ },
56
+ "directives": []
57
+ },
58
+ {
59
+ "kind": "VariableDefinition",
60
+ "variable": {
61
+ "kind": "Variable",
62
+ "name": {
63
+ "kind": "Name",
64
+ "value": "limit"
65
+ }
66
+ },
67
+ "type": {
68
+ "kind": "NamedType",
69
+ "name": {
70
+ "kind": "Name",
71
+ "value": "Int"
72
+ }
73
+ },
74
+ "directives": []
75
+ },
76
+ {
77
+ "kind": "VariableDefinition",
78
+ "variable": {
79
+ "kind": "Variable",
80
+ "name": {
81
+ "kind": "Name",
82
+ "value": "nodeId"
83
+ }
84
+ },
85
+ "type": {
86
+ "kind": "NamedType",
87
+ "name": {
88
+ "kind": "Name",
89
+ "value": "String"
90
+ }
91
+ },
92
+ "directives": []
93
+ },
94
+ {
95
+ "kind": "VariableDefinition",
96
+ "variable": {
97
+ "kind": "Variable",
98
+ "name": {
99
+ "kind": "Name",
100
+ "value": "minLevel"
101
+ }
102
+ },
103
+ "type": {
104
+ "kind": "NamedType",
105
+ "name": {
106
+ "kind": "Name",
107
+ "value": "RunLogLevel"
108
+ }
109
+ },
110
+ "directives": []
111
+ },
112
+ {
113
+ "kind": "VariableDefinition",
114
+ "variable": {
115
+ "kind": "Variable",
116
+ "name": {
117
+ "kind": "Name",
118
+ "value": "search"
119
+ }
120
+ },
121
+ "type": {
122
+ "kind": "NamedType",
123
+ "name": {
124
+ "kind": "Name",
125
+ "value": "String"
126
+ }
127
+ },
128
+ "directives": []
129
+ },
130
+ {
131
+ "kind": "VariableDefinition",
132
+ "variable": {
133
+ "kind": "Variable",
134
+ "name": {
135
+ "kind": "Name",
136
+ "value": "includeChildRuns"
137
+ }
138
+ },
139
+ "type": {
140
+ "kind": "NamedType",
141
+ "name": {
142
+ "kind": "Name",
143
+ "value": "Boolean"
144
+ }
145
+ },
146
+ "directives": []
147
+ }
148
+ ],
149
+ "directives": [],
150
+ "selectionSet": {
151
+ "kind": "SelectionSet",
152
+ "selections": [{
153
+ "kind": "Field",
154
+ "name": {
155
+ "kind": "Name",
156
+ "value": "workflowRunLogs"
157
+ },
158
+ "arguments": [
159
+ {
160
+ "kind": "Argument",
161
+ "name": {
162
+ "kind": "Name",
163
+ "value": "runId"
164
+ },
165
+ "value": {
166
+ "kind": "Variable",
167
+ "name": {
168
+ "kind": "Name",
169
+ "value": "runId"
170
+ }
171
+ }
172
+ },
173
+ {
174
+ "kind": "Argument",
175
+ "name": {
176
+ "kind": "Name",
177
+ "value": "after"
178
+ },
179
+ "value": {
180
+ "kind": "Variable",
181
+ "name": {
182
+ "kind": "Name",
183
+ "value": "after"
184
+ }
185
+ }
186
+ },
187
+ {
188
+ "kind": "Argument",
189
+ "name": {
190
+ "kind": "Name",
191
+ "value": "limit"
192
+ },
193
+ "value": {
194
+ "kind": "Variable",
195
+ "name": {
196
+ "kind": "Name",
197
+ "value": "limit"
198
+ }
199
+ }
200
+ },
201
+ {
202
+ "kind": "Argument",
203
+ "name": {
204
+ "kind": "Name",
205
+ "value": "nodeId"
206
+ },
207
+ "value": {
208
+ "kind": "Variable",
209
+ "name": {
210
+ "kind": "Name",
211
+ "value": "nodeId"
212
+ }
213
+ }
214
+ },
215
+ {
216
+ "kind": "Argument",
217
+ "name": {
218
+ "kind": "Name",
219
+ "value": "minLevel"
220
+ },
221
+ "value": {
222
+ "kind": "Variable",
223
+ "name": {
224
+ "kind": "Name",
225
+ "value": "minLevel"
226
+ }
227
+ }
228
+ },
229
+ {
230
+ "kind": "Argument",
231
+ "name": {
232
+ "kind": "Name",
233
+ "value": "search"
234
+ },
235
+ "value": {
236
+ "kind": "Variable",
237
+ "name": {
238
+ "kind": "Name",
239
+ "value": "search"
240
+ }
241
+ }
242
+ },
243
+ {
244
+ "kind": "Argument",
245
+ "name": {
246
+ "kind": "Name",
247
+ "value": "includeChildRuns"
248
+ },
249
+ "value": {
250
+ "kind": "Variable",
251
+ "name": {
252
+ "kind": "Name",
253
+ "value": "includeChildRuns"
254
+ }
255
+ }
256
+ }
257
+ ],
258
+ "directives": [],
259
+ "selectionSet": {
260
+ "kind": "SelectionSet",
261
+ "selections": [
262
+ {
263
+ "kind": "Field",
264
+ "name": {
265
+ "kind": "Name",
266
+ "value": "lines"
267
+ },
268
+ "arguments": [],
269
+ "directives": [],
270
+ "selectionSet": {
271
+ "kind": "SelectionSet",
272
+ "selections": [{
273
+ "kind": "FragmentSpread",
274
+ "name": {
275
+ "kind": "Name",
276
+ "value": "RunLogLineFields"
277
+ },
278
+ "directives": []
279
+ }]
280
+ }
281
+ },
282
+ {
283
+ "kind": "Field",
284
+ "name": {
285
+ "kind": "Name",
286
+ "value": "nextCursor"
287
+ },
288
+ "arguments": [],
289
+ "directives": []
290
+ },
291
+ {
292
+ "kind": "Field",
293
+ "name": {
294
+ "kind": "Name",
295
+ "value": "hasMore"
296
+ },
297
+ "arguments": [],
298
+ "directives": []
299
+ },
300
+ {
301
+ "kind": "Field",
302
+ "name": {
303
+ "kind": "Name",
304
+ "value": "limitReached"
305
+ },
306
+ "arguments": [],
307
+ "directives": []
308
+ }
309
+ ]
310
+ }
311
+ }]
312
+ }
313
+ }, {
314
+ "kind": "FragmentDefinition",
315
+ "name": {
316
+ "kind": "Name",
317
+ "value": "RunLogLineFields"
318
+ },
319
+ "variableDefinitions": [],
320
+ "typeCondition": {
321
+ "kind": "NamedType",
322
+ "name": {
323
+ "kind": "Name",
324
+ "value": "RunLogLine"
325
+ }
326
+ },
327
+ "directives": [],
328
+ "selectionSet": {
329
+ "kind": "SelectionSet",
330
+ "selections": [
331
+ {
332
+ "kind": "Field",
333
+ "name": {
334
+ "kind": "Name",
335
+ "value": "id"
336
+ },
337
+ "arguments": [],
338
+ "directives": []
339
+ },
340
+ {
341
+ "kind": "Field",
342
+ "name": {
343
+ "kind": "Name",
344
+ "value": "runId"
345
+ },
346
+ "arguments": [],
347
+ "directives": []
348
+ },
349
+ {
350
+ "kind": "Field",
351
+ "name": {
352
+ "kind": "Name",
353
+ "value": "nodeId"
354
+ },
355
+ "arguments": [],
356
+ "directives": []
357
+ },
358
+ {
359
+ "kind": "Field",
360
+ "name": {
361
+ "kind": "Name",
362
+ "value": "nodeStateId"
363
+ },
364
+ "arguments": [],
365
+ "directives": []
366
+ },
367
+ {
368
+ "kind": "Field",
369
+ "name": {
370
+ "kind": "Name",
371
+ "value": "attempt"
372
+ },
373
+ "arguments": [],
374
+ "directives": []
375
+ },
376
+ {
377
+ "kind": "Field",
378
+ "name": {
379
+ "kind": "Name",
380
+ "value": "level"
381
+ },
382
+ "arguments": [],
383
+ "directives": []
384
+ },
385
+ {
386
+ "kind": "Field",
387
+ "name": {
388
+ "kind": "Name",
389
+ "value": "stream"
390
+ },
391
+ "arguments": [],
392
+ "directives": []
393
+ },
394
+ {
395
+ "kind": "Field",
396
+ "name": {
397
+ "kind": "Name",
398
+ "value": "phase"
399
+ },
400
+ "arguments": [],
401
+ "directives": []
402
+ },
403
+ {
404
+ "kind": "Field",
405
+ "name": {
406
+ "kind": "Name",
407
+ "value": "message"
408
+ },
409
+ "arguments": [],
410
+ "directives": []
411
+ },
412
+ {
413
+ "kind": "Field",
414
+ "name": {
415
+ "kind": "Name",
416
+ "value": "data"
417
+ },
418
+ "arguments": [],
419
+ "directives": []
420
+ },
421
+ {
422
+ "kind": "Field",
423
+ "name": {
424
+ "kind": "Name",
425
+ "value": "truncated"
426
+ },
427
+ "arguments": [],
428
+ "directives": []
429
+ },
430
+ {
431
+ "kind": "Field",
432
+ "name": {
433
+ "kind": "Name",
434
+ "value": "timestamp"
435
+ },
436
+ "arguments": [],
437
+ "directives": []
438
+ }
439
+ ]
440
+ }
441
+ }]
442
+ };
443
+
444
+ // src/generated/documents/wspace/RunLogAppendedDocument.ts
445
+ const RunLogAppendedDocument = {
446
+ "kind": "Document",
447
+ "definitions": [{
448
+ "kind": "OperationDefinition",
449
+ "operation": "subscription",
450
+ "name": {
451
+ "kind": "Name",
452
+ "value": "RunLogAppended"
453
+ },
454
+ "variableDefinitions": [{
455
+ "kind": "VariableDefinition",
456
+ "variable": {
457
+ "kind": "Variable",
458
+ "name": {
459
+ "kind": "Name",
460
+ "value": "runId"
461
+ }
462
+ },
463
+ "type": {
464
+ "kind": "NonNullType",
465
+ "type": {
466
+ "kind": "NamedType",
467
+ "name": {
468
+ "kind": "Name",
469
+ "value": "ID"
470
+ }
471
+ }
472
+ },
473
+ "directives": []
474
+ }],
475
+ "directives": [],
476
+ "selectionSet": {
477
+ "kind": "SelectionSet",
478
+ "selections": [{
479
+ "kind": "Field",
480
+ "name": {
481
+ "kind": "Name",
482
+ "value": "runLogAppended"
483
+ },
484
+ "arguments": [{
485
+ "kind": "Argument",
486
+ "name": {
487
+ "kind": "Name",
488
+ "value": "runId"
489
+ },
490
+ "value": {
491
+ "kind": "Variable",
492
+ "name": {
493
+ "kind": "Name",
494
+ "value": "runId"
495
+ }
496
+ }
497
+ }],
498
+ "directives": [],
499
+ "selectionSet": {
500
+ "kind": "SelectionSet",
501
+ "selections": [{
502
+ "kind": "FragmentSpread",
503
+ "name": {
504
+ "kind": "Name",
505
+ "value": "RunLogLineFields"
506
+ },
507
+ "directives": []
508
+ }]
509
+ }
510
+ }]
511
+ }
512
+ }, {
513
+ "kind": "FragmentDefinition",
514
+ "name": {
515
+ "kind": "Name",
516
+ "value": "RunLogLineFields"
517
+ },
518
+ "variableDefinitions": [],
519
+ "typeCondition": {
520
+ "kind": "NamedType",
521
+ "name": {
522
+ "kind": "Name",
523
+ "value": "RunLogLine"
524
+ }
525
+ },
526
+ "directives": [],
527
+ "selectionSet": {
528
+ "kind": "SelectionSet",
529
+ "selections": [
530
+ {
531
+ "kind": "Field",
532
+ "name": {
533
+ "kind": "Name",
534
+ "value": "id"
535
+ },
536
+ "arguments": [],
537
+ "directives": []
538
+ },
539
+ {
540
+ "kind": "Field",
541
+ "name": {
542
+ "kind": "Name",
543
+ "value": "runId"
544
+ },
545
+ "arguments": [],
546
+ "directives": []
547
+ },
548
+ {
549
+ "kind": "Field",
550
+ "name": {
551
+ "kind": "Name",
552
+ "value": "nodeId"
553
+ },
554
+ "arguments": [],
555
+ "directives": []
556
+ },
557
+ {
558
+ "kind": "Field",
559
+ "name": {
560
+ "kind": "Name",
561
+ "value": "nodeStateId"
562
+ },
563
+ "arguments": [],
564
+ "directives": []
565
+ },
566
+ {
567
+ "kind": "Field",
568
+ "name": {
569
+ "kind": "Name",
570
+ "value": "attempt"
571
+ },
572
+ "arguments": [],
573
+ "directives": []
574
+ },
575
+ {
576
+ "kind": "Field",
577
+ "name": {
578
+ "kind": "Name",
579
+ "value": "level"
580
+ },
581
+ "arguments": [],
582
+ "directives": []
583
+ },
584
+ {
585
+ "kind": "Field",
586
+ "name": {
587
+ "kind": "Name",
588
+ "value": "stream"
589
+ },
590
+ "arguments": [],
591
+ "directives": []
592
+ },
593
+ {
594
+ "kind": "Field",
595
+ "name": {
596
+ "kind": "Name",
597
+ "value": "phase"
598
+ },
599
+ "arguments": [],
600
+ "directives": []
601
+ },
602
+ {
603
+ "kind": "Field",
604
+ "name": {
605
+ "kind": "Name",
606
+ "value": "message"
607
+ },
608
+ "arguments": [],
609
+ "directives": []
610
+ },
611
+ {
612
+ "kind": "Field",
613
+ "name": {
614
+ "kind": "Name",
615
+ "value": "data"
616
+ },
617
+ "arguments": [],
618
+ "directives": []
619
+ },
620
+ {
621
+ "kind": "Field",
622
+ "name": {
623
+ "kind": "Name",
624
+ "value": "truncated"
625
+ },
626
+ "arguments": [],
627
+ "directives": []
628
+ },
629
+ {
630
+ "kind": "Field",
631
+ "name": {
632
+ "kind": "Name",
633
+ "value": "timestamp"
634
+ },
635
+ "arguments": [],
636
+ "directives": []
637
+ }
638
+ ]
639
+ }
640
+ }]
641
+ };
642
+
643
+ // src/modules/isolation/operations.ts
644
+ /**
645
+ * The GraphQL operations of the isolation levels (BOFF-16856, spec 17 §8.2), written against the
646
+ * wspace-workflow-svc schema (`workflows/schema/isolation.gql`, `runs/schema/isolation.gql`).
647
+ *
648
+ * They are typed here rather than generated from `src/operations/` because codegen validates every
649
+ * document there against the committed CDN snapshot (`graphql/wspace.graphql`), which gains these
650
+ * fields only after wspace-workflow-svc publishes them to Hive. Once `bun run schema:pull` brings
651
+ * them in, these documents can move to `src/operations/workflows/` unchanged.
652
+ *
653
+ * Each operation is its own request, never folded into an existing query: while the subgraph lacks
654
+ * a field the gateway refuses the whole request, and only these requests fail, which keeps the
655
+ * isolation UI hidden without breaking the page around it (spec 17 §15.1). They are sent with
656
+ * `no-cache`, so a partial selection never overwrites what other queries cached for the same run.
657
+ */
658
+ const POLICY_FIELDS = `
659
+ available
660
+ defaultLevel
661
+ minimumLevel
662
+ locked
663
+ platformDefault
664
+ platformFloor
665
+ nodeTypeFloors
666
+ `;
667
+ const WorkflowIsolationPolicyDocument = gql`
668
+ query WorkflowIsolationPolicy {
669
+ workflowExecutionSettings {
670
+ isolation {
671
+ ${POLICY_FIELDS}
672
+ }
673
+ }
674
+ }
675
+ `;
676
+ const UpdateWorkflowIsolationPolicyDocument = gql`
677
+ mutation UpdateWorkflowIsolationPolicy($input: UpdateWorkflowIsolationPolicyInput!) {
678
+ updateWorkflowIsolationPolicy(input: $input) {
679
+ ${POLICY_FIELDS}
680
+ }
681
+ }
682
+ `;
683
+ const WorkflowRunIsolationDocument = gql`
684
+ query WorkflowRunIsolation($id: ID!) {
685
+ workflowRun(id: $id) {
686
+ id
687
+ isolation {
688
+ enabled
689
+ defaultLevel
690
+ platformFloor
691
+ parentFloor
692
+ }
693
+ nodeStates {
694
+ id
695
+ nodeId
696
+ isolationLevel
697
+ isolationSource
698
+ }
699
+ }
700
+ }
701
+ `;
702
+
703
+ // src/modules/isolation/utils/levels.ts
704
+ /**
705
+ * Sandbox isolation levels (BOFF-16856, fluidgrids-specs architecture spec 17 §2).
706
+ *
707
+ * Two levels can be selected, strongest first:
708
+ *
709
+ * - `STEP` (rank 2, "Maximum"): a fresh sandbox for every node execution attempt.
710
+ * - `RUN` (rank 1, "Strict"): one sandbox scope per run; a sandbox serves only later executions of
711
+ * the same runtime in the same run.
712
+ *
713
+ * The other values are only recorded for a node execution and can never be selected. Unknown values
714
+ * never widen isolation: wherever a stored value is read, a value that is not a selectable level
715
+ * counts as `STEP`. The same rules as `wspace-workflow-svc` `runs/services/isolation/levels.ts`.
716
+ */
717
+ /** The selectable levels, strongest first. */
718
+ const SELECTABLE_ISOLATION_LEVELS = ["STEP", "RUN"];
719
+ const RANK = {
720
+ STEP: 2,
721
+ RUN: 1
722
+ };
723
+ /** Whether a value is exactly one of the selectable levels (case-sensitive). */
724
+ function isSelectableIsolationLevel(value) {
725
+ return value === "STEP" || value === "RUN";
726
+ }
727
+ /** Whether a stored value is present at all: `undefined` and `null` mean "inherit". */
728
+ function isIsolationValuePresent(value) {
729
+ return value !== void 0 && value !== null;
730
+ }
731
+ /**
732
+ * The level a present stored value stands for: itself when it is a selectable level, otherwise
733
+ * `STEP` (an unknown or malformed value never widens isolation). Null for an absent value.
734
+ */
735
+ function effectiveIsolationLevel(value) {
736
+ if (!isIsolationValuePresent(value)) return null;
737
+ return isSelectableIsolationLevel(value) ? value : "STEP";
738
+ }
739
+ /** The strength of a level: higher is stronger. */
740
+ function isolationRank(level) {
741
+ return RANK[level];
742
+ }
743
+ /** The strongest of the present values (each read with {@link effectiveIsolationLevel}), or null. */
744
+ function strongestIsolationLevel(...values) {
745
+ let strongest = null;
746
+ for (const value of values) {
747
+ const level = effectiveIsolationLevel(value);
748
+ if (level !== null && (strongest === null || isolationRank(level) > isolationRank(strongest))) strongest = level;
749
+ }
750
+ return strongest;
751
+ }
752
+ /** Whether `level` is weaker than `floor`. */
753
+ function isWeakerThan(level, floor) {
754
+ return isolationRank(level) < isolationRank(floor);
755
+ }
756
+
757
+ // src/modules/isolation/utils/resolver.ts
758
+ /**
759
+ * The isolation resolver (BOFF-16856, spec 17 §6.4), copied for the preview the UI shows: which
760
+ * level one node execution runs at, and where that level came from.
761
+ *
762
+ * fluidgrids-workers holds the authoritative copy, applied at execution; wspace-workflow-svc and this
763
+ * package hold previews. All three run the same golden vectors (spec 17 Appendix A,
764
+ * `../fixtures/isolation-resolver-golden-vectors.json`, a byte-for-byte copy of the file in the other
765
+ * two repos). A change to the algorithm changes Appendix A and the fixture first.
766
+ *
767
+ * ```
768
+ * 1. runner node -> (RUNNER, RUNNER)
769
+ * internal:* node -> (CODE_VM, CODE_VM) for Python code with the wire
770
+ * on and CODE_NODE_SANDBOX covering the workspace,
771
+ * else (IN_WORKER, IN_WORKER)
772
+ * 2. wire off, or the worker gate excludes the workspace -> (LEGACY, LEGACY)
773
+ * 3. no snapshot -> (STEP, FALLBACK)
774
+ * 4. snapshot.enabled false -> (LEGACY, LEGACY)
775
+ * 5. durable activity -> requested (STEP, DURABLE); continue at 7
776
+ * 6. requested = the first present value of node, workflow, workspace default, platform default;
777
+ * an unknown value counts as STEP with that scope as its source
778
+ * 7. floor = the strongest of the snapshot's platform floor, the executing side's own floor, the
779
+ * workspace minimum, the workspace default when locked, the snapshot's and the executing side's
780
+ * node-type floor for this node type, and the parent floor
781
+ * 8. level = the stronger of requested and floor; the source is FLOOR when the floor raised it
782
+ * 9. RUN with run-scope reuse off or Valkey unusable -> (STEP, FALLBACK)
783
+ * ```
784
+ */
785
+ const INTERNAL_NODE_PREFIX = "internal:";
786
+ function asRecord$1(value) {
787
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
788
+ }
789
+ /**
790
+ * The raw node-level isolation value: `node.data.executionSettings.isolationLevel` only, exactly
791
+ * where the workers read it. A root-level `node.executionSettings` copy is ignored (vector V22).
792
+ */
793
+ function nodeIsolationValue(node) {
794
+ return asRecord$1(asRecord$1(asRecord$1(node)?.data)?.executionSettings)?.isolationLevel;
795
+ }
796
+ function requestedLevel(snapshot, definitionConfig, node) {
797
+ const candidates = [
798
+ [nodeIsolationValue(node), "NODE"],
799
+ [definitionConfig.isolationLevel, "WORKFLOW"],
800
+ [snapshot.workspace.default, "WORKSPACE"]
801
+ ];
802
+ for (const [value, source] of candidates) {
803
+ const level = effectiveIsolationLevel(value);
804
+ if (level !== null) return {
805
+ level,
806
+ source
807
+ };
808
+ }
809
+ return {
810
+ level: effectiveIsolationLevel(snapshot.platformDefault) ?? "STEP",
811
+ source: "PLATFORM"
812
+ };
813
+ }
814
+ /** The floor that applies to a node type (step 7), or null when nothing sets one. */
815
+ function isolationFloor(snapshot, nodeType, env) {
816
+ return strongestIsolationLevel(snapshot.platformFloor, env.floor, snapshot.workspace.minimum, snapshot.workspace.locked ? snapshot.workspace.default : null, Object.hasOwn(snapshot.nodeTypeFloors, nodeType) ? snapshot.nodeTypeFloors[nodeType] : null, Object.hasOwn(env.nodeTypeFloors, nodeType) ? env.nodeTypeFloors[nodeType] : null, snapshot.parentFloor);
817
+ }
818
+ /** Resolve one node execution (spec 17 §6.4). Pure. */
819
+ function resolveIsolation(snapshot, definitionConfig, node, facts, env) {
820
+ if (facts.runnerId) return {
821
+ level: "RUNNER",
822
+ source: "RUNNER"
823
+ };
824
+ if (node.type.startsWith(INTERNAL_NODE_PREFIX)) return facts.pythonCode && env.wire && env.codeNodeSandbox ? {
825
+ level: "CODE_VM",
826
+ source: "CODE_VM"
827
+ } : {
828
+ level: "IN_WORKER",
829
+ source: "IN_WORKER"
830
+ };
831
+ if (!env.wire || !env.workerGate) return {
832
+ level: "LEGACY",
833
+ source: "LEGACY"
834
+ };
835
+ if (snapshot === null) return {
836
+ level: "STEP",
837
+ source: "FALLBACK"
838
+ };
839
+ if (!snapshot.enabled) return {
840
+ level: "LEGACY",
841
+ source: "LEGACY"
842
+ };
843
+ const requested = facts.durableActivity ? {
844
+ level: "STEP",
845
+ source: "DURABLE"
846
+ } : requestedLevel(snapshot, definitionConfig, node);
847
+ const floor = isolationFloor(snapshot, node.type, env);
848
+ let level = requested.level;
849
+ let source = requested.source;
850
+ if (floor !== null && isWeakerThan(level, floor)) {
851
+ level = floor;
852
+ source = "FLOOR";
853
+ }
854
+ if (level === "RUN" && (!env.runScopeReuse || !facts.valkeyUsable)) return {
855
+ level: "STEP",
856
+ source: "FALLBACK"
857
+ };
858
+ return {
859
+ level,
860
+ source
861
+ };
862
+ }
863
+ /** The env a preview assumes: the executing side applies the levels and its floors equal ours. */
864
+ function previewIsolationEnv(floor, nodeTypeFloors) {
865
+ return {
866
+ wire: true,
867
+ workerGate: true,
868
+ codeNodeSandbox: false,
869
+ runScopeReuse: true,
870
+ floor,
871
+ nodeTypeFloors
872
+ };
873
+ }
874
+ /** The facts a preview assumes for a store node on the cloud in a graph run. */
875
+ const PREVIEW_FACTS = {
876
+ runnerId: null,
877
+ durableActivity: false,
878
+ pythonCode: false,
879
+ valkeyUsable: true
880
+ };
881
+
882
+ // src/modules/isolation/utils/policy.ts
883
+ /**
884
+ * The workspace's sandbox isolation policy as the UI reads it (BOFF-16856, spec 17 §6, §8.2,
885
+ * `WorkflowIsolationPolicy` in wspace-workflow-svc), and the previews the settings show before a
886
+ * run: what a workflow or a node inherits, and which levels the floors leave open.
887
+ *
888
+ * Every preview runs the shared resolver (`resolver.ts`) with the live policy in place of a run
889
+ * snapshot, so it agrees with the run unless the workers' gate, wire or floors differ from
890
+ * wspace-workflow-svc's (spec 17 §6.4 "Preview").
891
+ */
892
+ function asRecord(value) {
893
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
894
+ }
895
+ function levelOrNull(value) {
896
+ return isSelectableIsolationLevel(value) ? value : null;
897
+ }
898
+ /**
899
+ * The policy a `WorkflowIsolationPolicy` answer describes, or null when the answer is missing or
900
+ * not a policy (the UI then stays hidden). An unknown platform level reads as `STEP`, never weaker.
901
+ */
902
+ function parseIsolationPolicy(value) {
903
+ const record = asRecord(value);
904
+ if (!record || typeof record.available !== "boolean") return null;
905
+ const nodeTypeFloors = {};
906
+ for (const [nodeType, floor] of Object.entries(asRecord(record.nodeTypeFloors) ?? {})) if (typeof floor === "string") nodeTypeFloors[nodeType] = floor;
907
+ return {
908
+ available: record.available,
909
+ defaultLevel: levelOrNull(record.defaultLevel),
910
+ minimumLevel: levelOrNull(record.minimumLevel),
911
+ locked: record.locked === true,
912
+ platformDefault: effectiveIsolationLevel(record.platformDefault) ?? "STEP",
913
+ platformFloor: effectiveIsolationLevel(record.platformFloor) ?? "RUN",
914
+ nodeTypeFloors
915
+ };
916
+ }
917
+ /** The live policy in the shape of a run snapshot, for the resolver. */
918
+ function policySnapshot(policy) {
919
+ return {
920
+ v: 1,
921
+ enabled: policy.available,
922
+ platformDefault: policy.platformDefault,
923
+ platformFloor: policy.platformFloor,
924
+ nodeTypeFloors: policy.nodeTypeFloors,
925
+ workspace: {
926
+ default: policy.defaultLevel,
927
+ minimum: policy.minimumLevel,
928
+ locked: policy.locked
929
+ },
930
+ parentFloor: null,
931
+ resolvedAt: ""
932
+ };
933
+ }
934
+ /** Preview of one store node: the level and source it would run at with the live policy. */
935
+ function previewNodeIsolation(policy, definitionConfig, node) {
936
+ return resolveIsolation(policySnapshot(policy), definitionConfig, node, PREVIEW_FACTS, previewIsolationEnv(policy.platformFloor, policy.nodeTypeFloors));
937
+ }
938
+ /** The level a resolution stands for among the selectable levels (record-only values: STEP). */
939
+ function selectableOf(resolution) {
940
+ return isSelectableIsolationLevel(resolution.level) ? resolution.level : "STEP";
941
+ }
942
+ /**
943
+ * What a workflow without its own level runs at: the workspace default (or the platform default),
944
+ * raised by the workspace's floors. This is the "Workspace default (X)" choice.
945
+ */
946
+ function workspaceDefaultPreview(policy) {
947
+ return selectableOf(previewNodeIsolation(policy, {}, { type: "" }));
948
+ }
949
+ /**
950
+ * What a node without its own level runs at: the workflow's value, else the workspace's, raised
951
+ * by the floors, including the node type's own floor. This is the "Inherit (X)" choice.
952
+ */
953
+ function inheritedNodePreview(policy, definitionConfig, nodeType) {
954
+ return selectableOf(previewNodeIsolation(policy, definitionConfig, { type: nodeType }));
955
+ }
956
+ /**
957
+ * The floor at a scope (the workflow with `nodeType` null, else a node of that type), and what set
958
+ * it, so a level below it can be disabled with its reason.
959
+ */
960
+ function scopeFloor(policy, nodeType) {
961
+ const level = nodeType === null ? strongestIsolationLevel(policy.platformFloor, policy.minimumLevel, policy.locked ? policy.defaultLevel : null) : isolationFloor(policySnapshot(policy), nodeType, previewIsolationEnv(policy.platformFloor, policy.nodeTypeFloors));
962
+ if (level === null) return null;
963
+ const reaches = (value) => effectiveIsolationLevel(value) === level;
964
+ let reason = "platform";
965
+ if (nodeType !== null && Object.hasOwn(policy.nodeTypeFloors, nodeType) && reaches(policy.nodeTypeFloors[nodeType])) reason = "nodeType";
966
+ else if (policy.locked && reaches(policy.defaultLevel)) reason = "locked";
967
+ else if (reaches(policy.minimumLevel)) reason = "minimum";
968
+ return {
969
+ level,
970
+ reason
971
+ };
972
+ }
973
+ /** Whether `level` is below the floor at a scope (and so cannot be chosen there). */
974
+ function isBelowFloor(level, floor) {
975
+ return floor !== null && isWeakerThan(level, floor.level);
976
+ }
977
+ /**
978
+ * A stored value as the settings show it: the value itself, the level it runs at after the floors,
979
+ * and whether it is a known level. An unknown value (from an older import) runs as `STEP`.
980
+ */
981
+ function storedValueView(stored, floor) {
982
+ const level = effectiveIsolationLevel(stored);
983
+ if (level === null) return null;
984
+ const runsAt = floor !== null && isWeakerThan(level, floor.level) ? floor.level : level;
985
+ return {
986
+ known: isSelectableIsolationLevel(stored),
987
+ runsAt,
988
+ raised: runsAt !== level
989
+ };
990
+ }
991
+ /**
992
+ * A stored value that is not a level, as text the settings can name: text as is, the empty string
993
+ * as `""` (so it does not read as a blank label), any other value as its JSON text.
994
+ */
995
+ function storedValueText(stored) {
996
+ if (typeof stored === "string") return stored === "" ? "\"\"" : stored;
997
+ return JSON.stringify(stored) ?? String(stored);
998
+ }
999
+ /** Whether a workspace minimum would be stronger than its default (the service refuses that). */
1000
+ function minimumAboveDefault(defaultLevel, minimumLevel) {
1001
+ return defaultLevel !== null && minimumLevel !== null && isWeakerThan(defaultLevel, minimumLevel);
1002
+ }
1003
+
1004
+ // src/modules/isolation/hooks/useIsolationPolicy.ts
1005
+ /**
1006
+ * The workspace's sandbox isolation policy (BOFF-16856, spec 17 §15.1), read once and shared by
1007
+ * every isolation control on screen: the Settings section, the workflow setting and each node's
1008
+ * setting.
1009
+ *
1010
+ * The policy has its own query. While it loads, fails (an older subgraph without the field, a
1011
+ * refused read) or answers `available: false`, `usableIsolationPolicy` is null and every isolation
1012
+ * control stays hidden, so turning the levels on is purely a gitops change on the service.
1013
+ */
1014
+ const INITIAL = {
1015
+ status: "idle",
1016
+ policy: null,
1017
+ generation: 0,
1018
+ client: null
1019
+ };
1020
+ const useIsolationPolicyStore = create(() => ({ ...INITIAL }));
1021
+ /**
1022
+ * The read in flight, shared by every caller. Kept outside the store because it is not state any
1023
+ * component renders; `resetIsolationPolicy` clears it together with the store.
1024
+ */
1025
+ let inFlight = null;
1026
+ /** Asks a host's shared client (fe-libs) not to toast a failure; other clients ignore it. */
1027
+ const QUIET = { suppressGlobalErrorEvent: true };
1028
+ /** Reads the policy from the service (always a network read). */
1029
+ async function fetchIsolationPolicy() {
1030
+ const result = await getFluidGridsClient().query({
1031
+ query: WorkflowIsolationPolicyDocument,
1032
+ fetchPolicy: "no-cache",
1033
+ context: QUIET
1034
+ });
1035
+ throwIfResultError(result);
1036
+ return parseIsolationPolicy(result.data?.workflowExecutionSettings?.isolation);
1037
+ }
1038
+ /**
1039
+ * Loads the policy unless it is loaded or loading; `force` reads it again. A failed read leaves the
1040
+ * policy null (hidden) and is retried on the next `force`, or after `resetIsolationPolicy`.
1041
+ */
1042
+ function loadIsolationPolicy(force = false) {
1043
+ const client = getFluidGridsClientSafe();
1044
+ if (useIsolationPolicyStore.getState().client !== client) resetIsolationPolicy();
1045
+ const state = useIsolationPolicyStore.getState();
1046
+ if (!force && inFlight) return inFlight;
1047
+ if (!force && (state.status === "ready" || state.status === "error")) return Promise.resolve(state.policy);
1048
+ const generation = state.generation;
1049
+ useIsolationPolicyStore.setState({
1050
+ status: "loading",
1051
+ client
1052
+ });
1053
+ const request = fetchIsolationPolicy().then((policy) => {
1054
+ if (useIsolationPolicyStore.getState().generation === generation) useIsolationPolicyStore.setState({
1055
+ status: "ready",
1056
+ policy
1057
+ });
1058
+ return policy;
1059
+ }).catch(() => {
1060
+ if (useIsolationPolicyStore.getState().generation === generation) useIsolationPolicyStore.setState({
1061
+ status: "error",
1062
+ policy: null
1063
+ });
1064
+ return null;
1065
+ }).finally(() => {
1066
+ if (inFlight === request) inFlight = null;
1067
+ });
1068
+ inFlight = request;
1069
+ return request;
1070
+ }
1071
+ /**
1072
+ * Saves a partial change and shares the saved policy. Throws the service's refusal (callers map it
1073
+ * with `isolationPolicyErrorMessage`).
1074
+ */
1075
+ async function saveIsolationPolicy(input) {
1076
+ const client = getFluidGridsClientSafe();
1077
+ const generation = useIsolationPolicyStore.getState().generation;
1078
+ const result = await getFluidGridsClient().mutate({
1079
+ mutation: UpdateWorkflowIsolationPolicyDocument,
1080
+ variables: { input },
1081
+ context: QUIET
1082
+ });
1083
+ throwIfResultError(result);
1084
+ const saved = parseIsolationPolicy(result.data?.updateWorkflowIsolationPolicy);
1085
+ if (!saved) throw new Error("No isolation policy returned");
1086
+ if (getFluidGridsClientSafe() === client && useIsolationPolicyStore.getState().generation === generation) useIsolationPolicyStore.setState({
1087
+ status: "ready",
1088
+ policy: saved,
1089
+ client
1090
+ });
1091
+ return saved;
1092
+ }
1093
+ /** Forgets the loaded policy (another workspace, or a test). */
1094
+ function resetIsolationPolicy() {
1095
+ inFlight = null;
1096
+ useIsolationPolicyStore.setState((state) => ({
1097
+ ...INITIAL,
1098
+ generation: state.generation + 1
1099
+ }));
1100
+ }
1101
+ /**
1102
+ * The policy and its load state. Nothing is read while `enabled` is false (for example while the
1103
+ * person may not read the workspace's settings).
1104
+ */
1105
+ function useIsolationPolicy(enabled = true) {
1106
+ const status = useIsolationPolicyStore((state) => state.status);
1107
+ const policy = useIsolationPolicyStore((state) => state.policy);
1108
+ const client = useIsolationPolicyStore((state) => state.client);
1109
+ const current = getFluidGridsClientSafe();
1110
+ useEffect(() => {
1111
+ if (enabled) loadIsolationPolicy();
1112
+ }, [enabled, current]);
1113
+ if (!enabled) return {
1114
+ status: "idle",
1115
+ policy: null
1116
+ };
1117
+ if (client !== current) return {
1118
+ status: "loading",
1119
+ policy: null
1120
+ };
1121
+ return {
1122
+ status,
1123
+ policy
1124
+ };
1125
+ }
1126
+ /** The policy when the isolation UI may show (loaded and available), else null. */
1127
+ function useUsableIsolationPolicy(enabled = true) {
1128
+ const { policy } = useIsolationPolicy(enabled);
1129
+ return policy?.available ? policy : null;
1130
+ }
1131
+
1132
+ // src/modules/isolation/utils/labels.ts
1133
+ /** The short name of a selectable level: "Maximum" or "Strict". */
1134
+ function levelName(tr, level) {
1135
+ return level === "STEP" ? tr("fluidgrids.isolation.level.step", "Maximum") : tr("fluidgrids.isolation.level.run", "Strict");
1136
+ }
1137
+ /** The full name of a selectable level, as the radio cards and selects offer it. */
1138
+ function levelTitle(tr, level) {
1139
+ return level === "STEP" ? tr("fluidgrids.isolation.level.stepTitle", "Maximum: a fresh sandbox for every step") : tr("fluidgrids.isolation.level.runTitle", "Strict: one sandbox scope per run");
1140
+ }
1141
+ /** The security and cost hint of a level. */
1142
+ function levelHint(tr, level) {
1143
+ return level === "STEP" ? tr("fluidgrids.isolation.level.stepHint", "Every step starts in a new sandbox that is deleted when the step ends. The strongest isolation; each step counts as one sandbox execution.") : tr("fluidgrids.isolation.level.runHint", "Later steps of the same node in the same run can reuse its sandbox; no other run can ever reach it. Fewer sandbox executions, so lower cost and faster steps.");
1144
+ }
1145
+ /**
1146
+ * The chip of a recorded level and source. The source refines the level only where the copy says
1147
+ * so (a fallback or a code-first run of `STEP`); anything unknown keeps its raw value.
1148
+ */
1149
+ function isolationChip(tr, level, source) {
1150
+ if (!level) return null;
1151
+ if (level === "STEP" && source === "FALLBACK") return {
1152
+ kind: "STEP:FALLBACK",
1153
+ label: tr("fluidgrids.isolation.chip.fallback", "Maximum (fallback)"),
1154
+ tone: "strong"
1155
+ };
1156
+ if (level === "STEP" && source === "DURABLE") return {
1157
+ kind: "STEP:DURABLE",
1158
+ label: tr("fluidgrids.isolation.chip.durable", "Maximum (code-first)"),
1159
+ tone: "strong"
1160
+ };
1161
+ switch (level) {
1162
+ case "STEP": return {
1163
+ kind: "STEP",
1164
+ label: tr("fluidgrids.isolation.level.step", "Maximum"),
1165
+ tone: "strong"
1166
+ };
1167
+ case "RUN": return {
1168
+ kind: "RUN",
1169
+ label: tr("fluidgrids.isolation.level.run", "Strict"),
1170
+ tone: "strong"
1171
+ };
1172
+ case "LEGACY": return {
1173
+ kind: "LEGACY",
1174
+ label: tr("fluidgrids.isolation.chip.legacy", "Standard (levels not enabled)"),
1175
+ tone: "standard"
1176
+ };
1177
+ case "RUNNER": return {
1178
+ kind: "RUNNER",
1179
+ label: tr("fluidgrids.isolation.chip.runner", "Own runner"),
1180
+ tone: "standard"
1181
+ };
1182
+ case "IN_WORKER": return {
1183
+ kind: "IN_WORKER",
1184
+ label: tr("fluidgrids.isolation.chip.inWorker", "Platform"),
1185
+ tone: "standard"
1186
+ };
1187
+ case "CODE_VM": return {
1188
+ kind: "CODE_VM",
1189
+ label: tr("fluidgrids.isolation.chip.codeVm", "Code sandbox"),
1190
+ tone: "standard"
1191
+ };
1192
+ default: return {
1193
+ kind: `raw:${level}`,
1194
+ label: level,
1195
+ tone: "neutral"
1196
+ };
1197
+ }
1198
+ }
1199
+ /** Where a recorded level came from, for the technical details. Unknown values stay raw. */
1200
+ function isolationSourceLabel(tr, source) {
1201
+ switch (source) {
1202
+ case null:
1203
+ case void 0:
1204
+ case "": return null;
1205
+ case "NODE": return tr("fluidgrids.isolation.source.node", "Set on the node");
1206
+ case "WORKFLOW": return tr("fluidgrids.isolation.source.workflow", "Set on the workflow");
1207
+ case "WORKSPACE": return tr("fluidgrids.isolation.source.workspace", "Workspace default");
1208
+ case "PLATFORM": return tr("fluidgrids.isolation.source.platform", "Platform default");
1209
+ case "FLOOR": return tr("fluidgrids.isolation.source.floor", "Raised to a required minimum");
1210
+ case "FALLBACK": return tr("fluidgrids.isolation.source.fallback", "Fell back to Maximum, which is never weaker");
1211
+ case "LEGACY": return tr("fluidgrids.isolation.source.legacy", "Isolation levels were not enabled");
1212
+ case "DURABLE": return tr("fluidgrids.isolation.source.durable", "Code-first workflows run at Maximum");
1213
+ case "RUNNER": return tr("fluidgrids.isolation.source.runner", "Runs on your own runner");
1214
+ case "IN_WORKER": return tr("fluidgrids.isolation.source.inWorker", "A platform node, run by FluidGrids");
1215
+ case "CODE_VM": return tr("fluidgrids.isolation.source.codeVm", "Code ran in its own code sandbox");
1216
+ default: return source;
1217
+ }
1218
+ }
1219
+ /** Why a level below the floor cannot be chosen. */
1220
+ function floorReasonText(tr, reason, level) {
1221
+ const name = levelName(tr, level);
1222
+ switch (reason) {
1223
+ case "minimum": return tr("fluidgrids.isolation.floor.minimum", "Not allowed: the workspace minimum is {{level}}.", { level: name });
1224
+ case "locked": return tr("fluidgrids.isolation.floor.locked", "Not allowed: the workspace default ({{level}}) is locked, so settings can only be stronger.", { level: name });
1225
+ case "nodeType": return tr("fluidgrids.isolation.floor.nodeType", "Not allowed: this node type always runs at {{level}} or stronger.", { level: name });
1226
+ case "platform": return tr("fluidgrids.isolation.floor.platform", "Not allowed: the platform minimum is {{level}}.", { level: name });
1227
+ }
1228
+ }
1229
+ /** The classes of a chip tone: semantic tokens only. */
1230
+ const CHIP_TONE_CLASSES = {
1231
+ strong: "border-status-info-border bg-status-info-bg-subtle text-status-info-text",
1232
+ standard: "border-border-default bg-surface-sunken text-text-primary",
1233
+ neutral: "border-border-default bg-surface text-text-secondary"
1234
+ };
1235
+
1236
+ export { RunLogsDocument as C, RunLogAppendedDocument as S, workspaceDefaultPreview as _, levelHint as a, isWeakerThan as b, saveIsolationPolicy as c, inheritedNodePreview as d, isBelowFloor as f, storedValueView as g, storedValueText as h, isolationSourceLabel as i, useIsolationPolicy as l, scopeFloor as m, floorReasonText as n, levelName as o, minimumAboveDefault as p, isolationChip as r, levelTitle as s, CHIP_TONE_CLASSES as t, useUsableIsolationPolicy as u, SELECTABLE_ISOLATION_LEVELS as v, WorkflowRunIsolationDocument as x, isSelectableIsolationLevel as y };