@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +564 -2
- package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
- package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
- package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
- package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
- package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
- package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
- package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
- package/dist/DateTimeField-B1qR4ruo.js +51 -0
- package/dist/Disclosure-BNKij7-v.js +45 -0
- package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
- package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
- package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
- package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
- package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
- package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
- package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
- package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
- package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
- package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
- package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
- package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
- package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
- package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
- package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
- package/dist/FluidGridsMark-CE2blT7K.js +74 -0
- package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
- package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
- package/dist/HistoryPage-BSBISXoj.js +2835 -0
- package/dist/Icon-BtQ0HXLh.js +160 -0
- package/dist/InsightsPage-D7ybj8N9.js +11245 -0
- package/dist/IsolationSetting-vy911E8b.js +1153 -0
- package/dist/LibraryParts-DOeNgR8A.js +413 -0
- package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
- package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
- package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
- package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
- package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
- package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
- package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
- package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
- package/dist/NodesPage-O7KeeKtd.js +653 -0
- package/dist/OfflineIcon-TwMKYWjA.js +207 -0
- package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
- package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
- package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
- package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
- package/dist/RunActionsMenu-DodOgIQm.js +59 -0
- package/dist/RunnerStatusPill-C1v967iq.js +24 -0
- package/dist/RunnersPage-dB0RSdY_.js +1929 -0
- package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
- package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
- package/dist/SearchBox-BGtYjvfs.js +49 -0
- package/dist/SequenceEditor-CFiHeHkR.js +497 -0
- package/dist/SettingsPage-0CQBNPZV.js +8695 -0
- package/dist/StewardPages-DAJhepen.js +47 -0
- package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
- package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
- package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
- package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
- package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
- package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
- package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
- package/dist/TemplatePreview-cx7-NOeG.js +868 -0
- package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
- package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
- package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
- package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
- package/dist/TranslationBridge-Da-TPgQm.js +68 -0
- package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
- package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
- package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
- package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
- package/dist/VariablesPage-ChfGuW22.js +2243 -0
- package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
- package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
- package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
- package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
- package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
- package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
- package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
- package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
- package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
- package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
- package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
- package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
- package/dist/WorkflowsList--hR2_8gf.js +4593 -0
- package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
- package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
- package/dist/addonCatalog-CbZS4deh.js +58 -0
- package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
- package/dist/addons.d.ts +3 -0
- package/dist/addons.js +4 -0
- package/dist/agent-form-Bfvm32j1.js +83 -0
- package/dist/agent-tools.d.ts +3 -0
- package/dist/agent-tools.js +5 -0
- package/dist/agentTools-CyL7DLOF.js +320 -0
- package/dist/ai-usage-BrxDgvdR.js +240 -0
- package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
- package/dist/api-BKq-nIOZ.js +2286 -0
- package/dist/api-Ol7I8NxE.js +8289 -0
- package/dist/apollo-type-policies.d.ts +11 -0
- package/dist/apollo-type-policies.js +64 -0
- package/dist/askAboutBridge-ByYsQams.js +106 -0
- package/dist/askQuestions-Cmx7VnMm.js +742 -0
- package/dist/assert-rules-lfYEMc99.js +318 -0
- package/dist/assistant.d.ts +94 -0
- package/dist/assistant.js +99 -0
- package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/basil.generated-BK-EHbwN.js +10 -0
- package/dist/browser-steps-DMpS5TyB.js +533 -0
- package/dist/builderTimings-pvGnK1m-.js +510 -0
- package/dist/button-DG7y_FVJ.js +48 -0
- package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
- package/dist/card-Bomy_1UG.js +44 -0
- package/dist/catalogGrid-BOrfMgi-.js +41 -0
- package/dist/channel-CPyQ1NR1.js +212 -0
- package/dist/chips-CvNrYJZa.js +27 -0
- package/dist/client-holder-C0M5Cfwl.js +68 -0
- package/dist/cn-QqidFIgr.js +10 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/code-editor-field-x_JrY8KR.js +113 -0
- package/dist/codec-client-DPuD6mw7.js +515 -0
- package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
- package/dist/config-DO68jw5k.js +322 -0
- package/dist/constants-DgbVc24O.d.ts +296 -0
- package/dist/constants-DlRnHBfQ.js +217 -0
- package/dist/convert-browser-action-pfecelF7.js +347 -0
- package/dist/convert-dialog-B_o22NiJ.js +382 -0
- package/dist/create-workflow-first-Azg3JUdX.js +120 -0
- package/dist/definition-canvas-Bsda-rDT.js +31 -0
- package/dist/dialog-BVd152GS.js +94 -0
- package/dist/durable-nodes-BXyYCLxT.js +91 -0
- package/dist/duration-CDb7-mT_.js +33 -0
- package/dist/edge-mapper-wEAdGVU2.js +4477 -0
- package/dist/element-library-DkSlg_VE.js +727 -0
- package/dist/entities-I_0kio3q.js +38 -0
- package/dist/error-advice-QLr5NCm7.js +65 -0
- package/dist/errors-ClKb5sEt.js +188 -0
- package/dist/executions.d.ts +3 -0
- package/dist/executions.js +5 -0
- package/dist/feature-flags-B2qetXKd.js +385 -0
- package/dist/field-label-DPZRmE_B.js +153 -0
- package/dist/firstWorkflow-C_h0KMB2.js +133 -0
- package/dist/flags.d.ts +3 -0
- package/dist/flags.js +4 -0
- package/dist/flow-builder-DIvLOhz0.js +28038 -0
- package/dist/flow-store-holder-CUN7Terz.js +52 -0
- package/dist/fluent.generated-CA_e6-4l.js +14 -0
- package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
- package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
- package/dist/global-client-BQPuFrFa.js +433 -0
- package/dist/global-operations-BG6YgxrM.js +136 -0
- package/dist/graphql-types-UTYtujY9.js +21358 -0
- package/dist/history.d.ts +3 -0
- package/dist/history.js +4 -0
- package/dist/index-AoJAa5vU.d.ts +164958 -0
- package/dist/index-DEMT3iAM.d.ts +120 -0
- package/dist/index-ROZzNGyY.d.ts +76 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +8123 -0
- package/dist/ion.generated-mbajjcAg.js +10 -0
- package/dist/label-Lzb8ZXf_.js +29 -0
- package/dist/labels-rXd9gYQz.js +1236 -0
- package/dist/liveCanvas-D5ytXDp8.js +103 -0
- package/dist/logos.generated-X6_0kjVR.js +21 -0
- package/dist/logs-panel-Cw0DkG0l.js +468 -0
- package/dist/lucide.generated-B6NVd3GT.js +29 -0
- package/dist/marksStore-a9oIMMot.js +175 -0
- package/dist/mcp-trigger-D0nRdvq5.js +307 -0
- package/dist/mdi.generated-D1BV74d6.js +292 -0
- package/dist/menus-CU3hDGYl.js +160 -0
- package/dist/mynaui.generated-DMWr5cXz.js +66 -0
- package/dist/navigation-v2.d.ts +3 -0
- package/dist/navigation-v2.js +5 -0
- package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
- package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
- package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/node-role-TMbnkmeP.js +132 -0
- package/dist/node-type-icon-BZa8n4iG.js +33 -0
- package/dist/nodes.d.ts +3 -0
- package/dist/nodes.js +4 -0
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +3 -0
- package/dist/observability.js +5 -0
- package/dist/offset-pages-zghoClB3.js +55 -0
- package/dist/operations-BBmT9ToP.js +663 -0
- package/dist/operations-WxRJWeqO.js +3133 -0
- package/dist/output-files-Ba8bu5lv.js +196 -0
- package/dist/page-operation-DrWuhd6Y.js +129 -0
- package/dist/page-twins.d.ts +13 -0
- package/dist/page-twins.js +186 -0
- package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
- package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
- package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
- package/dist/panels-PfBBAToE.js +346 -0
- package/dist/parts-B7fBcw-B.js +346 -0
- package/dist/popover-Dms9Vz3j.js +3389 -0
- package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
- package/dist/proactive.d.ts +66 -0
- package/dist/proactive.js +237 -0
- package/dist/quick-config-panel-DFd77xho.js +451 -0
- package/dist/quota-DeA_CJ2e.js +175 -0
- package/dist/quota.d.ts +3 -0
- package/dist/quota.js +4 -0
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/relative-time-Dxt8ZIIu.js +55 -0
- package/dist/results-CwK_yDxK.js +325 -0
- package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
- package/dist/route-data.d.ts +12 -0
- package/dist/route-data.js +69 -0
- package/dist/route-match-C-0_EnAt.d.ts +5 -0
- package/dist/route-match-DMkUICYV.js +41 -0
- package/dist/route-preload-C4DlGoCd.js +120 -0
- package/dist/run-display-UjLAoYqQ.js +81 -0
- package/dist/run-history-arGiHzGU.js +285 -0
- package/dist/run-list-links-DJn4Mf1T.js +98 -0
- package/dist/run-mode-USmM0-Uo.js +82 -0
- package/dist/run-parity-CWXqEJqM.js +144 -0
- package/dist/runsQuota-B6SyTbne.js +100 -0
- package/dist/runsQuota-DsniKiSg.d.ts +20 -0
- package/dist/safe-expression-Cw7-SCsm.js +1251 -0
- package/dist/save-status-store-C7nEYpfb.js +631 -0
- package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
- package/dist/schedule-rules-ggVKRkBH.js +358 -0
- package/dist/secrets-Re_wSiE3.js +153 -0
- package/dist/settings.d.ts +4 -0
- package/dist/settings.js +6 -0
- package/dist/shared-DAWGGMSM.js +177 -0
- package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
- package/dist/solar.generated-CGYuUQAC.js +10 -0
- package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
- package/dist/start-url-CT6Yz96K.js +24 -0
- package/dist/status-CessxGpm.js +55 -0
- package/dist/store-icon-OctYp5zP.js +155 -0
- package/dist/styles-WGmTnZ2n.js +26 -0
- package/dist/styles.css +139 -0
- package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
- package/dist/template-code-CzN6JWNV.js +191 -0
- package/dist/template-graph-DLF9dygU.js +20 -0
- package/dist/template-preview-DcIIKOOL.js +32 -0
- package/dist/template-price-CdUHZRMF.js +40 -0
- package/dist/templates.d.ts +3 -0
- package/dist/templates.js +5 -0
- package/dist/theme-provider-CntfC4_i.js +23 -0
- package/dist/transient-DgZfhDfN.js +57 -0
- package/dist/typed-calls-C5tO03wq.js +26 -0
- package/dist/ui-script-By74Guk3.js +1094 -0
- package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
- package/dist/ui-step-fix-8uM2_Hft.js +67 -0
- package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
- package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
- package/dist/ui-target-editor-D2JhB_lD.js +673 -0
- package/dist/uiMarkTools-CSznnO1i.js +1054 -0
- package/dist/upgradePrompt-BAFBKKW5.js +72 -0
- package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
- package/dist/use-browser-available-hj8wc3Kb.js +241 -0
- package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
- package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
- package/dist/use-mobile-BTqCUjzS.js +27 -0
- package/dist/use-sdk-query-C697xZVv.js +116 -0
- package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
- package/dist/useActionParam-B2tU2BlY.js +85 -0
- package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
- package/dist/useBrowserClients-3v95-gSh.js +103 -0
- package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
- package/dist/useConnections-DsgEJs05.js +439 -0
- package/dist/useDebouncedValue-BFekcv6n.js +18 -0
- package/dist/useDurableParity-8fnMZmBc.js +1787 -0
- package/dist/useEntityTags-D0spL6Ut.js +460 -0
- package/dist/useExecutions-2u5nGJJk.js +681 -0
- package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
- package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
- package/dist/useHumanRequests-zlYDp3l1.js +221 -0
- package/dist/useNavigationV2-C2WeqN7d.js +29 -0
- package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
- package/dist/useObservability-BRlQ0tOA.js +285 -0
- package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
- package/dist/useRunHistory-CXCMUPyf.js +2759 -0
- package/dist/useRunLive-D0JvVZT2.js +1060 -0
- package/dist/useRunnerList-Dbi59i1K.js +446 -0
- package/dist/useRunners-URUc5quU.js +173 -0
- package/dist/useRunsPage-DG656UCK.js +2709 -0
- package/dist/useVariables-BIelxcWr.js +463 -0
- package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
- package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
- package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
- package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
- package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
- package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
- package/dist/utils-fvBb5qOD.js +89 -0
- package/dist/webhook-deliveries-AvQujaZy.js +99 -0
- package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
- package/dist/workflow-builder.d.ts +3 -0
- package/dist/workflow-builder.js +8 -0
- package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
- package/dist/workflow-embed.d.ts +3 -0
- package/dist/workflow-embed.js +4 -0
- package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
- package/dist/workflow-host.d.ts +6 -0
- package/dist/workflow-host.js +11 -0
- package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
- package/dist/workflow-pages.d.ts +3 -0
- package/dist/workflow-pages.js +115 -0
- package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
- package/dist/workflow-preview.d.ts +65 -0
- package/dist/workflow-preview.js +4 -0
- package/dist/workflow-route.d.ts +33 -0
- package/dist/workflow-route.js +4 -0
- package/dist/workflow-save-state-D0l-DkLf.js +767 -0
- package/dist/workflow-transfer-CQnQC-ke.js +104 -0
- package/dist/workflowRouteData-BkfVOc-O.js +169 -0
- package/dist/workflows-list.d.ts +10 -0
- package/dist/workflows-list.js +5 -0
- package/package.json +320 -4
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createElement, useState } from "react";
|
|
3
|
+
import { lazyWithRetry } from "@burdenoff/fe-libs/shared/utils/lazyWithRetry";
|
|
4
|
+
|
|
5
|
+
// src/utils/preloadable-lazy.ts
|
|
6
|
+
/**
|
|
7
|
+
* Lazy components that render at once when their module has already loaded
|
|
8
|
+
* (BOFF-11944).
|
|
9
|
+
*
|
|
10
|
+
* `React.lazy` suspends on its first render even for a module that is already
|
|
11
|
+
* in memory: its factory returns a promise, and a promise answers only in a
|
|
12
|
+
* later microtask. The nearest Suspense boundary then commits its fallback,
|
|
13
|
+
* and React 19 holds the commit that reveals the content until 300 ms after
|
|
14
|
+
* the most recent fallback appeared (its Suspense throttle). That made a
|
|
15
|
+
* preloaded workflow page wait about 0.3 s on a cold builder load, and the
|
|
16
|
+
* builder's overlays (node editor, node detail view, share dialog) take about
|
|
17
|
+
* 0.5 s to open even when their chunk was cached (BOFF-11826).
|
|
18
|
+
*
|
|
19
|
+
* A {@link ModuleLoader} shares one load between every caller and remembers
|
|
20
|
+
* the component once loaded; {@link preloadedOrLazy} renders that component
|
|
21
|
+
* directly in an instance mounted after the load, and React.lazy's component
|
|
22
|
+
* (fe-libs `lazyWithRetry`, which retries a failed chunk) in one mounted
|
|
23
|
+
* before it. Which of the two is decided once per mount: switching a mounted
|
|
24
|
+
* instance would change the element type and remount it.
|
|
25
|
+
*/
|
|
26
|
+
function createModuleLoader(importComponent) {
|
|
27
|
+
let pending = null;
|
|
28
|
+
let component = null;
|
|
29
|
+
return {
|
|
30
|
+
loaded: () => component,
|
|
31
|
+
load: () => {
|
|
32
|
+
pending ??= importComponent().then((loaded) => {
|
|
33
|
+
component = loaded;
|
|
34
|
+
return { default: loaded };
|
|
35
|
+
}, (error) => {
|
|
36
|
+
pending = null;
|
|
37
|
+
throw error;
|
|
38
|
+
});
|
|
39
|
+
return pending;
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The component for a loader: the module's own component in an instance
|
|
45
|
+
* mounted after the load, React.lazy's in one mounted before it.
|
|
46
|
+
*/
|
|
47
|
+
function preloadedOrLazy(loader, name) {
|
|
48
|
+
const Lazy = lazyWithRetry(loader.load);
|
|
49
|
+
function PreloadedOrLazy(props) {
|
|
50
|
+
const [Loaded] = useState(() => loader.loaded());
|
|
51
|
+
return Loaded ? createElement(Loaded, props) : createElement(Lazy, props);
|
|
52
|
+
}
|
|
53
|
+
PreloadedOrLazy.displayName = name;
|
|
54
|
+
return PreloadedOrLazy;
|
|
55
|
+
}
|
|
56
|
+
/** A lazy component with a preload, for a module's named component. */
|
|
57
|
+
function preloadableLazy(importComponent, name) {
|
|
58
|
+
const loader = createModuleLoader(importComponent);
|
|
59
|
+
return {
|
|
60
|
+
Component: preloadedOrLazy(loader, name),
|
|
61
|
+
preload: () => loader.load().then(() => void 0, () => void 0)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { preloadableLazy as n, preloadedOrLazy as r, createModuleLoader as t };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
|
|
2
|
+
import { n as FluidGridsTranslationProvider, r as FluidGridsTranslationProviderProps } from "./TranslationBridge-Bd4aJKMs.js";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
import { ApolloClient } from "@apollo/client";
|
|
5
|
+
import { ProactiveActionHandler, ProactiveAnchor, SuggestionAnchorAdapter } from "@burdenoff/fe-libs/shared/proactive";
|
|
6
|
+
import { z } from "zod";
|
|
7
|
+
export declare const FLUIDGRIDS_PROACTIVE_ENTITY: {
|
|
8
|
+
readonly run: "workflow_run";
|
|
9
|
+
readonly workflow: "workflow";
|
|
10
|
+
readonly connection: "connection";
|
|
11
|
+
};
|
|
12
|
+
type FluidGridsProactiveEntityType = (typeof FLUIDGRIDS_PROACTIVE_ENTITY)[keyof typeof FLUIDGRIDS_PROACTIVE_ENTITY];
|
|
13
|
+
export declare const FLUIDGRIDS_PROACTIVE_ACTION: {
|
|
14
|
+
readonly reviewProposal: "review-proposal";
|
|
15
|
+
readonly proposeFix: "propose-fix";
|
|
16
|
+
readonly openConnection: "open-connection";
|
|
17
|
+
};
|
|
18
|
+
export declare function runSuggestAnchorProps(runId: string): Record<string, string>;
|
|
19
|
+
export declare function isFluidGridsProactiveRoute(path: string): boolean;
|
|
20
|
+
export declare function proactiveRunPath(runId: string): string;
|
|
21
|
+
export declare function proactiveWorkflowPath(workflowKey: string, version?: string): string;
|
|
22
|
+
export declare function proactiveConnectionPath(connectionId: string): string;
|
|
23
|
+
export declare const REVIEW_PROPOSAL_ARGS: z.ZodObject<{
|
|
24
|
+
proposalId: z.ZodString;
|
|
25
|
+
}, z.core.$strict>;
|
|
26
|
+
export declare const PROPOSE_FIX_ARGS: z.ZodObject<{
|
|
27
|
+
runId: z.ZodString;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
export declare const OPEN_CONNECTION_ARGS: z.ZodObject<{
|
|
30
|
+
connectionId: z.ZodString;
|
|
31
|
+
}, z.core.$strict>;
|
|
32
|
+
export declare class ProactiveNavigationRefusedError extends Error {
|
|
33
|
+
constructor(path: string);
|
|
34
|
+
}
|
|
35
|
+
export declare function createFluidGridsProactiveActions(): Readonly<Record<string, ProactiveActionHandler>>;
|
|
36
|
+
export declare function canvasResolvesAnchor(anchor: ProactiveAnchor): boolean;
|
|
37
|
+
export declare const fluidGridsWorkflowAnchorAdapter: SuggestionAnchorAdapter;
|
|
38
|
+
export declare const FLUIDGRIDS_PROACTIVE_ANCHOR_ADAPTERS: Readonly<Record<string, SuggestionAnchorAdapter>>;
|
|
39
|
+
type ProposalReviewRequest = {
|
|
40
|
+
kind: "review";
|
|
41
|
+
proposalId: string;
|
|
42
|
+
token: number;
|
|
43
|
+
} | {
|
|
44
|
+
kind: "runFix";
|
|
45
|
+
runId: string;
|
|
46
|
+
token: number;
|
|
47
|
+
};
|
|
48
|
+
type NewProposalReviewRequest = {
|
|
49
|
+
kind: "review";
|
|
50
|
+
proposalId: string;
|
|
51
|
+
} | {
|
|
52
|
+
kind: "runFix";
|
|
53
|
+
runId: string;
|
|
54
|
+
};
|
|
55
|
+
interface ProposalReviewState {
|
|
56
|
+
request: ProposalReviewRequest | null;
|
|
57
|
+
}
|
|
58
|
+
export declare const useProposalReviewStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ProposalReviewState>>;
|
|
59
|
+
export declare function requestProposalReview(input: NewProposalReviewRequest): void;
|
|
60
|
+
export declare function closeProposalReview(): void;
|
|
61
|
+
interface ProactiveProposalReviewProps {
|
|
62
|
+
client?: ApolloClient | null;
|
|
63
|
+
onOpenWorkflow: (workflowKey: string, version: string) => void;
|
|
64
|
+
}
|
|
65
|
+
export declare const ProactiveProposalReview: FC<ProactiveProposalReviewProps>;
|
|
66
|
+
export { type FluidGridsProactiveEntityType, FluidGridsTranslationProvider, type FluidGridsTranslationProviderProps, type NewProposalReviewRequest, type ProactiveProposalReviewProps, type ProposalReviewRequest };
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { n as FLUIDGRIDS_PROACTIVE_ENTITY, r as runSuggestAnchorProps, t as FLUIDGRIDS_PROACTIVE_ACTION } from "./entities-I_0kio3q.js";
|
|
3
|
+
import { n as useAgentMarksStore } from "./marksStore-a9oIMMot.js";
|
|
4
|
+
import { t as WorkflowProposalCard } from "./WorkflowProposalCard-BruukdeF.js";
|
|
5
|
+
import { n as FluidGridsTranslationProvider, r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
6
|
+
import { t as useWorkflowProposal } from "./useWorkflowProposal-BH0VdNMA.js";
|
|
7
|
+
import { useEffect } from "react";
|
|
8
|
+
import { create } from "zustand";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { toast } from "sonner";
|
|
11
|
+
import { ResponsiveDialog, ResponsiveDialogContent, ResponsiveDialogDescription, ResponsiveDialogHeader, ResponsiveDialogTitle } from "@burdenoff/fe-libs/ui";
|
|
12
|
+
import { defineProactiveAction } from "@burdenoff/fe-libs/shared/proactive";
|
|
13
|
+
import { z } from "zod";
|
|
14
|
+
|
|
15
|
+
// src/proactive/paths.ts
|
|
16
|
+
/**
|
|
17
|
+
* ★ BOFF-13166: the in-app paths a FluidGrids proactive suggestion may open,
|
|
18
|
+
* and the allowlist the shell gives `ProactiveProvider` as `isAllowedRoute`.
|
|
19
|
+
*
|
|
20
|
+
* The routes are microfe-workflows' (`/workflows/*`) and microfe-integrations'
|
|
21
|
+
* (`/integrations/*`). A path is allowed only when its every segment is a
|
|
22
|
+
* plain id: no query, no fragment, no encoded separators, so a suggestion can
|
|
23
|
+
* only ever open one of these pages, never an arbitrary one.
|
|
24
|
+
*/
|
|
25
|
+
/** One path segment: an id, a workflowKey slug or a version such as `v3`. */
|
|
26
|
+
const SEGMENT = "[A-Za-z0-9][A-Za-z0-9_.-]{0,127}";
|
|
27
|
+
const ALLOWED_ROUTES = [
|
|
28
|
+
new RegExp(`^/workflows/runs(?:/${SEGMENT})?$`),
|
|
29
|
+
new RegExp(`^/workflows/workflow/${SEGMENT}(?:/${SEGMENT})?$`),
|
|
30
|
+
/^\/workflows\/list$/,
|
|
31
|
+
/^\/workflows\/insights(?:\/errors)?$/,
|
|
32
|
+
new RegExp(`^/integrations/connections(?:/${SEGMENT})?$`)
|
|
33
|
+
];
|
|
34
|
+
/** May a proactive `navigate` action open this path in FluidGrids? */
|
|
35
|
+
function isFluidGridsProactiveRoute(path) {
|
|
36
|
+
return ALLOWED_ROUTES.some((route) => route.test(path));
|
|
37
|
+
}
|
|
38
|
+
/** A run's detail page. */
|
|
39
|
+
function proactiveRunPath(runId) {
|
|
40
|
+
return `/workflows/runs/${encodeURIComponent(runId)}`;
|
|
41
|
+
}
|
|
42
|
+
/** A workflow in the builder, at a version when one is given. */
|
|
43
|
+
function proactiveWorkflowPath(workflowKey, version) {
|
|
44
|
+
const base = `/workflows/workflow/${encodeURIComponent(workflowKey)}`;
|
|
45
|
+
return version ? `${base}/${encodeURIComponent(version)}` : base;
|
|
46
|
+
}
|
|
47
|
+
/** A connection's detail page, where the person reconnects it. */
|
|
48
|
+
function proactiveConnectionPath(connectionId) {
|
|
49
|
+
return `/integrations/connections/${encodeURIComponent(connectionId)}`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// src/proactive/proposalReviewStore.ts
|
|
53
|
+
const useProposalReviewStore = create()(() => ({ request: null }));
|
|
54
|
+
let token = 0;
|
|
55
|
+
/** Open the review dialog on a proposal, or on a fix to propose for a run. */
|
|
56
|
+
function requestProposalReview(input) {
|
|
57
|
+
token += 1;
|
|
58
|
+
useProposalReviewStore.setState({ request: {
|
|
59
|
+
...input,
|
|
60
|
+
token
|
|
61
|
+
} });
|
|
62
|
+
}
|
|
63
|
+
/** Close the review dialog. */
|
|
64
|
+
function closeProposalReview() {
|
|
65
|
+
useProposalReviewStore.setState({ request: null });
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// src/proactive/actions.ts
|
|
69
|
+
/**
|
|
70
|
+
* ★ BOFF-13166: the FluidGrids proactive action handlers, registered with the
|
|
71
|
+
* shell's `ProactiveProvider` (`actions`). Each one runs only from a person's
|
|
72
|
+
* click on a suggestion card, and its arguments were bound by the backend
|
|
73
|
+
* pack's detector, never by a model; the zod schema below rejects anything
|
|
74
|
+
* else, and an action whose arguments do not validate is not offered at all.
|
|
75
|
+
*
|
|
76
|
+
* - `review-proposal` `{ proposalId }`: opens an existing AI proposal (a
|
|
77
|
+
* run-failure triage cluster's or an optimisation suggestion's) in the same
|
|
78
|
+
* card the run page shows. Applying it creates a new DRAFT version only.
|
|
79
|
+
* - `propose-fix` `{ runId }`: asks the workflow service for a fix to a failed
|
|
80
|
+
* run (`proposeRunFix`, as the person), then shows it in that card once it is
|
|
81
|
+
* ready.
|
|
82
|
+
* - `open-connection` `{ connectionId }`: opens the connection's page, where
|
|
83
|
+
* it is reconnected.
|
|
84
|
+
*
|
|
85
|
+
* Nothing here grants anything: the proposal and the connection are read again
|
|
86
|
+
* through the API under the person's own session, and its `@rbac` decides.
|
|
87
|
+
*/
|
|
88
|
+
/** An id as the backend pack binds it (the same bounds fe-libs uses). */
|
|
89
|
+
const ID = z.string().trim().min(1).max(255).regex(/^[A-Za-z0-9][A-Za-z0-9_.-]*$/);
|
|
90
|
+
const REVIEW_PROPOSAL_ARGS = z.strictObject({ proposalId: ID });
|
|
91
|
+
const PROPOSE_FIX_ARGS = z.strictObject({ runId: ID });
|
|
92
|
+
const OPEN_CONNECTION_ARGS = z.strictObject({ connectionId: ID });
|
|
93
|
+
var ProactiveNavigationRefusedError = class extends Error {
|
|
94
|
+
constructor(path) {
|
|
95
|
+
super(`The page ${path} could not be opened.`);
|
|
96
|
+
this.name = "ProactiveNavigationRefusedError";
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
/** The FluidGrids handlers, by action type, for `ProactiveProvider`'s `actions`. */
|
|
100
|
+
function createFluidGridsProactiveActions() {
|
|
101
|
+
return {
|
|
102
|
+
[FLUIDGRIDS_PROACTIVE_ACTION.reviewProposal]: defineProactiveAction({
|
|
103
|
+
args: REVIEW_PROPOSAL_ARGS,
|
|
104
|
+
run: ({ proposalId }) => {
|
|
105
|
+
requestProposalReview({
|
|
106
|
+
kind: "review",
|
|
107
|
+
proposalId
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}),
|
|
111
|
+
[FLUIDGRIDS_PROACTIVE_ACTION.proposeFix]: defineProactiveAction({
|
|
112
|
+
args: PROPOSE_FIX_ARGS,
|
|
113
|
+
run: ({ runId }) => {
|
|
114
|
+
requestProposalReview({
|
|
115
|
+
kind: "runFix",
|
|
116
|
+
runId
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}),
|
|
120
|
+
[FLUIDGRIDS_PROACTIVE_ACTION.openConnection]: defineProactiveAction({
|
|
121
|
+
args: OPEN_CONNECTION_ARGS,
|
|
122
|
+
run: ({ connectionId }, context) => {
|
|
123
|
+
const path = proactiveConnectionPath(connectionId);
|
|
124
|
+
if (!context.navigate(path)) throw new ProactiveNavigationRefusedError(path);
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// src/proactive/workflowAnchorAdapter.ts
|
|
131
|
+
/** Is this anchor the saved workflow open on the canvas? */
|
|
132
|
+
function canvasResolvesAnchor(anchor) {
|
|
133
|
+
const canvas = useAgentMarksStore.getState().canvas;
|
|
134
|
+
return canvas !== null && anchor.entityType === FLUIDGRIDS_PROACTIVE_ENTITY.workflow && anchor.entityId === canvas.workflowKey;
|
|
135
|
+
}
|
|
136
|
+
const fluidGridsWorkflowAnchorAdapter = {
|
|
137
|
+
canResolve: canvasResolvesAnchor,
|
|
138
|
+
update: (suggestions, controls) => {
|
|
139
|
+
useAgentMarksStore.getState().actions.setCanvasSuggestions(suggestions, suggestions.length === 0 ? null : controls);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
/** The adapters to pass as `ProactiveProvider`'s `anchorAdapters`. */
|
|
143
|
+
const FLUIDGRIDS_PROACTIVE_ANCHOR_ADAPTERS = { [FLUIDGRIDS_PROACTIVE_ENTITY.workflow]: fluidGridsWorkflowAnchorAdapter };
|
|
144
|
+
|
|
145
|
+
// src/proactive/ProactiveProposalReview.tsx
|
|
146
|
+
/**
|
|
147
|
+
* ★ BOFF-13166: the review dialog behind the proactive `review-proposal` and
|
|
148
|
+
* `propose-fix` actions.
|
|
149
|
+
*
|
|
150
|
+
* The shell mounts one. When a suggestion's action puts a request in
|
|
151
|
+
* `proposalReviewStore`, the dialog opens on it and shows the same
|
|
152
|
+
* `WorkflowProposalCard` the run page shows (BOFF-3662):
|
|
153
|
+
*
|
|
154
|
+
* - `review`: the existing proposal is read, and polled while it is still
|
|
155
|
+
* PROCESSING;
|
|
156
|
+
* - `runFix`: `proposeRunFix` is called as the person, exactly as the run
|
|
157
|
+
* page's "Propose a fix" does, and the card appears once the proposal is
|
|
158
|
+
* ready.
|
|
159
|
+
*
|
|
160
|
+
* Apply creates a new DRAFT version and never activates anything; Reject and
|
|
161
|
+
* Cancel are the card's own. The workspace gateway's `@rbac` decides every one
|
|
162
|
+
* of these calls; a refusal is shown as the card's error.
|
|
163
|
+
*/
|
|
164
|
+
const ProactiveProposalReview = ({ client, onOpenWorkflow }) => {
|
|
165
|
+
const tr = useTr();
|
|
166
|
+
const request = useProposalReviewStore((state) => state.request);
|
|
167
|
+
const proposal = useWorkflowProposal({ client: client ?? null });
|
|
168
|
+
const { start, open, reset } = proposal;
|
|
169
|
+
const token = request?.token ?? null;
|
|
170
|
+
const kind = request?.kind ?? null;
|
|
171
|
+
const target = request === null ? null : request.kind === "review" ? request.proposalId : request.runId;
|
|
172
|
+
useEffect(() => {
|
|
173
|
+
if (token === null || kind === null || target === null) return;
|
|
174
|
+
if (kind === "review") open(target);
|
|
175
|
+
else start({
|
|
176
|
+
kind: "runFix",
|
|
177
|
+
runId: target
|
|
178
|
+
});
|
|
179
|
+
}, [
|
|
180
|
+
token,
|
|
181
|
+
kind,
|
|
182
|
+
target,
|
|
183
|
+
open,
|
|
184
|
+
start
|
|
185
|
+
]);
|
|
186
|
+
const close = () => {
|
|
187
|
+
closeProposalReview();
|
|
188
|
+
reset();
|
|
189
|
+
};
|
|
190
|
+
const apply = async () => {
|
|
191
|
+
const applied = await proposal.apply();
|
|
192
|
+
const appliedStatus = applied ? String(applied.status) : void 0;
|
|
193
|
+
if (appliedStatus === "APPLIED") toast.success(tr("fluidgrids.ai.runAssist.appliedToast", "Fix saved as draft {{version}}", { version: applied?.appliedVersion ?? "" }));
|
|
194
|
+
else if (appliedStatus === "STALE") toast.warning(tr("fluidgrids.ai.runAssist.staleToast", "The workflow changed since this run. Propose the fix again."));
|
|
195
|
+
};
|
|
196
|
+
const openWorkflow = (workflowKey, version) => {
|
|
197
|
+
close();
|
|
198
|
+
onOpenWorkflow(workflowKey, version);
|
|
199
|
+
};
|
|
200
|
+
return /* @__PURE__ */ jsx(ResponsiveDialog, {
|
|
201
|
+
open: request !== null,
|
|
202
|
+
onOpenChange: (next) => {
|
|
203
|
+
if (!next) close();
|
|
204
|
+
},
|
|
205
|
+
children: /* @__PURE__ */ jsxs(ResponsiveDialogContent, {
|
|
206
|
+
className: "max-h-[85vh] overflow-y-auto sm:max-w-2xl",
|
|
207
|
+
"data-agent": "deny",
|
|
208
|
+
"data-testid": "proactive-proposal-review",
|
|
209
|
+
children: [
|
|
210
|
+
/* @__PURE__ */ jsxs(ResponsiveDialogHeader, { children: [/* @__PURE__ */ jsx(ResponsiveDialogTitle, { children: kind === "runFix" ? tr("fluidgrids.proactive.review.fixTitle", "Proposed fix") : tr("fluidgrids.proactive.review.title", "Proposed change") }), /* @__PURE__ */ jsx(ResponsiveDialogDescription, { children: tr("fluidgrids.proactive.review.description", "Applying saves the change as a new draft version. Nothing runs until you activate it.") })] }),
|
|
211
|
+
proposal.isWorking && !proposal.proposal && /* @__PURE__ */ jsx("p", {
|
|
212
|
+
className: "text-sm text-text-secondary",
|
|
213
|
+
"data-testid": "proactive-proposal-working",
|
|
214
|
+
children: kind === "runFix" ? tr("fluidgrids.ai.runAssist.proposing", "Proposing…") : tr("fluidgrids.proactive.review.loading", "Loading…")
|
|
215
|
+
}),
|
|
216
|
+
proposal.error && /* @__PURE__ */ jsx("p", {
|
|
217
|
+
className: "text-sm text-[var(--color-status-error-text)]",
|
|
218
|
+
children: proposal.error
|
|
219
|
+
}),
|
|
220
|
+
proposal.timedOut && /* @__PURE__ */ jsx("p", {
|
|
221
|
+
className: "text-sm text-text-secondary",
|
|
222
|
+
children: tr("fluidgrids.ai.runAssist.timedOut", "The fix is taking longer than usual. Check back in a minute.")
|
|
223
|
+
}),
|
|
224
|
+
proposal.proposal && /* @__PURE__ */ jsx(WorkflowProposalCard, {
|
|
225
|
+
proposal: proposal.proposal,
|
|
226
|
+
isDeciding: proposal.isDeciding,
|
|
227
|
+
onOpenWorkflow: openWorkflow,
|
|
228
|
+
onApply: () => void apply(),
|
|
229
|
+
onReject: () => void proposal.reject(),
|
|
230
|
+
onCancel: () => void proposal.cancel()
|
|
231
|
+
})
|
|
232
|
+
]
|
|
233
|
+
})
|
|
234
|
+
});
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
export { FLUIDGRIDS_PROACTIVE_ACTION, FLUIDGRIDS_PROACTIVE_ANCHOR_ADAPTERS, FLUIDGRIDS_PROACTIVE_ENTITY, FluidGridsTranslationProvider, OPEN_CONNECTION_ARGS, PROPOSE_FIX_ARGS, ProactiveNavigationRefusedError, ProactiveProposalReview, REVIEW_PROPOSAL_ARGS, canvasResolvesAnchor, closeProposalReview, createFluidGridsProactiveActions, fluidGridsWorkflowAnchorAdapter, isFluidGridsProactiveRoute, proactiveConnectionPath, proactiveRunPath, proactiveWorkflowPath, requestProposalReview, runSuggestAnchorProps, useProposalReviewStore };
|