@uipath/cli 1.205.0-preview.276 → 1.206.0-preview.279

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 (76) hide show
  1. package/dist/{applicationinsights-s28k1t0d.js → applicationinsights-pwe8sf3y.js} +1269 -1269
  2. package/dist/{browser-strategy-6atc7v8s.js → browser-strategy-p5fhwxqj.js} +6 -7
  3. package/dist/cli-q6fp9ccp.js +23 -0
  4. package/dist/contentStore-c51xqdn2.js +41 -0
  5. package/dist/environmentInfo-fn0za9jw.js +71 -0
  6. package/dist/feedbackPrompts-t1enxv1x.js +144 -0
  7. package/dist/handlers-93z27zrr.js +805 -0
  8. package/dist/index-16d4evd1.js +1051 -0
  9. package/dist/index-1vyte4ma.js +14 -0
  10. package/dist/index-21kns9qg.js +10 -0
  11. package/dist/{index-yhj4pgvt.js → index-2j7ss97f.js} +331 -2595
  12. package/dist/index-2k8rhmad.js +274 -0
  13. package/dist/{index-30618bjs.js → index-2mm750yx.js} +174 -234
  14. package/dist/{index-622x1qb5.js → index-3fvbddpw.js} +7092 -7092
  15. package/dist/{index-d3w0wn6k.js → index-5gce5wfd.js} +16 -16
  16. package/dist/index-5j0bfd3e.js +4744 -0
  17. package/dist/index-68xmrb9x.js +237 -0
  18. package/dist/index-6wj58qka.js +59 -0
  19. package/dist/index-898c4tfz.js +668 -0
  20. package/dist/index-8gr7ny79.js +365 -0
  21. package/dist/index-99emfvtm.js +13 -0
  22. package/dist/{index-pj3g8ftz.js → index-9db5vwx9.js} +2429 -1693
  23. package/dist/index-ayg25v46.js +151 -0
  24. package/dist/index-bf0e4evz.js +6180 -0
  25. package/dist/index-bpqx6f8h.js +92 -0
  26. package/dist/index-bpxh3fqv.js +392 -0
  27. package/dist/index-cc653qc1.js +1327 -0
  28. package/dist/{index-m5nwse9v.js → index-cj4v0jct.js} +21 -69
  29. package/dist/{index-469jgr1w.js → index-dsj3jrm0.js} +105 -106
  30. package/dist/{index-1yh8g550.js → index-epsr41wx.js} +8 -12
  31. package/dist/{index-yb4er9vd.js → index-jjejkkg4.js} +474 -528
  32. package/dist/index-kg1xrq51.js +171 -0
  33. package/dist/index-m8vqyv3g.js +72 -0
  34. package/dist/index-mzqm6xfh.js +45 -0
  35. package/dist/index-nsrrst23.js +44 -0
  36. package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
  37. package/dist/index-p9s0gyrw.js +72 -0
  38. package/dist/index-qadhm1gn.js +271 -0
  39. package/dist/index-qwbyt2q5.js +95 -0
  40. package/dist/index-rbna3w6k.js +200 -0
  41. package/dist/index-rr5hdtcy.js +95 -0
  42. package/dist/{index-qa9gftnj.js → index-xd2w5pct.js} +3 -3
  43. package/dist/index-xpdtagqw.js +30 -0
  44. package/dist/{index-925304r7.js → index-y085rpen.js} +29 -25
  45. package/dist/index-y5ncb93a.js +240 -0
  46. package/dist/index-y7d0cth0.js +93 -0
  47. package/dist/{index-hdxtgckw.js → index-z070caqq.js} +56 -12
  48. package/dist/index-zdqbp34f.js +14 -0
  49. package/dist/index.js +38 -36
  50. package/dist/install-3gw33jcf.js +558 -0
  51. package/dist/{jmespath-e4a59c8w.js → jmespath-ab6tdc42.js} +1 -1
  52. package/dist/js-yaml-0c4svjwq.js +36 -0
  53. package/dist/{mcp-jssaz3wr.js → mcp-s50h6d56.js} +236 -472
  54. package/dist/{node-strategy-ggx3nmyj.js → node-strategy-p1n8wr5s.js} +16 -19
  55. package/dist/project-context-285hydnd.js +94 -0
  56. package/dist/prompt-hxbzt92e.js +13 -0
  57. package/dist/{server-nfjr7xrb.js → server-gkr3c7hv.js} +28 -43
  58. package/dist/skillCatalog-fvw4wgw1.js +22 -0
  59. package/dist/skillsService-20es18vs.js +29 -0
  60. package/dist/{stdio-tmngemcz.js → stdio-kpsab5bz.js} +2 -4
  61. package/dist/{telemetry-drain-r92f0e4r.js → telemetry-drain-bw59e8f5.js} +8 -9
  62. package/dist/tree-j4w7p0pg.js +17 -0
  63. package/dist/updateService-pq7pkd42.js +522 -0
  64. package/dist/updateService.skills-4t1s7z45.js +22 -0
  65. package/dist/updateService.tools-f7tr6kc6.js +16 -0
  66. package/package.json +2 -2
  67. package/dist/cli-r7998zeh.js +0 -19
  68. package/dist/index-0gctz400.js +0 -17
  69. package/dist/index-2dp7m4r8.js +0 -9867
  70. package/dist/index-4cq44eth.js +0 -19427
  71. package/dist/index-7tshyfxx.js +0 -157
  72. package/dist/index-g8ck9tv6.js +0 -2
  73. package/dist/index-ngs0a2he.js +0 -15
  74. package/dist/index-yc4kw997.js +0 -13
  75. package/dist/js-yaml-69tsdrrf.js +0 -37
  76. package/dist/updateService-nrmb1tsc.js +0 -14
@@ -0,0 +1,274 @@
1
+ import {
2
+ getFileSystem2
3
+ } from "./index-z070caqq.js";
4
+ import {
5
+ catchError
6
+ } from "./index-9db5vwx9.js";
7
+ import {
8
+ REPO_URL2,
9
+ parseSkillMd2
10
+ } from "./index-cc653qc1.js";
11
+
12
+ // src/commands/skills/skillCatalog.ts
13
+ var SKILL_CATALOG_SCHEMA_VERSION = 1;
14
+ var SKILL_CATALOG_GENERATED_BY = "uipath-cli.skills.catalog";
15
+ var SKILL_CATALOG_MARKER = "<!-- Generated by uip skills catalog. Safe to overwrite. -->";
16
+ var SKILL_CATALOG_SKILL_NAME2 = "uipath-skill-catalog";
17
+ var SKILL_CATALOG_JSON = "skills.catalog.json";
18
+ var SKILL_CATALOG_README = "README.md";
19
+ var SKILL_CATALOG_INDEX = "INDEX.md";
20
+ var SEARCH_STOPWORDS = new Set([
21
+ "a",
22
+ "an",
23
+ "and",
24
+ "for",
25
+ "in",
26
+ "of",
27
+ "on",
28
+ "or",
29
+ "the",
30
+ "to",
31
+ "with"
32
+ ]);
33
+ function asRecord(value) {
34
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
35
+ return;
36
+ }
37
+ return value;
38
+ }
39
+ function markdownEscape(value) {
40
+ return value.replace(/\\/g, "\\\\").replace(/\|/g, "\\|").replace(/\r?\n/g, " ");
41
+ }
42
+ function renderSkillsSearchCommand(catalog) {
43
+ return catalog.scope === "local" ? 'uip skills search --local "<goal>" --output json' : 'uip skills search "<goal>" --output json';
44
+ }
45
+ function normalizeSearchText(value) {
46
+ return value.toLowerCase().replace(/[^a-z0-9.-]+/g, " ").trim();
47
+ }
48
+ function searchTokens(query) {
49
+ return Array.from(new Set(normalizeSearchText(query).split(/\s+/).filter((token) => token.length > 1 && !SEARCH_STOPWORDS.has(token))));
50
+ }
51
+ function hasToken(text, token) {
52
+ return text.split(/\s+/).some((word) => {
53
+ if (word === token)
54
+ return true;
55
+ if (word.split(/[.-]/).includes(token))
56
+ return true;
57
+ return token.length >= 4 && word.startsWith(token);
58
+ });
59
+ }
60
+ async function readSkillMetadata(skill) {
61
+ const fs = getFileSystem2();
62
+ const skillMdPath = fs.path.join(skill.skillDir, "SKILL.md");
63
+ const [err, content] = await catchError(fs.readFile(skillMdPath, { encoding: "utf-8" }));
64
+ const parsed = err || !content ? {
65
+ meta: {
66
+ name: skill.name,
67
+ description: skill.description
68
+ },
69
+ body: ""
70
+ } : parseSkillMd2(content);
71
+ const name = typeof parsed.meta.name === "string" && parsed.meta.name.trim() ? parsed.meta.name.trim() : skill.name;
72
+ const description = typeof parsed.meta.description === "string" ? parsed.meta.description.trim() : skill.description ?? "";
73
+ const metadata = asRecord(parsed.meta.metadata);
74
+ return {
75
+ name,
76
+ description,
77
+ skillPath: `${skill.name}/SKILL.md`,
78
+ ...metadata ? { metadata } : {}
79
+ };
80
+ }
81
+ async function buildSkillCatalog2(skills, options = {}) {
82
+ const entries = await Promise.all(skills.filter((skill) => skill.name !== SKILL_CATALOG_SKILL_NAME2).map(readSkillMetadata));
83
+ entries.sort((a, b) => a.name.localeCompare(b.name));
84
+ return {
85
+ schemaVersion: SKILL_CATALOG_SCHEMA_VERSION,
86
+ generatedBy: SKILL_CATALOG_GENERATED_BY,
87
+ source: options.source ?? { repository: REPO_URL2 },
88
+ ...options.agent ? { agent: options.agent } : {},
89
+ ...options.scope ? { scope: options.scope } : {},
90
+ ...options.generatedAt ? { generatedAt: options.generatedAt } : {},
91
+ skills: entries
92
+ };
93
+ }
94
+ function renderSkillCatalogReadme(catalog, { skillPathPrefix = "" } = {}) {
95
+ const searchCommand = renderSkillsSearchCommand(catalog);
96
+ const lines = [
97
+ SKILL_CATALOG_MARKER,
98
+ "",
99
+ "# UiPath Skill Catalog",
100
+ "",
101
+ "Generated overview for the installed UiPath skills. Read this file first when a user asks for UiPath help and no single skill is already obvious.",
102
+ "",
103
+ "## How to Use",
104
+ "",
105
+ `1. Search the catalog with \`${searchCommand}\`, or inspect \`skills.catalog.json\` directly.`,
106
+ "2. Pick the skill whose description best matches the user's goal and boundaries.",
107
+ "3. Open only that skill's `SKILL.md`, then follow its links into `references/` only as needed.",
108
+ "4. If several skills match, prefer the most specific skill first and add platform/deploy skills only when the task needs them.",
109
+ "",
110
+ "## Installed Skills",
111
+ "",
112
+ "| Skill | When to use | Entry point |",
113
+ "|---|---|---|"
114
+ ];
115
+ for (const skill of catalog.skills) {
116
+ lines.push(`| \`${markdownEscape(skill.name)}\` | ${markdownEscape(skill.description || "(no description)")} | [SKILL.md](${markdownEscape(`${skillPathPrefix}${skill.skillPath}`)}) |`);
117
+ }
118
+ lines.push("", "For the complete machine-readable catalog, read `skills.catalog.json`.", "");
119
+ return lines.join(`
120
+ `);
121
+ }
122
+ function renderSkillCatalogIndex(catalog, { skillPathPrefix = "" } = {}) {
123
+ const lines = [
124
+ SKILL_CATALOG_MARKER,
125
+ "",
126
+ "# UiPath Skills Index",
127
+ "",
128
+ `Schema version: ${catalog.schemaVersion}`,
129
+ `Source: ${catalog.source.repository}${catalog.source.ref ? ` @ ${catalog.source.ref}` : ""}`,
130
+ ...catalog.agent ? [`Agent: ${catalog.agent}`] : [],
131
+ ...catalog.scope ? [`Scope: ${catalog.scope}`] : [],
132
+ ""
133
+ ];
134
+ for (const skill of catalog.skills) {
135
+ lines.push(`## ${skill.name}`, "", skill.description || "(no description)", "", `Entry point: [${skill.skillPath}](${skillPathPrefix}${skill.skillPath})`, "");
136
+ }
137
+ return lines.join(`
138
+ `);
139
+ }
140
+ function renderSkillCatalogSkillMd(catalog) {
141
+ const searchCommand = renderSkillsSearchCommand(catalog);
142
+ const lines = [
143
+ "---",
144
+ `name: ${SKILL_CATALOG_SKILL_NAME2}`,
145
+ 'description: "Use first for UiPath requests when selecting among installed UiPath skills. Provides progressive discovery via a compact catalog so agents can pick one skill before opening full SKILL.md bodies."',
146
+ "---",
147
+ "",
148
+ SKILL_CATALOG_MARKER,
149
+ "",
150
+ "# UiPath Skill Catalog",
151
+ "",
152
+ "Use this skill first when the user asks for UiPath help and no single specialist skill is already obvious.",
153
+ "",
154
+ "## Routing Workflow",
155
+ "",
156
+ `1. Read \`references/skills.catalog.json\` or run \`${searchCommand}\`.`,
157
+ "2. Pick the skill whose description best matches the user's goal and boundaries.",
158
+ "3. Open only that skill's `SKILL.md`, then follow that skill's references only as needed.",
159
+ "4. If several skills match, prefer the most specific skill first and add platform/deploy skills only when the task needs them.",
160
+ "",
161
+ "## Installed Skills",
162
+ "",
163
+ "| Skill | When to use | Entry point |",
164
+ "|---|---|---|"
165
+ ];
166
+ for (const skill of catalog.skills) {
167
+ lines.push(`| \`${markdownEscape(skill.name)}\` | ${markdownEscape(skill.description || "(no description)")} | [SKILL.md](../${markdownEscape(skill.skillPath)}) |`);
168
+ }
169
+ lines.push("", "The complete machine-readable catalog is `references/skills.catalog.json`.", "");
170
+ return lines.join(`
171
+ `);
172
+ }
173
+ function ownsGeneratedText(content) {
174
+ return content?.startsWith(SKILL_CATALOG_MARKER) ?? false;
175
+ }
176
+ function ownsGeneratedSkill(content) {
177
+ return content?.includes(SKILL_CATALOG_MARKER) ?? false;
178
+ }
179
+ function ownsGeneratedJson(content) {
180
+ if (!content)
181
+ return false;
182
+ const [parseError, parsed] = catchError(() => JSON.parse(content));
183
+ return !parseError && parsed?.generatedBy === SKILL_CATALOG_GENERATED_BY;
184
+ }
185
+ async function writeGeneratedText(filePath, content) {
186
+ const fs = getFileSystem2();
187
+ const existing = await fs.readFile(filePath, { encoding: "utf-8" });
188
+ if (existing !== null && !ownsGeneratedText(existing))
189
+ return;
190
+ await fs.writeFile(filePath, content);
191
+ }
192
+ async function writeGeneratedJson(filePath, catalog) {
193
+ const fs = getFileSystem2();
194
+ const existing = await fs.readFile(filePath, { encoding: "utf-8" });
195
+ if (existing !== null && !ownsGeneratedJson(existing))
196
+ return;
197
+ await fs.writeFile(filePath, `${JSON.stringify(catalog, null, 2)}
198
+ `);
199
+ }
200
+ async function removeGeneratedText(filePath) {
201
+ const fs = getFileSystem2();
202
+ const existing = await fs.readFile(filePath, { encoding: "utf-8" });
203
+ if (existing === null || ownsGeneratedText(existing))
204
+ await fs.rm(filePath);
205
+ }
206
+ async function removeGeneratedJson(filePath) {
207
+ const fs = getFileSystem2();
208
+ const existing = await fs.readFile(filePath, { encoding: "utf-8" });
209
+ if (existing === null || ownsGeneratedJson(existing))
210
+ await fs.rm(filePath);
211
+ }
212
+ function getSkillCatalogSkillDir(skillsRoot) {
213
+ const fs = getFileSystem2();
214
+ return fs.path.join(skillsRoot, SKILL_CATALOG_SKILL_NAME2);
215
+ }
216
+ async function writeSkillCatalog2(skillsRoot, skills, options = {}) {
217
+ const fs = getFileSystem2();
218
+ const catalog = await buildSkillCatalog2(skills, options);
219
+ await writeGeneratedJson(fs.path.join(skillsRoot, SKILL_CATALOG_JSON), catalog);
220
+ await writeGeneratedText(fs.path.join(skillsRoot, SKILL_CATALOG_README), renderSkillCatalogReadme(catalog));
221
+ await writeGeneratedText(fs.path.join(skillsRoot, SKILL_CATALOG_INDEX), renderSkillCatalogIndex(catalog));
222
+ const catalogSkillDir = getSkillCatalogSkillDir(skillsRoot);
223
+ const existingCatalogSkillMd = await fs.readFile(fs.path.join(catalogSkillDir, "SKILL.md"), { encoding: "utf-8" });
224
+ if (existingCatalogSkillMd !== null && !ownsGeneratedSkill(existingCatalogSkillMd)) {
225
+ throw new Error(`${SKILL_CATALOG_SKILL_NAME2}/SKILL.md already exists and was not generated by uip skills`);
226
+ }
227
+ await fs.rm(catalogSkillDir);
228
+ await fs.writeFile(fs.path.join(catalogSkillDir, "SKILL.md"), renderSkillCatalogSkillMd(catalog));
229
+ await fs.writeFile(fs.path.join(catalogSkillDir, "references", SKILL_CATALOG_JSON), `${JSON.stringify(catalog, null, 2)}
230
+ `);
231
+ await fs.writeFile(fs.path.join(catalogSkillDir, "references", SKILL_CATALOG_README), renderSkillCatalogReadme(catalog, { skillPathPrefix: "../../" }));
232
+ await fs.writeFile(fs.path.join(catalogSkillDir, "references", SKILL_CATALOG_INDEX), renderSkillCatalogIndex(catalog, { skillPathPrefix: "../../" }));
233
+ return catalog;
234
+ }
235
+ async function removeSkillCatalog2(skillsRoot) {
236
+ const fs = getFileSystem2();
237
+ await removeGeneratedText(fs.path.join(skillsRoot, SKILL_CATALOG_README));
238
+ await removeGeneratedText(fs.path.join(skillsRoot, SKILL_CATALOG_INDEX));
239
+ await removeGeneratedJson(fs.path.join(skillsRoot, SKILL_CATALOG_JSON));
240
+ const catalogSkillDir = getSkillCatalogSkillDir(skillsRoot);
241
+ const skillMd = await fs.readFile(fs.path.join(catalogSkillDir, "SKILL.md"), { encoding: "utf-8" });
242
+ if (skillMd === null || ownsGeneratedSkill(skillMd)) {
243
+ await fs.rm(catalogSkillDir);
244
+ }
245
+ }
246
+ function searchSkillCatalog2(catalog, query) {
247
+ const tokens = searchTokens(query);
248
+ if (tokens.length === 0)
249
+ return catalog.skills;
250
+ const ranked = [];
251
+ for (const skill of catalog.skills) {
252
+ const name = normalizeSearchText(skill.name);
253
+ const description = normalizeSearchText(skill.description);
254
+ let score = 0;
255
+ if (name.includes(normalizeSearchText(query)))
256
+ score += 20;
257
+ if (description.includes(normalizeSearchText(query)))
258
+ score += 10;
259
+ for (const token of tokens) {
260
+ if (hasToken(name, token))
261
+ score += 6;
262
+ if (hasToken(description, token))
263
+ score += 3;
264
+ }
265
+ if (score > 0)
266
+ ranked.push({ skill, score });
267
+ }
268
+ ranked.sort((a, b) => b.score - a.score || a.skill.name.localeCompare(b.skill.name));
269
+ return ranked.map((entry) => entry.skill);
270
+ }
271
+
272
+ export { SKILL_CATALOG_SKILL_NAME2, buildSkillCatalog2, writeSkillCatalog2, removeSkillCatalog2, searchSkillCatalog2 };
273
+
274
+ //# debugId=B9335E32C99170BD64756E2164756E21