@uipath/delegate-cli 1.202.0 → 1.202.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +35 -11
  2. package/dist/cli.mjs +1 -1
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -38,11 +38,11 @@ delegate-cli [flags] - Read one prompt from stdin through EOF, the
38
38
  Piped stdin also implies one-turn mode
39
39
  Explicit `-` waits for EOF; the implicit form gives up after 2 s
40
40
  of silence so a missing prompt errors instead of hanging
41
- delegate-cli login [--env NAME] [--tenant NAME]
42
- OAuth browser login (--env required on FIRST login;
43
- afterwards defaults to the saved login's cloud;
44
- --tenant picks a tenant by name, otherwise a
45
- re-login keeps the saved tenant)
41
+ delegate-cli login [--env NAME | --url BASE] [--tenant NAME]
42
+ OAuth browser login (--env or --url required on FIRST
43
+ login; afterwards defaults to the saved login's
44
+ deployment; --tenant picks a tenant by name, otherwise
45
+ a re-login keeps the saved tenant)
46
46
  delegate-cli tenant [NAME] List the organization's tenants, or switch the saved
47
47
  login to NAME — no browser round-trip
48
48
  delegate-cli logout Remove the saved CLI login
@@ -89,14 +89,16 @@ Three levels of machine access, independent of conversation mode:
89
89
  | Flag | Default | What it does |
90
90
  |---|---|---|
91
91
  | `-p`, `--print` | automatic outside a terminal | Send one prompt, execute any tools, print the response and exit. Otherwise, when stdin and stdout are terminals, accept follow-up messages interactively. Explicit `-` input also selects one-turn mode. |
92
- | `--env <name>` | saved login's cloud | `alpha` / `staging` / `production` / `localhost`. Composes the backend URL from saved org/tenant slugs; localhost → `http://localhost:5002`. Omitted → the cloud you logged into (`delegate-cli login`). With no saved login and no `--backend` / `BACKEND_URL` either, commands error — the CLI never guesses an environment. |
92
+ | `--env <name>` | saved login's deployment | `alpha` / `staging` / `production` / `localhost`. Composes the backend URL from saved org/tenant slugs; localhost → `http://localhost:5002`. Omitted → the deployment you logged into (`delegate-cli login`). With no saved login and no `--backend` / `BACKEND_URL` either, commands error — the CLI never guesses an environment. For anything that is not a named cloud, use `--url`. |
93
+ | `--url <base>` | — | (`login` only; alias `--authority`) Base URL of a deployment that is not a named cloud — Automation Suite, Dedicated, Public Sector. A tenant path or a trailing `/identity_` is accepted and reduced to the origin. Mutually exclusive with `--env`; also settable via `UIPATH_BASE_URL`. Non-`https` URLs and URLs with embedded credentials are refused. See [Automation Suite](#automation-suite-and-other-self-hosted-deployments). |
94
+ | `--skip-env-check` | off | (`login` only) Skip the deployment checks that run before sign-in and after the token exchange. Escape hatch — it also gives up the diagnosis when something is genuinely wrong. |
93
95
  | `--backend <url>` | — | Full backend URL — overrides `--env` and `BACKEND_URL`. |
94
96
  | `--tenant <name>` | saved login's tenant, else the org's first | (`login` only) Tenant to sign into, matched by name case-insensitively. Without it a re-login keeps the tenant of the saved login on that cloud. An unknown name fails and lists the tenants that exist; on any other command the flag is refused — switch an existing login with `delegate-cli tenant <name>`. |
95
97
  | `--model <id>` | `gemini_3_6_flash` | LLM id (use `delegate-cli models` to discover). Also via `MODEL` env. |
96
98
  | `--headless` | off | Skip interop entirely. Text-only prompts: no screen **and** no file, Office, PDF or shell tools. Skills still load — they are read through Node, not interop. |
97
99
  | `--no-computer-use` | off | Keep interop, drop the screen. File, Office, PDF and shell tools keep working; screenshots, the window list, the focused element and the UI-automation tools (`AppFind`, `AppAct`, `AppGetDescriptor`) all go. Cuts the image tokens and the per-turn screen capture, keeps desktop window titles off the wire, and removes the agent's ability to act on the desktop UI. The right default for document and file work on a real machine. `--headless` implies it. |
98
100
  | `--keep-alive` | off | Reuse / leave interop running across invocations. Skips the 10–20 s cold start on the next call. |
99
- | `--cleanup` | — | Force-stop the running interop (from `~/.delegate-sdk/interop.pid`) and exit. |
101
+ | `--cleanup` | — | Force-stop every running interop (from `~/.delegate-sdk/interop*.pid`, one per deployment) and exit. |
100
102
  | `--no-connections` | off | Disable orchestrator ConnectionService (silences 404 noise on tenants without orchestrator). |
101
103
  | `--no-security` | off | Disable tool security wrapper. Debug only. |
102
104
  | `--preload-skill <name>` | — | Preload a skill into the session before the first model turn (repeatable; SDK `preloadSkills`). A name given twice is preloaded once. |
@@ -204,15 +206,15 @@ Flags/env present at `install` time are persisted into the OS entry.
204
206
 
205
207
  ## Authentication
206
208
 
207
- `delegate-cli login --env <env>` runs OAuth PKCE in your browser and saves to `~/.aria/sdk-auth.json`. The first login must name the environment; from then on that cloud is the default — `delegate-cli login` re-logs into it, and prompts/`models` target it unless `--env`/`--backend` say otherwise.
209
+ `delegate-cli login --env <env>` runs OAuth PKCE in your browser and saves to `~/.aria/sdk-auth.json`. The first login must name the deployment (`--env` for a UiPath cloud, `--url` for anything else); from then on that deployment is the default — `delegate-cli login` re-logs into it, and prompts/`models` target it unless `--env`/`--backend` say otherwise.
208
210
 
209
- The browser step only picks the organization (Identity asks when your account belongs to several). The tenant comes from the CLI: the organization's first tenant unless `--tenant <name>` names another, and a re-login on the same cloud keeps the saved tenant. The login output lists the organization's other tenants, and `delegate-cli whoami` shows the active one.
211
+ The browser step only picks the organization (Identity asks when your account belongs to several). The tenant comes from the CLI: the organization's first tenant unless `--tenant <name>` names another, and a re-login on the same deployment keeps the saved tenant. The login output lists the organization's other tenants, and `delegate-cli whoami` shows the active one.
210
212
 
211
213
  To change tenant afterwards, run `delegate-cli tenant <name>` — no browser: tokens are issued per organization, so the command only lists the organization's tenants, matches the name case-insensitively, and rewrites the tenant id and slug in `~/.aria/sdk-auth.json`. `delegate-cli tenant` alone lists the tenants and marks the current one. It works on the CLI's own login only: with `AUTH_TOKEN` env-var auth the tenant is `TENANT_ID`/`TENANT_SLUG`, and the Delegate desktop app's fallback file keeps the tenant chosen in the app.
212
214
 
213
- `delegate-cli whoami` shows the active identity (auth source, org/tenant, token expiry). It is strictly read-only: no backend call, and no token refresh either — so an expired token is reported as expired instead of being silently rotated behind an inspection command. The `Source:` line names the file the credential actually came from, which may be the Delegate desktop app's `~/.aria/auth.json` (the SDK's read-only fallback).
215
+ `delegate-cli whoami` shows the active identity (auth source, deployment kind, org/tenant, token expiry). It is strictly read-only: no backend call, and no token refresh either — so an expired token is reported as expired instead of being silently rotated behind an inspection command. The `Source:` line names the file the credential actually came from, which may be the Delegate desktop app's `~/.aria/auth.json` (the SDK's read-only fallback).
214
216
 
215
- `delegate-cli check` is the pre-flight a prompt would otherwise run implicitly, without sending one: it loads (and refreshes) auth and resolves the backend URL exactly like a prompt does, then prints three lines — `auth` (token not expired, and its organization and tenant match the backend URL), `backend` (one read-only `GET /v1/config` with the token), and `interop` (spawns the bundled interop, waits for `/health`, stops it again; `--headless` skips it). Any failed line makes the command exit 1, so a scheduler or a Robot job can gate on it. A saved login whose org/tenant slugs disagree with the backend URL — after a `--backend` override or a `tenant` switch — fails the `auth` line, and a prompt with the same combination is refused by the SDK before any request is sent.
217
+ `delegate-cli check` is the pre-flight a prompt would otherwise run implicitly, without sending one: it loads (and refreshes) auth and resolves the backend URL exactly like a prompt does, then prints three lines — `auth` (token not expired, and its organization and tenant match the backend URL), `backend` (one read-only `GET /v1/config` with the token; on Automation Suite the answer must also advertise `delegate` in `SUPPORTED_SHELL_APPS`, which pre-26.10 images omit), and `interop` (spawns the bundled interop with the saved login's deployment as its trusted OIDC issuer, waits for `/health`, stops it again; `--headless` skips it). Any failed line makes the command exit 1, so a scheduler or a Robot job can gate on it. A saved login whose org/tenant slugs disagree with the backend URL — after a `--backend` override or a `tenant` switch — fails the `auth` line, and a prompt with the same combination is refused by the SDK before any request is sent.
216
218
 
217
219
  `delegate-cli logout` deletes the saved CLI login and never the desktop app's file. When that fallback is what you are authenticating with, it says so rather than reporting nothing to remove — sign out in the Delegate app to clear it.
218
220
 
@@ -225,6 +227,28 @@ To authenticate as your own identity app (custom `UIPATH_CLIENT_ID` / `UIPATH_CL
225
227
  AUTH_TOKEN=... TENANT_ID=... ORG_ID=... npx delegate-cli --env production "..."
226
228
  ```
227
229
 
230
+ ### Automation Suite and other self-hosted deployments
231
+
232
+ Sign in by URL rather than by environment name:
233
+
234
+ ```bash
235
+ export NODE_EXTRA_CA_CERTS=/path/to/cluster-ca.pem # only for a private certificate authority
236
+
237
+ npx delegate-cli login --url https://automationsuite.contoso.com --tenant DefaultTenant
238
+ npx delegate-cli whoami # confirms the deployment, org and tenant
239
+ npx delegate-cli check # auth, backend capability and interop, end to end
240
+ ```
241
+
242
+ Three things differ from a cloud login:
243
+
244
+ - **Automation Suite 26.10 or later with the Delegate service** is required. Older deployments, and clusters without the service, are refused at login, with `--skip-env-check` as the override.
245
+ - **The deployment may reject the built-in client.** It is a registration on the UiPath clouds; when the token exchange fails with `invalid_client`, register an external application on the cluster with the redirect URIs `http://localhost:8055/oidc/login`, `http://localhost:42042/oidc/login` and `http://localhost:8104/oidc/login` and the `openid profile offline_access` scopes, then set `UIPATH_CLIENT_ID` (and `UIPATH_CLIENT_SECRET` for a confidential app).
246
+ - **A private certificate authority needs `NODE_EXTRA_CA_CERTS`.** Do not disable certificate verification — sign-in and token requests carry credentials. A TLS or DNS failure is reported with the remedy rather than as a bare socket error.
247
+
248
+ Before the browser opens, `login` checks that the URL really serves a UiPath Identity, and refuses it otherwise; after the token exchange it asks the deployment's Delegate service (`GET /v1/config`) whether it supports this SDK. `--skip-env-check` skips both. The `@uipath/delegate-sdk` README documents exactly what each check asks and why they run at different moments.
249
+
250
+ Computer use works on a self-hosted deployment too: the interop sidecar is started with the deployment as its trusted OIDC issuer, and a sidecar left running for another deployment is restarted rather than reused.
251
+
228
252
  ---
229
253
 
230
254
  ## Telemetry
package/dist/cli.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- const _0x17f3e3=_0x465d;(function(_0x29702e,_0x5697a1){const _0x1e50bc=_0x465d,_0x50cac7=_0x29702e();while(!![]){try{const _0x12d3c6=parseInt(_0x1e50bc(0x11e))/0x1*(-parseInt(_0x1e50bc(0xc1))/0x2)+parseInt(_0x1e50bc(0xe2))/0x3*(parseInt(_0x1e50bc(0x11a))/0x4)+parseInt(_0x1e50bc(0xad))/0x5+parseInt(_0x1e50bc(0xeb))/0x6+parseInt(_0x1e50bc(0x162))/0x7+-parseInt(_0x1e50bc(0x14f))/0x8+-parseInt(_0x1e50bc(0x101))/0x9*(parseInt(_0x1e50bc(0xb6))/0xa);if(_0x12d3c6===_0x5697a1)break;else _0x50cac7['push'](_0x50cac7['shift']());}catch(_0x30e2e8){_0x50cac7['push'](_0x50cac7['shift']());}}}(_0x1baa,0x6e7d1));function _0x465d(_0x2177bf,_0x485ef3){_0x2177bf=_0x2177bf-0xa3;const _0x1baa96=_0x1baa();let _0x465ded=_0x1baa96[_0x2177bf];return _0x465ded;}const __dirname=import.meta.dirname;import _0x22d01a from'fs';import _0x4bfb8a from'path';import{clearLine as _0x2a0eea,createInterface as _0x457b56,cursorTo as _0x4c1699}from'node:readline';import{BUSINESS_ANALYSIS_PRELOADED_SKILLS as _0x21aede,DelegateAgent as _0x1ff3e4,InteropProcess as _0x554517,getAuthFilePath as _0x16d119,isSafeProjectFolderSegment as _0x1760c5,listTenants as _0x58dc52,loadAndRefreshAuth as _0x17ace2,loadAndRefreshSdkLogin as _0x37966d,resolveBackendUrl as _0x32b031,runHealthCheck as _0x57c331,runHostCommand as _0x56c5fc,runLoginFlow as _0x364443,saveAuthData as _0x26310a,switchTenant as _0x32384e,ENV_TO_CLOUD as _0x153111}from'@uipath/delegate-sdk';var V=[_0x17f3e3(0x10e),_0x17f3e3(0x102),_0x17f3e3(0xd0),_0x17f3e3(0xfe),_0x17f3e3(0xbc),_0x17f3e3(0x132),_0x17f3e3(0xdb)],N=[_0x17f3e3(0x148),_0x17f3e3(0x170),_0x17f3e3(0xb5),'xhigh',_0x17f3e3(0xa7)],X=_0x21aede;function f(_0x9fac1e,_0x2d6f53,_0x469c75,_0x4d0f70){const _0xa29892=_0x17f3e3;let _0x2126f7=_0x9fac1e[_0x2d6f53];return(!_0x2126f7||_0x2126f7[_0xa29892(0x13e)]>0x1&&_0x2126f7[_0xa29892(0x12e)]('-'))&&(console[_0xa29892(0x164)](_0x469c75+_0xa29892(0x155)+_0x4d0f70+'.'),process[_0xa29892(0x15a)](0x2)),_0x2126f7;}function Q(_0x69cf7b){const _0x3d96e6=_0x17f3e3;let _0x46647d={'subcommand':'','prompt':'','print':!0x1,'keepAlive':!0x1,'cleanup':!0x1,'headless':!0x1,'noComputerUse':!0x1,'cartographer':!0x1,'noConnections':!0x1,'noSecurity':!0x1,'quiet':!0x1,'verbose':!0x1,'preloadSkills':[],'help':!0x1,'version':!0x1};V['includes'](_0x69cf7b[0x0])&&(_0x46647d[_0x3d96e6(0x107)]=_0x69cf7b[0x0],_0x69cf7b=_0x69cf7b[_0x3d96e6(0xc2)](0x1));let _0x30597d=[];for(let _0x27906e=0x0;_0x27906e<_0x69cf7b[_0x3d96e6(0x13e)];_0x27906e++){let _0x1ec0ad=_0x69cf7b[_0x27906e];switch(_0x1ec0ad){case _0x3d96e6(0x13b):case'-p':_0x46647d[_0x3d96e6(0x130)]=!0x0;break;case _0x3d96e6(0x178):_0x46647d[_0x3d96e6(0x141)]=!0x0;break;case _0x3d96e6(0xff):_0x46647d[_0x3d96e6(0xdf)]=!0x0;break;case'--headless':_0x46647d['headless']=!0x0;break;case _0x3d96e6(0x16a):_0x46647d[_0x3d96e6(0x113)]=!0x0;break;case _0x3d96e6(0x124):_0x46647d[_0x3d96e6(0xc4)]=!0x0,_0x46647d[_0x3d96e6(0x113)]=!0x0,_0x46647d[_0x3d96e6(0xa8)][_0x3d96e6(0xa3)](...X);break;case _0x3d96e6(0xf1):_0x46647d['noConnections']=!0x0;break;case _0x3d96e6(0x140):_0x46647d[_0x3d96e6(0x11b)]=!0x0;break;case _0x3d96e6(0x174):case'-q':_0x46647d[_0x3d96e6(0x147)]=!0x0;break;case _0x3d96e6(0x153):_0x46647d[_0x3d96e6(0x11f)]=!0x0;break;case _0x3d96e6(0xd8):_0x46647d[_0x3d96e6(0xab)]=_0x69cf7b[++_0x27906e];break;case _0x3d96e6(0xf9):_0x46647d['model']=_0x69cf7b[++_0x27906e];break;case _0x3d96e6(0x117):_0x46647d['runnerUrl']=_0x69cf7b[++_0x27906e];break;case'--interop':_0x46647d[_0x3d96e6(0xe7)]=_0x69cf7b[++_0x27906e];break;case _0x3d96e6(0xe6):_0x46647d[_0x3d96e6(0x11c)]=_0x69cf7b[++_0x27906e];break;case'--preload-skill':_0x46647d['preloadSkills'][_0x3d96e6(0xa3)](f(_0x69cf7b,++_0x27906e,_0x1ec0ad,'a\x20skill\x20name'));break;case _0x3d96e6(0xd5):{let _0x34b7fe=f(_0x69cf7b,++_0x27906e,_0x1ec0ad,_0x3d96e6(0x156));_0x1760c5(_0x34b7fe)||(console[_0x3d96e6(0x164)](_0x3d96e6(0x109)+_0x34b7fe+'\x22.\x20Use\x20a\x20single\x20folder-safe\x20segment\x20such\x20as\x20invoice-approval\x20(letters,\x20digits,\x20spaces,\x20\x22_\x22,\x20\x22-\x22,\x20\x22.\x22,\x20parentheses;\x20at\x20most\x2064\x20characters;\x20not\x20starting\x20with\x20\x22.\x22\x20or\x20ending\x20with\x20\x22.\x22\x20or\x20a\x20space).'),process[_0x3d96e6(0x15a)](0x2)),_0x46647d['projectId']=_0x34b7fe;break;}case _0x3d96e6(0x13f):_0x46647d[_0x3d96e6(0xa6)]=f(_0x69cf7b,++_0x27906e,_0x1ec0ad,_0x3d96e6(0xdc));break;case'--working-dir':_0x46647d[_0x3d96e6(0x129)]=_0x4bfb8a[_0x3d96e6(0x123)](process[_0x3d96e6(0x14c)](),f(_0x69cf7b,++_0x27906e,_0x1ec0ad,_0x3d96e6(0xd2)));break;case'--skills-path':_0x46647d[_0x3d96e6(0xba)]=_0x4bfb8a[_0x3d96e6(0x123)](process[_0x3d96e6(0x14c)](),f(_0x69cf7b,++_0x27906e,_0x1ec0ad,_0x3d96e6(0xd2)));break;case _0x3d96e6(0x10b):{let _0x5c6929=f(_0x69cf7b,++_0x27906e,_0x1ec0ad,'an\x20effort\x20tier');N[_0x3d96e6(0x16c)](_0x5c6929)||(console['error'](_0x3d96e6(0x16b)+_0x5c6929+'.\x20Use\x20'+N[_0x3d96e6(0xcb)](_0x3d96e6(0x14a))+'.'),process[_0x3d96e6(0x15a)](0x2)),_0x46647d[_0x3d96e6(0xf7)]=_0x5c6929;break;}case _0x3d96e6(0x14d):{let _0x468749=_0x69cf7b[++_0x27906e];(!_0x468749||_0x468749[_0x3d96e6(0x12e)]('--'))&&(console['error'](_0x3d96e6(0x171)),process[_0x3d96e6(0x15a)](0x2)),_0x46647d[_0x3d96e6(0x102)]=_0x468749;break;}case _0x3d96e6(0xfa):{let _0x43101a=_0x69cf7b[++_0x27906e];[_0x3d96e6(0x168),'staging',_0x3d96e6(0x151),_0x3d96e6(0xd4)][_0x3d96e6(0x16c)](_0x43101a)||(console[_0x3d96e6(0x164)]('Invalid\x20--env:\x20'+_0x43101a+'.\x20Use\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost.'),process['exit'](0x2)),_0x46647d[_0x3d96e6(0xe4)]=_0x43101a;break;}case'-h':case _0x3d96e6(0x15f):_0x46647d[_0x3d96e6(0xf2)]=!0x0;break;case'-v':case _0x3d96e6(0xac):_0x46647d[_0x3d96e6(0x131)]=!0x0;break;default:_0x1ec0ad[_0x3d96e6(0x12e)]('--')&&(console['error']('Unknown\x20flag:\x20'+_0x1ec0ad),process[_0x3d96e6(0x15a)](0x2)),_0x30597d[_0x3d96e6(0xa3)](_0x1ec0ad);}}return _0x46647d['tenant']!==void 0x0&&_0x46647d[_0x3d96e6(0x107)]!==_0x3d96e6(0x10e)&&(console[_0x3d96e6(0x164)](_0x3d96e6(0xf4)),process[_0x3d96e6(0x15a)](0x2)),_0x46647d[_0x3d96e6(0xa8)]=[...new Set(_0x46647d[_0x3d96e6(0xa8)])],_0x46647d[_0x3d96e6(0xb0)]=_0x30597d['join']('\x20'),_0x46647d;}function Z(){const _0x404adc=_0x17f3e3;let _0x37685a=_0x404adc(0x12b)[_0x404adc(0x115)]();console[_0x404adc(0xd9)](_0x37685a);}function _0x1baa(){const _0x13847c=['Bearer\x20','env','status','--worker-id','interopPath','end','sendMessage','Auth\x20comes\x20from\x20AUTH_TOKEN/TENANT_ID/ORG_ID\x20—\x20set\x20TENANT_ID\x20and\x20TENANT_SLUG\x20to\x20change\x20the\x20tenant.','1699950JAdmiT',';\x20the\x20saved\x20login\x20still\x20uses\x20','show','type','stdout','headless','--no-connections','help','entries','--tenant\x20applies\x20to\x20`delegate-cli\x20login`\x20only.\x20Switch\x20tenants\x20with:\x20delegate-cli\x20tenant\x20<name>','pause','You>\x20','effort','write','--model','--env','Switch\x20with:\x20delegate-cli\x20tenant\x20<name>\x0a','content','environment\x20variables\x20(AUTH_TOKEN/TENANT_ID/ORG_ID)','host','--cleanup','initialize','2466whCLFb','tenant','padEnd','Tenant:\x20','799f56b8-4aed-4a0f-8640-659dae4a9e0e','[env=','subcommand','\x20—\x20sign\x20out\x20in\x20the\x20Delegate\x20app\x20to\x20clear\x20that.','Invalid\x20--project:\x20\x22','Organization:\x20','--effort','checks','unknown','login','No\x20CLI\x20login\x20found\x20—\x20nothing\x20to\x20remove.','exitCode','tenantName','description','noComputerUse','\x20(resume\x20with\x20--session\x20','trim','name','--runner-url','restore','statusText','4mNTDvW','noSecurity','workerId','getSessionId','1168godnme','verbose','test','package.json','):\x0a\x0a','resolve','--cartographer','\x0aAvailable\x20models\x20(','response','stop','stderr','workingDirectory','json','\x0adelegate-cli\x20—\x20Delegate\x20agent\x20CLI\x0a\x0aUsage:\x0a\x20\x20delegate-cli\x20[flags]\x20[\x22<prompt>\x22]\x20\x20\x20\x20Start\x20a\x20conversation\x20in\x20a\x20terminal\x0a\x20\x20delegate-cli\x20--print\x20\x22<prompt>\x22\x20\x20\x20\x20\x20\x20Send\x20one\x20prompt,\x20print\x20the\x20response,\x20and\x20exit\x0a\x20\x20delegate-cli\x20[flags]\x20-\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Read\x20one\x20prompt\x20from\x20stdin\x20through\x20EOF,\x20then\x20exit\x0a\x20\x20delegate-cli\x20login\x20[--env\x20NAME]\x20[--tenant\x20NAME]\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20OAuth\x20browser\x20login\x20→\x20~/.aria/sdk-auth.json.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20required\x20on\x20FIRST\x20login;\x20afterwards\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20defaults\x20to\x20the\x20saved\x20login\x27s\x20cloud.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--tenant\x20picks\x20a\x20tenant\x20by\x20name;\x20without\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20it\x20a\x20re-login\x20keeps\x20the\x20saved\x20tenant\x0a\x20\x20delegate-cli\x20tenant\x20[NAME]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20the\x20organization\x27s\x20tenants,\x20or\x20switch\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20saved\x20login\x20to\x20NAME\x20(no\x20browser)\x0a\x20\x20delegate-cli\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Remove\x20the\x20saved\x20CLI\x20login\x0a\x20\x20delegate-cli\x20whoami\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20the\x20current\x20login\x20(org,\x20tenant,\x20token\x20expiry)\x0a\x20\x20delegate-cli\x20models\x20[--env\x20NAME]\x20\x20\x20\x20\x20List\x20available\x20LLM\x20models\x20for\x20the\x20current\x20tenant\x0a\x20\x20delegate-cli\x20check\x20[--env\x20NAME]\x20[--headless]\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Verify\x20auth,\x20backend\x20and\x20interop\x20without\x20sending\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20a\x20prompt;\x20exits\x201\x20when\x20any\x20check\x20fails\x0a\x20\x20delegate-cli\x20host\x20[flags]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20this\x20PC\x20as\x20a\x20remote\x20worker\x20until\x20Ctrl+C\x0a\x20\x20delegate-cli\x20host\x20install\x20[flags]\x20\x20\x20\x20Auto-start\x20the\x20host\x20at\x20login\x20(macOS\x20LaunchAgent\x20/\x20Windows\x20Scheduled\x20Task)\x0a\x20\x20delegate-cli\x20host\x20uninstall\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Remove\x20auto-start\x0a\x20\x20delegate-cli\x20host\x20status\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20auto-start\x20state\x0a\x20\x20delegate-cli\x20--cleanup\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Stop\x20running\x20interop\x0a\x0aFlags:\x0a\x20\x20-p,\x20--print\x20\x20\x20\x20\x20\x20\x20Run\x20one\x20turn\x20and\x20exit,\x20including\x20any\x20tool\x20execution.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Automatic\x20when\x20stdin\x20or\x20stdout\x20is\x20not\x20a\x20terminal,\x20or\x20with\x20-\x0a\x20\x20--env\x20NAME\x20\x20\x20\x20\x20\x20\x20\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Composes\x20backend\x20URL\x20from\x20saved\x20auth\x20(org/tenant\x20slugs).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Omitted\x20→\x20the\x20cloud\x20you\x20logged\x20into\x20(delegate-cli\x20login).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20localhost\x20→\x20http://localhost:5002.\x20No\x20saved\x20login\x20and\x20no\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env/--backend/BACKEND_URL\x20is\x20an\x20error\x20—\x20never\x20a\x20guess.\x0a\x20\x20--backend\x20URL\x20\x20\x20\x20\x20Full\x20backend\x20URL\x20—\x20escape\x20hatch\x20overrides\x20--env\x0a\x20\x20--tenant\x20NAME\x20\x20\x20\x20\x20(login)\x20Tenant\x20to\x20sign\x20into,\x20by\x20name\x20(case-insensitive).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20the\x20saved\x20login\x27s\x20tenant\x20on\x20that\x20cloud,\x20else\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20org\x27s\x20first\x20tenant.\x20Later:\x20delegate-cli\x20tenant\x20<name>\x0a\x20\x20--model\x20NAME\x20\x20\x20\x20\x20\x20LLM\x20model\x20id\x20(e.g.\x20claude_sonnet_5,\x20kimi_k3).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20gemini_3_6_flash.\x20Also\x20settable\x20via\x20MODEL\x20env\x20var.\x0a\x20\x20--keep-alive\x20\x20\x20\x20\x20\x20Reuse/leave\x20interop\x20running\x20across\x20invocations\x0a\x20\x20--headless\x20\x20\x20\x20\x20\x20\x20\x20Skip\x20interop\x20(text-only\x20prompts)\x0a\x20\x20--no-computer-use\x20Keep\x20interop\x20—\x20file,\x20Office,\x20PDF\x20and\x20shell\x20tools\x20keep\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20working\x20—\x20but\x20drop\x20the\x20screen:\x20no\x20screenshots,\x20no\x20window\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20list,\x20no\x20UI-automation\x20tools.\x20Cuts\x20image\x20tokens\x20and\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20per-turn\x20screen\x20capture,\x20and\x20stops\x20desktop\x20window\x20titles\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20leaving\x20the\x20machine.\x20Use\x20for\x20document\x20and\x20file\x20work.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--headless\x20implies\x20this\x20and\x20turns\x20interop\x20off\x20as\x20well\x0a\x20\x20--no-connections\x20\x20Disable\x20orchestrator\x20ConnectionService\x20(silences\x20404\x20warnings)\x0a\x20\x20--no-security\x20\x20\x20\x20\x20Disable\x20tool\x20security\x20wrapper\x20(use\x20only\x20for\x20debugging)\x0a\x20\x20--preload-skill\x20NAME\x20\x20Preload\x20a\x20skill\x20into\x20the\x20session\x20(repeatable).\x20The\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20skill\x27s\x20content\x20is\x20attached\x20before\x20the\x20first\x20model\x20turn\x20—\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20same\x20mechanism\x20as\x20project\x20preloaded\x20skills\x20in\x20the\x20app\x0a\x20\x20--cartographer\x20\x20\x20\x20Cartographer\x20engagement\x20preset.\x20Equivalent\x20to\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--no-computer-use\x20--preload-skill\x20business-analysis\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--preload-skill\x20project-checklist\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--preload-skill\x20knowledge-base.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Add\x20--project/--working-dir\x20for\x20where\x20the\x20files\x20live,\x20and\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20extra\x20--preload-skill\x20flags\x20for\x20more\x20skills\x20—\x20a\x20skill\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20preset\x20already\x20covers\x20is\x20not\x20preloaded\x20twice.\x20An\x20explicit\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--headless\x20still\x20wins\x20and\x20turns\x20interop\x20off\x0a\x20\x20--project\x20ID\x20\x20\x20\x20\x20\x20Route\x20the\x20session\x27s\x20local\x20wiki\x20and\x20plans\x20to\x20a\x20project\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(<working-dir>/projects/<ID>/wiki).\x20Client-side\x20key\x20only\x0a\x20\x20--working-dir\x20PATH\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Shell\x20cwd\x20for\x20the\x20agent\x20and\x20root\x20for\x20SDK-local\x20state.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Relative\x20paths\x20resolve\x20against\x20the\x20current\x20directory;\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20directory\x20is\x20created\x20if\x20missing\x0a\x20\x20--skills-path\x20PATH\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Extra\x20bundled-skills\x20directory\x20(merged\x20with\x20the\x20installed\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20app\x27s\x20skills\x20and\x20DELEGATE_BUNDLED_SKILLS_PATH)\x0a\x20\x20--effort\x20TIER\x20\x20\x20\x20\x20Reasoning\x20effort:\x20low\x20|\x20medium\x20|\x20high\x20|\x20xhigh\x20|\x20max.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20the\x20model\x27s\x20recommended\x20tier\x0a\x20\x20--session\x20ID\x20\x20\x20\x20\x20\x20Pin\x20the\x20session\x20id\x20(must\x20exist\x20on\x20the\x20backend,\x20or\x20be\x20one\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20first\x20message\x20creates)\x0a\x20\x20--runner-url\x20URL\x20\x20(host)\x20Runner\x20worker\x20WS\x20URL.\x20Required;\x20or\x20CONTROL_PLANE_WS_URL\x20env\x0a\x20\x20--interop\x20PATH\x20\x20\x20\x20(host)\x20Interop\x20binary\x20path;\x20or\x20INTEROP_EXECUTABLE_PATH\x20env.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Absent\x20→\x20registration/discovery\x20only,\x20tool\x20execution\x20disabled\x0a\x20\x20--worker-id\x20ID\x20\x20\x20\x20(host)\x20Stable\x20worker\x20identity;\x20or\x20WORKER_ID\x20env.\x20Default:\x20hostname\x0a\x20\x20-q,\x20--quiet\x20\x20\x20\x20\x20\x20\x20Suppress\x20🤔\x20thinking\x20output\x20to\x20stderr\x0a\x20\x20--verbose\x20\x20\x20\x20\x20\x20\x20\x20\x20Surface\x20the\x20SDK\x27s\x20and\x20the\x20framework\x27s\x20own\x20logs.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Diagnostics\x20only,\x20on\x20stdout;\x20independent\x20of\x20-q\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Print\x20the\x20installed\x20CLI\x20version\x0a\x0aConversation:\x20Enter\x20sends\x20a\x20message;\x20/exit\x20or\x20EOF\x20exits;\x20Ctrl+C\x20stops\x20and\x20exits.\x0a\x20\x20An\x20optional\x20initial\x20prompt\x20is\x20followed\x20by\x20more\x20input.\x20The\x20session\x20ID\x20is\x20printed\x0a\x20\x20to\x20stderr;\x20resume\x20later\x20with\x20--session\x20ID.\x20Redirected\x20input\x20is\x20one\x20prompt.\x0aAuth:\x20prompts\x20auto-retry\x20on\x20401\x20by\x20opening\x20the\x20browser\x20to\x20re-login\x20(TTY\x20only),\x0a\x20\x20preserving\x20the\x20active\x20session.\x0a','/v1/config','once','startsWith','orgLogicalName','print','version','whoami','tool_call','X-Uipath-Tenantid','bind','message','tenantId','stack','🔧\x20','.aria','--print','spawn','Session:\x20','length','--session','--no-security','keepAlive','\x0aUse\x20with:\x20delegate-cli\x20--model\x20<id>\x20\x22<prompt>\x22\x0a','from','Removed\x20','accessToken','auth.json','quiet','low','close','\x20|\x20','toISOString','cwd','--tenant','toolName','1602928tHhAxP','asyncIterator','production','readFileSync','--verbose','Tenant:\x20\x20\x20\x20\x20\x20\x20','\x20requires\x20','a\x20project\x20id','organizationId','--env\x20localhost\x20has\x20no\x20OAuth\x20flow;\x20pick\x20alpha,\x20staging,\x20or\x20production.','The\x20saved\x20CLI\x20login\x20could\x20not\x20be\x20refreshed.\x20Run\x20`delegate-cli\x20login`\x20again.','exit','\x0a⚠️\x20\x20Auth\x20expired.\x20Opening\x20browser\x20to\x20re-login…\x0a','off','thinking','\x0aStopping…\x20(Ctrl+C\x20again\x20to\x20force\x20exit)\x0a','--help','stdin','file','1777979EYXCBV','rmSync','error','noConnections','existsSync','round','alpha','\x20(Delegate\x20desktop\x20app\x20fallback)','--no-computer-use','Invalid\x20--effort:\x20','includes',']\x20Backend\x20URL:\x20',',\x20whose\x20tenant\x20is\x20chosen\x20in\x20the\x20app.\x20Run\x20`delegate-cli\x20login\x20--env\x20<env>`\x20for\x20a\x20CLI\x20login\x20of\x20your\x20own.','projectId','medium','--tenant\x20requires\x20a\x20tenant\x20name.','then','No\x20CLI\x20login\x20to\x20switch:\x20the\x20CLI\x20is\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','--quiet','data','destroy','utf-8','--keep-alive','push','floor','\x20(current)','sessionId','max','preloadSkills','lastType','/exit','backendUrl','--version','3533340tAjzzH','Interop\x20stopped\x20(if\x20it\x20was\x20running).','No\x20auth\x20found.\x20Set\x20AUTH_TOKEN/TENANT_ID/ORG_ID\x20env\x20vars,\x20or\x20run\x20`delegate-cli\x20login\x20--env\x20<alpha|staging|production>`\x20(interactive\x20browser\x20OAuth)\x20first.','prompt','Source:\x20\x20\x20\x20\x20\x20\x20','Missing\x20prompt.\x20Pass\x20it\x20as\x20an\x20argument,\x20pipe\x20it\x20via\x20stdin,\x20or\x20run\x20`delegate-cli\x20--help`.','model','catch','high','23300QoZdHL','SIGINT','No\x20models\x20available\x20for\x20this\x20product/tenant.\x0a','now','bundledSkillsPath','isArray','logout','GET\x20','unknown\x20slug','\x20→\x20','baseUrl','1154KBduIe','slice','[saved\x20login]\x20Backend\x20URL:\x20','cartographer','parse','No\x20CLI\x20login\x20found.\x20Run\x20`delegate-cli\x20login\x20--env\x20<alpha|staging|production>`\x20first.','Token:\x20\x20\x20\x20\x20\x20\x20\x20expired\x20','tool','map','First\x20login\x20requires\x20--env.\x20Usage:\x20delegate-cli\x20login\x20--env\x20<alpha|staging|production>','join','hide','auth',')\x20—\x20saved\x20to\x20','isTTY','models','X-Uipath-Organizationid','a\x20directory\x20path','isDesktopFallback','localhost','--project','Enter\x20sends\x20a\x20message.\x20/exit\x20or\x20EOF\x20exits;\x20Ctrl+C\x20stops\x20and\x20exits.\x0a','Base\x20URL:\x20\x20\x20\x20\x20','--backend','log','No\x20CLI\x20login\x20found.\x20Note:\x20the\x20CLI\x20is\x20currently\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','check','a\x20session\x20id','\x0a🤔\x20','expiresAt','cleanup','onEvent','\x20(in\x20','2163879digOdx'];_0x1baa=function(){return _0x13847c;};return _0x1baa();}function ee(){const _0x28683b=_0x17f3e3;try{return JSON[_0x28683b(0xc5)](_0x22d01a[_0x28683b(0x152)](_0x4bfb8a[_0x28683b(0xcb)](__dirname,'..',_0x28683b(0x121)),_0x28683b(0x177)))[_0x28683b(0x131)]||_0x28683b(0x10d);}catch{return _0x28683b(0x10d);}}var te=0x7d0;async function L(_0x2c156f,_0x576752){const _0x523b25=_0x17f3e3;let _0x332f74=_0x576752?[_0x576752]:[];for await(let _0x1849a5 of _0x2c156f)_0x332f74[_0x523b25(0xa3)](Buffer[_0x523b25(0x143)](_0x1849a5));return Buffer['concat'](_0x332f74)['toString'](_0x523b25(0x177))[_0x523b25(0x115)]();}function ne(_0x6c8ecf,_0x10cb6e){return new Promise(_0x5d6362=>{const _0xab46c3=_0x465d;let _0x5aa2a1=_0x4e393a=>{const _0x11c62f=_0x465d;clearTimeout(_0x12b12f),_0x6c8ecf['off'](_0x11c62f(0x175),_0x46c7af),_0x6c8ecf[_0x11c62f(0x15c)]('end',_0x50b4bc),_0x6c8ecf['off'](_0x11c62f(0x164),_0x50b4bc),_0x6c8ecf[_0x11c62f(0xf5)](),_0x5d6362(_0x4e393a);},_0x46c7af=_0x471372=>_0x5aa2a1(Buffer['from'](_0x471372)),_0x50b4bc=()=>_0x5aa2a1(null),_0x12b12f=setTimeout(()=>_0x5aa2a1(null),_0x10cb6e);_0x6c8ecf['on'](_0xab46c3(0x175),_0x46c7af),_0x6c8ecf['on'](_0xab46c3(0xe8),_0x50b4bc),_0x6c8ecf['on'](_0xab46c3(0x164),_0x50b4bc),_0x6c8ecf['resume']();});}async function oe(_0x1d3c12,_0x3e2da8,_0x1a1ec8=te){const _0x175dcc=_0x17f3e3;let _0x1cee63=_0x1d3c12==='-';if(!_0x1cee63&&_0x1d3c12)return _0x1d3c12;if(!_0x1cee63&&_0x3e2da8[_0x175dcc(0xcf)])return'';if(_0x1cee63)return L(_0x3e2da8,null);let _0x6bf114=await ne(_0x3e2da8,_0x1a1ec8);return _0x6bf114?L(_0x3e2da8,_0x6bf114):'';}function S(){const _0x17ff81=_0x17f3e3;return _0x4bfb8a[_0x17ff81(0xcb)](process.env.HOME||process.env.USERPROFILE||'',_0x17ff81(0x13a),_0x17ff81(0x146));}function k(_0x381b35){const _0x2e1b75=_0x17f3e3;try{let _0xbc51bf=JSON[_0x2e1b75(0xc5)](_0x22d01a[_0x2e1b75(0x152)](_0x381b35,_0x2e1b75(0x177)));return!_0xbc51bf[_0x2e1b75(0x145)]||!_0xbc51bf[_0x2e1b75(0x137)]||!_0xbc51bf[_0x2e1b75(0x157)]?null:_0xbc51bf;}catch{return null;}}function se(){const _0x4f3460=_0x17f3e3;let _0x38085c=[{'file':_0x16d119(),'isDesktopFallback':!0x1},{'file':S(),'isDesktopFallback':!0x0}];for(let _0x2bda9b of _0x38085c){let _0x276156=k(_0x2bda9b[_0x4f3460(0x161)]);if(_0x276156)return{..._0x2bda9b,'auth':_0x276156};}return null;}async function re(){const _0x1277d1=_0x17f3e3;let _0x2311d0=_0x16d119();if(!_0x22d01a[_0x1277d1(0x166)](_0x2311d0)){let _0x246e2d=S();console['log'](k(_0x246e2d)?_0x1277d1(0xda)+_0x246e2d+_0x1277d1(0x108):_0x1277d1(0x10f));return;}_0x22d01a[_0x1277d1(0x163)](_0x2311d0),console[_0x1277d1(0xd9)](_0x1277d1(0x144)+_0x2311d0);}async function ie(){const _0x52f96b=_0x17f3e3;let _0x4342c1=y(),_0x44b0c2,_0x1f7ea0;if(_0x4342c1)_0x44b0c2=_0x4342c1,_0x1f7ea0=_0x52f96b(0xfd);else{let _0x3832aa=se();if(!_0x3832aa)throw new Error(C);_0x44b0c2=_0x3832aa[_0x52f96b(0xcd)],_0x1f7ea0=_0x3832aa[_0x52f96b(0xd3)]?_0x3832aa[_0x52f96b(0x161)]+_0x52f96b(0x169):_0x3832aa['file'];}let _0x147976=[_0x52f96b(0xb1)+_0x1f7ea0,_0x52f96b(0xd7)+(_0x44b0c2[_0x52f96b(0xc0)]??_0x52f96b(0x10d)),_0x52f96b(0x10a)+(_0x44b0c2[_0x52f96b(0x12f)]??_0x52f96b(0xbe))+'\x20('+_0x44b0c2[_0x52f96b(0x157)]+')',_0x52f96b(0x154)+(_0x44b0c2[_0x52f96b(0x111)]??_0x52f96b(0xbe))+'\x20('+_0x44b0c2[_0x52f96b(0x137)]+')'];if(_0x44b0c2[_0x52f96b(0xde)]){let _0x5dcea8=_0x44b0c2[_0x52f96b(0xde)]-Math[_0x52f96b(0xa4)](Date[_0x52f96b(0xb9)]()/0x3e8),_0x888faa=new Date(_0x44b0c2[_0x52f96b(0xde)]*0x3e8)[_0x52f96b(0x14b)]();_0x147976[_0x52f96b(0xa3)](_0x5dcea8>0x0?'Token:\x20\x20\x20\x20\x20\x20\x20\x20expires\x20'+_0x888faa+_0x52f96b(0xe1)+Math[_0x52f96b(0x167)](_0x5dcea8/0x3c)+'\x20min)':_0x52f96b(0xc7)+_0x888faa);}process[_0x52f96b(0xef)]['write'](_0x147976[_0x52f96b(0xcb)]('\x0a')+'\x0a');}var C=_0x17f3e3(0xaf);function y(){return process.env.AUTH_TOKEN&&process.env.TENANT_ID&&process.env.ORG_ID?{'accessToken':process.env.AUTH_TOKEN,'tenantId':process.env.TENANT_ID,'organizationId':process.env.ORG_ID,'orgLogicalName':process.env.ORG_SLUG,'tenantName':process.env.TENANT_SLUG,'baseUrl':process.env.UIPATH_BASE_URL}:null;}async function A(){let _0x1c3154=y();if(_0x1c3154)return _0x1c3154;let _0x202d54=await _0x17ace2();if(_0x202d54)return _0x202d54;throw new Error(C);}async function ae(){const _0x1c5ee2=_0x17f3e3;await new _0x554517()[_0x1c5ee2(0x127)]({'force':!0x0}),console[_0x1c5ee2(0xd9)](_0x1c5ee2(0xae));}var le=_0x17f3e3(0x105);function I(_0x14aa3c,_0x1731be,_0x611353){const _0x20667c=_0x17f3e3;_0x14aa3c?process[_0x20667c(0x128)][_0x20667c(0xf8)](_0x20667c(0x106)+_0x14aa3c+_0x20667c(0x16d)+_0x611353+'\x0a'):!_0x1731be&&!process.env.BACKEND_URL&&process[_0x20667c(0x128)]['write'](_0x20667c(0xc3)+_0x611353+'\x0a');}async function ce(_0x3c9397){const _0x483710=_0x17f3e3;let _0x2376fe=await A(),_0x540a99=_0x32b031(_0x3c9397[_0x483710(0xe4)],_0x2376fe,_0x3c9397['backendUrl']);I(_0x3c9397[_0x483710(0xe4)],_0x3c9397[_0x483710(0xab)],_0x540a99);let _0x356b6f=_0x540a99+_0x483710(0x12c),_0x1b354f={'Authorization':_0x483710(0xe3)+_0x2376fe[_0x483710(0x145)],'X-UiPath-ConsumingProductId':le};_0x2376fe[_0x483710(0x137)]&&(_0x1b354f[_0x483710(0x134)]=_0x2376fe[_0x483710(0x137)]),_0x2376fe[_0x483710(0x157)]&&(_0x1b354f[_0x483710(0xd1)]=_0x2376fe[_0x483710(0x157)]);let _0x4a0e4e=await fetch(_0x356b6f,{'headers':_0x1b354f});if(!_0x4a0e4e['ok'])throw new Error(_0x483710(0xbd)+_0x356b6f+_0x483710(0xbf)+_0x4a0e4e[_0x483710(0xe5)]+'\x20'+_0x4a0e4e[_0x483710(0x119)]);let _0x35cc42=(await _0x4a0e4e[_0x483710(0x12a)]())?.['MODELS'],_0x5afba5=Array[_0x483710(0xbb)](_0x35cc42)?_0x35cc42:_0x35cc42&&typeof _0x35cc42=='object'?Object[_0x483710(0xf3)](_0x35cc42)[_0x483710(0xc9)](([_0x1dfd8f,_0x4412a3])=>({'id':_0x1dfd8f,'name':_0x4412a3})):[];if(_0x5afba5[_0x483710(0x13e)]===0x0){process[_0x483710(0x128)]['write'](_0x483710(0xb8));return;}process[_0x483710(0xef)][_0x483710(0xf8)](_0x483710(0x125)+_0x5afba5[_0x483710(0x13e)]+_0x483710(0x122));for(let _0x15aa21 of _0x5afba5){let _0x138522=_0x15aa21[_0x483710(0x116)]&&_0x15aa21[_0x483710(0x116)]!==_0x15aa21['id']?'\x20('+_0x15aa21[_0x483710(0x116)]+')':'';process['stdout'][_0x483710(0xf8)]('\x20\x20'+_0x15aa21['id']+_0x138522+'\x0a'),_0x15aa21['description']&&process[_0x483710(0xef)][_0x483710(0xf8)]('\x20\x20\x20\x20'+_0x15aa21[_0x483710(0x112)]+'\x0a');}process[_0x483710(0xef)]['write'](_0x483710(0x142));}async function de(_0x10b0cb){const _0x42c09f=_0x17f3e3;let _0x38b4bf=await A(),_0x23d977=_0x32b031(_0x10b0cb['env'],_0x38b4bf,_0x10b0cb['backendUrl']);I(_0x10b0cb[_0x42c09f(0xe4)],_0x10b0cb[_0x42c09f(0xab)],_0x23d977);let _0x57d1ce=await _0x57c331({'auth':_0x38b4bf,'backendUrl':_0x23d977,'interop':_0x10b0cb[_0x42c09f(0xf0)]?'skip':_0x42c09f(0x13c)});for(let _0x3d85fb of _0x57d1ce[_0x42c09f(0x10c)])process['stdout']['write'](ue(_0x3d85fb)+'\x0a');_0x57d1ce['ok']||process['exit'](0x1);}function ue(_0x4e288a){const _0xe03dc6=_0x17f3e3;return{'ok':'✓','failed':'✗','skipped':'-'}[_0x4e288a[_0xe03dc6(0xe5)]]+'\x20'+_0x4e288a['name'][_0xe03dc6(0x103)](0x8)+_0x4e288a['detail'];}async function pe(_0x5dadda){const _0x40be42=_0x17f3e3;_0x5dadda[_0x40be42(0xe4)]===_0x40be42(0xd4)&&(console[_0x40be42(0x164)](_0x40be42(0x158)),process[_0x40be42(0x15a)](0x2));let _0x2a6472=k(_0x16d119());if(_0x5dadda[_0x40be42(0xe4)]){let _0x15c0c6=_0x5dadda['env'];await _0x364443({'env':_0x15c0c6,'tenant':_0x5dadda[_0x40be42(0x102)]??P(_0x2a6472,_0x153111[_0x15c0c6])});return;}if(_0x2a6472?.[_0x40be42(0xc0)]){await _0x364443({'baseUrl':_0x2a6472[_0x40be42(0xc0)],'tenant':_0x5dadda[_0x40be42(0x102)]??_0x2a6472[_0x40be42(0x111)]});return;}console[_0x40be42(0x164)](_0x40be42(0xca)),process[_0x40be42(0x15a)](0x2);}function P(_0x1f0cf9,_0x4a3049){const _0x2d68de=_0x17f3e3;return _0x1f0cf9?.[_0x2d68de(0xc0)]&&fe(_0x1f0cf9[_0x2d68de(0xc0)],_0x4a3049)?_0x1f0cf9['tenantName']:void 0x0;}function fe(_0x430b40,_0xbb92b4){try{return new URL(_0x430b40)['origin']===new URL(_0xbb92b4)['origin'];}catch{return!0x1;}}async function he(_0x2b8c45){const _0x210b98=_0x17f3e3;y()&&(console[_0x210b98(0x164)](_0x210b98(0xea)),process[_0x210b98(0x15a)](0x2));let _0xd7680a=await _0x37966d();if(_0xd7680a||(console['error'](ge()),process[_0x210b98(0x15a)](0x2)),_0x2b8c45[_0x210b98(0x115)]()){let _0x216988=await _0x32384e(_0xd7680a,_0x2b8c45);_0x26310a(_0x216988)||(console['error']('Tenant\x20not\x20switched:\x20could\x20not\x20write\x20'+_0x16d119()+_0x210b98(0xec)+_0xd7680a[_0x210b98(0x111)]+'.'),process[_0x210b98(0x15a)](0x1)),console['log'](_0x210b98(0x104)+_0x216988[_0x210b98(0x111)]+'\x20('+_0x216988[_0x210b98(0x137)]+_0x210b98(0xce)+_0x16d119());return;}me(await _0x58dc52(_0xd7680a),_0xd7680a);}function ge(){const _0x4ed19e=_0x17f3e3;if(_0x22d01a[_0x4ed19e(0x166)](_0x16d119()))return _0x4ed19e(0x159);let _0x353848=S();return k(_0x353848)?_0x4ed19e(0x173)+_0x353848+_0x4ed19e(0x16e):_0x4ed19e(0xc6);}function me(_0x23970d,_0x52604c){const _0x3bda89=_0x17f3e3;let _0x66d8f2=_0x23970d[_0x3bda89(0xc9)](_0x2b89ef=>_0x2b89ef['id']===_0x52604c[_0x3bda89(0x137)]?'*\x20'+_0x2b89ef[_0x3bda89(0x116)]+_0x3bda89(0xa5):'\x20\x20'+_0x2b89ef[_0x3bda89(0x116)]);process[_0x3bda89(0xef)]['write']('Tenants\x20of\x20'+(_0x52604c['orgLogicalName']??_0x52604c['organizationId'])+':\x0a'+_0x66d8f2[_0x3bda89(0xcb)]('\x0a')+'\x0a'),_0x23970d[_0x3bda89(0x13e)]>0x1&&process['stdout']['write'](_0x3bda89(0xfb));}function ke(_0x3e7cc4){const _0x254835=_0x17f3e3;return _0x3e7cc4?.[_0x254835(0x126)]?.[_0x254835(0xe5)]===0x191||/401/[_0x254835(0x120)](String(_0x3e7cc4?.[_0x254835(0x136)]??''));}var l={'lastType':null,'quiet':!0x1},_=_0xa233c4=>{const _0x3d083b=_0x17f3e3;switch(_0xa233c4[_0x3d083b(0xee)]){case'session_start':_0xa233c4['sessionId']&&_0xa233c4[_0x3d083b(0xa6)]!==l['sessionId']&&(process[_0x3d083b(0x128)][_0x3d083b(0xf8)](_0x3d083b(0x13d)+_0xa233c4[_0x3d083b(0xa6)]+_0x3d083b(0x114)+_0xa233c4[_0x3d083b(0xa6)]+')\x0a'),l[_0x3d083b(0xa6)]=_0xa233c4[_0x3d083b(0xa6)]);break;case'thinking':_0xa233c4[_0x3d083b(0xfc)]&&!l[_0x3d083b(0x147)]&&(l['lastType']!=='thinking'&&process['stderr'][_0x3d083b(0xf8)](_0x3d083b(0xdd)),process[_0x3d083b(0x128)][_0x3d083b(0xf8)](_0xa233c4[_0x3d083b(0xfc)]),l[_0x3d083b(0xa9)]=_0x3d083b(0x15d));break;case _0x3d083b(0x133):l[_0x3d083b(0xa9)]!==null&&process[_0x3d083b(0x128)][_0x3d083b(0xf8)]('\x0a'),process[_0x3d083b(0x128)][_0x3d083b(0xf8)](_0x3d083b(0x139)+(_0xa233c4[_0x3d083b(0x14e)]??_0x3d083b(0xc8))+'\x0a'),l[_0x3d083b(0xa9)]='tool_call';break;case _0x3d083b(0x136):_0xa233c4['content']&&(l[_0x3d083b(0xa9)]!==_0x3d083b(0x136)&&l['lastType']!==null&&process[_0x3d083b(0xef)][_0x3d083b(0xf8)]('\x0a'),process[_0x3d083b(0xef)][_0x3d083b(0xf8)](_0xa233c4[_0x3d083b(0xfc)]),l[_0x3d083b(0xa9)]=_0x3d083b(0x136));break;case _0x3d083b(0x164):l['lastType']!==null&&process['stderr'][_0x3d083b(0xf8)]('\x0a'),process['stderr'][_0x3d083b(0xf8)]('✗\x20'+(_0xa233c4['error']??_0x3d083b(0x164))+'\x0a'),l[_0x3d083b(0xa9)]='error';break;case'done':(l[_0x3d083b(0xa9)]==='message'||l[_0x3d083b(0xa9)]===_0x3d083b(0x15d))&&process[_0x3d083b(0xef)][_0x3d083b(0xf8)]('\x0a'),process['stderr']['write']('✓\x20Done\x0a'),l[_0x3d083b(0xa9)]='done';break;}};function R(_0x36488b,_0x3f068a,_0x2548f2){const _0x4a80b2=_0x17f3e3;let _0xa2e6a6=_0x36488b[_0x4a80b2(0xb3)]||process.env.MODEL;return{'backendUrl':_0x2548f2,'auth':_0x3f068a,'enableComputerUse':!_0x36488b[_0x4a80b2(0xf0)]&&!_0x36488b[_0x4a80b2(0x113)],'autoSpawnInterop':!_0x36488b[_0x4a80b2(0xf0)],'enableConnections':!_0x36488b[_0x4a80b2(0x165)],'enableSecurity':!_0x36488b[_0x4a80b2(0x11b)],'keepInteropAlive':_0x36488b[_0x4a80b2(0x141)],..._0x36488b[_0x4a80b2(0xa8)][_0x4a80b2(0x13e)]>0x0?{'preloadSkills':_0x36488b['preloadSkills']}:{},..._0xa2e6a6?{'model':_0xa2e6a6}:{},..._0x36488b[_0x4a80b2(0x16f)]?{'projectId':_0x36488b[_0x4a80b2(0x16f)]}:{},..._0x36488b[_0x4a80b2(0x129)]?{'workingDirectory':_0x36488b[_0x4a80b2(0x129)]}:{},..._0x36488b[_0x4a80b2(0xba)]?{'bundledSkillsPath':_0x36488b[_0x4a80b2(0xba)]}:{},..._0x36488b[_0x4a80b2(0xf7)]?{'effort':_0x36488b[_0x4a80b2(0xf7)]}:{},..._0x36488b[_0x4a80b2(0xa6)]?{'sessionId':_0x36488b[_0x4a80b2(0xa6)]}:{},..._0x36488b['verbose']?{'verbose':!0x0}:{}};}async function we(_0x2fdb87){const _0x2d5879=_0x17f3e3;let _0x49cafb=!_0x2fdb87[_0x2d5879(0x130)]&&_0x2fdb87[_0x2d5879(0xb0)]!=='-'&&!!process[_0x2d5879(0x160)]['isTTY']&&!!process[_0x2d5879(0xef)][_0x2d5879(0xcf)],_0x43fef0=_0x49cafb?_0x2fdb87[_0x2d5879(0xb0)][_0x2d5879(0x115)]():await oe(_0x2fdb87[_0x2d5879(0xb0)],process[_0x2d5879(0x160)]);!_0x49cafb&&!_0x43fef0&&(console[_0x2d5879(0x164)](_0x2d5879(0xb2)),process[_0x2d5879(0x15a)](0x2)),l={'lastType':null,'quiet':_0x2fdb87[_0x2d5879(0x147)]};let _0x27ba13=await A(),_0x3a1f34=new _0x1ff3e4();_0x3a1f34[_0x2d5879(0xe0)](_);let _0x2a4952=_0x32b031(_0x2fdb87[_0x2d5879(0xe4)],_0x27ba13,_0x2fdb87['backendUrl']);I(_0x2fdb87[_0x2d5879(0xe4)],_0x2fdb87[_0x2d5879(0xab)],_0x2a4952);let _0x452ccc=R(_0x2fdb87,_0x27ba13,_0x2a4952),_0x3df42c=!0x1,_0x35c843=!0x1,_0x1145de,_0x4473c3=()=>_0x1145de??=_0x3a1f34[_0x2d5879(0x176)](),_0xb2d689=()=>{const _0x244a7a=_0x2d5879;_0x35c843&&process[_0x244a7a(0x15a)](0x82),_0x35c843=!0x0,process['stderr'][_0x244a7a(0xf8)](_0x244a7a(0x15e)),_0x3df42c&&_0x4473c3()[_0x244a7a(0x172)](()=>process[_0x244a7a(0x15a)](0x82),_0x42108b=>{const _0x42bcfe=_0x244a7a;console[_0x42bcfe(0x164)](_0x42108b),process[_0x42bcfe(0x15a)](0x82);});};process['on'](_0x2d5879(0xb7),_0xb2d689);let _0x5e4267=async _0x5f30e9=>{const _0x15d27b=_0x2d5879;try{await _0x3a1f34[_0x15d27b(0xe9)](_0x5f30e9);}catch(_0x559eb7){if(_0x35c843||!ke(_0x559eb7)||!process[_0x15d27b(0x160)][_0x15d27b(0xcf)]||_0x2fdb87[_0x15d27b(0xe4)]===_0x15d27b(0xd4)||!(_0x2fdb87['env']||_0x27ba13['baseUrl']))throw _0x559eb7;process[_0x15d27b(0x128)][_0x15d27b(0xf8)](_0x15d27b(0x15b));let _0x44a63f=_0x3a1f34[_0x15d27b(0x11d)]()??_0x2fdb87[_0x15d27b(0xa6)],_0x1bafa3=await _0x364443(_0x2fdb87[_0x15d27b(0xe4)]?{'env':_0x2fdb87['env'],'tenant':P(_0x27ba13,_0x153111[_0x2fdb87[_0x15d27b(0xe4)]])}:{'baseUrl':_0x27ba13[_0x15d27b(0xc0)],'tenant':_0x27ba13[_0x15d27b(0x111)]});if(_0x35c843||(_0x3df42c=!0x1,await _0x4473c3(),_0x35c843))return;_0x3a1f34=new _0x1ff3e4(),_0x1145de=void 0x0,_0x3a1f34[_0x15d27b(0xe0)](_),_0x27ba13=_0x1bafa3,await _0x3a1f34['initialize']({...R(_0x2fdb87,_0x27ba13,_0x2a4952),..._0x44a63f?{'sessionId':_0x44a63f}:{}}),_0x3df42c=!0x0,_0x35c843||await _0x3a1f34['sendMessage'](_0x5f30e9);}};try{if(await _0x3a1f34[_0x2d5879(0x100)](_0x452ccc),_0x3df42c=!0x0,_0x35c843)return;_0x49cafb?await ve({'prompt':_0x43fef0,'sendMessage':_0x5e4267,'onSigint':_0xb2d689}):await _0x5e4267(_0x43fef0);}catch(_0x204a6f){if(!_0x35c843)throw _0x204a6f;}finally{try{await _0x4473c3();}finally{process[_0x2d5879(0x15c)](_0x2d5879(0xb7),_0xb2d689),_0x35c843&&(process[_0x2d5879(0x110)]=0x82);}}}function be(_0x2b4eda,_0x40d1c7){const _0x2547d5=_0x17f3e3;let _0x675efe=process[_0x2547d5(0xef)]['write'][_0x2547d5(0x135)](process[_0x2547d5(0xef)]),_0x513a69=!0x1;return process[_0x2547d5(0xef)]['write']=(..._0x130d9e)=>{const _0x478a5a=_0x2547d5;if(!_0x513a69)return _0x675efe(..._0x130d9e);_0x4c1699(_0x40d1c7,0x0),_0x2a0eea(_0x40d1c7,0x0);let _0x13fcb9=_0x675efe(..._0x130d9e);return _0x2b4eda[_0x478a5a(0xb0)](!0x0),_0x13fcb9;},{'show':()=>{const _0x598b9f=_0x2547d5;_0x513a69=!0x0,_0x2b4eda[_0x598b9f(0xb0)]();},'hide':()=>{_0x513a69=!0x1;},'restore':()=>{const _0x34e0ec=_0x2547d5;_0x513a69=!0x1,process[_0x34e0ec(0xef)][_0x34e0ec(0xf8)]=_0x675efe;}};}async function ve({prompt:_0x2b6900,sendMessage:_0x151086,onSigint:_0x3a880c}){const _0x266257=_0x17f3e3;let _0x5e271e=_0x457b56({'input':process[_0x266257(0x160)],'output':process[_0x266257(0x128)],'terminal':!0x0,'prompt':_0x266257(0xf6)}),_0xbd6e5f=be(_0x5e271e,process['stderr']),_0x37a873=_0x5e271e[Symbol[_0x266257(0x150)]](),_0x2b5eda=!0x1;_0x5e271e[_0x266257(0x12d)](_0x266257(0x149),()=>{const _0x404739=_0x266257;_0x2b5eda=!0x0,_0xbd6e5f[_0x404739(0xcc)]();});let _0x59ca29=!0x1,_0x11c059=()=>{_0x59ca29=!0x0,_0x5e271e['close'](),_0x3a880c();};_0x5e271e['on'](_0x266257(0xb7),_0x11c059),process[_0x266257(0x128)]['write'](_0x266257(0xd6));try{if(_0x2b6900&&await _0x151086(_0x2b6900),_0x59ca29)return;_0x2b5eda||_0xbd6e5f[_0x266257(0xed)]();for await(let _0xbe0d10 of _0x37a873){if(_0xbd6e5f['hide'](),_0x59ca29)break;let _0x26f2d6=_0xbe0d10[_0x266257(0x115)]();if(_0x26f2d6===_0x266257(0xaa))break;_0x26f2d6&&await _0x151086(_0x26f2d6),_0x2b5eda||_0xbd6e5f[_0x266257(0xed)]();}}finally{_0xbd6e5f[_0x266257(0x118)](),_0x5e271e[_0x266257(0x15c)]('SIGINT',_0x11c059),_0x5e271e[_0x266257(0x149)]();}}async function Se(){const _0x1b2dc5=_0x17f3e3;let _0x58f06c=Q(process['argv'][_0x1b2dc5(0xc2)](0x2));if(_0x58f06c['help']){Z();return;}if(_0x58f06c[_0x1b2dc5(0x131)]){console[_0x1b2dc5(0xd9)](ee());return;}if(_0x58f06c['subcommand']==='login'){await pe(_0x58f06c);return;}if(_0x58f06c[_0x1b2dc5(0x107)]==='tenant'){await he(_0x58f06c['prompt']);return;}if(_0x58f06c['subcommand']===_0x1b2dc5(0xbc)){await re();return;}if(_0x58f06c['subcommand']===_0x1b2dc5(0x132)){await ie();return;}if(_0x58f06c[_0x1b2dc5(0x107)]==='models'){await ce(_0x58f06c);return;}if(_0x58f06c[_0x1b2dc5(0x107)]===_0x1b2dc5(0xdb)){await de(_0x58f06c);return;}if(_0x58f06c[_0x1b2dc5(0x107)]===_0x1b2dc5(0xfe)){await _0x56c5fc(_0x58f06c[_0x1b2dc5(0xb0)],{'runnerUrl':_0x58f06c['runnerUrl'],'backendUrl':_0x58f06c[_0x1b2dc5(0xab)],'interopPath':_0x58f06c[_0x1b2dc5(0xe7)],'workerId':_0x58f06c[_0x1b2dc5(0x11c)]});return;}if(_0x58f06c['cleanup']){await ae();return;}await we(_0x58f06c);}var ye=process.env.NODE_ENV===_0x17f3e3(0x120)||!!process.env.JEST_WORKER_ID;ye||Se()[_0x17f3e3(0xb4)](_0x35cfbf=>{const _0xf28e15=_0x17f3e3;console['error'](_0x35cfbf[_0xf28e15(0x138)]||_0x35cfbf[_0xf28e15(0x136)]||_0x35cfbf),process[_0xf28e15(0x15a)](0x1);});export{X as CARTOGRAPHER_SKILLS,N as EFFORT_TIERS,te as IMPLICIT_STDIN_IDLE_MS,R as buildInitOptions,Se as main,Q as parseArgs,ee as readCliVersion,oe as resolvePrompt};
2
+ const _0x2154f3=_0xf4e3;(function(_0x511dcf,_0x57e558){const _0x3e6a27=_0xf4e3,_0x23260b=_0x511dcf();while(!![]){try{const _0x5dbb87=-parseInt(_0x3e6a27(0x147))/0x1+-parseInt(_0x3e6a27(0xe5))/0x2+parseInt(_0x3e6a27(0x14a))/0x3*(-parseInt(_0x3e6a27(0xf6))/0x4)+-parseInt(_0x3e6a27(0xb0))/0x5*(parseInt(_0x3e6a27(0x121))/0x6)+parseInt(_0x3e6a27(0xb6))/0x7*(parseInt(_0x3e6a27(0x8c))/0x8)+parseInt(_0x3e6a27(0x9a))/0x9+-parseInt(_0x3e6a27(0x117))/0xa*(-parseInt(_0x3e6a27(0xf2))/0xb);if(_0x5dbb87===_0x57e558)break;else _0x23260b['push'](_0x23260b['shift']());}catch(_0x5bcef4){_0x23260b['push'](_0x23260b['shift']());}}}(_0x1e3d,0x82231));const __dirname=import.meta.dirname;import _0x3e4caa from'fs';import _0x4f653c from'path';import{clearLine as _0x2589ae,createInterface as _0x3bea84,cursorTo as _0x3fc6c1}from'node:readline';import{BUSINESS_ANALYSIS_PRELOADED_SKILLS as _0x31ff5d,DelegateAgent as _0x299920,InteropProcess as _0x12b87d,describeBaseUrlRejection as _0x23484f,getAuthFilePath as _0x41e37a,isCloudBaseUrl as _0x41d070,isSafeProjectFolderSegment as _0x58a6d4,listTenants as _0x594d00,loadAndRefreshAuth as _0x575554,loadAndRefreshSdkLogin as _0x1d0ef0,parsePlatformBaseUrl as _0x178811,resolveBackendUrl as _0x4f9c63,runHealthCheck as _0x27fc90,runHostCommand as _0x3280ff,runLoginFlow as _0x1ed86e,saveAuthData as _0x447086,switchTenant as _0x34bb73,ENV_TO_CLOUD as _0x330dbf}from'@uipath/delegate-sdk';var ee=[_0x2154f3(0xfe),_0x2154f3(0x95),'models',_0x2154f3(0xe0),_0x2154f3(0xf3),_0x2154f3(0xb7),_0x2154f3(0xe6)],N=[_0x2154f3(0x146),_0x2154f3(0xa4),'high',_0x2154f3(0x11e),'max'],te=_0x31ff5d;function p(_0x5f5785,_0x2589f5,_0x39f992,_0x385d4b){const _0x35f7a6=_0x2154f3;let _0x484a88=_0x5f5785[_0x2589f5];return(!_0x484a88||_0x484a88[_0x35f7a6(0xd0)]>0x1&&_0x484a88['startsWith']('-'))&&(console[_0x35f7a6(0xf4)](_0x39f992+'\x20requires\x20'+_0x385d4b+'.'),process[_0x35f7a6(0x7a)](0x2)),_0x484a88;}function ne(_0x449ed5){const _0x450e41=_0x2154f3;let _0x4adb46={'subcommand':'','prompt':'','print':!0x1,'keepAlive':!0x1,'cleanup':!0x1,'headless':!0x1,'noComputerUse':!0x1,'cartographer':!0x1,'noConnections':!0x1,'noSecurity':!0x1,'quiet':!0x1,'verbose':!0x1,'preloadSkills':[],'skipEnvCheck':!0x1,'help':!0x1,'version':!0x1};ee[_0x450e41(0xde)](_0x449ed5[0x0])&&(_0x4adb46[_0x450e41(0xaa)]=_0x449ed5[0x0],_0x449ed5=_0x449ed5['slice'](0x1));let _0x3897f3=[];for(let _0x34d9f8=0x0;_0x34d9f8<_0x449ed5['length'];_0x34d9f8++){let _0x19fbdb=_0x449ed5[_0x34d9f8];switch(_0x19fbdb){case _0x450e41(0x112):case'-p':_0x4adb46[_0x450e41(0x10d)]=!0x0;break;case'--keep-alive':_0x4adb46[_0x450e41(0x103)]=!0x0;break;case _0x450e41(0xb1):_0x4adb46[_0x450e41(0x130)]=!0x0;break;case _0x450e41(0xd5):_0x4adb46[_0x450e41(0xee)]=!0x0;break;case'--no-computer-use':_0x4adb46[_0x450e41(0x125)]=!0x0;break;case _0x450e41(0x11c):_0x4adb46[_0x450e41(0x118)]=!0x0,_0x4adb46[_0x450e41(0x125)]=!0x0,_0x4adb46['preloadSkills'][_0x450e41(0xd7)](...te);break;case _0x450e41(0x98):_0x4adb46[_0x450e41(0x13f)]=!0x0;break;case _0x450e41(0x138):_0x4adb46[_0x450e41(0x134)]=!0x0;break;case'--quiet':case'-q':_0x4adb46['quiet']=!0x0;break;case'--verbose':_0x4adb46['verbose']=!0x0;break;case _0x450e41(0xfa):_0x4adb46[_0x450e41(0xff)]=_0x449ed5[++_0x34d9f8];break;case _0x450e41(0xe3):_0x4adb46['model']=_0x449ed5[++_0x34d9f8];break;case _0x450e41(0x142):_0x4adb46[_0x450e41(0x148)]=_0x449ed5[++_0x34d9f8];break;case'--interop':_0x4adb46['interopPath']=_0x449ed5[++_0x34d9f8];break;case _0x450e41(0xd1):_0x4adb46[_0x450e41(0x9e)]=_0x449ed5[++_0x34d9f8];break;case _0x450e41(0xf5):_0x4adb46[_0x450e41(0x10c)]['push'](p(_0x449ed5,++_0x34d9f8,_0x19fbdb,_0x450e41(0x88)));break;case _0x450e41(0xe1):{let _0x3272d9=p(_0x449ed5,++_0x34d9f8,_0x19fbdb,'a\x20project\x20id');_0x58a6d4(_0x3272d9)||(console[_0x450e41(0xf4)](_0x450e41(0x115)+_0x3272d9+'\x22.\x20Use\x20a\x20single\x20folder-safe\x20segment\x20such\x20as\x20invoice-approval\x20(letters,\x20digits,\x20spaces,\x20\x22_\x22,\x20\x22-\x22,\x20\x22.\x22,\x20parentheses;\x20at\x20most\x2064\x20characters;\x20not\x20starting\x20with\x20\x22.\x22\x20or\x20ending\x20with\x20\x22.\x22\x20or\x20a\x20space).'),process[_0x450e41(0x7a)](0x2)),_0x4adb46[_0x450e41(0x13e)]=_0x3272d9;break;}case _0x450e41(0xb9):_0x4adb46[_0x450e41(0xaf)]=p(_0x449ed5,++_0x34d9f8,_0x19fbdb,_0x450e41(0x13d));break;case _0x450e41(0xa1):_0x4adb46['workingDirectory']=_0x4f653c[_0x450e41(0xcd)](process['cwd'](),p(_0x449ed5,++_0x34d9f8,_0x19fbdb,_0x450e41(0xd4)));break;case _0x450e41(0xb3):_0x4adb46[_0x450e41(0xc2)]=_0x4f653c[_0x450e41(0xcd)](process[_0x450e41(0xb5)](),p(_0x449ed5,++_0x34d9f8,_0x19fbdb,_0x450e41(0xd4)));break;case _0x450e41(0x11b):{let _0x37991e=p(_0x449ed5,++_0x34d9f8,_0x19fbdb,'an\x20effort\x20tier');N['includes'](_0x37991e)||(console[_0x450e41(0xf4)]('Invalid\x20--effort:\x20'+_0x37991e+_0x450e41(0x131)+N[_0x450e41(0xea)]('\x20|\x20')+'.'),process[_0x450e41(0x7a)](0x2)),_0x4adb46['effort']=_0x37991e;break;}case'--tenant':{let _0x482442=_0x449ed5[++_0x34d9f8];(!_0x482442||_0x482442['startsWith']('--'))&&(console[_0x450e41(0xf4)](_0x450e41(0xad)),process[_0x450e41(0x7a)](0x2)),_0x4adb46[_0x450e41(0x95)]=_0x482442;break;}case _0x450e41(0x7b):{let _0x45f070=_0x449ed5[++_0x34d9f8];[_0x450e41(0x83),_0x450e41(0xe8),'production',_0x450e41(0x116)][_0x450e41(0xde)](_0x45f070)||(console[_0x450e41(0xf4)](_0x450e41(0x82)+_0x45f070+_0x450e41(0x94)),process[_0x450e41(0x7a)](0x2)),_0x4adb46[_0x450e41(0xec)]=_0x45f070;break;}case _0x450e41(0x8b):case _0x450e41(0x85):{let _0x144a3c=p(_0x449ed5,++_0x34d9f8,_0x19fbdb,_0x450e41(0xa5)),_0x4462f6=_0x178811(_0x144a3c);if(_0x4462f6['ok']===!0x1){console[_0x450e41(0xf4)](_0x23484f(_0x144a3c,_0x4462f6[_0x450e41(0x126)])),process['exit'](0x2);break;}_0x4adb46['url']=_0x4462f6[_0x450e41(0xd3)];break;}case _0x450e41(0x144):_0x4adb46['skipEnvCheck']=!0x0;break;case'-h':case'--help':_0x4adb46[_0x450e41(0x87)]=!0x0;break;case'-v':case _0x450e41(0x9f):_0x4adb46['version']=!0x0;break;default:_0x19fbdb['startsWith']('--')&&(console['error'](_0x450e41(0xb4)+_0x19fbdb),process[_0x450e41(0x7a)](0x2)),_0x3897f3[_0x450e41(0xd7)](_0x19fbdb);}}return _0x4adb46[_0x450e41(0x95)]!==void 0x0&&_0x4adb46['subcommand']!==_0x450e41(0xfe)&&(console[_0x450e41(0xf4)](_0x450e41(0xa8)),process[_0x450e41(0x7a)](0x2)),_0x4adb46[_0x450e41(0xf1)]!==void 0x0&&_0x4adb46['env']!==void 0x0&&(console[_0x450e41(0xf4)](_0x450e41(0xc8)),process[_0x450e41(0x7a)](0x2)),_0x4adb46[_0x450e41(0xf1)]!==void 0x0&&_0x4adb46['subcommand']!==_0x450e41(0xfe)&&(console[_0x450e41(0xf4)](_0x450e41(0xed)),process[_0x450e41(0x7a)](0x2)),_0x4adb46[_0x450e41(0x12d)]&&_0x4adb46[_0x450e41(0xaa)]!==_0x450e41(0xfe)&&(console[_0x450e41(0xf4)](_0x450e41(0x8e)),process['exit'](0x2)),_0x4adb46[_0x450e41(0x10c)]=[...new Set(_0x4adb46[_0x450e41(0x10c)])],_0x4adb46[_0x450e41(0x105)]=_0x3897f3[_0x450e41(0xea)]('\x20'),_0x4adb46;}function oe(){const _0x221236=_0x2154f3;let _0x3a8e04=_0x221236(0xcc)[_0x221236(0xf7)]();console[_0x221236(0x12f)](_0x3a8e04);}function se(){const _0xcec82f=_0x2154f3;try{return JSON[_0xcec82f(0x149)](_0x3e4caa[_0xcec82f(0xae)](_0x4f653c[_0xcec82f(0xea)](__dirname,'..','package.json'),_0xcec82f(0x84)))[_0xcec82f(0xd9)]||'unknown';}catch{return _0xcec82f(0xbe);}}var re=0x7d0;async function C(_0x4d2912,_0x1fffb2){const _0x3f9df9=_0x2154f3;let _0x2a2910=_0x1fffb2?[_0x1fffb2]:[];for await(let _0x578ed7 of _0x4d2912)_0x2a2910[_0x3f9df9(0xd7)](Buffer['from'](_0x578ed7));return Buffer[_0x3f9df9(0x86)](_0x2a2910)[_0x3f9df9(0xa9)](_0x3f9df9(0x84))[_0x3f9df9(0xf7)]();}function ie(_0x2118c2,_0xff4e78){return new Promise(_0x563ba9=>{const _0x14ca61=_0xf4e3;let _0x662a6b=_0x1d3826=>{const _0xffcae4=_0xf4e3;clearTimeout(_0x42a9c7),_0x2118c2[_0xffcae4(0xc3)](_0xffcae4(0xab),_0x3aad78),_0x2118c2[_0xffcae4(0xc3)](_0xffcae4(0xda),_0x327805),_0x2118c2[_0xffcae4(0xc3)](_0xffcae4(0xf4),_0x327805),_0x2118c2[_0xffcae4(0xe9)](),_0x563ba9(_0x1d3826);},_0x3aad78=_0x12cd85=>_0x662a6b(Buffer[_0x14ca61(0x143)](_0x12cd85)),_0x327805=()=>_0x662a6b(null),_0x42a9c7=setTimeout(()=>_0x662a6b(null),_0xff4e78);_0x2118c2['on']('data',_0x3aad78),_0x2118c2['on']('end',_0x327805),_0x2118c2['on']('error',_0x327805),_0x2118c2['resume']();});}async function ae(_0x378246,_0x45b416,_0x2aa911=re){let _0x59a9ac=_0x378246==='-';if(!_0x59a9ac&&_0x378246)return _0x378246;if(!_0x59a9ac&&_0x45b416['isTTY'])return'';if(_0x59a9ac)return C(_0x45b416,null);let _0x1582ad=await ie(_0x45b416,_0x2aa911);return _0x1582ad?C(_0x45b416,_0x1582ad):'';}function S(){const _0x3087a7=_0x2154f3;return _0x4f653c[_0x3087a7(0xea)](process.env.HOME||process.env.USERPROFILE||'',_0x3087a7(0xba),'auth.json');}function w(_0x392c03){const _0x114e8b=_0x2154f3;try{let _0x162494=JSON['parse'](_0x3e4caa[_0x114e8b(0xae)](_0x392c03,_0x114e8b(0x84)));return!_0x162494[_0x114e8b(0x8f)]||!_0x162494['tenantId']||!_0x162494[_0x114e8b(0xf9)]?null:_0x162494;}catch{return null;}}function le(){const _0x278f53=_0x2154f3;let _0xceacf1=[{'file':_0x41e37a(),'isDesktopFallback':!0x1},{'file':S(),'isDesktopFallback':!0x0}];for(let _0xf2dbec of _0xceacf1){let _0x165950=w(_0xf2dbec[_0x278f53(0xbb)]);if(_0x165950)return{..._0xf2dbec,'auth':_0x165950};}return null;}async function ce(){const _0x1e638b=_0x2154f3;let _0x1e88df=_0x41e37a();if(!_0x3e4caa[_0x1e638b(0x127)](_0x1e88df)){let _0x1d23fb=S();console[_0x1e638b(0x12f)](w(_0x1d23fb)?'No\x20CLI\x20login\x20found.\x20Note:\x20the\x20CLI\x20is\x20currently\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20'+_0x1d23fb+_0x1e638b(0xef):_0x1e638b(0x101));return;}_0x3e4caa[_0x1e638b(0xd8)](_0x1e88df),console[_0x1e638b(0x12f)](_0x1e638b(0xd6)+_0x1e88df);}async function de(){const _0x131800=_0x2154f3;let _0x50b830=A(),_0x57281b,_0x415b66;if(_0x50b830)_0x57281b=_0x50b830,_0x415b66=_0x131800(0xca);else{let _0x103a4a=le();if(!_0x103a4a)throw new Error($);_0x57281b=_0x103a4a[_0x131800(0xa6)],_0x415b66=_0x103a4a['isDesktopFallback']?_0x103a4a[_0x131800(0xbb)]+_0x131800(0xc4):_0x103a4a[_0x131800(0xbb)];}let _0x58602c=[_0x131800(0x10f)+_0x415b66,_0x131800(0xb2)+(_0x57281b[_0x131800(0xd3)]??_0x131800(0xbe)),_0x131800(0x7e)+ue(_0x57281b[_0x131800(0xd3)]),_0x131800(0xbd)+(_0x57281b[_0x131800(0x11f)]??_0x131800(0xa0))+'\x20('+_0x57281b['organizationId']+')',_0x131800(0x133)+(_0x57281b[_0x131800(0x129)]??_0x131800(0xa0))+'\x20('+_0x57281b[_0x131800(0x10b)]+')'];if(_0x57281b[_0x131800(0xdd)]){let _0xb17189=_0x57281b[_0x131800(0xdd)]-Math['floor'](Date[_0x131800(0x136)]()/0x3e8),_0x4778dd=new Date(_0x57281b[_0x131800(0xdd)]*0x3e8)[_0x131800(0x13a)]();_0x58602c['push'](_0xb17189>0x0?_0x131800(0x110)+_0x4778dd+'\x20(in\x20'+Math['round'](_0xb17189/0x3c)+_0x131800(0x109):_0x131800(0x12e)+_0x4778dd);}process['stdout'][_0x131800(0x128)](_0x58602c[_0x131800(0xea)]('\x0a')+'\x0a');}var $=_0x2154f3(0x106);function ue(_0x6372b3){const _0x39e502=_0x2154f3;return _0x6372b3?_0x41d070(_0x6372b3)?'UiPath\x20Cloud':_0x39e502(0x135):_0x39e502(0xbe);}function A(){return process.env.AUTH_TOKEN&&process.env.TENANT_ID&&process.env.ORG_ID?{'accessToken':process.env.AUTH_TOKEN,'tenantId':process.env.TENANT_ID,'organizationId':process.env.ORG_ID,'orgLogicalName':process.env.ORG_SLUG,'tenantName':process.env.TENANT_SLUG,'baseUrl':B()}:null;}function B(){const _0x4ac6a5=_0x2154f3;let _0xde1c4a=process.env.UIPATH_BASE_URL;if(!_0xde1c4a)return;let _0x3b6bca=_0x178811(_0xde1c4a);if(_0x3b6bca['ok']===!0x1)throw new Error(_0x4ac6a5(0xc0)+_0x23484f(_0xde1c4a,_0x3b6bca[_0x4ac6a5(0x126)]));return _0x3b6bca[_0x4ac6a5(0xd3)];}async function I(){let _0x44adc4=A();if(_0x44adc4)return _0x44adc4;let _0x5ce17f=await _0x575554();if(_0x5ce17f)return _0x5ce17f;throw new Error($);}async function pe(){const _0x540e9b=_0x2154f3;await new _0x12b87d()[_0x540e9b(0xac)]({'force':!0x0}),console[_0x540e9b(0x12f)](_0x540e9b(0x13c));}function _0x1e3d(){const _0xbf81d7=['\x20\x20\x20\x20','object','padEnd','Invalid\x20--env:\x20','alpha','utf-8','--authority','concat','help','a\x20skill\x20name','checks','SIGINT','--url','2776IsYmkT','\x0aStopping…\x20(Ctrl+C\x20again\x20to\x20force\x20exit)\x0a','--skip-env-check\x20applies\x20to\x20`delegate-cli\x20login`\x20only.','accessToken','[saved\x20login]\x20Backend\x20URL:\x20','toolName','then','initialize','.\x20Use\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost.','tenant','detail','):\x0a\x0a','--no-connections','No\x20CLI\x20login\x20to\x20switch:\x20the\x20CLI\x20is\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','4719204NlhtqL','onEvent','tool','bind','workerId','--version','unknown\x20slug','--working-dir','name','once','medium','a\x20deployment\x20URL,\x20e.g.\x20https://automationsuite.contoso.com','auth',';\x20the\x20saved\x20login\x20still\x20uses\x20','--tenant\x20applies\x20to\x20`delegate-cli\x20login`\x20only.\x20Switch\x20tenants\x20with:\x20delegate-cli\x20tenant\x20<name>','toString','subcommand','data','stop','--tenant\x20requires\x20a\x20tenant\x20name.','readFileSync','sessionId','183615TLxUXX','--cleanup','Base\x20URL:\x20\x20\x20\x20\x20','--skills-path','Unknown\x20flag:\x20','cwd','6356cKIZQn','whoami','sendMessage','--session','.aria','file','description','Organization:\x20','unknown','stderr','UIPATH_BASE_URL\x20is\x20unusable.\x20','First\x20login\x20requires\x20--env\x20or\x20--url.\x20Usage:\x20delegate-cli\x20login\x20--env\x20<alpha|staging|production>,\x20or\x20delegate-cli\x20login\x20--url\x20https://automationsuite.contoso.com','bundledSkillsPath','off','\x20(Delegate\x20desktop\x20app\x20fallback)','X-Uipath-Tenantid','asyncIterator','restore','Pass\x20either\x20--env\x20(a\x20named\x20cloud)\x20or\x20--url\x20(any\x20other\x20deployment),\x20not\x20both.','Enter\x20sends\x20a\x20message.\x20/exit\x20or\x20EOF\x20exits;\x20Ctrl+C\x20stops\x20and\x20exits.\x0a','environment\x20variables\x20(AUTH_TOKEN/TENANT_ID/ORG_ID)','Missing\x20prompt.\x20Pass\x20it\x20as\x20an\x20argument,\x20pipe\x20it\x20via\x20stdin,\x20or\x20run\x20`delegate-cli\x20--help`.','\x0adelegate-cli\x20—\x20Delegate\x20agent\x20CLI\x0a\x0aUsage:\x0a\x20\x20delegate-cli\x20[flags]\x20[\x22<prompt>\x22]\x20\x20\x20\x20Start\x20a\x20conversation\x20in\x20a\x20terminal\x0a\x20\x20delegate-cli\x20--print\x20\x22<prompt>\x22\x20\x20\x20\x20\x20\x20Send\x20one\x20prompt,\x20print\x20the\x20response,\x20and\x20exit\x0a\x20\x20delegate-cli\x20[flags]\x20-\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Read\x20one\x20prompt\x20from\x20stdin\x20through\x20EOF,\x20then\x20exit\x0a\x20\x20delegate-cli\x20login\x20[--env\x20NAME\x20|\x20--url\x20BASE]\x20[--tenant\x20NAME]\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20OAuth\x20browser\x20login\x20→\x20~/.aria/sdk-auth.json.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20or\x20--url\x20required\x20on\x20FIRST\x20login;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20afterwards\x20defaults\x20to\x20the\x20saved\x20login\x27s\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20deployment.\x20--tenant\x20picks\x20a\x20tenant\x20by\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20name;\x20without\x20it\x20a\x20re-login\x20keeps\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20saved\x20tenant\x0a\x20\x20delegate-cli\x20tenant\x20[NAME]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20the\x20organization\x27s\x20tenants,\x20or\x20switch\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20saved\x20login\x20to\x20NAME\x20(no\x20browser)\x0a\x20\x20delegate-cli\x20logout\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Remove\x20the\x20saved\x20CLI\x20login\x0a\x20\x20delegate-cli\x20whoami\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20the\x20current\x20login\x20(org,\x20tenant,\x20token\x20expiry)\x0a\x20\x20delegate-cli\x20models\x20[--env\x20NAME]\x20\x20\x20\x20\x20List\x20available\x20LLM\x20models\x20for\x20the\x20current\x20tenant\x0a\x20\x20delegate-cli\x20check\x20[--env\x20NAME]\x20[--headless]\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Verify\x20auth,\x20backend\x20and\x20interop\x20without\x20sending\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20a\x20prompt;\x20exits\x201\x20when\x20any\x20check\x20fails\x0a\x20\x20delegate-cli\x20host\x20[flags]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20this\x20PC\x20as\x20a\x20remote\x20worker\x20until\x20Ctrl+C\x0a\x20\x20delegate-cli\x20host\x20install\x20[flags]\x20\x20\x20\x20Auto-start\x20the\x20host\x20at\x20login\x20(macOS\x20LaunchAgent\x20/\x20Windows\x20Scheduled\x20Task)\x0a\x20\x20delegate-cli\x20host\x20uninstall\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Remove\x20auto-start\x0a\x20\x20delegate-cli\x20host\x20status\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20auto-start\x20state\x0a\x20\x20delegate-cli\x20--cleanup\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Stop\x20running\x20interop\x0a\x0aFlags:\x0a\x20\x20-p,\x20--print\x20\x20\x20\x20\x20\x20\x20Run\x20one\x20turn\x20and\x20exit,\x20including\x20any\x20tool\x20execution.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Automatic\x20when\x20stdin\x20or\x20stdout\x20is\x20not\x20a\x20terminal,\x20or\x20with\x20-\x0a\x20\x20--env\x20NAME\x20\x20\x20\x20\x20\x20\x20\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Composes\x20backend\x20URL\x20from\x20saved\x20auth\x20(org/tenant\x20slugs).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Omitted\x20→\x20the\x20deployment\x20you\x20logged\x20into\x20(delegate-cli\x20login).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20localhost\x20→\x20http://localhost:5002.\x20No\x20saved\x20login\x20and\x20no\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env/--backend/BACKEND_URL\x20is\x20an\x20error\x20—\x20never\x20a\x20guess.\x0a\x20\x20--url\x20BASE\x20\x20\x20\x20\x20\x20\x20\x20(login)\x20Base\x20URL\x20of\x20a\x20deployment\x20that\x20is\x20not\x20a\x20named\x20cloud\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20—\x20Automation\x20Suite,\x20Dedicated,\x20Public\x20Sector.\x20Accepts\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20tenant\x20path\x20or\x20a\x20trailing\x20/identity_\x20and\x20reduces\x20it\x20to\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20origin.\x20Mutually\x20exclusive\x20with\x20--env;\x20also\x20settable\x20via\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20UIPATH_BASE_URL.\x20Alias:\x20--authority.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Automation\x20Suite\x20needs\x2026.10+\x20with\x20the\x20Delegate\x20service;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20the\x20deployment\x20rejects\x20the\x20built-in\x20client,\x20register\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20your\x20own\x20—\x20see\x20UIPATH_CLIENT_ID\x20in\x20the\x20README\x0a\x20\x20--skip-env-check\x20\x20(login)\x20Do\x20not\x20check\x20the\x20deployment\x20before\x20signing\x20in.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Escape\x20hatch\x20for\x20a\x20deployment\x20that\x20hides\x20its\x20OIDC\x20discovery\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20document\x20or\x20serves\x20Identity\x20from\x20another\x20origin;\x20it\x20also\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20gives\x20up\x20the\x20diagnosis\x20when\x20something\x20is\x20really\x20wrong\x0a\x20\x20--backend\x20URL\x20\x20\x20\x20\x20Full\x20backend\x20URL\x20—\x20escape\x20hatch\x20overrides\x20--env\x0a\x20\x20--tenant\x20NAME\x20\x20\x20\x20\x20(login)\x20Tenant\x20to\x20sign\x20into,\x20by\x20name\x20(case-insensitive).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20the\x20saved\x20login\x27s\x20tenant\x20on\x20that\x20cloud,\x20else\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20org\x27s\x20first\x20tenant.\x20Later:\x20delegate-cli\x20tenant\x20<name>\x0a\x20\x20--model\x20NAME\x20\x20\x20\x20\x20\x20LLM\x20model\x20id\x20(e.g.\x20claude_sonnet_5,\x20kimi_k3).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20gemini_3_6_flash.\x20Also\x20settable\x20via\x20MODEL\x20env\x20var.\x0a\x20\x20--keep-alive\x20\x20\x20\x20\x20\x20Reuse/leave\x20interop\x20running\x20across\x20invocations\x0a\x20\x20--headless\x20\x20\x20\x20\x20\x20\x20\x20Skip\x20interop\x20(text-only\x20prompts)\x0a\x20\x20--no-computer-use\x20Keep\x20interop\x20—\x20file,\x20Office,\x20PDF\x20and\x20shell\x20tools\x20keep\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20working\x20—\x20but\x20drop\x20the\x20screen:\x20no\x20screenshots,\x20no\x20window\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20list,\x20no\x20UI-automation\x20tools.\x20Cuts\x20image\x20tokens\x20and\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20per-turn\x20screen\x20capture,\x20and\x20stops\x20desktop\x20window\x20titles\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20leaving\x20the\x20machine.\x20Use\x20for\x20document\x20and\x20file\x20work.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--headless\x20implies\x20this\x20and\x20turns\x20interop\x20off\x20as\x20well\x0a\x20\x20--no-connections\x20\x20Disable\x20orchestrator\x20ConnectionService\x20(silences\x20404\x20warnings)\x0a\x20\x20--no-security\x20\x20\x20\x20\x20Disable\x20tool\x20security\x20wrapper\x20(use\x20only\x20for\x20debugging)\x0a\x20\x20--preload-skill\x20NAME\x20\x20Preload\x20a\x20skill\x20into\x20the\x20session\x20(repeatable).\x20The\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20skill\x27s\x20content\x20is\x20attached\x20before\x20the\x20first\x20model\x20turn\x20—\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20same\x20mechanism\x20as\x20project\x20preloaded\x20skills\x20in\x20the\x20app\x0a\x20\x20--cartographer\x20\x20\x20\x20Cartographer\x20engagement\x20preset.\x20Equivalent\x20to\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--no-computer-use\x20--preload-skill\x20business-analysis\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--preload-skill\x20project-checklist\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--preload-skill\x20knowledge-base.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Add\x20--project/--working-dir\x20for\x20where\x20the\x20files\x20live,\x20and\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20extra\x20--preload-skill\x20flags\x20for\x20more\x20skills\x20—\x20a\x20skill\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20preset\x20already\x20covers\x20is\x20not\x20preloaded\x20twice.\x20An\x20explicit\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--headless\x20still\x20wins\x20and\x20turns\x20interop\x20off\x0a\x20\x20--project\x20ID\x20\x20\x20\x20\x20\x20Route\x20the\x20session\x27s\x20local\x20wiki\x20and\x20plans\x20to\x20a\x20project\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(<working-dir>/projects/<ID>/wiki).\x20Client-side\x20key\x20only\x0a\x20\x20--working-dir\x20PATH\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Shell\x20cwd\x20for\x20the\x20agent\x20and\x20root\x20for\x20SDK-local\x20state.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Relative\x20paths\x20resolve\x20against\x20the\x20current\x20directory;\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20directory\x20is\x20created\x20if\x20missing\x0a\x20\x20--skills-path\x20PATH\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Extra\x20bundled-skills\x20directory\x20(merged\x20with\x20the\x20installed\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20app\x27s\x20skills\x20and\x20DELEGATE_BUNDLED_SKILLS_PATH)\x0a\x20\x20--effort\x20TIER\x20\x20\x20\x20\x20Reasoning\x20effort:\x20low\x20|\x20medium\x20|\x20high\x20|\x20xhigh\x20|\x20max.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20the\x20model\x27s\x20recommended\x20tier\x0a\x20\x20--session\x20ID\x20\x20\x20\x20\x20\x20Pin\x20the\x20session\x20id\x20(must\x20exist\x20on\x20the\x20backend,\x20or\x20be\x20one\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20first\x20message\x20creates)\x0a\x20\x20--runner-url\x20URL\x20\x20(host)\x20Runner\x20worker\x20WS\x20URL.\x20Required;\x20or\x20CONTROL_PLANE_WS_URL\x20env\x0a\x20\x20--interop\x20PATH\x20\x20\x20\x20(host)\x20Interop\x20binary\x20path;\x20or\x20INTEROP_EXECUTABLE_PATH\x20env.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Absent\x20→\x20registration/discovery\x20only,\x20tool\x20execution\x20disabled\x0a\x20\x20--worker-id\x20ID\x20\x20\x20\x20(host)\x20Stable\x20worker\x20identity;\x20or\x20WORKER_ID\x20env.\x20Default:\x20hostname\x0a\x20\x20-q,\x20--quiet\x20\x20\x20\x20\x20\x20\x20Suppress\x20🤔\x20thinking\x20output\x20to\x20stderr\x0a\x20\x20--verbose\x20\x20\x20\x20\x20\x20\x20\x20\x20Surface\x20the\x20SDK\x27s\x20and\x20the\x20framework\x27s\x20own\x20logs.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Diagnostics\x20only,\x20on\x20stdout;\x20independent\x20of\x20-q\x0a\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x20\x20-v,\x20--version\x20\x20\x20\x20\x20Print\x20the\x20installed\x20CLI\x20version\x0a\x0aConversation:\x20Enter\x20sends\x20a\x20message;\x20/exit\x20or\x20EOF\x20exits;\x20Ctrl+C\x20stops\x20and\x20exits.\x0a\x20\x20An\x20optional\x20initial\x20prompt\x20is\x20followed\x20by\x20more\x20input.\x20The\x20session\x20ID\x20is\x20printed\x0a\x20\x20to\x20stderr;\x20resume\x20later\x20with\x20--session\x20ID.\x20Redirected\x20input\x20is\x20one\x20prompt.\x0aAuth:\x20prompts\x20auto-retry\x20on\x20401\x20by\x20opening\x20the\x20browser\x20to\x20re-login\x20(TTY\x20only),\x0a\x20\x20preserving\x20the\x20active\x20session.\x0a','resolve','--env\x20localhost\x20has\x20no\x20OAuth\x20flow;\x20pick\x20alpha,\x20staging,\x20or\x20production.','exitCode','length','--worker-id','Switch\x20with:\x20delegate-cli\x20tenant\x20<name>\x0a','baseUrl','a\x20directory\x20path','--headless','Removed\x20','push','rmSync','version','end','thinking','✓\x20Done\x0a','expiresAt','includes','effort','host','--project','quiet','--model','stack','16332yZmNmU','check','🔧\x20','staging','pause','join','show','env','--url\x20applies\x20to\x20`delegate-cli\x20login`\x20only.\x20Other\x20commands\x20follow\x20the\x20saved\x20login,\x20or\x20--backend\x20<url>.','headless','\x20—\x20sign\x20out\x20in\x20the\x20Delegate\x20app\x20to\x20clear\x20that.','status','url','484RlzLJm','logout','error','--preload-skill','4usYBzj','trim',',\x20whose\x20tenant\x20is\x20chosen\x20in\x20the\x20app.\x20Run\x20`delegate-cli\x20login\x20--env\x20<env>`\x20for\x20a\x20CLI\x20login\x20of\x20your\x20own.','organizationId','--backend','getSessionId','\x0aAvailable\x20models\x20(','lastType','login','backendUrl','close','No\x20CLI\x20login\x20found\x20—\x20nothing\x20to\x20remove.','map','keepAlive','spawn','prompt','No\x20auth\x20found.\x20Set\x20AUTH_TOKEN/TENANT_ID/ORG_ID\x20env\x20vars,\x20or\x20run\x20`delegate-cli\x20login\x20--env\x20<alpha|staging|production>`\x20(or\x20`--url\x20<deployment-url>`\x20for\x20Automation\x20Suite)\x20first.','stdin','json','\x20min)','message','tenantId','preloadSkills','print','No\x20CLI\x20login\x20found.\x20Run\x20`delegate-cli\x20login\x20--env\x20<alpha|staging|production>`\x20first.','Source:\x20\x20\x20\x20\x20\x20\x20','Token:\x20\x20\x20\x20\x20\x20\x20\x20expires\x20','isTTY','--print','\x0a⚠️\x20\x20Auth\x20expired.\x20Opening\x20browser\x20to\x20re-login…\x0a','content','Invalid\x20--project:\x20\x22','localhost','65710mXDouk','cartographer','[env=','stdout','--effort','--cartographer','verbose','xhigh','orgLogicalName','\x20(current)','30UDjZdg','test','GET\x20','models','noComputerUse','rejection','existsSync','write','tenantName','Session:\x20','workingDirectory','response','skipEnvCheck','Token:\x20\x20\x20\x20\x20\x20\x20\x20expired\x20','log','cleanup','.\x20Use\x20','destroy','Tenant:\x20\x20\x20\x20\x20\x20\x20','noSecurity','self-hosted\x20(Automation\x20Suite\x20/\x20Dedicated)','now','Tenant\x20not\x20switched:\x20could\x20not\x20write\x20','--no-security','slice','toISOString',']\x20Backend\x20URL:\x20','Interop\x20stopped\x20(if\x20it\x20was\x20running).','a\x20session\x20id','projectId','noConnections','done','tool_call','--runner-url','from','--skip-env-check','hide','low','307133vXAeHG','runnerUrl','parse','289803JjMMxZ','Tenants\x20of\x20','You>\x20','799f56b8-4aed-4a0f-8640-659dae4a9e0e','exit','--env','session_start','MODELS','Deployment:\x20\x20\x20'];_0x1e3d=function(){return _0xbf81d7;};return _0x1e3d();}var fe=_0x2154f3(0x79);function E(_0x443792,_0x5223e5,_0x5315bb){const _0x185bf9=_0x2154f3;_0x443792?process['stderr'][_0x185bf9(0x128)](_0x185bf9(0x119)+_0x443792+_0x185bf9(0x13b)+_0x5315bb+'\x0a'):!_0x5223e5&&!process.env.BACKEND_URL&&process[_0x185bf9(0xbf)][_0x185bf9(0x128)](_0x185bf9(0x90)+_0x5315bb+'\x0a');}async function he(_0x4f533d){const _0x1a801c=_0x2154f3;let _0x2bca05=await I(),_0x59827a=_0x4f9c63(_0x4f533d[_0x1a801c(0xec)],_0x2bca05,_0x4f533d[_0x1a801c(0xff)]);E(_0x4f533d[_0x1a801c(0xec)],_0x4f533d['backendUrl'],_0x59827a);let _0xc8dbd2=_0x59827a+'/v1/config',_0x4fa595={'Authorization':'Bearer\x20'+_0x2bca05[_0x1a801c(0x8f)],'X-UiPath-ConsumingProductId':fe};_0x2bca05['tenantId']&&(_0x4fa595[_0x1a801c(0xc5)]=_0x2bca05[_0x1a801c(0x10b)]),_0x2bca05[_0x1a801c(0xf9)]&&(_0x4fa595['X-Uipath-Organizationid']=_0x2bca05[_0x1a801c(0xf9)]);let _0x29664b=await fetch(_0xc8dbd2,{'headers':_0x4fa595});if(!_0x29664b['ok'])throw new Error(_0x1a801c(0x123)+_0xc8dbd2+'\x20→\x20'+_0x29664b[_0x1a801c(0xf0)]+'\x20'+_0x29664b['statusText']);let _0x2de54c=(await _0x29664b[_0x1a801c(0x108)]())?.[_0x1a801c(0x7d)],_0x33411f=Array['isArray'](_0x2de54c)?_0x2de54c:_0x2de54c&&typeof _0x2de54c==_0x1a801c(0x80)?Object['entries'](_0x2de54c)[_0x1a801c(0x102)](([_0x56929d,_0x3faf7d])=>({'id':_0x56929d,'name':_0x3faf7d})):[];if(_0x33411f['length']===0x0){process[_0x1a801c(0xbf)][_0x1a801c(0x128)]('No\x20models\x20available\x20for\x20this\x20product/tenant.\x0a');return;}process['stdout'][_0x1a801c(0x128)](_0x1a801c(0xfc)+_0x33411f[_0x1a801c(0xd0)]+_0x1a801c(0x97));for(let _0x3ad862 of _0x33411f){let _0x3facc2=_0x3ad862[_0x1a801c(0xa2)]&&_0x3ad862[_0x1a801c(0xa2)]!==_0x3ad862['id']?'\x20('+_0x3ad862[_0x1a801c(0xa2)]+')':'';process[_0x1a801c(0x11a)][_0x1a801c(0x128)]('\x20\x20'+_0x3ad862['id']+_0x3facc2+'\x0a'),_0x3ad862[_0x1a801c(0xbc)]&&process[_0x1a801c(0x11a)][_0x1a801c(0x128)](_0x1a801c(0x7f)+_0x3ad862[_0x1a801c(0xbc)]+'\x0a');}process['stdout'][_0x1a801c(0x128)]('\x0aUse\x20with:\x20delegate-cli\x20--model\x20<id>\x20\x22<prompt>\x22\x0a');}function _0xf4e3(_0x530a98,_0x3a35b6){_0x530a98=_0x530a98-0x79;const _0x1e3dd6=_0x1e3d();let _0xf4e3ab=_0x1e3dd6[_0x530a98];return _0xf4e3ab;}async function ge(_0xe20e96){const _0x455628=_0x2154f3;let _0x4a111c=await I(),_0x22cbdd=_0x4f9c63(_0xe20e96[_0x455628(0xec)],_0x4a111c,_0xe20e96[_0x455628(0xff)]);E(_0xe20e96[_0x455628(0xec)],_0xe20e96['backendUrl'],_0x22cbdd);let _0x46407c=await _0x27fc90({'auth':_0x4a111c,'backendUrl':_0x22cbdd,'interop':_0xe20e96[_0x455628(0xee)]?'skip':_0x455628(0x104)});for(let _0x9c005b of _0x46407c[_0x455628(0x89)])process['stdout'][_0x455628(0x128)](me(_0x9c005b)+'\x0a');_0x46407c['ok']||process[_0x455628(0x7a)](0x1);}function me(_0x2fb8ce){const _0x8a0fa2=_0x2154f3;return{'ok':'✓','failed':'✗','skipped':'-'}[_0x2fb8ce['status']]+'\x20'+_0x2fb8ce['name'][_0x8a0fa2(0x81)](0x8)+_0x2fb8ce[_0x8a0fa2(0x96)];}async function ke(_0x1f9d76){const _0x2e4e3c=_0x2154f3;_0x1f9d76['env']===_0x2e4e3c(0x116)&&(console['error'](_0x2e4e3c(0xce)),process['exit'](0x2));let _0x49a28a=w(_0x41e37a()),_0x1ea2ed=_0x1f9d76['skipEnvCheck'];if(_0x1f9d76[_0x2e4e3c(0xec)]){let _0x278a13=_0x1f9d76['env'];await _0x1ed86e({'env':_0x278a13,'tenant':_0x1f9d76[_0x2e4e3c(0x95)]??b(_0x49a28a,_0x330dbf[_0x278a13]),'skipEnvCheck':_0x1ea2ed});return;}let _0x56b8eb=_0x1f9d76[_0x2e4e3c(0xf1)]??B();if(_0x56b8eb){await _0x1ed86e({'baseUrl':_0x56b8eb,'tenant':_0x1f9d76['tenant']??b(_0x49a28a,_0x56b8eb),'skipEnvCheck':_0x1ea2ed});return;}if(_0x49a28a?.[_0x2e4e3c(0xd3)]){await _0x1ed86e({'baseUrl':_0x49a28a[_0x2e4e3c(0xd3)],'tenant':_0x1f9d76[_0x2e4e3c(0x95)]??_0x49a28a[_0x2e4e3c(0x129)],'skipEnvCheck':_0x1ea2ed});return;}console[_0x2e4e3c(0xf4)](_0x2e4e3c(0xc1)),process['exit'](0x2);}function b(_0x1e0e94,_0x29e751){const _0xbb4730=_0x2154f3;return _0x1e0e94?.[_0xbb4730(0xd3)]&&we(_0x1e0e94[_0xbb4730(0xd3)],_0x29e751)?_0x1e0e94[_0xbb4730(0x129)]:void 0x0;}function we(_0x57919b,_0x5cfb1d){try{return new URL(_0x57919b)['origin']===new URL(_0x5cfb1d)['origin'];}catch{return!0x1;}}async function ve(_0x2fb16d){const _0x16a573=_0x2154f3;A()&&(console[_0x16a573(0xf4)]('Auth\x20comes\x20from\x20AUTH_TOKEN/TENANT_ID/ORG_ID\x20—\x20set\x20TENANT_ID\x20and\x20TENANT_SLUG\x20to\x20change\x20the\x20tenant.'),process[_0x16a573(0x7a)](0x2));let _0x2ea62e=await _0x1d0ef0();if(_0x2ea62e||(console['error'](be()),process[_0x16a573(0x7a)](0x2)),_0x2fb16d['trim']()){let _0x16f94d=await _0x34bb73(_0x2ea62e,_0x2fb16d);_0x447086(_0x16f94d)||(console[_0x16a573(0xf4)](_0x16a573(0x137)+_0x41e37a()+_0x16a573(0xa7)+_0x2ea62e[_0x16a573(0x129)]+'.'),process[_0x16a573(0x7a)](0x1)),console[_0x16a573(0x12f)]('Tenant:\x20'+_0x16f94d[_0x16a573(0x129)]+'\x20('+_0x16f94d[_0x16a573(0x10b)]+')\x20—\x20saved\x20to\x20'+_0x41e37a());return;}ye(await _0x594d00(_0x2ea62e),_0x2ea62e);}function be(){const _0x30d881=_0x2154f3;if(_0x3e4caa[_0x30d881(0x127)](_0x41e37a()))return'The\x20saved\x20CLI\x20login\x20could\x20not\x20be\x20refreshed.\x20Run\x20`delegate-cli\x20login`\x20again.';let _0x2cb4e6=S();return w(_0x2cb4e6)?_0x30d881(0x99)+_0x2cb4e6+_0x30d881(0xf8):_0x30d881(0x10e);}function ye(_0x355621,_0x3d7fc5){const _0xf01a26=_0x2154f3;let _0x248d7e=_0x355621[_0xf01a26(0x102)](_0x532cdb=>_0x532cdb['id']===_0x3d7fc5[_0xf01a26(0x10b)]?'*\x20'+_0x532cdb[_0xf01a26(0xa2)]+_0xf01a26(0x120):'\x20\x20'+_0x532cdb['name']);process['stdout'][_0xf01a26(0x128)](_0xf01a26(0x14b)+(_0x3d7fc5[_0xf01a26(0x11f)]??_0x3d7fc5[_0xf01a26(0xf9)])+':\x0a'+_0x248d7e[_0xf01a26(0xea)]('\x0a')+'\x0a'),_0x355621[_0xf01a26(0xd0)]>0x1&&process[_0xf01a26(0x11a)][_0xf01a26(0x128)](_0xf01a26(0xd2));}function Se(_0xc12b02){const _0x1d793c=_0x2154f3;return _0xc12b02?.[_0x1d793c(0x12c)]?.[_0x1d793c(0xf0)]===0x191||/401/[_0x1d793c(0x122)](String(_0xc12b02?.[_0x1d793c(0x10a)]??''));}var l={'lastType':null,'quiet':!0x1},_=_0x2779ed=>{const _0x137774=_0x2154f3;switch(_0x2779ed['type']){case _0x137774(0x7c):_0x2779ed[_0x137774(0xaf)]&&_0x2779ed['sessionId']!==l[_0x137774(0xaf)]&&(process[_0x137774(0xbf)][_0x137774(0x128)](_0x137774(0x12a)+_0x2779ed[_0x137774(0xaf)]+'\x20(resume\x20with\x20--session\x20'+_0x2779ed['sessionId']+')\x0a'),l[_0x137774(0xaf)]=_0x2779ed[_0x137774(0xaf)]);break;case _0x137774(0xdb):_0x2779ed[_0x137774(0x114)]&&!l['quiet']&&(l[_0x137774(0xfd)]!=='thinking'&&process['stderr'][_0x137774(0x128)]('\x0a🤔\x20'),process[_0x137774(0xbf)][_0x137774(0x128)](_0x2779ed[_0x137774(0x114)]),l[_0x137774(0xfd)]='thinking');break;case _0x137774(0x141):l['lastType']!==null&&process[_0x137774(0xbf)][_0x137774(0x128)]('\x0a'),process[_0x137774(0xbf)][_0x137774(0x128)](_0x137774(0xe7)+(_0x2779ed[_0x137774(0x91)]??_0x137774(0x9c))+'\x0a'),l[_0x137774(0xfd)]='tool_call';break;case'message':_0x2779ed[_0x137774(0x114)]&&(l['lastType']!==_0x137774(0x10a)&&l[_0x137774(0xfd)]!==null&&process['stdout']['write']('\x0a'),process['stdout'][_0x137774(0x128)](_0x2779ed[_0x137774(0x114)]),l['lastType']=_0x137774(0x10a));break;case _0x137774(0xf4):l['lastType']!==null&&process[_0x137774(0xbf)]['write']('\x0a'),process[_0x137774(0xbf)][_0x137774(0x128)]('✗\x20'+(_0x2779ed[_0x137774(0xf4)]??_0x137774(0xf4))+'\x0a'),l[_0x137774(0xfd)]=_0x137774(0xf4);break;case _0x137774(0x140):(l[_0x137774(0xfd)]==='message'||l['lastType']===_0x137774(0xdb))&&process[_0x137774(0x11a)]['write']('\x0a'),process[_0x137774(0xbf)][_0x137774(0x128)](_0x137774(0xdc)),l['lastType']=_0x137774(0x140);break;}};function R(_0x5cc2e9,_0x4dd328,_0x1b3938){const _0xff27bc=_0x2154f3;let _0x8d013=_0x5cc2e9['model']||process.env.MODEL;return{'backendUrl':_0x1b3938,'auth':_0x4dd328,'enableComputerUse':!_0x5cc2e9[_0xff27bc(0xee)]&&!_0x5cc2e9[_0xff27bc(0x125)],'autoSpawnInterop':!_0x5cc2e9[_0xff27bc(0xee)],'enableConnections':!_0x5cc2e9['noConnections'],'enableSecurity':!_0x5cc2e9['noSecurity'],'keepInteropAlive':_0x5cc2e9['keepAlive'],..._0x5cc2e9[_0xff27bc(0x10c)][_0xff27bc(0xd0)]>0x0?{'preloadSkills':_0x5cc2e9[_0xff27bc(0x10c)]}:{},..._0x8d013?{'model':_0x8d013}:{},..._0x5cc2e9[_0xff27bc(0x13e)]?{'projectId':_0x5cc2e9[_0xff27bc(0x13e)]}:{},..._0x5cc2e9[_0xff27bc(0x12b)]?{'workingDirectory':_0x5cc2e9['workingDirectory']}:{},..._0x5cc2e9[_0xff27bc(0xc2)]?{'bundledSkillsPath':_0x5cc2e9[_0xff27bc(0xc2)]}:{},..._0x5cc2e9[_0xff27bc(0xdf)]?{'effort':_0x5cc2e9[_0xff27bc(0xdf)]}:{},..._0x5cc2e9[_0xff27bc(0xaf)]?{'sessionId':_0x5cc2e9['sessionId']}:{},..._0x5cc2e9[_0xff27bc(0x11d)]?{'verbose':!0x0}:{}};}async function Ae(_0x2287d3){const _0x55ffb8=_0x2154f3;let _0x2cea88=!_0x2287d3['print']&&_0x2287d3[_0x55ffb8(0x105)]!=='-'&&!!process[_0x55ffb8(0x107)][_0x55ffb8(0x111)]&&!!process[_0x55ffb8(0x11a)][_0x55ffb8(0x111)],_0x3bcc6e=_0x2cea88?_0x2287d3[_0x55ffb8(0x105)]['trim']():await ae(_0x2287d3[_0x55ffb8(0x105)],process[_0x55ffb8(0x107)]);!_0x2cea88&&!_0x3bcc6e&&(console[_0x55ffb8(0xf4)](_0x55ffb8(0xcb)),process[_0x55ffb8(0x7a)](0x2)),l={'lastType':null,'quiet':_0x2287d3[_0x55ffb8(0xe2)]};let _0x2cfe9c=await I(),_0x322198=new _0x299920();_0x322198[_0x55ffb8(0x9b)](_);let _0x5c0e3d=_0x4f9c63(_0x2287d3[_0x55ffb8(0xec)],_0x2cfe9c,_0x2287d3['backendUrl']);E(_0x2287d3[_0x55ffb8(0xec)],_0x2287d3[_0x55ffb8(0xff)],_0x5c0e3d);let _0x17eeb3=R(_0x2287d3,_0x2cfe9c,_0x5c0e3d),_0x303a2=!0x1,_0x22dfc2=!0x1,_0x56c177,_0x3f8cd1=()=>_0x56c177??=_0x322198[_0x55ffb8(0x132)](),_0x3938cb=()=>{const _0x1036b9=_0x55ffb8;_0x22dfc2&&process[_0x1036b9(0x7a)](0x82),_0x22dfc2=!0x0,process[_0x1036b9(0xbf)]['write'](_0x1036b9(0x8d)),_0x303a2&&_0x3f8cd1()[_0x1036b9(0x92)](()=>process[_0x1036b9(0x7a)](0x82),_0x16191f=>{const _0x3500a6=_0x1036b9;console[_0x3500a6(0xf4)](_0x16191f),process['exit'](0x82);});};process['on'](_0x55ffb8(0x8a),_0x3938cb);let _0x1d15c3=async _0x461f4f=>{const _0x49c058=_0x55ffb8;try{await _0x322198[_0x49c058(0xb8)](_0x461f4f);}catch(_0x24bf41){if(_0x22dfc2||!Se(_0x24bf41)||!process['stdin'][_0x49c058(0x111)]||_0x2287d3['env']==='localhost'||!(_0x2287d3['env']||_0x2cfe9c[_0x49c058(0xd3)]))throw _0x24bf41;process['stderr'][_0x49c058(0x128)](_0x49c058(0x113));let _0x18f69d=_0x322198[_0x49c058(0xfb)]()??_0x2287d3['sessionId'],_0x2c8ef4=await _0x1ed86e(_0x2287d3[_0x49c058(0xec)]?{'env':_0x2287d3[_0x49c058(0xec)],'tenant':b(_0x2cfe9c,_0x330dbf[_0x2287d3[_0x49c058(0xec)]]),'skipEnvCheck':!0x0}:{'baseUrl':_0x2cfe9c[_0x49c058(0xd3)],'tenant':_0x2cfe9c[_0x49c058(0x129)],'skipEnvCheck':!0x0});if(_0x22dfc2||(_0x303a2=!0x1,await _0x3f8cd1(),_0x22dfc2))return;_0x322198=new _0x299920(),_0x56c177=void 0x0,_0x322198[_0x49c058(0x9b)](_),_0x2cfe9c=_0x2c8ef4,await _0x322198[_0x49c058(0x93)]({...R(_0x2287d3,_0x2cfe9c,_0x5c0e3d),..._0x18f69d?{'sessionId':_0x18f69d}:{}}),_0x303a2=!0x0,_0x22dfc2||await _0x322198[_0x49c058(0xb8)](_0x461f4f);}};try{if(await _0x322198[_0x55ffb8(0x93)](_0x17eeb3),_0x303a2=!0x0,_0x22dfc2)return;_0x2cea88?await Ee({'prompt':_0x3bcc6e,'sendMessage':_0x1d15c3,'onSigint':_0x3938cb}):await _0x1d15c3(_0x3bcc6e);}catch(_0x1d2fb1){if(!_0x22dfc2)throw _0x1d2fb1;}finally{try{await _0x3f8cd1();}finally{process['off'](_0x55ffb8(0x8a),_0x3938cb),_0x22dfc2&&(process[_0x55ffb8(0xcf)]=0x82);}}}function Ie(_0x40735c,_0x2a83e8){const _0x54b1ac=_0x2154f3;let _0x357fd2=process[_0x54b1ac(0x11a)][_0x54b1ac(0x128)][_0x54b1ac(0x9d)](process[_0x54b1ac(0x11a)]),_0x607736=!0x1;return process[_0x54b1ac(0x11a)]['write']=(..._0x4e8f61)=>{const _0x4066d4=_0x54b1ac;if(!_0x607736)return _0x357fd2(..._0x4e8f61);_0x3fc6c1(_0x2a83e8,0x0),_0x2589ae(_0x2a83e8,0x0);let _0x199427=_0x357fd2(..._0x4e8f61);return _0x40735c[_0x4066d4(0x105)](!0x0),_0x199427;},{'show':()=>{const _0x325cf7=_0x54b1ac;_0x607736=!0x0,_0x40735c[_0x325cf7(0x105)]();},'hide':()=>{_0x607736=!0x1;},'restore':()=>{const _0x16feff=_0x54b1ac;_0x607736=!0x1,process[_0x16feff(0x11a)][_0x16feff(0x128)]=_0x357fd2;}};}async function Ee({prompt:_0x40665f,sendMessage:_0x2b991a,onSigint:_0x3dd774}){const _0x4032ab=_0x2154f3;let _0x13c8b9=_0x3bea84({'input':process['stdin'],'output':process['stderr'],'terminal':!0x0,'prompt':_0x4032ab(0x14c)}),_0x582145=Ie(_0x13c8b9,process[_0x4032ab(0xbf)]),_0x7593a5=_0x13c8b9[Symbol[_0x4032ab(0xc6)]](),_0x365f9e=!0x1;_0x13c8b9[_0x4032ab(0xa3)]('close',()=>{const _0xd1f5dd=_0x4032ab;_0x365f9e=!0x0,_0x582145[_0xd1f5dd(0x145)]();});let _0x305ba8=!0x1,_0x3999a6=()=>{const _0x2be4a3=_0x4032ab;_0x305ba8=!0x0,_0x13c8b9[_0x2be4a3(0x100)](),_0x3dd774();};_0x13c8b9['on'](_0x4032ab(0x8a),_0x3999a6),process['stderr'][_0x4032ab(0x128)](_0x4032ab(0xc9));try{if(_0x40665f&&await _0x2b991a(_0x40665f),_0x305ba8)return;_0x365f9e||_0x582145[_0x4032ab(0xeb)]();for await(let _0x9c6c75 of _0x7593a5){if(_0x582145[_0x4032ab(0x145)](),_0x305ba8)break;let _0x2db18f=_0x9c6c75[_0x4032ab(0xf7)]();if(_0x2db18f==='/exit')break;_0x2db18f&&await _0x2b991a(_0x2db18f),_0x365f9e||_0x582145[_0x4032ab(0xeb)]();}}finally{_0x582145[_0x4032ab(0xc7)](),_0x13c8b9[_0x4032ab(0xc3)](_0x4032ab(0x8a),_0x3999a6),_0x13c8b9[_0x4032ab(0x100)]();}}async function Te(){const _0x5cea7a=_0x2154f3;let _0x174df8=ne(process['argv'][_0x5cea7a(0x139)](0x2));if(_0x174df8[_0x5cea7a(0x87)]){oe();return;}if(_0x174df8[_0x5cea7a(0xd9)]){console[_0x5cea7a(0x12f)](se());return;}if(_0x174df8[_0x5cea7a(0xaa)]===_0x5cea7a(0xfe)){await ke(_0x174df8);return;}if(_0x174df8[_0x5cea7a(0xaa)]===_0x5cea7a(0x95)){await ve(_0x174df8['prompt']);return;}if(_0x174df8[_0x5cea7a(0xaa)]==='logout'){await ce();return;}if(_0x174df8[_0x5cea7a(0xaa)]==='whoami'){await de();return;}if(_0x174df8['subcommand']===_0x5cea7a(0x124)){await he(_0x174df8);return;}if(_0x174df8[_0x5cea7a(0xaa)]===_0x5cea7a(0xe6)){await ge(_0x174df8);return;}if(_0x174df8[_0x5cea7a(0xaa)]==='host'){await _0x3280ff(_0x174df8[_0x5cea7a(0x105)],{'runnerUrl':_0x174df8[_0x5cea7a(0x148)],'backendUrl':_0x174df8[_0x5cea7a(0xff)],'interopPath':_0x174df8['interopPath'],'workerId':_0x174df8[_0x5cea7a(0x9e)]});return;}if(_0x174df8['cleanup']){await pe();return;}await Ae(_0x174df8);}var Ue=process.env.NODE_ENV===_0x2154f3(0x122)||!!process.env.JEST_WORKER_ID;Ue||Te()['catch'](_0x5b7440=>{const _0x5a766d=_0x2154f3;console[_0x5a766d(0xf4)](_0x5b7440[_0x5a766d(0xe4)]||_0x5b7440[_0x5a766d(0x10a)]||_0x5b7440),process[_0x5a766d(0x7a)](0x1);});export{te as CARTOGRAPHER_SKILLS,N as EFFORT_TIERS,re as IMPLICIT_STDIN_IDLE_MS,R as buildInitOptions,Te as main,ne as parseArgs,se as readCliVersion,ae as resolvePrompt};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/delegate-cli",
3
- "version": "1.202.0",
3
+ "version": "1.202.1",
4
4
  "description": "UiPath Delegate CLI - drive the Delegate agent from the terminal. Wraps @uipath/delegate-sdk; installing this package pulls the SDK in — no separate install.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "commonjs",
@@ -22,7 +22,7 @@
22
22
  "publish:npmjs": "npm publish --@uipath:registry=https://registry.npmjs.org/ --access public --ignore-scripts"
23
23
  },
24
24
  "dependencies": {
25
- "@uipath/delegate-sdk": "1.202.0"
25
+ "@uipath/delegate-sdk": "1.202.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@types/node": "^22.0.0",