@uipath/flow-tool 1.201.0 → 1.202.0-preview.136

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 (234) hide show
  1. package/dist/{authoring-7r6g06c7.js → authoring-wpa6d0vf.js} +74 -48
  2. package/dist/binding-service-dh91hw9e.js +141 -0
  3. package/dist/{browser-strategy-rkcvc6tn.js → browser-strategy-6atc7v8s.js} +3 -3
  4. package/dist/connector-service-d9ph9kx1.js +948 -0
  5. package/dist/{conversion-H2VEEYLB-ng48mbf7.js → conversion-QANACVCM-zs0hhfjv.js} +39 -33
  6. package/dist/{de-5KVP66U6-f7knj511.js → de-5KVP66U6-1bnf4zt5.js} +52 -52
  7. package/dist/de-6U7ECGHH-xwsw33fk.js +35 -0
  8. package/dist/{de-5HU6GFWV-4EZK6G7N-yrh21f52.js → de-7XQXX2DK-IDWR6CAR-n4z245kt.js} +857 -845
  9. package/dist/{de-5HU6GFWV-zheyw6d2.js → de-7XQXX2DK-tqdy5n2b.js} +857 -845
  10. package/dist/{de-HKTOVV4H-d5yw5j21.js → de-HKTOVV4H-pe9w0xn8.js} +46 -46
  11. package/dist/{de-XLT4QPIP-0rtw349w.js → de-XLT4QPIP-kj81dxjc.js} +9 -9
  12. package/dist/debug-conversation-trigger-452frzyz.js +41 -0
  13. package/dist/debug-http-client-wd6xb8v4.js +31 -0
  14. package/dist/debug-service-fvyexnb1.js +58 -0
  15. package/dist/edge-service-e77bndbe.js +162 -0
  16. package/dist/{elk.bundled-pydbzeez.js → elk.bundled-vpsbxz0p.js} +3 -3
  17. package/dist/{en-MABQK6C4-REWE2WG2-8dp4cqdg.js → en-5ZGC5VQ3-EWX7ILY7-rmtj70fk.js} +898 -898
  18. package/dist/{en-MABQK6C4-nkzq2j8t.js → en-5ZGC5VQ3-h581y30k.js} +897 -897
  19. package/dist/en-EPWMLP2N-2wvge238.js +28 -0
  20. package/dist/{en-UNT7BE26-rhh65jry.js → en-LQHKFSEY-vvbe8ve9.js} +13 -11
  21. package/dist/{en-P4AS26D7-szrzfxz1.js → en-P4AS26D7-zptp77bm.js} +45 -45
  22. package/dist/{en-4KXU7N7B-66fntxa2.js → en-X3S6IZ5J-nhkg6pwn.js} +54 -60
  23. package/dist/{es-MX-H2EAXLYI-qwnqt48x.js → es-MX-H2EAXLYI-j42kfkxy.js} +46 -46
  24. package/dist/es-MX-NHTIP5YM-ar6zfx95.js +35 -0
  25. package/dist/{es-MX-OKNDG2NH-c1k1s1tg.js → es-MX-OKNDG2NH-tcac6j4g.js} +9 -9
  26. package/dist/{es-MX-POESXYP2-UW6VP5QI-cd3a79g9.js → es-MX-U2VN3SZW-KYAJ2ONK-kdram1g1.js} +857 -845
  27. package/dist/{es-MX-POESXYP2-9538722k.js → es-MX-U2VN3SZW-anynsmd8.js} +857 -845
  28. package/dist/{es-MX-XAVLOQW3-9b3cp9n8.js → es-MX-XAVLOQW3-q00km2y7.js} +52 -52
  29. package/dist/{es-NQICVYSQ-aa9z3nhs.js → es-NQICVYSQ-3dtqgget.js} +9 -9
  30. package/dist/{es-O4PAV2CR-jwfaawwk.js → es-O4PAV2CR-0g23ve3v.js} +46 -46
  31. package/dist/es-PQ3RA33Q-y4kxhjfr.js +35 -0
  32. package/dist/{es-VFPNVMP5-thm0z9sr.js → es-VFPNVMP5-bx2c337j.js} +52 -52
  33. package/dist/{es-LUTYN7U7-IY5QWOUF-k2aefzc0.js → es-ZGCPPOME-24PJEGPV-rn86z9kn.js} +857 -845
  34. package/dist/{es-LUTYN7U7-ye5zn4sn.js → es-ZGCPPOME-8gazspjj.js} +857 -845
  35. package/dist/flow-api-wv8p8xbd.js +36 -0
  36. package/dist/flow-debug-service-tfbefas6.js +741 -0
  37. package/dist/flow-eval-node-target-c6wea7rz.js +44 -0
  38. package/dist/flow-eval-run-service-01kdky72.js +961 -0
  39. package/dist/flow-eval-service-ft8e16jz.js +1338 -0
  40. package/dist/flow-init-service-mva4crty.js +35 -0
  41. package/dist/flow-io-r318sjrw.js +36 -0
  42. package/dist/flow-migrate-service-rwcdx60q.js +119 -0
  43. package/dist/flow-pack-service-p4hxyj9e.js +280 -0
  44. package/dist/flow-validate-service-j25pxpwz.js +57 -0
  45. package/dist/{fr-5YRGHXF5-q6b63yg0.js → fr-5YRGHXF5-kz1ywpv6.js} +46 -46
  46. package/dist/{fr-E5MDO4EG-exvrs7ge.js → fr-E5MDO4EG-c3mkty2t.js} +52 -52
  47. package/dist/{fr-PFHIL7YZ-cxnshwa8.js → fr-PFHIL7YZ-2n589p47.js} +9 -9
  48. package/dist/fr-R4L3OAWI-30khpsmn.js +35 -0
  49. package/dist/{fr-LJIK56LW-STG6QR3T-cextvv8q.js → fr-T3G5GZCT-TU4IKBEG-k6xz1s1f.js} +857 -845
  50. package/dist/{fr-LJIK56LW-xf3xf2kh.js → fr-T3G5GZCT-y3f7xb1q.js} +857 -845
  51. package/dist/governance-fetcher-j9cx4f1d.js +391 -0
  52. package/dist/headless-h1myzz32.js +177196 -0
  53. package/dist/hitl-service-kvt5wms4.js +256 -0
  54. package/dist/index-1kgxzh8x.js +143 -0
  55. package/dist/index-4zrwgb3c.js +111 -0
  56. package/dist/index-ev4mdg5y.js +4801 -0
  57. package/dist/{index-er6vy3jk.js → index-eybzsdcc.js} +295 -317
  58. package/dist/{index-hsadteg4.js → index-h8cph72k.js} +4 -4
  59. package/dist/{index-p50kx6jv.js → index-k5tbd184.js} +276 -276
  60. package/dist/index-n33np76r.js +630 -0
  61. package/dist/{index-9f8q2ege.js → index-p3vk57z7.js} +27 -27
  62. package/dist/{index-dhcd9b82.js → index-w0z4s69j.js} +166 -81
  63. package/dist/index.js +29 -32
  64. package/dist/{index.umd.min-drpc57vn.js → index.umd.min-fqefd9kn.js} +3 -3
  65. package/dist/init.js +24 -25
  66. package/dist/input-reader-6pwhtp8v.js +11 -0
  67. package/dist/{ja-FGEGLBJ3-w9byjhze.js → ja-BI5K3JDZ-77zat4z2.js} +857 -845
  68. package/dist/{ja-FGEGLBJ3-MG3BSWXD-vq19zt2p.js → ja-BI5K3JDZ-GTIHISTZ-s6n3r2ab.js} +857 -845
  69. package/dist/{ja-DPO5PPLO-s2a7j3nj.js → ja-DPO5PPLO-mysfmznx.js} +52 -52
  70. package/dist/{ja-P4OSE367-8ywxep9a.js → ja-P4OSE367-srr3qypg.js} +9 -9
  71. package/dist/{ja-SDAPAVCR-943p5gx7.js → ja-SDAPAVCR-kg39dfap.js} +46 -46
  72. package/dist/ja-ZHKCBE5W-x73w6x3e.js +35 -0
  73. package/dist/{js-yaml-cggj6w7q.js → js-yaml-87cdx6bm.js} +27 -19
  74. package/dist/known-types-a20evmmg.js +20 -0
  75. package/dist/ko-6W7OGLLB-mnmqc584.js +35 -0
  76. package/dist/{ko-ITOPNIYI-qz39kamf.js → ko-ITOPNIYI-hmxd2asd.js} +52 -52
  77. package/dist/{ko-TUAK3G3A-s25w0ckg.js → ko-JOBF5V7N-4bv0mjje.js} +857 -845
  78. package/dist/{ko-TUAK3G3A-TBEBKOTM-ns78t2rv.js → ko-JOBF5V7N-O7T4HKIE-ape840y0.js} +857 -845
  79. package/dist/{ko-NAGOZLC3-wb3y9yhh.js → ko-NAGOZLC3-gaxxsnd2.js} +46 -46
  80. package/dist/{ko-PYOS2KJP-5sbj5bp8.js → ko-PYOS2KJP-e7dshyxy.js} +9 -9
  81. package/dist/localization-h8a53z6p.js +47 -0
  82. package/dist/{node-gd4469ea.js → node-cnrcrrb0.js} +7973 -7166
  83. package/dist/node-service-8g5x5d2y.js +70 -0
  84. package/dist/{node-strategy-8gzp67xs.js → node-strategy-gc4sg6a2.js} +132 -16
  85. package/dist/node-sync-service-e2reh33c.js +42 -0
  86. package/dist/{packager-tool-9qecd4wb.js → packager-tool-0gctz400.js} +5 -2
  87. package/dist/{packager-tool-1cb0d5e0.js → packager-tool-0v3s8r01.js} +2 -2
  88. package/dist/{packager-tool-wckvcay0.js → packager-tool-1yh8g550.js} +9 -7
  89. package/dist/packager-tool-27avrkyk.js +15 -0
  90. package/dist/packager-tool-2wefykg9.js +106 -0
  91. package/dist/packager-tool-4fhgws0x.js +757 -0
  92. package/dist/{packager-tool-7yjpwj92.js → packager-tool-4hx14snw.js} +49 -48
  93. package/dist/{packager-tool-3wygxefb.js → packager-tool-58q3tvh7.js} +10 -10
  94. package/dist/{packager-tool-cvwr40ax.js → packager-tool-5qaxht3k.js} +1425 -550
  95. package/dist/packager-tool-5z1eg3ea.js +33289 -0
  96. package/dist/{packager-tool-17cn3xb7.js → packager-tool-6m078z5s.js} +13388 -19366
  97. package/dist/packager-tool-7b6tpg7y.js +77 -0
  98. package/dist/packager-tool-7exrv6w7.js +23 -0
  99. package/dist/packager-tool-8dszjcg5.js +4892 -0
  100. package/dist/packager-tool-8j92afwp.js +58 -0
  101. package/dist/packager-tool-94w17vf8.js +85 -0
  102. package/dist/{packager-tool-vdd02vns.js → packager-tool-9bec251q.js} +543 -1493
  103. package/dist/packager-tool-a1hbfmws.js +399 -0
  104. package/dist/{packager-tool-tq9q9m77.js → packager-tool-a42jnpy5.js} +3 -9
  105. package/dist/packager-tool-abbtfk2v.js +54 -0
  106. package/dist/packager-tool-cdwpc9fh.js +4945 -0
  107. package/dist/packager-tool-e0p2zsyc.js +97 -0
  108. package/dist/packager-tool-eebq62fq.js +540 -0
  109. package/dist/{packager-tool-m6x5sczh.js → packager-tool-em5r6g6j.js} +14 -21
  110. package/dist/packager-tool-eypvc2kv.js +23 -0
  111. package/dist/packager-tool-f0kd5kq4.js +2327 -0
  112. package/dist/packager-tool-fjaa8d3v.js +289 -0
  113. package/dist/packager-tool-g0eha8ge.js +121 -0
  114. package/dist/packager-tool-g9y14b10.js +54 -0
  115. package/dist/packager-tool-gbgfwx8f.js +2 -0
  116. package/dist/packager-tool-jc34wvrw.js +64 -0
  117. package/dist/packager-tool-k99nf3pq.js +25 -0
  118. package/dist/{packager-tool-hr0xg6q8.js → packager-tool-kn91khp6.js} +17 -13
  119. package/dist/{packager-tool-jysvpt8p.js → packager-tool-m3wkcxf5.js} +2 -2
  120. package/dist/{packager-tool-78a3szsp.js → packager-tool-m5qfverj.js} +1720 -2014
  121. package/dist/packager-tool-mwvbq6ef.js +79 -0
  122. package/dist/packager-tool-nq4rcqqg.js +87 -0
  123. package/dist/packager-tool-nxx8naxv.js +4234 -0
  124. package/dist/{packager-tool-3y0k15sv.js → packager-tool-p9stswjj.js} +2858 -19342
  125. package/dist/packager-tool-r0xpcqwg.js +188 -0
  126. package/dist/packager-tool-raq2wbwp.js +18 -0
  127. package/dist/{packager-tool-y3dezh8k.js → packager-tool-rs6jm14d.js} +6 -4
  128. package/dist/packager-tool-s9ff3kk4.js +6 -0
  129. package/dist/{packager-tool-pbsghbmj.js → packager-tool-sykgshez.js} +2 -2
  130. package/dist/packager-tool-tf3d2y8z.js +31 -0
  131. package/dist/packager-tool-tn5e7wnb.js +384 -0
  132. package/dist/packager-tool-v2rkcehq.js +457 -0
  133. package/dist/packager-tool-v86fdwvs.js +262 -0
  134. package/dist/packager-tool-v9psxdy5.js +8185 -0
  135. package/dist/packager-tool-v9rrz038.js +602 -0
  136. package/dist/packager-tool-vpqyvh4c.js +304 -0
  137. package/dist/packager-tool-wcha0e5r.js +443 -0
  138. package/dist/{packager-tool-1gt6js73.js → packager-tool-xhzfwa5p.js} +6 -4
  139. package/dist/{packager-tool-5arsyj36.js → packager-tool-yc4kw997.js} +4 -2
  140. package/dist/{packager-tool-pkq70dec.js → packager-tool-ywqc9rtf.js} +31 -3
  141. package/dist/{packager-tool-0567pxpm.js → packager-tool-z9bfhmm5.js} +10 -10
  142. package/dist/{packager-tool-gmrwvnyh.js → packager-tool-zfrp8ecz.js} +8 -58
  143. package/dist/{packager-tool-3vdpx9ng.js → packager-tool-zke08y39.js} +1121 -1846
  144. package/dist/packager-tool.js +17 -17
  145. package/dist/{pt-7TR74ZMB-1g8my56g.js → pt-7TR74ZMB-bmphh4x2.js} +46 -46
  146. package/dist/{pt-BR-7XGDXRDJ-TR5D7JYL-533wvy7p.js → pt-BR-7DYX2YPT-LZYH4YFD-bx43vx3z.js} +857 -845
  147. package/dist/{pt-BR-7XGDXRDJ-espnkgrj.js → pt-BR-7DYX2YPT-fqxqzqtf.js} +857 -845
  148. package/dist/{pt-BR-BXURWX4W-dqr4dnf9.js → pt-BR-BXURWX4W-bwfcwhk1.js} +52 -52
  149. package/dist/{pt-BR-DXXSYJDO-bn84ewp7.js → pt-BR-DXXSYJDO-a2tp13v7.js} +46 -46
  150. package/dist/pt-BR-UQCYHKMJ-q78n7q70.js +35 -0
  151. package/dist/{pt-BR-Z3TUDJHM-n7ngej6s.js → pt-BR-Z3TUDJHM-8v73x9s7.js} +9 -9
  152. package/dist/pt-D6A6MVB2-yvxca8vz.js +35 -0
  153. package/dist/{pt-TMVOOITK-myha14p9.js → pt-HTXGGX6Y-97t21dty.js} +857 -845
  154. package/dist/{pt-TMVOOITK-H2ADYHSD-ezpggv33.js → pt-HTXGGX6Y-ZHQSDFKI-vehfxadc.js} +857 -845
  155. package/dist/{pt-KSBWHAVQ-hd52bpsz.js → pt-KSBWHAVQ-mhvhgr2p.js} +9 -9
  156. package/dist/{pt-YI4VE4YQ-v7gjeg82.js → pt-YI4VE4YQ-wdkn2dcf.js} +52 -52
  157. package/dist/ro-4TMBHS5M-jz0anpt6.js +35 -0
  158. package/dist/{ro-BJFER5OI-334n28rj.js → ro-BJFER5OI-83tq8vxh.js} +46 -46
  159. package/dist/{ro-2VALF3S5-NXBJUEZN-nqw1zs33.js → ro-KTNQ3MNU-XIE6YPQN-gen8p82z.js} +857 -845
  160. package/dist/{ro-2VALF3S5-cdz5afkr.js → ro-KTNQ3MNU-y08n1x5g.js} +857 -845
  161. package/dist/{ro-RKXZUG7Z-cm3xn3fj.js → ro-RKXZUG7Z-nndrrsq7.js} +52 -52
  162. package/dist/{ro-VZUZTAMR-tccygznf.js → ro-VZUZTAMR-f4q0g3em.js} +9 -9
  163. package/dist/{ru-GSCT4ARZ-qj8dm4dp.js → ru-GSCT4ARZ-1sa9wbr8.js} +1 -1
  164. package/dist/{ru-GSCT4ARZ-FTVCGQTL-5nh4jf2e.js → ru-GSCT4ARZ-FTVCGQTL-gee86v14.js} +1 -1
  165. package/dist/{ru-T73OPRTC-mp5gn7gs.js → ru-T73OPRTC-4knxw497.js} +1 -1
  166. package/dist/{ru-WBLQ5B2U-awt245ky.js → ru-WBLQ5B2U-8r3c7v6d.js} +1 -1
  167. package/dist/ru-WBLQ5B2U-kdey8qa4.js +10 -0
  168. package/dist/{ru-WBLQ5B2U-57ezmxzz.js → ru-WBLQ5B2U-wemdzdqd.js} +1 -1
  169. package/dist/{serialization-GAW7UFOK-9hkdmmd2.js → serialization-J5QK3HPY-bgewpt6f.js} +158 -152
  170. package/dist/services/expression-validator.d.ts +28 -0
  171. package/dist/services/flow-eval-schema/types.d.ts +17 -0
  172. package/dist/services/flow-validate-service.d.ts +26 -0
  173. package/dist/services/node-validators/js-expression-syntax-validator.d.ts +6 -3
  174. package/dist/services/tidy-service.d.ts +26 -0
  175. package/dist/services/vars-reference-rule.d.ts +156 -0
  176. package/dist/shared-utils-8xdq6f04.js +20 -0
  177. package/dist/tidy-service-ashgyfwj.js +34 -0
  178. package/dist/tool.js +30 -33
  179. package/dist/{tr-AA6O2WSR-ga1xnymp.js → tr-AA6O2WSR-86ba4bdf.js} +52 -52
  180. package/dist/tr-GSQQ6SOT-hv1gyeaa.js +35 -0
  181. package/dist/{tr-RQTZ2DMS-bpgd4kma.js → tr-RQTZ2DMS-w3cwv8s4.js} +46 -46
  182. package/dist/{tr-W4AVRSQ4-bt3qqqdy.js → tr-W4AVRSQ4-hjr81xzk.js} +9 -9
  183. package/dist/{tr-RIFCEXFH-BZS7S7QK-q465b62g.js → tr-XHSSPNK7-GW5KVXR3-2w3f1ss6.js} +857 -845
  184. package/dist/{tr-RIFCEXFH-hgkb4g8y.js → tr-XHSSPNK7-cmqyc4wd.js} +857 -845
  185. package/dist/utils/handle-expansion.d.ts +16 -0
  186. package/dist/validation.js +47 -27
  187. package/dist/variable-service-er7ph4br.js +152 -0
  188. package/dist/wait-for-flow-job-45p1a444.js +134 -0
  189. package/dist/{zh-CN-IP3FMXWM-H3JI2XUM-ta4yac7h.js → zh-CN-2EHQT23P-T5XRQCVS-ac17dpc1.js} +857 -845
  190. package/dist/{zh-CN-IP3FMXWM-1cfarhcp.js → zh-CN-2EHQT23P-mr63c4xz.js} +857 -845
  191. package/dist/{zh-CN-6YRAN57T-j7jp34ws.js → zh-CN-6YRAN57T-rd7x2tqs.js} +9 -9
  192. package/dist/zh-CN-EDFRBU32-vvj7tmaq.js +35 -0
  193. package/dist/{zh-CN-R2KLHXQV-wttmznep.js → zh-CN-R2KLHXQV-agqr45ds.js} +52 -52
  194. package/dist/{zh-CN-ZC6LT4IN-vty9mvv8.js → zh-CN-ZC6LT4IN-kbzvvzz5.js} +46 -46
  195. package/dist/zh-TW-HAICM6DE-rh7k3cq7.js +35 -0
  196. package/dist/{zh-TW-AGIDXIPF-R4XZRDJZ-cgxxz5k4.js → zh-TW-MGZCE5BT-P6FLIUAR-zmq07vhs.js} +857 -845
  197. package/dist/{zh-TW-AGIDXIPF-n6r6w7vy.js → zh-TW-MGZCE5BT-c4ekmrz9.js} +857 -845
  198. package/dist/{zh-TW-R7Y5KVMU-q81f4z2p.js → zh-TW-R7Y5KVMU-m61y07e3.js} +46 -46
  199. package/dist/{zh-TW-RJGCQANM-gqn0aca0.js → zh-TW-RJGCQANM-w0x3qc1p.js} +52 -52
  200. package/dist/{zh-TW-SO2245GN-m5kh88bg.js → zh-TW-SO2245GN-n2bn1gg4.js} +9 -9
  201. package/package.json +2 -2
  202. package/dist/de-5KVP66U6-t37qr521.js +0 -161
  203. package/dist/de-WMKOGI7B-6dc1zdnp.js +0 -143
  204. package/dist/en-4KXU7N7B-24v330b5.js +0 -118
  205. package/dist/en-X4DLPKLJ-1h9gj5c1.js +0 -110
  206. package/dist/es-BVPGJUWA-0k59eqfv.js +0 -143
  207. package/dist/es-MX-U6YL5KQX-k4qvpgd4.js +0 -143
  208. package/dist/es-MX-XAVLOQW3-47a405kf.js +0 -161
  209. package/dist/es-VFPNVMP5-6sftsdxe.js +0 -161
  210. package/dist/fr-E5MDO4EG-f3x1jeqw.js +0 -161
  211. package/dist/fr-EKTTDR7Z-m2t68j0m.js +0 -143
  212. package/dist/ja-DPO5PPLO-fmbg7zt2.js +0 -161
  213. package/dist/ja-Y2YBTXNN-5sszk2zv.js +0 -143
  214. package/dist/ko-ITOPNIYI-aqy82jk8.js +0 -161
  215. package/dist/ko-S33XAV26-rfsv9myd.js +0 -143
  216. package/dist/packager-tool-0sz8se22.js +0 -10671
  217. package/dist/packager-tool-8mqydhz8.js +0 -9850
  218. package/dist/packager-tool-p9j43p8h.js +0 -115
  219. package/dist/packager-tool-v74yk918.js +0 -107
  220. package/dist/packager-tool-xj0agqpk.js +0 -11
  221. package/dist/pt-BR-BXURWX4W-xzyndmrx.js +0 -161
  222. package/dist/pt-BR-JO45SCNI-mt93s33c.js +0 -143
  223. package/dist/pt-W3NA4LIZ-fwd1q4j0.js +0 -143
  224. package/dist/pt-YI4VE4YQ-521681zf.js +0 -161
  225. package/dist/ro-RKXZUG7Z-pdztdafr.js +0 -161
  226. package/dist/ro-WLKX6HF5-b9tj8q67.js +0 -143
  227. package/dist/ru-WBLQ5B2U-8xd4gpv2.js +0 -10
  228. package/dist/ru-WBLQ5B2U-mswqs9wc.js +0 -10
  229. package/dist/tr-3U2W2XCA-43ptfc0m.js +0 -143
  230. package/dist/tr-AA6O2WSR-bj9n80k8.js +0 -161
  231. package/dist/zh-CN-IPZYQR3P-egjmvyjf.js +0 -143
  232. package/dist/zh-CN-R2KLHXQV-x6gnk2n0.js +0 -161
  233. package/dist/zh-TW-RJGCQANM-tt8j5wv2.js +0 -161
  234. package/dist/zh-TW-YPVSQVGT-b378ztph.js +0 -143
@@ -0,0 +1,741 @@
1
+ import {
2
+ writeResolvedFlow
3
+ } from "./packager-tool-raq2wbwp.js";
4
+ import {
5
+ package_default
6
+ } from "./packager-tool-7b6tpg7y.js";
7
+ import {
8
+ ensureProcessBindings
9
+ } from "./packager-tool-v2rkcehq.js";
10
+ import {
11
+ buildInlineAgentDescriptors,
12
+ fileNodesToPackagingNodes,
13
+ packageInlineAgents,
14
+ stageInlineAgentPackageFiles,
15
+ writePackagingArtifacts,
16
+ writePackagingArtifactsDetailed
17
+ } from "./packager-tool-v86fdwvs.js";
18
+ import"./packager-tool-jc34wvrw.js";
19
+ import"./packager-tool-4hx14snw.js";
20
+ import"./packager-tool-cdwpc9fh.js";
21
+ import"./packager-tool-g9y14b10.js";
22
+ import"./packager-tool-5z1eg3ea.js";
23
+ import {
24
+ DebugVariablesFetchFailedError,
25
+ buildStudioWebDesignerUrl,
26
+ extractStartEventId,
27
+ fetchDebugInstanceVariables,
28
+ getFolderInfoById,
29
+ getPersonalFolderInfo,
30
+ isSuccessfulDebugStatus,
31
+ patchConnectionOverwrites,
32
+ uploadAndDebugSolution
33
+ } from "./packager-tool-v9rrz038.js";
34
+ import"./packager-tool-fjaa8d3v.js";
35
+ import"./packager-tool-v9psxdy5.js";
36
+ import"./packager-tool-ywqc9rtf.js";
37
+ import"./packager-tool-f0kd5kq4.js";
38
+ import"./packager-tool-0gctz400.js";
39
+ import"./packager-tool-qa9gftnj.js";
40
+ import"./packager-tool-yc4kw997.js";
41
+ import"./packager-tool-7exrv6w7.js";
42
+ import {
43
+ buildSolutionPackageFromDir,
44
+ createZipFromDir,
45
+ uploadOrOverwriteSolution
46
+ } from "./packager-tool-8dszjcg5.js";
47
+ import {
48
+ findNearestParentUipxFile,
49
+ findSolutionFile,
50
+ isProjectRegisteredInSolution,
51
+ readUipxFile,
52
+ updateSolutionFile
53
+ } from "./packager-tool-eebq62fq.js";
54
+ import {
55
+ findProjectFlowFile,
56
+ readFlowWorkflow,
57
+ resolveProjectFlowFile,
58
+ writeFlowWorkflow
59
+ } from "./packager-tool-94w17vf8.js";
60
+ import {
61
+ assertVoiceAgentDefinitionsEmbedded,
62
+ convertFlowToBpmn,
63
+ hydrateInlineAgentInputVariables,
64
+ replaceExporterVersion,
65
+ voiceConvertOptions
66
+ } from "./packager-tool-6m078z5s.js";
67
+ import"./packager-tool-tn5e7wnb.js";
68
+ import"./packager-tool-xhzfwa5p.js";
69
+ import"./packager-tool-nkrmjr3a.js";
70
+ import"./packager-tool-rs6jm14d.js";
71
+ import"./packager-tool-hk1gxnth.js";
72
+ import"./packager-tool-em5r6g6j.js";
73
+ import"./packager-tool-9bec251q.js";
74
+ import"./packager-tool-z9bfhmm5.js";
75
+ import"./packager-tool-6ejqwbw9.js";
76
+ import"./packager-tool-mcaf4ewf.js";
77
+ import"./packager-tool-eypvc2kv.js";
78
+ import {
79
+ catchError,
80
+ logger
81
+ } from "./packager-tool-5qaxht3k.js";
82
+ import {
83
+ getFileSystem
84
+ } from "./packager-tool-0v3s8r01.js";
85
+ import"./packager-tool-p9stswjj.js";
86
+ import"./packager-tool-vpqyvh4c.js";
87
+ import"./packager-tool-gbgfwx8f.js";
88
+ import"./packager-tool-58q3tvh7.js";
89
+ import"./packager-tool-sc961w0q.js";
90
+ import {
91
+ inMemoryWorkflowToFileFormat,
92
+ isVoiceAgentNodeType
93
+ } from "./packager-tool-m5qfverj.js";
94
+ import"./packager-tool-e0p2zsyc.js";
95
+ import"./packager-tool-a42jnpy5.js";
96
+ import"./packager-tool-c23zrhj8.js";
97
+ import {
98
+ __require
99
+ } from "./packager-tool-1yh8g550.js";
100
+
101
+ // src/services/flow-debug-service.ts
102
+ var FLOW_DEBUG_MISSING_SOLUTION_MESSAGE = "Flow debug requires this Flow to be inside a solution.";
103
+ var FLOW_DEBUG_MISSING_SOLUTION_INSTRUCTIONS = "Create a solution wrapper and import this Flow before debugging: `uip solution init <name>` then `uip solution projects import <flow-dir>` from inside the solution directory, then re-run `uip maestro flow debug`.";
104
+ var FLOW_DEBUG_UNREGISTERED_PROJECT_MESSAGE = "Flow project is not registered in the enclosing solution.";
105
+ var buildFlowDebugUnregisteredProjectInstructions = (projectDir, solutionFile) => [
106
+ `The .uipx manifest at ${solutionFile} does not list ${projectDir} in its Projects[] array.`,
107
+ "Studio Web rejects solution archives with an empty or mismatched Projects[] manifest with an opaque HTTP 400.",
108
+ `Run 'uip solution projects add "${projectDir}" "${solutionFile}"' to register the project, then re-run 'uip maestro flow debug'.`
109
+ ].join(`
110
+ `);
111
+
112
+ class MissingSolutionWrapperError extends Error {
113
+ instructions;
114
+ constructor(message = FLOW_DEBUG_MISSING_SOLUTION_MESSAGE, instructions = FLOW_DEBUG_MISSING_SOLUTION_INSTRUCTIONS) {
115
+ super(message);
116
+ this.name = "MissingSolutionWrapperError";
117
+ this.instructions = instructions;
118
+ }
119
+ }
120
+
121
+ class UnregisteredProjectError extends Error {
122
+ instructions;
123
+ projectDir;
124
+ solutionFile;
125
+ constructor(projectDir, solutionFile) {
126
+ super(FLOW_DEBUG_UNREGISTERED_PROJECT_MESSAGE);
127
+ this.name = "UnregisteredProjectError";
128
+ this.projectDir = projectDir;
129
+ this.solutionFile = solutionFile;
130
+ this.instructions = buildFlowDebugUnregisteredProjectInstructions(projectDir, solutionFile);
131
+ }
132
+ }
133
+ var VOICE_TRIGGER_TYPE = "core.trigger.voice";
134
+ var FLOW_DEBUG_INBOUND_VOICE_MESSAGE = "Inbound voice flows cannot be debugged from the CLI.";
135
+ var buildFlowDebugInboundVoiceInstructions = (triggerLabel) => [
136
+ `This flow starts from an incoming-call trigger ("${triggerLabel}"), which only a real call can raise.`,
137
+ "Publish the flow, bind a phone number to it ('uip conversational trunks assign'), then call that number to run it.",
138
+ "Outbound voice flows (manual trigger + Create outgoing call) do run under 'uip maestro flow debug'."
139
+ ].join(`
140
+ `);
141
+
142
+ class InboundVoiceDebugError extends Error {
143
+ instructions;
144
+ constructor(triggerLabel) {
145
+ super(FLOW_DEBUG_INBOUND_VOICE_MESSAGE);
146
+ this.name = "InboundVoiceDebugError";
147
+ this.instructions = buildFlowDebugInboundVoiceInstructions(triggerLabel);
148
+ }
149
+ }
150
+ function assertNotInboundVoiceFlow(workflow) {
151
+ const trigger = (workflow.nodes ?? []).find((node) => node.type === VOICE_TRIGGER_TYPE);
152
+ if (!trigger) {
153
+ return;
154
+ }
155
+ throw new InboundVoiceDebugError(trigger.display?.label ?? trigger.id ?? "Incoming call");
156
+ }
157
+
158
+ class FlowDebugService {
159
+ fs;
160
+ constructor() {
161
+ this.fs = getFileSystem();
162
+ }
163
+ async assertEnclosingSolution(projectPath) {
164
+ const absoluteProjectPath = this.fs.path.resolve(projectPath);
165
+ const discovery = await findNearestParentUipxFile(this.fs, absoluteProjectPath);
166
+ if (discovery.status === "found") {
167
+ return discovery.solutionFile;
168
+ }
169
+ throw new MissingSolutionWrapperError;
170
+ }
171
+ async assertProjectRegisteredInSolution(projectPath, solutionFile) {
172
+ const absoluteProjectPath = this.fs.path.resolve(projectPath);
173
+ const isRegistered = await isProjectRegisteredInSolution(this.fs, absoluteProjectPath, solutionFile);
174
+ if (!isRegistered) {
175
+ throw new UnregisteredProjectError(absoluteProjectPath, solutionFile);
176
+ }
177
+ }
178
+ async readFlowFile(flowFilePath) {
179
+ const absolutePath = this.fs.path.resolve(flowFilePath);
180
+ if (!await this.fs.exists(absolutePath)) {
181
+ throw new Error(`File not found: ${absolutePath}`);
182
+ }
183
+ if (!absolutePath.endsWith(".flow")) {
184
+ throw new Error(`Expected a .flow file but got: ${this.fs.path.basename(absolutePath)}`);
185
+ }
186
+ const { workflow } = await readFlowWorkflow(absolutePath);
187
+ return workflow;
188
+ }
189
+ async readBpmnFile(bpmnFilePath) {
190
+ const absolutePath = this.fs.path.resolve(bpmnFilePath);
191
+ if (!await this.fs.exists(absolutePath)) {
192
+ throw new Error(`File not found: ${absolutePath}`);
193
+ }
194
+ if (!absolutePath.endsWith(".bpmn")) {
195
+ throw new Error(`Expected a .bpmn file but got: ${this.fs.path.basename(absolutePath)}`);
196
+ }
197
+ const bpmnContent = await this.fs.readFile(absolutePath, "utf-8");
198
+ return bpmnContent;
199
+ }
200
+ async convertToBpmn(workflow, projectDir) {
201
+ if (projectDir) {
202
+ await this.hydrateInlineAgentInputs(workflow, projectDir);
203
+ }
204
+ const flowNodes = workflow.nodes ?? [];
205
+ const voiceNodes = flowNodes.filter((node) => isVoiceAgentNodeType(node.type));
206
+ if (voiceNodes.length > 0 && !projectDir) {
207
+ throw new Error("This flow contains voice agent nodes; the flow project directory is required to resolve their agent definitions.");
208
+ }
209
+ const voiceAgentPackages = projectDir ? await packageInlineAgents(this.fs, projectDir, voiceNodes) : [];
210
+ const fileFormat = inMemoryWorkflowToFileFormat(workflow);
211
+ const flowJson = JSON.stringify(fileFormat, null, 2);
212
+ const { bpmn: rawBpmn } = await convertFlowToBpmn(flowJson, voiceConvertOptions({
213
+ flowJson,
214
+ nodes: flowNodes,
215
+ builtAgents: new Map(voiceAgentPackages.map((agent) => [
216
+ agent.source,
217
+ agent.agentJson
218
+ ])),
219
+ convertOptions: { detached: true }
220
+ }));
221
+ const bpmn = replaceExporterVersion(rawBpmn, package_default.version);
222
+ assertVoiceAgentDefinitionsEmbedded(bpmn, flowNodes);
223
+ return bpmn;
224
+ }
225
+ async hydrateInlineAgentInputs(workflow, projectDir) {
226
+ const nodes = workflow.nodes ?? [];
227
+ await hydrateInlineAgentInputVariables(nodes, async (source) => {
228
+ const agentJsonPath = this.fs.path.join(projectDir, source, "agent.json");
229
+ const [readErr, raw] = await catchError(this.fs.readFile(agentJsonPath, "utf-8"));
230
+ if (readErr || typeof raw !== "string")
231
+ return;
232
+ const [parseErr, agent] = catchError(() => JSON.parse(raw));
233
+ if (parseErr || !agent)
234
+ return;
235
+ return agent.inputSchema;
236
+ }, (source, added) => logger.info(`Reconciled ${added} inline-agent input(s) for "${source}" from agent.json inputSchema`), (source, reason) => logger.warn(reason === "invalid-source" ? `Inline agent "${source}" is not a bare project-id folder, so its inputs were not reconciled — the agent will run with no bound inputs.` : `Could not read an inputSchema for inline agent "${source}", so its inputs were not reconciled — the agent will run with no bound inputs. Check that ${source}/agent.json exists and parses.`));
237
+ }
238
+ async generateProjectFiles(flowData, bpmnXml, flowFileContent, startEventId) {
239
+ const safeName = flowData.name.replace(/[^a-zA-Z0-9_-]/g, "_");
240
+ const projectDir = this.fs.path.join(this.fs.env.tmpdir(), `.flow-debug-${safeName}-${Date.now()}`);
241
+ const safeMkdir = async (dir) => {
242
+ const [err] = await catchError(this.fs.mkdir(dir));
243
+ if (err && err.code !== "EEXIST") {
244
+ throw err;
245
+ }
246
+ };
247
+ await safeMkdir(projectDir);
248
+ const resolvedStartEventId = startEventId ?? extractStartEventId(bpmnXml);
249
+ const bpmnFileName = `${safeName}.bpmn`;
250
+ const packagingNodes = fileNodesToPackagingNodes(flowData.nodes);
251
+ const bindings = flowData.bindings ?? [];
252
+ const variables = flowData.variables ?? {};
253
+ const definitions = flowData.definitions ?? [];
254
+ const projectUiproj = {
255
+ Name: flowData.name,
256
+ ProjectType: "Flow"
257
+ };
258
+ await this.fs.writeFile(this.fs.path.join(projectDir, "project.uiproj"), `${JSON.stringify(projectUiproj, null, 2)}
259
+ `);
260
+ await writePackagingArtifacts(this.fs, projectDir, flowData.id, packagingNodes, bindings, variables, bpmnFileName, resolvedStartEventId, `${safeName}.flow`, definitions);
261
+ await this.fs.writeFile(this.fs.path.join(projectDir, `${safeName}.bpmn`), bpmnXml);
262
+ if (flowFileContent) {
263
+ await this.fs.writeFile(this.fs.path.join(projectDir, `${safeName}.flow`), flowFileContent);
264
+ }
265
+ await writeResolvedFlow(this.fs, projectDir, safeName, flowData);
266
+ return projectDir;
267
+ }
268
+ async buildSolutionPackage(projectDir, projectName) {
269
+ const solutionId = crypto.randomUUID();
270
+ const projectId = crypto.randomUUID();
271
+ const stagingDir = this.fs.path.join(this.fs.env.tmpdir(), `.flow-debug-solution-${Date.now()}`);
272
+ await this.fs.mkdir(stagingDir);
273
+ const solutionStorage = {
274
+ SolutionId: solutionId,
275
+ Projects: [
276
+ {
277
+ ProjectId: projectId,
278
+ ProjectRelativePath: `${projectName}/project.uiproj`
279
+ }
280
+ ]
281
+ };
282
+ await this.fs.writeFile(this.fs.path.join(stagingDir, "SolutionStorage.json"), JSON.stringify(solutionStorage));
283
+ const uipx = {
284
+ SolutionId: solutionId,
285
+ Projects: [
286
+ {
287
+ Type: "Flow",
288
+ ProjectRelativePath: `${projectName}/project.uiproj`,
289
+ Id: projectId
290
+ }
291
+ ]
292
+ };
293
+ await this.fs.writeFile(this.fs.path.join(stagingDir, `${projectName}Solution.uipx`), JSON.stringify(uipx, null, 2));
294
+ const destProjectDir = this.fs.path.join(stagingDir, projectName);
295
+ await this.fs.mkdir(destProjectDir);
296
+ await this.fs.copyDirectory(projectDir, destProjectDir);
297
+ const uisPath = this.fs.path.join(this.fs.env.tmpdir(), `${projectName}Solution-${Date.now()}.uis`);
298
+ const zipData = await createZipFromDir(this.fs, stagingDir);
299
+ await this.fs.writeFile(uisPath, zipData);
300
+ await this.fs.rm(stagingDir).catch(() => {});
301
+ return uisPath;
302
+ }
303
+ async writeSingleProjectSolutionMetadata(stagingDir, projectName, projectRelativeDir) {
304
+ const solutionId = crypto.randomUUID();
305
+ const projectId = crypto.randomUUID();
306
+ const projectRelativePath = `${projectRelativeDir}/project.uiproj`;
307
+ const solutionStorage = {
308
+ SolutionId: solutionId,
309
+ Projects: [
310
+ {
311
+ ProjectId: projectId,
312
+ ProjectRelativePath: projectRelativePath
313
+ }
314
+ ]
315
+ };
316
+ await this.fs.writeFile(this.fs.path.join(stagingDir, "SolutionStorage.json"), JSON.stringify(solutionStorage, null, 4));
317
+ const uipx = {
318
+ SolutionId: solutionId,
319
+ Projects: [
320
+ {
321
+ Type: "Flow",
322
+ ProjectRelativePath: projectRelativePath,
323
+ Id: projectId
324
+ }
325
+ ]
326
+ };
327
+ await this.fs.writeFile(this.fs.path.join(stagingDir, `${projectName}Solution.uipx`), JSON.stringify(uipx, null, 4));
328
+ }
329
+ async buildSolutionProjectDescriptors(uploadedProjects, solutionId, stagingDir, leadProjectName, leadEntryPoint) {
330
+ const descriptors = [];
331
+ for (const project of uploadedProjects) {
332
+ const projectStagingDir = this.fs.path.join(stagingDir, project.name);
333
+ const isLead = project.name === leadProjectName;
334
+ const projectType = isLead ? "Flow" : this.toWireProjectType(await this.readProjectTypeRaw(projectStagingDir));
335
+ if (projectType === undefined || projectType === "Agent") {
336
+ continue;
337
+ }
338
+ const fromEntryPoints = isLead ? leadEntryPoint : await this.readFirstEntryPointPath(projectStagingDir);
339
+ const entryPoint = fromEntryPoints ? this.normalizeEntryPoint(fromEntryPoints) : await this.deriveEntryPointFromBpmn(projectStagingDir);
340
+ descriptors.push({
341
+ name: project.name,
342
+ projectId: project.id,
343
+ projectType,
344
+ entryPoint,
345
+ solutionId
346
+ });
347
+ }
348
+ return descriptors;
349
+ }
350
+ async generateSiblingFlowPackage(projectStagingDir, hostProjectName) {
351
+ const [resolveError, flowFilePath] = await catchError(findProjectFlowFile(projectStagingDir));
352
+ if (resolveError || !flowFilePath) {
353
+ logger.warn(`No .flow found for sibling project ${projectStagingDir}; skipping BPMN generation.`);
354
+ return [];
355
+ }
356
+ const flowFileName = this.fs.path.basename(flowFilePath);
357
+ const { workflow: flowData } = await readFlowWorkflow(flowFilePath);
358
+ ensureProcessBindings(flowData);
359
+ const bpmnXml = await this.convertToBpmn(flowData, this.fs.path.dirname(flowFilePath));
360
+ const inlineAgentPackages = await packageInlineAgents(this.fs, projectStagingDir, flowData.nodes);
361
+ await this.writeFlowProjectPackage(projectStagingDir, flowData, bpmnXml, flowFileName, inlineAgentPackages);
362
+ await stageInlineAgentPackageFiles(this.fs, projectStagingDir, projectStagingDir, inlineAgentPackages, (source) => `Staged inline agent "${source}" for sibling Flow debug`);
363
+ logger.info(`Generated BPMN package for sibling flow "${flowFileName.replace(/\.flow$/i, "")}"`);
364
+ return buildInlineAgentDescriptors(flowData.nodes).map((agent) => ({
365
+ ...agent,
366
+ hostProjectName
367
+ }));
368
+ }
369
+ async writeFlowProjectPackage(projectDir, flowData, bpmnXml, flowFileName, inlineAgentPackages = []) {
370
+ const bpmnFileName = `${flowFileName.replace(/\.flow$/i, "")}.bpmn`;
371
+ await writeFlowWorkflow(this.fs.path.join(projectDir, flowFileName), flowData);
372
+ await this.fs.writeFile(this.fs.path.join(projectDir, bpmnFileName), bpmnXml);
373
+ const startEventId = extractStartEventId(bpmnXml);
374
+ const { entryPoints } = await writePackagingArtifactsDetailed(this.fs, projectDir, flowData.id, fileNodesToPackagingNodes(flowData.nodes), flowData.bindings ?? [], flowData.variables ?? {}, bpmnFileName, startEventId, flowFileName, flowData.definitions ?? [], {
375
+ additionalEntryPoints: inlineAgentPackages.map((agent) => agent.entryPoint),
376
+ additionalBindingsJsons: inlineAgentPackages.map((agent) => agent.bindingsJson)
377
+ });
378
+ await writeResolvedFlow(this.fs, projectDir, flowFileName.replace(/\.flow$/i, ""), flowData);
379
+ return { bpmnFileName, startEventId, entryPoints };
380
+ }
381
+ toWireProjectType(rawType) {
382
+ switch (rawType?.trim().toLowerCase()) {
383
+ case "agent":
384
+ return "Agent";
385
+ case "flow":
386
+ return "Flow";
387
+ case "workflow":
388
+ case "process":
389
+ return "Process";
390
+ case "processorchestration":
391
+ return "ProcessOrchestration";
392
+ case "api":
393
+ return "Api";
394
+ default:
395
+ return;
396
+ }
397
+ }
398
+ normalizeEntryPoint(entryPoint) {
399
+ return entryPoint.replace(/^\//, "").replace(/^content\//, "");
400
+ }
401
+ async readFirstEntryPointPath(projectDir) {
402
+ const path = this.fs.path.join(projectDir, "entry-points.json");
403
+ if (!await this.fs.exists(path)) {
404
+ return "";
405
+ }
406
+ const content = await this.fs.readFile(path, "utf-8");
407
+ if (!content) {
408
+ return "";
409
+ }
410
+ const [err, parsed] = catchError(() => JSON.parse(content));
411
+ const filePath = err ? undefined : parsed.entryPoints?.[0]?.filePath;
412
+ return typeof filePath === "string" ? filePath : "";
413
+ }
414
+ async deriveEntryPointFromBpmn(projectDir) {
415
+ const entries = await this.fs.readdir(projectDir);
416
+ const bpmnFile = entries.find((f) => f.endsWith(".bpmn"));
417
+ if (!bpmnFile) {
418
+ return "";
419
+ }
420
+ const content = await this.fs.readFile(this.fs.path.join(projectDir, bpmnFile), "utf-8");
421
+ if (!content) {
422
+ return "";
423
+ }
424
+ return `/${bpmnFile}#${extractStartEventId(content)}`;
425
+ }
426
+ async readProjectTypeRaw(projectDir) {
427
+ const path = this.fs.path.join(projectDir, "project.uiproj");
428
+ if (!await this.fs.exists(path)) {
429
+ return;
430
+ }
431
+ const content = await this.fs.readFile(path, "utf-8");
432
+ if (!content) {
433
+ return;
434
+ }
435
+ const [err, parsed] = catchError(() => JSON.parse(content));
436
+ const projectType = err ? undefined : parsed.ProjectType;
437
+ return typeof projectType === "string" ? projectType : undefined;
438
+ }
439
+ async executeProjectViaStudioWeb(projectPath, config, callbacks, pollInterval, options) {
440
+ const absoluteProjectPath = this.fs.path.resolve(projectPath);
441
+ const projectUiprojPath = this.fs.path.join(absoluteProjectPath, "project.uiproj");
442
+ if (!await this.fs.exists(projectUiprojPath)) {
443
+ throw new Error(`Not a valid flow project directory: missing project.uiproj in ${absoluteProjectPath}`);
444
+ }
445
+ const solutionFile = await this.assertEnclosingSolution(absoluteProjectPath);
446
+ await this.assertProjectRegisteredInSolution(absoluteProjectPath, solutionFile);
447
+ const projectUiprojContent = await this.fs.readFile(projectUiprojPath, "utf-8");
448
+ if (projectUiprojContent === null) {
449
+ throw new Error(`Failed to read project.uiproj in ${absoluteProjectPath}`);
450
+ }
451
+ const projectUiproj = JSON.parse(projectUiprojContent);
452
+ const projectName = projectUiproj.Name;
453
+ const safeName = projectName.replace(/[^a-zA-Z0-9_-]/g, "_");
454
+ const flowFilePath = await resolveProjectFlowFile(absoluteProjectPath);
455
+ const { workflow: flowData } = await readFlowWorkflow(flowFilePath);
456
+ assertNotInboundVoiceFlow(flowData);
457
+ if (options?.inputs && flowData.variables?.globals) {
458
+ for (const variable of flowData.variables.globals) {
459
+ if (Object.hasOwn(options.inputs, variable.id)) {
460
+ variable.defaultValue = options.inputs[variable.id];
461
+ }
462
+ }
463
+ }
464
+ ensureProcessBindings(flowData);
465
+ logger.info("Found .flow file, converting to BPMN...");
466
+ const bpmnXml = await this.convertToBpmn(flowData, this.fs.path.dirname(flowFilePath));
467
+ const solutionDir = this.fs.path.resolve(absoluteProjectPath, "..");
468
+ const stagingDir = this.fs.path.join(this.fs.env.tmpdir(), `.flow-debug-staging-${safeName}-${Date.now()}`);
469
+ await this.fs.mkdir(stagingDir);
470
+ let uisPath;
471
+ let entryPoint;
472
+ try {
473
+ const [uipxError, uipxResult] = await catchError(readUipxFile(this.fs, solutionDir));
474
+ if (uipxError) {
475
+ logger.warn(`Could not read .uipx: ${uipxError.message}. Falling back to flow-only upload.`);
476
+ }
477
+ const flowProjectRelDir = this.fs.path.basename(absoluteProjectPath);
478
+ if (uipxResult) {
479
+ await this.fs.writeFile(this.fs.path.join(stagingDir, uipxResult.uipxFileName), JSON.stringify(uipxResult.uipx, null, 4));
480
+ } else {
481
+ await this.writeSingleProjectSolutionMetadata(stagingDir, safeName, flowProjectRelDir);
482
+ }
483
+ const resourcesDir = this.fs.path.join(solutionDir, "resources");
484
+ if (await this.fs.exists(resourcesDir)) {
485
+ await this.fs.copyDirectory(resourcesDir, this.fs.path.join(stagingDir, "resources"));
486
+ }
487
+ const userProfileDir = this.fs.path.join(solutionDir, "userProfile");
488
+ if (await this.fs.exists(userProfileDir)) {
489
+ await this.fs.copyDirectory(userProfileDir, this.fs.path.join(stagingDir, "userProfile"));
490
+ }
491
+ const siblingInlineAgents = [];
492
+ if (uipxResult) {
493
+ for (const project of uipxResult.uipx.Projects) {
494
+ const projectDir = this.fs.path.dirname(project.ProjectRelativePath);
495
+ if (projectDir === flowProjectRelDir) {
496
+ continue;
497
+ }
498
+ const srcProjectPath = this.fs.path.join(solutionDir, projectDir);
499
+ if (await this.fs.exists(srcProjectPath)) {
500
+ const siblingStagingDir = this.fs.path.join(stagingDir, projectDir);
501
+ await this.fs.copyDirectory(srcProjectPath, siblingStagingDir);
502
+ if (project.Type === "Flow") {
503
+ const [packageError, agents] = await catchError(this.generateSiblingFlowPackage(siblingStagingDir, projectDir));
504
+ if (packageError) {
505
+ logger.warn(`Could not package sibling Flow "${projectDir}": ${packageError.message}. Continuing.`);
506
+ } else {
507
+ siblingInlineAgents.push(...agents);
508
+ }
509
+ }
510
+ logger.info(`Included project "${projectDir}" (${project.Type}) in solution package`);
511
+ } else {
512
+ logger.warn(`Project directory not found: ${srcProjectPath} — skipping`);
513
+ }
514
+ }
515
+ }
516
+ const stagingProjectDir = this.fs.path.join(stagingDir, flowProjectRelDir);
517
+ await this.fs.mkdir(stagingProjectDir);
518
+ await this.fs.writeFile(this.fs.path.join(stagingProjectDir, "project.uiproj"), projectUiprojContent);
519
+ const inlineAgentPackages = await packageInlineAgents(this.fs, absoluteProjectPath, flowData.nodes);
520
+ const { bpmnFileName, startEventId, entryPoints } = await this.writeFlowProjectPackage(stagingProjectDir, flowData, bpmnXml, `${safeName}.flow`, inlineAgentPackages);
521
+ if (inlineAgentPackages.length > 0) {
522
+ await stageInlineAgentPackageFiles(this.fs, absoluteProjectPath, stagingProjectDir, inlineAgentPackages, (source) => `Staged inline agent "${source}" for debug`);
523
+ }
524
+ const inlineAgents = [
525
+ ...siblingInlineAgents,
526
+ ...buildInlineAgentDescriptors(flowData.nodes)
527
+ ];
528
+ const startNodeId = entryPoints[0]?.filePath.split("#")[1] ?? startEventId;
529
+ entryPoint = `/${bpmnFileName}#${startNodeId}`;
530
+ const [refreshError, refreshResult] = await catchError(import("./index-w0z4s69j.js").then((mod) => mod.resourceRefreshAsync(stagingDir)));
531
+ if (refreshError) {
532
+ logger.warn(`Resource refresh threw before debug: ${refreshError.message}. Continuing without generated overwrites.`);
533
+ } else if (refreshResult.ok) {
534
+ logger.info(`Resource refresh for debug: imported ${refreshResult.imported}, created ${refreshResult.created}.`);
535
+ for (const warning of refreshResult.warnings) {
536
+ logger.warn(warning);
537
+ }
538
+ } else {
539
+ logger.warn(`Resource refresh skipped before debug: ${refreshResult.message}. Continuing.`);
540
+ }
541
+ logger.info("Building solution package (all projects)...");
542
+ uisPath = await buildSolutionPackageFromDir(this.fs, stagingDir);
543
+ logger.info("Looking for .uipx solution file...");
544
+ const solutionInfo = await findSolutionFile(this.fs, absoluteProjectPath);
545
+ const existingSolutionId = solutionInfo?.solutionId;
546
+ const apiConfig = {
547
+ baseUrl: config.baseUrl,
548
+ organizationId: config.organizationId,
549
+ tenantName: config.tenantName,
550
+ tenantId: config.tenantId,
551
+ authToken: config.authToken,
552
+ organizationUnitId: config.organizationUnitId
553
+ };
554
+ const folderInfo = config.userProvidedFolderId !== undefined ? await getFolderInfoById(apiConfig, config.userProvidedFolderId) : await getPersonalFolderInfo(apiConfig);
555
+ const uploadAndPatch = async () => {
556
+ const importResult = await uploadOrOverwriteSolution(apiConfig, config.organizationName, uisPath, existingSolutionId, this.fs);
557
+ const patchedCount = await patchConnectionOverwrites(apiConfig, config.organizationName, importResult.id, solutionDir, folderInfo, this.fs);
558
+ if (patchedCount > 0) {
559
+ logger.info(`Patched ${patchedCount} connection overwrite(s) on Studio Web`);
560
+ }
561
+ return importResult;
562
+ };
563
+ if (options?.uploadOnly) {
564
+ const importResult = await uploadAndPatch();
565
+ await updateSolutionFile(this.fs, absoluteProjectPath, importResult.id);
566
+ const project = importResult.projects.find((candidate) => candidate.name === projectName) ?? importResult.projects[0];
567
+ const studioWebUrl = buildStudioWebDesignerUrl({
568
+ baseUrl: apiConfig.baseUrl,
569
+ organizationName: config.organizationName,
570
+ projectId: project.id,
571
+ solutionId: importResult.id
572
+ });
573
+ logger.info("Uploaded without starting a debug session — only a chat UI can drive this flow.");
574
+ callbacks?.onStudioWebUrl?.(studioWebUrl);
575
+ return {
576
+ uploadedOnly: true,
577
+ solutionId: importResult.id,
578
+ studioWebUrl
579
+ };
580
+ }
581
+ const result = await uploadAndDebugSolution({
582
+ upload: uploadAndPatch,
583
+ onSolutionId: (id) => updateSolutionFile(this.fs, absoluteProjectPath, id),
584
+ projectName,
585
+ entryPoint,
586
+ projectType: "Flow",
587
+ apiConfig,
588
+ organizationName: config.organizationName,
589
+ callbacks,
590
+ pollInterval,
591
+ maxPolls: options?.maxPolls ?? 300,
592
+ beginSessionPayload: options?.inputs ? JSON.stringify(options.inputs) : undefined,
593
+ folder: { key: folderInfo.key, id: folderInfo.id },
594
+ requireDebugPreparation: true,
595
+ inlineAgents,
596
+ buildSolutionProjects: (uploadedProjects, solutionId) => this.buildSolutionProjectDescriptors(uploadedProjects, solutionId, stagingDir, projectName, entryPoint)
597
+ });
598
+ const outputs = await fetchOutputVariables(apiConfig, result.instanceId, result.finalStatus);
599
+ return { ...result, folderKey: folderInfo.key, ...outputs };
600
+ } finally {
601
+ const [cleanupErr] = await catchError((async () => {
602
+ if (uisPath)
603
+ await this.fs.rm(uisPath);
604
+ await this.fs.rm(stagingDir, { recursive: true });
605
+ })());
606
+ if (cleanupErr) {
607
+ logger.warn(`Cleanup failed: ${cleanupErr.message}`);
608
+ }
609
+ }
610
+ }
611
+ async executeViaStudioWeb(filePath, config, callbacks, pollInterval, options) {
612
+ const inputs = options?.inputs;
613
+ const dotIndex = filePath.lastIndexOf(".");
614
+ const ext = dotIndex >= 0 ? filePath.slice(dotIndex).toLowerCase() : "";
615
+ if (ext !== ".flow" && ext !== ".bpmn") {
616
+ throw new Error(`Unsupported file type "${ext}". Only .flow and .bpmn files are supported.`);
617
+ }
618
+ let bpmnXml;
619
+ let projectDir;
620
+ let projectName;
621
+ let entryPointBpmnFile;
622
+ let startEventId;
623
+ if (ext === ".flow") {
624
+ logger.info("Reading .flow file...");
625
+ const absolutePath = this.fs.path.resolve(filePath);
626
+ if (!await this.fs.exists(absolutePath)) {
627
+ throw new Error(`File not found: ${absolutePath}`);
628
+ }
629
+ const { workflow: flowData } = await readFlowWorkflow(absolutePath);
630
+ if (inputs && flowData.variables?.globals) {
631
+ for (const variable of flowData.variables.globals) {
632
+ if (Object.hasOwn(inputs, variable.id)) {
633
+ variable.defaultValue = inputs[variable.id];
634
+ }
635
+ }
636
+ }
637
+ const flowFileContent = JSON.stringify(inMemoryWorkflowToFileFormat(flowData), null, 2);
638
+ logger.info("Converting .flow to BPMN...");
639
+ bpmnXml = await this.convertToBpmn(flowData, this.fs.path.dirname(absolutePath));
640
+ startEventId = extractStartEventId(bpmnXml);
641
+ logger.info("Generating project files...");
642
+ projectDir = await this.generateProjectFiles(flowData, bpmnXml, flowFileContent, startEventId);
643
+ projectName = flowData.name.replace(/[^a-zA-Z0-9_-]/g, "_");
644
+ entryPointBpmnFile = `${projectName}.bpmn`;
645
+ } else {
646
+ bpmnXml = await this.readBpmnFile(filePath);
647
+ startEventId = extractStartEventId(bpmnXml);
648
+ projectName = this.fs.path.basename(filePath, ".bpmn");
649
+ const safeName = projectName.replace(/[^a-zA-Z0-9_-]/g, "_");
650
+ projectDir = this.fs.path.join(this.fs.env.tmpdir(), `.flow-debug-${safeName}-${Date.now()}`);
651
+ const safeMkdir = async (dir) => {
652
+ const [err] = await catchError(this.fs.mkdir(dir));
653
+ if (err && err.code !== "EEXIST") {
654
+ throw err;
655
+ }
656
+ };
657
+ await safeMkdir(projectDir);
658
+ const bpmnFileName = `${safeName}.bpmn`;
659
+ const projectUiproj = {
660
+ Name: projectName,
661
+ ProjectType: "Flow"
662
+ };
663
+ await this.fs.writeFile(this.fs.path.join(projectDir, "project.uiproj"), JSON.stringify(projectUiproj, null, 2));
664
+ const packagingNodes = [
665
+ {
666
+ id: startEventId,
667
+ type: "core.trigger.manual",
668
+ typeVersion: "1.0",
669
+ display: { label: "Manual trigger" },
670
+ inputs: {
671
+ entryPointId: crypto.randomUUID()
672
+ }
673
+ }
674
+ ];
675
+ await writePackagingArtifacts(this.fs, projectDir, crypto.randomUUID(), packagingNodes, [], {}, bpmnFileName, startEventId);
676
+ await this.fs.writeFile(this.fs.path.join(projectDir, `${safeName}.bpmn`), bpmnXml);
677
+ projectName = safeName;
678
+ entryPointBpmnFile = `${safeName}.bpmn`;
679
+ }
680
+ logger.info("Building solution package...");
681
+ const uisPath = await this.buildSolutionPackage(projectDir, projectName);
682
+ const apiConfig = {
683
+ baseUrl: config.baseUrl,
684
+ organizationId: config.organizationId,
685
+ tenantName: config.tenantName,
686
+ tenantId: config.tenantId,
687
+ authToken: config.authToken,
688
+ organizationUnitId: config.organizationUnitId
689
+ };
690
+ const entryPoint = `/${entryPointBpmnFile}#${startEventId}`;
691
+ const result = await uploadAndDebugSolution({
692
+ upload: () => uploadOrOverwriteSolution(apiConfig, config.organizationName, uisPath, undefined, this.fs),
693
+ projectName,
694
+ entryPoint,
695
+ projectType: "Flow",
696
+ apiConfig,
697
+ organizationName: config.organizationName,
698
+ callbacks,
699
+ pollInterval,
700
+ maxPolls: options?.maxPolls ?? 300,
701
+ beginSessionPayload: inputs ? JSON.stringify(inputs) : undefined
702
+ });
703
+ const outputs = await fetchOutputVariables(apiConfig, result.instanceId, result.finalStatus);
704
+ return { ...result, ...outputs };
705
+ }
706
+ }
707
+ async function fetchOutputVariables(apiConfig, instanceId, finalStatus) {
708
+ logger.info("Fetching output variables...");
709
+ const [error, variables] = await catchError(fetchDebugInstanceVariables(apiConfig, instanceId, isSuccessfulDebugStatus(finalStatus) ? undefined : { delays: [] }));
710
+ if (!error) {
711
+ return { variables };
712
+ }
713
+ if (error instanceof DebugVariablesFetchFailedError) {
714
+ logger.warn(`Could not fetch output variables after ${error.details.attempts} attempt(s): ${error.details.message}. ` + "The run completed; its outputs are unknown, not empty.");
715
+ return { variablesError: error.details };
716
+ }
717
+ logger.warn(`Could not fetch output variables: ${error.message}`);
718
+ return {
719
+ variablesError: {
720
+ message: error.message,
721
+ attempts: 1,
722
+ traceIds: [],
723
+ endpoint: `/api/v1/debug-instances/${encodeURIComponent(instanceId)}/variables`
724
+ }
725
+ };
726
+ }
727
+ export {
728
+ FLOW_DEBUG_INBOUND_VOICE_MESSAGE,
729
+ FLOW_DEBUG_MISSING_SOLUTION_INSTRUCTIONS,
730
+ FLOW_DEBUG_MISSING_SOLUTION_MESSAGE,
731
+ FLOW_DEBUG_UNREGISTERED_PROJECT_MESSAGE,
732
+ FlowDebugService,
733
+ InboundVoiceDebugError,
734
+ MissingSolutionWrapperError,
735
+ UnregisteredProjectError,
736
+ assertNotInboundVoiceFlow,
737
+ buildFlowDebugInboundVoiceInstructions,
738
+ buildFlowDebugUnregisteredProjectInstructions
739
+ };
740
+
741
+ //# debugId=FB99027EA78A585E64756E2164756E21