@burdenoff/fluidgrids-fe-sdk 2026.1113.7 → 2026.1113.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.
Files changed (31) hide show
  1. package/dist/{AiStudioPage-DZ0YBcTL.js → AiStudioPage-Di3eW5Lb.js} +1 -1
  2. package/dist/{ExecutionDetailPage-CoRLOiiZ.js → ExecutionDetailPage-B2jVApvM.js} +4 -1
  3. package/dist/{ExecutionsListPage-Dr0Ychbr.js → ExecutionsListPage-ZCmFNid9.js} +3 -0
  4. package/dist/{TemplatePreview-WiRz3SCv.js → TemplatePreview-DYxxlBad.js} +1 -1
  5. package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
  6. package/dist/{WorkflowBuilder-CQWz7dXc.js → WorkflowBuilder-Dp9chOr5.js} +1 -1
  7. package/dist/{WorkflowBuilder-BdnCh2hB.js → WorkflowBuilder-LkCC0Arp.js} +1 -1
  8. package/dist/agent-tools.d.ts +1 -1
  9. package/dist/agent-tools.js +2 -2
  10. package/dist/{canvasNoteTools-Cp3UPIM8.js → canvasNoteTools-D9RwHOz4.js} +1 -1
  11. package/dist/{constants-XdvUxeWK.d.ts → constants-svpG-QrV.d.ts} +1 -9
  12. package/dist/entities-I_0kio3q.js +38 -0
  13. package/dist/executions.js +2 -2
  14. package/dist/{flow-builder-CJ00qt1Z.js → flow-builder-7gVV3Y8R.js} +111 -13
  15. package/dist/{index-Df6NgmmH.d.ts → index-8Ai8teoo.d.ts} +1 -1
  16. package/dist/{index-CHeY7_A1.d.ts → index-BZCX9eJJ.d.ts} +13 -0
  17. package/dist/index.d.ts +4 -3
  18. package/dist/index.js +14 -13
  19. package/dist/{marksStore-DGCXjTmZ.js → marksStore-a9oIMMot.js} +25 -1
  20. package/dist/observability.d.ts +1 -1
  21. package/dist/proactive.d.ts +66 -0
  22. package/dist/proactive.js +237 -0
  23. package/dist/templates.js +1 -1
  24. package/dist/{uiMarkTools-DZ6akjQK.js → uiMarkTools-B2581Qg-.js} +1 -1
  25. package/dist/{useWorkflowProposal-UtJYycLv.js → use-workflow-tests-BUzndyWO.js} +4 -3265
  26. package/dist/useWorkflowProposal-B9vXLKef.js +3280 -0
  27. package/dist/workflow-builder.js +2 -2
  28. package/dist/workflow-host.d.ts +2 -1
  29. package/dist/workflow-pages.d.ts +1 -1
  30. package/dist/workflow-pages.js +5 -5
  31. package/package.json +7 -3
package/dist/index.js CHANGED
@@ -1,27 +1,28 @@
1
1
  "use client";
2
2
  import { An as ExecuteStepDocument, B as resolveUiSpec, Cn as BuilderRunNodeDetailsDocument, Dn as CreateWorkflowDefinitionDocument, En as CreateWorkflowVersionDocument, Jt as useNodeExecution, On as ExecutionDetailDocument, Sn as BuilderRunStatusDocument, Tn as SaveWorkflowDraftDocument, V as stripSubmitActions, an as openRunQuotaUpgradePrompt, b as fetchAllNodeEndpointConfigs, bn as NodeEndpointConfigsDocument, gt as createThenOpen, ht as classifyCreateRefusal, in as useFluidGridsAnalytics, kn as RunFromNodeDocument, m as refetchStoreNodes, n as FluidGridsProvider, pt as blankWorkflowCreateInput, r as useFluidGridsContext, vn as NodePaletteEntriesDocument, wn as TriggerWorkflowDocument, xn as EventRegistrationsDocument, yn as NodeManifestsDocument } from "./FluidGridsProvider-DQP7gPxN.js";
3
- import { n as WorkflowBuilderCore, r as EnsureThemeProvider, t as WorkflowBuilder } from "./WorkflowBuilder-CQWz7dXc.js";
3
+ import { n as WorkflowBuilderCore, r as EnsureThemeProvider, t as WorkflowBuilder } from "./WorkflowBuilder-Dp9chOr5.js";
4
4
  import { a as useCreateWorkflowFirst, i as FirstWorkflowChecklistView, r as FirstWorkflowChecklist, t as WorkflowsList } from "./WorkflowsList-C86YEuZZ.js";
5
- import { a as START_NAME_PARAM, c as readStartNodeRequest, i as START_FIELD_PREFIX, l as startNodeLink, o as START_NODE_PARAM, r as GuidedTourStarter, s as START_OPERATION_PARAM, t as WorkflowBuilder$1 } from "./WorkflowBuilder-BdnCh2hB.js";
5
+ import { a as START_NAME_PARAM, c as readStartNodeRequest, i as START_FIELD_PREFIX, l as startNodeLink, o as START_NODE_PARAM, r as GuidedTourStarter, s as START_OPERATION_PARAM, t as WorkflowBuilder$1 } from "./WorkflowBuilder-LkCC0Arp.js";
6
6
  import { t as WorkflowSearchRedirect } from "./WorkflowSearchRedirect-DoiDmeyL.js";
7
- import { r as extractTemplateGraph, t as TemplatePreview } from "./TemplatePreview-WiRz3SCv.js";
8
- import { a as CancelWorkflowGenerationDocument, i as GenerateWorkflowFromPromptDocument, r as WorkflowGenerationDocument, t as AiStudioPage } from "./AiStudioPage-DZ0YBcTL.js";
7
+ import { r as extractTemplateGraph, t as TemplatePreview } from "./TemplatePreview-DYxxlBad.js";
8
+ import { a as CancelWorkflowGenerationDocument, i as GenerateWorkflowFromPromptDocument, r as WorkflowGenerationDocument, t as AiStudioPage } from "./AiStudioPage-Di3eW5Lb.js";
9
9
  import { t as ThemeProvider } from "./theme-provider-B3mIuz2d.js";
10
10
  import { a as isDurableFunctionNodeType, i as filterPaletteNodes, n as RUN_CONTROL_NODE_TYPES, o as isNodeTypeHiddenFromPalette, r as WORKFLOW_TEST_NODE_TYPES, s as isRunControlNodeType, t as DURABLE_FUNCTION_NODE_TYPES } from "./durable-nodes-DXCCQYWD.js";
11
- import { A as SetWorkflowRolloutDocument, B as ApproveWorkflowPromotionDocument, C as WorkflowGenerationTemplatesDocument, D as UpdateWorkflowEnvironmentPolicyDocument, E as WorkflowAuthoringDocument, F as PushWorkflowToGitDocument, H as AcquireWorkflowEditLeaseDocument, I as LinkWorkflowGitRepositoryDocument, L as DeployWorkflowVersionToDevDocument, M as RequestWorkflowPromotionDocument, N as ReleaseWorkflowEditLeaseDocument, O as UnlinkWorkflowGitRepositoryDocument, P as RejectWorkflowPromotionDocument, R as DeleteWorkflowRolloutDocument, S as WorkflowGitCommitsDocument, T as WorkflowEditLeaseDocument, V as ActivateWorkflowVersionCheckedDocument, _ as WorkflowProposalCodeDocument, b as WorkflowGitPushesDocument, c as RunsUsageMeter, g as WorkflowVersionDrainageDocument, h as WorkflowVersioningDocument, j as RestoreWorkflowFromGitDocument, k as TakeOverWorkflowEditLeaseDocument, l as RunsUsageMeterView, m as FluidGridsMark, o as BUILDER_FULLSCREEN_ATTRIBUTE, s as BUILDER_FULLSCREEN_EVENT, t as FlowBuilderPage, u as useRunsQuota, v as WorkflowPromotionRequestsDocument, w as WorkflowEnvironmentsDocument, x as WorkflowGitDiffDocument, y as WorkflowGitRepositoryDocument, z as CancelWorkflowPromotionDocument } from "./flow-builder-CJ00qt1Z.js";
11
+ import { A as SetWorkflowRolloutDocument, B as ApproveWorkflowPromotionDocument, C as WorkflowGenerationTemplatesDocument, D as UpdateWorkflowEnvironmentPolicyDocument, E as WorkflowAuthoringDocument, F as PushWorkflowToGitDocument, H as AcquireWorkflowEditLeaseDocument, I as LinkWorkflowGitRepositoryDocument, L as DeployWorkflowVersionToDevDocument, M as RequestWorkflowPromotionDocument, N as ReleaseWorkflowEditLeaseDocument, O as UnlinkWorkflowGitRepositoryDocument, P as RejectWorkflowPromotionDocument, R as DeleteWorkflowRolloutDocument, S as WorkflowGitCommitsDocument, T as WorkflowEditLeaseDocument, V as ActivateWorkflowVersionCheckedDocument, _ as WorkflowProposalCodeDocument, b as WorkflowGitPushesDocument, c as RunsUsageMeter, g as WorkflowVersionDrainageDocument, h as WorkflowVersioningDocument, j as RestoreWorkflowFromGitDocument, k as TakeOverWorkflowEditLeaseDocument, l as RunsUsageMeterView, m as FluidGridsMark, o as BUILDER_FULLSCREEN_ATTRIBUTE, s as BUILDER_FULLSCREEN_EVENT, t as FlowBuilderPage, u as useRunsQuota, v as WorkflowPromotionRequestsDocument, w as WorkflowEnvironmentsDocument, x as WorkflowGitDiffDocument, y as WorkflowGitRepositoryDocument, z as CancelWorkflowPromotionDocument } from "./flow-builder-7gVV3Y8R.js";
12
12
  import { $ as UpdateCodecServerSettingsDocument, Ct as UpdateActivityOptionsDocument, Et as PauseActivityDocument, G as CodecServerSettingsDocument, H as WorkflowScheduleDescribeDocument, J as UnpauseWorkflowScheduleDocument, K as WorkflowSearchAttributesDocument, Q as UpdateArchiveSettingsDocument, St as CompleteActivityByIdDocument, Tt as UnpauseActivityDocument, U as WorkflowCodeBundleSdkDocument, W as ArchiveSettingsDocument, X as BackfillWorkflowScheduleDocument, Y as PauseWorkflowScheduleDocument, Z as TriggerWorkflowScheduleDocument, _t as CancelBatchOperationDocument, at as WorkflowRunUpdateDocument, bt as StartBatchOperationDocument, ct as WorkflowBatchOperationsDocument, dt as UpsertWorkflowRunSearchAttributesDocument, et as DeleteWorkflowSearchAttributeDocument, ft as UpdateWorkflowRunDocument, gt as ResetWorkflowRunDocument, ht as ResetWorkflowRunToLastCleanTaskDocument, it as WorkflowSignalTokensDocument, lt as RunControlFieldsDocument, mt as CreateWorkflowSignalTokenDocument, nt as DeleteActivityPauseRuleDocument, ot as WorkflowRunHistoryArchiveDocument, pt as RevokeWorkflowSignalTokenDocument, q as WorkflowActivityPauseRulesDocument, rt as CreateActivityPauseRuleDocument, st as WorkflowBatchOperationDocument, tt as CreateWorkflowSearchAttributeDocument, ut as QueryWorkflowRunDocument, vt as StartBatchExportDocument, wt as ResetActivityDocument, xt as FailActivityByIdDocument, yt as StartBatchTerminateDocument } from "./api-CEnNq15C.js";
13
13
  import { a as ResumeExecutionDocument, i as RetryNodeDocument, n as ExecutionStatsDocument, o as PauseExecutionDocument, r as TerminateExecutionDocument, s as CancelExecutionDocument, t as ExecutionsListDocument } from "./ExecutionsListDocument-CzdLPpj5.js";
14
14
  import { _ as DurableParityRunFieldsDocument, g as WorkflowRunMetadataDocument, h as WorkflowRunPendingDocument, m as WorkflowRunsCountDocument, v as SetWorkflowRunVersioningOverrideDocument } from "./useDurableParity-BUSM-z_7.js";
15
15
  import { c as RunEventAppendedDocument, d as WorkflowRunDeterminismStatusDocument, f as DurableRunFieldsDocument, l as WorkflowRunStackTraceDocument, m as SignalWorkflowRunDocument, p as TerminateWorkflowRunDocument, u as WorkflowRunHistoryDocument } from "./useRunHistory-Bxs6LrME.js";
16
16
  import { a as getGraphQLEndpoint, c as setFluidGridsConfig, d as applyFluidGridsTheme, f as sanitizeThemeValue, m as themeToCssVariables, o as resetFluidGridsConfig, p as themeKey, r as getFluidGridsConfig, s as resetFluidGridsExecutionState, t as config, u as FLUIDGRIDS_THEME_TOKEN_MAP } from "./config-X97zrIvn.js";
17
- import { r as WorkflowBatchOperationUpdatedDocument, t as ExecutionsListPage } from "./ExecutionsListPage-Dr0Ychbr.js";
18
- import { a as AgentStepUpdatedDocument, c as AgentTraceDocument, i as ExplainRunDocument, o as WorkflowRunHierarchyDocument, r as RunHumanRequests, s as RunAiUsageDocument, t as ExecutionDetailPage } from "./ExecutionDetailPage-CoRLOiiZ.js";
17
+ import { r as WorkflowBatchOperationUpdatedDocument, t as ExecutionsListPage } from "./ExecutionsListPage-ZCmFNid9.js";
18
+ import { a as AgentStepUpdatedDocument, c as AgentTraceDocument, i as ExplainRunDocument, o as WorkflowRunHierarchyDocument, r as RunHumanRequests, s as RunAiUsageDocument, t as ExecutionDetailPage } from "./ExecutionDetailPage-B2jVApvM.js";
19
19
  import { i as FileDownloadUrlDocument, n as WorkflowCodeSourceDocument, r as BuildWorkflowCodeDocument, t as WorkflowEditLeaseStatusDocument } from "./WorkflowEditLeaseStatusDocument-Dp62med3.js";
20
20
  import { c as RunLogAppendedDocument, l as RunLogsDocument } from "./agent-form-D0uLvzx4.js";
21
- import { A as ProposeRunFixDocument, C as RunWorkflowTestsDocument, D as CreateWorkflowTestCaseDocument, E as UpdateWorkflowTestCaseDocument, M as ApplyWorkflowProposalDocument, N as AgentTokenDeltaDocument, O as RejectWorkflowProposalDocument, S as WorkflowTestCasesDocument, T as DeleteWorkflowTestCaseDocument, b as WorkflowTestRunsDocument, j as CancelWorkflowProposalDocument, k as ProposeWorkflowChangeDocument, w as CreateWorkflowTestCaseFromRunDocument, x as WorkflowTestRunDocument } from "./useWorkflowProposal-UtJYycLv.js";
21
+ import { C as CreateWorkflowTestCaseFromRunDocument, D as AgentTokenDeltaDocument, E as CreateWorkflowTestCaseDocument, S as RunWorkflowTestsDocument, T as UpdateWorkflowTestCaseDocument, b as WorkflowTestRunDocument, w as DeleteWorkflowTestCaseDocument, x as WorkflowTestCasesDocument, y as WorkflowTestRunsDocument } from "./use-workflow-tests-BUzndyWO.js";
22
22
  import { a as ConnectionSelector, c as StopWebhookTestListenerDocument, i as RunOnSection, l as ListenForWebhookTestEventDocument, n as PopoverContent, o as WorkflowCallInputsDocument, r as PopoverTrigger, s as WebhookTestListenerDocument, t as Popover, u as ListenForFormTestSubmissionDocument } from "./popover-DuaVzhfH.js";
23
23
  import { t as ConnectionFormDialog } from "./ConnectionFormDialog-Dr1-CTan.js";
24
24
  import { a as DashboardSummaryDocument, c as ImportWorkflowDocument, d as DeactivateWorkflowDefinitionDocument, f as ActivateWorkflowDefinitionDocument, i as WorkflowDefinitionsDocument, l as DuplicateWorkflowDocument, n as WorkflowRunsDocument, o as UpdateWorkflowDefinitionDocument, r as WorkflowRunDocument, s as RestoreWorkflowVersionDocument, t as WorkflowVersionsDocument, u as DeleteWorkflowDefinitionDocument } from "./WorkflowVersionsDocument-DRVOp8Uj.js";
25
+ import { a as CancelWorkflowProposalDocument, i as ProposeRunFixDocument, n as RejectWorkflowProposalDocument, o as ApplyWorkflowProposalDocument, r as ProposeWorkflowChangeDocument } from "./useWorkflowProposal-B9vXLKef.js";
25
26
  import { _ as BulkAssignWorkflowsToProjectDocument, c as RenameWorkflowProjectDocument, d as DeleteWorkflowProjectDocument, f as DeleteWorkflowFolderDocument, g as BulkDeleteWorkflowsDocument, h as BulkMoveWorkflowsToFolderDocument, l as RenameWorkflowFolderDocument, m as CreateWorkflowFolderDocument, o as WorkflowProjectsDocument, p as CreateWorkflowProjectDocument, s as WorkflowFoldersDocument, u as MoveWorkflowFolderDocument } from "./useWorkflowOrganization-r5FWNBs6.js";
26
27
  import { a as useInitiateOAuth, c as NodeSchemaIntrospectionDocument, i as useCreateConnection, l as RemoveNodeFromWorkflowsDocument, n as useConnections, o as useProviders, r as useConnectionsByProvider, s as NodeUsageStatusDocument, t as useConnection } from "./useConnections-BlB0gbOB.js";
27
28
  import { c as SetRunFailureTriageEnabledDocument, l as FgTriageFailedRunsDocument, o as RunFailureTriageSettingsDocument, s as RunFailureClustersDocument, u as DismissRunFailureClusterDocument } from "./FailureTriagePanel-DA91XKVj.js";
@@ -67,8 +68,8 @@ import { t as EntityTagPicker } from "./EntityTagPicker-BppBSEJk.js";
67
68
  import { c as useReplaceEntityTags, d as useUntagEntity, f as DataTablesTagsDocument, i as useCreateTag, l as useSearchTags, n as tagLabel, o as useDraftEntityTags, r as useAvailableTags, s as useEntityTags, t as FLUIDGRIDS_ENTITY_TYPES, u as useTagEntity } from "./useEntityTags-4iW6UTly.js";
68
69
  import { t as cn } from "./cn-QqidFIgr.js";
69
70
  import { n as useFluidGridsPageControls, t as FluidGridsAssistantBridge } from "./pageControlsBridge-0pX9s-3k.js";
70
- import { a as triggerNodesOf, i as pickTriggerNode, n as AgentCalloutOverlay, r as createFluidGridsAgentTools, t as createUiMarkTools } from "./uiMarkTools-DZ6akjQK.js";
71
- import { n as useAgentMarksStore, t as resetAgentMarks } from "./marksStore-DGCXjTmZ.js";
71
+ import { a as triggerNodesOf, i as pickTriggerNode, n as AgentCalloutOverlay, r as createFluidGridsAgentTools, t as createUiMarkTools } from "./uiMarkTools-B2581Qg-.js";
72
+ import { n as useAgentMarksStore, t as resetAgentMarks } from "./marksStore-a9oIMMot.js";
72
73
  import { _ as useWorkflowTestsEnabled, a as resolveFluidGridsFlagsSettled, c as useContinuousOptimisationEnabled, d as useFluidGridsFlag, f as useFluidGridsFlagsSettled, g as useSelfHostedWorkersEnabled, h as usePhaseDFlags, i as PHASE_D_FLAGS_OFF, l as useDurableFunctionNodesEnabled, m as usePhaseCFlags, n as FLUIDGRIDS_FLAG_DEFAULTS, o as resolvePhaseCFlags, p as usePaletteGates, r as PHASE_C_FLAGS_OFF, s as resolvePhaseDFlags, t as FLUIDGRIDS_FLAGS, u as useDurableParityEnabled } from "./feature-flags-B_b8PJ6Z.js";
73
74
  import { c as isQuotaExhaustedFailure, i as WORKFLOWS_QUOTA_NAME, r as RUNS_QUOTA_NAME, s as findQuotaRefusal, t as BILLING_PLANS_PATH } from "./quota-Cdt8yz7N.js";
74
75
  import { c as CreateWorkflowRefusalDialog, l as ExportWorkflowCodeDocument } from "./useWorkflowCodeExport-Bj4QY-xY.js";
@@ -4439,9 +4440,9 @@ const FluidgridsAvailableTagFieldsFragmentDoc = {
4439
4440
 
4440
4441
  // src/components/FluidGridsRoot.tsx
4441
4442
  const WorkflowsList$1 = lazy(() => import("./WorkflowsList-C86YEuZZ.js").then((n) => n.n).then((m) => ({ default: m.WorkflowsList })));
4442
- const WorkflowBuilder$2 = lazy(() => import("./WorkflowBuilder-BdnCh2hB.js").then((n) => n.n).then((m) => ({ default: m.WorkflowBuilder })));
4443
- const ExecutionsListPage$1 = lazy(() => import("./ExecutionsListPage-Dr0Ychbr.js").then((n) => n.n).then((m) => ({ default: m.ExecutionsListPage })));
4444
- const ExecutionDetailPage$1 = lazy(() => import("./ExecutionDetailPage-CoRLOiiZ.js").then((n) => n.n).then((m) => ({ default: m.ExecutionDetailPage })));
4443
+ const WorkflowBuilder$2 = lazy(() => import("./WorkflowBuilder-LkCC0Arp.js").then((n) => n.n).then((m) => ({ default: m.WorkflowBuilder })));
4444
+ const ExecutionsListPage$1 = lazy(() => import("./ExecutionsListPage-ZCmFNid9.js").then((n) => n.n).then((m) => ({ default: m.ExecutionsListPage })));
4445
+ const ExecutionDetailPage$1 = lazy(() => import("./ExecutionDetailPage-B2jVApvM.js").then((n) => n.n).then((m) => ({ default: m.ExecutionDetailPage })));
4445
4446
  const PageLoader = () => /* @__PURE__ */ jsx("div", {
4446
4447
  className: "flex items-center justify-center h-64",
4447
4448
  children: /* @__PURE__ */ jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-primary" })
@@ -46,6 +46,14 @@ const CALLOUT_LABEL_MAX = 200;
46
46
  const NOTE_MESSAGE_MAX = 280;
47
47
  /** A workflow holds at most this many notes, resolved ones included. */
48
48
  const MAX_NOTES_PER_WORKFLOW = 20;
49
+ const NO_CANVAS_SUGGESTIONS = {
50
+ items: [],
51
+ controls: null
52
+ };
53
+ function sameCanvas(a, b) {
54
+ if (a === null || b === null) return a === b;
55
+ return a.workflowKey === b.workflowKey && a.nodeIds.length === b.nodeIds.length && a.nodeIds.every((id, index) => id === b.nodeIds[index]);
56
+ }
49
57
  let sequence = 0;
50
58
  const nextId = (prefix) => {
51
59
  sequence += 1;
@@ -57,6 +65,8 @@ const useAgentMarksStore = create()((set, get) => ({
57
65
  nextNumber: {},
58
66
  openNoteId: null,
59
67
  flash: null,
68
+ canvas: null,
69
+ canvasSuggestions: NO_CANVAS_SUGGESTIONS,
60
70
  actions: {
61
71
  addCallout: ({ label, target, element, route }) => {
62
72
  const callout = {
@@ -134,6 +144,18 @@ const useAgentMarksStore = create()((set, get) => ({
134
144
  nodeId,
135
145
  token: sequence
136
146
  } });
147
+ },
148
+ setCanvas: (canvas) => {
149
+ if (sameCanvas(get().canvas, canvas)) return;
150
+ set({ canvas });
151
+ },
152
+ setCanvasSuggestions: (items, controls) => {
153
+ const current = get().canvasSuggestions;
154
+ if (items.length === 0 && current.items.length === 0) return;
155
+ set({ canvasSuggestions: items.length === 0 ? NO_CANVAS_SUGGESTIONS : {
156
+ items,
157
+ controls
158
+ } });
137
159
  }
138
160
  }
139
161
  }));
@@ -144,7 +166,9 @@ function resetAgentMarks() {
144
166
  notes: [],
145
167
  nextNumber: {},
146
168
  openNoteId: null,
147
- flash: null
169
+ flash: null,
170
+ canvas: null,
171
+ canvasSuggestions: NO_CANVAS_SUGGESTIONS
148
172
  });
149
173
  }
150
174
 
@@ -1,3 +1,3 @@
1
1
 
2
- import { AFa as DataSinkDashboardPage, Aa as LogStreamDestination, DFa as InsightsPage, Da as DataSinkData, EFa as ErrorAnalyticsPage, Ea as DashboardSummary, Ma as LogStreamEventType, Na as LogStreamProvider, Oa as DataSinkSummary, Pa as NodeUsageStat, ja as LogStreamDestinationInput, ka as FailedRun } from "./index-Df6NgmmH.js";
2
+ import { AFa as DataSinkDashboardPage, Aa as LogStreamDestination, DFa as InsightsPage, Da as DataSinkData, EFa as ErrorAnalyticsPage, Ea as DashboardSummary, Ma as LogStreamEventType, Na as LogStreamProvider, Oa as DataSinkSummary, Pa as NodeUsageStat, ja as LogStreamDestinationInput, ka as FailedRun } from "./index-8Ai8teoo.js";
3
3
  export { type DashboardSummary, DataSinkDashboardPage, type DataSinkData, type DataSinkSummary, ErrorAnalyticsPage, type FailedRun, InsightsPage, type LogStreamDestination, type LogStreamDestinationInput, type LogStreamEventType, type LogStreamProvider, type NodeUsageStat };
@@ -0,0 +1,66 @@
1
+
2
+ import { n as FluidGridsTranslationProvider, r as FluidGridsTranslationProviderProps } from "./TranslationBridge-Bd4aJKMs.js";
3
+ import { FC } from "react";
4
+ import { ApolloClient } from "@apollo/client";
5
+ import { ProactiveActionHandler, ProactiveAnchor, SuggestionAnchorAdapter } from "@burdenoff/fe-libs/shared/proactive";
6
+ import { z } from "zod";
7
+ export declare const FLUIDGRIDS_PROACTIVE_ENTITY: {
8
+ readonly run: "workflow_run";
9
+ readonly workflow: "workflow";
10
+ readonly connection: "connection";
11
+ };
12
+ type FluidGridsProactiveEntityType = (typeof FLUIDGRIDS_PROACTIVE_ENTITY)[keyof typeof FLUIDGRIDS_PROACTIVE_ENTITY];
13
+ export declare const FLUIDGRIDS_PROACTIVE_ACTION: {
14
+ readonly reviewProposal: "review-proposal";
15
+ readonly proposeFix: "propose-fix";
16
+ readonly openConnection: "open-connection";
17
+ };
18
+ export declare function runSuggestAnchorProps(runId: string): Record<string, string>;
19
+ export declare function isFluidGridsProactiveRoute(path: string): boolean;
20
+ export declare function proactiveRunPath(runId: string): string;
21
+ export declare function proactiveWorkflowPath(workflowKey: string, version?: string): string;
22
+ export declare function proactiveConnectionPath(connectionId: string): string;
23
+ export declare const REVIEW_PROPOSAL_ARGS: z.ZodObject<{
24
+ proposalId: z.ZodString;
25
+ }, z.core.$strict>;
26
+ export declare const PROPOSE_FIX_ARGS: z.ZodObject<{
27
+ runId: z.ZodString;
28
+ }, z.core.$strict>;
29
+ export declare const OPEN_CONNECTION_ARGS: z.ZodObject<{
30
+ connectionId: z.ZodString;
31
+ }, z.core.$strict>;
32
+ export declare class ProactiveNavigationRefusedError extends Error {
33
+ constructor(path: string);
34
+ }
35
+ export declare function createFluidGridsProactiveActions(): Readonly<Record<string, ProactiveActionHandler>>;
36
+ export declare function canvasResolvesAnchor(anchor: ProactiveAnchor): boolean;
37
+ export declare const fluidGridsWorkflowAnchorAdapter: SuggestionAnchorAdapter;
38
+ export declare const FLUIDGRIDS_PROACTIVE_ANCHOR_ADAPTERS: Readonly<Record<string, SuggestionAnchorAdapter>>;
39
+ type ProposalReviewRequest = {
40
+ kind: "review";
41
+ proposalId: string;
42
+ token: number;
43
+ } | {
44
+ kind: "runFix";
45
+ runId: string;
46
+ token: number;
47
+ };
48
+ type NewProposalReviewRequest = {
49
+ kind: "review";
50
+ proposalId: string;
51
+ } | {
52
+ kind: "runFix";
53
+ runId: string;
54
+ };
55
+ interface ProposalReviewState {
56
+ request: ProposalReviewRequest | null;
57
+ }
58
+ export declare const useProposalReviewStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ProposalReviewState>>;
59
+ export declare function requestProposalReview(input: NewProposalReviewRequest): void;
60
+ export declare function closeProposalReview(): void;
61
+ interface ProactiveProposalReviewProps {
62
+ client?: ApolloClient | null;
63
+ onOpenWorkflow: (workflowKey: string, version: string) => void;
64
+ }
65
+ export declare const ProactiveProposalReview: FC<ProactiveProposalReviewProps>;
66
+ export { type FluidGridsProactiveEntityType, FluidGridsTranslationProvider, type FluidGridsTranslationProviderProps, type NewProposalReviewRequest, type ProactiveProposalReviewProps, type ProposalReviewRequest };
@@ -0,0 +1,237 @@
1
+ "use client";
2
+ import { n as FLUIDGRIDS_PROACTIVE_ENTITY, r as runSuggestAnchorProps, t as FLUIDGRIDS_PROACTIVE_ACTION } from "./entities-I_0kio3q.js";
3
+ import { n as useAgentMarksStore } from "./marksStore-a9oIMMot.js";
4
+ import { t as WorkflowProposalCard } from "./WorkflowProposalCard-SmRv_Egf.js";
5
+ import { n as FluidGridsTranslationProvider, r as useTr } from "./TranslationBridge-Da-TPgQm.js";
6
+ import { t as useWorkflowProposal } from "./useWorkflowProposal-B9vXLKef.js";
7
+ import { useEffect } from "react";
8
+ import { create } from "zustand";
9
+ import { jsx, jsxs } from "react/jsx-runtime";
10
+ import { toast } from "sonner";
11
+ import { ResponsiveDialog, ResponsiveDialogContent, ResponsiveDialogDescription, ResponsiveDialogHeader, ResponsiveDialogTitle } from "@burdenoff/fe-libs/ui";
12
+ import { defineProactiveAction } from "@burdenoff/fe-libs/shared/proactive";
13
+ import { z } from "zod";
14
+
15
+ // src/proactive/paths.ts
16
+ /**
17
+ * ★ BOFF-13166: the in-app paths a FluidGrids proactive suggestion may open,
18
+ * and the allowlist the shell gives `ProactiveProvider` as `isAllowedRoute`.
19
+ *
20
+ * The routes are microfe-workflows' (`/workflows/*`) and microfe-integrations'
21
+ * (`/integrations/*`). A path is allowed only when its every segment is a
22
+ * plain id: no query, no fragment, no encoded separators, so a suggestion can
23
+ * only ever open one of these pages, never an arbitrary one.
24
+ */
25
+ /** One path segment: an id, a workflowKey slug or a version such as `v3`. */
26
+ const SEGMENT = "[A-Za-z0-9][A-Za-z0-9_.-]{0,127}";
27
+ const ALLOWED_ROUTES = [
28
+ new RegExp(`^/workflows/runs(?:/${SEGMENT})?$`),
29
+ new RegExp(`^/workflows/workflow/${SEGMENT}(?:/${SEGMENT})?$`),
30
+ /^\/workflows\/list$/,
31
+ /^\/workflows\/insights(?:\/errors)?$/,
32
+ new RegExp(`^/integrations/connections(?:/${SEGMENT})?$`)
33
+ ];
34
+ /** May a proactive `navigate` action open this path in FluidGrids? */
35
+ function isFluidGridsProactiveRoute(path) {
36
+ return ALLOWED_ROUTES.some((route) => route.test(path));
37
+ }
38
+ /** A run's detail page. */
39
+ function proactiveRunPath(runId) {
40
+ return `/workflows/runs/${encodeURIComponent(runId)}`;
41
+ }
42
+ /** A workflow in the builder, at a version when one is given. */
43
+ function proactiveWorkflowPath(workflowKey, version) {
44
+ const base = `/workflows/workflow/${encodeURIComponent(workflowKey)}`;
45
+ return version ? `${base}/${encodeURIComponent(version)}` : base;
46
+ }
47
+ /** A connection's detail page, where the person reconnects it. */
48
+ function proactiveConnectionPath(connectionId) {
49
+ return `/integrations/connections/${encodeURIComponent(connectionId)}`;
50
+ }
51
+
52
+ // src/proactive/proposalReviewStore.ts
53
+ const useProposalReviewStore = create()(() => ({ request: null }));
54
+ let token = 0;
55
+ /** Open the review dialog on a proposal, or on a fix to propose for a run. */
56
+ function requestProposalReview(input) {
57
+ token += 1;
58
+ useProposalReviewStore.setState({ request: {
59
+ ...input,
60
+ token
61
+ } });
62
+ }
63
+ /** Close the review dialog. */
64
+ function closeProposalReview() {
65
+ useProposalReviewStore.setState({ request: null });
66
+ }
67
+
68
+ // src/proactive/actions.ts
69
+ /**
70
+ * ★ BOFF-13166: the FluidGrids proactive action handlers, registered with the
71
+ * shell's `ProactiveProvider` (`actions`). Each one runs only from a person's
72
+ * click on a suggestion card, and its arguments were bound by the backend
73
+ * pack's detector, never by a model; the zod schema below rejects anything
74
+ * else, and an action whose arguments do not validate is not offered at all.
75
+ *
76
+ * - `review-proposal` `{ proposalId }`: opens an existing AI proposal (a
77
+ * run-failure triage cluster's or an optimisation suggestion's) in the same
78
+ * card the run page shows. Applying it creates a new DRAFT version only.
79
+ * - `propose-fix` `{ runId }`: asks the workflow service for a fix to a failed
80
+ * run (`proposeRunFix`, as the person), then shows it in that card once it is
81
+ * ready.
82
+ * - `open-connection` `{ connectionId }`: opens the connection's page, where
83
+ * it is reconnected.
84
+ *
85
+ * Nothing here grants anything: the proposal and the connection are read again
86
+ * through the API under the person's own session, and its `@rbac` decides.
87
+ */
88
+ /** An id as the backend pack binds it (the same bounds fe-libs uses). */
89
+ const ID = z.string().trim().min(1).max(255).regex(/^[A-Za-z0-9][A-Za-z0-9_.-]*$/);
90
+ const REVIEW_PROPOSAL_ARGS = z.strictObject({ proposalId: ID });
91
+ const PROPOSE_FIX_ARGS = z.strictObject({ runId: ID });
92
+ const OPEN_CONNECTION_ARGS = z.strictObject({ connectionId: ID });
93
+ var ProactiveNavigationRefusedError = class extends Error {
94
+ constructor(path) {
95
+ super(`The page ${path} could not be opened.`);
96
+ this.name = "ProactiveNavigationRefusedError";
97
+ }
98
+ };
99
+ /** The FluidGrids handlers, by action type, for `ProactiveProvider`'s `actions`. */
100
+ function createFluidGridsProactiveActions() {
101
+ return {
102
+ [FLUIDGRIDS_PROACTIVE_ACTION.reviewProposal]: defineProactiveAction({
103
+ args: REVIEW_PROPOSAL_ARGS,
104
+ run: ({ proposalId }) => {
105
+ requestProposalReview({
106
+ kind: "review",
107
+ proposalId
108
+ });
109
+ }
110
+ }),
111
+ [FLUIDGRIDS_PROACTIVE_ACTION.proposeFix]: defineProactiveAction({
112
+ args: PROPOSE_FIX_ARGS,
113
+ run: ({ runId }) => {
114
+ requestProposalReview({
115
+ kind: "runFix",
116
+ runId
117
+ });
118
+ }
119
+ }),
120
+ [FLUIDGRIDS_PROACTIVE_ACTION.openConnection]: defineProactiveAction({
121
+ args: OPEN_CONNECTION_ARGS,
122
+ run: ({ connectionId }, context) => {
123
+ const path = proactiveConnectionPath(connectionId);
124
+ if (!context.navigate(path)) throw new ProactiveNavigationRefusedError(path);
125
+ }
126
+ })
127
+ };
128
+ }
129
+
130
+ // src/proactive/workflowAnchorAdapter.ts
131
+ /** Is this anchor the saved workflow open on the canvas? */
132
+ function canvasResolvesAnchor(anchor) {
133
+ const canvas = useAgentMarksStore.getState().canvas;
134
+ return canvas !== null && anchor.entityType === FLUIDGRIDS_PROACTIVE_ENTITY.workflow && anchor.entityId === canvas.workflowKey;
135
+ }
136
+ const fluidGridsWorkflowAnchorAdapter = {
137
+ canResolve: canvasResolvesAnchor,
138
+ update: (suggestions, controls) => {
139
+ useAgentMarksStore.getState().actions.setCanvasSuggestions(suggestions, suggestions.length === 0 ? null : controls);
140
+ }
141
+ };
142
+ /** The adapters to pass as `ProactiveProvider`'s `anchorAdapters`. */
143
+ const FLUIDGRIDS_PROACTIVE_ANCHOR_ADAPTERS = { [FLUIDGRIDS_PROACTIVE_ENTITY.workflow]: fluidGridsWorkflowAnchorAdapter };
144
+
145
+ // src/proactive/ProactiveProposalReview.tsx
146
+ /**
147
+ * ★ BOFF-13166: the review dialog behind the proactive `review-proposal` and
148
+ * `propose-fix` actions.
149
+ *
150
+ * The shell mounts one. When a suggestion's action puts a request in
151
+ * `proposalReviewStore`, the dialog opens on it and shows the same
152
+ * `WorkflowProposalCard` the run page shows (BOFF-3662):
153
+ *
154
+ * - `review`: the existing proposal is read, and polled while it is still
155
+ * PROCESSING;
156
+ * - `runFix`: `proposeRunFix` is called as the person, exactly as the run
157
+ * page's "Propose a fix" does, and the card appears once the proposal is
158
+ * ready.
159
+ *
160
+ * Apply creates a new DRAFT version and never activates anything; Reject and
161
+ * Cancel are the card's own. The workspace gateway's `@rbac` decides every one
162
+ * of these calls; a refusal is shown as the card's error.
163
+ */
164
+ const ProactiveProposalReview = ({ client, onOpenWorkflow }) => {
165
+ const tr = useTr();
166
+ const request = useProposalReviewStore((state) => state.request);
167
+ const proposal = useWorkflowProposal({ client: client ?? null });
168
+ const { start, open, reset } = proposal;
169
+ const token = request?.token ?? null;
170
+ const kind = request?.kind ?? null;
171
+ const target = request === null ? null : request.kind === "review" ? request.proposalId : request.runId;
172
+ useEffect(() => {
173
+ if (token === null || kind === null || target === null) return;
174
+ if (kind === "review") open(target);
175
+ else start({
176
+ kind: "runFix",
177
+ runId: target
178
+ });
179
+ }, [
180
+ token,
181
+ kind,
182
+ target,
183
+ open,
184
+ start
185
+ ]);
186
+ const close = () => {
187
+ closeProposalReview();
188
+ reset();
189
+ };
190
+ const apply = async () => {
191
+ const applied = await proposal.apply();
192
+ const appliedStatus = applied ? String(applied.status) : void 0;
193
+ if (appliedStatus === "APPLIED") toast.success(tr("fluidgrids.ai.runAssist.appliedToast", "Fix saved as draft {{version}}", { version: applied?.appliedVersion ?? "" }));
194
+ else if (appliedStatus === "STALE") toast.warning(tr("fluidgrids.ai.runAssist.staleToast", "The workflow changed since this run. Propose the fix again."));
195
+ };
196
+ const openWorkflow = (workflowKey, version) => {
197
+ close();
198
+ onOpenWorkflow(workflowKey, version);
199
+ };
200
+ return /* @__PURE__ */ jsx(ResponsiveDialog, {
201
+ open: request !== null,
202
+ onOpenChange: (next) => {
203
+ if (!next) close();
204
+ },
205
+ children: /* @__PURE__ */ jsxs(ResponsiveDialogContent, {
206
+ className: "max-h-[85vh] overflow-y-auto sm:max-w-2xl",
207
+ "data-agent": "deny",
208
+ "data-testid": "proactive-proposal-review",
209
+ children: [
210
+ /* @__PURE__ */ jsxs(ResponsiveDialogHeader, { children: [/* @__PURE__ */ jsx(ResponsiveDialogTitle, { children: kind === "runFix" ? tr("fluidgrids.proactive.review.fixTitle", "Proposed fix") : tr("fluidgrids.proactive.review.title", "Proposed change") }), /* @__PURE__ */ jsx(ResponsiveDialogDescription, { children: tr("fluidgrids.proactive.review.description", "Applying saves the change as a new draft version. Nothing runs until you activate it.") })] }),
211
+ proposal.isWorking && !proposal.proposal && /* @__PURE__ */ jsx("p", {
212
+ className: "text-sm text-text-secondary",
213
+ "data-testid": "proactive-proposal-working",
214
+ children: kind === "runFix" ? tr("fluidgrids.ai.runAssist.proposing", "Proposing…") : tr("fluidgrids.proactive.review.loading", "Loading…")
215
+ }),
216
+ proposal.error && /* @__PURE__ */ jsx("p", {
217
+ className: "text-sm text-[var(--color-status-error-text)]",
218
+ children: proposal.error
219
+ }),
220
+ proposal.timedOut && /* @__PURE__ */ jsx("p", {
221
+ className: "text-sm text-text-secondary",
222
+ children: tr("fluidgrids.ai.runAssist.timedOut", "The fix is taking longer than usual. Check back in a minute.")
223
+ }),
224
+ proposal.proposal && /* @__PURE__ */ jsx(WorkflowProposalCard, {
225
+ proposal: proposal.proposal,
226
+ isDeciding: proposal.isDeciding,
227
+ onOpenWorkflow: openWorkflow,
228
+ onApply: () => void apply(),
229
+ onReject: () => void proposal.reject(),
230
+ onCancel: () => void proposal.cancel()
231
+ })
232
+ ]
233
+ })
234
+ });
235
+ };
236
+
237
+ export { FLUIDGRIDS_PROACTIVE_ACTION, FLUIDGRIDS_PROACTIVE_ANCHOR_ADAPTERS, FLUIDGRIDS_PROACTIVE_ENTITY, FluidGridsTranslationProvider, OPEN_CONNECTION_ARGS, PROPOSE_FIX_ARGS, ProactiveNavigationRefusedError, ProactiveProposalReview, REVIEW_PROPOSAL_ARGS, canvasResolvesAnchor, closeProposalReview, createFluidGridsProactiveActions, fluidGridsWorkflowAnchorAdapter, isFluidGridsProactiveRoute, proactiveConnectionPath, proactiveRunPath, proactiveWorkflowPath, requestProposalReview, runSuggestAnchorProps, useProposalReviewStore };
package/dist/templates.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
2
  import { t as TemplatesPage } from "./TemplatesPage-Z2LDGg3g.js";
3
- import { t as TemplatePreview } from "./TemplatePreview-WiRz3SCv.js";
3
+ import { t as TemplatePreview } from "./TemplatePreview-DYxxlBad.js";
4
4
 
5
5
  export { TemplatePreview, TemplatesPage };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
3
3
  import { u as nodesOf } from "./fluidgridsEvents-Dm5CaHtr.js";
4
- import { n as useAgentMarksStore } from "./marksStore-DGCXjTmZ.js";
4
+ import { n as useAgentMarksStore } from "./marksStore-a9oIMMot.js";
5
5
  import { useEffect, useState } from "react";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { Sparkles, X } from "lucide-react";