@burdenoff/fluidgrids-fe-sdk 2026.1114.6 → 2026.1115.1

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 (64) hide show
  1. package/dist/{AiStudioPage-C2SBRqab.js → AiStudioPage-CtHmZ3Lw.js} +4 -4
  2. package/dist/{DataSinkDashboardPage-Dnp1yRYQ.js → DataSinkDashboardPage-DFtWv2nD.js} +1 -1
  3. package/dist/{ExecutionDetailPage-B-8s_Sqw.js → ExecutionDetailPage-D5iWwMnk.js} +8 -8
  4. package/dist/{ExecutionsListPage-Ky3TAL9U.js → ExecutionsListPage-BYW5WiX7.js} +6 -6
  5. package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
  6. package/dist/{FluidGridsProvider-C-WGQwuT.js → FluidGridsProvider-CDjkq3Zj.js} +281 -59
  7. package/dist/{HistoryPage-D4rkw4zu.js → HistoryPage-fMZlXsIY.js} +1 -1
  8. package/dist/{InsightsPage-CVzNu4F7.js → InsightsPage-DozSYGVD.js} +1 -1
  9. package/dist/NodeUsageStatusDocument-B-XguSjm.js +531 -0
  10. package/dist/{OpenTemplateAsCodeButton-pepQUqje.js → OpenTemplateAsCodeButton-Cjnagq9H.js} +2 -2
  11. package/dist/{PaidTemplateConfirm-BJCcJh5t.js → PaidTemplateConfirm-Crs0CXXl.js} +1 -1
  12. package/dist/{SettingsPage-BSucNHrq.js → SettingsPage-qSvV7r0y.js} +6 -6
  13. package/dist/{TaskQueuesPage-WMJz9imi.js → TaskQueuesPage-BuWQwT5I.js} +2 -2
  14. package/dist/{TemplateCard-Cx_eZr9q.js → TemplateCard-BsrXJ1Su.js} +21 -5
  15. package/dist/{TemplateConfigurationModal-D2i7ZXOM.js → TemplateConfigurationModal-B_ME8M-1.js} +1 -1
  16. package/dist/{TemplatePreview-DwdGa8bH.js → TemplatePreview-BOIhJSBD.js} +5 -5
  17. package/dist/{TemplatesPage-DF5PK7CB.js → TemplatesPage-dj7NseMt.js} +358 -16
  18. package/dist/{WorkflowBuilder-DkzzbrNn.js → WorkflowBuilder-ByG9twmu.js} +5 -5
  19. package/dist/{WorkflowBuilder-CjsO7i-D.js → WorkflowBuilder-DjpAoBVO.js} +3 -3
  20. package/dist/{WorkflowSearchRedirect-0MLrCjDn.js → WorkflowSearchRedirect-DRidTx1L.js} +1 -1
  21. package/dist/{WorkflowsList-4VADoiz_.js → WorkflowsList-BQ_5hkWi.js} +6 -7
  22. package/dist/{agentTools-DuCukaUX.js → agentTools-Cx5yPBe7.js} +3 -2
  23. package/dist/{api-DKfMt0IX.js → api-CEzqoN5H.js} +1 -1
  24. package/dist/{api-CEnNq15C.js → api-o5UUDbr8.js} +1 -1
  25. package/dist/{canvasNoteTools-DnsO-gHe.js → canvasNoteTools-BxknF5rX.js} +1 -1
  26. package/dist/executions.js +2 -2
  27. package/dist/{flow-builder-CIV6u8y-.js → flow-builder-D8f31DFR.js} +25 -36
  28. package/dist/history.js +1 -1
  29. package/dist/{index-BY0V255h.d.ts → index-BprVea6e.d.ts} +5 -2
  30. package/dist/index.d.ts +1 -1
  31. package/dist/index.js +100 -97
  32. package/dist/{node-detail-view-DkajTGfb.js → node-detail-view-C__INEVF.js} +9 -219
  33. package/dist/{node-editor-tab-body-ChLrBfKp.js → node-editor-tab-body-BintGoSp.js} +2 -2
  34. package/dist/observability.d.ts +1 -1
  35. package/dist/observability.js +2 -2
  36. package/dist/{popover-CCJlf41J.js → popover-2-6xmS1q.js} +3 -3
  37. package/dist/{quick-config-panel-Bq_uF9XF.js → quick-config-panel-Bxi9TwCG.js} +3 -3
  38. package/dist/{schedule-panel-7TtPt1t_.js → schedule-panel-BbRtGDEt.js} +6 -6
  39. package/dist/settings.js +1 -1
  40. package/dist/{shared-C0LCTtyh.js → shared-mbyvDPde.js} +2 -24
  41. package/dist/{sidebar-node-editor-n-7ux5IN.js → sidebar-node-editor-DG-34YEW.js} +3 -3
  42. package/dist/{template-code-B3cMigJS.js → template-code-B7x-XMAm.js} +9 -2
  43. package/dist/templates.js +2 -2
  44. package/dist/typed-calls-BqokR321.js +26 -0
  45. package/dist/{WorkflowEditLeaseStatusDocument-Dp62med3.js → use-workflow-code-editor-CBOkjntt.js} +216 -90
  46. package/dist/{useAgentDefinitions-Daa3fGVg.js → useAgentDefinitions-YUDx_OW2.js} +2 -2
  47. package/dist/useConnections-CmnwGk09.js +439 -0
  48. package/dist/{useDurableParity-gigqyXDq.js → useDurableParity-X_zfFzQv.js} +1 -1
  49. package/dist/{useExecutions-wka2Z5w3.js → useExecutions-BWbMt16D.js} +1 -1
  50. package/dist/{useGlobalStoreClient-BcwWGtm7.js → useGlobalStoreClient-CwBAeiXV.js} +1 -1
  51. package/dist/{useObservability-CjZTYldC.js → useObservability-mXM7lCop.js} +1 -1
  52. package/dist/{useRunHistory-Be-GggNA.js → useRunHistory-DYDriBz1.js} +1 -1
  53. package/dist/{useWorkflowCodeExport-lRmbjY49.js → useWorkflowCodeExport-uKBDVvnA.js} +78 -114
  54. package/dist/{useWorkflows-BrqrVT8h.js → useWorkflows-Dg7q_Tzf.js} +1 -1
  55. package/dist/workflow-builder.js +4 -4
  56. package/dist/workflow-description-CeXdyWX8.js +123 -0
  57. package/dist/workflow-pages.d.ts +1 -1
  58. package/dist/workflow-pages.js +14 -14
  59. package/dist/{workflow-code-transfer-BsLPUrKP.js → workflow-transfer-CktP7o1c.js} +103 -1
  60. package/dist/workflows-list.js +1 -1
  61. package/package.json +1 -1
  62. package/dist/QuotaExhaustedDialog-YjKgRTmu.js +0 -55
  63. package/dist/useConnections-BlB0gbOB.js +0 -931
  64. package/dist/workflow-transfer-CQnQC-ke.js +0 -104
@@ -1,93 +1,9 @@
1
1
  "use client";
2
- // src/generated/documents/wspace/FileDownloadUrlDocument.ts
3
- const FileDownloadUrlDocument = {
4
- "kind": "Document",
5
- "definitions": [{
6
- "kind": "OperationDefinition",
7
- "operation": "query",
8
- "name": {
9
- "kind": "Name",
10
- "value": "FileDownloadUrl"
11
- },
12
- "variableDefinitions": [{
13
- "kind": "VariableDefinition",
14
- "variable": {
15
- "kind": "Variable",
16
- "name": {
17
- "kind": "Name",
18
- "value": "id"
19
- }
20
- },
21
- "type": {
22
- "kind": "NonNullType",
23
- "type": {
24
- "kind": "NamedType",
25
- "name": {
26
- "kind": "Name",
27
- "value": "ID"
28
- }
29
- }
30
- },
31
- "directives": []
32
- }, {
33
- "kind": "VariableDefinition",
34
- "variable": {
35
- "kind": "Variable",
36
- "name": {
37
- "kind": "Name",
38
- "value": "expiresIn"
39
- }
40
- },
41
- "type": {
42
- "kind": "NamedType",
43
- "name": {
44
- "kind": "Name",
45
- "value": "Int"
46
- }
47
- },
48
- "directives": []
49
- }],
50
- "directives": [],
51
- "selectionSet": {
52
- "kind": "SelectionSet",
53
- "selections": [{
54
- "kind": "Field",
55
- "name": {
56
- "kind": "Name",
57
- "value": "getFileDownloadUrl"
58
- },
59
- "arguments": [{
60
- "kind": "Argument",
61
- "name": {
62
- "kind": "Name",
63
- "value": "id"
64
- },
65
- "value": {
66
- "kind": "Variable",
67
- "name": {
68
- "kind": "Name",
69
- "value": "id"
70
- }
71
- }
72
- }, {
73
- "kind": "Argument",
74
- "name": {
75
- "kind": "Name",
76
- "value": "expiresIn"
77
- },
78
- "value": {
79
- "kind": "Variable",
80
- "name": {
81
- "kind": "Name",
82
- "value": "expiresIn"
83
- }
84
- }
85
- }],
86
- "directives": []
87
- }]
88
- }
89
- }]
90
- };
2
+ import { n as getFluidGridsClient } from "./client-Ctl4jmY3.js";
3
+ import { h as fetchCodeBundleSdk } from "./api-o5UUDbr8.js";
4
+ import { o as throwIfResultError, t as describeOperationError } from "./errors-xPZ-IbQd.js";
5
+ import { a as changedSourceFiles, d as isEditableSourcePath, f as projectLanguage, s as defaultSourcePath } from "./node-operation-selection-DHbtGNrG.js";
6
+ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
91
7
 
92
8
  // src/generated/documents/wspace/BuildWorkflowCodeDocument.ts
93
9
  const BuildWorkflowCodeDocument = {
@@ -624,4 +540,214 @@ const WorkflowEditLeaseStatusDocument = {
624
540
  }]
625
541
  };
626
542
 
627
- export { FileDownloadUrlDocument as i, WorkflowCodeSourceDocument as n, BuildWorkflowCodeDocument as r, WorkflowEditLeaseStatusDocument as t };
543
+ // src/builder/components/code-workflow/use-workflow-code-editor.ts
544
+ /**
545
+ * In-browser editing of tier-2 workflow source (BOFF-9905, spec code-first
546
+ * 07 §5): load the version's project files, check them with the managed
547
+ * build, and save them as a new version.
548
+ *
549
+ * - **Load.** `workflowCodeSource` (project files only; vendored files stay
550
+ * on the service so a rebuild gives the CLI's `buildId`) together with the
551
+ * version's `revision` (BOFF-9725) and definition.
552
+ * - **Edit lease.** While another person holds the workflow's edit lease the
553
+ * editor is read-only and Save is off, as the canvas is. When the lease
554
+ * store is unavailable editing is not coordinated and the revision check
555
+ * still protects the save.
556
+ * - **Check.** `buildWorkflowCode(commit: false)`: the same toolchain as
557
+ * `fluidgrids push`, type errors returned as diagnostics.
558
+ * - **Save.** `buildWorkflowCode(commit: true, revision)`: the service
559
+ * builds, stores the bundle and creates a new version from the loaded
560
+ * revision, refusing a save made after someone else changed the version.
561
+ *
562
+ * Python projects are read-only (Python in-browser builds are Phase C).
563
+ */
564
+ function entryOf(definitionJson) {
565
+ if (typeof definitionJson !== "object" || definitionJson === null || Array.isArray(definitionJson)) return void 0;
566
+ const code = definitionJson.code;
567
+ if (typeof code !== "object" || code === null || Array.isArray(code)) return void 0;
568
+ const entry = code.entry;
569
+ return typeof entry === "string" ? entry : void 0;
570
+ }
571
+ async function fetchWorkflowCodeSource(workflowKey, version) {
572
+ const result = await getFluidGridsClient().query({
573
+ query: WorkflowCodeSourceDocument,
574
+ variables: {
575
+ workflowKey,
576
+ version
577
+ },
578
+ fetchPolicy: "network-only"
579
+ });
580
+ throwIfResultError(result);
581
+ const source = result.data?.workflowCodeSource;
582
+ if (!source) return null;
583
+ const definition = result.data?.workflowDefinition;
584
+ return {
585
+ buildId: source.buildId,
586
+ files: source.files.map((file) => ({
587
+ path: file.path,
588
+ content: file.content
589
+ })),
590
+ revision: definition?.revision ?? null,
591
+ entry: entryOf(definition?.definitionJson)
592
+ };
593
+ }
594
+ /** Lease of the workflow, or null when it cannot be read (not coordinated). */
595
+ async function fetchEditLease(workflowKey) {
596
+ try {
597
+ const result = await getFluidGridsClient().query({
598
+ query: WorkflowEditLeaseStatusDocument,
599
+ variables: { workflowKey },
600
+ fetchPolicy: "network-only"
601
+ });
602
+ throwIfResultError(result);
603
+ return result.data?.workflowEditLease ?? null;
604
+ } catch {
605
+ return null;
606
+ }
607
+ }
608
+ async function runWorkflowCodeBuild(variables) {
609
+ const result = await getFluidGridsClient().mutate({
610
+ mutation: BuildWorkflowCodeDocument,
611
+ variables
612
+ });
613
+ throwIfResultError(result);
614
+ const data = result.data?.buildWorkflowCode;
615
+ if (!data) throw new Error("The build returned no result");
616
+ return data;
617
+ }
618
+ /** True when someone other than the caller holds the lease. */
619
+ function leaseBlocksEditing(lease) {
620
+ return !!lease && lease.available && lease.held && !lease.heldByCaller;
621
+ }
622
+ function useWorkflowCodeEditor({ workflowKey, version, enabled, canEdit, onSaved, pythonEnabled = false }) {
623
+ const [loading, setLoading] = useState(false);
624
+ const [loadError, setLoadError] = useState(null);
625
+ const [source, setSource] = useState(null);
626
+ const [contents, setContents] = useState({});
627
+ const [selectedPath, setSelectedPath] = useState();
628
+ const [lease, setLease] = useState(null);
629
+ const [building, setBuilding] = useState(null);
630
+ const [buildError, setBuildError] = useState(null);
631
+ const [lastBuild, setLastBuild] = useState(null);
632
+ const request = useRef(0);
633
+ const onSavedRef = useRef(onSaved);
634
+ onSavedRef.current = onSaved;
635
+ const reload = useCallback(async () => {
636
+ if (!enabled || !workflowKey || !version) return;
637
+ const id = ++request.current;
638
+ setLoading(true);
639
+ setLoadError(null);
640
+ try {
641
+ const [loaded, currentLease] = await Promise.all([fetchWorkflowCodeSource(workflowKey, version), fetchEditLease(workflowKey)]);
642
+ if (id !== request.current) return;
643
+ setSource(loaded);
644
+ setLease(currentLease);
645
+ setContents(Object.fromEntries((loaded?.files ?? []).map((file) => [file.path, file.content])));
646
+ setSelectedPath(loaded ? defaultSourcePath(loaded.files, loaded.entry, { python: pythonEnabled && projectLanguage(loaded.files) === "python" }) : void 0);
647
+ setLastBuild(null);
648
+ setBuildError(null);
649
+ } catch (err) {
650
+ if (id !== request.current) return;
651
+ setLoadError(describeOperationError(err));
652
+ } finally {
653
+ if (id === request.current) setLoading(false);
654
+ }
655
+ }, [
656
+ enabled,
657
+ workflowKey,
658
+ version,
659
+ pythonEnabled
660
+ ]);
661
+ useEffect(() => {
662
+ reload();
663
+ }, [reload]);
664
+ const [baseSdk, setBaseSdk] = useState(null);
665
+ useEffect(() => {
666
+ setBaseSdk(null);
667
+ if (!pythonEnabled || !enabled || !workflowKey || !version) return;
668
+ let cancelled = false;
669
+ fetchCodeBundleSdk(workflowKey, version).then((bundle) => {
670
+ if (!cancelled) setBaseSdk(bundle?.sdkVersion ?? null);
671
+ }).catch(() => void 0);
672
+ return () => {
673
+ cancelled = true;
674
+ };
675
+ }, [
676
+ pythonEnabled,
677
+ enabled,
678
+ workflowKey,
679
+ version
680
+ ]);
681
+ const language = useMemo(() => projectLanguage(source?.files ?? []), [source]);
682
+ const pythonEditable = pythonEnabled && language === "python";
683
+ const readOnlyReason = language === "python" && !pythonEnabled ? "python" : !canEdit ? "permission" : leaseBlocksEditing(lease) ? "lease" : null;
684
+ const changed = useMemo(() => changedSourceFiles(source?.files ?? [], contents), [source, contents]);
685
+ const build = useCallback(async (commit, description) => {
686
+ if (!source || readOnlyReason) return null;
687
+ setBuilding(commit ? "save" : "check");
688
+ setBuildError(null);
689
+ try {
690
+ const result = await runWorkflowCodeBuild({ input: {
691
+ workflowKey,
692
+ baseVersion: version,
693
+ files: changed.length ? changed : selectedPath && contents[selectedPath] !== void 0 ? [{
694
+ path: selectedPath,
695
+ content: contents[selectedPath]
696
+ }] : [],
697
+ commit,
698
+ ...commit && source.revision !== null ? { revision: source.revision } : {},
699
+ ...commit && description ? { description } : {}
700
+ } });
701
+ setLastBuild(result);
702
+ if (commit && result.success && result.version) onSavedRef.current?.(result.version, result);
703
+ return result;
704
+ } catch (err) {
705
+ setBuildError(describeOperationError(err));
706
+ return null;
707
+ } finally {
708
+ setBuilding(null);
709
+ }
710
+ }, [
711
+ source,
712
+ readOnlyReason,
713
+ changed,
714
+ selectedPath,
715
+ contents,
716
+ workflowKey,
717
+ version
718
+ ]);
719
+ const check = useCallback(() => build(false), [build]);
720
+ const save = useCallback((description) => build(true, description), [build]);
721
+ return {
722
+ loading,
723
+ loadError,
724
+ source,
725
+ contents,
726
+ selectedPath,
727
+ select: setSelectedPath,
728
+ setContent: useCallback((path, content) => {
729
+ setContents((current) => current[path] === content ? current : {
730
+ ...current,
731
+ [path]: content
732
+ });
733
+ }, []),
734
+ changed,
735
+ language,
736
+ lease,
737
+ readOnlyReason,
738
+ rebuildSdk: baseSdk && lastBuild?.sdkVersion && baseSdk !== lastBuild.sdkVersion ? {
739
+ from: baseSdk,
740
+ to: lastBuild.sdkVersion
741
+ } : null,
742
+ isEditable: (path) => !readOnlyReason && isEditableSourcePath(path, { python: pythonEditable }),
743
+ building,
744
+ buildError,
745
+ lastBuild,
746
+ diagnostics: lastBuild?.diagnostics ?? [],
747
+ check,
748
+ save,
749
+ reload
750
+ };
751
+ }
752
+
753
+ export { BuildWorkflowCodeDocument as a, WorkflowCodeSourceDocument as i, useWorkflowCodeEditor as n, WorkflowEditLeaseStatusDocument as r, fetchWorkflowCodeSource as t };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
  import { o as throwIfResultError } from "./errors-xPZ-IbQd.js";
3
3
  import { n as getFluidGridsClient } from "./client-Ctl4jmY3.js";
4
- import { An as TriggerWorkflowDocument, Dn as EventRegistrationsDocument, En as NodeEndpointConfigsDocument, Fn as ExecutionDetailDocument, In as RunFromNodeDocument, Ln as ExecuteStepDocument, Mn as CreateWorkflowVersionDocument, Nn as CreateWorkflowDefinitionDocument, Pn as ExecutionsListDocument } from "./FluidGridsProvider-C-WGQwuT.js";
4
+ import { Fn as CreateWorkflowDefinitionDocument, In as ExecutionsListDocument, Ln as ExecutionDetailDocument, Mn as TriggerWorkflowDocument, On as NodeEndpointConfigsDocument, Pn as CreateWorkflowVersionDocument, Rn as RunFromNodeDocument, kn as EventRegistrationsDocument, zn as ExecuteStepDocument } from "./FluidGridsProvider-CDjkq3Zj.js";
5
5
  import { a as PauseExecutionDocument, i as ResumeExecutionDocument, n as TerminateExecutionDocument, o as CancelExecutionDocument, r as RetryNodeDocument, t as ExecutionStatsDocument } from "./ExecutionStatsDocument-6ixNZnBV.js";
6
6
  import { c as RunLogAppendedDocument, l as RunLogsDocument } from "./agent-form-D0uLvzx4.js";
7
7
  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";
8
- import { c as NodeSchemaIntrospectionDocument, l as RemoveNodeFromWorkflowsDocument, s as NodeUsageStatusDocument } from "./useConnections-BlB0gbOB.js";
8
+ import { n as NodeSchemaIntrospectionDocument, r as RemoveNodeFromWorkflowsDocument, t as NodeUsageStatusDocument } from "./NodeUsageStatusDocument-B-XguSjm.js";
9
9
  import { t as WorkflowDefinitionDocument } from "./WorkflowDefinitionDocument-DZLbTPUZ.js";
10
10
  import { a as SearchFluidgridsTagsDocument, i as TagFluidgridsEntityDocument, n as ReplaceFluidgridsEntityTagsDocument, o as AvailableFluidgridsTagsDocument, r as UntagFluidgridsEntityDocument, s as FluidgridsEntityTagsDocument, t as CreateFluidgridsTagDocument } from "./CreateFluidgridsTagDocument-Dtp9KPLJ.js";
11
11
  import { useCallback, useEffect, useState } from "react";