@uipath/maestro-tool 0.1.9 → 0.1.11

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/tool.js CHANGED
@@ -1,186 +1,21 @@
1
- // ../../node_modules/@uipath/tool-bpmn/dist/index.js
2
- import { NugetConstants, NugetPackager, Path, ProjectTool, ProjectTypes, TemporaryStorageService, ToolErrorCodes, ToolResult, toolsFactoryRepository } from "@uipath/solutionpackager-tool-core";
3
- function _define_property(obj, key, value) {
4
- if (key in obj)
5
- Object.defineProperty(obj, key, {
6
- value,
7
- enumerable: true,
8
- configurable: true,
9
- writable: true
10
- });
11
- else
12
- obj[key] = value;
13
- return obj;
14
- }
15
- var BpmnConstants = {
16
- EntryPointsFileName: "entry-points.json",
17
- BindingsV2FileName: "bindings_v2.json"
18
- };
19
-
20
- class BpmnTool extends ProjectTool {
21
- async restoreAsync(_options, _cancellationToken) {
22
- this.logger.info("Restore operation is not required for ProcessOrchestration projects");
23
- return ToolResult.success();
24
- }
25
- async validateAsync(_options, _cancellationToken) {
26
- this.logger.info("Validate operation is not required for ProcessOrchestration projects");
27
- return ToolResult.success();
28
- }
29
- async buildAsync(options, _cancellationToken) {
30
- const tempFolder = await this._temporaryStorage.getTempFolderPath();
31
- const localBuildFolder = Path.join(tempFolder, NugetConstants.OutputFolderName);
32
- const contentFolder = Path.join(localBuildFolder, NugetConstants.ContentFolderName);
33
- try {
34
- this.logger.progress("Copying files...");
35
- await this.copyFiles(options.projectPath, contentFolder);
36
- this.logger.progress("Creating operate.json file...");
37
- await this.createOperateFile(options, contentFolder);
38
- this.logger.progress("Creating package-descriptor.json file...");
39
- await this.createPackageDescriptor(localBuildFolder, contentFolder);
40
- return new ToolResult(ToolErrorCodes.Success, "done", [
41
- localBuildFolder
42
- ]);
43
- } catch (error) {
44
- const errorMessage = error instanceof Error ? error.toString() : String(error);
45
- this.logger.error(errorMessage);
46
- return ToolResult.error(ToolErrorCodes.InternalError, "An error occurred while building ProcessOrchestration project files");
47
- }
48
- }
49
- async packAsync(options, cancellationToken) {
50
- const buildResult = await this.buildAsync(options, cancellationToken);
51
- if (!buildResult.isSuccess)
52
- return buildResult;
53
- const localBuildFolder = buildResult.packages[0];
54
- try {
55
- this.logger.progress("Creating NuGet package...");
56
- const nupkgFileName = `${options.package.id}.${options.package.version}.nupkg`;
57
- const nupkgPath = Path.join(options.outputPath, nupkgFileName);
58
- const packager = new NugetPackager(this.fileSystem);
59
- const result = await packager.packAsync(localBuildFolder, options.package, nupkgPath);
60
- this.logger.progress("Package created successfully");
61
- return new ToolResult(ToolErrorCodes.Success, "done", [
62
- result.outputPath
63
- ]);
64
- } catch (error) {
65
- const errorMessage = error instanceof Error ? error.toString() : String(error);
66
- this.logger.error(errorMessage);
67
- return ToolResult.error(ToolErrorCodes.InternalError, "An error occurred while packing ProcessOrchestration project");
68
- }
69
- }
70
- async dispose() {
71
- this.logger.info("Disposing ProcessOrchestration Tool");
72
- try {
73
- await this._temporaryStorage.cleanup();
74
- } catch {}
75
- }
76
- async copyFiles(sourcePath, destinationPath) {
77
- await this.fileSystem.mkdir(destinationPath);
78
- const files = await this.fileSystem.readdir(sourcePath);
79
- for (const file of files) {
80
- const sourceFile = Path.join(sourcePath, file);
81
- const destinationFile = Path.join(destinationPath, file);
82
- const stat = await this.fileSystem.stat(sourceFile);
83
- if (stat?.isFile()) {
84
- const content = await this.fileSystem.readFile(sourceFile);
85
- if (content)
86
- await this.fileSystem.writeFile(destinationFile, content);
87
- }
88
- }
89
- }
90
- async createOperateFile(options, contentFolder) {
91
- const operateJsonFilePath = Path.join(contentFolder, NugetConstants.OperateFileName);
92
- const exists = await this.fileSystem.exists(operateJsonFilePath);
93
- if (!exists)
94
- await this.createOperateJsonFile(contentFolder, options.projectStorageId ?? "", operateJsonFilePath);
95
- }
96
- async createOperateJsonFile(projectPath, projectId, filePath) {
97
- const entryPointsFilePath = Path.join(projectPath, BpmnConstants.EntryPointsFileName);
98
- let mainPath = "";
99
- const entryPointsExists = await this.fileSystem.exists(entryPointsFilePath);
100
- if (entryPointsExists) {
101
- const entryPointsContent = await this.fileSystem.readFile(entryPointsFilePath);
102
- if (entryPointsContent)
103
- try {
104
- const entryPointsText = new TextDecoder().decode(entryPointsContent);
105
- const entryPoints = JSON.parse(entryPointsText);
106
- mainPath = entryPoints.entryPoints?.[0]?.filePath ?? "";
107
- } catch {}
108
- }
109
- const operateFileModel = {
110
- $schema: "https://cloud.uipath.com/draft/2024-12/operate",
111
- contentType: ProjectTypes.ProcessOrchestration,
112
- projectId,
113
- main: mainPath,
114
- targetFramework: "Portable",
115
- runtimeOptions: {
116
- isAttended: false,
117
- requiresUserInteraction: false
118
- }
119
- };
120
- const operateJsonString = JSON.stringify(operateFileModel, null, 2);
121
- await this.fileSystem.writeFile(filePath, operateJsonString);
122
- }
123
- async createPackageDescriptor(localBuildFolder, contentFolder) {
124
- const descriptorFiles = {};
125
- descriptorFiles[NugetConstants.OperateFileName] = Path.join(NugetConstants.ContentFolderName, NugetConstants.OperateFileName);
126
- descriptorFiles[BpmnConstants.EntryPointsFileName] = Path.join(NugetConstants.ContentFolderName, BpmnConstants.EntryPointsFileName);
127
- descriptorFiles[NugetConstants.BindingsFileId] = Path.join(NugetConstants.ContentFolderName, BpmnConstants.BindingsV2FileName);
128
- const contentFiles = await this.fileSystem.readdir(contentFolder);
129
- for (const file of contentFiles)
130
- if (file.endsWith(".bpmn"))
131
- descriptorFiles[file] = Path.join(NugetConstants.ContentFolderName, file);
132
- const packageDescriptorPath = Path.join(localBuildFolder, NugetConstants.ContentFolderName, NugetConstants.PackageDescriptorFileName);
133
- const packageDescriptorJson = JSON.stringify({
134
- $schema: "https://cloud.uipath.com/draft/2024-12/package-descriptor",
135
- files: descriptorFiles
136
- }, null, 2);
137
- await this.fileSystem.writeFile(packageDescriptorPath, packageDescriptorJson);
138
- }
139
- constructor(fileSystem, logger) {
140
- super(fileSystem, logger), _define_property(this, "_temporaryStorage", undefined);
141
- this._temporaryStorage = new TemporaryStorageService(fileSystem);
142
- }
143
- }
144
- function bpmn_tool_factory_define_property(obj, key, value) {
145
- if (key in obj)
146
- Object.defineProperty(obj, key, {
147
- value,
148
- enumerable: true,
149
- configurable: true,
150
- writable: true
151
- });
152
- else
153
- obj[key] = value;
154
- return obj;
155
- }
156
-
157
- class BpmnToolFactory {
158
- async createAsync(logger, fileSystem) {
159
- return new BpmnTool(fileSystem, logger);
160
- }
161
- constructor() {
162
- bpmn_tool_factory_define_property(this, "supportedTypes", [
163
- ProjectTypes.ProcessOrchestration
164
- ]);
165
- }
166
- }
167
- toolsFactoryRepository.registerProjectToolFactory(new BpmnToolFactory);
1
+ // src/tool.ts
2
+ import"./packager-tool.js";
168
3
  // package.json
169
4
  var package_default = {
170
5
  name: "@uipath/maestro-tool",
171
- version: "0.1.9",
6
+ version: "0.1.11",
172
7
  description: "Create, debug, and run Maestro projects and jobs.",
173
8
  private: false,
174
9
  repository: {
175
10
  type: "git",
176
- url: "https://github.com/UiPath/uipcli.git",
11
+ url: "https://github.com/UiPath/cli.git",
177
12
  directory: "packages/maestro-tool"
178
13
  },
179
14
  publishConfig: {
180
- registry: "https://registry.npmjs.org/"
15
+ registry: "https://npm.pkg.github.com/@uipath"
181
16
  },
182
17
  keywords: [
183
- "uipcli-tool"
18
+ "cli-tool"
184
19
  ],
185
20
  type: "module",
186
21
  main: "./dist/tool.js",
@@ -194,7 +29,7 @@ var package_default = {
194
29
  "dist"
195
30
  ],
196
31
  scripts: {
197
- build: "bun build ./src/tool.ts --outdir dist --format esm --target node --external commander --external @uipath/common --external @uipath/auth --external @uipath/filesystem --external @uipath/solutionpackager-tool-core && bun build ./src/index.ts --outdir dist --format esm --target node --external '*/tool.js' --external commander --external @uipath/common --external @uipath/auth --external @uipath/filesystem --external @uipath/solutionpackager-tool-core",
32
+ build: "bun build ./src/packager-tool.ts --outdir dist --format esm --target node --external @uipath/solutionpackager-tool-core && bun build ./src/tool.ts --outdir dist --format esm --target node --external '*/packager-tool.js' --external commander --external @uipath/common --external @uipath/auth --external @uipath/filesystem --external @uipath/solutionpackager-tool-core && bun build ./src/index.ts --outdir dist --format esm --target node --external '*/tool.js' --external commander --external @uipath/common --external @uipath/auth --external @uipath/filesystem --external @uipath/solutionpackager-tool-core",
198
33
  package: "bun run build && bun pm pack",
199
34
  test: "vitest run && vitest run -c vitest.isolated.config.ts",
200
35
  "test:isolated": "vitest run -c vitest.isolated.config.ts",
@@ -204,17 +39,17 @@ var package_default = {
204
39
  },
205
40
  peerDependencies: {
206
41
  commander: "^14.0.3",
207
- "@uipath/common": "^0.1.7",
208
- "@uipath/auth": "^0.1.6",
42
+ "@uipath/common": "^0.1.12",
43
+ "@uipath/auth": "^0.1.9",
209
44
  "@uipath/filesystem": "^0.1.6",
210
- "@uipath/solutionpackager-tool-core": "^0.0.29"
45
+ "@uipath/solutionpackager-tool-core": "workspace:*"
211
46
  },
212
47
  devDependencies: {
213
- "@uipath/tool-bpmn": "0.0.5",
48
+ "@uipath/packager-tool-bpmn": "workspace:*",
214
49
  "@uipath/maestro-sdk": "workspace:*",
215
50
  "@uipath/orchestrator-sdk": "workspace:*",
216
51
  "bpmn-moddle": "^9.0.4",
217
- "@types/node": "^25.2.3",
52
+ "@types/node": "^25.5.0",
218
53
  typescript: "^5"
219
54
  }
220
55
  };
@@ -223,13 +58,21 @@ var package_default = {
223
58
  import { getLoginStatusAsync as getLoginStatusAsync3 } from "@uipath/auth";
224
59
  import {
225
60
  catchError as catchError7,
226
- logger as logger5,
61
+ logger as logger7,
227
62
  OutputFormatter as OutputFormatter2,
228
- processContext
63
+ processContext as processContext3
229
64
  } from "@uipath/common";
230
65
 
231
66
  // src/services/maestro-api.ts
232
- import { catchError as catchError2, logger as logger2 } from "@uipath/common";
67
+ import {
68
+ catchError as catchError2,
69
+ ErrorDecision,
70
+ logger as logger2,
71
+ MIN_INTERVAL_MS,
72
+ PollOutcome,
73
+ pollUntil,
74
+ processContext
75
+ } from "@uipath/common";
233
76
  import { getFileSystem } from "@uipath/filesystem";
234
77
 
235
78
  // ../orchestrator-sdk/generated/src/runtime.ts
@@ -460,6 +303,13 @@ function querystringSingleKey(key, value, keyPrefix = "") {
460
303
  }
461
304
  return `${encodeURIComponent(fullKey)}=${encodeURIComponent(String(value))}`;
462
305
  }
306
+ function mapValues(data, fn) {
307
+ const result = {};
308
+ for (const key of Object.keys(data)) {
309
+ result[key] = fn(data[key]);
310
+ }
311
+ return result;
312
+ }
463
313
  class JSONApiResponse {
464
314
  raw;
465
315
  transformer;
@@ -718,6 +568,73 @@ function ResourceOverwriteDtoToJSONTyped(value, ignoreDiscriminator = false) {
718
568
  };
719
569
  }
720
570
 
571
+ // ../orchestrator-sdk/generated/src/models/VideoRecordingSettingsDto.ts
572
+ function VideoRecordingSettingsDtoFromJSON(json) {
573
+ return VideoRecordingSettingsDtoFromJSONTyped(json, false);
574
+ }
575
+ function VideoRecordingSettingsDtoFromJSONTyped(json, ignoreDiscriminator) {
576
+ if (json == null) {
577
+ return json;
578
+ }
579
+ return {
580
+ videoRecordingType: json["VideoRecordingType"] == null ? undefined : json["VideoRecordingType"],
581
+ queueItemVideoRecordingType: json["QueueItemVideoRecordingType"] == null ? undefined : json["QueueItemVideoRecordingType"],
582
+ maxDurationSeconds: json["MaxDurationSeconds"] == null ? undefined : json["MaxDurationSeconds"]
583
+ };
584
+ }
585
+ function VideoRecordingSettingsDtoToJSON(json) {
586
+ return VideoRecordingSettingsDtoToJSONTyped(json, false);
587
+ }
588
+ function VideoRecordingSettingsDtoToJSONTyped(value, ignoreDiscriminator = false) {
589
+ if (value == null) {
590
+ return value;
591
+ }
592
+ return {
593
+ VideoRecordingType: value["videoRecordingType"],
594
+ QueueItemVideoRecordingType: value["queueItemVideoRecordingType"],
595
+ MaxDurationSeconds: value["maxDurationSeconds"]
596
+ };
597
+ }
598
+
599
+ // ../orchestrator-sdk/generated/src/models/TestAutomationJobDto.ts
600
+ function TestAutomationJobDtoToJSON(json) {
601
+ return TestAutomationJobDtoToJSONTyped(json, false);
602
+ }
603
+ function TestAutomationJobDtoToJSONTyped(value, ignoreDiscriminator = false) {
604
+ if (value == null) {
605
+ return value;
606
+ }
607
+ return {
608
+ key: value["key"],
609
+ releaseId: value["releaseId"],
610
+ releaseVersionId: value["releaseVersionId"],
611
+ inputArguments: value["inputArguments"],
612
+ entryPointPath: value["entryPointPath"],
613
+ robotId: value["robotId"],
614
+ runtimeType: value["runtimeType"],
615
+ machineId: value["machineId"],
616
+ hostMachineName: value["hostMachineName"],
617
+ serviceUserName: value["serviceUserName"],
618
+ remoteControlAccess: value["remoteControlAccess"],
619
+ autopilotForRobots: AutopilotForRobotsSettingsDtoToJSON(value["autopilotForRobots"]),
620
+ videoRecordingSettings: VideoRecordingSettingsDtoToJSON(value["videoRecordingSettings"])
621
+ };
622
+ }
623
+
624
+ // ../orchestrator-sdk/generated/src/models/CreateTestAutomationJobsRequest.ts
625
+ function CreateTestAutomationJobsRequestToJSON(json) {
626
+ return CreateTestAutomationJobsRequestToJSONTyped(json, false);
627
+ }
628
+ function CreateTestAutomationJobsRequestToJSONTyped(value, ignoreDiscriminator = false) {
629
+ if (value == null) {
630
+ return value;
631
+ }
632
+ return {
633
+ batchExecutionKey: value["batchExecutionKey"],
634
+ jobs: value["jobs"] == null ? undefined : value["jobs"].map(TestAutomationJobDtoToJSON)
635
+ };
636
+ }
637
+
721
638
  // ../orchestrator-sdk/generated/src/models/CurrentUserFolderDto.ts
722
639
  function CurrentUserFolderDtoFromJSON(json) {
723
640
  return CurrentUserFolderDtoFromJSONTyped(json, false);
@@ -738,6 +655,51 @@ function CurrentUserFolderDtoFromJSONTyped(json, ignoreDiscriminator) {
738
655
  };
739
656
  }
740
657
 
658
+ // ../orchestrator-sdk/generated/src/models/UserJobDto.ts
659
+ function UserJobDtoFromJSON(json) {
660
+ return UserJobDtoFromJSONTyped(json, false);
661
+ }
662
+ function UserJobDtoFromJSONTyped(json, ignoreDiscriminator) {
663
+ if (json == null) {
664
+ return json;
665
+ }
666
+ return {
667
+ key: json["key"] == null ? undefined : json["key"],
668
+ packageId: json["packageId"] == null ? undefined : json["packageId"],
669
+ processName: json["processName"] == null ? undefined : json["processName"],
670
+ packageVersion: json["packageVersion"] == null ? undefined : json["packageVersion"],
671
+ processKey: json["processKey"] == null ? undefined : json["processKey"],
672
+ state: json["state"] == null ? undefined : json["state"],
673
+ startTime: json["startTime"] == null ? undefined : new Date(json["startTime"]),
674
+ endTime: json["endTime"] == null ? undefined : new Date(json["endTime"]),
675
+ creationTime: json["creationTime"] == null ? undefined : new Date(json["creationTime"]),
676
+ folderId: json["folderId"] == null ? undefined : json["folderId"],
677
+ fullyQualifiedFolderName: json["fullyQualifiedFolderName"] == null ? undefined : json["fullyQualifiedFolderName"],
678
+ source: json["source"] == null ? undefined : json["source"],
679
+ info: json["info"] == null ? undefined : json["info"],
680
+ hasVideoRecorded: json["hasVideoRecorded"] == null ? undefined : json["hasVideoRecorded"],
681
+ hostMachineName: json["hostMachineName"] == null ? undefined : json["hostMachineName"],
682
+ outputArguments: json["outputArguments"] == null ? undefined : json["outputArguments"],
683
+ id: json["id"] == null ? undefined : json["id"]
684
+ };
685
+ }
686
+
687
+ // ../orchestrator-sdk/generated/src/models/CursorPaginationResultOfUserJobDto.ts
688
+ function CursorPaginationResultOfUserJobDtoFromJSON(json) {
689
+ return CursorPaginationResultOfUserJobDtoFromJSONTyped(json, false);
690
+ }
691
+ function CursorPaginationResultOfUserJobDtoFromJSONTyped(json, ignoreDiscriminator) {
692
+ if (json == null) {
693
+ return json;
694
+ }
695
+ return {
696
+ count: json["count"] == null ? undefined : json["count"],
697
+ result: json["result"] == null ? undefined : json["result"].map(UserJobDtoFromJSON),
698
+ nextCursor: json["nextCursor"] == null ? undefined : json["nextCursor"],
699
+ prevCursor: json["prevCursor"] == null ? undefined : json["prevCursor"]
700
+ };
701
+ }
702
+
741
703
  // ../orchestrator-sdk/generated/src/models/FolderRolesDto.ts
742
704
  function FolderRolesDtoToJSON(json) {
743
705
  return FolderRolesDtoToJSONTyped(json, false);
@@ -784,6 +746,20 @@ function EntityCountDtoFromJSONTyped(json, ignoreDiscriminator) {
784
746
  };
785
747
  }
786
748
 
749
+ // ../orchestrator-sdk/generated/src/models/EntityHasExecutionMedia.ts
750
+ function EntityHasExecutionMediaFromJSON(json) {
751
+ return EntityHasExecutionMediaFromJSONTyped(json, false);
752
+ }
753
+ function EntityHasExecutionMediaFromJSONTyped(json, ignoreDiscriminator) {
754
+ if (json == null) {
755
+ return json;
756
+ }
757
+ return {
758
+ hasScreenshotsRecorded: json["hasScreenshotsRecorded"] == null ? undefined : json["hasScreenshotsRecorded"],
759
+ hasVideoRecorded: json["hasVideoRecorded"] == null ? undefined : json["hasVideoRecorded"]
760
+ };
761
+ }
762
+
787
763
  // ../orchestrator-sdk/generated/src/models/EntitySummaryDto.ts
788
764
  function EntitySummaryDtoFromJSON(json) {
789
765
  return EntitySummaryDtoFromJSONTyped(json, false);
@@ -989,6 +965,20 @@ function EnvironmentDtoToJSONTyped2(value, ignoreDiscriminator = false) {
989
965
  };
990
966
  }
991
967
 
968
+ // ../orchestrator-sdk/generated/src/models/UpdatePolicyDto.ts
969
+ function UpdatePolicyDtoFromJSON(json) {
970
+ return UpdatePolicyDtoFromJSONTyped(json, false);
971
+ }
972
+ function UpdatePolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
973
+ if (json == null) {
974
+ return json;
975
+ }
976
+ return {
977
+ type: json["Type"] == null ? undefined : json["Type"],
978
+ specificVersion: json["SpecificVersion"] == null ? undefined : json["SpecificVersion"]
979
+ };
980
+ }
981
+
992
982
  // ../orchestrator-sdk/generated/src/models/ExportModel.ts
993
983
  function ExportModelFromJSON(json) {
994
984
  return ExportModelFromJSONTyped(json, false);
@@ -1035,6 +1025,84 @@ function ExtendedFolderDtoFromJSONTyped(json, ignoreDiscriminator) {
1035
1025
  };
1036
1026
  }
1037
1027
 
1028
+ // ../orchestrator-sdk/generated/src/models/MachineVpnSettingsDto.ts
1029
+ function MachineVpnSettingsDtoFromJSON(json) {
1030
+ return MachineVpnSettingsDtoFromJSONTyped(json, false);
1031
+ }
1032
+ function MachineVpnSettingsDtoFromJSONTyped(json, ignoreDiscriminator) {
1033
+ if (json == null) {
1034
+ return json;
1035
+ }
1036
+ return {
1037
+ cidr: json["cidr"] == null ? undefined : json["cidr"]
1038
+ };
1039
+ }
1040
+
1041
+ // ../orchestrator-sdk/generated/src/models/MaintenanceWindowDto.ts
1042
+ function MaintenanceWindowDtoFromJSON(json) {
1043
+ return MaintenanceWindowDtoFromJSONTyped(json, false);
1044
+ }
1045
+ function MaintenanceWindowDtoFromJSONTyped(json, ignoreDiscriminator) {
1046
+ if (json == null) {
1047
+ return json;
1048
+ }
1049
+ return {
1050
+ enabled: json["enabled"] == null ? undefined : json["enabled"],
1051
+ jobStopStrategy: json["jobStopStrategy"] == null ? undefined : json["jobStopStrategy"],
1052
+ cronExpression: json["cronExpression"] == null ? undefined : json["cronExpression"],
1053
+ timezoneId: json["timezoneId"] == null ? undefined : json["timezoneId"],
1054
+ duration: json["duration"] == null ? undefined : json["duration"],
1055
+ nextExecutionTime: json["nextExecutionTime"] == null ? undefined : new Date(json["nextExecutionTime"])
1056
+ };
1057
+ }
1058
+
1059
+ // ../orchestrator-sdk/generated/src/models/UpdateInfoDto.ts
1060
+ function UpdateInfoDtoFromJSON(json) {
1061
+ return UpdateInfoDtoFromJSONTyped(json, false);
1062
+ }
1063
+ function UpdateInfoDtoFromJSONTyped(json, ignoreDiscriminator) {
1064
+ if (json == null) {
1065
+ return json;
1066
+ }
1067
+ return {
1068
+ updateStatus: json["updateStatus"] == null ? undefined : json["updateStatus"],
1069
+ reason: json["reason"] == null ? undefined : json["reason"],
1070
+ targetUpdateVersion: json["targetUpdateVersion"] == null ? undefined : json["targetUpdateVersion"],
1071
+ isCommunity: json["isCommunity"] == null ? undefined : json["isCommunity"],
1072
+ statusInfo: json["statusInfo"] == null ? undefined : json["statusInfo"]
1073
+ };
1074
+ }
1075
+
1076
+ // ../orchestrator-sdk/generated/src/models/MachinesRobotVersionDto.ts
1077
+ function MachinesRobotVersionDtoFromJSON(json) {
1078
+ return MachinesRobotVersionDtoFromJSONTyped(json, false);
1079
+ }
1080
+ function MachinesRobotVersionDtoFromJSONTyped(json, ignoreDiscriminator) {
1081
+ if (json == null) {
1082
+ return json;
1083
+ }
1084
+ return {
1085
+ count: json["Count"] == null ? undefined : json["Count"],
1086
+ version: json["Version"] == null ? undefined : json["Version"],
1087
+ machineId: json["MachineId"] == null ? undefined : json["MachineId"]
1088
+ };
1089
+ }
1090
+
1091
+ // ../orchestrator-sdk/generated/src/models/RobotUserDto.ts
1092
+ function RobotUserDtoFromJSON(json) {
1093
+ return RobotUserDtoFromJSONTyped(json, false);
1094
+ }
1095
+ function RobotUserDtoFromJSONTyped(json, ignoreDiscriminator) {
1096
+ if (json == null) {
1097
+ return json;
1098
+ }
1099
+ return {
1100
+ userName: json["UserName"] == null ? undefined : json["UserName"],
1101
+ robotId: json["RobotId"],
1102
+ hasTriggers: json["HasTriggers"] == null ? undefined : json["HasTriggers"]
1103
+ };
1104
+ }
1105
+
1038
1106
  // ../orchestrator-sdk/generated/src/models/ExtendedResourceOverwriteDto.ts
1039
1107
  function ExtendedResourceOverwriteDtoToJSON(json) {
1040
1108
  return ExtendedResourceOverwriteDtoToJSONTyped(json, false);
@@ -1055,6 +1123,69 @@ function ExtendedResourceOverwriteDtoToJSONTyped(value, ignoreDiscriminator = fa
1055
1123
  };
1056
1124
  }
1057
1125
 
1126
+ // ../orchestrator-sdk/generated/src/models/UserRoleDto.ts
1127
+ function UserRoleDtoFromJSON(json) {
1128
+ return UserRoleDtoFromJSONTyped(json, false);
1129
+ }
1130
+ function UserRoleDtoFromJSONTyped(json, ignoreDiscriminator) {
1131
+ if (json == null) {
1132
+ return json;
1133
+ }
1134
+ return {
1135
+ userId: json["UserId"] == null ? undefined : json["UserId"],
1136
+ roleId: json["RoleId"] == null ? undefined : json["RoleId"],
1137
+ userName: json["UserName"] == null ? undefined : json["UserName"],
1138
+ roleName: json["RoleName"] == null ? undefined : json["RoleName"],
1139
+ roleType: json["RoleType"] == null ? undefined : json["RoleType"],
1140
+ id: json["Id"] == null ? undefined : json["Id"]
1141
+ };
1142
+ }
1143
+
1144
+ // ../orchestrator-sdk/generated/src/models/FolderDto.ts
1145
+ function FolderDtoFromJSON(json) {
1146
+ return FolderDtoFromJSONTyped(json, false);
1147
+ }
1148
+ function FolderDtoFromJSONTyped(json, ignoreDiscriminator) {
1149
+ if (json == null) {
1150
+ return json;
1151
+ }
1152
+ return {
1153
+ key: json["Key"] == null ? undefined : json["Key"],
1154
+ displayName: json["DisplayName"],
1155
+ fullyQualifiedName: json["FullyQualifiedName"] == null ? undefined : json["FullyQualifiedName"],
1156
+ description: json["Description"] == null ? undefined : json["Description"],
1157
+ folderType: json["FolderType"] == null ? undefined : json["FolderType"],
1158
+ isPersonal: json["IsPersonal"] == null ? undefined : json["IsPersonal"],
1159
+ provisionType: json["ProvisionType"] == null ? undefined : json["ProvisionType"],
1160
+ permissionModel: json["PermissionModel"] == null ? undefined : json["PermissionModel"],
1161
+ parentId: json["ParentId"] == null ? undefined : json["ParentId"],
1162
+ parentKey: json["ParentKey"] == null ? undefined : json["ParentKey"],
1163
+ feedType: json["FeedType"] == null ? undefined : json["FeedType"],
1164
+ id: json["Id"] == null ? undefined : json["Id"]
1165
+ };
1166
+ }
1167
+ function FolderDtoToJSON(json) {
1168
+ return FolderDtoToJSONTyped(json, false);
1169
+ }
1170
+ function FolderDtoToJSONTyped(value, ignoreDiscriminator = false) {
1171
+ if (value == null) {
1172
+ return value;
1173
+ }
1174
+ return {
1175
+ Key: value["key"],
1176
+ DisplayName: value["displayName"],
1177
+ FullyQualifiedName: value["fullyQualifiedName"],
1178
+ Description: value["description"],
1179
+ FolderType: value["folderType"],
1180
+ ProvisionType: value["provisionType"],
1181
+ PermissionModel: value["permissionModel"],
1182
+ ParentId: value["parentId"],
1183
+ ParentKey: value["parentKey"],
1184
+ FeedType: value["feedType"],
1185
+ Id: value["id"]
1186
+ };
1187
+ }
1188
+
1058
1189
  // ../orchestrator-sdk/generated/src/models/FireTriggersForTasksRequest.ts
1059
1190
  function FireTriggersForTasksRequestToJSON(json) {
1060
1191
  return FireTriggersForTasksRequestToJSONTyped(json, false);
@@ -1207,51 +1338,6 @@ function FolderAssignmentsDtoFromJSONTyped(json, ignoreDiscriminator) {
1207
1338
  };
1208
1339
  }
1209
1340
 
1210
- // ../orchestrator-sdk/generated/src/models/FolderDto.ts
1211
- function FolderDtoFromJSON(json) {
1212
- return FolderDtoFromJSONTyped(json, false);
1213
- }
1214
- function FolderDtoFromJSONTyped(json, ignoreDiscriminator) {
1215
- if (json == null) {
1216
- return json;
1217
- }
1218
- return {
1219
- key: json["Key"] == null ? undefined : json["Key"],
1220
- displayName: json["DisplayName"],
1221
- fullyQualifiedName: json["FullyQualifiedName"] == null ? undefined : json["FullyQualifiedName"],
1222
- description: json["Description"] == null ? undefined : json["Description"],
1223
- folderType: json["FolderType"] == null ? undefined : json["FolderType"],
1224
- isPersonal: json["IsPersonal"] == null ? undefined : json["IsPersonal"],
1225
- provisionType: json["ProvisionType"] == null ? undefined : json["ProvisionType"],
1226
- permissionModel: json["PermissionModel"] == null ? undefined : json["PermissionModel"],
1227
- parentId: json["ParentId"] == null ? undefined : json["ParentId"],
1228
- parentKey: json["ParentKey"] == null ? undefined : json["ParentKey"],
1229
- feedType: json["FeedType"] == null ? undefined : json["FeedType"],
1230
- id: json["Id"] == null ? undefined : json["Id"]
1231
- };
1232
- }
1233
- function FolderDtoToJSON(json) {
1234
- return FolderDtoToJSONTyped(json, false);
1235
- }
1236
- function FolderDtoToJSONTyped(value, ignoreDiscriminator = false) {
1237
- if (value == null) {
1238
- return value;
1239
- }
1240
- return {
1241
- Key: value["key"],
1242
- DisplayName: value["displayName"],
1243
- FullyQualifiedName: value["fullyQualifiedName"],
1244
- Description: value["description"],
1245
- FolderType: value["folderType"],
1246
- ProvisionType: value["provisionType"],
1247
- PermissionModel: value["permissionModel"],
1248
- ParentId: value["parentId"],
1249
- ParentKey: value["parentKey"],
1250
- FeedType: value["feedType"],
1251
- Id: value["id"]
1252
- };
1253
- }
1254
-
1255
1341
  // ../orchestrator-sdk/generated/src/models/FolderIdentifier.ts
1256
1342
  function FolderIdentifierFromJSON(json) {
1257
1343
  return FolderIdentifierFromJSONTyped(json, false);
@@ -1377,6 +1463,38 @@ function GetReleasesBindingsRequestToJSONTyped(value, ignoreDiscriminator = fals
1377
1463
  };
1378
1464
  }
1379
1465
 
1466
+ // ../orchestrator-sdk/generated/src/models/HierarchyJobDto.ts
1467
+ function HierarchyJobDtoFromJSON(json) {
1468
+ return HierarchyJobDtoFromJSONTyped(json, false);
1469
+ }
1470
+ function HierarchyJobDtoFromJSONTyped(json, ignoreDiscriminator) {
1471
+ if (json == null) {
1472
+ return json;
1473
+ }
1474
+ return {
1475
+ key: json["key"] == null ? undefined : json["key"],
1476
+ parentJobKey: json["parentJobKey"] == null ? undefined : json["parentJobKey"],
1477
+ processType: json["processType"] == null ? undefined : json["processType"],
1478
+ state: json["state"] == null ? undefined : json["state"],
1479
+ startTime: json["startTime"] == null ? undefined : new Date(json["startTime"]),
1480
+ endTime: json["endTime"] == null ? undefined : new Date(json["endTime"]),
1481
+ machineName: json["machineName"] == null ? undefined : json["machineName"],
1482
+ hostMachineName: json["hostMachineName"] == null ? undefined : json["hostMachineName"],
1483
+ priority: json["priority"] == null ? undefined : json["priority"],
1484
+ specificPriorityValue: json["specificPriorityValue"] == null ? undefined : json["specificPriorityValue"],
1485
+ runtimeType: json["runtimeType"] == null ? undefined : json["runtimeType"],
1486
+ type: json["type"] == null ? undefined : json["type"],
1487
+ serverlessJobType: json["serverlessJobType"] == null ? undefined : json["serverlessJobType"],
1488
+ entryPointPath: json["entryPointPath"] == null ? undefined : json["entryPointPath"],
1489
+ source: json["source"] == null ? undefined : json["source"],
1490
+ sourceType: json["sourceType"] == null ? undefined : json["sourceType"],
1491
+ folderKey: json["folderKey"] == null ? undefined : json["folderKey"],
1492
+ folderName: json["folderName"] == null ? undefined : json["folderName"],
1493
+ releaseName: json["releaseName"] == null ? undefined : json["releaseName"],
1494
+ releaseKey: json["releaseKey"] == null ? undefined : json["releaseKey"]
1495
+ };
1496
+ }
1497
+
1380
1498
  // ../orchestrator-sdk/generated/src/models/JobArgumentsSchemaDto.ts
1381
1499
  function JobArgumentsSchemaDtoFromJSON(json) {
1382
1500
  return JobArgumentsSchemaDtoFromJSONTyped(json, false);
@@ -1486,34 +1604,6 @@ function ProcessSettingsDtoToJSONTyped(value, ignoreDiscriminator = false) {
1486
1604
  };
1487
1605
  }
1488
1606
 
1489
- // ../orchestrator-sdk/generated/src/models/VideoRecordingSettingsDto.ts
1490
- function VideoRecordingSettingsDtoFromJSON(json) {
1491
- return VideoRecordingSettingsDtoFromJSONTyped(json, false);
1492
- }
1493
- function VideoRecordingSettingsDtoFromJSONTyped(json, ignoreDiscriminator) {
1494
- if (json == null) {
1495
- return json;
1496
- }
1497
- return {
1498
- videoRecordingType: json["VideoRecordingType"] == null ? undefined : json["VideoRecordingType"],
1499
- queueItemVideoRecordingType: json["QueueItemVideoRecordingType"] == null ? undefined : json["QueueItemVideoRecordingType"],
1500
- maxDurationSeconds: json["MaxDurationSeconds"] == null ? undefined : json["MaxDurationSeconds"]
1501
- };
1502
- }
1503
- function VideoRecordingSettingsDtoToJSON(json) {
1504
- return VideoRecordingSettingsDtoToJSONTyped(json, false);
1505
- }
1506
- function VideoRecordingSettingsDtoToJSONTyped(value, ignoreDiscriminator = false) {
1507
- if (value == null) {
1508
- return value;
1509
- }
1510
- return {
1511
- VideoRecordingType: value["videoRecordingType"],
1512
- QueueItemVideoRecordingType: value["queueItemVideoRecordingType"],
1513
- MaxDurationSeconds: value["maxDurationSeconds"]
1514
- };
1515
- }
1516
-
1517
1607
  // ../orchestrator-sdk/generated/src/models/SimpleReleaseDto.ts
1518
1608
  function SimpleReleaseDtoFromJSON(json) {
1519
1609
  return SimpleReleaseDtoFromJSONTyped(json, false);
@@ -1543,6 +1633,7 @@ function SimpleReleaseDtoFromJSONTyped(json, ignoreDiscriminator) {
1543
1633
  supportsMultipleEntryPoints: json["SupportsMultipleEntryPoints"] == null ? undefined : json["SupportsMultipleEntryPoints"],
1544
1634
  requiresUserInteraction: json["RequiresUserInteraction"] == null ? undefined : json["RequiresUserInteraction"],
1545
1635
  isConversational: json["IsConversational"] == null ? undefined : json["IsConversational"],
1636
+ slug: json["Slug"] == null ? undefined : json["Slug"],
1546
1637
  minRequiredRobotVersion: json["MinRequiredRobotVersion"] == null ? undefined : json["MinRequiredRobotVersion"],
1547
1638
  isAttended: json["IsAttended"] == null ? undefined : json["IsAttended"],
1548
1639
  isCompiled: json["IsCompiled"] == null ? undefined : json["IsCompiled"],
@@ -1576,81 +1667,6 @@ function SimpleReleaseDtoFromJSONTyped(json, ignoreDiscriminator) {
1576
1667
  };
1577
1668
  }
1578
1669
 
1579
- // ../orchestrator-sdk/generated/src/models/MachineVpnSettingsDto.ts
1580
- function MachineVpnSettingsDtoFromJSON(json) {
1581
- return MachineVpnSettingsDtoFromJSONTyped(json, false);
1582
- }
1583
- function MachineVpnSettingsDtoFromJSONTyped(json, ignoreDiscriminator) {
1584
- if (json == null) {
1585
- return json;
1586
- }
1587
- return {
1588
- cidr: json["cidr"] == null ? undefined : json["cidr"]
1589
- };
1590
- }
1591
-
1592
- // ../orchestrator-sdk/generated/src/models/MaintenanceWindowDto.ts
1593
- function MaintenanceWindowDtoFromJSON(json) {
1594
- return MaintenanceWindowDtoFromJSONTyped(json, false);
1595
- }
1596
- function MaintenanceWindowDtoFromJSONTyped(json, ignoreDiscriminator) {
1597
- if (json == null) {
1598
- return json;
1599
- }
1600
- return {
1601
- enabled: json["enabled"] == null ? undefined : json["enabled"],
1602
- jobStopStrategy: json["jobStopStrategy"] == null ? undefined : json["jobStopStrategy"],
1603
- cronExpression: json["cronExpression"] == null ? undefined : json["cronExpression"],
1604
- timezoneId: json["timezoneId"] == null ? undefined : json["timezoneId"],
1605
- duration: json["duration"] == null ? undefined : json["duration"],
1606
- nextExecutionTime: json["nextExecutionTime"] == null ? undefined : new Date(json["nextExecutionTime"])
1607
- };
1608
- }
1609
-
1610
- // ../orchestrator-sdk/generated/src/models/MachinesRobotVersionDto.ts
1611
- function MachinesRobotVersionDtoFromJSON(json) {
1612
- return MachinesRobotVersionDtoFromJSONTyped(json, false);
1613
- }
1614
- function MachinesRobotVersionDtoFromJSONTyped(json, ignoreDiscriminator) {
1615
- if (json == null) {
1616
- return json;
1617
- }
1618
- return {
1619
- count: json["Count"] == null ? undefined : json["Count"],
1620
- version: json["Version"] == null ? undefined : json["Version"],
1621
- machineId: json["MachineId"] == null ? undefined : json["MachineId"]
1622
- };
1623
- }
1624
-
1625
- // ../orchestrator-sdk/generated/src/models/UpdatePolicyDto.ts
1626
- function UpdatePolicyDtoFromJSON(json) {
1627
- return UpdatePolicyDtoFromJSONTyped(json, false);
1628
- }
1629
- function UpdatePolicyDtoFromJSONTyped(json, ignoreDiscriminator) {
1630
- if (json == null) {
1631
- return json;
1632
- }
1633
- return {
1634
- type: json["Type"] == null ? undefined : json["Type"],
1635
- specificVersion: json["SpecificVersion"] == null ? undefined : json["SpecificVersion"]
1636
- };
1637
- }
1638
-
1639
- // ../orchestrator-sdk/generated/src/models/RobotUserDto.ts
1640
- function RobotUserDtoFromJSON(json) {
1641
- return RobotUserDtoFromJSONTyped(json, false);
1642
- }
1643
- function RobotUserDtoFromJSONTyped(json, ignoreDiscriminator) {
1644
- if (json == null) {
1645
- return json;
1646
- }
1647
- return {
1648
- userName: json["UserName"] == null ? undefined : json["UserName"],
1649
- robotId: json["RobotId"],
1650
- hasTriggers: json["HasTriggers"] == null ? undefined : json["HasTriggers"]
1651
- };
1652
- }
1653
-
1654
1670
  // ../orchestrator-sdk/generated/src/models/MachineDto.ts
1655
1671
  function MachineDtoFromJSON(json) {
1656
1672
  return MachineDtoFromJSONTyped(json, false);
@@ -1779,20 +1795,67 @@ function JobMachineInfraTargetDtoToJSONTyped(value, ignoreDiscriminator = false)
1779
1795
  };
1780
1796
  }
1781
1797
 
1782
- // ../orchestrator-sdk/generated/src/models/UpdateInfoDto.ts
1783
- function UpdateInfoDtoFromJSON(json) {
1784
- return UpdateInfoDtoFromJSONTyped(json, false);
1798
+ // ../orchestrator-sdk/generated/src/models/JobStateChangeDto.ts
1799
+ function JobStateChangeDtoFromJSON(json) {
1800
+ return JobStateChangeDtoFromJSONTyped(json, false);
1785
1801
  }
1786
- function UpdateInfoDtoFromJSONTyped(json, ignoreDiscriminator) {
1802
+ function JobStateChangeDtoFromJSONTyped(json, ignoreDiscriminator) {
1787
1803
  if (json == null) {
1788
1804
  return json;
1789
1805
  }
1790
1806
  return {
1791
- updateStatus: json["updateStatus"] == null ? undefined : json["updateStatus"],
1792
- reason: json["reason"] == null ? undefined : json["reason"],
1793
- targetUpdateVersion: json["targetUpdateVersion"] == null ? undefined : json["targetUpdateVersion"],
1794
- isCommunity: json["isCommunity"] == null ? undefined : json["isCommunity"],
1795
- statusInfo: json["statusInfo"] == null ? undefined : json["statusInfo"]
1807
+ jobId: json["jobId"] == null ? undefined : json["jobId"],
1808
+ creationTime: json["creationTime"] == null ? undefined : new Date(json["creationTime"]),
1809
+ state: json["state"] == null ? undefined : json["state"],
1810
+ previousState: json["previousState"] == null ? undefined : json["previousState"],
1811
+ subState: json["subState"] == null ? undefined : json["subState"],
1812
+ resumeItemKey: json["resumeItemKey"] == null ? undefined : json["resumeItemKey"],
1813
+ resumeItemType: json["resumeItemType"] == null ? undefined : json["resumeItemType"]
1814
+ };
1815
+ }
1816
+
1817
+ // ../orchestrator-sdk/generated/src/models/JobStatusOutputInfo.ts
1818
+ function JobStatusOutputInfoFromJSON(json) {
1819
+ return JobStatusOutputInfoFromJSONTyped(json, false);
1820
+ }
1821
+ function JobStatusOutputInfoFromJSONTyped(json, ignoreDiscriminator) {
1822
+ if (json == null) {
1823
+ return json;
1824
+ }
1825
+ return {
1826
+ id: json["id"] == null ? undefined : json["id"],
1827
+ key: json["key"] == null ? undefined : json["key"],
1828
+ state: json["state"] == null ? undefined : json["state"],
1829
+ startTime: json["startTime"] == null ? undefined : new Date(json["startTime"]),
1830
+ endTime: json["endTime"] == null ? undefined : new Date(json["endTime"]),
1831
+ creationTime: json["creationTime"] == null ? undefined : new Date(json["creationTime"]),
1832
+ hostMachineName: json["hostMachineName"] == null ? undefined : json["hostMachineName"],
1833
+ organizationUnitId: json["organizationUnitId"] == null ? undefined : json["organizationUnitId"],
1834
+ startingTriggerId: json["startingTriggerId"] == null ? undefined : json["startingTriggerId"],
1835
+ outputArguments: json["outputArguments"] == null ? undefined : json["outputArguments"],
1836
+ info: json["info"] == null ? undefined : json["info"],
1837
+ parentOperationId: json["parentOperationId"] == null ? undefined : json["parentOperationId"],
1838
+ runtimeErrorCode: json["runtimeErrorCode"] == null ? undefined : json["runtimeErrorCode"],
1839
+ targetFramework: json["targetFramework"] == null ? undefined : json["targetFramework"],
1840
+ processName: json["processName"] == null ? undefined : json["processName"],
1841
+ processVersion: json["processVersion"] == null ? undefined : json["processVersion"],
1842
+ folderFullyQualifiedName: json["folderFullyQualifiedName"] == null ? undefined : json["folderFullyQualifiedName"],
1843
+ folderPath: json["folderPath"] == null ? undefined : json["folderPath"],
1844
+ creatorUserKey: json["creatorUserKey"] == null ? undefined : json["creatorUserKey"]
1845
+ };
1846
+ }
1847
+
1848
+ // ../orchestrator-sdk/generated/src/models/JobsHaveExecutionMediaRequest.ts
1849
+ function JobsHaveExecutionMediaRequestToJSON(json) {
1850
+ return JobsHaveExecutionMediaRequestToJSONTyped(json, false);
1851
+ }
1852
+ function JobsHaveExecutionMediaRequestToJSONTyped(value, ignoreDiscriminator = false) {
1853
+ if (value == null) {
1854
+ return value;
1855
+ }
1856
+ return {
1857
+ jobIds: value["jobIds"],
1858
+ format: value["format"]
1796
1859
  };
1797
1860
  }
1798
1861
 
@@ -2011,33 +2074,15 @@ function PackageResourceDtoFromJSONTyped(json, ignoreDiscriminator) {
2011
2074
  }
2012
2075
 
2013
2076
  // ../orchestrator-sdk/generated/src/models/ODataValueOfIEnumerableOfPackageResourceDto.ts
2014
- function ODataValueOfIEnumerableOfPackageResourceDtoFromJSON(json) {
2015
- return ODataValueOfIEnumerableOfPackageResourceDtoFromJSONTyped(json, false);
2016
- }
2017
- function ODataValueOfIEnumerableOfPackageResourceDtoFromJSONTyped(json, ignoreDiscriminator) {
2018
- if (json == null) {
2019
- return json;
2020
- }
2021
- return {
2022
- value: json["value"] == null ? undefined : json["value"].map(PackageResourceDtoFromJSON)
2023
- };
2024
- }
2025
-
2026
- // ../orchestrator-sdk/generated/src/models/UserRoleDto.ts
2027
- function UserRoleDtoFromJSON(json) {
2028
- return UserRoleDtoFromJSONTyped(json, false);
2077
+ function ODataValueOfIEnumerableOfPackageResourceDtoFromJSON(json) {
2078
+ return ODataValueOfIEnumerableOfPackageResourceDtoFromJSONTyped(json, false);
2029
2079
  }
2030
- function UserRoleDtoFromJSONTyped(json, ignoreDiscriminator) {
2080
+ function ODataValueOfIEnumerableOfPackageResourceDtoFromJSONTyped(json, ignoreDiscriminator) {
2031
2081
  if (json == null) {
2032
2082
  return json;
2033
2083
  }
2034
2084
  return {
2035
- userId: json["UserId"] == null ? undefined : json["UserId"],
2036
- roleId: json["RoleId"] == null ? undefined : json["RoleId"],
2037
- userName: json["UserName"] == null ? undefined : json["UserName"],
2038
- roleName: json["RoleName"] == null ? undefined : json["RoleName"],
2039
- roleType: json["RoleType"] == null ? undefined : json["RoleType"],
2040
- id: json["Id"] == null ? undefined : json["Id"]
2085
+ value: json["value"] == null ? undefined : json["value"].map(PackageResourceDtoFromJSON)
2041
2086
  };
2042
2087
  }
2043
2088
 
@@ -2070,6 +2115,7 @@ function ReleaseDtoFromJSONTyped(json, ignoreDiscriminator) {
2070
2115
  supportsMultipleEntryPoints: json["SupportsMultipleEntryPoints"] == null ? undefined : json["SupportsMultipleEntryPoints"],
2071
2116
  requiresUserInteraction: json["RequiresUserInteraction"] == null ? undefined : json["RequiresUserInteraction"],
2072
2117
  isConversational: json["IsConversational"] == null ? undefined : json["IsConversational"],
2118
+ slug: json["Slug"] == null ? undefined : json["Slug"],
2073
2119
  minRequiredRobotVersion: json["MinRequiredRobotVersion"] == null ? undefined : json["MinRequiredRobotVersion"],
2074
2120
  isAttended: json["IsAttended"] == null ? undefined : json["IsAttended"],
2075
2121
  isCompiled: json["IsCompiled"] == null ? undefined : json["IsCompiled"],
@@ -2130,6 +2176,7 @@ function ReleaseDtoToJSONTyped(value, ignoreDiscriminator = false) {
2130
2176
  SupportsMultipleEntryPoints: value["supportsMultipleEntryPoints"],
2131
2177
  RequiresUserInteraction: value["requiresUserInteraction"],
2132
2178
  IsConversational: value["isConversational"],
2179
+ Slug: value["slug"],
2133
2180
  MinRequiredRobotVersion: value["minRequiredRobotVersion"],
2134
2181
  IsAttended: value["isAttended"],
2135
2182
  IsCompiled: value["isCompiled"],
@@ -2212,6 +2259,7 @@ function ReleaseListModelFromJSONTyped(json, ignoreDiscriminator) {
2212
2259
  supportsMultipleEntryPoints: json["SupportsMultipleEntryPoints"] == null ? undefined : json["SupportsMultipleEntryPoints"],
2213
2260
  requiresUserInteraction: json["RequiresUserInteraction"] == null ? undefined : json["RequiresUserInteraction"],
2214
2261
  isConversational: json["IsConversational"] == null ? undefined : json["IsConversational"],
2262
+ slug: json["Slug"] == null ? undefined : json["Slug"],
2215
2263
  minRequiredRobotVersion: json["MinRequiredRobotVersion"] == null ? undefined : json["MinRequiredRobotVersion"],
2216
2264
  isAttended: json["IsAttended"] == null ? undefined : json["IsAttended"],
2217
2265
  isCompiled: json["IsCompiled"] == null ? undefined : json["IsCompiled"],
@@ -2600,6 +2648,7 @@ function ReleaseCreateCommandToJSONTyped(value, ignoreDiscriminator = false) {
2600
2648
  SupportsMultipleEntryPoints: value["supportsMultipleEntryPoints"],
2601
2649
  RequiresUserInteraction: value["requiresUserInteraction"],
2602
2650
  IsConversational: value["isConversational"],
2651
+ Slug: value["slug"],
2603
2652
  MinRequiredRobotVersion: value["minRequiredRobotVersion"],
2604
2653
  IsAttended: value["isAttended"],
2605
2654
  IsCompiled: value["isCompiled"],
@@ -2673,6 +2722,7 @@ function ReleaseGetModelFromJSONTyped(json, ignoreDiscriminator) {
2673
2722
  supportsMultipleEntryPoints: json["SupportsMultipleEntryPoints"] == null ? undefined : json["SupportsMultipleEntryPoints"],
2674
2723
  requiresUserInteraction: json["RequiresUserInteraction"] == null ? undefined : json["RequiresUserInteraction"],
2675
2724
  isConversational: json["IsConversational"] == null ? undefined : json["IsConversational"],
2725
+ slug: json["Slug"] == null ? undefined : json["Slug"],
2676
2726
  minRequiredRobotVersion: json["MinRequiredRobotVersion"] == null ? undefined : json["MinRequiredRobotVersion"],
2677
2727
  isAttended: json["IsAttended"] == null ? undefined : json["IsAttended"],
2678
2728
  isCompiled: json["IsCompiled"] == null ? undefined : json["IsCompiled"],
@@ -2741,6 +2791,7 @@ function ReleaseUpdateCommandToJSONTyped(value, ignoreDiscriminator = false) {
2741
2791
  SupportsMultipleEntryPoints: value["supportsMultipleEntryPoints"],
2742
2792
  RequiresUserInteraction: value["requiresUserInteraction"],
2743
2793
  IsConversational: value["isConversational"],
2794
+ Slug: value["slug"],
2744
2795
  MinRequiredRobotVersion: value["minRequiredRobotVersion"],
2745
2796
  IsAttended: value["isAttended"],
2746
2797
  IsCompiled: value["isCompiled"],
@@ -4199,6 +4250,27 @@ class FoldersApi extends BaseAPI {
4199
4250
 
4200
4251
  // ../orchestrator-sdk/generated/src/apis/JobsApi.ts
4201
4252
  class JobsApi extends BaseAPI {
4253
+ async jobsCreateTestAutomationJobsRaw(requestParameters, initOverrides) {
4254
+ const queryParameters = {};
4255
+ const headerParameters = {};
4256
+ headerParameters["Content-Type"] = "application/json";
4257
+ if (this.configuration && this.configuration.accessToken) {
4258
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
4259
+ }
4260
+ let urlPath = `/api/Jobs/CreateTestAutomationJobs`;
4261
+ const response = await this.request({
4262
+ path: urlPath,
4263
+ method: "POST",
4264
+ headers: headerParameters,
4265
+ query: queryParameters,
4266
+ body: CreateTestAutomationJobsRequestToJSON(requestParameters["body"])
4267
+ }, initOverrides);
4268
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(JobDtoFromJSON));
4269
+ }
4270
+ async jobsCreateTestAutomationJobs(requestParameters = {}, initOverrides) {
4271
+ const response = await this.jobsCreateTestAutomationJobsRaw(requestParameters, initOverrides);
4272
+ return await response.value();
4273
+ }
4202
4274
  async jobsExportRaw(requestParameters, initOverrides) {
4203
4275
  const queryParameters = {};
4204
4276
  if (requestParameters["$select"] != null) {
@@ -4428,21 +4500,6 @@ class JobsApi extends BaseAPI {
4428
4500
  if (requestParameters["$expand"] != null) {
4429
4501
  queryParameters["$expand"] = requestParameters["$expand"];
4430
4502
  }
4431
- if (requestParameters["$filter"] != null) {
4432
- queryParameters["$filter"] = requestParameters["$filter"];
4433
- }
4434
- if (requestParameters["$orderby"] != null) {
4435
- queryParameters["$orderby"] = requestParameters["$orderby"];
4436
- }
4437
- if (requestParameters["$top"] != null) {
4438
- queryParameters["$top"] = requestParameters["$top"];
4439
- }
4440
- if (requestParameters["$skip"] != null) {
4441
- queryParameters["$skip"] = requestParameters["$skip"];
4442
- }
4443
- if (requestParameters["$count"] != null) {
4444
- queryParameters["$count"] = requestParameters["$count"];
4445
- }
4446
4503
  const headerParameters = {};
4447
4504
  if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
4448
4505
  headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
@@ -4464,6 +4521,81 @@ class JobsApi extends BaseAPI {
4464
4521
  const response = await this.jobsGetByKeyByIdentifierRaw(requestParameters, initOverrides);
4465
4522
  return await response.value();
4466
4523
  }
4524
+ async jobsGetJobGraphRaw(requestParameters, initOverrides) {
4525
+ if (requestParameters["jobKey"] == null) {
4526
+ throw new RequiredError("jobKey", 'Required parameter "jobKey" was null or undefined when calling jobsGetJobGraph().');
4527
+ }
4528
+ const queryParameters = {};
4529
+ if (requestParameters["jobKey"] != null) {
4530
+ queryParameters["jobKey"] = requestParameters["jobKey"];
4531
+ }
4532
+ const headerParameters = {};
4533
+ if (this.configuration && this.configuration.accessToken) {
4534
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
4535
+ }
4536
+ let urlPath = `/api/Jobs/GetJobGraph`;
4537
+ const response = await this.request({
4538
+ path: urlPath,
4539
+ method: "GET",
4540
+ headers: headerParameters,
4541
+ query: queryParameters
4542
+ }, initOverrides);
4543
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(HierarchyJobDtoFromJSON));
4544
+ }
4545
+ async jobsGetJobGraph(requestParameters, initOverrides) {
4546
+ const response = await this.jobsGetJobGraphRaw(requestParameters, initOverrides);
4547
+ return await response.value();
4548
+ }
4549
+ async jobsGetJobInfoRaw(requestParameters, initOverrides) {
4550
+ const queryParameters = {};
4551
+ if (requestParameters["jobKey"] != null) {
4552
+ queryParameters["jobKey"] = requestParameters["jobKey"];
4553
+ }
4554
+ const headerParameters = {};
4555
+ if (this.configuration && this.configuration.accessToken) {
4556
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
4557
+ }
4558
+ let urlPath = `/api/Jobs/GetJobInfo`;
4559
+ const response = await this.request({
4560
+ path: urlPath,
4561
+ method: "GET",
4562
+ headers: headerParameters,
4563
+ query: queryParameters
4564
+ }, initOverrides);
4565
+ return new JSONApiResponse(response, (jsonValue) => JobStatusOutputInfoFromJSON(jsonValue));
4566
+ }
4567
+ async jobsGetJobInfo(requestParameters = {}, initOverrides) {
4568
+ const response = await this.jobsGetJobInfoRaw(requestParameters, initOverrides);
4569
+ return await response.value();
4570
+ }
4571
+ async jobsGetJobStateHistoryRaw(requestParameters, initOverrides) {
4572
+ if (requestParameters["jobKey"] == null) {
4573
+ throw new RequiredError("jobKey", 'Required parameter "jobKey" was null or undefined when calling jobsGetJobStateHistory().');
4574
+ }
4575
+ const queryParameters = {};
4576
+ if (requestParameters["jobKey"] != null) {
4577
+ queryParameters["jobKey"] = requestParameters["jobKey"];
4578
+ }
4579
+ const headerParameters = {};
4580
+ if (requestParameters["xUIPATHOrganizationUnitId"] != null) {
4581
+ headerParameters["X-UIPATH-OrganizationUnitId"] = String(requestParameters["xUIPATHOrganizationUnitId"]);
4582
+ }
4583
+ if (this.configuration && this.configuration.accessToken) {
4584
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
4585
+ }
4586
+ let urlPath = `/api/Jobs/GetJobStateHistory`;
4587
+ const response = await this.request({
4588
+ path: urlPath,
4589
+ method: "GET",
4590
+ headers: headerParameters,
4591
+ query: queryParameters
4592
+ }, initOverrides);
4593
+ return new JSONApiResponse(response, (jsonValue) => jsonValue.map(JobStateChangeDtoFromJSON));
4594
+ }
4595
+ async jobsGetJobStateHistory(requestParameters, initOverrides) {
4596
+ const response = await this.jobsGetJobStateHistoryRaw(requestParameters, initOverrides);
4597
+ return await response.value();
4598
+ }
4467
4599
  async jobsGetRunningJobsByMachineByMachineidAndHostmachinenameRaw(requestParameters, initOverrides) {
4468
4600
  if (requestParameters["machineId"] == null) {
4469
4601
  throw new RequiredError("machineId", 'Required parameter "machineId" was null or undefined when calling jobsGetRunningJobsByMachineByMachineidAndHostmachinename().');
@@ -4518,6 +4650,70 @@ class JobsApi extends BaseAPI {
4518
4650
  const response = await this.jobsGetRunningJobsByMachineByMachineidAndHostmachinenameRaw(requestParameters, initOverrides);
4519
4651
  return await response.value();
4520
4652
  }
4653
+ async jobsGetUserJobsRaw(requestParameters, initOverrides) {
4654
+ const queryParameters = {};
4655
+ if (requestParameters["packageId"] != null) {
4656
+ queryParameters["packageId"] = requestParameters["packageId"];
4657
+ }
4658
+ if (requestParameters["processKey"] != null) {
4659
+ queryParameters["processKey"] = requestParameters["processKey"];
4660
+ }
4661
+ if (requestParameters["fromStartTime"] != null) {
4662
+ queryParameters["fromStartTime"] = requestParameters["fromStartTime"].toISOString();
4663
+ }
4664
+ if (requestParameters["limit"] != null) {
4665
+ queryParameters["limit"] = requestParameters["limit"];
4666
+ }
4667
+ if (requestParameters["targetFramework"] != null) {
4668
+ queryParameters["targetFramework"] = requestParameters["targetFramework"];
4669
+ }
4670
+ if (requestParameters["orderDirection"] != null) {
4671
+ queryParameters["orderDirection"] = requestParameters["orderDirection"];
4672
+ }
4673
+ if (requestParameters["cursor"] != null) {
4674
+ queryParameters["cursor"] = requestParameters["cursor"];
4675
+ }
4676
+ if (requestParameters["jobState"] != null) {
4677
+ queryParameters["jobState"] = requestParameters["jobState"];
4678
+ }
4679
+ const headerParameters = {};
4680
+ if (this.configuration && this.configuration.accessToken) {
4681
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
4682
+ }
4683
+ let urlPath = `/api/Jobs/GetUserJobs`;
4684
+ const response = await this.request({
4685
+ path: urlPath,
4686
+ method: "GET",
4687
+ headers: headerParameters,
4688
+ query: queryParameters
4689
+ }, initOverrides);
4690
+ return new JSONApiResponse(response, (jsonValue) => CursorPaginationResultOfUserJobDtoFromJSON(jsonValue));
4691
+ }
4692
+ async jobsGetUserJobs(requestParameters = {}, initOverrides) {
4693
+ const response = await this.jobsGetUserJobsRaw(requestParameters, initOverrides);
4694
+ return await response.value();
4695
+ }
4696
+ async jobsHaveExecutionMediaRaw(requestParameters, initOverrides) {
4697
+ const queryParameters = {};
4698
+ const headerParameters = {};
4699
+ headerParameters["Content-Type"] = "application/json";
4700
+ if (this.configuration && this.configuration.accessToken) {
4701
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
4702
+ }
4703
+ let urlPath = `/api/Jobs/HaveExecutionMedia`;
4704
+ const response = await this.request({
4705
+ path: urlPath,
4706
+ method: "POST",
4707
+ headers: headerParameters,
4708
+ query: queryParameters,
4709
+ body: JobsHaveExecutionMediaRequestToJSON(requestParameters["body"])
4710
+ }, initOverrides);
4711
+ return new JSONApiResponse(response, (jsonValue) => mapValues(jsonValue, EntityHasExecutionMediaFromJSON));
4712
+ }
4713
+ async jobsHaveExecutionMedia(requestParameters = {}, initOverrides) {
4714
+ const response = await this.jobsHaveExecutionMediaRaw(requestParameters, initOverrides);
4715
+ return await response.value();
4716
+ }
4521
4717
  async jobsRestartJobRaw(requestParameters, initOverrides) {
4522
4718
  const queryParameters = {};
4523
4719
  if (requestParameters["$select"] != null) {
@@ -4671,6 +4867,29 @@ class JobsApi extends BaseAPI {
4671
4867
  async jobsStopJobTreeById(requestParameters, initOverrides) {
4672
4868
  await this.jobsStopJobTreeByIdRaw(requestParameters, initOverrides);
4673
4869
  }
4870
+ async jobsStopJobTreeByKeyRaw(requestParameters, initOverrides) {
4871
+ const queryParameters = {};
4872
+ if (requestParameters["parentJobKey"] != null) {
4873
+ queryParameters["parentJobKey"] = requestParameters["parentJobKey"];
4874
+ }
4875
+ const headerParameters = {};
4876
+ headerParameters["Content-Type"] = "application/json";
4877
+ if (this.configuration && this.configuration.accessToken) {
4878
+ headerParameters["Authorization"] = await this.configuration.accessToken("OAuth2", []);
4879
+ }
4880
+ let urlPath = `/api/Jobs/StopJobTreeByKey`;
4881
+ const response = await this.request({
4882
+ path: urlPath,
4883
+ method: "POST",
4884
+ headers: headerParameters,
4885
+ query: queryParameters,
4886
+ body: StopJobRequestToJSON(requestParameters["body"])
4887
+ }, initOverrides);
4888
+ return new VoidApiResponse(response);
4889
+ }
4890
+ async jobsStopJobTreeByKey(requestParameters = {}, initOverrides) {
4891
+ await this.jobsStopJobTreeByKeyRaw(requestParameters, initOverrides);
4892
+ }
4674
4893
  async jobsStopJobsRaw(requestParameters, initOverrides) {
4675
4894
  const queryParameters = {};
4676
4895
  const headerParameters = {};
@@ -5801,6 +6020,12 @@ async function createOrchestratorConfig(options) {
5801
6020
  };
5802
6021
  if (options?.folderId) {
5803
6022
  headers["X-UIPATH-OrganizationUnitId"] = options.folderId;
6023
+ } else if (options?.folderKey && options?.folderPath) {
6024
+ throw new Error("Provide either folderKey or folderPath, not both.");
6025
+ } else if (options?.folderKey) {
6026
+ headers["X-UIPATH-FolderKey"] = options.folderKey;
6027
+ } else if (options?.folderPath) {
6028
+ headers["X-UIPATH-FolderPath"] = options.folderPath;
5804
6029
  }
5805
6030
  return new Configuration({
5806
6031
  basePath: orchestratorBasePath,
@@ -6018,64 +6243,99 @@ async function startMaestroProjectJob(config) {
6018
6243
  }
6019
6244
  return startMaestroJob(config);
6020
6245
  }
6246
+ var TRACE_TERMINAL_STATES = ["Completed", "Faulted", "Cancelled"];
6247
+ function extractTerminalStatus(spans) {
6248
+ const processRunSpan = spans.find((s) => s.SpanType === "ProcessRun");
6249
+ if (!processRunSpan) {
6250
+ return;
6251
+ }
6252
+ const [parseErr, attributes] = catchError2(() => JSON.parse(processRunSpan.Attributes));
6253
+ if (parseErr) {
6254
+ logger2.warn("Failed to parse ProcessRun span attributes");
6255
+ return;
6256
+ }
6257
+ const status = attributes.status;
6258
+ if (status && TRACE_TERMINAL_STATES.includes(status)) {
6259
+ return status;
6260
+ }
6261
+ return;
6262
+ }
6021
6263
  async function streamJobTraces(config, jobKey, options = {}) {
6022
6264
  const startTime = Date.now();
6023
6265
  const pollInterval = options.pollInterval || 2000;
6024
6266
  const maxPolls = options.maxPolls || 300;
6025
6267
  const traceId = jobKey;
6026
- let pollCount = 0;
6268
+ const effectiveInterval = Math.max(pollInterval, MIN_INTERVAL_MS);
6269
+ const timeoutMs = maxPolls * effectiveInterval;
6027
6270
  const seenSpanIds = new Set;
6028
6271
  let tracesFound = false;
6029
- while (pollCount < maxPolls) {
6030
- const [tracesErr, spans] = await catchError2(getMaestroTraces(config, traceId));
6031
- if (tracesErr) {
6032
- if (tracesErr.message.includes("404") || tracesErr.message.includes("400")) {
6033
- if (!tracesFound && pollCount % 5 === 0) {
6034
- logger2.info(`Waiting for traces... (${pollCount * pollInterval / 1000}s)`);
6272
+ let transientErrorCount = 0;
6273
+ const result = await pollUntil({
6274
+ fn: () => getMaestroTraces(config, traceId),
6275
+ until: (spans) => extractTerminalStatus(spans) !== undefined,
6276
+ label: `job ${jobKey}`,
6277
+ logPrefix: "maestro",
6278
+ intervalMs: pollInterval,
6279
+ timeoutMs,
6280
+ maxConsecutiveErrors: 0,
6281
+ signal: processContext.pollSignal,
6282
+ onPoll: (spans) => {
6283
+ transientErrorCount = 0;
6284
+ if (!tracesFound && spans.length > 0) {
6285
+ tracesFound = true;
6286
+ logger2.info("Execution started, streaming traces...");
6287
+ }
6288
+ for (const span of spans) {
6289
+ if (!seenSpanIds.has(span.Id)) {
6290
+ seenSpanIds.add(span.Id);
6291
+ options.onTrace?.(spanToTraceEvent(span));
6035
6292
  }
6036
- await new Promise((resolve) => setTimeout(resolve, pollInterval));
6037
- pollCount++;
6038
- continue;
6039
- }
6040
- throw tracesErr;
6041
- }
6042
- if (!tracesFound && spans.length > 0) {
6043
- tracesFound = true;
6044
- logger2.info("Execution started, streaming traces...");
6045
- }
6046
- for (const span of spans) {
6047
- if (!seenSpanIds.has(span.Id)) {
6048
- seenSpanIds.add(span.Id);
6049
- const traceEvent = spanToTraceEvent(span);
6050
- options.onTrace?.(traceEvent);
6051
6293
  }
6052
- }
6053
- const processRunSpan = spans.find((s) => s.SpanType === "ProcessRun");
6054
- if (processRunSpan) {
6055
- const [parseErr, attributes] = catchError2(() => JSON.parse(processRunSpan.Attributes));
6056
- if (parseErr || !attributes)
6057
- continue;
6058
- const status = attributes.status;
6059
- if (!status)
6060
- continue;
6061
- const terminalStates = ["Completed", "Faulted", "Cancelled"];
6062
- if (terminalStates.includes(status)) {
6063
- const success = status === "Completed";
6064
- const result = {
6065
- success,
6066
- jobKey,
6067
- traceId,
6068
- finalState: status,
6069
- duration: Date.now() - startTime
6070
- };
6071
- options.onComplete?.(result);
6072
- return result;
6294
+ },
6295
+ onError: (error) => {
6296
+ if (error.message.includes("404") || error.message.includes("400")) {
6297
+ if (!tracesFound && transientErrorCount % 5 === 0) {
6298
+ logger2.info("Waiting for traces...");
6299
+ }
6300
+ transientErrorCount++;
6301
+ return;
6073
6302
  }
6303
+ return ErrorDecision.Abort;
6074
6304
  }
6075
- await new Promise((resolve) => setTimeout(resolve, pollInterval));
6076
- pollCount++;
6305
+ });
6306
+ const elapsed = Date.now() - startTime;
6307
+ if (result.outcome === PollOutcome.Completed && result.data) {
6308
+ const status = extractTerminalStatus(result.data);
6309
+ const finalState = status ?? "Unknown";
6310
+ const runResult = {
6311
+ success: finalState === "Completed",
6312
+ jobKey,
6313
+ traceId,
6314
+ finalState,
6315
+ duration: elapsed
6316
+ };
6317
+ options.onComplete?.(runResult);
6318
+ return runResult;
6319
+ }
6320
+ if (result.outcome === PollOutcome.Timeout) {
6321
+ return {
6322
+ success: false,
6323
+ jobKey,
6324
+ traceId,
6325
+ error: `Polling timed out after ${timeoutMs / 1000}s`,
6326
+ duration: elapsed,
6327
+ finalState: "Failed"
6328
+ };
6077
6329
  }
6078
- throw new Error(`Polling timed out after ${maxPolls * pollInterval / 1000}s`);
6330
+ const errorMsg = result.error?.message ?? `Polling ended: ${result.outcome}`;
6331
+ return {
6332
+ success: false,
6333
+ jobKey,
6334
+ traceId,
6335
+ error: errorMsg,
6336
+ duration: elapsed,
6337
+ finalState: "Failed"
6338
+ };
6079
6339
  }
6080
6340
  async function getJobStatusDetailed(config, jobKey) {
6081
6341
  const folder = await resolveFolder({ folderKey: config.folderKey }, { tenant: config.tenantName });
@@ -6172,16 +6432,11 @@ async function parseMaestroInputs(inputSource) {
6172
6432
  import { execFile } from "node:child_process";
6173
6433
  import crypto2 from "node:crypto";
6174
6434
  import { promisify } from "node:util";
6175
- import { catchError as catchError5, logger as logger4 } from "@uipath/common";
6435
+ import { catchError as catchError6, logger as logger6 } from "@uipath/common";
6176
6436
  import { getFileSystem as getFileSystem2 } from "@uipath/filesystem";
6177
6437
 
6178
- // ../maestro-sdk/dist/index.js
6438
+ // ../maestro-sdk/src/client.ts
6179
6439
  import { catchError as catchError3 } from "@uipath/common";
6180
- import { getLoginStatusAsync as getLoginStatusAsync2 } from "@uipath/auth";
6181
- import { logger as logger3 } from "@uipath/common";
6182
- import { catchError as catchError22, logger as logger22 } from "@uipath/common";
6183
- import { catchError as catchError32 } from "@uipath/common";
6184
- import { catchError as catchError4, logger as logger32, OutputFormatter } from "@uipath/common";
6185
6440
  function buildPimsUrl(config, path) {
6186
6441
  return `${config.baseUrl}/${config.organizationId}/${config.tenantId}/pims_/api/v1${path}`;
6187
6442
  }
@@ -6240,6 +6495,8 @@ async function pimsPost(config, path, body, options) {
6240
6495
  }
6241
6496
  return parsed;
6242
6497
  }
6498
+ // ../maestro-sdk/src/client-factory.ts
6499
+ import { getLoginStatusAsync as getLoginStatusAsync2 } from "@uipath/auth";
6243
6500
  async function createPimsConfig() {
6244
6501
  const status = await getLoginStatusAsync2({
6245
6502
  ensureTokenValidityMinutes: 10
@@ -6260,6 +6517,8 @@ async function createPimsConfig() {
6260
6517
  authToken: status.accessToken
6261
6518
  };
6262
6519
  }
6520
+ // ../maestro-sdk/src/debug-http-client.ts
6521
+ import { logger as logger3 } from "@uipath/common";
6263
6522
  function buildCommonHeaders2(config, options) {
6264
6523
  const headers = {
6265
6524
  Authorization: `Bearer ${config.authToken}`,
@@ -6363,6 +6622,8 @@ async function studioWebPost(config, organizationName, path, body, extraHeaders)
6363
6622
  }
6364
6623
  return response.json();
6365
6624
  }
6625
+ // ../maestro-sdk/src/debug-service.ts
6626
+ import { catchError as catchError4, logger as logger4 } from "@uipath/common";
6366
6627
  function extractStartEventId(bpmnXml) {
6367
6628
  const match = bpmnXml.match(/<bpmn:startEvent\s+id="([^"]+)"/);
6368
6629
  return match?.[1] ?? "start";
@@ -6414,10 +6675,16 @@ async function createDebugInstance(config, jobKey, solutionId, studioWebProjectI
6414
6675
  }
6415
6676
  return result;
6416
6677
  }
6417
- async function pollDebugInstanceStatus(config, instanceId, callbacks, pollInterval = 2000, maxPolls = 300) {
6678
+ async function pollDebugInstanceStatus(config, instanceId, callbacks, pollInterval = 2000, maxPolls = 300, jobKey) {
6418
6679
  let pollCount = 0;
6419
6680
  let lastStatus = "";
6420
6681
  const terminalStatuses = ["Completed", "Faulted", "Cancelled", "Failed"];
6682
+ const orchestratorTerminalStatuses = [
6683
+ "Successful",
6684
+ "Faulted",
6685
+ "Stopped",
6686
+ "Suspended"
6687
+ ];
6421
6688
  while (pollCount < maxPolls) {
6422
6689
  const status = await debugPimsGet(config, `/api/v1/debug-instances/${instanceId}/element-executions`);
6423
6690
  if (status.status !== lastStatus) {
@@ -6432,12 +6699,21 @@ async function pollDebugInstanceStatus(config, instanceId, callbacks, pollInterv
6432
6699
  callbacks?.onStatusChange?.(status.status, elementExecutions);
6433
6700
  } else if (pollCount % 5 === 0) {
6434
6701
  const elapsed = (pollCount + 1) * pollInterval / 1000;
6435
- logger22.info(`Still polling... status: ${lastStatus} (${elapsed}s elapsed)`);
6702
+ logger4.info(`Still polling... status: ${lastStatus} (${elapsed}s elapsed)`);
6436
6703
  }
6437
6704
  if (terminalStatuses.includes(status.status)) {
6438
- logger22.info(`Debug session reached terminal status: ${status.status}`);
6705
+ logger4.info(`Debug session reached terminal status: ${status.status}`);
6439
6706
  return status;
6440
6707
  }
6708
+ if (jobKey && pollCount > 0 && pollCount % 5 === 0) {
6709
+ const [, jobResponse] = await catchError4(orchestratorGet2(config, `/odata/Jobs?$filter=Key eq '${jobKey}'&$top=1`));
6710
+ const jobState = jobResponse?.value?.[0]?.State;
6711
+ if (jobState && orchestratorTerminalStatuses.includes(jobState)) {
6712
+ const jobInfo = jobResponse?.value?.[0]?.Info ?? "";
6713
+ logger4.info(`Orchestrator job reached terminal status: ${jobState}${jobInfo ? ` — ${jobInfo}` : ""}`);
6714
+ return { ...status, status: jobState };
6715
+ }
6716
+ }
6441
6717
  await new Promise((resolve) => setTimeout(resolve, pollInterval));
6442
6718
  pollCount++;
6443
6719
  }
@@ -6482,50 +6758,50 @@ async function overwriteSolutionOnStudioWeb(config, organizationName, uisFilePat
6482
6758
  }
6483
6759
  async function uploadOrOverwriteSolution(config, organizationName, uisFilePath, solutionId, fs) {
6484
6760
  if (solutionId) {
6485
- logger22.info(`Attempting to overwrite existing solution ${solutionId} on Studio Web...`);
6486
- const [overwriteError, overwriteResult] = await catchError22(overwriteSolutionOnStudioWeb(config, organizationName, uisFilePath, solutionId, fs));
6761
+ logger4.info(`Attempting to overwrite existing solution ${solutionId} on Studio Web...`);
6762
+ const [overwriteError, overwriteResult] = await catchError4(overwriteSolutionOnStudioWeb(config, organizationName, uisFilePath, solutionId, fs));
6487
6763
  if (!overwriteError) {
6488
6764
  return overwriteResult;
6489
6765
  }
6490
6766
  if (overwriteError.message.includes("404")) {
6491
- logger22.info(`Solution ${solutionId} not found on Studio Web. Importing as new solution...`);
6767
+ logger4.info(`Solution ${solutionId} not found on Studio Web. Importing as new solution...`);
6492
6768
  } else {
6493
6769
  throw overwriteError;
6494
6770
  }
6495
6771
  }
6496
- logger22.info("Importing new solution to Studio Web...");
6772
+ logger4.info("Importing new solution to Studio Web...");
6497
6773
  return uploadSolutionToStudioWeb(config, organizationName, uisFilePath, fs);
6498
6774
  }
6499
6775
  async function findSolutionFile(fs, projectPath) {
6500
6776
  const parentDir = fs.path.resolve(projectPath, "..");
6501
- const [dirError, entries] = await catchError22(fs.readdir(parentDir));
6777
+ const [dirError, entries] = await catchError4(fs.readdir(parentDir));
6502
6778
  if (dirError) {
6503
- logger22.error(`Could not read parent directory for .uipx file: ${dirError.message}`);
6779
+ logger4.error(`Could not read parent directory for .uipx file: ${dirError.message}`);
6504
6780
  return;
6505
6781
  }
6506
6782
  const uipxFile = entries.find((entry) => entry.endsWith(".uipx"));
6507
6783
  if (!uipxFile) {
6508
- logger22.info("No .uipx solution file found in parent directory.");
6784
+ logger4.info("No .uipx solution file found in parent directory.");
6509
6785
  return;
6510
6786
  }
6511
6787
  const uipxPath = fs.path.join(parentDir, uipxFile);
6512
- const [readError, content] = await catchError22(fs.readFile(uipxPath, "utf-8"));
6788
+ const [readError, content] = await catchError4(fs.readFile(uipxPath, "utf-8"));
6513
6789
  if (readError || content === null) {
6514
- logger22.error(`Could not read .uipx file: ${readError?.message ?? "file returned null"}`);
6790
+ logger4.error(`Could not read .uipx file: ${readError?.message ?? "file returned null"}`);
6515
6791
  return;
6516
6792
  }
6517
- const [parseError, parsed] = catchError22(() => JSON.parse(content));
6793
+ const [parseError, parsed] = catchError4(() => JSON.parse(content));
6518
6794
  if (parseError) {
6519
- logger22.error(`Could not parse .uipx file: ${parseError.message}`);
6795
+ logger4.error(`Could not parse .uipx file: ${parseError.message}`);
6520
6796
  return;
6521
6797
  }
6522
6798
  const solutionId = parsed.SolutionId;
6523
6799
  const projectId = parsed.Projects?.[0]?.Id;
6524
6800
  if (!solutionId) {
6525
- logger22.info("No SolutionId found in .uipx file.");
6801
+ logger4.info("No SolutionId found in .uipx file.");
6526
6802
  return;
6527
6803
  }
6528
- logger22.info(`Found solution file: ${uipxFile} (SolutionId: ${solutionId})`);
6804
+ logger4.info(`Found solution file: ${uipxFile} (SolutionId: ${solutionId})`);
6529
6805
  return {
6530
6806
  solutionId,
6531
6807
  projectId: projectId ?? crypto.randomUUID()
@@ -6577,84 +6853,68 @@ async function collectFilesRecursive(fs, dir) {
6577
6853
  }
6578
6854
  async function updateSolutionFile(fs, projectPath, newSolutionId) {
6579
6855
  const parentDir = fs.path.resolve(projectPath, "..");
6580
- const [dirError, entries] = await catchError22(fs.readdir(parentDir));
6856
+ const [dirError, entries] = await catchError4(fs.readdir(parentDir));
6581
6857
  if (dirError)
6582
6858
  return;
6583
6859
  const uipxFile = entries.find((entry) => entry.endsWith(".uipx"));
6584
6860
  if (!uipxFile)
6585
6861
  return;
6586
6862
  const uipxPath = fs.path.join(parentDir, uipxFile);
6587
- const [readError, content] = await catchError22(fs.readFile(uipxPath, "utf-8"));
6863
+ const [readError, content] = await catchError4(fs.readFile(uipxPath, "utf-8"));
6588
6864
  if (readError || content === null)
6589
6865
  return;
6590
- const [parseError, parsed] = catchError22(() => JSON.parse(content));
6866
+ const [parseError, parsed] = catchError4(() => JSON.parse(content));
6591
6867
  if (parseError)
6592
6868
  return;
6593
6869
  parsed.SolutionId = newSolutionId;
6594
- const [writeError] = await catchError22(fs.writeFile(uipxPath, JSON.stringify(parsed, null, 2)));
6870
+ const [writeError] = await catchError4(fs.writeFile(uipxPath, JSON.stringify(parsed, null, 2)));
6595
6871
  if (writeError) {
6596
- logger22.error(`Warning: Could not update .uipx with new SolutionId: ${writeError.message}`);
6872
+ logger4.error(`Warning: Could not update .uipx with new SolutionId: ${writeError.message}`);
6597
6873
  } else {
6598
- logger22.info(`Updated .uipx with Studio Web SolutionId: ${newSolutionId}`);
6599
- }
6600
- }
6601
- async function extractErrorMessage(error) {
6602
- const err = error;
6603
- const status = err.status || err.response?.status;
6604
- let extractedMessage;
6605
- if (err.response) {
6606
- const [bodyError, rawBody] = await catchError32(err.response.text?.() ?? Promise.resolve(undefined));
6607
- if (!bodyError && rawBody) {
6608
- const [parseError, parsed] = catchError32(() => JSON.parse(rawBody));
6609
- if (!parseError) {
6610
- extractedMessage = parsed?.message || parsed?.errorMessage || parsed?.title;
6611
- } else {
6612
- extractedMessage = rawBody;
6613
- }
6614
- }
6615
- }
6616
- if (status === 401) {
6617
- return "Unauthorized (401). Run `uip login` to authenticate.";
6618
- }
6619
- if (status === 403) {
6620
- return "Forbidden (403). Ensure the account has the required permissions.";
6874
+ logger4.info(`Updated .uipx with Studio Web SolutionId: ${newSolutionId}`);
6621
6875
  }
6622
- const baseMessage = extractedMessage || err.message || "Unknown error";
6623
- return status ? `HTTP ${status}: ${baseMessage}` : baseMessage;
6624
6876
  }
6877
+ // ../maestro-sdk/src/query-string.ts
6625
6878
  function buildQueryString(params) {
6626
6879
  const entries = Object.entries(params).filter((entry) => entry[1] !== undefined);
6627
6880
  if (entries.length === 0)
6628
6881
  return "";
6629
6882
  return `?${new URLSearchParams(entries).toString()}`;
6630
6883
  }
6884
+ // ../maestro-sdk/src/with-pims-call.ts
6885
+ import {
6886
+ catchError as catchError5,
6887
+ extractErrorMessage,
6888
+ logger as logger5,
6889
+ OutputFormatter,
6890
+ processContext as processContext2
6891
+ } from "@uipath/common";
6631
6892
  async function withPimsCall(fn, errorMessage) {
6632
- const [configError, config] = await catchError4(createPimsConfig());
6893
+ const [configError, config] = await catchError5(createPimsConfig());
6633
6894
  if (configError) {
6634
- logger32.warn(`${errorMessage}: ${configError.message}`);
6895
+ logger5.warn(`${errorMessage}: ${configError.message}`);
6635
6896
  OutputFormatter.error({
6636
6897
  Result: "Failure",
6637
6898
  Message: errorMessage,
6638
6899
  Instructions: configError.message
6639
6900
  });
6640
- process.exitCode = 1;
6901
+ processContext2.exit(1);
6641
6902
  return;
6642
6903
  }
6643
- const [error, result] = await catchError4(fn(config));
6904
+ const [error, result] = await catchError5(fn(config));
6644
6905
  if (error) {
6645
6906
  const msg = await extractErrorMessage(error);
6646
- logger32.warn(`${errorMessage}: ${msg}`);
6907
+ logger5.warn(`${errorMessage}: ${msg}`);
6647
6908
  OutputFormatter.error({
6648
6909
  Result: "Failure",
6649
6910
  Message: errorMessage,
6650
6911
  Instructions: msg
6651
6912
  });
6652
- process.exitCode = 1;
6913
+ processContext2.exit(1);
6653
6914
  return;
6654
6915
  }
6655
6916
  return result;
6656
6917
  }
6657
-
6658
6918
  // src/services/maestro-debug-service.ts
6659
6919
  var execFileAsync = promisify(execFile);
6660
6920
 
@@ -6771,8 +7031,8 @@ class MaestroDebugService {
6771
7031
  };
6772
7032
  const allFiles = await collectFiles(stagingDir);
6773
7033
  const relFiles = allFiles.map((f) => this.fs.path.relative(stagingDir, f));
6774
- await catchError5(this.fs.rm(uisPath));
6775
- logger4.info(`Zipping ${relFiles.length} files into ${uisPath}`);
7034
+ await catchError6(this.fs.rm(uisPath));
7035
+ logger6.info(`Zipping ${relFiles.length} files into ${uisPath}`);
6776
7036
  await execFileAsync("zip", [uisPath, ...relFiles], {
6777
7037
  cwd: stagingDir
6778
7038
  });
@@ -6780,7 +7040,7 @@ class MaestroDebugService {
6780
7040
  throw new Error(`Zip file was not created at ${uisPath}`);
6781
7041
  }
6782
7042
  const stat = await this.fs.stat(uisPath);
6783
- logger4.info(`Created .uis file: ${uisPath} (size: ${stat?.size || 0} bytes)`);
7043
+ logger6.info(`Created .uis file: ${uisPath} (size: ${stat?.size || 0} bytes)`);
6784
7044
  await this.fs.rm(stagingDir);
6785
7045
  return uisPath;
6786
7046
  }
@@ -6807,10 +7067,10 @@ class MaestroDebugService {
6807
7067
  const entryPointsJson = JSON.parse(entryPointsContent);
6808
7068
  const rawEntryPoint = entryPointsJson.entryPoints?.[0]?.filePath ?? "";
6809
7069
  const entryPoint = rawEntryPoint.replace(/^\/content/, "");
6810
- logger4.info("Looking for .uipx solution file...");
7070
+ logger6.info("Looking for .uipx solution file...");
6811
7071
  const solutionInfo = await findSolutionFile(this.fs, absoluteProjectPath);
6812
7072
  const existingSolutionId = solutionInfo?.solutionId;
6813
- logger4.info("Building solution package from project...");
7073
+ logger6.info("Building solution package from project...");
6814
7074
  const solutionDir = this.fs.path.resolve(absoluteProjectPath, "..");
6815
7075
  const uisPath = await buildSolutionPackage(this.fs, solutionDir, (args, cwd) => execFileAsync("zip", args, { cwd }));
6816
7076
  const apiConfig = {
@@ -6821,27 +7081,27 @@ class MaestroDebugService {
6821
7081
  authToken: pimsConfig.authToken,
6822
7082
  organizationUnitId: pimsConfig.organizationUnitId
6823
7083
  };
6824
- logger4.info("Uploading solution to Studio Web...");
7084
+ logger6.info("Uploading solution to Studio Web...");
6825
7085
  const importResult = await uploadOrOverwriteSolution(apiConfig, pimsConfig.organizationName, uisPath, existingSolutionId, this.fs);
6826
7086
  const solutionId = importResult.id;
6827
7087
  await updateSolutionFile(this.fs, absoluteProjectPath, solutionId);
6828
7088
  const matchedProject = importResult.projects.find((p) => p.name === projectName);
6829
7089
  const studioWebProjectId = (matchedProject ?? importResult.projects[0]).id;
6830
7090
  const studioWebUrl = `${pimsConfig.baseUrl}/${encodeURIComponent(pimsConfig.organizationName)}/studio_/designer/${encodeURIComponent(studioWebProjectId)}?solutionId=${encodeURIComponent(solutionId)}`;
6831
- logger4.info(`Solution uploaded — solutionId: ${solutionId}, projectId: ${studioWebProjectId}`);
6832
- logger4.info(`Studio Web URL: ${studioWebUrl}`);
6833
- logger4.info("Fetching personal workspace folder...");
7091
+ logger6.info(`Solution uploaded — solutionId: ${solutionId}, projectId: ${studioWebProjectId}`);
7092
+ logger6.info(`Studio Web URL: ${studioWebUrl}`);
7093
+ logger6.info("Fetching personal workspace folder...");
6834
7094
  const folder = await getPersonalFolderKey(apiConfig);
6835
7095
  apiConfig.folderKey = folder.key;
6836
7096
  apiConfig.organizationUnitId = folder.id;
6837
- logger4.info(`Personal folder found — key: ${folder.key}, id: ${folder.id}`);
6838
- logger4.info("Beginning debug session in Orchestrator...");
7097
+ logger6.info(`Personal folder found — key: ${folder.key}, id: ${folder.id}`);
7098
+ logger6.info("Beginning debug session in Orchestrator...");
6839
7099
  const session = await beginDebugSession(apiConfig, JSON.stringify(options?.inputs ?? {}));
6840
- logger4.info(`Debug session started — jobKey: ${session.jobKey}`);
6841
- logger4.info("Creating debug instance in PIMS...");
7100
+ logger6.info(`Debug session started — jobKey: ${session.jobKey}`);
7101
+ logger6.info("Creating debug instance in PIMS...");
6842
7102
  const debugInstance = await createDebugInstance(apiConfig, session.jobKey, solutionId, studioWebProjectId, entryPoint, "processOrchestration");
6843
- logger4.info(`Debug instance created — instanceId: ${debugInstance.instanceId}, runId: ${debugInstance.runId}`);
6844
- logger4.info("Polling debug instance status...");
7103
+ logger6.info(`Debug instance created — instanceId: ${debugInstance.instanceId}, runId: ${debugInstance.runId}`);
7104
+ logger6.info("Polling debug instance status...");
6845
7105
  const finalStatus = await pollDebugInstanceStatus(apiConfig, debugInstance.instanceId, callbacks, pollInterval);
6846
7106
  return {
6847
7107
  jobKey: session.jobKey,
@@ -6862,13 +7122,13 @@ class MaestroDebugService {
6862
7122
  if (!lowerPath.endsWith(".bpmn")) {
6863
7123
  throw new Error(`Unsupported file type. Only .bpmn files are supported for Maestro debug.`);
6864
7124
  }
6865
- logger4.info("Reading .bpmn file...");
7125
+ logger6.info("Reading .bpmn file...");
6866
7126
  const bpmnXml = await this.readBpmnFile(filePath);
6867
7127
  const startEventId = extractStartEventId(bpmnXml);
6868
7128
  const projectName = this.fs.path.basename(filePath, ".bpmn");
6869
7129
  const safeName = projectName.replace(/[^a-zA-Z0-9_-]/g, "_");
6870
7130
  const projectDir = this.fs.path.join(this.fs.env.tmpdir(), `.maestro-debug-${safeName}-${Date.now()}`);
6871
- logger4.info("Generating project files...");
7131
+ logger6.info("Generating project files...");
6872
7132
  await this.fs.mkdir(projectDir);
6873
7133
  await this.fs.mkdir(this.fs.path.join(projectDir, "content"));
6874
7134
  const projectId = crypto2.randomUUID();
@@ -6916,7 +7176,7 @@ class MaestroDebugService {
6916
7176
  await this.fs.writeFile(this.fs.path.join(projectDir, "content", "bindings_v2.json"), JSON.stringify(bindingsJson, null, 2));
6917
7177
  await this.fs.writeFile(this.fs.path.join(projectDir, "content", "package-descriptor.json"), JSON.stringify(packageDescriptorJson, null, 2));
6918
7178
  await this.fs.writeFile(this.fs.path.join(projectDir, "content", `${safeName}.bpmn`), bpmnXml);
6919
- logger4.info("Building solution package...");
7179
+ logger6.info("Building solution package...");
6920
7180
  const uisPath = await this.buildSolutionPackage(projectDir, safeName);
6921
7181
  const apiConfig = {
6922
7182
  baseUrl: pimsConfig.baseUrl,
@@ -6926,25 +7186,25 @@ class MaestroDebugService {
6926
7186
  authToken: pimsConfig.authToken,
6927
7187
  organizationUnitId: pimsConfig.organizationUnitId
6928
7188
  };
6929
- logger4.info("Uploading solution to Studio Web...");
7189
+ logger6.info("Uploading solution to Studio Web...");
6930
7190
  const importResult = await uploadSolutionToStudioWeb(apiConfig, pimsConfig.organizationName, uisPath, this.fs);
6931
7191
  const solutionId = importResult.id;
6932
7192
  const studioWebProjectId = importResult.projects[0].id;
6933
7193
  const studioWebUrl = `${pimsConfig.baseUrl}/${encodeURIComponent(pimsConfig.organizationName)}/studio_/designer/${encodeURIComponent(studioWebProjectId)}?solutionId=${encodeURIComponent(solutionId)}`;
6934
- logger4.info(`Solution uploaded — solutionId: ${solutionId}, projectId: ${studioWebProjectId}`);
6935
- logger4.info(`Studio Web URL: ${studioWebUrl}`);
6936
- logger4.info("Fetching personal workspace folder...");
7194
+ logger6.info(`Solution uploaded — solutionId: ${solutionId}, projectId: ${studioWebProjectId}`);
7195
+ logger6.info(`Studio Web URL: ${studioWebUrl}`);
7196
+ logger6.info("Fetching personal workspace folder...");
6937
7197
  const folder = await getPersonalFolderKey(apiConfig);
6938
7198
  apiConfig.folderKey = folder.key;
6939
7199
  apiConfig.organizationUnitId = folder.id;
6940
- logger4.info(`Personal folder found — key: ${folder.key}, id: ${folder.id}`);
6941
- logger4.info("Beginning debug session in Orchestrator...");
7200
+ logger6.info(`Personal folder found — key: ${folder.key}, id: ${folder.id}`);
7201
+ logger6.info("Beginning debug session in Orchestrator...");
6942
7202
  const session = await beginDebugSession(apiConfig, JSON.stringify(options?.inputs ?? {}));
6943
- logger4.info(`Debug session started — jobKey: ${session.jobKey}`);
6944
- logger4.info("Creating debug instance in PIMS...");
7203
+ logger6.info(`Debug session started — jobKey: ${session.jobKey}`);
7204
+ logger6.info("Creating debug instance in PIMS...");
6945
7205
  const debugInstance = await createDebugInstance(apiConfig, session.jobKey, solutionId, studioWebProjectId, `/${safeName}.bpmn#${startEventId}`, "processOrchestration");
6946
- logger4.info(`Debug instance created — instanceId: ${debugInstance.instanceId}, runId: ${debugInstance.runId}`);
6947
- logger4.info("Polling debug instance status...");
7206
+ logger6.info(`Debug instance created — instanceId: ${debugInstance.instanceId}, runId: ${debugInstance.runId}`);
7207
+ logger6.info("Polling debug instance status...");
6948
7208
  const finalStatus = await pollDebugInstanceStatus(apiConfig, debugInstance.instanceId, callbacks, pollInterval);
6949
7209
  return {
6950
7210
  jobKey: session.jobKey,
@@ -6978,7 +7238,7 @@ function parseFolderId(raw, fallback) {
6978
7238
 
6979
7239
  // src/commands/debug.ts
6980
7240
  function registerDebugCommand(program) {
6981
- program.command("debug").description("Debug a maestro project by uploading to Studio Web and running a debug session").argument("<project-path>", "Path to the maestro project directory (must contain project.uiproj)").option("--folder-id <id>", "Orchestrator folder ID (OrganizationUnitId). Auto-detected if not provided.").option("--poll-interval <ms>", "Polling interval in milliseconds", "2000").option("-i, --inputs <json>", "Input parameters as JSON string or @file.json").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext, async (projectPath, options) => {
7241
+ program.command("debug").description("Debug a maestro project by uploading to Studio Web and running a debug session").argument("<project-path>", "Path to the maestro project directory (must contain project.uiproj)").option("--folder-id <id>", "Orchestrator folder ID (OrganizationUnitId). Auto-detected if not provided.").option("--poll-interval <ms>", "Polling interval in milliseconds", "2000").option("-i, --inputs <json>", "Input parameters as JSON string or @file.json").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext3, async (projectPath, options) => {
6982
7242
  const [loginError, loginStatus] = await catchError7(getLoginStatusAsync3({
6983
7243
  ensureTokenValidityMinutes: options.loginValidity
6984
7244
  }));
@@ -6988,7 +7248,7 @@ function registerDebugCommand(program) {
6988
7248
  Message: loginError.message,
6989
7249
  Instructions: "Check authentication and BPMN file"
6990
7250
  });
6991
- processContext.exit(1);
7251
+ processContext3.exit(1);
6992
7252
  return;
6993
7253
  }
6994
7254
  if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
@@ -6997,7 +7257,7 @@ function registerDebugCommand(program) {
6997
7257
  Message: "Not logged in. Run 'uip login' first.",
6998
7258
  Instructions: "Check authentication and BPMN file"
6999
7259
  });
7000
- processContext.exit(1);
7260
+ processContext3.exit(1);
7001
7261
  return;
7002
7262
  }
7003
7263
  if (!loginStatus.organizationId) {
@@ -7006,7 +7266,7 @@ function registerDebugCommand(program) {
7006
7266
  Message: "Organization ID not available from login.",
7007
7267
  Instructions: "Check authentication and BPMN file"
7008
7268
  });
7009
- processContext.exit(1);
7269
+ processContext3.exit(1);
7010
7270
  return;
7011
7271
  }
7012
7272
  if (!loginStatus.tenantId) {
@@ -7015,7 +7275,7 @@ function registerDebugCommand(program) {
7015
7275
  Message: "Tenant ID not available from login.",
7016
7276
  Instructions: "Check authentication and BPMN file"
7017
7277
  });
7018
- processContext.exit(1);
7278
+ processContext3.exit(1);
7019
7279
  return;
7020
7280
  }
7021
7281
  if (!loginStatus.tenantName) {
@@ -7024,7 +7284,7 @@ function registerDebugCommand(program) {
7024
7284
  Message: "Tenant name not available from login.",
7025
7285
  Instructions: "Check authentication and BPMN file"
7026
7286
  });
7027
- processContext.exit(1);
7287
+ processContext3.exit(1);
7028
7288
  return;
7029
7289
  }
7030
7290
  if (!loginStatus.accessToken) {
@@ -7033,7 +7293,7 @@ function registerDebugCommand(program) {
7033
7293
  Message: "Access token not available from login.",
7034
7294
  Instructions: "Check authentication and BPMN file"
7035
7295
  });
7036
- processContext.exit(1);
7296
+ processContext3.exit(1);
7037
7297
  return;
7038
7298
  }
7039
7299
  const [folderErr, organizationUnitId] = catchError7(() => parseFolderId(options.folderId, loginStatus.organizationUnitId));
@@ -7043,7 +7303,7 @@ function registerDebugCommand(program) {
7043
7303
  Message: folderErr.message,
7044
7304
  Instructions: "Check authentication and BPMN file"
7045
7305
  });
7046
- processContext.exit(1);
7306
+ processContext3.exit(1);
7047
7307
  return;
7048
7308
  }
7049
7309
  const pimsConfig = {
@@ -7063,7 +7323,7 @@ function registerDebugCommand(program) {
7063
7323
  Message: `Invalid poll-interval: "${options.pollInterval}". Must be a positive number in milliseconds.`,
7064
7324
  Instructions: "Provide a valid positive integer, e.g. --poll-interval 2000"
7065
7325
  });
7066
- processContext.exit(1);
7326
+ processContext3.exit(1);
7067
7327
  return;
7068
7328
  }
7069
7329
  let inputs;
@@ -7075,24 +7335,24 @@ function registerDebugCommand(program) {
7075
7335
  Message: "Failed to parse inputs",
7076
7336
  Instructions: parseError.message
7077
7337
  });
7078
- processContext.exit(1);
7338
+ processContext3.exit(1);
7079
7339
  return;
7080
7340
  }
7081
7341
  inputs = parsedInputs;
7082
7342
  }
7083
- logger5.info(`Starting debug session for: ${projectPath}`);
7343
+ logger7.info(`Starting debug session for: ${projectPath}`);
7084
7344
  const [executeError, result] = await catchError7(service.executeProjectViaStudioWeb(projectPath, pimsConfig, {
7085
7345
  onStatusChange: (status, executions) => {
7086
7346
  const completed = executions.filter((e) => e.status === "Completed").length;
7087
7347
  const total = executions.length;
7088
- logger5.info(`Status: ${status} (${completed}/${total} elements completed)`);
7348
+ logger7.info(`Status: ${status} (${completed}/${total} elements completed)`);
7089
7349
  for (const exec of executions) {
7090
7350
  const icon = exec.status === "Completed" ? "v" : exec.status === "InProgress" ? ">" : "-";
7091
- logger5.info(` ${icon} ${exec.elementId} [${exec.status}]`);
7351
+ logger7.info(` ${icon} ${exec.elementId} [${exec.status}]`);
7092
7352
  }
7093
7353
  },
7094
7354
  onIncident: (incidents) => {
7095
- logger5.info(`Incidents: ${JSON.stringify(incidents)}`);
7355
+ logger7.info(`Incidents: ${JSON.stringify(incidents)}`);
7096
7356
  }
7097
7357
  }, pollInterval, { inputs }));
7098
7358
  if (executeError) {
@@ -7101,7 +7361,7 @@ function registerDebugCommand(program) {
7101
7361
  Message: executeError.message,
7102
7362
  Instructions: "Check authentication and BPMN file"
7103
7363
  });
7104
- processContext.exit(1);
7364
+ processContext3.exit(1);
7105
7365
  return;
7106
7366
  }
7107
7367
  OutputFormatter2.success({
@@ -7117,15 +7377,15 @@ function registerDebugCommand(program) {
7117
7377
  Instructions: `Debug completed with status: ${result.finalStatus}`
7118
7378
  });
7119
7379
  const success = result.finalStatus === "Completed" || result.finalStatus === "Successful";
7120
- processContext.exit(success ? 0 : 1);
7380
+ processContext3.exit(success ? 0 : 1);
7121
7381
  });
7122
7382
  }
7123
7383
 
7124
7384
  // src/commands/incidents.ts
7125
- import { OutputFormatter as OutputFormatter3, processContext as processContext2 } from "@uipath/common";
7385
+ import { OutputFormatter as OutputFormatter3, processContext as processContext4 } from "@uipath/common";
7126
7386
  var registerIncidentsCommand = (program) => {
7127
- const incidents = program.command("incidents").description("Manage Maestro incident summaries");
7128
- incidents.command("list").description("List all incident summaries across processes").trackedAction(processContext2, async () => {
7387
+ const incident = program.command("incident").description("Manage Maestro incidents");
7388
+ incident.command("summary").description("Get Maestro incident summaries across processes").trackedAction(processContext4, async () => {
7129
7389
  const result = await withPimsCall((config) => pimsGet(config, "/incidents/summary"), "Error listing incidents");
7130
7390
  if (!result)
7131
7391
  return;
@@ -7135,10 +7395,21 @@ var registerIncidentsCommand = (program) => {
7135
7395
  Data: result
7136
7396
  });
7137
7397
  });
7398
+ incident.command("get").description("Get a single Maestro incident by ID").argument("<incident-id>", "Incident ID").requiredOption("--folder-key <key>", "Folder key").trackedAction(processContext4, async (incidentId, options) => {
7399
+ const reqOptions = { folderKey: options.folderKey };
7400
+ const result = await withPimsCall((config) => pimsGet(config, `/incidents/${encodeURIComponent(incidentId)}`, reqOptions), "Error getting incident");
7401
+ if (!result)
7402
+ return;
7403
+ OutputFormatter3.success({
7404
+ Result: "Success",
7405
+ Code: "IncidentGet",
7406
+ Data: result
7407
+ });
7408
+ });
7138
7409
  };
7139
7410
 
7140
7411
  // src/commands/init.ts
7141
- import { catchError as catchError8, OutputFormatter as OutputFormatter4, processContext as processContext3 } from "@uipath/common";
7412
+ import { catchError as catchError8, OutputFormatter as OutputFormatter4, processContext as processContext5 } from "@uipath/common";
7142
7413
  import { getFileSystem as getFileSystem3 } from "@uipath/filesystem";
7143
7414
 
7144
7415
  // ../../node_modules/min-dash/dist/index.esm.js
@@ -13107,7 +13378,7 @@ function SimpleBpmnModdle(additionalPackages, options) {
13107
13378
  // src/commands/init.ts
13108
13379
  var VALID_PROJECT_NAME_REGEX = /^[a-zA-Z0-9_-]+$/;
13109
13380
  var registerInitCommand = (program) => {
13110
- program.command("init").description("Create a new Maestro project with boilerplate files").argument("<name>", "Maestro project name").option("--force", "Force initialization even if target directory is not empty (writes files without clearing existing contents)").trackedAction(processContext3, async (name2, options) => {
13381
+ program.command("init").description("Create a new Maestro project with boilerplate files").argument("<name>", "Maestro project name").option("--force", "Force initialization even if target directory is not empty (writes files without clearing existing contents)").trackedAction(processContext5, async (name2, options) => {
13111
13382
  const [error3] = await catchError8(initMaestroProject(name2, options));
13112
13383
  if (error3) {
13113
13384
  OutputFormatter4.error({
@@ -13115,7 +13386,7 @@ var registerInitCommand = (program) => {
13115
13386
  Message: "Failed to create Maestro project",
13116
13387
  Instructions: error3.message
13117
13388
  });
13118
- processContext3.exit(1);
13389
+ processContext5.exit(1);
13119
13390
  }
13120
13391
  });
13121
13392
  };
@@ -13259,11 +13530,11 @@ import {
13259
13530
  catchError as catchError9,
13260
13531
  DEFAULT_PAGE_SIZE,
13261
13532
  OutputFormatter as OutputFormatter5,
13262
- processContext as processContext4
13533
+ processContext as processContext6
13263
13534
  } from "@uipath/common";
13264
13535
  var registerInstancesCommand = (program) => {
13265
13536
  const instances = program.command("instances").description("Manage Maestro process instances");
13266
- instances.command("list").description("List process instances").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("-l, --limit <number>", "Number of items to return", String(DEFAULT_PAGE_SIZE)).option("--offset <number>", "Number of items to skip", "0").option("--process-key <process-key>", "Filter by process key").option("--package-id <id>", "Filter by package ID").option("--error-code <code>", "Filter by error code").trackedAction(processContext4, async (options) => {
13537
+ instances.command("list").description("List process instances").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("-l, --limit <number>", "Number of items to return", String(DEFAULT_PAGE_SIZE)).option("--offset <number>", "Number of items to skip", "0").option("--process-key <process-key>", "Filter by process key").option("--package-id <id>", "Filter by package ID").option("--error-code <code>", "Filter by error code").trackedAction(processContext6, async (options) => {
13267
13538
  const query = buildQueryString({
13268
13539
  processKey: options.processKey,
13269
13540
  packageId: options.packageId,
@@ -13281,7 +13552,7 @@ var registerInstancesCommand = (program) => {
13281
13552
  Data: result.value || []
13282
13553
  });
13283
13554
  });
13284
- instances.command("get").description("Get a process instance by ID").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext4, async (instanceId, options) => {
13555
+ instances.command("get").description("Get a process instance by ID").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext6, async (instanceId, options) => {
13285
13556
  const result = await withPimsCall((config) => pimsGet(config, `/instances/${instanceId}`, { folderKey: options.folderKey }), "Error getting instance");
13286
13557
  if (!result)
13287
13558
  return;
@@ -13291,7 +13562,7 @@ var registerInstancesCommand = (program) => {
13291
13562
  Data: result
13292
13563
  });
13293
13564
  });
13294
- instances.command("pause").description("Pause a running process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext4, async (instanceId, options) => {
13565
+ instances.command("pause").description("Pause a running process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext6, async (instanceId, options) => {
13295
13566
  const body = { comment: options.comment || "" };
13296
13567
  const reqOptions = { folderKey: options.folderKey };
13297
13568
  const result = await withPimsCall((config) => pimsPost(config, `/instances/${instanceId}/pause`, body, reqOptions), "Error pausing instance");
@@ -13303,7 +13574,7 @@ var registerInstancesCommand = (program) => {
13303
13574
  Data: result
13304
13575
  });
13305
13576
  });
13306
- instances.command("resume").description("Resume a paused process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext4, async (instanceId, options) => {
13577
+ instances.command("resume").description("Resume a paused process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext6, async (instanceId, options) => {
13307
13578
  const body = { comment: options.comment || "" };
13308
13579
  const reqOptions = { folderKey: options.folderKey };
13309
13580
  const result = await withPimsCall((config) => pimsPost(config, `/instances/${instanceId}/resume`, body, reqOptions), "Error resuming instance");
@@ -13315,7 +13586,7 @@ var registerInstancesCommand = (program) => {
13315
13586
  Data: result
13316
13587
  });
13317
13588
  });
13318
- instances.command("cancel").description("Cancel a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext4, async (instanceId, options) => {
13589
+ instances.command("cancel").description("Cancel a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext6, async (instanceId, options) => {
13319
13590
  const body = { comment: options.comment || "" };
13320
13591
  const reqOptions = { folderKey: options.folderKey };
13321
13592
  const result = await withPimsCall((config) => pimsPost(config, `/instances/${instanceId}/cancel`, body, reqOptions), "Error canceling instance");
@@ -13327,7 +13598,7 @@ var registerInstancesCommand = (program) => {
13327
13598
  Data: result
13328
13599
  });
13329
13600
  });
13330
- instances.command("variables").description("Get variables for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--parent-element-id <id>", "Filter variables by parent element ID").trackedAction(processContext4, async (instanceId, options) => {
13601
+ instances.command("variables").description("Get variables for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--parent-element-id <id>", "Filter variables by parent element ID").trackedAction(processContext6, async (instanceId, options) => {
13331
13602
  const query = buildQueryString({
13332
13603
  parentElementId: options.parentElementId
13333
13604
  });
@@ -13341,7 +13612,7 @@ var registerInstancesCommand = (program) => {
13341
13612
  Data: result
13342
13613
  });
13343
13614
  });
13344
- instances.command("incidents").description("Get incidents for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext4, async (instanceId, options) => {
13615
+ instances.command("incidents").description("Get incidents for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext6, async (instanceId, options) => {
13345
13616
  const result = await withPimsCall((config) => pimsGet(config, `/instances/${instanceId}/incidents`, { folderKey: options.folderKey }), "Error getting incidents");
13346
13617
  if (!result)
13347
13618
  return;
@@ -13351,7 +13622,7 @@ var registerInstancesCommand = (program) => {
13351
13622
  Data: result
13352
13623
  });
13353
13624
  });
13354
- instances.command("asset").description("Get the BPMN XML asset for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext4, async (instanceId, options) => {
13625
+ instances.command("asset").description("Get the BPMN XML asset for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext6, async (instanceId, options) => {
13355
13626
  const result = await withPimsCall((config) => pimsGet(config, `/instances/${instanceId}/asset?type=bpmn`, { folderKey: options.folderKey }), "Error getting asset");
13356
13627
  if (!result)
13357
13628
  return;
@@ -13361,7 +13632,7 @@ var registerInstancesCommand = (program) => {
13361
13632
  Data: result
13362
13633
  });
13363
13634
  });
13364
- instances.command("retry").description("Retry a faulted process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext4, async (instanceId, options) => {
13635
+ instances.command("retry").description("Retry a faulted process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext6, async (instanceId, options) => {
13365
13636
  const body = { comment: options.comment || "" };
13366
13637
  const reqOptions = { folderKey: options.folderKey };
13367
13638
  const result = await withPimsCall((config) => pimsPost(config, `/instances/${instanceId}/retry`, body, reqOptions), "Error retrying instance");
@@ -13373,7 +13644,7 @@ var registerInstancesCommand = (program) => {
13373
13644
  Data: result
13374
13645
  });
13375
13646
  });
13376
- instances.command("migrate").description("Migrate a process instance to a different package version").argument("<instance-id>", "Process instance ID").argument("<new-version>", "Target package version").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext4, async (instanceId, newVersion, options) => {
13647
+ instances.command("migrate").description("Migrate a process instance to a different package version").argument("<instance-id>", "Process instance ID").argument("<new-version>", "Target package version").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--comment <text>", "Optional comment for the operation").trackedAction(processContext6, async (instanceId, newVersion, options) => {
13377
13648
  const body = {
13378
13649
  newVersion,
13379
13650
  comment: options.comment || ""
@@ -13388,7 +13659,7 @@ var registerInstancesCommand = (program) => {
13388
13659
  Data: result
13389
13660
  });
13390
13661
  });
13391
- instances.command("goto").description("Move execution cursor from one element to another").argument("<instance-id>", "Process instance ID").argument("<transitions>", `JSON array of transitions, e.g. '[{"sourceElementId":"A","targetElementId":"B"}]'`).requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext4, async (instanceId, transitionsJson, options) => {
13662
+ instances.command("goto").description("Move execution cursor from one element to another").argument("<instance-id>", "Process instance ID").argument("<transitions>", `JSON array of transitions, e.g. '[{"sourceElementId":"A","targetElementId":"B"}]'`).requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext6, async (instanceId, transitionsJson, options) => {
13392
13663
  const [parseError, transitions] = catchError9(() => JSON.parse(transitionsJson));
13393
13664
  const isValidShape = !parseError && Array.isArray(transitions) && transitions.every((t) => t.sourceElementId && t.targetElementId);
13394
13665
  if (!isValidShape) {
@@ -13397,7 +13668,7 @@ var registerInstancesCommand = (program) => {
13397
13668
  Message: "Error applying goto",
13398
13669
  Instructions: parseError ? `Invalid transitions JSON: ${parseError.message}` : 'Each transition must have "sourceElementId" and "targetElementId"'
13399
13670
  });
13400
- processContext4.exit(1);
13671
+ processContext6.exit(1);
13401
13672
  return;
13402
13673
  }
13403
13674
  const body = { transitions };
@@ -13411,7 +13682,7 @@ var registerInstancesCommand = (program) => {
13411
13682
  Data: result
13412
13683
  });
13413
13684
  });
13414
- instances.command("cursors").description("Get current execution cursor positions for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext4, async (instanceId, options) => {
13685
+ instances.command("cursors").description("Get current execution cursor positions for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext6, async (instanceId, options) => {
13415
13686
  const result = await withPimsCall((config) => pimsGet(config, `/instances/${instanceId}/goto/cursors`, { folderKey: options.folderKey }), "Error getting cursors");
13416
13687
  if (!result)
13417
13688
  return;
@@ -13421,7 +13692,7 @@ var registerInstancesCommand = (program) => {
13421
13692
  Data: result
13422
13693
  });
13423
13694
  });
13424
- instances.command("element-executions").description("Get element executions for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext4, async (instanceId, options) => {
13695
+ instances.command("element-executions").description("Get element executions for a process instance").argument("<instance-id>", "Process instance ID").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").trackedAction(processContext6, async (instanceId, options) => {
13425
13696
  const result = await withPimsCall((config) => pimsGet(config, `/instances/${instanceId}/element-executions`, { folderKey: options.folderKey }), "Error getting element executions");
13426
13697
  if (!result)
13427
13698
  return;
@@ -13437,13 +13708,13 @@ var registerInstancesCommand = (program) => {
13437
13708
  import { getLoginStatusAsync as getLoginStatusAsync4 } from "@uipath/auth";
13438
13709
  import {
13439
13710
  catchError as catchError10,
13440
- logger as logger6,
13711
+ logger as logger8,
13441
13712
  OutputFormatter as OutputFormatter6,
13442
- processContext as processContext5
13713
+ processContext as processContext7
13443
13714
  } from "@uipath/common";
13444
13715
  function registerJobCommand(program) {
13445
13716
  const jobCmd = program.command("job").description("Manage Maestro jobs");
13446
- jobCmd.command("traces").description("Stream traces for a running job").argument("<job-key>", "Job key (GUID from run command)").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").option("--poll-interval <ms>", "Polling interval in milliseconds", "2000").option("--traces-service <name>", "Traces service name (default: llmopstenant_)", "llmopstenant_").option("--pretty", "Show traces in human-readable format instead of raw JSON").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext5, async (jobKey, options) => {
13717
+ jobCmd.command("traces").description("Stream traces for a running job").argument("<job-key>", "Job key (GUID from run command)").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").option("--poll-interval <ms>", "Polling interval in milliseconds", "2000").option("--traces-service <name>", "Traces service name (default: llmopstenant_)", "llmopstenant_").option("--pretty", "Show traces in human-readable format instead of raw JSON").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext7, async (jobKey, options) => {
13447
13718
  const [loginErr, loginStatus] = await catchError10(getLoginStatusAsync4({
13448
13719
  ensureTokenValidityMinutes: options.loginValidity
13449
13720
  }));
@@ -13453,7 +13724,7 @@ function registerJobCommand(program) {
13453
13724
  Message: loginErr.message,
13454
13725
  Instructions: "Check authentication and parameters"
13455
13726
  });
13456
- processContext5.exit(1);
13727
+ processContext7.exit(1);
13457
13728
  return;
13458
13729
  }
13459
13730
  if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
@@ -13462,7 +13733,7 @@ function registerJobCommand(program) {
13462
13733
  Message: "Not logged in. Run 'uipcli login' first.",
13463
13734
  Instructions: "Check authentication and parameters"
13464
13735
  });
13465
- processContext5.exit(1);
13736
+ processContext7.exit(1);
13466
13737
  return;
13467
13738
  }
13468
13739
  const tenantName = options.tenant || loginStatus.tenantName;
@@ -13472,7 +13743,7 @@ function registerJobCommand(program) {
13472
13743
  Message: "Missing tenant or organization info.",
13473
13744
  Instructions: "Check authentication and parameters"
13474
13745
  });
13475
- processContext5.exit(1);
13746
+ processContext7.exit(1);
13476
13747
  return;
13477
13748
  }
13478
13749
  const config = {
@@ -13493,11 +13764,11 @@ function registerJobCommand(program) {
13493
13764
  Message: `Invalid poll-interval: ${options.pollInterval}. Must be a positive number.`,
13494
13765
  Instructions: "Check authentication and parameters"
13495
13766
  });
13496
- processContext5.exit(1);
13767
+ processContext7.exit(1);
13497
13768
  return;
13498
13769
  }
13499
13770
  const pollSeconds = pollIntervalMs / 1000;
13500
- logger6.info(`Streaming traces for job: ${jobKey}
13771
+ logger8.info(`Streaming traces for job: ${jobKey}
13501
13772
  Polling every ${pollSeconds}s...`);
13502
13773
  const [streamErr, result] = await catchError10(streamJobTraces(config, jobKey, {
13503
13774
  onTrace: (trace) => {
@@ -13506,16 +13777,16 @@ function registerJobCommand(program) {
13506
13777
  const statusIcon = trace.status === "Completed" ? "✓" : trace.status === "Failed" || trace.status === "Faulted" ? "✗" : trace.status === "Running" || trace.status === "InProgress" ? "⏳" : "•";
13507
13778
  const duration = trace.duration ? ` ${trace.duration}ms` : "";
13508
13779
  const name2 = trace.name.length > 60 ? `${trace.name.substring(0, 57)}...` : trace.name;
13509
- logger6.info(`[${time}] ${statusIcon} ${name2} (${trace.status})${duration}`);
13780
+ logger8.info(`[${time}] ${statusIcon} ${name2} (${trace.status})${duration}`);
13510
13781
  } else {
13511
- logger6.info(JSON.stringify(trace));
13782
+ logger8.info(JSON.stringify(trace));
13512
13783
  }
13513
13784
  },
13514
13785
  onComplete: (result2) => {
13515
- logger6.info(`Job ${result2.finalState}: ${result2.finalState} (${result2.duration}ms)`);
13786
+ logger8.info(`Job ${result2.finalState}: ${result2.finalState} (${result2.duration}ms)`);
13516
13787
  },
13517
13788
  onError: (error3) => {
13518
- logger6.error(`Error: ${error3.message}`);
13789
+ logger8.error(`Error: ${error3.message}`);
13519
13790
  },
13520
13791
  pollInterval: pollIntervalMs
13521
13792
  }));
@@ -13525,12 +13796,12 @@ function registerJobCommand(program) {
13525
13796
  Message: streamErr.message,
13526
13797
  Instructions: "Check authentication and parameters"
13527
13798
  });
13528
- processContext5.exit(1);
13799
+ processContext7.exit(1);
13529
13800
  return;
13530
13801
  }
13531
- processContext5.exit(result.success ? 0 : 1);
13802
+ processContext7.exit(result.success ? 0 : 1);
13532
13803
  });
13533
- jobCmd.command("status").description("Get detailed status of a Maestro job").argument("<job-key>", "Job key (GUID from run command)").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").option("--folder-key <key>", "Folder key (GUID from list command, defaults to authenticated folder)").option("--detailed", "Show full response with all fields").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext5, async (jobKey, options) => {
13804
+ jobCmd.command("status").description("Get detailed status of a Maestro job").argument("<job-key>", "Job key (GUID from run command)").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").option("--folder-key <key>", "Folder key (GUID from list command, defaults to authenticated folder)").option("--detailed", "Show full response with all fields").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext7, async (jobKey, options) => {
13534
13805
  const [loginErr, loginStatus] = await catchError10(getLoginStatusAsync4({
13535
13806
  ensureTokenValidityMinutes: options.loginValidity
13536
13807
  }));
@@ -13540,7 +13811,7 @@ function registerJobCommand(program) {
13540
13811
  Message: loginErr.message,
13541
13812
  Instructions: "Check job key, authentication, and folder permissions"
13542
13813
  });
13543
- processContext5.exit(1);
13814
+ processContext7.exit(1);
13544
13815
  return;
13545
13816
  }
13546
13817
  if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
@@ -13549,7 +13820,7 @@ function registerJobCommand(program) {
13549
13820
  Message: "Not logged in. Run 'uipcli login' first.",
13550
13821
  Instructions: "Check job key, authentication, and folder permissions"
13551
13822
  });
13552
- processContext5.exit(1);
13823
+ processContext7.exit(1);
13553
13824
  return;
13554
13825
  }
13555
13826
  const tenantName = options.tenant || loginStatus.tenantName;
@@ -13559,7 +13830,7 @@ function registerJobCommand(program) {
13559
13830
  Message: "Missing tenant or organization info.",
13560
13831
  Instructions: "Check job key, authentication, and folder permissions"
13561
13832
  });
13562
- processContext5.exit(1);
13833
+ processContext7.exit(1);
13563
13834
  return;
13564
13835
  }
13565
13836
  const config = {
@@ -13579,7 +13850,7 @@ function registerJobCommand(program) {
13579
13850
  Message: statusErr.message,
13580
13851
  Instructions: "Check job key, authentication, and folder permissions"
13581
13852
  });
13582
- processContext5.exit(1);
13853
+ processContext7.exit(1);
13583
13854
  return;
13584
13855
  }
13585
13856
  const outputData = options.detailed ? status : {
@@ -13607,12 +13878,12 @@ function registerJobCommand(program) {
13607
13878
  }
13608
13879
 
13609
13880
  // src/commands/pack.ts
13610
- import { catchError as catchError12, OutputFormatter as OutputFormatter7, processContext as processContext6 } from "@uipath/common";
13881
+ import { catchError as catchError12, OutputFormatter as OutputFormatter7, processContext as processContext8 } from "@uipath/common";
13611
13882
 
13612
13883
  // src/services/maestro-pack-service.ts
13613
- import { catchError as catchError11, logger as logger7 } from "@uipath/common";
13884
+ import { catchError as catchError11, logger as logger9 } from "@uipath/common";
13614
13885
  import { getFileSystem as getFileSystem4 } from "@uipath/filesystem";
13615
- import { NugetPackager as NugetPackager2 } from "@uipath/solutionpackager-tool-core";
13886
+ import { NugetPackager } from "@uipath/solutionpackager-tool-core";
13616
13887
  var VALID_PACKAGE_NAME_REGEX = /^[a-zA-Z0-9._-]+$/;
13617
13888
 
13618
13889
  class MaestroPackService {
@@ -13627,14 +13898,14 @@ class MaestroPackService {
13627
13898
  if (!VALID_PACKAGE_NAME_REGEX.test(packageName)) {
13628
13899
  throw new Error(`Invalid package name "${packageName}". Package name can only contain letters, numbers, dots (.), underscores (_), and hyphens (-).`);
13629
13900
  }
13630
- logger7.info(`
13901
+ logger9.info(`
13631
13902
  Packing Maestro project...
13632
13903
  `);
13633
- logger7.info("Details:");
13634
- logger7.info(` Project: ${absoluteProjectPath}`);
13635
- logger7.info(` Package: ${packageName}@${options.version}`);
13636
- logger7.info(` Output: ${absoluteOutputPath}`);
13637
- logger7.info("");
13904
+ logger9.info("Details:");
13905
+ logger9.info(` Project: ${absoluteProjectPath}`);
13906
+ logger9.info(` Package: ${packageName}@${options.version}`);
13907
+ logger9.info(` Output: ${absoluteOutputPath}`);
13908
+ logger9.info("");
13638
13909
  await this.validate(absoluteProjectPath);
13639
13910
  await this.fs.mkdir(absoluteOutputPath);
13640
13911
  let tempDir;
@@ -13672,7 +13943,7 @@ Packing Maestro project...
13672
13943
  const packageId = `${packageName}.processOrchestration.ProcessOrchestration`;
13673
13944
  const version = options.version || "1.0.0";
13674
13945
  const nupkgPath = this.fs.path.join(absoluteOutputPath, `${packageId}.${version}.nupkg`);
13675
- const packager = new NugetPackager2(this.fs);
13946
+ const packager = new NugetPackager(this.fs);
13676
13947
  const result = await packager.packAsync(stagingDir, {
13677
13948
  id: packageId,
13678
13949
  version,
@@ -13714,7 +13985,7 @@ Packing Maestro project...
13714
13985
 
13715
13986
  // src/commands/pack.ts
13716
13987
  var registerPackCommand = (program) => {
13717
- program.command("pack").description("Pack a Maestro project into a .nupkg file").argument("<projectPath>", "Path to the Maestro project directory").argument("<outputPath>", "Output directory where the .nupkg will be saved").option("-n, --name <name>", "Package name (default: project folder name)").option("-v, --version <version>", "Package version (default: 1.0.0)", "1.0.0").trackedAction(processContext6, async (projectPath, outputPath, options) => {
13988
+ program.command("pack").description("Pack a Maestro project into a .nupkg file").argument("<projectPath>", "Path to the Maestro project directory").argument("<outputPath>", "Output directory where the .nupkg will be saved").option("-n, --name <name>", "Package name (default: project folder name)").option("-v, --version <version>", "Package version (default: 1.0.0)", "1.0.0").trackedAction(processContext8, async (projectPath, outputPath, options) => {
13718
13989
  const service = new MaestroPackService;
13719
13990
  const [error3, result] = await catchError12(service.execute(projectPath, {
13720
13991
  output: outputPath,
@@ -13727,7 +13998,7 @@ var registerPackCommand = (program) => {
13727
13998
  Message: "Maestro pack failed",
13728
13999
  Instructions: error3.message
13729
14000
  });
13730
- processContext6.exit(1);
14001
+ processContext8.exit(1);
13731
14002
  return;
13732
14003
  }
13733
14004
  OutputFormatter7.success({
@@ -13745,9 +14016,9 @@ var registerPackCommand = (program) => {
13745
14016
  import { getLoginStatusAsync as getLoginStatusAsync5 } from "@uipath/auth";
13746
14017
  import {
13747
14018
  catchError as catchError13,
13748
- logger as logger8,
14019
+ logger as logger10,
13749
14020
  OutputFormatter as OutputFormatter8,
13750
- processContext as processContext7
14021
+ processContext as processContext9
13751
14022
  } from "@uipath/common";
13752
14023
 
13753
14024
  // src/utils/input-reader.ts
@@ -13773,7 +14044,7 @@ async function readStdin() {
13773
14044
  // src/commands/process.ts
13774
14045
  function registerProcessCommand(program) {
13775
14046
  const processCmd = program.command("process").description("Manage Maestro processes");
13776
- processCmd.command("list").description("List available Maestro processes").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--filter <odata>", "Additional OData filter").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext7, async (options) => {
14047
+ processCmd.command("list").description("List available Maestro processes").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--filter <odata>", "Additional OData filter").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext9, async (options) => {
13777
14048
  const [loginErr, loginStatus] = await catchError13(getLoginStatusAsync5({
13778
14049
  ensureTokenValidityMinutes: options.loginValidity
13779
14050
  }));
@@ -13783,7 +14054,7 @@ function registerProcessCommand(program) {
13783
14054
  Message: loginErr.message,
13784
14055
  Instructions: "Check authentication and permissions"
13785
14056
  });
13786
- processContext7.exit(1);
14057
+ processContext9.exit(1);
13787
14058
  return;
13788
14059
  }
13789
14060
  if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
@@ -13792,7 +14063,7 @@ function registerProcessCommand(program) {
13792
14063
  Message: "Not logged in. Run 'uip login' first.",
13793
14064
  Instructions: "Check authentication and permissions"
13794
14065
  });
13795
- processContext7.exit(1);
14066
+ processContext9.exit(1);
13796
14067
  return;
13797
14068
  }
13798
14069
  const tenantName = options.tenant || loginStatus.tenantName;
@@ -13802,7 +14073,7 @@ function registerProcessCommand(program) {
13802
14073
  Message: "Tenant not provided and not available from login. Use --tenant flag.",
13803
14074
  Instructions: "Check authentication and permissions"
13804
14075
  });
13805
- processContext7.exit(1);
14076
+ processContext9.exit(1);
13806
14077
  return;
13807
14078
  }
13808
14079
  if (!loginStatus.organizationId) {
@@ -13811,7 +14082,7 @@ function registerProcessCommand(program) {
13811
14082
  Message: "Organization ID not available from login.",
13812
14083
  Instructions: "Check authentication and permissions"
13813
14084
  });
13814
- processContext7.exit(1);
14085
+ processContext9.exit(1);
13815
14086
  return;
13816
14087
  }
13817
14088
  const config = {
@@ -13830,7 +14101,7 @@ function registerProcessCommand(program) {
13830
14101
  Message: listErr.message,
13831
14102
  Instructions: "Check authentication and permissions"
13832
14103
  });
13833
- processContext7.exit(1);
14104
+ processContext9.exit(1);
13834
14105
  return;
13835
14106
  }
13836
14107
  if (processes.length === 0) {
@@ -13839,7 +14110,7 @@ function registerProcessCommand(program) {
13839
14110
  Message: "No Maestro processes found.",
13840
14111
  Instructions: "Check folder permissions or try a different folder."
13841
14112
  });
13842
- processContext7.exit(1);
14113
+ processContext9.exit(1);
13843
14114
  return;
13844
14115
  }
13845
14116
  const formattedData = processes.map((p) => ({
@@ -13859,7 +14130,7 @@ function registerProcessCommand(program) {
13859
14130
  Instructions: `Found ${processes.length} Maestro process(es)`
13860
14131
  });
13861
14132
  });
13862
- processCmd.command("get").description("Get Maestro process schema and details").argument("<process-key>", "Process key").argument("<feed-id>", "Feed ID (from 'maestro process list')").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext7, async (processKey, feedId, options) => {
14133
+ processCmd.command("get").description("Get Maestro process schema and details").argument("<process-key>", "Process key").argument("<feed-id>", "Feed ID (from 'maestro process list')").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").requiredOption("-f, --folder-key <key>", "Folder key (GUID)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext9, async (processKey, feedId, options) => {
13863
14134
  const [loginErr, loginStatus] = await catchError13(getLoginStatusAsync5({
13864
14135
  ensureTokenValidityMinutes: options.loginValidity
13865
14136
  }));
@@ -13869,7 +14140,7 @@ function registerProcessCommand(program) {
13869
14140
  Message: loginErr.message,
13870
14141
  Instructions: "Check authentication and process key"
13871
14142
  });
13872
- processContext7.exit(1);
14143
+ processContext9.exit(1);
13873
14144
  return;
13874
14145
  }
13875
14146
  if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
@@ -13878,7 +14149,7 @@ function registerProcessCommand(program) {
13878
14149
  Message: "Not logged in. Run 'uip login' first.",
13879
14150
  Instructions: "Check authentication and process key"
13880
14151
  });
13881
- processContext7.exit(1);
14152
+ processContext9.exit(1);
13882
14153
  return;
13883
14154
  }
13884
14155
  const tenantName = options.tenant || loginStatus.tenantName;
@@ -13888,7 +14159,7 @@ function registerProcessCommand(program) {
13888
14159
  Message: "Tenant not provided and not available from login. Use --tenant flag.",
13889
14160
  Instructions: "Check authentication and process key"
13890
14161
  });
13891
- processContext7.exit(1);
14162
+ processContext9.exit(1);
13892
14163
  return;
13893
14164
  }
13894
14165
  if (!loginStatus.organizationId) {
@@ -13897,7 +14168,7 @@ function registerProcessCommand(program) {
13897
14168
  Message: "Organization ID not available from login.",
13898
14169
  Instructions: "Check authentication and process key"
13899
14170
  });
13900
- processContext7.exit(1);
14171
+ processContext9.exit(1);
13901
14172
  return;
13902
14173
  }
13903
14174
  const config = {
@@ -13917,7 +14188,7 @@ function registerProcessCommand(program) {
13917
14188
  Message: entryErr.message,
13918
14189
  Instructions: "Check authentication and process key"
13919
14190
  });
13920
- processContext7.exit(1);
14191
+ processContext9.exit(1);
13921
14192
  return;
13922
14193
  }
13923
14194
  if (entryPoints.length === 0) {
@@ -13926,7 +14197,7 @@ function registerProcessCommand(program) {
13926
14197
  Message: "No entry points found for this process.",
13927
14198
  Instructions: "Verify the process key is correct and published."
13928
14199
  });
13929
- processContext7.exit(1);
14200
+ processContext9.exit(1);
13930
14201
  return;
13931
14202
  }
13932
14203
  const formattedData = entryPoints.map((ep) => {
@@ -13946,7 +14217,7 @@ function registerProcessCommand(program) {
13946
14217
  Instructions: `Found ${entryPoints.length} entry point(s) for ${processKey}`
13947
14218
  });
13948
14219
  });
13949
- processCmd.command("run").description("Run a Maestro process with inputs").argument("<process-key>", "Process key").argument("<folder-key>", "Folder key (GUID)").option("-i, --inputs <json>", "Input parameters as JSON string or @file.json").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").option("--release-key <key>", "Release key (GUID, from list command)").option("--feed-id <id>", "Feed ID for package lookup (optional)").option("--robot-ids <ids>", "Comma-separated robot IDs (optional)").option("--validate", "Validate inputs against process schema (basic: required fields + primitive types)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext7, async (processKey, folderKey, options) => {
14220
+ processCmd.command("run").description("Run a Maestro process with inputs").argument("<process-key>", "Process key").argument("<folder-key>", "Folder key (GUID)").option("-i, --inputs <json>", "Input parameters as JSON string or @file.json").option("-t, --tenant <tenant-name>", "Tenant (optional, defaults to authenticated tenant)").option("--release-key <key>", "Release key (GUID, from list command)").option("--feed-id <id>", "Feed ID for package lookup (optional)").option("--robot-ids <ids>", "Comma-separated robot IDs (optional)").option("--validate", "Validate inputs against process schema (basic: required fields + primitive types)").option("--login-validity <minutes>", "Minimum minutes before token expiration to trigger a refresh (default: 10)", parseInt, 10).trackedAction(processContext9, async (processKey, folderKey, options) => {
13950
14221
  const [loginErr, loginStatus] = await catchError13(getLoginStatusAsync5({
13951
14222
  ensureTokenValidityMinutes: options.loginValidity
13952
14223
  }));
@@ -13956,7 +14227,7 @@ function registerProcessCommand(program) {
13956
14227
  Message: loginErr.message,
13957
14228
  Instructions: "Check authentication and parameters"
13958
14229
  });
13959
- processContext7.exit(1);
14230
+ processContext9.exit(1);
13960
14231
  return;
13961
14232
  }
13962
14233
  if (loginStatus.loginStatus !== "Logged in" || !loginStatus.baseUrl) {
@@ -13965,7 +14236,7 @@ function registerProcessCommand(program) {
13965
14236
  Message: "Not logged in. Run 'uip login' first.",
13966
14237
  Instructions: "Check authentication and parameters"
13967
14238
  });
13968
- processContext7.exit(1);
14239
+ processContext9.exit(1);
13969
14240
  return;
13970
14241
  }
13971
14242
  const tenantName = options.tenant || loginStatus.tenantName;
@@ -13975,7 +14246,7 @@ function registerProcessCommand(program) {
13975
14246
  Message: "Tenant not provided and not available from login. Use --tenant flag.",
13976
14247
  Instructions: "Check authentication and parameters"
13977
14248
  });
13978
- processContext7.exit(1);
14249
+ processContext9.exit(1);
13979
14250
  return;
13980
14251
  }
13981
14252
  if (!loginStatus.organizationId) {
@@ -13984,7 +14255,7 @@ function registerProcessCommand(program) {
13984
14255
  Message: "Organization ID not available from login.",
13985
14256
  Instructions: "Check authentication and parameters"
13986
14257
  });
13987
- processContext7.exit(1);
14258
+ processContext9.exit(1);
13988
14259
  return;
13989
14260
  }
13990
14261
  let inputs = {};
@@ -13996,7 +14267,7 @@ function registerProcessCommand(program) {
13996
14267
  Message: parseErr.message,
13997
14268
  Instructions: "Check authentication and parameters"
13998
14269
  });
13999
- processContext7.exit(1);
14270
+ processContext9.exit(1);
14000
14271
  return;
14001
14272
  }
14002
14273
  inputs = parsedInputs;
@@ -14008,7 +14279,7 @@ function registerProcessCommand(program) {
14008
14279
  Message: stdinErr.message,
14009
14280
  Instructions: "Check authentication and parameters"
14010
14281
  });
14011
- processContext7.exit(1);
14282
+ processContext9.exit(1);
14012
14283
  return;
14013
14284
  }
14014
14285
  if (stdinData) {
@@ -14019,7 +14290,7 @@ function registerProcessCommand(program) {
14019
14290
  Message: parseErr.message,
14020
14291
  Instructions: "Check authentication and parameters"
14021
14292
  });
14022
- processContext7.exit(1);
14293
+ processContext9.exit(1);
14023
14294
  return;
14024
14295
  }
14025
14296
  inputs = parsedInputs;
@@ -14045,7 +14316,7 @@ function registerProcessCommand(program) {
14045
14316
  Message: `Invalid robot-ids: ${options.robotIds}. Must be comma-separated numbers.`,
14046
14317
  Instructions: "Check authentication and parameters"
14047
14318
  });
14048
- processContext7.exit(1);
14319
+ processContext9.exit(1);
14049
14320
  return;
14050
14321
  }
14051
14322
  }
@@ -14057,7 +14328,7 @@ function registerProcessCommand(program) {
14057
14328
  Message: validateErr.message,
14058
14329
  Instructions: "Check authentication and parameters"
14059
14330
  });
14060
- processContext7.exit(1);
14331
+ processContext9.exit(1);
14061
14332
  return;
14062
14333
  }
14063
14334
  if (!validation.valid) {
@@ -14068,10 +14339,10 @@ function registerProcessCommand(program) {
14068
14339
  Message: "Input validation failed",
14069
14340
  Instructions: errorList || "Check required input fields"
14070
14341
  });
14071
- processContext7.exit(1);
14342
+ processContext9.exit(1);
14072
14343
  return;
14073
14344
  }
14074
- logger8.info("Input validation passed");
14345
+ logger10.info("Input validation passed");
14075
14346
  }
14076
14347
  const [jobErr, job] = await catchError13(startMaestroProjectJob(config));
14077
14348
  if (jobErr) {
@@ -14080,7 +14351,7 @@ function registerProcessCommand(program) {
14080
14351
  Message: jobErr.message,
14081
14352
  Instructions: "Check authentication and parameters"
14082
14353
  });
14083
- processContext7.exit(1);
14354
+ processContext9.exit(1);
14084
14355
  return;
14085
14356
  }
14086
14357
  OutputFormatter8.success({
@@ -14093,7 +14364,7 @@ function registerProcessCommand(program) {
14093
14364
  },
14094
14365
  Instructions: `Watch traces: uip maestro job traces ${job.key}`
14095
14366
  });
14096
- processContext7.exit(0);
14367
+ processContext9.exit(0);
14097
14368
  });
14098
14369
  }
14099
14370
  function parseEntryPointSchemas(ep) {
@@ -14102,17 +14373,17 @@ function parseEntryPointSchemas(ep) {
14102
14373
  output: JSON.parse(ep.OutputArguments)
14103
14374
  }));
14104
14375
  if (err) {
14105
- logger8.warn(`Failed to parse arguments for ${ep.Path}: ${err.message}`);
14376
+ logger10.warn(`Failed to parse arguments for ${ep.Path}: ${err.message}`);
14106
14377
  return { input: {}, output: {} };
14107
14378
  }
14108
14379
  return schemas;
14109
14380
  }
14110
14381
 
14111
14382
  // src/commands/processes.ts
14112
- import { OutputFormatter as OutputFormatter9, processContext as processContext8 } from "@uipath/common";
14383
+ import { OutputFormatter as OutputFormatter9, processContext as processContext10 } from "@uipath/common";
14113
14384
  var registerProcessesCommand = (program) => {
14114
14385
  const processes = program.command("processes").description("Manage Maestro process summaries");
14115
- processes.command("list").description("List all process summaries").trackedAction(processContext8, async () => {
14386
+ processes.command("list").description("List all process summaries").trackedAction(processContext10, async () => {
14116
14387
  const result = await withPimsCall((config) => pimsGet(config, "/processes/summary"), "Error listing processes");
14117
14388
  if (!result)
14118
14389
  return;
@@ -14122,7 +14393,7 @@ var registerProcessesCommand = (program) => {
14122
14393
  Data: result
14123
14394
  });
14124
14395
  });
14125
- processes.command("incidents").description("Get incidents for a specific process").argument("<process-key>", "Process definition key").option("--folder-key <key>", "Folder key").trackedAction(processContext8, async (processKey, options) => {
14396
+ processes.command("incidents").description("Get incidents for a specific process").argument("<process-key>", "Process definition key").option("--folder-key <key>", "Folder key").trackedAction(processContext10, async (processKey, options) => {
14126
14397
  const reqOptions = { folderKey: options.folderKey };
14127
14398
  const result = await withPimsCall((config) => pimsGet(config, `/incidents/process/${processKey}`, reqOptions), "Error getting process incidents");
14128
14399
  if (!result)