@burdenoff/fluidgrids-fe-sdk 2026.1101.1 → 2026.1101.3
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/dist/{ExecutionDetailPage-4LPCNWM3.js → ExecutionDetailPage-Q77U6YJO.js} +11 -8
- package/dist/{ExecutionsListPage-HNPUKYD7.js → ExecutionsListPage-X4H4FVLN.js} +6 -5
- package/dist/{WorkflowBuilder-QFSCYCUC.js → WorkflowBuilder-RJPRUMQR.js} +11 -8
- package/dist/{WorkflowsList-RV4BRJO7.js → WorkflowsList-R2JJK7BL.js} +7 -6
- package/dist/agentTools-MISTH7JI.js +349 -0
- package/dist/{chunk-77HIU3CX.js → chunk-26HGYPBC.js} +1 -1
- package/dist/{chunk-76UUEMTN.js → chunk-37VUN74D.js} +4 -4
- package/dist/{chunk-QPZCJKII.js → chunk-3ERT6FQK.js} +3 -3
- package/dist/chunk-472HJ3S3.js +3929 -0
- package/dist/{chunk-WNZV4SLU.js → chunk-4QHCXTHW.js} +4 -4
- package/dist/chunk-AASHQI77.js +126 -0
- package/dist/chunk-CGXQVZGY.js +260 -0
- package/dist/chunk-CRDG2SQQ.js +185 -0
- package/dist/chunk-DQ2ZCXYX.js +21875 -0
- package/dist/chunk-F7DD7BOB.js +1164 -0
- package/dist/chunk-GTEBQQ7J.js +24 -0
- package/dist/{chunk-ALFMJSD6.js → chunk-H7XPXONT.js} +1 -1
- package/dist/{chunk-UO5DUKYN.js → chunk-HKKSXOFO.js} +8 -7
- package/dist/chunk-IA2ZCHNQ.js +1336 -0
- package/dist/{chunk-3M36XWAH.js → chunk-IGRIN7NL.js} +8 -7
- package/dist/chunk-JDLQ6QIB.js +283 -0
- package/dist/{chunk-AD7BICOT.js → chunk-JKBCLBHY.js} +1 -1
- package/dist/{chunk-6JX5UPDW.js → chunk-JNZCXFLD.js} +1 -1
- package/dist/{chunk-SEFOT2LD.js → chunk-LWLHPVIA.js} +1 -1
- package/dist/{chunk-JWROEOG5.js → chunk-LYTR6IQO.js} +1 -38
- package/dist/chunk-MR2B67NW.js +338 -0
- package/dist/{chunk-RIHYPPMQ.js → chunk-NLYQ3XDE.js} +1 -1
- package/dist/{chunk-6ILIBJFH.js → chunk-NZJWKVER.js} +7904 -7943
- package/dist/chunk-OCJTTHTS.js +46 -0
- package/dist/chunk-OSQ3OCR3.js +1193 -0
- package/dist/{chunk-VJL3DFJT.js → chunk-REO4S5MY.js} +2 -2
- package/dist/{chunk-XKQMCPSB.js → chunk-T2UUYYVJ.js} +4 -4
- package/dist/{chunk-BXR6BWXM.js → chunk-W7MTSATB.js} +5 -5
- package/dist/{chunk-A47PSD7A.js → chunk-WF6GMBR4.js} +7 -4
- package/dist/chunk-WYCB6OQL.js +19709 -0
- package/dist/{chunk-YOLPHVOE.js → chunk-YKFR7BZJ.js} +1 -1
- package/dist/{chunk-26NENGXA.js → chunk-YSXNJGCY.js} +4 -4
- package/dist/code-editor-field-JKCUR6BI.js +3 -0
- package/dist/executions.js +12 -9
- package/dist/history.js +4 -3
- package/dist/index.js +41 -32
- package/dist/node-detail-view-PCYFQX62.js +2034 -0
- package/dist/observability.js +5 -4
- package/dist/quick-config-panel-BRZZHOSI.js +402 -0
- package/dist/settings.js +6 -5
- package/dist/templates.js +10 -7
- package/dist/workflow-builder.js +12 -9
- package/dist/workflows-list.js +7 -6
- package/package.json +4 -1
- package/dist/chunk-NMEI7TQW.js +0 -2628
- package/dist/chunk-S7XV65DB.js +0 -50350
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
export { ExecutionDetailPage } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
4
|
-
import './chunk-
|
|
5
|
-
import './chunk-
|
|
1
|
+
export { ExecutionDetailPage } from './chunk-HKKSXOFO.js';
|
|
2
|
+
import './chunk-OSQ3OCR3.js';
|
|
3
|
+
import './chunk-REO4S5MY.js';
|
|
4
|
+
import './chunk-LYTR6IQO.js';
|
|
5
|
+
import './chunk-H7XPXONT.js';
|
|
6
|
+
import './chunk-JKBCLBHY.js';
|
|
6
7
|
import './chunk-5ERAJC2I.js';
|
|
7
|
-
import './chunk-
|
|
8
|
+
import './chunk-F7DD7BOB.js';
|
|
9
|
+
import './chunk-JDLQ6QIB.js';
|
|
8
10
|
import './chunk-PZ45H72P.js';
|
|
9
11
|
import './chunk-Y53CVZVV.js';
|
|
10
12
|
import './chunk-FNZZ5JJL.js';
|
|
11
|
-
import './chunk-
|
|
13
|
+
import './chunk-LWLHPVIA.js';
|
|
12
14
|
import './chunk-PJAWNFJV.js';
|
|
13
15
|
import './chunk-7KKYIRLH.js';
|
|
14
|
-
import './chunk-
|
|
16
|
+
import './chunk-NZJWKVER.js';
|
|
15
17
|
import './chunk-ZUVFD5KV.js';
|
|
16
18
|
import './chunk-JL7CASN5.js';
|
|
19
|
+
import './chunk-OCJTTHTS.js';
|
|
17
20
|
import './chunk-PXIFUMLA.js';
|
|
18
21
|
import './chunk-6AMNEX2Y.js';
|
|
19
22
|
import './chunk-G77IGC3Y.js';
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export { ExecutionsListPage } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { ExecutionsListPage } from './chunk-37VUN74D.js';
|
|
2
|
+
import './chunk-REO4S5MY.js';
|
|
3
|
+
import './chunk-LYTR6IQO.js';
|
|
4
4
|
import './chunk-5ERAJC2I.js';
|
|
5
5
|
import './chunk-PZ45H72P.js';
|
|
6
6
|
import './chunk-FNZZ5JJL.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-LWLHPVIA.js';
|
|
8
8
|
import './chunk-PJAWNFJV.js';
|
|
9
9
|
import './chunk-7KKYIRLH.js';
|
|
10
10
|
import './chunk-4VJ3MDOV.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-NZJWKVER.js';
|
|
12
12
|
import './chunk-ZUVFD5KV.js';
|
|
13
13
|
import './chunk-JL7CASN5.js';
|
|
14
|
+
import './chunk-OCJTTHTS.js';
|
|
14
15
|
import './chunk-PXIFUMLA.js';
|
|
15
16
|
import './chunk-6AMNEX2Y.js';
|
|
16
17
|
import './chunk-G77IGC3Y.js';
|
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
export { WorkflowBuilder } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { WorkflowBuilder } from './chunk-YSXNJGCY.js';
|
|
2
|
+
import './chunk-26HGYPBC.js';
|
|
3
3
|
import './chunk-PIKYQE7P.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-DQ2ZCXYX.js';
|
|
5
5
|
import './chunk-GEMNVFPK.js';
|
|
6
6
|
import './chunk-B6CCE2RW.js';
|
|
7
7
|
import './chunk-IEVSFCFS.js';
|
|
8
8
|
import './chunk-YXMFRQYV.js';
|
|
9
9
|
import './chunk-BQXVT32O.js';
|
|
10
|
-
import './chunk-
|
|
11
|
-
import './chunk-
|
|
10
|
+
import './chunk-MR2B67NW.js';
|
|
11
|
+
import './chunk-CRDG2SQQ.js';
|
|
12
|
+
import './chunk-WF6GMBR4.js';
|
|
13
|
+
import './chunk-F7DD7BOB.js';
|
|
14
|
+
import './chunk-JDLQ6QIB.js';
|
|
12
15
|
import './chunk-PZ45H72P.js';
|
|
13
16
|
import './chunk-Y53CVZVV.js';
|
|
14
|
-
import './chunk-
|
|
17
|
+
import './chunk-LWLHPVIA.js';
|
|
15
18
|
import './chunk-GLYINMOR.js';
|
|
16
19
|
import './chunk-7KKYIRLH.js';
|
|
17
|
-
import './chunk-YOLPHVOE.js';
|
|
18
20
|
import './chunk-4VJ3MDOV.js';
|
|
19
|
-
import './chunk-
|
|
21
|
+
import './chunk-NZJWKVER.js';
|
|
20
22
|
import './chunk-ZUVFD5KV.js';
|
|
21
23
|
import './chunk-JL7CASN5.js';
|
|
24
|
+
import './chunk-OCJTTHTS.js';
|
|
22
25
|
import './chunk-PXIFUMLA.js';
|
|
23
26
|
import './chunk-6AMNEX2Y.js';
|
|
24
27
|
import './chunk-G77IGC3Y.js';
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export { WorkflowsList } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { WorkflowsList } from './chunk-W7MTSATB.js';
|
|
2
|
+
import './chunk-26HGYPBC.js';
|
|
3
|
+
import './chunk-LYTR6IQO.js';
|
|
4
4
|
import './chunk-5ERAJC2I.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-WF6GMBR4.js';
|
|
6
6
|
import './chunk-FNZZ5JJL.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-LWLHPVIA.js';
|
|
8
8
|
import './chunk-PJAWNFJV.js';
|
|
9
9
|
import './chunk-7KKYIRLH.js';
|
|
10
10
|
import './chunk-4VJ3MDOV.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-NZJWKVER.js';
|
|
12
12
|
import './chunk-ZUVFD5KV.js';
|
|
13
13
|
import './chunk-JL7CASN5.js';
|
|
14
|
+
import './chunk-OCJTTHTS.js';
|
|
14
15
|
import './chunk-PXIFUMLA.js';
|
|
15
16
|
import './chunk-6AMNEX2Y.js';
|
|
16
17
|
import './chunk-G77IGC3Y.js';
|
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
import { nodeTitle, selectedOperationOf, paramsFromOperation, fixedParameterState } from './chunk-IA2ZCHNQ.js';
|
|
2
|
+
import { external_exports } from './chunk-WYCB6OQL.js';
|
|
3
|
+
import { computeAttachPosition, autosaveAllowedFor, isFlowComplete } from './chunk-CRDG2SQQ.js';
|
|
4
|
+
import { NODE_CONFIGS, createConfiguredNode, resolveOutputHandles, resolveInputHandles, isNodeConfigsInitialized, useFlowStore, useSaveStatusStore, isNodeTypeHiddenFromPalette } from './chunk-NZJWKVER.js';
|
|
5
|
+
import './chunk-ZUVFD5KV.js';
|
|
6
|
+
import './chunk-JL7CASN5.js';
|
|
7
|
+
import './chunk-OCJTTHTS.js';
|
|
8
|
+
import './chunk-PXIFUMLA.js';
|
|
9
|
+
import './chunk-6AMNEX2Y.js';
|
|
10
|
+
import './chunk-G77IGC3Y.js';
|
|
11
|
+
import './chunk-IHEV5HTD.js';
|
|
12
|
+
import './chunk-UULVIT25.js';
|
|
13
|
+
import './chunk-NTWG3CJX.js';
|
|
14
|
+
import './chunk-62GWEYJ5.js';
|
|
15
|
+
import { defineAgentTool, AgentToolError } from '@burdenoff/fe-libs/shared/agent-tools';
|
|
16
|
+
|
|
17
|
+
var MAX_NODES_LISTED = 40;
|
|
18
|
+
var MAX_EDGES_LISTED = 60;
|
|
19
|
+
var MAX_TYPES_LISTED = 15;
|
|
20
|
+
var POSITION_GAP_X = 400;
|
|
21
|
+
var nodeId = external_exports.string().trim().min(1).max(100).describe("A node id from fg_canvas_read.");
|
|
22
|
+
var SENSITIVE_PARAM = /pass(word)?|secret|token|api[-_]?key|private[-_]?key|credential|connection/i;
|
|
23
|
+
function store() {
|
|
24
|
+
return useFlowStore.getState();
|
|
25
|
+
}
|
|
26
|
+
function findNode(id) {
|
|
27
|
+
const node = store().workflow.nodes.find((candidate) => candidate.id === id);
|
|
28
|
+
if (!node)
|
|
29
|
+
throw new AgentToolError(
|
|
30
|
+
"NOT_FOUND",
|
|
31
|
+
`No node "${id.slice(0, 40)}" on the canvas. Use fg_canvas_read.`,
|
|
32
|
+
{ retryable: true }
|
|
33
|
+
);
|
|
34
|
+
return node;
|
|
35
|
+
}
|
|
36
|
+
var defaultCatalogueReady = () => isNodeConfigsInitialized() && NODE_CONFIGS.length > 0;
|
|
37
|
+
function requireCatalogue(ready) {
|
|
38
|
+
if (!ready())
|
|
39
|
+
throw new AgentToolError(
|
|
40
|
+
"CONFLICT",
|
|
41
|
+
"The node catalogue is still loading. Try again in a few seconds.",
|
|
42
|
+
{ retryable: true }
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
function autosaves() {
|
|
46
|
+
try {
|
|
47
|
+
const { workflow } = store();
|
|
48
|
+
return !useSaveStatusStore.getState().autosavePaused && autosaveAllowedFor(workflow) && isFlowComplete(workflow.nodes, workflow.edges);
|
|
49
|
+
} catch {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
var SAVE_RULE = "When autosaves is true the change is saved shortly after, like the person's own edits; otherwise (a new workflow, an active version, an incomplete flow, autosave off or paused) it is kept only when the person saves.";
|
|
54
|
+
function dataOf(node) {
|
|
55
|
+
return node.data && typeof node.data === "object" ? node.data : {};
|
|
56
|
+
}
|
|
57
|
+
function operationNames(type) {
|
|
58
|
+
const config = NODE_CONFIGS.find((candidate) => candidate.type === type);
|
|
59
|
+
return (config?.operations ?? []).filter((op) => op.name && !op.isAdapterOperation && !op.internal).map((op) => op.name);
|
|
60
|
+
}
|
|
61
|
+
function freePosition(nodes) {
|
|
62
|
+
if (nodes.length === 0) return { x: 0, y: 0 };
|
|
63
|
+
const rightMost = nodes.reduce(
|
|
64
|
+
(best, node) => node.position.x > best.position.x ? node : best
|
|
65
|
+
);
|
|
66
|
+
return { x: rightMost.position.x + POSITION_GAP_X, y: rightMost.position.y };
|
|
67
|
+
}
|
|
68
|
+
function createBuilderAgentTools(options = {}) {
|
|
69
|
+
const catalogueReady = options.catalogueReady ?? defaultCatalogueReady;
|
|
70
|
+
const durableFunctionsEnabled = options.durableFunctionsEnabled ?? (() => false);
|
|
71
|
+
const isHidden = (type) => isNodeTypeHiddenFromPalette(type, durableFunctionsEnabled());
|
|
72
|
+
const read = defineAgentTool({
|
|
73
|
+
name: "fg_canvas_read",
|
|
74
|
+
title: "Read the canvas",
|
|
75
|
+
description: "Reads the workflow open in the builder: its name, version and status, every node (id, label, type, operation, disabled) and every connection. Says whether edits autosave (drafts) or wait for the person to save.",
|
|
76
|
+
input: external_exports.strictObject({
|
|
77
|
+
offset: external_exports.number().int().min(0).max(1e4).default(0).describe("Index of the first node to list, for large workflows.")
|
|
78
|
+
}),
|
|
79
|
+
annotations: { readOnly: true, untrustedContent: true },
|
|
80
|
+
execute: ({ offset }) => {
|
|
81
|
+
const { workflow } = store();
|
|
82
|
+
const nodes = workflow.nodes;
|
|
83
|
+
const page = nodes.slice(offset, offset + MAX_NODES_LISTED);
|
|
84
|
+
return {
|
|
85
|
+
workflow: {
|
|
86
|
+
workflowKey: workflow.workflowKey,
|
|
87
|
+
name: workflow.name,
|
|
88
|
+
version: workflow.version,
|
|
89
|
+
status: workflow.status,
|
|
90
|
+
autosaves: autosaves()
|
|
91
|
+
},
|
|
92
|
+
nodeCount: nodes.length,
|
|
93
|
+
nodes: page.map((node) => {
|
|
94
|
+
const data = dataOf(node);
|
|
95
|
+
return {
|
|
96
|
+
id: node.id,
|
|
97
|
+
label: nodeTitle(node),
|
|
98
|
+
type: node.type,
|
|
99
|
+
...typeof data.operation_name === "string" ? { operation: data.operation_name } : {},
|
|
100
|
+
...data.disabled === true ? { disabled: true } : {}
|
|
101
|
+
};
|
|
102
|
+
}),
|
|
103
|
+
...offset + page.length < nodes.length ? { nextOffset: offset + page.length } : {},
|
|
104
|
+
edges: workflow.edges.slice(0, MAX_EDGES_LISTED).map((edge) => ({
|
|
105
|
+
from: edge.source,
|
|
106
|
+
to: edge.target,
|
|
107
|
+
...edge.sourceHandle && edge.sourceHandle !== "source" ? { fromHandle: edge.sourceHandle } : {},
|
|
108
|
+
...edge.targetHandle && edge.targetHandle !== "target" ? { toHandle: edge.targetHandle } : {}
|
|
109
|
+
}))
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
const nodeTypes = defineAgentTool({
|
|
114
|
+
name: "fg_canvas_node_types",
|
|
115
|
+
title: "Find node types",
|
|
116
|
+
description: "Finds node types that can be added to the canvas (installed and built-in), by words in their name or description. Returns the type id and its operations, for fg_canvas_add_node.",
|
|
117
|
+
input: external_exports.strictObject({
|
|
118
|
+
query: external_exports.string().trim().min(1).max(80).describe('Words to look for, e.g. "gmail", "http request", "if".')
|
|
119
|
+
}),
|
|
120
|
+
annotations: { readOnly: true },
|
|
121
|
+
execute: ({ query }) => {
|
|
122
|
+
requireCatalogue(catalogueReady);
|
|
123
|
+
const words = query.toLowerCase().split(/\s+/);
|
|
124
|
+
const matches = NODE_CONFIGS.filter((config) => {
|
|
125
|
+
if (isHidden(config.type)) return false;
|
|
126
|
+
const text = `${config.type} ${config.detail.title} ${config.detail.description ?? ""}`.toLowerCase();
|
|
127
|
+
return words.every((word) => text.includes(word));
|
|
128
|
+
});
|
|
129
|
+
return {
|
|
130
|
+
total: matches.length,
|
|
131
|
+
types: matches.slice(0, MAX_TYPES_LISTED).map((config) => ({
|
|
132
|
+
nodeType: config.type,
|
|
133
|
+
title: config.detail.title,
|
|
134
|
+
operations: operationNames(config.type).slice(0, 12)
|
|
135
|
+
}))
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
const addNode = defineAgentTool({
|
|
140
|
+
name: "fg_canvas_add_node",
|
|
141
|
+
title: "Add a node",
|
|
142
|
+
description: "Adds a node to the canvas, pinned to an operation, optionally right after an existing node and connected to it. Find nodeType with fg_canvas_node_types. " + SAVE_RULE,
|
|
143
|
+
input: external_exports.strictObject({
|
|
144
|
+
nodeType: external_exports.string().trim().min(1).max(120).describe("A nodeType from fg_canvas_node_types."),
|
|
145
|
+
operation: external_exports.string().trim().min(1).max(120).optional().describe("The operation to pin. Omit for a single-operation node."),
|
|
146
|
+
afterNodeId: nodeId.optional().describe("Place the new node after this node and connect it.")
|
|
147
|
+
}),
|
|
148
|
+
execute: ({ nodeType, operation, afterNodeId }) => {
|
|
149
|
+
requireCatalogue(catalogueReady);
|
|
150
|
+
if (isHidden(nodeType) || !NODE_CONFIGS.some((config) => config.type === nodeType))
|
|
151
|
+
throw new AgentToolError(
|
|
152
|
+
"NOT_FOUND",
|
|
153
|
+
`No node type "${nodeType.slice(0, 60)}". Use fg_canvas_node_types.`,
|
|
154
|
+
{ retryable: true }
|
|
155
|
+
);
|
|
156
|
+
const operations = operationNames(nodeType);
|
|
157
|
+
if (operation && !operations.includes(operation))
|
|
158
|
+
throw new AgentToolError(
|
|
159
|
+
"INVALID_INPUT",
|
|
160
|
+
`No operation "${operation.slice(0, 60)}" on ${nodeType}. Operations: ${operations.slice(0, 12).join(", ")}.`
|
|
161
|
+
);
|
|
162
|
+
if (!operation && operations.length > 1)
|
|
163
|
+
throw new AgentToolError(
|
|
164
|
+
"INVALID_INPUT",
|
|
165
|
+
`Choose an operation for ${nodeType}: ${operations.slice(0, 12).join(", ")}.`
|
|
166
|
+
);
|
|
167
|
+
const anchor = afterNodeId ? findNode(afterNodeId) : void 0;
|
|
168
|
+
const current = store().workflow.nodes;
|
|
169
|
+
const position = computeAttachPosition(anchor) ?? freePosition(current);
|
|
170
|
+
const created = createConfiguredNode(
|
|
171
|
+
nodeType,
|
|
172
|
+
position,
|
|
173
|
+
operation
|
|
174
|
+
);
|
|
175
|
+
store().actions.nodes.setNodes([
|
|
176
|
+
...current.map(
|
|
177
|
+
(node) => node.selected ? { ...node, selected: false } : node
|
|
178
|
+
),
|
|
179
|
+
created
|
|
180
|
+
]);
|
|
181
|
+
if (anchor) {
|
|
182
|
+
const sourceHandle = resolveOutputHandles(dataOf(anchor), anchor.type)[0]?.id ?? "source";
|
|
183
|
+
const targetHandle = resolveInputHandles(dataOf(created))[0]?.id ?? "target";
|
|
184
|
+
store().actions.edges.onConnect({
|
|
185
|
+
source: anchor.id,
|
|
186
|
+
sourceHandle,
|
|
187
|
+
target: created.id,
|
|
188
|
+
targetHandle
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
return {
|
|
192
|
+
nodeId: created.id,
|
|
193
|
+
label: nodeTitle(created),
|
|
194
|
+
...typeof dataOf(created).operation_name === "string" ? { operation: dataOf(created).operation_name } : {},
|
|
195
|
+
connectedFrom: anchor?.id,
|
|
196
|
+
autosaves: autosaves()
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
const connect = defineAgentTool({
|
|
201
|
+
name: "fg_canvas_connect",
|
|
202
|
+
title: "Connect two nodes",
|
|
203
|
+
description: "Connects one node's output to another node's input. For nodes with several outputs (IF, Switch) or inputs (Merge) pass the handle ids. " + SAVE_RULE,
|
|
204
|
+
input: external_exports.strictObject({
|
|
205
|
+
fromNodeId: nodeId.describe("The node the data comes from."),
|
|
206
|
+
toNodeId: nodeId.describe("The node the data goes to."),
|
|
207
|
+
fromHandle: external_exports.string().trim().min(1).max(60).optional().describe('Output handle id, e.g. "true" or "false" on an IF node.'),
|
|
208
|
+
toHandle: external_exports.string().trim().min(1).max(60).optional().describe('Input handle id, e.g. "input-2" on a Merge node.')
|
|
209
|
+
}),
|
|
210
|
+
execute: ({ fromNodeId, toNodeId, fromHandle, toHandle }) => {
|
|
211
|
+
if (fromNodeId === toNodeId)
|
|
212
|
+
throw new AgentToolError(
|
|
213
|
+
"INVALID_INPUT",
|
|
214
|
+
"A node cannot connect to itself."
|
|
215
|
+
);
|
|
216
|
+
const from = findNode(fromNodeId);
|
|
217
|
+
const to = findNode(toNodeId);
|
|
218
|
+
const outputs = resolveOutputHandles(dataOf(from), from.type).map(
|
|
219
|
+
(handle) => handle.id
|
|
220
|
+
);
|
|
221
|
+
const inputs = resolveInputHandles(dataOf(to)).map((handle) => handle.id);
|
|
222
|
+
const sourceHandle = fromHandle ?? outputs[0] ?? "source";
|
|
223
|
+
const targetHandle = toHandle ?? inputs[0] ?? "target";
|
|
224
|
+
if (outputs.length > 0 && !outputs.includes(sourceHandle))
|
|
225
|
+
throw new AgentToolError(
|
|
226
|
+
"INVALID_INPUT",
|
|
227
|
+
`No output "${sourceHandle}". Outputs: ${outputs.join(", ")}.`
|
|
228
|
+
);
|
|
229
|
+
if (inputs.length > 0 && !inputs.includes(targetHandle))
|
|
230
|
+
throw new AgentToolError(
|
|
231
|
+
"INVALID_INPUT",
|
|
232
|
+
`No input "${targetHandle}". Inputs: ${inputs.join(", ")}.`
|
|
233
|
+
);
|
|
234
|
+
const exists = store().workflow.edges.some(
|
|
235
|
+
(edge) => edge.source === from.id && edge.target === to.id && (edge.sourceHandle ?? "source") === sourceHandle && (edge.targetHandle ?? "target") === targetHandle
|
|
236
|
+
);
|
|
237
|
+
if (!exists)
|
|
238
|
+
store().actions.edges.onConnect({
|
|
239
|
+
source: from.id,
|
|
240
|
+
sourceHandle,
|
|
241
|
+
target: to.id,
|
|
242
|
+
targetHandle
|
|
243
|
+
});
|
|
244
|
+
return {
|
|
245
|
+
from: from.id,
|
|
246
|
+
to: to.id,
|
|
247
|
+
fromHandle: sourceHandle,
|
|
248
|
+
toHandle: targetHandle,
|
|
249
|
+
alreadyConnected: exists,
|
|
250
|
+
autosaves: autosaves()
|
|
251
|
+
};
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
const rename = defineAgentTool({
|
|
255
|
+
name: "fg_canvas_rename_node",
|
|
256
|
+
title: "Rename a node",
|
|
257
|
+
description: "Renames a node on the canvas. " + SAVE_RULE,
|
|
258
|
+
input: external_exports.strictObject({
|
|
259
|
+
nodeId,
|
|
260
|
+
label: external_exports.string().trim().min(1).max(80).describe("The new node name.")
|
|
261
|
+
}),
|
|
262
|
+
execute: ({ nodeId: id, label }) => {
|
|
263
|
+
findNode(id);
|
|
264
|
+
store().actions.nodes.renameNode(id, label);
|
|
265
|
+
return {
|
|
266
|
+
nodeId: id,
|
|
267
|
+
label: nodeTitle(findNode(id)),
|
|
268
|
+
autosaves: autosaves()
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
const toggle = defineAgentTool({
|
|
273
|
+
name: "fg_canvas_toggle_node",
|
|
274
|
+
title: "Enable or disable a node",
|
|
275
|
+
description: "Disables a node (runs skip it) or enables it again. " + SAVE_RULE,
|
|
276
|
+
input: external_exports.strictObject({
|
|
277
|
+
nodeId,
|
|
278
|
+
disabled: external_exports.boolean().describe("true to disable the node, false to enable it.")
|
|
279
|
+
}),
|
|
280
|
+
execute: ({ nodeId: id, disabled }) => {
|
|
281
|
+
const node = findNode(id);
|
|
282
|
+
const current = dataOf(node).disabled === true;
|
|
283
|
+
const now = current === disabled ? current : store().actions.nodes.toggleDisabled(id);
|
|
284
|
+
return { nodeId: id, disabled: now, autosaves: autosaves() };
|
|
285
|
+
}
|
|
286
|
+
});
|
|
287
|
+
const setParam = defineAgentTool({
|
|
288
|
+
name: "fg_canvas_set_param",
|
|
289
|
+
title: "Set a node parameter",
|
|
290
|
+
description: "Sets one parameter of a node's operation to a fixed value, as the node panel does. Connections and secrets are not set here; the person picks those. " + SAVE_RULE,
|
|
291
|
+
input: external_exports.strictObject({
|
|
292
|
+
nodeId,
|
|
293
|
+
field: external_exports.string().trim().min(1).max(80).describe("The parameter name; an unknown one lists the valid names."),
|
|
294
|
+
value: external_exports.string().max(4e3).describe(
|
|
295
|
+
"The value as text: numbers, true/false and JSON are converted to the parameter's type. Empty clears it."
|
|
296
|
+
)
|
|
297
|
+
}),
|
|
298
|
+
execute: ({ nodeId: id, field, value }) => {
|
|
299
|
+
const node = findNode(id);
|
|
300
|
+
const operation = selectedOperationOf(dataOf(node), node.type);
|
|
301
|
+
const params = paramsFromOperation(operation);
|
|
302
|
+
const parameter = params.find((candidate) => candidate.name === field);
|
|
303
|
+
if (!parameter)
|
|
304
|
+
throw new AgentToolError(
|
|
305
|
+
"INVALID_INPUT",
|
|
306
|
+
params.length > 0 ? `No parameter "${field.slice(0, 40)}". Parameters: ${params.slice(0, 20).map((candidate) => candidate.name).join(", ")}.` : "This node has no parameters to set (pin an operation first)."
|
|
307
|
+
);
|
|
308
|
+
const typeText = `${parameter.type} ${parameter.name}`;
|
|
309
|
+
if (SENSITIVE_PARAM.test(typeText))
|
|
310
|
+
throw new AgentToolError(
|
|
311
|
+
"NEEDS_USER",
|
|
312
|
+
"That is a credential or secret: ask the person to set it in the node panel."
|
|
313
|
+
);
|
|
314
|
+
if (parameter.options && value && !parameter.options.includes(value))
|
|
315
|
+
throw new AgentToolError(
|
|
316
|
+
"INVALID_INPUT",
|
|
317
|
+
`"${field}" must be one of: ${parameter.options.slice(0, 20).join(", ")}.`
|
|
318
|
+
);
|
|
319
|
+
const { workflow, actions } = store();
|
|
320
|
+
actions.nodes.setNodes(
|
|
321
|
+
workflow.nodes.map((candidate) => {
|
|
322
|
+
if (candidate.id !== id) return candidate;
|
|
323
|
+
const data = { ...dataOf(candidate) };
|
|
324
|
+
const args = {
|
|
325
|
+
...data.args ?? {}
|
|
326
|
+
};
|
|
327
|
+
args.state = fixedParameterState(
|
|
328
|
+
args.state ?? {},
|
|
329
|
+
params,
|
|
330
|
+
field,
|
|
331
|
+
value
|
|
332
|
+
);
|
|
333
|
+
data.args = args;
|
|
334
|
+
return { ...candidate, data };
|
|
335
|
+
})
|
|
336
|
+
);
|
|
337
|
+
return {
|
|
338
|
+
nodeId: id,
|
|
339
|
+
field,
|
|
340
|
+
cleared: value === "",
|
|
341
|
+
autosaves: autosaves()
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
return [read, nodeTypes, addNode, connect, rename, toggle, setParam];
|
|
346
|
+
}
|
|
347
|
+
var BUILDER_AGENT_TOOLS = createBuilderAgentTools();
|
|
348
|
+
|
|
349
|
+
export { BUILDER_AGENT_TOOLS, createBuilderAgentTools };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { useRunStatusCounts, ExecutionStats, ExecutionFilters, ExecutionTable, ExecutionCards, ExecutionTimeline, Pagination, runStatusLabels } from './chunk-
|
|
2
|
-
import { useExecutionsWithStore, useExecutionStats, useExecutionActions, useAutoRefresh, WORKFLOW_ID_MAX_LENGTH } from './chunk-
|
|
3
|
-
import { useWorkflowDefinitions } from './chunk-
|
|
1
|
+
import { useRunStatusCounts, ExecutionStats, ExecutionFilters, ExecutionTable, ExecutionCards, ExecutionTimeline, Pagination, runStatusLabels } from './chunk-REO4S5MY.js';
|
|
2
|
+
import { useExecutionsWithStore, useExecutionStats, useExecutionActions, useAutoRefresh, WORKFLOW_ID_MAX_LENGTH } from './chunk-LYTR6IQO.js';
|
|
3
|
+
import { useWorkflowDefinitions } from './chunk-LWLHPVIA.js';
|
|
4
4
|
import { FluidGridsDocsLink } from './chunk-4VJ3MDOV.js';
|
|
5
|
-
import { useDurableParityEnabled } from './chunk-
|
|
5
|
+
import { useDurableParityEnabled } from './chunk-NZJWKVER.js';
|
|
6
6
|
import { useExecutionsStore } from './chunk-6AMNEX2Y.js';
|
|
7
7
|
import { useTr } from './chunk-UULVIT25.js';
|
|
8
8
|
import { useRef, useCallback, useMemo, useState, useEffect } from 'react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Card, FluidGridsMark } from './chunk-
|
|
1
|
+
import { Card, FluidGridsMark } from './chunk-DQ2ZCXYX.js';
|
|
2
2
|
import { Input } from './chunk-IEVSFCFS.js';
|
|
3
3
|
import { Button } from './chunk-BQXVT32O.js';
|
|
4
|
-
import { useWorkflowDefinition } from './chunk-
|
|
5
|
-
import { FluidGridsProvider, useFlowStore } from './chunk-
|
|
4
|
+
import { useWorkflowDefinition } from './chunk-LWLHPVIA.js';
|
|
5
|
+
import { FluidGridsProvider, useFlowStore } from './chunk-NZJWKVER.js';
|
|
6
6
|
import { cn } from './chunk-JL7CASN5.js';
|
|
7
7
|
import { useTr } from './chunk-UULVIT25.js';
|
|
8
8
|
import { useState, useRef, useEffect, useCallback } from 'react';
|