@uipath/codedagent-tool 1.205.0-preview.276 → 1.206.0-preview.279

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -42,6 +42,10 @@ Options:
42
42
  If the current directory contains a `.venv` but no virtual environment is
43
43
  activated, `setup` stops and tells you to activate it first.
44
44
 
45
+ `setup` also refuses a `uipath` older than the floor this CLI supports, and
46
+ reports that floor as `RequiredPackageVersion` in its success envelope. See
47
+ [Version floor](#version-floor).
48
+
45
49
  ### review
46
50
 
47
51
  Reviews a coded agent project against the deterministic rule set. Returns a
@@ -128,6 +132,7 @@ Python error:
128
132
  | --- | --- | --- |
129
133
  | Command outside the whitelist | `ValidationError` | 3 |
130
134
  | Python not configured (`setup` never run) | `ConfigError` | 1 |
135
+ | Bound `uipath` older than the floor, or unable to report its version | `ConfigError` | 1 |
131
136
  | `push` without `UIPATH_PROJECT_ID` | `ConfigError` | 1 |
132
137
  | `deploy` / `publish -w` without the workspace scope | `ConfigError` | 1 |
133
138
  | `setup` with an unactivated `.venv` | `Failure` | 1 |
@@ -143,10 +148,11 @@ The following settings are configured in the code:
143
148
 
144
149
  #### Python Versions
145
150
 
146
- Accepted versions: `3.14`, `3.13`, `3.12`, `3.11`
151
+ Accepted versions: `3.11` to `3.15`.
147
152
 
148
- This is an allowlist, not a priority order. `setup` walks a list of candidate
149
- commands and takes the first one whose reported `major.minor` is accepted:
153
+ The default list is `3.14,3.13,3.12,3.11,3.15`. Its order only sets the probe
154
+ order: `setup` walks a list of candidate commands and takes the first one whose
155
+ reported `major.minor` is accepted:
150
156
 
151
157
  - **Windows** - `python`, `python3`, then `python<version>` for each accepted
152
158
  version, then `py -<version>` for each, then `py`.
@@ -164,12 +170,35 @@ replaces the list entirely:
164
170
 
165
171
  ```bash
166
172
  # Windows
167
- set PYTHON_TOOL_PYTHON_VERSIONS=3.14,3.13,3.12,3.11
173
+ set PYTHON_TOOL_PYTHON_VERSIONS=3.14,3.13,3.12,3.11,3.15
168
174
 
169
175
  # Linux/macOS
170
- export PYTHON_TOOL_PYTHON_VERSIONS=3.14,3.13,3.12,3.11
176
+ export PYTHON_TOOL_PYTHON_VERSIONS=3.14,3.13,3.12,3.11,3.15
171
177
  ```
172
178
 
179
+ ### Version floor
180
+
181
+ `uip` and its npm tools move in lockstep, but the Python `uipath` CLI releases
182
+ on its own schedule and `uv` resolves a per-project copy into `.venv`
183
+ independently of any global install. So `@uipath/uipath-python-bridge` declares
184
+ the minimum `uipath` it supports in its `package.json`:
185
+
186
+ ```json
187
+ "uipath": {
188
+ "requires": {
189
+ "uipath": ">=2.14.41"
190
+ }
191
+ }
192
+ ```
193
+
194
+ The floor is held in two places. `setup` refuses to bind an executable below it
195
+ (and writes no cache). Every forwarded command then runs `uipath --version` on
196
+ the bound executable right before spawning it (the cache never holds a version) so an
197
+ in-place upgrade or downgrade, or a venv that differs from the global install,
198
+ is caught at the binary that will actually run. The failure names the path,
199
+ the version found and the version required. `--log-level debug` prints the
200
+ resolved path and version before every spawn. There is no override.
201
+
173
202
  ### Cache File
174
203
 
175
204
  `setup` writes `~/.uipath/.uipath-python-cache.json`, shared with
@@ -180,7 +209,6 @@ consumers. It stores:
180
209
  - Last validation timestamp
181
210
  - Package name
182
211
  - Resolved `uipath` executable path
183
- - Installed package version
184
212
 
185
213
  If the cached path no longer exists, `setup` re-detects automatically. The
186
214
  forwarded commands do not re-detect - they fail with a `ConfigError` pointing back
@@ -1,5 +1,3 @@
1
- import"./tool-1de529jm.js";
2
-
3
1
  // ../../node_modules/open/index.js
4
2
  import process7 from "node:process";
5
3
  import path from "node:path";
@@ -548,22 +546,6 @@ var open = (target, options) => {
548
546
  target
549
547
  });
550
548
  };
551
- var openApp = (name, options) => {
552
- if (typeof name !== "string" && !Array.isArray(name)) {
553
- throw new TypeError("Expected a valid `name`");
554
- }
555
- const { arguments: appArguments = [] } = options ?? {};
556
- if (appArguments !== undefined && appArguments !== null && !Array.isArray(appArguments)) {
557
- throw new TypeError("Expected `appArguments` as Array type");
558
- }
559
- return baseOpen({
560
- ...options,
561
- app: {
562
- name,
563
- arguments: appArguments
564
- }
565
- });
566
- };
567
549
  function detectArchBinary(binary) {
568
550
  if (typeof binary === "string" || Array.isArray(binary)) {
569
551
  return binary;
@@ -626,9 +608,7 @@ defineLazyProperty(apps, "safari", () => detectPlatformBinary({
626
608
  }));
627
609
  var open_default = open;
628
610
  export {
629
- apps,
630
- open_default as default,
631
- openApp
611
+ open_default as default
632
612
  };
633
613
 
634
- //# debugId=42C9AEC59ECC644E64756E2164756E21
614
+ //# debugId=6F288C058A3A412164756E2164756E21
package/dist/index.js CHANGED
@@ -1,17 +1,16 @@
1
1
  #!/usr/bin/env bun
2
- import {
3
- metadata,
4
- registerCommands
5
- } from "./tool-sdc09fzm.js";
6
2
  import {
7
3
  Command
8
- } from "./tool-kh9ddkna.js";
9
- import"./tool-1de529jm.js";
4
+ } from "./tool-dzz670n8.js";
5
+ import {
6
+ metadata2,
7
+ registerCommands2
8
+ } from "./tool-6yj9cwz2.js";
10
9
 
11
10
  // src/index.ts
12
11
  var program = new Command;
13
- program.name(metadata.name).version(metadata.version).description(metadata.description);
14
- await registerCommands(program);
12
+ program.name(metadata2.name).version(metadata2.version).description(metadata2.description);
13
+ await registerCommands2(program);
15
14
  program.parse(process.argv);
16
15
 
17
- //# debugId=8E1A7BFAC0CD464264756E2164756E21
16
+ //# debugId=F66EA17E3E13BD9064756E2164756E21
package/dist/init.js CHANGED
@@ -1,9 +1,8 @@
1
1
  import {
2
+ runUipathPythonCommand,
2
3
  COMMAND_RULES,
3
- codedAgentCommandPreflight,
4
- runUipathPythonCommand
5
- } from "./tool-kh9ddkna.js";
6
- import"./tool-1de529jm.js";
4
+ codedAgentCommandPreflight
5
+ } from "./tool-dzz670n8.js";
7
6
 
8
7
  // src/services/codedagent-init-service.ts
9
8
  async function codedagentInitAsync(options) {
@@ -34,4 +33,4 @@ export {
34
33
  codedagentInitAsync
35
34
  };
36
35
 
37
- //# debugId=7838E7CC8362043A64756E2164756E21
36
+ //# debugId=FDCB0760191ECF3E64756E2164756E21
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  __commonJS
3
- } from "./tool-1de529jm.js";
3
+ } from "./tool-epsr41wx.js";
4
4
 
5
5
  // ../../node_modules/jmespath/jmespath.js
6
6
  var require_jmespath = __commonJS(function(exports) {
@@ -1,5 +1,3 @@
1
- import"./tool-1de529jm.js";
2
-
3
1
  // ../../node_modules/js-yaml/dist/js-yaml.mjs
4
2
  function getDefaultExportFromCjs(x) {
5
3
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
@@ -3150,4 +3148,4 @@ export {
3150
3148
  types
3151
3149
  };
3152
3150
 
3153
- //# debugId=9FA8E718B2F80BEA64756E2164756E21
3151
+ //# debugId=41DC6971B94BC54964756E2164756E21
@@ -1,27 +1,28 @@
1
1
  import {
2
- COMMAND_RULES,
2
+ getFileSystem,
3
3
  CommandDimensions,
4
- OutputFormatter,
5
- RESULTS,
6
4
  ShipDimensions,
7
- WHITELISTED_COMMANDS,
8
5
  catchError,
9
- codedAgentCommandPreflight,
10
- createExecuteCommand,
11
- createSetupCommand,
12
6
  extractErrorMessageSync,
13
- getFileSystem,
14
- getLoginStatusAsync,
15
- parseJWT,
7
+ RESULTS,
8
+ OutputFormatter,
16
9
  processContext,
17
- trackShipSucceeded
18
- } from "./tool-kh9ddkna.js";
10
+ trackShipSucceeded,
11
+ parseJWT,
12
+ getLoginStatusAsync,
13
+ getAuthContext,
14
+ createExecuteCommand,
15
+ createSetupCommand,
16
+ WHITELISTED_COMMANDS,
17
+ COMMAND_RULES,
18
+ codedAgentCommandPreflight
19
+ } from "./tool-dzz670n8.js";
19
20
  // package.json
20
21
  var package_default = {
21
22
  name: "@uipath/codedagent-tool",
22
23
  author: "UiPath",
23
24
  license: "SEE LICENSE IN LICENSE.txt",
24
- version: "1.205.0-preview.276",
25
+ version: "1.206.0-preview.279",
25
26
  description: "Build, run, deploy, and manage AI Agents.",
26
27
  keywords: [
27
28
  "cli-tool",
@@ -54,6 +55,7 @@ var package_default = {
54
55
  },
55
56
  scripts: {
56
57
  build: "bun ../../tools/build-tool.ts && tsc -p tsconfig.build.json --noCheck",
58
+ typecheck: "tsc --noEmit",
57
59
  package: "bun run build && bun pm pack",
58
60
  test: "vitest run",
59
61
  "test:coverage": "vitest run --coverage",
@@ -636,19 +638,14 @@ var SERVICE_PATH = {
636
638
  "llm-gateway": "llmgateway_"
637
639
  };
638
640
  var REQUESTING_PRODUCT = "uipath-cli";
639
- async function resolveStatus(options) {
640
- const status = await getLoginStatusAsync({
641
- ensureTokenValidityMinutes: options?.loginValidity
641
+ async function resolveAuth(options) {
642
+ const auth = await getAuthContext({
643
+ ensureTokenValidityMinutes: options?.loginValidity,
644
+ requireOrganizationId: true
642
645
  });
643
- if (status.loginStatus !== "Logged in" || !status.baseUrl || !status.accessToken) {
644
- throw new Error(status.hint ? `Not logged in. ${status.hint}` : "Not logged in. Run 'uip login' first.");
645
- }
646
- if (!status.organizationId) {
647
- throw new Error("Organization ID not available. Ensure you are logged in with an organization context.");
648
- }
649
646
  return {
650
- status,
651
- bearerToken: options?.s2sToken ?? status.accessToken
647
+ auth,
648
+ bearerToken: options?.s2sToken ?? auth.accessToken
652
649
  };
653
650
  }
654
651
  function stripTrailingSlash(s) {
@@ -679,28 +676,26 @@ async function readErrorBody(response) {
679
676
  return `${response.status} ${response.statusText}: ${text.slice(0, 1000)}`;
680
677
  }
681
678
  async function createAiHttpContext(service, options) {
682
- const { status, bearerToken } = await resolveStatus(options);
683
- const explicitTenantOverride = options?.tenantName !== undefined;
684
- const tenantName = options?.tenantName ?? status.tenantName;
685
- const tenantSegment = explicitTenantOverride ? options?.tenantName : status.tenantId ?? status.tenantName;
679
+ const { auth, bearerToken } = await resolveAuth(options);
680
+ const explicitTenantOverride = Boolean(options?.tenantName);
681
+ const tenantName = options?.tenantName || auth.tenantName;
682
+ const tenantSegment = explicitTenantOverride ? options?.tenantName : auth.tenantId ?? auth.tenantName;
686
683
  const segments = [
687
- status.baseUrl ? stripTrailingSlash(status.baseUrl) : undefined,
688
- status.organizationId ? encodeURIComponent(status.organizationId) : undefined
684
+ stripTrailingSlash(auth.baseUrl),
685
+ encodeURIComponent(auth.organizationId)
689
686
  ];
690
687
  if (tenantSegment) {
691
688
  segments.push(encodeURIComponent(tenantSegment));
692
689
  }
693
690
  segments.push(SERVICE_PATH[service]);
694
- const baseUrl = segments.filter(Boolean).join("/");
691
+ const baseUrl = segments.join("/");
695
692
  const baseHeaders = {
696
693
  Authorization: `Bearer ${bearerToken}`,
697
- Accept: "application/json"
694
+ Accept: "application/json",
695
+ "x-uipath-internal-accountid": auth.organizationId
698
696
  };
699
- if (status.organizationId) {
700
- baseHeaders["x-uipath-internal-accountid"] = status.organizationId;
701
- }
702
- if (!explicitTenantOverride && status.tenantId) {
703
- baseHeaders["x-uipath-internal-tenantid"] = status.tenantId;
697
+ if (!explicitTenantOverride && auth.tenantId) {
698
+ baseHeaders["x-uipath-internal-tenantid"] = auth.tenantId;
704
699
  }
705
700
  baseHeaders["x-uipath-requestingproduct"] = REQUESTING_PRODUCT;
706
701
  baseHeaders["X-UiPath-LLMGateway-AllowFull4xxResponse"] = "true";
@@ -749,8 +744,8 @@ async function createAiHttpContext(service, options) {
749
744
  };
750
745
  return {
751
746
  baseUrl,
752
- organizationId: status.organizationId,
753
- tenantId: explicitTenantOverride ? undefined : status.tenantId,
747
+ organizationId: auth.organizationId,
748
+ tenantId: explicitTenantOverride ? undefined : auth.tenantId,
754
749
  tenantName,
755
750
  requestingProduct: REQUESTING_PRODUCT,
756
751
  fetchJson,
@@ -960,7 +955,7 @@ var PROJECT_ID_INSTRUCTIONS = [
960
955
  " uip codedagent push"
961
956
  ].join(`
962
957
  `);
963
- var metadata = {
958
+ var metadata2 = {
964
959
  name: "codedagent-tool",
965
960
  version: package_default.version,
966
961
  description: "Build, run, deploy, and manage AI Agents.",
@@ -1016,7 +1011,7 @@ var registerWhitelistedCommand = (program, name, description) => {
1016
1011
  }
1017
1012
  });
1018
1013
  };
1019
- var registerCommands = async (program) => {
1014
+ var registerCommands2 = async (program) => {
1020
1015
  registerSetupCommand(program);
1021
1016
  registerReviewCommand(program);
1022
1017
  for (const { name, description } of WHITELISTED_COMMANDS) {
@@ -1025,6 +1020,6 @@ var registerCommands = async (program) => {
1025
1020
  program.showHelpAfterError(false);
1026
1021
  };
1027
1022
 
1028
- export { metadata, registerCommands };
1023
+ export { metadata2, registerCommands2 };
1029
1024
 
1030
- //# debugId=581FB5992FDB51B164756E2164756E21
1025
+ //# debugId=8D16E97FE7D46D8E64756E2164756E21