@uipath/maestro-tool 1.202.2 → 1.203.0-preview.180
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/README.md +8 -0
- package/dist/THIRD-PARTY-NOTICES.md +83 -290
- package/dist/{authoring-818595dq.js → authoring-at68vr5g.js} +7 -5
- package/dist/{authoring-6r3wx3fa.js → authoring-sh284a0x.js} +3 -3
- package/dist/{authoring-61hqf5em.js → authoring-szfy0rh1.js} +5 -5
- package/dist/{binding-service-643e69bb.js → binding-service-8a05gy4k.js} +37 -29
- package/dist/{bpmn-action-type-validator-kx36sqhe.js → bpmn-action-type-validator-8kvyvvcf.js} +2 -2
- package/dist/bpmn-binding-resolver-5scq28mc.js +145 -0
- package/dist/{bpmn-branch-y1m9f10n.js → bpmn-branch-t12a7jvf.js} +50 -44
- package/dist/bpmn-format-service-ay6jd9he.js +69 -0
- package/dist/{bpmn-refresh-service-ew545y06.js → bpmn-refresh-service-ak1ctkwg.js} +4 -4
- package/dist/{bpmn-update-metadata-service-jhahhjab.js → bpmn-update-metadata-service-hqe4edze.js} +6 -5
- package/dist/{bpmn-validate-service-6z2dj8ac.js → bpmn-validate-service-48sfy3a2.js} +3 -3
- package/dist/{case-api-4mstfkzf.js → case-api-e3fmq685.js} +6 -6
- package/dist/case-bindings-service-nswc6v0v.js +240 -0
- package/dist/case-debug-studio-web-service-58gtqznh.js +135 -0
- package/dist/case-format-service-6s5e1ckk.js +84 -0
- package/dist/{case-pack-service-v7wtb0qt.js → case-pack-service-sg435he1.js} +62 -11
- package/dist/{case-validate-service-bnpaf0zt.js → case-validate-service-7s69shsa.js} +1424 -42
- package/dist/{connector-enrichment-service-scrqnke3.js → connector-enrichment-service-9rqr3esj.js} +27 -26
- package/dist/{connector-lookup-service-hnk08t3m.js → connector-lookup-service-pencasp9.js} +5 -5
- package/dist/{connector-service-581bhxaj.js → connector-service-k4cgcv2b.js} +224 -56
- package/dist/{connector-task-spec-y2tcthz5.js → connector-task-spec-13ex0x0m.js} +27 -26
- package/dist/{conversion-FQTRFHRX-03xh3xbp.js → conversion-FQTRFHRX-0y9br7gw.js} +6 -5
- package/dist/de-FGHEJRCI-gn4cf5gh.js +2697 -0
- package/dist/de-MUJPA4EB-dpg7t2rw.js +173 -0
- package/dist/{debug-conversation-trigger-nj04k7s2.js → debug-conversation-trigger-wgzjaasj.js} +17 -14
- package/dist/{debug-http-client-c4teyma3.js → debug-http-client-7dvbwp96.js} +2 -2
- package/dist/{debug-service-m5jdyz3q.js → debug-service-8cwxhgww.js} +3 -3
- package/dist/{edge-service-vv2yfsn4.js → edge-service-szpsaezp.js} +17 -14
- package/dist/{index-yqfqxh2r.js → embedded-file-reader-0sjt4nkj.js} +96 -16641
- package/dist/{en-TBNO2WUV-rfe87pgh.js → en-BWGKA5OE-1qkvb9rn.js} +2 -2
- package/dist/en-FBPVNKFN-dqt573xn.js +138 -0
- package/dist/en-TBNO2WUV-9nan43e5.js +1936 -0
- package/dist/{enrichment-service-a65qt7y1.js → enrichment-service-7n1tf75p.js} +4 -4
- package/dist/es-7SE7HX2X-8yh1aj2y.js +173 -0
- package/dist/es-KR3ZSNMP-0cszm2n3.js +2697 -0
- package/dist/es-MX-2MYFZU7X-3rek4r73.js +173 -0
- package/dist/es-MX-XXZJGC4R-b4fbwe9d.js +2697 -0
- package/dist/first-party-service-srxaftkn.js +27 -0
- package/dist/{flow-api-vqvvs0q2.js → flow-api-4vkpbmt3.js} +7 -7
- package/dist/{flow-debug-service-vd7bdyhg.js → flow-debug-service-9tad5ckh.js} +66 -41
- package/dist/{flow-eval-node-target-mve3v55h.js → flow-eval-node-target-g222rh2e.js} +22 -15
- package/dist/flow-eval-run-api-hashjgq1.js +13 -0
- package/dist/{flow-eval-run-service-rt9kg4wx.js → flow-eval-run-service-btghb02r.js} +109 -224
- package/dist/{flow-eval-service-ededh59n.js → flow-eval-service-ma5psrsd.js} +346 -302
- package/dist/{flow-init-service-4ve9tr0t.js → flow-init-service-662zhfd3.js} +22 -18
- package/dist/{flow-io-2dd3sx38.js → flow-io-3cqz0svg.js} +16 -13
- package/dist/{flow-migrate-service-nbe6et60.js → flow-migrate-service-ehx7nmsr.js} +18 -14
- package/dist/{flow-pack-service-b2n877d8.js → flow-pack-service-a3w3489r.js} +43 -35
- package/dist/flow-validate-service-02e21w4d.js +3555 -0
- package/dist/fr-MDFKNZ4C-h4a122k9.js +173 -0
- package/dist/fr-Y6NPVODW-q5ef3htr.js +2697 -0
- package/dist/{governance-fetcher-at165287.js → governance-fetcher-7vxmap1e.js} +5 -4
- package/dist/{headless-85f2cys0.js → headless-627q5my5.js} +42909 -1756
- package/dist/{hitl-service-xn1bt80z.js → hitl-service-fn94tk6z.js} +16 -13
- package/dist/{index-hfsfzg4k.js → index-3arytfxn.js} +6 -4
- package/dist/{index-d1yqqk6q.js → index-55cym5j7.js} +6 -4
- package/dist/{index-0j6xww0f.js → index-9f94yk28.js} +3 -3
- package/dist/{index-1kgxzh8x.js → index-fz4ttsde.js} +14 -2
- package/dist/index-gvwc29bb.js +16742 -0
- package/dist/{index-mkgrn150.js → index-j1azsfr5.js} +36 -33
- package/dist/index-kmp9fmhb.js +25 -0
- package/dist/{index-938ee96p.js → index-rtg24r4x.js} +1 -1
- package/dist/index-tzccx5ym.js +2961 -0
- package/dist/{index-acd6bpqc.js → index-ymsd3pyx.js} +12 -15
- package/dist/index.js +3 -3
- package/dist/{input-reader-1wda1a2v.js → input-reader-7pzkcw6t.js} +1 -1
- package/dist/{input-reader-svafwk7x.js → input-reader-j8rvde4z.js} +1 -1
- package/dist/ja-Q5PXKJ2V-tzf2rvz2.js +2697 -0
- package/dist/ja-UTQEAP34-8e0q6swp.js +173 -0
- package/dist/known-types-8dhhqk35.js +19 -0
- package/dist/ko-AXCHW2OK-askct7f6.js +173 -0
- package/dist/ko-AYBDSRZG-am0h0m2r.js +2697 -0
- package/dist/{maestro-automate-entry-gwntzkvj.js → maestro-automate-entry-jehpbg37.js} +2 -2
- package/dist/{maestro-debug-service-dvh7qbx8.js → maestro-debug-service-xhtszkrc.js} +10 -10
- package/dist/{maestro-pack-service-fam5zdm3.js → maestro-pack-service-fkkc5g3v.js} +12 -6
- package/dist/{node-ks3095fb.js → node-p4bde6qy.js} +2344 -376
- package/dist/node-service-frvz67y3.js +83 -0
- package/dist/{node-sync-service-zwvm30qg.js → node-sync-service-wa2t7c65.js} +14 -14
- package/dist/{packager-tool-me5q0naa.js → packager-tool-095jzn8v.js} +16 -6
- package/dist/{packager-tool-y5f2qhfe.js → packager-tool-19030vpg.js} +32 -2
- package/dist/{packager-tool-gtqkcj4x.js → packager-tool-2c1rbj85.js} +310 -13
- package/dist/packager-tool-2q1mffef.js +261 -0
- package/dist/{flow-validate-service-0hxf5080.js → packager-tool-2xrng5ff.js} +1956 -3065
- package/dist/{packager-tool-8dgxmjzx.js → packager-tool-30ky51ca.js} +6 -3
- package/dist/{packager-tool-d5mjdpbf.js → packager-tool-4r35ye9r.js} +5 -4
- package/dist/packager-tool-53w8skv5.js +262 -0
- package/dist/{packager-tool-db4jm1rz.js → packager-tool-56gcg9de.js} +1 -1
- package/dist/{packager-tool-29eg86w6.js → packager-tool-6rsegsby.js} +6 -7
- package/dist/packager-tool-7msx23gd.js +13 -0
- package/dist/packager-tool-7q6z6npd.js +1937 -0
- package/dist/packager-tool-8qp60s20.js +12 -0
- package/dist/{packager-tool-s1r7krkp.js → packager-tool-9pccpz3r.js} +1 -1
- package/dist/{packager-tool-m351tkkr.js → packager-tool-c95fhhys.js} +30 -8
- package/dist/{packager-tool-kg5sxneg.js → packager-tool-cmzzh4f8.js} +72 -73
- package/dist/{packager-tool-ffvmys2r.js → packager-tool-cr0z8cbj.js} +5 -5
- package/dist/{packager-tool-8fkt71n4.js → packager-tool-cs1ec1da.js} +4 -3
- package/dist/{packager-tool-xatnrtwp.js → packager-tool-d2813z49.js} +9 -9
- package/dist/packager-tool-d88rqwk8.js +135 -0
- package/dist/{packager-tool-pm3qh1hy.js → packager-tool-dh5nppv4.js} +1 -1
- package/dist/packager-tool-dqxz5v18.js +486 -0
- package/dist/{packager-tool-r87gxwqa.js → packager-tool-e87tzg4y.js} +2 -2
- package/dist/{packager-tool-w9fd7vzs.js → packager-tool-f33sg3vr.js} +9 -9
- package/dist/{packager-tool-cj2ka9jr.js → packager-tool-fer9mdsq.js} +2 -2
- package/dist/{packager-tool-70eh7rpg.js → packager-tool-fm67whdy.js} +23 -5
- package/dist/packager-tool-fq7wtkd3.js +21012 -0
- package/dist/packager-tool-fvm2dddf.js +6297 -0
- package/dist/packager-tool-gdtpsdn7.js +342 -0
- package/dist/{packager-tool-ejyeka5x.js → packager-tool-gpwec9sp.js} +2 -2
- package/dist/{packager-tool-pap09zfh.js → packager-tool-h8x54cvx.js} +1 -1
- package/dist/{packager-tool-9vh3df76.js → packager-tool-hdmhxdch.js} +7 -7
- package/dist/packager-tool-hnyecbk6.js +88 -0
- package/dist/{packager-tool-mtbak8t4.js → packager-tool-j00gcgbs.js} +2 -2
- package/dist/packager-tool-j78fwwhq.js +16 -0
- package/dist/packager-tool-jysvpt8p.js +11 -0
- package/dist/{packager-tool-jfv7t0c8.js → packager-tool-kb554twx.js} +94 -94
- package/dist/{packager-tool-k4x5yn3p.js → packager-tool-khm7zsm8.js} +4 -1
- package/dist/packager-tool-kj0qc4f4.js +269 -0
- package/dist/{packager-tool-12636p2y.js → packager-tool-mcjjj1hk.js} +4 -4
- package/dist/{packager-tool-bftjhmqz.js → packager-tool-mfrdmqmt.js} +124 -2
- package/dist/{packager-tool-qgh5yaeh.js → packager-tool-mj89jhvb.js} +1 -1
- package/dist/{packager-tool-ve35117x.js → packager-tool-mjz4hma1.js} +5791 -176
- package/dist/packager-tool-paq9c70w.js +1332 -0
- package/dist/{packager-tool-d8v984ah.js → packager-tool-q2gwvnf5.js} +15 -56
- package/dist/{packager-tool-nmznynbj.js → packager-tool-qff6ang6.js} +1 -1
- package/dist/{packager-tool-j79gbsee.js → packager-tool-rg5pkkf0.js} +6 -6
- package/dist/{packager-tool-7309ymg1.js → packager-tool-s1466723.js} +10 -13
- package/dist/{packager-tool-54b4v7wp.js → packager-tool-te6rrpsz.js} +205 -195
- package/dist/packager-tool-vcjq9xkc.js +1895 -0
- package/dist/{packager-tool-w20r6n9v.js → packager-tool-vck7ct1e.js} +2877 -2221
- package/dist/{packager-tool-e8td7b01.js → packager-tool-vdc8r21p.js} +10328 -16610
- package/dist/{packager-tool-nxw5yzs7.js → packager-tool-vqcnvaae.js} +1 -1
- package/dist/{packager-tool-7rz102fw.js → packager-tool-wd01egnx.js} +1 -1
- package/dist/{packager-tool-gxqd24n0.js → packager-tool-wger1vt9.js} +7 -7
- package/dist/{packager-tool-a6yfnjgx.js → packager-tool-wynrdnqj.js} +1 -1
- package/dist/packager-tool-x0eamrk4.js +104577 -0
- package/dist/packager-tool-x92czn5x.js +208 -0
- package/dist/{packager-tool-am67sn1c.js → packager-tool-xtkgeccn.js} +1 -1
- package/dist/packager-tool-y59jhapb.js +10369 -0
- package/dist/{packager-tool-317z6dc1.js → packager-tool-ydg78w9z.js} +23 -23
- package/dist/{packager-tool-rr8hveb9.js → packager-tool-ygrrb1zh.js} +1 -1
- package/dist/{packager-tool-f0kd5kq4.js → packager-tool-yrsrzz1a.js} +127 -12
- package/dist/{packager-tool-d9dpx9wn.js → packager-tool-z185rq2a.js} +1 -1
- package/dist/{packager-tool-79gws1zn.js → packager-tool-z6nkdv48.js} +270 -24
- package/dist/{packager-tool-802qm7jy.js → packager-tool-zzxt99e4.js} +3 -3
- package/dist/packager-tool.js +75 -218
- package/dist/{project-artifacts-9z7atbk7.js → project-artifacts-h5cydk2n.js} +1 -1
- package/dist/{project-validator-0rkrfmj0.js → project-validator-ek97s27p.js} +1 -1
- package/dist/pt-3DIO5QWG-59b3f4bc.js +173 -0
- package/dist/pt-BR-TKHNHMET-dn6zxk1d.js +2697 -0
- package/dist/pt-BR-Y6K6XHXK-mp3hwhw1.js +173 -0
- package/dist/pt-ROXU257Y-yd80gx6s.js +2697 -0
- package/dist/{resourcesSyncService-3pajvveg.js → resourcesSyncService-7s92g1hm.js} +28 -27
- package/dist/ro-AVAWPKOO-42m6am1w.js +2697 -0
- package/dist/ro-BWR3ONRR-vzx3hy8a.js +173 -0
- package/dist/ru-GSCT4ARZ-jrxwev63.js +10 -0
- package/dist/ru-WBLQ5B2U-s4em88p0.js +10 -0
- package/dist/sdd-lookup-7h7j2h6v.js +48 -0
- package/dist/{serialization-BXU6AKAN-dk0sqx89.js → serialization-BXU6AKAN-0ghhrsja.js} +6 -5
- package/dist/{shared-utils-twgpb9ax.js → shared-utils-6z7gnnc8.js} +1 -1
- package/dist/{strict-case-rules-zxnq80zm.js → strict-case-rules-byym8cvc.js} +141 -109
- package/dist/strict-sdd-audit-v156c9e3.js +2520 -0
- package/dist/tidy-service-zyy7wxc0.js +39 -0
- package/dist/{tool-pxfafj3m.js → tool-dejjyv8m.js} +213 -51
- package/dist/{tool-td30zmyt.js → tool-v0r5qzcc.js} +106 -146
- package/dist/tool.js +3 -3
- package/dist/tr-5IIHSFW5-hw4cewew.js +173 -0
- package/dist/tr-JMIP7ZSL-fb67ft9w.js +2696 -0
- package/dist/{trigger-enrichment-service-t3wcd12r.js → trigger-enrichment-service-ak1nrz5t.js} +30 -29
- package/dist/{variable-service-2q705dsx.js → variable-service-t9gsp8xs.js} +16 -13
- package/dist/{wait-for-flow-job-sx0ht8sb.js → wait-for-flow-job-1s8ka07s.js} +7 -7
- package/dist/{xml-949787yf.js → xml-3rzcgm9z.js} +1359 -659
- package/dist/zh-CN-IFFXSEJS-tke4mzty.js +2697 -0
- package/dist/zh-CN-R2KU4U5L-tc1hat59.js +173 -0
- package/dist/zh-TW-GNKMELBF-j674515r.js +173 -0
- package/dist/zh-TW-IYBNYAMG-wcan0qpb.js +2697 -0
- package/package.json +3 -2
- package/dist/bpmn-format-service-r67afbny.js +0 -477
- package/dist/case-debug-studio-web-service-kj1797m8.js +0 -336
- package/dist/known-types-eq32py2n.js +0 -20
- package/dist/node-service-teagjd9n.js +0 -75
- package/dist/packager-tool-15bstxb6.js +0 -4192
- package/dist/packager-tool-1zpm7wts.js +0 -7217
- package/dist/packager-tool-7tjxtpfp.js +0 -106
- package/dist/packager-tool-ckhyvcn5.js +0 -58
- package/dist/packager-tool-dz506qqq.js +0 -2120
- package/dist/packager-tool-hpc2j0zw.js +0 -27
- package/dist/packager-tool-jjpc0yka.js +0 -304
- package/dist/packager-tool-xtv236p7.js +0 -73
- package/dist/strict-sdd-audit-zc0n5vj6.js +0 -1024
- package/dist/tidy-service-hc9gex0v.js +0 -36
- /package/dist/{localization-xecwjpe2.js → localization-y790z9vm.js} +0 -0
|
@@ -4,51 +4,57 @@ import {
|
|
|
4
4
|
findEvaluator,
|
|
5
5
|
getLinkedEvaluators,
|
|
6
6
|
removeEvaluatorRefFromSet
|
|
7
|
-
} from "./packager-tool-
|
|
7
|
+
} from "./packager-tool-mcjjj1hk.js";
|
|
8
8
|
import {
|
|
9
9
|
FlowAgentNodeSchemaReader,
|
|
10
10
|
findFlowNode,
|
|
11
|
+
formatTriggerIdsHint,
|
|
11
12
|
isDocumentEvalNode,
|
|
12
13
|
isNodeEvalTarget,
|
|
14
|
+
listTriggerNodeIds,
|
|
13
15
|
readNodeTargetId
|
|
14
|
-
} from "./packager-tool-
|
|
16
|
+
} from "./packager-tool-fm67whdy.js";
|
|
15
17
|
import {
|
|
16
18
|
buildDefaultCriteria,
|
|
17
19
|
buildEvaluatorConfig,
|
|
20
|
+
evaluatorTypeAliases,
|
|
21
|
+
findMatchingDefinition,
|
|
18
22
|
isRecord,
|
|
23
|
+
resolveEvalApiConfig,
|
|
24
|
+
resolveEvaluatorType,
|
|
19
25
|
slugify
|
|
20
|
-
} from "./packager-tool-
|
|
21
|
-
import
|
|
22
|
-
evaluatorTypeAliases,
|
|
23
|
-
resolveEvaluatorType
|
|
24
|
-
} from "./packager-tool-bftjhmqz.js";
|
|
26
|
+
} from "./packager-tool-mfrdmqmt.js";
|
|
27
|
+
import"./packager-tool-7msx23gd.js";
|
|
25
28
|
import {
|
|
26
29
|
FlowEvalFileStore
|
|
27
|
-
} from "./packager-tool-
|
|
28
|
-
import"./packager-tool-
|
|
29
|
-
import"./packager-tool-
|
|
30
|
-
import"./packager-tool-
|
|
31
|
-
import"./packager-tool-
|
|
30
|
+
} from "./packager-tool-ygrrb1zh.js";
|
|
31
|
+
import"./packager-tool-s1466723.js";
|
|
32
|
+
import"./packager-tool-wynrdnqj.js";
|
|
33
|
+
import"./packager-tool-te6rrpsz.js";
|
|
34
|
+
import"./packager-tool-6rsegsby.js";
|
|
35
|
+
import"./packager-tool-wd01egnx.js";
|
|
32
36
|
import"./packager-tool-2513jrxr.js";
|
|
33
|
-
import"./packager-tool-
|
|
34
|
-
import"./packager-tool-
|
|
35
|
-
import"./packager-tool-jjpc0yka.js";
|
|
37
|
+
import"./packager-tool-khm7zsm8.js";
|
|
38
|
+
import"./packager-tool-vcjq9xkc.js";
|
|
36
39
|
import"./packager-tool-nkrmjr3a.js";
|
|
37
40
|
import"./packager-tool-rs6jm14d.js";
|
|
38
41
|
import"./packager-tool-hk1gxnth.js";
|
|
39
|
-
import"./packager-tool-
|
|
40
|
-
import"./packager-tool-nxw5yzs7.js";
|
|
41
|
-
import"./packager-tool-gbgfwx8f.js";
|
|
42
|
-
import"./packager-tool-r87gxwqa.js";
|
|
42
|
+
import"./packager-tool-7q6z6npd.js";
|
|
43
43
|
import"./packager-tool-sc961w0q.js";
|
|
44
|
-
import"./packager-tool-
|
|
44
|
+
import"./packager-tool-gpwec9sp.js";
|
|
45
|
+
import"./packager-tool-vqcnvaae.js";
|
|
46
|
+
import"./packager-tool-gbgfwx8f.js";
|
|
47
|
+
import"./packager-tool-d88rqwk8.js";
|
|
48
|
+
import"./packager-tool-jysvpt8p.js";
|
|
49
|
+
import"./packager-tool-fvm2dddf.js";
|
|
45
50
|
import"./packager-tool-p79yh9ww.js";
|
|
51
|
+
import"./packager-tool-vdc8r21p.js";
|
|
46
52
|
import"./packager-tool-z83pga0z.js";
|
|
47
53
|
import"./packager-tool-6ejqwbw9.js";
|
|
48
54
|
import"./packager-tool-mcaf4ewf.js";
|
|
49
55
|
import {
|
|
50
56
|
catchError
|
|
51
|
-
} from "./packager-tool-
|
|
57
|
+
} from "./packager-tool-z6nkdv48.js";
|
|
52
58
|
import {
|
|
53
59
|
getFileSystem
|
|
54
60
|
} from "./packager-tool-0v3s8r01.js";
|
|
@@ -58,6 +64,206 @@ import {
|
|
|
58
64
|
__require
|
|
59
65
|
} from "./packager-tool-1yh8g550.js";
|
|
60
66
|
|
|
67
|
+
// ../flow-tool/src/services/flow-node-output-schema.ts
|
|
68
|
+
class FlowEvalOutputSchema {
|
|
69
|
+
fs;
|
|
70
|
+
pathResolver;
|
|
71
|
+
constructor(fs, pathResolver) {
|
|
72
|
+
this.fs = fs;
|
|
73
|
+
this.pathResolver = pathResolver;
|
|
74
|
+
}
|
|
75
|
+
async read(projectPath) {
|
|
76
|
+
const root = await this.pathResolver.resolveFlowProjectPath(projectPath);
|
|
77
|
+
const [flowError, flowFilePath] = await catchError(this.pathResolver.findFlowFile(root));
|
|
78
|
+
if (flowError || !flowFilePath) {
|
|
79
|
+
return { flowFound: false, outputs: new Map };
|
|
80
|
+
}
|
|
81
|
+
const flowContent = String(await this.fs.readFile(flowFilePath, "utf-8"));
|
|
82
|
+
return {
|
|
83
|
+
flowFound: true,
|
|
84
|
+
flowFilePath,
|
|
85
|
+
outputs: readFlowGlobalsAsOutputs(flowContent)
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function readFlowGlobalsAsOutputs(flowContent) {
|
|
90
|
+
const outputs = new Map;
|
|
91
|
+
let parsed;
|
|
92
|
+
try {
|
|
93
|
+
parsed = JSON.parse(flowContent);
|
|
94
|
+
} catch {
|
|
95
|
+
return outputs;
|
|
96
|
+
}
|
|
97
|
+
if (!isRecord(parsed))
|
|
98
|
+
return outputs;
|
|
99
|
+
const variables = isRecord(parsed.variables) ? parsed.variables : undefined;
|
|
100
|
+
const globals = Array.isArray(variables?.globals) ? variables.globals : [];
|
|
101
|
+
for (const entry of globals) {
|
|
102
|
+
if (!isRecord(entry))
|
|
103
|
+
continue;
|
|
104
|
+
if (entry.direction !== "out")
|
|
105
|
+
continue;
|
|
106
|
+
if (typeof entry.id !== "string")
|
|
107
|
+
continue;
|
|
108
|
+
const type = typeof entry.type === "string" ? entry.type : "unknown";
|
|
109
|
+
outputs.set(entry.id, { type });
|
|
110
|
+
}
|
|
111
|
+
return outputs;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
class FlowNodeOutputSchemaReader {
|
|
115
|
+
fs;
|
|
116
|
+
pathResolver;
|
|
117
|
+
constructor(fs, pathResolver) {
|
|
118
|
+
this.fs = fs;
|
|
119
|
+
this.pathResolver = pathResolver;
|
|
120
|
+
}
|
|
121
|
+
async read(projectPath, componentId) {
|
|
122
|
+
const root = await this.pathResolver.resolveFlowProjectPath(projectPath);
|
|
123
|
+
const [flowError, flowFilePath] = await catchError(this.pathResolver.findFlowFile(root));
|
|
124
|
+
if (flowError || !flowFilePath) {
|
|
125
|
+
return { schema: undefined, nodeFound: false };
|
|
126
|
+
}
|
|
127
|
+
const flowContent = String(await this.fs.readFile(flowFilePath, "utf-8"));
|
|
128
|
+
return this.extract(flowContent, componentId);
|
|
129
|
+
}
|
|
130
|
+
extract(flowContent, componentId) {
|
|
131
|
+
return extractNodeOutputSchema(flowContent, componentId, false);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
class SimulateFlowOutputSchemaReader extends FlowNodeOutputSchemaReader {
|
|
136
|
+
extract(flowContent, componentId) {
|
|
137
|
+
const result = extractNodeOutputSchema(flowContent, componentId, true);
|
|
138
|
+
if (!result.nodeFound || result.schema === undefined) {
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
return { ...result, schema: cleanOutputSchema(result.schema) };
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function extractNodeOutputSchema(flowContent, componentId, wrapAllOutputs) {
|
|
145
|
+
let parsed;
|
|
146
|
+
try {
|
|
147
|
+
parsed = JSON.parse(flowContent);
|
|
148
|
+
} catch {
|
|
149
|
+
return { schema: undefined, nodeFound: false };
|
|
150
|
+
}
|
|
151
|
+
if (!isRecord(parsed)) {
|
|
152
|
+
return { schema: undefined, nodeFound: false };
|
|
153
|
+
}
|
|
154
|
+
const nodes = Array.isArray(parsed.nodes) ? parsed.nodes : [];
|
|
155
|
+
const node = nodes.find((n) => isRecord(n) && n.id === componentId);
|
|
156
|
+
if (!node) {
|
|
157
|
+
return { schema: undefined, nodeFound: false };
|
|
158
|
+
}
|
|
159
|
+
const nodeType = typeof node.type === "string" ? node.type : "";
|
|
160
|
+
if (nodeType.startsWith("uipath.connector.")) {
|
|
161
|
+
const schema = extractConnectorOutputSchema(node);
|
|
162
|
+
if (schema) {
|
|
163
|
+
return { schema, nodeFound: true };
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (nodeType.startsWith("uipath.agent.")) {
|
|
167
|
+
const schema = extractAgentOutputSchema(node);
|
|
168
|
+
if (schema) {
|
|
169
|
+
return { schema, nodeFound: true };
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
const outputs = isRecord(node.outputs) ? node.outputs : undefined;
|
|
173
|
+
if (outputs && Object.keys(outputs).length > 0) {
|
|
174
|
+
if (!wrapAllOutputs && "output" in outputs) {
|
|
175
|
+
return { schema: outputs.output, nodeFound: true };
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
schema: { type: "object", properties: outputs },
|
|
179
|
+
nodeFound: true
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
return { schema: undefined, nodeFound: true };
|
|
183
|
+
}
|
|
184
|
+
function extractConnectorOutputSchema(node) {
|
|
185
|
+
if (!isRecord(node.inputs))
|
|
186
|
+
return;
|
|
187
|
+
const detail = node.inputs.detail;
|
|
188
|
+
let detailObj;
|
|
189
|
+
if (typeof detail === "string") {
|
|
190
|
+
try {
|
|
191
|
+
const parsed = JSON.parse(detail);
|
|
192
|
+
if (!isRecord(parsed))
|
|
193
|
+
return;
|
|
194
|
+
detailObj = parsed;
|
|
195
|
+
} catch {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
} else if (isRecord(detail)) {
|
|
199
|
+
detailObj = detail;
|
|
200
|
+
} else {
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
const config = isRecord(detailObj.configuration) ? detailObj.configuration : undefined;
|
|
204
|
+
if (!config)
|
|
205
|
+
return;
|
|
206
|
+
const fieldsContainer = isRecord(config.fieldsContainer) ? config.fieldsContainer : undefined;
|
|
207
|
+
if (!fieldsContainer)
|
|
208
|
+
return;
|
|
209
|
+
const schema = fieldsContainer.outputJsonSchema;
|
|
210
|
+
if (!schema || !isRecord(schema))
|
|
211
|
+
return;
|
|
212
|
+
return schema;
|
|
213
|
+
}
|
|
214
|
+
function extractAgentOutputSchema(node) {
|
|
215
|
+
if (!isRecord(node.inputs))
|
|
216
|
+
return;
|
|
217
|
+
const agentOutputVariables = node.inputs.agentOutputVariables;
|
|
218
|
+
if (!Array.isArray(agentOutputVariables) || agentOutputVariables.length === 0) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
const properties = {};
|
|
222
|
+
for (const v of agentOutputVariables) {
|
|
223
|
+
if (!isRecord(v) || typeof v.id !== "string")
|
|
224
|
+
continue;
|
|
225
|
+
const type = typeof v.type === "string" ? v.type : "string";
|
|
226
|
+
if (isRecord(v.schema)) {
|
|
227
|
+
properties[v.id] = v.schema;
|
|
228
|
+
} else {
|
|
229
|
+
properties[v.id] = { type };
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
if (Object.keys(properties).length === 0)
|
|
233
|
+
return;
|
|
234
|
+
return { type: "object", properties };
|
|
235
|
+
}
|
|
236
|
+
var ANNOTATION_KEYS = new Set([
|
|
237
|
+
"title",
|
|
238
|
+
"description",
|
|
239
|
+
"default",
|
|
240
|
+
"source",
|
|
241
|
+
"var"
|
|
242
|
+
]);
|
|
243
|
+
function cleanOutputSchema(schema) {
|
|
244
|
+
const stripped = stripAnnotations(schema);
|
|
245
|
+
return unwrapOutputProperty(stripped);
|
|
246
|
+
}
|
|
247
|
+
function stripAnnotations(value) {
|
|
248
|
+
if (!isRecord(value))
|
|
249
|
+
return value;
|
|
250
|
+
const result = {};
|
|
251
|
+
for (const [k, v] of Object.entries(value)) {
|
|
252
|
+
if (ANNOTATION_KEYS.has(k))
|
|
253
|
+
continue;
|
|
254
|
+
result[k] = Array.isArray(v) ? v.map(stripAnnotations) : isRecord(v) ? stripAnnotations(v) : v;
|
|
255
|
+
}
|
|
256
|
+
return result;
|
|
257
|
+
}
|
|
258
|
+
function unwrapOutputProperty(schema) {
|
|
259
|
+
if (!isRecord(schema))
|
|
260
|
+
return schema;
|
|
261
|
+
const props = isRecord(schema.properties) ? schema.properties : undefined;
|
|
262
|
+
if (!props || !("output" in props))
|
|
263
|
+
return schema;
|
|
264
|
+
return props.output;
|
|
265
|
+
}
|
|
266
|
+
|
|
61
267
|
// ../flow-tool/src/services/flow-child-simulation-schema.ts
|
|
62
268
|
var AGENT_TOOL_NODE_TYPE_PREFIX = "uipath.agent.resource.tool.";
|
|
63
269
|
function nameMatchesId(name, id) {
|
|
@@ -78,21 +284,30 @@ class ChildSimulationSchemaReader {
|
|
|
78
284
|
this.fs = fs;
|
|
79
285
|
this.pathResolver = pathResolver;
|
|
80
286
|
}
|
|
81
|
-
async read(projectPath, parentComponentId, childComponentId
|
|
287
|
+
async read(projectPath, parentComponentId, childComponentId) {
|
|
82
288
|
const root = await this.pathResolver.resolveFlowProjectPath(projectPath);
|
|
83
289
|
const [flowError, flowFilePath] = await catchError(this.pathResolver.findFlowFile(root));
|
|
84
290
|
if (flowError || !flowFilePath) {
|
|
85
|
-
return {
|
|
291
|
+
return {
|
|
292
|
+
parentFound: false,
|
|
293
|
+
reason: "Could not find a .flow file in the project."
|
|
294
|
+
};
|
|
86
295
|
}
|
|
87
296
|
const flowContent = String(await this.fs.readFile(flowFilePath, "utf-8"));
|
|
88
297
|
let parsed;
|
|
89
298
|
try {
|
|
90
299
|
parsed = JSON.parse(flowContent);
|
|
91
300
|
} catch {
|
|
92
|
-
return {
|
|
301
|
+
return {
|
|
302
|
+
parentFound: false,
|
|
303
|
+
reason: "The .flow file contains invalid JSON."
|
|
304
|
+
};
|
|
93
305
|
}
|
|
94
306
|
if (!isRecord(parsed)) {
|
|
95
|
-
return {
|
|
307
|
+
return {
|
|
308
|
+
parentFound: false,
|
|
309
|
+
reason: "The .flow file has an unexpected format."
|
|
310
|
+
};
|
|
96
311
|
}
|
|
97
312
|
const subflows = isRecord(parsed.subflows) ? Object.values(parsed.subflows) : [];
|
|
98
313
|
const subflowNodes = subflows.flatMap((s) => isRecord(s) && Array.isArray(s.nodes) ? s.nodes : []);
|
|
@@ -117,44 +332,64 @@ class ChildSimulationSchemaReader {
|
|
|
117
332
|
case "sameSolution":
|
|
118
333
|
return this.resolveSameSolutionSchema(flowFilePath, agentKind.projectId, childComponentId);
|
|
119
334
|
case "published":
|
|
120
|
-
return this.resolvePublishedAgentSchema(agentKind.processKey, agentKind.processVersion, childComponentId
|
|
335
|
+
return this.resolvePublishedAgentSchema(agentKind.processKey, agentKind.processVersion, childComponentId);
|
|
121
336
|
case "unsupported":
|
|
122
|
-
return {
|
|
337
|
+
return {
|
|
338
|
+
parentFound: true,
|
|
339
|
+
errorDetail: `Node "${parentComponentId}" is not an agent node.`
|
|
340
|
+
};
|
|
123
341
|
}
|
|
124
342
|
}
|
|
125
343
|
async resolveSameSolutionSchema(flowFilePath, projectId, childComponentId) {
|
|
126
344
|
if (/[/\\.]/.test(projectId)) {
|
|
127
|
-
return {
|
|
345
|
+
return {
|
|
346
|
+
parentFound: true,
|
|
347
|
+
errorDetail: `Project id "${projectId}" contains path separators.`
|
|
348
|
+
};
|
|
128
349
|
}
|
|
129
350
|
const agentJsonPath = this.fs.path.join(this.fs.path.dirname(flowFilePath), projectId, "agent.json");
|
|
130
351
|
const [readError, raw] = await catchError(this.fs.readFile(agentJsonPath, "utf-8"));
|
|
131
352
|
if (readError) {
|
|
132
|
-
return {
|
|
353
|
+
return {
|
|
354
|
+
parentFound: true,
|
|
355
|
+
errorDetail: `Could not read agent.json for project "${projectId}": ${readError.message}`
|
|
356
|
+
};
|
|
133
357
|
}
|
|
134
358
|
let agent;
|
|
135
359
|
try {
|
|
136
360
|
agent = JSON.parse(String(raw));
|
|
137
361
|
} catch {
|
|
138
|
-
return {
|
|
362
|
+
return {
|
|
363
|
+
parentFound: true,
|
|
364
|
+
errorDetail: `agent.json for project "${projectId}" contains invalid JSON.`
|
|
365
|
+
};
|
|
139
366
|
}
|
|
140
367
|
if (!isRecord(agent)) {
|
|
141
|
-
return {
|
|
368
|
+
return {
|
|
369
|
+
parentFound: true,
|
|
370
|
+
errorDetail: `agent.json for project "${projectId}" has an unexpected format.`
|
|
371
|
+
};
|
|
142
372
|
}
|
|
143
373
|
const resources = Array.isArray(agent.resources) ? agent.resources : [];
|
|
144
374
|
const schema = findToolSchemaInResources(resources, childComponentId);
|
|
145
375
|
return { parentFound: true, schema };
|
|
146
376
|
}
|
|
147
|
-
async resolvePublishedAgentSchema(processKey, processVersion, childComponentId
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
377
|
+
async resolvePublishedAgentSchema(processKey, processVersion, childComponentId) {
|
|
378
|
+
const [authError, config] = await catchError(resolveEvalApiConfig());
|
|
379
|
+
if (authError) {
|
|
380
|
+
return {
|
|
381
|
+
parentFound: true,
|
|
382
|
+
errorDetail: authError.message
|
|
383
|
+
};
|
|
154
384
|
}
|
|
155
|
-
const
|
|
385
|
+
const { FlowEvalRunApi } = await import("./flow-eval-run-api-hashjgq1.js");
|
|
386
|
+
const api = new FlowEvalRunApi;
|
|
387
|
+
const [fetchError, components] = await catchError(api.getSimulatableComponents(config, processKey, processVersion));
|
|
156
388
|
if (fetchError || !components) {
|
|
157
|
-
return {
|
|
389
|
+
return {
|
|
390
|
+
parentFound: true,
|
|
391
|
+
errorDetail: fetchError ? fetchError.message : "API returned no data."
|
|
392
|
+
};
|
|
158
393
|
}
|
|
159
394
|
const match = components.find((c) => c.id === childComponentId || nameMatchesId(c.name, childComponentId));
|
|
160
395
|
if (!match?.outputSchema) {
|
|
@@ -163,50 +398,13 @@ class ChildSimulationSchemaReader {
|
|
|
163
398
|
return { parentFound: true, schema: match.outputSchema };
|
|
164
399
|
}
|
|
165
400
|
}
|
|
166
|
-
async function resolveAuthFromLogin() {
|
|
167
|
-
const { getLoginStatusAsync } = await import("./index-1kgxzh8x.js");
|
|
168
|
-
const login = await getLoginStatusAsync();
|
|
169
|
-
if (login.loginStatus !== "Logged in" || !login.baseUrl || !login.organizationId || !login.tenantId || !login.tenantName || !login.accessToken) {
|
|
170
|
-
throw new Error("Not logged in");
|
|
171
|
-
}
|
|
172
|
-
return {
|
|
173
|
-
baseUrl: login.baseUrl,
|
|
174
|
-
organizationId: login.organizationId,
|
|
175
|
-
tenantId: login.tenantId,
|
|
176
|
-
tenantName: login.tenantName,
|
|
177
|
-
authToken: login.accessToken
|
|
178
|
-
};
|
|
179
|
-
}
|
|
180
|
-
async function fetchSimulatableComponents(config, processKey, processVersion) {
|
|
181
|
-
const base = `${config.baseUrl}/${config.organizationId}/${config.tenantName}/agentsruntime_/api`;
|
|
182
|
-
const params = new URLSearchParams({ workloadType: "Agents" });
|
|
183
|
-
if (processVersion) {
|
|
184
|
-
params.set("processVersion", processVersion);
|
|
185
|
-
}
|
|
186
|
-
const url = `${base}/unifiedEvals/processes/${encodeURIComponent(processKey)}/simulatableComponents?${params.toString()}`;
|
|
187
|
-
const response = await fetch(url, {
|
|
188
|
-
method: "GET",
|
|
189
|
-
headers: {
|
|
190
|
-
Authorization: `Bearer ${config.authToken}`,
|
|
191
|
-
Accept: "application/json",
|
|
192
|
-
"X-UiPath-Internal-TenantId": config.tenantId,
|
|
193
|
-
"X-UiPath-Internal-AccountId": config.organizationId
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
if (!response.ok) {
|
|
197
|
-
throw new Error(`Simulatable components API returned ${response.status}`);
|
|
198
|
-
}
|
|
199
|
-
const data = await response.json();
|
|
200
|
-
const components = Array.isArray(data.components) ? data.components : [];
|
|
201
|
-
return components.filter((c) => isRecord(c) && typeof c.id === "string" && typeof c.name === "string" && c.isEnabled === true);
|
|
202
|
-
}
|
|
203
401
|
function isAgentNodeType(nodeType) {
|
|
204
402
|
if (!nodeType)
|
|
205
403
|
return false;
|
|
206
404
|
const lower = nodeType.toLowerCase();
|
|
207
|
-
if (lower.startsWith(
|
|
405
|
+
if (lower.startsWith(AGENT_TOOL_NODE_TYPE_PREFIX))
|
|
208
406
|
return false;
|
|
209
|
-
return lower === "agent" || lower.startsWith("uipath.agent") || lower.startsWith("uipath.core.agent");
|
|
407
|
+
return lower === "agent" || lower.startsWith("uipath.agent.") || lower === "uipath.agent" || lower === "uipath.core.agent" || lower.startsWith("uipath.core.agent.");
|
|
210
408
|
}
|
|
211
409
|
function getAgentKind(node, definitions) {
|
|
212
410
|
const nodeType = typeof node.type === "string" ? node.type : undefined;
|
|
@@ -220,14 +418,18 @@ function getAgentKind(node, definitions) {
|
|
|
220
418
|
if (projectId) {
|
|
221
419
|
return { kind: "sameSolution", projectId };
|
|
222
420
|
}
|
|
223
|
-
|
|
421
|
+
const lowerType = nodeType?.toLowerCase();
|
|
422
|
+
if (lowerType?.startsWith("uipath.agent.") || lowerType === "uipath.agent") {
|
|
224
423
|
return { kind: "inlineCanvas" };
|
|
225
424
|
}
|
|
226
|
-
if (
|
|
227
|
-
const
|
|
425
|
+
if (lowerType?.startsWith("uipath.core.agent.")) {
|
|
426
|
+
const defRecord = isRecord(definition) ? definition : undefined;
|
|
427
|
+
const defModel = isRecord(defRecord?.model) ? defRecord.model : undefined;
|
|
428
|
+
const defBindings = isRecord(defModel?.bindings) ? defModel.bindings : undefined;
|
|
429
|
+
const resourceKey = typeof defBindings?.resourceKey === "string" ? defBindings.resourceKey : undefined;
|
|
430
|
+
const processKey = resourceKey ?? nodeType?.split(".").at(-1) ?? "";
|
|
228
431
|
if (!processKey)
|
|
229
432
|
return { kind: "unsupported" };
|
|
230
|
-
const defRecord = isRecord(definition) ? definition : undefined;
|
|
231
433
|
const processVersion = typeof defRecord?.version === "string" ? defRecord.version : undefined;
|
|
232
434
|
return { kind: "published", processKey, processVersion };
|
|
233
435
|
}
|
|
@@ -257,7 +459,9 @@ function findDefinitionForNode(node, definitions) {
|
|
|
257
459
|
const nodeType = typeof node.type === "string" ? node.type : undefined;
|
|
258
460
|
if (!nodeType)
|
|
259
461
|
return;
|
|
260
|
-
|
|
462
|
+
const typeVersion = typeof node.typeVersion === "string" ? node.typeVersion : undefined;
|
|
463
|
+
const recordDefs = definitions.filter(isRecord);
|
|
464
|
+
return findMatchingDefinition(nodeType, typeVersion, recordDefs);
|
|
261
465
|
}
|
|
262
466
|
function resolveInlineCanvasSchema(parentComponentId, childComponentId, nodes, edges, definitions) {
|
|
263
467
|
const childNodeIds = new Set;
|
|
@@ -272,6 +476,7 @@ function resolveInlineCanvasSchema(parentComponentId, childComponentId, nodes, e
|
|
|
272
476
|
childNodeIds.add(target);
|
|
273
477
|
}
|
|
274
478
|
}
|
|
479
|
+
let childFound = false;
|
|
275
480
|
for (const n of nodes) {
|
|
276
481
|
if (!isRecord(n))
|
|
277
482
|
continue;
|
|
@@ -280,12 +485,19 @@ function resolveInlineCanvasSchema(parentComponentId, childComponentId, nodes, e
|
|
|
280
485
|
if (n.id !== childComponentId && !matchesComponentId(n, childComponentId)) {
|
|
281
486
|
continue;
|
|
282
487
|
}
|
|
488
|
+
childFound = true;
|
|
283
489
|
const definition = findDefinitionForNode(n, definitions);
|
|
284
490
|
const schema = extractToolOutputSchema(n, definition);
|
|
285
491
|
if (schema) {
|
|
286
492
|
return { parentFound: true, schema };
|
|
287
493
|
}
|
|
288
494
|
}
|
|
495
|
+
if (!childFound) {
|
|
496
|
+
return {
|
|
497
|
+
parentFound: true,
|
|
498
|
+
errorDetail: `No child component "${childComponentId}" is connected to "${parentComponentId}".`
|
|
499
|
+
};
|
|
500
|
+
}
|
|
289
501
|
return { parentFound: true };
|
|
290
502
|
}
|
|
291
503
|
function matchesComponentId(node, componentId) {
|
|
@@ -310,14 +522,14 @@ function extractToolOutputSchema(node, definition) {
|
|
|
310
522
|
if (output?.schema)
|
|
311
523
|
return output.schema;
|
|
312
524
|
if (Object.keys(outputs).length > 0) {
|
|
313
|
-
return { type: "object", properties: outputs };
|
|
525
|
+
return cleanOutputSchema({ type: "object", properties: outputs });
|
|
314
526
|
}
|
|
315
527
|
}
|
|
316
528
|
const inputs = isRecord(node.inputs) ? node.inputs : undefined;
|
|
317
529
|
if (inputs?.outputSchema)
|
|
318
530
|
return inputs.outputSchema;
|
|
319
531
|
if (nodeType.startsWith("uipath.connector.") || nodeType.startsWith(AGENT_TOOL_NODE_TYPE_PREFIX)) {
|
|
320
|
-
const schema =
|
|
532
|
+
const schema = extractConnectorOutputSchema2(inputs);
|
|
321
533
|
if (schema)
|
|
322
534
|
return schema;
|
|
323
535
|
}
|
|
@@ -330,13 +542,16 @@ function extractToolOutputSchema(node, definition) {
|
|
|
330
542
|
if (outputEntry)
|
|
331
543
|
return outputEntry;
|
|
332
544
|
if (Object.keys(outputDef).length > 0) {
|
|
333
|
-
return {
|
|
545
|
+
return cleanOutputSchema({
|
|
546
|
+
type: "object",
|
|
547
|
+
properties: outputDef
|
|
548
|
+
});
|
|
334
549
|
}
|
|
335
550
|
}
|
|
336
551
|
}
|
|
337
552
|
return;
|
|
338
553
|
}
|
|
339
|
-
function
|
|
554
|
+
function extractConnectorOutputSchema2(inputs) {
|
|
340
555
|
if (!inputs)
|
|
341
556
|
return;
|
|
342
557
|
const detail = inputs.detail;
|
|
@@ -638,28 +853,41 @@ class FlowEvalSetCrud {
|
|
|
638
853
|
return evalSet;
|
|
639
854
|
}
|
|
640
855
|
async resolveAgentNodeTarget(resolvedProjectPath, entryPoint) {
|
|
641
|
-
if (entryPoint === undefined
|
|
856
|
+
if (entryPoint === undefined) {
|
|
642
857
|
return;
|
|
643
858
|
}
|
|
644
|
-
const
|
|
645
|
-
if (
|
|
646
|
-
|
|
859
|
+
const flowContent = await this.readFlowContent(resolvedProjectPath);
|
|
860
|
+
if (entryPoint.includes("/") || entryPoint.includes("#")) {
|
|
861
|
+
throw new Error(`Entry point "${entryPoint}" looks like a BPMN path. The entry point is a trigger node id from the .flow file, not a path.${formatTriggerIdsHint(flowContent)} Omit --entry-point to use the flow's default trigger.`);
|
|
647
862
|
}
|
|
648
|
-
|
|
649
|
-
if (readError) {
|
|
863
|
+
if (flowContent === undefined) {
|
|
650
864
|
return;
|
|
651
865
|
}
|
|
652
|
-
const lookup = findFlowNode(
|
|
866
|
+
const lookup = findFlowNode(flowContent, entryPoint);
|
|
653
867
|
if (!lookup.flowParsed) {
|
|
654
868
|
return;
|
|
655
869
|
}
|
|
656
870
|
if (!lookup.node) {
|
|
657
|
-
throw new Error(`Entry point "${entryPoint}" does not match any node in the flow
|
|
871
|
+
throw new Error(`Entry point "${entryPoint}" does not match any node in the flow.${formatTriggerIdsHint(flowContent)} An agent node id creates a node-scoped eval set; omit --entry-point to use the flow's default trigger.`);
|
|
658
872
|
}
|
|
659
873
|
if (isDocumentEvalNode(lookup.node)) {
|
|
660
874
|
throw new Error(`Entry point "${entryPoint}" is a document node — document-scoped eval sets are not supported by the CLI yet. Create them in Studio Web, or target the flow or an agent node instead.`);
|
|
661
875
|
}
|
|
662
|
-
|
|
876
|
+
if (isNodeEvalTarget(lookup.node)) {
|
|
877
|
+
return entryPoint;
|
|
878
|
+
}
|
|
879
|
+
if (!listTriggerNodeIds(flowContent).includes(entryPoint)) {
|
|
880
|
+
throw new Error(`Entry point "${entryPoint}" is not a trigger node.${formatTriggerIdsHint(flowContent)} An agent node id creates a node-scoped eval set; omit --entry-point to use the flow's default trigger.`);
|
|
881
|
+
}
|
|
882
|
+
return;
|
|
883
|
+
}
|
|
884
|
+
async readFlowContent(resolvedProjectPath) {
|
|
885
|
+
const [findError, flowFilePath] = await catchError(this.pathResolver.findFlowFile(resolvedProjectPath));
|
|
886
|
+
if (findError || !flowFilePath) {
|
|
887
|
+
return;
|
|
888
|
+
}
|
|
889
|
+
const [readError, flowContent] = await catchError(this.fs.readFile(flowFilePath, "utf-8"));
|
|
890
|
+
return readError ? undefined : String(flowContent);
|
|
663
891
|
}
|
|
664
892
|
async remove(projectPath, idOrName) {
|
|
665
893
|
const root = await this.pathResolver.resolveEvalRoot(projectPath, false);
|
|
@@ -919,206 +1147,6 @@ class FlowEvaluatorCrud {
|
|
|
919
1147
|
}
|
|
920
1148
|
}
|
|
921
1149
|
|
|
922
|
-
// ../flow-tool/src/services/flow-node-output-schema.ts
|
|
923
|
-
class FlowEvalOutputSchema {
|
|
924
|
-
fs;
|
|
925
|
-
pathResolver;
|
|
926
|
-
constructor(fs, pathResolver) {
|
|
927
|
-
this.fs = fs;
|
|
928
|
-
this.pathResolver = pathResolver;
|
|
929
|
-
}
|
|
930
|
-
async read(projectPath) {
|
|
931
|
-
const root = await this.pathResolver.resolveFlowProjectPath(projectPath);
|
|
932
|
-
const [flowError, flowFilePath] = await catchError(this.pathResolver.findFlowFile(root));
|
|
933
|
-
if (flowError || !flowFilePath) {
|
|
934
|
-
return { flowFound: false, outputs: new Map };
|
|
935
|
-
}
|
|
936
|
-
const flowContent = String(await this.fs.readFile(flowFilePath, "utf-8"));
|
|
937
|
-
return {
|
|
938
|
-
flowFound: true,
|
|
939
|
-
flowFilePath,
|
|
940
|
-
outputs: readFlowGlobalsAsOutputs(flowContent)
|
|
941
|
-
};
|
|
942
|
-
}
|
|
943
|
-
}
|
|
944
|
-
function readFlowGlobalsAsOutputs(flowContent) {
|
|
945
|
-
const outputs = new Map;
|
|
946
|
-
let parsed;
|
|
947
|
-
try {
|
|
948
|
-
parsed = JSON.parse(flowContent);
|
|
949
|
-
} catch {
|
|
950
|
-
return outputs;
|
|
951
|
-
}
|
|
952
|
-
if (!isRecord(parsed))
|
|
953
|
-
return outputs;
|
|
954
|
-
const variables = isRecord(parsed.variables) ? parsed.variables : undefined;
|
|
955
|
-
const globals = Array.isArray(variables?.globals) ? variables.globals : [];
|
|
956
|
-
for (const entry of globals) {
|
|
957
|
-
if (!isRecord(entry))
|
|
958
|
-
continue;
|
|
959
|
-
if (entry.direction !== "out")
|
|
960
|
-
continue;
|
|
961
|
-
if (typeof entry.id !== "string")
|
|
962
|
-
continue;
|
|
963
|
-
const type = typeof entry.type === "string" ? entry.type : "unknown";
|
|
964
|
-
outputs.set(entry.id, { type });
|
|
965
|
-
}
|
|
966
|
-
return outputs;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
class FlowNodeOutputSchemaReader {
|
|
970
|
-
fs;
|
|
971
|
-
pathResolver;
|
|
972
|
-
constructor(fs, pathResolver) {
|
|
973
|
-
this.fs = fs;
|
|
974
|
-
this.pathResolver = pathResolver;
|
|
975
|
-
}
|
|
976
|
-
async read(projectPath, componentId) {
|
|
977
|
-
const root = await this.pathResolver.resolveFlowProjectPath(projectPath);
|
|
978
|
-
const [flowError, flowFilePath] = await catchError(this.pathResolver.findFlowFile(root));
|
|
979
|
-
if (flowError || !flowFilePath) {
|
|
980
|
-
return { schema: undefined, nodeFound: false };
|
|
981
|
-
}
|
|
982
|
-
const flowContent = String(await this.fs.readFile(flowFilePath, "utf-8"));
|
|
983
|
-
return this.extract(flowContent, componentId);
|
|
984
|
-
}
|
|
985
|
-
extract(flowContent, componentId) {
|
|
986
|
-
return extractNodeOutputSchema(flowContent, componentId, false);
|
|
987
|
-
}
|
|
988
|
-
}
|
|
989
|
-
|
|
990
|
-
class SimulateFlowOutputSchemaReader extends FlowNodeOutputSchemaReader {
|
|
991
|
-
extract(flowContent, componentId) {
|
|
992
|
-
const result = extractNodeOutputSchema(flowContent, componentId, true);
|
|
993
|
-
if (!result.nodeFound || result.schema === undefined) {
|
|
994
|
-
return result;
|
|
995
|
-
}
|
|
996
|
-
return { ...result, schema: cleanOutputSchema(result.schema) };
|
|
997
|
-
}
|
|
998
|
-
}
|
|
999
|
-
function extractNodeOutputSchema(flowContent, componentId, wrapAllOutputs) {
|
|
1000
|
-
let parsed;
|
|
1001
|
-
try {
|
|
1002
|
-
parsed = JSON.parse(flowContent);
|
|
1003
|
-
} catch {
|
|
1004
|
-
return { schema: undefined, nodeFound: false };
|
|
1005
|
-
}
|
|
1006
|
-
if (!isRecord(parsed)) {
|
|
1007
|
-
return { schema: undefined, nodeFound: false };
|
|
1008
|
-
}
|
|
1009
|
-
const nodes = Array.isArray(parsed.nodes) ? parsed.nodes : [];
|
|
1010
|
-
const node = nodes.find((n) => isRecord(n) && n.id === componentId);
|
|
1011
|
-
if (!node) {
|
|
1012
|
-
return { schema: undefined, nodeFound: false };
|
|
1013
|
-
}
|
|
1014
|
-
const nodeType = typeof node.type === "string" ? node.type : "";
|
|
1015
|
-
if (nodeType.startsWith("uipath.connector.")) {
|
|
1016
|
-
const schema = extractConnectorOutputSchema2(node);
|
|
1017
|
-
if (schema) {
|
|
1018
|
-
return { schema, nodeFound: true };
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
if (nodeType.startsWith("uipath.agent.")) {
|
|
1022
|
-
const schema = extractAgentOutputSchema(node);
|
|
1023
|
-
if (schema) {
|
|
1024
|
-
return { schema, nodeFound: true };
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
const outputs = isRecord(node.outputs) ? node.outputs : undefined;
|
|
1028
|
-
if (outputs && Object.keys(outputs).length > 0) {
|
|
1029
|
-
if (!wrapAllOutputs && "output" in outputs) {
|
|
1030
|
-
return { schema: outputs.output, nodeFound: true };
|
|
1031
|
-
}
|
|
1032
|
-
return {
|
|
1033
|
-
schema: { type: "object", properties: outputs },
|
|
1034
|
-
nodeFound: true
|
|
1035
|
-
};
|
|
1036
|
-
}
|
|
1037
|
-
return { schema: undefined, nodeFound: true };
|
|
1038
|
-
}
|
|
1039
|
-
function extractConnectorOutputSchema2(node) {
|
|
1040
|
-
if (!isRecord(node.inputs))
|
|
1041
|
-
return;
|
|
1042
|
-
const detail = node.inputs.detail;
|
|
1043
|
-
let detailObj;
|
|
1044
|
-
if (typeof detail === "string") {
|
|
1045
|
-
try {
|
|
1046
|
-
const parsed = JSON.parse(detail);
|
|
1047
|
-
if (!isRecord(parsed))
|
|
1048
|
-
return;
|
|
1049
|
-
detailObj = parsed;
|
|
1050
|
-
} catch {
|
|
1051
|
-
return;
|
|
1052
|
-
}
|
|
1053
|
-
} else if (isRecord(detail)) {
|
|
1054
|
-
detailObj = detail;
|
|
1055
|
-
} else {
|
|
1056
|
-
return;
|
|
1057
|
-
}
|
|
1058
|
-
const config = isRecord(detailObj.configuration) ? detailObj.configuration : undefined;
|
|
1059
|
-
if (!config)
|
|
1060
|
-
return;
|
|
1061
|
-
const fieldsContainer = isRecord(config.fieldsContainer) ? config.fieldsContainer : undefined;
|
|
1062
|
-
if (!fieldsContainer)
|
|
1063
|
-
return;
|
|
1064
|
-
const schema = fieldsContainer.outputJsonSchema;
|
|
1065
|
-
if (!schema || !isRecord(schema))
|
|
1066
|
-
return;
|
|
1067
|
-
return schema;
|
|
1068
|
-
}
|
|
1069
|
-
function extractAgentOutputSchema(node) {
|
|
1070
|
-
if (!isRecord(node.inputs))
|
|
1071
|
-
return;
|
|
1072
|
-
const agentOutputVariables = node.inputs.agentOutputVariables;
|
|
1073
|
-
if (!Array.isArray(agentOutputVariables) || agentOutputVariables.length === 0) {
|
|
1074
|
-
return;
|
|
1075
|
-
}
|
|
1076
|
-
const properties = {};
|
|
1077
|
-
for (const v of agentOutputVariables) {
|
|
1078
|
-
if (!isRecord(v) || typeof v.id !== "string")
|
|
1079
|
-
continue;
|
|
1080
|
-
const type = typeof v.type === "string" ? v.type : "string";
|
|
1081
|
-
if (isRecord(v.schema)) {
|
|
1082
|
-
properties[v.id] = v.schema;
|
|
1083
|
-
} else {
|
|
1084
|
-
properties[v.id] = { type };
|
|
1085
|
-
}
|
|
1086
|
-
}
|
|
1087
|
-
if (Object.keys(properties).length === 0)
|
|
1088
|
-
return;
|
|
1089
|
-
return { type: "object", properties };
|
|
1090
|
-
}
|
|
1091
|
-
var ANNOTATION_KEYS = new Set([
|
|
1092
|
-
"title",
|
|
1093
|
-
"description",
|
|
1094
|
-
"default",
|
|
1095
|
-
"source",
|
|
1096
|
-
"var"
|
|
1097
|
-
]);
|
|
1098
|
-
function cleanOutputSchema(schema) {
|
|
1099
|
-
const stripped = stripAnnotations(schema);
|
|
1100
|
-
return unwrapOutputProperty(stripped);
|
|
1101
|
-
}
|
|
1102
|
-
function stripAnnotations(value) {
|
|
1103
|
-
if (!isRecord(value))
|
|
1104
|
-
return value;
|
|
1105
|
-
const result = {};
|
|
1106
|
-
for (const [k, v] of Object.entries(value)) {
|
|
1107
|
-
if (ANNOTATION_KEYS.has(k))
|
|
1108
|
-
continue;
|
|
1109
|
-
result[k] = Array.isArray(v) ? v.map(stripAnnotations) : isRecord(v) ? stripAnnotations(v) : v;
|
|
1110
|
-
}
|
|
1111
|
-
return result;
|
|
1112
|
-
}
|
|
1113
|
-
function unwrapOutputProperty(schema) {
|
|
1114
|
-
if (!isRecord(schema))
|
|
1115
|
-
return schema;
|
|
1116
|
-
const props = isRecord(schema.properties) ? schema.properties : undefined;
|
|
1117
|
-
if (!props || !("output" in props))
|
|
1118
|
-
return schema;
|
|
1119
|
-
return props.output;
|
|
1120
|
-
}
|
|
1121
|
-
|
|
1122
1150
|
// ../flow-tool/src/services/flow-eval-service.ts
|
|
1123
1151
|
class FlowEvalService {
|
|
1124
1152
|
fs;
|
|
@@ -1273,7 +1301,7 @@ class FlowEvalService {
|
|
|
1273
1301
|
throw new Error(`Component "${simulation.componentId}" not found in the flow. Verify the component ID.`);
|
|
1274
1302
|
}
|
|
1275
1303
|
if (!resolved.schema) {
|
|
1276
|
-
throw new Error(`Could not auto-resolve output schema for component "${simulation.componentId}". The node has no declared outputs.`);
|
|
1304
|
+
throw new Error(`Could not auto-resolve output schema for component "${simulation.componentId}". ` + `The node has no declared outputs.`);
|
|
1277
1305
|
}
|
|
1278
1306
|
simulation = { ...simulation, outputSchema: resolved.schema };
|
|
1279
1307
|
}
|
|
@@ -1286,6 +1314,7 @@ class FlowEvalService {
|
|
|
1286
1314
|
return this.evaluations.removeSimulation(projectPath, setIdOrName, evaluationIdOrName, componentId);
|
|
1287
1315
|
}
|
|
1288
1316
|
async addChildSimulation(projectPath, setIdOrName, evaluationIdOrName, parentComponentId, childSimulation) {
|
|
1317
|
+
let warning;
|
|
1289
1318
|
if (childSimulation.outputSchema === undefined) {
|
|
1290
1319
|
const resolved = await this.childSimulationSchema.read(projectPath, parentComponentId, childSimulation.componentId);
|
|
1291
1320
|
if (resolved.schema) {
|
|
@@ -1295,15 +1324,27 @@ class FlowEvalService {
|
|
|
1295
1324
|
};
|
|
1296
1325
|
} else if (childSimulation.simulationStrategy === "Llm") {
|
|
1297
1326
|
if (!resolved.parentFound) {
|
|
1298
|
-
|
|
1327
|
+
const detail = resolved.reason ? ` ${resolved.reason}` : "";
|
|
1328
|
+
throw new Error(`Parent agent "${parentComponentId}" not found in the flow.${detail} Verify the parent component ID.`);
|
|
1329
|
+
}
|
|
1330
|
+
if (resolved.errorDetail) {
|
|
1331
|
+
throw new Error(`Could not auto-resolve output schema for "${childSimulation.componentId}" inside agent "${parentComponentId}": ${resolved.errorDetail}`);
|
|
1332
|
+
}
|
|
1333
|
+
throw new Error(`Could not auto-resolve output schema for "${childSimulation.componentId}" inside agent "${parentComponentId}". ` + `The tool has no declared outputs.`);
|
|
1334
|
+
} else if (childSimulation.simulationStrategy === "Static") {
|
|
1335
|
+
if (!resolved.parentFound) {
|
|
1336
|
+
const detail = resolved.reason ? ` ${resolved.reason}` : "";
|
|
1337
|
+
warning = `Parent agent "${parentComponentId}" not found in the flow.${detail} Mock value key validation was skipped.`;
|
|
1338
|
+
} else if (resolved.errorDetail) {
|
|
1339
|
+
warning = `Could not resolve output schema for "${childSimulation.componentId}": ${resolved.errorDetail}. ` + `Mock value key validation was skipped.`;
|
|
1299
1340
|
}
|
|
1300
|
-
throw new Error(`Could not auto-resolve output schema for "${childSimulation.componentId}" inside agent "${parentComponentId}". ` + `Check that the tool exists on the agent and, for published agents, that you are logged in (uip login).`);
|
|
1301
1341
|
}
|
|
1302
1342
|
}
|
|
1303
1343
|
if (childSimulation.simulationStrategy === "Static" && childSimulation.outputSchema !== undefined && childSimulation.mockValue !== undefined) {
|
|
1304
1344
|
validateMockValueKeys(childSimulation.mockValue, childSimulation.outputSchema, childSimulation.componentId);
|
|
1305
1345
|
}
|
|
1306
|
-
|
|
1346
|
+
const simulation = await this.evaluations.addChildSimulation(projectPath, setIdOrName, evaluationIdOrName, parentComponentId, childSimulation);
|
|
1347
|
+
return { simulation, warning };
|
|
1307
1348
|
}
|
|
1308
1349
|
async listChildSimulations(projectPath, setIdOrName, evaluationIdOrName, parentComponentId) {
|
|
1309
1350
|
const evalSet = await this.evaluations.list(projectPath, setIdOrName);
|
|
@@ -1323,6 +1364,9 @@ class FlowEvalService {
|
|
|
1323
1364
|
function validateMockValueKeys(mockValue, outputSchema, componentId) {
|
|
1324
1365
|
if (!isRecord(mockValue) || !isRecord(outputSchema))
|
|
1325
1366
|
return;
|
|
1367
|
+
if (outputSchema.additionalProperties === true || typeof outputSchema.additionalProperties === "object" && outputSchema.additionalProperties !== null) {
|
|
1368
|
+
return;
|
|
1369
|
+
}
|
|
1326
1370
|
const properties = isRecord(outputSchema.properties) ? outputSchema.properties : undefined;
|
|
1327
1371
|
if (!properties)
|
|
1328
1372
|
return;
|
|
@@ -1337,4 +1381,4 @@ export {
|
|
|
1337
1381
|
FlowEvalService
|
|
1338
1382
|
};
|
|
1339
1383
|
|
|
1340
|
-
//# debugId=
|
|
1384
|
+
//# debugId=FA484EAB0699281A64756E2164756E21
|