@burdenoff/fluidgrids-fe-sdk 2026.1113.1 → 2026.1113.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/{AiStudioPage-D3MAk-bs.js → AiStudioPage-5KYZ8r8-.js} +464 -7
- package/dist/{ApprovalInboxPage-Bb8H9ruw.js → ApprovalInboxPage-BsJX4osU.js} +4 -3
- package/dist/{ConnectionFormDialog-Bg9_OdHX.js → ConnectionFormDialog-Dr1-CTan.js} +2 -1
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/{DataSinkDashboardPage-Dc2QuJbL.js → DataSinkDashboardPage-8ZDn85e2.js} +1 -1
- package/dist/{DataTablesPage-Cv4veaKK.js → DataTablesPage-BBvABuxE.js} +5 -4
- package/dist/{EntityTagPicker-D8ws706D.js → EntityTagPicker-BppBSEJk.js} +2 -2
- package/dist/{ExecutionDetailPage-CTVGE-d-.js → ExecutionDetailPage-BXDF2eoT.js} +1444 -18
- package/dist/ExecutionsListDocument-CzdLPpj5.js +1259 -0
- package/dist/{ExecutionsListPage-J0sJPuoM.js → ExecutionsListPage--4BthM8L.js} +285 -11
- package/dist/FailureTriagePanel-B5WCSRFo.js +1252 -0
- package/dist/{FluidGridsProvider-C4FVNz0n.js → FluidGridsProvider-Dc_Jhtch.js} +8666 -8734
- package/dist/{HistoryPage-B9XcTPrO.js → HistoryPage-BvFk2m1m.js} +4 -3
- package/dist/{InsightsPage-DFOltjyj.js → InsightsPage-Dwmb02F6.js} +2682 -5
- package/dist/{MissingNodesInstallModal-D8H-YNCJ.js → MissingNodesInstallModal-Cze674hp.js} +2 -2
- package/dist/{NodesPage-YQ-hP60x.js → NodesPage-C5Dq-ru-.js} +3 -2
- package/dist/{OpenTemplateAsCodeButton-hH26HQCk.js → OpenTemplateAsCodeButton-8MZHih6I.js} +2 -2
- package/dist/{PaidTemplateConfirm-DoKWMBtR.js → PaidTemplateConfirm-0G-gv29n.js} +1 -1
- package/dist/{PublishCustomNodeAction-5XXnSA3H.js → PublishCustomNodeAction-OOY35dUv.js} +1 -1
- package/dist/QuotaExhaustedDialog-wvu_-WJ-.js +55 -0
- package/dist/{RunnerStatusPill-Ctg4TJcP.js → RunnerStatusPill-Bh7mEsPh.js} +2 -1
- package/dist/{RunnersPage-CAt4YDhB.js → RunnersPage-DHeuUDil.js} +2 -2
- package/dist/{SettingsPage-DEKPCVVP.js → SettingsPage-CfjXiGpb.js} +694 -14
- package/dist/{TagFilterSelect-CwM2-DU6.js → TagFilterSelect-CAShgvbS.js} +1 -1
- package/dist/{TaskQueuesPage-Dhi6SIT4.js → TaskQueuesPage--Mmn36b-.js} +3 -3
- package/dist/{TemplateCard-DVSd_4zJ.js → TemplateCard-BA_9em22.js} +644 -352
- package/dist/{TemplateConfigurationModal-BKi1z7z7.js → TemplateConfigurationModal-BT3PaR0O.js} +4 -3
- package/dist/{TemplateDetailPanel-DK1gF7P5.js → TemplateDetailPanel-BxFNnlXm.js} +2 -1
- package/dist/{TemplatePreview-DuSX2Q7H.js → TemplatePreview-Bagja6WN.js} +7 -7
- package/dist/{TemplatesPage-CAWHh61l.js → TemplatesPage-CAajpJ5w.js} +711 -6
- package/dist/{VariablesPage-D7CoatWf.js → VariablesPage-CgUBKhAe.js} +3 -3
- package/dist/{VersionDiffDialog-DGwysiyE.js → VersionDiffDialog-D9W5Fm56.js} +233 -129
- package/dist/VersionLifecycleBar-DuphLOT0.js +131 -0
- package/dist/{WorkflowBuilder-DAeoQi5E.js → WorkflowBuilder-DMpSPElu.js} +16 -13
- package/dist/{WorkflowBuilder-BJgqDboZ.js → WorkflowBuilder-v8h8skwG.js} +5 -5
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEditLeaseStatusDocument-Dp62med3.js +627 -0
- package/dist/WorkflowProposalCard-zCdUpCk8.js +249 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/{WorkflowSearchRedirect-CMEvd_AR.js → WorkflowSearchRedirect-G78lINAE.js} +1 -1
- package/dist/{WorkflowShareDialog-BgHRsDP0.js → WorkflowShareDialog-B7VOgr4-.js} +304 -3
- package/dist/WorkflowVersionsDocument-CfPMloRW.js +3195 -0
- package/dist/{WorkflowsList-CcQPxWKL.js → WorkflowsList-CPYzfE4K.js} +11 -9
- package/dist/agent-form-D0uLvzx4.js +718 -0
- package/dist/{agentTools-DKpNKztf.js → agentTools-DTXUqtfu.js} +4 -4
- package/dist/api-BZVyX5d2.js +2286 -0
- package/dist/api-BqA-f-AD.js +8064 -0
- package/dist/app-BJUvugPM.js +3813 -0
- package/dist/assert-rules-CPNrO44K.js +318 -0
- package/dist/attach-node-helpers-CNsYtLOR.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/{canvasNoteTools-C_AN79m0.js → canvasNoteTools-DmfZwtnL.js} +3 -3
- package/dist/{channel-CZ70oI81.js → channel-DtF1n_ab.js} +1 -1
- package/dist/client-Ctl4jmY3.js +127 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/{code-editor-field-Dt6KNWwN.js → code-editor-field-Cv907s3W.js} +2 -2
- package/dist/{codec-client-CJ95Rmqo.js → codec-client-CAYl6j46.js} +2 -1
- package/dist/conditionBuilder-D8aLGL1w.js +1134 -0
- package/dist/config-X97zrIvn.js +600 -0
- package/dist/{definition-canvas-Bshn_dSP.js → definition-canvas-DL25_6NH.js} +1 -1
- package/dist/{dialog-Cjb4lB4D.js → dialog-BVd152GS.js} +3 -14
- package/dist/durable-nodes-DXCCQYWD.js +81 -0
- package/dist/errors-xPZ-IbQd.js +142 -0
- package/dist/executions.js +2 -2
- package/dist/{flow-builder-D3Hl2AFk.js → flow-builder-Dv5fWJ6F.js} +9301 -8189
- package/dist/{node-registry-refresh-Dy0uRg9f.js → global-client-DP_Wxe5t.js} +2 -27
- package/dist/global-operations-7pvXw_j9.js +145 -0
- package/dist/history.js +1 -1
- package/dist/{index-CWcP-tG1.d.ts → index-DtMUtXNq.d.ts} +247 -247
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4403 -46
- package/dist/input-ChT6Q-Pr.js +17 -0
- package/dist/logs-panel-DtG93ocy.js +342 -0
- package/dist/mapping-colors-BIX_YeCQ.js +48 -0
- package/dist/{node-detail-view-bVLeYarT.js → node-detail-view-BKI_2kM6.js} +12 -11
- package/dist/{node-editor-tab-body-JHHVtQgR.js → node-editor-tab-body-Cc1MWEFR.js} +3 -3
- package/dist/{node-operation-selection-DAbS6jSY.js → node-operation-selection-Czeeb2D4.js} +2 -139
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/nodes.js +1 -1
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +1 -1
- package/dist/observability.js +2 -2
- package/dist/{popover-Xx3gN7vg.js → popover-DDv7J1Kl.js} +717 -6
- package/dist/{quick-config-panel-BvVQXuIL.js → quick-config-panel-BPCRfqWI.js} +4 -4
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/{schedule-panel-DCb40TPN.js → schedule-panel-C1KwfLCE.js} +14 -12
- package/dist/settings.js +1 -1
- package/dist/{shared-CMfn30xT.js → shared-Ctl9ZHo1.js} +2 -1
- package/dist/{sidebar-node-editor-DxCWFZG2.js → sidebar-node-editor-d9Rlq5pU.js} +4 -4
- package/dist/sticky-notes-23j-wL6Q.js +96 -0
- package/dist/template-code-dqRunGOv.js +184 -0
- package/dist/template-preview-C01KV277.js +29 -0
- package/dist/templates.js +2 -2
- package/dist/token-refresh-link-BjN7H4qA.js +291 -0
- package/dist/useAgentDefinitions-ZKX2N9aP.js +3101 -0
- package/dist/useConnections-BlB0gbOB.js +931 -0
- package/dist/useDurableParity-BgLH_SCF.js +2088 -0
- package/dist/{useEntityTags-Db4Pc8_M.js → useEntityTags-4iW6UTly.js} +227 -3
- package/dist/{useExecutions-DOpG1pUQ.js → useExecutions-Bm7q_UwN.js} +6 -3
- package/dist/useGlobalStoreClient-DMTrywdX.js +24 -0
- package/dist/{useHumanRequests-ZiR0sSzS.js → useHumanRequests-DwG2tQ3f.js} +2 -1
- package/dist/{useObservability-rQmwhoZZ.js → useObservability-DPATdbw7.js} +4 -2
- package/dist/{useRunHistory-COn6dl7l.js → useRunHistory-CGfjCsJ3.js} +1122 -4
- package/dist/{useVariables-2ddyJX4a.js → useVariables-DFdZofLQ.js} +2 -1
- package/dist/{useWorkflowCodeExport-ZoUJKRSK.js → useWorkflowCodeExport-D_mCuhKP.js} +289 -4
- package/dist/useWorkflowOrganization-r5FWNBs6.js +1690 -0
- package/dist/useWorkflowProposal-Bh2_qjmM.js +7478 -0
- package/dist/{useWorkflows-jOW60YmD.js → useWorkflows-aqVD7kGa.js} +694 -4
- package/dist/workflow-builder.js +5 -5
- package/dist/{workflow-code-transfer-l9wO34S0.js → workflow-code-transfer-5C0HUzae.js} +1 -53
- package/dist/workflow-host.js +4 -2
- package/dist/workflow-pages.d.ts +1 -1
- package/dist/workflow-pages.js +19 -19
- package/dist/workflow-preview.js +3 -2
- package/dist/workflows-list.js +1 -1
- package/package.json +1 -1
- package/dist/FailureTriagePanel-BbYFYeV_.js +0 -311
- package/dist/WorkflowProposalCard-DGMdZC4R.js +0 -1432
- package/dist/agent-form-Bfvm32j1.js +0 -83
- package/dist/api-DQtHXbIg.js +0 -224
- package/dist/api-MeAm6g7E.js +0 -55
- package/dist/client-C9XSzSXr.js +0 -1147
- package/dist/graphql-operation-types-C9qbvRa8.js +0 -53122
- package/dist/useAgentDefinitions-_hgNCK1A.js +0 -550
- package/dist/useConnections-Cs7LCWEM.js +0 -401
- package/dist/useDurableParity-CcLeCDfv.js +0 -504
- package/dist/useWorkflowOrganization-QxVePSkk.js +0 -282
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jI as WorkflowTestAssertionOperator } from "./graphql-types-v6CTGwA0.js";
|
|
3
|
+
|
|
4
|
+
// src/builder/lib/assert-rules.ts
|
|
5
|
+
/** Every operator, in the order the editors offer them. */
|
|
6
|
+
const ASSERT_OPERATORS = [
|
|
7
|
+
{
|
|
8
|
+
wire: "equals",
|
|
9
|
+
value: "EQUALS",
|
|
10
|
+
operand: "expected",
|
|
11
|
+
label: "equals"
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
wire: "notEquals",
|
|
15
|
+
value: "NOT_EQUALS",
|
|
16
|
+
operand: "expected",
|
|
17
|
+
label: "does not equal"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
wire: "contains",
|
|
21
|
+
value: "CONTAINS",
|
|
22
|
+
operand: "expected",
|
|
23
|
+
label: "contains"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
wire: "notContains",
|
|
27
|
+
value: "NOT_CONTAINS",
|
|
28
|
+
operand: "expected",
|
|
29
|
+
label: "does not contain"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
wire: "matches",
|
|
33
|
+
value: "MATCHES",
|
|
34
|
+
operand: "expected",
|
|
35
|
+
label: "matches regex"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
wire: "jsonSchema",
|
|
39
|
+
value: "JSON_SCHEMA",
|
|
40
|
+
operand: "expected",
|
|
41
|
+
label: "matches JSON Schema"
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
wire: "between",
|
|
45
|
+
value: "BETWEEN",
|
|
46
|
+
operand: "range",
|
|
47
|
+
label: "is between"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
wire: "itemCount",
|
|
51
|
+
value: "ITEM_COUNT",
|
|
52
|
+
operand: "range",
|
|
53
|
+
label: "has item count"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
wire: "exists",
|
|
57
|
+
value: "EXISTS",
|
|
58
|
+
operand: "none",
|
|
59
|
+
label: "exists"
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
wire: "notExists",
|
|
63
|
+
value: "NOT_EXISTS",
|
|
64
|
+
operand: "none",
|
|
65
|
+
label: "does not exist"
|
|
66
|
+
}
|
|
67
|
+
];
|
|
68
|
+
/** The service's cap on a `matches` pattern. */
|
|
69
|
+
const MAX_REGEX_LENGTH = 500;
|
|
70
|
+
/** Rules per node (Assert node or test-case expectation). */
|
|
71
|
+
const MAX_RULES = 50;
|
|
72
|
+
/**
|
|
73
|
+
* The spec of an operator given in either spelling (`itemCount`,
|
|
74
|
+
* `ITEM_COUNT`), or null when it is not one.
|
|
75
|
+
*/
|
|
76
|
+
function operatorSpec(value) {
|
|
77
|
+
if (typeof value !== "string") return null;
|
|
78
|
+
return ASSERT_OPERATORS.find((spec) => spec.wire === value || spec.value === value) ?? null;
|
|
79
|
+
}
|
|
80
|
+
function isRecord(value) {
|
|
81
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
82
|
+
}
|
|
83
|
+
function optionalNumber(value) {
|
|
84
|
+
if (value === void 0 || value === null) return void 0;
|
|
85
|
+
return typeof value === "number" && Number.isFinite(value) ? value : false;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Checks one rule and normalises it to the wire form, or reports the first
|
|
89
|
+
* problem. `index` is the rule's position, for the message.
|
|
90
|
+
*/
|
|
91
|
+
function normaliseAssertRule(raw, index) {
|
|
92
|
+
if (!isRecord(raw)) return { problem: {
|
|
93
|
+
code: "notObject",
|
|
94
|
+
index
|
|
95
|
+
} };
|
|
96
|
+
const spec = operatorSpec(raw.operator);
|
|
97
|
+
if (!spec) return { problem: {
|
|
98
|
+
code: "unknownOperator",
|
|
99
|
+
index,
|
|
100
|
+
operator: String(raw.operator ?? "")
|
|
101
|
+
} };
|
|
102
|
+
const rule = { operator: spec.wire };
|
|
103
|
+
if (raw.path !== void 0 && raw.path !== null && raw.path !== "") {
|
|
104
|
+
if (typeof raw.path !== "string") return { problem: {
|
|
105
|
+
code: "pathInvalid",
|
|
106
|
+
index
|
|
107
|
+
} };
|
|
108
|
+
rule.path = raw.path;
|
|
109
|
+
}
|
|
110
|
+
if (raw.message !== void 0 && raw.message !== null && raw.message !== "") {
|
|
111
|
+
if (typeof raw.message !== "string") return { problem: {
|
|
112
|
+
code: "messageInvalid",
|
|
113
|
+
index
|
|
114
|
+
} };
|
|
115
|
+
rule.message = raw.message;
|
|
116
|
+
}
|
|
117
|
+
if (spec.operand === "expected") {
|
|
118
|
+
if (!("expected" in raw)) return { problem: {
|
|
119
|
+
code: "expectedRequired",
|
|
120
|
+
index
|
|
121
|
+
} };
|
|
122
|
+
if (spec.wire === "matches") {
|
|
123
|
+
if (typeof raw.expected !== "string") return { problem: {
|
|
124
|
+
code: "regexInvalid",
|
|
125
|
+
index
|
|
126
|
+
} };
|
|
127
|
+
if (raw.expected.length > 500) return { problem: {
|
|
128
|
+
code: "regexTooLong",
|
|
129
|
+
index
|
|
130
|
+
} };
|
|
131
|
+
try {
|
|
132
|
+
new RegExp(raw.expected);
|
|
133
|
+
} catch {
|
|
134
|
+
return { problem: {
|
|
135
|
+
code: "regexInvalid",
|
|
136
|
+
index
|
|
137
|
+
} };
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (spec.wire === "jsonSchema" && !isRecord(raw.expected)) return { problem: {
|
|
141
|
+
code: "schemaInvalid",
|
|
142
|
+
index
|
|
143
|
+
} };
|
|
144
|
+
rule.expected = raw.expected;
|
|
145
|
+
}
|
|
146
|
+
if (spec.operand === "range") {
|
|
147
|
+
const min = optionalNumber(raw.min);
|
|
148
|
+
const max = optionalNumber(raw.max);
|
|
149
|
+
if (min === false || max === false) return { problem: {
|
|
150
|
+
code: "rangeInvalid",
|
|
151
|
+
index
|
|
152
|
+
} };
|
|
153
|
+
if (min === void 0 && max === void 0) return { problem: {
|
|
154
|
+
code: "rangeRequired",
|
|
155
|
+
index
|
|
156
|
+
} };
|
|
157
|
+
if (min !== void 0 && max !== void 0 && min > max) return { problem: {
|
|
158
|
+
code: "rangeInvalid",
|
|
159
|
+
index
|
|
160
|
+
} };
|
|
161
|
+
if (min !== void 0) rule.min = min;
|
|
162
|
+
if (max !== void 0) rule.max = max;
|
|
163
|
+
}
|
|
164
|
+
return { rule };
|
|
165
|
+
}
|
|
166
|
+
/** Checks a list of rules (1 to {@link MAX_RULES}); the first problem wins. */
|
|
167
|
+
function normaliseAssertRules(raw) {
|
|
168
|
+
if (raw.length === 0) return { problem: { code: "empty" } };
|
|
169
|
+
if (raw.length > 50) return { problem: {
|
|
170
|
+
code: "tooMany",
|
|
171
|
+
count: raw.length
|
|
172
|
+
} };
|
|
173
|
+
const rules = [];
|
|
174
|
+
for (const [index, item] of raw.entries()) {
|
|
175
|
+
const result = normaliseAssertRule(item, index);
|
|
176
|
+
if ("problem" in result) return result;
|
|
177
|
+
rules.push(result.rule);
|
|
178
|
+
}
|
|
179
|
+
return { rules };
|
|
180
|
+
}
|
|
181
|
+
/** An i18n key and its English fallback for a rule problem. */
|
|
182
|
+
function describeAssertRuleProblem(problem) {
|
|
183
|
+
const at = "index" in problem ? `Rule ${problem.index + 1}: ` : "";
|
|
184
|
+
switch (problem.code) {
|
|
185
|
+
case "notObject": return {
|
|
186
|
+
key: "fluidgrids.builder.assertRules.notObject",
|
|
187
|
+
fallback: `${at}a rule must be an object.`
|
|
188
|
+
};
|
|
189
|
+
case "unknownOperator": return {
|
|
190
|
+
key: "fluidgrids.builder.assertRules.unknownOperator",
|
|
191
|
+
fallback: `${at}unknown operator "${problem.operator}". Use ${ASSERT_OPERATORS.map((spec) => spec.wire).join(", ")}.`
|
|
192
|
+
};
|
|
193
|
+
case "expectedRequired": return {
|
|
194
|
+
key: "fluidgrids.builder.assertRules.expectedRequired",
|
|
195
|
+
fallback: `${at}this operator needs an expected value.`
|
|
196
|
+
};
|
|
197
|
+
case "rangeRequired": return {
|
|
198
|
+
key: "fluidgrids.builder.assertRules.rangeRequired",
|
|
199
|
+
fallback: `${at}set a minimum, a maximum or both.`
|
|
200
|
+
};
|
|
201
|
+
case "rangeInvalid": return {
|
|
202
|
+
key: "fluidgrids.builder.assertRules.rangeInvalid",
|
|
203
|
+
fallback: `${at}minimum and maximum must be numbers, with the minimum not above the maximum.`
|
|
204
|
+
};
|
|
205
|
+
case "regexInvalid": return {
|
|
206
|
+
key: "fluidgrids.builder.assertRules.regexInvalid",
|
|
207
|
+
fallback: `${at}the expected value is not a valid regular expression.`
|
|
208
|
+
};
|
|
209
|
+
case "regexTooLong": return {
|
|
210
|
+
key: "fluidgrids.builder.assertRules.regexTooLong",
|
|
211
|
+
fallback: `${at}a regular expression may have at most ${500} characters.`
|
|
212
|
+
};
|
|
213
|
+
case "schemaInvalid": return {
|
|
214
|
+
key: "fluidgrids.builder.assertRules.schemaInvalid",
|
|
215
|
+
fallback: `${at}the expected value must be a JSON Schema object.`
|
|
216
|
+
};
|
|
217
|
+
case "pathInvalid": return {
|
|
218
|
+
key: "fluidgrids.builder.assertRules.pathInvalid",
|
|
219
|
+
fallback: `${at}the path must be text.`
|
|
220
|
+
};
|
|
221
|
+
case "messageInvalid": return {
|
|
222
|
+
key: "fluidgrids.builder.assertRules.messageInvalid",
|
|
223
|
+
fallback: `${at}the message must be text.`
|
|
224
|
+
};
|
|
225
|
+
case "tooMany": return {
|
|
226
|
+
key: "fluidgrids.builder.assertRules.tooMany",
|
|
227
|
+
fallback: `At most ${50} rules (found ${problem.count}).`
|
|
228
|
+
};
|
|
229
|
+
case "empty": return {
|
|
230
|
+
key: "fluidgrids.builder.assertRules.empty",
|
|
231
|
+
fallback: "Add at least one rule."
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* The rules held in an Assert node's `rules` setting. The manifest declares it
|
|
237
|
+
* as text, so it is usually a JSON string; an array is accepted as well. A
|
|
238
|
+
* value that does not parse yields null, so the editor can fall back to the
|
|
239
|
+
* raw text instead of discarding it.
|
|
240
|
+
*/
|
|
241
|
+
function readAssertRulesSetting(value) {
|
|
242
|
+
if (value === void 0 || value === null || value === "") return [];
|
|
243
|
+
if (Array.isArray(value)) return value;
|
|
244
|
+
if (typeof value !== "string") return null;
|
|
245
|
+
try {
|
|
246
|
+
const parsed = JSON.parse(value);
|
|
247
|
+
return Array.isArray(parsed) ? parsed : null;
|
|
248
|
+
} catch {
|
|
249
|
+
return null;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
function emptyAssertRuleRow() {
|
|
253
|
+
return {
|
|
254
|
+
path: "",
|
|
255
|
+
operator: "equals",
|
|
256
|
+
expected: "",
|
|
257
|
+
min: "",
|
|
258
|
+
max: "",
|
|
259
|
+
message: ""
|
|
260
|
+
};
|
|
261
|
+
}
|
|
262
|
+
function rowNumber(value) {
|
|
263
|
+
return typeof value === "number" && Number.isFinite(value) ? String(value) : "";
|
|
264
|
+
}
|
|
265
|
+
function rowExpected(operator, value) {
|
|
266
|
+
if (value === void 0) return "";
|
|
267
|
+
if (operator === "matches" && typeof value === "string") return value;
|
|
268
|
+
return JSON.stringify(value);
|
|
269
|
+
}
|
|
270
|
+
/** The editor rows of stored rules (either operator spelling). */
|
|
271
|
+
function rowsFromRules(rules) {
|
|
272
|
+
return rules.map((raw) => {
|
|
273
|
+
const rule = isRecord(raw) ? raw : {};
|
|
274
|
+
const operator = operatorSpec(rule.operator)?.wire ?? (typeof rule.operator === "string" ? rule.operator : "equals");
|
|
275
|
+
return {
|
|
276
|
+
path: typeof rule.path === "string" ? rule.path : "",
|
|
277
|
+
operator,
|
|
278
|
+
expected: rowExpected(operator, rule.expected),
|
|
279
|
+
min: rowNumber(rule.min),
|
|
280
|
+
max: rowNumber(rule.max),
|
|
281
|
+
message: typeof rule.message === "string" ? rule.message : ""
|
|
282
|
+
};
|
|
283
|
+
});
|
|
284
|
+
}
|
|
285
|
+
function parseExpected(operator, text) {
|
|
286
|
+
if (operator === "matches") return text;
|
|
287
|
+
try {
|
|
288
|
+
return JSON.parse(text);
|
|
289
|
+
} catch {
|
|
290
|
+
return text;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function parseRowNumber(text) {
|
|
294
|
+
const trimmed = text.trim();
|
|
295
|
+
if (trimmed === "") return void 0;
|
|
296
|
+
const value = Number(trimmed);
|
|
297
|
+
return Number.isFinite(value) ? value : trimmed;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* The stored form of an editor row. Only the operands its operator uses are
|
|
301
|
+
* kept, so switching an operator does not leave a stale `expected` behind.
|
|
302
|
+
*/
|
|
303
|
+
function ruleFromRow(row) {
|
|
304
|
+
const spec = operatorSpec(row.operator);
|
|
305
|
+
const rule = { operator: row.operator };
|
|
306
|
+
if (row.path.trim()) rule.path = row.path.trim();
|
|
307
|
+
if (spec?.operand === "expected" && (row.expected !== "" || spec.wire === "matches")) rule.expected = parseExpected(spec.wire, row.expected);
|
|
308
|
+
if (spec?.operand === "range") {
|
|
309
|
+
const min = parseRowNumber(row.min);
|
|
310
|
+
const max = parseRowNumber(row.max);
|
|
311
|
+
if (min !== void 0) rule.min = min;
|
|
312
|
+
if (max !== void 0) rule.max = max;
|
|
313
|
+
}
|
|
314
|
+
if (row.message.trim()) rule.message = row.message.trim();
|
|
315
|
+
return rule;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
export { operatorSpec as a, ruleFromRow as c, normaliseAssertRules as i, describeAssertRuleProblem as n, readAssertRulesSetting as o, emptyAssertRuleRow as r, rowsFromRules as s, ASSERT_OPERATORS as t };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { w as resolveInputHandles } from "./node-operation-selection-Czeeb2D4.js";
|
|
3
|
+
|
|
4
|
+
// src/builder/hooks/attach-node-helpers.ts
|
|
5
|
+
/** Horizontal gap between a source node and a node attached via the "+" flow. */
|
|
6
|
+
const ATTACH_GAP_X = 120;
|
|
7
|
+
/** Fallback width when the source node hasn't been measured yet (w-72 card). */
|
|
8
|
+
const DEFAULT_NODE_WIDTH = 288;
|
|
9
|
+
/**
|
|
10
|
+
* Canvas position for a node attached to `source`'s output: immediately to the
|
|
11
|
+
* right of the card, vertically aligned (n8n places the next node the same
|
|
12
|
+
* way). Overlaps with existing nodes are resolved by the canvas auto-adjust
|
|
13
|
+
* pass that runs after the new node is measured.
|
|
14
|
+
*/
|
|
15
|
+
function computeAttachPosition(source) {
|
|
16
|
+
if (!source) return void 0;
|
|
17
|
+
const width = source.measured?.width ?? DEFAULT_NODE_WIDTH;
|
|
18
|
+
return {
|
|
19
|
+
x: source.position.x + width + 120,
|
|
20
|
+
y: source.position.y
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The input handle a freshly-attached node should be wired to — the first
|
|
25
|
+
* declared input handle (Merge `input-1`, Compare Datasets `inputA`, …),
|
|
26
|
+
* falling back to the default single `target` handle.
|
|
27
|
+
*/
|
|
28
|
+
function firstInputHandleId(data) {
|
|
29
|
+
return resolveInputHandles(data)[0]?.id ?? "target";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export { firstInputHandleId as n, computeAttachPosition as t };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./cn-QqidFIgr.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
|
|
6
|
+
// src/ui/badge.tsx
|
|
7
|
+
const badgeVariants = cva("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
|
|
8
|
+
variants: { variant: {
|
|
9
|
+
default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
|
|
10
|
+
secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
|
|
11
|
+
destructive: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
|
|
12
|
+
outline: "text-foreground",
|
|
13
|
+
success: "border-transparent bg-status-success-bg-subtle text-status-success-text",
|
|
14
|
+
warning: "border-transparent bg-status-warning-bg-subtle text-status-warning-text",
|
|
15
|
+
info: "border-transparent bg-status-info-bg-subtle text-status-info-text"
|
|
16
|
+
} },
|
|
17
|
+
defaultVariants: { variant: "default" }
|
|
18
|
+
});
|
|
19
|
+
function Badge({ className, variant, ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx("div", {
|
|
21
|
+
className: cn(badgeVariants({ variant }), className),
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export { badgeVariants as n, Badge as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { n as useAgentMarksStore, r as toPlainText } from "./marksStore-DGCXjTmZ.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { F as nodeTitle, L as paramsFromOperation, R as selectedOperationOf } from "./FluidGridsProvider-Dc_Jhtch.js";
|
|
4
|
+
import { M as useFlowStore } from "./node-operation-selection-Czeeb2D4.js";
|
|
5
|
+
import { t as notesKeyOf } from "./notesKey-5EaREBGA.js";
|
|
6
6
|
import { AgentToolError, defineAgentTool } from "@burdenoff/fe-libs/shared/agent-tools";
|
|
7
7
|
import { z } from "zod";
|
|
8
8
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { r as getFluidGridsConfig } from "./config-X97zrIvn.js";
|
|
3
3
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { Icon } from "@iconify/react";
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { s as createLiveTokenReader, t as createFluidGridsTokenRefreshLink } from "./token-refresh-link-BjN7H4qA.js";
|
|
3
|
+
import { ApolloClient, InMemoryCache, createHttpLink, split } from "@apollo/client/core";
|
|
4
|
+
import { setContext } from "@apollo/client/link/context";
|
|
5
|
+
import { getMainDefinition } from "@apollo/client/utilities";
|
|
6
|
+
import { GraphQLWsLink } from "@apollo/client/link/subscriptions";
|
|
7
|
+
import { createClient } from "graphql-ws";
|
|
8
|
+
|
|
9
|
+
// src/graphql/client.ts
|
|
10
|
+
let clientInstance = null;
|
|
11
|
+
/**
|
|
12
|
+
* Create a new Apollo client for FluidGrids SDK.
|
|
13
|
+
*
|
|
14
|
+
* Tokens are read per request: the client starts with `config.authToken` /
|
|
15
|
+
* `config.workspaceToken` and follows any token set later in the SDK config
|
|
16
|
+
* (see `auth.onTokenExpired`). Expired-token responses are refreshed and
|
|
17
|
+
* retried once by `createFluidGridsTokenRefreshLink`; the websocket reads the
|
|
18
|
+
* current token whenever it (re)connects.
|
|
19
|
+
*/
|
|
20
|
+
function createFluidGridsClient(config) {
|
|
21
|
+
const graphqlUrl = getGraphQLUrl(config.apiGatewayUrl);
|
|
22
|
+
const wsUrl = graphqlUrl.replace(/^http/, "ws");
|
|
23
|
+
const readTokens = createLiveTokenReader({
|
|
24
|
+
authToken: config.authToken,
|
|
25
|
+
workspaceToken: config.workspaceToken
|
|
26
|
+
});
|
|
27
|
+
const httpLink = createHttpLink({ uri: graphqlUrl });
|
|
28
|
+
const authLink = setContext((_, { headers }) => {
|
|
29
|
+
const { authToken, workspaceToken } = readTokens();
|
|
30
|
+
return { headers: {
|
|
31
|
+
...headers,
|
|
32
|
+
...authToken && { authorization: `Bearer ${authToken}` },
|
|
33
|
+
...workspaceToken && { "x-workspace-authorization": `Bearer ${workspaceToken}` },
|
|
34
|
+
"x-workspace-id": config.workspaceId,
|
|
35
|
+
...config.tenantId && { "x-tenant-id": config.tenantId },
|
|
36
|
+
...config.productId && { "x-product-id": config.productId }
|
|
37
|
+
} };
|
|
38
|
+
});
|
|
39
|
+
const wsLink = new GraphQLWsLink(createClient({
|
|
40
|
+
url: wsUrl,
|
|
41
|
+
connectionParams: () => {
|
|
42
|
+
const { authToken, workspaceToken } = readTokens();
|
|
43
|
+
return {
|
|
44
|
+
authorization: authToken ? `Bearer ${authToken}` : "",
|
|
45
|
+
...workspaceToken && { "x-workspace-authorization": `Bearer ${workspaceToken}` },
|
|
46
|
+
"x-workspace-id": config.workspaceId,
|
|
47
|
+
...config.tenantId && { "x-tenant-id": config.tenantId },
|
|
48
|
+
...config.productId && { "x-product-id": config.productId }
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}));
|
|
52
|
+
const splitLink = split(({ query }) => {
|
|
53
|
+
const definition = getMainDefinition(query);
|
|
54
|
+
return definition.kind === "OperationDefinition" && definition.operation === "subscription";
|
|
55
|
+
}, wsLink, createFluidGridsTokenRefreshLink().concat(authLink).concat(httpLink));
|
|
56
|
+
return new ApolloClient({
|
|
57
|
+
link: splitLink,
|
|
58
|
+
cache: new InMemoryCache(),
|
|
59
|
+
defaultOptions: {
|
|
60
|
+
watchQuery: { fetchPolicy: "cache-and-network" },
|
|
61
|
+
query: { fetchPolicy: "network-only" }
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Get the GraphQL URL from the API gateway URL
|
|
67
|
+
*/
|
|
68
|
+
function getGraphQLUrl(apiGatewayUrl) {
|
|
69
|
+
const normalizedBase = apiGatewayUrl.endsWith("/") ? apiGatewayUrl.slice(0, -1) : apiGatewayUrl;
|
|
70
|
+
if (normalizedBase.endsWith("/graphql")) return normalizedBase;
|
|
71
|
+
return `${normalizedBase}/workspaces/graphql`;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Set the module-level client (for SDK-managed mode or wrapper injection)
|
|
75
|
+
*/
|
|
76
|
+
function setFluidGridsClient(client) {
|
|
77
|
+
clientInstance = client;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Get the module-level client
|
|
81
|
+
* @throws Error if client is not initialized
|
|
82
|
+
*/
|
|
83
|
+
function getFluidGridsClient() {
|
|
84
|
+
if (!clientInstance) throw new Error("FluidGrids client not initialized. Use FluidGridsProvider or call setFluidGridsClient().");
|
|
85
|
+
return clientInstance;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Get the client if available, or null if not initialized
|
|
89
|
+
*/
|
|
90
|
+
function getFluidGridsClientSafe() {
|
|
91
|
+
return clientInstance;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Check if the client is ready
|
|
95
|
+
*/
|
|
96
|
+
function isFluidGridsClientReady() {
|
|
97
|
+
return clientInstance !== null;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Wait for the client to be initialized
|
|
101
|
+
*/
|
|
102
|
+
function waitForFluidGridsClient(timeoutMs = 1e4, intervalMs = 100) {
|
|
103
|
+
return new Promise((resolve) => {
|
|
104
|
+
if (clientInstance) {
|
|
105
|
+
resolve(clientInstance);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
const start = Date.now();
|
|
109
|
+
const timer = setInterval(() => {
|
|
110
|
+
if (clientInstance) {
|
|
111
|
+
clearInterval(timer);
|
|
112
|
+
resolve(clientInstance);
|
|
113
|
+
} else if (Date.now() - start >= timeoutMs) {
|
|
114
|
+
clearInterval(timer);
|
|
115
|
+
resolve(null);
|
|
116
|
+
}
|
|
117
|
+
}, intervalMs);
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Reset the client reference (for cleanup on unmount)
|
|
122
|
+
*/
|
|
123
|
+
function resetFluidGridsClient() {
|
|
124
|
+
clientInstance = null;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { resetFluidGridsClient as a, isFluidGridsClientReady as i, getFluidGridsClient as n, setFluidGridsClient as o, getFluidGridsClientSafe as r, waitForFluidGridsClient as s, createFluidGridsClient as t };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
// src/builder/components/ndv/code-editor-diagnostics.ts
|
|
3
|
+
/** Maps the service's severity strings onto CodeMirror's three. */
|
|
4
|
+
function editorSeverity(value) {
|
|
5
|
+
const lower = value.toLowerCase();
|
|
6
|
+
if (lower.startsWith("warn")) return "warning";
|
|
7
|
+
if (lower === "info" || lower === "hint" || lower === "suggestion") return "info";
|
|
8
|
+
return "error";
|
|
9
|
+
}
|
|
10
|
+
/** Start offsets of each line of `text`. */
|
|
11
|
+
function lineStarts(text) {
|
|
12
|
+
const starts = [0];
|
|
13
|
+
for (let i = 0; i < text.length; i += 1) if (text.charCodeAt(i) === 10) starts.push(i + 1);
|
|
14
|
+
return starts;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Converts line/column diagnostics into CodeMirror ranges over `text`. A
|
|
18
|
+
* position beyond the text is clamped to its end, so a diagnostic computed for
|
|
19
|
+
* an older text never throws. A column marks the token that starts there (up
|
|
20
|
+
* to the next non-word character); no column marks the whole line.
|
|
21
|
+
*/
|
|
22
|
+
function toCodeMirrorDiagnostics(text, diagnostics) {
|
|
23
|
+
const starts = lineStarts(text);
|
|
24
|
+
return diagnostics.map((diagnostic) => {
|
|
25
|
+
const lineIndex = Math.min(Math.max((diagnostic.line ?? 1) - 1, 0), starts.length - 1);
|
|
26
|
+
const lineStart = starts[lineIndex];
|
|
27
|
+
const lineEnd = lineIndex + 1 < starts.length ? starts[lineIndex + 1] - 1 : text.length;
|
|
28
|
+
let from = lineStart;
|
|
29
|
+
let to = lineEnd;
|
|
30
|
+
if (diagnostic.column && diagnostic.column > 0) {
|
|
31
|
+
from = Math.min(lineStart + diagnostic.column - 1, lineEnd);
|
|
32
|
+
to = from;
|
|
33
|
+
while (to < lineEnd && /[\w$]/.test(text.charAt(to))) to += 1;
|
|
34
|
+
if (to === from) to = Math.min(from + 1, lineEnd);
|
|
35
|
+
}
|
|
36
|
+
const message = diagnostic.code ? `${diagnostic.code}: ${diagnostic.message}` : diagnostic.message;
|
|
37
|
+
return {
|
|
38
|
+
from,
|
|
39
|
+
to,
|
|
40
|
+
severity: diagnostic.severity,
|
|
41
|
+
message
|
|
42
|
+
};
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export { toCodeMirrorDiagnostics as n, editorSeverity as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as __exportAll } from "./rolldown-runtime-hDbaFkMy.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { n as toCodeMirrorDiagnostics } from "./code-editor-diagnostics-Zr0cIcx1.js";
|
|
4
|
+
import { n as useBuilderReadOnly } from "./read-only-context-Dt9N9SIG.js";
|
|
5
5
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
6
6
|
import { cn } from "@burdenoff/fe-libs/utils";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { o as throwIfResultError } from "./errors-xPZ-IbQd.js";
|
|
3
|
+
import { n as getFluidGridsClient } from "./client-Ctl4jmY3.js";
|
|
3
4
|
import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
|
|
4
5
|
import { useCallback, useEffect, useState } from "react";
|
|
5
6
|
import { cn } from "@burdenoff/fe-libs/utils";
|