@uipath/rpa-tool 1.204.0-preview.20261007.9 → 1.204.0

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.
@@ -29857,7 +29857,7 @@ init_dist();
29857
29857
  // package.json
29858
29858
  var package_default = {
29859
29859
  name: "@uipath/rpa-tool",
29860
- version: "1.204.0-preview.20261007.9",
29860
+ version: "1.204.0",
29861
29861
  description: "Tool for creating and managing UiPath RPA projects",
29862
29862
  keywords: [
29863
29863
  "uipcli-tool",
@@ -30490,15 +30490,11 @@ function enforceCompatibility(binDir, deps) {
30490
30490
  }
30491
30491
 
30492
30492
  // src/resolution/host-routing.ts
30493
- var REMOTE_TOOLS = new Set([
30493
+ var BOTH_HOSTS_TOOLS = new Set([
30494
30494
  ToolName.ConfigureRemoteRobot,
30495
30495
  ToolName.ShowRemoteConnection,
30496
30496
  ToolName.EnableRemoteUia,
30497
- ToolName.DisableRemoteUia,
30498
- ToolName.ExecuteProcess,
30499
- ToolName.UploadFile,
30500
- ToolName.DownloadFile,
30501
- ToolName.RemoteEcho
30497
+ ToolName.DisableRemoteUia
30502
30498
  ]);
30503
30499
  var STUDIO_TOOLS = new Set([
30504
30500
  ToolName.OpenProject,
@@ -30506,12 +30502,13 @@ var STUDIO_TOOLS = new Set([
30506
30502
  ToolName.RunFile,
30507
30503
  ToolName.StopExecution,
30508
30504
  ToolName.Diff,
30509
- ToolName.FocusActivity,
30510
- ...REMOTE_TOOLS
30505
+ ToolName.FocusActivity
30511
30506
  ]);
30512
30507
  function getHostRouteTarget(toolName) {
30513
30508
  if (!toolName)
30514
30509
  return "host" /* Host */;
30510
+ if (BOTH_HOSTS_TOOLS.has(toolName))
30511
+ return "both" /* Both */;
30515
30512
  return STUDIO_TOOLS.has(toolName) ? "host" /* Host */ : "helm" /* Helm */;
30516
30513
  }
30517
30514
 
@@ -30535,8 +30532,14 @@ class StudioSession {
30535
30532
  opts = { ...opts, backend: "studio" /* Studio */ };
30536
30533
  }
30537
30534
  if (this.options.hostStudioPid && !this.options.useStudio && opts.toolName) {
30538
- let target = getHostRouteTarget(opts.toolName);
30539
- if (target === "host" /* Host */ && (opts.toolName === ToolName.RunFile || REMOTE_TOOLS.has(opts.toolName)) && !this.hostServesProject(this.options.hostStudioPid, opts.projectDir, opts.toolName)) {
30535
+ let target = opts.hostRoute ?? getHostRouteTarget(opts.toolName);
30536
+ if (target === "both" /* Both */) {
30537
+ throw new Error(`${opts.toolName} is served by both hosts from Studio's terminal; run it through executeOnEachHost.`);
30538
+ }
30539
+ if (target === "host" /* Host */ && (opts.toolName === ToolName.RunFile || BOTH_HOSTS_TOOLS.has(opts.toolName)) && !this.hostServesProject(this.options.hostStudioPid, opts.projectDir, opts.toolName)) {
30540
+ if (BOTH_HOSTS_TOOLS.has(opts.toolName)) {
30541
+ throw new Error(`Studio Desktop (PID ${this.options.hostStudioPid}) no longer serves this project, so ${opts.toolName} did not run on it.`);
30542
+ }
30540
30543
  target = "helm" /* Helm */;
30541
30544
  }
30542
30545
  this.deps.log(`Host PID routing: ${opts.toolName} -> ${target}`);
@@ -30603,6 +30606,52 @@ class StudioSession {
30603
30606
  }
30604
30607
  }
30605
30608
  }
30609
+ async executeOnEachHost(operation, overrides, beforeStudio) {
30610
+ const opts = overrides ? { ...this.options, ...overrides } : this.options;
30611
+ const hostPid = this.options.hostStudioPid;
30612
+ if (!hostPid || this.options.useStudio || !opts.toolName || !BOTH_HOSTS_TOOLS.has(opts.toolName)) {
30613
+ const value = await this.execute(operation, {
30614
+ ...overrides,
30615
+ hostRoute: "helm" /* Helm */
30616
+ });
30617
+ return [{ host: "helm", result: { status: "fulfilled", value } }];
30618
+ }
30619
+ const studioDeclines = this.whyHostDeclines(hostPid, opts.projectDir, opts.toolName);
30620
+ if (beforeStudio && !studioDeclines) {
30621
+ try {
30622
+ await this.execute(beforeStudio, {
30623
+ ...overrides,
30624
+ hostRoute: "helm" /* Helm */
30625
+ });
30626
+ } catch (reason) {
30627
+ this.deps.log(`${opts.toolName}: the step on Helm before Studio failed: ${reason instanceof Error ? reason.message : reason}`);
30628
+ }
30629
+ }
30630
+ const outcomes = [];
30631
+ for (const [host, hostRoute] of [
30632
+ ["studioDesktop", "host" /* Host */],
30633
+ ["helm", "helm" /* Helm */]
30634
+ ]) {
30635
+ if (host === "studioDesktop" && studioDeclines) {
30636
+ outcomes.push({
30637
+ host,
30638
+ result: { status: "skipped", reason: studioDeclines }
30639
+ });
30640
+ continue;
30641
+ }
30642
+ try {
30643
+ const value = await this.execute(operation, {
30644
+ ...overrides,
30645
+ hostRoute
30646
+ });
30647
+ outcomes.push({ host, result: { status: "fulfilled", value } });
30648
+ } catch (reason) {
30649
+ this.deps.log(`${opts.toolName} failed on ${host}: ${reason instanceof Error ? reason.message : reason}`);
30650
+ outcomes.push({ host, result: { status: "rejected", reason } });
30651
+ }
30652
+ }
30653
+ return outcomes;
30654
+ }
30606
30655
  featureCache = null;
30607
30656
  compatibilityChecked = false;
30608
30657
  activeOperations = 0;
@@ -30687,20 +30736,23 @@ class StudioSession {
30687
30736
  return pid;
30688
30737
  }
30689
30738
  hostServesProject(hostPid, projectDir, what) {
30739
+ return this.whyHostDeclines(hostPid, projectDir, what) === undefined;
30740
+ }
30741
+ whyHostDeclines(hostPid, projectDir, what) {
30690
30742
  const hostStatus = this.deps.readInstanceStatus(hostPid);
30691
30743
  if (!hostStatus?.ipcEndpointName || !this.deps.isProcessAlive(hostPid)) {
30692
30744
  this.deps.log(`Host Studio (PID ${hostPid}) is not reachable - the Studio session that set UIPATH_STUDIO_PID has ended; falling back to normal instance resolution.`);
30693
- return false;
30745
+ return `Studio Desktop (PID ${hostPid}) is no longer running.`;
30694
30746
  }
30695
30747
  if (projectDir && this.hostHasDifferentProjectOpen(projectDir, hostStatus)) {
30696
30748
  this.deps.log(`Host Studio has a different project open; diverting ${what} to Helm to preserve the session.`);
30697
- return false;
30749
+ return "Studio Desktop has another project open.";
30698
30750
  }
30699
30751
  if (what !== ToolName.RunFile && !this.hostServesRemoteCommands(hostStatus)) {
30700
30752
  this.deps.log(`Host Studio predates its own remote connection (no ${REMOTE_COMMANDS_ENDPOINT} in its interop manifest); ${what} goes to Helm.`);
30701
- return false;
30753
+ return "Studio Desktop predates the remote commands; update it to have them run there too.";
30702
30754
  }
30703
- return true;
30755
+ return;
30704
30756
  }
30705
30757
  hostServesRemoteCommands(hostStatus) {
30706
30758
  if (!hostStatus.binDirectory)
@@ -30718,6 +30770,12 @@ class StudioSession {
30718
30770
  ...overrides,
30719
30771
  toolName
30720
30772
  })
30773
+ },
30774
+ executeOnEachHost: {
30775
+ value: (operation, overrides, beforeStudio) => this.executeOnEachHost(operation, {
30776
+ ...overrides,
30777
+ toolName
30778
+ }, beforeStudio)
30721
30779
  }
30722
30780
  });
30723
30781
  }
package/dist/tool.js CHANGED
@@ -51023,7 +51023,7 @@ var {
51023
51023
  // package.json
51024
51024
  var package_default = {
51025
51025
  name: "@uipath/rpa-tool",
51026
- version: "1.204.0-preview.20261007.9",
51026
+ version: "1.204.0",
51027
51027
  description: "Tool for creating and managing UiPath RPA projects",
51028
51028
  keywords: [
51029
51029
  "uipcli-tool",
@@ -56063,6 +56063,9 @@ function toCliCommand(tool) {
56063
56063
  defaultValue: propSchema.default,
56064
56064
  allowedValues: propSchema.enum
56065
56065
  };
56066
+ if (propSchema.hidden === true) {
56067
+ flag.hidden = true;
56068
+ }
56066
56069
  if (isStructuredHint(typeHint)) {
56067
56070
  flag.repeatable = true;
56068
56071
  flag.metavar = "key=value";
@@ -56082,7 +56085,8 @@ function toCliCommand(tool) {
56082
56085
  typeHint: "string",
56083
56086
  metavar: "path",
56084
56087
  isRequired: false,
56085
- payloadFileFor: propName
56088
+ payloadFileFor: propName,
56089
+ ...flag.hidden && { hidden: true }
56086
56090
  });
56087
56091
  }
56088
56092
  }
@@ -56711,6 +56715,15 @@ function applyStructuredArgErrorHint(sub, flags) {
56711
56715
  });
56712
56716
  }
56713
56717
  function addFlagToCommand(sub, flag) {
56718
+ const optionCount = sub.options.length;
56719
+ addFlagOptions(sub, flag);
56720
+ if (flag.hidden) {
56721
+ for (const opt of sub.options.slice(optionCount)) {
56722
+ opt.hideHelp();
56723
+ }
56724
+ }
56725
+ }
56726
+ function addFlagOptions(sub, flag) {
56714
56727
  const syntax = buildFlagSyntax(flag);
56715
56728
  const desc = flag.description;
56716
56729
  if (flag.typeHint === "json" || flag.typeHint === "jsonArray") {
@@ -59312,15 +59325,11 @@ function enforceCompatibility(binDir, deps) {
59312
59325
  }
59313
59326
 
59314
59327
  // src/resolution/host-routing.ts
59315
- var REMOTE_TOOLS = new Set([
59328
+ var BOTH_HOSTS_TOOLS = new Set([
59316
59329
  ToolName.ConfigureRemoteRobot,
59317
59330
  ToolName.ShowRemoteConnection,
59318
59331
  ToolName.EnableRemoteUia,
59319
- ToolName.DisableRemoteUia,
59320
- ToolName.ExecuteProcess,
59321
- ToolName.UploadFile,
59322
- ToolName.DownloadFile,
59323
- ToolName.RemoteEcho
59332
+ ToolName.DisableRemoteUia
59324
59333
  ]);
59325
59334
  var STUDIO_TOOLS = new Set([
59326
59335
  ToolName.OpenProject,
@@ -59328,12 +59337,13 @@ var STUDIO_TOOLS = new Set([
59328
59337
  ToolName.RunFile,
59329
59338
  ToolName.StopExecution,
59330
59339
  ToolName.Diff,
59331
- ToolName.FocusActivity,
59332
- ...REMOTE_TOOLS
59340
+ ToolName.FocusActivity
59333
59341
  ]);
59334
59342
  function getHostRouteTarget(toolName) {
59335
59343
  if (!toolName)
59336
59344
  return "host" /* Host */;
59345
+ if (BOTH_HOSTS_TOOLS.has(toolName))
59346
+ return "both" /* Both */;
59337
59347
  return STUDIO_TOOLS.has(toolName) ? "host" /* Host */ : "helm" /* Helm */;
59338
59348
  }
59339
59349
 
@@ -59357,8 +59367,14 @@ class StudioSession {
59357
59367
  opts = { ...opts, backend: "studio" /* Studio */ };
59358
59368
  }
59359
59369
  if (this.options.hostStudioPid && !this.options.useStudio && opts.toolName) {
59360
- let target = getHostRouteTarget(opts.toolName);
59361
- if (target === "host" /* Host */ && (opts.toolName === ToolName.RunFile || REMOTE_TOOLS.has(opts.toolName)) && !this.hostServesProject(this.options.hostStudioPid, opts.projectDir, opts.toolName)) {
59370
+ let target = opts.hostRoute ?? getHostRouteTarget(opts.toolName);
59371
+ if (target === "both" /* Both */) {
59372
+ throw new Error(`${opts.toolName} is served by both hosts from Studio's terminal; run it through executeOnEachHost.`);
59373
+ }
59374
+ if (target === "host" /* Host */ && (opts.toolName === ToolName.RunFile || BOTH_HOSTS_TOOLS.has(opts.toolName)) && !this.hostServesProject(this.options.hostStudioPid, opts.projectDir, opts.toolName)) {
59375
+ if (BOTH_HOSTS_TOOLS.has(opts.toolName)) {
59376
+ throw new Error(`Studio Desktop (PID ${this.options.hostStudioPid}) no longer serves this project, so ${opts.toolName} did not run on it.`);
59377
+ }
59362
59378
  target = "helm" /* Helm */;
59363
59379
  }
59364
59380
  this.deps.log(`Host PID routing: ${opts.toolName} -> ${target}`);
@@ -59425,6 +59441,52 @@ class StudioSession {
59425
59441
  }
59426
59442
  }
59427
59443
  }
59444
+ async executeOnEachHost(operation, overrides, beforeStudio) {
59445
+ const opts = overrides ? { ...this.options, ...overrides } : this.options;
59446
+ const hostPid = this.options.hostStudioPid;
59447
+ if (!hostPid || this.options.useStudio || !opts.toolName || !BOTH_HOSTS_TOOLS.has(opts.toolName)) {
59448
+ const value = await this.execute(operation, {
59449
+ ...overrides,
59450
+ hostRoute: "helm" /* Helm */
59451
+ });
59452
+ return [{ host: "helm", result: { status: "fulfilled", value } }];
59453
+ }
59454
+ const studioDeclines = this.whyHostDeclines(hostPid, opts.projectDir, opts.toolName);
59455
+ if (beforeStudio && !studioDeclines) {
59456
+ try {
59457
+ await this.execute(beforeStudio, {
59458
+ ...overrides,
59459
+ hostRoute: "helm" /* Helm */
59460
+ });
59461
+ } catch (reason) {
59462
+ this.deps.log(`${opts.toolName}: the step on Helm before Studio failed: ${reason instanceof Error ? reason.message : reason}`);
59463
+ }
59464
+ }
59465
+ const outcomes = [];
59466
+ for (const [host, hostRoute] of [
59467
+ ["studioDesktop", "host" /* Host */],
59468
+ ["helm", "helm" /* Helm */]
59469
+ ]) {
59470
+ if (host === "studioDesktop" && studioDeclines) {
59471
+ outcomes.push({
59472
+ host,
59473
+ result: { status: "skipped", reason: studioDeclines }
59474
+ });
59475
+ continue;
59476
+ }
59477
+ try {
59478
+ const value = await this.execute(operation, {
59479
+ ...overrides,
59480
+ hostRoute
59481
+ });
59482
+ outcomes.push({ host, result: { status: "fulfilled", value } });
59483
+ } catch (reason) {
59484
+ this.deps.log(`${opts.toolName} failed on ${host}: ${reason instanceof Error ? reason.message : reason}`);
59485
+ outcomes.push({ host, result: { status: "rejected", reason } });
59486
+ }
59487
+ }
59488
+ return outcomes;
59489
+ }
59428
59490
  featureCache = null;
59429
59491
  compatibilityChecked = false;
59430
59492
  activeOperations = 0;
@@ -59509,20 +59571,23 @@ class StudioSession {
59509
59571
  return pid;
59510
59572
  }
59511
59573
  hostServesProject(hostPid, projectDir, what) {
59574
+ return this.whyHostDeclines(hostPid, projectDir, what) === undefined;
59575
+ }
59576
+ whyHostDeclines(hostPid, projectDir, what) {
59512
59577
  const hostStatus = this.deps.readInstanceStatus(hostPid);
59513
59578
  if (!hostStatus?.ipcEndpointName || !this.deps.isProcessAlive(hostPid)) {
59514
59579
  this.deps.log(`Host Studio (PID ${hostPid}) is not reachable - the Studio session that set UIPATH_STUDIO_PID has ended; falling back to normal instance resolution.`);
59515
- return false;
59580
+ return `Studio Desktop (PID ${hostPid}) is no longer running.`;
59516
59581
  }
59517
59582
  if (projectDir && this.hostHasDifferentProjectOpen(projectDir, hostStatus)) {
59518
59583
  this.deps.log(`Host Studio has a different project open; diverting ${what} to Helm to preserve the session.`);
59519
- return false;
59584
+ return "Studio Desktop has another project open.";
59520
59585
  }
59521
59586
  if (what !== ToolName.RunFile && !this.hostServesRemoteCommands(hostStatus)) {
59522
59587
  this.deps.log(`Host Studio predates its own remote connection (no ${REMOTE_COMMANDS_ENDPOINT} in its interop manifest); ${what} goes to Helm.`);
59523
- return false;
59588
+ return "Studio Desktop predates the remote commands; update it to have them run there too.";
59524
59589
  }
59525
- return true;
59590
+ return;
59526
59591
  }
59527
59592
  hostServesRemoteCommands(hostStatus) {
59528
59593
  if (!hostStatus.binDirectory)
@@ -59540,6 +59605,12 @@ class StudioSession {
59540
59605
  ...overrides,
59541
59606
  toolName
59542
59607
  })
59608
+ },
59609
+ executeOnEachHost: {
59610
+ value: (operation, overrides, beforeStudio) => this.executeOnEachHost(operation, {
59611
+ ...overrides,
59612
+ toolName
59613
+ }, beforeStudio)
59543
59614
  }
59544
59615
  });
59545
59616
  }
@@ -60616,10 +60687,65 @@ function closeProjectTool(session) {
60616
60687
  });
60617
60688
  }
60618
60689
 
60619
- // src/tools/local/configure-remote-robot.ts
60690
+ // src/tools/local/host-outcomes.ts
60691
+ function relayHostOutcomes(outcomes) {
60692
+ if (outcomes.length === 1) {
60693
+ const text = settledText(outcomes[0].result);
60694
+ return {
60695
+ content: [{ type: "text", text }],
60696
+ isError: isFailure(text)
60697
+ };
60698
+ }
60699
+ const envelope = {};
60700
+ let success = true;
60701
+ for (const { host, result } of outcomes) {
60702
+ const text = settledText(result);
60703
+ envelope[host] = parseEnvelope(text);
60704
+ success &&= !isFailure(text);
60705
+ }
60706
+ return {
60707
+ content: [
60708
+ {
60709
+ type: "text",
60710
+ text: JSON.stringify({ success, ...envelope })
60711
+ }
60712
+ ],
60713
+ isError: !success
60714
+ };
60715
+ }
60716
+ function settledText(result) {
60717
+ if (result.status === "fulfilled") {
60718
+ return result.value;
60719
+ }
60720
+ if (result.status === "skipped") {
60721
+ return JSON.stringify({ success: true, skipped: result.reason });
60722
+ }
60723
+ const { reason } = result;
60724
+ return JSON.stringify({
60725
+ success: false,
60726
+ error: reason instanceof Error ? reason.message : String(reason)
60727
+ });
60728
+ }
60729
+ function isFailure(text) {
60730
+ const payload = tryParse(text);
60731
+ return isJsonObject4(payload) && payload.success === false;
60732
+ }
60733
+ function parseEnvelope(text) {
60734
+ const payload = tryParse(text);
60735
+ return payload === undefined ? { success: true, message: text } : payload;
60736
+ }
60737
+ function tryParse(text) {
60738
+ try {
60739
+ return JSON.parse(text);
60740
+ } catch {
60741
+ return;
60742
+ }
60743
+ }
60620
60744
  function isJsonObject4(value) {
60621
60745
  return typeof value === "object" && value !== null && !Array.isArray(value);
60622
60746
  }
60747
+
60748
+ // src/tools/local/configure-remote-robot.ts
60623
60749
  var IGNORED_LIVE_STREAM = false;
60624
60750
  function parseRemoteRobotMode(args) {
60625
60751
  const liveAuthoring = parseFlag(args.liveAuthoring, "--live-authoring");
@@ -60704,6 +60830,15 @@ function optionalText(value, spec) {
60704
60830
  }
60705
60831
  return value.trim();
60706
60832
  }
60833
+ function configuredMode(result) {
60834
+ try {
60835
+ const payload = JSON.parse(result);
60836
+ if (typeof payload === "object" && payload !== null && "success" in payload && payload.success === true && "liveAuthoring" in payload && typeof payload.liveAuthoring === "boolean") {
60837
+ return payload.liveAuthoring;
60838
+ }
60839
+ } catch {}
60840
+ return;
60841
+ }
60707
60842
  function typeLabel(value) {
60708
60843
  if (Array.isArray(value)) {
60709
60844
  return "an array";
@@ -60714,7 +60849,7 @@ function configureRemoteRobotTool(session) {
60714
60849
  return createToolHandler(session, {
60715
60850
  name: ToolName.ConfigureRemoteRobot,
60716
60851
  title: "Configure Remote Robot",
60717
- description: "Configure the remote (Orchestrator unattended robot) target: the folder plus the " + "robot, machine and runtime resolved in it. --live-authoring serves every remote " + "command, run and debug session from one long-lived session job and enables remote " + "UIA; --remote-run-only (default) takes a job per operation. --folder-path alone " + "reuses the folder's stored connection. Requires Orchestrator sign-in.",
60852
+ description: "Configure the remote target (Orchestrator unattended robot): folder, robot, machine " + "and runtime. --live-authoring runs everything remote over one long-lived session job " + "and enables remote UIA; --remote-run-only (default) takes a job per operation. " + "--folder-path alone reuses the folder's stored connection. In Studio's terminal it " + "configures Helm and Studio. Needs Orchestrator sign-in.",
60718
60853
  requiresProject: true,
60719
60854
  inputSchema: {
60720
60855
  type: "object",
@@ -60737,7 +60872,7 @@ function configureRemoteRobotTool(session) {
60737
60872
  },
60738
60873
  liveAuthoring: {
60739
60874
  type: "boolean",
60740
- description: "Use the target for live authoring: one long-lived remote session job serves " + "every remote command, run and debug session, the remote UI Automation design " + "session becomes available, and the remote screen is streamed. Mutually " + "exclusive with --remote-run-only. Pass neither to keep the mode: with --machine, " + "the serving host's current one (the folder's stored one when the host has no " + "connection yet); with --folder-path alone, the one stored for that folder."
60875
+ description: "Use the target for live authoring: one long-lived remote session job serves " + "every remote command, run and debug session, the remote UI Automation design " + "session becomes available, and the remote screen is streamed. Mutually " + "exclusive with --remote-run-only. Pass neither to keep the mode: with --machine, " + "the serving host's current one (the folder's stored one when the host has no " + "connection yet); with --folder-path alone, the one stored for that folder. From " + "Studio's terminal Helm takes the mode Studio kept."
60741
60876
  },
60742
60877
  remoteRunOnly: {
60743
60878
  type: "boolean",
@@ -60748,20 +60883,20 @@ function configureRemoteRobotTool(session) {
60748
60883
  }, async (session2, args) => {
60749
60884
  try {
60750
60885
  const target = parseRemoteRobotTargetArgs(args);
60751
- const result = await session2.execute(async (instance) => {
60886
+ let liveAuthoring = target.liveAuthoring;
60887
+ const outcomes = await session2.executeOnEachHost(async (instance) => {
60752
60888
  const remoteConnection = instance.backendType === "Helm" /* Helm */ ? instance.helmServices.remoteConnection : instance.services.remoteConnection;
60753
- if (target.liveAuthoring !== undefined) {
60754
- return await remoteConnection.configureUnattendedRobotWithMode(target.folderPath, target.robot, target.machine, target.runtime, target.liveAuthoring);
60889
+ if (liveAuthoring !== undefined) {
60890
+ return await remoteConnection.configureUnattendedRobotWithMode(target.folderPath, target.robot, target.machine, target.runtime, liveAuthoring);
60755
60891
  }
60756
- return await remoteConnection.configureUnattendedRobot(target.folderPath, target.robot, target.machine, target.runtime, IGNORED_LIVE_STREAM);
60892
+ const result = await remoteConnection.configureUnattendedRobot(target.folderPath, target.robot, target.machine, target.runtime, IGNORED_LIVE_STREAM);
60893
+ liveAuthoring = configuredMode(result);
60894
+ return result;
60757
60895
  }, {
60758
60896
  requiresProject: true,
60759
60897
  backend: "helm" /* Helm */
60760
- });
60761
- return {
60762
- content: [{ type: "text", text: result }],
60763
- isError: isFailure(result)
60764
- };
60898
+ }, (helm) => helm.helmServices.remoteConnection.enableRemoteConnection(false));
60899
+ return relayHostOutcomes(outcomes);
60765
60900
  } catch (e) {
60766
60901
  return {
60767
60902
  content: [
@@ -60778,14 +60913,6 @@ function configureRemoteRobotTool(session) {
60778
60913
  }
60779
60914
  });
60780
60915
  }
60781
- function isFailure(result) {
60782
- try {
60783
- const payload = JSON.parse(result);
60784
- return isJsonObject4(payload) && payload.success === false;
60785
- } catch {
60786
- return false;
60787
- }
60788
- }
60789
60916
 
60790
60917
  // src/tools/local/create-project.ts
60791
60918
  init_dist3();
@@ -69662,7 +69789,7 @@ function enableRemoteUiaTool(session) {
69662
69789
  return createToolHandler(session, {
69663
69790
  name: ToolName.EnableRemoteUia,
69664
69791
  title: "Start Remote Session",
69665
- description: "Start the remote session: bring up the app on the remote agent (Orchestrator " + "unattended robot) that remote runs, debug sessions and commands travel over. " + "Configure the target first with `rpa remote configure`, or this fails. Starting one " + "already running is a no-op; reconfiguring restarts it. The UI Automation design " + "host is not started here - the first `uia --remote` command sets it up.",
69792
+ description: "Start the remote session: bring up the app on the remote agent (Orchestrator " + "unattended robot) that remote runs, debugging and commands travel over. Needs a " + "target from `rpa remote configure`. Starting one already running is a no-op; " + "reconfiguring restarts it. The UI Automation design host is started by the first " + "`uia --remote` command, not here. In Studio's terminal it starts Helm's and Studio's.",
69666
69793
  requiresProject: true,
69667
69794
  inputSchema: {
69668
69795
  type: "object",
@@ -69674,7 +69801,7 @@ function disableRemoteUiaTool(session) {
69674
69801
  return createToolHandler(session, {
69675
69802
  name: ToolName.DisableRemoteUia,
69676
69803
  title: "Stop Remote Session",
69677
- description: "Stop the remote session: tear down the connection to the remote agent and release " + "it, including the UI Automation design host when one was started. A later `rpa " + "remote start`, or a `uia` command with --remote, brings a session up again. " + "Succeeds when no session is running or the previous target is no longer configured.",
69804
+ description: "Stop the remote session: tear down the connection to the remote agent and release " + "it, including the UI Automation design host when one was started. A later `rpa " + "remote start`, or a `uia` command with --remote, brings a session up again. " + "Succeeds when no session is running or the previous target is no longer configured. " + "From Studio's terminal it stops Helm's and Studio's session alike.",
69678
69805
  requiresProject: true,
69679
69806
  inputSchema: {
69680
69807
  type: "object",
@@ -69684,18 +69811,11 @@ function disableRemoteUiaTool(session) {
69684
69811
  }
69685
69812
  async function driveSession(session, call) {
69686
69813
  try {
69687
- const result = await session.execute((instance) => call(instance.backendType === "Helm" /* Helm */ ? instance.helmServices.remoteUiaSessionConfig : instance.services.remoteUiaSessionConfig), {
69814
+ const outcomes = await session.executeOnEachHost((instance) => call(instance.backendType === "Helm" /* Helm */ ? instance.helmServices.remoteUiaSessionConfig : instance.services.remoteUiaSessionConfig), {
69688
69815
  requiresProject: true,
69689
69816
  backend: "helm" /* Helm */
69690
69817
  });
69691
- let isError = false;
69692
- try {
69693
- isError = JSON.parse(result)?.success === false;
69694
- } catch {}
69695
- return {
69696
- content: [{ type: "text", text: result }],
69697
- isError
69698
- };
69818
+ return relayHostOutcomes(outcomes);
69699
69819
  } catch (e) {
69700
69820
  return {
69701
69821
  content: [
@@ -71095,25 +71215,30 @@ function showRemoteConnectionTool(session) {
71095
71215
  requiresProject: true,
71096
71216
  inputSchema: {
71097
71217
  type: "object",
71098
- properties: {}
71218
+ properties: {
71219
+ studio: {
71220
+ type: "boolean",
71221
+ description: "From Studio's terminal, show Studio Desktop's connection beside Helm's.",
71222
+ hidden: true
71223
+ }
71224
+ }
71099
71225
  }
71100
- }, async (session2) => {
71226
+ }, async (session2, args) => {
71227
+ const options = {
71228
+ requiresProject: true,
71229
+ backend: "helm" /* Helm */
71230
+ };
71101
71231
  try {
71102
- const result = await session2.execute((instance) => {
71103
- const remoteConnection = instance.backendType === "Helm" /* Helm */ ? instance.helmServices.remoteConnection : instance.services.remoteConnection;
71104
- return remoteConnection.getRemoteConnection();
71105
- }, {
71106
- requiresProject: true,
71107
- backend: "helm" /* Helm */
71232
+ if (args.studio === true) {
71233
+ return relayHostOutcomes(await session2.executeOnEachHost(getRemoteConnection, options));
71234
+ }
71235
+ const value = await session2.execute(getRemoteConnection, {
71236
+ ...options,
71237
+ hostRoute: "helm" /* Helm */
71108
71238
  });
71109
- let isError = false;
71110
- try {
71111
- isError = JSON.parse(result)?.success === false;
71112
- } catch {}
71113
- return {
71114
- content: [{ type: "text", text: result }],
71115
- isError
71116
- };
71239
+ return relayHostOutcomes([
71240
+ { host: "helm", result: { status: "fulfilled", value } }
71241
+ ]);
71117
71242
  } catch (e) {
71118
71243
  return {
71119
71244
  content: [
@@ -71130,6 +71255,10 @@ function showRemoteConnectionTool(session) {
71130
71255
  }
71131
71256
  });
71132
71257
  }
71258
+ function getRemoteConnection(instance) {
71259
+ const remoteConnection = instance.backendType === "Helm" /* Helm */ ? instance.helmServices.remoteConnection : instance.services.remoteConnection;
71260
+ return remoteConnection.getRemoteConnection();
71261
+ }
71133
71262
 
71134
71263
  // src/tools/local/stop-execution.ts
71135
71264
  var import_coreipc8 = __toESM(require_coreipc(), 1);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/rpa-tool",
3
- "version": "1.204.0-preview.20261007.9",
3
+ "version": "1.204.0",
4
4
  "description": "Tool for creating and managing UiPath RPA projects",
5
5
  "keywords": [
6
6
  "uipcli-tool",
@@ -65,11 +65,11 @@
65
65
  "typescript": "^5.7.2"
66
66
  },
67
67
  "optionalDependencies": {
68
- "@uipath/studio-helm-win32-x64": "1.204.0-preview.20261007.9",
69
- "@uipath/studio-helm-win32-arm64": "1.204.0-preview.20261007.9",
70
- "@uipath/studio-helm-linux-x64": "1.204.0-preview.20261007.9",
71
- "@uipath/studio-helm-linux-arm64": "1.204.0-preview.20261007.9",
72
- "@uipath/studio-helm-darwin-x64": "1.204.0-preview.20261007.9",
73
- "@uipath/studio-helm-darwin-arm64": "1.204.0-preview.20261007.9"
68
+ "@uipath/studio-helm-win32-x64": "1.204.0",
69
+ "@uipath/studio-helm-win32-arm64": "1.204.0",
70
+ "@uipath/studio-helm-linux-x64": "1.204.0",
71
+ "@uipath/studio-helm-linux-arm64": "1.204.0",
72
+ "@uipath/studio-helm-darwin-x64": "1.204.0",
73
+ "@uipath/studio-helm-darwin-arm64": "1.204.0"
74
74
  }
75
75
  }