@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.
- 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,318 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { VU as WorkflowTestAssertionOperator } from "./graphql-types-UTYtujY9.js";
|
|
3
|
+
|
|
4
|
+
// src/builder/lib/assert-rules.ts
|
|
5
|
+
/** Every operator, in the order the editors offer them. */
|
|
6
|
+
const ASSERT_OPERATORS = [
|
|
7
|
+
{
|
|
8
|
+
wire: "equals",
|
|
9
|
+
value: "EQUALS",
|
|
10
|
+
operand: "expected",
|
|
11
|
+
label: "equals"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
wire: "notEquals",
|
|
15
|
+
value: "NOT_EQUALS",
|
|
16
|
+
operand: "expected",
|
|
17
|
+
label: "does not equal"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
wire: "contains",
|
|
21
|
+
value: "CONTAINS",
|
|
22
|
+
operand: "expected",
|
|
23
|
+
label: "contains"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
wire: "notContains",
|
|
27
|
+
value: "NOT_CONTAINS",
|
|
28
|
+
operand: "expected",
|
|
29
|
+
label: "does not contain"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
wire: "matches",
|
|
33
|
+
value: "MATCHES",
|
|
34
|
+
operand: "expected",
|
|
35
|
+
label: "matches regex"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
wire: "jsonSchema",
|
|
39
|
+
value: "JSON_SCHEMA",
|
|
40
|
+
operand: "expected",
|
|
41
|
+
label: "matches JSON Schema"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
wire: "between",
|
|
45
|
+
value: "BETWEEN",
|
|
46
|
+
operand: "range",
|
|
47
|
+
label: "is between"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
wire: "itemCount",
|
|
51
|
+
value: "ITEM_COUNT",
|
|
52
|
+
operand: "range",
|
|
53
|
+
label: "has item count"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
wire: "exists",
|
|
57
|
+
value: "EXISTS",
|
|
58
|
+
operand: "none",
|
|
59
|
+
label: "exists"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
wire: "notExists",
|
|
63
|
+
value: "NOT_EXISTS",
|
|
64
|
+
operand: "none",
|
|
65
|
+
label: "does not exist"
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
/** The service's cap on a `matches` pattern. */
|
|
69
|
+
const MAX_REGEX_LENGTH = 500;
|
|
70
|
+
/** Rules per node (Assert node or test-case expectation). */
|
|
71
|
+
const MAX_RULES = 50;
|
|
72
|
+
/**
|
|
73
|
+
* The spec of an operator given in either spelling (`itemCount`,
|
|
74
|
+
* `ITEM_COUNT`), or null when it is not one.
|
|
75
|
+
*/
|
|
76
|
+
function operatorSpec(value) {
|
|
77
|
+
if (typeof value !== "string") return null;
|
|
78
|
+
return ASSERT_OPERATORS.find((spec) => spec.wire === value || spec.value === value) ?? null;
|
|
79
|
+
}
|
|
80
|
+
function isRecord(value) {
|
|
81
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
82
|
+
}
|
|
83
|
+
function optionalNumber(value) {
|
|
84
|
+
if (value === void 0 || value === null) return void 0;
|
|
85
|
+
return typeof value === "number" && Number.isFinite(value) ? value : false;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Checks one rule and normalises it to the wire form, or reports the first
|
|
89
|
+
* problem. `index` is the rule's position, for the message.
|
|
90
|
+
*/
|
|
91
|
+
function normaliseAssertRule(raw, index) {
|
|
92
|
+
if (!isRecord(raw)) return { problem: {
|
|
93
|
+
code: "notObject",
|
|
94
|
+
index
|
|
95
|
+
} };
|
|
96
|
+
const spec = operatorSpec(raw.operator);
|
|
97
|
+
if (!spec) return { problem: {
|
|
98
|
+
code: "unknownOperator",
|
|
99
|
+
index,
|
|
100
|
+
operator: String(raw.operator ?? "")
|
|
101
|
+
} };
|
|
102
|
+
const rule = { operator: spec.wire };
|
|
103
|
+
if (raw.path !== void 0 && raw.path !== null && raw.path !== "") {
|
|
104
|
+
if (typeof raw.path !== "string") return { problem: {
|
|
105
|
+
code: "pathInvalid",
|
|
106
|
+
index
|
|
107
|
+
} };
|
|
108
|
+
rule.path = raw.path;
|
|
109
|
+
}
|
|
110
|
+
if (raw.message !== void 0 && raw.message !== null && raw.message !== "") {
|
|
111
|
+
if (typeof raw.message !== "string") return { problem: {
|
|
112
|
+
code: "messageInvalid",
|
|
113
|
+
index
|
|
114
|
+
} };
|
|
115
|
+
rule.message = raw.message;
|
|
116
|
+
}
|
|
117
|
+
if (spec.operand === "expected") {
|
|
118
|
+
if (!("expected" in raw)) return { problem: {
|
|
119
|
+
code: "expectedRequired",
|
|
120
|
+
index
|
|
121
|
+
} };
|
|
122
|
+
if (spec.wire === "matches") {
|
|
123
|
+
if (typeof raw.expected !== "string") return { problem: {
|
|
124
|
+
code: "regexInvalid",
|
|
125
|
+
index
|
|
126
|
+
} };
|
|
127
|
+
if (raw.expected.length > 500) return { problem: {
|
|
128
|
+
code: "regexTooLong",
|
|
129
|
+
index
|
|
130
|
+
} };
|
|
131
|
+
try {
|
|
132
|
+
new RegExp(raw.expected);
|
|
133
|
+
} catch {
|
|
134
|
+
return { problem: {
|
|
135
|
+
code: "regexInvalid",
|
|
136
|
+
index
|
|
137
|
+
} };
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (spec.wire === "jsonSchema" && !isRecord(raw.expected)) return { problem: {
|
|
141
|
+
code: "schemaInvalid",
|
|
142
|
+
index
|
|
143
|
+
} };
|
|
144
|
+
rule.expected = raw.expected;
|
|
145
|
+
}
|
|
146
|
+
if (spec.operand === "range") {
|
|
147
|
+
const min = optionalNumber(raw.min);
|
|
148
|
+
const max = optionalNumber(raw.max);
|
|
149
|
+
if (min === false || max === false) return { problem: {
|
|
150
|
+
code: "rangeInvalid",
|
|
151
|
+
index
|
|
152
|
+
} };
|
|
153
|
+
if (min === void 0 && max === void 0) return { problem: {
|
|
154
|
+
code: "rangeRequired",
|
|
155
|
+
index
|
|
156
|
+
} };
|
|
157
|
+
if (min !== void 0 && max !== void 0 && min > max) return { problem: {
|
|
158
|
+
code: "rangeInvalid",
|
|
159
|
+
index
|
|
160
|
+
} };
|
|
161
|
+
if (min !== void 0) rule.min = min;
|
|
162
|
+
if (max !== void 0) rule.max = max;
|
|
163
|
+
}
|
|
164
|
+
return { rule };
|
|
165
|
+
}
|
|
166
|
+
/** Checks a list of rules (1 to {@link MAX_RULES}); the first problem wins. */
|
|
167
|
+
function normaliseAssertRules(raw) {
|
|
168
|
+
if (raw.length === 0) return { problem: { code: "empty" } };
|
|
169
|
+
if (raw.length > 50) return { problem: {
|
|
170
|
+
code: "tooMany",
|
|
171
|
+
count: raw.length
|
|
172
|
+
} };
|
|
173
|
+
const rules = [];
|
|
174
|
+
for (const [index, item] of raw.entries()) {
|
|
175
|
+
const result = normaliseAssertRule(item, index);
|
|
176
|
+
if ("problem" in result) return result;
|
|
177
|
+
rules.push(result.rule);
|
|
178
|
+
}
|
|
179
|
+
return { rules };
|
|
180
|
+
}
|
|
181
|
+
/** An i18n key and its English fallback for a rule problem. */
|
|
182
|
+
function describeAssertRuleProblem(problem) {
|
|
183
|
+
const at = "index" in problem ? `Rule ${problem.index + 1}: ` : "";
|
|
184
|
+
switch (problem.code) {
|
|
185
|
+
case "notObject": return {
|
|
186
|
+
key: "fluidgrids.builder.assertRules.notObject",
|
|
187
|
+
fallback: `${at}a rule must be an object.`
|
|
188
|
+
};
|
|
189
|
+
case "unknownOperator": return {
|
|
190
|
+
key: "fluidgrids.builder.assertRules.unknownOperator",
|
|
191
|
+
fallback: `${at}unknown operator "${problem.operator}". Use ${ASSERT_OPERATORS.map((spec) => spec.wire).join(", ")}.`
|
|
192
|
+
};
|
|
193
|
+
case "expectedRequired": return {
|
|
194
|
+
key: "fluidgrids.builder.assertRules.expectedRequired",
|
|
195
|
+
fallback: `${at}this operator needs an expected value.`
|
|
196
|
+
};
|
|
197
|
+
case "rangeRequired": return {
|
|
198
|
+
key: "fluidgrids.builder.assertRules.rangeRequired",
|
|
199
|
+
fallback: `${at}set a minimum, a maximum or both.`
|
|
200
|
+
};
|
|
201
|
+
case "rangeInvalid": return {
|
|
202
|
+
key: "fluidgrids.builder.assertRules.rangeInvalid",
|
|
203
|
+
fallback: `${at}minimum and maximum must be numbers, with the minimum not above the maximum.`
|
|
204
|
+
};
|
|
205
|
+
case "regexInvalid": return {
|
|
206
|
+
key: "fluidgrids.builder.assertRules.regexInvalid",
|
|
207
|
+
fallback: `${at}the expected value is not a valid regular expression.`
|
|
208
|
+
};
|
|
209
|
+
case "regexTooLong": return {
|
|
210
|
+
key: "fluidgrids.builder.assertRules.regexTooLong",
|
|
211
|
+
fallback: `${at}a regular expression may have at most ${500} characters.`
|
|
212
|
+
};
|
|
213
|
+
case "schemaInvalid": return {
|
|
214
|
+
key: "fluidgrids.builder.assertRules.schemaInvalid",
|
|
215
|
+
fallback: `${at}the expected value must be a JSON Schema object.`
|
|
216
|
+
};
|
|
217
|
+
case "pathInvalid": return {
|
|
218
|
+
key: "fluidgrids.builder.assertRules.pathInvalid",
|
|
219
|
+
fallback: `${at}the path must be text.`
|
|
220
|
+
};
|
|
221
|
+
case "messageInvalid": return {
|
|
222
|
+
key: "fluidgrids.builder.assertRules.messageInvalid",
|
|
223
|
+
fallback: `${at}the message must be text.`
|
|
224
|
+
};
|
|
225
|
+
case "tooMany": return {
|
|
226
|
+
key: "fluidgrids.builder.assertRules.tooMany",
|
|
227
|
+
fallback: `At most ${50} rules (found ${problem.count}).`
|
|
228
|
+
};
|
|
229
|
+
case "empty": return {
|
|
230
|
+
key: "fluidgrids.builder.assertRules.empty",
|
|
231
|
+
fallback: "Add at least one rule."
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* The rules held in an Assert node's `rules` setting. The manifest declares it
|
|
237
|
+
* as text, so it is usually a JSON string; an array is accepted as well. A
|
|
238
|
+
* value that does not parse yields null, so the editor can fall back to the
|
|
239
|
+
* raw text instead of discarding it.
|
|
240
|
+
*/
|
|
241
|
+
function readAssertRulesSetting(value) {
|
|
242
|
+
if (value === void 0 || value === null || value === "") return [];
|
|
243
|
+
if (Array.isArray(value)) return value;
|
|
244
|
+
if (typeof value !== "string") return null;
|
|
245
|
+
try {
|
|
246
|
+
const parsed = JSON.parse(value);
|
|
247
|
+
return Array.isArray(parsed) ? parsed : null;
|
|
248
|
+
} catch {
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function emptyAssertRuleRow() {
|
|
253
|
+
return {
|
|
254
|
+
path: "",
|
|
255
|
+
operator: "equals",
|
|
256
|
+
expected: "",
|
|
257
|
+
min: "",
|
|
258
|
+
max: "",
|
|
259
|
+
message: ""
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function rowNumber(value) {
|
|
263
|
+
return typeof value === "number" && Number.isFinite(value) ? String(value) : "";
|
|
264
|
+
}
|
|
265
|
+
function rowExpected(operator, value) {
|
|
266
|
+
if (value === void 0) return "";
|
|
267
|
+
if (operator === "matches" && typeof value === "string") return value;
|
|
268
|
+
return JSON.stringify(value);
|
|
269
|
+
}
|
|
270
|
+
/** The editor rows of stored rules (either operator spelling). */
|
|
271
|
+
function rowsFromRules(rules) {
|
|
272
|
+
return rules.map((raw) => {
|
|
273
|
+
const rule = isRecord(raw) ? raw : {};
|
|
274
|
+
const operator = operatorSpec(rule.operator)?.wire ?? (typeof rule.operator === "string" ? rule.operator : "equals");
|
|
275
|
+
return {
|
|
276
|
+
path: typeof rule.path === "string" ? rule.path : "",
|
|
277
|
+
operator,
|
|
278
|
+
expected: rowExpected(operator, rule.expected),
|
|
279
|
+
min: rowNumber(rule.min),
|
|
280
|
+
max: rowNumber(rule.max),
|
|
281
|
+
message: typeof rule.message === "string" ? rule.message : ""
|
|
282
|
+
};
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
function parseExpected(operator, text) {
|
|
286
|
+
if (operator === "matches") return text;
|
|
287
|
+
try {
|
|
288
|
+
return JSON.parse(text);
|
|
289
|
+
} catch {
|
|
290
|
+
return text;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function parseRowNumber(text) {
|
|
294
|
+
const trimmed = text.trim();
|
|
295
|
+
if (trimmed === "") return void 0;
|
|
296
|
+
const value = Number(trimmed);
|
|
297
|
+
return Number.isFinite(value) ? value : trimmed;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* The stored form of an editor row. Only the operands its operator uses are
|
|
301
|
+
* kept, so switching an operator does not leave a stale `expected` behind.
|
|
302
|
+
*/
|
|
303
|
+
function ruleFromRow(row) {
|
|
304
|
+
const spec = operatorSpec(row.operator);
|
|
305
|
+
const rule = { operator: row.operator };
|
|
306
|
+
if (row.path.trim()) rule.path = row.path.trim();
|
|
307
|
+
if (spec?.operand === "expected" && (row.expected !== "" || spec.wire === "matches")) rule.expected = parseExpected(spec.wire, row.expected);
|
|
308
|
+
if (spec?.operand === "range") {
|
|
309
|
+
const min = parseRowNumber(row.min);
|
|
310
|
+
const max = parseRowNumber(row.max);
|
|
311
|
+
if (min !== void 0) rule.min = min;
|
|
312
|
+
if (max !== void 0) rule.max = max;
|
|
313
|
+
}
|
|
314
|
+
if (row.message.trim()) rule.message = row.message.trim();
|
|
315
|
+
return rule;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export { operatorSpec as a, ruleFromRow as c, normaliseAssertRules as i, describeAssertRuleProblem as n, readAssertRulesSetting as o, emptyAssertRuleRow as r, rowsFromRules as s, ASSERT_OPERATORS as t };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
import { a as FgTabsSpec, c as useFluidGridsPageControls, i as FgRegisterPageControls, n as FgFilterOption, o as FluidGridsAssistantBridge, r as FgPageControlsSpec, s as FluidGridsAssistantBridgeProps, t as FgEnumFilterSpec } from "./pageControlsBridge-DAuT3w7L.js";
|
|
3
|
+
import { ComponentType, FC, ReactNode } from "react";
|
|
4
|
+
interface FgAiCreditBalanceProps {
|
|
5
|
+
className?: string;
|
|
6
|
+
testId?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const FLUIDGRIDS_AI_PRODUCT_KEY = "fluidgrids";
|
|
9
|
+
export declare const FLUIDGRIDS_AI_CREDITS_UPDATED_EVENT = "fluidgrids:ai-credits-updated";
|
|
10
|
+
interface FluidGridsAiCreditsBridgeProps {
|
|
11
|
+
Balance: ComponentType<FgAiCreditBalanceProps>;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const FluidGridsAiCreditsBridge: FC<FluidGridsAiCreditsBridgeProps>;
|
|
15
|
+
export declare const AiCreditBalanceSlot: FC<FgAiCreditBalanceProps>;
|
|
16
|
+
export declare function notifyFluidGridsAiCreditsUpdated(): void;
|
|
17
|
+
interface FgAskFact {
|
|
18
|
+
readonly label: string;
|
|
19
|
+
readonly value: string;
|
|
20
|
+
}
|
|
21
|
+
interface FgAskFocusInput {
|
|
22
|
+
readonly kind: string;
|
|
23
|
+
readonly label: string;
|
|
24
|
+
readonly id?: string;
|
|
25
|
+
readonly facts?: readonly FgAskFact[];
|
|
26
|
+
readonly selectedText?: string;
|
|
27
|
+
readonly pointBack?: {
|
|
28
|
+
readonly tool: string;
|
|
29
|
+
readonly args: Readonly<Record<string, string | number>>;
|
|
30
|
+
};
|
|
31
|
+
readonly suggestions?: readonly string[];
|
|
32
|
+
}
|
|
33
|
+
type FgAskDescribe = () => FgAskFocusInput | null;
|
|
34
|
+
interface FgAskAboutHost {
|
|
35
|
+
readonly attach: (element: HTMLElement, describe: FgAskDescribe) => () => void;
|
|
36
|
+
readonly attachSelection: (element: HTMLElement, describe: FgAskDescribe) => () => void;
|
|
37
|
+
readonly ask?: (input: FgAskFocusInput, anchor?: HTMLElement | null) => boolean;
|
|
38
|
+
}
|
|
39
|
+
interface FluidGridsAskAboutBridgeProps {
|
|
40
|
+
host: FgAskAboutHost;
|
|
41
|
+
children?: ReactNode;
|
|
42
|
+
}
|
|
43
|
+
export declare const FluidGridsAskAboutBridge: FC<FluidGridsAskAboutBridgeProps>;
|
|
44
|
+
export declare function useFgAskable(describe: FgAskDescribe, options?: {
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
}): (element: HTMLElement | null) => void;
|
|
47
|
+
export declare function useFgAskableSelection(describe: FgAskDescribe): (element: HTMLElement | null) => void;
|
|
48
|
+
interface FgAssistantRun {
|
|
49
|
+
readonly runId: string;
|
|
50
|
+
readonly conversationId: string;
|
|
51
|
+
readonly messageId: string;
|
|
52
|
+
readonly workspaceId: string | null;
|
|
53
|
+
readonly actorId: string | null;
|
|
54
|
+
}
|
|
55
|
+
interface FgAssistantActionResult {
|
|
56
|
+
kind: "action-result";
|
|
57
|
+
run: FgAssistantRun;
|
|
58
|
+
action: {
|
|
59
|
+
id: string;
|
|
60
|
+
operation: string;
|
|
61
|
+
responseKey: string;
|
|
62
|
+
arguments: Readonly<Record<string, unknown>>;
|
|
63
|
+
result: unknown;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
type FgAssistantPreviewEvent = FgAssistantActionResult | {
|
|
67
|
+
kind: "start" | "snapshot" | "end";
|
|
68
|
+
run: FgAssistantRun;
|
|
69
|
+
};
|
|
70
|
+
interface FgAssistantPreviewController {
|
|
71
|
+
onEvent: (event: FgAssistantPreviewEvent) => void;
|
|
72
|
+
}
|
|
73
|
+
interface FluidGridsAssistantLiveCanvasOptions {
|
|
74
|
+
getActorId?: () => string | null;
|
|
75
|
+
}
|
|
76
|
+
export declare function createFluidGridsAssistantLiveCanvas(options?: FluidGridsAssistantLiveCanvasOptions): FgAssistantPreviewController;
|
|
77
|
+
export declare function useFluidGridsAssistantLiveCanvas(options?: FluidGridsAssistantLiveCanvasOptions): FgAssistantPreviewController;
|
|
78
|
+
export declare const STEWARD_ROUTES: {
|
|
79
|
+
readonly build: "stewards/build";
|
|
80
|
+
readonly fromRun: "stewards/from-run";
|
|
81
|
+
};
|
|
82
|
+
export declare const DEFAULT_WORKFLOWS_BASE_PATH = "/workflows";
|
|
83
|
+
type StewardEntryKey = "build" | "from-run";
|
|
84
|
+
interface StewardEntry {
|
|
85
|
+
key: StewardEntryKey;
|
|
86
|
+
route: string;
|
|
87
|
+
permissions: readonly string[];
|
|
88
|
+
}
|
|
89
|
+
export declare const STEWARD_ENTRIES: readonly StewardEntry[];
|
|
90
|
+
export declare function stewardEntriesFor(enabled: boolean, hasPermission: (permission: string) => boolean): readonly StewardEntry[];
|
|
91
|
+
export declare const STEWARD_ENTRY_PERMISSIONS: readonly string[];
|
|
92
|
+
export declare function stewardEntryHref(entry: Pick<StewardEntry, "route">, workflowsBasePath?: string): string;
|
|
93
|
+
export declare function useStewardEntries(hasPermission: (permission: string) => boolean): readonly StewardEntry[];
|
|
94
|
+
export { type FgAiCreditBalanceProps, type FgAskAboutHost, type FgAskDescribe, type FgAskFact, type FgAskFocusInput, type FgAssistantActionResult, type FgAssistantPreviewController, type FgAssistantPreviewEvent, type FgAssistantRun, type FgEnumFilterSpec, type FgFilterOption, type FgPageControlsSpec, type FgRegisterPageControls, type FgTabsSpec, type FluidGridsAiCreditsBridgeProps, type FluidGridsAskAboutBridgeProps, FluidGridsAssistantBridge, type FluidGridsAssistantBridgeProps, type FluidGridsAssistantLiveCanvasOptions, type StewardEntry, type StewardEntryKey, useFluidGridsPageControls };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { n as useFluidGridsPageControls, t as FluidGridsAssistantBridge } from "./pageControlsBridge-0pX9s-3k.js";
|
|
3
|
+
import { a as notifyFluidGridsAiCreditsUpdated, i as FluidGridsAiCreditsBridge, n as FLUIDGRIDS_AI_CREDITS_UPDATED_EVENT, r as FLUIDGRIDS_AI_PRODUCT_KEY, t as AiCreditBalanceSlot } from "./aiCreditsBridge-BuE92tKo.js";
|
|
4
|
+
import { i as useFgAskable, o as useFgAskableSelection, t as FluidGridsAskAboutBridge } from "./askAboutBridge-ByYsQams.js";
|
|
5
|
+
import { r as useFluidGridsAssistantLiveCanvas, t as createFluidGridsAssistantLiveCanvas } from "./liveCanvas-D5ytXDp8.js";
|
|
6
|
+
import { l as useBotmanorStewardsEnabled } from "./feature-flags-B2qetXKd.js";
|
|
7
|
+
import { useMemo } from "react";
|
|
8
|
+
|
|
9
|
+
// src/assistant/stewardEntries.ts
|
|
10
|
+
/**
|
|
11
|
+
* BotManor Stewards in the Assistant (BOFF-16146, after BOFF-11842 D3).
|
|
12
|
+
*
|
|
13
|
+
* AI Studio's address now opens the Assistant, so its two Steward modes,
|
|
14
|
+
* "Build a Steward" and "From a Steward run", are offered from the Assistant
|
|
15
|
+
* instead. Each mode is its own Workflows page (`StewardBuilderPage`,
|
|
16
|
+
* `StewardRunImportPage` in `./workflow-pages`), mounted by the host at the
|
|
17
|
+
* paths below under its Workflows base; the Assistant start page offers them
|
|
18
|
+
* as actions.
|
|
19
|
+
*
|
|
20
|
+
* This module is the one answer every host reads for which Steward actions a
|
|
21
|
+
* person is offered: none while `botmanor.stewards` is off for the workspace
|
|
22
|
+
* (wspace-botmanor-svc refuses every Steward call then), and each only when
|
|
23
|
+
* the person holds every permission it needs. The gateway's `@rbac` stays the
|
|
24
|
+
* enforcement point; this only keeps actions the person cannot use out of
|
|
25
|
+
* sight.
|
|
26
|
+
*
|
|
27
|
+
* Pure: no React, so `bun test` covers every rule here.
|
|
28
|
+
*/
|
|
29
|
+
/**
|
|
30
|
+
* The permissions the actions need, as the gateway's `@rbac` names them. The
|
|
31
|
+
* Steward ones equal the pages' own `STEWARD_PERMISSIONS` (`steward-draft.ts`,
|
|
32
|
+
* pinned by the test); they are spelled out here so the Assistant's chunk does
|
|
33
|
+
* not pull in the Steward pages' GraphQL types.
|
|
34
|
+
*/
|
|
35
|
+
const PERMISSION = {
|
|
36
|
+
stewardCreate: "botmanor-steward:create",
|
|
37
|
+
stewardRead: "botmanor-steward:read",
|
|
38
|
+
workflowCreate: "workflow:create"
|
|
39
|
+
};
|
|
40
|
+
/** Where each Steward page is mounted, relative to the host's Workflows base. */
|
|
41
|
+
const STEWARD_ROUTES = {
|
|
42
|
+
build: "stewards/build",
|
|
43
|
+
fromRun: "stewards/from-run"
|
|
44
|
+
};
|
|
45
|
+
/** The Workflows base FluidGrids mounts the Workflows module at. */
|
|
46
|
+
const DEFAULT_WORKFLOWS_BASE_PATH = "/workflows";
|
|
47
|
+
/**
|
|
48
|
+
* The two Steward actions in display order. Their permissions are the ones the
|
|
49
|
+
* pages themselves check before they let the person act:
|
|
50
|
+
* - Build a Steward: `botmanor-steward:create` drafts the agent and Steward.
|
|
51
|
+
* - From a Steward run: `botmanor-steward:read` lists Stewards and their runs,
|
|
52
|
+
* and `workflow:create` saves the replay as a draft workflow.
|
|
53
|
+
*/
|
|
54
|
+
const STEWARD_ENTRIES = [{
|
|
55
|
+
key: "build",
|
|
56
|
+
route: STEWARD_ROUTES.build,
|
|
57
|
+
permissions: [PERMISSION.stewardCreate]
|
|
58
|
+
}, {
|
|
59
|
+
key: "from-run",
|
|
60
|
+
route: STEWARD_ROUTES.fromRun,
|
|
61
|
+
permissions: [PERMISSION.stewardRead, PERMISSION.workflowCreate]
|
|
62
|
+
}];
|
|
63
|
+
/**
|
|
64
|
+
* The Steward actions offered to a person: none while Stewards are off for the
|
|
65
|
+
* workspace, else each action whose every permission `hasPermission` grants.
|
|
66
|
+
* `hasPermission` must answer false while permissions are still loading, so
|
|
67
|
+
* nothing appears on a guess.
|
|
68
|
+
*/
|
|
69
|
+
function stewardEntriesFor(enabled, hasPermission) {
|
|
70
|
+
if (!enabled) return [];
|
|
71
|
+
return STEWARD_ENTRIES.filter((entry) => entry.permissions.every((permission) => hasPermission(permission)));
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Every permission any Steward action reads, for a host that resolves them
|
|
75
|
+
* up front (say, into a stable signature for memoisation).
|
|
76
|
+
*/
|
|
77
|
+
const STEWARD_ENTRY_PERMISSIONS = Array.from(new Set(STEWARD_ENTRIES.flatMap((entry) => entry.permissions)));
|
|
78
|
+
/** The absolute address of a Steward page under the host's Workflows base. */
|
|
79
|
+
function stewardEntryHref(entry, workflowsBasePath = DEFAULT_WORKFLOWS_BASE_PATH) {
|
|
80
|
+
return `${workflowsBasePath.replace(/\/+$/, "")}/${entry.route}`;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// src/assistant/useStewardEntries.ts
|
|
84
|
+
/**
|
|
85
|
+
* The Steward actions offered to the person in the active workspace
|
|
86
|
+
* (BOFF-16146): `stewardEntriesFor` with the `botmanor.stewards` rollout gate,
|
|
87
|
+
* which fails closed (off while the flags load, fail or are missing).
|
|
88
|
+
*/
|
|
89
|
+
/**
|
|
90
|
+
* @param hasPermission the host's answer for one `{resource}:{action}`
|
|
91
|
+
* permission in the active workspace; false while it is still loading. Pass
|
|
92
|
+
* a stable function (it is a memo dependency).
|
|
93
|
+
*/
|
|
94
|
+
function useStewardEntries(hasPermission) {
|
|
95
|
+
const enabled = useBotmanorStewardsEnabled();
|
|
96
|
+
return useMemo(() => stewardEntriesFor(enabled, hasPermission), [enabled, hasPermission]);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { AiCreditBalanceSlot, DEFAULT_WORKFLOWS_BASE_PATH, FLUIDGRIDS_AI_CREDITS_UPDATED_EVENT, FLUIDGRIDS_AI_PRODUCT_KEY, FluidGridsAiCreditsBridge, FluidGridsAskAboutBridge, FluidGridsAssistantBridge, STEWARD_ENTRIES, STEWARD_ENTRY_PERMISSIONS, STEWARD_ROUTES, createFluidGridsAssistantLiveCanvas, notifyFluidGridsAiCreditsUpdated, stewardEntriesFor, stewardEntryHref, useFgAskable, useFgAskableSelection, useFluidGridsAssistantLiveCanvas, useFluidGridsPageControls, useStewardEntries };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { E as resolveInputHandles } from "./node-operation-selection-CdV3KI_V.js";
|
|
3
|
+
|
|
4
|
+
// src/builder/hooks/attach-node-helpers.ts
|
|
5
|
+
/** Horizontal gap between a source node and a node attached via the "+" flow. */
|
|
6
|
+
const ATTACH_GAP_X = 120;
|
|
7
|
+
/** Fallback width when the source node hasn't been measured yet (w-72 card). */
|
|
8
|
+
const DEFAULT_NODE_WIDTH = 288;
|
|
9
|
+
/**
|
|
10
|
+
* Canvas position for a node attached to `source`'s output: immediately to the
|
|
11
|
+
* right of the card, vertically aligned (n8n places the next node the same
|
|
12
|
+
* way). Overlaps with existing nodes are resolved by the canvas auto-adjust
|
|
13
|
+
* pass that runs after the new node is measured.
|
|
14
|
+
*/
|
|
15
|
+
function computeAttachPosition(source) {
|
|
16
|
+
if (!source) return void 0;
|
|
17
|
+
const width = source.measured?.width ?? DEFAULT_NODE_WIDTH;
|
|
18
|
+
return {
|
|
19
|
+
x: source.position.x + width + 120,
|
|
20
|
+
y: source.position.y
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The input handle a freshly-attached node should be wired to — the first
|
|
25
|
+
* declared input handle (Merge `input-1`, Compare Datasets `inputA`, …),
|
|
26
|
+
* falling back to the default single `target` handle.
|
|
27
|
+
*/
|
|
28
|
+
function firstInputHandleId(data) {
|
|
29
|
+
return resolveInputHandles(data)[0]?.id ?? "target";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { firstInputHandleId as n, computeAttachPosition as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-QqidFIgr.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
// src/ui/badge.tsx
|
|
7
|
+
const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
10
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
12
|
+
outline: "text-foreground",
|
|
13
|
+
success: "border-transparent bg-status-success-bg-subtle text-status-success-text",
|
|
14
|
+
warning: "border-transparent bg-status-warning-bg-subtle text-status-warning-text",
|
|
15
|
+
info: "border-transparent bg-status-info-bg-subtle text-status-info-text"
|
|
16
|
+
} },
|
|
17
|
+
defaultVariants: { variant: "default" }
|
|
18
|
+
});
|
|
19
|
+
function Badge({ className, variant, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx("div", {
|
|
21
|
+
className: cn(badgeVariants({ variant }), className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { badgeVariants as n, Badge as t };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/icons/bundled/basil.generated.ts
|
|
3
|
+
const BASIL_ICONS = {
|
|
4
|
+
"prefix": "basil",
|
|
5
|
+
"width": 24,
|
|
6
|
+
"height": 24,
|
|
7
|
+
"icons": { "add-solid": { "body": "<path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M7.345 4.017a42.3 42.3 0 0 1 9.31 0c1.713.192 3.095 1.541 3.296 3.26a40.7 40.7 0 0 1 0 9.446c-.201 1.719-1.583 3.068-3.296 3.26a42.3 42.3 0 0 1-9.31 0c-1.713-.192-3.095-1.541-3.296-3.26a40.7 40.7 0 0 1 0-9.445a3.734 3.734 0 0 1 3.295-3.26M12 7.007a.75.75 0 0 1 .75.75v3.493h3.493a.75.75 0 1 1 0 1.5H12.75v3.493a.75.75 0 0 1-1.5 0V12.75H7.757a.75.75 0 0 1 0-1.5h3.493V7.757a.75.75 0 0 1 .75-.75\" clip-rule=\"evenodd\"/>" } }
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
export { BASIL_ICONS };
|