@burdenoff/fluidgrids-fe-sdk 2026.1109.9 → 2026.1110.2
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-2ORSV3YN.js → ExecutionDetailPage-UXQFBLF3.js} +14 -14
- package/dist/{ExecutionsListPage-MY45NECW.js → ExecutionsListPage-A4GCUNFR.js} +11 -11
- package/dist/{WorkflowBuilder-MWC2BCTQ.js → WorkflowBuilder-ZLVMV2UA.js} +21 -15
- package/dist/{WorkflowsList-6AG7CFZM.js → WorkflowsList-XPNGNR4A.js} +8 -8
- package/dist/{agentTools-5O2KPQYJ.js → agentTools-V26FOMTS.js} +5 -7
- package/dist/{chunk-ACME5GOU.js → chunk-2DBAQR6F.js} +2 -2
- package/dist/{chunk-MYE6CMGK.js → chunk-2H4XAES7.js} +3 -3
- package/dist/{chunk-IZSWG5G3.js → chunk-3F4DIVKT.js} +1 -1
- package/dist/chunk-3JGAI5YC.js +1437 -0
- package/dist/{chunk-MSNCU6US.js → chunk-5TGPH3CX.js} +4 -4
- package/dist/{chunk-U52PO4QQ.js → chunk-5V7PMLQN.js} +1320 -58
- package/dist/{chunk-TKSVFP36.js → chunk-5ZAOXCIQ.js} +6 -6
- package/dist/{chunk-POCNG3PM.js → chunk-6CPQVLHT.js} +15 -16
- package/dist/{chunk-2LERIIZM.js → chunk-7UFE2CHD.js} +308 -1026
- package/dist/{chunk-VAWYR6P4.js → chunk-A6Q4FWB6.js} +9 -1
- package/dist/{chunk-G4NAU6FF.js → chunk-CBX2CXGH.js} +8 -8
- package/dist/{chunk-5UA262ZO.js → chunk-CKF2FBUP.js} +1 -1
- package/dist/{chunk-5YLS3WH5.js → chunk-D4L5BN64.js} +1 -1
- package/dist/{chunk-VYXTP6YF.js → chunk-DDINUPO3.js} +2185 -5390
- package/dist/{chunk-DFFQYK2X.js → chunk-DIIGFBYT.js} +1 -1
- package/dist/{chunk-3T3C3475.js → chunk-G7BT24PD.js} +550 -3
- package/dist/chunk-HORSE7WX.js +54 -0
- package/dist/{chunk-7ADEPA4W.js → chunk-I3DBTNWQ.js} +6 -6
- package/dist/{chunk-HZ7FQCFU.js → chunk-JNSHR2J2.js} +1 -1
- package/dist/{chunk-ZXLXZFWO.js → chunk-K22NDWSD.js} +2 -2
- package/dist/{chunk-JXCJRBWD.js → chunk-K2X63CR2.js} +1 -5
- package/dist/{chunk-Q526TUOC.js → chunk-L5MZ74DA.js} +1 -1
- package/dist/{chunk-WKF72AS2.js → chunk-OVZA4IM7.js} +4 -4
- package/dist/{chunk-GR3QNLFS.js → chunk-OZNFRJKC.js} +5 -5
- package/dist/{chunk-NEB4Y7AX.js → chunk-PI4AW4T2.js} +241 -34
- package/dist/{chunk-TNMXKPJX.js → chunk-PICOXEUO.js} +4 -4
- package/dist/{chunk-QWDF72GZ.js → chunk-QGRVYPQC.js} +2 -2
- package/dist/{chunk-THIMC2ZD.js → chunk-WGUHISC2.js} +29 -11
- package/dist/{chunk-B3USL2JQ.js → chunk-X7XVRJK2.js} +2 -2
- package/dist/{chunk-4EZFAL24.js → chunk-XLU63IUB.js} +6 -6
- package/dist/{chunk-CX3LABFK.js → chunk-Z6D6YL7C.js} +1 -1
- package/dist/{chunk-NCXK2AO6.js → chunk-ZQTANHKA.js} +2 -2
- package/dist/chunk-ZZBZPBO5.js +1644 -0
- package/dist/executions.js +15 -15
- package/dist/history.js +7 -9
- package/dist/index.d.ts +367 -159
- package/dist/index.js +592 -68
- package/dist/{node-detail-view-ZFGS3FWU.js → node-detail-view-2AFXRNX6.js} +19 -864
- package/dist/nodes.js +2 -2
- package/dist/observability.js +7 -7
- package/dist/{quick-config-panel-ZDGYZR7Y.js → quick-config-panel-U4AELSCT.js} +12 -54
- package/dist/settings.js +9 -9
- package/dist/templates.js +21 -14
- package/dist/workflow-builder.js +22 -16
- package/dist/workflow-preview.js +2 -2
- package/dist/workflows-list.js +8 -8
- package/package.json +1 -1
- package/dist/chunk-GTEBQQ7J.js +0 -24
- package/dist/chunk-O2OFNGAF.js +0 -338
- package/dist/chunk-QTOPG7SR.js +0 -501
- package/dist/chunk-U7UNWR3D.js +0 -260
package/dist/chunk-U7UNWR3D.js
DELETED
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
import { useTr } from './chunk-UULVIT25.js';
|
|
2
|
-
import { getFluidGridsClient } from './chunk-PDODDDHY.js';
|
|
3
|
-
import { throwIfResultError } from './chunk-JKLZ6YZ3.js';
|
|
4
|
-
import { useState, useRef, useCallback, useEffect } from 'react';
|
|
5
|
-
import { gql } from '@apollo/client';
|
|
6
|
-
import { cn } from '@burdenoff/fe-libs/utils';
|
|
7
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
8
|
-
import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@burdenoff/fe-libs/ui';
|
|
9
|
-
|
|
10
|
-
var RUNNER_FIELDS = gql`
|
|
11
|
-
fragment SandboxRunnerFields on SandboxRunner {
|
|
12
|
-
id
|
|
13
|
-
name
|
|
14
|
-
status
|
|
15
|
-
hostname
|
|
16
|
-
os
|
|
17
|
-
arch
|
|
18
|
-
driver
|
|
19
|
-
version
|
|
20
|
-
capacity
|
|
21
|
-
privateNetwork {
|
|
22
|
-
target
|
|
23
|
-
ports
|
|
24
|
-
nodes
|
|
25
|
-
}
|
|
26
|
-
tokenPrefix
|
|
27
|
-
lastSeenAt
|
|
28
|
-
connectedAt
|
|
29
|
-
createdBy
|
|
30
|
-
createdAt
|
|
31
|
-
}
|
|
32
|
-
`;
|
|
33
|
-
var LIST_RUNNERS = gql`
|
|
34
|
-
${RUNNER_FIELDS}
|
|
35
|
-
query SandboxRunners {
|
|
36
|
-
sandboxRunners(context: {}) {
|
|
37
|
-
...SandboxRunnerFields
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
`;
|
|
41
|
-
var CREATE_RUNNER = gql`
|
|
42
|
-
${RUNNER_FIELDS}
|
|
43
|
-
mutation CreateSandboxRunner($name: String!) {
|
|
44
|
-
createSandboxRunner(input: { name: $name, context: {} }) {
|
|
45
|
-
token
|
|
46
|
-
bridgeUrl
|
|
47
|
-
runner {
|
|
48
|
-
...SandboxRunnerFields
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
`;
|
|
53
|
-
var ROTATE_RUNNER_TOKEN = gql`
|
|
54
|
-
${RUNNER_FIELDS}
|
|
55
|
-
mutation RotateSandboxRunnerToken($id: ID!) {
|
|
56
|
-
rotateSandboxRunnerToken(id: $id, context: {}) {
|
|
57
|
-
token
|
|
58
|
-
bridgeUrl
|
|
59
|
-
runner {
|
|
60
|
-
...SandboxRunnerFields
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
`;
|
|
65
|
-
var DELETE_RUNNER = gql`
|
|
66
|
-
mutation DeleteSandboxRunner($id: ID!) {
|
|
67
|
-
deleteSandboxRunner(id: $id, context: {})
|
|
68
|
-
}
|
|
69
|
-
`;
|
|
70
|
-
var RUNNER_INSTALL_SCRIPT_URL = "https://www.fluidgrids.ai/downloads/runner/install.sh";
|
|
71
|
-
function runnerInstallCommand(bridgeUrl) {
|
|
72
|
-
const base = `curl -fsSL ${RUNNER_INSTALL_SCRIPT_URL} | sh`;
|
|
73
|
-
return bridgeUrl && bridgeUrl !== DEFAULT_BRIDGE_URL ? `${base} -s -- --url ${bridgeUrl}` : base;
|
|
74
|
-
}
|
|
75
|
-
var DEFAULT_BRIDGE_URL = "wss://graphqlworkspaces.burdenoff.com/runner-bridge";
|
|
76
|
-
function useRunners(options) {
|
|
77
|
-
const [runners, setRunners] = useState([]);
|
|
78
|
-
const [loading, setLoading] = useState(!options?.skip);
|
|
79
|
-
const [error, setError] = useState(null);
|
|
80
|
-
const mounted = useRef(true);
|
|
81
|
-
const fetchRunners = useCallback(async () => {
|
|
82
|
-
if (options?.skip) return;
|
|
83
|
-
try {
|
|
84
|
-
const result = await getFluidGridsClient().query({ query: LIST_RUNNERS, fetchPolicy: "network-only" });
|
|
85
|
-
if (!mounted.current) return;
|
|
86
|
-
setRunners(result.data?.sandboxRunners ?? []);
|
|
87
|
-
setError(null);
|
|
88
|
-
} catch (err) {
|
|
89
|
-
if (mounted.current) setError(err);
|
|
90
|
-
} finally {
|
|
91
|
-
if (mounted.current) setLoading(false);
|
|
92
|
-
}
|
|
93
|
-
}, [options?.skip]);
|
|
94
|
-
useEffect(() => {
|
|
95
|
-
mounted.current = true;
|
|
96
|
-
void fetchRunners();
|
|
97
|
-
const pollMs = options?.pollMs ?? 1e4;
|
|
98
|
-
const timer = pollMs > 0 ? setInterval(fetchRunners, pollMs) : null;
|
|
99
|
-
return () => {
|
|
100
|
-
mounted.current = false;
|
|
101
|
-
if (timer) clearInterval(timer);
|
|
102
|
-
};
|
|
103
|
-
}, [fetchRunners, options?.pollMs]);
|
|
104
|
-
return { runners, loading, error, refetch: fetchRunners };
|
|
105
|
-
}
|
|
106
|
-
function useRunnerActions() {
|
|
107
|
-
const [busy, setBusy] = useState(false);
|
|
108
|
-
const run = useCallback(async (fn) => {
|
|
109
|
-
setBusy(true);
|
|
110
|
-
try {
|
|
111
|
-
return await fn();
|
|
112
|
-
} finally {
|
|
113
|
-
setBusy(false);
|
|
114
|
-
}
|
|
115
|
-
}, []);
|
|
116
|
-
const createRunner = useCallback(
|
|
117
|
-
(name) => run(async () => {
|
|
118
|
-
const result = throwIfResultError(
|
|
119
|
-
await getFluidGridsClient().mutate({ mutation: CREATE_RUNNER, variables: { name } })
|
|
120
|
-
);
|
|
121
|
-
if (!result.data?.createSandboxRunner)
|
|
122
|
-
throw new Error("No runner returned");
|
|
123
|
-
return result.data.createSandboxRunner;
|
|
124
|
-
}),
|
|
125
|
-
[run]
|
|
126
|
-
);
|
|
127
|
-
const rotateToken = useCallback(
|
|
128
|
-
(id) => run(async () => {
|
|
129
|
-
const result = throwIfResultError(
|
|
130
|
-
await getFluidGridsClient().mutate({ mutation: ROTATE_RUNNER_TOKEN, variables: { id } })
|
|
131
|
-
);
|
|
132
|
-
if (!result.data?.rotateSandboxRunnerToken)
|
|
133
|
-
throw new Error("No runner returned");
|
|
134
|
-
return result.data.rotateSandboxRunnerToken;
|
|
135
|
-
}),
|
|
136
|
-
[run]
|
|
137
|
-
);
|
|
138
|
-
const deleteRunner = useCallback(
|
|
139
|
-
(id) => run(async () => {
|
|
140
|
-
const result = throwIfResultError(
|
|
141
|
-
await getFluidGridsClient().mutate({
|
|
142
|
-
mutation: DELETE_RUNNER,
|
|
143
|
-
variables: { id }
|
|
144
|
-
})
|
|
145
|
-
);
|
|
146
|
-
return result.data?.deleteSandboxRunner === true;
|
|
147
|
-
}),
|
|
148
|
-
[run]
|
|
149
|
-
);
|
|
150
|
-
return { createRunner, rotateToken, deleteRunner, busy };
|
|
151
|
-
}
|
|
152
|
-
var STYLES = {
|
|
153
|
-
ONLINE: "border-status-success-border bg-status-success-bg-subtle text-status-success-text",
|
|
154
|
-
OFFLINE: "border-border-default bg-bg-sunken text-text-muted",
|
|
155
|
-
NEVER_CONNECTED: "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"
|
|
156
|
-
};
|
|
157
|
-
function RunnerStatusPill({
|
|
158
|
-
status,
|
|
159
|
-
className
|
|
160
|
-
}) {
|
|
161
|
-
const tr = useTr();
|
|
162
|
-
const label = status === "ONLINE" ? tr("fluidgrids.runners.online", "Online") : status === "OFFLINE" ? tr("fluidgrids.runners.offline", "Offline") : tr("fluidgrids.runners.neverConnected", "Not connected yet");
|
|
163
|
-
return /* @__PURE__ */ jsx(
|
|
164
|
-
"span",
|
|
165
|
-
{
|
|
166
|
-
className: cn(
|
|
167
|
-
"inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium",
|
|
168
|
-
STYLES[status],
|
|
169
|
-
className
|
|
170
|
-
),
|
|
171
|
-
"data-testid": "runner-status",
|
|
172
|
-
"data-status": status,
|
|
173
|
-
children: label
|
|
174
|
-
}
|
|
175
|
-
);
|
|
176
|
-
}
|
|
177
|
-
var CLOUD = "__fluidgrids_cloud__";
|
|
178
|
-
function RunOnSection({
|
|
179
|
-
value,
|
|
180
|
-
onChange,
|
|
181
|
-
sectionLabelClassName
|
|
182
|
-
}) {
|
|
183
|
-
const tr = useTr();
|
|
184
|
-
const { runners, loading } = useRunners({ pollMs: 15e3 });
|
|
185
|
-
const selected = value ? runners.find((r) => r.id === value.runnerId) : void 0;
|
|
186
|
-
return /* @__PURE__ */ jsxs("section", { className: "space-y-2", "data-testid": "ndv-settings-run-on", children: [
|
|
187
|
-
/* @__PURE__ */ jsx("div", { className: sectionLabelClassName, children: tr("fluidgrids.builder.nodeSettings.runOn", "Run on") }),
|
|
188
|
-
/* @__PURE__ */ jsxs(
|
|
189
|
-
Select,
|
|
190
|
-
{
|
|
191
|
-
value: value?.runnerId ?? CLOUD,
|
|
192
|
-
onValueChange: (v) => onChange(v === CLOUD ? null : { kind: "runner", runnerId: v }),
|
|
193
|
-
children: [
|
|
194
|
-
/* @__PURE__ */ jsx(
|
|
195
|
-
SelectTrigger,
|
|
196
|
-
{
|
|
197
|
-
className: "w-full",
|
|
198
|
-
"data-testid": "ndv-settings-run-on-select",
|
|
199
|
-
children: /* @__PURE__ */ jsx(SelectValue, {})
|
|
200
|
-
}
|
|
201
|
-
),
|
|
202
|
-
/* @__PURE__ */ jsxs(
|
|
203
|
-
SelectContent,
|
|
204
|
-
{
|
|
205
|
-
style: { zIndex: 1100 },
|
|
206
|
-
"data-testid": "ndv-settings-run-on-options",
|
|
207
|
-
children: [
|
|
208
|
-
/* @__PURE__ */ jsx(SelectItem, { value: CLOUD, "data-testid": "run-on-cloud", children: tr(
|
|
209
|
-
"fluidgrids.builder.nodeSettings.runOnCloud",
|
|
210
|
-
"FluidGrids Cloud (default)"
|
|
211
|
-
) }),
|
|
212
|
-
runners.map((runner) => /* @__PURE__ */ jsxs(
|
|
213
|
-
SelectItem,
|
|
214
|
-
{
|
|
215
|
-
value: runner.id,
|
|
216
|
-
"data-testid": "run-on-runner-option",
|
|
217
|
-
children: [
|
|
218
|
-
runner.name,
|
|
219
|
-
runner.status !== "ONLINE" ? ` (${runner.status === "OFFLINE" ? tr("fluidgrids.runners.offline", "Offline") : tr("fluidgrids.runners.neverConnected", "Not connected yet")})` : ""
|
|
220
|
-
]
|
|
221
|
-
},
|
|
222
|
-
runner.id
|
|
223
|
-
)),
|
|
224
|
-
value && !loading && !selected && /* @__PURE__ */ jsx(SelectItem, { value: value.runnerId, disabled: true, children: tr(
|
|
225
|
-
"fluidgrids.builder.nodeSettings.runOnMissing",
|
|
226
|
-
"Removed runner"
|
|
227
|
-
) })
|
|
228
|
-
]
|
|
229
|
-
}
|
|
230
|
-
)
|
|
231
|
-
]
|
|
232
|
-
}
|
|
233
|
-
),
|
|
234
|
-
value ? /* @__PURE__ */ jsxs("div", { className: "space-y-1 text-xs text-text-secondary", children: [
|
|
235
|
-
/* @__PURE__ */ jsxs("div", { className: "flex items-start gap-2", children: [
|
|
236
|
-
selected && /* @__PURE__ */ jsx(RunnerStatusPill, { status: selected.status }),
|
|
237
|
-
/* @__PURE__ */ jsx("span", { children: tr(
|
|
238
|
-
"fluidgrids.builder.nodeSettings.runOnRunnerHint",
|
|
239
|
-
"This node runs on your runner, in a local sandbox. If the runner is offline the node fails \u2014 it never falls back to FluidGrids Cloud. The node's input and the credentials it uses are sent to that machine."
|
|
240
|
-
) })
|
|
241
|
-
] }),
|
|
242
|
-
selected && /* @__PURE__ */ jsx("p", { "data-testid": "run-on-private-network", children: (selected.privateNetwork ?? []).length === 0 ? tr(
|
|
243
|
-
"fluidgrids.builder.nodeSettings.runOnPublicOnly",
|
|
244
|
-
"On this runner, nodes reach the public internet only. Private destinations are opened on the runner machine (fluidgrids-runner network allow)."
|
|
245
|
-
) : tr(
|
|
246
|
-
"fluidgrids.builder.nodeSettings.runOnPrivateNetwork",
|
|
247
|
-
"This runner opens {{count}} private destination(s) \u2014 see Runners for which nodes may use them.",
|
|
248
|
-
{ count: (selected.privateNetwork ?? []).length }
|
|
249
|
-
) })
|
|
250
|
-
] }) : /* @__PURE__ */ jsx("p", { className: "text-xs text-text-secondary", children: runners.length === 0 && !loading ? tr(
|
|
251
|
-
"fluidgrids.builder.nodeSettings.runOnNoRunners",
|
|
252
|
-
"Runs in FluidGrids Cloud. Add a runner under Workflows \u2192 Runners to run nodes on your own machine."
|
|
253
|
-
) : tr(
|
|
254
|
-
"fluidgrids.builder.nodeSettings.runOnCloudHint",
|
|
255
|
-
"Runs in FluidGrids Cloud."
|
|
256
|
-
) })
|
|
257
|
-
] });
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export { RUNNER_INSTALL_SCRIPT_URL, RunOnSection, RunnerStatusPill, runnerInstallCommand, useRunnerActions, useRunners };
|