@uipath/flow-tool 1.201.0-preview.131 → 1.201.0-preview.133
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/{authoring-rezk32bm.js → authoring-7r6g06c7.js} +2 -2
- package/dist/{conversion-W6HMHBWW-6qbqgqks.js → conversion-H2VEEYLB-ng48mbf7.js} +536 -161
- package/dist/{de-K6MLR24N-5N5XGLH6-gbwpvdz4.js → de-5HU6GFWV-4EZK6G7N-yrh21f52.js} +273 -13
- package/dist/{de-K6MLR24N-00fjz82b.js → de-5HU6GFWV-zheyw6d2.js} +271 -10
- package/dist/de-5KVP66U6-f7knj511.js +161 -0
- package/dist/de-5KVP66U6-t37qr521.js +161 -0
- package/dist/{de-B2KIY5TC-81f703v3.js → de-HKTOVV4H-d5yw5j21.js} +3 -3
- package/dist/{de-WMKOGI7B-r1821wpe.js → de-WMKOGI7B-6dc1zdnp.js} +3 -3
- package/dist/en-4KXU7N7B-24v330b5.js +118 -0
- package/dist/en-4KXU7N7B-66fntxa2.js +118 -0
- package/dist/{en-ILA4HPE5-ALHGESZE-zrv4qss8.js → en-MABQK6C4-REWE2WG2-8dp4cqdg.js} +109 -6
- package/dist/{en-ILA4HPE5-fhwvq92r.js → en-MABQK6C4-nkzq2j8t.js} +106 -2
- package/dist/{en-P6PNWNTO-g1f6cjh5.js → en-P4AS26D7-szrzfxz1.js} +3 -5
- package/dist/{en-X4DLPKLJ-dt1wtdm7.js → en-X4DLPKLJ-1h9gj5c1.js} +3 -3
- package/dist/{es-BVPGJUWA-9gk2g9yb.js → es-BVPGJUWA-0k59eqfv.js} +3 -3
- package/dist/{es-HTQSD352-YTAEDCE5-nhsbg581.js → es-LUTYN7U7-IY5QWOUF-k2aefzc0.js} +273 -13
- package/dist/{es-HTQSD352-m9rr3f0g.js → es-LUTYN7U7-ye5zn4sn.js} +271 -10
- package/dist/{es-MX-3SP2SSV6-f20qspbr.js → es-MX-H2EAXLYI-qwnqt48x.js} +3 -3
- package/dist/{es-MX-FOX525CG-87g500gr.js → es-MX-POESXYP2-9538722k.js} +272 -11
- package/dist/{es-MX-FOX525CG-HLM27OEL-whr0t9v3.js → es-MX-POESXYP2-UW6VP5QI-cd3a79g9.js} +274 -14
- package/dist/{es-MX-U6YL5KQX-ynwxdjr8.js → es-MX-U6YL5KQX-k4qvpgd4.js} +3 -3
- package/dist/es-MX-XAVLOQW3-47a405kf.js +161 -0
- package/dist/es-MX-XAVLOQW3-9b3cp9n8.js +161 -0
- package/dist/{es-BBX4AUJX-h99fcr53.js → es-O4PAV2CR-jwfaawwk.js} +3 -3
- package/dist/es-VFPNVMP5-6sftsdxe.js +161 -0
- package/dist/es-VFPNVMP5-thm0z9sr.js +161 -0
- package/dist/{fr-FSTBVVGK-t3y57xrb.js → fr-5YRGHXF5-q6b63yg0.js} +3 -3
- package/dist/fr-E5MDO4EG-exvrs7ge.js +161 -0
- package/dist/fr-E5MDO4EG-f3x1jeqw.js +161 -0
- package/dist/{fr-EKTTDR7Z-bmpwp31r.js → fr-EKTTDR7Z-m2t68j0m.js} +3 -3
- package/dist/{fr-54THJ4QH-IGABNGU6-fpzw2mba.js → fr-LJIK56LW-STG6QR3T-cextvv8q.js} +274 -14
- package/dist/{fr-54THJ4QH-d6ezjbhw.js → fr-LJIK56LW-xf3xf2kh.js} +272 -11
- package/dist/{index-6hp3p3eq.js → index-dhcd9b82.js} +2 -2
- package/dist/{index-zvxfkpkr.js → index-er6vy3jk.js} +71 -5
- package/dist/index.js +22 -16
- package/dist/init.js +19 -13
- package/dist/ja-DPO5PPLO-fmbg7zt2.js +161 -0
- package/dist/ja-DPO5PPLO-s2a7j3nj.js +161 -0
- package/dist/{ja-MHUPLSWO-CS3KE4Y3-mbtkzwd7.js → ja-FGEGLBJ3-MG3BSWXD-vq19zt2p.js} +273 -13
- package/dist/{ja-MHUPLSWO-3qwy4jc0.js → ja-FGEGLBJ3-w9byjhze.js} +271 -10
- package/dist/{ja-FW33BJBW-htfk4d8t.js → ja-SDAPAVCR-943p5gx7.js} +3 -3
- package/dist/{ja-Y2YBTXNN-96cvy5av.js → ja-Y2YBTXNN-5sszk2zv.js} +3 -3
- package/dist/ko-ITOPNIYI-aqy82jk8.js +161 -0
- package/dist/ko-ITOPNIYI-qz39kamf.js +161 -0
- package/dist/{ko-PDO5AXNW-d653t4pc.js → ko-NAGOZLC3-wb3y9yhh.js} +3 -3
- package/dist/{ko-S33XAV26-cxf4dn2t.js → ko-S33XAV26-rfsv9myd.js} +3 -3
- package/dist/{ko-XPJTXIKK-DNSW4KYQ-956vp61f.js → ko-TUAK3G3A-TBEBKOTM-ns78t2rv.js} +277 -17
- package/dist/{ko-XPJTXIKK-w1hs4px7.js → ko-TUAK3G3A-s25w0ckg.js} +275 -14
- package/dist/{node-rnmmv28d.js → node-qyxvhbw6.js} +2 -2
- package/dist/{packager-tool-cqrsre00.js → packager-tool-0567pxpm.js} +121 -12
- package/dist/{packager-tool-3wf3tkrc.js → packager-tool-09xysehb.js} +3 -5
- package/dist/{packager-tool-b0s5d4ek.js → packager-tool-0sz8se22.js} +1 -1
- package/dist/{packager-tool-s5y06ny4.js → packager-tool-2xgc101h.js} +544 -45
- package/dist/{packager-tool-03knb0er.js → packager-tool-3wygxefb.js} +116 -17
- package/dist/packager-tool-6ejqwbw9.js +26 -0
- package/dist/{packager-tool-952kqpax.js → packager-tool-78a3szsp.js} +890 -339
- package/dist/{packager-tool-xzcywm2b.js → packager-tool-c42dp002.js} +1 -1
- package/dist/{packager-tool-v61wap3v.js → packager-tool-djagtpkt.js} +12111 -6271
- package/dist/{packager-tool-1gjx8w7m.js → packager-tool-fgdsmd8k.js} +258 -486
- package/dist/packager-tool-gasyxww9.js +23964 -0
- package/dist/packager-tool-gmrwvnyh.js +1171 -0
- package/dist/packager-tool-jysvpt8p.js +11 -0
- package/dist/packager-tool-m6x5sczh.js +899 -0
- package/dist/packager-tool-mcaf4ewf.js +46 -0
- package/dist/packager-tool-p9j43p8h.js +115 -0
- package/dist/{packager-tool-v2p6g3fd.js → packager-tool-pkq70dec.js} +1 -1
- package/dist/{packager-tool-zh6g3h65.js → packager-tool-sf18719z.js} +5 -5
- package/dist/packager-tool-tq9q9m77.js +115 -0
- package/dist/{packager-tool-1yy9x4vk.js → packager-tool-v74yk918.js} +2 -2
- package/dist/packager-tool-vdd02vns.js +55924 -0
- package/dist/packager-tool-xj0agqpk.js +11 -0
- package/dist/packager-tool.js +15 -9
- package/dist/{pt-JLZYSSXX-7jth254x.js → pt-7TR74ZMB-1g8my56g.js} +3 -3
- package/dist/{pt-BR-TV7NR3ID-PDSSHRHU-nddwzj29.js → pt-BR-7XGDXRDJ-TR5D7JYL-533wvy7p.js} +274 -14
- package/dist/{pt-BR-TV7NR3ID-vgd26pj1.js → pt-BR-7XGDXRDJ-espnkgrj.js} +272 -11
- package/dist/pt-BR-BXURWX4W-dqr4dnf9.js +161 -0
- package/dist/pt-BR-BXURWX4W-xzyndmrx.js +161 -0
- package/dist/{pt-BR-LQH3RSBB-kyb4jmcw.js → pt-BR-DXXSYJDO-bn84ewp7.js} +3 -3
- package/dist/{pt-BR-JO45SCNI-4kbfnzc4.js → pt-BR-JO45SCNI-mt93s33c.js} +3 -3
- package/dist/{pt-4JEPEAST-JO5WN33S-ccdbdab2.js → pt-TMVOOITK-H2ADYHSD-ezpggv33.js} +273 -13
- package/dist/{pt-4JEPEAST-40npwxyw.js → pt-TMVOOITK-myha14p9.js} +271 -10
- package/dist/{pt-W3NA4LIZ-f02gapvs.js → pt-W3NA4LIZ-fwd1q4j0.js} +3 -3
- package/dist/pt-YI4VE4YQ-521681zf.js +161 -0
- package/dist/pt-YI4VE4YQ-v7gjeg82.js +161 -0
- package/dist/{ro-RKJ74FV3-QS3I6XKJ-kb31d85k.js → ro-2VALF3S5-NXBJUEZN-nqw1zs33.js} +277 -17
- package/dist/{ro-RKJ74FV3-qn0ey39v.js → ro-2VALF3S5-cdz5afkr.js} +275 -14
- package/dist/{ro-E2EBPQGT-vn573vcr.js → ro-BJFER5OI-334n28rj.js} +3 -3
- package/dist/ro-RKXZUG7Z-cm3xn3fj.js +161 -0
- package/dist/ro-RKXZUG7Z-pdztdafr.js +161 -0
- package/dist/{ro-WLKX6HF5-fcbe2zz8.js → ro-WLKX6HF5-b9tj8q67.js} +3 -3
- package/dist/ru-GSCT4ARZ-FTVCGQTL-5nh4jf2e.js +14 -0
- package/dist/ru-T73OPRTC-mp5gn7gs.js +10 -0
- package/dist/ru-WBLQ5B2U-8xd4gpv2.js +10 -0
- package/dist/ru-WBLQ5B2U-mswqs9wc.js +10 -0
- package/dist/serialization-GAW7UFOK-9hkdmmd2.js +36541 -0
- package/dist/services/flow-eval-schema/deterministic-evaluators.d.ts +110 -0
- package/dist/services/flow-eval-schema/evaluator-fields.d.ts +66 -0
- package/dist/services/flow-eval-schema/helpers.d.ts +9 -0
- package/dist/services/flow-eval-schema/index.d.ts +4 -0
- package/dist/services/flow-eval-schema/llm-judge-evaluators.d.ts +174 -0
- package/dist/services/flow-eval-schema/prompts.d.ts +2 -0
- package/dist/services/flow-eval-schema/registry.d.ts +375 -0
- package/dist/services/flow-eval-schema/tool-call-evaluators.d.ts +93 -0
- package/dist/services/flow-eval-schema/types.d.ts +78 -0
- package/dist/services/flow-eval-types.d.ts +6 -0
- package/dist/services/flow-eval-utils.d.ts +14 -0
- package/dist/services/flow-validate-service.d.ts +11 -0
- package/dist/services/packaging-utils.d.ts +3 -29
- package/dist/tool.js +22 -16
- package/dist/{tr-3U2W2XCA-zg3zcmq3.js → tr-3U2W2XCA-43ptfc0m.js} +3 -3
- package/dist/tr-AA6O2WSR-bj9n80k8.js +161 -0
- package/dist/tr-AA6O2WSR-ga1xnymp.js +161 -0
- package/dist/{tr-X7R6GQNB-VMEZAWRJ-vdbjqw23.js → tr-RIFCEXFH-BZS7S7QK-q465b62g.js} +279 -19
- package/dist/{tr-X7R6GQNB-shwv16dz.js → tr-RIFCEXFH-hgkb4g8y.js} +277 -16
- package/dist/{tr-ZUUSMHER-pfn5dq1r.js → tr-RQTZ2DMS-bpgd4kma.js} +3 -3
- package/dist/utils/flow-io.d.ts +8 -0
- package/dist/validation.js +19 -13
- package/dist/{zh-CN-FEZ24J4A-q5b5x20w.js → zh-CN-IP3FMXWM-1cfarhcp.js} +271 -10
- package/dist/{zh-CN-FEZ24J4A-LSEMG63K-db8kf6rm.js → zh-CN-IP3FMXWM-H3JI2XUM-ta4yac7h.js} +273 -13
- package/dist/{zh-CN-IPZYQR3P-1h76csc4.js → zh-CN-IPZYQR3P-egjmvyjf.js} +3 -3
- package/dist/zh-CN-R2KLHXQV-wttmznep.js +161 -0
- package/dist/zh-CN-R2KLHXQV-x6gnk2n0.js +161 -0
- package/dist/{zh-CN-YFKQ7HBX-w98q5zqf.js → zh-CN-ZC6LT4IN-vty9mvv8.js} +3 -3
- package/dist/{zh-TW-GKSCT6NW-JLMWTDAF-g2smq1gm.js → zh-TW-AGIDXIPF-R4XZRDJZ-cgxxz5k4.js} +274 -14
- package/dist/{zh-TW-GKSCT6NW-4n1yfre0.js → zh-TW-AGIDXIPF-n6r6w7vy.js} +272 -11
- package/dist/{zh-TW-CP5PCVEJ-wvbxf7c7.js → zh-TW-R7Y5KVMU-q81f4z2p.js} +3 -3
- package/dist/zh-TW-RJGCQANM-gqn0aca0.js +161 -0
- package/dist/zh-TW-RJGCQANM-tt8j5wv2.js +161 -0
- package/dist/{zh-TW-YPVSQVGT-wbybwpwt.js → zh-TW-YPVSQVGT-b378ztph.js} +3 -3
- package/package.json +2 -2
- package/dist/packager-tool-1169tjst.js +0 -87554
- package/dist/packager-tool-c19w8vg9.js +0 -26
- package/dist/packager-tool-gbgfwx8f.js +0 -2
- package/dist/packager-tool-jpcm3xas.js +0 -12
- package/dist/packager-tool-mt2g0zjx.js +0 -36187
- package/dist/packager-tool-pvgqbm48.js +0 -21
- package/dist/ru-D6DDND7Z-e4en56d2.js +0 -10
- package/dist/ru-GSCT4ARZ-3TVTUGWP-bbg6360z.js +0 -15
- package/dist/serialization-GTFWODSH-p7wmsmj7.js +0 -148
- /package/dist/{packager-tool-ny53xmsd.js → packager-tool-cvwr40ax.js} +0 -0
|
@@ -1,41 +1,45 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getExpandedSize,
|
|
3
|
+
getNodeDimensions,
|
|
4
|
+
isContainerNodeManifest,
|
|
5
|
+
require_lib
|
|
6
|
+
} from "./packager-tool-gmrwvnyh.js";
|
|
1
7
|
import {
|
|
2
8
|
MANAGED_HTTP_NODE_TYPE,
|
|
9
|
+
NodeType,
|
|
3
10
|
buildConnectorHttpRequestDetail,
|
|
4
11
|
createNodeVariable,
|
|
5
12
|
findTerminalNodes,
|
|
6
13
|
getConnectorHttpRequestKey,
|
|
7
|
-
getExpandedSize,
|
|
8
14
|
getLatestDefinitionByNodeType,
|
|
9
|
-
|
|
15
|
+
getManifestKey,
|
|
10
16
|
resolveNodeOutputTypeSchema
|
|
11
|
-
} from "./packager-tool-
|
|
12
|
-
import"./packager-tool-3wf3tkrc.js";
|
|
13
|
-
import"./packager-tool-03knb0er.js";
|
|
14
|
-
import"./packager-tool-pvgqbm48.js";
|
|
15
|
-
import"./packager-tool-gbgfwx8f.js";
|
|
17
|
+
} from "./packager-tool-vdd02vns.js";
|
|
16
18
|
import {
|
|
19
|
+
DYNAMIC_EXTRACT_NODE_TYPE,
|
|
17
20
|
MINIMUM_SUPPORTED_SCHEMA_VERSION,
|
|
18
21
|
generateNextId,
|
|
19
22
|
isLoopNodeType,
|
|
20
|
-
isSubflowNodeType
|
|
21
|
-
|
|
23
|
+
isSubflowNodeType,
|
|
24
|
+
supportsVariableUpdates
|
|
25
|
+
} from "./packager-tool-78a3szsp.js";
|
|
26
|
+
import"./packager-tool-0567pxpm.js";
|
|
22
27
|
import {
|
|
23
28
|
init_esm_shims
|
|
24
|
-
} from "./packager-tool-
|
|
25
|
-
import"./packager-tool-
|
|
26
|
-
import"./packager-tool-
|
|
29
|
+
} from "./packager-tool-6ejqwbw9.js";
|
|
30
|
+
import"./packager-tool-mcaf4ewf.js";
|
|
31
|
+
import"./packager-tool-tq9q9m77.js";
|
|
27
32
|
import"./packager-tool-c23zrhj8.js";
|
|
28
33
|
import {
|
|
29
|
-
__require
|
|
34
|
+
__require,
|
|
35
|
+
__toESM
|
|
30
36
|
} from "./packager-tool-wckvcay0.js";
|
|
31
37
|
|
|
32
|
-
// ../../node_modules/@uipath/flow-converter/dist/conversion-
|
|
38
|
+
// ../../node_modules/@uipath/flow-converter/dist/conversion-H2VEEYLB.js
|
|
39
|
+
var import_json5 = __toESM(require_lib(), 1);
|
|
33
40
|
init_esm_shims();
|
|
34
41
|
init_esm_shims();
|
|
35
42
|
init_esm_shims();
|
|
36
|
-
function getManifestKey(nodeType, version) {
|
|
37
|
-
return `${nodeType}:${version}`;
|
|
38
|
-
}
|
|
39
43
|
function findManifestByNodeType(map, nodeType) {
|
|
40
44
|
const latestDef = getLatestDefinitionByNodeType(nodeType);
|
|
41
45
|
if (latestDef) {
|
|
@@ -55,7 +59,7 @@ function isArtifactHandle(nodeHandleId, nodeConfig) {
|
|
|
55
59
|
function shouldUseArtifactEdge(source, target, manifestMap) {
|
|
56
60
|
const sourceNodeConfig = manifestMap.get(getManifestKey(source.type, source.version));
|
|
57
61
|
const targetNodeConfig = manifestMap.get(getManifestKey(target.type, target.version));
|
|
58
|
-
return Boolean(isArtifactHandle(source.sourceHandle, sourceNodeConfig)
|
|
62
|
+
return Boolean(isArtifactHandle(source.sourceHandle, sourceNodeConfig) || isArtifactHandle(target.targetHandle, targetNodeConfig));
|
|
59
63
|
}
|
|
60
64
|
function resolveEdgeType(edge, nodes, manifestMap) {
|
|
61
65
|
const lookup = nodes instanceof Map ? (id) => nodes.get(id) : (id) => nodes.find((n) => n.id === id);
|
|
@@ -70,29 +74,152 @@ function resolveEdgeType(edge, nodes, manifestMap) {
|
|
|
70
74
|
return edge;
|
|
71
75
|
}
|
|
72
76
|
init_esm_shims();
|
|
73
|
-
|
|
77
|
+
init_esm_shims();
|
|
78
|
+
function getNodeParentId(node) {
|
|
79
|
+
const dataParentId = node?.data?.parentId;
|
|
80
|
+
return node?.parentId ?? (typeof dataParentId === "string" ? dataParentId : undefined);
|
|
81
|
+
}
|
|
82
|
+
function computeAbsoluteNodePositions(nodes) {
|
|
83
|
+
const nodeById = new Map(nodes.map((node) => [node.id, node]));
|
|
84
|
+
const cache = /* @__PURE__ */ new Map;
|
|
85
|
+
const resolve = (node, visiting = /* @__PURE__ */ new Set) => {
|
|
86
|
+
const cached = cache.get(node.id);
|
|
87
|
+
if (cached)
|
|
88
|
+
return cached;
|
|
89
|
+
const own = { x: node.position?.x ?? 0, y: node.position?.y ?? 0 };
|
|
90
|
+
const parentId = getNodeParentId(node);
|
|
91
|
+
if (!parentId || visiting.has(node.id)) {
|
|
92
|
+
cache.set(node.id, own);
|
|
93
|
+
return own;
|
|
94
|
+
}
|
|
95
|
+
const parent = nodeById.get(parentId);
|
|
96
|
+
if (!parent) {
|
|
97
|
+
cache.set(node.id, own);
|
|
98
|
+
return own;
|
|
99
|
+
}
|
|
100
|
+
visiting.add(node.id);
|
|
101
|
+
const parentAbs = resolve(parent, visiting);
|
|
102
|
+
visiting.delete(node.id);
|
|
103
|
+
const absolute = { x: parentAbs.x + own.x, y: parentAbs.y + own.y };
|
|
104
|
+
cache.set(node.id, absolute);
|
|
105
|
+
return absolute;
|
|
106
|
+
};
|
|
107
|
+
for (const node of nodes) {
|
|
108
|
+
resolve(node);
|
|
109
|
+
}
|
|
110
|
+
return cache;
|
|
111
|
+
}
|
|
112
|
+
init_esm_shims();
|
|
113
|
+
function translateWaypoints(waypoints, offset) {
|
|
114
|
+
if (offset.x === 0 && offset.y === 0)
|
|
115
|
+
return [...waypoints];
|
|
116
|
+
return waypoints.map((w) => ({ ...w, x: w.x + offset.x, y: w.y + offset.y }));
|
|
117
|
+
}
|
|
118
|
+
function untranslateWaypoints(waypoints, offset) {
|
|
119
|
+
return translateWaypoints(waypoints, { x: -offset.x, y: -offset.y });
|
|
120
|
+
}
|
|
121
|
+
function getManualWaypoints(data) {
|
|
122
|
+
const waypoints = data?.waypoints;
|
|
123
|
+
return waypoints?.length ? waypoints : undefined;
|
|
124
|
+
}
|
|
125
|
+
function getRoutedWaypoints(data) {
|
|
126
|
+
const routed = data?.routedWaypoints;
|
|
127
|
+
return routed?.length ? routed : undefined;
|
|
128
|
+
}
|
|
129
|
+
function stripEdgeRouting(edge, keepManual = false) {
|
|
130
|
+
const data = edge.data;
|
|
131
|
+
if (!data)
|
|
132
|
+
return edge;
|
|
133
|
+
const hasRoute = "routedWaypoints" in data;
|
|
134
|
+
const hasManual = !keepManual && "waypoints" in data;
|
|
135
|
+
if (!hasRoute && !hasManual)
|
|
136
|
+
return edge;
|
|
137
|
+
const next = { ...data };
|
|
138
|
+
delete next.routedWaypoints;
|
|
139
|
+
if (!keepManual)
|
|
140
|
+
delete next.waypoints;
|
|
141
|
+
return { ...edge, data: next };
|
|
142
|
+
}
|
|
143
|
+
var STALE_ROUTE_SLACK_PX = 2000;
|
|
144
|
+
function dropStaleEdgeRoutes(edges, nodes) {
|
|
145
|
+
if (!edges.some((edge) => getManualWaypoints(edge.data) || getRoutedWaypoints(edge.data)))
|
|
146
|
+
return edges;
|
|
147
|
+
const positions = computeAbsoluteNodePositions(nodes);
|
|
148
|
+
const nodeById = new Map(nodes.map((node) => [node.id, node]));
|
|
149
|
+
const boundsFor = (nodeId) => {
|
|
150
|
+
const origin = positions.get(nodeId);
|
|
151
|
+
if (!origin)
|
|
152
|
+
return;
|
|
153
|
+
const node = nodeById.get(nodeId);
|
|
154
|
+
const { width, height } = node ? getNodeDimensions(node) : { width: 0, height: 0 };
|
|
155
|
+
return { minX: origin.x, maxX: origin.x + (width || 0), minY: origin.y, maxY: origin.y + (height || 0) };
|
|
156
|
+
};
|
|
157
|
+
let changed = false;
|
|
158
|
+
const next = edges.map((edge) => {
|
|
159
|
+
const waypoints = [...getManualWaypoints(edge.data) ?? [], ...getRoutedWaypoints(edge.data) ?? []];
|
|
160
|
+
if (waypoints.length === 0)
|
|
161
|
+
return edge;
|
|
162
|
+
const source = boundsFor(edge.source);
|
|
163
|
+
const target = boundsFor(edge.target);
|
|
164
|
+
if (!source || !target)
|
|
165
|
+
return edge;
|
|
166
|
+
const minX = Math.min(source.minX, target.minX) - STALE_ROUTE_SLACK_PX;
|
|
167
|
+
const maxX = Math.max(source.maxX, target.maxX) + STALE_ROUTE_SLACK_PX;
|
|
168
|
+
const minY = Math.min(source.minY, target.minY) - STALE_ROUTE_SLACK_PX;
|
|
169
|
+
const maxY = Math.max(source.maxY, target.maxY) + STALE_ROUTE_SLACK_PX;
|
|
170
|
+
const stale = waypoints.some((w) => w.x < minX || w.x > maxX || w.y < minY || w.y > maxY);
|
|
171
|
+
if (!stale)
|
|
172
|
+
return edge;
|
|
173
|
+
changed = true;
|
|
174
|
+
return stripEdgeRouting(edge);
|
|
175
|
+
});
|
|
176
|
+
return changed ? next : edges;
|
|
177
|
+
}
|
|
178
|
+
init_esm_shims();
|
|
179
|
+
var NO_OFFSET = { x: 0, y: 0 };
|
|
180
|
+
function edgeToInstance(edge, offset = NO_OFFSET) {
|
|
74
181
|
const edgeData = {};
|
|
75
182
|
if (edge.data?.label) {
|
|
76
183
|
edgeData.label = edge.data.label;
|
|
77
184
|
}
|
|
185
|
+
const waypoints = getManualWaypoints(edge.data);
|
|
186
|
+
const routedWaypoints = getRoutedWaypoints(edge.data);
|
|
187
|
+
const carriedUi = edge.data?.ui;
|
|
188
|
+
const ui = {
|
|
189
|
+
...carriedUi,
|
|
190
|
+
...waypoints && { waypoints: untranslateWaypoints(waypoints, offset) },
|
|
191
|
+
...routedWaypoints && { routedWaypoints: untranslateWaypoints(routedWaypoints, offset) }
|
|
192
|
+
};
|
|
78
193
|
return {
|
|
79
194
|
id: edge.id,
|
|
80
195
|
sourceNodeId: edge.source,
|
|
81
196
|
sourcePort: edge.sourceHandle || "default",
|
|
82
197
|
targetNodeId: edge.target,
|
|
83
198
|
targetPort: edge.targetHandle || "default",
|
|
84
|
-
...Object.keys(edgeData).length > 0 && { data: edgeData }
|
|
199
|
+
...Object.keys(edgeData).length > 0 && { data: edgeData },
|
|
200
|
+
...Object.keys(ui).length > 0 && { ui }
|
|
85
201
|
};
|
|
86
202
|
}
|
|
87
|
-
function instanceToEdge(
|
|
203
|
+
function instanceToEdge(instance2, type = "default", offset = NO_OFFSET) {
|
|
204
|
+
const { waypoints: _manual, routedWaypoints: _routed, ...carriedUi } = instance2.ui ?? {};
|
|
205
|
+
const route = getManualWaypoints(instance2.ui);
|
|
206
|
+
const routedRoute = getRoutedWaypoints(instance2.ui);
|
|
207
|
+
const hasCarriedUi = Object.keys(carriedUi).length > 0;
|
|
88
208
|
return {
|
|
89
|
-
id:
|
|
90
|
-
source:
|
|
91
|
-
sourceHandle:
|
|
92
|
-
target:
|
|
93
|
-
targetHandle:
|
|
209
|
+
id: instance2.id,
|
|
210
|
+
source: instance2.sourceNodeId,
|
|
211
|
+
sourceHandle: instance2.sourcePort,
|
|
212
|
+
target: instance2.targetNodeId,
|
|
213
|
+
targetHandle: instance2.targetPort,
|
|
94
214
|
type,
|
|
95
|
-
...
|
|
215
|
+
...(instance2.data || route || routedRoute || hasCarriedUi) && {
|
|
216
|
+
data: {
|
|
217
|
+
...instance2.data,
|
|
218
|
+
...hasCarriedUi && { ui: carriedUi },
|
|
219
|
+
...route && { waypoints: translateWaypoints(route, offset) },
|
|
220
|
+
...routedRoute && { routedWaypoints: translateWaypoints(routedRoute, offset) }
|
|
221
|
+
}
|
|
222
|
+
}
|
|
96
223
|
};
|
|
97
224
|
}
|
|
98
225
|
function nodeToInstance(node, offset = { x: 0, y: 0 }) {
|
|
@@ -125,41 +252,50 @@ function nodeToInstance(node, offset = { x: 0, y: 0 }) {
|
|
|
125
252
|
...node.data?.content !== undefined && { content: node.data.content }
|
|
126
253
|
},
|
|
127
254
|
...instanceOutputs && Object.keys(instanceOutputs).length > 0 && { outputs: instanceOutputs },
|
|
128
|
-
...variableUpdates && variableUpdates.length > 0 && { variableUpdates },
|
|
255
|
+
...variableUpdates && variableUpdates.length > 0 && supportsVariableUpdates(node.data?.type ?? node.type) && { variableUpdates },
|
|
129
256
|
...parentId && { parentId }
|
|
130
257
|
};
|
|
131
258
|
}
|
|
132
|
-
function instanceToNode(
|
|
133
|
-
const position =
|
|
134
|
-
const color =
|
|
135
|
-
const content =
|
|
136
|
-
const variableUpdates =
|
|
259
|
+
function instanceToNode(instance2, offset = { x: 0, y: 0 }) {
|
|
260
|
+
const position = instance2.ui?.position ?? { x: 0, y: 0 };
|
|
261
|
+
const color = instance2.inputs?.color;
|
|
262
|
+
const content = instance2.inputs?.content;
|
|
263
|
+
const variableUpdates = instance2.variableUpdates;
|
|
137
264
|
return {
|
|
138
|
-
id:
|
|
139
|
-
type:
|
|
265
|
+
id: instance2.id,
|
|
266
|
+
type: instance2.type,
|
|
140
267
|
position: {
|
|
141
268
|
x: position.x + offset.x,
|
|
142
269
|
y: position.y + offset.y
|
|
143
270
|
},
|
|
144
|
-
...
|
|
145
|
-
width:
|
|
146
|
-
height:
|
|
271
|
+
...instance2.ui?.size && {
|
|
272
|
+
width: instance2.ui.size.width,
|
|
273
|
+
height: instance2.ui.size.height
|
|
147
274
|
},
|
|
148
275
|
data: {
|
|
149
|
-
type:
|
|
150
|
-
typeVersion:
|
|
151
|
-
display:
|
|
152
|
-
inputs:
|
|
153
|
-
ui:
|
|
276
|
+
type: instance2.type,
|
|
277
|
+
typeVersion: instance2.typeVersion,
|
|
278
|
+
display: instance2.display || {},
|
|
279
|
+
inputs: instance2.inputs || {},
|
|
280
|
+
ui: instance2.ui || {},
|
|
154
281
|
...color !== undefined && { color },
|
|
155
282
|
...content !== undefined && { content },
|
|
156
283
|
...variableUpdates && variableUpdates.length > 0 && { variableUpdates },
|
|
157
|
-
...
|
|
284
|
+
...instance2.parentId && { parentId: instance2.parentId }
|
|
158
285
|
}
|
|
159
286
|
};
|
|
160
287
|
}
|
|
161
288
|
init_esm_shims();
|
|
162
289
|
init_esm_shims();
|
|
290
|
+
var SCHEME = "uip-sw-local";
|
|
291
|
+
var SCHEME_PREFIX = `${SCHEME}://`;
|
|
292
|
+
var FOLDER_AUTHORITY = "Folder";
|
|
293
|
+
var FOLDER_PREFIX = `${SCHEME_PREFIX}${FOLDER_AUTHORITY}/`;
|
|
294
|
+
function isLocalSolutionUri(uri) {
|
|
295
|
+
return uri.startsWith(SCHEME_PREFIX);
|
|
296
|
+
}
|
|
297
|
+
init_esm_shims();
|
|
298
|
+
init_esm_shims();
|
|
163
299
|
function createBinding(options) {
|
|
164
300
|
return {
|
|
165
301
|
id: generateNextId("b", 8),
|
|
@@ -190,6 +326,11 @@ init_esm_shims();
|
|
|
190
326
|
init_esm_shims();
|
|
191
327
|
var DEFAULT_TRIGGER_POSITION = { x: 256, y: 144 };
|
|
192
328
|
init_esm_shims();
|
|
329
|
+
init_esm_shims();
|
|
330
|
+
var SCRIPT_NODE_TYPE = NodeType.ActionScript;
|
|
331
|
+
var FILE_ID_KEY = "ID";
|
|
332
|
+
var FILE_PROBE_TYPE = `{ ${FILE_ID_KEY}?: any }`;
|
|
333
|
+
var FILE_ARRAY_PROBE_TYPE = `Array<${FILE_PROBE_TYPE}>`;
|
|
193
334
|
function isPlainObject(value) {
|
|
194
335
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
195
336
|
}
|
|
@@ -200,46 +341,35 @@ function mergeManifestOutputOverInstance(instanceValue, manifestValue) {
|
|
|
200
341
|
return manifestValue;
|
|
201
342
|
return isPlainObject(instanceValue) && isPlainObject(manifestValue) ? { ...instanceValue, ...manifestValue } : manifestValue;
|
|
202
343
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
const
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
};
|
|
224
|
-
var PROCESSORS = [connectorHttpRequestProcessor];
|
|
225
|
-
function processManifest(definition, ctx) {
|
|
226
|
-
if (!definition)
|
|
227
|
-
return;
|
|
228
|
-
for (const processor of PROCESSORS) {
|
|
229
|
-
const result = processor(definition, ctx);
|
|
230
|
-
if (result)
|
|
231
|
-
return result;
|
|
344
|
+
function buildEffectiveNodeOutputs(args) {
|
|
345
|
+
const manifestOutputs = args.manifestOutputs ?? {};
|
|
346
|
+
const manifestDefinesOutputs = args.manifestOutputs != null;
|
|
347
|
+
const nodeVariableOutputs = {};
|
|
348
|
+
for (const variable of args.nodeVariables) {
|
|
349
|
+
const outputId = variable.binding?.outputId;
|
|
350
|
+
if (!outputId)
|
|
351
|
+
continue;
|
|
352
|
+
if (manifestDefinesOutputs && !(outputId in manifestOutputs))
|
|
353
|
+
continue;
|
|
354
|
+
const declared = manifestOutputs[outputId];
|
|
355
|
+
const manifestOutput = isPlainObject(declared) ? declared : undefined;
|
|
356
|
+
nodeVariableOutputs[outputId] = {
|
|
357
|
+
type: variable.type,
|
|
358
|
+
...variable.description && { description: variable.description },
|
|
359
|
+
...variable.schema && { schema: variable.schema },
|
|
360
|
+
...manifestOutput?.scope && { scope: manifestOutput.scope },
|
|
361
|
+
...manifestOutput?.source && { source: manifestOutput.source },
|
|
362
|
+
...manifestOutput?.var && { var: manifestOutput.var }
|
|
363
|
+
};
|
|
232
364
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
};
|
|
365
|
+
const effective = { ...manifestOutputs, ...nodeVariableOutputs };
|
|
366
|
+
for (const layer of args.extraLayers ?? [])
|
|
367
|
+
Object.assign(effective, layer);
|
|
368
|
+
for (const [key, value] of Object.entries(args.instanceOutputs ?? {})) {
|
|
369
|
+
effective[key] = key in effective ? mergeManifestOutputOverInstance(value, effective[key]) : value;
|
|
370
|
+
}
|
|
371
|
+
return effective;
|
|
241
372
|
}
|
|
242
|
-
init_esm_shims();
|
|
243
373
|
var DEFAULT_ERROR_SCHEMA = {
|
|
244
374
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
245
375
|
type: "object",
|
|
@@ -282,10 +412,30 @@ function buildSubflowOutputDefinition(globals) {
|
|
|
282
412
|
function buildSubflowInputDefinition(globals) {
|
|
283
413
|
return globals.filter((v) => v.direction === "in");
|
|
284
414
|
}
|
|
285
|
-
function
|
|
286
|
-
if (
|
|
415
|
+
function buildSubflowNodeOutputs(entry, options = {}) {
|
|
416
|
+
if (!entry)
|
|
417
|
+
return {};
|
|
418
|
+
const globals = entry.variables?.globals ?? [];
|
|
419
|
+
let outputs = getSubflowBaselineOutputs();
|
|
420
|
+
if (globals.length > 0) {
|
|
421
|
+
outputs = { ...outputs, ...buildSubflowOutputDefinition(globals) };
|
|
422
|
+
}
|
|
423
|
+
if (!globals.some((g) => g.direction === "out") && options.manifests) {
|
|
424
|
+
const passThrough = buildSubflowPassThroughOutputDefinition(entry, options.manifests, {
|
|
425
|
+
nodeOutputsMap: options.nodeOutputsMap,
|
|
426
|
+
subflows: options.subflows
|
|
427
|
+
});
|
|
428
|
+
if (Object.keys(passThrough).length > 0) {
|
|
429
|
+
outputs = { ...outputs, ...passThrough };
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
return outputs;
|
|
433
|
+
}
|
|
434
|
+
function buildSubflowPassThroughOutputDefinition(entry, manifestMap, options = {}) {
|
|
435
|
+
const { nodeOutputsMap, subflows } = options;
|
|
436
|
+
if (entry.nodes.length === 0)
|
|
287
437
|
return {};
|
|
288
|
-
const terminalNodes = findTerminalNodes(nodes, edges, (n) => {
|
|
438
|
+
const terminalNodes = findTerminalNodes(entry.nodes, entry.edges, (n) => {
|
|
289
439
|
const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion));
|
|
290
440
|
return manifest?.model?.type === "bpmn:StartEvent";
|
|
291
441
|
});
|
|
@@ -293,18 +443,22 @@ function buildSubflowPassThroughOutputDefinition(nodes, edges, manifestMap, node
|
|
|
293
443
|
const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion));
|
|
294
444
|
const manifestOutputDef = manifest?.outputDefinition;
|
|
295
445
|
let outputDef;
|
|
296
|
-
if (
|
|
297
|
-
outputDef = manifestOutputDef;
|
|
298
|
-
} else {
|
|
446
|
+
if (isSubflowNodeType(n.type)) {
|
|
299
447
|
outputDef = nodeOutputsMap?.get(n.id);
|
|
300
|
-
if ((!outputDef || Object.keys(outputDef).length === 0) &&
|
|
448
|
+
if ((!outputDef || Object.keys(outputDef).length === 0) && subflows) {
|
|
301
449
|
outputDef = computeSubflowEffectiveOutputDef(n.id, subflows, manifestMap);
|
|
302
450
|
}
|
|
451
|
+
if (!outputDef || Object.keys(outputDef).length === 0)
|
|
452
|
+
outputDef = manifestOutputDef;
|
|
453
|
+
} else if (manifestOutputDef && Object.keys(manifestOutputDef).length > 0) {
|
|
454
|
+
outputDef = manifestOutputDef;
|
|
455
|
+
} else {
|
|
456
|
+
outputDef = nodeOutputsMap?.get(n.id);
|
|
303
457
|
}
|
|
304
458
|
if (!outputDef || Object.keys(outputDef).length === 0)
|
|
305
459
|
return null;
|
|
306
460
|
return { node: n, outputDef };
|
|
307
|
-
}).filter((
|
|
461
|
+
}).filter((t2) => t2 !== null);
|
|
308
462
|
if (terminalsWithOutputs.length === 0)
|
|
309
463
|
return {};
|
|
310
464
|
const allKeys = /* @__PURE__ */ new Set;
|
|
@@ -366,9 +520,9 @@ function computeSubflowEffectiveOutputDef(subflowNodeId, subflows, manifestMap,
|
|
|
366
520
|
const outputKeys = {};
|
|
367
521
|
for (const n of terminalNodes) {
|
|
368
522
|
const manifest = manifestMap.get(getManifestKey(n.type, n.typeVersion));
|
|
369
|
-
let outputDef =
|
|
370
|
-
if (
|
|
371
|
-
outputDef =
|
|
523
|
+
let outputDef = isSubflowNodeType(n.type) ? computeSubflowEffectiveOutputDef(n.id, subflows, manifestMap, seen) : undefined;
|
|
524
|
+
if (!outputDef || Object.keys(outputDef).length === 0) {
|
|
525
|
+
outputDef = manifest?.outputDefinition;
|
|
372
526
|
}
|
|
373
527
|
if (outputDef) {
|
|
374
528
|
for (const [key, val] of Object.entries(outputDef)) {
|
|
@@ -380,6 +534,213 @@ function computeSubflowEffectiveOutputDef(subflowNodeId, subflows, manifestMap,
|
|
|
380
534
|
}
|
|
381
535
|
return Object.keys(outputKeys).length > 0 ? outputKeys : undefined;
|
|
382
536
|
}
|
|
537
|
+
init_esm_shims();
|
|
538
|
+
init_esm_shims();
|
|
539
|
+
var connectorHttpRequestProcessor = (definition, ctx) => {
|
|
540
|
+
const connectorKey = getConnectorHttpRequestKey(definition);
|
|
541
|
+
if (!connectorKey)
|
|
542
|
+
return;
|
|
543
|
+
const managed = ctx.getManifest(MANAGED_HTTP_NODE_TYPE);
|
|
544
|
+
if (!managed)
|
|
545
|
+
return;
|
|
546
|
+
return {
|
|
547
|
+
nodeType: managed.nodeType,
|
|
548
|
+
manifest: {
|
|
549
|
+
...managed,
|
|
550
|
+
display: {
|
|
551
|
+
...managed.display,
|
|
552
|
+
icon: definition.display?.icon ?? managed.display?.icon
|
|
553
|
+
},
|
|
554
|
+
inputDefaults: { ...managed.inputDefaults, detail: buildConnectorHttpRequestDetail(connectorKey) }
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
init_esm_shims();
|
|
559
|
+
init_esm_shims();
|
|
560
|
+
init_esm_shims();
|
|
561
|
+
init_esm_shims();
|
|
562
|
+
init_esm_shims();
|
|
563
|
+
var EXTRACTION_METHOD = "external_llm";
|
|
564
|
+
init_esm_shims();
|
|
565
|
+
init_esm_shims();
|
|
566
|
+
init_esm_shims();
|
|
567
|
+
var buildPrompt = (flags, override) => {
|
|
568
|
+
const fragments = [];
|
|
569
|
+
if (override)
|
|
570
|
+
fragments.push(override);
|
|
571
|
+
fragments.push(`The user prompt will give table names and columns for one or more tables, possibly adding descriptions/hints.
|
|
572
|
+
The user prompt will be in the following format, shown between triple quotes: """{"tables":<JSON set of tables prompt object>}""".
|
|
573
|
+
This will be followed by one or more images of successive pages in the document.
|
|
574
|
+
The JSON set of tables prompt object has table_names as keys and their values are a JSON table prompt object.
|
|
575
|
+
Each JSON table prompt object is of the format between triple quotes: """{"columns":<array of JSON column prompt objects>}, """and also, optionally, a "table_description/hint" key mapping to a string value.
|
|
576
|
+
A JSON column prompt object has a "column_title" key, and also, optionally, a "column_description/hint" key: both these keys map to string values.
|
|
577
|
+
|
|
578
|
+
For each table_name, you should consider how best to find the data for it and extract a table of zero or more rows, as appropriate, from the target document, with each column filled.
|
|
579
|
+
Your response should be only a JSON object with each table_name as a key, with the corresponding value being a JSON table response object.
|
|
580
|
+
Each JSON table response object must be of the form shown here between triple quotes: """{"explanation":<a string explaining how you identified the data for this table, finding all the data of this kind to put in rows of the table>,"rows":<an array of JSON row response objects>}"""
|
|
581
|
+
Each JSON row response object has the table's column titles as keys with the appropriate values from the document inserted by you.
|
|
582
|
+
If any column value is missing, fill in with the value "{{missing_marker}}".`);
|
|
583
|
+
if (flags.includes("append_field_descriptions")) {
|
|
584
|
+
fragments.push(`"tables":
|
|
585
|
+
{
|
|
586
|
+
"table_name": "<Field group name>",
|
|
587
|
+
"table_description/hints": "<Field group description included here>",
|
|
588
|
+
"columns": [
|
|
589
|
+
{
|
|
590
|
+
"column_title": "<Field name>",
|
|
591
|
+
"column_description/hints": "<Field description included here>"
|
|
592
|
+
}
|
|
593
|
+
]
|
|
594
|
+
}`);
|
|
595
|
+
}
|
|
596
|
+
if (flags.includes("append_taxonomy_descriptions")) {
|
|
597
|
+
fragments.push(`"taxonomy_description/hints": "<Taxonomy description included here>"`);
|
|
598
|
+
}
|
|
599
|
+
return fragments.join(`
|
|
600
|
+
|
|
601
|
+
`);
|
|
602
|
+
};
|
|
603
|
+
init_esm_shims();
|
|
604
|
+
var DEFAULT_EXECUTION_MODE = "standard";
|
|
605
|
+
var DEFAULT_ATTRIBUTION = "word_ids";
|
|
606
|
+
var DEFAULT_PRE_PROCESSING = "none";
|
|
607
|
+
function toModel(modelVersion) {
|
|
608
|
+
if (!modelVersion)
|
|
609
|
+
return null;
|
|
610
|
+
return { family: modelVersion.split("_")[0], version: modelVersion };
|
|
611
|
+
}
|
|
612
|
+
function buildExtractionConfig(modelConfig) {
|
|
613
|
+
const mc = modelConfig ?? {};
|
|
614
|
+
return {
|
|
615
|
+
extraction_method: EXTRACTION_METHOD,
|
|
616
|
+
model: toModel(mc.model_version),
|
|
617
|
+
execution_mode: mc.execution_mode ?? DEFAULT_EXECUTION_MODE,
|
|
618
|
+
"pre-processing": mc.input_config ?? DEFAULT_PRE_PROCESSING,
|
|
619
|
+
attribution: mc.attribution_method ?? DEFAULT_ATTRIBUTION,
|
|
620
|
+
model_config: {
|
|
621
|
+
temperature: mc.temperature ?? null,
|
|
622
|
+
top_p: mc.top_p ?? null,
|
|
623
|
+
seed: mc.seed ?? null,
|
|
624
|
+
frequency_penalty: mc.frequency_penalty ?? null,
|
|
625
|
+
prompt_override: buildPrompt(mc.flags ?? [], mc.system_prompt_override)
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
}
|
|
629
|
+
init_esm_shims();
|
|
630
|
+
init_esm_shims();
|
|
631
|
+
init_esm_shims();
|
|
632
|
+
init_esm_shims();
|
|
633
|
+
init_esm_shims();
|
|
634
|
+
init_esm_shims();
|
|
635
|
+
init_esm_shims();
|
|
636
|
+
var TaxonomyFieldKindEnum = {
|
|
637
|
+
FieldGroup: "field_group",
|
|
638
|
+
Date: "Date",
|
|
639
|
+
ExactText: "Exact Text",
|
|
640
|
+
InferredText: "Inferred Text",
|
|
641
|
+
MonetaryQuantity: "Monetary Quantity",
|
|
642
|
+
Number: "Number",
|
|
643
|
+
Boolean: "Boolean",
|
|
644
|
+
Choice: "Choice"
|
|
645
|
+
};
|
|
646
|
+
var SELECTABLE_FIELD_KINDS = [];
|
|
647
|
+
var emptyExtractionSchema = {
|
|
648
|
+
config: {
|
|
649
|
+
extraction_method: "",
|
|
650
|
+
model: null,
|
|
651
|
+
execution_mode: "",
|
|
652
|
+
"pre-processing": "",
|
|
653
|
+
attribution: "",
|
|
654
|
+
model_config: {
|
|
655
|
+
temperature: null,
|
|
656
|
+
top_p: null,
|
|
657
|
+
seed: null,
|
|
658
|
+
frequency_penalty: null,
|
|
659
|
+
prompt_override: null
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
prompt: "",
|
|
663
|
+
outputSchema: {
|
|
664
|
+
type: "object",
|
|
665
|
+
additionalProperties: false,
|
|
666
|
+
required: [],
|
|
667
|
+
properties: {},
|
|
668
|
+
$defs: {}
|
|
669
|
+
}
|
|
670
|
+
};
|
|
671
|
+
function migrateLegacySchemaDocument(_legacy) {
|
|
672
|
+
throw new Error("migrateLegacySchemaDocument is not available in the headless @uipath/ixp-components-wind stub");
|
|
673
|
+
}
|
|
674
|
+
var DEFAULT_FIELD_TYPES = SELECTABLE_FIELD_KINDS.filter((kind) => kind !== TaxonomyFieldKindEnum.Choice).map((kind) => ({
|
|
675
|
+
id: kind,
|
|
676
|
+
name: kind,
|
|
677
|
+
kind
|
|
678
|
+
}));
|
|
679
|
+
function getDefaultExtractionSchema() {
|
|
680
|
+
try {
|
|
681
|
+
return migrateLegacySchemaDocument({
|
|
682
|
+
taxonomy: { overallInstructions: "", lastModified: 0, fieldGroups: [] },
|
|
683
|
+
fieldTypes: DEFAULT_FIELD_TYPES,
|
|
684
|
+
businessChecks: []
|
|
685
|
+
});
|
|
686
|
+
} catch {
|
|
687
|
+
return structuredClone(emptyExtractionSchema);
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
function toModelConfig(value) {
|
|
691
|
+
if (typeof value !== "object" || value === null || Array.isArray(value))
|
|
692
|
+
return;
|
|
693
|
+
const raw = value;
|
|
694
|
+
const str = (key) => typeof raw[key] === "string" ? raw[key] : undefined;
|
|
695
|
+
const num = (key) => typeof raw[key] === "number" ? raw[key] : undefined;
|
|
696
|
+
return {
|
|
697
|
+
model_version: str("model_version"),
|
|
698
|
+
execution_mode: str("execution_mode"),
|
|
699
|
+
attribution_method: str("attribution_method"),
|
|
700
|
+
input_config: str("input_config"),
|
|
701
|
+
system_prompt_override: str("system_prompt_override"),
|
|
702
|
+
frequency_penalty: num("frequency_penalty"),
|
|
703
|
+
temperature: num("temperature"),
|
|
704
|
+
top_p: num("top_p"),
|
|
705
|
+
seed: num("seed"),
|
|
706
|
+
flags: Array.isArray(raw.flags) ? raw.flags.filter((flag) => typeof flag === "string") : undefined
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
var ixpDefaultSchemaProcessor = (definition) => {
|
|
710
|
+
if (definition.nodeType !== DYNAMIC_EXTRACT_NODE_TYPE)
|
|
711
|
+
return;
|
|
712
|
+
const inputDefaults = definition.inputDefaults;
|
|
713
|
+
if (inputDefaults?.schemaDocument !== undefined)
|
|
714
|
+
return;
|
|
715
|
+
const seeded = getDefaultExtractionSchema();
|
|
716
|
+
const modelConfig = toModelConfig(inputDefaults?.modelConfig);
|
|
717
|
+
const schemaDocument = modelConfig === undefined ? seeded : { ...seeded, config: buildExtractionConfig(modelConfig) };
|
|
718
|
+
return {
|
|
719
|
+
nodeType: definition.nodeType,
|
|
720
|
+
manifest: {
|
|
721
|
+
...definition,
|
|
722
|
+
inputDefaults: { ...inputDefaults, schemaDocument }
|
|
723
|
+
}
|
|
724
|
+
};
|
|
725
|
+
};
|
|
726
|
+
var PROCESSORS = [connectorHttpRequestProcessor, ixpDefaultSchemaProcessor];
|
|
727
|
+
function processManifest(definition, ctx) {
|
|
728
|
+
if (!definition)
|
|
729
|
+
return;
|
|
730
|
+
for (const processor of PROCESSORS) {
|
|
731
|
+
const result = processor(definition, ctx);
|
|
732
|
+
if (result)
|
|
733
|
+
return result;
|
|
734
|
+
}
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
function resolveEffectiveManifest(rawNodeType, rawDefinition, ctx) {
|
|
738
|
+
const processed = processManifest(rawDefinition, ctx);
|
|
739
|
+
return {
|
|
740
|
+
nodeType: processed?.nodeType ?? rawNodeType,
|
|
741
|
+
manifest: processed?.manifest ?? rawDefinition
|
|
742
|
+
};
|
|
743
|
+
}
|
|
383
744
|
function sanitizeNodeLabelLocal(label) {
|
|
384
745
|
const words = label.split(/[^a-zA-Z0-9]+/).filter(Boolean);
|
|
385
746
|
if (words.length === 0)
|
|
@@ -409,13 +770,33 @@ function generateNodeIdAndNameLocal(label, existingIds) {
|
|
|
409
770
|
displayName: label ? index > 1 ? `${label} ${index}` : label : `Node${index > 1 ? ` ${index}` : ""}`
|
|
410
771
|
};
|
|
411
772
|
}
|
|
773
|
+
function isInSolutionDefinition(fileDef) {
|
|
774
|
+
const model = fileDef.model;
|
|
775
|
+
return model?.isInSolution === true || !!model?.projectName || !!model?.projectId;
|
|
776
|
+
}
|
|
777
|
+
var isSessionLocator = (value) => typeof value === "string" && isLocalSolutionUri(value);
|
|
778
|
+
function stripSessionScopedFields(value) {
|
|
779
|
+
if (Array.isArray(value)) {
|
|
780
|
+
return value.filter((entry) => !isSessionLocator(entry)).map((entry) => stripSessionScopedFields(entry));
|
|
781
|
+
}
|
|
782
|
+
if (value === null || typeof value !== "object") {
|
|
783
|
+
return value;
|
|
784
|
+
}
|
|
785
|
+
const result = {};
|
|
786
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
787
|
+
if (isSessionLocator(entry)) {
|
|
788
|
+
continue;
|
|
789
|
+
}
|
|
790
|
+
result[key] = stripSessionScopedFields(entry);
|
|
791
|
+
}
|
|
792
|
+
return result;
|
|
793
|
+
}
|
|
412
794
|
function resolveDefinition(manifestDef, fileDef) {
|
|
413
795
|
const base = manifestDef ?? fileDef;
|
|
414
796
|
if (!base)
|
|
415
797
|
return;
|
|
416
798
|
if (manifestDef && fileDef) {
|
|
417
|
-
|
|
418
|
-
if (isInSolution) {
|
|
799
|
+
if (isInSolutionDefinition(fileDef)) {
|
|
419
800
|
return {
|
|
420
801
|
...manifestDef,
|
|
421
802
|
outputDefinition: fileDef.outputDefinition ?? manifestDef.outputDefinition,
|
|
@@ -478,50 +859,17 @@ function reconcileInputs(inputs, model, definition, node) {
|
|
|
478
859
|
return out;
|
|
479
860
|
}
|
|
480
861
|
function hydrateNodeData(node, definition, nodeVariables = [], subflowEntry, manifestMap, subflows) {
|
|
481
|
-
const
|
|
482
|
-
const
|
|
483
|
-
const
|
|
484
|
-
const
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
nodeVariableOutputs[variable.binding.outputId] = {
|
|
492
|
-
type: variable.type,
|
|
493
|
-
...variable.description && { description: variable.description },
|
|
494
|
-
...variable.schema && { schema: variable.schema },
|
|
495
|
-
...manifestOutput?.scope && { scope: manifestOutput.scope },
|
|
496
|
-
...manifestOutput?.source && { source: manifestOutput.source },
|
|
497
|
-
...manifestOutput?.var && { var: manifestOutput.var }
|
|
498
|
-
};
|
|
499
|
-
}
|
|
862
|
+
const subflowGlobals = subflowEntry?.variables?.globals ?? [];
|
|
863
|
+
const subflowInputs = buildSubflowInputDefinition(subflowGlobals);
|
|
864
|
+
const subflowOutputVars = subflowGlobals.filter((g) => g.direction === "out");
|
|
865
|
+
const hasExplicitOutputGlobals = subflowOutputVars.length > 0;
|
|
866
|
+
const subflowOutputs = buildSubflowNodeOutputs(subflowEntry, { manifests: manifestMap, subflows });
|
|
867
|
+
const effectiveOutputs = buildEffectiveNodeOutputs({
|
|
868
|
+
manifestOutputs: definition?.outputDefinition,
|
|
869
|
+
nodeVariables: nodeVariables.filter((v) => v.binding.nodeId === node.id),
|
|
870
|
+
extraLayers: [subflowOutputs],
|
|
871
|
+
instanceOutputs: node.outputs
|
|
500
872
|
});
|
|
501
|
-
let subflowInputs = [];
|
|
502
|
-
let subflowOutputVars = [];
|
|
503
|
-
let subflowOutputs = subflowEntry ? getSubflowBaselineOutputs() : {};
|
|
504
|
-
const hasExplicitOutputGlobals = subflowEntry?.variables?.globals?.some((g) => g.direction === "out") ?? false;
|
|
505
|
-
if (subflowEntry?.variables?.globals) {
|
|
506
|
-
subflowOutputs = { ...subflowOutputs, ...buildSubflowOutputDefinition(subflowEntry.variables.globals) };
|
|
507
|
-
subflowInputs = buildSubflowInputDefinition(subflowEntry.variables.globals);
|
|
508
|
-
subflowOutputVars = subflowEntry.variables.globals.filter((g) => g.direction === "out");
|
|
509
|
-
}
|
|
510
|
-
if (!hasExplicitOutputGlobals && subflowEntry && manifestMap) {
|
|
511
|
-
const passThrough = buildSubflowPassThroughOutputDefinition(subflowEntry.nodes, subflowEntry.edges, manifestMap, undefined, subflows);
|
|
512
|
-
if (Object.keys(passThrough).length > 0) {
|
|
513
|
-
subflowOutputs = { ...subflowOutputs, ...passThrough };
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
const instanceOutputs = node.outputs ?? {};
|
|
517
|
-
const effectiveOutputs = { ...manifestOutputs, ...nodeVariableOutputs, ...subflowOutputs };
|
|
518
|
-
for (const [key, value] of Object.entries(instanceOutputs)) {
|
|
519
|
-
if (key in effectiveOutputs) {
|
|
520
|
-
effectiveOutputs[key] = mergeManifestOutputOverInstance(value, effectiveOutputs[key]);
|
|
521
|
-
} else {
|
|
522
|
-
effectiveOutputs[key] = value;
|
|
523
|
-
}
|
|
524
|
-
}
|
|
525
873
|
const model = node.model;
|
|
526
874
|
const nodeInputs = reconcileInputs(node.inputs, model, definition, node);
|
|
527
875
|
const variableUpdates = node.variableUpdates;
|
|
@@ -547,9 +895,9 @@ function hydrateNodeData(node, definition, nodeVariables = [], subflowEntry, man
|
|
|
547
895
|
...projectId && { projectId }
|
|
548
896
|
};
|
|
549
897
|
}
|
|
550
|
-
function instanceToHydratedNode(
|
|
551
|
-
const base = instanceToNode(
|
|
552
|
-
base.data = hydrateNodeData(
|
|
898
|
+
function instanceToHydratedNode(instance2, definition, options = {}) {
|
|
899
|
+
const base = instanceToNode(instance2, options.offset);
|
|
900
|
+
base.data = hydrateNodeData(instance2, definition, options.nodeVariables ?? [], options.subflowEntry, options.manifestMap, options.subflows);
|
|
553
901
|
return base;
|
|
554
902
|
}
|
|
555
903
|
function xyFlowToPackagingNode(nodes) {
|
|
@@ -584,7 +932,11 @@ function workflowToXYFlow(workflow, manifestMap) {
|
|
|
584
932
|
const { nodeType: effectiveType, manifest: definition } = resolveEffectiveManifest(node.type, resolved, {
|
|
585
933
|
getManifest: (type) => findManifestByNodeType(manifestMap, type)
|
|
586
934
|
});
|
|
587
|
-
|
|
935
|
+
let effectiveNode = effectiveType === node.type ? node : { ...node, type: effectiveType, typeVersion: definition?.version ?? node.typeVersion };
|
|
936
|
+
if (!supportsVariableUpdates(effectiveType) && "variableUpdates" in effectiveNode) {
|
|
937
|
+
const { variableUpdates: _variableUpdates, ...withoutVariableUpdates } = effectiveNode;
|
|
938
|
+
effectiveNode = withoutVariableUpdates;
|
|
939
|
+
}
|
|
588
940
|
const base = instanceToHydratedNode(effectiveNode, definition, {
|
|
589
941
|
nodeVariables,
|
|
590
942
|
subflowEntry: workflow.subflows?.[node.id],
|
|
@@ -604,8 +956,14 @@ function workflowToXYFlow(workflow, manifestMap) {
|
|
|
604
956
|
return base;
|
|
605
957
|
});
|
|
606
958
|
const orderedNodes = sortNodesParentFirst(nodes);
|
|
607
|
-
const edges = workflow.edges.map((connection) => resolveEdgeType(instanceToEdge(connection), orderedNodes, manifestMap));
|
|
608
|
-
return {
|
|
959
|
+
const edges = dropStaleEdgeRoutes(workflow.edges.map((connection) => resolveEdgeType(instanceToEdge(connection), orderedNodes, manifestMap)), orderedNodes);
|
|
960
|
+
return {
|
|
961
|
+
nodes: orderedNodes,
|
|
962
|
+
edges,
|
|
963
|
+
definitions,
|
|
964
|
+
bindings,
|
|
965
|
+
workflowVariables: pruneVariableUpdatesForNodes(orderedNodes, workflowVariables)
|
|
966
|
+
};
|
|
609
967
|
}
|
|
610
968
|
function convertSubflowsToXYFlow(workflow, manifestMap) {
|
|
611
969
|
if (!workflow.subflows)
|
|
@@ -663,7 +1021,7 @@ function sortNodesParentFirst(nodes) {
|
|
|
663
1021
|
}
|
|
664
1022
|
return sorted;
|
|
665
1023
|
}
|
|
666
|
-
function xyFlowToWorkflow(workflowId, workflowVersion, workflowName, nodes, edges, definitions, bindings = [], variables = { nodes: [], globals: [] }
|
|
1024
|
+
function xyFlowToWorkflow(workflowId, workflowVersion, workflowName, nodes, edges, definitions, bindings = [], variables = { nodes: [], globals: [] }) {
|
|
667
1025
|
const orderedNodes = sortNodesParentFirst(nodes);
|
|
668
1026
|
const workflowNodes = orderedNodes.map((node) => {
|
|
669
1027
|
const base = nodeToInstance(node);
|
|
@@ -686,8 +1044,7 @@ function xyFlowToWorkflow(workflowId, workflowVersion, workflowName, nodes, edge
|
|
|
686
1044
|
}
|
|
687
1045
|
};
|
|
688
1046
|
});
|
|
689
|
-
const workflowEdges = edges.map(edgeToInstance);
|
|
690
|
-
const { solutionId, projectId } = options;
|
|
1047
|
+
const workflowEdges = edges.map((edge) => edgeToInstance(edge));
|
|
691
1048
|
const generatedVariables = generateNodeVariablesFromNodes(orderedNodes, variables, definitions);
|
|
692
1049
|
return {
|
|
693
1050
|
id: workflowId,
|
|
@@ -701,9 +1058,30 @@ function xyFlowToWorkflow(workflowId, workflowVersion, workflowName, nodes, edge
|
|
|
701
1058
|
...generatedVariables.nodes.length > 0 && { nodes: generatedVariables.nodes },
|
|
702
1059
|
...generatedVariables.variableUpdates && Object.keys(generatedVariables.variableUpdates).length > 0 && { variableUpdates: generatedVariables.variableUpdates }
|
|
703
1060
|
},
|
|
704
|
-
...bindings && bindings.length > 0 && { bindings }
|
|
705
|
-
|
|
706
|
-
|
|
1061
|
+
...bindings && bindings.length > 0 && { bindings }
|
|
1062
|
+
};
|
|
1063
|
+
}
|
|
1064
|
+
function getVariableUpdateNodeType(node) {
|
|
1065
|
+
return (typeof node.data?.type === "string" ? node.data.type : undefined) ?? node.type;
|
|
1066
|
+
}
|
|
1067
|
+
function pruneVariableUpdatesForNodes(nodes, variables) {
|
|
1068
|
+
if (!variables.variableUpdates)
|
|
1069
|
+
return variables;
|
|
1070
|
+
const nodeMap = new Map(nodes.map((node) => [node.id, node]));
|
|
1071
|
+
const variableUpdates = Object.fromEntries(Object.entries(variables.variableUpdates).filter(([nodeId, updates]) => nodeMap.has(nodeId) && supportsVariableUpdates(getVariableUpdateNodeType(nodeMap.get(nodeId))) && Boolean(updates?.length)));
|
|
1072
|
+
return { ...variables, variableUpdates };
|
|
1073
|
+
}
|
|
1074
|
+
function pruneVariableUpdatesForSubflow(entry) {
|
|
1075
|
+
const nodes = entry.nodes.map((node) => {
|
|
1076
|
+
if (supportsVariableUpdates(node.type) || !("variableUpdates" in node))
|
|
1077
|
+
return node;
|
|
1078
|
+
const { variableUpdates: _variableUpdates, ...rest } = node;
|
|
1079
|
+
return rest;
|
|
1080
|
+
});
|
|
1081
|
+
return {
|
|
1082
|
+
...entry,
|
|
1083
|
+
nodes,
|
|
1084
|
+
variables: entry.variables ? pruneVariableUpdatesForNodes(nodes, entry.variables) : undefined
|
|
707
1085
|
};
|
|
708
1086
|
}
|
|
709
1087
|
function createWorkflowNodeFromManifest(manifest, id, position = { x: 0, y: 0 }, label) {
|
|
@@ -790,14 +1168,7 @@ function generateNodeVariablesFromNodes(nodes, variables, definitions = []) {
|
|
|
790
1168
|
return v.binding.outputId in outputs;
|
|
791
1169
|
});
|
|
792
1170
|
const allNodeVariables = [...validNodeVariables, ...generatedNodeVariables.filter((g) => !validNodeVariables.some((v) => v.id === g.id))];
|
|
793
|
-
const variableUpdatesMap = {};
|
|
794
|
-
if (variables.variableUpdates) {
|
|
795
|
-
for (const [nodeId, updates] of Object.entries(variables.variableUpdates)) {
|
|
796
|
-
if (nodeMap.has(nodeId) && updates?.length) {
|
|
797
|
-
variableUpdatesMap[nodeId] = updates;
|
|
798
|
-
}
|
|
799
|
-
}
|
|
800
|
-
}
|
|
1171
|
+
const variableUpdatesMap = pruneVariableUpdatesForNodes(nodes, variables).variableUpdates ?? {};
|
|
801
1172
|
return {
|
|
802
1173
|
globals: globalVariables,
|
|
803
1174
|
nodes: allNodeVariables,
|
|
@@ -816,7 +1187,7 @@ function applyGlobalInputOverrides(raw, inputs) {
|
|
|
816
1187
|
}
|
|
817
1188
|
}
|
|
818
1189
|
}
|
|
819
|
-
var warmSerializationChunks = () => Promise.all([import("./index-
|
|
1190
|
+
var warmSerializationChunks = () => Promise.all([import("./index-er6vy3jk.js"), import("./serialization-GAW7UFOK-9hkdmmd2.js")]);
|
|
820
1191
|
async function flowJsonToBpmnXml(flowJson, options) {
|
|
821
1192
|
const [{ fileFormatToInMemoryWorkflow }, { toXml }] = await warmSerializationChunks();
|
|
822
1193
|
const raw = JSON.parse(flowJson);
|
|
@@ -829,7 +1200,8 @@ async function flowJsonToBpmnXml(flowJson, options) {
|
|
|
829
1200
|
const { nodes, edges, definitions, workflowVariables, bindings } = workflowToXYFlow(workflow, manifestMap);
|
|
830
1201
|
return toXml(nodes, edges, definitions, bindings, workflowVariables, workflow.subflows, {
|
|
831
1202
|
detached: options?.detached,
|
|
832
|
-
voiceAgentDefinitions: options?.voiceAgentDefinitions
|
|
1203
|
+
voiceAgentDefinitions: options?.voiceAgentDefinitions,
|
|
1204
|
+
encoding: options?.encoding
|
|
833
1205
|
});
|
|
834
1206
|
}
|
|
835
1207
|
export {
|
|
@@ -837,8 +1209,11 @@ export {
|
|
|
837
1209
|
xyFlowToPackagingNode,
|
|
838
1210
|
workflowToXYFlow,
|
|
839
1211
|
warmSerializationChunks,
|
|
1212
|
+
stripSessionScopedFields,
|
|
840
1213
|
resolveDefinition,
|
|
841
1214
|
reconcileInputs,
|
|
1215
|
+
pruneVariableUpdatesForSubflow,
|
|
1216
|
+
pruneVariableUpdatesForNodes,
|
|
842
1217
|
mapDefinitionToNodeData,
|
|
843
1218
|
instanceToHydratedNode,
|
|
844
1219
|
generateNodeVariablesFromNodes,
|
|
@@ -850,4 +1225,4 @@ export {
|
|
|
850
1225
|
applyGlobalInputOverrides
|
|
851
1226
|
};
|
|
852
1227
|
|
|
853
|
-
//# debugId=
|
|
1228
|
+
//# debugId=B7B72B82DACA90CD64756E2164756E21
|