@uipath/agent-tool 1.202.0-preview.164 → 1.202.0-preview.166

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.
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  AgentDebugCancelledError,
3
3
  AgentDebugService
4
- } from "./packager-tool-67y78atd.js";
5
- import"./packager-tool-r46ma7qq.js";
4
+ } from "./packager-tool-wp4bhw70.js";
5
+ import"./packager-tool-b20zvjv7.js";
6
6
  import"./packager-tool-b098y4a2.js";
7
7
  import"./packager-tool-1yh8g550.js";
8
8
  // ../executor/project-executor/src/models/run-status.ts
@@ -10,7 +10,7 @@ import {
10
10
  isGuid,
11
11
  logger,
12
12
  normalizeProjectType
13
- } from "./packager-tool-r46ma7qq.js";
13
+ } from "./packager-tool-b20zvjv7.js";
14
14
  import"./packager-tool-b098y4a2.js";
15
15
  import {
16
16
  __commonJS,
package/dist/index.js CHANGED
@@ -2,13 +2,13 @@
2
2
  import {
3
3
  metadata,
4
4
  registerCommands
5
- } from "./packager-tool-8m44mvt1.js";
5
+ } from "./packager-tool-exxhb96s.js";
6
6
  import"./packager-tool-4mna26cc.js";
7
7
  import"./packager-tool-c23zrhj8.js";
8
- import"./packager-tool-67y78atd.js";
8
+ import"./packager-tool-wp4bhw70.js";
9
9
  import {
10
10
  Command
11
- } from "./packager-tool-r46ma7qq.js";
11
+ } from "./packager-tool-b20zvjv7.js";
12
12
  import"./packager-tool-mc1499dc.js";
13
13
  import"./packager-tool-b098y4a2.js";
14
14
  import"./packager-tool-1yh8g550.js";
@@ -6721,6 +6721,22 @@ Command.prototype.trackedAction = function(context, fn, properties) {
6721
6721
  }
6722
6722
  });
6723
6723
  };
6724
+
6725
+ // ../common/src/option-validators.ts
6726
+ function parseBoundedInt(raw, optionName, bounds) {
6727
+ const normalized = raw.trim();
6728
+ if (normalized === "") {
6729
+ throw new InvalidArgumentError(`${optionName} requires a value (got empty).`);
6730
+ }
6731
+ if (!/^-?\d+$/.test(normalized)) {
6732
+ throw new InvalidArgumentError(`${optionName} must be an integer, got '${normalized}'.`);
6733
+ }
6734
+ const n = parseInt(normalized, 10);
6735
+ if (n < bounds.min || n > bounds.max) {
6736
+ throw new InvalidArgumentError(`${optionName} must be between ${bounds.min} and ${bounds.max}, got ${n}.`);
6737
+ }
6738
+ return n;
6739
+ }
6724
6740
  // ../common/src/classified-failure.ts
6725
6741
  var MAX_QUOTED_BODY_CHARS = 200;
6726
6742
  function summarizePlatformBody(body) {
@@ -9748,6 +9764,6 @@ async function createApiClient(ApiClass, options) {
9748
9764
  const config = await createOrchestratorConfig(options);
9749
9765
  return new ApiClass(config);
9750
9766
  }
9751
- export { getFileSystem, getLoginStatusAsync, getAuthContext, catchError2 as catchError, extractErrorMessage, extractErrorMessageSync, logger, RESULTS, OutputFormatter, summarizePlatformBody, Command, processContext, isGuid, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, normalizeProjectType, readUipxFile, prepareProjectLocation, updateUipxSolutionId, findSolutionFile, updateSolutionFile, tryRegisterProjectInParentSolution, findSolutionFileUpward, PersonalWorkspacesApi, UsersApi, createApiClient };
9767
+ export { getFileSystem, getLoginStatusAsync, getAuthContext, catchError2 as catchError, extractErrorMessage, extractErrorMessageSync, logger, RESULTS, OutputFormatter, summarizePlatformBody, Command, processContext, isGuid, parseBoundedInt, getSdkUserAgentToken, addSdkUserAgentHeader, installSdkUserAgentHeader, normalizeProjectType, readUipxFile, prepareProjectLocation, updateUipxSolutionId, findSolutionFile, updateSolutionFile, tryRegisterProjectInParentSolution, findSolutionFileUpward, PersonalWorkspacesApi, UsersApi, createApiClient };
9752
9768
 
9753
- //# debugId=5D42B3DC8CA75EF864756E2164756E21
9769
+ //# debugId=9426FBA1C0B28BA764756E2164756E21
@@ -13,7 +13,7 @@ import {
13
13
  isSolutionUploadHttpError,
14
14
  migrateLegacyToolGuardrailPolicies,
15
15
  resolveStudioWebConfig
16
- } from "./packager-tool-67y78atd.js";
16
+ } from "./packager-tool-wp4bhw70.js";
17
17
  import {
18
18
  OutputFormatter,
19
19
  RESULTS,
@@ -27,10 +27,11 @@ import {
27
27
  getSdkUserAgentToken,
28
28
  installSdkUserAgentHeader,
29
29
  logger,
30
+ parseBoundedInt,
30
31
  prepareProjectLocation,
31
32
  processContext,
32
33
  tryRegisterProjectInParentSolution
33
- } from "./packager-tool-r46ma7qq.js";
34
+ } from "./packager-tool-b20zvjv7.js";
34
35
  import {
35
36
  currentAgentStorageSchema,
36
37
  currentEvaluationSetStorageSchema,
@@ -6988,7 +6989,7 @@ var require_index_cjs = __commonJS(function(exports, module) {
6988
6989
  var package_default = {
6989
6990
  name: "@uipath/agent-tool",
6990
6991
  license: "SEE LICENSE IN LICENSE.txt",
6991
- version: "1.202.0-preview.164",
6992
+ version: "1.202.0-preview.166",
6992
6993
  description: "cli plugin for creating and managing UiPath low-code agents",
6993
6994
  private: false,
6994
6995
  repository: {
@@ -7431,7 +7432,7 @@ class VoidApiResponse {
7431
7432
  var package_default2 = {
7432
7433
  name: "@uipath/agent-sdk",
7433
7434
  license: "SEE LICENSE IN LICENSE.txt",
7434
- version: "1.202.0-preview.164",
7435
+ version: "1.202.0-preview.166",
7435
7436
  description: "SDK for the UiPath Agent Runtime API — evaluation execution and debug sessions.",
7436
7437
  repository: {
7437
7438
  type: "git",
@@ -12792,7 +12793,7 @@ var registerGuardrailCommands = (program) => {
12792
12793
 
12793
12794
  // src/services/project-artifacts.ts
12794
12795
  async function ensureProjectArtifacts(args) {
12795
- const { addProjectArtifactsToSolutionAsync } = await import("./index-jkdwsj5d.js");
12796
+ const { addProjectArtifactsToSolutionAsync } = await import("./index-g54778e4.js");
12796
12797
  return addProjectArtifactsToSolutionAsync(args);
12797
12798
  }
12798
12799
 
@@ -33284,7 +33285,7 @@ class TextApiResponse {
33284
33285
  var package_default3 = {
33285
33286
  name: "@uipath/integrationservice-sdk",
33286
33287
  license: "SEE LICENSE IN LICENSE.txt",
33287
- version: "1.202.0-preview.164",
33288
+ version: "1.202.0-preview.166",
33288
33289
  repository: {
33289
33290
  type: "git",
33290
33291
  url: "https://github.com/UiPath/cli.git",
@@ -41105,6 +41106,21 @@ var KNOWN_CATEGORIES = [
41105
41106
  "code",
41106
41107
  "general"
41107
41108
  ];
41109
+ var GRADES = [
41110
+ "A+",
41111
+ "A",
41112
+ "A-",
41113
+ "B+",
41114
+ "B",
41115
+ "B-",
41116
+ "C+",
41117
+ "C",
41118
+ "C-",
41119
+ "D+",
41120
+ "D",
41121
+ "D-",
41122
+ "F"
41123
+ ];
41108
41124
  function listCategories() {
41109
41125
  return [...KNOWN_CATEGORIES];
41110
41126
  }
@@ -42959,6 +42975,116 @@ function buildInvalidAgentJsonIssue(loaded) {
42959
42975
  suggestedFix: "Verify agent.json exists and is valid, properly encoded JSON."
42960
42976
  };
42961
42977
  }
42978
+ var REVIEW_HISTORY_FILE = "review-history.json";
42979
+ var MAX_REVIEW_HISTORY_ENTRIES = 25;
42980
+ var isGrade = (value) => typeof value === "string" && GRADES.includes(value);
42981
+ var validateEntry = (entry, index) => {
42982
+ if (typeof entry !== "object" || entry === null) {
42983
+ return `[${index}]: expected an object`;
42984
+ }
42985
+ const { grade, runAt, errors: errors3, warnings } = entry;
42986
+ if (!isGrade(grade)) {
42987
+ return `[${index}].grade: expected one of ${GRADES.join(", ")}`;
42988
+ }
42989
+ if (typeof runAt !== "string") {
42990
+ return `[${index}].runAt: expected a string`;
42991
+ }
42992
+ for (const [name, count] of [
42993
+ ["errors", errors3],
42994
+ ["warnings", warnings]
42995
+ ]) {
42996
+ if (count !== undefined && typeof count !== "number") {
42997
+ return `[${index}].${name}: expected a number`;
42998
+ }
42999
+ }
43000
+ return;
43001
+ };
43002
+ var parseHistory = (raw) => {
43003
+ let parsed;
43004
+ try {
43005
+ parsed = JSON.parse(raw);
43006
+ } catch (err2) {
43007
+ const message = err2 instanceof Error ? err2.message : String(err2);
43008
+ return { success: false, error: `invalid JSON: ${message}` };
43009
+ }
43010
+ if (!Array.isArray(parsed)) {
43011
+ return { success: false, error: "expected a JSON array of entries" };
43012
+ }
43013
+ for (const [index, entry] of parsed.entries()) {
43014
+ const error51 = validateEntry(entry, index);
43015
+ if (error51 !== undefined) {
43016
+ return { success: false, error: error51 };
43017
+ }
43018
+ }
43019
+ return { success: true, data: parsed };
43020
+ };
43021
+ var parseRunAt = (entry) => {
43022
+ const time3 = Date.parse(entry.runAt);
43023
+ return Number.isNaN(time3) ? Number.NEGATIVE_INFINITY : time3;
43024
+ };
43025
+ var writeAtomically = async (file2, content, fs7) => {
43026
+ const tempFile = `${file2}.${globalThis.crypto.randomUUID()}.tmp`;
43027
+ try {
43028
+ await fs7.writeFile(tempFile, content);
43029
+ await fs7.rename(tempFile, file2);
43030
+ } catch (err2) {
43031
+ await fs7.rm(tempFile).catch(() => {
43032
+ return;
43033
+ });
43034
+ throw err2;
43035
+ }
43036
+ };
43037
+ var appendEntry = async (file2, grade, input, fs7) => {
43038
+ let history = [];
43039
+ const raw = await fs7.readFile(file2, "utf-8");
43040
+ if (raw !== null) {
43041
+ const parsed = parseHistory(raw);
43042
+ if (!parsed.success) {
43043
+ return {
43044
+ ok: false,
43045
+ error: "MALFORMED_HISTORY",
43046
+ file: file2,
43047
+ detail: parsed.error
43048
+ };
43049
+ }
43050
+ history = parsed.data;
43051
+ }
43052
+ const entry = {
43053
+ grade,
43054
+ runAt: new Date().toISOString(),
43055
+ ...input.errors !== undefined && { errors: input.errors },
43056
+ ...input.warnings !== undefined && { warnings: input.warnings }
43057
+ };
43058
+ const newTime = Date.parse(entry.runAt);
43059
+ let index = 0;
43060
+ while (index < history.length && parseRunAt(history[index]) > newTime) {
43061
+ index++;
43062
+ }
43063
+ history.splice(index, 0, entry);
43064
+ if (history.length > MAX_REVIEW_HISTORY_ENTRIES) {
43065
+ history.length = MAX_REVIEW_HISTORY_ENTRIES;
43066
+ }
43067
+ await writeAtomically(file2, `${JSON.stringify(history, null, 2)}
43068
+ `, fs7);
43069
+ return { ok: true, entry, history };
43070
+ };
43071
+ var recordReview = async (projectPath, input, fs7) => {
43072
+ const grade = input.grade.toUpperCase();
43073
+ if (!isGrade(grade)) {
43074
+ return { ok: false, error: "INVALID_GRADE", allowed: GRADES };
43075
+ }
43076
+ const stats = await fs7.stat(projectPath);
43077
+ if (!stats?.isDirectory()) {
43078
+ return { ok: false, error: "NOT_A_DIRECTORY", projectPath };
43079
+ }
43080
+ const file2 = fs7.path.join(projectPath, REVIEW_HISTORY_FILE);
43081
+ const release = await fs7.acquireLock(file2);
43082
+ try {
43083
+ return await appendEntry(file2, grade, input, fs7);
43084
+ } finally {
43085
+ await release();
43086
+ }
43087
+ };
42962
43088
 
42963
43089
  // src/services/guardrail-catalog-service.ts
42964
43090
  var LLM_AS_JUDGE_VALIDATOR = "llm_as_judge";
@@ -43145,6 +43271,122 @@ var registerReviewCommand = (program) => {
43145
43271
  });
43146
43272
  };
43147
43273
 
43274
+ // src/commands/review-history.ts
43275
+ var CODES2 = {
43276
+ success: "AgentReviewHistoryAdd",
43277
+ invalidGrade: "AgentReviewHistoryAddInvalidGrade",
43278
+ invalidPath: "AgentReviewHistoryAddInvalidPath",
43279
+ malformedHistory: "AgentReviewHistoryAddMalformedHistory",
43280
+ failed: "AgentReviewHistoryAddFailed"
43281
+ };
43282
+ var ADD_EXAMPLES = [
43283
+ {
43284
+ Description: "Record a review grade for a project at a specific path",
43285
+ Command: "uip agent review-history add B ./my-agent",
43286
+ Output: {
43287
+ Code: CODES2.success,
43288
+ Data: {
43289
+ ProjectDir: "./my-agent",
43290
+ Grade: "B",
43291
+ RunAt: "2026-09-02T10:00:00.000Z",
43292
+ HistoryCount: 1
43293
+ }
43294
+ }
43295
+ },
43296
+ {
43297
+ Description: "Record a grade with finding counts",
43298
+ Command: "uip agent review-history add C --errors 2 --warnings 5",
43299
+ Output: {
43300
+ Code: CODES2.success,
43301
+ Data: {
43302
+ ProjectDir: ".",
43303
+ Grade: "C",
43304
+ RunAt: "2026-09-02T10:00:00.000Z",
43305
+ Errors: 2,
43306
+ Warnings: 5,
43307
+ HistoryCount: 3
43308
+ }
43309
+ }
43310
+ }
43311
+ ];
43312
+ var COUNT_BOUNDS = { min: 0, max: Number.MAX_SAFE_INTEGER };
43313
+ var parseCount = (flag) => (raw) => parseBoundedInt(raw, flag, COUNT_BOUNDS);
43314
+ var reportFailure = (rawGrade, outcome) => {
43315
+ switch (outcome.error) {
43316
+ case "INVALID_GRADE":
43317
+ OutputFormatter.error({
43318
+ Result: RESULTS.Failure,
43319
+ Code: CODES2.invalidGrade,
43320
+ ErrorCode: "invalid_argument",
43321
+ Message: `\`${rawGrade}\` is not a recordable grade.`,
43322
+ Instructions: `Pass one of: ${outcome.allowed.join(", ")}.`
43323
+ });
43324
+ return;
43325
+ case "NOT_A_DIRECTORY":
43326
+ OutputFormatter.error({
43327
+ Result: RESULTS.Failure,
43328
+ Code: CODES2.invalidPath,
43329
+ ErrorCode: "invalid_argument",
43330
+ Message: `\`${outcome.projectPath}\` is not an existing directory.`,
43331
+ Instructions: "Pass the agent project directory as [path], or run from inside it."
43332
+ });
43333
+ return;
43334
+ case "MALFORMED_HISTORY":
43335
+ OutputFormatter.error({
43336
+ Result: RESULTS.Failure,
43337
+ Code: CODES2.malformedHistory,
43338
+ ErrorCode: "configuration_error",
43339
+ Message: `\`${outcome.file}\` exists but is not a JSON array of review entries: ${outcome.detail}`,
43340
+ Instructions: "Fix the file so it parses as a JSON array, or delete it to start a fresh history, then rerun."
43341
+ });
43342
+ return;
43343
+ }
43344
+ };
43345
+ var registerReviewHistoryCommands = (program) => {
43346
+ const reviewHistory = program.command("review-history").description(`Manage the review grades recorded in the project's ${REVIEW_HISTORY_FILE}`);
43347
+ reviewHistory.command("add").description(`Record a review grade in the project's ${REVIEW_HISTORY_FILE}. ` + `Keeps the newest ${MAX_REVIEW_HISTORY_ENTRIES} entries, most recent first. Does not run the review.`).argument("<grade>", "Letter grade to record (A to F)").argument("[path]", "Agent project directory", ".").option("--errors <count>", "Number of error findings to record", parseCount("--errors")).option("--warnings <count>", "Number of warning findings to record", parseCount("--warnings")).examples(ADD_EXAMPLES).trackedAction(processContext, async (grade, targetPath, options) => {
43348
+ const fs7 = getFileSystem();
43349
+ const projectPath = fs7.path.resolve(targetPath);
43350
+ const [err2, outcome] = await catchError(recordReview(projectPath, {
43351
+ grade,
43352
+ errors: options.errors,
43353
+ warnings: options.warnings
43354
+ }, fs7));
43355
+ if (err2) {
43356
+ OutputFormatter.error({
43357
+ Result: RESULTS.Failure,
43358
+ Code: CODES2.failed,
43359
+ Message: `Recording the review failed: ${extractErrorMessageSync(err2)}`,
43360
+ Instructions: "Verify the project directory is writable. " + "Run `uip agent review-history add --help` for usage."
43361
+ });
43362
+ processContext.exit(1);
43363
+ return;
43364
+ }
43365
+ if (!outcome.ok) {
43366
+ reportFailure(grade, outcome);
43367
+ processContext.exit(1);
43368
+ return;
43369
+ }
43370
+ const { entry, history } = outcome;
43371
+ OutputFormatter.success({
43372
+ Result: RESULTS.Success,
43373
+ Code: CODES2.success,
43374
+ Data: {
43375
+ ProjectDir: projectPath,
43376
+ Grade: entry.grade,
43377
+ RunAt: entry.runAt,
43378
+ ...entry.errors !== undefined && {
43379
+ Errors: entry.errors
43380
+ },
43381
+ ...entry.warnings !== undefined && {
43382
+ Warnings: entry.warnings
43383
+ },
43384
+ HistoryCount: history.length
43385
+ }
43386
+ });
43387
+ });
43388
+ };
43389
+
43148
43390
  // src/commands/tool-list.ts
43149
43391
  var TOOL_LIST_EXAMPLES = [
43150
43392
  {
@@ -43211,6 +43453,7 @@ var registerCommands = async (program) => {
43211
43453
  registerValidateCommand(program);
43212
43454
  registerRefreshCommand(program);
43213
43455
  registerReviewCommand(program);
43456
+ registerReviewHistoryCommands(program);
43214
43457
  registerToolListCommand(program);
43215
43458
  registerMemoryCommands(program);
43216
43459
  registerEvalCommands(program);
@@ -43221,4 +43464,4 @@ var registerCommands = async (program) => {
43221
43464
 
43222
43465
  export { metadata, registerCommands };
43223
43466
 
43224
- //# debugId=4DF03B290A91216D64756E2164756E21
43467
+ //# debugId=A17B1EC8CEA891C964756E2164756E21
@@ -15,7 +15,7 @@ import {
15
15
  summarizePlatformBody,
16
16
  updateSolutionFile,
17
17
  updateUipxSolutionId
18
- } from "./packager-tool-r46ma7qq.js";
18
+ } from "./packager-tool-b20zvjv7.js";
19
19
  import {
20
20
  zipSync
21
21
  } from "./packager-tool-b098y4a2.js";
@@ -2971,7 +2971,7 @@ function querystringSingleKey2(key, value, keyPrefix = "") {
2971
2971
  var package_default = {
2972
2972
  name: "@uipath/solution-sdk",
2973
2973
  license: "SEE LICENSE IN LICENSE.txt",
2974
- version: "1.202.0-preview.164",
2974
+ version: "1.202.0-preview.166",
2975
2975
  repository: {
2976
2976
  type: "git",
2977
2977
  url: "https://github.com/UiPath/cli.git",
@@ -4238,4 +4238,4 @@ function parseOutput(outputArguments) {
4238
4238
 
4239
4239
  export { StudioWebIncompatibleProjectError, isSolutionUploadHttpError, buildSolutionUploadFailureOutput, migrateLegacyToolGuardrailPolicies, AgentProjectService, resolveStudioWebConfig, AgentLocalWorkspaceEvalPreparer, AgentDebugCancelledError, AgentDebugService };
4240
4240
 
4241
- //# debugId=B270DA760F20059764756E2164756E21
4241
+ //# debugId=954E420B48FDDDF864756E2164756E21
package/dist/tool.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  metadata,
3
3
  registerCommands
4
- } from "./packager-tool-8m44mvt1.js";
4
+ } from "./packager-tool-exxhb96s.js";
5
5
  import"./packager-tool-4mna26cc.js";
6
6
  import"./packager-tool-c23zrhj8.js";
7
- import"./packager-tool-67y78atd.js";
8
- import"./packager-tool-r46ma7qq.js";
7
+ import"./packager-tool-wp4bhw70.js";
8
+ import"./packager-tool-b20zvjv7.js";
9
9
  import"./packager-tool-mc1499dc.js";
10
10
  import"./packager-tool-b098y4a2.js";
11
11
  import"./packager-tool-1yh8g550.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@uipath/agent-tool",
3
3
  "license": "SEE LICENSE IN LICENSE.txt",
4
- "version": "1.202.0-preview.164",
4
+ "version": "1.202.0-preview.166",
5
5
  "description": "cli plugin for creating and managing UiPath low-code agents",
6
6
  "private": false,
7
7
  "repository": {
@@ -28,5 +28,5 @@
28
28
  "files": [
29
29
  "dist"
30
30
  ],
31
- "gitHead": "aae1017c05fe1309bcf56a00c942ef3708489446"
31
+ "gitHead": "3306579525192d21e36edf74e4dbabd0e1c5ad85"
32
32
  }