@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,510 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { a as getGraphQLEndpoint, o as onBeforeFluidGridsConfigReset, r as getFluidGridsConfig } from "./config-DO68jw5k.js";
|
|
3
|
+
import { a as matchWorkflowBuilderRoute } from "./workflowRouteData-BkfVOc-O.js";
|
|
4
|
+
import { Jc as BuilderTimingStep, Kc as BuilderTimingKind, qc as BuilderTimingOrigin } from "./graphql-types-UTYtujY9.js";
|
|
5
|
+
import { print } from "graphql";
|
|
6
|
+
|
|
7
|
+
// src/generated/documents/wspace/ReportBuilderTimingsDocument.ts
|
|
8
|
+
const ReportBuilderTimingsDocument = {
|
|
9
|
+
"kind": "Document",
|
|
10
|
+
"definitions": [{
|
|
11
|
+
"kind": "OperationDefinition",
|
|
12
|
+
"operation": "mutation",
|
|
13
|
+
"name": {
|
|
14
|
+
"kind": "Name",
|
|
15
|
+
"value": "ReportBuilderTimings"
|
|
16
|
+
},
|
|
17
|
+
"variableDefinitions": [{
|
|
18
|
+
"kind": "VariableDefinition",
|
|
19
|
+
"variable": {
|
|
20
|
+
"kind": "Variable",
|
|
21
|
+
"name": {
|
|
22
|
+
"kind": "Name",
|
|
23
|
+
"value": "input"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"type": {
|
|
27
|
+
"kind": "NonNullType",
|
|
28
|
+
"type": {
|
|
29
|
+
"kind": "NamedType",
|
|
30
|
+
"name": {
|
|
31
|
+
"kind": "Name",
|
|
32
|
+
"value": "ReportBuilderTimingsInput"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"directives": []
|
|
37
|
+
}],
|
|
38
|
+
"directives": [],
|
|
39
|
+
"selectionSet": {
|
|
40
|
+
"kind": "SelectionSet",
|
|
41
|
+
"selections": [{
|
|
42
|
+
"kind": "Field",
|
|
43
|
+
"name": {
|
|
44
|
+
"kind": "Name",
|
|
45
|
+
"value": "reportBuilderTimings"
|
|
46
|
+
},
|
|
47
|
+
"arguments": [{
|
|
48
|
+
"kind": "Argument",
|
|
49
|
+
"name": {
|
|
50
|
+
"kind": "Name",
|
|
51
|
+
"value": "input"
|
|
52
|
+
},
|
|
53
|
+
"value": {
|
|
54
|
+
"kind": "Variable",
|
|
55
|
+
"name": {
|
|
56
|
+
"kind": "Name",
|
|
57
|
+
"value": "input"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}],
|
|
61
|
+
"directives": [],
|
|
62
|
+
"selectionSet": {
|
|
63
|
+
"kind": "SelectionSet",
|
|
64
|
+
"selections": [{
|
|
65
|
+
"kind": "Field",
|
|
66
|
+
"name": {
|
|
67
|
+
"kind": "Name",
|
|
68
|
+
"value": "accepted"
|
|
69
|
+
},
|
|
70
|
+
"arguments": [],
|
|
71
|
+
"directives": []
|
|
72
|
+
}, {
|
|
73
|
+
"kind": "Field",
|
|
74
|
+
"name": {
|
|
75
|
+
"kind": "Name",
|
|
76
|
+
"value": "dropped"
|
|
77
|
+
},
|
|
78
|
+
"arguments": [],
|
|
79
|
+
"directives": []
|
|
80
|
+
}]
|
|
81
|
+
}
|
|
82
|
+
}]
|
|
83
|
+
}
|
|
84
|
+
}]
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
// src/telemetry/builderTimings.ts
|
|
88
|
+
/**
|
|
89
|
+
* Browser timings of three builder steps a person waits on (BOFF-11772):
|
|
90
|
+
*
|
|
91
|
+
* - BUILDER_LOAD: opening a workflow until its canvas is drawn, after a full
|
|
92
|
+
* page load on the builder's address (COLD) or from inside the app (IN_APP);
|
|
93
|
+
* - WORKFLOW_SAVE: an explicit save until the saved state is shown, for the
|
|
94
|
+
* draft save (DRAFT) or a version save (VERSION). Autosave is not measured;
|
|
95
|
+
* - RUN_RESULT_SHOWN: the request of the status poll that saw the run end
|
|
96
|
+
* until the finished run is drawn (POLL).
|
|
97
|
+
*
|
|
98
|
+
* Samples are queued in memory and sent in small batches to
|
|
99
|
+
* `reportBuilderTimings` on wspace-workflow-svc, which only records them in a
|
|
100
|
+
* histogram. The payload is enums and numbers: no ids, names, paths or user
|
|
101
|
+
* agent. Every API here is best effort and silent: nothing reaches a toast, an
|
|
102
|
+
* error boundary or the SDK's error events, and no request is retried.
|
|
103
|
+
*
|
|
104
|
+
* Transport: a `fetch` with `keepalive` to the configured workspace gateway,
|
|
105
|
+
* carrying exactly the headers the SDK's own Apollo auth link sends
|
|
106
|
+
* (`authorization`, `x-workspace-authorization`, `x-workspace-id`,
|
|
107
|
+
* `x-tenant-id`, `x-product-id`). It does not go through the host's Apollo
|
|
108
|
+
* client: in the FluidGrids app that client is the shell's, whose error link
|
|
109
|
+
* raises a global error toast for any failed operation, whose mutation link
|
|
110
|
+
* refetches every active query after a successful mutation, and whose batched
|
|
111
|
+
* HTTP link drops `keepalive`.
|
|
112
|
+
*
|
|
113
|
+
* Timing uses `performance.now()` only. A measurement is dropped when the tab
|
|
114
|
+
* was hidden at its start or became hidden before its end: a background tab
|
|
115
|
+
* throttles timers and frames, and nobody is waiting on it.
|
|
116
|
+
*
|
|
117
|
+
* This module holds no React state and is safe to import anywhere.
|
|
118
|
+
*/
|
|
119
|
+
/** The server's accepted range; a sample outside it is not sent. */
|
|
120
|
+
const MAX_DURATION_MS = 12e4;
|
|
121
|
+
/** The server records at most this many samples per call. */
|
|
122
|
+
const MAX_SAMPLES_PER_FLUSH = 20;
|
|
123
|
+
/** Pending samples kept; the oldest is dropped beyond this. */
|
|
124
|
+
const MAX_QUEUED_SAMPLES = 50;
|
|
125
|
+
/** Samples a page load may queue in total, to stop a runaway loop. */
|
|
126
|
+
const MAX_SAMPLES_PER_PAGE_LOAD = 100;
|
|
127
|
+
/** Queue length that sends a batch at once. */
|
|
128
|
+
const FLUSH_AT_SAMPLES = 10;
|
|
129
|
+
/** Time after the first sample entered an empty queue that sends it. */
|
|
130
|
+
const FLUSH_DELAY_MS = 15e3;
|
|
131
|
+
/** How long an in-app navigation mark stays usable. */
|
|
132
|
+
const NAVIGATION_MARK_TTL_MS = 3e4;
|
|
133
|
+
/** Where the host mounts the builder routes, as matched for a cold load. */
|
|
134
|
+
const WORKFLOWS_BASE_PATH = "/workflows";
|
|
135
|
+
const MAX_REMEMBERED_RUNS = 200;
|
|
136
|
+
function freshState(send = sendWithFetch, now = defaultNow, random = Math.random) {
|
|
137
|
+
return {
|
|
138
|
+
sampled: null,
|
|
139
|
+
queue: [],
|
|
140
|
+
queuedThisPage: 0,
|
|
141
|
+
flushTimer: null,
|
|
142
|
+
hiddenEpoch: 0,
|
|
143
|
+
listening: false,
|
|
144
|
+
hiddenAtStart: false,
|
|
145
|
+
navigationMark: null,
|
|
146
|
+
coldAvailable: true,
|
|
147
|
+
pendingLoad: null,
|
|
148
|
+
reportedRuns: /* @__PURE__ */ new Set(),
|
|
149
|
+
send,
|
|
150
|
+
now,
|
|
151
|
+
random
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
function defaultNow() {
|
|
155
|
+
return typeof performance !== "undefined" ? performance.now() : 0;
|
|
156
|
+
}
|
|
157
|
+
let state = freshState();
|
|
158
|
+
onBeforeFluidGridsConfigReset(() => flushBuilderTimings({ keepalive: true }));
|
|
159
|
+
function settingsOf(config) {
|
|
160
|
+
const settings = config.builderTimings;
|
|
161
|
+
const enabled = settings?.enabled ?? config.productId === "fluidgrids";
|
|
162
|
+
const rate = settings?.sampleRate;
|
|
163
|
+
return {
|
|
164
|
+
enabled,
|
|
165
|
+
sampleRate: typeof rate === "number" && Number.isFinite(rate) ? Math.min(1, Math.max(0, rate)) : 1
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
/** Whether this page load reports timings. */
|
|
169
|
+
function active() {
|
|
170
|
+
const { enabled, sampleRate } = settingsOf(getFluidGridsConfig());
|
|
171
|
+
if (!enabled) return false;
|
|
172
|
+
if (state.sampled === null) state.sampled = state.random() < sampleRate;
|
|
173
|
+
return state.sampled;
|
|
174
|
+
}
|
|
175
|
+
function isHidden() {
|
|
176
|
+
return typeof document !== "undefined" && document.visibilityState === "hidden";
|
|
177
|
+
}
|
|
178
|
+
function onVisibilityChange() {
|
|
179
|
+
if (!isHidden()) return;
|
|
180
|
+
state.hiddenEpoch += 1;
|
|
181
|
+
flushBuilderTimings({ keepalive: true });
|
|
182
|
+
}
|
|
183
|
+
function onPageHide() {
|
|
184
|
+
flushBuilderTimings({ keepalive: true });
|
|
185
|
+
}
|
|
186
|
+
function listen() {
|
|
187
|
+
if (state.listening || typeof document === "undefined") return;
|
|
188
|
+
state.listening = true;
|
|
189
|
+
state.hiddenAtStart = isHidden() || wasEverHiddenBefore();
|
|
190
|
+
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
191
|
+
if (typeof window !== "undefined") window.addEventListener("pagehide", onPageHide);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Whether the document was hidden at any time before this module listened,
|
|
195
|
+
* where the browser keeps visibility-state entries (Chromium). Elsewhere a
|
|
196
|
+
* page loaded in the background is still caught by `hiddenAtStart`.
|
|
197
|
+
*/
|
|
198
|
+
function wasEverHiddenBefore() {
|
|
199
|
+
try {
|
|
200
|
+
if (typeof performance === "undefined") return false;
|
|
201
|
+
return performance.getEntriesByType("visibility-state").some((entry) => entry.name === "hidden");
|
|
202
|
+
} catch {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function begin(start) {
|
|
207
|
+
listen();
|
|
208
|
+
if (isHidden()) return null;
|
|
209
|
+
return {
|
|
210
|
+
start: start ?? state.now(),
|
|
211
|
+
epoch: state.hiddenEpoch
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/** Calls `done` after the next paint that follows the current React commit. */
|
|
215
|
+
function afterNextPaint(done) {
|
|
216
|
+
const next = () => setTimeout(done, 0);
|
|
217
|
+
if (typeof requestAnimationFrame === "function") requestAnimationFrame(next);
|
|
218
|
+
else next();
|
|
219
|
+
}
|
|
220
|
+
/** Finishes a measurement after the next paint, unless the tab was hidden. */
|
|
221
|
+
function finish(measurement, step, kind, extraValid = () => true) {
|
|
222
|
+
afterNextPaint(() => {
|
|
223
|
+
if (state.hiddenEpoch !== measurement.epoch || isHidden()) return;
|
|
224
|
+
if (!extraValid()) return;
|
|
225
|
+
record({
|
|
226
|
+
step,
|
|
227
|
+
kind,
|
|
228
|
+
durationMs: state.now() - measurement.start
|
|
229
|
+
});
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
function validDuration(durationMs) {
|
|
233
|
+
return Number.isFinite(durationMs) && durationMs >= 0 && durationMs <= 12e4;
|
|
234
|
+
}
|
|
235
|
+
/** Queues one sample (for the measuring helpers below and tests). */
|
|
236
|
+
function record(sample) {
|
|
237
|
+
try {
|
|
238
|
+
if (!active() || !validDuration(sample.durationMs)) return;
|
|
239
|
+
if (state.queuedThisPage >= 100) return;
|
|
240
|
+
listen();
|
|
241
|
+
state.queuedThisPage += 1;
|
|
242
|
+
state.queue.push({
|
|
243
|
+
step: sample.step,
|
|
244
|
+
kind: sample.kind,
|
|
245
|
+
durationMs: Math.round(sample.durationMs * 10) / 10
|
|
246
|
+
});
|
|
247
|
+
if (state.queue.length > 50) state.queue.shift();
|
|
248
|
+
if (state.queue.length >= 10) flushBuilderTimings();
|
|
249
|
+
else if (state.flushTimer === null) state.flushTimer = setTimeout(() => {
|
|
250
|
+
state.flushTimer = null;
|
|
251
|
+
flushBuilderTimings();
|
|
252
|
+
}, FLUSH_DELAY_MS);
|
|
253
|
+
} catch {}
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Sends the pending samples. A normal flush sends one batch of at most
|
|
257
|
+
* {@link MAX_SAMPLES_PER_FLUSH} and leaves the rest for the next one; a
|
|
258
|
+
* `keepalive` flush (the tab is being hidden or left) sends everything, in
|
|
259
|
+
* batches. Never throws, never waits on anything the UI waits on.
|
|
260
|
+
*/
|
|
261
|
+
function flushBuilderTimings(options = {}) {
|
|
262
|
+
try {
|
|
263
|
+
if (state.flushTimer !== null) {
|
|
264
|
+
clearTimeout(state.flushTimer);
|
|
265
|
+
state.flushTimer = null;
|
|
266
|
+
}
|
|
267
|
+
if (state.queue.length === 0) return;
|
|
268
|
+
if (!settingsOf(getFluidGridsConfig()).enabled) {
|
|
269
|
+
state.queue = [];
|
|
270
|
+
return;
|
|
271
|
+
}
|
|
272
|
+
if (!hasUsableAuthToken()) {
|
|
273
|
+
state.queue = [];
|
|
274
|
+
return;
|
|
275
|
+
}
|
|
276
|
+
const keepalive = options.keepalive === true;
|
|
277
|
+
do
|
|
278
|
+
dispatch(state.queue.splice(0, 20), keepalive);
|
|
279
|
+
while (keepalive && state.queue.length > 0);
|
|
280
|
+
if (state.queue.length > 0) state.flushTimer = setTimeout(() => {
|
|
281
|
+
state.flushTimer = null;
|
|
282
|
+
flushBuilderTimings();
|
|
283
|
+
}, FLUSH_DELAY_MS);
|
|
284
|
+
} catch {}
|
|
285
|
+
}
|
|
286
|
+
function dispatch(batch, keepalive) {
|
|
287
|
+
try {
|
|
288
|
+
state.send(batch, { keepalive }).catch(debugLog);
|
|
289
|
+
} catch (error) {
|
|
290
|
+
debugLog(error);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function debugLog(error) {
|
|
294
|
+
if (isDevelopment()) console.debug("[builderTimings] not sent", error);
|
|
295
|
+
}
|
|
296
|
+
function isDevelopment() {
|
|
297
|
+
return import.meta.env?.DEV === true;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* A token is usable when it is set and, for a JWT, not about to expire: an
|
|
301
|
+
* expired token would make the gateway refuse the call, and telemetry must not
|
|
302
|
+
* be the request that starts a refresh or a sign-in.
|
|
303
|
+
*/
|
|
304
|
+
function hasUsableAuthToken() {
|
|
305
|
+
const token = getFluidGridsConfig().authToken;
|
|
306
|
+
if (!token) return false;
|
|
307
|
+
const exp = jwtExpiry(token);
|
|
308
|
+
return exp === null || exp * 1e3 > Date.now() + 5e3;
|
|
309
|
+
}
|
|
310
|
+
function jwtExpiry(token) {
|
|
311
|
+
const payload = token.split(".")[1];
|
|
312
|
+
if (!payload || typeof atob !== "function") return null;
|
|
313
|
+
try {
|
|
314
|
+
const json = atob(payload.replace(/-/g, "+").replace(/_/g, "/"));
|
|
315
|
+
const parsed = JSON.parse(json);
|
|
316
|
+
if (typeof parsed !== "object" || parsed === null || !("exp" in parsed)) return null;
|
|
317
|
+
return typeof parsed.exp === "number" ? parsed.exp : null;
|
|
318
|
+
} catch {
|
|
319
|
+
return null;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
const REPORT_QUERY = print(ReportBuilderTimingsDocument);
|
|
323
|
+
/** The default transport: see the module comment. */
|
|
324
|
+
async function sendWithFetch(samples, { keepalive }) {
|
|
325
|
+
if (typeof fetch !== "function") return null;
|
|
326
|
+
const config = getFluidGridsConfig();
|
|
327
|
+
if (!config.apiGatewayUrl || !config.authToken) return null;
|
|
328
|
+
const headers = {
|
|
329
|
+
"content-type": "application/json",
|
|
330
|
+
authorization: `Bearer ${config.authToken}`,
|
|
331
|
+
"x-workspace-id": config.workspaceId
|
|
332
|
+
};
|
|
333
|
+
if (config.workspaceToken) headers["x-workspace-authorization"] = `Bearer ${config.workspaceToken}`;
|
|
334
|
+
if (config.tenantId) headers["x-tenant-id"] = config.tenantId;
|
|
335
|
+
if (config.productId) headers["x-product-id"] = config.productId;
|
|
336
|
+
const response = await fetch(getGraphQLEndpoint(config.apiGatewayUrl), {
|
|
337
|
+
method: "POST",
|
|
338
|
+
headers,
|
|
339
|
+
body: JSON.stringify({
|
|
340
|
+
operationName: "ReportBuilderTimings",
|
|
341
|
+
query: REPORT_QUERY,
|
|
342
|
+
variables: { input: {
|
|
343
|
+
samples,
|
|
344
|
+
origin: "APP"
|
|
345
|
+
} }
|
|
346
|
+
}),
|
|
347
|
+
keepalive,
|
|
348
|
+
credentials: "include"
|
|
349
|
+
});
|
|
350
|
+
return response.ok ? null : response.status;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Call synchronously in a click handler that opens an existing workflow in
|
|
354
|
+
* the builder from inside the app. The next builder load within
|
|
355
|
+
* {@link NAVIGATION_MARK_TTL_MS} is reported as IN_APP from this moment.
|
|
356
|
+
*/
|
|
357
|
+
function markBuilderNavigation() {
|
|
358
|
+
try {
|
|
359
|
+
if (!active()) return;
|
|
360
|
+
state.navigationMark = begin();
|
|
361
|
+
state.coldAvailable = false;
|
|
362
|
+
} catch {}
|
|
363
|
+
}
|
|
364
|
+
/** Whether this document was loaded on a builder address. */
|
|
365
|
+
function coldLoadQualifies() {
|
|
366
|
+
if (typeof performance === "undefined") return false;
|
|
367
|
+
const entry = performance.getEntriesByType("navigation")[0];
|
|
368
|
+
if (!entry || !("type" in entry) || entry.type !== "navigate" && entry.type !== "reload") return false;
|
|
369
|
+
try {
|
|
370
|
+
return matchWorkflowBuilderRoute(new URL(entry.name).pathname, WORKFLOWS_BASE_PATH) !== null;
|
|
371
|
+
} catch {
|
|
372
|
+
return false;
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Call when the builder page has applied a fetched, existing workflow to the
|
|
377
|
+
* flow store. `loadToken` names that load (workflow, version and the page's
|
|
378
|
+
* load number); a later call replaces an earlier one. Not called for a new
|
|
379
|
+
* workflow, a reload inside the builder or a failed load.
|
|
380
|
+
*/
|
|
381
|
+
function noteWorkflowApplied(loadToken) {
|
|
382
|
+
try {
|
|
383
|
+
state.pendingLoad = null;
|
|
384
|
+
if (!active()) return;
|
|
385
|
+
const mark = state.navigationMark;
|
|
386
|
+
state.navigationMark = null;
|
|
387
|
+
if (mark && state.now() - mark.start <= 3e4) {
|
|
388
|
+
state.coldAvailable = false;
|
|
389
|
+
state.pendingLoad = {
|
|
390
|
+
token: loadToken,
|
|
391
|
+
kind: "IN_APP",
|
|
392
|
+
measurement: mark,
|
|
393
|
+
cold: false
|
|
394
|
+
};
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
if (!state.coldAvailable) return;
|
|
398
|
+
state.coldAvailable = false;
|
|
399
|
+
listen();
|
|
400
|
+
if (mark || state.hiddenAtStart || !coldLoadQualifies()) return;
|
|
401
|
+
state.pendingLoad = {
|
|
402
|
+
token: loadToken,
|
|
403
|
+
kind: "COLD",
|
|
404
|
+
measurement: {
|
|
405
|
+
start: 0,
|
|
406
|
+
epoch: 0
|
|
407
|
+
},
|
|
408
|
+
cold: true
|
|
409
|
+
};
|
|
410
|
+
} catch {}
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Call when a builder load failed or was abandoned: neither a COLD sample nor
|
|
414
|
+
* an IN_APP sample from the same click is then taken from a later retry, and
|
|
415
|
+
* a pending load is dropped.
|
|
416
|
+
*/
|
|
417
|
+
function noteBuilderLoadAbandoned() {
|
|
418
|
+
state.pendingLoad = null;
|
|
419
|
+
state.coldAvailable = false;
|
|
420
|
+
state.navigationMark = null;
|
|
421
|
+
}
|
|
422
|
+
/** Call when the builder page unmounts: a load it started is not finished. */
|
|
423
|
+
function cancelPendingBuilderLoad() {
|
|
424
|
+
state.pendingLoad = null;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Call when the canvas has initialised and fitted its view. Completes the
|
|
428
|
+
* pending builder load, if any, after the next paint.
|
|
429
|
+
*/
|
|
430
|
+
function noteCanvasInit() {
|
|
431
|
+
try {
|
|
432
|
+
const pending = state.pendingLoad;
|
|
433
|
+
if (!pending) return;
|
|
434
|
+
state.pendingLoad = null;
|
|
435
|
+
finish(pending.measurement, "BUILDER_LOAD", pending.kind, () => !pending.cold || !state.hiddenAtStart);
|
|
436
|
+
} catch {}
|
|
437
|
+
}
|
|
438
|
+
/**
|
|
439
|
+
* Call from the canvas `onInit` with the promise of its initial `fitView` and
|
|
440
|
+
* the number of nodes on the canvas at that moment.
|
|
441
|
+
*
|
|
442
|
+
* React Flow resolves `fitView` only once there are nodes to fit, so on an
|
|
443
|
+
* empty workflow the promise stays pending until the user adds the first
|
|
444
|
+
* node. Waiting for it there would time the user's editing, not the load (a
|
|
445
|
+
* prod sample measured 76 s this way). An empty canvas is drawn as soon as it
|
|
446
|
+
* initialises, so the load completes right away; a rejected fit records
|
|
447
|
+
* nothing.
|
|
448
|
+
*/
|
|
449
|
+
function noteCanvasFitted(fit, nodeCount) {
|
|
450
|
+
try {
|
|
451
|
+
if (nodeCount === 0) {
|
|
452
|
+
noteCanvasInit();
|
|
453
|
+
return;
|
|
454
|
+
}
|
|
455
|
+
fit.then(() => noteCanvasInit(), () => cancelPendingBuilderLoad());
|
|
456
|
+
} catch {}
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Starts measuring an explicit save (button or shortcut). Returns null when
|
|
460
|
+
* nothing is measured (disabled, unsampled or a hidden tab).
|
|
461
|
+
*/
|
|
462
|
+
function startWorkflowSaveTiming() {
|
|
463
|
+
try {
|
|
464
|
+
if (!active()) return null;
|
|
465
|
+
const measurement = begin();
|
|
466
|
+
if (!measurement) return null;
|
|
467
|
+
let done = false;
|
|
468
|
+
return { shown(kind) {
|
|
469
|
+
if (done) return;
|
|
470
|
+
done = true;
|
|
471
|
+
finish(measurement, "WORKFLOW_SAVE", kind);
|
|
472
|
+
} };
|
|
473
|
+
} catch {
|
|
474
|
+
return null;
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
function startRunPollTiming(runId) {
|
|
478
|
+
try {
|
|
479
|
+
if (!active() || state.reportedRuns.has(runId)) return {
|
|
480
|
+
runId,
|
|
481
|
+
measurement: null
|
|
482
|
+
};
|
|
483
|
+
return {
|
|
484
|
+
runId,
|
|
485
|
+
measurement: begin()
|
|
486
|
+
};
|
|
487
|
+
} catch {
|
|
488
|
+
return {
|
|
489
|
+
runId,
|
|
490
|
+
measurement: null
|
|
491
|
+
};
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Call once the poll that saw the run end has been committed to the builder.
|
|
496
|
+
* Reports at most once per run.
|
|
497
|
+
*/
|
|
498
|
+
function noteRunResultShown(poll) {
|
|
499
|
+
try {
|
|
500
|
+
if (!poll.measurement || state.reportedRuns.has(poll.runId)) return;
|
|
501
|
+
state.reportedRuns.add(poll.runId);
|
|
502
|
+
if (state.reportedRuns.size > MAX_REMEMBERED_RUNS) {
|
|
503
|
+
const oldest = state.reportedRuns.values().next().value;
|
|
504
|
+
if (oldest !== void 0) state.reportedRuns.delete(oldest);
|
|
505
|
+
}
|
|
506
|
+
finish(poll.measurement, "RUN_RESULT_SHOWN", "POLL");
|
|
507
|
+
} catch {}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
export { noteCanvasFitted as a, startRunPollTiming as c, noteBuilderLoadAbandoned as i, startWorkflowSaveTiming as l, flushBuilderTimings as n, noteRunResultShown as o, markBuilderNavigation as r, noteWorkflowApplied as s, cancelPendingBuilderLoad as t, ReportBuilderTimingsDocument as u };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-QqidFIgr.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
+
import { cva } from "class-variance-authority";
|
|
7
|
+
|
|
8
|
+
// src/ui/button.tsx
|
|
9
|
+
const buttonVariants = cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*=\"size-\"])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]", {
|
|
10
|
+
variants: {
|
|
11
|
+
variant: {
|
|
12
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90",
|
|
13
|
+
destructive: "bg-action-danger-bg text-action-danger-text hover:bg-action-danger-bgHover",
|
|
14
|
+
outline: "border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",
|
|
15
|
+
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
16
|
+
ghost: "hover:bg-accent hover:text-accent-foreground",
|
|
17
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-9 px-4 py-2 has-[>svg]:px-3",
|
|
21
|
+
xs: "h-7 rounded-md gap-1 px-2 text-xs has-[>svg]:px-1.5",
|
|
22
|
+
sm: "h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",
|
|
23
|
+
lg: "h-10 rounded-md px-6 has-[>svg]:px-4",
|
|
24
|
+
icon: "size-9",
|
|
25
|
+
"icon-sm": "size-8",
|
|
26
|
+
"icon-lg": "size-10"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "default"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
function Button({ className, variant = "default", size = "default", asChild = false, ...props }) {
|
|
35
|
+
return /* @__PURE__ */ jsx(asChild ? Slot : "button", {
|
|
36
|
+
"data-slot": "button",
|
|
37
|
+
"data-variant": variant,
|
|
38
|
+
"data-size": size,
|
|
39
|
+
className: cn(buttonVariants({
|
|
40
|
+
variant,
|
|
41
|
+
size,
|
|
42
|
+
className
|
|
43
|
+
})),
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { buttonVariants as n, Button as t };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { n as useAgentMarksStore, r as toPlainText } from "./marksStore-a9oIMMot.js";
|
|
3
|
+
import { H as selectedOperationOf, V as paramsFromOperation, z as nodeTitle } from "./use-bare-node-registry-O6mKJO_n.js";
|
|
4
|
+
import { U as useFlowStore } from "./node-operation-selection-CdV3KI_V.js";
|
|
5
|
+
import { t as notesKeyOf } from "./notesKey-5EaREBGA.js";
|
|
6
|
+
import { AgentToolError, defineAgentTool } from "@burdenoff/fe-libs/shared/agent-tools";
|
|
7
|
+
import { z } from "zod";
|
|
8
|
+
|
|
9
|
+
// src/builder/agentNotes/canvasNoteTools.ts
|
|
10
|
+
const MAX_NOTES_LISTED = 20;
|
|
11
|
+
function workflow() {
|
|
12
|
+
return useFlowStore.getState().workflow;
|
|
13
|
+
}
|
|
14
|
+
function dataOf(node) {
|
|
15
|
+
return node.data && typeof node.data === "object" ? node.data : {};
|
|
16
|
+
}
|
|
17
|
+
const nodeRef = z.string().trim().min(1).max(100).describe("A node id from fg_canvas_read, or the node's exact title.");
|
|
18
|
+
/** A node by id, else by exact title (case-insensitive) when that is unique. */
|
|
19
|
+
function resolveNode(ref) {
|
|
20
|
+
const nodes = workflow().nodes;
|
|
21
|
+
const byId = nodes.find((node) => node.id === ref);
|
|
22
|
+
if (byId) return byId;
|
|
23
|
+
const wanted = ref.toLowerCase();
|
|
24
|
+
const byTitle = nodes.filter((node) => nodeTitle(node).toLowerCase() === wanted);
|
|
25
|
+
if (byTitle.length === 1 && byTitle[0]) return byTitle[0];
|
|
26
|
+
if (byTitle.length > 1) throw new AgentToolError("INVALID_INPUT", `${byTitle.length} nodes are titled "${ref.slice(0, 40)}": ${byTitle.slice(0, 6).map((node) => node.id).join(", ")}. Use the node id.`);
|
|
27
|
+
throw new AgentToolError("NOT_FOUND", `No node "${ref.slice(0, 40)}" on the canvas. Use fg_canvas_read for ids.`, { retryable: true });
|
|
28
|
+
}
|
|
29
|
+
/** The parameter names a node's operation has. */
|
|
30
|
+
function parameterNames(node) {
|
|
31
|
+
return paramsFromOperation(selectedOperationOf(dataOf(node), node.type)).map((parameter) => parameter.name);
|
|
32
|
+
}
|
|
33
|
+
function summary(note, liveIds) {
|
|
34
|
+
return {
|
|
35
|
+
number: note.number,
|
|
36
|
+
nodeId: note.nodeId,
|
|
37
|
+
node: note.nodeLabel,
|
|
38
|
+
...note.paramKey ? { param: note.paramKey } : {},
|
|
39
|
+
kind: note.kind,
|
|
40
|
+
message: toPlainText(note.message, 120),
|
|
41
|
+
resolved: note.resolved,
|
|
42
|
+
...liveIds.has(note.nodeId) ? {} : { orphaned: true }
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function createCanvasNoteTools(options = {}) {
|
|
46
|
+
const focus = async (nodeId) => {
|
|
47
|
+
if (!options.focusNode) return false;
|
|
48
|
+
const done = await options.focusNode(nodeId);
|
|
49
|
+
if (done) useAgentMarksStore.getState().actions.flashNode(nodeId);
|
|
50
|
+
return done;
|
|
51
|
+
};
|
|
52
|
+
return [
|
|
53
|
+
defineAgentTool({
|
|
54
|
+
name: "fg_canvas_annotate",
|
|
55
|
+
title: "Pin a note on a node",
|
|
56
|
+
description: "Pins a numbered note on a node of the workflow open in the builder, to show the person what to change or check there (they resolve it). It does not change the workflow. Use kind fix for something they must change, info for an explanation. Name the parameter with param when the note is about one field.",
|
|
57
|
+
input: z.strictObject({
|
|
58
|
+
node: nodeRef,
|
|
59
|
+
message: z.string().trim().min(1).max(280).describe("What to do or know, in one or two plain sentences. No markdown."),
|
|
60
|
+
kind: z.enum(["fix", "info"]).default("fix").describe("fix: the person must change something; info: an explanation."),
|
|
61
|
+
param: z.string().trim().min(1).max(80).optional().describe("A parameter name of the node the note is about; an unknown one lists the valid names."),
|
|
62
|
+
focus: z.boolean().default(true).describe("Bring the node into view (default true).")
|
|
63
|
+
}),
|
|
64
|
+
annotations: {
|
|
65
|
+
readOnly: true,
|
|
66
|
+
untrustedContent: true
|
|
67
|
+
},
|
|
68
|
+
execute: async ({ node: ref, message, kind, param, focus: bringIntoView }) => {
|
|
69
|
+
const node = resolveNode(ref);
|
|
70
|
+
if (param) {
|
|
71
|
+
const names = parameterNames(node);
|
|
72
|
+
if (!names.includes(param)) throw new AgentToolError("INVALID_INPUT", names.length > 0 ? `No parameter "${param.slice(0, 40)}". Parameters: ${names.slice(0, 20).join(", ")}.` : "This node has no parameters; leave param out.");
|
|
73
|
+
}
|
|
74
|
+
const key = notesKeyOf(workflow());
|
|
75
|
+
const note = useAgentMarksStore.getState().actions.addNote({
|
|
76
|
+
workflowKey: key,
|
|
77
|
+
nodeId: node.id,
|
|
78
|
+
nodeLabel: nodeTitle(node),
|
|
79
|
+
paramKey: param ?? null,
|
|
80
|
+
kind,
|
|
81
|
+
message
|
|
82
|
+
});
|
|
83
|
+
if (!note) throw new AgentToolError("CONFLICT", `This workflow already has ${20} notes. Ask the person to resolve some, or clear them with fg_ui_clear_marks.`);
|
|
84
|
+
const focused = bringIntoView ? await focus(node.id) : false;
|
|
85
|
+
return {
|
|
86
|
+
noteNumber: note.number,
|
|
87
|
+
nodeId: node.id,
|
|
88
|
+
node: note.nodeLabel,
|
|
89
|
+
...note.paramKey ? { param: note.paramKey } : {},
|
|
90
|
+
focused
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
}),
|
|
94
|
+
defineAgentTool({
|
|
95
|
+
name: "fg_canvas_notes",
|
|
96
|
+
title: "List the notes on the canvas",
|
|
97
|
+
description: "Lists the notes you pinned on the open workflow: number, node, parameter, message, whether the person resolved it, and orphaned when its node was deleted.",
|
|
98
|
+
input: z.strictObject({}),
|
|
99
|
+
annotations: {
|
|
100
|
+
readOnly: true,
|
|
101
|
+
untrustedContent: true
|
|
102
|
+
},
|
|
103
|
+
execute: () => {
|
|
104
|
+
const current = workflow();
|
|
105
|
+
const key = notesKeyOf(current);
|
|
106
|
+
const liveIds = new Set(current.nodes.map((node) => node.id));
|
|
107
|
+
const notes = useAgentMarksStore.getState().notes.filter((note) => note.workflowKey === key);
|
|
108
|
+
return {
|
|
109
|
+
total: notes.length,
|
|
110
|
+
open: notes.filter((note) => !note.resolved).length,
|
|
111
|
+
notes: notes.slice(0, MAX_NOTES_LISTED).map((note) => summary(note, liveIds))
|
|
112
|
+
};
|
|
113
|
+
}
|
|
114
|
+
}),
|
|
115
|
+
defineAgentTool({
|
|
116
|
+
name: "fg_canvas_focus_node",
|
|
117
|
+
title: "Show a node",
|
|
118
|
+
description: "Pans and zooms the builder canvas to one node and briefly highlights it, so the person can see it. It does not change the workflow.",
|
|
119
|
+
input: z.strictObject({ node: nodeRef }),
|
|
120
|
+
annotations: {
|
|
121
|
+
readOnly: true,
|
|
122
|
+
untrustedContent: true
|
|
123
|
+
},
|
|
124
|
+
execute: async ({ node: ref }) => {
|
|
125
|
+
const node = resolveNode(ref);
|
|
126
|
+
if (!await focus(node.id)) throw new AgentToolError("CONFLICT", "The canvas is not ready yet. Try again in a moment.", { retryable: true });
|
|
127
|
+
return {
|
|
128
|
+
nodeId: node.id,
|
|
129
|
+
node: nodeTitle(node),
|
|
130
|
+
focused: true
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export { createCanvasNoteTools };
|