@uipath/case-tool 1.206.0-preview.306 → 1.207.0-preview.307

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 (155) hide show
  1. package/README.md +7 -90
  2. package/dist/THIRD-PARTY-NOTICES.md +164 -9
  3. package/dist/{authoring-wt5ngnjb.js → authoring-qqev46bh.js} +233 -63
  4. package/dist/{bindings-v2-x100hvcy.js → bindings-v2-wjgg92tj.js} +4 -4
  5. package/dist/{browser-strategy-627rrg7z.js → browser-strategy-qc6htsnf.js} +1 -1
  6. package/dist/{business-rule-export-pggs7x01.js → business-rule-export-56a4wtat.js} +2 -2
  7. package/dist/{carry-forward-gxsadrqb.js → carry-forward-tj5yrqf6.js} +6 -6
  8. package/dist/{case-api-a6v5beat.js → case-api-bfwmvkb8.js} +24 -28
  9. package/dist/{case-bindings-service-9zemt0r2.js → case-bindings-service-5r7c70kz.js} +5 -5
  10. package/dist/case-catalog-h4fjn6q3.js +304 -0
  11. package/dist/{case-debug-solution-projects-r60m9e6a.js → case-debug-solution-projects-b2rsts1n.js} +2 -2
  12. package/dist/{case-debug-studio-web-service-my6vezsd.js → case-debug-studio-web-service-39gj6045.js} +10 -9
  13. package/dist/{case-described-io-service-8dw21x2y.js → case-described-io-service-ddsvkz8w.js} +5 -5
  14. package/dist/{case-event-trigger-bindings-pmad4dev.js → case-event-trigger-bindings-8nd78j4e.js} +5 -5
  15. package/dist/{case-format-service-xjvnx3jd.js → case-format-service-4mzszgfb.js} +2 -2
  16. package/dist/case-pack-service-17rj6kqt.js +297 -0
  17. package/dist/{case-splice-service-8deak994.js → case-splice-service-tpp2syvn.js} +7 -7
  18. package/dist/{case-validate-service-pesq63n9.js → case-validate-service-m2kk0fme.js} +146 -38
  19. package/dist/{connector-enrichment-service-e0z27bhh.js → connector-enrichment-service-s5y68svm.js} +26 -25
  20. package/dist/{connector-library-1yw5r47w.js → connector-library-844myxz2.js} +20 -6
  21. package/dist/{connector-lookup-service-rpmsy37q.js → connector-lookup-service-g5qw6a1n.js} +8 -8
  22. package/dist/{connector-task-shape-bgywpbqc.js → connector-task-shape-s2zny4gf.js} +3 -3
  23. package/dist/{de-AI7ML6JM-km47f8k4.js → de-B6IFKV43-9sk50xx0.js} +164 -2
  24. package/dist/{de-2BEKRUMY-x4dx0nn9.js → de-HF4GJ4EK-xrrajtht.js} +1277 -10
  25. package/dist/{debug-service-tm92ws5e.js → debug-service-hf2wb4tw.js} +9 -4
  26. package/dist/{embedded-file-reader-pxpwcq3n.js → embedded-file-reader-k94wt612.js} +16 -16
  27. package/dist/{en-LAVDF7IQ-yzy20n6d.js → en-5JIPZTS5-c68n8taw.js} +4 -2
  28. package/dist/{en-X6T4SP2Y-xm47mf18.js → en-ETY46SDS-far9tmsf.js} +66 -2
  29. package/dist/{enrichment-service-hzsn1aqp.js → enrichment-service-dm5kvwhy.js} +17 -17
  30. package/dist/{es-SPNKTD5Y-vw5cbgv5.js → es-AQW6PFIU-q2mz247f.js} +164 -2
  31. package/dist/{es-7ZTQTGKN-11sj0yjx.js → es-IYP2OLUY-98xsbyd5.js} +1271 -10
  32. package/dist/{es-MX-IHGRIEWH-g63p0gb4.js → es-MX-D2MN3U37-0y5q0nbe.js} +1276 -10
  33. package/dist/{es-MX-7KJZPEQN-1fq0a9jr.js → es-MX-KWITVBWE-w49gknha.js} +164 -2
  34. package/dist/{first-party-service-6b9ajm57.js → first-party-service-qfg2m05s.js} +1 -1
  35. package/dist/{fr-7ZDL4MVO-pd27vwh6.js → fr-NISALSPL-vzfmygd7.js} +1277 -10
  36. package/dist/{fr-AXJGUT53-hdg3pmd4.js → fr-RNWK2TMC-dpyzj366.js} +164 -2
  37. package/dist/{index-0m89asqv.js → index-59sh1kv0.js} +129 -76
  38. package/dist/index-b3n9b1bf.js +36 -0
  39. package/dist/{index-amqqhge1.js → index-ewg6ygg0.js} +1 -1
  40. package/dist/{index-j2gw61z0.js → index-r16ndadh.js} +3030 -764
  41. package/dist/{index-nj3axvya.js → index-rk82650j.js} +7 -5
  42. package/dist/{index-pg9wmyrf.js → index-t6fnts8a.js} +2 -2
  43. package/dist/index-wkmh1h6w.js +26 -0
  44. package/dist/{index-v8jen5rh.js → index-xy5fcn8e.js} +4 -4
  45. package/dist/{index-21kns9qg.js → index-y7v9rkq9.js} +1 -1
  46. package/dist/index.js +13 -11
  47. package/dist/init-entry-points-52kvvbg9.js +15 -0
  48. package/dist/input-reader-zr71xcm9.js +13 -0
  49. package/dist/integration-service-fetcher-n6d0dwba.js +68 -0
  50. package/dist/{ja-C7GZV6YP-hvtbngr5.js → ja-DH4I3GEF-ywyhhppa.js} +164 -2
  51. package/dist/{ja-LGAM5HKR-sgrtjqjh.js → ja-HTS2Q4YG-4ahnq47y.js} +1277 -10
  52. package/dist/{known-types-gak9by1w.js → known-types-a5d0evdm.js} +2 -2
  53. package/dist/{ko-7B4SUZB7-c8wr20sc.js → ko-3JFGTMNY-qnf1bnef.js} +1271 -10
  54. package/dist/{ko-Q24HSSL4-5vn55pte.js → ko-R5BCWVO7-whzgmh6q.js} +164 -2
  55. package/dist/library-option-pbvkt66g.js +13 -0
  56. package/dist/{localSolutionDiscovery-9pj8mzye.js → localSolutionDiscovery-5sqz9dkr.js} +5 -5
  57. package/dist/manifest-rhee8kem.js +32 -0
  58. package/dist/{node-strategy-2mqzg36t.js → node-strategy-aaf2qe6c.js} +2 -2
  59. package/dist/{node-sync-service-zvwk08cj.js → node-sync-service-phye3746.js} +21 -15
  60. package/dist/{out-target-gtg3we44.js → out-target-02x6x6nk.js} +5 -5
  61. package/dist/{packager-tool-h2ar8xf8.js → packager-tool-00ck60cc.js} +25 -24
  62. package/dist/{packager-tool-388vyja1.js → packager-tool-0gmnk7sb.js} +2 -2
  63. package/dist/{packager-tool-fcektt1g.js → packager-tool-0nbcqyvp.js} +10 -9
  64. package/dist/{packager-tool-wg91yz70.js → packager-tool-1jtrz02q.js} +61 -11
  65. package/dist/packager-tool-1yew22sn.js +9 -0
  66. package/dist/{packager-tool-1hpd2gmh.js → packager-tool-225b9qhq.js} +1 -1
  67. package/dist/{packager-tool-p0rdmmvk.js → packager-tool-2xemp3b1.js} +2 -2
  68. package/dist/packager-tool-34ttsx9q.js +18 -0
  69. package/dist/{packager-tool-3zy717ga.js → packager-tool-36vkdb3h.js} +2 -2
  70. package/dist/{packager-tool-cqkbf2fg.js → packager-tool-3hzsw5r7.js} +906 -41
  71. package/dist/packager-tool-3k5j706w.js +73 -0
  72. package/dist/{packager-tool-8h6tqbps.js → packager-tool-41j8ppy2.js} +59 -34
  73. package/dist/{packager-tool-scy94jyb.js → packager-tool-4seehsme.js} +2 -72
  74. package/dist/{packager-tool-es77jvky.js → packager-tool-4w7nzx18.js} +360 -44
  75. package/dist/{packager-tool-4avchhz8.js → packager-tool-57970zfm.js} +12 -7
  76. package/dist/{packager-tool-bjt8b2nz.js → packager-tool-5s476jdt.js} +13 -13
  77. package/dist/{packager-tool-8n13ny0q.js → packager-tool-70a6y6t1.js} +3393 -3092
  78. package/dist/{packager-tool-0xj79bbd.js → packager-tool-8kcwawyg.js} +13 -4
  79. package/dist/{packager-tool-wy3a65rx.js → packager-tool-bw4fsdq4.js} +27 -13
  80. package/dist/{packager-tool-dn9d4ywm.js → packager-tool-c0pavv0s.js} +66 -10
  81. package/dist/packager-tool-c9h0rwgv.js +31 -0
  82. package/dist/{packager-tool-t8qx6hvn.js → packager-tool-dv2vtyg0.js} +4 -4
  83. package/dist/{packager-tool-3r23qsca.js → packager-tool-ef43cy32.js} +213 -231
  84. package/dist/{packager-tool-5w0gjcck.js → packager-tool-engs9gvj.js} +1 -1
  85. package/dist/{packager-tool-stdwmgvd.js → packager-tool-exrjwmew.js} +202 -83
  86. package/dist/{task-type-declaration-yhczvj05.js → packager-tool-f9n5mk1c.js} +8 -12
  87. package/dist/{packager-tool-b2q8m9pq.js → packager-tool-fspmvh6g.js} +5 -4
  88. package/dist/packager-tool-geh2qybm.js +179 -0
  89. package/dist/{packager-tool-17b466mr.js → packager-tool-hrd44w8g.js} +7561 -6408
  90. package/dist/{packager-tool-snesn0bt.js → packager-tool-j1etnthk.js} +19 -14
  91. package/dist/{packager-tool-k871wgpe.js → packager-tool-j53d4vv1.js} +18 -4
  92. package/dist/{packager-tool-6ewsbrnb.js → packager-tool-j8mnpsv8.js} +329 -149
  93. package/dist/{packager-tool-k9z8yg4f.js → packager-tool-jepvcpj7.js} +22 -8
  94. package/dist/{packager-tool-7x1tmb8a.js → packager-tool-jydreskq.js} +1 -1
  95. package/dist/{packager-tool-r5pha7xq.js → packager-tool-k08k9g2y.js} +9 -9
  96. package/dist/{packager-tool-bg3tdpva.js → packager-tool-kh9gs4d5.js} +4 -2
  97. package/dist/{packager-tool-8467kcz9.js → packager-tool-m7s4n455.js} +120 -13
  98. package/dist/{packager-tool-5ytjvsfb.js → packager-tool-mbm0kd8w.js} +22 -22
  99. package/dist/{packager-tool-q26hncjr.js → packager-tool-n3r5apbb.js} +4 -2
  100. package/dist/packager-tool-n6h4bz4d.js +22 -0
  101. package/dist/{packager-tool-4t71ya0d.js → packager-tool-nqz24dxf.js} +254 -69
  102. package/dist/{packager-tool-ad8v11jd.js → packager-tool-p4c1g2sj.js} +1032 -819
  103. package/dist/{packager-tool-z070caqq.js → packager-tool-p64w2wrt.js} +30 -8
  104. package/dist/{packager-tool-xd1wbvay.js → packager-tool-pq61r2f1.js} +1 -1
  105. package/dist/{packager-tool-65vr263d.js → packager-tool-qzyb1eac.js} +1 -1
  106. package/dist/{packager-tool-5dptce1y.js → packager-tool-rzxnm9yj.js} +2 -2
  107. package/dist/{packager-tool-jjkypwge.js → packager-tool-s8jxyjgj.js} +15 -4
  108. package/dist/{init-entry-points-5xzn81bb.js → packager-tool-t6xwkhht.js} +12 -10
  109. package/dist/packager-tool-vmfd007q.js +27 -0
  110. package/dist/packager-tool-wvf6b31h.js +50 -0
  111. package/dist/{packager-tool-cdvrca04.js → packager-tool-x9z4krtr.js} +1036 -259
  112. package/dist/{packager-tool-z1fw9a8v.js → packager-tool-y69796fy.js} +19 -11
  113. package/dist/{packager-tool-f93rmjxx.js → packager-tool-z3k461re.js} +191 -154
  114. package/dist/{packager-tool-9m7jbv7t.js → packager-tool-zbfwp75m.js} +4 -4
  115. package/dist/{packager-tool-pq9xv4vq.js → packager-tool-zte9svtn.js} +11 -4
  116. package/dist/packager-tool.js +2 -2
  117. package/dist/{prepare-uip-ad7mfs8t.js → prepare-uip-2hcb65bn.js} +39 -6
  118. package/dist/{project-artifacts-pfcn65cg.js → project-artifacts-jaj95t3d.js} +1 -1
  119. package/dist/{pt-BR-BIUJXIPU-2sqzhr8y.js → pt-BR-6TBBEDQS-y3f2vg5d.js} +164 -2
  120. package/dist/{pt-BR-PHLFHMXZ-n6de4s7z.js → pt-BR-7H7BP5DT-z2e5aaj1.js} +1276 -10
  121. package/dist/{pt-N7ZTJT4W-d6c67xcn.js → pt-QWGSZKMD-m50nrkx8.js} +1271 -10
  122. package/dist/{pt-MHX6JGAX-xfgvdqwg.js → pt-ZSQC5RZ3-8kp3g1z5.js} +164 -2
  123. package/dist/{resolved-check-dz8eqrf6.js → resolved-check-kwgy875v.js} +1 -1
  124. package/dist/{resourcesSyncService-7j2m0tv0.js → resourcesSyncService-5gcxp8r5.js} +49 -26
  125. package/dist/{ro-FLNXVYJI-ytrwabg2.js → ro-B7G474JK-9k2jjk88.js} +1271 -10
  126. package/dist/{ro-3RKJNGJZ-xqj14e3d.js → ro-P33AQ6ZL-s92z1mgg.js} +164 -2
  127. package/dist/{rule-type-declaration-ze0saj5r.js → rule-type-declaration-a0fk7fe7.js} +12 -11
  128. package/dist/{sdd-convert-service-m8e615a1.js → sdd-convert-service-2ag3xjpj.js} +120 -621
  129. package/dist/{sdd-lookup-fwj6x364.js → sdd-lookup-wgm5ctnd.js} +2 -2
  130. package/dist/{sdd-resolve-service-dvg387wx.js → sdd-resolve-service-epygyb0n.js} +34 -6
  131. package/dist/{sdd-resolve-siblings-jc2788nm.js → sdd-resolve-siblings-bg4qmawq.js} +4 -4
  132. package/dist/solution-auth-yb1twb9d.js +11 -0
  133. package/dist/{solution-definition-helper-6zwd9hjs.js → solution-definition-helper-qjj01xh0.js} +1 -1
  134. package/dist/{solution-discovery-gfdqhgt2.js → solution-discovery-t0nkzpm3.js} +4 -4
  135. package/dist/{strict-case-rules-045kbjvv.js → strict-case-rules-x1sytx3e.js} +91 -46
  136. package/dist/{strict-entry-points-wd85a81g.js → strict-entry-points-anxeg692.js} +6 -6
  137. package/dist/strict-sdd-audit-z1bg2zr0.js +28 -0
  138. package/dist/taggable-variables-gc58xb0s.js +6094 -0
  139. package/dist/task-type-declaration-b0ejzhc6.js +15 -0
  140. package/dist/tool.js +13 -11
  141. package/dist/{tr-7AIZZWZ6-pdzp9n0p.js → tr-FX7WCKK2-x3rx9fjt.js} +1271 -10
  142. package/dist/{tr-PQLUUHPC-qsb7btxn.js → tr-XD73CQAA-tb2nrpyp.js} +164 -2
  143. package/dist/{trigger-enrichment-service-8nfz9p7h.js → trigger-enrichment-service-zn229s6b.js} +33 -32
  144. package/dist/{trigger-entry-point-id-4j9rk3kp.js → trigger-entry-point-id-hre2ewts.js} +1 -1
  145. package/dist/{zh-CN-OHNTHZRI-b0hjkfqn.js → zh-CN-GWP3B2EM-c07fm17a.js} +164 -2
  146. package/dist/{zh-CN-CN2ARPFS-e0p2qrxf.js → zh-CN-NCMB6YM5-drw9bnxg.js} +1271 -10
  147. package/dist/{zh-TW-E4D3Y6ZR-tn3bmzz5.js → zh-TW-2DLUOA7C-9khqnr4r.js} +164 -2
  148. package/dist/{zh-TW-7RUFEVFK-qd7myw31.js → zh-TW-UNIEJPLE-4vxzbphe.js} +1272 -11
  149. package/package.json +2 -2
  150. package/dist/case-pack-service-adhg30nq.js +0 -167
  151. package/dist/index-9fxd19z9.js +0 -35
  152. package/dist/input-reader-pjt4a914.js +0 -10
  153. package/dist/packager-tool-v11fx4dk.js +0 -25
  154. package/dist/solution-auth-a1p22hq1.js +0 -11
  155. package/dist/strict-sdd-audit-6es2j6fs.js +0 -26
@@ -1,36 +1,39 @@
1
1
  import {
2
2
  getLoginStatusAsync2
3
- } from "./packager-tool-dn9d4ywm.js";
3
+ } from "./packager-tool-c0pavv0s.js";
4
4
  import {
5
5
  getFileSystem2
6
- } from "./packager-tool-z070caqq.js";
6
+ } from "./packager-tool-p64w2wrt.js";
7
7
  import {
8
8
  catchError2,
9
9
  classifyThrownError,
10
10
  UIPATH_HOME_DIR2,
11
11
  hashContent
12
- } from "./packager-tool-6ewsbrnb.js";
12
+ } from "./packager-tool-j8mnpsv8.js";
13
13
  import {
14
- MANIFEST_FEATURE_FLAGS,
15
- ManifestClient
16
- } from "./packager-tool-17b466mr.js";
14
+ AGENT_TOOL_CONNECTOR_NODE_PREFIX2,
15
+ DEFAULT_FETCHERS2,
16
+ MANIFEST_FEATURE_FLAGS2,
17
+ ManifestClient2
18
+ } from "./packager-tool-hrd44w8g.js";
17
19
  import {
18
20
  searchWithFilters2
19
21
  } from "./packager-tool-xb16e3tz.js";
20
22
  import {
23
+ enrichConnectorNode2
24
+ } from "./packager-tool-41j8ppy2.js";
25
+ import {
26
+ selectMaestroNodes,
21
27
  listKnownSdkNodes2
22
- } from "./packager-tool-v11fx4dk.js";
28
+ } from "./packager-tool-c9h0rwgv.js";
23
29
  import {
24
30
  findSolutionFromCwd2,
25
31
  buildInSolutionNodes2,
26
32
  unknownContractWarning2
27
- } from "./packager-tool-bjt8b2nz.js";
33
+ } from "./packager-tool-5s476jdt.js";
28
34
  import {
29
35
  resolveMaestroRegistry
30
- } from "./packager-tool-3zy717ga.js";
31
- import {
32
- enrichConnectorNode
33
- } from "./packager-tool-8h6tqbps.js";
36
+ } from "./packager-tool-36vkdb3h.js";
34
37
 
35
38
  // ../maestro-sdk/src/registry/is-precache.ts
36
39
  async function resolveLibraryJsonDir() {
@@ -87,12 +90,14 @@ async function getPrecacheNode(nodeType, options) {
87
90
  }
88
91
 
89
92
  // ../maestro-sdk/src/registry/node-storage.ts
90
- var CACHE_FORMAT_VERSION = 7;
93
+ var CACHE_FORMAT_VERSION = 8;
91
94
  var INDEX_FILE = "index.json";
92
95
  var METADATA_FILE = "index.meta.json";
93
96
  var SEARCH_INDEX_FILE = "search-index.json";
94
97
  var ESSENTIALS_INDEX_FILE = "get-essentials.json";
95
98
  var WRITE_LOCK_FILE = ".index-write.lock";
99
+ var CONNECTOR_FETCH_FILE = "connector-nodes.json";
100
+ var MISS_REFRESH_PREFIX = "miss-refresh-";
96
101
  function nodeCacheScope(login) {
97
102
  const baseUrl = login.baseUrl?.trim().replace(/\/+$/, "");
98
103
  const organizationId = login.organizationId?.trim();
@@ -101,6 +106,49 @@ function nodeCacheScope(login) {
101
106
  return;
102
107
  return [baseUrl, organizationId, tenantId].join("|").toLowerCase();
103
108
  }
109
+ async function saveConnectorFetch(scope, options, result) {
110
+ const fs = getFileSystem2();
111
+ const dir = await resolveNodeStorageDir();
112
+ await fs.mkdir(dir);
113
+ await writeTempAndRename(fs, fs.path.join(dir, CONNECTOR_FETCH_FILE), JSON.stringify({
114
+ cacheVersion: CACHE_FORMAT_VERSION,
115
+ scope,
116
+ options,
117
+ fetchedAt: Date.now(),
118
+ result
119
+ }));
120
+ }
121
+ async function loadConnectorFetch(scope, options) {
122
+ const fs = getFileSystem2();
123
+ const path = fs.path.join(await resolveNodeStorageDir(), CONNECTOR_FETCH_FILE);
124
+ const [readError, content] = await catchError2(fs.readFile(path, "utf-8"));
125
+ if (readError || content === null)
126
+ return null;
127
+ const [parseError, record] = catchError2(() => JSON.parse(content));
128
+ if (parseError || !record || record.cacheVersion !== CACHE_FORMAT_VERSION || record.scope !== scope || record.options !== options || typeof record.fetchedAt !== "number" || !record.result) {
129
+ return null;
130
+ }
131
+ return { fetchedAt: record.fetchedAt, result: record.result };
132
+ }
133
+ async function missRefreshPath(fs, scope) {
134
+ const name = `${MISS_REFRESH_PREFIX}${(await hashContent(scope)).slice(0, 16)}.json`;
135
+ return fs.path.join(await resolveNodeStorageDir(), name);
136
+ }
137
+ async function loadMissRefreshAt(scope) {
138
+ const fs = getFileSystem2();
139
+ const [readError, content] = await catchError2(fs.readFile(await missRefreshPath(fs, scope), "utf-8"));
140
+ if (readError || content === null)
141
+ return;
142
+ const [parseError, record] = catchError2(() => JSON.parse(content));
143
+ if (parseError || record?.scope !== scope)
144
+ return;
145
+ return typeof record.at === "number" ? record.at : undefined;
146
+ }
147
+ async function saveMissRefreshAt(scope, at) {
148
+ const fs = getFileSystem2();
149
+ await fs.mkdir(await resolveNodeStorageDir());
150
+ await writeTempAndRename(fs, await missRefreshPath(fs, scope), JSON.stringify({ scope, at }));
151
+ }
104
152
  async function resolveNodeStorageDir() {
105
153
  const fs = getFileSystem2();
106
154
  return fs.path.join(fs.env.homedir(), UIPATH_HOME_DIR2, "nodes");
@@ -146,7 +194,7 @@ async function writeTempAndRename(fs, targetPath, content) {
146
194
  await fs.writeFile(tempPath, content);
147
195
  await fs.rename(tempPath, targetPath);
148
196
  }
149
- async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources) {
197
+ async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources, syncedAt) {
150
198
  const indexPath = fs.path.join(dir, INDEX_FILE);
151
199
  const searchIndexPath = fs.path.join(dir, SEARCH_INDEX_FILE);
152
200
  const essentialsIndexPath = fs.path.join(dir, ESSENTIALS_INDEX_FILE);
@@ -156,7 +204,7 @@ async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources) {
156
204
  const searchContent = JSON.stringify(createDerivedArtifact(buildSearchIndex(nodes), hash));
157
205
  const essentialsContent = JSON.stringify(createDerivedArtifact(buildEssentialsIndex(nodes), hash));
158
206
  const metadataContent = JSON.stringify({
159
- lastSync: Date.now(),
207
+ lastSync: syncedAt,
160
208
  nodeCount: nodes.length,
161
209
  hash,
162
210
  cacheVersion: CACHE_FORMAT_VERSION,
@@ -169,7 +217,7 @@ async function writeNodeArtifacts(fs, dir, nodes, scope, missingSources) {
169
217
  await writeTempAndRename(fs, metaPath, metadataContent);
170
218
  return nodes.length;
171
219
  }
172
- async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExistingSources = false) {
220
+ async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExistingSources = false, syncedAt = Date.now()) {
173
221
  const fs = getFileSystem2();
174
222
  const dir = await resolveNodeStorageDir();
175
223
  await fs.mkdir(dir);
@@ -190,7 +238,7 @@ async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExi
190
238
  await writeTempAndRename(fs, fs.path.join(dir, METADATA_FILE), JSON.stringify({
191
239
  ...rest,
192
240
  cacheVersion: CACHE_FORMAT_VERSION,
193
- lastSync: Date.now(),
241
+ lastSync: syncedAt,
194
242
  ...missingSources?.length && { missingSources }
195
243
  }));
196
244
  return {
@@ -200,7 +248,7 @@ async function commitNodeIndexUnderLock(nodes, scope, missingSources, protectExi
200
248
  }
201
249
  return {
202
250
  committed: true,
203
- nodeCount: await writeNodeArtifacts(fs, dir, nodes, scope, missingSources)
251
+ nodeCount: await writeNodeArtifacts(fs, dir, nodes, scope, missingSources, syncedAt)
204
252
  };
205
253
  })());
206
254
  const [releaseError] = await catchError2(releaseLock());
@@ -216,8 +264,8 @@ async function commitNodeIndex(nodes, scope, missingSources) {
216
264
  throw new Error("Unexpected refused node index commit");
217
265
  return result.nodeCount;
218
266
  }
219
- async function commitNodeIndexForReader(nodes, scope, missingSources) {
220
- return commitNodeIndexUnderLock(nodes, scope, missingSources, true);
267
+ async function commitNodeIndexForReader(nodes, scope, missingSources, syncedAt) {
268
+ return commitNodeIndexUnderLock(nodes, scope, missingSources, true, syncedAt);
221
269
  }
222
270
  async function loadScopedNodeIndex(scope) {
223
271
  const metadata = await loadIndexMetadata();
@@ -338,7 +386,7 @@ async function rederiveNodeIndexArtifacts() {
338
386
  const hash = await hashContent(JSON.stringify(nodes));
339
387
  const sameNodes = metadata !== null && metadata.hash === hash;
340
388
  const scope = sameNodes ? metadata.scope : undefined;
341
- return writeNodeArtifacts(fs, dir, nodes, scope, sameNodes ? metadata.missingSources : undefined);
389
+ return writeNodeArtifacts(fs, dir, nodes, scope, sameNodes ? metadata.missingSources : undefined, Date.now());
342
390
  })());
343
391
  const [releaseError] = await catchError2(releaseLock());
344
392
  if (rederiveError)
@@ -433,6 +481,23 @@ async function readLoginStatus() {
433
481
  const [loginError, loginStatus] = await catchError2(getLoginStatusAsync2());
434
482
  return loginError ? { loginStatus: "Not logged in" } : loginStatus;
435
483
  }
484
+ function hasRemoteSession(loginStatus) {
485
+ return loginStatus.loginStatus === "Logged in" && !!loginStatus.baseUrl && !!loginStatus.accessToken && !!loginStatus.tenantId && !!loginStatus.organizationId;
486
+ }
487
+ async function gatedNodeFailure2(nodeType) {
488
+ if (!hasRemoteSession(await readLoginStatus())) {
489
+ return {
490
+ message: `Node type '${nodeType}' is not in the built-in registry, and the tenant's nodes were not checked.`,
491
+ instructions: "Run 'uip login' and select a tenant, then run the command again.",
492
+ errorCode: "authentication_required"
493
+ };
494
+ }
495
+ return {
496
+ message: `Node type '${nodeType}' is not enabled for this tenant.`,
497
+ instructions: "Ask an admin to enable the feature flag for this node type, " + "or run `uip maestro flow registry list` to see every " + "known type with its `AvailableOnTenant` flag.",
498
+ errorCode: "not_enabled"
499
+ };
500
+ }
436
501
  function loginScope(loginStatus) {
437
502
  if (loginStatus.loginStatus !== "Logged in" || !loginStatus.accessToken) {
438
503
  return;
@@ -522,23 +587,51 @@ async function refreshNodes(loginStatus) {
522
587
  };
523
588
  }
524
589
  var ENABLED_MANIFEST_FLAGS = new Set([
525
- MANIFEST_FEATURE_FLAGS.EXTRACT_DOCUMENT,
526
- MANIFEST_FEATURE_FLAGS.CONVERSATION_TRIGGER,
527
- MANIFEST_FEATURE_FLAGS.CONVERSATIONAL_WAIT_FOR_MESSAGE,
528
- MANIFEST_FEATURE_FLAGS.CONVERSATIONAL_SEND_MESSAGE,
529
- MANIFEST_FEATURE_FLAGS.CONVERSATIONAL_GET_CONVERSATION_CONTEXT,
530
- MANIFEST_FEATURE_FLAGS.READ_ENTITY,
531
- MANIFEST_FEATURE_FLAGS.CREATE_ENTITY,
532
- MANIFEST_FEATURE_FLAGS.UPDATE_ENTITY,
533
- MANIFEST_FEATURE_FLAGS.DELETE_ENTITY,
534
- MANIFEST_FEATURE_FLAGS.READ_FILE,
535
- MANIFEST_FEATURE_FLAGS.CREATE_FILE
590
+ MANIFEST_FEATURE_FLAGS2.EXTRACT_DOCUMENT,
591
+ MANIFEST_FEATURE_FLAGS2.CONVERSATION_TRIGGER,
592
+ MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_WAIT_FOR_MESSAGE,
593
+ MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_SEND_MESSAGE,
594
+ MANIFEST_FEATURE_FLAGS2.CONVERSATIONAL_GET_CONVERSATION_CONTEXT,
595
+ MANIFEST_FEATURE_FLAGS2.READ_ENTITY,
596
+ MANIFEST_FEATURE_FLAGS2.CREATE_ENTITY,
597
+ MANIFEST_FEATURE_FLAGS2.UPDATE_ENTITY,
598
+ MANIFEST_FEATURE_FLAGS2.DELETE_ENTITY,
599
+ MANIFEST_FEATURE_FLAGS2.READ_FILE,
600
+ MANIFEST_FEATURE_FLAGS2.CREATE_FILE
536
601
  ]);
537
- async function pullRemoteNodes2(loginStatus) {
602
+ async function pullRemoteNodes2(loginStatus, options = {}) {
603
+ const pulled = await pullNodesForEveryRuntime(loginStatus, options);
604
+ return { ...pulled, nodes: selectMaestroNodes(pulled.nodes) };
605
+ }
606
+ function cachingConnectorFetcher(scope, reuse, onReuse = () => {}) {
607
+ return async (config, fetchOptions) => {
608
+ const key = JSON.stringify(fetchOptions);
609
+ if (reuse && scope !== undefined) {
610
+ const [, cached] = await catchError2(loadConnectorFetch(scope, key));
611
+ const age = cached ? Date.now() - cached.fetchedAt : -1;
612
+ if (cached && age >= 0 && age < CACHE_EXPIRATION) {
613
+ onReuse(cached.fetchedAt);
614
+ return cached.result;
615
+ }
616
+ }
617
+ const result = await DEFAULT_FETCHERS2.fetchConnectorNodes(config, fetchOptions);
618
+ if (scope !== undefined) {
619
+ await catchError2(saveConnectorFetch(scope, key, result));
620
+ }
621
+ return result;
622
+ };
623
+ }
624
+ async function pullNodesForEveryRuntime(loginStatus, options = {}) {
538
625
  loginStatus ??= await getLoginStatusAsync2();
539
- const client = new ManifestClient({
626
+ let connectorsFetchedAt;
627
+ const client = new ManifestClient2({
540
628
  baseUrl: loginStatus.baseUrl || "localhost",
541
- getFeatureFlag: (flag) => ENABLED_MANIFEST_FLAGS.has(flag)
629
+ getFeatureFlag: (flag) => ENABLED_MANIFEST_FLAGS.has(flag),
630
+ fetchers: {
631
+ fetchConnectorNodes: cachingConnectorFetcher(loginScope(loginStatus), options.reuseConnectors === true, (fetchedAt) => {
632
+ connectorsFetchedAt = fetchedAt;
633
+ })
634
+ }
542
635
  });
543
636
  if (loginStatus.loginStatus === "Expired" || loginStatus.loginStatus === "Refresh Failed") {
544
637
  const sessionError = new SessionExpiredError(loginStatus.loginStatus);
@@ -553,7 +646,7 @@ async function pullRemoteNodes2(loginStatus) {
553
646
  refreshError: sessionError
554
647
  };
555
648
  }
556
- if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl || !loginStatus.accessToken || !loginStatus.tenantId || !loginStatus.organizationId) {
649
+ if (!hasRemoteSession(loginStatus)) {
557
650
  const manifest = await client.getManifest({
558
651
  inlineAgentNodes: true
559
652
  });
@@ -578,12 +671,14 @@ async function pullRemoteNodes2(loginStatus) {
578
671
  }));
579
672
  if (!manifestError) {
580
673
  const nodes = diagnostics.manifest.nodes || [];
674
+ const syncedAt = connectorsFetchedAt !== undefined ? { syncedAt: Math.min(Date.now(), connectorsFetchedAt) } : {};
581
675
  if (diagnostics.failures.length === 0) {
582
676
  return {
583
677
  nodes,
584
678
  source: "authenticated",
585
679
  cacheable: true,
586
- scope: nodeCacheScope(loginStatus)
680
+ scope: nodeCacheScope(loginStatus),
681
+ ...syncedAt
587
682
  };
588
683
  }
589
684
  const failures = toPullFailures(diagnostics.failures);
@@ -594,7 +689,8 @@ async function pullRemoteNodes2(loginStatus) {
594
689
  source: "authenticated",
595
690
  cacheable: true,
596
691
  scope: nodeCacheScope(loginStatus),
597
- missingSources: failures
692
+ missingSources: failures,
693
+ ...syncedAt
598
694
  };
599
695
  }
600
696
  return {
@@ -616,22 +712,59 @@ async function pullRemoteNodes2(loginStatus) {
616
712
  refreshError: manifestError
617
713
  };
618
714
  }
715
+ function missingSourceNames(missingSources) {
716
+ return (missingSources ?? []).map((missing) => missing.source);
717
+ }
619
718
  async function getNodesWithCacheFallback() {
620
- const { nodes, failures, refreshError } = await loadCurrentTenantNodes2();
719
+ const { nodes, fromCache, failures, refreshError, missingSources } = await loadCurrentTenantNodes2();
621
720
  if (failures?.length) {
622
721
  throw new TenantManifestInvalidError2(failures, nodes);
623
722
  }
624
723
  if (refreshError) {
625
724
  throw new TenantManifestUnavailableError2(refreshError, nodes);
626
725
  }
627
- return nodes;
726
+ return {
727
+ result: nodes,
728
+ missingSources: missingSourceNames(missingSources),
729
+ fromCache
730
+ };
731
+ }
732
+ var CONNECTOR_CATALOG_PREFIXES = [
733
+ "uipath.connector.",
734
+ AGENT_TOOL_CONNECTOR_NODE_PREFIX2
735
+ ];
736
+ function isConnectorCatalogType(lowerNodeType) {
737
+ return CONNECTOR_CATALOG_PREFIXES.some((prefix) => lowerNodeType.startsWith(prefix));
738
+ }
739
+ var MISS_REFRESH_INTERVAL = 60 * 1000;
740
+ async function refreshOnMiss(reuseConnectors) {
741
+ const scope = loginScope(await readLoginStatus());
742
+ if (scope === undefined)
743
+ return null;
744
+ const [, last] = await catchError2(loadMissRefreshAt(scope));
745
+ const age = typeof last === "number" ? Date.now() - last : -1;
746
+ if (age >= 0 && age < MISS_REFRESH_INTERVAL) {
747
+ return null;
748
+ }
749
+ await catchError2(saveMissRefreshAt(scope, Date.now()));
750
+ const [error, refreshed] = await catchError2(loadCurrentTenantNodes2({ force: true, reuseConnectors }));
751
+ if (error || refreshed.failures?.length || refreshed.refreshError) {
752
+ return null;
753
+ }
754
+ return {
755
+ result: refreshed.nodes,
756
+ missingSources: missingSourceNames(refreshed.missingSources)
757
+ };
628
758
  }
629
759
  async function loadFreshDerivedIndex(load) {
630
760
  const scope = loginScope(await readLoginStatus());
631
761
  if (scope === undefined)
632
762
  return null;
633
763
  const [, cached] = await catchError2(load(scope));
634
- return cached && isFreshFor(cached.metadata, scope) ? cached.nodes : null;
764
+ return cached && isFreshFor(cached.metadata, scope) ? {
765
+ result: cached.nodes,
766
+ missingSources: missingSourceNames(cached.metadata.missingSources)
767
+ } : null;
635
768
  }
636
769
  async function loadCurrentTenantNodes2(options = {}) {
637
770
  const loginStatus = await readLoginStatus();
@@ -639,12 +772,19 @@ async function loadCurrentTenantNodes2(options = {}) {
639
772
  if (scope !== undefined) {
640
773
  const [, scoped] = await catchError2(loadScopedNodeIndex(scope));
641
774
  if (!options.force && scoped && isFreshFor(scoped.metadata, scope)) {
642
- return { nodes: scoped.nodes, fromCache: true, source: "cache" };
775
+ return {
776
+ nodes: scoped.nodes,
777
+ fromCache: true,
778
+ source: "cache",
779
+ missingSources: scoped.metadata.missingSources
780
+ };
643
781
  }
644
782
  }
645
- const pullResult = await pullRemoteNodes2(loginStatus);
783
+ const pullResult = await pullRemoteNodes2(loginStatus, {
784
+ reuseConnectors: options.reuseConnectors
785
+ });
646
786
  if (pullResult.cacheable) {
647
- const [commitError, commit] = await catchError2(commitNodeIndexForReader(pullResult.nodes, pullResult.scope, pullResult.missingSources));
787
+ const [commitError, commit] = await catchError2(commitNodeIndexForReader(pullResult.nodes, pullResult.scope, pullResult.missingSources, pullResult.syncedAt));
648
788
  const unavailableSources = commit && !commit.committed ? commit.newlyMissingSources : commitError ? pullResult.missingSources : undefined;
649
789
  if (unavailableSources?.length) {
650
790
  if (commit && !commit.committed && scope !== undefined) {
@@ -675,7 +815,8 @@ async function loadCurrentTenantNodes2(options = {}) {
675
815
  source: pullResult.source,
676
816
  info: pullResult.info,
677
817
  failures: pullResult.failures,
678
- refreshError: pullResult.refreshError
818
+ refreshError: pullResult.refreshError,
819
+ missingSources: pullResult.missingSources
679
820
  };
680
821
  }
681
822
  async function getLocalSolutionSnapshot2() {
@@ -723,10 +864,14 @@ function findNodeByType2(nodes, nodeType) {
723
864
  async function listNodes2(options) {
724
865
  if (options?.local)
725
866
  return getLocalSolutionNodes();
867
+ return (await listNodesWithDiagnostics2()).result;
868
+ }
869
+ async function listNodesWithDiagnostics2() {
726
870
  const precacheEntries = await listPrecacheEntries();
727
- const registryCacheNodes = await getNodesWithCacheFallback();
871
+ const snapshot = await getNodesWithCacheFallback();
872
+ const registryCacheNodes = snapshot.result;
728
873
  if (precacheEntries.length === 0)
729
- return registryCacheNodes;
874
+ return snapshot;
730
875
  const byType = new Map;
731
876
  for (const entry of precacheEntries) {
732
877
  const key = entry.nodeType.toLowerCase();
@@ -751,7 +896,7 @@ async function listNodes2(options) {
751
896
  display: { label: entry.label }
752
897
  });
753
898
  }
754
- return merged;
899
+ return { result: merged, missingSources: snapshot.missingSources };
755
900
  }
756
901
  function unionWithKnownSdkNodes(tenantNodes) {
757
902
  const seen = new Set;
@@ -775,10 +920,29 @@ function unionWithKnownSdkNodes(tenantNodes) {
775
920
  return result;
776
921
  }
777
922
  async function loadSearchSummariesWithCacheFallback() {
778
- return await loadFreshDerivedIndex(loadScopedSearchIndex) ?? buildSearchIndex(await getNodesWithCacheFallback());
923
+ const cached = await loadFreshDerivedIndex(loadScopedSearchIndex);
924
+ if (cached)
925
+ return { ...cached, fromCache: true };
926
+ const snapshot = await getNodesWithCacheFallback();
927
+ return {
928
+ result: buildSearchIndex(snapshot.result),
929
+ missingSources: snapshot.missingSources,
930
+ fromCache: snapshot.fromCache
931
+ };
779
932
  }
780
- async function searchNodeSummariesWithAvailability2(keyword, filters) {
781
- const tenantNodes = await loadSearchSummariesWithCacheFallback();
933
+ async function searchNodeSummariesWithAvailabilityAndDiagnostics2(keyword, filters) {
934
+ const snapshot = await loadSearchSummariesWithCacheFallback();
935
+ const found = searchSummaries(snapshot.result, keyword, filters);
936
+ if (found.length > 0 || !snapshot.fromCache || !keyword && !filters) {
937
+ return { result: found, missingSources: snapshot.missingSources };
938
+ }
939
+ const refreshed = await refreshOnMiss(false);
940
+ return refreshed ? {
941
+ result: searchSummaries(buildSearchIndex(refreshed.result), keyword, filters),
942
+ missingSources: refreshed.missingSources
943
+ } : { result: found, missingSources: snapshot.missingSources };
944
+ }
945
+ function searchSummaries(tenantNodes, keyword, filters) {
782
946
  const tenantTypes = new Set(tenantNodes.map((node) => node.nodeType?.toLowerCase()).filter((type) => typeof type === "string"));
783
947
  const merged = tenantNodes.map((node) => ({
784
948
  node,
@@ -809,43 +973,64 @@ async function searchNodes2(keyword, options) {
809
973
  nodes = await getLocalSolutionNodes();
810
974
  } else {
811
975
  const tenantNodes = await getNodesWithCacheFallback();
812
- nodes = unionWithKnownSdkNodes(tenantNodes);
976
+ nodes = unionWithKnownSdkNodes(tenantNodes.result);
813
977
  }
814
978
  return filterNodesByKeyword2(nodes, keyword);
815
979
  }
816
980
  async function getNode2(nodeType, options) {
981
+ return (await getNodeWithDiagnostics(nodeType, options)).result;
982
+ }
983
+ async function getNodeWithDiagnostics(nodeType, options) {
817
984
  const lowerNodeType = nodeType.toLowerCase();
818
985
  if (!options?.local && lowerNodeType.startsWith("uipath.connector.")) {
819
986
  const precached = await getPrecacheNode(nodeType);
820
987
  if (precached)
821
- return precached;
988
+ return { result: precached, missingSources: [] };
822
989
  }
823
990
  if (!options?.local && isEssentialNodeType(nodeType)) {
824
991
  const essentials = await loadFreshDerivedIndex(loadScopedEssentialsIndex);
825
- const node = essentials?.find((node) => node.nodeType?.toLowerCase() === lowerNodeType) ?? null;
826
- if (node)
827
- return node;
992
+ const node = essentials?.result.find((node) => node.nodeType?.toLowerCase() === lowerNodeType) ?? null;
993
+ if (node) {
994
+ return {
995
+ result: node,
996
+ missingSources: essentials?.missingSources ?? []
997
+ };
998
+ }
828
999
  }
829
1000
  if (options?.local) {
830
- return findNodeByType2(await getLocalSolutionNodes(), nodeType);
1001
+ return {
1002
+ result: findNodeByType2(await getLocalSolutionNodes(), nodeType),
1003
+ missingSources: []
1004
+ };
831
1005
  }
832
- const [error, nodes] = await catchError2(getNodesWithCacheFallback());
1006
+ const [error, snapshot] = await catchError2(getNodesWithCacheFallback());
833
1007
  if (error) {
834
1008
  if (error instanceof TenantManifestInvalidError2 || error instanceof TenantManifestUnavailableError2) {
835
1009
  const ootbNode = findNodeByType2(error.ootbNodes, nodeType);
836
1010
  if (ootbNode)
837
- return ootbNode;
1011
+ return { result: ootbNode, missingSources: [] };
838
1012
  }
839
1013
  throw error;
840
1014
  }
841
- return findNodeByType2(nodes, nodeType);
1015
+ const node = findNodeByType2(snapshot.result, nodeType);
1016
+ if (node || !snapshot.fromCache || options?.refreshOnMiss === false) {
1017
+ return { result: node, missingSources: snapshot.missingSources };
1018
+ }
1019
+ const refreshed = await refreshOnMiss(!isConnectorCatalogType(lowerNodeType));
1020
+ return refreshed ? {
1021
+ result: findNodeByType2(refreshed.result, nodeType),
1022
+ missingSources: refreshed.missingSources
1023
+ } : { result: null, missingSources: snapshot.missingSources };
842
1024
  }
843
1025
  async function getNodeEnriched2(nodeType, connectionId, options) {
844
- const node = await getNode2(nodeType, options);
845
- if (!node) {
846
- return null;
847
- }
848
- return await enrichConnectorNode(node, connectionId);
1026
+ return (await getNodeEnrichedWithDiagnostics2(nodeType, connectionId, options)).result;
1027
+ }
1028
+ async function getNodeEnrichedWithDiagnostics2(nodeType, connectionId, options) {
1029
+ const snapshot = await getNodeWithDiagnostics(nodeType, options);
1030
+ return {
1031
+ result: snapshot.result ? await enrichConnectorNode2(snapshot.result, connectionId) : null,
1032
+ missingSources: snapshot.missingSources
1033
+ };
849
1034
  }
850
1035
  async function getLocalNodeEnriched2(nodeType, connectionId) {
851
1036
  const snapshot = await getLocalSolutionSnapshot2();
@@ -853,7 +1038,7 @@ async function getLocalNodeEnriched2(nodeType, connectionId) {
853
1038
  if (!node)
854
1039
  return { node: null };
855
1040
  return {
856
- node: await enrichConnectorNode(node, connectionId),
1041
+ node: await enrichConnectorNode2(node, connectionId),
857
1042
  warning: localContractWarning2(snapshot, [node])
858
1043
  };
859
1044
  }
@@ -863,11 +1048,11 @@ async function searchNodesWithFilters2(keyword, filters, options) {
863
1048
  nodes = await getLocalSolutionNodes();
864
1049
  } else {
865
1050
  const tenantNodes = await getNodesWithCacheFallback();
866
- nodes = unionWithKnownSdkNodes(tenantNodes);
1051
+ nodes = unionWithKnownSdkNodes(tenantNodes.result);
867
1052
  }
868
1053
  return searchWithFilters2(nodes, keyword, filters);
869
1054
  }
870
1055
 
871
- export { MANIFEST_VALIDATION_NEXT_STEP2, TenantManifestInvalidError2, isTenantManifestInvalidError2, TenantManifestUnavailableError2, isTenantManifestUnavailableError2, pullNodes2, pullRemoteNodes2, loadCurrentTenantNodes2, getLocalSolutionSnapshot2, localContractWarning2, filterNodesByKeyword2, findNodeByType2, listNodes2, searchNodeSummariesWithAvailability2, searchNodes2, getNode2, getNodeEnriched2, getLocalNodeEnriched2, searchNodesWithFilters2 };
1056
+ export { MANIFEST_VALIDATION_NEXT_STEP2, TenantManifestInvalidError2, isTenantManifestInvalidError2, TenantManifestUnavailableError2, isTenantManifestUnavailableError2, gatedNodeFailure2, pullNodes2, pullRemoteNodes2, loadCurrentTenantNodes2, getLocalSolutionSnapshot2, localContractWarning2, filterNodesByKeyword2, findNodeByType2, listNodes2, listNodesWithDiagnostics2, searchNodeSummariesWithAvailabilityAndDiagnostics2, searchNodes2, getNode2, getNodeEnriched2, getNodeEnrichedWithDiagnostics2, getLocalNodeEnriched2, searchNodesWithFilters2 };
872
1057
 
873
- //# debugId=BBA240B067D0BDAA64756E2164756E21
1058
+ //# debugId=208EE966687F1C1564756E2164756E21