@uipath/flow-tool 1.202.1 → 1.202.2-preview.167
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/THIRD-PARTY-NOTICES.md +157 -3
- package/dist/{authoring-113fk5ep.js → authoring-cyybnqy9.js} +2 -2
- package/dist/{binding-service-4y4gk5rb.js → binding-service-fy7fb6qz.js} +24 -24
- package/dist/{connector-service-n0jw38wq.js → connector-service-jt1ca7pj.js} +23 -23
- package/dist/{conversion-QANACVCM-zs0hhfjv.js → conversion-FQTRFHRX-j8vsrk1c.js} +208 -125
- package/dist/{de-6U7ECGHH-xwsw33fk.js → de-B3EKCNFC-zdwybhh7.js} +7 -4
- package/dist/{de-7XQXX2DK-IDWR6CAR-n4z245kt.js → de-FGHEJRCI-PK6WALXW-0dnvnmke.js} +153 -9
- package/dist/{de-7XQXX2DK-tqdy5n2b.js → de-FGHEJRCI-rv513mfh.js} +153 -9
- package/dist/{de-5KVP66U6-1bnf4zt5.js → de-MUJPA4EB-209jpeqe.js} +14 -2
- package/dist/{de-HKTOVV4H-pe9w0xn8.js → de-VMMG2MN7-2ecwpg1b.js} +2 -5
- package/dist/{de-XLT4QPIP-kj81dxjc.js → de-XNTCMP5Z-xfkfqg20.js} +7 -4
- package/dist/{debug-conversation-trigger-9gwtwxn6.js → debug-conversation-trigger-1g7tf7d9.js} +13 -13
- package/dist/{debug-http-client-mc67gw2b.js → debug-http-client-4ev9xna7.js} +2 -2
- package/dist/{debug-service-h0mpv9mh.js → debug-service-2skv6t3q.js} +3 -3
- package/dist/{edge-service-pxwzsne6.js → edge-service-707bqbrr.js} +12 -12
- package/dist/en-BPJVY3U7-xkpj5xc5.js +52 -0
- package/dist/{en-P4AS26D7-zptp77bm.js → en-E454CJNK-ytfw06kj.js} +4 -2
- package/dist/{en-X3S6IZ5J-nhkg6pwn.js → en-GN2ZGWUE-03z2df4k.js} +26 -2
- package/dist/{en-5ZGC5VQ3-EWX7ILY7-rmtj70fk.js → en-TBNO2WUV-77KTKLDE-4ktf0pqw.js} +141 -3
- package/dist/{en-5ZGC5VQ3-h581y30k.js → en-TBNO2WUV-rfe87pgh.js} +140 -2
- package/dist/{es-VFPNVMP5-bx2c337j.js → es-7SE7HX2X-qda7whn6.js} +14 -2
- package/dist/{es-NQICVYSQ-3dtqgget.js → es-EKHIPSW6-ya88nvm0.js} +7 -4
- package/dist/{es-PQ3RA33Q-y4kxhjfr.js → es-KEBF3AIM-g5rszh8f.js} +7 -4
- package/dist/{es-ZGCPPOME-8gazspjj.js → es-KR3ZSNMP-84zphx0x.js} +153 -9
- package/dist/{es-ZGCPPOME-24PJEGPV-rn86z9kn.js → es-KR3ZSNMP-QLWVVWKJ-5egs0gj9.js} +153 -9
- package/dist/{es-MX-XAVLOQW3-q00km2y7.js → es-MX-2MYFZU7X-6v0q5rbn.js} +14 -2
- package/dist/{es-MX-NHTIP5YM-ar6zfx95.js → es-MX-EL3CDS3F-sh84yvjr.js} +7 -4
- package/dist/{es-MX-OKNDG2NH-tcac6j4g.js → es-MX-OR6G2SFR-7yykk5ma.js} +7 -4
- package/dist/{es-MX-U2VN3SZW-anynsmd8.js → es-MX-XXZJGC4R-2mr8jtgm.js} +153 -9
- package/dist/{es-MX-U2VN3SZW-KYAJ2ONK-kdram1g1.js → es-MX-XXZJGC4R-W6EEIHXR-c2m4yjpj.js} +153 -9
- package/dist/{es-MX-H2EAXLYI-j42kfkxy.js → es-MX-ZP2LJ3V7-k4brnfa9.js} +2 -5
- package/dist/{es-O4PAV2CR-0g23ve3v.js → es-WY6FZ3HO-zksnn6dp.js} +2 -5
- package/dist/{flow-api-p6vabmea.js → flow-api-p1jy8t6k.js} +6 -6
- package/dist/{flow-debug-service-m2ch7mwg.js → flow-debug-service-j3w36122.js} +29 -29
- package/dist/{flow-eval-node-target-3530n69r.js → flow-eval-node-target-c3pd8eqm.js} +12 -12
- package/dist/{flow-eval-run-service-pdkvt1tp.js → flow-eval-run-service-ab2mwx4q.js} +30 -30
- package/dist/{flow-eval-service-4zhncch4.js → flow-eval-service-qfmnjrsp.js} +16 -16
- package/dist/{flow-init-service-40r1q53q.js → flow-init-service-d90hynt6.js} +16 -16
- package/dist/{flow-io-23wgj1sg.js → flow-io-q805m1wz.js} +12 -12
- package/dist/{flow-migrate-service-n8bjdds3.js → flow-migrate-service-54aj1b70.js} +13 -13
- package/dist/{flow-pack-service-sw4dbxvr.js → flow-pack-service-dzj9wv01.js} +28 -28
- package/dist/flow-validate-service-mp54b5af.js +59 -0
- package/dist/{fr-R4L3OAWI-30khpsmn.js → fr-DPD4GHX3-exeypjwk.js} +7 -4
- package/dist/{fr-PFHIL7YZ-2n589p47.js → fr-IHD66TVT-vfvmefbx.js} +7 -4
- package/dist/{fr-E5MDO4EG-c3mkty2t.js → fr-MDFKNZ4C-qmypp92m.js} +14 -2
- package/dist/{fr-5YRGHXF5-kz1ywpv6.js → fr-PRMYCRDC-0bk078by.js} +2 -5
- package/dist/{fr-T3G5GZCT-y3f7xb1q.js → fr-Y6NPVODW-8vr1ja4b.js} +153 -9
- package/dist/{fr-T3G5GZCT-TU4IKBEG-k6xz1s1f.js → fr-Y6NPVODW-AS7T42TR-v4qe2tha.js} +153 -9
- package/dist/{governance-fetcher-kaarfkse.js → governance-fetcher-fxaaqnp1.js} +3 -3
- package/dist/{headless-h1myzz32.js → headless-my7j1typ.js} +360 -180
- package/dist/{hitl-service-sztgwdqk.js → hitl-service-19q6mg35.js} +12 -12
- package/dist/{index-rmym7hm4.js → index-4b8634za.js} +3 -3
- package/dist/{index-4zrwgb3c.js → index-acd6bpqc.js} +6 -6
- package/dist/{index-zw4jx227.js → index-apf8q9y0.js} +2 -2
- package/dist/{index-eybzsdcc.js → index-d1yqqk6q.js} +62 -4
- package/dist/{index-4y4rvc7g.js → index-mz5yzrdp.js} +3 -3
- package/dist/index.js +17 -17
- package/dist/init.js +16 -16
- package/dist/{input-reader-cex1tqwe.js → input-reader-mm2ydeh5.js} +1 -1
- package/dist/{ja-SDAPAVCR-kg39dfap.js → ja-HFEQKCZF-hb2f25p8.js} +2 -5
- package/dist/{ja-P4OSE367-srr3qypg.js → ja-JE5ZL7EY-hacj2m31.js} +7 -4
- package/dist/{ja-ZHKCBE5W-x73w6x3e.js → ja-MDG4BKZQ-gayaca2c.js} +7 -4
- package/dist/{ja-BI5K3JDZ-GTIHISTZ-s6n3r2ab.js → ja-Q5PXKJ2V-BR5GRIDQ-fgqqpryf.js} +153 -9
- package/dist/{ja-BI5K3JDZ-77zat4z2.js → ja-Q5PXKJ2V-p4msxzjd.js} +153 -9
- package/dist/{ja-DPO5PPLO-mysfmznx.js → ja-UTQEAP34-hvyf683h.js} +14 -2
- package/dist/{known-types-a20evmmg.js → known-types-eq32py2n.js} +7 -7
- package/dist/{ko-ITOPNIYI-hmxd2asd.js → ko-AXCHW2OK-pkwdcbmx.js} +14 -2
- package/dist/{ko-JOBF5V7N-4bv0mjje.js → ko-AYBDSRZG-41mdmsg1.js} +153 -9
- package/dist/{ko-JOBF5V7N-O7T4HKIE-ape840y0.js → ko-AYBDSRZG-G43C3XUW-kng13fsg.js} +153 -9
- package/dist/{ko-NAGOZLC3-gaxxsnd2.js → ko-B4SEC7QX-thq2wt6a.js} +2 -5
- package/dist/{ko-PYOS2KJP-e7dshyxy.js → ko-DJJRKCG5-5h3k9csc.js} +7 -4
- package/dist/{ko-6W7OGLLB-mnmqc584.js → ko-LA5OSS5P-mq5h8sbk.js} +7 -4
- package/dist/localization-w8ada88j.js +47 -0
- package/dist/{node-tgybta62.js → node-6r3jxnxw.js} +3 -3
- package/dist/{node-service-n183yy2f.js → node-service-3y7nsn7v.js} +24 -24
- package/dist/{node-sync-service-dk9jazv4.js → node-sync-service-d00rvgfe.js} +11 -13
- package/dist/{packager-tool-ck10v2ve.js → packager-tool-03hjxcd7.js} +1 -1
- package/dist/{packager-tool-29vnb5v1.js → packager-tool-0hrz9qfd.js} +4 -4
- package/dist/{packager-tool-aea5psjw.js → packager-tool-114a3x6s.js} +2 -2
- package/dist/{packager-tool-pb1g4qnb.js → packager-tool-12a5s41y.js} +7 -7
- package/dist/{packager-tool-tn5e7wnb.js → packager-tool-29eg86w6.js} +2 -2
- package/dist/{packager-tool-yaabg8qc.js → packager-tool-3edzhkec.js} +16 -21
- package/dist/{packager-tool-a42jnpy5.js → packager-tool-4mna26cc.js} +27 -3
- package/dist/{packager-tool-7c18ekyp.js → packager-tool-5kd7msdf.js} +2 -2
- package/dist/{packager-tool-rfkx60be.js → packager-tool-5xmkv2qk.js} +3 -3
- package/dist/{packager-tool-5wmnpaf0.js → packager-tool-6ydtad5j.js} +14 -14
- package/dist/packager-tool-9y5am147.js +180 -0
- package/dist/{packager-tool-cphdcys0.js → packager-tool-9ydywwp2.js} +1 -1
- package/dist/{packager-tool-em5r6g6j.js → packager-tool-aa481g36.js} +214 -23
- package/dist/{packager-tool-p96yqdnk.js → packager-tool-bddj2zb4.js} +1 -1
- package/dist/{packager-tool-p7c203yf.js → packager-tool-bs9bkk6z.js} +69 -69
- package/dist/{packager-tool-3g534a1a.js → packager-tool-cb1xm8vk.js} +1 -1
- package/dist/{packager-tool-s7tgf9kh.js → packager-tool-cbwnat37.js} +2 -2
- package/dist/packager-tool-d6qf5qmb.js +49 -0
- package/dist/{packager-tool-09xysehb.js → packager-tool-e3yks66r.js} +5 -3
- package/dist/{packager-tool-m5qfverj.js → packager-tool-e8td7b01.js} +1143 -694
- package/dist/{packager-tool-cbvcyr3t.js → packager-tool-emr82eqw.js} +3 -3
- package/dist/{packager-tool-77f5xeqw.js → packager-tool-h1mds3r4.js} +1 -1
- package/dist/{packager-tool-vzj3dha7.js → packager-tool-h71m1r73.js} +6 -6
- package/dist/{packager-tool-vpqyvh4c.js → packager-tool-jjpc0yka.js} +19 -19
- package/dist/{packager-tool-gkhk6ty0.js → packager-tool-jt4vhpjd.js} +6 -6
- package/dist/{packager-tool-3wzbcn5q.js → packager-tool-nnm6kw3x.js} +1 -1
- package/dist/{packager-tool-e0p2zsyc.js → packager-tool-p79yh9ww.js} +16 -16
- package/dist/{packager-tool-7exrv6w7.js → packager-tool-pm3qh1hy.js} +1 -1
- package/dist/{packager-tool-58q3tvh7.js → packager-tool-r87gxwqa.js} +159 -21
- package/dist/{packager-tool-m056vsmy.js → packager-tool-rew0hp2h.js} +1 -1
- package/dist/{packager-tool-py7cevyk.js → packager-tool-sc5tddfj.js} +1 -1
- package/dist/{packager-tool-af8bw5wd.js → packager-tool-snzt03pg.js} +32 -31
- package/dist/{packager-tool-yw0zcs7r.js → packager-tool-t1cz16v9.js} +4 -4
- package/dist/{packager-tool-n09qbckn.js → packager-tool-vfb74f9p.js} +3 -3
- package/dist/{packager-tool-p9stswjj.js → packager-tool-w20r6n9v.js} +10976 -6421
- package/dist/{packager-tool-7gx51wnq.js → packager-tool-wxb92bbz.js} +4 -4
- package/dist/{packager-tool-0g00g1a5.js → packager-tool-xjghg8yj.js} +2 -2
- package/dist/{packager-tool-gaa5ss24.js → packager-tool-yq67cfz5.js} +9 -9
- package/dist/{packager-tool-9bec251q.js → packager-tool-yr3bws42.js} +11439 -6786
- package/dist/{packager-tool-z9bfhmm5.js → packager-tool-z83pga0z.js} +159 -21
- package/dist/packager-tool.js +11 -11
- package/dist/{pt-YI4VE4YQ-wdkn2dcf.js → pt-3DIO5QWG-hb763vct.js} +14 -2
- package/dist/{pt-D6A6MVB2-yvxca8vz.js → pt-3KUMINBZ-d0fexmny.js} +7 -4
- package/dist/{pt-BR-Z3TUDJHM-8v73x9s7.js → pt-BR-3LGIH33I-tqbrd89y.js} +7 -4
- package/dist/{pt-BR-DXXSYJDO-a2tp13v7.js → pt-BR-6VFBW5QT-hsck9gjj.js} +2 -5
- package/dist/{pt-BR-7DYX2YPT-LZYH4YFD-bx43vx3z.js → pt-BR-TKHNHMET-4Z5H4N5G-pzw3328h.js} +153 -9
- package/dist/{pt-BR-7DYX2YPT-fqxqzqtf.js → pt-BR-TKHNHMET-sn91xyq0.js} +153 -9
- package/dist/{pt-BR-UQCYHKMJ-q78n7q70.js → pt-BR-WNNZTIMN-6fent688.js} +7 -4
- package/dist/{pt-BR-BXURWX4W-bwfcwhk1.js → pt-BR-Y6K6XHXK-37a932vp.js} +14 -2
- package/dist/{pt-KSBWHAVQ-mhvhgr2p.js → pt-PFZXVOQH-qshq0b2m.js} +7 -4
- package/dist/{pt-HTXGGX6Y-97t21dty.js → pt-ROXU257Y-2f6bxev4.js} +153 -9
- package/dist/{pt-HTXGGX6Y-ZHQSDFKI-vehfxadc.js → pt-ROXU257Y-OWZOS54V-ywap2t39.js} +153 -9
- package/dist/{pt-7TR74ZMB-bmphh4x2.js → pt-WOTPKWPZ-1rxcy8hs.js} +2 -5
- package/dist/{ro-VZUZTAMR-f4q0g3em.js → ro-AN5G62WQ-kcj00jwq.js} +7 -4
- package/dist/{ro-KTNQ3MNU-XIE6YPQN-gen8p82z.js → ro-AVAWPKOO-6WCG756B-v7pjv1hc.js} +153 -9
- package/dist/{ro-KTNQ3MNU-y08n1x5g.js → ro-AVAWPKOO-b89pw79r.js} +153 -9
- package/dist/{ro-RKXZUG7Z-nndrrsq7.js → ro-BWR3ONRR-jmap5ajd.js} +14 -2
- package/dist/{ro-4TMBHS5M-jz0anpt6.js → ro-KMDT7LYJ-yhpnsdvw.js} +7 -4
- package/dist/{ro-BJFER5OI-83tq8vxh.js → ro-PB44YXML-zmhhwp5h.js} +2 -5
- package/dist/{serialization-J5QK3HPY-bgewpt6f.js → serialization-BXU6AKAN-n5b0v0kd.js} +1942 -900
- package/dist/{shared-utils-3cwmvxdc.js → shared-utils-ka4xn0nn.js} +1 -1
- package/dist/{tidy-service-4q2mrf2y.js → tidy-service-my2hp8af.js} +13 -13
- package/dist/tool.js +17 -17
- package/dist/{tr-AA6O2WSR-86ba4bdf.js → tr-5IIHSFW5-stsb3dar.js} +14 -2
- package/dist/{tr-XHSSPNK7-GW5KVXR3-2w3f1ss6.js → tr-JMIP7ZSL-G3QYPVT2-gswngwcr.js} +153 -9
- package/dist/{tr-XHSSPNK7-cmqyc4wd.js → tr-JMIP7ZSL-c39b6pe4.js} +153 -9
- package/dist/{tr-W4AVRSQ4-hjr81xzk.js → tr-KHOCWWLF-8apf5y44.js} +7 -4
- package/dist/{tr-GSQQ6SOT-hv1gyeaa.js → tr-SC55DYHY-e4zgcd4t.js} +7 -4
- package/dist/{tr-RQTZ2DMS-w3cwv8s4.js → tr-SEC6RGZ4-0ttavjya.js} +2 -5
- package/dist/validation.js +29 -29
- package/dist/{variable-service-xm8dh1gw.js → variable-service-6wajaq8r.js} +12 -12
- package/dist/{wait-for-flow-job-4cyc36yg.js → wait-for-flow-job-xtnb6zfc.js} +6 -6
- package/dist/{zh-CN-6YRAN57T-rd7x2tqs.js → zh-CN-4NI2EGMV-8g027vv3.js} +7 -4
- package/dist/{zh-CN-2EHQT23P-mr63c4xz.js → zh-CN-IFFXSEJS-9wm9gmrv.js} +153 -9
- package/dist/{zh-CN-2EHQT23P-T5XRQCVS-ac17dpc1.js → zh-CN-IFFXSEJS-MZQ4HU3Z-ge1ynmtz.js} +153 -9
- package/dist/{zh-CN-ZC6LT4IN-kbzvvzz5.js → zh-CN-MX7VIOF2-xznrtchf.js} +2 -5
- package/dist/{zh-CN-EDFRBU32-vvj7tmaq.js → zh-CN-OUMLDKDS-q3a1rr5c.js} +7 -4
- package/dist/{zh-CN-R2KLHXQV-agqr45ds.js → zh-CN-R2KU4U5L-q4yhc33t.js} +14 -2
- package/dist/{zh-TW-SO2245GN-n2bn1gg4.js → zh-TW-53SU6EH4-33x57egq.js} +7 -4
- package/dist/{zh-TW-R7Y5KVMU-m61y07e3.js → zh-TW-5SJ3GZT2-bsg054mw.js} +2 -5
- package/dist/{zh-TW-RJGCQANM-w0x3qc1p.js → zh-TW-GNKMELBF-r4ay2475.js} +14 -2
- package/dist/{zh-TW-MGZCE5BT-c4ekmrz9.js → zh-TW-IYBNYAMG-8727c7v2.js} +153 -9
- package/dist/{zh-TW-MGZCE5BT-P6FLIUAR-zmq07vhs.js → zh-TW-IYBNYAMG-J7FWTQTK-sx8d4ymg.js} +153 -9
- package/dist/{zh-TW-HAICM6DE-rh7k3cq7.js → zh-TW-TN3MPNXL-jcgg2hcs.js} +7 -4
- package/package.json +2 -2
- package/dist/en-EPWMLP2N-2wvge238.js +0 -28
- package/dist/flow-validate-service-k7s2rbgc.js +0 -59
- package/dist/localization-1br6h143.js +0 -47
- package/dist/packager-tool-abbtfk2v.js +0 -54
- package/dist/packager-tool-k99nf3pq.js +0 -25
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import {
|
|
2
|
+
init_esm_shims
|
|
3
|
+
} from "./packager-tool-6ejqwbw9.js";
|
|
4
|
+
import {
|
|
5
|
+
DYNAMIC_EXTRACT_NODE_TYPE
|
|
6
|
+
} from "./packager-tool-e8td7b01.js";
|
|
7
|
+
|
|
8
|
+
// ../../node_modules/@uipath/flow-converter/dist/chunk-EWC2NTBJ.js
|
|
9
|
+
init_esm_shims();
|
|
10
|
+
var EMPTY_SHAPE = {};
|
|
11
|
+
function createSchemaStub(shape = EMPTY_SHAPE) {
|
|
12
|
+
const stub = {
|
|
13
|
+
extend: (nextShape) => createSchemaStub({ ...stub.shape, ...nextShape }),
|
|
14
|
+
passthrough: () => stub,
|
|
15
|
+
optional: () => stub,
|
|
16
|
+
safeParse: () => ({ success: true, data: {} }),
|
|
17
|
+
parse: (value) => value,
|
|
18
|
+
shape,
|
|
19
|
+
_def: { typeName: "ZodObject" }
|
|
20
|
+
};
|
|
21
|
+
return stub;
|
|
22
|
+
}
|
|
23
|
+
var nodeSchema = createSchemaStub();
|
|
24
|
+
var nodeManifestSchema = createSchemaStub();
|
|
25
|
+
var nodeDisplayManifestSchema = createSchemaStub();
|
|
26
|
+
var edgeSchema = createSchemaStub();
|
|
27
|
+
var idSchema = createSchemaStub();
|
|
28
|
+
var categoryManifestSchema = createSchemaStub();
|
|
29
|
+
function getExpandedSize(_shape) {
|
|
30
|
+
return { width: 400, height: 300 };
|
|
31
|
+
}
|
|
32
|
+
function isContainerNodeManifest(manifest) {
|
|
33
|
+
return manifest?.display?.shape === "container";
|
|
34
|
+
}
|
|
35
|
+
var DEFAULT_NODE_SIZE = 96;
|
|
36
|
+
function readNumericDimension(...values) {
|
|
37
|
+
for (const value of values) {
|
|
38
|
+
if (typeof value === "number" && Number.isFinite(value))
|
|
39
|
+
return value;
|
|
40
|
+
if (typeof value === "string") {
|
|
41
|
+
const parsed = Number.parseFloat(value);
|
|
42
|
+
if (Number.isFinite(parsed))
|
|
43
|
+
return parsed;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
var DEFAULT_DIMENSIONS = { width: DEFAULT_NODE_SIZE, height: DEFAULT_NODE_SIZE };
|
|
49
|
+
function getNodeDimensions(node, fallback = DEFAULT_DIMENSIONS) {
|
|
50
|
+
return {
|
|
51
|
+
width: readNumericDimension(node.width, node.measured?.width, node.style?.width) ?? fallback.width,
|
|
52
|
+
height: readNumericDimension(node.height, node.measured?.height, node.style?.height) ?? fallback.height
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
init_esm_shims();
|
|
56
|
+
init_esm_shims();
|
|
57
|
+
init_esm_shims();
|
|
58
|
+
var EXTRACTION_METHOD = "external_llm";
|
|
59
|
+
function collectWorkflowNodes(workflow) {
|
|
60
|
+
const nodes = [];
|
|
61
|
+
if (Array.isArray(workflow?.nodes))
|
|
62
|
+
nodes.push(...workflow.nodes);
|
|
63
|
+
if (workflow?.subflows && typeof workflow.subflows === "object") {
|
|
64
|
+
for (const entry of Object.values(workflow.subflows)) {
|
|
65
|
+
if (Array.isArray(entry?.nodes))
|
|
66
|
+
nodes.push(...entry.nodes);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return nodes;
|
|
70
|
+
}
|
|
71
|
+
function isDynamicExtractNodeType(type) {
|
|
72
|
+
return type === DYNAMIC_EXTRACT_NODE_TYPE;
|
|
73
|
+
}
|
|
74
|
+
init_esm_shims();
|
|
75
|
+
init_esm_shims();
|
|
76
|
+
init_esm_shims();
|
|
77
|
+
init_esm_shims();
|
|
78
|
+
var buildPrompt = (flags, override) => {
|
|
79
|
+
const fragments = [];
|
|
80
|
+
if (override)
|
|
81
|
+
fragments.push(override);
|
|
82
|
+
fragments.push(`The user prompt will give table names and columns for one or more tables, possibly adding descriptions/hints.
|
|
83
|
+
The user prompt will be in the following format, shown between triple quotes: """{"tables":<JSON set of tables prompt object>}""".
|
|
84
|
+
This will be followed by one or more images of successive pages in the document.
|
|
85
|
+
The JSON set of tables prompt object has table_names as keys and their values are a JSON table prompt object.
|
|
86
|
+
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.
|
|
87
|
+
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.
|
|
88
|
+
|
|
89
|
+
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.
|
|
90
|
+
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.
|
|
91
|
+
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>}"""
|
|
92
|
+
Each JSON row response object has the table's column titles as keys with the appropriate values from the document inserted by you.
|
|
93
|
+
If any column value is missing, fill in with the value "{{missing_marker}}".`);
|
|
94
|
+
if (flags.includes("append_field_descriptions")) {
|
|
95
|
+
fragments.push(`"tables":
|
|
96
|
+
{
|
|
97
|
+
"table_name": "<Field group name>",
|
|
98
|
+
"table_description/hints": "<Field group description included here>",
|
|
99
|
+
"columns": [
|
|
100
|
+
{
|
|
101
|
+
"column_title": "<Field name>",
|
|
102
|
+
"column_description/hints": "<Field description included here>"
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
}`);
|
|
106
|
+
}
|
|
107
|
+
if (flags.includes("append_taxonomy_descriptions")) {
|
|
108
|
+
fragments.push(`"taxonomy_description/hints": "<Taxonomy description included here>"`);
|
|
109
|
+
}
|
|
110
|
+
return fragments.join(`
|
|
111
|
+
|
|
112
|
+
`);
|
|
113
|
+
};
|
|
114
|
+
init_esm_shims();
|
|
115
|
+
var DEFAULT_EXECUTION_MODE = "standard";
|
|
116
|
+
var DEFAULT_ATTRIBUTION = "word_ids";
|
|
117
|
+
var DEFAULT_PRE_PROCESSING = "none";
|
|
118
|
+
function toModel(modelVersion) {
|
|
119
|
+
if (!modelVersion)
|
|
120
|
+
return null;
|
|
121
|
+
return { family: modelVersion.split("_")[0], version: modelVersion };
|
|
122
|
+
}
|
|
123
|
+
function buildExtractionConfig(modelConfig) {
|
|
124
|
+
const mc = modelConfig ?? {};
|
|
125
|
+
return {
|
|
126
|
+
extraction_method: EXTRACTION_METHOD,
|
|
127
|
+
model: toModel(mc.model_version),
|
|
128
|
+
execution_mode: mc.execution_mode ?? DEFAULT_EXECUTION_MODE,
|
|
129
|
+
"pre-processing": mc.input_config ?? DEFAULT_PRE_PROCESSING,
|
|
130
|
+
attribution: mc.attribution_method ?? DEFAULT_ATTRIBUTION,
|
|
131
|
+
model_config: {
|
|
132
|
+
temperature: mc.temperature ?? null,
|
|
133
|
+
top_p: mc.top_p ?? null,
|
|
134
|
+
seed: mc.seed ?? null,
|
|
135
|
+
frequency_penalty: mc.frequency_penalty ?? null,
|
|
136
|
+
prompt_override: buildPrompt(mc.flags ?? [], mc.system_prompt_override)
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
init_esm_shims();
|
|
141
|
+
init_esm_shims();
|
|
142
|
+
init_esm_shims();
|
|
143
|
+
var IDP_PROCESSOR_KEY_INPUT = "processorKey";
|
|
144
|
+
function readIdpProcessorKey(inputs) {
|
|
145
|
+
if (typeof inputs !== "object" || inputs === null)
|
|
146
|
+
return;
|
|
147
|
+
const key = inputs[IDP_PROCESSOR_KEY_INPUT];
|
|
148
|
+
return typeof key === "string" && key.length > 0 ? key : undefined;
|
|
149
|
+
}
|
|
150
|
+
var IDP_PROCESSOR_BINDING_RESOURCE = "idpProcessor";
|
|
151
|
+
var IDP_PROCESSOR_BINDING_NAME = "processorKey";
|
|
152
|
+
function bindingId(processorKey) {
|
|
153
|
+
return `idp${processorKey.replace(/[^a-zA-Z0-9]/g, "")}`;
|
|
154
|
+
}
|
|
155
|
+
function deriveIdpProcessorBindings(workflow) {
|
|
156
|
+
const bindings = [];
|
|
157
|
+
const seen = /* @__PURE__ */ new Set;
|
|
158
|
+
for (const node of collectWorkflowNodes(workflow)) {
|
|
159
|
+
if (!isDynamicExtractNodeType(node?.type))
|
|
160
|
+
continue;
|
|
161
|
+
const processorKey = readIdpProcessorKey(node?.inputs);
|
|
162
|
+
if (!processorKey || seen.has(processorKey))
|
|
163
|
+
continue;
|
|
164
|
+
seen.add(processorKey);
|
|
165
|
+
bindings.push({
|
|
166
|
+
id: bindingId(processorKey),
|
|
167
|
+
name: IDP_PROCESSOR_BINDING_NAME,
|
|
168
|
+
type: "string",
|
|
169
|
+
default: processorKey,
|
|
170
|
+
resource: IDP_PROCESSOR_BINDING_RESOURCE,
|
|
171
|
+
resourceKey: processorKey,
|
|
172
|
+
propertyAttribute: IDP_PROCESSOR_BINDING_NAME
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return bindings;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export { getExpandedSize, isContainerNodeManifest, getNodeDimensions, buildExtractionConfig, readIdpProcessorKey, IDP_PROCESSOR_BINDING_RESOURCE, IDP_PROCESSOR_BINDING_NAME, deriveIdpProcessorBindings };
|
|
179
|
+
|
|
180
|
+
//# debugId=46BD066F81A7FACC64756E2164756E21
|
|
@@ -1,23 +1,178 @@
|
|
|
1
1
|
import {
|
|
2
2
|
METADATA_IDENTIFIER,
|
|
3
3
|
METADATA_PREFIX,
|
|
4
|
+
SELF_PREFIX,
|
|
4
5
|
VARIABLE_PATH_IDENTIFIER_PATTERN,
|
|
5
6
|
VARIABLE_PATH_PATTERN,
|
|
6
7
|
VARIABLE_PATH_SELECTOR_PATTERN,
|
|
8
|
+
VARS_IDENTIFIER,
|
|
7
9
|
VARS_PREFIX
|
|
8
|
-
} from "./packager-tool-
|
|
10
|
+
} from "./packager-tool-yr3bws42.js";
|
|
9
11
|
import {
|
|
10
12
|
init_esm_shims
|
|
11
13
|
} from "./packager-tool-6ejqwbw9.js";
|
|
12
14
|
import {
|
|
13
15
|
FLAT_SEP,
|
|
16
|
+
JS_EXPRESSION_PREFIX,
|
|
14
17
|
JobAttachmentSchema,
|
|
18
|
+
decodeLiteral,
|
|
15
19
|
isAgentNodeType,
|
|
16
20
|
isExpressionValue,
|
|
17
|
-
|
|
18
|
-
|
|
21
|
+
isJobAttachmentRef,
|
|
22
|
+
stripAutoDerivedFieldBindings,
|
|
23
|
+
templateInterpolationBody
|
|
24
|
+
} from "./packager-tool-e8td7b01.js";
|
|
19
25
|
|
|
20
|
-
// ../../node_modules/@uipath/flow-converter/dist/chunk-
|
|
26
|
+
// ../../node_modules/@uipath/flow-converter/dist/chunk-KX2HWNFV.js
|
|
27
|
+
init_esm_shims();
|
|
28
|
+
var ITERATOR_FIELDS = [
|
|
29
|
+
{ member: "currentItem", field: "item", type: "any" },
|
|
30
|
+
{ member: "currentIteration", field: "loopCounter", type: "number" }
|
|
31
|
+
];
|
|
32
|
+
init_esm_shims();
|
|
33
|
+
var VARS_REGEX = new RegExp(`\\${VARS_PREFIX}\\b`, "g");
|
|
34
|
+
var METADATA_REGEX = new RegExp(`\\${METADATA_PREFIX}\\b`, "g");
|
|
35
|
+
var SELF_REGEX = new RegExp(`\\${SELF_PREFIX}\\b`, "g");
|
|
36
|
+
var SCRIPT_TASK_NODE_TYPES = ["core.action.script"];
|
|
37
|
+
var DATA_TRANSFORM_NODE_TYPES = [
|
|
38
|
+
"core.action.transform",
|
|
39
|
+
"core.action.transform.filter",
|
|
40
|
+
"core.action.transform.map",
|
|
41
|
+
"core.action.transform.group-by"
|
|
42
|
+
];
|
|
43
|
+
function isScriptBodyPath(nodeType, path) {
|
|
44
|
+
if (!nodeType)
|
|
45
|
+
return false;
|
|
46
|
+
if (SCRIPT_TASK_NODE_TYPES.includes(nodeType)) {
|
|
47
|
+
return path.length === 2 && path[0] === "inputs" && path[1] === "script";
|
|
48
|
+
}
|
|
49
|
+
if (DATA_TRANSFORM_NODE_TYPES.includes(nodeType)) {
|
|
50
|
+
return path.length === 5 && path[0] === "inputs" && path[1] === "operations" && typeof path[2] === "number" && path[3] === "config" && path[4] === "script";
|
|
51
|
+
}
|
|
52
|
+
return false;
|
|
53
|
+
}
|
|
54
|
+
function unwrapScriptBody(value) {
|
|
55
|
+
let body;
|
|
56
|
+
if (isExpressionValue(value)) {
|
|
57
|
+
body = value.expression;
|
|
58
|
+
} else if (typeof value === "string") {
|
|
59
|
+
body = value;
|
|
60
|
+
} else {
|
|
61
|
+
return "";
|
|
62
|
+
}
|
|
63
|
+
while (body.startsWith(JS_EXPRESSION_PREFIX)) {
|
|
64
|
+
body = body.slice(JS_EXPRESSION_PREFIX.length);
|
|
65
|
+
}
|
|
66
|
+
return body;
|
|
67
|
+
}
|
|
68
|
+
function transformScriptBody(value, nodeId) {
|
|
69
|
+
if (typeof value !== "string" && !isExpressionValue(value))
|
|
70
|
+
return value;
|
|
71
|
+
return unwrapScriptBody(value).replace(VARS_REGEX, VARS_IDENTIFIER).replace(METADATA_REGEX, METADATA_IDENTIFIER).replace(SELF_REGEX, `${VARS_IDENTIFIER}.${nodeId}`);
|
|
72
|
+
}
|
|
73
|
+
function serializeTemplateInterpolations(expr) {
|
|
74
|
+
if (!expr || expr.startsWith(JS_EXPRESSION_PREFIX) || expr.startsWith("="))
|
|
75
|
+
return expr;
|
|
76
|
+
const body = templateInterpolationBody(expr);
|
|
77
|
+
return body === undefined ? expr : `${JS_EXPRESSION_PREFIX}\`${body}\``;
|
|
78
|
+
}
|
|
79
|
+
function transformExpression(expr, nodeId) {
|
|
80
|
+
if (!expr)
|
|
81
|
+
return expr;
|
|
82
|
+
expr = serializeTemplateInterpolations(expr);
|
|
83
|
+
expr = expr.replace(VARS_REGEX, VARS_IDENTIFIER).replace(METADATA_REGEX, METADATA_IDENTIFIER).replace(SELF_REGEX, `${VARS_IDENTIFIER}.${nodeId}`);
|
|
84
|
+
if (expr.startsWith(JS_EXPRESSION_PREFIX)) {
|
|
85
|
+
expr = `${JS_EXPRESSION_PREFIX}${parenthesizeObjectLiteral(expr.slice(JS_EXPRESSION_PREFIX.length))}`;
|
|
86
|
+
}
|
|
87
|
+
return expr;
|
|
88
|
+
}
|
|
89
|
+
function parenthesizeObjectLiteral(body) {
|
|
90
|
+
const trimmed = body.trim();
|
|
91
|
+
return trimmed.startsWith("{") && trimmed.endsWith("}") ? `(${trimmed})` : body;
|
|
92
|
+
}
|
|
93
|
+
function literalToJsExpressionBody(ev) {
|
|
94
|
+
const literal = ev.expression;
|
|
95
|
+
if (!literal)
|
|
96
|
+
return "";
|
|
97
|
+
switch (ev.fieldType) {
|
|
98
|
+
case "number":
|
|
99
|
+
case "boolean":
|
|
100
|
+
case "null":
|
|
101
|
+
case "array":
|
|
102
|
+
return literal;
|
|
103
|
+
case "object":
|
|
104
|
+
return `(${literal})`;
|
|
105
|
+
default:
|
|
106
|
+
return literal;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function serializeExpressionValueAsMappingSource(ev, nodeId) {
|
|
110
|
+
if (ev.type === "jsExpression" || ev.fieldType === "string") {
|
|
111
|
+
const out = serializeExpressionValue(ev, nodeId);
|
|
112
|
+
return typeof out === "string" ? out : `${JS_EXPRESSION_PREFIX}${String(out)}`;
|
|
113
|
+
}
|
|
114
|
+
return `${JS_EXPRESSION_PREFIX}${literalToJsExpressionBody(ev)}`;
|
|
115
|
+
}
|
|
116
|
+
function serializeExpressionValue(ev, nodeId) {
|
|
117
|
+
if (ev.type === "jsExpression") {
|
|
118
|
+
let body = ev.expression;
|
|
119
|
+
while (body.startsWith(JS_EXPRESSION_PREFIX)) {
|
|
120
|
+
body = body.slice(JS_EXPRESSION_PREFIX.length);
|
|
121
|
+
}
|
|
122
|
+
const transformed = body.replace(VARS_REGEX, VARS_IDENTIFIER).replace(METADATA_REGEX, METADATA_IDENTIFIER).replace(SELF_REGEX, `${VARS_IDENTIFIER}.${nodeId}`);
|
|
123
|
+
return `${JS_EXPRESSION_PREFIX}${parenthesizeObjectLiteral(transformed)}`;
|
|
124
|
+
}
|
|
125
|
+
if (ev.fieldType === "string") {
|
|
126
|
+
return transformExpression(ev.expression, nodeId);
|
|
127
|
+
}
|
|
128
|
+
return decodeLiteral(ev);
|
|
129
|
+
}
|
|
130
|
+
function serializeExpressionsInPlace(obj, nodeId, nodeType, path = []) {
|
|
131
|
+
if (obj == null || typeof obj !== "object")
|
|
132
|
+
return;
|
|
133
|
+
if (Array.isArray(obj)) {
|
|
134
|
+
for (let i = 0;i < obj.length; i++) {
|
|
135
|
+
const val = obj[i];
|
|
136
|
+
path.push(i);
|
|
137
|
+
if (isScriptBodyPath(nodeType, path)) {
|
|
138
|
+
obj[i] = transformScriptBody(val, nodeId);
|
|
139
|
+
} else if (isExpressionValue(val)) {
|
|
140
|
+
obj[i] = serializeExpressionValue(val, nodeId);
|
|
141
|
+
} else if (typeof val === "string") {
|
|
142
|
+
obj[i] = transformExpression(val, nodeId);
|
|
143
|
+
} else {
|
|
144
|
+
serializeExpressionsInPlace(val, nodeId, nodeType, path);
|
|
145
|
+
}
|
|
146
|
+
path.pop();
|
|
147
|
+
}
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const record = obj;
|
|
151
|
+
for (const key of Object.keys(record)) {
|
|
152
|
+
const val = record[key];
|
|
153
|
+
path.push(key);
|
|
154
|
+
if (isScriptBodyPath(nodeType, path)) {
|
|
155
|
+
record[key] = transformScriptBody(val, nodeId);
|
|
156
|
+
} else if (isExpressionValue(val)) {
|
|
157
|
+
record[key] = serializeExpressionValue(val, nodeId);
|
|
158
|
+
} else if (typeof val === "string") {
|
|
159
|
+
record[key] = transformExpression(val, nodeId);
|
|
160
|
+
} else {
|
|
161
|
+
serializeExpressionsInPlace(val, nodeId, nodeType, path);
|
|
162
|
+
}
|
|
163
|
+
path.pop();
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
function transformNodeExpressions(node) {
|
|
167
|
+
if (!node.data)
|
|
168
|
+
return;
|
|
169
|
+
serializeExpressionsInPlace(node.data, node.id, node.type ?? node.data.type);
|
|
170
|
+
}
|
|
171
|
+
function transformEdgeExpression(edge) {
|
|
172
|
+
if (!edge.data)
|
|
173
|
+
return;
|
|
174
|
+
serializeExpressionsInPlace(edge.data, edge.preExpansionNodeId ?? edge.source);
|
|
175
|
+
}
|
|
21
176
|
init_esm_shims();
|
|
22
177
|
var DEFAULT_AGENT_INPUT_ENCODING = "flat";
|
|
23
178
|
init_esm_shims();
|
|
@@ -111,9 +266,6 @@ init_esm_shims();
|
|
|
111
266
|
init_esm_shims();
|
|
112
267
|
init_esm_shims();
|
|
113
268
|
init_esm_shims();
|
|
114
|
-
var UNSAFE_PROPERTY_KEYS = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
|
|
115
|
-
var isUnsafeKey = (key) => UNSAFE_PROPERTY_KEYS.has(key);
|
|
116
|
-
init_esm_shims();
|
|
117
269
|
function isLabeledWrapper(val) {
|
|
118
270
|
return val != null && typeof val === "object" && !Array.isArray(val) && !isExpressionValue(val) && "value" in val;
|
|
119
271
|
}
|
|
@@ -131,6 +283,38 @@ init_esm_shims();
|
|
|
131
283
|
init_esm_shims();
|
|
132
284
|
init_esm_shims();
|
|
133
285
|
init_esm_shims();
|
|
286
|
+
init_esm_shims();
|
|
287
|
+
var MODES = /* @__PURE__ */ new Set(["text-builder", "variable", "prompt"]);
|
|
288
|
+
var asString = (raw) => typeof raw === "string" ? raw : "";
|
|
289
|
+
var isValueSourceValue = (raw) => !!raw && typeof raw === "object" && !Array.isArray(raw) && MODES.has(raw.mode);
|
|
290
|
+
function readValueSource(raw, options = {}) {
|
|
291
|
+
const { defaultMode = "prompt", legacyString = "items" } = options;
|
|
292
|
+
const empty = { mode: defaultMode, textValue: "", promptValue: "", argumentPath: "", items: [] };
|
|
293
|
+
if (isValueSourceValue(raw)) {
|
|
294
|
+
const v = raw;
|
|
295
|
+
return {
|
|
296
|
+
mode: v.mode,
|
|
297
|
+
textValue: asString(v.textValue),
|
|
298
|
+
promptValue: asString(v.promptValue),
|
|
299
|
+
argumentPath: asString(v.argumentPath),
|
|
300
|
+
items: Array.isArray(v.items) ? v.items : []
|
|
301
|
+
};
|
|
302
|
+
}
|
|
303
|
+
if (Array.isArray(raw))
|
|
304
|
+
return raw.length === 0 ? empty : { ...empty, mode: "text-builder", items: raw };
|
|
305
|
+
if (typeof raw === "string" && raw !== "") {
|
|
306
|
+
return legacyString === "promptValue" ? { ...empty, mode: "prompt", promptValue: raw } : { ...empty, mode: "text-builder", items: [raw] };
|
|
307
|
+
}
|
|
308
|
+
return empty;
|
|
309
|
+
}
|
|
310
|
+
function bindingSources(value) {
|
|
311
|
+
if (value.mode === "text-builder")
|
|
312
|
+
return value.items;
|
|
313
|
+
if (value.mode === "variable" && value.argumentPath)
|
|
314
|
+
return [value.argumentPath];
|
|
315
|
+
return [];
|
|
316
|
+
}
|
|
317
|
+
var ANALYZE_FILES_INPUT_DESCRIPTION = "Combined file attachments for Analyze Files tool";
|
|
134
318
|
var MUSTACHE_SOURCE_TOKEN_REGEX = new RegExp(String.raw`\{\{\s*\$(vars|metadata)\.(${VARIABLE_PATH_PATTERN})\s*\}\}`, "g");
|
|
135
319
|
var RAW_SOURCE_TOKEN_REGEX = new RegExp(String.raw`(?<!\w)\$(vars|metadata)\.(${VARIABLE_PATH_PATTERN})`, "g");
|
|
136
320
|
var MUSTACHE_INPUT_TOKEN_REGEX = new RegExp(String.raw`\{\{\s*\$agent\.(${VARIABLE_PATH_IDENTIFIER_PATTERN})(${VARIABLE_PATH_SELECTOR_PATTERN})\s*\}\}`, "g");
|
|
@@ -456,10 +640,7 @@ function scanSourceRefsDeep(values, encoding = DEFAULT_AGENT_INPUT_ENCODING) {
|
|
|
456
640
|
visit(value);
|
|
457
641
|
return Array.from(seen.values());
|
|
458
642
|
}
|
|
459
|
-
var LOOP_MEMBER_TO_ITERATOR_FIELD =
|
|
460
|
-
currentItem: { field: "item", type: "any" },
|
|
461
|
-
currentIteration: { field: "loopCounter", type: "number" }
|
|
462
|
-
};
|
|
643
|
+
var LOOP_MEMBER_TO_ITERATOR_FIELD = new Map(ITERATOR_FIELDS.map((f) => [f.member, f]));
|
|
463
644
|
function tryBuildLoopBinding(ref, ancestorLoopInfo) {
|
|
464
645
|
if (ref.prefix !== VARS_PREFIX)
|
|
465
646
|
return;
|
|
@@ -481,7 +662,7 @@ function tryBuildLoopBinding(ref, ancestorLoopInfo) {
|
|
|
481
662
|
binding = `${info.collectionExpr}${suffix}`;
|
|
482
663
|
type = "array";
|
|
483
664
|
} else {
|
|
484
|
-
const mapping = LOOP_MEMBER_TO_ITERATOR_FIELD
|
|
665
|
+
const mapping = LOOP_MEMBER_TO_ITERATOR_FIELD.get(member);
|
|
485
666
|
if (!mapping)
|
|
486
667
|
return;
|
|
487
668
|
binding = `=iterator[${info.index}].${mapping.field}${suffix}`;
|
|
@@ -563,7 +744,7 @@ function collectInlineAgentInputsFromAgent(agent) {
|
|
|
563
744
|
if (!properties)
|
|
564
745
|
return { refs, variables };
|
|
565
746
|
const emitLeaf = (flatName, prop) => {
|
|
566
|
-
const type = prop
|
|
747
|
+
const type = isJobAttachmentRef(prop) ? "file" : prop?.type || "string";
|
|
567
748
|
if (isSyntheticAgentInputId(flatName)) {
|
|
568
749
|
variables.push({ id: flatName, type, binding: "", description: prop?.description ?? "" });
|
|
569
750
|
return;
|
|
@@ -617,7 +798,13 @@ function collectArtifactDescendants(rootId, edges) {
|
|
|
617
798
|
return out;
|
|
618
799
|
}
|
|
619
800
|
var ANALYZEFILES_NODE_TYPE = "uipath.agent.resource.tool.builtin.analyzefiles";
|
|
620
|
-
function
|
|
801
|
+
function isArrayTypedRef(ref, resolveSourceType, ancestorLoopInfo) {
|
|
802
|
+
const loopEntry = ancestorLoopInfo ? tryBuildLoopBinding(ref, ancestorLoopInfo) : undefined;
|
|
803
|
+
if (loopEntry)
|
|
804
|
+
return loopEntry.type === "array";
|
|
805
|
+
return resolveSourceType?.(ref) === "array";
|
|
806
|
+
}
|
|
807
|
+
function mergeAnalyzeFilesInputs(variables, agentId, nodesById, edges, encoding = DEFAULT_AGENT_INPUT_ENCODING, resolveSourceType, ancestorLoopInfo) {
|
|
621
808
|
let descendants = collectArtifactDescendants(agentId, edges);
|
|
622
809
|
if (descendants.size === 0) {
|
|
623
810
|
descendants = new Set(edges.filter((e) => e.source === agentId).map((e) => e.target));
|
|
@@ -632,8 +819,9 @@ function mergeAnalyzeFilesInputs(variables, agentId, nodesById, edges, encoding
|
|
|
632
819
|
if (nodeType !== ANALYZEFILES_NODE_TYPE)
|
|
633
820
|
continue;
|
|
634
821
|
const nodeInputs = node.data?.inputs ?? node.inputs;
|
|
635
|
-
const
|
|
636
|
-
|
|
822
|
+
const attachments = readValueSource(nodeInputs?.itemsDescription);
|
|
823
|
+
const rawItems = bindingSources(attachments);
|
|
824
|
+
if (rawItems.length < 1)
|
|
637
825
|
continue;
|
|
638
826
|
const fileBindings = [];
|
|
639
827
|
for (const item of rawItems) {
|
|
@@ -643,7 +831,7 @@ function mergeAnalyzeFilesInputs(variables, agentId, nodesById, edges, encoding
|
|
|
643
831
|
const refs = extractSourceRefs(text, encoding);
|
|
644
832
|
for (const ref of refs) {
|
|
645
833
|
supersededVarIds.add(ref.flatName);
|
|
646
|
-
fileBindings.push(`$vars.${ref.path}`);
|
|
834
|
+
fileBindings.push(isArrayTypedRef(ref, resolveSourceType, ancestorLoopInfo) ? `...$vars.${ref.path}` : `$vars.${ref.path}`);
|
|
647
835
|
}
|
|
648
836
|
}
|
|
649
837
|
if (fileBindings.length === 0)
|
|
@@ -657,7 +845,7 @@ function mergeAnalyzeFilesInputs(variables, agentId, nodesById, edges, encoding
|
|
|
657
845
|
id: syntheticId,
|
|
658
846
|
type: "array",
|
|
659
847
|
binding: `=[${fileBindings.join(", ")}]`,
|
|
660
|
-
description:
|
|
848
|
+
description: ANALYZE_FILES_INPUT_DESCRIPTION,
|
|
661
849
|
schema: {
|
|
662
850
|
type: "array",
|
|
663
851
|
items: { $ref: "#/definitions/job-attachment" },
|
|
@@ -691,9 +879,9 @@ function mergeCompositeConnectorInputs(variables, agentId, nodesById, edges) {
|
|
|
691
879
|
}
|
|
692
880
|
return synthetic.length === 0 ? variables : [...variables, ...synthetic];
|
|
693
881
|
}
|
|
694
|
-
function deriveMergedAgentInputVariables(rawVariables, agentId, nodes, edges, encoding = DEFAULT_AGENT_INPUT_ENCODING) {
|
|
882
|
+
function deriveMergedAgentInputVariables(rawVariables, agentId, nodes, edges, encoding = DEFAULT_AGENT_INPUT_ENCODING, resolveSourceType) {
|
|
695
883
|
const nodesById = new Map(nodes.map((n) => [n.id, n]));
|
|
696
|
-
const withFiles = mergeAnalyzeFilesInputs(rawVariables, agentId, nodesById, edges, encoding);
|
|
884
|
+
const withFiles = mergeAnalyzeFilesInputs(rawVariables, agentId, nodesById, edges, encoding, resolveSourceType);
|
|
697
885
|
return mergeCompositeConnectorInputs(withFiles, agentId, nodesById, edges);
|
|
698
886
|
}
|
|
699
887
|
function preDeriveAgentInputDefinitions(nodes, edges, options = {}) {
|
|
@@ -716,7 +904,7 @@ function preDeriveAgentInputDefinitions(nodes, edges, options = {}) {
|
|
|
716
904
|
ancestorLoops.forEach((loop, idx) => ancestorLoopInfo.set(loop.id, { index: idx, collectionExpr: loop.collectionExpr }));
|
|
717
905
|
}
|
|
718
906
|
const { variables } = scanAgentClusterRefs(agent, nodesById, edges, resolveSourceType, ancestorLoopInfo, pruneUnreferenced, encoding);
|
|
719
|
-
const withFiles = mergeAnalyzeFilesInputs(variables, agent.id, nodesById, edges, encoding);
|
|
907
|
+
const withFiles = mergeAnalyzeFilesInputs(variables, agent.id, nodesById, edges, encoding, resolveSourceType, ancestorLoopInfo);
|
|
720
908
|
const mergedVariables = mergeCompositeConnectorInputs(withFiles, agent.id, nodesById, edges);
|
|
721
909
|
if (!agent.data.inputs)
|
|
722
910
|
agent.data.inputs = {};
|
|
@@ -731,6 +919,9 @@ function toJsExpression(binding) {
|
|
|
731
919
|
return binding;
|
|
732
920
|
if (binding.startsWith("="))
|
|
733
921
|
return `=js:${binding.slice(1)}`;
|
|
922
|
+
const template = serializeTemplateInterpolations(binding);
|
|
923
|
+
if (template !== binding)
|
|
924
|
+
return template;
|
|
734
925
|
return `=js:${binding}`;
|
|
735
926
|
}
|
|
736
927
|
function bindingExprBody(binding) {
|
|
@@ -887,6 +1078,6 @@ function rewriteStringsDeep(value, fn) {
|
|
|
887
1078
|
return value;
|
|
888
1079
|
}
|
|
889
1080
|
|
|
890
|
-
export { DEFAULT_AGENT_INPUT_ENCODING, SCHEMA_CONTAINER_MARKER, getContainerChildProps, extractAgentInputName, isCompositeConnectorValue, compositeConnectorInputKey, isSyntheticAgentInputId, collectCompositeConnectorInputs,
|
|
1081
|
+
export { ITERATOR_FIELDS, SCRIPT_TASK_NODE_TYPES, DATA_TRANSFORM_NODE_TYPES, unwrapScriptBody, serializeTemplateInterpolations, transformExpression, serializeExpressionValueAsMappingSource, serializeExpressionValue, transformNodeExpressions, transformEdgeExpression, DEFAULT_AGENT_INPUT_ENCODING, SCHEMA_CONTAINER_MARKER, getContainerChildProps, CONNECTOR_PARAM_BUCKET_KEYS, extractAgentInputName, isCompositeConnectorValue, compositeConnectorInputKey, isSyntheticAgentInputId, collectCompositeConnectorInputs, encodeFlatName, decodeFlatName, rewriteInputTokensToSource, UnresolvedAgentInputTypeError, AmbiguousAgentInputRootError, detectAmbiguousAgentInputRoot, buildAgentInputTypeResolver, canPruneAgentInputs, deriveAgentInputVariables, scanSourceRefsDeep, collectInlineAgentClusterInputs, collectInlineAgentInputsFromAgent, collectArtifactDescendants, mergeCompositeConnectorInputs, deriveMergedAgentInputVariables, preDeriveAgentInputDefinitions, buildDerivedInputDefinition, rewriteStringsDeep };
|
|
891
1082
|
|
|
892
|
-
//# debugId=
|
|
1083
|
+
//# debugId=3F34FC97A81EFC8764756E2164756E21
|