@uipath/flow-tool 1.204.0-preview.254 → 1.205.0-preview.256

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.
Files changed (178) hide show
  1. package/README.md +9 -9
  2. package/dist/THIRD-PARTY-NOTICES.md +36 -12
  3. package/dist/{authoring-bppe07p0.js → authoring-e1k40hyw.js} +6 -5
  4. package/dist/{binding-service-9t9gqe9c.js → binding-service-yw91615m.js} +38 -30
  5. package/dist/{connector-service-xm05bmhz.js → connector-service-ttm75a4n.js} +224 -47
  6. package/dist/de-UZI7FJDO-awjpqfz0.js +200 -0
  7. package/dist/{de-MUJPA4EB-dpg7t2rw.js → de-UZI7FJDO-mwvc4cxe.js} +29 -2
  8. package/dist/{de-FGHEJRCI-rv513mfh.js → de-WLW6KWOJ-2qnsqdtw.js} +238 -31
  9. package/dist/debug-conversation-trigger-xsm3ycqx.js +30 -0
  10. package/dist/{debug-http-client-p4kf38yt.js → debug-http-client-yqjzsnhw.js} +5 -4
  11. package/dist/{debug-service-893erynq.js → debug-service-nra3n02y.js} +6 -5
  12. package/dist/{edge-service-rms6p69f.js → edge-service-8fv0m681.js} +16 -12
  13. package/dist/{embedded-file-reader-v8c2yj2a.js → embedded-file-reader-r66242ey.js} +2 -2
  14. package/dist/en-EJCBA3LK-0wb3b1xy.js +146 -0
  15. package/dist/{en-FBPVNKFN-dqt573xn.js → en-EJCBA3LK-dtpdghgj.js} +12 -4
  16. package/dist/{en-BWGKA5OE-1qkvb9rn.js → en-M7GQYBV2-5nfmpnfz.js} +88 -6
  17. package/dist/{es-7SE7HX2X-8yh1aj2y.js → es-4UBUTCQA-m1ytpyx2.js} +29 -2
  18. package/dist/es-4UBUTCQA-t7hsackg.js +200 -0
  19. package/dist/{es-KR3ZSNMP-84zphx0x.js → es-5THCNRFN-tqwyrdgy.js} +235 -28
  20. package/dist/{es-MX-2MYFZU7X-3rek4r73.js → es-MX-5RELIXKI-9jhqtddc.js} +29 -2
  21. package/dist/es-MX-5RELIXKI-jtjbcxbb.js +200 -0
  22. package/dist/{es-MX-XXZJGC4R-2mr8jtgm.js → es-MX-TWZBRAXK-gqd9swzw.js} +237 -30
  23. package/dist/filter-engine-7ep90g7f.js +11 -0
  24. package/dist/{flow-api-kjvpsxhw.js → flow-api-sat010z1.js} +16 -10
  25. package/dist/{flow-debug-service-3wtns3k7.js → flow-debug-service-cgawm96k.js} +96 -58
  26. package/dist/{flow-eval-node-target-ee6vbq8a.js → flow-eval-node-target-dah1gmmh.js} +17 -17
  27. package/dist/flow-eval-run-api-xdygjzfv.js +13 -0
  28. package/dist/{flow-eval-run-service-0ne6bjff.js → flow-eval-run-service-03j1szf6.js} +73 -80
  29. package/dist/{flow-eval-service-kbbq3wwq.js → flow-eval-service-9j46ta9k.js} +167 -415
  30. package/dist/{flow-init-sdk-source-z9qx1zkt.js → flow-init-sdk-source-xvdvkq7d.js} +6 -5
  31. package/dist/{flow-init-service-cefvmek0.js → flow-init-service-0a4y3a46.js} +19 -15
  32. package/dist/{flow-io-ykx6eb1v.js → flow-io-1wabd32s.js} +15 -11
  33. package/dist/{flow-migrate-service-c4hcjfc8.js → flow-migrate-service-mkqpbwtv.js} +16 -12
  34. package/dist/{flow-pack-service-6wqe1mj3.js → flow-pack-service-7dj2hhyz.js} +47 -38
  35. package/dist/flow-validate-service-1ktjayjv.js +70 -0
  36. package/dist/{fr-Y6NPVODW-8vr1ja4b.js → fr-CERONSRC-edpxhbmb.js} +237 -30
  37. package/dist/{fr-MDFKNZ4C-h4a122k9.js → fr-VBM5WRC2-63z7w4mh.js} +29 -2
  38. package/dist/fr-VBM5WRC2-707ha692.js +200 -0
  39. package/dist/{governance-fetcher-fgwewrfq.js → governance-fetcher-76hxssjm.js} +7 -6
  40. package/dist/{hitl-service-0tct4x3e.js → hitl-service-vcbhd4cb.js} +15 -11
  41. package/dist/{index-aaq9rwfv.js → index-1b2je9n2.js} +1088 -233
  42. package/dist/index-d090f35d.js +66 -0
  43. package/dist/{index-yj4xk2aw.js → index-dgdnbb2g.js} +7 -5
  44. package/dist/{index-ng2f77my.js → index-fyc0k5dd.js} +985 -617
  45. package/dist/{index-tzky1ynd.js → index-hz008fep.js} +6 -5
  46. package/dist/{index-vrhcbxnk.js → index-nsn889vf.js} +6 -5
  47. package/dist/{index-2s8rmmw6.js → index-sqhbn7ew.js} +4 -4
  48. package/dist/{index-tnz5ks4t.js → index-wycgq0ff.js} +65 -2230
  49. package/dist/index.js +17 -14
  50. package/dist/init.js +19 -15
  51. package/dist/inline-entity-resolver-64pqwk86.js +45 -0
  52. package/dist/input-reader-n7kzdrev.js +12 -0
  53. package/dist/{ja-UTQEAP34-8e0q6swp.js → ja-43QL7CGO-c3q8gre9.js} +29 -2
  54. package/dist/ja-43QL7CGO-h6qfxfay.js +200 -0
  55. package/dist/{ja-Q5PXKJ2V-p4msxzjd.js → ja-U2MCNHGT-gz0ap1jk.js} +235 -28
  56. package/dist/{known-types-q6fcyq2e.js → known-types-3025scz1.js} +5 -5
  57. package/dist/ko-TLL6Z6CD-ag6gjynr.js +200 -0
  58. package/dist/{ko-AXCHW2OK-askct7f6.js → ko-TLL6Z6CD-wrt3n8a9.js} +29 -2
  59. package/dist/{ko-AYBDSRZG-41mdmsg1.js → ko-XAUYQWDR-zp81gjp4.js} +237 -30
  60. package/dist/{maestro-automate-entry-qak46eg0.js → maestro-automate-entry-6f9act3w.js} +2 -2
  61. package/dist/{node-ey7dteda.js → node-hz6cvp9d.js} +29 -15
  62. package/dist/{node-service-z8s4nm09.js → node-service-7wz8gx7h.js} +41 -30
  63. package/dist/{node-strategy-fdnkvq4a.js → node-strategy-1dmmhvf3.js} +1 -1
  64. package/dist/node-sync-service-yvyf7chw.js +61 -0
  65. package/dist/packager-tool-10vc8pq4.js +2 -0
  66. package/dist/{packager-tool-wq9k7pq8.js → packager-tool-2h15x2kb.js} +6 -6
  67. package/dist/{packager-tool-c4909mw9.js → packager-tool-2z0r1f32.js} +668 -57
  68. package/dist/packager-tool-4kr6g0zw.js +16 -0
  69. package/dist/packager-tool-4x7tzvv0.js +1176 -0
  70. package/dist/{packager-tool-d88rqwk8.js → packager-tool-6z1hsm2h.js} +13 -5
  71. package/dist/packager-tool-7hw344bt.js +107 -0
  72. package/dist/{packager-tool-fjcbc1bb.js → packager-tool-7wnxyvf9.js} +519 -437
  73. package/dist/{packager-tool-m8xtf5ej.js → packager-tool-8g5931fz.js} +7 -4
  74. package/dist/{packager-tool-h9tzz0qd.js → packager-tool-961vsbsc.js} +15 -10
  75. package/dist/packager-tool-9era57c0.js +28 -0
  76. package/dist/packager-tool-9gprvfcy.js +23 -0
  77. package/dist/packager-tool-9jxzgsxc.js +14 -0
  78. package/dist/{packager-tool-zxp4hya4.js → packager-tool-a5afh1dc.js} +34 -13
  79. package/dist/{packager-tool-02f63a08.js → packager-tool-apawc11t.js} +88 -762
  80. package/dist/{packager-tool-tf3d2y8z.js → packager-tool-aw9v0raw.js} +2 -2
  81. package/dist/packager-tool-cqtsj6yh.js +2 -0
  82. package/dist/{packager-tool-5nqhxb9e.js → packager-tool-dwd6cc01.js} +16110 -13031
  83. package/dist/{packager-tool-t605qewm.js → packager-tool-dxgrhfq5.js} +2 -2
  84. package/dist/{packager-tool-awkq26v0.js → packager-tool-e7kvq8hf.js} +5 -3
  85. package/dist/{packager-tool-m6abv2vy.js → packager-tool-fjqpf1y6.js} +6 -24
  86. package/dist/{packager-tool-3dc9gz35.js → packager-tool-frjt46rb.js} +1 -1
  87. package/dist/{packager-tool-y8egb0fa.js → packager-tool-gqq3vkgh.js} +2573 -535
  88. package/dist/{packager-tool-w5a1hhyj.js → packager-tool-hxyjn885.js} +13 -2
  89. package/dist/packager-tool-j3228zs9.js +35 -0
  90. package/dist/{packager-tool-hhy1gr2k.js → packager-tool-jgfzfqjm.js} +1 -1
  91. package/dist/{packager-tool-n4m8yrm2.js → packager-tool-kb520rm5.js} +172 -71
  92. package/dist/{packager-tool-4fhedj18.js → packager-tool-kmv2p8z4.js} +20 -8
  93. package/dist/{packager-tool-6h69pd2a.js → packager-tool-kn86394c.js} +127 -61
  94. package/dist/packager-tool-mgcz986r.js +143 -0
  95. package/dist/{packager-tool-3h2ktz6q.js → packager-tool-myhbp761.js} +11 -1
  96. package/dist/{packager-tool-2xycknte.js → packager-tool-ns9xn7zq.js} +13 -13
  97. package/dist/{packager-tool-vbfz8k7w.js → packager-tool-p8gab24q.js} +52 -32
  98. package/dist/{packager-tool-stq8800d.js → packager-tool-pacrqxv2.js} +17 -4
  99. package/dist/{packager-tool-7q6z6npd.js → packager-tool-pcvhcn2k.js} +93 -11
  100. package/dist/packager-tool-phw8ydjx.js +331 -0
  101. package/dist/{packager-tool-c7nmvv5g.js → packager-tool-q8akejne.js} +6 -4
  102. package/dist/packager-tool-qcqb9hf8.js +26 -0
  103. package/dist/{packager-tool-n89vrpex.js → packager-tool-skcjythd.js} +10907 -25608
  104. package/dist/{packager-tool-vnwq9t1v.js → packager-tool-sphnextf.js} +5 -6
  105. package/dist/{packager-tool-1ca047de.js → packager-tool-sqpesv2e.js} +12 -56
  106. package/dist/packager-tool-t7ahhaer.js +877 -0
  107. package/dist/{packager-tool-0d375dbz.js → packager-tool-thnkpqwc.js} +1802 -378
  108. package/dist/{packager-tool-peawy22c.js → packager-tool-tqjfdpda.js} +53 -8
  109. package/dist/{packager-tool-qsa2nf80.js → packager-tool-vd3rn4fj.js} +463 -327
  110. package/dist/{packager-tool-5tjzg56t.js → packager-tool-wh660fny.js} +1 -1
  111. package/dist/{packager-tool-tyg399d6.js → packager-tool-wze74wyk.js} +74 -47
  112. package/dist/{packager-tool-arbswyqr.js → packager-tool-x20684x5.js} +1 -1
  113. package/dist/packager-tool-xj0agqpk.js +11 -0
  114. package/dist/packager-tool-xk78j7dz.js +1256 -0
  115. package/dist/{packager-tool-py93409h.js → packager-tool-ymma2s85.js} +2 -2
  116. package/dist/packager-tool-z0yxfhdj.js +40 -0
  117. package/dist/packager-tool.js +13 -10
  118. package/dist/{pt-BR-TKHNHMET-sn91xyq0.js → pt-BR-GNQNAAZ2-xadharv4.js} +237 -30
  119. package/dist/{pt-BR-Y6K6XHXK-mp3hwhw1.js → pt-BR-USP2T7GD-pedn77m1.js} +29 -2
  120. package/dist/pt-BR-USP2T7GD-rppy42ym.js +200 -0
  121. package/dist/{pt-3DIO5QWG-59b3f4bc.js → pt-RMIAKZB4-67enhx3m.js} +29 -2
  122. package/dist/pt-RMIAKZB4-t80exmp7.js +200 -0
  123. package/dist/{pt-ROXU257Y-2f6bxev4.js → pt-TO2DARY2-ftcce1bv.js} +237 -30
  124. package/dist/ro-GHOBYW2S-4zevc9dy.js +200 -0
  125. package/dist/{ro-BWR3ONRR-vzx3hy8a.js → ro-GHOBYW2S-mhnqsgaa.js} +29 -2
  126. package/dist/{ro-AVAWPKOO-b89pw79r.js → ro-WUYJV6OW-a8d9qy1n.js} +235 -28
  127. package/dist/ru-WBLQ5B2U-dpqvtfwr.js +10 -0
  128. package/dist/services/connector-request-buckets.d.ts +1 -0
  129. package/dist/services/flow-eval-file-store.d.ts +1 -11
  130. package/dist/services/flow-eval-utils.d.ts +1 -32
  131. package/dist/services/flow-validate-service.d.ts +51 -0
  132. package/dist/services/inline-entity-resolver.d.ts +22 -0
  133. package/dist/services/node-service.d.ts +21 -1
  134. package/dist/services/packaging-utils.d.ts +15 -2
  135. package/dist/{shared-utils-pnbvyyb2.js → shared-utils-tqnx96mg.js} +4 -3
  136. package/dist/solution-auth-8qz5pw7z.js +14 -0
  137. package/dist/solution-discovery-vqravtkh.js +44 -0
  138. package/dist/{tidy-service-chs0s9pw.js → tidy-service-tqjea6g2.js} +143 -39
  139. package/dist/tool.js +17 -14
  140. package/dist/{tr-5IIHSFW5-hw4cewew.js → tr-GDTLECMM-k5fhmq13.js} +29 -2
  141. package/dist/tr-GDTLECMM-kngksm3r.js +200 -0
  142. package/dist/{tr-JMIP7ZSL-c39b6pe4.js → tr-M3F5A6AU-bb0tg39m.js} +235 -28
  143. package/dist/utils/flow-io.d.ts +2 -1
  144. package/dist/validation.js +39 -33
  145. package/dist/{variable-service-6ky17hts.js → variable-service-kqnqxmx2.js} +16 -12
  146. package/dist/{wait-for-flow-job-d8m6mqb4.js → wait-for-flow-job-b0vj8828.js} +15 -12
  147. package/dist/{zh-CN-IFFXSEJS-9wm9gmrv.js → zh-CN-C5G4PC7C-ds9gkptg.js} +235 -28
  148. package/dist/zh-CN-I5D7WHBD-ge92tbx9.js +200 -0
  149. package/dist/{zh-CN-R2KU4U5L-tc1hat59.js → zh-CN-I5D7WHBD-sr5h0a98.js} +29 -2
  150. package/dist/{zh-TW-GNKMELBF-j674515r.js → zh-TW-2AVLM723-288pkc1z.js} +29 -2
  151. package/dist/zh-TW-2AVLM723-xsmap3gk.js +200 -0
  152. package/dist/{zh-TW-IYBNYAMG-8727c7v2.js → zh-TW-62HZIG6O-787kdwex.js} +234 -27
  153. package/package.json +2 -2
  154. package/dist/debug-conversation-trigger-mqzrtt1v.js +0 -44
  155. package/dist/flow-eval-run-api-byx3cacw.js +0 -13
  156. package/dist/flow-validate-service-5pbh3s4p.js +0 -64
  157. package/dist/input-reader-vhar4g0k.js +0 -11
  158. package/dist/node-sync-service-ak1wgysc.js +0 -40
  159. package/dist/packager-tool-2m06764j.js +0 -454
  160. package/dist/packager-tool-6c3szt0w.js +0 -265
  161. package/dist/packager-tool-8ak76pc3.js +0 -15
  162. package/dist/packager-tool-pz5nqg0s.js +0 -64
  163. package/dist/packager-tool-t3ysatjd.js +0 -521
  164. package/dist/packager-tool-vd6jt4n8.js +0 -208
  165. package/dist/services/flow-debug-service.d.ts +0 -320
  166. package/dist/services/flow-eval-schema/deterministic-evaluators.d.ts +0 -110
  167. package/dist/services/flow-eval-schema/evaluator-fields.d.ts +0 -66
  168. package/dist/services/flow-eval-schema/helpers.d.ts +0 -9
  169. package/dist/services/flow-eval-schema/index.d.ts +0 -4
  170. package/dist/services/flow-eval-schema/llm-judge-evaluators.d.ts +0 -174
  171. package/dist/services/flow-eval-schema/prompts.d.ts +0 -2
  172. package/dist/services/flow-eval-schema/registry.d.ts +0 -375
  173. package/dist/services/flow-eval-schema/tool-call-evaluators.d.ts +0 -93
  174. package/dist/services/flow-eval-schema/types.d.ts +0 -95
  175. package/dist/services/flow-eval-types.d.ts +0 -6
  176. package/dist/utils/write-resolved-flow.d.ts +0 -7
  177. /package/dist/{headless-45dypanh.js → headless-fw8pwyzm.js} +0 -0
  178. /package/dist/{localization-xecwjpe2.js → localization-d6gjmrsw.js} +0 -0
@@ -1,265 +0,0 @@
1
- import {
2
- ensureDirectory
3
- } from "./packager-tool-pz5nqg0s.js";
4
- import {
5
- buildInlineAgentContract,
6
- isInlineAgentNodeType,
7
- operateRuntimeOptions,
8
- readInlineAgentSource
9
- } from "./packager-tool-0d375dbz.js";
10
- import {
11
- withRuntimeProfile
12
- } from "./packager-tool-hhy1gr2k.js";
13
- import {
14
- EntryPointType,
15
- ProjectType,
16
- generateBindingsJson,
17
- generateEntryPointsJson,
18
- generateOperateJson,
19
- getBindingResources,
20
- getEntryPoints,
21
- isConversationalOrVoiceAgentNodeType,
22
- mergeBindingResources
23
- } from "./packager-tool-bhqx9kez.js";
24
- import {
25
- catchError,
26
- logger
27
- } from "./packager-tool-02f63a08.js";
28
-
29
- // src/services/packaging-utils.ts
30
- function fileNodesToPackagingNodes(nodes) {
31
- return nodes.map((node) => ({
32
- id: node.id,
33
- type: node.type,
34
- typeVersion: node.typeVersion ?? "1.0",
35
- display: node.display,
36
- inputs: node.inputs,
37
- outputs: node.outputs,
38
- ...node.model ? { model: node.model } : {}
39
- }));
40
- }
41
- function isRecord(value) {
42
- return typeof value === "object" && value !== null && !Array.isArray(value);
43
- }
44
- function toResourceList(value) {
45
- if (!Array.isArray(value))
46
- return;
47
- const resources = value.filter(isRecord);
48
- return resources.length === value.length ? resources : undefined;
49
- }
50
- function normalizePackagingBindingsJson(value) {
51
- if (!isRecord(value))
52
- return;
53
- const resources = toResourceList(value.resources);
54
- if (!resources)
55
- return;
56
- return {
57
- ...value,
58
- version: typeof value.version === "string" ? value.version : "2.0",
59
- resources
60
- };
61
- }
62
- function emptyPackagingBindingsJson() {
63
- return { version: "2.0", resources: [] };
64
- }
65
- function mergePackagingBindingsJson(bindingsJsons) {
66
- const first = bindingsJsons.find((bindingsJson) => bindingsJson !== undefined);
67
- return {
68
- ...first ?? emptyPackagingBindingsJson(),
69
- resources: mergeBindingResources(bindingsJsons.flatMap((bindingsJson) => bindingsJson?.resources ?? []))
70
- };
71
- }
72
- var inlineAgentPackagerLogger = {
73
- debug: (message) => logger.debug(message),
74
- info: (message) => logger.info(message),
75
- warn: (message) => logger.warn(message),
76
- error: (message) => logger.error(message),
77
- progress: (message) => logger.info(message),
78
- log: (message, level) => {
79
- if (level === "Error" /* Error */)
80
- logger.error(message);
81
- else if (level === "Warning" /* Warn */)
82
- logger.warn(message);
83
- else if (level === "Debug" /* Debug */)
84
- logger.debug(message);
85
- else
86
- logger.info(message);
87
- },
88
- logMessage: (message) => inlineAgentPackagerLogger.log(message.message, message.logLevel)
89
- };
90
- async function createInlineAgentContract(fs, agentDir) {
91
- const outputPath = fs.path.join(fs.env.tmpdir(), `.inline-agent-contract-${crypto.randomUUID()}`);
92
- await fs.mkdir(outputPath);
93
- try {
94
- const built = await buildInlineAgentContract({
95
- fileSystem: fs,
96
- logger: inlineAgentPackagerLogger,
97
- projectPath: agentDir,
98
- outputPath
99
- });
100
- const bindingsJson = normalizePackagingBindingsJson(built.bindingsJson);
101
- if (!bindingsJson) {
102
- throw new Error("Agent packager returned an invalid binding contract");
103
- }
104
- return { agentJson: built.agentJson, bindingsJson };
105
- } finally {
106
- const [cleanupError] = await catchError(fs.rm(outputPath, { recursive: true }));
107
- if (cleanupError) {
108
- logger.debug(`Could not remove inline-agent contract directory ${outputPath}: ${cleanupError.message}`);
109
- }
110
- }
111
- }
112
- async function inlineAgentExists(fs, projectDir, source) {
113
- const agentJsonPath = fs.path.join(projectDir, source, "agent.json");
114
- return fs.exists(agentJsonPath);
115
- }
116
- async function packageInlineAgents(fs, projectDir, nodes) {
117
- const result = [];
118
- for (const node of nodes) {
119
- if (!isInlineAgentNodeType(node.type))
120
- continue;
121
- const source = readInlineAgentSource(node);
122
- if (!source)
123
- continue;
124
- if (/[/\\.]/.test(source))
125
- continue;
126
- if (!await inlineAgentExists(fs, projectDir, source))
127
- continue;
128
- const contract = await createInlineAgentContract(fs, fs.path.join(projectDir, source));
129
- const inputSchema = contract.agentJson.inputSchema ?? {
130
- type: "object",
131
- properties: {}
132
- };
133
- const outputSchema = contract.agentJson.outputSchema ?? {
134
- type: "object",
135
- properties: {}
136
- };
137
- result.push({
138
- source,
139
- entryPoint: {
140
- filePath: `content/${source}/agent.json`,
141
- uniqueId: contract.agentJson.projectId ?? source,
142
- type: EntryPointType.Agent,
143
- input: inputSchema,
144
- output: outputSchema,
145
- displayName: contract.agentJson.name ?? "Agent"
146
- },
147
- agentJson: contract.agentJson,
148
- bindingsJson: contract.bindingsJson
149
- });
150
- logger.info(`Packaged inline agent "${source}" for entry-points`);
151
- }
152
- return result;
153
- }
154
- async function stageInlineAgentPackageFiles(fs, sourceProjectPath, stagingProjectDir, inlineAgents, formatLogMessage) {
155
- for (const agent of inlineAgents) {
156
- const srcDir = fs.path.join(sourceProjectPath, agent.source);
157
- const destDir = fs.path.join(stagingProjectDir, agent.source);
158
- if (fs.path.resolve(srcDir) !== fs.path.resolve(destDir) && await fs.exists(srcDir)) {
159
- await fs.copyDirectory(srcDir, destDir);
160
- }
161
- const agentBuilderDir = fs.path.join(destDir, ".agent-builder");
162
- await ensureDirectory(fs, agentBuilderDir);
163
- await fs.writeFile(fs.path.join(agentBuilderDir, "agent.json"), JSON.stringify({
164
- ...agent.agentJson,
165
- resources: agent.agentJson.resources ?? [],
166
- features: agent.agentJson.features ?? []
167
- }, null, 2));
168
- await fs.writeFile(fs.path.join(agentBuilderDir, "bindings.json"), `${JSON.stringify(agent.bindingsJson ?? emptyPackagingBindingsJson(), null, 2)}
169
- `);
170
- logger.info(formatLogMessage(agent.source));
171
- }
172
- }
173
- function buildInlineAgentDescriptors(nodes) {
174
- const out = [];
175
- for (const node of nodes) {
176
- if (!isInlineAgentNodeType(node.type))
177
- continue;
178
- const source = readInlineAgentSource(node);
179
- if (!source)
180
- continue;
181
- const label = node.display?.label ?? "Agent";
182
- out.push({
183
- name: label,
184
- agentProjectId: source,
185
- isConversational: isConversationalOrVoiceAgentNodeType(node.type),
186
- entryPointPath: `${source}/agent.json`
187
- });
188
- }
189
- return out;
190
- }
191
- async function writePackagingArtifacts(fs, projectDir, projectId, packagingNodes, bindings, variables, bpmnFileName, startEventId, flowFileName, definitions = [], options = {}) {
192
- const { entryPoints } = await writePackagingArtifactsDetailed(fs, projectDir, projectId, packagingNodes, bindings, variables, bpmnFileName, startEventId, flowFileName, definitions, options);
193
- return entryPoints;
194
- }
195
- async function writePackagingArtifactsDetailed(fs, projectDir, projectId, packagingNodes, bindings, variables, bpmnFileName, startEventId, flowFileName, definitions = [], options = {}) {
196
- const flowEntryPoints = getEntryPoints(bpmnFileName, packagingNodes, variables, definitions, ProjectType.Flow);
197
- const entryPoints = [
198
- ...flowEntryPoints,
199
- ...options.additionalEntryPoints ?? []
200
- ];
201
- await fs.writeFile(fs.path.join(projectDir, "entry-points.json"), `${JSON.stringify(generateEntryPointsJson(entryPoints), null, 2)}
202
- `);
203
- const bindingResources = getBindingResources(packagingNodes, bindings, definitions);
204
- const bindingsJson = normalizePackagingBindingsJson(generateBindingsJson(bindingResources)) ?? emptyPackagingBindingsJson();
205
- const stagedBindingsJson = mergePackagingBindingsJson([
206
- bindingsJson,
207
- ...options.additionalBindingsJsons ?? []
208
- ]);
209
- await fs.writeFile(fs.path.join(projectDir, "bindings_v2.json"), `${JSON.stringify(stagedBindingsJson, null, 2)}
210
- `);
211
- const mainEntryPoint = `/${bpmnFileName}#${startEventId}`;
212
- const operateJson = withRuntimeProfile(generateOperateJson(projectId, mainEntryPoint, operateRuntimeOptions(packagingNodes)), options.profile ?? "Standard" /* Standard */);
213
- await fs.writeFile(fs.path.join(projectDir, "operate.json"), `${JSON.stringify(operateJson, null, 2)}
214
- `);
215
- const packageDescriptorJson = options.packageDescriptorJson ?? {
216
- $schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
217
- files: {
218
- "operate.json": "operate.json",
219
- "entry-points.json": "entry-points.json",
220
- "bindings.json": "bindings_v2.json",
221
- [bpmnFileName]: bpmnFileName,
222
- ...flowFileName ? { [flowFileName]: flowFileName } : {}
223
- }
224
- };
225
- await fs.writeFile(fs.path.join(projectDir, "package-descriptor.json"), `${JSON.stringify(packageDescriptorJson, null, 2)}
226
- `);
227
- return { entryPoints, bindingsJson: stagedBindingsJson };
228
- }
229
- function backfillNodeModelsFromDefinitions(nodes, definitions) {
230
- if (definitions.length === 0)
231
- return nodes;
232
- const definitionByType = new Map;
233
- for (const def of definitions) {
234
- if (def?.nodeType)
235
- definitionByType.set(def.nodeType, def);
236
- }
237
- return nodes.map((n) => {
238
- if (n.model)
239
- return n;
240
- const def = definitionByType.get(n.type);
241
- if (!def?.model)
242
- return n;
243
- return { ...n, model: def.model };
244
- });
245
- }
246
- async function regenerateBindingsFile(fs, flowFilePath) {
247
- const absolutePath = fs.path.resolve(flowFilePath);
248
- const projectDir = fs.path.dirname(absolutePath);
249
- const content = await fs.readFile(absolutePath, "utf-8");
250
- if (!content) {
251
- throw new Error(`Could not read .flow file at ${absolutePath}`);
252
- }
253
- const [parseErr, flowData] = catchError(() => JSON.parse(content));
254
- if (parseErr) {
255
- throw new Error(`Failed to parse .flow file at ${absolutePath}: ${parseErr.message}`);
256
- }
257
- const packagingNodes = backfillNodeModelsFromDefinitions(fileNodesToPackagingNodes(flowData.nodes ?? []), flowData.definitions ?? []);
258
- const bindingResources = getBindingResources(packagingNodes, flowData.bindings ?? [], flowData.definitions ?? []);
259
- await fs.writeFile(fs.path.join(projectDir, "bindings_v2.json"), `${JSON.stringify(generateBindingsJson(bindingResources), null, 2)}
260
- `);
261
- }
262
-
263
- export { fileNodesToPackagingNodes, packageInlineAgents, stageInlineAgentPackageFiles, buildInlineAgentDescriptors, writePackagingArtifacts, writePackagingArtifactsDetailed, regenerateBindingsFile };
264
-
265
- //# debugId=FF54069E2277B66C64756E2164756E21
@@ -1,15 +0,0 @@
1
- import {
2
- FlowToolFactory
3
- } from "./packager-tool-0d375dbz.js";
4
- import {
5
- toolsFactoryRepository
6
- } from "./packager-tool-stq8800d.js";
7
-
8
- // src/packager-tool.ts
9
- function registerPackagerFactories() {
10
- toolsFactoryRepository.registerProjectToolFactory(new FlowToolFactory);
11
- }
12
-
13
- export { registerPackagerFactories };
14
-
15
- //# debugId=094DABA57E9A36F764756E2164756E21
@@ -1,64 +0,0 @@
1
- import {
2
- catchError
3
- } from "./packager-tool-02f63a08.js";
4
-
5
- // src/services/flow-eval-file-store.ts
6
- async function ensureDirectory(fs, path) {
7
- if (await fs.exists(path)) {
8
- return;
9
- }
10
- const parent = fs.path.dirname(path);
11
- if (parent && parent !== path && !await fs.exists(parent)) {
12
- await ensureDirectory(fs, parent);
13
- }
14
- const [error] = await catchError(fs.mkdir(path));
15
- if (error && !await fs.exists(path)) {
16
- throw error;
17
- }
18
- }
19
-
20
- class FlowEvalFileStore {
21
- fs;
22
- constructor(fs) {
23
- this.fs = fs;
24
- }
25
- async readJsonFiles(dir) {
26
- const [readDirError, files] = await catchError(this.fs.readdir(dir));
27
- if (readDirError) {
28
- return [];
29
- }
30
- const items = [];
31
- for (const file of files) {
32
- if (!file.endsWith(".json")) {
33
- continue;
34
- }
35
- const filePath = this.fs.path.join(dir, file);
36
- const [readError, raw] = await catchError(this.fs.readFile(filePath, "utf-8"));
37
- if (readError) {
38
- throw new Error(`Failed to read JSON file "${filePath}": ${readError.message}`);
39
- }
40
- if (raw === null) {
41
- continue;
42
- }
43
- const [parseError, data] = catchError(() => JSON.parse(String(raw)));
44
- if (parseError) {
45
- throw new Error(`Invalid JSON in "${filePath}": ${parseError.message}`);
46
- }
47
- data.fileName = file;
48
- items.push(data);
49
- }
50
- return items;
51
- }
52
- async writeJsonFile(path, value) {
53
- await ensureDirectory(this.fs, this.fs.path.dirname(path));
54
- await this.fs.writeFile(path, `${JSON.stringify(value, null, 2)}
55
- `);
56
- }
57
- async remove(path) {
58
- await this.fs.rm(path);
59
- }
60
- }
61
-
62
- export { ensureDirectory, FlowEvalFileStore };
63
-
64
- //# debugId=2DF0307602E51A6664756E2164756E21