@uipath/agent-tool 1.204.0 → 1.205.0-preview.258

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.
package/dist/index.js CHANGED
@@ -2,17 +2,18 @@
2
2
  import {
3
3
  metadata,
4
4
  registerCommands
5
- } from "./packager-tool-6ymwf9tt.js";
5
+ } from "./packager-tool-n6kextff.js";
6
6
  import"./packager-tool-4mna26cc.js";
7
7
  import"./packager-tool-c23zrhj8.js";
8
- import"./packager-tool-cfkfh4xq.js";
9
- import"./packager-tool-s41pfpn7.js";
10
- import"./packager-tool-z8ryp7pb.js";
11
- import"./packager-tool-xxd71jja.js";
12
- import"./packager-tool-h4ymyb9t.js";
8
+ import"./packager-tool-4fq1ta8t.js";
9
+ import"./packager-tool-yv1n0tph.js";
10
+ import"./packager-tool-jd8cfevc.js";
11
+ import"./packager-tool-607v4t05.js";
12
+ import"./packager-tool-vwsq85y7.js";
13
13
  import {
14
14
  Command
15
- } from "./packager-tool-2tf3hrem.js";
15
+ } from "./packager-tool-fza8z686.js";
16
+ import"./packager-tool-je2re4j6.js";
16
17
  import"./packager-tool-thr9mncj.js";
17
18
  import"./packager-tool-b098y4a2.js";
18
19
  import"./packager-tool-1yh8g550.js";
@@ -23,4 +24,4 @@ program.name(metadata.commandPrefix).description(metadata.description).version(m
23
24
  await registerCommands(program);
24
25
  await program.parseAsync(process.argv);
25
26
 
26
- //# debugId=829F3B3A086F0A5D64756E2164756E21
27
+ //# debugId=36093355EFD0A42564756E2164756E21
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  getLoginStatusAsync
3
- } from "./packager-tool-h4ymyb9t.js";
3
+ } from "./packager-tool-vwsq85y7.js";
4
4
  import {
5
5
  catchError
6
- } from "./packager-tool-2tf3hrem.js";
6
+ } from "./packager-tool-fza8z686.js";
7
+ import"./packager-tool-je2re4j6.js";
7
8
  import {
8
9
  __require
9
10
  } from "./packager-tool-1yh8g550.js";
@@ -76,7 +77,7 @@ async function readJson(response, context) {
76
77
  return parsed;
77
78
  }
78
79
  async function resolveRuntimeFolder(input) {
79
- const { resolveFolder } = await import("./index-26qyqxha.js");
80
+ const { resolveFolder } = await import("./index-aa5b4rsq.js");
80
81
  const [resolveError, folder] = await catchError(resolveFolder(input));
81
82
  if (resolveError) {
82
83
  if (input.folderPath !== undefined && input.folderKey === undefined && resolveError.message.startsWith("Folder not found")) {
@@ -135,4 +136,4 @@ export {
135
136
  resolveRuntimeFolder
136
137
  };
137
138
 
138
- //# debugId=EE21839693C3EC8F64756E2164756E21
139
+ //# debugId=FC865CFAF864B89564756E2164756E21
@@ -2,32 +2,33 @@ import {
2
2
  bundleSolution,
3
3
  finalizeZip64,
4
4
  uploadOrOverwriteSolution
5
- } from "./packager-tool-s41pfpn7.js";
5
+ } from "./packager-tool-yv1n0tph.js";
6
6
  import {
7
7
  findSolutionFile,
8
8
  updateSolutionFile,
9
9
  updateUipxSolutionId
10
- } from "./packager-tool-z8ryp7pb.js";
10
+ } from "./packager-tool-jd8cfevc.js";
11
11
  import {
12
- AttachmentsApi,
13
12
  JobAttachmentUploadError,
14
13
  PersonalWorkspacesApi,
15
14
  createApiClient,
16
15
  uploadJobAttachment
17
- } from "./packager-tool-xxd71jja.js";
16
+ } from "./packager-tool-607v4t05.js";
18
17
  import {
19
18
  getLoginStatusAsync
20
- } from "./packager-tool-h4ymyb9t.js";
19
+ } from "./packager-tool-vwsq85y7.js";
21
20
  import {
22
21
  OutputFormatter,
23
22
  catchError,
24
23
  extractErrorDetails,
25
24
  extractErrorMessage,
26
- getFileSystem,
27
25
  logger,
28
26
  parseAttachmentSpec,
29
27
  readAttachmentSpecs
30
- } from "./packager-tool-2tf3hrem.js";
28
+ } from "./packager-tool-fza8z686.js";
29
+ import {
30
+ getFileSystem
31
+ } from "./packager-tool-je2re4j6.js";
31
32
  import {
32
33
  zipSync
33
34
  } from "./packager-tool-b098y4a2.js";
@@ -728,7 +729,7 @@ class AgentDebugService {
728
729
  const bound = await this.uploadAttachments(options.attachments ?? [], auth.tenantName, options.signal);
729
730
  const inputs = applyAttachmentReferences(options.inputs, bound);
730
731
  if (options.signal?.aborted) {
731
- await this.deleteAttachmentsBestEffort(bound, auth.tenantName);
732
+ this.warnAttachmentsLeftBehind(bound);
732
733
  throw new AgentDebugCancelledError;
733
734
  }
734
735
  const [startError, started] = await catchError(this.startDebugJob(auth, folderKey, projectId, inputs, options.signal));
@@ -741,7 +742,7 @@ class AgentDebugService {
741
742
  attachments: bound
742
743
  });
743
744
  }
744
- await this.deleteAttachmentsBestEffort(bound, auth.tenantName);
745
+ this.warnAttachmentsLeftBehind(bound);
745
746
  throw startError;
746
747
  }
747
748
  const job = await asCancellation(() => this.pollJob(auth, folderKey, started.jobKey, options), started.jobKey);
@@ -777,10 +778,10 @@ class AgentDebugService {
777
778
  }
778
779
  });
779
780
  if (failures.length > 0) {
780
- await this.deleteAttachmentsBestEffort(bound, tenant);
781
+ this.warnAttachmentsLeftBehind(bound);
781
782
  for (const { input: input2, reason: reason2 } of failures) {
782
- if (reason2 instanceof JobAttachmentUploadError && reason2.stage === "upload" && reason2.attachmentId !== undefined && reason2.recordDeleted === false) {
783
- logger.warn(`Attachment record ${reason2.attachmentId} for '${input2.path}' could not be removed after its upload failed; delete it manually.`);
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.`);
784
785
  }
785
786
  }
786
787
  const [{ input, reason }] = failures;
@@ -792,23 +793,11 @@ class AgentDebugService {
792
793
  }
793
794
  return bound;
794
795
  }
795
- async deleteAttachmentsBestEffort(bound, tenant) {
796
+ warnAttachmentsLeftBehind(bound) {
796
797
  if (bound.length === 0) {
797
798
  return;
798
799
  }
799
- const [clientError, api] = await catchError(createApiClient(AttachmentsApi, { tenant }));
800
- if (clientError) {
801
- logger.warn(`Could not clean up attachments ${bound.map((b) => b.reference.ID).join(", ")}: ${clientError.message}`);
802
- return;
803
- }
804
- for (const b of bound) {
805
- const [deleteError] = await catchError(api.attachmentsDeleteById({ key: b.reference.ID }));
806
- if (deleteError) {
807
- logger.warn(`Could not delete attachment ${b.reference.ID}: ${deleteError.message}`);
808
- } else {
809
- logger.info(`Deleted attachment ${b.reference.ID}: the debug job did not start.`);
810
- }
811
- }
800
+ logger.warn(`The debug job did not start, so attachments ${bound.map((b) => b.reference.ID).join(", ")} are left on the tenant for retention to reclaim.`);
812
801
  }
813
802
  async resolveProjectId(projectPath) {
814
803
  const preparer = new AgentLocalWorkspaceEvalPreparer;
@@ -985,4 +974,4 @@ function parseOutput(outputArguments) {
985
974
 
986
975
  export { migrateLegacyToolGuardrailPolicies, AgentProjectService, resolveStudioWebConfig, AgentLocalWorkspaceEvalPreparer, AttachmentInputError, toAttachmentSummaries, prepareAttachmentInputs, AgentDebugCancelledError, AgentDebugAttachmentUploadError, AgentDebugStartOutcomeUnknownError, AgentDebugService };
987
976
 
988
- //# debugId=A063F33B50DA89E964756E2164756E21
977
+ //# debugId=7E5DF11FED4C587664756E2164756E21