@uipath/delegate-cli 1.203.0-preview.20260929135425 → 1.203.0-preview.20261005112239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +338 -15
- package/dist/cli.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -38,6 +38,9 @@ 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 -p "<prompt>" --output-format json|stream-json
|
|
42
|
+
One turn, JSON-only stdout (result object, or NDJSON
|
|
43
|
+
events then the result); exit 1 when the turn fails
|
|
41
44
|
delegate-cli login [--env NAME | --url BASE] [--tenant NAME]
|
|
42
45
|
OAuth browser login (--env or --url required on FIRST
|
|
43
46
|
login; afterwards defaults to the saved login's
|
|
@@ -47,10 +50,49 @@ delegate-cli tenant [NAME] List the organization's tenants, or switch
|
|
|
47
50
|
login to NAME — no browser round-trip
|
|
48
51
|
delegate-cli logout Remove the saved CLI login
|
|
49
52
|
delegate-cli whoami Show the current login (org, tenant, token expiry)
|
|
50
|
-
delegate-cli models [--env NAME] List LLM models available on the tenant
|
|
53
|
+
delegate-cli models [--env NAME] List LLM models available on the tenant, with
|
|
54
|
+
any BYO configuration warning per model
|
|
55
|
+
delegate-cli sessions [list] [--page N] [--limit N] [--include-subagents]
|
|
56
|
+
List your backend chat sessions, most recently
|
|
57
|
+
active first
|
|
58
|
+
delegate-cli sessions show|delete ID Show one session's title and owner, or delete it
|
|
59
|
+
with its messages and sub-agents (no prompt)
|
|
60
|
+
delegate-cli sessions rename ID TITLE
|
|
61
|
+
Rename a session (1-500 characters)
|
|
62
|
+
delegate-cli sessions cancel ID --turn TURN
|
|
63
|
+
Cancel turn TURN running on session ID in another
|
|
64
|
+
process; exits 1 when no such turn is in progress
|
|
65
|
+
delegate-cli sessions fork ID [MESSAGE]
|
|
66
|
+
Copy session ID into a new session, up to and
|
|
67
|
+
including message MESSAGE (default: all of it)
|
|
51
68
|
delegate-cli check [--env NAME] [--headless]
|
|
52
|
-
Verify auth, backend
|
|
53
|
-
prompt; exits 1 when
|
|
69
|
+
Verify auth, backend readiness, backend and
|
|
70
|
+
interop without sending a prompt; exits 1 when
|
|
71
|
+
any check fails
|
|
72
|
+
delegate-cli usage [--session ID] Quota and spend: licensing quota, monthly spend and
|
|
73
|
+
cap, Cartographer allowance
|
|
74
|
+
delegate-cli usage activity|daily [--days N]
|
|
75
|
+
Activity totals, or per-day usage, over the last N
|
|
76
|
+
days (1-365, default 30)
|
|
77
|
+
delegate-cli evaluate|rerank|verify FILE|- [--model ID]
|
|
78
|
+
Stateless typed judgments: POST the JSON request in
|
|
79
|
+
FILE (or stdin) to /v1/completions/<command> and print
|
|
80
|
+
the answers; exits 1 when the backend rejects it
|
|
81
|
+
delegate-cli complete --json-schema FILE [--model ID] [--session ID] "<prompt>"|-
|
|
82
|
+
One structured completion, no agent turn: print the
|
|
83
|
+
JSON object matching the schema in FILE; exits 1
|
|
84
|
+
when the output fails the schema (422)
|
|
85
|
+
delegate-cli --json-schema FILE "<prompt>"
|
|
86
|
+
One turn, then its result extracted as JSON matching
|
|
87
|
+
the schema in FILE; exits 1 when extraction fails
|
|
88
|
+
delegate-cli transcribe FILE|- Speech-to-text (Whisper): print the text of the audio
|
|
89
|
+
in FILE (or stdin with -)
|
|
90
|
+
delegate-cli org-users QUERY Search your organization's users by name or email
|
|
91
|
+
prefix, for delegations create --to
|
|
92
|
+
delegate-cli delegations create --session ID [--to WHO] [--summary TEXT] "<task>"|-
|
|
93
|
+
Hand a task to a colleague (or print a claimable link)
|
|
94
|
+
delegate-cli delegations pending|list|show|claim|complete|accept|dismiss|cancel|delete ...
|
|
95
|
+
Follow a delegation through; see Delegating to people
|
|
54
96
|
delegate-cli host [flags] Run this PC as a remote worker until Ctrl+C
|
|
55
97
|
delegate-cli host install [flags] Auto-start the host at login (macOS/Windows)
|
|
56
98
|
delegate-cli host uninstall Remove auto-start
|
|
@@ -64,13 +106,224 @@ delegate-cli --help
|
|
|
64
106
|
|
|
65
107
|
When both stdin and stdout are terminals, the CLI starts an interactive conversation. An optional prompt is sent first; otherwise it waits at `You> `. Enter sends a message, blank lines are ignored, and replies run sequentially in the same session. Each entered line is a separate message; use piped input or `-` for a multiline prompt.
|
|
66
108
|
|
|
67
|
-
Use `/exit` or EOF (Ctrl+D on an empty input line) to finish. EOF lets an active turn finish before exiting. Ctrl+C stops the CLI and exits with code 130; during initialization it waits for setup to settle before cleaning up. A second Ctrl+C forces immediate exit. The SDK and interop are cleaned up on exit, subject to `--keep-alive`.
|
|
109
|
+
Use `/exit` or EOF (Ctrl+D on an empty input line) to finish. EOF lets an active turn finish before exiting. Ctrl+C stops the CLI and exits with code 130; during a turn it first cancels the turn on the backend too (see [Cancelling a turn](#cancelling-a-turn)), so the turn does not keep running server-side; during initialization it waits for setup to settle before cleaning up. A second Ctrl+C forces immediate exit. The SDK and interop are cleaned up on exit, subject to `--keep-alive`.
|
|
68
110
|
|
|
69
111
|
`--print` / `-p` sends one prompt and exits after the response and any tool execution. This mode is also automatic when stdin **or** stdout is not a terminal, or when the prompt is `-`. Piped lines form one prompt, not separate turns. Missing input in one-turn mode exits with code 2.
|
|
70
112
|
|
|
71
113
|
The CLI prints the session ID to stderr when a session starts. Resume later with `delegate-cli --session <id>`, or send one follow-up with `delegate-cli --print --session <id> "..."`. Repeat the desired project, working-directory, model and tool options when starting a new invocation. The SDK reuses the session; the backend stores conversation history. A project ID shares local files but does not preserve the conversation by itself. Fatal errors exit after cleanup; the session ID can be used to resume.
|
|
72
114
|
|
|
73
|
-
Assistant responses go to stdout; terminal prompts, session IDs and progress go to stderr. `--verbose` additionally puts SDK diagnostics on stdout.
|
|
115
|
+
Assistant responses go to stdout; terminal prompts, session IDs and progress go to stderr. `--verbose` additionally puts SDK diagnostics on stdout (on stderr under `--output-format json | stream-json`).
|
|
116
|
+
|
|
117
|
+
### Machine-readable output (`--output-format`)
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
delegate-cli -p "Summarise my inbox" --output-format text # default: the answer as text
|
|
121
|
+
delegate-cli -p "Summarise my inbox" --output-format json # one JSON object on exit
|
|
122
|
+
delegate-cli -p "Summarise my inbox" --output-format stream-json # NDJSON: one event per line, then the result
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Under `json` and `stream-json`, **stdout carries only JSON**, one value per line. Everything else the process would print there — SDK and framework logs, `--verbose` diagnostics, `--help` text — is redirected to stderr, together with the backend line, progress and errors. Both formats imply `--print`: they run exactly one turn and never open the interactive conversation, even in a terminal. A missing prompt is still a usage error (exit 2, nothing on stdout).
|
|
126
|
+
|
|
127
|
+
`json` prints one result object when the turn ends:
|
|
128
|
+
|
|
129
|
+
```json
|
|
130
|
+
{"type":"result","sessionId":"4f0c…","text":"You have 3 unread emails…","isError":false,"usage":{"promptTokens":18342,"completionTokens":611,"promptTokensCached":15020,"cacheCreationTokens":0,"turnTokenUnits":0,"rounds":3},"toolCalls":2,"durationMs":14873}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
| Field | Meaning |
|
|
134
|
+
|---|---|
|
|
135
|
+
| `sessionId` | Session the turn ran in — pass it to `--session` to continue. `null` if the run failed before a session existed. |
|
|
136
|
+
| `turnId` | Backend id of the turn's last round (see `turn_start` below). Absent when none was announced, e.g. the run failed before the stream opened. |
|
|
137
|
+
| `text` | The turn's final answer (for a failed turn, the error text). |
|
|
138
|
+
| `isError` | `true` when the turn failed: it threw, it ended on an agent error, or the CLI failed before the turn (auth, backend URL, initialize). |
|
|
139
|
+
| `error` | Why it failed. Present only when `isError` is `true`. |
|
|
140
|
+
| `usage` | Token usage **summed over every backend round of the turn** (a turn that runs tools calls the backend once per step); `rounds` is how many were summed. `null` when the backend reported none. |
|
|
141
|
+
| `toolCalls` | Distinct tool calls the turn made. |
|
|
142
|
+
| `durationMs` | Wall-clock duration of the turn, not counting startup and sign-in. |
|
|
143
|
+
| `structured` | With `--json-schema`: the object extracted from the turn. See [Structured output from a prompt](#structured-output-from-a-prompt---json-schema). |
|
|
144
|
+
| `structuredError` | With `--json-schema`: `{"message","reason","status"}` when the extraction failed (exit 1). |
|
|
145
|
+
|
|
146
|
+
`stream-json` writes every agent event as it happens — `session_start`, `turn_start`, `thinking`, `message`, `tool_call`, `tool_result`, `error`, `done` — with the same fields the SDK's `AgentEvent` carries, then the same result object as its last line. `message` and `thinking` events are streamed deltas: concatenate their `content`. `turn_start` carries the backend `turnId` another process passes to `delegate-cli sessions cancel <sessionId> --turn <turnId>` (see [Cancelling a turn](#cancelling-a-turn)); each backend round of the turn (one per tool-result round trip) has its own id, so cancel with the latest.
|
|
147
|
+
|
|
148
|
+
```json
|
|
149
|
+
{"type":"session_start","sessionId":"4f0c…"}
|
|
150
|
+
{"type":"turn_start","sessionId":"4f0c…","turnId":"9b2e…"}
|
|
151
|
+
{"type":"tool_call","toolName":"ReadFile","toolId":"call_1","toolArgs":{"path":"inbox.md"}}
|
|
152
|
+
{"type":"tool_result","toolName":"ReadFile","toolId":"call_1","toolResult":"…","toolStatus":"completed"}
|
|
153
|
+
{"type":"message","content":"You have 3 "}
|
|
154
|
+
{"type":"message","content":"unread emails…"}
|
|
155
|
+
{"type":"done","sessionId":"4f0c…"}
|
|
156
|
+
{"type":"result","sessionId":"4f0c…","text":"You have 3 unread emails…","isError":false,"usage":{…},"toolCalls":1,"durationMs":9120}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
The same shapes are exported by the SDK (`agentEventToJsonLine`, `runTurnForResult`, `TurnResult`), so a program driving `DelegateAgent` directly can produce identical output.
|
|
160
|
+
|
|
161
|
+
Every subcommand that prints a result honours the flag too, printing one JSON value; `login`, `logout`, `tenant` and `host` refuse it with exit 2:
|
|
162
|
+
|
|
163
|
+
- `models`: the model array (`[{"id":"claude_sonnet_5","name":"Claude Sonnet 5"}, …]`, `[]` when none). Entries carry the SDK `ModelInfo` fields the backend sent (`description`, `locked`, `lockReason`, …), and a model with a BYO configuration gap also carries `byoWarning`.
|
|
164
|
+
- `whoami`: the identity (`source`, `baseUrl`, `deployment`, `organization`, `tenant`, `tokenExpiresAt` — never a token).
|
|
165
|
+
- `check`: the health result (`{"ok":…,"checks":[{"name","status","detail"}]}`), one entry each for `auth`, `readiness`, `backend` and `interop`.
|
|
166
|
+
- `sessions`: the page (`{"sessions":[{"id","title","createdAt","updatedAt","parentSessionId","storageMode","productId","projectId","metadata"}],"page":1,"pageSize":30,"isLastPage":true}`).
|
|
167
|
+
- `sessions show|rename|delete <id>`: `{"id","title","userId","organizationId","delegationId"}`, `{"id","title"}` and `{"id","deleted":true}`. See [Managing one session](#managing-one-session).
|
|
168
|
+
- `sessions cancel`: the outcome (`{"sessionId","turnId","cancelled":true}`; `cancelled: false` also exits 1).
|
|
169
|
+
- `sessions fork`: the new session, in the same shape as a `sessions` row. See [Forking a session](#forking-a-session).
|
|
170
|
+
- `usage`: the quota summary or the activity/daily report (see [Quota and spend](#quota-and-spend)).
|
|
171
|
+
- `evaluate` / `rerank` / `verify`: the backend response unchanged (see [Typed judgments](#typed-judgments-evaluate-rerank-verify)).
|
|
172
|
+
- `complete`: `{"structured":{…},"usage":{…}|null}` (see [Structured completion](#structured-completion-complete)).
|
|
173
|
+
- `transcribe`: the backend response, `{"text":"…"}` (see [Speech-to-text](#speech-to-text-transcribe)).
|
|
174
|
+
- `org-users`: `[{"userId","displayName","email"}]`.
|
|
175
|
+
- `delegations`: the SDK result of the action — `list` a `Delegation` array, `pending` `{"delegation","pendingResults"}`, `show` the briefing, `create` `{"delegationId","deliveryMode","deepLink","assignedUser","sourceMessageId"}`, `claim` the briefing plus `sessionId`, `complete` `{"delegationId","alreadyCompleted"}`, `accept` `{"delegationId","messageId","alreadyAccepted"}`, and `{"delegationId","dismissed"|"cancelled"|"deleted":true}` (see [Delegating to people](#delegating-to-people-delegations-org-users)).
|
|
176
|
+
|
|
177
|
+
Exit codes:
|
|
178
|
+
|
|
179
|
+
| Code | When |
|
|
180
|
+
|---|---|
|
|
181
|
+
| 0 | Success. |
|
|
182
|
+
| 1 | The turn ended in error (`isError: true`); a `--json-schema` extraction failed (`structuredError`); `check` found a failing check; the backend rejected an `evaluate` / `rerank` / `verify` / `complete` / `transcribe` request; any other runtime failure. |
|
|
183
|
+
| 2 | Usage error — unknown flag, bad `--output-format` or `--days` value, unknown `usage` view, missing prompt, audio `transcribe` refuses before uploading. Nothing is written to stdout. |
|
|
184
|
+
| 130 | Interrupted with Ctrl+C. |
|
|
185
|
+
|
|
186
|
+
### Managing one session
|
|
187
|
+
|
|
188
|
+
`sessions show|rename|delete <id>` act on one backend session by id, through the SDK's `getSession`, `renameSession` and `deleteSession`:
|
|
189
|
+
|
|
190
|
+
- `show <id>` prints the title, the owner's user id and organization, and the delegation id of a session claimed from a delegation link. A session another user shared in your organization is shown too. Use `sessions` for timestamps and sub-agent links.
|
|
191
|
+
- `rename <id> <title>` sets the title. Everything after the id is the title, so quotes are optional.
|
|
192
|
+
- `delete <id>` deletes the session permanently, with its messages and sub-agent sessions. It does not ask for confirmation, because the CLI never prompts outside a conversation, so check the id first.
|
|
193
|
+
|
|
194
|
+
An id the backend does not know prints `Session <id> not found.` on stderr and exits 1. A missing id or title, an extra operand, or `--page` / `--limit` / `--include-subagents` exits 2 before any request. Rename and delete work only on your own sessions.
|
|
195
|
+
|
|
196
|
+
### Forking a session
|
|
197
|
+
|
|
198
|
+
`sessions fork <id> [<message-id>]` copies one of your sessions into a new session through the SDK's `forkSession`. The source is not changed. With a message id, the copy ends at that message, inclusive. Without one, it copies the whole conversation. The new id goes to stdout and a `Continue it with: delegate-cli --session <new-id> "<prompt>"` hint goes to stderr. The fork keeps the source's title; change it with `sessions rename`.
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
fork=$(npx delegate-cli sessions fork <id> --output-format json | jq -r .id)
|
|
202
|
+
npx delegate-cli --headless --session "$fork" "Try the other approach"
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
The message id is a backend message id, the `id` of a message in the SDK's `getSessionMessages()` (see [Forking a session at a message](../sdk/README.md#forking-a-session-at-a-message)). A 404 means no such session, a session with no messages, or a message id that is not in it. It prints that on stderr and exits 1. A missing id, an extra operand, or a list flag exits 2 before any request. Only remote sessions can be forked, not a Delegate desktop conversation kept in the app's local store.
|
|
206
|
+
|
|
207
|
+
### Typed judgments (`evaluate`, `rerank`, `verify`)
|
|
208
|
+
|
|
209
|
+
Stateless, one-shot judgments from the backend — no agent, no session, no interop. Each command reads one JSON request from a file (or stdin with `-`, or a pipe) and posts it unchanged to `/v1/completions/evaluate`, `/rerank` or `/verify`:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
cat > claims.json <<'EOF'
|
|
213
|
+
{"claims": [{"id": "c1", "claim": "The invoice is paid.", "evidence": {"status": "paid"}}]}
|
|
214
|
+
EOF
|
|
215
|
+
delegate-cli verify claims.json
|
|
216
|
+
# Model gpt_5_6_luna (…), 412 tokens
|
|
217
|
+
# Rubric …
|
|
218
|
+
# c1: supported (confidence 0.97)
|
|
219
|
+
|
|
220
|
+
echo '{"query": "late payment", "candidates": [{"id": "a", "content": "…"}, {"id": "b", "content": "…"}], "top_k": 1}' \
|
|
221
|
+
| delegate-cli rerank - --output-format json # the raw response on stdout
|
|
222
|
+
delegate-cli evaluate request.json --model claude_sonnet_5
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
- The request is the backend's snake_case JSON (`questions` with a `type` of `probability`, `choice` or `score`; `candidates` and `top_k`; `claims`). The "Evaluate, rerank, verify" section of the `@uipath/delegate-sdk` README lists the fields.
|
|
226
|
+
- `--model <id>` replaces the request's `model`. Without it the request's own `model`, or the server default, applies (the `MODEL` env var does not).
|
|
227
|
+
- Text mode prints the model, then one line per answer, ranked candidate or verdict. `--output-format json` prints the backend response as it came.
|
|
228
|
+
- A rejected request prints one line on stderr, such as `verify failed (422 invalid_request): body.claims: List should have at least 1 item`, and exits 1. A missing, unreadable or non-object request exits 2 before any call.
|
|
229
|
+
|
|
230
|
+
### Structured completion (`complete`)
|
|
231
|
+
|
|
232
|
+
One LLM call that answers a prompt with a JSON object matching a JSON schema — no agent turn, no tools, no interop (`/v1/completions/structured`, SDK `complete`):
|
|
233
|
+
|
|
234
|
+
```bash
|
|
235
|
+
cat > invoice.schema.json <<'EOF'
|
|
236
|
+
{"type": "object", "properties": {"total": {"type": "number"}, "currency": {"type": "string"}}, "required": ["total", "currency"]}
|
|
237
|
+
EOF
|
|
238
|
+
delegate-cli complete --json-schema invoice.schema.json "Extract the total: Invoice 42, total due 1,200.00 EUR"
|
|
239
|
+
# {
|
|
240
|
+
# "total": 1200,
|
|
241
|
+
# "currency": "EUR"
|
|
242
|
+
# }
|
|
243
|
+
|
|
244
|
+
pdftotext invoice.pdf - | delegate-cli complete --json-schema invoice.schema.json - --output-format json
|
|
245
|
+
# {"structured":{"total":1200,"currency":"EUR"},"usage":{"model":"gpt-5.6-luna",…}}
|
|
246
|
+
delegate-cli complete --json-schema verdict.schema.json --session <id> "Did the run succeed?"
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
- The prompt is the positional, or stdin with `-` or a pipe. `--json-schema FILE` is required and must hold a JSON object. The backend names the model's tool after the schema's top-level `title`; a schema without a usable one (letters, digits, `_` and `-`, at most 64 characters) is sent titled `structured_output`. The same applies to `--json-schema` on a prompt.
|
|
250
|
+
- `--session ID` loads that backend session's history as context before the prompt, so you can extract an answer from a finished run. `--model ID` picks the model (it needs structured-output support); without it the `MODEL` env var, then `gpt_5_6_luna`, apply, as for a prompt.
|
|
251
|
+
- Text mode prints the structured object as indented JSON on stdout — pipe it to `jq`. `--output-format json` prints `{structured, usage}` on one line.
|
|
252
|
+
- When the model output fails the schema the command prints one line on stderr, such as `complete failed (422 schema_validation): LLM failed to generate valid structured output: …`, and exits 1; so does any other rejection (`413 context_too_large` when the session history is too long, `404 session_not_found`, …). A missing or invalid schema file, or no prompt, exits 2 before any call.
|
|
253
|
+
|
|
254
|
+
### Structured output from a prompt (`--json-schema`)
|
|
255
|
+
|
|
256
|
+
`--json-schema FILE` on a prompt runs the agent turn as usual, then extracts its result as a JSON object matching the schema — a second LLM call to `/v1/completions/structured` over the turn's session (SDK `sendMessage(prompt, { outputSchema })`):
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
delegate-cli --json-schema invoice.schema.json "Open invoice.pdf in Downloads and read the total"
|
|
260
|
+
# …the agent's answer, streamed as usual…
|
|
261
|
+
# {
|
|
262
|
+
# "total": 1200,
|
|
263
|
+
# "currency": "EUR"
|
|
264
|
+
# }
|
|
265
|
+
|
|
266
|
+
delegate-cli --json-schema invoice.schema.json --output-format json "Read the total of invoice.pdf"
|
|
267
|
+
# {"type":"result",…,"text":"The total is 1,200.00 EUR.","isError":false,…,"structured":{"total":1200,"currency":"EUR"}}
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
- The flag implies `--print`: one turn, no conversation.
|
|
271
|
+
- Text mode prints the answer as usual, then the object as indented JSON on stdout. `--output-format json` and `stream-json` put it in the result object as `structured`.
|
|
272
|
+
- When extraction fails — `422 schema_validation` when no output matches the schema, `413 context_too_large` when the session is too long even after summarization, … — text mode prints `Structured output failed: …` on stderr, the JSON formats carry `structuredError`, and the command exits 1. A failed turn skips the extraction and also exits 1.
|
|
273
|
+
- The extraction runs on the agent's model (`--model`, `MODEL`, or `gpt_5_6_luna`), so that model needs structured-output support. It costs a second LLM call per run.
|
|
274
|
+
- A missing or invalid schema file exits 2 before the agent starts.
|
|
275
|
+
|
|
276
|
+
### Attachments (`--attach`)
|
|
277
|
+
|
|
278
|
+
`--attach PATH` sends a file or folder with the first message, as the Delegate app sends attached files (SDK `sendMessage(prompt, { attachments })`). Repeat it for more:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
delegate-cli --print --attach invoice.pdf --attach po.xlsx "Do the invoice and the purchase order match?"
|
|
282
|
+
delegate-cli --attach screenshot.png # conversation: the first line you type carries it
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
- Images go inline; printable text goes inline up to 16,000 characters; PDFs, Office documents, archives and other binaries go as a reference to the file, which the agent opens with its own tools; a folder goes as its path.
|
|
286
|
+
- One 30 MiB cap covers all files of a message. A larger file goes as a reference to the file, unread, and when the inline files add up to more than 24 MiB the oldest turn into references until the message fits.
|
|
287
|
+
- In a conversation only the first message carries attachments — the prompt given on the command line, or the first line typed. Later messages carry none of their own, but the first message's files stay in context for the rest of the session.
|
|
288
|
+
- Relative paths resolve against the current directory. A path that does not exist, or the flag on a subcommand, exits 2 before any auth or interop work; a file that cannot be read fails the turn before it starts (exit 1).
|
|
289
|
+
|
|
290
|
+
### Speech-to-text (`transcribe`)
|
|
291
|
+
|
|
292
|
+
Transcribe an audio file with the backend's Whisper route (`/v1/transcription`, the one the desktop app's voice input uses) and print the text:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
delegate-cli transcribe standup.m4a
|
|
296
|
+
# Ship it on Friday.
|
|
297
|
+
|
|
298
|
+
cat memo.wav | delegate-cli transcribe - --output-format json # {"text":"…"}
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
- Formats: mp3, mp4, mpeg, mpga, m4a, wav, webm — named by the file's extension; for stdin (`-`) the format is detected from the bytes. At most 25 MiB. There is no language option; Whisper detects it.
|
|
302
|
+
- Audio the CLI refuses before uploading (unreadable file, unsupported format, empty, over 25 MiB) prints the reason and exits 2. A backend rejection prints one line on stderr, such as `Transcription failed (400 unavailable): Audio transcription is not supported in Automation Suite.`, and exits 1.
|
|
303
|
+
|
|
304
|
+
### Delegating to people (`delegations`, `org-users`)
|
|
305
|
+
|
|
306
|
+
Hand a task to a colleague from a script or robot, and take the answer back — the Delegate app's "delegate to a person" flow. See the SDK README's "Delegating a task to a person" for the lifecycle and every error code.
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
delegate-cli org-users ana # ana@acme.com Ana Pop
|
|
310
|
+
delegate-cli delegations create --session "$SID" --to ana@acme.com \
|
|
311
|
+
--summary "Ledger reconciled; one 1,200 EUR variance left." "Approve the write-off?"
|
|
312
|
+
# Delegated 3333…-… to Ana Pop <ana@acme.com>.
|
|
313
|
+
delegate-cli delegations pending "$SID" --output-format json # poll: answers awaiting acceptance
|
|
314
|
+
delegate-cli delegations accept 3333…-… # the answer joins session $SID
|
|
315
|
+
|
|
316
|
+
# Ana's side (her own login):
|
|
317
|
+
delegate-cli delegations show 3333…-… # the briefing, without claiming
|
|
318
|
+
delegate-cli delegations claim 3333…-… # prints the session to work it in
|
|
319
|
+
delegate-cli delegations complete 3333…-… "Approved, see the memo."
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
- `create` needs `--session` (a remote session you own). `--to` takes an email, or a name that matches exactly one colleague; without it the CLI prints a `delegate://delegation/…` link anyone in the organization can `show` or `claim`. The task is the rest of the line (`-` reads it from stdin), and so is the answer for `complete`.
|
|
323
|
+
- Also `delegations list PROJECT` (every delegation targeting a backend project), `dismiss ID` (drop an answer), `cancel ID` (withdraw a live one) and `delete ID`.
|
|
324
|
+
- There is no push notification: poll `delegations pending` on the source session (or the backend's `/v1/notifications` feed).
|
|
325
|
+
- Missing operands exit 2 before any request. A refusal — no such person, `already_claimed`, `expired`, direct assignment not enabled for the organization (`not_found`), … — prints one line on stderr, such as `Could not claim delegation (409): Someone else already claimed this delegation.`, and exits 1.
|
|
326
|
+
|
|
74
327
|
|
|
75
328
|
### Machine access
|
|
76
329
|
|
|
@@ -94,28 +347,39 @@ Three levels of machine access, independent of conversation mode:
|
|
|
94
347
|
| `--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. |
|
|
95
348
|
| `--backend <url>` | — | Full backend URL — overrides `--env` and `BACKEND_URL`. |
|
|
96
349
|
| `--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>`. |
|
|
97
|
-
| `--model <id>` | `
|
|
350
|
+
| `--model <id>` | `gpt_5_6_luna` | LLM id (use `delegate-cli models` to discover). Also via `MODEL` env. For a prompt, the id is checked against the tenant's catalog before interop starts: an unknown or plan-locked id fails and lists the valid ids. If the catalog cannot be read, the run continues with a warning. For `evaluate` / `rerank` / `verify` it replaces the request's `model` (no `MODEL` fallback). `complete` and a `--json-schema` extraction use the same model as a prompt. |
|
|
98
351
|
| `--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. |
|
|
99
352
|
| `--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. |
|
|
100
353
|
| `--keep-alive` | off | Reuse / leave interop running across invocations. Skips the 10–20 s cold start on the next call. |
|
|
101
354
|
| `--cleanup` | — | Force-stop every running interop (from `~/.delegate-sdk/interop*.pid`, one per deployment) and exit. |
|
|
102
355
|
| `--no-connections` | off | Disable orchestrator ConnectionService (silences 404 noise on tenants without orchestrator). |
|
|
103
356
|
| `--no-security` | off | Disable tool security wrapper. Debug only. |
|
|
357
|
+
| `--no-memory` | off | Do not send the Delegate app's local long-term memories with each turn (SDK `enableMemory: false`). By default the CLI reads the same `Memories` folder the desktop app uses, and the model may save new preferences and learnings there with its file tools. |
|
|
104
358
|
| `--preload-skill <name>` | — | Preload a skill into the session before the first model turn (repeatable; SDK `preloadSkills`). A name given twice is preloaded once. |
|
|
105
|
-
| `--cartographer` | off | Cartographer engagement preset — shorthand for `--no-computer-use --preload-skill business-analysis --preload-skill project-
|
|
106
|
-
| `--project <id>` | — | Bind the session to a project: wiki, plans, `
|
|
359
|
+
| `--cartographer` | off | Cartographer engagement preset — shorthand for `--no-computer-use --preload-skill business-analysis --preload-skill project-task-list --preload-skill knowledge-base`. Add `--project` / `--working-dir` to say where the engagement's files live, and further `--preload-skill` flags for anything extra; a skill the preset already covers is **not** preloaded twice, whichever side of the flag it is named on. Pass `--headless` alongside it to drop interop as well (`--headless` always wins over the preset's `--no-computer-use`). |
|
|
360
|
+
| `--project <id>` | — | Bind the session to a project: wiki, plans, `task-list.md` and `progress.yaml` live under `<state root>/projects/<id>/` (the state root is `--working-dir`, else `~/.aria-sdk`), the preloaded skills' declared project files are copied there on the first message, and the project context (`ProjectId`, `TaskListPath`, `ProgressPath`) is injected into every turn (SDK `projectId`). Client-side routing key only — the CLI never links a backend project row. |
|
|
107
361
|
| `--working-dir <path>` | `~/.aria-sdk` for state; process cwd for shells | Shell cwd for the agent and root for SDK-local state (SDK `workingDirectory`). Relative paths resolve against the current directory; **the directory is created if missing**. |
|
|
108
362
|
| `--skills-path <path>` | — | Extra bundled-skills directory, merged with `DELEGATE_BUNDLED_SKILLS_PATH` and the installed desktop app's skills (SDK `bundledSkillsPath`). Relative paths resolve against the current directory. |
|
|
109
363
|
| `--effort <tier>` | model's recommended tier | Reasoning effort: `low` / `medium` / `high` / `xhigh` / `max` (SDK `effort`). Any other value exits with code 2. |
|
|
110
|
-
| `--session <id>` | server-assigned | Pin the session id (SDK `sessionId`). Must be an existing backend session,
|
|
364
|
+
| `--session <id>` | server-assigned | Pin the session id (SDK `sessionId`). Must be an existing backend session: the backend assigns session ids, so an id it does not know fails the turn (exit 1) before anything is sent. Reuse it across invocations to continue one conversation — the agent then remembers earlier turns. Note that `--preload-skill` is stamped when the SDK *creates* a session, so passing it alongside `--session` does not reconfigure an existing one. For `complete`, the session whose history is sent as context. |
|
|
365
|
+
| `--json-schema <file>` | — | JSON schema file the structured answer must match: for `complete`, and for a prompt (the turn's result is extracted after it runs; implies `--print`). On another command the flag exits with code 2. |
|
|
366
|
+
| `--attach <path>` | — | (prompts only) File or folder sent with the first message (repeatable; SDK `sendMessage(prompt, { attachments })`). See [Attachments](#attachments---attach). |
|
|
367
|
+
| `--output-format <fmt>` | `text` | `text` / `json` / `stream-json`. The JSON formats keep stdout JSON-only, imply `--print`, and exit 1 when the turn ends in error. Also honoured by every subcommand that prints a result. See [Machine-readable output](#machine-readable-output---output-format). |
|
|
368
|
+
| `--days <n>` | 30 | (`usage activity` / `usage daily` only) Look-back window in days, a whole number from 1 to 365; anything else, or the flag on another command, exits with code 2. |
|
|
111
369
|
| `-q`, `--quiet` | off | Suppress 🤔 thinking on stderr. |
|
|
112
|
-
| `--verbose` | off | Print SDK and framework diagnostics (SDK `verbose`). Independent of `-q`.
|
|
370
|
+
| `--verbose` | off | Print SDK and framework diagnostics (SDK `verbose`). Independent of `-q`. In `text` output they share stdout with the answer, so do not pipe the answer with this on; under the JSON formats they go to stderr. |
|
|
113
371
|
| `-v`, `--version` | — | Print the installed CLI version. |
|
|
114
372
|
| `--runner-url <url>` | — | (host) Runner worker WS URL. Required; or `CONTROL_PLANE_WS_URL` env. |
|
|
115
373
|
| `--interop <path>` | — | (host) Interop binary path; or `INTEROP_EXECUTABLE_PATH` env. Absent → registration/discovery only, tool execution disabled. |
|
|
116
374
|
| `--worker-id <id>` | hostname | (host) Stable worker identity; or `WORKER_ID` env. |
|
|
375
|
+
| `--page <n>` | `1` | (`sessions` only) Page of the session list to show. |
|
|
376
|
+
| `--limit <n>` | `30` | (`sessions` only) Sessions per page, 1–100. |
|
|
377
|
+
| `--include-subagents` | off | (`sessions` only) Also list sub-agent sessions. They are hidden by default, as in the desktop app's history, and are marked `(sub-agent of <id>)` in the table. |
|
|
378
|
+
| `--turn <id>` | — | (`sessions cancel` only, required) Backend turn id to cancel. |
|
|
379
|
+
| `--to <who>` | — | (`delegations create` only) Assign the task to this person: an email, or a name matching exactly one colleague. Without it the delegation is a shareable link. |
|
|
380
|
+
| `--summary <text>` | empty | (`delegations create` only) The briefing the person starts from. |
|
|
117
381
|
|
|
118
|
-
`--preload-skill`, `--project`, `--session`, `--working-dir`, `--skills-path` and `--
|
|
382
|
+
`--preload-skill`, `--project`, `--session`, `--working-dir`, `--skills-path`, `--effort`, `--days`, `--attach` and `--output-format` require a value — a following flag, long (`--headless`) or short (`-p`), counts as missing and exits with code 2, as does any unknown flag. `--project` must be a single folder-safe segment (letters, digits, spaces, `_`, `-`, `.`, parentheses; at most 64 characters; not starting with `.` or ending with `.` or a space) — anything else exits with code 2 rather than silently routing the engagement's files to the session folder.
|
|
119
383
|
|
|
120
384
|
### Examples
|
|
121
385
|
|
|
@@ -135,21 +399,32 @@ npx delegate-cli --headless "summarize the last release notes"
|
|
|
135
399
|
# Pipe the prompt from stdin
|
|
136
400
|
cat notes.md | npx delegate-cli --headless -
|
|
137
401
|
|
|
402
|
+
# Script it: the answer and its token usage as JSON (logs stay on stderr)
|
|
403
|
+
npx delegate-cli --headless --output-format json "what is 2+2?" | jq '.text, .usage'
|
|
404
|
+
|
|
138
405
|
# Resume the session ID printed by an earlier invocation
|
|
139
406
|
npx delegate-cli --headless --session <id>
|
|
140
407
|
|
|
408
|
+
# Find a session to resume: the newest 30, then the next page
|
|
409
|
+
npx delegate-cli sessions
|
|
410
|
+
npx delegate-cli sessions --page 2 --output-format json | jq -r '.sessions[] | "\(.id) \(.title)"'
|
|
411
|
+
|
|
412
|
+
# Rename a session, or delete it (permanently, without a prompt)
|
|
413
|
+
npx delegate-cli sessions rename <id> "Invoice intake, Q3"
|
|
414
|
+
npx delegate-cli sessions delete <id>
|
|
415
|
+
|
|
141
416
|
# Project-scoped engagement, headless: state under ~/engagements/projects/invoice-approval,
|
|
142
417
|
# with the skills the task needs preloaded before the first model turn. Run the same
|
|
143
418
|
# command again later to reuse project files; add --session <id> to resume chat history.
|
|
144
419
|
npx delegate-cli --headless --project invoice-approval --working-dir ~/engagements \
|
|
145
|
-
--preload-skill business-analysis --preload-skill knowledge-base --preload-skill project-
|
|
420
|
+
--preload-skill business-analysis --preload-skill knowledge-base --preload-skill project-task-list \
|
|
146
421
|
"Start the engagement."
|
|
147
422
|
|
|
148
423
|
# Same engagement, but the agent needs to read and write real files. --no-computer-use
|
|
149
424
|
# keeps interop (so ReadFile/WriteFile/Office/PDF work) while dropping screenshots and
|
|
150
425
|
# the window list — no image tokens, and nothing about the desktop leaves the machine.
|
|
151
426
|
npx delegate-cli --no-computer-use --project invoice-approval --working-dir ~/engagements \
|
|
152
|
-
--preload-skill business-analysis --preload-skill knowledge-base --preload-skill project-
|
|
427
|
+
--preload-skill business-analysis --preload-skill knowledge-base --preload-skill project-task-list \
|
|
153
428
|
"Read the AS-IS notes and draft the process overview."
|
|
154
429
|
|
|
155
430
|
# The same command as above — --cartographer is shorthand for that whole flag set
|
|
@@ -172,6 +447,54 @@ npx delegate-cli --backend "https://custom.example.com/autopilot-everywhere" "..
|
|
|
172
447
|
|
|
173
448
|
---
|
|
174
449
|
|
|
450
|
+
## Cancelling a turn
|
|
451
|
+
|
|
452
|
+
Ctrl+C during a turn cancels it the way the desktop app's Stop button does — the backend is asked to stop the turn, then the CLI cleans up and exits with code 130. A second Ctrl+C exits at once. With `--output-format json`, the result line still prints, with `isError: true` and `error: "Turn cancelled"`.
|
|
453
|
+
|
|
454
|
+
To cancel a turn another process is running (a scheduled job, a program using the SDK):
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
npx delegate-cli sessions cancel <session-id> --turn <turn-id>
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
The backend cancels only that exact turn, so a late cancel never stops a newer turn in the same session. The turn id comes from the running process: a `turn_start` line of its `--output-format stream-json` output, the `Turn: …` line the CLI prints on stderr in every output format (with this exact command), or `agent.getActiveTurnId()` / the `turn_start` event in an SDK program. Each backend round of a turn has its own id; cancel with the latest. The command prints `Cancel requested…` when the turn was flagged; the backend stops it within a few seconds. When the session has no such turn in progress (already finished, another turn, or not your session), the command says so on stderr and exits 1.
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## Quota and spend
|
|
465
|
+
|
|
466
|
+
`delegate-cli usage` prints the signed-in user's standing, from three read-only Agents Backend calls:
|
|
467
|
+
|
|
468
|
+
```
|
|
469
|
+
Licensing: 42.3% of 200 PU used (resets 2026-10-01T00:00:00+00:00)
|
|
470
|
+
Spending: $12.30 this month of a $50.00 cap
|
|
471
|
+
Cartographer: licensed (gpt_5_6_luna)
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
- **Licensing** (`GET /v1/usage/licensing-summary`): the monthly licensing quota in Platform Units. `limit_enabled: false` means no licensing quota applies to this login. `pct_used` can exceed 100 — usage past the quota spills into an extra pool (`extra_pool_consumed_pu`) rather than being refused. `--session <id>` adds that session's lifetime usage (`session_consumed_pu`).
|
|
475
|
+
- **Spending** (`GET /v1/usage/monthly-spending`): the spend this calendar month (UTC) against the per-user cap. The backend refuses new turns (HTTP 429 `monthly_spending_limit_exceeded`) once `monthly_spend_usd` is above `monthly_limit_usd`, but only while `limit_enabled` is true; a null limit means unlimited.
|
|
476
|
+
- **Cartographer** (`GET /v1/usage/cartographer-allowance`): `not_applicable`, `licensed`, `allowance` or `exhausted`. `exhausted` refuses Cartographer turns only.
|
|
477
|
+
|
|
478
|
+
`delegate-cli usage activity` and `delegate-cli usage daily` report the last `--days` days (default 30): session, cost and token totals per model, or one row per day with usage.
|
|
479
|
+
|
|
480
|
+
With `--output-format json` the summary is one object, `{"licensing":{…},"monthlySpending":{…},"cartographerAllowance":{…}}`, holding the backend's answers unchanged (snake_case fields); `activity` and `daily` print the backend's answer as is. `usage` sets no exit code for being over a limit: no single field means "every run will be refused" — the cap has exemptions, licensing overage is allowed, and the allowance only gates Cartographer. A scheduler decides with `jq -e`, which exits 1 when the expression is false or null:
|
|
481
|
+
|
|
482
|
+
```bash
|
|
483
|
+
# Skip the run once the spending cap is exceeded (the backend then refuses turns).
|
|
484
|
+
npx delegate-cli usage --output-format json | jq -e '
|
|
485
|
+
.monthlySpending | (.limit_enabled | not) or .monthly_limit_usd == null
|
|
486
|
+
or .monthly_spend_usd <= .monthly_limit_usd' >/dev/null || exit 0
|
|
487
|
+
|
|
488
|
+
# Or gate on the licensing quota and, for a Cartographer run, the allowance.
|
|
489
|
+
npx delegate-cli usage --output-format json | jq -e '
|
|
490
|
+
(.licensing | (.limit_enabled | not) or .pct_used < 100)
|
|
491
|
+
and .cartographerAllowance.mode != "exhausted"' >/dev/null || exit 0
|
|
492
|
+
```
|
|
493
|
+
|
|
494
|
+
A failed backend call exits 1 with the status on stderr and nothing on stdout, and `jq -e` then fails too (exit 4, no input), so both examples also skip the run when the limits cannot be read. To tell the two apart, `set -o pipefail` and check the CLI's own exit code.
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
175
498
|
## Run as a remote machine (host mode)
|
|
176
499
|
|
|
177
500
|
`delegate-cli host` registers this PC as a remote worker on a runner control plane and serves tool executions until Ctrl+C — no Electron app needed.
|
|
@@ -214,7 +537,7 @@ To change tenant afterwards, run `delegate-cli tenant <name>` — no browser: to
|
|
|
214
537
|
|
|
215
538
|
`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).
|
|
216
539
|
|
|
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
|
|
540
|
+
`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 four lines — `auth` (token not expired, and its organization and tenant match the backend URL), `readiness` (one unauthenticated `GET /readiness` under the backend URL: the service is up and its database reachable; when it fails the `backend` line is skipped, and a 401/403/404 — a gateway that does not expose it — skips the `readiness` line instead), `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.
|
|
218
541
|
|
|
219
542
|
`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.
|
|
220
543
|
|
|
@@ -236,7 +559,7 @@ export NODE_EXTRA_CA_CERTS=/path/to/cluster-ca.pem # only for a private certif
|
|
|
236
559
|
|
|
237
560
|
npx delegate-cli login --url https://automationsuite.contoso.com --tenant DefaultTenant
|
|
238
561
|
npx delegate-cli whoami # confirms the deployment, org and tenant
|
|
239
|
-
npx delegate-cli check # auth, backend
|
|
562
|
+
npx delegate-cli check # auth, backend readiness and capability, interop, end to end
|
|
240
563
|
```
|
|
241
564
|
|
|
242
565
|
Three things differ from a cloud login:
|
package/dist/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const _0x49986e=_0x4b4e;(function(_0x26631e,_0x4a9ab5){const _0x5e8642=_0x4b4e,_0x79e8ba=_0x26631e();while(!![]){try{const _0x1bc390=-parseInt(_0x5e8642(0x11d))/0x1*(parseInt(_0x5e8642(0xdd))/0x2)+-parseInt(_0x5e8642(0xde))/0x3*(parseInt(_0x5e8642(0xb8))/0x4)+parseInt(_0x5e8642(0x11a))/0x5+-parseInt(_0x5e8642(0xc4))/0x6+parseInt(_0x5e8642(0xf2))/0x7+-parseInt(_0x5e8642(0x105))/0x8+parseInt(_0x5e8642(0x12c))/0x9*(parseInt(_0x5e8642(0x15e))/0xa);if(_0x1bc390===_0x4a9ab5)break;else _0x79e8ba['push'](_0x79e8ba['shift']());}catch(_0x3624ca){_0x79e8ba['push'](_0x79e8ba['shift']());}}}(_0x4ca4,0xbd589));const __dirname=import.meta.dirname;import _0x365385 from'fs';function _0x4b4e(_0x4fe2a9,_0x296c3a){_0x4fe2a9=_0x4fe2a9-0x99;const _0x4ca4d1=_0x4ca4();let _0x4b4ee1=_0x4ca4d1[_0x4fe2a9];return _0x4b4ee1;}import _0x3f0e57 from'path';import{clearLine as _0x4e5368,createInterface as _0x39146b,cursorTo as _0x192aa}from'node:readline';import{BUSINESS_ANALYSIS_PRELOADED_SKILLS as _0x165545,DelegateAgent as _0x21c25e,InteropProcess as _0x252e5f,describeBaseUrlRejection as _0xe86fc5,getAuthFilePath as _0x5c9304,isCloudBaseUrl as _0x33cb75,isSafeProjectFolderSegment as _0x361e19,listTenants as _0xcdc212,loadAndRefreshAuth as _0x1ffeec,loadAndRefreshSdkLogin as _0x446575,parsePlatformBaseUrl as _0x79dcc2,resolveBackendUrl as _0x59c18d,runHealthCheck as _0x51c8ac,runHostCommand as _0x59a4ed,runLoginFlow as _0x51ce48,saveAuthData as _0x3944ef,switchTenant as _0x4237d1,ENV_TO_CLOUD as _0x392a4e}from'@uipath/delegate-sdk';var ee=[_0x49986e(0x13c),'tenant',_0x49986e(0x14f),'host','logout',_0x49986e(0x16e),_0x49986e(0x175)],N=[_0x49986e(0xba),_0x49986e(0x14b),_0x49986e(0x9f),_0x49986e(0x13d),_0x49986e(0x161)],te=_0x165545;function p(_0x529900,_0x3da422,_0x5e8d35,_0x5986e5){const _0x277b00=_0x49986e;let _0x4e5f28=_0x529900[_0x3da422];return(!_0x4e5f28||_0x4e5f28[_0x277b00(0x16b)]>0x1&&_0x4e5f28[_0x277b00(0x170)]('-'))&&(console[_0x277b00(0x102)](_0x5e8d35+_0x277b00(0x152)+_0x5986e5+'.'),process['exit'](0x2)),_0x4e5f28;}function ne(_0x1dee62){const _0x386cea=_0x49986e;let _0x43bc40={'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[_0x386cea(0x9e)](_0x1dee62[0x0])&&(_0x43bc40[_0x386cea(0x135)]=_0x1dee62[0x0],_0x1dee62=_0x1dee62['slice'](0x1));let _0x2a182f=[];for(let _0x1f438c=0x0;_0x1f438c<_0x1dee62[_0x386cea(0x16b)];_0x1f438c++){let _0x4bd242=_0x1dee62[_0x1f438c];switch(_0x4bd242){case _0x386cea(0xe9):case'-p':_0x43bc40['print']=!0x0;break;case _0x386cea(0xcc):_0x43bc40[_0x386cea(0x176)]=!0x0;break;case _0x386cea(0x14d):_0x43bc40['cleanup']=!0x0;break;case'--headless':_0x43bc40[_0x386cea(0xfc)]=!0x0;break;case'--no-computer-use':_0x43bc40['noComputerUse']=!0x0;break;case _0x386cea(0xf1):_0x43bc40[_0x386cea(0x10a)]=!0x0,_0x43bc40[_0x386cea(0xb7)]=!0x0,_0x43bc40[_0x386cea(0x12d)][_0x386cea(0xe7)](...te);break;case _0x386cea(0x159):_0x43bc40['noConnections']=!0x0;break;case _0x386cea(0xe5):_0x43bc40['noSecurity']=!0x0;break;case'--quiet':case'-q':_0x43bc40[_0x386cea(0xee)]=!0x0;break;case'--verbose':_0x43bc40['verbose']=!0x0;break;case _0x386cea(0x118):_0x43bc40[_0x386cea(0xae)]=_0x1dee62[++_0x1f438c];break;case'--model':_0x43bc40[_0x386cea(0xc0)]=_0x1dee62[++_0x1f438c];break;case _0x386cea(0xbf):_0x43bc40[_0x386cea(0xf3)]=_0x1dee62[++_0x1f438c];break;case'--interop':_0x43bc40[_0x386cea(0x15a)]=_0x1dee62[++_0x1f438c];break;case _0x386cea(0x162):_0x43bc40['workerId']=_0x1dee62[++_0x1f438c];break;case _0x386cea(0xf7):_0x43bc40['preloadSkills']['push'](p(_0x1dee62,++_0x1f438c,_0x4bd242,_0x386cea(0x173)));break;case _0x386cea(0xb3):{let _0x2b7cea=p(_0x1dee62,++_0x1f438c,_0x4bd242,'a\x20project\x20id');_0x361e19(_0x2b7cea)||(console['error'](_0x386cea(0x142)+_0x2b7cea+_0x386cea(0xe3)),process[_0x386cea(0x11e)](0x2)),_0x43bc40[_0x386cea(0x126)]=_0x2b7cea;break;}case'--session':_0x43bc40[_0x386cea(0x129)]=p(_0x1dee62,++_0x1f438c,_0x4bd242,_0x386cea(0x103));break;case _0x386cea(0x12e):_0x43bc40[_0x386cea(0x11f)]=_0x3f0e57[_0x386cea(0xd5)](process[_0x386cea(0xf0)](),p(_0x1dee62,++_0x1f438c,_0x4bd242,_0x386cea(0xca)));break;case _0x386cea(0x10e):_0x43bc40[_0x386cea(0xc2)]=_0x3f0e57[_0x386cea(0xd5)](process['cwd'](),p(_0x1dee62,++_0x1f438c,_0x4bd242,_0x386cea(0xca)));break;case _0x386cea(0x165):{let _0x35a9dd=p(_0x1dee62,++_0x1f438c,_0x4bd242,'an\x20effort\x20tier');N[_0x386cea(0x9e)](_0x35a9dd)||(console[_0x386cea(0x102)](_0x386cea(0x14e)+_0x35a9dd+_0x386cea(0x12b)+N[_0x386cea(0x139)](_0x386cea(0xf5))+'.'),process[_0x386cea(0x11e)](0x2)),_0x43bc40[_0x386cea(0x16c)]=_0x35a9dd;break;}case _0x386cea(0x117):{let _0x42f327=_0x1dee62[++_0x1f438c];(!_0x42f327||_0x42f327[_0x386cea(0x170)]('--'))&&(console[_0x386cea(0x102)]('--tenant\x20requires\x20a\x20tenant\x20name.'),process[_0x386cea(0x11e)](0x2)),_0x43bc40[_0x386cea(0x14c)]=_0x42f327;break;}case _0x386cea(0x13a):{let _0x52779a=_0x1dee62[++_0x1f438c];[_0x386cea(0xd8),_0x386cea(0xb0),'production',_0x386cea(0xd9)]['includes'](_0x52779a)||(console['error'](_0x386cea(0xa0)+_0x52779a+_0x386cea(0x107)),process[_0x386cea(0x11e)](0x2)),_0x43bc40['env']=_0x52779a;break;}case _0x386cea(0x123):case _0x386cea(0xea):{let _0x49313e=p(_0x1dee62,++_0x1f438c,_0x4bd242,_0x386cea(0xb1)),_0x46854b=_0x79dcc2(_0x49313e);if(_0x46854b['ok']===!0x1){console[_0x386cea(0x102)](_0xe86fc5(_0x49313e,_0x46854b[_0x386cea(0xfe)])),process['exit'](0x2);break;}_0x43bc40[_0x386cea(0xd0)]=_0x46854b['baseUrl'];break;}case _0x386cea(0x10d):_0x43bc40[_0x386cea(0xd6)]=!0x0;break;case'-h':case _0x386cea(0x9b):_0x43bc40[_0x386cea(0x167)]=!0x0;break;case'-v':case _0x386cea(0x156):_0x43bc40[_0x386cea(0xe4)]=!0x0;break;default:_0x4bd242[_0x386cea(0x170)]('--')&&(console[_0x386cea(0x102)](_0x386cea(0xa6)+_0x4bd242),process['exit'](0x2)),_0x2a182f[_0x386cea(0xe7)](_0x4bd242);}}return _0x43bc40[_0x386cea(0x14c)]!==void 0x0&&_0x43bc40['subcommand']!==_0x386cea(0x13c)&&(console[_0x386cea(0x102)]('--tenant\x20applies\x20to\x20`delegate-cli\x20login`\x20only.\x20Switch\x20tenants\x20with:\x20delegate-cli\x20tenant\x20<name>'),process['exit'](0x2)),_0x43bc40[_0x386cea(0xd0)]!==void 0x0&&_0x43bc40[_0x386cea(0xf4)]!==void 0x0&&(console['error'](_0x386cea(0x113)),process[_0x386cea(0x11e)](0x2)),_0x43bc40[_0x386cea(0xd0)]!==void 0x0&&_0x43bc40['subcommand']!==_0x386cea(0x13c)&&(console['error'](_0x386cea(0x111)),process[_0x386cea(0x11e)](0x2)),_0x43bc40['skipEnvCheck']&&_0x43bc40[_0x386cea(0x135)]!==_0x386cea(0x13c)&&(console[_0x386cea(0x102)](_0x386cea(0xb2)),process[_0x386cea(0x11e)](0x2)),_0x43bc40['preloadSkills']=[...new Set(_0x43bc40['preloadSkills'])],_0x43bc40[_0x386cea(0x104)]=_0x2a182f[_0x386cea(0x139)]('\x20'),_0x43bc40;}function oe(){const _0xaa610a=_0x49986e;let _0x432105=_0xaa610a(0xcf)[_0xaa610a(0x16d)]();console[_0xaa610a(0xd4)](_0x432105);}function se(){const _0x37b04d=_0x49986e;try{return JSON[_0x37b04d(0xf9)](_0x365385[_0x37b04d(0x101)](_0x3f0e57[_0x37b04d(0x139)](__dirname,'..',_0x37b04d(0xfb)),_0x37b04d(0xd1)))[_0x37b04d(0xe4)]||_0x37b04d(0xf6);}catch{return _0x37b04d(0xf6);}}var re=0x7d0;async function C(_0x4dcd33,_0x6c23b5){const _0x57ee3c=_0x49986e;let _0x533ce8=_0x6c23b5?[_0x6c23b5]:[];for await(let _0x2b83cc of _0x4dcd33)_0x533ce8[_0x57ee3c(0xe7)](Buffer[_0x57ee3c(0x15c)](_0x2b83cc));return Buffer[_0x57ee3c(0x14a)](_0x533ce8)[_0x57ee3c(0x137)]('utf-8')[_0x57ee3c(0x16d)]();}function ie(_0x2d51ea,_0x484459){return new Promise(_0x195e8f=>{const _0x579259=_0x4b4e;let _0x382ace=_0x3edb01=>{const _0x26d3e0=_0x4b4e;clearTimeout(_0x13e05c),_0x2d51ea['off'](_0x26d3e0(0x112),_0x4ad5b9),_0x2d51ea[_0x26d3e0(0x13f)](_0x26d3e0(0xc5),_0x2f58ab),_0x2d51ea[_0x26d3e0(0x13f)]('error',_0x2f58ab),_0x2d51ea[_0x26d3e0(0x144)](),_0x195e8f(_0x3edb01);},_0x4ad5b9=_0x358032=>_0x382ace(Buffer[_0x579259(0x15c)](_0x358032)),_0x2f58ab=()=>_0x382ace(null),_0x13e05c=setTimeout(()=>_0x382ace(null),_0x484459);_0x2d51ea['on'](_0x579259(0x112),_0x4ad5b9),_0x2d51ea['on'](_0x579259(0xc5),_0x2f58ab),_0x2d51ea['on'](_0x579259(0x102),_0x2f58ab),_0x2d51ea[_0x579259(0xff)]();});}async function ae(_0x404e1f,_0x1edc2e,_0x5cbd06=re){const _0x3ddb4a=_0x49986e;let _0x5caa92=_0x404e1f==='-';if(!_0x5caa92&&_0x404e1f)return _0x404e1f;if(!_0x5caa92&&_0x1edc2e[_0x3ddb4a(0x122)])return'';if(_0x5caa92)return C(_0x1edc2e,null);let _0x3d1c45=await ie(_0x1edc2e,_0x5cbd06);return _0x3d1c45?C(_0x1edc2e,_0x3d1c45):'';}function S(){const _0x26d5d7=_0x49986e;return _0x3f0e57[_0x26d5d7(0x139)](process.env.HOME||process.env.USERPROFILE||'','.aria',_0x26d5d7(0x154));}function w(_0x535ff3){const _0x35708d=_0x49986e;try{let _0x583448=JSON['parse'](_0x365385['readFileSync'](_0x535ff3,_0x35708d(0xd1)));return!_0x583448[_0x35708d(0x143)]||!_0x583448[_0x35708d(0x141)]||!_0x583448[_0x35708d(0x110)]?null:_0x583448;}catch{return null;}}function _0x4ca4(){const _0x3972b0=['--worker-id','entries','Bearer\x20','--effort','object','help','json','then','toISOString','length','effort','trim','whoami','content','startsWith','tool_call','No\x20CLI\x20login\x20found.\x20Note:\x20the\x20CLI\x20is\x20currently\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','a\x20skill\x20name','exitCode','check','keepAlive','\x0a🤔\x20','tenantName','X-Uipath-Organizationid','--help','Token:\x20\x20\x20\x20\x20\x20\x20\x20expires\x20','\x0a⚠️\x20\x20Auth\x20expired.\x20Opening\x20browser\x20to\x20re-login…\x0a','includes','high','Invalid\x20--env:\x20','environment\x20variables\x20(AUTH_TOKEN/TENANT_ID/ORG_ID)','done','unknown\x20slug','padEnd','map','Unknown\x20flag:\x20','floor','stdin','onEvent','No\x20CLI\x20login\x20found\x20—\x20nothing\x20to\x20remove.','Tenant:\x20\x20\x20\x20\x20\x20\x20','cleanup','/v1/config','backendUrl','round','staging','a\x20deployment\x20URL,\x20e.g.\x20https://automationsuite.contoso.com','--skip-env-check\x20applies\x20to\x20`delegate-cli\x20login`\x20only.','--project','close','stdout','\x20(current)','noComputerUse','4015608QeNLOc','thinking','low','status','\x20\x20\x20\x20','Tenants\x20of\x20','response','--runner-url','model','skip','bundledSkillsPath','logout','5014752serOEv','end','name','Tenant:\x20','checks','existsSync','a\x20directory\x20path','restore','--keep-alive','\x20(resume\x20with\x20--session\x20','auth','\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','url','utf-8','\x0aStopping…\x20(Ctrl+C\x20again\x20to\x20force\x20exit)\x0a',')\x20—\x20saved\x20to\x20','log','resolve','skipEnvCheck','✓\x20Done\x0a','alpha','localhost','No\x20models\x20available\x20for\x20this\x20product/tenant.\x0a','🔧\x20','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.','590584mlMQeL','3mDTxdq','expiresAt','GET\x20','\x20min)','\x20—\x20sign\x20out\x20in\x20the\x20Delegate\x20app\x20to\x20clear\x20that.','\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).','version','--no-security','Token:\x20\x20\x20\x20\x20\x20\x20\x20expired\x20','push','write','--print','--authority','Tenant\x20not\x20switched:\x20could\x20not\x20write\x20','session_start','SIGINT','quiet','Auth\x20comes\x20from\x20AUTH_TOKEN/TENANT_ID/ORG_ID\x20—\x20set\x20TENANT_ID\x20and\x20TENANT_SLUG\x20to\x20change\x20the\x20tenant.','cwd','--cartographer','9866150mDSoxI','runnerUrl','env','\x20|\x20','unknown','--preload-skill','baseUrl','parse','lastType','package.json','headless','No\x20CLI\x20login\x20found.\x20Run\x20`delegate-cli\x20login\x20--env\x20<alpha|staging|production>`\x20first.','rejection','resume','bind','readFileSync','error','a\x20session\x20id','prompt','4034032llWUbR','initialize','.\x20Use\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost.','self-hosted\x20(Automation\x20Suite\x20/\x20Dedicated)','verbose','cartographer','noSecurity','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','--skip-env-check','--skills-path','message','organizationId','--url\x20applies\x20to\x20`delegate-cli\x20login`\x20only.\x20Other\x20commands\x20follow\x20the\x20saved\x20login,\x20or\x20--backend\x20<url>.','data','Pass\x20either\x20--env\x20(a\x20named\x20cloud)\x20or\x20--url\x20(any\x20other\x20deployment),\x20not\x20both.','isDesktopFallback','stop','rmSync','--tenant','--backend','No\x20CLI\x20login\x20to\x20switch:\x20the\x20CLI\x20is\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','6173395HicAME','799f56b8-4aed-4a0f-8640-659dae4a9e0e',';\x20the\x20saved\x20login\x20still\x20uses\x20','4ImLqjI','exit','workingDirectory','--env\x20localhost\x20has\x20no\x20OAuth\x20flow;\x20pick\x20alpha,\x20staging,\x20or\x20production.','sendMessage','isTTY','--url','once','\x20→\x20','projectId','argv','test','sessionId','\x20(Delegate\x20desktop\x20app\x20fallback)','.\x20Use\x20','438498TbIvih','preloadSkills','--working-dir','Enter\x20sends\x20a\x20message.\x20/exit\x20or\x20EOF\x20exits;\x20Ctrl+C\x20stops\x20and\x20exits.\x0a','print','asyncIterator','stderr','hide','You>\x20','subcommand','[env=','toString','The\x20saved\x20CLI\x20login\x20could\x20not\x20be\x20refreshed.\x20Run\x20`delegate-cli\x20login`\x20again.','join','--env','Interop\x20stopped\x20(if\x20it\x20was\x20running).','login','xhigh','orgLogicalName','off','toolName','tenantId','Invalid\x20--project:\x20\x22','accessToken','pause','Switch\x20with:\x20delegate-cli\x20tenant\x20<name>\x0a','MODELS','origin','isArray',',\x20whose\x20tenant\x20is\x20chosen\x20in\x20the\x20app.\x20Run\x20`delegate-cli\x20login\x20--env\x20<env>`\x20for\x20a\x20CLI\x20login\x20of\x20your\x20own.','concat','medium','tenant','--cleanup','Invalid\x20--effort:\x20','models','Source:\x20\x20\x20\x20\x20\x20\x20','UIPATH_BASE_URL\x20is\x20unusable.\x20','\x20requires\x20','file','auth.json','Base\x20URL:\x20\x20\x20\x20\x20','--version','Missing\x20prompt.\x20Pass\x20it\x20as\x20an\x20argument,\x20pipe\x20it\x20via\x20stdin,\x20or\x20run\x20`delegate-cli\x20--help`.','statusText','--no-connections','interopPath','description','from','host','340LWePuK','Session:\x20','slice','max'];_0x4ca4=function(){return _0x3972b0;};return _0x4ca4();}function le(){let _0x41dba4=[{'file':_0x5c9304(),'isDesktopFallback':!0x1},{'file':S(),'isDesktopFallback':!0x0}];for(let _0x30f173 of _0x41dba4){let _0x4d39a8=w(_0x30f173['file']);if(_0x4d39a8)return{..._0x30f173,'auth':_0x4d39a8};}return null;}async function ce(){const _0xeef909=_0x49986e;let _0x398f52=_0x5c9304();if(!_0x365385[_0xeef909(0xc9)](_0x398f52)){let _0xbde78d=S();console[_0xeef909(0xd4)](w(_0xbde78d)?_0xeef909(0x172)+_0xbde78d+_0xeef909(0xe2):_0xeef909(0xaa));return;}_0x365385[_0xeef909(0x116)](_0x398f52),console[_0xeef909(0xd4)]('Removed\x20'+_0x398f52);}async function de(){const _0x519f4b=_0x49986e;let _0x2611af=A(),_0x5d5b2e,_0x3c44c6;if(_0x2611af)_0x5d5b2e=_0x2611af,_0x3c44c6=_0x519f4b(0xa1);else{let _0x56f77e=le();if(!_0x56f77e)throw new Error($);_0x5d5b2e=_0x56f77e[_0x519f4b(0xce)],_0x3c44c6=_0x56f77e[_0x519f4b(0x114)]?_0x56f77e[_0x519f4b(0x153)]+_0x519f4b(0x12a):_0x56f77e['file'];}let _0x50b719=[_0x519f4b(0x150)+_0x3c44c6,_0x519f4b(0x155)+(_0x5d5b2e['baseUrl']??_0x519f4b(0xf6)),'Deployment:\x20\x20\x20'+ue(_0x5d5b2e['baseUrl']),'Organization:\x20'+(_0x5d5b2e[_0x519f4b(0x13e)]??_0x519f4b(0xa3))+'\x20('+_0x5d5b2e[_0x519f4b(0x110)]+')',_0x519f4b(0xab)+(_0x5d5b2e[_0x519f4b(0x99)]??_0x519f4b(0xa3))+'\x20('+_0x5d5b2e['tenantId']+')'];if(_0x5d5b2e[_0x519f4b(0xdf)]){let _0x3729de=_0x5d5b2e[_0x519f4b(0xdf)]-Math[_0x519f4b(0xa7)](Date['now']()/0x3e8),_0x25073c=new Date(_0x5d5b2e[_0x519f4b(0xdf)]*0x3e8)[_0x519f4b(0x16a)]();_0x50b719[_0x519f4b(0xe7)](_0x3729de>0x0?_0x519f4b(0x9c)+_0x25073c+'\x20(in\x20'+Math[_0x519f4b(0xaf)](_0x3729de/0x3c)+_0x519f4b(0xe1):_0x519f4b(0xe6)+_0x25073c);}process['stdout'][_0x519f4b(0xe8)](_0x50b719['join']('\x0a')+'\x0a');}var $=_0x49986e(0xdc);function ue(_0x1dee25){const _0x4c19a4=_0x49986e;return _0x1dee25?_0x33cb75(_0x1dee25)?'UiPath\x20Cloud':_0x4c19a4(0x108):'unknown';}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 _0x479289=_0x49986e;let _0x40a812=process.env.UIPATH_BASE_URL;if(!_0x40a812)return;let _0x3e8973=_0x79dcc2(_0x40a812);if(_0x3e8973['ok']===!0x1)throw new Error(_0x479289(0x151)+_0xe86fc5(_0x40a812,_0x3e8973[_0x479289(0xfe)]));return _0x3e8973['baseUrl'];}async function I(){let _0x2ba7ed=A();if(_0x2ba7ed)return _0x2ba7ed;let _0x325bb6=await _0x1ffeec();if(_0x325bb6)return _0x325bb6;throw new Error($);}async function pe(){const _0x3707cc=_0x49986e;await new _0x252e5f()[_0x3707cc(0x115)]({'force':!0x0}),console[_0x3707cc(0xd4)](_0x3707cc(0x13b));}var fe=_0x49986e(0x11b);function E(_0xade70a,_0x2514c0,_0x3ce8cf){const _0x5eae60=_0x49986e;_0xade70a?process[_0x5eae60(0x132)]['write'](_0x5eae60(0x136)+_0xade70a+']\x20Backend\x20URL:\x20'+_0x3ce8cf+'\x0a'):!_0x2514c0&&!process.env.BACKEND_URL&&process['stderr'][_0x5eae60(0xe8)]('[saved\x20login]\x20Backend\x20URL:\x20'+_0x3ce8cf+'\x0a');}async function he(_0xe003d){const _0x536c4a=_0x49986e;let _0x2343c9=await I(),_0x2b6aed=_0x59c18d(_0xe003d[_0x536c4a(0xf4)],_0x2343c9,_0xe003d[_0x536c4a(0xae)]);E(_0xe003d[_0x536c4a(0xf4)],_0xe003d[_0x536c4a(0xae)],_0x2b6aed);let _0x3b79c3=_0x2b6aed+_0x536c4a(0xad),_0x5ebb46={'Authorization':_0x536c4a(0x164)+_0x2343c9['accessToken'],'X-UiPath-ConsumingProductId':fe};_0x2343c9[_0x536c4a(0x141)]&&(_0x5ebb46['X-Uipath-Tenantid']=_0x2343c9[_0x536c4a(0x141)]),_0x2343c9[_0x536c4a(0x110)]&&(_0x5ebb46[_0x536c4a(0x9a)]=_0x2343c9['organizationId']);let _0x123b5c=await fetch(_0x3b79c3,{'headers':_0x5ebb46});if(!_0x123b5c['ok'])throw new Error(_0x536c4a(0xe0)+_0x3b79c3+_0x536c4a(0x125)+_0x123b5c[_0x536c4a(0xbb)]+'\x20'+_0x123b5c[_0x536c4a(0x158)]);let _0x12dad5=(await _0x123b5c[_0x536c4a(0x168)]())?.[_0x536c4a(0x146)],_0x275a13=Array[_0x536c4a(0x148)](_0x12dad5)?_0x12dad5:_0x12dad5&&typeof _0x12dad5==_0x536c4a(0x166)?Object[_0x536c4a(0x163)](_0x12dad5)[_0x536c4a(0xa5)](([_0x346df5,_0x25511b])=>({'id':_0x346df5,'name':_0x25511b})):[];if(_0x275a13[_0x536c4a(0x16b)]===0x0){process[_0x536c4a(0x132)][_0x536c4a(0xe8)](_0x536c4a(0xda));return;}process[_0x536c4a(0xb5)][_0x536c4a(0xe8)]('\x0aAvailable\x20models\x20('+_0x275a13[_0x536c4a(0x16b)]+'):\x0a\x0a');for(let _0xac6a14 of _0x275a13){let _0x32a76c=_0xac6a14['name']&&_0xac6a14[_0x536c4a(0xc6)]!==_0xac6a14['id']?'\x20('+_0xac6a14[_0x536c4a(0xc6)]+')':'';process[_0x536c4a(0xb5)][_0x536c4a(0xe8)]('\x20\x20'+_0xac6a14['id']+_0x32a76c+'\x0a'),_0xac6a14[_0x536c4a(0x15b)]&&process[_0x536c4a(0xb5)][_0x536c4a(0xe8)](_0x536c4a(0xbc)+_0xac6a14[_0x536c4a(0x15b)]+'\x0a');}process['stdout'][_0x536c4a(0xe8)]('\x0aUse\x20with:\x20delegate-cli\x20--model\x20<id>\x20\x22<prompt>\x22\x0a');}async function ge(_0x22d8f1){const _0x4818ce=_0x49986e;let _0x1561a9=await I(),_0x1345ab=_0x59c18d(_0x22d8f1[_0x4818ce(0xf4)],_0x1561a9,_0x22d8f1[_0x4818ce(0xae)]);E(_0x22d8f1['env'],_0x22d8f1['backendUrl'],_0x1345ab);let _0x35f92c=await _0x51c8ac({'auth':_0x1561a9,'backendUrl':_0x1345ab,'interop':_0x22d8f1[_0x4818ce(0xfc)]?_0x4818ce(0xc1):'spawn'});for(let _0x1aac42 of _0x35f92c[_0x4818ce(0xc8)])process[_0x4818ce(0xb5)]['write'](me(_0x1aac42)+'\x0a');_0x35f92c['ok']||process[_0x4818ce(0x11e)](0x1);}function me(_0x439519){const _0x946004=_0x49986e;return{'ok':'✓','failed':'✗','skipped':'-'}[_0x439519[_0x946004(0xbb)]]+'\x20'+_0x439519[_0x946004(0xc6)][_0x946004(0xa4)](0x8)+_0x439519['detail'];}async function ke(_0x2cb23b){const _0x2681cf=_0x49986e;_0x2cb23b[_0x2681cf(0xf4)]===_0x2681cf(0xd9)&&(console[_0x2681cf(0x102)](_0x2681cf(0x120)),process[_0x2681cf(0x11e)](0x2));let _0x1897b2=w(_0x5c9304()),_0x43382a=_0x2cb23b[_0x2681cf(0xd6)];if(_0x2cb23b[_0x2681cf(0xf4)]){let _0x22c06c=_0x2cb23b[_0x2681cf(0xf4)];await _0x51ce48({'env':_0x22c06c,'tenant':_0x2cb23b['tenant']??b(_0x1897b2,_0x392a4e[_0x22c06c]),'skipEnvCheck':_0x43382a});return;}let _0x50747e=_0x2cb23b[_0x2681cf(0xd0)]??B();if(_0x50747e){await _0x51ce48({'baseUrl':_0x50747e,'tenant':_0x2cb23b[_0x2681cf(0x14c)]??b(_0x1897b2,_0x50747e),'skipEnvCheck':_0x43382a});return;}if(_0x1897b2?.[_0x2681cf(0xf8)]){await _0x51ce48({'baseUrl':_0x1897b2[_0x2681cf(0xf8)],'tenant':_0x2cb23b[_0x2681cf(0x14c)]??_0x1897b2['tenantName'],'skipEnvCheck':_0x43382a});return;}console[_0x2681cf(0x102)](_0x2681cf(0x10c)),process[_0x2681cf(0x11e)](0x2);}function b(_0x3597ba,_0x236b1d){const _0x3b4d40=_0x49986e;return _0x3597ba?.[_0x3b4d40(0xf8)]&&we(_0x3597ba[_0x3b4d40(0xf8)],_0x236b1d)?_0x3597ba[_0x3b4d40(0x99)]:void 0x0;}function we(_0x3050bf,_0x4ef127){const _0x5f09f9=_0x49986e;try{return new URL(_0x3050bf)[_0x5f09f9(0x147)]===new URL(_0x4ef127)[_0x5f09f9(0x147)];}catch{return!0x1;}}async function ve(_0x4287cc){const _0x1d0118=_0x49986e;A()&&(console[_0x1d0118(0x102)](_0x1d0118(0xef)),process['exit'](0x2));let _0x423c0a=await _0x446575();if(_0x423c0a||(console[_0x1d0118(0x102)](be()),process[_0x1d0118(0x11e)](0x2)),_0x4287cc[_0x1d0118(0x16d)]()){let _0x51fea0=await _0x4237d1(_0x423c0a,_0x4287cc);_0x3944ef(_0x51fea0)||(console[_0x1d0118(0x102)](_0x1d0118(0xeb)+_0x5c9304()+_0x1d0118(0x11c)+_0x423c0a[_0x1d0118(0x99)]+'.'),process['exit'](0x1)),console[_0x1d0118(0xd4)](_0x1d0118(0xc7)+_0x51fea0[_0x1d0118(0x99)]+'\x20('+_0x51fea0[_0x1d0118(0x141)]+_0x1d0118(0xd3)+_0x5c9304());return;}ye(await _0xcdc212(_0x423c0a),_0x423c0a);}function be(){const _0x1e1dde=_0x49986e;if(_0x365385[_0x1e1dde(0xc9)](_0x5c9304()))return _0x1e1dde(0x138);let _0x33386a=S();return w(_0x33386a)?_0x1e1dde(0x119)+_0x33386a+_0x1e1dde(0x149):_0x1e1dde(0xfd);}function ye(_0x5bd2da,_0x52f21b){const _0x35d7ea=_0x49986e;let _0x28b622=_0x5bd2da[_0x35d7ea(0xa5)](_0x389774=>_0x389774['id']===_0x52f21b[_0x35d7ea(0x141)]?'*\x20'+_0x389774[_0x35d7ea(0xc6)]+_0x35d7ea(0xb6):'\x20\x20'+_0x389774[_0x35d7ea(0xc6)]);process[_0x35d7ea(0xb5)][_0x35d7ea(0xe8)](_0x35d7ea(0xbd)+(_0x52f21b[_0x35d7ea(0x13e)]??_0x52f21b[_0x35d7ea(0x110)])+':\x0a'+_0x28b622[_0x35d7ea(0x139)]('\x0a')+'\x0a'),_0x5bd2da[_0x35d7ea(0x16b)]>0x1&&process['stdout']['write'](_0x35d7ea(0x145));}function Se(_0x49e275){const _0x132ced=_0x49986e;return _0x49e275?.[_0x132ced(0xbe)]?.[_0x132ced(0xbb)]===0x191||/401/[_0x132ced(0x128)](String(_0x49e275?.[_0x132ced(0x10f)]??''));}var l={'lastType':null,'quiet':!0x1},_=_0x2ab0d2=>{const _0x79b6e7=_0x49986e;switch(_0x2ab0d2['type']){case _0x79b6e7(0xec):_0x2ab0d2[_0x79b6e7(0x129)]&&_0x2ab0d2[_0x79b6e7(0x129)]!==l['sessionId']&&(process['stderr'][_0x79b6e7(0xe8)](_0x79b6e7(0x15f)+_0x2ab0d2[_0x79b6e7(0x129)]+_0x79b6e7(0xcd)+_0x2ab0d2[_0x79b6e7(0x129)]+')\x0a'),l[_0x79b6e7(0x129)]=_0x2ab0d2[_0x79b6e7(0x129)]);break;case _0x79b6e7(0xb9):_0x2ab0d2[_0x79b6e7(0x16f)]&&!l['quiet']&&(l[_0x79b6e7(0xfa)]!==_0x79b6e7(0xb9)&&process['stderr'][_0x79b6e7(0xe8)](_0x79b6e7(0x177)),process[_0x79b6e7(0x132)][_0x79b6e7(0xe8)](_0x2ab0d2['content']),l[_0x79b6e7(0xfa)]=_0x79b6e7(0xb9));break;case _0x79b6e7(0x171):l[_0x79b6e7(0xfa)]!==null&&process[_0x79b6e7(0x132)][_0x79b6e7(0xe8)]('\x0a'),process[_0x79b6e7(0x132)][_0x79b6e7(0xe8)](_0x79b6e7(0xdb)+(_0x2ab0d2[_0x79b6e7(0x140)]??'tool')+'\x0a'),l[_0x79b6e7(0xfa)]=_0x79b6e7(0x171);break;case _0x79b6e7(0x10f):_0x2ab0d2[_0x79b6e7(0x16f)]&&(l['lastType']!==_0x79b6e7(0x10f)&&l[_0x79b6e7(0xfa)]!==null&&process[_0x79b6e7(0xb5)][_0x79b6e7(0xe8)]('\x0a'),process[_0x79b6e7(0xb5)][_0x79b6e7(0xe8)](_0x2ab0d2[_0x79b6e7(0x16f)]),l[_0x79b6e7(0xfa)]=_0x79b6e7(0x10f));break;case'error':l['lastType']!==null&&process[_0x79b6e7(0x132)]['write']('\x0a'),process['stderr'][_0x79b6e7(0xe8)]('✗\x20'+(_0x2ab0d2[_0x79b6e7(0x102)]??'error')+'\x0a'),l[_0x79b6e7(0xfa)]=_0x79b6e7(0x102);break;case _0x79b6e7(0xa2):(l[_0x79b6e7(0xfa)]===_0x79b6e7(0x10f)||l[_0x79b6e7(0xfa)]===_0x79b6e7(0xb9))&&process[_0x79b6e7(0xb5)][_0x79b6e7(0xe8)]('\x0a'),process[_0x79b6e7(0x132)][_0x79b6e7(0xe8)](_0x79b6e7(0xd7)),l['lastType']=_0x79b6e7(0xa2);break;}};function R(_0x12ac18,_0x2419f7,_0xfa63ea){const _0x19174e=_0x49986e;let _0x2a0573=_0x12ac18['model']||process.env.MODEL;return{'backendUrl':_0xfa63ea,'auth':_0x2419f7,'enableComputerUse':!_0x12ac18['headless']&&!_0x12ac18[_0x19174e(0xb7)],'autoSpawnInterop':!_0x12ac18[_0x19174e(0xfc)],'enableConnections':!_0x12ac18['noConnections'],'enableSecurity':!_0x12ac18[_0x19174e(0x10b)],'keepInteropAlive':_0x12ac18[_0x19174e(0x176)],..._0x12ac18[_0x19174e(0x12d)]['length']>0x0?{'preloadSkills':_0x12ac18[_0x19174e(0x12d)]}:{},..._0x2a0573?{'model':_0x2a0573}:{},..._0x12ac18[_0x19174e(0x126)]?{'projectId':_0x12ac18[_0x19174e(0x126)]}:{},..._0x12ac18[_0x19174e(0x11f)]?{'workingDirectory':_0x12ac18['workingDirectory']}:{},..._0x12ac18['bundledSkillsPath']?{'bundledSkillsPath':_0x12ac18[_0x19174e(0xc2)]}:{},..._0x12ac18[_0x19174e(0x16c)]?{'effort':_0x12ac18[_0x19174e(0x16c)]}:{},..._0x12ac18['sessionId']?{'sessionId':_0x12ac18['sessionId']}:{},..._0x12ac18[_0x19174e(0x109)]?{'verbose':!0x0}:{}};}async function Ae(_0x266f24){const _0x490d9c=_0x49986e;let _0x2b0b87=!_0x266f24[_0x490d9c(0x130)]&&_0x266f24[_0x490d9c(0x104)]!=='-'&&!!process[_0x490d9c(0xa8)][_0x490d9c(0x122)]&&!!process[_0x490d9c(0xb5)]['isTTY'],_0x5e80e8=_0x2b0b87?_0x266f24[_0x490d9c(0x104)][_0x490d9c(0x16d)]():await ae(_0x266f24['prompt'],process[_0x490d9c(0xa8)]);!_0x2b0b87&&!_0x5e80e8&&(console['error'](_0x490d9c(0x157)),process[_0x490d9c(0x11e)](0x2)),l={'lastType':null,'quiet':_0x266f24[_0x490d9c(0xee)]};let _0x4aa8da=await I(),_0x5a7b68=new _0x21c25e();_0x5a7b68[_0x490d9c(0xa9)](_);let _0x2fa763=_0x59c18d(_0x266f24[_0x490d9c(0xf4)],_0x4aa8da,_0x266f24[_0x490d9c(0xae)]);E(_0x266f24[_0x490d9c(0xf4)],_0x266f24[_0x490d9c(0xae)],_0x2fa763);let _0x539ef7=R(_0x266f24,_0x4aa8da,_0x2fa763),_0x4a6873=!0x1,_0x1fa72d=!0x1,_0x1f5776,_0x59ad24=()=>_0x1f5776??=_0x5a7b68['destroy'](),_0x5de7c1=()=>{const _0x3d9fa2=_0x490d9c;_0x1fa72d&&process['exit'](0x82),_0x1fa72d=!0x0,process[_0x3d9fa2(0x132)][_0x3d9fa2(0xe8)](_0x3d9fa2(0xd2)),_0x4a6873&&_0x59ad24()[_0x3d9fa2(0x169)](()=>process[_0x3d9fa2(0x11e)](0x82),_0x545ef1=>{const _0x1f322b=_0x3d9fa2;console[_0x1f322b(0x102)](_0x545ef1),process['exit'](0x82);});};process['on'](_0x490d9c(0xed),_0x5de7c1);let _0x2fcbc9=async _0x592cd9=>{const _0x149edb=_0x490d9c;try{await _0x5a7b68['sendMessage'](_0x592cd9);}catch(_0x104950){if(_0x1fa72d||!Se(_0x104950)||!process[_0x149edb(0xa8)][_0x149edb(0x122)]||_0x266f24['env']===_0x149edb(0xd9)||!(_0x266f24['env']||_0x4aa8da[_0x149edb(0xf8)]))throw _0x104950;process['stderr'][_0x149edb(0xe8)](_0x149edb(0x9d));let _0x26bf4b=_0x5a7b68['getSessionId']()??_0x266f24['sessionId'],_0x3b5cf2=await _0x51ce48(_0x266f24[_0x149edb(0xf4)]?{'env':_0x266f24[_0x149edb(0xf4)],'tenant':b(_0x4aa8da,_0x392a4e[_0x266f24[_0x149edb(0xf4)]]),'skipEnvCheck':!0x0}:{'baseUrl':_0x4aa8da[_0x149edb(0xf8)],'tenant':_0x4aa8da[_0x149edb(0x99)],'skipEnvCheck':!0x0});if(_0x1fa72d||(_0x4a6873=!0x1,await _0x59ad24(),_0x1fa72d))return;_0x5a7b68=new _0x21c25e(),_0x1f5776=void 0x0,_0x5a7b68[_0x149edb(0xa9)](_),_0x4aa8da=_0x3b5cf2,await _0x5a7b68['initialize']({...R(_0x266f24,_0x4aa8da,_0x2fa763),..._0x26bf4b?{'sessionId':_0x26bf4b}:{}}),_0x4a6873=!0x0,_0x1fa72d||await _0x5a7b68[_0x149edb(0x121)](_0x592cd9);}};try{if(await _0x5a7b68[_0x490d9c(0x106)](_0x539ef7),_0x4a6873=!0x0,_0x1fa72d)return;_0x2b0b87?await Ee({'prompt':_0x5e80e8,'sendMessage':_0x2fcbc9,'onSigint':_0x5de7c1}):await _0x2fcbc9(_0x5e80e8);}catch(_0x501a66){if(!_0x1fa72d)throw _0x501a66;}finally{try{await _0x59ad24();}finally{process['off'](_0x490d9c(0xed),_0x5de7c1),_0x1fa72d&&(process[_0x490d9c(0x174)]=0x82);}}}function Ie(_0x29205f,_0x3a0398){const _0x486efe=_0x49986e;let _0x46c999=process[_0x486efe(0xb5)]['write'][_0x486efe(0x100)](process[_0x486efe(0xb5)]),_0x20fe20=!0x1;return process[_0x486efe(0xb5)][_0x486efe(0xe8)]=(..._0x48986d)=>{if(!_0x20fe20)return _0x46c999(..._0x48986d);_0x192aa(_0x3a0398,0x0),_0x4e5368(_0x3a0398,0x0);let _0x206518=_0x46c999(..._0x48986d);return _0x29205f['prompt'](!0x0),_0x206518;},{'show':()=>{const _0x334733=_0x486efe;_0x20fe20=!0x0,_0x29205f[_0x334733(0x104)]();},'hide':()=>{_0x20fe20=!0x1;},'restore':()=>{const _0x36db2e=_0x486efe;_0x20fe20=!0x1,process[_0x36db2e(0xb5)][_0x36db2e(0xe8)]=_0x46c999;}};}async function Ee({prompt:_0x198b36,sendMessage:_0xd16f14,onSigint:_0x50cdb6}){const _0x58596c=_0x49986e;let _0x4efbc3=_0x39146b({'input':process[_0x58596c(0xa8)],'output':process[_0x58596c(0x132)],'terminal':!0x0,'prompt':_0x58596c(0x134)}),_0x2dbef9=Ie(_0x4efbc3,process['stderr']),_0x242954=_0x4efbc3[Symbol[_0x58596c(0x131)]](),_0x58837b=!0x1;_0x4efbc3[_0x58596c(0x124)](_0x58596c(0xb4),()=>{_0x58837b=!0x0,_0x2dbef9['hide']();});let _0x452625=!0x1,_0x389792=()=>{_0x452625=!0x0,_0x4efbc3['close'](),_0x50cdb6();};_0x4efbc3['on']('SIGINT',_0x389792),process[_0x58596c(0x132)][_0x58596c(0xe8)](_0x58596c(0x12f));try{if(_0x198b36&&await _0xd16f14(_0x198b36),_0x452625)return;_0x58837b||_0x2dbef9['show']();for await(let _0x52191c of _0x242954){if(_0x2dbef9[_0x58596c(0x133)](),_0x452625)break;let _0x50a338=_0x52191c[_0x58596c(0x16d)]();if(_0x50a338==='/exit')break;_0x50a338&&await _0xd16f14(_0x50a338),_0x58837b||_0x2dbef9['show']();}}finally{_0x2dbef9[_0x58596c(0xcb)](),_0x4efbc3[_0x58596c(0x13f)]('SIGINT',_0x389792),_0x4efbc3['close']();}}async function Te(){const _0x3260a3=_0x49986e;let _0xb6508=ne(process[_0x3260a3(0x127)][_0x3260a3(0x160)](0x2));if(_0xb6508[_0x3260a3(0x167)]){oe();return;}if(_0xb6508[_0x3260a3(0xe4)]){console[_0x3260a3(0xd4)](se());return;}if(_0xb6508[_0x3260a3(0x135)]===_0x3260a3(0x13c)){await ke(_0xb6508);return;}if(_0xb6508[_0x3260a3(0x135)]===_0x3260a3(0x14c)){await ve(_0xb6508[_0x3260a3(0x104)]);return;}if(_0xb6508[_0x3260a3(0x135)]===_0x3260a3(0xc3)){await ce();return;}if(_0xb6508[_0x3260a3(0x135)]==='whoami'){await de();return;}if(_0xb6508[_0x3260a3(0x135)]==='models'){await he(_0xb6508);return;}if(_0xb6508[_0x3260a3(0x135)]===_0x3260a3(0x175)){await ge(_0xb6508);return;}if(_0xb6508[_0x3260a3(0x135)]===_0x3260a3(0x15d)){await _0x59a4ed(_0xb6508[_0x3260a3(0x104)],{'runnerUrl':_0xb6508[_0x3260a3(0xf3)],'backendUrl':_0xb6508['backendUrl'],'interopPath':_0xb6508['interopPath'],'workerId':_0xb6508['workerId']});return;}if(_0xb6508[_0x3260a3(0xac)]){await pe();return;}await Ae(_0xb6508);}var Ue=process.env.NODE_ENV==='test'||!!process.env.JEST_WORKER_ID;Ue||Te()['catch'](_0x50c5a1=>{const _0x436120=_0x49986e;console['error'](_0x50c5a1['stack']||_0x50c5a1[_0x436120(0x10f)]||_0x50c5a1),process[_0x436120(0x11e)](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};
|
|
2
|
+
const _0x5c3cd6=_0x4db8;(function(_0x35dd84,_0x53d0e4){const _0x4985fa=_0x4db8,_0x7b9056=_0x35dd84();while(!![]){try{const _0x2536da=-parseInt(_0x4985fa(0x31e))/0x1*(parseInt(_0x4985fa(0x2cd))/0x2)+parseInt(_0x4985fa(0x39a))/0x3+parseInt(_0x4985fa(0x22c))/0x4+-parseInt(_0x4985fa(0x280))/0x5+parseInt(_0x4985fa(0x372))/0x6*(parseInt(_0x4985fa(0x27c))/0x7)+-parseInt(_0x4985fa(0x2ca))/0x8*(-parseInt(_0x4985fa(0x1f3))/0x9)+-parseInt(_0x4985fa(0x2b9))/0xa;if(_0x2536da===_0x53d0e4)break;else _0x7b9056['push'](_0x7b9056['shift']());}catch(_0x4ff2c7){_0x7b9056['push'](_0x7b9056['shift']());}}}(_0x5f38,0xda33d));const __dirname=import.meta.dirname;import _0xea0a68 from'fs';import _0x4d472f from'path';import{clearLine as _0x1dcba8,createInterface as _0x49cc95,cursorTo as _0x26e9db}from'node:readline';import{BUSINESS_ANALYSIS_PRELOADED_SKILLS as _0x5b0985,DelegateAgent as _0x399f6d,cancelTurn as _0x4961b7,InteropProcess as _0x4dd290,complete as _0x20b8a2,DEFAULT_MODEL as _0x4d46e9,createBackendClient as _0x2e3a78,evaluate as _0x25e6f8,isCompletionRequestError as _0x1cd659,isEvaluationRequestError as _0x35afd7,isTranscriptionError as _0x148eb3,rerank as _0x1c5229,transcribe as _0x489f10,verify as _0x44a5f1,acceptDelegation as _0x2fc141,cancelDelegation as _0x452cc5,claimDelegation as _0x367f3a,completeDelegation as _0x447659,createDelegation as _0x46caae,deleteDelegation as _0x27e268,dismissDelegation as _0x226927,getSessionDelegations as _0x78e406,isDelegationError as _0x8d1533,listDelegations as _0x196136,listOrgUsers as _0x31f58b,previewDelegation as _0x5174e8,TurnResultCollector as _0x117650,agentEventToJsonLine as _0x4c4c19,describeBaseUrlRejection as _0x327834,getActivitySummary as _0x392af5,getAuthFilePath as _0x28797c,getByoWarnings as _0x4b36c9,getCartographerAllowance as _0x320d0d,getDailyBreakdown as _0x58a8aa,getLicensingSummary as _0x17c196,getMonthlySpending as _0x14252d,isOutputFormat as _0x12f03e,isCloudBaseUrl as _0x1fd96d,isSafeProjectFolderSegment as _0x20f6f6,listModels as _0x1332c6,listSessions as _0x3c5837,getSession as _0x4fda64,renameSession as _0x102864,deleteSession as _0x4ded31,forkSession as _0x10c080,isBackendRequestError as _0x161c57,MAX_SESSION_PAGE_SIZE as _0x254906,listTenants as _0x442126,loadAndRefreshAuth as _0x1157c5,loadAndRefreshSdkLogin as _0x2f083,parsePlatformBaseUrl as _0x3e44ab,resolveBackendUrl as _0x4abdb1,runHealthCheck as _0x4bf9cf,runHostCommand as _0x10b478,runLoginFlow as _0x38c1bd,runTurnForResult as _0x302986,saveAuthData as _0xa7d579,switchTenant as _0x1bb7ef,toJsonLine as _0x3f1b63,ENV_TO_CLOUD as _0x1480d0,OUTPUT_FORMATS as _0x191b40}from'@uipath/delegate-sdk';var pt=[_0x5c3cd6(0x322),'tenant','models','host',_0x5c3cd6(0x2e4),_0x5c3cd6(0x268),_0x5c3cd6(0x321),_0x5c3cd6(0x25d),_0x5c3cd6(0x289),_0x5c3cd6(0x2b1),_0x5c3cd6(0x2a5),_0x5c3cd6(0x29d),_0x5c3cd6(0x244),_0x5c3cd6(0x213),_0x5c3cd6(0x211),_0x5c3cd6(0x2da)],G=['',_0x5c3cd6(0x309),_0x5c3cd6(0x268),'check','sessions',_0x5c3cd6(0x289),'evaluate',_0x5c3cd6(0x2a5),_0x5c3cd6(0x29d),_0x5c3cd6(0x244),'transcribe',_0x5c3cd6(0x211),'org-users'],W=[_0x5c3cd6(0x324),_0x5c3cd6(0x315),'high','xhigh',_0x5c3cd6(0x2d6)],mt=_0x5b0985;function p(_0x3f8311,_0x504c96,_0x4308dd,_0xb1d42a){const _0x2d1038=_0x5c3cd6;let _0x1abcf1=_0x3f8311[_0x504c96];return(!_0x1abcf1||_0x1abcf1[_0x2d1038(0x2e9)]>0x1&&_0x1abcf1[_0x2d1038(0x34b)]('-'))&&(console[_0x2d1038(0x236)](_0x4308dd+_0x2d1038(0x1ff)+_0xb1d42a+'.'),process[_0x2d1038(0x1f8)](0x2)),_0x1abcf1;}function N(_0x22cf32,_0x18b9d9,_0x1a6d57,_0x108212){const _0x568a29=_0x5c3cd6;let _0x57455e=p(_0x22cf32,_0x18b9d9,_0x1a6d57,_0x568a29(0x2ad)),_0x40d843=Number(_0x57455e);return(!/^\d+$/[_0x568a29(0x304)](_0x57455e)||_0x40d843<0x1||!Number[_0x568a29(0x1ee)](_0x40d843)||_0x108212!==void 0x0&&_0x40d843>_0x108212)&&(console[_0x568a29(0x236)](_0x1a6d57+'\x20must\x20be\x20a\x20whole\x20number\x20'+(_0x108212===void 0x0?_0x568a29(0x2d9):_0x568a29(0x348)+_0x108212)+',\x20got\x20'+_0x57455e+'.'),process[_0x568a29(0x1f8)](0x2)),_0x40d843;}function ft(_0x240c1a){const _0x5af792=_0x5c3cd6;let _0x2f9bed={'subcommand':'','prompt':'','print':!0x1,'keepAlive':!0x1,'cleanup':!0x1,'headless':!0x1,'noComputerUse':!0x1,'cartographer':!0x1,'noConnections':!0x1,'noSecurity':!0x1,'noMemory':!0x1,'quiet':!0x1,'verbose':!0x1,'outputFormat':_0x5af792(0x338),'preloadSkills':[],'attachments':[],'skipEnvCheck':!0x1,'includeSubAgents':!0x1,'operands':[],'help':!0x1,'version':!0x1};pt[_0x5af792(0x21b)](_0x240c1a[0x0])&&(_0x2f9bed[_0x5af792(0x337)]=_0x240c1a[0x0],_0x240c1a=_0x240c1a[_0x5af792(0x298)](0x1));let _0x3b71ff=[];for(let _0x41c969=0x0;_0x41c969<_0x240c1a[_0x5af792(0x2e9)];_0x41c969++){let _0x4e7ac9=_0x240c1a[_0x41c969];switch(_0x4e7ac9){case'--print':case'-p':_0x2f9bed['print']=!0x0;break;case'--keep-alive':_0x2f9bed['keepAlive']=!0x0;break;case'--cleanup':_0x2f9bed['cleanup']=!0x0;break;case _0x5af792(0x2f0):_0x2f9bed[_0x5af792(0x2ea)]=!0x0;break;case _0x5af792(0x2f2):_0x2f9bed['noComputerUse']=!0x0;break;case _0x5af792(0x2a4):_0x2f9bed['cartographer']=!0x0,_0x2f9bed[_0x5af792(0x1fb)]=!0x0,_0x2f9bed[_0x5af792(0x1eb)][_0x5af792(0x36f)](...mt);break;case _0x5af792(0x235):_0x2f9bed[_0x5af792(0x296)]=!0x0;break;case _0x5af792(0x2dd):_0x2f9bed['noSecurity']=!0x0;break;case _0x5af792(0x323):_0x2f9bed[_0x5af792(0x346)]=!0x0;break;case'--quiet':case'-q':_0x2f9bed[_0x5af792(0x355)]=!0x0;break;case _0x5af792(0x292):_0x2f9bed[_0x5af792(0x303)]=!0x0;break;case _0x5af792(0x2d1):_0x2f9bed[_0x5af792(0x215)]=_0x240c1a[++_0x41c969];break;case _0x5af792(0x317):_0x2f9bed[_0x5af792(0x286)]=_0x240c1a[++_0x41c969];break;case _0x5af792(0x214):_0x2f9bed[_0x5af792(0x376)]=_0x240c1a[++_0x41c969];break;case _0x5af792(0x22e):_0x2f9bed[_0x5af792(0x231)]=_0x240c1a[++_0x41c969];break;case'--worker-id':_0x2f9bed['workerId']=_0x240c1a[++_0x41c969];break;case _0x5af792(0x1fc):_0x2f9bed['preloadSkills'][_0x5af792(0x36f)](p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x2ac)));break;case _0x5af792(0x2f5):{let _0x51da45=p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x2d2));_0x20f6f6(_0x51da45)||(console['error']('Invalid\x20--project:\x20\x22'+_0x51da45+_0x5af792(0x284)),process['exit'](0x2)),_0x2f9bed['projectId']=_0x51da45;break;}case _0x5af792(0x326):{let _0x315cda=p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x37c)+_0x191b40[_0x5af792(0x335)](_0x5af792(0x243))+')');_0x12f03e(_0x315cda)||(console['error'](_0x5af792(0x27f)+_0x315cda+_0x5af792(0x21d)+_0x191b40[_0x5af792(0x335)]('\x20|\x20')+'.'),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed[_0x5af792(0x360)]=_0x315cda;break;}case _0x5af792(0x35a):_0x2f9bed[_0x5af792(0x316)]=p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x36c));break;case _0x5af792(0x2de):_0x2f9bed[_0x5af792(0x2e2)]=N(_0x240c1a,++_0x41c969,_0x4e7ac9);break;case'--limit':_0x2f9bed[_0x5af792(0x368)]=N(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x254906);break;case'--include-subagents':_0x2f9bed[_0x5af792(0x1e9)]=!0x0;break;case'--json-schema':_0x2f9bed[_0x5af792(0x22a)]=p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x206));break;case _0x5af792(0x31b):{let _0x57a391=_0x4d472f['resolve'](process[_0x5af792(0x249)](),p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x388)));_0xea0a68[_0x5af792(0x2ce)](_0x57a391)||(console[_0x5af792(0x236)](_0x5af792(0x295)+_0x57a391),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed[_0x5af792(0x23a)][_0x5af792(0x36f)](_0x57a391);break;}case _0x5af792(0x228):_0x2f9bed[_0x5af792(0x274)]=p(_0x240c1a,++_0x41c969,_0x4e7ac9,'a\x20turn\x20id');break;case'--to':_0x2f9bed[_0x5af792(0x240)]=p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x340));break;case _0x5af792(0x389):_0x2f9bed[_0x5af792(0x2b2)]=p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x339));break;case _0x5af792(0x23e):_0x2f9bed[_0x5af792(0x2fc)]=N(_0x240c1a,++_0x41c969,_0x4e7ac9,0x16d);break;case _0x5af792(0x227):_0x2f9bed[_0x5af792(0x334)]=_0x4d472f[_0x5af792(0x2b6)](process[_0x5af792(0x249)](),p(_0x240c1a,++_0x41c969,_0x4e7ac9,'a\x20directory\x20path'));break;case _0x5af792(0x2f9):_0x2f9bed[_0x5af792(0x2b4)]=_0x4d472f[_0x5af792(0x2b6)](process[_0x5af792(0x249)](),p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x279)));break;case _0x5af792(0x305):{let _0x2de2c4=p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x29c));W[_0x5af792(0x21b)](_0x2de2c4)||(console[_0x5af792(0x236)](_0x5af792(0x330)+_0x2de2c4+_0x5af792(0x21d)+W[_0x5af792(0x335)](_0x5af792(0x243))+'.'),process['exit'](0x2)),_0x2f9bed[_0x5af792(0x2f6)]=_0x2de2c4;break;}case _0x5af792(0x27e):{let _0x25c7c9=_0x240c1a[++_0x41c969];(!_0x25c7c9||_0x25c7c9[_0x5af792(0x34b)]('--'))&&(console[_0x5af792(0x236)](_0x5af792(0x307)),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed['tenant']=_0x25c7c9;break;}case _0x5af792(0x21c):{let _0x8e8165=_0x240c1a[++_0x41c969];[_0x5af792(0x2d0),_0x5af792(0x397),'production',_0x5af792(0x245)][_0x5af792(0x21b)](_0x8e8165)||(console['error'](_0x5af792(0x382)+_0x8e8165+_0x5af792(0x31f)),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed['env']=_0x8e8165;break;}case _0x5af792(0x238):case'--authority':{let _0x5a3380=p(_0x240c1a,++_0x41c969,_0x4e7ac9,_0x5af792(0x373)),_0x3552d5=_0x3e44ab(_0x5a3380);if(_0x3552d5['ok']===!0x1){console[_0x5af792(0x236)](_0x327834(_0x5a3380,_0x3552d5[_0x5af792(0x35f)])),process[_0x5af792(0x1f8)](0x2);break;}_0x2f9bed[_0x5af792(0x375)]=_0x3552d5[_0x5af792(0x203)];break;}case _0x5af792(0x361):_0x2f9bed[_0x5af792(0x2a8)]=!0x0;break;case'-h':case _0x5af792(0x230):_0x2f9bed['help']=!0x0;break;case'-v':case _0x5af792(0x20f):_0x2f9bed[_0x5af792(0x1e8)]=!0x0;break;default:_0x4e7ac9[_0x5af792(0x34b)]('--')&&(console[_0x5af792(0x236)]('Unknown\x20flag:\x20'+_0x4e7ac9),process[_0x5af792(0x1f8)](0x2)),_0x3b71ff['push'](_0x4e7ac9);}}return _0x2f9bed[_0x5af792(0x23b)]!==void 0x0&&_0x2f9bed[_0x5af792(0x337)]!==_0x5af792(0x322)&&(console[_0x5af792(0x236)](_0x5af792(0x271)),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed[_0x5af792(0x375)]!==void 0x0&&_0x2f9bed[_0x5af792(0x2e0)]!==void 0x0&&(console[_0x5af792(0x236)](_0x5af792(0x207)),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed[_0x5af792(0x375)]!==void 0x0&&_0x2f9bed['subcommand']!=='login'&&(console[_0x5af792(0x236)](_0x5af792(0x220)),process['exit'](0x2)),_0x2f9bed['days']!==void 0x0&&_0x2f9bed[_0x5af792(0x337)]!==_0x5af792(0x289)&&(console[_0x5af792(0x236)](_0x5af792(0x2aa)),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed['jsonSchemaPath']!==void 0x0&&(_0x2f9bed[_0x5af792(0x337)]!=='complete'&&_0x2f9bed['subcommand']!==''||_0x2f9bed[_0x5af792(0x34a)])&&(console[_0x5af792(0x236)]('--json-schema\x20applies\x20to\x20prompts\x20and\x20to\x20`delegate-cli\x20complete`\x20only.'),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed[_0x5af792(0x23a)][_0x5af792(0x2e9)]>0x0&&(_0x2f9bed[_0x5af792(0x337)]!==''||_0x2f9bed[_0x5af792(0x34a)])&&(console[_0x5af792(0x236)](_0x5af792(0x352)),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed[_0x5af792(0x2a8)]&&_0x2f9bed[_0x5af792(0x337)]!==_0x5af792(0x322)&&(console[_0x5af792(0x236)]('--skip-env-check\x20applies\x20to\x20`delegate-cli\x20login`\x20only.'),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed[_0x5af792(0x360)]!=='text'&&!G[_0x5af792(0x21b)](_0x2f9bed[_0x5af792(0x337)])&&(console[_0x5af792(0x236)](_0x5af792(0x350)+_0x2f9bed[_0x5af792(0x360)]+_0x5af792(0x314)+G['filter'](Boolean)['join'](',\x20')+'.'),process['exit'](0x2)),(_0x2f9bed['page']!==void 0x0||_0x2f9bed['limit']!==void 0x0||_0x2f9bed['includeSubAgents'])&&_0x2f9bed[_0x5af792(0x337)]!==_0x5af792(0x25d)&&(console[_0x5af792(0x236)](_0x5af792(0x294)),process[_0x5af792(0x1f8)](0x2)),(_0x2f9bed['delegateTo']!==void 0x0||_0x2f9bed[_0x5af792(0x2b2)]!==void 0x0)&&_0x2f9bed['subcommand']!==_0x5af792(0x211)&&(console['error']('--to\x20and\x20--summary\x20apply\x20to\x20`delegate-cli\x20delegations\x20create`\x20only.'),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed['turnId']!==void 0x0&&_0x2f9bed[_0x5af792(0x337)]!=='sessions'&&(console[_0x5af792(0x236)](_0x5af792(0x399)),process[_0x5af792(0x1f8)](0x2)),_0x2f9bed[_0x5af792(0x1eb)]=[...new Set(_0x2f9bed[_0x5af792(0x1eb)])],_0x2f9bed['operands']=_0x3b71ff,_0x2f9bed['prompt']=_0x3b71ff[_0x5af792(0x335)]('\x20'),_0x2f9bed;}var S=_0x42b510=>{const _0x1872f5=_0x5c3cd6;process[_0x1872f5(0x29e)]['write'](_0x42b510);};function gt(){const _0x273bf8=_0x5c3cd6;let _0x380249=process[_0x273bf8(0x29e)][_0x273bf8(0x35e)],_0x454bd9=_0x380249[_0x273bf8(0x30c)](process[_0x273bf8(0x29e)]),_0x7f9a7a=S;return S=_0x4fe6a4=>{_0x454bd9(_0x4fe6a4);},process[_0x273bf8(0x29e)][_0x273bf8(0x35e)]=(..._0x508069)=>process[_0x273bf8(0x2dc)]['write'](..._0x508069),()=>{const _0x38bc7e=_0x273bf8;process[_0x38bc7e(0x29e)]['write']=_0x380249,S=_0x7f9a7a;};}function l(_0x1872d9,_0x419271,_0x2ea76b){const _0x41da64=_0x5c3cd6;if(_0x1872d9[_0x41da64(0x360)]===_0x41da64(0x338)){_0x2ea76b(_0x419271);return;}S(_0x3f1b63(_0x419271));}function ht(){const _0x37be79=_0x5c3cd6;let _0x3cfa74=_0x37be79(0x2fe)[_0x37be79(0x31c)]();console['log'](_0x3cfa74);}function wt(){const _0x53056c=_0x5c3cd6;try{return JSON[_0x53056c(0x27d)](_0xea0a68[_0x53056c(0x287)](_0x4d472f[_0x53056c(0x335)](__dirname,'..',_0x53056c(0x2ec)),_0x53056c(0x312)))[_0x53056c(0x1e8)]||_0x53056c(0x313);}catch{return _0x53056c(0x313);}}var yt=0x7d0;async function K(_0x19005c,_0x473fad){const _0x36c1c1=_0x5c3cd6;let _0x2ce2ee=_0x473fad?[_0x473fad]:[];for await(let _0x4ecee8 of _0x19005c)_0x2ce2ee[_0x36c1c1(0x36f)](Buffer[_0x36c1c1(0x20c)](_0x4ecee8));return Buffer[_0x36c1c1(0x354)](_0x2ce2ee)[_0x36c1c1(0x311)]('utf-8')[_0x36c1c1(0x31c)]();}function kt(_0x32f32a,_0x107a56){return new Promise(_0x269951=>{const _0x1994bd=_0x4db8;let _0xc3e0c1=_0x8b7341=>{const _0x4f3881=_0x4db8;clearTimeout(_0xe5868b),_0x32f32a[_0x4f3881(0x1f0)](_0x4f3881(0x260),_0x5c9272),_0x32f32a[_0x4f3881(0x1f0)]('end',_0x3a813e),_0x32f32a['off'](_0x4f3881(0x236),_0x3a813e),_0x32f32a[_0x4f3881(0x310)](),_0x269951(_0x8b7341);},_0x5c9272=_0xbf6f12=>_0xc3e0c1(Buffer[_0x1994bd(0x20c)](_0xbf6f12)),_0x3a813e=()=>_0xc3e0c1(null),_0xe5868b=setTimeout(()=>_0xc3e0c1(null),_0x107a56);_0x32f32a['on'](_0x1994bd(0x260),_0x5c9272),_0x32f32a['on'](_0x1994bd(0x377),_0x3a813e),_0x32f32a['on'](_0x1994bd(0x236),_0x3a813e),_0x32f32a[_0x1994bd(0x205)]();});}async function I(_0x1c18d8,_0x48570a,_0x7dad6c=yt){let _0xa7fe06=_0x1c18d8==='-';if(!_0xa7fe06&&_0x1c18d8)return _0x1c18d8;if(!_0xa7fe06&&_0x48570a['isTTY'])return'';if(_0xa7fe06)return K(_0x48570a,null);let _0x3fa899=await kt(_0x48570a,_0x7dad6c);return _0x3fa899?K(_0x48570a,_0x3fa899):'';}function L(){const _0x5208a9=_0x5c3cd6;return _0x4d472f[_0x5208a9(0x335)](process.env.HOME||process.env.USERPROFILE||'','.aria','auth.json');}function $(_0x4463eb){const _0x2e1dd6=_0x5c3cd6;try{let _0x513686=JSON[_0x2e1dd6(0x27d)](_0xea0a68[_0x2e1dd6(0x287)](_0x4463eb,_0x2e1dd6(0x312)));return!_0x513686[_0x2e1dd6(0x1fe)]||!_0x513686[_0x2e1dd6(0x26a)]||!_0x513686[_0x2e1dd6(0x306)]?null:_0x513686;}catch{return null;}}function St(){const _0x597d7a=_0x5c3cd6;let _0x1bba3e=[{'file':_0x28797c(),'isDesktopFallback':!0x1},{'file':L(),'isDesktopFallback':!0x0}];for(let _0x4e3f41 of _0x1bba3e){let _0x15a5e5=$(_0x4e3f41[_0x597d7a(0x24b)]);if(_0x15a5e5)return{..._0x4e3f41,'auth':_0x15a5e5};}return null;}async function bt(){const _0x37a2ec=_0x5c3cd6;let _0x1bb76c=_0x28797c();if(!_0xea0a68[_0x37a2ec(0x2ce)](_0x1bb76c)){let _0x1ba401=L();console['log']($(_0x1ba401)?_0x37a2ec(0x234)+_0x1ba401+_0x37a2ec(0x351):_0x37a2ec(0x26c));return;}_0xea0a68[_0x37a2ec(0x277)](_0x1bb76c),console[_0x37a2ec(0x35c)](_0x37a2ec(0x36a)+_0x1bb76c);}async function vt(_0x4a2756){const _0x2c10a8=_0x5c3cd6;let _0x323375=O(),_0x576f6f,_0x53edfe;if(_0x323375)_0x576f6f=_0x323375,_0x53edfe=_0x2c10a8(0x28d);else{let _0x32a57f=St();if(!_0x32a57f)throw new Error(le);_0x576f6f=_0x32a57f[_0x2c10a8(0x333)],_0x53edfe=_0x32a57f['isDesktopFallback']?_0x32a57f[_0x2c10a8(0x24b)]+_0x2c10a8(0x2fb):_0x32a57f[_0x2c10a8(0x24b)];}let _0x40b842={'source':_0x53edfe,'baseUrl':_0x576f6f[_0x2c10a8(0x203)]??null,'deployment':At(_0x576f6f[_0x2c10a8(0x203)]),'organization':{'id':_0x576f6f['organizationId'],'slug':_0x576f6f[_0x2c10a8(0x2c6)]??null},'tenant':{'id':_0x576f6f[_0x2c10a8(0x26a)],'name':_0x576f6f[_0x2c10a8(0x327)]??null},'tokenExpiresAt':_0x576f6f['expiresAt']?new Date(_0x576f6f[_0x2c10a8(0x33e)]*0x3e8)['toISOString']():null};l(_0x4a2756,_0x40b842,()=>{const _0x58fc68=_0x2c10a8;let _0x14f84a=[_0x58fc68(0x363)+_0x53edfe,_0x58fc68(0x2c5)+(_0x576f6f[_0x58fc68(0x203)]??_0x58fc68(0x313)),_0x58fc68(0x30d)+_0x40b842[_0x58fc68(0x208)],_0x58fc68(0x353)+(_0x576f6f[_0x58fc68(0x2c6)]??_0x58fc68(0x33c))+'\x20('+_0x576f6f[_0x58fc68(0x306)]+')',_0x58fc68(0x241)+(_0x576f6f[_0x58fc68(0x327)]??_0x58fc68(0x33c))+'\x20('+_0x576f6f[_0x58fc68(0x26a)]+')'];if(_0x576f6f[_0x58fc68(0x33e)]){let _0x17f1db=_0x576f6f[_0x58fc68(0x33e)]-Math[_0x58fc68(0x2b5)](Date['now']()/0x3e8);_0x14f84a[_0x58fc68(0x36f)](_0x17f1db>0x0?_0x58fc68(0x34f)+_0x40b842[_0x58fc68(0x28b)]+'\x20(in\x20'+Math[_0x58fc68(0x349)](_0x17f1db/0x3c)+_0x58fc68(0x302):_0x58fc68(0x343)+_0x40b842[_0x58fc68(0x28b)]);}process[_0x58fc68(0x29e)]['write'](_0x14f84a[_0x58fc68(0x335)]('\x0a')+'\x0a');});}var le=_0x5c3cd6(0x369);function At(_0x5d9af2){const _0x377393=_0x5c3cd6;return _0x5d9af2?_0x1fd96d(_0x5d9af2)?'UiPath\x20Cloud':'self-hosted\x20(Automation\x20Suite\x20/\x20Dedicated)':_0x377393(0x313);}function O(){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':ce()}:null;}function _0x5f38(){const _0x32d3fe=['fork','assignedUser','evaluate','contextSummary','type','bundledSkillsPath','floor','resolve','tool_call','\x20needs\x20a\x20JSON\x20request:\x20delegate-cli\x20','19346160LbYYMj','delegations\x20dismiss\x20<delegation-id>','Licensing:\x20\x20\x20\x20no\x20licensing\x20quota\x20applies','No\x20sessions\x20on\x20page\x20','string','Usage:\x20delegate-cli\x20sessions\x20[list]\x20[--page\x20N]\x20[--limit\x20N]\x20[--include-subagents]','period_days','pendingResults',',\x20whose\x20tenant\x20is\x20chosen\x20in\x20the\x20app.\x20Run\x20`delegate-cli\x20login\x20--env\x20<env>`\x20for\x20a\x20CLI\x20login\x20of\x20your\x20own.','extra_pool_consumed_pu','[env=','then','Base\x20URL:\x20\x20\x20\x20\x20','orgLogicalName','Continue\x20it\x20with:\x20delegate-cli\x20--session\x20','\x20<file.json>,\x20or\x20-\x20to\x20read\x20stdin.','No\x20structured\x20output:\x20the\x20turn\x20failed\x20(','3978920ioTcfZ','deleted','[saved\x20login]\x20Backend\x20URL:\x20','2smnZej','existsSync','total_quota_pu','alpha','--backend','a\x20project\x20id','keepAlive','choice','onEvent','max','delegations\x20delete\x20<delegation-id>','title','1\x20or\x20more','org-users','status','stderr','--no-security','--page','structuredError','env','initialize','page','help','logout','\x20(current)','--page,\x20--limit\x20and\x20--include-subagents\x20apply\x20to\x20`delegate-cli\x20sessions\x20[list]`\x20only.','Interop\x20stopped\x20(if\x20it\x20was\x20running).','Accepted','length','headless','transcribe:\x20cannot\x20read\x20','package.json','stack','complete\x20needs\x20--json-schema\x20<file>:\x20delegate-cli\x20complete\x20--json-schema\x20schema.json\x20\x22<prompt>\x22.','Work\x20on\x20it\x20with:\x20delegate-cli\x20--session\x20','--headless','No\x20answers\x20awaiting\x20acceptance.\x0a','--no-computer-use','\x20--turn\x20',':\x20cannot\x20read\x20the\x20request\x20(','--project','effort','prompt_tokens','Organization\x20\x20','--skills-path','sourceUserEmail','\x20(Delegate\x20desktop\x20app\x20fallback)','days','projectId','\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\x20-p\x20\x22<prompt>\x22\x20--output-format\x20json|stream-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\x20One\x20turn\x20with\x20JSON-only\x20stdout;\x20exit\x201\x20on\x20error\x0a\x20\x20delegate-cli\x20--json-schema\x20FILE\x20\x22<prompt>\x22\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\x20One\x20turn,\x20then\x20its\x20result\x20extracted\x20as\x20JSON\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\x20matching\x20the\x20schema\x20in\x20FILE\x20(printed\x20after\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\x20answer;\x20\x22structured\x22\x20in\x20the\x20JSON\x20result);\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\x20exit\x201\x20when\x20the\x20extraction\x20fails\x0a\x20\x20delegate-cli\x20--attach\x20PATH\x20[--attach\x20PATH\x20...]\x20\x22<prompt>\x22\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\x20Send\x20files\x20or\x20folders\x20with\x20the\x20first\x20message\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\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\x20with\x20any\x20BYO\x20configuration\x20warning\x20per\x20model\x0a\x20\x20delegate-cli\x20sessions\x20[list]\x20[--page\x20N]\x20[--limit\x20N]\x20[--include-subagents]\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\x20List\x20your\x20backend\x20chat\x20sessions,\x20most\x20recently\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\x20active\x20first\x20(resume\x20one\x20with\x20--session\x20ID)\x0a\x20\x20delegate-cli\x20sessions\x20show|delete\x20ID\x20Show\x20one\x20session\x27s\x20title\x20and\x20owner,\x20or\x20delete\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\x20with\x20its\x20messages\x20and\x20sub-agents\x20(no\x20prompt)\x0a\x20\x20delegate-cli\x20sessions\x20rename\x20ID\x20TITLE\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\x20Rename\x20a\x20session\x20(1-500\x20characters)\x0a\x20\x20delegate-cli\x20sessions\x20fork\x20ID\x20[MESSAGE]\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\x20Copy\x20session\x20ID\x20into\x20a\x20new\x20session,\x20up\x20to\x20and\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\x20including\x20message\x20MESSAGE\x20(default:\x20all\x20of\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);\x20continue\x20it\x20with\x20--session\x20NEW_ID\x0a\x20\x20delegate-cli\x20sessions\x20cancel\x20ID\x20--turn\x20TURN\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\x20Cancel\x20turn\x20TURN\x20running\x20on\x20session\x20ID\x20in\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\x20another\x20process;\x20exits\x201\x20when\x20no\x20such\x20turn\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\x20is\x20in\x20progress\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\x20readiness,\x20backend\x20and\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\x20interop\x20without\x20sending\x20a\x20prompt;\x20exits\x201\x20when\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\x20any\x20check\x20fails\x0a\x20\x20delegate-cli\x20usage\x20[--session\x20ID]\x20\x20\x20\x20Quota\x20and\x20spend:\x20licensing\x20quota,\x20monthly\x20spend\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\x20and\x20cap,\x20Cartographer\x20allowance\x0a\x20\x20delegate-cli\x20usage\x20activity|daily\x20[--days\x20N]\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\x20Activity\x20totals,\x20or\x20per-day\x20usage,\x20over\x20the\x20last\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\x20N\x20days\x20(1-365,\x20default\x2030)\x0a\x20\x20delegate-cli\x20evaluate|rerank|verify\x20FILE|-\x20[--model\x20ID]\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\x20Stateless\x20typed\x20judgments:\x20send\x20the\x20JSON\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\x20request\x20in\x20FILE\x20(or\x20stdin\x20with\x20-)\x20to\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/v1/completions/<command>\x20and\x20print\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\x20answers;\x20--model\x20overrides\x20its\x20\x22model\x22.\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\x20Exits\x201\x20when\x20the\x20backend\x20rejects\x20it\x0a\x20\x20delegate-cli\x20complete\x20--json-schema\x20FILE\x20[--model\x20ID]\x20[--session\x20ID]\x20\x22<prompt>\x22|-\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\x20One\x20structured\x20completion,\x20no\x20agent\x20turn:\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\x20print\x20the\x20JSON\x20object\x20matching\x20the\x20schema\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\x20in\x20FILE\x20(--output-format\x20json\x20prints\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{structured,\x20usage});\x20--session\x20adds\x20that\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\x20session\x27s\x20history\x20as\x20context.\x20Exits\x201\x20when\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\x20output\x20fails\x20the\x20schema\x20(422)\x20or\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\x20backend\x20rejects\x20the\x20request\x0a\x20\x20delegate-cli\x20transcribe\x20FILE|-\x20\x20\x20\x20\x20\x20\x20Speech-to-text\x20(Whisper):\x20print\x20the\x20text\x20of\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\x20audio\x20in\x20FILE,\x20or\x20on\x20stdin\x20with\x20-.\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\x20mp3,\x20mp4,\x20mpeg,\x20mpga,\x20m4a,\x20wav\x20or\x20webm,\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\x20up\x20to\x2025\x20MiB.\x20Exits\x202\x20when\x20the\x20audio\x20is\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\x20refused\x20locally,\x201\x20when\x20the\x20backend\x20rejects\x20it\x0a\x20\x20delegate-cli\x20org-users\x20QUERY\x20\x20\x20\x20\x20\x20\x20\x20\x20Search\x20your\x20organization\x27s\x20users\x20by\x20name\x20or\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\x20email\x20prefix\x20(2-100\x20characters)\x0a\x20\x20delegate-cli\x20delegations\x20create\x20--session\x20ID\x20[--to\x20WHO]\x20[--summary\x20TEXT]\x20\x22<task>\x22|-\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\x20Hand\x20a\x20task\x20from\x20session\x20ID\x20to\x20a\x20colleague\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(WHO:\x20an\x20email,\x20or\x20a\x20name\x20matching\x20one\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\x20person);\x20without\x20--to,\x20print\x20a\x20link\x20anyone\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\x20in\x20the\x20organization\x20can\x20claim\x0a\x20\x20delegate-cli\x20delegations\x20pending\x20SESSION\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\x20Answers\x20to\x20delegations\x20from\x20SESSION\x20that\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\x20await\x20acceptance\x20(poll\x20this)\x0a\x20\x20delegate-cli\x20delegations\x20accept|dismiss|cancel|delete\x20ID\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\x20Take\x20an\x20answer\x20into\x20its\x20session,\x20drop\x20it,\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\x20withdraw\x20a\x20live\x20delegation,\x20or\x20delete\x20it\x0a\x20\x20delegate-cli\x20delegations\x20list\x20PROJECT\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\x20Every\x20delegation\x20targeting\x20a\x20backend\x20project\x0a\x20\x20delegate-cli\x20delegations\x20show|claim\x20ID|LINK\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\x20Read\x20a\x20delegation\x20assigned\x20to\x20you\x20(or\x20a\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\x20delegate://delegation/…\x20link),\x20or\x20claim\x20it:\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\x20prints\x20the\x20session\x20to\x20work\x20it\x20in\x0a\x20\x20delegate-cli\x20delegations\x20complete\x20ID\x20\x22<answer>\x22|-\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\x20Send\x20the\x20answer\x20to\x20a\x20delegation\x20you\x20claimed\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).\x20Checked\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20against\x20the\x20tenant\x27s\x20catalog\x20(delegate-cli\x20models)\x20before\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20the\x20run\x20starts;\x20an\x20unknown\x20id\x20fails\x20and\x20lists\x20the\x20valid\x20ones.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20gpt_5_6_luna.\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--no-memory\x20\x20\x20\x20\x20\x20\x20Do\x20not\x20send\x20the\x20Delegate\x20app\x27s\x20local\x20long-term\x20memories\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20with\x20each\x20turn,\x20and\x20do\x20not\x20ask\x20the\x20model\x20to\x20save\x20new\x20ones\x0a\x20\x20--attach\x20PATH\x20\x20\x20\x20\x20File\x20or\x20folder\x20sent\x20with\x20the\x20first\x20message\x20(repeatable),\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20as\x20the\x20Delegate\x20app\x20sends\x20attached\x20files:\x20images\x20inline,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20PDFs\x20and\x20other\x20documents\x20as\x20a\x20path\x20the\x20agent\x20reads,\x20text\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20inline\x20up\x20to\x2016,000\x20characters.\x2030\x20MiB\x20per\x20message\x20in\x20all;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20larger\x20files\x20go\x20as\x20a\x20path.\x20In\x20a\x20conversation,\x20later\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20messages\x20carry\x20none\x20of\x20their\x20own,\x20but\x20the\x20first\x20message\x27s\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20stay\x20in\x20context\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-task-list\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\x20Continue\x20an\x20existing\x20backend\x20session\x20(an\x20unknown\x20id\x20exits\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x201;\x20the\x20backend\x20assigns\x20new\x20ids).\x20For\x20complete:\x20the\x20session\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20whose\x20history\x20is\x20the\x20context\x0a\x20\x20--json-schema\x20FILE\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20JSON\x20schema\x20the\x20structured\x20answer\x20must\x20match\x20(complete,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20and\x20prompts:\x20implies\x20--print)\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--page\x20N\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(sessions)\x20Page\x20to\x20show,\x20from\x201.\x20Default:\x201\x0a\x20\x20--limit\x20N\x20\x20\x20\x20\x20\x20\x20\x20\x20(sessions)\x20Rows\x20per\x20page,\x201-100.\x20Default:\x2030\x0a\x20\x20--include-subagents\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(sessions)\x20Also\x20list\x20sub-agent\x20sessions,\x20hidden\x20by\x20default\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20as\x20in\x20the\x20desktop\x20app\x27s\x20history\x0a\x20\x20--to\x20WHO\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(delegations\x20create)\x20Assign\x20to\x20this\x20person:\x20an\x20email,\x20or\x20a\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20name\x20that\x20matches\x20exactly\x20one\x20colleague\x20(see\x20org-users)\x0a\x20\x20--summary\x20TEXT\x20\x20\x20\x20(delegations\x20create)\x20The\x20briefing\x20the\x20person\x20starts\x20from.\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Default:\x20empty,\x20for\x20a\x20task\x20that\x20stands\x20on\x20its\x20own\x0a\x20\x20--output-format\x20FMT\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20text\x20(default)\x20|\x20json\x20|\x20stream-json.\x20json\x20prints\x20one\x20result\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20object\x20on\x20exit;\x20stream-json\x20prints\x20every\x20agent\x20event\x20as\x20one\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20JSON\x20line,\x20then\x20the\x20result.\x20Both\x20keep\x20stdout\x20JSON-only\x20(logs,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20progress\x20and\x20the\x20session\x20id\x20go\x20to\x20stderr),\x20imply\x20--print,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20and\x20exit\x201\x20when\x20the\x20turn\x20ends\x20in\x20error.\x20Also\x20honoured\x20by\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20every\x20subcommand\x20that\x20prints\x20a\x20result\x20(all\x20but\x20login,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20logout,\x20tenant\x20and\x20host)\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\x20Ctrl+C\x20during\x20a\x20turn\x20cancels\x20it\x20on\x20the\x20backend\x20too;\x20a\x20second\x20Ctrl+C\x20force-exits.\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','the\x20JSON\x20schema','name',':\x20cannot\x20read\x20the\x20JSON\x20schema\x20(','\x20min)','verbose','test','--effort','organizationId','--tenant\x20requires\x20a\x20tenant\x20name.','Usage:\x20delegate-cli\x20org-users\x20<name\x20or\x20email\x20prefix>','models','pct_used','rubric_version','bind','Deployment:\x20\x20\x20','delete','\x20to\x20','pause','toString','utf-8','unknown','\x20applies\x20to\x20prompts\x20and\x20to\x20these\x20commands\x20only:\x20','medium','sessionId','--model','alreadyAccepted','Delegated\x20','getTurnUsageHistory','--attach','trim','assignedUserEmail','42463PXeNUu','.\x20Use\x20alpha\x20|\x20staging\x20|\x20production\x20|\x20localhost.','noSecurity','check','login','--no-memory','low','Last\x20','--output-format','tenantName','delegation','exitCode','description','>.\x0a','stop','delegations\x20list\x20<backend-project-id>','isError','No\x20delegations.\x0a','Invalid\x20--effort:\x20','locked','results','auth','workingDirectory','join','hide','subcommand','text','a\x20briefing\x20text','total_completion_tokens','\x20from\x20','unknown\x20slug','\x20\x20TITLE\x0a','expiresAt','stdin','an\x20email\x20address\x20or\x20name','total_token_units','the\x20request','Token:\x20\x20\x20\x20\x20\x20\x20\x20expired\x20','\x20\x22<prompt>\x22\x0aAnswer\x20with:\x20delegate-cli\x20delegations\x20complete\x20','\x20<id>','noMemory','score\x20','from\x201\x20to\x20','round','cleanup','startsWith','once','--to,\x20--summary\x20and\x20--session\x20apply\x20to\x20`delegate-cli\x20delegations\x20create`\x20only.','total_prompt_tokens','Token:\x20\x20\x20\x20\x20\x20\x20\x20expires\x20','--output-format\x20','\x20—\x20sign\x20out\x20in\x20the\x20Delegate\x20app\x20to\x20clear\x20that.','--attach\x20applies\x20to\x20prompts\x20only.','Organization:\x20','concat','quiet','--env\x20localhost\x20has\x20no\x20OAuth\x20flow;\x20pick\x20alpha,\x20staging,\x20or\x20production.','\x20days:\x20','host','session_consumed_pu','--session','pending','log','probability','write','rejection','outputFormat','--skip-env-check','From\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Source:\x20\x20\x20\x20\x20\x20\x20','content','--session\x20applies\x20to\x20the\x20`delegate-cli\x20usage`\x20summary\x20only.','index','Usage:\x20delegate-cli\x20','limit','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.','Removed\x20','\x20is\x20not\x20valid\x20JSON\x20(','a\x20session\x20id','\x22.\x0a','Deleted\x20session\x20','push','email','message','2982aehgMz','a\x20deployment\x20URL,\x20e.g.\x20https://automationsuite.contoso.com','add','url','runnerUrl','end','\x20token\x20units','Structured\x20output\x20failed:\x20','token_units','entries','a\x20format\x20(','task','sourceTitle','Unknown\x20sessions\x20action:\x20','%\x20of\x20','Answered','Invalid\x20--env:\x20','toUpperCase','--days\x20applies\x20to\x20`delegate-cli\x20usage\x20activity|daily`;\x20the\x20summary\x20covers\x20the\x20current\x20month.','Forked\x20','operands','\x20of\x20session\x20','a\x20file\x20path','--summary','ID\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','parentSessionId','create','Cancel\x20requested\x20for\x20turn\x20','delegations\x20claim\x20<delegation-id|delegate://delegation/…>','\x20active\x20days','estimated_cost_usd','result','\x0aStopping…\x20(Ctrl+C\x20again\x20to\x20force\x20exit)\x0a','rename','\x20\x20from\x20','daily_usage','\x20\x20\x20\x20BYO\x20warning:\x20','staging','map','--turn\x20applies\x20to\x20`delegate-cli\x20sessions\x20cancel`\x20only.','3339306AzcAkl','),\x20','lastType','structured','version','includeSubAgents','stream-json','preloadSkills','\x20prompt,\x20','show','isSafeInteger','Cartographer:\x20','off','complete\x20needs\x20a\x20prompt:\x20delegate-cli\x20complete\x20--json-schema\x20schema.json\x20\x22<prompt>\x22,\x20or\x20-\x20to\x20read\x20stdin.','turn_start','18HEMqRm','close','delegate-cli','\x20must\x20be\x20a\x20JSON\x20object.','\x20PU','exit','Session\x20\x20\x20\x20\x20\x20\x20','prompt','noComputerUse','--preload-skill','\x0aAvailable\x20models\x20(','accessToken','\x20requires\x20','claim','ASSIGNEE','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','baseUrl','done','resume','a\x20JSON\x20schema\x20file','Pass\x20either\x20--env\x20(a\x20named\x20cloud)\x20or\x20--url\x20(any\x20other\x20deployment),\x20not\x20both.','deployment','toFixed','list','padEnd','from','SIGINT','/exit','--version','workerId','delegations','\x20(confidence\x20','transcribe','--runner-url','backendUrl','isTTY','sendMessage','cancel','\x20this\x20month','Model\x20','includes','--env','.\x20Use\x20','thinking','destroy','--url\x20applies\x20to\x20`delegate-cli\x20login`\x20only.\x20Other\x20commands\x20follow\x20the\x20saved\x20login,\x20or\x20--backend\x20<url>.','forEach','No\x20turn\x20','replace','Enter\x20sends\x20a\x20message.\x20/exit\x20or\x20EOF\x20exits;\x20Ctrl+C\x20stops\x20and\x20exits.\x0a','.\x20Use:\x20','a\x20colleague','--working-dir','--turn','delegations\x20cancel\x20<delegation-id>','jsonSchemaPath','delegations\x20show\x20<delegation-id|delegate://delegation/…>','3484208ytnjDb','updatedAt','--interop',').\x0a','--help','interopPath','origin','Spending:\x20\x20\x20\x20\x20$','No\x20CLI\x20login\x20found.\x20Note:\x20the\x20CLI\x20is\x20currently\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20','--no-connections','error','total_tokens','--url','Already\x20accepted','attachments','tenant','Claimed\x20from\x20delegation\x20','No\x20models\x20available\x20for\x20this\x20product/tenant.\x0a','--days','.\x20Share:\x20','delegateTo','Tenant:\x20\x20\x20\x20\x20\x20\x20','padStart','\x20|\x20','complete','localhost','):\x0a\x0a',']\x20Backend\x20URL:\x20','limit_enabled','cwd','\x20into\x20','file','\x20PU\x20used','Switch\x20with:\x20delegate-cli\x20tenant\x20<name>\x0a','🔧\x20','argv','lockReason','total_cost_usd','UIPATH_BASE_URL\x20is\x20unusable.\x20','\x20in\x20progress\x20on\x20session\x20','spawn','answers','Tokens:\x20','date','\x20\x22<prompt>\x22\x0a','\x20PU\x20beyond\x20quota','confidence','all','Tenants\x20of\x20','sessions','delegations\x20pending\x20<session-id>','monthly_limit_usd','data','cancelled','Usage:\x20delegate-cli\x20sessions\x20cancel\x20<session-id>\x20--turn\x20<turn-id>','code','active_days','Unknown\x20delegations\x20action:\x20','Session:\x20','\x20\x20\x20\x20Not\x20available\x20on\x20this\x20plan','whoami','total_sessions','tenantId','Date\x20\x20\x20\x20\x20\x20\x20\x20Token\x20units\x20\x20Prompt\x20tokens\x20\x20Completion\x20tokens','No\x20CLI\x20login\x20found\x20—\x20nothing\x20to\x20remove.','asyncIterator','catch','restore','userId','--tenant\x20applies\x20to\x20`delegate-cli\x20login`\x20only.\x20Switch\x20tenants\x20with:\x20delegate-cli\x20tenant\x20<name>','verdict','response','turnId','Tenant:\x20','stringify','rmSync','\x20(no\x20cap\x20enforced)','a\x20directory\x20path','score','delegations\x20complete\x20<delegation-id>\x20\x22<answer>\x22|-','5803AkgEMC','parse','--tenant','Invalid\x20--output-format:\x20','2600305cXNJjk','object','model_version','session_start','\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).','mode','model','readFileSync','getSessionId','usage','\x20\x20TASK\x0a','tokenExpiresAt','\x20days.\x0a','environment\x20variables\x20(AUTH_TOKEN/TENANT_ID/ORG_ID)','\x20\x20(sub-agent\x20of\x20','daily','\x20tokens\x0a','\x20\x22<answer>\x22\x0a','--verbose','No\x20CLI\x20login\x20found.\x20Run\x20`delegate-cli\x20login\x20--env\x20<alpha|staging|production>`\x20first.','--page,\x20--limit\x20and\x20--include-subagents\x20apply\x20to\x20`delegate-cli\x20sessions`\x20only.','--attach:\x20no\x20such\x20file\x20or\x20folder:\x20','noConnections','Task\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','slice','Owner\x20\x20\x20\x20\x20\x20\x20\x20\x20','now','delegationId','an\x20effort\x20tier','verify','stdout','Unknown\x20usage\x20view:\x20','\x20delegation\x20','displayName','activity','monthly_spend_usd','--cartographer','rerank','detail','Created\x20delegation\x20','skipEnvCheck','\x20completion','--days\x20applies\x20to\x20`delegate-cli\x20usage\x20activity|daily`\x20only.','Tenant\x20not\x20switched:\x20could\x20not\x20write\x20','a\x20skill\x20name','a\x20number','accept'];_0x5f38=function(){return _0x32d3fe;};return _0x5f38();}function ce(){const _0x21537e=_0x5c3cd6;let _0x3714b9=process.env.UIPATH_BASE_URL;if(!_0x3714b9)return;let _0x17074f=_0x3e44ab(_0x3714b9);if(_0x17074f['ok']===!0x1)throw new Error(_0x21537e(0x252)+_0x327834(_0x3714b9,_0x17074f[_0x21537e(0x35f)]));return _0x17074f[_0x21537e(0x203)];}async function P(){let _0x367671=O();if(_0x367671)return _0x367671;let _0x5776d4=await _0x1157c5();if(_0x5776d4)return _0x5776d4;throw new Error(le);}async function Et(){const _0x555559=_0x5c3cd6;await new _0x4dd290()[_0x555559(0x32c)]({'force':!0x0}),console[_0x555559(0x35c)](_0x555559(0x2e7));}function j(_0x1dda4d,_0x4e2b1e,_0x583166){const _0x31c990=_0x5c3cd6;_0x1dda4d?process[_0x31c990(0x2dc)]['write'](_0x31c990(0x2c3)+_0x1dda4d+_0x31c990(0x247)+_0x583166+'\x0a'):!_0x4e2b1e&&!process.env.BACKEND_URL&&process[_0x31c990(0x2dc)][_0x31c990(0x35e)](_0x31c990(0x2cc)+_0x583166+'\x0a');}async function f(_0x21db28){const _0x52bf4d=_0x5c3cd6;let _0x465e5d=await P(),_0x2204e4=_0x4abdb1(_0x21db28[_0x52bf4d(0x2e0)],_0x465e5d,_0x21db28['backendUrl']);return j(_0x21db28[_0x52bf4d(0x2e0)],_0x21db28[_0x52bf4d(0x215)],_0x2204e4),{'auth':_0x465e5d,'backendUrl':_0x2204e4,'client':_0x2e3a78({'auth':_0x465e5d,'backendUrl':_0x2204e4})};}async function It(_0x69f407){const _0x1270d8=_0x5c3cd6;let {client:_0x517240}=await f(_0x69f407),[_0x4f33a4,_0x4db11b]=await Promise['all']([_0x1332c6(_0x517240),_0x4b36c9(_0x517240)['catch'](_0x46466f=>(process[_0x1270d8(0x2dc)][_0x1270d8(0x35e)]('Could\x20not\x20check\x20BYO\x20model\x20warnings:\x20'+(_0x46466f instanceof Error?_0x46466f['message']:String(_0x46466f))+'\x0a'),{}))]),_0x5eb07b=_0x4f33a4[_0x1270d8(0x398)](_0x31f9c8=>_0x4db11b[_0x31f9c8['id']]?{..._0x31f9c8,'byoWarning':_0x4db11b[_0x31f9c8['id']]}:_0x31f9c8);l(_0x69f407,_0x5eb07b,$t);}function $t(_0x23aab8){const _0x18b2d5=_0x5c3cd6;if(_0x23aab8[_0x18b2d5(0x2e9)]===0x0){process[_0x18b2d5(0x2dc)][_0x18b2d5(0x35e)](_0x18b2d5(0x23d));return;}process[_0x18b2d5(0x29e)][_0x18b2d5(0x35e)](_0x18b2d5(0x1fd)+_0x23aab8[_0x18b2d5(0x2e9)]+_0x18b2d5(0x246));for(let _0x2a9e67 of _0x23aab8){let _0x452d15=_0x2a9e67[_0x18b2d5(0x300)]&&_0x2a9e67[_0x18b2d5(0x300)]!==_0x2a9e67['id']?'\x20('+_0x2a9e67['name']+')':'';process[_0x18b2d5(0x29e)][_0x18b2d5(0x35e)]('\x20\x20'+_0x2a9e67['id']+_0x452d15+'\x0a'),_0x2a9e67[_0x18b2d5(0x32a)]&&process['stdout'][_0x18b2d5(0x35e)]('\x20\x20\x20\x20'+_0x2a9e67[_0x18b2d5(0x32a)]+'\x0a'),_0x2a9e67[_0x18b2d5(0x331)]&&process[_0x18b2d5(0x29e)]['write'](_0x18b2d5(0x267)+(_0x2a9e67[_0x18b2d5(0x250)]?'\x20('+_0x2a9e67[_0x18b2d5(0x250)]+')':'')+'\x0a'),_0x2a9e67['byoWarning']&&process['stdout'][_0x18b2d5(0x35e)](_0x18b2d5(0x396)+_0x2a9e67['byoWarning']+'\x0a');}process['stdout'][_0x18b2d5(0x35e)]('\x0aUse\x20with:\x20delegate-cli\x20--model\x20<id>\x20\x22<prompt>\x22\x0a');}var z=[_0x5c3cd6(0x20a),'show',_0x5c3cd6(0x393),'delete',_0x5c3cd6(0x218),_0x5c3cd6(0x2af)];async function xt(_0x405c67){const _0x430c79=_0x5c3cd6;let [_0x4f4f6e='',_0x5c876f='',..._0x5929af]=_0x405c67[_0x430c79(0x386)];if(_0x4f4f6e&&!z[_0x430c79(0x21b)](_0x4f4f6e)&&(console[_0x430c79(0x236)](_0x430c79(0x37f)+_0x4f4f6e+_0x430c79(0x225)+z[_0x430c79(0x335)](_0x430c79(0x243))+'.'),process[_0x430c79(0x1f8)](0x2)),_0x405c67[_0x430c79(0x274)]!==void 0x0&&_0x4f4f6e!==_0x430c79(0x218)&&(console[_0x430c79(0x236)](_0x430c79(0x399)),process[_0x430c79(0x1f8)](0x2)),_0x4f4f6e&&_0x4f4f6e!==_0x430c79(0x20a)){await Tt(_0x405c67,_0x4f4f6e,_0x5c876f,_0x5929af['join']('\x20')[_0x430c79(0x31c)]());return;}_0x405c67[_0x430c79(0x386)][_0x430c79(0x2e9)]>0x1&&(console[_0x430c79(0x236)](_0x430c79(0x2be)),process['exit'](0x2));let {client:_0x31c5bb}=await f(_0x405c67),_0x11c037=await _0x3c5837(_0x31c5bb,{'page':_0x405c67['page'],'pageSize':_0x405c67[_0x430c79(0x368)],'includeSubAgents':_0x405c67['includeSubAgents']});l(_0x405c67,_0x11c037,Nt);}async function Tt(_0x15b5c6,_0x21e950,_0x3f0a78,_0x5edd7a){const _0x677521=_0x5c3cd6;if((_0x15b5c6['page']!==void 0x0||_0x15b5c6[_0x677521(0x368)]!==void 0x0||_0x15b5c6[_0x677521(0x1e9)])&&(console[_0x677521(0x236)](_0x677521(0x2e6)),process[_0x677521(0x1f8)](0x2)),_0x21e950==='cancel'){await Ut(_0x15b5c6,_0x3f0a78,_0x5edd7a);return;}if(_0x21e950===_0x677521(0x2af)){await _t(_0x15b5c6,_0x3f0a78,_0x5edd7a);return;}(!_0x3f0a78||_0x21e950===_0x677521(0x393)!=!!_0x5edd7a)&&(console[_0x677521(0x236)]('Usage:\x20delegate-cli\x20sessions\x20'+_0x21e950+_0x677521(0x345)+(_0x21e950===_0x677521(0x393)?'\x20<title>':'')),process[_0x677521(0x1f8)](0x2));let {client:_0x220922}=await f(_0x15b5c6);try{if(_0x21e950===_0x677521(0x1ed)){let _0x33c6b7=await _0x4fda64(_0x220922,_0x3f0a78);_0x33c6b7||V(_0x3f0a78),l(_0x15b5c6,_0x33c6b7,Dt);}else{if(_0x21e950==='rename'){let _0x365416=await _0x102864(_0x220922,_0x3f0a78,_0x5edd7a);l(_0x15b5c6,_0x365416,_0x3bb02c=>{const _0x5c8bd0=_0x677521;process[_0x5c8bd0(0x29e)][_0x5c8bd0(0x35e)]('Renamed\x20'+_0x3bb02c['id']+':\x20'+_0x3bb02c[_0x5c8bd0(0x2d8)]+'\x0a');});}else await _0x4ded31(_0x220922,_0x3f0a78),l(_0x15b5c6,{'id':_0x3f0a78,'deleted':!0x0},_0x43044f=>{const _0x3d0bd8=_0x677521;process['stdout'][_0x3d0bd8(0x35e)](_0x3d0bd8(0x36e)+_0x43044f['id']+'.\x0a');});}}catch(_0x5d4096){if(!_0x161c57(_0x5d4096,0x194))throw _0x5d4096;V(_0x3f0a78);}}function V(_0x4b807b){const _0x373775=_0x5c3cd6;console[_0x373775(0x236)]('Session\x20'+_0x4b807b+'\x20not\x20found.'),process['exit'](0x1);}function Dt(_0x5b65dc){const _0x2ff8d1=_0x5c3cd6;process[_0x2ff8d1(0x29e)][_0x2ff8d1(0x35e)](_0x2ff8d1(0x38a)+_0x5b65dc['id']+'\x0a'),process[_0x2ff8d1(0x29e)][_0x2ff8d1(0x35e)]('Title\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5b65dc[_0x2ff8d1(0x2d8)]+'\x0a'),process[_0x2ff8d1(0x29e)][_0x2ff8d1(0x35e)](_0x2ff8d1(0x299)+_0x5b65dc[_0x2ff8d1(0x270)]+'\x0a'),process[_0x2ff8d1(0x29e)]['write'](_0x2ff8d1(0x2f8)+_0x5b65dc[_0x2ff8d1(0x306)]+'\x0a'),_0x5b65dc[_0x2ff8d1(0x29b)]&&process['stdout'][_0x2ff8d1(0x35e)]('Delegation\x20\x20\x20\x20'+_0x5b65dc[_0x2ff8d1(0x29b)]+'\x0a');}async function Ut(_0x4dea05,_0x481835,_0x534738){const _0x481877=_0x5c3cd6;(!_0x481835||_0x534738||!_0x4dea05[_0x481877(0x274)])&&(console[_0x481877(0x236)](_0x481877(0x262)),process['exit'](0x2));let {client:_0x413e4c}=await f(_0x4dea05),_0xfe8ba0=await _0x4961b7(_0x413e4c,_0x481835,_0x4dea05[_0x481877(0x274)]);l(_0x4dea05,{'sessionId':_0x481835,'turnId':_0x4dea05[_0x481877(0x274)],'cancelled':_0xfe8ba0},_0x12e0bf=>{const _0x42cb3d=_0x481877;_0x12e0bf[_0x42cb3d(0x261)]?process[_0x42cb3d(0x29e)][_0x42cb3d(0x35e)](_0x42cb3d(0x38d)+_0x12e0bf[_0x42cb3d(0x274)]+_0x42cb3d(0x387)+_0x12e0bf['sessionId']+'.\x0a'):process[_0x42cb3d(0x2dc)][_0x42cb3d(0x35e)](_0x42cb3d(0x222)+_0x12e0bf['turnId']+_0x42cb3d(0x253)+_0x12e0bf['sessionId']+'.\x0a');}),_0xfe8ba0||(process[_0x481877(0x329)]=0x1);}async function _t(_0x39033c,_0x2df317,_0x56cc65){const _0x345980=_0x5c3cd6;(!_0x2df317||/\s/[_0x345980(0x304)](_0x56cc65))&&(console['error']('Usage:\x20delegate-cli\x20sessions\x20fork\x20<id>\x20[<message-id>]'),process[_0x345980(0x1f8)](0x2));let {client:_0x4cc6e2}=await f(_0x39033c),_0x59091a;try{_0x59091a=await _0x10c080(_0x4cc6e2,_0x2df317,{'atMessageId':_0x56cc65||void 0x0});}catch(_0x274907){if(!_0x161c57(_0x274907,0x194))throw _0x274907;console[_0x345980(0x236)]('Session\x20'+_0x2df317+'\x20not\x20found,\x20has\x20no\x20messages'+(_0x56cc65?',\x20or\x20holds\x20no\x20message\x20'+_0x56cc65:'')+'.'),process['exit'](0x1);}l(_0x39033c,_0x59091a,_0x71727a=>{const _0x415cef=_0x345980;process['stdout'][_0x415cef(0x35e)](_0x415cef(0x385)+_0x2df317+_0x415cef(0x24a)+_0x71727a['id']+'.\x0a'),process[_0x415cef(0x2dc)][_0x415cef(0x35e)](_0x415cef(0x2c7)+_0x71727a['id']+_0x415cef(0x258));});}function Nt({sessions:_0x2cb15f,page:_0xf06267,isLastPage:_0x45634a}){const _0x2b1e85=_0x5c3cd6;if(_0x2cb15f[_0x2b1e85(0x2e9)]===0x0)process[_0x2b1e85(0x2dc)][_0x2b1e85(0x35e)](_0x2b1e85(0x2bc)+_0xf06267+'.\x0a');else{process[_0x2b1e85(0x29e)][_0x2b1e85(0x35e)]('ID'['padEnd'](0x24)+'\x20\x20'+'UPDATED'[_0x2b1e85(0x20b)](0x13)+_0x2b1e85(0x33d));for(let _0x514b1f of _0x2cb15f){let _0x45836e=_0x514b1f[_0x2b1e85(0x22d)][_0x2b1e85(0x223)]('T','\x20')[_0x2b1e85(0x298)](0x0,0x13),_0x2cb059=_0x514b1f[_0x2b1e85(0x38b)]?_0x2b1e85(0x28e)+_0x514b1f[_0x2b1e85(0x38b)]+')':'';process[_0x2b1e85(0x29e)][_0x2b1e85(0x35e)](_0x514b1f['id'][_0x2b1e85(0x20b)](0x24)+'\x20\x20'+_0x45836e['padEnd'](0x13)+'\x20\x20'+_0x514b1f[_0x2b1e85(0x2d8)]+_0x2cb059+'\x0a');}}_0x45634a||process[_0x2b1e85(0x2dc)][_0x2b1e85(0x35e)]('More:\x20delegate-cli\x20sessions\x20--page\x20'+(_0xf06267+0x1)+'\x0a');}async function Ct(_0x445e7e){const _0x3846c3=_0x5c3cd6;let _0x52dd0a=await P(),_0x5dd285=_0x4abdb1(_0x445e7e[_0x3846c3(0x2e0)],_0x52dd0a,_0x445e7e[_0x3846c3(0x215)]);j(_0x445e7e[_0x3846c3(0x2e0)],_0x445e7e[_0x3846c3(0x215)],_0x5dd285);let _0x16d1e2=await _0x4bf9cf({'auth':_0x52dd0a,'backendUrl':_0x5dd285,'interop':_0x445e7e[_0x3846c3(0x2ea)]?'skip':_0x3846c3(0x254)});l(_0x445e7e,_0x16d1e2,({checks:_0x469527})=>{const _0x4a2215=_0x3846c3;for(let _0x1b027b of _0x469527)process[_0x4a2215(0x29e)][_0x4a2215(0x35e)](Rt(_0x1b027b)+'\x0a');}),_0x16d1e2['ok']||process[_0x3846c3(0x1f8)](0x1);}function Rt(_0x37a897){const _0x58ad89=_0x5c3cd6;return{'ok':'✓','failed':'✗','skipped':'-'}[_0x37a897[_0x58ad89(0x2db)]]+'\x20'+_0x37a897['name'][_0x58ad89(0x20b)](0xa)+_0x37a897[_0x58ad89(0x2a6)];}var Lt=['',_0x5c3cd6(0x2a2),_0x5c3cd6(0x28f)];async function Ot(_0x326b0c){const _0x495192=_0x5c3cd6;let _0x3b3ac3=_0x326b0c[_0x495192(0x1fa)];Lt[_0x495192(0x21b)](_0x3b3ac3)||(console[_0x495192(0x236)](_0x495192(0x29f)+_0x326b0c[_0x495192(0x1fa)]+'.\x20Use\x20`delegate-cli\x20usage`,\x20`usage\x20activity`\x20or\x20`usage\x20daily`.'),process[_0x495192(0x1f8)](0x2)),_0x3b3ac3===''&&_0x326b0c[_0x495192(0x2fc)]!==void 0x0&&(console[_0x495192(0x236)](_0x495192(0x384)),process[_0x495192(0x1f8)](0x2)),_0x3b3ac3!==''&&_0x326b0c[_0x495192(0x316)]!==void 0x0&&(console[_0x495192(0x236)](_0x495192(0x365)),process[_0x495192(0x1f8)](0x2));let {client:_0x323482}=await f(_0x326b0c);if(_0x3b3ac3===_0x495192(0x2a2)){l(_0x326b0c,await _0x392af5(_0x323482,{'days':_0x326b0c[_0x495192(0x2fc)]}),jt);return;}if(_0x3b3ac3===_0x495192(0x28f)){l(_0x326b0c,await _0x58a8aa(_0x323482,{'days':_0x326b0c[_0x495192(0x2fc)]}),Ft);return;}let [_0x4656e5,_0x296226,_0x5713dc]=await Promise[_0x495192(0x25b)]([_0x17c196(_0x323482,{'sessionId':_0x326b0c[_0x495192(0x316)]}),_0x14252d(_0x323482),_0x320d0d(_0x323482)]);l(_0x326b0c,{'licensing':_0x4656e5,'monthlySpending':_0x296226,'cartographerAllowance':_0x5713dc},Pt);}function Pt(_0x544967){const _0x925051=_0x5c3cd6;let {licensing:_0x488523,monthlySpending:_0x284125,cartographerAllowance:_0x307211}=_0x544967,_0x2ae6a7=[_0x488523[_0x925051(0x248)]?'Licensing:\x20\x20\x20\x20'+_0x488523[_0x925051(0x30a)]['toFixed'](0x1)+_0x925051(0x380)+(_0x488523[_0x925051(0x2cf)]??0x0)+_0x925051(0x24c)+(_0x488523['extra_pool_consumed_pu']>0x0?',\x20'+_0x488523[_0x925051(0x2c2)]+_0x925051(0x259):'')+'\x20(resets\x20'+_0x488523['period_end']+')':_0x925051(0x2bb),_0x925051(0x233)+_0x284125[_0x925051(0x2a3)]['toFixed'](0x2)+_0x925051(0x219)+(_0x284125[_0x925051(0x248)]&&_0x284125['monthly_limit_usd']!==null?'\x20of\x20a\x20$'+_0x284125[_0x925051(0x25f)][_0x925051(0x209)](0x2)+'\x20cap':_0x925051(0x278)),_0x925051(0x1ef)+_0x307211[_0x925051(0x285)]+'\x20('+_0x307211['model_id']+')'];_0x488523['session_consumed_pu']!==null&&_0x488523[_0x925051(0x359)]!==void 0x0&&_0x2ae6a7[_0x925051(0x36f)]('Session:\x20\x20\x20\x20\x20\x20'+_0x488523[_0x925051(0x359)]+_0x925051(0x1f7)),process[_0x925051(0x29e)][_0x925051(0x35e)](_0x2ae6a7[_0x925051(0x335)]('\x0a')+'\x0a');}function jt(_0x1c4f47){const _0x3e304a=_0x5c3cd6;let _0x5e90ea=[_0x3e304a(0x325)+_0x1c4f47[_0x3e304a(0x2bf)]+_0x3e304a(0x357)+_0x1c4f47[_0x3e304a(0x269)]+'\x20sessions\x20on\x20'+_0x1c4f47[_0x3e304a(0x264)]+_0x3e304a(0x38f),'Cost:\x20\x20\x20$'+_0x1c4f47[_0x3e304a(0x251)]['toFixed'](0x2)+'\x20(estimated\x20$'+_0x1c4f47[_0x3e304a(0x390)][_0x3e304a(0x209)](0x2)+_0x3e304a(0x33b)+_0x1c4f47[_0x3e304a(0x341)]+'\x20token\x20units)',_0x3e304a(0x256)+_0x1c4f47[_0x3e304a(0x34e)]+_0x3e304a(0x1ec)+_0x1c4f47[_0x3e304a(0x33a)]+_0x3e304a(0x2a9)];for(let [_0x2a0e1c,_0x421720]of Object[_0x3e304a(0x37b)](_0x1c4f47['models_breakdown']))_0x5e90ea[_0x3e304a(0x36f)]('\x20\x20'+_0x2a0e1c+':\x20'+_0x421720+_0x3e304a(0x378));process[_0x3e304a(0x29e)][_0x3e304a(0x35e)](_0x5e90ea[_0x3e304a(0x335)]('\x0a')+'\x0a');}function Ft(_0x324c24){const _0x59a88e=_0x5c3cd6;if(_0x324c24[_0x59a88e(0x395)][_0x59a88e(0x2e9)]===0x0){process[_0x59a88e(0x29e)][_0x59a88e(0x35e)]('No\x20usage\x20in\x20the\x20last\x20'+_0x324c24[_0x59a88e(0x2bf)]+_0x59a88e(0x28c));return;}let _0x434bb5=[_0x59a88e(0x26b)];for(let _0x2e82b7 of _0x324c24['daily_usage'])_0x434bb5[_0x59a88e(0x36f)](_0x2e82b7[_0x59a88e(0x257)]+'\x20\x20'+String(_0x2e82b7[_0x59a88e(0x37a)])[_0x59a88e(0x242)](0xb)+'\x20\x20'+String(_0x2e82b7[_0x59a88e(0x2f7)])['padStart'](0xd)+'\x20\x20'+String(_0x2e82b7['completion_tokens'])[_0x59a88e(0x242)](0x11));process[_0x59a88e(0x29e)]['write'](_0x434bb5['join']('\x0a')+'\x0a');}async function Mt(_0xe48222,_0x5953fc){const _0x166c25=_0x5c3cd6;let _0x4bc330=await Bt(_0xe48222[_0x166c25(0x1fa)],_0x5953fc);_0xe48222['model']&&(_0x4bc330[_0x166c25(0x286)]=_0xe48222['model']);let {client:_0x5b3451}=await f(_0xe48222);try{_0x5953fc===_0x166c25(0x2b1)?l(_0xe48222,await _0x25e6f8(_0x5b3451,_0x4bc330,void 0x0),Ht):_0x5953fc===_0x166c25(0x2a5)?l(_0xe48222,await _0x1c5229(_0x5b3451,_0x4bc330,void 0x0),Jt):l(_0xe48222,await _0x44a5f1(_0x5b3451,_0x4bc330,void 0x0),Gt);}catch(_0x4d8f9c){if(!_0x35afd7(_0x4d8f9c))throw _0x4d8f9c;console[_0x166c25(0x236)](_0x4d8f9c[_0x166c25(0x371)]),process['exit'](0x1);}}async function Bt(_0x3ef926,_0x628fc4){const _0xc65061=_0x5c3cd6;let _0xcd7a33;try{_0xcd7a33=_0x3ef926&&_0x3ef926!=='-'?_0xea0a68[_0xc65061(0x287)](_0x4d472f[_0xc65061(0x2b6)](_0x3ef926),_0xc65061(0x312)):await I(_0x3ef926,process[_0xc65061(0x33f)]);}catch(_0xdd92b1){console['error'](_0x628fc4+_0xc65061(0x2f4)+_0xdd92b1[_0xc65061(0x371)]+').'),process[_0xc65061(0x1f8)](0x2);}return _0xcd7a33||(console[_0xc65061(0x236)](_0x628fc4+_0xc65061(0x2b8)+_0x628fc4+_0xc65061(0x2c8)),process[_0xc65061(0x1f8)](0x2)),de(_0xcd7a33,_0x628fc4,_0xc65061(0x342));}function de(_0x31d368,_0x1133d,_0x483534){const _0x5be80a=_0x5c3cd6;let _0x9da2ec;try{_0x9da2ec=JSON[_0x5be80a(0x27d)](_0x31d368);}catch(_0x1f045b){console['error'](_0x1133d+':\x20'+_0x483534+_0x5be80a(0x36b)+_0x1f045b[_0x5be80a(0x371)]+').'),process[_0x5be80a(0x1f8)](0x2);}return(typeof _0x9da2ec!=_0x5be80a(0x281)||_0x9da2ec===null||Array['isArray'](_0x9da2ec))&&(console[_0x5be80a(0x236)](_0x1133d+':\x20'+_0x483534+_0x5be80a(0x1f6)),process[_0x5be80a(0x1f8)](0x2)),_0x9da2ec;}function ue(_0xc3bfe6,_0x392298){const _0x54f686=_0x5c3cd6;let _0x2df861;try{_0x2df861=_0xea0a68[_0x54f686(0x287)](_0x4d472f[_0x54f686(0x2b6)](_0xc3bfe6),'utf-8');}catch(_0x5e9e5b){console[_0x54f686(0x236)](_0x392298+_0x54f686(0x301)+_0x5e9e5b[_0x54f686(0x371)]+').'),process[_0x54f686(0x1f8)](0x2);}return de(_0x2df861,_0x392298,_0x54f686(0x2ff));}async function qt(_0x16c32a){const _0x83de57=_0x5c3cd6;_0x16c32a[_0x83de57(0x22a)]===void 0x0&&(console['error'](_0x83de57(0x2ee)),process[_0x83de57(0x1f8)](0x2));let _0x1f2904=ue(_0x16c32a['jsonSchemaPath'],_0x83de57(0x244)),_0x2e904d=(await I(_0x16c32a[_0x83de57(0x1fa)],process['stdin']))[_0x83de57(0x31c)]();_0x2e904d||(console[_0x83de57(0x236)](_0x83de57(0x1f1)),process[_0x83de57(0x1f8)](0x2));let {client:_0x3ae869}=await f(_0x16c32a);try{let _0x2f1bfd=await _0x20b8a2(_0x3ae869,{'prompt':_0x2e904d,'jsonSchema':_0x1f2904,'model':_0x16c32a[_0x83de57(0x286)]||process.env.MODEL||_0x4d46e9,..._0x16c32a[_0x83de57(0x316)]!==void 0x0&&{'sessionId':_0x16c32a[_0x83de57(0x316)]}},void 0x0);l(_0x16c32a,_0x2f1bfd,_0xb9a300=>{const _0x494ea6=_0x83de57;process[_0x494ea6(0x29e)][_0x494ea6(0x35e)](JSON[_0x494ea6(0x276)](_0xb9a300[_0x494ea6(0x39d)],null,0x2)+'\x0a');});}catch(_0x430357){if(!_0x1cd659(_0x430357))throw _0x430357;console['error'](_0x430357[_0x83de57(0x371)]),process[_0x83de57(0x1f8)](0x1);}}function F(_0xf59592){const _0xcd7508=_0x5c3cd6;process[_0xcd7508(0x29e)][_0xcd7508(0x35e)](_0xcd7508(0x21a)+_0xf59592[_0xcd7508(0x286)]+'\x20('+_0xf59592[_0xcd7508(0x282)]+_0xcd7508(0x39b)+_0xf59592[_0xcd7508(0x289)][_0xcd7508(0x237)]+_0xcd7508(0x290));}function Ht(_0x58597a){const _0x2c6ef5=_0x5c3cd6;F(_0x58597a);for(let _0x407d79 of Object['keys'](_0x58597a['answers'])){let _0x49beb6=_0x58597a[_0x2c6ef5(0x255)][_0x407d79],_0x1247f4=_0x49beb6[_0x2c6ef5(0x2b3)]===_0x2c6ef5(0x35d)?'probability\x20'+_0x49beb6['probability']['toFixed'](0x2):_0x49beb6[_0x2c6ef5(0x2b3)]===_0x2c6ef5(0x2d4)?'choice\x20'+_0x49beb6[_0x2c6ef5(0x2d4)]+'\x20(confidence\x20'+_0x49beb6['confidence'][_0x2c6ef5(0x209)](0x2)+')':_0x2c6ef5(0x347)+_0x49beb6[_0x2c6ef5(0x27a)]['toFixed'](0x2)+_0x2c6ef5(0x212)+_0x49beb6[_0x2c6ef5(0x25a)][_0x2c6ef5(0x209)](0x2)+')';process[_0x2c6ef5(0x29e)][_0x2c6ef5(0x35e)]('\x20\x20'+_0x407d79+':\x20'+_0x1247f4+'\x0a');}}function Jt(_0xd8fba8){const _0x576f11=_0x5c3cd6;F(_0xd8fba8),_0xd8fba8[_0x576f11(0x332)][_0x576f11(0x221)]((_0x9d6bdb,_0x1f507f)=>{const _0x1c38bb=_0x576f11;process[_0x1c38bb(0x29e)][_0x1c38bb(0x35e)]('\x20\x20'+(_0x1f507f+0x1)+'.\x20'+_0x9d6bdb['id']+'\x20\x20'+_0x9d6bdb[_0x1c38bb(0x27a)][_0x1c38bb(0x209)](0x3)+'\x20\x20(input\x20#'+_0x9d6bdb[_0x1c38bb(0x366)]+')\x0a');});}function Gt(_0x2d2aaa){const _0x1022c3=_0x5c3cd6;F(_0x2d2aaa),process[_0x1022c3(0x29e)][_0x1022c3(0x35e)]('Rubric\x20'+_0x2d2aaa[_0x1022c3(0x30b)]+'\x0a');for(let _0x252a44 of _0x2d2aaa[_0x1022c3(0x332)])process[_0x1022c3(0x29e)][_0x1022c3(0x35e)]('\x20\x20'+_0x252a44['id']+':\x20'+_0x252a44[_0x1022c3(0x272)]+_0x1022c3(0x212)+_0x252a44[_0x1022c3(0x25a)][_0x1022c3(0x209)](0x2)+')\x0a');}async function Wt(_0x5a85a7){const _0x53d4ab=_0x5c3cd6;let _0x359a25=_0x5a85a7[_0x53d4ab(0x1fa)][_0x53d4ab(0x31c)]();_0x359a25||(console[_0x53d4ab(0x236)]('transcribe\x20needs\x20audio:\x20delegate-cli\x20transcribe\x20<file>,\x20or\x20-\x20to\x20read\x20stdin.'),process[_0x53d4ab(0x1f8)](0x2));let {client:_0x2fb8bd}=await f(_0x5a85a7);try{let _0x1b112b=_0x359a25==='-'?{'data':await Kt(process[_0x53d4ab(0x33f)])}:_0x359a25;l(_0x5a85a7,await _0x489f10(_0x2fb8bd,_0x1b112b,void 0x0),_0x286362=>{const _0x2c7262=_0x53d4ab;process[_0x2c7262(0x29e)][_0x2c7262(0x35e)](_0x286362[_0x2c7262(0x338)]+'\x0a');});}catch(_0x3e74be){if(_0x148eb3(_0x3e74be)&&(console['error'](_0x3e74be[_0x53d4ab(0x371)]),process['exit'](_0x3e74be[_0x53d4ab(0x2db)]===void 0x0?0x2:0x1)),typeof _0x3e74be?.[_0x53d4ab(0x263)]!=_0x53d4ab(0x2bd))throw _0x3e74be;console['error'](_0x53d4ab(0x2eb)+_0x359a25+'\x20('+_0x3e74be[_0x53d4ab(0x371)]+').'),process[_0x53d4ab(0x1f8)](0x2);}}async function Kt(_0x3c914f){const _0x38065e=_0x5c3cd6;let _0x523f50=[];for await(let _0x204e24 of _0x3c914f)_0x523f50[_0x38065e(0x36f)](Buffer['from'](_0x204e24));return Buffer[_0x38065e(0x354)](_0x523f50);}var Y=[_0x5c3cd6(0x20a),_0x5c3cd6(0x35b),_0x5c3cd6(0x1ed),'create',_0x5c3cd6(0x200),_0x5c3cd6(0x244),_0x5c3cd6(0x2ae),'dismiss','cancel',_0x5c3cd6(0x30e)],X={'list':_0x5c3cd6(0x32d),'pending':_0x5c3cd6(0x25e),'show':_0x5c3cd6(0x22b),'create':'delegations\x20create\x20--session\x20<id>\x20[--to\x20<email|name>]\x20[--summary\x20<text>]\x20\x22<task>\x22|-','claim':_0x5c3cd6(0x38e),'complete':_0x5c3cd6(0x27b),'accept':'delegations\x20accept\x20<delegation-id>','dismiss':_0x5c3cd6(0x2ba),'cancel':_0x5c3cd6(0x229),'delete':_0x5c3cd6(0x2d7)};async function zt(_0x5da54d){const _0x15f88f=_0x5c3cd6;let [_0x554582='',_0x344768='',..._0x3ec2e5]=_0x5da54d['operands'];Y['includes'](_0x554582)||(console['error']((_0x554582?_0x15f88f(0x265)+_0x554582+'.\x20':'')+'Use:\x20delegate-cli\x20delegations\x20'+Y[_0x15f88f(0x335)](_0x15f88f(0x243))+'.'),process[_0x15f88f(0x1f8)](0x2));let _0xcadec8=_0x554582;_0xcadec8!=='create'&&(_0x5da54d['delegateTo']!==void 0x0||_0x5da54d[_0x15f88f(0x2b2)]!==void 0x0||_0x5da54d[_0x15f88f(0x316)]!==void 0x0)&&(console['error'](_0x15f88f(0x34d)),process[_0x15f88f(0x1f8)](0x2));let _0x3aefeb=(_0xcadec8==='create'?_0x5da54d[_0x15f88f(0x386)][_0x15f88f(0x298)](0x1):_0x3ec2e5)[_0x15f88f(0x335)]('\x20')[_0x15f88f(0x31c)](),_0x34f14f=_0xcadec8===_0x15f88f(0x38c)||_0xcadec8===_0x15f88f(0x244);(_0xcadec8!==_0x15f88f(0x38c)&&!_0x344768||(_0x34f14f?!_0x3aefeb:_0x3aefeb)||_0xcadec8===_0x15f88f(0x38c)&&!_0x5da54d[_0x15f88f(0x316)])&&(console[_0x15f88f(0x236)](_0x15f88f(0x367)+X[_0xcadec8]),process['exit'](0x2));let _0x5b99cb=_0x34f14f&&_0x3aefeb==='-'?(await I('-',process[_0x15f88f(0x33f)]))[_0x15f88f(0x31c)]():_0x3aefeb;_0x34f14f&&!_0x5b99cb&&(console[_0x15f88f(0x236)]('Usage:\x20delegate-cli\x20'+X[_0xcadec8]+'\x20(stdin\x20was\x20empty)'),process[_0x15f88f(0x1f8)](0x2));let {client:_0x38c616}=await f(_0x5da54d);try{await Vt(_0x5da54d,_0x38c616,_0xcadec8,_0x344768,_0x5b99cb);}catch(_0x3977a1){if(!_0x8d1533(_0x3977a1))throw _0x3977a1;console[_0x15f88f(0x236)](_0x3977a1['message']),process[_0x15f88f(0x1f8)](0x1);}}async function Vt(_0x50aaf2,_0x5c5a01,_0x57f125,_0x4b0f6a,_0x288bed){const _0x38a192=_0x5c3cd6;switch(_0x57f125){case _0x38a192(0x20a):l(_0x50aaf2,await _0x196136(_0x5c5a01,_0x4b0f6a),Yt);return;case'pending':l(_0x50aaf2,await _0x78e406(_0x5c5a01,_0x4b0f6a),_0x167c88=>{const _0xf9a1a6=_0x38a192;_0x167c88['delegation']&&process['stdout'][_0xf9a1a6(0x35e)](_0xf9a1a6(0x23c)+_0x167c88[_0xf9a1a6(0x328)]['id']+'\x20('+_0x167c88[_0xf9a1a6(0x328)][_0xf9a1a6(0x2db)]+_0xf9a1a6(0x22f)),_0x167c88[_0xf9a1a6(0x2c0)][_0xf9a1a6(0x2e9)]===0x0&&process[_0xf9a1a6(0x2dc)][_0xf9a1a6(0x35e)](_0xf9a1a6(0x2f1));for(let _0x51e940 of _0x167c88[_0xf9a1a6(0x2c0)])process[_0xf9a1a6(0x29e)][_0xf9a1a6(0x35e)]('\x0a'+_0x51e940['id']+_0xf9a1a6(0x394)+(_0x51e940[_0xf9a1a6(0x31d)]??_0xf9a1a6(0x226))+'\x20\x20'+(_0x51e940['task']??'')+'\x0a'+(_0x51e940[_0xf9a1a6(0x391)]?.[_0xf9a1a6(0x364)]??'')+'\x0a');_0x167c88[_0xf9a1a6(0x2c0)][_0xf9a1a6(0x2e9)]>0x0&&process[_0xf9a1a6(0x2dc)][_0xf9a1a6(0x35e)]('\x0aAccept\x20one\x20with:\x20delegate-cli\x20delegations\x20accept\x20<id>\x0a');});return;case _0x38a192(0x1ed):l(_0x50aaf2,await _0x5174e8(_0x5c5a01,_0x4b0f6a),Q);return;case _0x38a192(0x38c):{let _0x36c4db=await _0x46caae(_0x5c5a01,{'sessionId':_0x50aaf2[_0x38a192(0x316)],'task':_0x288bed,..._0x50aaf2[_0x38a192(0x2b2)]!==void 0x0&&{'contextSummary':_0x50aaf2['contextSummary']},..._0x50aaf2[_0x38a192(0x240)]!==void 0x0&&{'recipient':_0x50aaf2[_0x38a192(0x240)]}});l(_0x50aaf2,_0x36c4db,_0x29dfae=>{const _0x56735f=_0x38a192;_0x29dfae[_0x56735f(0x2b0)]?process[_0x56735f(0x29e)]['write'](_0x56735f(0x319)+_0x29dfae['delegationId']+_0x56735f(0x30f)+_0x29dfae[_0x56735f(0x2b0)][_0x56735f(0x2a1)]+'\x20<'+_0x29dfae[_0x56735f(0x2b0)][_0x56735f(0x370)]+_0x56735f(0x32b)):process['stdout'][_0x56735f(0x35e)](_0x56735f(0x2a7)+_0x29dfae[_0x56735f(0x29b)]+_0x56735f(0x23f)+_0x29dfae['deepLink']+'\x0a');});return;}case'claim':{let _0x5cb8c3=await _0x367f3a(_0x5c5a01,_0x4b0f6a);l(_0x50aaf2,_0x5cb8c3,_0x128f57=>{const _0x2529f8=_0x38a192;Q(_0x128f57),process[_0x2529f8(0x29e)][_0x2529f8(0x35e)](_0x2529f8(0x1f9)+_0x128f57[_0x2529f8(0x316)]+'\x0a'),process[_0x2529f8(0x2dc)][_0x2529f8(0x35e)](_0x2529f8(0x2ef)+_0x128f57[_0x2529f8(0x316)]+_0x2529f8(0x344)+_0x128f57[_0x2529f8(0x29b)]+_0x2529f8(0x291));});return;}case _0x38a192(0x244):{let {alreadyCompleted:_0x579d39}=await _0x447659(_0x5c5a01,_0x4b0f6a,{'content':_0x288bed});l(_0x50aaf2,{'delegationId':_0x4b0f6a,'alreadyCompleted':_0x579d39},_0x390a89=>{const _0x3a1580=_0x38a192;process[_0x3a1580(0x29e)]['write']((_0x390a89['alreadyCompleted']?'Already\x20answered':_0x3a1580(0x381))+'\x20delegation\x20'+_0x390a89[_0x3a1580(0x29b)]+'.\x0a');});return;}case'accept':{let _0x48c3ed=await _0x2fc141(_0x5c5a01,_0x4b0f6a);l(_0x50aaf2,{'delegationId':_0x4b0f6a,..._0x48c3ed},_0x45fe1f=>{const _0x1f034a=_0x38a192;process[_0x1f034a(0x29e)][_0x1f034a(0x35e)]((_0x45fe1f[_0x1f034a(0x318)]?_0x1f034a(0x239):_0x1f034a(0x2e8))+_0x1f034a(0x2a0)+_0x45fe1f[_0x1f034a(0x29b)]+'.\x0a');});return;}default:{let _0x25b30c={'dismiss':_0x226927,'cancel':_0x452cc5,'delete':_0x27e268}[_0x57f125];await _0x25b30c(_0x5c5a01,_0x4b0f6a);let _0x52c689={'dismiss':'dismissed','cancel':_0x38a192(0x261),'delete':_0x38a192(0x2cb)}[_0x57f125];l(_0x50aaf2,{'delegationId':_0x4b0f6a,[_0x52c689]:!0x0},()=>{const _0x58018d=_0x38a192;process[_0x58018d(0x29e)]['write'](''+_0x52c689[0x0][_0x58018d(0x383)]()+_0x52c689[_0x58018d(0x298)](0x1)+_0x58018d(0x2a0)+_0x4b0f6a+'.\x0a');});}}}function Yt(_0x39cf27){const _0x4434df=_0x5c3cd6;if(_0x39cf27['length']===0x0){process['stderr'][_0x4434df(0x35e)](_0x4434df(0x32f));return;}process[_0x4434df(0x29e)][_0x4434df(0x35e)]('ID'[_0x4434df(0x20b)](0x24)+'\x20\x20'+'STATUS'[_0x4434df(0x20b)](0x9)+'\x20\x20'+_0x4434df(0x201)['padEnd'](0x18)+_0x4434df(0x28a));for(let _0x255caf of _0x39cf27)process['stdout'][_0x4434df(0x35e)](_0x255caf['id'][_0x4434df(0x20b)](0x24)+'\x20\x20'+_0x255caf[_0x4434df(0x2db)][_0x4434df(0x20b)](0x9)+'\x20\x20'+(_0x255caf[_0x4434df(0x31d)]??'-')['padEnd'](0x18)+'\x20\x20'+(_0x255caf[_0x4434df(0x37d)]??'')+'\x0a');}function Q(_0x7bdf70){const _0x3baa13=_0x5c3cd6;process[_0x3baa13(0x29e)][_0x3baa13(0x35e)](_0x3baa13(0x362)+(_0x7bdf70[_0x3baa13(0x2fa)]??'-')+'\x0a'),_0x7bdf70[_0x3baa13(0x37e)]&&process[_0x3baa13(0x29e)][_0x3baa13(0x35e)]('Session\x20\x20\x20\x20\x20\x20\x20'+_0x7bdf70[_0x3baa13(0x37e)]+'\x0a'),process['stdout'][_0x3baa13(0x35e)](_0x3baa13(0x297)+(_0x7bdf70[_0x3baa13(0x37d)]??'-')+'\x0a'),_0x7bdf70[_0x3baa13(0x2b2)]&&process[_0x3baa13(0x29e)]['write']('\x0a'+_0x7bdf70['contextSummary']+'\x0a\x0a');}async function Xt(_0x33f374){const _0x5dd937=_0x5c3cd6;_0x33f374[_0x5dd937(0x1fa)]['trim']()||(console['error'](_0x5dd937(0x308)),process['exit'](0x2));let {client:_0x14e131}=await f(_0x33f374),_0x185b6d;try{_0x185b6d=await _0x31f58b(_0x14e131,_0x33f374[_0x5dd937(0x1fa)]);}catch(_0x10567e){if(!_0x8d1533(_0x10567e))throw _0x10567e;console[_0x5dd937(0x236)](_0x10567e[_0x5dd937(0x371)]),process[_0x5dd937(0x1f8)](0x1);}l(_0x33f374,_0x185b6d,_0x32d188=>{const _0x10b8f5=_0x5dd937;_0x32d188[_0x10b8f5(0x2e9)]===0x0&&process[_0x10b8f5(0x2dc)][_0x10b8f5(0x35e)]('No\x20one\x20matches\x20\x22'+_0x33f374[_0x10b8f5(0x1fa)][_0x10b8f5(0x31c)]()+_0x10b8f5(0x36d));for(let _0x1dee28 of _0x32d188)process[_0x10b8f5(0x29e)]['write'](_0x1dee28['email'][_0x10b8f5(0x20b)](0x20)+'\x20\x20'+_0x1dee28[_0x10b8f5(0x2a1)]+'\x0a');});}async function Qt(_0x30c0f6){const _0x24d1ce=_0x5c3cd6;_0x30c0f6[_0x24d1ce(0x2e0)]===_0x24d1ce(0x245)&&(console['error'](_0x24d1ce(0x356)),process['exit'](0x2));let _0x1f3ea5=$(_0x28797c()),_0x1725a9=_0x30c0f6[_0x24d1ce(0x2a8)];if(_0x30c0f6['env']){let _0x1d3f36=_0x30c0f6[_0x24d1ce(0x2e0)];await _0x38c1bd({'env':_0x1d3f36,'tenant':_0x30c0f6[_0x24d1ce(0x23b)]??C(_0x1f3ea5,_0x1480d0[_0x1d3f36]),'skipEnvCheck':_0x1725a9});return;}let _0x3f7392=_0x30c0f6[_0x24d1ce(0x375)]??ce();if(_0x3f7392){await _0x38c1bd({'baseUrl':_0x3f7392,'tenant':_0x30c0f6['tenant']??C(_0x1f3ea5,_0x3f7392),'skipEnvCheck':_0x1725a9});return;}if(_0x1f3ea5?.[_0x24d1ce(0x203)]){await _0x38c1bd({'baseUrl':_0x1f3ea5['baseUrl'],'tenant':_0x30c0f6[_0x24d1ce(0x23b)]??_0x1f3ea5[_0x24d1ce(0x327)],'skipEnvCheck':_0x1725a9});return;}console[_0x24d1ce(0x236)](_0x24d1ce(0x202)),process[_0x24d1ce(0x1f8)](0x2);}function C(_0xa31283,_0xeaed09){const _0x297b8a=_0x5c3cd6;return _0xa31283?.[_0x297b8a(0x203)]&&Zt(_0xa31283[_0x297b8a(0x203)],_0xeaed09)?_0xa31283[_0x297b8a(0x327)]:void 0x0;}function Zt(_0x56eeea,_0x2af17b){const _0x461268=_0x5c3cd6;try{return new URL(_0x56eeea)[_0x461268(0x232)]===new URL(_0x2af17b)['origin'];}catch{return!0x1;}}async function en(_0x1c2a42){const _0x35b48c=_0x5c3cd6;O()&&(console[_0x35b48c(0x236)]('Auth\x20comes\x20from\x20AUTH_TOKEN/TENANT_ID/ORG_ID\x20—\x20set\x20TENANT_ID\x20and\x20TENANT_SLUG\x20to\x20change\x20the\x20tenant.'),process['exit'](0x2));let _0x1b65cd=await _0x2f083();if(_0x1b65cd||(console['error'](tn()),process[_0x35b48c(0x1f8)](0x2)),_0x1c2a42[_0x35b48c(0x31c)]()){let _0x510359=await _0x1bb7ef(_0x1b65cd,_0x1c2a42);_0xa7d579(_0x510359)||(console[_0x35b48c(0x236)](_0x35b48c(0x2ab)+_0x28797c()+';\x20the\x20saved\x20login\x20still\x20uses\x20'+_0x1b65cd[_0x35b48c(0x327)]+'.'),process[_0x35b48c(0x1f8)](0x1)),console[_0x35b48c(0x35c)](_0x35b48c(0x275)+_0x510359[_0x35b48c(0x327)]+'\x20('+_0x510359[_0x35b48c(0x26a)]+')\x20—\x20saved\x20to\x20'+_0x28797c());return;}nn(await _0x442126(_0x1b65cd),_0x1b65cd);}function tn(){const _0x184088=_0x5c3cd6;if(_0xea0a68['existsSync'](_0x28797c()))return'The\x20saved\x20CLI\x20login\x20could\x20not\x20be\x20refreshed.\x20Run\x20`delegate-cli\x20login`\x20again.';let _0x35bda7=L();return $(_0x35bda7)?'No\x20CLI\x20login\x20to\x20switch:\x20the\x20CLI\x20is\x20authenticating\x20via\x20the\x20Delegate\x20desktop\x20app\x27s\x20'+_0x35bda7+_0x184088(0x2c1):_0x184088(0x293);}function nn(_0x45ea99,_0x226b8a){const _0x4065d8=_0x5c3cd6;let _0x2cde9b=_0x45ea99['map'](_0x2cb9d9=>_0x2cb9d9['id']===_0x226b8a[_0x4065d8(0x26a)]?'*\x20'+_0x2cb9d9[_0x4065d8(0x300)]+_0x4065d8(0x2e5):'\x20\x20'+_0x2cb9d9[_0x4065d8(0x300)]);process['stdout'][_0x4065d8(0x35e)](_0x4065d8(0x25c)+(_0x226b8a['orgLogicalName']??_0x226b8a[_0x4065d8(0x306)])+':\x0a'+_0x2cde9b[_0x4065d8(0x335)]('\x0a')+'\x0a'),_0x45ea99['length']>0x1&&process[_0x4065d8(0x29e)][_0x4065d8(0x35e)](_0x4065d8(0x24d));}function on(_0x5cc0a9){const _0x443bf3=_0x5c3cd6;return _0x5cc0a9?.[_0x443bf3(0x273)]?.[_0x443bf3(0x2db)]===0x191||/401/['test'](String(_0x5cc0a9?.[_0x443bf3(0x371)]??''));}var d={'lastType':null,'quiet':!0x1},sn=_0x56c36c=>{const _0x597d0e=_0x5c3cd6;switch(_0x56c36c['type']){case _0x597d0e(0x283):_0x56c36c[_0x597d0e(0x316)]&&_0x56c36c[_0x597d0e(0x316)]!==d[_0x597d0e(0x316)]&&(process[_0x597d0e(0x2dc)]['write'](_0x597d0e(0x266)+_0x56c36c['sessionId']+'\x20(resume\x20with\x20--session\x20'+_0x56c36c['sessionId']+')\x0a'),d[_0x597d0e(0x316)]=_0x56c36c[_0x597d0e(0x316)]);break;case _0x597d0e(0x1f2):_0x56c36c[_0x597d0e(0x274)]&&_0x56c36c[_0x597d0e(0x274)]!==d['turnId']&&(d[_0x597d0e(0x39c)]!==null&&process[_0x597d0e(0x2dc)]['write']('\x0a'),process[_0x597d0e(0x2dc)][_0x597d0e(0x35e)]('Turn:\x20'+_0x56c36c['turnId']+'\x20(cancel\x20with:\x20delegate-cli\x20sessions\x20cancel\x20'+_0x56c36c[_0x597d0e(0x316)]+_0x597d0e(0x2f3)+_0x56c36c[_0x597d0e(0x274)]+')\x0a'),d[_0x597d0e(0x274)]=_0x56c36c[_0x597d0e(0x274)],d[_0x597d0e(0x39c)]='turn_start');break;case _0x597d0e(0x21e):_0x56c36c[_0x597d0e(0x364)]&&!d[_0x597d0e(0x355)]&&(d[_0x597d0e(0x39c)]!==_0x597d0e(0x21e)&&process[_0x597d0e(0x2dc)][_0x597d0e(0x35e)]('\x0a🤔\x20'),process[_0x597d0e(0x2dc)]['write'](_0x56c36c['content']),d[_0x597d0e(0x39c)]=_0x597d0e(0x21e));break;case _0x597d0e(0x2b7):d[_0x597d0e(0x39c)]!==null&&process[_0x597d0e(0x2dc)]['write']('\x0a'),process['stderr'][_0x597d0e(0x35e)](_0x597d0e(0x24e)+(_0x56c36c['toolName']??'tool')+'\x0a'),d[_0x597d0e(0x39c)]=_0x597d0e(0x2b7);break;case _0x597d0e(0x371):_0x56c36c[_0x597d0e(0x364)]&&(d[_0x597d0e(0x39c)]!=='message'&&d['lastType']!==null&&process['stdout'][_0x597d0e(0x35e)]('\x0a'),process[_0x597d0e(0x29e)]['write'](_0x56c36c[_0x597d0e(0x364)]),d['lastType']=_0x597d0e(0x371));break;case'error':d[_0x597d0e(0x39c)]!==null&&process[_0x597d0e(0x2dc)][_0x597d0e(0x35e)]('\x0a'),process[_0x597d0e(0x2dc)][_0x597d0e(0x35e)]('✗\x20'+(_0x56c36c[_0x597d0e(0x236)]??_0x597d0e(0x236))+'\x0a'),d[_0x597d0e(0x39c)]=_0x597d0e(0x236);break;case'done':(d[_0x597d0e(0x39c)]===_0x597d0e(0x371)||d[_0x597d0e(0x39c)]==='thinking')&&process[_0x597d0e(0x29e)][_0x597d0e(0x35e)]('\x0a'),process['stderr'][_0x597d0e(0x35e)]('✓\x20Done\x0a'),d[_0x597d0e(0x39c)]=_0x597d0e(0x204);break;}};function Z(_0x4c8bd6,_0x4109c6,_0x15d7f8){const _0x12ed62=_0x5c3cd6;let _0x20428f=_0x4c8bd6['model']||process.env.MODEL;return{'backendUrl':_0x15d7f8,'auth':_0x4109c6,'enableComputerUse':!_0x4c8bd6[_0x12ed62(0x2ea)]&&!_0x4c8bd6[_0x12ed62(0x1fb)],'autoSpawnInterop':!_0x4c8bd6[_0x12ed62(0x2ea)],'enableConnections':!_0x4c8bd6[_0x12ed62(0x296)],'enableSecurity':!_0x4c8bd6[_0x12ed62(0x320)],'keepInteropAlive':_0x4c8bd6[_0x12ed62(0x2d3)],..._0x4c8bd6[_0x12ed62(0x346)]?{'enableMemory':!0x1}:{},..._0x4c8bd6[_0x12ed62(0x1eb)][_0x12ed62(0x2e9)]>0x0?{'preloadSkills':_0x4c8bd6[_0x12ed62(0x1eb)]}:{},..._0x20428f?{'model':_0x20428f}:{},..._0x4c8bd6[_0x12ed62(0x2fd)]?{'projectId':_0x4c8bd6[_0x12ed62(0x2fd)]}:{},..._0x4c8bd6[_0x12ed62(0x334)]?{'workingDirectory':_0x4c8bd6['workingDirectory']}:{},..._0x4c8bd6[_0x12ed62(0x2b4)]?{'bundledSkillsPath':_0x4c8bd6[_0x12ed62(0x2b4)]}:{},..._0x4c8bd6[_0x12ed62(0x2f6)]?{'effort':_0x4c8bd6['effort']}:{},..._0x4c8bd6[_0x12ed62(0x316)]?{'sessionId':_0x4c8bd6[_0x12ed62(0x316)]}:{},..._0x4c8bd6[_0x12ed62(0x303)]?{'verbose':!0x0}:{}};}async function rn(_0x1751c1){const _0x141063=_0x5c3cd6;let _0x3ee6cb=_0x1751c1[_0x141063(0x360)]!==_0x141063(0x338),_0x3e2365=_0x1751c1[_0x141063(0x22a)]===void 0x0?null:ue(_0x1751c1[_0x141063(0x22a)],_0x141063(0x1f5)),_0xe12a81=!_0x3ee6cb&&!_0x3e2365&&!_0x1751c1['print']&&_0x1751c1['prompt']!=='-'&&!!process[_0x141063(0x33f)][_0x141063(0x216)]&&!!process[_0x141063(0x29e)][_0x141063(0x216)],_0x58bb24=_0xe12a81?_0x1751c1[_0x141063(0x1fa)]['trim']():await I(_0x1751c1[_0x141063(0x1fa)],process[_0x141063(0x33f)]);if(!_0xe12a81&&!_0x58bb24&&(console[_0x141063(0x236)]('Missing\x20prompt.\x20Pass\x20it\x20as\x20an\x20argument,\x20pipe\x20it\x20via\x20stdin,\x20or\x20run\x20`delegate-cli\x20--help`.'),process[_0x141063(0x1f8)](0x2)),!_0x3ee6cb){await ee(_0x1751c1,_0x58bb24,_0xe12a81,null,_0x3e2365);return;}let _0x8cb603=!0x1,_0x29c7ee=_0x438893=>{const _0xe29bb=_0x141063;_0x8cb603=!0x0,S(_0x3f1b63(_0x438893)),(_0x438893['isError']||_0x438893['structuredError'])&&(process[_0xe29bb(0x329)]=0x1);},_0x354565=Date[_0x141063(0x29a)]();try{await ee(_0x1751c1,_0x58bb24,!0x1,_0x29c7ee,_0x3e2365);}catch(_0xa3c686){if(_0x8cb603)throw _0xa3c686;process['stderr']['write']((_0xa3c686 instanceof Error?_0xa3c686['stack']??_0xa3c686[_0x141063(0x371)]:String(_0xa3c686))+'\x0a'),_0x29c7ee(new _0x117650(_0x354565)['finish']({'endedAtMs':Date[_0x141063(0x29a)](),'usage':[],'error':_0xa3c686}));}}async function ee(_0x1f511d,_0x5bbb79,_0x175096,_0x5e76ef,_0x386b53){const _0x4eca1c=_0x5c3cd6;d={'lastType':null,'quiet':_0x1f511d[_0x4eca1c(0x355)]};let _0xd3923e=new Set(),_0x318d6a=_0x1d7960=>{const _0x2c5863=_0x4eca1c;(!_0x5e76ef||_0x1d7960[_0x2c5863(0x2b3)]===_0x2c5863(0x283)||_0x1d7960[_0x2c5863(0x2b3)]==='turn_start')&&sn(_0x1d7960);for(let _0x17b842 of _0xd3923e)_0x17b842(_0x1d7960);},_0x1b89c1=await P(),_0x441ca5=new _0x399f6d();_0x441ca5[_0x4eca1c(0x2d5)](_0x318d6a);let _0x6e1223=_0x4abdb1(_0x1f511d[_0x4eca1c(0x2e0)],_0x1b89c1,_0x1f511d[_0x4eca1c(0x215)]);j(_0x1f511d[_0x4eca1c(0x2e0)],_0x1f511d['backendUrl'],_0x6e1223);let _0x4b3f54=Z(_0x1f511d,_0x1b89c1,_0x6e1223),_0x372a80=!0x1,_0x37e38a=!0x1,_0x24b19b,_0x36ea48=()=>_0x24b19b??=_0x441ca5[_0x4eca1c(0x21f)](),_0x204afd=()=>{const _0x479b9a=_0x4eca1c;_0x37e38a&&process[_0x479b9a(0x1f8)](0x82),_0x37e38a=!0x0,process[_0x479b9a(0x2dc)]['write'](_0x479b9a(0x392)),_0x372a80&&_0x441ca5[_0x479b9a(0x218)]()[_0x479b9a(0x26e)](_0x1f1e92=>console[_0x479b9a(0x236)](_0x1f1e92))['then'](_0x36ea48)[_0x479b9a(0x2c4)](()=>process['exit'](0x82),_0x3460ab=>{const _0x19d3f2=_0x479b9a;console[_0x19d3f2(0x236)](_0x3460ab),process[_0x19d3f2(0x1f8)](0x82);});};process['on'](_0x4eca1c(0x20d),_0x204afd);let _0x19ec8a=_0x1f511d['attachments'],_0x3fb00c=async _0x19c07e=>{const _0x5d001a=_0x4eca1c;let _0xcadff=_0x19ec8a;_0x19ec8a=[];let _0x4004c5=()=>_0x441ca5[_0x5d001a(0x217)](_0x19c07e,{'attachments':_0xcadff});try{return await _0x4004c5();}catch(_0x3438e0){if(_0x37e38a||!on(_0x3438e0)||!process[_0x5d001a(0x33f)][_0x5d001a(0x216)]||_0x1f511d[_0x5d001a(0x2e0)]==='localhost'||!(_0x1f511d['env']||_0x1b89c1[_0x5d001a(0x203)]))throw _0x3438e0;process['stderr'][_0x5d001a(0x35e)]('\x0a⚠️\x20\x20Auth\x20expired.\x20Opening\x20browser\x20to\x20re-login…\x0a');let _0x4851d9=_0x441ca5[_0x5d001a(0x288)]()??_0x1f511d[_0x5d001a(0x316)],_0x2742ba=await _0x38c1bd(_0x1f511d[_0x5d001a(0x2e0)]?{'env':_0x1f511d[_0x5d001a(0x2e0)],'tenant':C(_0x1b89c1,_0x1480d0[_0x1f511d[_0x5d001a(0x2e0)]]),'skipEnvCheck':!0x0}:{'baseUrl':_0x1b89c1[_0x5d001a(0x203)],'tenant':_0x1b89c1[_0x5d001a(0x327)],'skipEnvCheck':!0x0}),_0x49db30={'text':'','failed':!0x1,'sessionId':_0x4851d9};return _0x37e38a||(_0x372a80=!0x1,await _0x36ea48(),_0x37e38a)?_0x49db30:(_0x441ca5=new _0x399f6d(),_0x24b19b=void 0x0,_0x441ca5[_0x5d001a(0x2d5)](_0x318d6a),_0x1b89c1=_0x2742ba,await _0x441ca5['initialize']({...Z(_0x1f511d,_0x1b89c1,_0x6e1223),..._0x4851d9?{'sessionId':_0x4851d9}:{}}),_0x372a80=!0x0,_0x37e38a?_0x49db30:_0x4004c5());}};try{if(await _0x441ca5[_0x4eca1c(0x2e1)](_0x4b3f54),_0x372a80=!0x0,_0x37e38a)return;if(_0x175096)await cn({'prompt':_0x5bbb79,'sendMessage':_0x3fb00c,'onSigint':_0x204afd});else{if(_0x5e76ef||_0x386b53){let _0x3f2a8c=_0x1f511d['outputFormat']===_0x4eca1c(0x1ea)?_0x29f296=>S(_0x4c4c19(_0x29f296)):()=>{},_0x1b6ffc=await _0x302986({'onEvent':_0x25a432=>(_0xd3923e[_0x4eca1c(0x374)](_0x25a432),()=>{const _0x291c04=_0x4eca1c;_0xd3923e[_0x291c04(0x30e)](_0x25a432);}),'sendMessage':_0x2b983f=>_0x3fb00c(_0x2b983f),'getSessionId':()=>_0x441ca5['getSessionId'](),'getTurnUsageHistory':_0x2ee063=>_0x441ca5[_0x4eca1c(0x31a)](_0x2ee063),'complete':_0x3ea7f0=>_0x441ca5[_0x4eca1c(0x244)](_0x3ea7f0)},_0x5bbb79,void 0x0,_0x3f2a8c,_0x386b53?{'outputSchema':_0x386b53}:void 0x0);_0x5e76ef?_0x5e76ef(_0x1b6ffc):an(_0x1b6ffc);}else await _0x3fb00c(_0x5bbb79);}}catch(_0x40a12b){if(!_0x37e38a)throw _0x40a12b;}finally{try{await _0x36ea48();}finally{process['off'](_0x4eca1c(0x20d),_0x204afd),_0x37e38a&&(process[_0x4eca1c(0x329)]=0x82);}}}function an(_0x2b6007){const _0x5e871c=_0x5c3cd6;_0x2b6007['structuredError']?(console[_0x5e871c(0x236)](_0x5e871c(0x379)+_0x2b6007[_0x5e871c(0x2df)]['message']),process[_0x5e871c(0x329)]=0x1):_0x2b6007[_0x5e871c(0x32e)]?(console[_0x5e871c(0x236)](_0x5e871c(0x2c9)+_0x2b6007[_0x5e871c(0x236)]+').'),process[_0x5e871c(0x329)]=0x1):process[_0x5e871c(0x29e)][_0x5e871c(0x35e)](JSON['stringify'](_0x2b6007[_0x5e871c(0x39d)],null,0x2)+'\x0a');}function ln(_0x5502ff,_0x5b25d7){const _0x43ff01=_0x5c3cd6;let _0x2a1f73=process[_0x43ff01(0x29e)][_0x43ff01(0x35e)][_0x43ff01(0x30c)](process['stdout']),_0x549d67=!0x1;return process[_0x43ff01(0x29e)][_0x43ff01(0x35e)]=(..._0x538c9c)=>{const _0x2dc35d=_0x43ff01;if(!_0x549d67)return _0x2a1f73(..._0x538c9c);_0x26e9db(_0x5b25d7,0x0),_0x1dcba8(_0x5b25d7,0x0);let _0xa4921b=_0x2a1f73(..._0x538c9c);return _0x5502ff[_0x2dc35d(0x1fa)](!0x0),_0xa4921b;},{'show':()=>{const _0x5955bd=_0x43ff01;_0x549d67=!0x0,_0x5502ff[_0x5955bd(0x1fa)]();},'hide':()=>{_0x549d67=!0x1;},'restore':()=>{const _0x20a42f=_0x43ff01;_0x549d67=!0x1,process['stdout'][_0x20a42f(0x35e)]=_0x2a1f73;}};}async function cn({prompt:_0x4c8f31,sendMessage:_0x2ec796,onSigint:_0x1dbfe1}){const _0x163672=_0x5c3cd6;let _0x2e0060=_0x49cc95({'input':process[_0x163672(0x33f)],'output':process[_0x163672(0x2dc)],'terminal':!0x0,'prompt':'You>\x20'}),_0x147ed6=ln(_0x2e0060,process['stderr']),_0x59e789=_0x2e0060[Symbol[_0x163672(0x26d)]](),_0x109039=!0x1;_0x2e0060[_0x163672(0x34c)]('close',()=>{const _0x2adc1f=_0x163672;_0x109039=!0x0,_0x147ed6[_0x2adc1f(0x336)]();});let _0x50d2c5=!0x1,_0x3bde00=()=>{const _0x55ca3a=_0x163672;_0x50d2c5=!0x0,_0x2e0060[_0x55ca3a(0x1f4)](),_0x1dbfe1();};_0x2e0060['on'](_0x163672(0x20d),_0x3bde00),process['stderr'][_0x163672(0x35e)](_0x163672(0x224));try{if(_0x4c8f31&&await _0x2ec796(_0x4c8f31),_0x50d2c5)return;_0x109039||_0x147ed6['show']();for await(let _0xfbd27 of _0x59e789){if(_0x147ed6['hide'](),_0x50d2c5)break;let _0x49e7e2=_0xfbd27[_0x163672(0x31c)]();if(_0x49e7e2===_0x163672(0x20e))break;_0x49e7e2&&await _0x2ec796(_0x49e7e2),_0x109039||_0x147ed6['show']();}}finally{_0x147ed6[_0x163672(0x26f)](),_0x2e0060[_0x163672(0x1f0)]('SIGINT',_0x3bde00),_0x2e0060['close']();}}async function dn(){const _0x3cb32b=_0x5c3cd6;let _0x40de37=ft(process[_0x3cb32b(0x24f)]['slice'](0x2));if(_0x40de37[_0x3cb32b(0x360)]===_0x3cb32b(0x338)){await te(_0x40de37);return;}let _0x4f3ca8=gt();try{await te(_0x40de37);}finally{_0x4f3ca8();}}async function te(_0x4a59c7){const _0x2507bd=_0x5c3cd6;if(_0x4a59c7[_0x2507bd(0x2e3)]){ht();return;}if(_0x4a59c7[_0x2507bd(0x1e8)]){console[_0x2507bd(0x35c)](wt());return;}if(_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x322)){await Qt(_0x4a59c7);return;}if(_0x4a59c7[_0x2507bd(0x337)]==='tenant'){await en(_0x4a59c7['prompt']);return;}if(_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x2e4)){await bt();return;}if(_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x268)){await vt(_0x4a59c7);return;}if(_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x309)){await It(_0x4a59c7);return;}if(_0x4a59c7[_0x2507bd(0x337)]==='check'){await Ct(_0x4a59c7);return;}if(_0x4a59c7[_0x2507bd(0x337)]==='sessions'){await xt(_0x4a59c7);return;}if(_0x4a59c7['subcommand']==='usage'){await Ot(_0x4a59c7);return;}if(_0x4a59c7['subcommand']===_0x2507bd(0x2b1)||_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x2a5)||_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x29d)){await Mt(_0x4a59c7,_0x4a59c7[_0x2507bd(0x337)]);return;}if(_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x244)){await qt(_0x4a59c7);return;}if(_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x213)){await Wt(_0x4a59c7);return;}if(_0x4a59c7['subcommand']===_0x2507bd(0x211)){await zt(_0x4a59c7);return;}if(_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x2da)){await Xt(_0x4a59c7);return;}if(_0x4a59c7[_0x2507bd(0x337)]===_0x2507bd(0x358)){await _0x10b478(_0x4a59c7['prompt'],{'runnerUrl':_0x4a59c7[_0x2507bd(0x376)],'backendUrl':_0x4a59c7[_0x2507bd(0x215)],'interopPath':_0x4a59c7[_0x2507bd(0x231)],'workerId':_0x4a59c7[_0x2507bd(0x210)]});return;}if(_0x4a59c7[_0x2507bd(0x34a)]){await Et();return;}await rn(_0x4a59c7);}var un=process.env.NODE_ENV===_0x5c3cd6(0x304)||!!process.env.JEST_WORKER_ID;un||dn()[_0x5c3cd6(0x26e)](_0x288d57=>{const _0x10634d=_0x5c3cd6;console[_0x10634d(0x236)](_0x288d57[_0x10634d(0x2ed)]||_0x288d57[_0x10634d(0x371)]||_0x288d57),process[_0x10634d(0x1f8)](0x1);});function _0x4db8(_0x14b838,_0x211a8e){_0x14b838=_0x14b838-0x1e8;const _0x5f382f=_0x5f38();let _0x4db8ab=_0x5f382f[_0x14b838];return _0x4db8ab;}export{mt as CARTOGRAPHER_SKILLS,W as EFFORT_TIERS,yt as IMPLICIT_STDIN_IDLE_MS,Z as buildInitOptions,dn as main,ft as parseArgs,wt as readCliVersion,I as resolvePrompt,gt as routeStdoutToStderr,l as writeCommandResult};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uipath/delegate-cli",
|
|
3
|
-
"version": "1.203.0-preview.
|
|
3
|
+
"version": "1.203.0-preview.20261005112239",
|
|
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.203.0-preview.
|
|
25
|
+
"@uipath/delegate-sdk": "1.203.0-preview.20261005112239"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@types/node": "^22.0.0",
|