@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,742 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
3
|
+
import { t as Icon } from "./Icon-BtQ0HXLh.js";
|
|
4
|
+
import { i as readableNodeType } from "./run-display-UjLAoYqQ.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
// src/modules/executions/utils/signal-targets.ts
|
|
8
|
+
function isRecord$1(value) {
|
|
9
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
10
|
+
}
|
|
11
|
+
function str(value) {
|
|
12
|
+
return typeof value === "string" && value.trim() ? value : void 0;
|
|
13
|
+
}
|
|
14
|
+
/** `interface` of the exported function, else of the definition. */
|
|
15
|
+
function durableInterfaceOf(definitionJson, workflowFn) {
|
|
16
|
+
if (!isRecord$1(definitionJson)) return void 0;
|
|
17
|
+
const code = definitionJson.code;
|
|
18
|
+
if (isRecord$1(code) && isRecord$1(code.exports) && workflowFn) {
|
|
19
|
+
const workflows = code.exports.workflows;
|
|
20
|
+
if (isRecord$1(workflows)) {
|
|
21
|
+
const entry = workflows[workflowFn];
|
|
22
|
+
if (isRecord$1(entry) && isRecord$1(entry.interface)) return entry.interface;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return isRecord$1(definitionJson.interface) ? definitionJson.interface : void 0;
|
|
26
|
+
}
|
|
27
|
+
/** Declared signals of an `interface` block, sorted by name. */
|
|
28
|
+
function declaredSignals(iface) {
|
|
29
|
+
if (!iface) return {
|
|
30
|
+
targets: [],
|
|
31
|
+
openNames: false
|
|
32
|
+
};
|
|
33
|
+
const signals = isRecord$1(iface.signals) ? iface.signals : {};
|
|
34
|
+
return {
|
|
35
|
+
targets: Object.keys(signals).sort().map((name) => {
|
|
36
|
+
const entry = signals[name];
|
|
37
|
+
const payload = isRecord$1(entry) && isRecord$1(entry.payload) ? entry.payload : void 0;
|
|
38
|
+
return payload ? {
|
|
39
|
+
name,
|
|
40
|
+
payloadSchema: payload
|
|
41
|
+
} : { name };
|
|
42
|
+
}),
|
|
43
|
+
openNames: isRecord$1(iface.open) && iface.open.signals === true
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** Arguments of a definition node, from either the canonical or the builder field. */
|
|
47
|
+
function nodeStateArgs(node) {
|
|
48
|
+
if (!isRecord$1(node)) return void 0;
|
|
49
|
+
const root = isRecord$1(node.args) ? node.args : void 0;
|
|
50
|
+
if (root && isRecord$1(root.state)) return root.state;
|
|
51
|
+
const data = isRecord$1(node.data) ? node.data : void 0;
|
|
52
|
+
const mirror = data && isRecord$1(data.args) ? data.args : void 0;
|
|
53
|
+
return mirror && isRecord$1(mirror.state) ? mirror.state : void 0;
|
|
54
|
+
}
|
|
55
|
+
function definitionNodes(definitionJson) {
|
|
56
|
+
if (!isRecord$1(definitionJson) || !isRecord$1(definitionJson.data)) return [];
|
|
57
|
+
const nodes = definitionJson.data.nodes;
|
|
58
|
+
return Array.isArray(nodes) ? nodes : [];
|
|
59
|
+
}
|
|
60
|
+
/** The `wait-for-signal` nodes of a graph run that are parked now. */
|
|
61
|
+
function parkedSignalTargets(nodeStates, definitionJson) {
|
|
62
|
+
const nodes = definitionNodes(definitionJson);
|
|
63
|
+
const result = [];
|
|
64
|
+
const seen = /* @__PURE__ */ new Set();
|
|
65
|
+
for (const state of nodeStates) {
|
|
66
|
+
if (state.status !== "WAITING" || !isRecord$1(state.output)) continue;
|
|
67
|
+
if (state.output._waiting !== "signal") continue;
|
|
68
|
+
const name = str(state.output._signalName);
|
|
69
|
+
if (!name || seen.has(`${state.nodeId}:${name}`)) continue;
|
|
70
|
+
seen.add(`${state.nodeId}:${name}`);
|
|
71
|
+
const args = nodeStateArgs(nodes.find((candidate) => isRecord$1(candidate) && candidate.id === state.nodeId));
|
|
72
|
+
const schema = args && isRecord$1(args.payloadSchema) ? args.payloadSchema : void 0;
|
|
73
|
+
result.push(schema ? {
|
|
74
|
+
name,
|
|
75
|
+
payloadSchema: schema,
|
|
76
|
+
nodeId: state.nodeId
|
|
77
|
+
} : {
|
|
78
|
+
name,
|
|
79
|
+
nodeId: state.nodeId
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
return result;
|
|
83
|
+
}
|
|
84
|
+
/** Everything the run page's Signal button can send to this run. */
|
|
85
|
+
function runSignalTargets(run) {
|
|
86
|
+
if (!(run.status === "RUNNING" || run.status === "WAITING" || run.status === "PENDING")) return {
|
|
87
|
+
targets: [],
|
|
88
|
+
openNames: false
|
|
89
|
+
};
|
|
90
|
+
const definition = run.workflow?.definitionJson;
|
|
91
|
+
if (run.executionKind === "DURABLE_FN") return declaredSignals(durableInterfaceOf(definition, run.workflowFn));
|
|
92
|
+
return {
|
|
93
|
+
targets: parkedSignalTargets(run.nodeStates ?? [], definition),
|
|
94
|
+
openNames: false
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
/** True when the Signal button has something to send. */
|
|
98
|
+
function canSignalRun(targets) {
|
|
99
|
+
return targets.targets.length > 0 || targets.openNames;
|
|
100
|
+
}
|
|
101
|
+
function fieldOf(name, schema, required) {
|
|
102
|
+
if (!isRecord$1(schema)) return null;
|
|
103
|
+
const title = str(schema.title) ?? name;
|
|
104
|
+
const description = str(schema.description);
|
|
105
|
+
if (Array.isArray(schema.enum)) {
|
|
106
|
+
const choices = schema.enum.filter((value) => typeof value === "string");
|
|
107
|
+
if (choices.length !== schema.enum.length || !choices.length) return null;
|
|
108
|
+
return {
|
|
109
|
+
name,
|
|
110
|
+
kind: "enum",
|
|
111
|
+
title,
|
|
112
|
+
required,
|
|
113
|
+
choices,
|
|
114
|
+
description
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
const type = schema.type;
|
|
118
|
+
if (type === "string" || type === "number" || type === "integer" || type === "boolean") return {
|
|
119
|
+
name,
|
|
120
|
+
kind: type,
|
|
121
|
+
title,
|
|
122
|
+
required,
|
|
123
|
+
description
|
|
124
|
+
};
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
/** The fields of a flat object schema, or null when it needs raw JSON. */
|
|
128
|
+
function formFieldsOf(schema) {
|
|
129
|
+
if (!schema || schema.type !== "object" || !isRecord$1(schema.properties)) return null;
|
|
130
|
+
const required = new Set(Array.isArray(schema.required) ? schema.required.filter((value) => typeof value === "string") : []);
|
|
131
|
+
const fields = [];
|
|
132
|
+
for (const [name, property] of Object.entries(schema.properties)) {
|
|
133
|
+
const field = fieldOf(name, property, required.has(name));
|
|
134
|
+
if (!field) return null;
|
|
135
|
+
fields.push(field);
|
|
136
|
+
}
|
|
137
|
+
return fields.length ? fields : null;
|
|
138
|
+
}
|
|
139
|
+
const FIELD_PREFIX = "payload.";
|
|
140
|
+
/**
|
|
141
|
+
* An Adaptive Card form for a flat payload schema, or null when the schema is
|
|
142
|
+
* absent or has nested, array or untyped properties (raw JSON then).
|
|
143
|
+
*/
|
|
144
|
+
function signalPayloadCard(schema) {
|
|
145
|
+
const fields = formFieldsOf(schema);
|
|
146
|
+
if (!fields) return null;
|
|
147
|
+
return {
|
|
148
|
+
type: "AdaptiveCard",
|
|
149
|
+
version: "1.5",
|
|
150
|
+
body: fields.flatMap((field) => {
|
|
151
|
+
const common = {
|
|
152
|
+
id: `${FIELD_PREFIX}${field.name}`,
|
|
153
|
+
label: field.required ? `${field.title} *` : field.title,
|
|
154
|
+
isRequired: field.required
|
|
155
|
+
};
|
|
156
|
+
const input = field.kind === "boolean" ? {
|
|
157
|
+
...common,
|
|
158
|
+
type: "Input.Toggle",
|
|
159
|
+
title: field.title,
|
|
160
|
+
valueOn: "true",
|
|
161
|
+
valueOff: "false"
|
|
162
|
+
} : field.kind === "enum" ? {
|
|
163
|
+
...common,
|
|
164
|
+
type: "Input.ChoiceSet",
|
|
165
|
+
style: "compact",
|
|
166
|
+
choices: (field.choices ?? []).map((choice) => ({
|
|
167
|
+
title: choice,
|
|
168
|
+
value: choice
|
|
169
|
+
}))
|
|
170
|
+
} : field.kind === "number" || field.kind === "integer" ? {
|
|
171
|
+
...common,
|
|
172
|
+
type: "Input.Number"
|
|
173
|
+
} : {
|
|
174
|
+
...common,
|
|
175
|
+
type: "Input.Text"
|
|
176
|
+
};
|
|
177
|
+
return field.description ? [input, {
|
|
178
|
+
type: "TextBlock",
|
|
179
|
+
text: field.description,
|
|
180
|
+
isSubtle: true,
|
|
181
|
+
size: "Small",
|
|
182
|
+
wrap: true,
|
|
183
|
+
spacing: "None"
|
|
184
|
+
}] : [input];
|
|
185
|
+
})
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Turns the card's collected values into the payload object: numbers for
|
|
190
|
+
* number and integer fields, booleans for toggles, and optional fields left
|
|
191
|
+
* empty omitted. Returns an error message for a value that is not a number.
|
|
192
|
+
*/
|
|
193
|
+
function payloadFromCardValues(schema, values) {
|
|
194
|
+
const fields = formFieldsOf(schema) ?? [];
|
|
195
|
+
const payload = {};
|
|
196
|
+
for (const field of fields) {
|
|
197
|
+
const raw = values[`${FIELD_PREFIX}${field.name}`];
|
|
198
|
+
if (raw === void 0 || raw === null || raw === "") {
|
|
199
|
+
if (field.kind === "boolean") payload[field.name] = false;
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (field.kind === "boolean") payload[field.name] = raw === true || raw === "true";
|
|
203
|
+
else if (field.kind === "number" || field.kind === "integer") {
|
|
204
|
+
const value = typeof raw === "number" ? raw : Number(raw);
|
|
205
|
+
if (!Number.isFinite(value) || field.kind === "integer" && !Number.isInteger(value)) return { error: `${field.title}: enter a valid number` };
|
|
206
|
+
payload[field.name] = value;
|
|
207
|
+
} else payload[field.name] = String(raw);
|
|
208
|
+
}
|
|
209
|
+
return { payload };
|
|
210
|
+
}
|
|
211
|
+
/** Parses the raw JSON editor's text. Empty text is the `null` payload. */
|
|
212
|
+
function parseRawSignalPayload(text) {
|
|
213
|
+
if (!text.trim()) return { payload: null };
|
|
214
|
+
try {
|
|
215
|
+
return { payload: JSON.parse(text) };
|
|
216
|
+
} catch (err) {
|
|
217
|
+
return { error: err instanceof Error ? err.message : "The payload is not JSON" };
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
// src/modules/executions/components/TryCatchOutcomeBadge.tsx
|
|
222
|
+
const OUTCOME_STYLE = {
|
|
223
|
+
succeeded: {
|
|
224
|
+
icon: "mdi:check-circle-outline",
|
|
225
|
+
className: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)] border-[var(--color-status-success-border)]"
|
|
226
|
+
},
|
|
227
|
+
caught: {
|
|
228
|
+
icon: "mdi:shield-alert-outline",
|
|
229
|
+
className: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)] border-[var(--color-status-warning-border)]"
|
|
230
|
+
},
|
|
231
|
+
ignored: {
|
|
232
|
+
icon: "mdi:shield-off-outline",
|
|
233
|
+
className: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)] border-[var(--color-status-warning-border)]"
|
|
234
|
+
},
|
|
235
|
+
failed: {
|
|
236
|
+
icon: "mdi:alert-circle-outline",
|
|
237
|
+
className: "bg-[var(--color-status-error-bg-subtle)] text-[var(--color-status-error-text)] border-[var(--color-status-error-border)]"
|
|
238
|
+
},
|
|
239
|
+
running: {
|
|
240
|
+
icon: "mdi:loading",
|
|
241
|
+
className: "bg-[var(--color-status-info-bg-subtle)] text-[var(--color-status-info-text)] border-[var(--color-status-info-border)]"
|
|
242
|
+
},
|
|
243
|
+
abandoned: {
|
|
244
|
+
icon: "mdi:cancel",
|
|
245
|
+
className: "bg-muted text-text-muted border-border-default"
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
function TryCatchOutcomeBadge({ info, failingStepLabel, onJumpToStep, compact = false }) {
|
|
249
|
+
const tr = useTr();
|
|
250
|
+
const style = OUTCOME_STYLE[info.outcome];
|
|
251
|
+
const outcomeLabel = (() => {
|
|
252
|
+
switch (info.outcome) {
|
|
253
|
+
case "succeeded": return tr("fluidgrids.executions.tryCatch.outcomeSucceeded", "Succeeded");
|
|
254
|
+
case "caught": return tr("fluidgrids.executions.tryCatch.outcomeCaught", "Caught");
|
|
255
|
+
case "ignored": return tr("fluidgrids.executions.tryCatch.outcomeIgnored", "Ignored");
|
|
256
|
+
case "failed": return tr("fluidgrids.executions.tryCatch.outcomeFailed", "Failed");
|
|
257
|
+
case "running": return tr("fluidgrids.executions.tryCatch.outcomeRunning", "Running");
|
|
258
|
+
case "abandoned": return tr("fluidgrids.executions.tryCatch.outcomeAbandoned", "Abandoned");
|
|
259
|
+
}
|
|
260
|
+
})();
|
|
261
|
+
const attemptText = info.attempts === 1 ? tr("fluidgrids.executions.tryCatch.oneAttempt", "1 attempt") : tr("fluidgrids.executions.tryCatch.manyAttempts", "{{count}} attempts", { count: info.attempts });
|
|
262
|
+
const resolvedFailLabel = failingStepLabel || info.failingNodeLabel || info.failingNodeId;
|
|
263
|
+
const handleJump = (event) => {
|
|
264
|
+
event.stopPropagation();
|
|
265
|
+
if (info.failingNodeId && onJumpToStep) onJumpToStep(info.failingNodeId);
|
|
266
|
+
};
|
|
267
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
268
|
+
"data-testid": "try-catch-run-badges",
|
|
269
|
+
className: `flex flex-wrap items-center gap-1.5 ${compact ? "text-[11px]" : "text-xs"}`,
|
|
270
|
+
children: [
|
|
271
|
+
/* @__PURE__ */ jsxs("span", {
|
|
272
|
+
"data-testid": "try-catch-outcome-badge",
|
|
273
|
+
"data-outcome": info.outcome,
|
|
274
|
+
className: `inline-flex items-center gap-1 rounded-full border font-medium ${compact ? "px-1.5 py-0.5" : "px-2 py-0.5"} ${style.className}`,
|
|
275
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
276
|
+
icon: style.icon,
|
|
277
|
+
width: compact ? 11 : 13,
|
|
278
|
+
className: info.outcome === "running" ? "animate-spin" : void 0
|
|
279
|
+
}), /* @__PURE__ */ jsx("span", { children: outcomeLabel })]
|
|
280
|
+
}),
|
|
281
|
+
/* @__PURE__ */ jsx("span", {
|
|
282
|
+
"data-testid": "try-catch-attempts-badge",
|
|
283
|
+
className: `inline-flex items-center rounded-full border border-border-default bg-surface-sunken font-medium text-text-secondary ${compact ? "px-1.5 py-0.5" : "px-2 py-0.5"}`,
|
|
284
|
+
children: attemptText
|
|
285
|
+
}),
|
|
286
|
+
info.failingNodeId && onJumpToStep ? /* @__PURE__ */ jsxs("button", {
|
|
287
|
+
type: "button",
|
|
288
|
+
onClick: handleJump,
|
|
289
|
+
"data-testid": "try-catch-failing-step-link",
|
|
290
|
+
"data-failing-node-id": info.failingNodeId,
|
|
291
|
+
title: info.errorMessage ?? void 0,
|
|
292
|
+
className: "inline-flex items-center gap-1 rounded-full border border-border-default bg-surface px-2 py-0.5 font-medium text-text-primary underline decoration-border-strong underline-offset-2 hover:bg-surface-sunken",
|
|
293
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
294
|
+
icon: "mdi:arrow-top-right",
|
|
295
|
+
width: compact ? 11 : 13
|
|
296
|
+
}), /* @__PURE__ */ jsx("span", { children: tr("fluidgrids.executions.tryCatch.failingStepLink", "Failed at {{step}}", { step: resolvedFailLabel ?? info.failingNodeId }) })]
|
|
297
|
+
}) : info.failingNodeId ? /* @__PURE__ */ jsx("span", {
|
|
298
|
+
"data-testid": "try-catch-failing-step-text",
|
|
299
|
+
title: info.errorMessage ?? void 0,
|
|
300
|
+
className: "inline-flex items-center gap-1 text-text-secondary",
|
|
301
|
+
children: tr("fluidgrids.executions.tryCatch.failingStepLink", "Failed at {{step}}", { step: resolvedFailLabel ?? info.failingNodeId })
|
|
302
|
+
}) : null
|
|
303
|
+
]
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// src/modules/executions/utils/try-catch-run.ts
|
|
308
|
+
const TRY_CATCH_NODE_TYPE = "internal:try-catch";
|
|
309
|
+
function isRecord(value) {
|
|
310
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
311
|
+
}
|
|
312
|
+
function textOf(value) {
|
|
313
|
+
return typeof value === "string" && value.trim() !== "" ? value.trim() : null;
|
|
314
|
+
}
|
|
315
|
+
function isTryCatchNodeType(nodeType) {
|
|
316
|
+
if (!nodeType) return false;
|
|
317
|
+
const lower = nodeType.toLowerCase();
|
|
318
|
+
return lower === TRY_CATCH_NODE_TYPE || lower === "try-catch";
|
|
319
|
+
}
|
|
320
|
+
function parseOutput(raw) {
|
|
321
|
+
if (isRecord(raw)) return raw;
|
|
322
|
+
if (typeof raw === "string" && raw.trim() !== "") try {
|
|
323
|
+
const parsed = JSON.parse(raw);
|
|
324
|
+
return isRecord(parsed) ? parsed : null;
|
|
325
|
+
} catch {
|
|
326
|
+
return null;
|
|
327
|
+
}
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
function normalizeOutcome(rawStatus, nodeStatus) {
|
|
331
|
+
switch (rawStatus) {
|
|
332
|
+
case "succeeded": return "succeeded";
|
|
333
|
+
case "caught": return "caught";
|
|
334
|
+
case "ignored": return "ignored";
|
|
335
|
+
case "rethrown":
|
|
336
|
+
case "failed": return "failed";
|
|
337
|
+
case "running":
|
|
338
|
+
case "catching":
|
|
339
|
+
case "retrying": return "running";
|
|
340
|
+
case "abandoned": return "abandoned";
|
|
341
|
+
}
|
|
342
|
+
const upper = nodeStatus?.toUpperCase();
|
|
343
|
+
if (upper === "FAILED" || upper === "TIMEOUT") return "failed";
|
|
344
|
+
if (upper === "RUNNING") return "running";
|
|
345
|
+
if (upper === "COMPLETED") return "succeeded";
|
|
346
|
+
return null;
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Parse a Try / Catch node's run outcome, attempt count and failing step
|
|
350
|
+
* reference. Returns null for non-scope nodes or nodes without execution data.
|
|
351
|
+
*/
|
|
352
|
+
function extractTryCatchRunInfo(node) {
|
|
353
|
+
if (!isTryCatchNodeType(node.nodeType)) return null;
|
|
354
|
+
const output = parseOutput(node.output);
|
|
355
|
+
const frame = output && isRecord(output._scope) ? output._scope : null;
|
|
356
|
+
const outcome = normalizeOutcome(frame?.status ?? output?.status, node.status);
|
|
357
|
+
if (!outcome) return null;
|
|
358
|
+
const error = (frame && isRecord(frame.error) ? frame.error : null) ?? (output && isRecord(output.error) ? output.error : null);
|
|
359
|
+
const rawAttempts = (typeof output?.attempts === "number" ? output.attempts : void 0) ?? (typeof frame?.attempt === "number" ? frame.attempt : void 0) ?? (typeof error?.attempt === "number" ? error.attempt : void 0) ?? (typeof node.attemptCount === "number" && node.attemptCount > 0 ? node.attemptCount : 1);
|
|
360
|
+
return {
|
|
361
|
+
outcome,
|
|
362
|
+
attempts: Math.max(1, Math.round(rawAttempts)),
|
|
363
|
+
failingNodeId: textOf(error?.nodeId),
|
|
364
|
+
failingNodeLabel: textOf(error?.nodeLabel),
|
|
365
|
+
errorType: textOf(error?.type),
|
|
366
|
+
errorMessage: textOf(error?.message)
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
// src/builder/lib/use-browser.ts
|
|
371
|
+
/**
|
|
372
|
+
* The Use Browser node (`internal:use-browser`, RPA plan P1-11) as the builder
|
|
373
|
+
* sees it outside its step editor: the node type, its parameters, the desks
|
|
374
|
+
* it may run on, and the "Run on" kinds only this node may write.
|
|
375
|
+
*
|
|
376
|
+
* Nothing here loads `@burdenoff/ui-engine` at run time: the engine is loaded
|
|
377
|
+
* lazily with the step editor (`ndv/ui-script-editor`), so the builder's own
|
|
378
|
+
* chunks stay as small as before (see `src/tooling/check-builder-chunks.ts`).
|
|
379
|
+
*
|
|
380
|
+
* Node data (fluidgrids-specs `product/specs/rpa/contracts/README.md` section 3):
|
|
381
|
+
*
|
|
382
|
+
* args.state.script UI script v1 (an object, or its JSON text)
|
|
383
|
+
* args.state.inputs { <script input name>: <value or expression> }
|
|
384
|
+
* executionSettings.runOn { kind: "browser" } | { kind: "remoteBrowser" } |
|
|
385
|
+
* { kind: "cloud" } | absent (= cloud: "choose")
|
|
386
|
+
*/
|
|
387
|
+
const USE_BROWSER_NODE_TYPE = "internal:use-browser";
|
|
388
|
+
/** The parameter that holds the UI script. */
|
|
389
|
+
const USE_BROWSER_SCRIPT_PARAMETER = "script";
|
|
390
|
+
/** The parameter that maps the script's inputs to workflow values. */
|
|
391
|
+
const USE_BROWSER_INPUTS_PARAMETER = "inputs";
|
|
392
|
+
/** Whether a node is a Use Browser node. */
|
|
393
|
+
function isUseBrowserNodeType(nodeType) {
|
|
394
|
+
return nodeType === USE_BROWSER_NODE_TYPE;
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Whether the node's `inputs` setting is a fixed mapping the step editor can
|
|
398
|
+
* read and write: nothing yet, an object, or the JSON text of an object with
|
|
399
|
+
* no expression around it. Anything else (an expression such as
|
|
400
|
+
* `{{ $json.scriptInputs }}`) is left to the generic field.
|
|
401
|
+
*/
|
|
402
|
+
function isInputsMappingValue(value) {
|
|
403
|
+
if (value === void 0 || value === null || value === "") return true;
|
|
404
|
+
if (typeof value === "string") try {
|
|
405
|
+
const parsed = JSON.parse(value);
|
|
406
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed);
|
|
407
|
+
} catch {
|
|
408
|
+
return false;
|
|
409
|
+
}
|
|
410
|
+
return typeof value === "object" && !Array.isArray(value);
|
|
411
|
+
}
|
|
412
|
+
/** The desks of Settings > Run on that a manifest may list (spec contracts §4). */
|
|
413
|
+
const USE_BROWSER_DESKS = ["browser", "remoteBrowser"];
|
|
414
|
+
/**
|
|
415
|
+
* The desks a node manifest lists (`desks`, set by wspace-workflow-svc for Use
|
|
416
|
+
* Browser only). Unknown entries are dropped; a manifest without the field
|
|
417
|
+
* offers the paired browser, the one desk every Use Browser manifest has.
|
|
418
|
+
*/
|
|
419
|
+
function manifestDesks(manifest) {
|
|
420
|
+
const desks = typeof manifest === "object" && manifest !== null && !Array.isArray(manifest) ? manifest.desks : void 0;
|
|
421
|
+
if (!Array.isArray(desks)) return ["browser"];
|
|
422
|
+
const known = USE_BROWSER_DESKS.filter((desk) => desks.includes(desk));
|
|
423
|
+
return known.length > 0 ? known : ["browser"];
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* The run-on kinds a node type may hold (the workers and the service refuse
|
|
427
|
+
* the rest): only Use Browser takes the desks, and Use Browser never takes a
|
|
428
|
+
* runner.
|
|
429
|
+
*/
|
|
430
|
+
function runOnKindAllowed(nodeType, kind) {
|
|
431
|
+
if (isUseBrowserNodeType(nodeType)) return kind !== "runner";
|
|
432
|
+
return kind === "runner";
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
// src/builder/lib/sensitive-params.ts
|
|
436
|
+
/**
|
|
437
|
+
* Which step settings hold a secret, so no agent tool sets them and nothing the
|
|
438
|
+
* assistant is told about a step carries their value.
|
|
439
|
+
*
|
|
440
|
+
* Two signals, either is enough: the manifest marks the field `secret` (the
|
|
441
|
+
* panel masks it), or its type or name reads like a credential. The name rule is
|
|
442
|
+
* deliberately broad; a false positive only hides a value.
|
|
443
|
+
*/
|
|
444
|
+
const SENSITIVE_PARAM = /pass(word)?|secret|token|api[-_]?key|private[-_]?key|credential|connection/i;
|
|
445
|
+
function isSensitiveParam(param) {
|
|
446
|
+
return param.secret === true || SENSITIVE_PARAM.test(`${param.type} ${param.name}`);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
// src/askAbout/describeAskables.ts
|
|
450
|
+
/**
|
|
451
|
+
* ★ BOFF-11897 "Ask AI about this": what the assistant is told about the
|
|
452
|
+
* FluidGrids thing a person picked. Pure functions of what the page already
|
|
453
|
+
* shows, so they are cheap to call at the moment of the right-click, and
|
|
454
|
+
* unit-tested on their own.
|
|
455
|
+
*
|
|
456
|
+
* ★★ Order matters. fe-libs keeps the note within a budget and drops facts
|
|
457
|
+
* from the END when it is full, so the facts that answer "why is this not
|
|
458
|
+
* working?" come first and the plain settings come last.
|
|
459
|
+
*
|
|
460
|
+
* ★★ Secret settings never travel. A setting the manifest marks `secret`, or
|
|
461
|
+
* whose type or name reads like a credential (`isSensitiveParam`), is named
|
|
462
|
+
* with its value hidden. Connections are named by their app only: the
|
|
463
|
+
* connection itself is a reference the person picked, never a value.
|
|
464
|
+
*/
|
|
465
|
+
/** How a hidden value reads. */
|
|
466
|
+
const HIDDEN_VALUE = "(hidden: secret)";
|
|
467
|
+
/** At most this many settings are listed; they come after everything else. */
|
|
468
|
+
const MAX_SETTINGS_LISTED = 8;
|
|
469
|
+
const SETTING_VALUE_CHARS = 200;
|
|
470
|
+
function valueText(value) {
|
|
471
|
+
if (value === null || value === void 0) return "";
|
|
472
|
+
if (typeof value === "string") return value.trim();
|
|
473
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
474
|
+
try {
|
|
475
|
+
const json = JSON.stringify(value);
|
|
476
|
+
return json === void 0 || json === "{}" || json === "[]" ? "" : json;
|
|
477
|
+
} catch {
|
|
478
|
+
return "";
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
function cut(text, max) {
|
|
482
|
+
return text.length > max ? `${text.slice(0, max - 1)}…` : text;
|
|
483
|
+
}
|
|
484
|
+
const RUN_STATUS_TEXT = {
|
|
485
|
+
idle: "",
|
|
486
|
+
running: "running",
|
|
487
|
+
success: "succeeded",
|
|
488
|
+
error: "failed"
|
|
489
|
+
};
|
|
490
|
+
/** A step on the workflow canvas. */
|
|
491
|
+
function describeCanvasStep(step) {
|
|
492
|
+
const name = step.label?.trim() || step.appName;
|
|
493
|
+
const facts = [];
|
|
494
|
+
facts.push({
|
|
495
|
+
label: "Type",
|
|
496
|
+
value: step.type && step.type !== step.appName ? `${step.appName} (${step.type})` : step.appName
|
|
497
|
+
});
|
|
498
|
+
if (step.operation) facts.push({
|
|
499
|
+
label: "Operation",
|
|
500
|
+
value: step.operation
|
|
501
|
+
});
|
|
502
|
+
if (step.trigger) facts.push({
|
|
503
|
+
label: "Role",
|
|
504
|
+
value: "trigger (starts the workflow)"
|
|
505
|
+
});
|
|
506
|
+
if (step.disabled) facts.push({
|
|
507
|
+
label: "Disabled",
|
|
508
|
+
value: "yes (skipped when the workflow runs)"
|
|
509
|
+
});
|
|
510
|
+
if (step.missingSettings && step.missingSettings.length > 0) facts.push({
|
|
511
|
+
label: "Required settings still empty",
|
|
512
|
+
value: step.missingSettings.join(", ")
|
|
513
|
+
});
|
|
514
|
+
if (step.missingConnection) facts.push({
|
|
515
|
+
label: "Connection",
|
|
516
|
+
value: "a required connection is not picked yet"
|
|
517
|
+
});
|
|
518
|
+
const run = step.runStatus ? RUN_STATUS_TEXT[step.runStatus] : "";
|
|
519
|
+
if (run) facts.push({
|
|
520
|
+
label: "Last test run on this canvas",
|
|
521
|
+
value: run
|
|
522
|
+
});
|
|
523
|
+
if (step.runError?.trim()) facts.push({
|
|
524
|
+
label: "Last run error",
|
|
525
|
+
value: step.runError.trim()
|
|
526
|
+
});
|
|
527
|
+
const failed = step.latestFailedRun;
|
|
528
|
+
if (failed?.errorMessage?.trim()) facts.push({
|
|
529
|
+
label: "Workflow's latest failed run",
|
|
530
|
+
value: [
|
|
531
|
+
failed.at ? `${failed.at}:` : "",
|
|
532
|
+
failed.errorType?.trim() ? `${failed.errorType.trim()}:` : "",
|
|
533
|
+
failed.errorMessage.trim(),
|
|
534
|
+
`(run ${failed.runId})`
|
|
535
|
+
].filter(Boolean).join(" ")
|
|
536
|
+
});
|
|
537
|
+
if (step.connections && step.connections.length > 0) facts.push({
|
|
538
|
+
label: "Connections picked",
|
|
539
|
+
value: step.connections.join(", ")
|
|
540
|
+
});
|
|
541
|
+
let listed = 0;
|
|
542
|
+
for (const setting of step.settings ?? []) {
|
|
543
|
+
if (listed >= 8) break;
|
|
544
|
+
const text = valueText(setting.value);
|
|
545
|
+
if (!text) continue;
|
|
546
|
+
facts.push({
|
|
547
|
+
label: `Setting ${setting.label?.trim() || setting.name}`,
|
|
548
|
+
value: isSensitiveParam(setting) ? HIDDEN_VALUE : cut(text, SETTING_VALUE_CHARS)
|
|
549
|
+
});
|
|
550
|
+
listed += 1;
|
|
551
|
+
}
|
|
552
|
+
return {
|
|
553
|
+
kind: "workflow step",
|
|
554
|
+
label: name,
|
|
555
|
+
id: step.id,
|
|
556
|
+
facts,
|
|
557
|
+
pointBack: {
|
|
558
|
+
tool: "fg_canvas_focus_node",
|
|
559
|
+
args: { node: step.id }
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
function record(value) {
|
|
564
|
+
return typeof value === "object" && value !== null && !Array.isArray(value) ? value : void 0;
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* The facts `describeCanvasStep` reads, from the builder's own state. The name
|
|
568
|
+
* is the registry's title, or, when the type is not in the registry (an
|
|
569
|
+
* uninstalled store node, or a catalogue still loading), the node's saved
|
|
570
|
+
* manifest name, else the type read as a name (`internal:code` → "Code").
|
|
571
|
+
*/
|
|
572
|
+
function canvasStepFactsOf(step) {
|
|
573
|
+
const data = step.data ?? {};
|
|
574
|
+
const savedName = record(data.nodeData)?.name;
|
|
575
|
+
const appName = (Boolean(step.type) && step.registryTitle === step.type ? typeof savedName === "string" && savedName.trim() ? savedName : readableNodeType(step.registryTitle) : step.registryTitle) || step.id;
|
|
576
|
+
const connections = record(data.args)?.connections;
|
|
577
|
+
const runError = [...step.execution.logs].reverse().find((log) => log.nodeId === step.id && log.status === "failed")?.error ?? null;
|
|
578
|
+
return {
|
|
579
|
+
id: step.id,
|
|
580
|
+
...typeof data.label === "string" ? { label: data.label } : {},
|
|
581
|
+
appName,
|
|
582
|
+
...step.type ? { type: step.type } : {},
|
|
583
|
+
...typeof data.operation_name === "string" ? { operation: data.operation_name } : {},
|
|
584
|
+
disabled: data.disabled === true,
|
|
585
|
+
trigger: step.trigger,
|
|
586
|
+
missingSettings: step.missingSettings,
|
|
587
|
+
missingConnection: step.missingConnection,
|
|
588
|
+
connections: Array.isArray(connections) ? connections.flatMap((entry) => {
|
|
589
|
+
const adapter = record(entry)?.adapter;
|
|
590
|
+
return typeof adapter === "string" ? [adapter] : [];
|
|
591
|
+
}) : [],
|
|
592
|
+
settings: step.params.map((param) => ({
|
|
593
|
+
name: param.name,
|
|
594
|
+
type: param.type,
|
|
595
|
+
...param.label ? { label: param.label } : {},
|
|
596
|
+
...param.secret ? { secret: true } : {},
|
|
597
|
+
value: step.state[param.name]
|
|
598
|
+
})),
|
|
599
|
+
...step.execution.nodeStatuses[step.id] ? { runStatus: step.execution.nodeStatuses[step.id] } : {},
|
|
600
|
+
runError,
|
|
601
|
+
...step.latestFailedRun ? { latestFailedRun: step.latestFailedRun } : {}
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function runFacts(run) {
|
|
605
|
+
const facts = [{
|
|
606
|
+
label: "Run",
|
|
607
|
+
value: run.runId
|
|
608
|
+
}, {
|
|
609
|
+
label: "Run status",
|
|
610
|
+
value: run.status
|
|
611
|
+
}];
|
|
612
|
+
if (run.workflowKey) {
|
|
613
|
+
const key = run.version !== void 0 ? `${run.workflowKey} v${run.version}` : run.workflowKey;
|
|
614
|
+
facts.push({
|
|
615
|
+
label: "Workflow",
|
|
616
|
+
value: run.workflowName?.trim() ? `${run.workflowName.trim()} (${key})` : key
|
|
617
|
+
});
|
|
618
|
+
}
|
|
619
|
+
return facts;
|
|
620
|
+
}
|
|
621
|
+
/** One step of a run, on the run's page. */
|
|
622
|
+
function describeRunStep(step) {
|
|
623
|
+
const facts = [{
|
|
624
|
+
label: "Step status",
|
|
625
|
+
value: step.status
|
|
626
|
+
}];
|
|
627
|
+
if (step.errorType?.trim()) facts.push({
|
|
628
|
+
label: "Error type",
|
|
629
|
+
value: step.errorType.trim()
|
|
630
|
+
});
|
|
631
|
+
if (step.error?.trim()) facts.push({
|
|
632
|
+
label: "Error",
|
|
633
|
+
value: step.error.trim()
|
|
634
|
+
});
|
|
635
|
+
if (step.stepType) facts.push({
|
|
636
|
+
label: "Step type",
|
|
637
|
+
value: step.stepVersion ? `${step.stepType} v${step.stepVersion}` : step.stepType
|
|
638
|
+
});
|
|
639
|
+
facts.push(...runFacts(step.run));
|
|
640
|
+
return {
|
|
641
|
+
kind: "run step",
|
|
642
|
+
label: step.stepName,
|
|
643
|
+
id: step.stepId,
|
|
644
|
+
facts,
|
|
645
|
+
pointBack: {
|
|
646
|
+
tool: "fg_ui_point_at",
|
|
647
|
+
args: {
|
|
648
|
+
name: step.stepName,
|
|
649
|
+
role: "button"
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
/** The error a whole run ended with, on the run's page. */
|
|
655
|
+
function describeRunError(run) {
|
|
656
|
+
const facts = [];
|
|
657
|
+
const stoppedAt = run.stoppedAt?.trim();
|
|
658
|
+
if (stoppedAt) facts.push({
|
|
659
|
+
label: "Stopped at step",
|
|
660
|
+
value: stoppedAt
|
|
661
|
+
});
|
|
662
|
+
if (run.errorType?.trim()) facts.push({
|
|
663
|
+
label: "Error type",
|
|
664
|
+
value: run.errorType.trim()
|
|
665
|
+
});
|
|
666
|
+
if (run.errorMessage?.trim()) facts.push({
|
|
667
|
+
label: "Error",
|
|
668
|
+
value: run.errorMessage.trim()
|
|
669
|
+
});
|
|
670
|
+
if (run.failedSteps !== void 0 && run.failedSteps > 0) facts.push({
|
|
671
|
+
label: "Failed steps",
|
|
672
|
+
value: String(run.failedSteps)
|
|
673
|
+
});
|
|
674
|
+
facts.push(...runFacts(run));
|
|
675
|
+
return {
|
|
676
|
+
kind: "run error",
|
|
677
|
+
label: stoppedAt ? `Run error at ${stoppedAt}` : "Run error",
|
|
678
|
+
id: run.runId,
|
|
679
|
+
facts
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
/**
|
|
683
|
+
* ★ BOFF-13267: the run as a whole (its title and summary on the run's page):
|
|
684
|
+
* its error when it failed, otherwise what it is and how it went.
|
|
685
|
+
*/
|
|
686
|
+
function describeRun(run) {
|
|
687
|
+
if (run.errorMessage?.trim() || run.stoppedAt?.trim()) return describeRunError(run);
|
|
688
|
+
return {
|
|
689
|
+
kind: "run",
|
|
690
|
+
label: run.workflowName?.trim() || "This run",
|
|
691
|
+
id: run.runId,
|
|
692
|
+
facts: runFacts(run)
|
|
693
|
+
};
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
// src/askAbout/askQuestions.ts
|
|
697
|
+
/**
|
|
698
|
+
* ★ BOFF-13381: the questions offered under the chip when a person picks
|
|
699
|
+
* something to ask the assistant about. They start a question in the person's
|
|
700
|
+
* own words: choosing one only fills the message box. A few, short, and about
|
|
701
|
+
* what the thing is showing (a failed step is asked why it failed).
|
|
702
|
+
*/
|
|
703
|
+
/** A step on the canvas: what it does, why it is not ready, why it failed. */
|
|
704
|
+
function canvasStepQuestions(tr, step) {
|
|
705
|
+
const failed = step.runStatus === "error" || Boolean(step.latestFailedRun?.errorMessage?.trim());
|
|
706
|
+
const notReady = (step.missingSettings?.length ?? 0) > 0 || step.missingConnection === true;
|
|
707
|
+
return [
|
|
708
|
+
...failed ? [tr("fluidgrids.askAbout.questions.stepFailed", "Why did this step fail?")] : [],
|
|
709
|
+
...notReady ? [tr("fluidgrids.askAbout.questions.stepNotReady", "What is this step still missing?")] : [],
|
|
710
|
+
tr("fluidgrids.askAbout.questions.stepWhat", "What does this step do?"),
|
|
711
|
+
tr("fluidgrids.askAbout.questions.stepImprove", "How can I make this step better?")
|
|
712
|
+
].slice(0, 3);
|
|
713
|
+
}
|
|
714
|
+
/** A run's error, or a step of a run that failed: why, and how to fix it. */
|
|
715
|
+
function failureQuestions(tr) {
|
|
716
|
+
return [
|
|
717
|
+
tr("fluidgrids.askAbout.questions.whyFailed", "Why did this fail?"),
|
|
718
|
+
tr("fluidgrids.askAbout.questions.howFix", "How do I fix this?"),
|
|
719
|
+
tr("fluidgrids.askAbout.questions.preventAgain", "How do I stop this from happening again?")
|
|
720
|
+
];
|
|
721
|
+
}
|
|
722
|
+
/** A step of a run that did not fail. */
|
|
723
|
+
function runStepQuestions(tr) {
|
|
724
|
+
return [tr("fluidgrids.askAbout.questions.runStepWhat", "What did this step do in this run?"), tr("fluidgrids.askAbout.questions.runStepOutput", "What did this step pass on to the next one?")];
|
|
725
|
+
}
|
|
726
|
+
/** A whole run that did not fail. */
|
|
727
|
+
function runQuestions(tr) {
|
|
728
|
+
return [tr("fluidgrids.askAbout.questions.runWhat", "What happened in this run?"), tr("fluidgrids.askAbout.questions.runFaster", "How can I make this workflow faster?")];
|
|
729
|
+
}
|
|
730
|
+
/** The status words a run or run step fails with. */
|
|
731
|
+
function isFailedStatus(status) {
|
|
732
|
+
return /^(FAILED|ERROR|TIMED_OUT|TERMINATED)$/i.test(status?.trim() ?? "");
|
|
733
|
+
}
|
|
734
|
+
/** A canvas step as the assistant is told about it, with its questions. */
|
|
735
|
+
function askAboutCanvasStep(tr, step) {
|
|
736
|
+
return {
|
|
737
|
+
...describeCanvasStep(step),
|
|
738
|
+
suggestions: canvasStepQuestions(tr, step)
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
export { durableInterfaceOf as C, signalPayloadCard as D, runSignalTargets as E, declaredSignals as S, payloadFromCardValues as T, runOnKindAllowed as _, runStepQuestions as a, TryCatchOutcomeBadge as b, describeRunError as c, USE_BROWSER_INPUTS_PARAMETER as d, USE_BROWSER_NODE_TYPE as f, manifestDesks as g, isUseBrowserNodeType as h, runQuestions as i, describeRunStep as l, isInputsMappingValue as m, failureQuestions as n, canvasStepFactsOf as o, USE_BROWSER_SCRIPT_PARAMETER as p, isFailedStatus as r, describeRun as s, askAboutCanvasStep as t, SENSITIVE_PARAM as u, extractTryCatchRunInfo as v, parseRawSignalPayload as w, canSignalRun as x, isTryCatchNodeType as y };
|