@uipath/agent-tool 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 (62) hide show
  1. package/README.md +51 -0
  2. package/dist/THIRD-PARTY-NOTICES.md +5 -5
  3. package/dist/agent-tool-OK5DK57D-bjevqt47.js +10 -0
  4. package/dist/{de-MUJPA4EB-209jpeqe.js → de-AI7ML6JM-km47f8k4.js} +47 -5
  5. package/dist/{embedded-file-reader-r66242ey.js → embedded-file-reader-0228j82a.js} +1 -4
  6. package/dist/en-LAVDF7IQ-xe939kq1.js +254 -0
  7. package/dist/{es-MX-2MYFZU7X-6v0q5rbn.js → es-MX-7KJZPEQN-1fq0a9jr.js} +47 -5
  8. package/dist/{es-7SE7HX2X-qda7whn6.js → es-SPNKTD5Y-vw5cbgv5.js} +47 -5
  9. package/dist/executor-tool.js +8 -10
  10. package/dist/first-party-service-ahcc6xc6.js +8 -0
  11. package/dist/{fr-MDFKNZ4C-qmypp92m.js → fr-AXJGUT53-hdg3pmd4.js} +47 -5
  12. package/dist/index-20nm3a1t.js +36 -0
  13. package/dist/{index-ar269vgy.js → index-js1wb4x0.js} +223 -199
  14. package/dist/{index-h8cph72k.js → index-nzr4mx5p.js} +2 -22
  15. package/dist/index-ybw87d41.js +21 -0
  16. package/dist/index-z2qk2qn6.js +24 -0
  17. package/dist/index.js +15 -19
  18. package/dist/{ja-UTQEAP34-hvyf683h.js → ja-C7GZV6YP-hvtbngr5.js} +47 -5
  19. package/dist/{jmespath-e4a59c8w.js → jmespath-ab6tdc42.js} +1 -1
  20. package/dist/{js-yaml-87cdx6bm.js → js-yaml-a2bk27p6.js} +1 -3
  21. package/dist/{ko-AXCHW2OK-pkwdcbmx.js → ko-Q24HSSL4-5vn55pte.js} +47 -5
  22. package/dist/{memory-runtime-service-h9wdsd31.js → memory-runtime-service-h5bqa30b.js} +16 -27
  23. package/dist/{packager-tool-je2re4j6.js → packager-tool-0ajs8pnk.js} +53 -8
  24. package/dist/packager-tool-1593sna4.js +1434 -0
  25. package/dist/{packager-tool-3hmm8f9s.js → packager-tool-1cn7vbjr.js} +49 -60
  26. package/dist/{packager-tool-fza8z686.js → packager-tool-21r3phhc.js} +984 -467
  27. package/dist/{packager-tool-jd8cfevc.js → packager-tool-4j09ztk2.js} +10 -40
  28. package/dist/{packager-tool-22e4nhzm.js → packager-tool-4shqngrj.js} +2 -2
  29. package/dist/packager-tool-bh92xy8d.js +17988 -0
  30. package/dist/{packager-tool-16007tbr.js → packager-tool-d1tw3gdx.js} +1533 -726
  31. package/dist/{packager-tool-1yh8g550.js → packager-tool-epsr41wx.js} +8 -12
  32. package/dist/packager-tool-fc08rcbk.js +253 -0
  33. package/dist/{packager-tool-xbzpm6s2.js → packager-tool-kawtadzm.js} +44 -38
  34. package/dist/{packager-tool-gdtpsdn7.js → packager-tool-mm1x18d6.js} +223 -28
  35. package/dist/{packager-tool-vwsq85y7.js → packager-tool-qr8dtv3r.js} +35 -18
  36. package/dist/{packager-tool-7sbsrgd5.js → packager-tool-qvsazy59.js} +6 -7
  37. package/dist/{packager-tool-b098y4a2.js → packager-tool-wbksf242.js} +97 -97
  38. package/dist/packager-tool-z6a5nr2d.js +2342 -0
  39. package/dist/packager-tool.js +5 -9
  40. package/dist/{pt-BR-Y6K6XHXK-37a932vp.js → pt-BR-BIUJXIPU-2sqzhr8y.js} +47 -5
  41. package/dist/{pt-3DIO5QWG-hb763vct.js → pt-MHX6JGAX-xfgvdqwg.js} +47 -5
  42. package/dist/{ro-BWR3ONRR-jmap5ajd.js → ro-3RKJNGJZ-xqj14e3d.js} +47 -5
  43. package/dist/{ru-WBLQ5B2U-8r3c7v6d.js → ru-WBLQ5B2U-bf20yr5y.js} +1 -4
  44. package/dist/solution-auth-wmeqt2hh.js +10 -0
  45. package/dist/tool.js +14 -18
  46. package/dist/{tr-5IIHSFW5-stsb3dar.js → tr-PQLUUHPC-qsb7btxn.js} +47 -5
  47. package/dist/{zh-CN-R2KU4U5L-q4yhc33t.js → zh-CN-OHNTHZRI-b0hjkfqn.js} +47 -5
  48. package/dist/{zh-TW-GNKMELBF-r4ay2475.js → zh-TW-E4D3Y6ZR-tn3bmzz5.js} +47 -5
  49. package/package.json +2 -2
  50. package/dist/agent-tool-OK5DK57D-1654w938.js +0 -12
  51. package/dist/en-GN2ZGWUE-03z2df4k.js +0 -136
  52. package/dist/first-party-service-srxaftkn.js +0 -27
  53. package/dist/index-8bp6b26w.js +0 -666
  54. package/dist/index-aa5b4rsq.js +0 -3174
  55. package/dist/index-kmp9fmhb.js +0 -25
  56. package/dist/packager-tool-4mna26cc.js +0 -133
  57. package/dist/packager-tool-53w8skv5.js +0 -262
  58. package/dist/packager-tool-607v4t05.js +0 -22083
  59. package/dist/packager-tool-c23zrhj8.js +0 -11
  60. package/dist/packager-tool-ceh8aqcd.js +0 -5365
  61. package/dist/packager-tool-emspfs60.js +0 -31133
  62. package/dist/solution-auth-h0yjcbsy.js +0 -11
@@ -1,37 +1,37 @@
1
1
  import {
2
- bundleSolution,
3
- finalizeZip64,
4
- uploadOrOverwriteSolution
5
- } from "./packager-tool-ceh8aqcd.js";
6
- import {
7
- findSolutionFile,
8
- updateSolutionFile,
9
- updateUipxSolutionId
10
- } from "./packager-tool-jd8cfevc.js";
11
- import {
12
- JobAttachmentUploadError,
13
- PersonalWorkspacesApi,
14
- createApiClient,
15
- uploadJobAttachment
16
- } from "./packager-tool-607v4t05.js";
17
- import {
18
- getLoginStatusAsync
19
- } from "./packager-tool-vwsq85y7.js";
2
+ getFileSystem
3
+ } from "./packager-tool-0ajs8pnk.js";
20
4
  import {
21
- OutputFormatter,
22
5
  catchError,
23
6
  extractErrorDetails,
24
7
  extractErrorMessage,
25
- logger,
26
8
  parseAttachmentSpec,
27
- readAttachmentSpecs
28
- } from "./packager-tool-fza8z686.js";
9
+ readAttachmentSpecs,
10
+ logger,
11
+ OutputFormatter
12
+ } from "./packager-tool-21r3phhc.js";
29
13
  import {
30
- getFileSystem
31
- } from "./packager-tool-je2re4j6.js";
14
+ PersonalWorkspacesApi2,
15
+ createApiClient2,
16
+ JobAttachmentUploadError2,
17
+ uploadJobAttachment2
18
+ } from "./packager-tool-z6a5nr2d.js";
19
+ import {
20
+ getAuthContext
21
+ } from "./packager-tool-qr8dtv3r.js";
22
+ import {
23
+ finalizeZip642,
24
+ bundleSolution2,
25
+ uploadOrOverwriteSolution2
26
+ } from "./packager-tool-1593sna4.js";
27
+ import {
28
+ updateUipxSolutionId2,
29
+ findSolutionFile2,
30
+ updateSolutionFile2
31
+ } from "./packager-tool-4j09ztk2.js";
32
32
  import {
33
33
  zipSync
34
- } from "./packager-tool-b098y4a2.js";
34
+ } from "./packager-tool-wbksf242.js";
35
35
 
36
36
  // src/services/agent-builder-migrations.ts
37
37
  var warnedLegacyToolGuardrailPolicies = false;
@@ -109,8 +109,9 @@ class AgentProjectService {
109
109
  const [builderReadError, builderRaw] = await catchError(this.fs.readFile(this.fs.path.join(builderDir, "agent.json"), "utf-8"));
110
110
  if (!builderReadError && builderRaw) {
111
111
  try {
112
- existingBuilder = JSON.parse(builderRaw);
113
- migrateLegacyToolGuardrailPolicies(existingBuilder);
112
+ const parsed = JSON.parse(builderRaw);
113
+ existingBuilder = parsed;
114
+ migrateLegacyToolGuardrailPolicies(parsed);
114
115
  } catch {}
115
116
  }
116
117
  const builderAgent = {
@@ -507,7 +508,7 @@ async function createArchive(sourceDir, outputPath, exclude) {
507
508
  zippable[relPath] = new Uint8Array(data);
508
509
  }
509
510
  }
510
- await fs.writeFile(outputPath, finalizeZip64(zipSync(zippable, { level: 6 })));
511
+ await fs.writeFile(outputPath, finalizeZip642(zipSync(zippable, { level: 6 })));
511
512
  }
512
513
 
513
514
  // src/services/agent-local-workspace-eval-preparer.ts
@@ -522,24 +523,12 @@ function toForwardSlash(path) {
522
523
  return path.replace(/\\/g, "/");
523
524
  }
524
525
  async function resolveStudioWebConfig() {
525
- const [loginError, login] = await catchError(getLoginStatusAsync());
526
- if (loginError) {
527
- throw new Error(loginError.message);
528
- }
529
- if (login.loginStatus !== "Logged in" || !login.baseUrl) {
530
- throw new Error("Not logged in. Run 'uip login' first.");
531
- }
532
- if (!login.accessToken) {
533
- throw new Error("Access token not available from login.");
534
- }
535
- if (!login.organizationName) {
536
- throw new Error("Organization name not available from login. Required for Studio Web evaluation.");
537
- }
526
+ const auth = await getAuthContext({ requireOrganizationName: true });
538
527
  return {
539
- baseUrl: login.baseUrl,
540
- tenantId: login.tenantId,
541
- authToken: login.accessToken,
542
- organizationName: login.organizationName
528
+ baseUrl: auth.baseUrl,
529
+ tenantId: auth.tenantId,
530
+ authToken: auth.accessToken,
531
+ organizationName: auth.organizationName
543
532
  };
544
533
  }
545
534
 
@@ -570,7 +559,7 @@ class AgentLocalWorkspaceEvalPreparer {
570
559
  const projectFile = {
571
560
  Name: typeof parsedProjectFile.Name === "string" ? parsedProjectFile.Name : undefined
572
561
  };
573
- const solutionInfo = await findSolutionFile(this.fs, agentDir);
562
+ const solutionInfo = await findSolutionFile2(this.fs, agentDir);
574
563
  const solutionId = existingSolutionIdOverride ?? marker?.solutionId ?? solutionInfo?.solutionId;
575
564
  const solutionName = projectFile.Name ?? agent.metadata.name ?? this.fs.path.basename(agentDir);
576
565
  const safeSolutionName = solutionName.replace(/[^a-zA-Z0-9_-]/g, "_");
@@ -586,7 +575,7 @@ class AgentLocalWorkspaceEvalPreparer {
586
575
  "*/.sw-path-marker"
587
576
  ]);
588
577
  logger.info("Uploading local workspace agent for eval...");
589
- const importResult = await uploadOrOverwriteSolution({
578
+ const importResult = await uploadOrOverwriteSolution2({
590
579
  baseUrl: config.baseUrl,
591
580
  tenantId: config.tenantId,
592
581
  authToken: config.authToken
@@ -596,7 +585,7 @@ class AgentLocalWorkspaceEvalPreparer {
596
585
  if (packageRoot !== absoluteProjectPath) {
597
586
  await this.persistSolutionStorage(projectService, packageRoot, packageRoot, projectFilePath, importResult.id, agent.projectId, matchedProject.id);
598
587
  }
599
- await updateSolutionFile(this.fs, agentDir, importResult.id);
588
+ await updateSolutionFile2(this.fs, agentDir, importResult.id);
600
589
  if (marker) {
601
590
  await this.updateLocalWorkspaceMarker(marker.rootPath, importResult.id);
602
591
  }
@@ -605,7 +594,7 @@ class AgentLocalWorkspaceEvalPreparer {
605
594
  agentProjectId: matchedProject.id
606
595
  };
607
596
  } finally {
608
- const [cleanupError] = await catchError(this.fs.rm(stagingDir, { recursive: true }));
597
+ const [cleanupError] = await catchError(this.fs.rm(stagingDir));
609
598
  if (cleanupError) {
610
599
  logger.warn(`Cleanup failed: ${cleanupError.message}`);
611
600
  }
@@ -760,7 +749,7 @@ class AgentDebugService {
760
749
  if (prepared.length === 0) {
761
750
  return [];
762
751
  }
763
- const settled = await Promise.allSettled(prepared.map((p) => uploadJobAttachment(p.bytes, p.fileName, { tenant, signal })));
752
+ const settled = await Promise.allSettled(prepared.map((p) => uploadJobAttachment2(p.bytes, p.fileName, { tenant, signal })));
764
753
  const bound = [];
765
754
  const failures = [];
766
755
  settled.forEach((result, index) => {
@@ -779,16 +768,16 @@ class AgentDebugService {
779
768
  });
780
769
  if (failures.length > 0) {
781
770
  this.warnAttachmentsLeftBehind(bound);
782
- for (const { input: input2, reason: reason2 } of failures) {
783
- if (reason2 instanceof JobAttachmentUploadError && reason2.stage === "upload" && reason2.attachmentId !== undefined) {
784
- logger.warn(`Attachment record ${reason2.attachmentId} for '${input2.path}' is left behind after its upload failed.`);
771
+ for (const { input, reason } of failures) {
772
+ if (reason instanceof JobAttachmentUploadError2 && reason.stage === "upload" && reason.attachmentId !== undefined) {
773
+ logger.warn(`Attachment record ${reason.attachmentId} for '${input.path}' is left behind after its upload failed.`);
785
774
  }
786
775
  }
787
776
  const [{ input, reason }] = failures;
788
777
  if (signal?.aborted) {
789
778
  throw new AgentDebugCancelledError;
790
779
  }
791
- const detail = reason instanceof JobAttachmentUploadError ? reason.message : await extractErrorMessage(reason);
780
+ const detail = reason instanceof JobAttachmentUploadError2 ? reason.message : await extractErrorMessage(reason);
792
781
  throw new AgentDebugAttachmentUploadError(input.field, input.path, `Failed to upload --attachment '${input.path}' for field '${input.field}': ${detail}`, reason);
793
782
  }
794
783
  return bound;
@@ -810,7 +799,7 @@ class AgentDebugService {
810
799
  return this.uploadSolutionAndResolveProjectId(projectPath);
811
800
  }
812
801
  async uploadSolutionAndResolveProjectId(projectPath) {
813
- const solution = await findSolutionFile(this.fs, projectPath);
802
+ const solution = await findSolutionFile2(this.fs, projectPath);
814
803
  if (!solution) {
815
804
  throw new Error(`No enclosing .uipx solution found for '${projectPath}'. Create one with 'uip solution init' and add the agent to it.`);
816
805
  }
@@ -818,10 +807,10 @@ class AgentDebugService {
818
807
  const solutionDir = this.fs.path.resolve(projectPath, "..");
819
808
  const tempDir = await this.fs.getTempDir();
820
809
  try {
821
- const bundle = await bundleSolution(this.fs, solutionDir, tempDir);
822
- const importResult = await uploadOrOverwriteSolution(config, config.organizationName, bundle.uisPath, bundle.solutionId, this.fs);
810
+ const bundle = await bundleSolution2(this.fs, solutionDir, tempDir);
811
+ const importResult = await uploadOrOverwriteSolution2(config, config.organizationName, bundle.uisPath, bundle.solutionId, this.fs);
823
812
  if (importResult.id && bundle.uipxPath) {
824
- await updateUipxSolutionId(this.fs, bundle.uipxPath, importResult.id);
813
+ await updateUipxSolutionId2(this.fs, bundle.uipxPath, importResult.id);
825
814
  }
826
815
  const projectName = await this.readProjectName(projectPath);
827
816
  const byName = importResult.projects.find((p) => p.name === projectName);
@@ -846,7 +835,7 @@ class AgentDebugService {
846
835
  return parsed?.Name ?? this.fs.path.basename(projectPath);
847
836
  }
848
837
  async resolvePersonalWorkspaceKey() {
849
- const wsApi = await createApiClient(PersonalWorkspacesApi, {});
838
+ const wsApi = await createApiClient2(PersonalWorkspacesApi2, {});
850
839
  const workspace = await wsApi.personalWorkspacesGetPersonalWorkspace();
851
840
  if (!workspace?.key) {
852
841
  throw new Error("Could not resolve your personal workspace. Ensure it is enabled for your account.");
@@ -974,4 +963,4 @@ function parseOutput(outputArguments) {
974
963
 
975
964
  export { migrateLegacyToolGuardrailPolicies, AgentProjectService, resolveStudioWebConfig, AgentLocalWorkspaceEvalPreparer, AttachmentInputError, toAttachmentSummaries, prepareAttachmentInputs, AgentDebugCancelledError, AgentDebugAttachmentUploadError, AgentDebugStartOutcomeUnknownError, AgentDebugService };
976
965
 
977
- //# debugId=7E5DF11FED4C587664756E2164756E21
966
+ //# debugId=C51629623A9837AD64756E2164756E21