@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
|
@@ -9,18 +9,18 @@ import {
|
|
|
9
9
|
readFlowWorkflow,
|
|
10
10
|
validateIntSvcNode,
|
|
11
11
|
writeFlowWorkflow
|
|
12
|
-
} from "./packager-tool-
|
|
12
|
+
} from "./packager-tool-djagtpkt.js";
|
|
13
13
|
import {
|
|
14
14
|
findNearestParentUipxFile,
|
|
15
15
|
getLoginStatusAsync,
|
|
16
16
|
readSolutionManifest
|
|
17
|
-
} from "./packager-tool-
|
|
17
|
+
} from "./packager-tool-0sz8se22.js";
|
|
18
18
|
import {
|
|
19
19
|
OutputFormatter,
|
|
20
20
|
RESULTS,
|
|
21
21
|
catchError,
|
|
22
22
|
logger
|
|
23
|
-
} from "./packager-tool-
|
|
23
|
+
} from "./packager-tool-cvwr40ax.js";
|
|
24
24
|
import {
|
|
25
25
|
getFileSystem
|
|
26
26
|
} from "./packager-tool-1cb0d5e0.js";
|
|
@@ -32,14 +32,18 @@ import {
|
|
|
32
32
|
createFlowRefResolver,
|
|
33
33
|
generateNodeIdAndName,
|
|
34
34
|
getMigrationChain,
|
|
35
|
+
isInlineAgentNodeType,
|
|
35
36
|
migrateWorkflowToFloor,
|
|
36
37
|
minimumSupportedVersion,
|
|
38
|
+
operateRuntimeOptions,
|
|
39
|
+
readInlineAgentSource,
|
|
37
40
|
registerFlowMigrationsI18n,
|
|
38
41
|
resolveWorkflowRefs,
|
|
39
42
|
runtimeMigrations,
|
|
40
43
|
runtimeVersion
|
|
41
|
-
} from "./packager-tool-
|
|
44
|
+
} from "./packager-tool-gasyxww9.js";
|
|
42
45
|
import {
|
|
46
|
+
AGENT_NODE_TYPES,
|
|
43
47
|
EntryPointType,
|
|
44
48
|
ProjectType,
|
|
45
49
|
cliRules,
|
|
@@ -53,13 +57,15 @@ import {
|
|
|
53
57
|
getJsExpressionBody,
|
|
54
58
|
instance,
|
|
55
59
|
isBlockingSeverity,
|
|
60
|
+
isConversationalOrVoiceAgentNodeType,
|
|
56
61
|
isExpressionValue,
|
|
57
62
|
isStartEventNode,
|
|
63
|
+
isVoiceAgentNodeType,
|
|
58
64
|
mergeBindingResources,
|
|
59
65
|
parseWorkflowJson,
|
|
60
66
|
registerFlowSchemaI18n,
|
|
61
67
|
runRules
|
|
62
|
-
} from "./packager-tool-
|
|
68
|
+
} from "./packager-tool-78a3szsp.js";
|
|
63
69
|
|
|
64
70
|
// src/services/connector-node-types.ts
|
|
65
71
|
function isConnectorTriggerType(nodeType) {
|
|
@@ -6543,6 +6549,451 @@ function validateConnectorBindings(workflow, catalog, options = {}) {
|
|
|
6543
6549
|
return issues;
|
|
6544
6550
|
}
|
|
6545
6551
|
|
|
6552
|
+
// src/services/flow-eval-schema/prompts.ts
|
|
6553
|
+
var DEFAULT_EVALUATOR_PROMPT = `As an expert evaluator, analyze the semantic similarity of these JSON contents to determine a score from 0-100. Focus on comparing the meaning and contextual equivalence of corresponding fields, accounting for alternative valid expressions, synonyms, and reasonable variations in language while maintaining high standards for accuracy and completeness. Provide your score with a justification, explaining briefly and concisely why you gave that score.
|
|
6554
|
+
----
|
|
6555
|
+
ExpectedOutput:
|
|
6556
|
+
{{ExpectedOutput}}
|
|
6557
|
+
----
|
|
6558
|
+
ActualOutput:
|
|
6559
|
+
{{ActualOutput}}
|
|
6560
|
+
`;
|
|
6561
|
+
var DEFAULT_TRAJECTORY_EVALUATOR_PROMPT = `As an expert evaluator, determine how well the agent did on a scale of 0-100. Focus on if the simulation was successful and if the agent behaved according to the expected output accounting for alternative valid expressions, and reasonable variations in language while maintaining high standards for accuracy and completeness. Provide your score with a justification, explaining briefly and concisely why you gave that score.
|
|
6562
|
+
----
|
|
6563
|
+
UserOrSyntheticInputGivenToAgent:
|
|
6564
|
+
{{UserOrSyntheticInput}}
|
|
6565
|
+
----
|
|
6566
|
+
SimulationInstructions:
|
|
6567
|
+
{{SimulationInstructions}}
|
|
6568
|
+
----
|
|
6569
|
+
ExpectedAgentBehavior:
|
|
6570
|
+
{{ExpectedAgentBehavior}}
|
|
6571
|
+
----
|
|
6572
|
+
AgentRunHistory:
|
|
6573
|
+
{{AgentRunHistory}}
|
|
6574
|
+
`;
|
|
6575
|
+
|
|
6576
|
+
// src/services/flow-eval-schema/evaluator-fields.ts
|
|
6577
|
+
var targetOutputKeyConfigField = {
|
|
6578
|
+
key: "targetOutputKey",
|
|
6579
|
+
label: "Target Output Key",
|
|
6580
|
+
type: "targetOutputKey",
|
|
6581
|
+
required: false,
|
|
6582
|
+
description: "The key in the output to evaluate"
|
|
6583
|
+
};
|
|
6584
|
+
var caseSensitiveConfigField = {
|
|
6585
|
+
key: "caseSensitive",
|
|
6586
|
+
label: "Case Sensitive",
|
|
6587
|
+
type: "boolean",
|
|
6588
|
+
required: false,
|
|
6589
|
+
default: false,
|
|
6590
|
+
description: "If true, the comparison is case-sensitive"
|
|
6591
|
+
};
|
|
6592
|
+
var negatedConfigField = {
|
|
6593
|
+
key: "negated",
|
|
6594
|
+
label: "Negated",
|
|
6595
|
+
type: "boolean",
|
|
6596
|
+
required: false,
|
|
6597
|
+
default: false,
|
|
6598
|
+
description: "If true, the evaluation passes when the match is not found"
|
|
6599
|
+
};
|
|
6600
|
+
var expectedOutputCriteriaField = {
|
|
6601
|
+
key: "expectedOutput",
|
|
6602
|
+
label: "Expected Output",
|
|
6603
|
+
type: "object",
|
|
6604
|
+
required: false,
|
|
6605
|
+
description: "The expected output value for this evaluator"
|
|
6606
|
+
};
|
|
6607
|
+
var llmBaseConfigFields = [
|
|
6608
|
+
{
|
|
6609
|
+
key: "model",
|
|
6610
|
+
label: "Model",
|
|
6611
|
+
type: "llmModel",
|
|
6612
|
+
required: true,
|
|
6613
|
+
description: "The LLM model to use for judging"
|
|
6614
|
+
},
|
|
6615
|
+
{
|
|
6616
|
+
key: "prompt",
|
|
6617
|
+
label: "Evaluation Prompt",
|
|
6618
|
+
type: "string",
|
|
6619
|
+
required: true,
|
|
6620
|
+
default: DEFAULT_EVALUATOR_PROMPT,
|
|
6621
|
+
description: "Custom prompt template for the LLM judge"
|
|
6622
|
+
},
|
|
6623
|
+
{
|
|
6624
|
+
key: "temperature",
|
|
6625
|
+
label: "Temperature",
|
|
6626
|
+
type: "number",
|
|
6627
|
+
required: true,
|
|
6628
|
+
default: 0,
|
|
6629
|
+
min: 0,
|
|
6630
|
+
max: 2,
|
|
6631
|
+
step: 0.1,
|
|
6632
|
+
description: "Temperature for LLM generation"
|
|
6633
|
+
},
|
|
6634
|
+
{
|
|
6635
|
+
key: "maxTokens",
|
|
6636
|
+
label: "Max Tokens",
|
|
6637
|
+
type: "number",
|
|
6638
|
+
required: true,
|
|
6639
|
+
default: 8192,
|
|
6640
|
+
min: 0,
|
|
6641
|
+
max: 16384,
|
|
6642
|
+
step: 256,
|
|
6643
|
+
description: "Maximum tokens for LLM response"
|
|
6644
|
+
}
|
|
6645
|
+
];
|
|
6646
|
+
var llmTrajectoryBaseConfigFields = llmBaseConfigFields.map((field) => field.key === "prompt" ? { ...field, default: DEFAULT_TRAJECTORY_EVALUATOR_PROMPT } : field);
|
|
6647
|
+
|
|
6648
|
+
// src/services/flow-eval-schema/deterministic-evaluators.ts
|
|
6649
|
+
var DETERMINISTIC_EVALUATOR_TYPES = {
|
|
6650
|
+
"uipath-contains": {
|
|
6651
|
+
name: "Contains Text",
|
|
6652
|
+
description: "Check if output contains specific text",
|
|
6653
|
+
category: "deterministic",
|
|
6654
|
+
shortDescription: "Passes when output contains given text",
|
|
6655
|
+
configFields: [
|
|
6656
|
+
targetOutputKeyConfigField,
|
|
6657
|
+
caseSensitiveConfigField,
|
|
6658
|
+
{
|
|
6659
|
+
...negatedConfigField,
|
|
6660
|
+
label: "Negated (should NOT contain)"
|
|
6661
|
+
}
|
|
6662
|
+
],
|
|
6663
|
+
criteriaFields: [
|
|
6664
|
+
{
|
|
6665
|
+
key: "searchText",
|
|
6666
|
+
label: "Search Text",
|
|
6667
|
+
type: "string",
|
|
6668
|
+
required: false,
|
|
6669
|
+
minLength: 1,
|
|
6670
|
+
description: "The text to search for in the output"
|
|
6671
|
+
}
|
|
6672
|
+
],
|
|
6673
|
+
examples: {
|
|
6674
|
+
criteria: { searchText: "loan approved" }
|
|
6675
|
+
}
|
|
6676
|
+
},
|
|
6677
|
+
"uipath-exact-match": {
|
|
6678
|
+
name: "Exact Match",
|
|
6679
|
+
description: "Check if output exactly matches expected value",
|
|
6680
|
+
category: "deterministic",
|
|
6681
|
+
shortDescription: "Passes when output is an exact match",
|
|
6682
|
+
configFields: [
|
|
6683
|
+
targetOutputKeyConfigField,
|
|
6684
|
+
caseSensitiveConfigField,
|
|
6685
|
+
negatedConfigField
|
|
6686
|
+
],
|
|
6687
|
+
criteriaFields: [expectedOutputCriteriaField],
|
|
6688
|
+
examples: {
|
|
6689
|
+
criteria: { expectedOutput: { value: "Application approved" } }
|
|
6690
|
+
}
|
|
6691
|
+
},
|
|
6692
|
+
"uipath-json-similarity": {
|
|
6693
|
+
name: "JSON Similarity",
|
|
6694
|
+
description: "Compare JSON output similarity",
|
|
6695
|
+
category: "deterministic",
|
|
6696
|
+
shortDescription: "Passes when JSON structures are similar",
|
|
6697
|
+
configFields: [targetOutputKeyConfigField],
|
|
6698
|
+
criteriaFields: [expectedOutputCriteriaField],
|
|
6699
|
+
examples: {
|
|
6700
|
+
criteria: { expectedOutput: { status: "ok" } }
|
|
6701
|
+
}
|
|
6702
|
+
}
|
|
6703
|
+
};
|
|
6704
|
+
|
|
6705
|
+
// src/services/flow-eval-schema/llm-judge-evaluators.ts
|
|
6706
|
+
var LLM_JUDGE_EVALUATOR_TYPES = {
|
|
6707
|
+
"uipath-llm-judge-output-semantic-similarity": {
|
|
6708
|
+
name: "LLM Judge Output",
|
|
6709
|
+
description: "Use LLM to judge semantic similarity of outputs",
|
|
6710
|
+
category: "llm-judge",
|
|
6711
|
+
shortDescription: "AI judges if output semantically matches expected",
|
|
6712
|
+
configFields: [...llmBaseConfigFields, targetOutputKeyConfigField],
|
|
6713
|
+
criteriaFields: [expectedOutputCriteriaField],
|
|
6714
|
+
examples: {
|
|
6715
|
+
config: { model: "gpt-4o", temperature: 0 },
|
|
6716
|
+
criteria: {
|
|
6717
|
+
expectedOutput: {
|
|
6718
|
+
text: "The loan has been approved for the requested amount."
|
|
6719
|
+
}
|
|
6720
|
+
}
|
|
6721
|
+
}
|
|
6722
|
+
},
|
|
6723
|
+
"uipath-llm-judge-output-strict-json-similarity": {
|
|
6724
|
+
name: "LLM Judge Strict JSON",
|
|
6725
|
+
description: "Use LLM to judge strict JSON similarity",
|
|
6726
|
+
category: "llm-judge",
|
|
6727
|
+
shortDescription: "AI judges strict JSON structural match",
|
|
6728
|
+
configFields: [...llmBaseConfigFields, targetOutputKeyConfigField],
|
|
6729
|
+
criteriaFields: [expectedOutputCriteriaField],
|
|
6730
|
+
examples: {
|
|
6731
|
+
config: { model: "gpt-4o", temperature: 0 },
|
|
6732
|
+
criteria: { expectedOutput: { result: "success" } }
|
|
6733
|
+
}
|
|
6734
|
+
},
|
|
6735
|
+
"uipath-llm-judge-trajectory-similarity": {
|
|
6736
|
+
name: "LLM Judge Trajectory",
|
|
6737
|
+
description: "Use LLM to judge agent trajectory and behavior",
|
|
6738
|
+
category: "llm-judge",
|
|
6739
|
+
shortDescription: "AI judges if agent followed expected behavior",
|
|
6740
|
+
configFields: llmTrajectoryBaseConfigFields,
|
|
6741
|
+
criteriaFields: [
|
|
6742
|
+
{
|
|
6743
|
+
key: "expectedAgentBehavior",
|
|
6744
|
+
label: "Expected Agent Behavior",
|
|
6745
|
+
type: "string",
|
|
6746
|
+
required: false,
|
|
6747
|
+
description: "Description of expected agent behavior and actions"
|
|
6748
|
+
}
|
|
6749
|
+
],
|
|
6750
|
+
examples: {
|
|
6751
|
+
config: { model: "gpt-4o" },
|
|
6752
|
+
criteria: {
|
|
6753
|
+
expectedAgentBehavior: "Agent checks eligibility, then calls approval API"
|
|
6754
|
+
}
|
|
6755
|
+
}
|
|
6756
|
+
},
|
|
6757
|
+
"uipath-llm-judge-trajectory-simulation": {
|
|
6758
|
+
name: "LLM Judge Simulation",
|
|
6759
|
+
description: "Use LLM to judge simulation trajectory",
|
|
6760
|
+
category: "llm-judge",
|
|
6761
|
+
shortDescription: "AI judges simulated agent execution path",
|
|
6762
|
+
configFields: llmTrajectoryBaseConfigFields,
|
|
6763
|
+
criteriaFields: [
|
|
6764
|
+
{
|
|
6765
|
+
key: "expectedAgentBehavior",
|
|
6766
|
+
label: "Expected Agent Behavior",
|
|
6767
|
+
type: "string",
|
|
6768
|
+
required: false,
|
|
6769
|
+
description: "Description of expected agent behavior during simulation"
|
|
6770
|
+
}
|
|
6771
|
+
],
|
|
6772
|
+
examples: {
|
|
6773
|
+
config: { model: "gpt-4o" },
|
|
6774
|
+
criteria: {
|
|
6775
|
+
expectedAgentBehavior: "Agent simulates the user journey through checkout flow"
|
|
6776
|
+
}
|
|
6777
|
+
}
|
|
6778
|
+
}
|
|
6779
|
+
};
|
|
6780
|
+
|
|
6781
|
+
// src/services/flow-eval-schema/tool-call-evaluators.ts
|
|
6782
|
+
var TOOL_CALL_EVALUATOR_TYPES = {
|
|
6783
|
+
"uipath-tool-call-args": {
|
|
6784
|
+
name: "Tool Call Arguments",
|
|
6785
|
+
description: "Verify tool call arguments match expected values",
|
|
6786
|
+
category: "tool-call",
|
|
6787
|
+
shortDescription: "Checks that tools were called with correct arguments",
|
|
6788
|
+
configFields: [
|
|
6789
|
+
{
|
|
6790
|
+
key: "strict",
|
|
6791
|
+
label: "Strict Mode",
|
|
6792
|
+
type: "boolean",
|
|
6793
|
+
required: false,
|
|
6794
|
+
default: false,
|
|
6795
|
+
description: "If true, requires exact match of all tool call arguments"
|
|
6796
|
+
},
|
|
6797
|
+
{
|
|
6798
|
+
key: "subset",
|
|
6799
|
+
label: "Subset Mode",
|
|
6800
|
+
type: "boolean",
|
|
6801
|
+
required: false,
|
|
6802
|
+
default: false,
|
|
6803
|
+
description: "If true, allows actual tool calls to be a subset of expected"
|
|
6804
|
+
}
|
|
6805
|
+
],
|
|
6806
|
+
criteriaFields: [
|
|
6807
|
+
{
|
|
6808
|
+
key: "toolCalls",
|
|
6809
|
+
label: "Tool Calls",
|
|
6810
|
+
type: "toolCallArgs",
|
|
6811
|
+
required: false,
|
|
6812
|
+
description: "Expected tool calls with names and arguments"
|
|
6813
|
+
}
|
|
6814
|
+
]
|
|
6815
|
+
},
|
|
6816
|
+
"uipath-tool-call-count": {
|
|
6817
|
+
name: "Tool Call Count",
|
|
6818
|
+
description: "Verify tool call counts match expected values",
|
|
6819
|
+
category: "tool-call",
|
|
6820
|
+
shortDescription: "Checks number of times each tool was called",
|
|
6821
|
+
configFields: [
|
|
6822
|
+
{
|
|
6823
|
+
key: "strict",
|
|
6824
|
+
label: "Strict Mode",
|
|
6825
|
+
type: "boolean",
|
|
6826
|
+
required: false,
|
|
6827
|
+
default: false,
|
|
6828
|
+
description: "If true, requires exact count match"
|
|
6829
|
+
}
|
|
6830
|
+
],
|
|
6831
|
+
criteriaFields: [
|
|
6832
|
+
{
|
|
6833
|
+
key: "toolCallsCount",
|
|
6834
|
+
label: "Tool Calls Count",
|
|
6835
|
+
type: "toolCallCount",
|
|
6836
|
+
required: false,
|
|
6837
|
+
description: "Expected tool call counts with comparison operators"
|
|
6838
|
+
}
|
|
6839
|
+
]
|
|
6840
|
+
},
|
|
6841
|
+
"uipath-tool-call-order": {
|
|
6842
|
+
name: "Tool Call Order",
|
|
6843
|
+
description: "Verify tool calls occur in expected order",
|
|
6844
|
+
category: "tool-call",
|
|
6845
|
+
shortDescription: "Checks that tools were called in the right sequence",
|
|
6846
|
+
configFields: [
|
|
6847
|
+
{
|
|
6848
|
+
key: "strict",
|
|
6849
|
+
label: "Strict Mode",
|
|
6850
|
+
type: "boolean",
|
|
6851
|
+
required: false,
|
|
6852
|
+
default: false,
|
|
6853
|
+
description: "If true, requires exact order match"
|
|
6854
|
+
}
|
|
6855
|
+
],
|
|
6856
|
+
criteriaFields: [
|
|
6857
|
+
{
|
|
6858
|
+
key: "toolCallsOrder",
|
|
6859
|
+
label: "Tool Calls Order",
|
|
6860
|
+
type: "toolCallOrder",
|
|
6861
|
+
required: false,
|
|
6862
|
+
description: "Tool names in expected execution order"
|
|
6863
|
+
}
|
|
6864
|
+
]
|
|
6865
|
+
},
|
|
6866
|
+
"uipath-tool-call-output": {
|
|
6867
|
+
name: "Tool Call Output",
|
|
6868
|
+
description: "Verify tool call outputs match expected values",
|
|
6869
|
+
category: "tool-call",
|
|
6870
|
+
shortDescription: "Checks that tool outputs match expected values",
|
|
6871
|
+
configFields: [
|
|
6872
|
+
{
|
|
6873
|
+
key: "strict",
|
|
6874
|
+
label: "Strict Mode",
|
|
6875
|
+
type: "boolean",
|
|
6876
|
+
required: false,
|
|
6877
|
+
default: false,
|
|
6878
|
+
description: "If true, requires exact output match"
|
|
6879
|
+
}
|
|
6880
|
+
],
|
|
6881
|
+
criteriaFields: [
|
|
6882
|
+
{
|
|
6883
|
+
key: "toolOutputs",
|
|
6884
|
+
label: "Tool Outputs",
|
|
6885
|
+
type: "toolCallOutput",
|
|
6886
|
+
required: false,
|
|
6887
|
+
description: "Expected tool outputs with names and output values"
|
|
6888
|
+
}
|
|
6889
|
+
]
|
|
6890
|
+
}
|
|
6891
|
+
};
|
|
6892
|
+
|
|
6893
|
+
// src/services/flow-eval-schema/registry.ts
|
|
6894
|
+
var EVALUATOR_TYPE_REGISTRY = {
|
|
6895
|
+
...DETERMINISTIC_EVALUATOR_TYPES,
|
|
6896
|
+
...LLM_JUDGE_EVALUATOR_TYPES,
|
|
6897
|
+
...TOOL_CALL_EVALUATOR_TYPES
|
|
6898
|
+
};
|
|
6899
|
+
var EVALUATOR_TYPE_ALIASES = {
|
|
6900
|
+
"exact-match": "uipath-exact-match",
|
|
6901
|
+
"json-similarity": "uipath-json-similarity",
|
|
6902
|
+
contains: "uipath-contains",
|
|
6903
|
+
"llm-judge-output": "uipath-llm-judge-output-semantic-similarity",
|
|
6904
|
+
"llm-judge-strict-json": "uipath-llm-judge-output-strict-json-similarity",
|
|
6905
|
+
"llm-judge-trajectory": "uipath-llm-judge-trajectory-similarity",
|
|
6906
|
+
"llm-judge-trajectory-simulation": "uipath-llm-judge-trajectory-simulation"
|
|
6907
|
+
};
|
|
6908
|
+
|
|
6909
|
+
// src/services/flow-eval-schema/helpers.ts
|
|
6910
|
+
function evaluatorTypeAliases() {
|
|
6911
|
+
return Object.keys(EVALUATOR_TYPE_ALIASES);
|
|
6912
|
+
}
|
|
6913
|
+
function isEvaluatorTypeId(value) {
|
|
6914
|
+
return value in EVALUATOR_TYPE_REGISTRY;
|
|
6915
|
+
}
|
|
6916
|
+
function getEvaluatorTypeDefinition(typeId) {
|
|
6917
|
+
if (!isEvaluatorTypeId(typeId)) {
|
|
6918
|
+
return null;
|
|
6919
|
+
}
|
|
6920
|
+
return EVALUATOR_TYPE_REGISTRY[typeId];
|
|
6921
|
+
}
|
|
6922
|
+
function resolveEvaluatorType(type) {
|
|
6923
|
+
const resolved = EVALUATOR_TYPE_ALIASES[type] ?? type;
|
|
6924
|
+
if (!isEvaluatorTypeId(resolved)) {
|
|
6925
|
+
throw new Error(`Unknown evaluator type "${type}". Valid types: ${evaluatorTypeAliases().join(", ")}`);
|
|
6926
|
+
}
|
|
6927
|
+
return resolved;
|
|
6928
|
+
}
|
|
6929
|
+
function getDefaultConfigForEvaluatorType(typeId) {
|
|
6930
|
+
return collectFieldDefaults(EVALUATOR_TYPE_REGISTRY[typeId].configFields);
|
|
6931
|
+
}
|
|
6932
|
+
function collectFieldDefaults(fields) {
|
|
6933
|
+
const defaults = {};
|
|
6934
|
+
for (const field of fields) {
|
|
6935
|
+
if (field.default !== undefined) {
|
|
6936
|
+
defaults[field.key] = field.default;
|
|
6937
|
+
}
|
|
6938
|
+
}
|
|
6939
|
+
return defaults;
|
|
6940
|
+
}
|
|
6941
|
+
function evaluatorTypeHasConfigField(typeId, fieldKey) {
|
|
6942
|
+
return getEvaluatorTypeDefinition(typeId)?.configFields.some((field) => field.key === fieldKey) ?? false;
|
|
6943
|
+
}
|
|
6944
|
+
function evaluatorCanUseSharedExpectedOutput(typeId) {
|
|
6945
|
+
return getEvaluatorTypeDefinition(typeId)?.criteriaFields.some((field) => field.key === "expectedOutput" && field.type === "object") ?? false;
|
|
6946
|
+
}
|
|
6947
|
+
// src/services/flow-eval-utils.ts
|
|
6948
|
+
function isRecord(value) {
|
|
6949
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6950
|
+
}
|
|
6951
|
+
var UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
6952
|
+
function isUUID(value) {
|
|
6953
|
+
return UUID_RE.test(value);
|
|
6954
|
+
}
|
|
6955
|
+
function stripJsonExt(name) {
|
|
6956
|
+
return name.endsWith(".json") ? name.slice(0, -".json".length) : name;
|
|
6957
|
+
}
|
|
6958
|
+
function slugify(text) {
|
|
6959
|
+
const slug = text.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
6960
|
+
return slug || "untitled";
|
|
6961
|
+
}
|
|
6962
|
+
function getEvaluatorRef(evaluator) {
|
|
6963
|
+
return stripJsonExt(evaluator.fileName ?? `${evaluator.id}.json`);
|
|
6964
|
+
}
|
|
6965
|
+
function buildEvaluatorConfig(typeId, options) {
|
|
6966
|
+
const evaluatorConfig = {
|
|
6967
|
+
name: options.name,
|
|
6968
|
+
...getDefaultConfigForEvaluatorType(typeId)
|
|
6969
|
+
};
|
|
6970
|
+
if (evaluatorTypeHasConfigField(typeId, "targetOutputKey")) {
|
|
6971
|
+
evaluatorConfig.targetOutputKey = options.targetOutputKey ?? "*";
|
|
6972
|
+
}
|
|
6973
|
+
if (options.model !== undefined) {
|
|
6974
|
+
evaluatorConfig.model = options.model;
|
|
6975
|
+
}
|
|
6976
|
+
if (options.prompt !== undefined) {
|
|
6977
|
+
evaluatorConfig.prompt = options.prompt;
|
|
6978
|
+
}
|
|
6979
|
+
return evaluatorConfig;
|
|
6980
|
+
}
|
|
6981
|
+
function buildDefaultCriteria(evaluators, expectedOutput, searchText) {
|
|
6982
|
+
const criterias = {};
|
|
6983
|
+
for (const evaluator of evaluators) {
|
|
6984
|
+
const key = evaluator.id;
|
|
6985
|
+
if (expectedOutput !== undefined && evaluatorCanUseSharedExpectedOutput(evaluator.evaluatorTypeId)) {
|
|
6986
|
+
criterias[key] = { expectedOutput };
|
|
6987
|
+
} else if (searchText !== undefined && evaluator.evaluatorTypeId === "uipath-contains") {
|
|
6988
|
+
criterias[key] = { searchText };
|
|
6989
|
+
} else {
|
|
6990
|
+
const defaultCriteria = evaluator.evaluatorConfig.defaultEvaluationCriteria;
|
|
6991
|
+
criterias[key] = isRecord(defaultCriteria) ? defaultCriteria : null;
|
|
6992
|
+
}
|
|
6993
|
+
}
|
|
6994
|
+
return criterias;
|
|
6995
|
+
}
|
|
6996
|
+
|
|
6546
6997
|
// src/services/flow-migration-check.ts
|
|
6547
6998
|
if (!instance.isInitialized) {
|
|
6548
6999
|
instance.init({
|
|
@@ -6665,32 +7116,6 @@ class FlowEvalFileStore {
|
|
|
6665
7116
|
}
|
|
6666
7117
|
|
|
6667
7118
|
// src/services/packaging-utils.ts
|
|
6668
|
-
var AUTONOMOUS_AGENT_NODE_TYPE = "uipath.agent.autonomous";
|
|
6669
|
-
var CONVERSATIONAL_AGENT_NODE_TYPE = "uipath.agent.conversational";
|
|
6670
|
-
var INLINE_AGENT_TYPES = [
|
|
6671
|
-
AUTONOMOUS_AGENT_NODE_TYPE,
|
|
6672
|
-
CONVERSATIONAL_AGENT_NODE_TYPE
|
|
6673
|
-
];
|
|
6674
|
-
function readInlineAgentSource(node) {
|
|
6675
|
-
const candidates = [
|
|
6676
|
-
node.inputs?.source,
|
|
6677
|
-
node.model?.source,
|
|
6678
|
-
node.inputs?.agentProjectId,
|
|
6679
|
-
node.model?.agentProjectId
|
|
6680
|
-
];
|
|
6681
|
-
for (const candidate of candidates) {
|
|
6682
|
-
if (typeof candidate === "string" && candidate.length > 0) {
|
|
6683
|
-
return candidate;
|
|
6684
|
-
}
|
|
6685
|
-
}
|
|
6686
|
-
return;
|
|
6687
|
-
}
|
|
6688
|
-
function isInlineAgentNodeType(type) {
|
|
6689
|
-
return typeof type === "string" && INLINE_AGENT_TYPES.includes(type);
|
|
6690
|
-
}
|
|
6691
|
-
function isConversationalAgentNodeType(type) {
|
|
6692
|
-
return type === CONVERSATIONAL_AGENT_NODE_TYPE;
|
|
6693
|
-
}
|
|
6694
7119
|
function fileNodesToPackagingNodes(nodes) {
|
|
6695
7120
|
return nodes.map((node) => ({
|
|
6696
7121
|
id: node.id,
|
|
@@ -6702,17 +7127,17 @@ function fileNodesToPackagingNodes(nodes) {
|
|
|
6702
7127
|
...node.model ? { model: node.model } : {}
|
|
6703
7128
|
}));
|
|
6704
7129
|
}
|
|
6705
|
-
function
|
|
7130
|
+
function isRecord2(value) {
|
|
6706
7131
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6707
7132
|
}
|
|
6708
7133
|
function toResourceList(value) {
|
|
6709
7134
|
if (!Array.isArray(value))
|
|
6710
7135
|
return;
|
|
6711
|
-
const resources = value.filter(
|
|
7136
|
+
const resources = value.filter(isRecord2);
|
|
6712
7137
|
return resources.length === value.length ? resources : undefined;
|
|
6713
7138
|
}
|
|
6714
7139
|
function normalizePackagingBindingsJson(value) {
|
|
6715
|
-
if (!
|
|
7140
|
+
if (!isRecord2(value))
|
|
6716
7141
|
return;
|
|
6717
7142
|
const resources = toResourceList(value.resources);
|
|
6718
7143
|
if (!resources)
|
|
@@ -6846,7 +7271,7 @@ function buildInlineAgentDescriptors(nodes) {
|
|
|
6846
7271
|
out.push({
|
|
6847
7272
|
name: label,
|
|
6848
7273
|
agentProjectId: source,
|
|
6849
|
-
isConversational:
|
|
7274
|
+
isConversational: isConversationalOrVoiceAgentNodeType(node.type),
|
|
6850
7275
|
entryPointPath: `${source}/agent.json`
|
|
6851
7276
|
});
|
|
6852
7277
|
}
|
|
@@ -6873,7 +7298,8 @@ async function writePackagingArtifactsDetailed(fs, projectDir, projectId, packag
|
|
|
6873
7298
|
await fs.writeFile(fs.path.join(projectDir, "bindings_v2.json"), `${JSON.stringify(stagedBindingsJson, null, 2)}
|
|
6874
7299
|
`);
|
|
6875
7300
|
const mainEntryPoint = `/${bpmnFileName}#${startEventId}`;
|
|
6876
|
-
|
|
7301
|
+
const operateJson = generateOperateJson(projectId, mainEntryPoint, operateRuntimeOptions(packagingNodes));
|
|
7302
|
+
await fs.writeFile(fs.path.join(projectDir, "operate.json"), `${JSON.stringify(operateJson, null, 2)}
|
|
6877
7303
|
`);
|
|
6878
7304
|
const packageDescriptorJson = options.packageDescriptorJson ?? {
|
|
6879
7305
|
$schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
|
|
@@ -7173,6 +7599,12 @@ var addNodeToFlow = async (filePath, nodeType, options = {}) => {
|
|
|
7173
7599
|
const { id, displayName } = generateNodeIdAndName(options.label ?? manifest.display.label, existingIds);
|
|
7174
7600
|
const bindingsBefore = workflow.bindings?.length ?? 0;
|
|
7175
7601
|
const node = addNode(workflow, manifest, id, options.position ?? { x: 0, y: 0 }, options.label ?? displayName);
|
|
7602
|
+
const schema = manifest.inputDefinition;
|
|
7603
|
+
if (manifest.inputDefaults === undefined && schema?.type === "object") {
|
|
7604
|
+
for (const schemaKey of Object.keys(schema)) {
|
|
7605
|
+
delete node.inputs[schemaKey];
|
|
7606
|
+
}
|
|
7607
|
+
}
|
|
7176
7608
|
let bindingsCreated = 0;
|
|
7177
7609
|
if (isProcessNode(manifest)) {
|
|
7178
7610
|
const { nameBinding, folderBinding } = createProcessBindings(manifest);
|
|
@@ -7353,10 +7785,6 @@ if (!instance.isInitialized) {
|
|
|
7353
7785
|
});
|
|
7354
7786
|
}
|
|
7355
7787
|
registerFlowSchemaI18n(instance);
|
|
7356
|
-
var AGENT_NODE_TYPES = [
|
|
7357
|
-
"uipath.agent.autonomous",
|
|
7358
|
-
"uipath.agent.conversational"
|
|
7359
|
-
];
|
|
7360
7788
|
function extractPromptVariables(content) {
|
|
7361
7789
|
const vars = new Set;
|
|
7362
7790
|
const re = /\{\{([^}]*)\}\}/g;
|
|
@@ -7746,6 +8174,7 @@ Validating: ${absolutePath}
|
|
|
7746
8174
|
issues.push(...this.validateAgentInputBindings(workflow, hydrationDiagnoses, ""));
|
|
7747
8175
|
issues.push(...this.validateAgentPromptInputRefs(workflow, hydrationDiagnoses, ""));
|
|
7748
8176
|
issues.push(...this.validateAgentInputScopeRefs(workflow, hydrationDiagnoses, ""));
|
|
8177
|
+
issues.push(...this.validateVoiceAgentSettings(workflow, hydrationDiagnoses, ""));
|
|
7749
8178
|
issues.push(...await this.validateSolutionRegistrationAndLayout(absolutePath));
|
|
7750
8179
|
const subflows = workflow.subflows ?? {};
|
|
7751
8180
|
for (const [subflowId, entry] of Object.entries(subflows)) {
|
|
@@ -7767,6 +8196,7 @@ Validating: ${absolutePath}
|
|
|
7767
8196
|
issues.push(...this.validateAgentInputBindings(subGraph, hydrationDiagnoses, prefix));
|
|
7768
8197
|
issues.push(...this.validateAgentPromptInputRefs(subGraph, hydrationDiagnoses, prefix));
|
|
7769
8198
|
issues.push(...this.validateAgentInputScopeRefs(subGraph, hydrationDiagnoses, prefix));
|
|
8199
|
+
issues.push(...this.rejectSubflowVoiceAgents(subGraph, prefix));
|
|
7770
8200
|
}
|
|
7771
8201
|
this.enrichInlineAgentPromptIssues(issues, hydrationDiagnoses, flowDir);
|
|
7772
8202
|
return {
|
|
@@ -7852,11 +8282,24 @@ Validating: ${absolutePath}
|
|
|
7852
8282
|
if (!diag.agentJsonExists)
|
|
7853
8283
|
continue;
|
|
7854
8284
|
const [readErr, raw] = await catchError(this.fs.readFile(agentJsonPath, "utf-8"));
|
|
7855
|
-
if (readErr || !raw)
|
|
8285
|
+
if (readErr || !raw) {
|
|
8286
|
+
diag.agentJsonUnparseable = true;
|
|
7856
8287
|
continue;
|
|
8288
|
+
}
|
|
7857
8289
|
const [parseErr, agent] = await catchError(Promise.resolve(raw).then((s) => JSON.parse(s)));
|
|
7858
|
-
if (parseErr || !agent)
|
|
8290
|
+
if (parseErr || !agent) {
|
|
8291
|
+
diag.agentJsonUnparseable = true;
|
|
7859
8292
|
continue;
|
|
8293
|
+
}
|
|
8294
|
+
const settings = agent.settings;
|
|
8295
|
+
if (isVoiceAgentNodeType(node.type)) {
|
|
8296
|
+
const voiceSettings = isRecord(settings) ? settings.voice : undefined;
|
|
8297
|
+
diag.voiceSettingsPresent = isRecord(voiceSettings);
|
|
8298
|
+
if (diag.voiceSettingsPresent && inputs.voice === undefined) {
|
|
8299
|
+
inputs.voice = voiceSettings;
|
|
8300
|
+
}
|
|
8301
|
+
diag.isConversationalAgent = isRecord(agent.metadata) && agent.metadata.isConversational === true;
|
|
8302
|
+
}
|
|
7860
8303
|
const messages = agent.messages;
|
|
7861
8304
|
if (!Array.isArray(messages))
|
|
7862
8305
|
continue;
|
|
@@ -7892,7 +8335,6 @@ Validating: ${absolutePath}
|
|
|
7892
8335
|
if (Object.keys(byField).length > 0) {
|
|
7893
8336
|
diag.promptVariablesByField = byField;
|
|
7894
8337
|
}
|
|
7895
|
-
const settings = agent.settings;
|
|
7896
8338
|
if (settings && typeof settings === "object") {
|
|
7897
8339
|
const s = settings;
|
|
7898
8340
|
if (typeof s.temperature === "number" && inputs.temperature === undefined) {
|
|
@@ -7962,6 +8404,63 @@ Validating: ${absolutePath}
|
|
|
7962
8404
|
}
|
|
7963
8405
|
return issues;
|
|
7964
8406
|
}
|
|
8407
|
+
rejectSubflowVoiceAgents(graph, pathPrefix) {
|
|
8408
|
+
const issues = [];
|
|
8409
|
+
for (const node of graph.nodes) {
|
|
8410
|
+
if (!isVoiceAgentNodeType(node.type))
|
|
8411
|
+
continue;
|
|
8412
|
+
const label = node.display?.label ?? node.id;
|
|
8413
|
+
issues.push({
|
|
8414
|
+
path: `${pathPrefix}nodes[${node.id}]`,
|
|
8415
|
+
message: `Voice agent "${label}": voice agent nodes are not supported inside subflows — move it to the top-level flow.`,
|
|
8416
|
+
severity: "error"
|
|
8417
|
+
});
|
|
8418
|
+
}
|
|
8419
|
+
return issues;
|
|
8420
|
+
}
|
|
8421
|
+
validateVoiceAgentSettings(graph, diagnoses, pathPrefix) {
|
|
8422
|
+
const issues = [];
|
|
8423
|
+
for (const node of graph.nodes) {
|
|
8424
|
+
if (!isVoiceAgentNodeType(node.type))
|
|
8425
|
+
continue;
|
|
8426
|
+
const diag = diagnoses.get(node.id);
|
|
8427
|
+
if (!diag || diag.sourceLocation === "missing")
|
|
8428
|
+
continue;
|
|
8429
|
+
const label = node.display?.label ?? node.id;
|
|
8430
|
+
const agentJsonPath = diag.agentJsonPath ?? `${diag.sourceId}/agent.json`;
|
|
8431
|
+
if (!diag.agentJsonExists) {
|
|
8432
|
+
issues.push({
|
|
8433
|
+
path: `${pathPrefix}nodes[${node.id}].inputs.source`,
|
|
8434
|
+
message: `Voice agent "${label}": agent.json not found at \`${agentJsonPath}\`. A voice agent node needs its backing agent directory inside the flow project — create it with \`uip agent init "<flowDir>" --inline-in-flow --conversational\` (then add \`settings.voice\` to its agent.json) or fix \`inputs.source\`.`,
|
|
8435
|
+
severity: "error"
|
|
8436
|
+
});
|
|
8437
|
+
continue;
|
|
8438
|
+
}
|
|
8439
|
+
if (diag.agentJsonUnparseable) {
|
|
8440
|
+
issues.push({
|
|
8441
|
+
path: `${pathPrefix}nodes[${node.id}].inputs.source`,
|
|
8442
|
+
message: `Voice agent "${label}": \`${agentJsonPath}\` exists but is empty or not valid JSON. Fix the file — check for merge-conflict markers or a truncated write.`,
|
|
8443
|
+
severity: "error"
|
|
8444
|
+
});
|
|
8445
|
+
continue;
|
|
8446
|
+
}
|
|
8447
|
+
if (diag.voiceSettingsPresent === false) {
|
|
8448
|
+
issues.push({
|
|
8449
|
+
path: `${pathPrefix}nodes[${node.id}].inputs.source`,
|
|
8450
|
+
message: `Voice agent "${label}": \`${agentJsonPath}\` has no \`settings.voice\`. Add the voice settings object (model, maxTokens, temperature, persona).`,
|
|
8451
|
+
severity: "error"
|
|
8452
|
+
});
|
|
8453
|
+
}
|
|
8454
|
+
if (diag.isConversationalAgent === false) {
|
|
8455
|
+
issues.push({
|
|
8456
|
+
path: `${pathPrefix}nodes[${node.id}].inputs.source`,
|
|
8457
|
+
message: `Voice agent "${label}": \`${agentJsonPath}\` is not a conversational agent. Voice agents run on the conversational engine — set \`metadata.isConversational: true\` and \`settings.engine: "conversational-v1"\`.`,
|
|
8458
|
+
severity: "error"
|
|
8459
|
+
});
|
|
8460
|
+
}
|
|
8461
|
+
}
|
|
8462
|
+
return issues;
|
|
8463
|
+
}
|
|
7965
8464
|
buildPromptInputRefIssues(node, field, vars, declared, label, pathPrefix) {
|
|
7966
8465
|
const issues = [];
|
|
7967
8466
|
const malformed = [];
|
|
@@ -8798,6 +9297,6 @@ Validating: ${absolutePath}
|
|
|
8798
9297
|
}
|
|
8799
9298
|
}
|
|
8800
9299
|
|
|
8801
|
-
export { ensureDirectory, FlowEvalFileStore,
|
|
9300
|
+
export { ensureDirectory, FlowEvalFileStore, fileNodesToPackagingNodes, packageInlineAgents, stageInlineAgentPackageFiles, buildInlineAgentDescriptors, writePackagingArtifacts, writePackagingArtifactsDetailed, regenerateBindingsFile, NodeTypeNotFoundError, NodeTypeNotEnabledError, SourceRequiredError, listNodesInFlow, ensureProcessBindings, collectNodeBindingResourceKeys, addNodeToFlow, deleteNodeFromFlow, ERROR_SOURCE_PORT, enableErrorHandlingForErrorEdges, expandHandleIds, portMatchesTemplate, evaluatorTypeAliases, resolveEvaluatorType, isRecord, isUUID, stripJsonExt, slugify, getEvaluatorRef, buildEvaluatorConfig, buildDefaultCriteria, captureMigrationIssues, formatMigrationFailureMessage, isConnectorTriggerType, isConnectorWaitForEventType, isEventDrivenConnectorType, scanDetailForCrossNodeBindings, connectorNodeValidator, FlowValidateService };
|
|
8802
9301
|
|
|
8803
|
-
//# debugId=
|
|
9302
|
+
//# debugId=9B1959973F3B05AD64756E2164756E21
|