@uru-intelligence/cli 0.4.11 → 0.4.13
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/CHANGELOG.md +38 -0
- package/README.md +48 -3
- package/dist/library.mjs +153 -28
- package/dist/uru.mjs +3508 -514
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,24 +4,62 @@
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
### Breaking
|
|
8
|
+
|
|
9
|
+
- gem.validate and gem.build return a hosted job id immediately. Pass --wait to poll gem.build_job until the compile settles. — surfaces: cli, docs; reference: skills/uru-gems/SKILL.md
|
|
10
|
+
- Action: Update agents and scripts that expected a compiler result from uru gems validate or uru gems build. Print or store hosted_job_id, then poll gem.build_job, or pass --wait.
|
|
11
|
+
|
|
7
12
|
### Security
|
|
8
13
|
|
|
9
14
|
- Bind npm publication to an attested candidate tarball and require the published cli_pin matrix before release success. — surfaces: cli, release; reference: docs/plans/cli-sdk-native-release-modernization/PLAN.md
|
|
10
15
|
- Action: Release operators must supply the exact candidate run, attempt, release-evidence artifact ID, and MCP commit to the protected publish workflow.
|
|
16
|
+
- Stop uru mcp config and install from printing or writing a live API token. Generated MCP config now points at the URU_API_KEY environment variable. — surfaces: cli; reference: apps/cli/src/local-commands.ts
|
|
17
|
+
- Action: Set URU_API_KEY in the MCP client environment. uru mcp config no longer embeds the current CLI token.
|
|
11
18
|
|
|
12
19
|
### Added
|
|
13
20
|
|
|
21
|
+
- Add `uru link --verify` for local link diagnostics and `uru gems links create --verify` to run browser verification after link creation. — surfaces: cli, docs; reference: apps/cli/src/workspace-commands.ts
|
|
22
|
+
- Action: Use `uru link --verify` to confirm `.uru/project.json` and the remote Gem still resolve before source work. After `uru gems links create`, add `--verify` to run `gem.browser_verify` on the new Link's Gem.
|
|
14
23
|
- Add a side-effect-free internal CLI library entrypoint with a typed whoami foundation. _(internal)_ — surfaces: cli, sdk; reference: docs/plans/cli-sdk-native-release-modernization/DECISION_RECORDS.md
|
|
15
24
|
- Action: Programmatic callers must pass an explicit token and workspace; no public SDK compatibility promise is introduced.
|
|
16
25
|
- Add direct CLI access to Home pins and Focus rules from the shared operation registry. — surfaces: cli, docs; reference: content/docs/home.mdx
|
|
17
26
|
- Action: Use uru home <operation> --params-json '{...}' or the matching home.* operation ID.
|
|
27
|
+
- Add first-class CLI verbs for Gem filesystem, deploy, build diagnostics, components, page verify, public-tool delegations, and bindings. — surfaces: cli, docs; reference: docs/reference/uru-cli-mcp-operations.md
|
|
28
|
+
- Action: Use uru gems fs, uru gems deploy, uru gems build logs|inspect, uru gems verify, uru gems components, uru gems delegations, and uru gems bindings. These wrap existing gem.* operations.
|
|
29
|
+
- Add first-class Dataset list/history/jobs/inspect verbs and a uru distribution group for the 17 collection operations. — surfaces: cli, docs; reference: content/docs/guides/cli.mdx
|
|
30
|
+
- Action: Use uru datasets ls|inspect|history|jobs and uru distribution list|get|create|update. Dataset SQL stays uru datasets sql. DATA-008 export/typegen is not added.
|
|
31
|
+
- Add first-class Library upload, patch-preview, and favorite verbs, plus automations validate, delete, graph-patch, triggers, connections, and update. — surfaces: cli, docs; reference: docs/reference/uru-cli-mcp-operations.md
|
|
32
|
+
- Action: Use uru library upload|patch-preview|favorite and uru automations validate|delete|graph-patch|triggers|connections|update instead of operations run for those catalog ids. library write --create now accepts --folder-id.
|
|
33
|
+
- Add first-class uru gems bindings and uru gems api commands so tool-call source and connection bindings stay separate. — surfaces: cli; reference: apps/cli/src/gem-lifecycle-resource-commands.ts
|
|
34
|
+
- Action: Use uru gems bindings list|upsert|resolve to attach connections, and uru gems api describe|query|action|job to run declared Gem capabilities. Do not put connection ids in Gem source.
|
|
35
|
+
- Add MCP list/target commands, auth status, text-mode list tables, and regenerate the full CLI/MCP operations reference. — surfaces: cli, docs; reference: docs/reference/uru-cli-mcp-operations.md
|
|
36
|
+
- Action: Use uru mcp list, uru auth status, and uru docs search. List commands print tables in text mode; --json stays JSON. Prefer ${URU_API_KEY} in generated MCP config.
|
|
37
|
+
- Add TTY visual chrome for help, tables, doctor, and login without changing JSON or pipe output. — surfaces: cli; reference: apps/cli/src/visual.ts
|
|
38
|
+
- Action: No action is required. Color and box drawing appear only on a color TTY. Use --no-color, CI, or a pipe to keep the previous plain text.
|
|
39
|
+
- Add uru tools inspect and uru operations inspect, and accept --params-json @file or @- for large tool parameters. — surfaces: cli; reference: apps/cli/src/command-spec.ts
|
|
40
|
+
- Action: Use uru tools inspect <name> or uru operations inspect <operation-id> to print a contract. Pass --params-json @path.json or --params-json @- to load parameters from a file or stdin.
|
|
41
|
+
- Make uru update compare this CLI to the latest npm version and add --check --json. — surfaces: cli; reference: apps/cli/src/update-check.ts
|
|
42
|
+
- Action: No action is required. uru update never installs itself. Run uru update --check --json for machine output, or npm install -g @uru-intelligence/cli@latest to install.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- `uru logs --follow` streams Gem runtime logs over SSE for up to 30 minutes and falls back to polling when the stream route is missing. — surfaces: cli; reference: apps/cli/src/gem-lifecycle-commands.ts
|
|
47
|
+
- Action: No action is required. `--follow-duration-ms` now accepts up to 30 minutes (was 5).
|
|
18
48
|
|
|
19
49
|
### Fixed
|
|
20
50
|
|
|
51
|
+
- JSON output for destructive CLI operations refused without `--yes` now includes `confirmationRequired: true` and a copy-paste `suggestedCommand` with `--yes` appended. — surfaces: cli; reference: apps/cli/src/cli-runtime.ts
|
|
52
|
+
- Action: No action is required. Agents and scripts can read `suggestedCommand` from JSON errors instead of guessing the confirmation flag.
|
|
53
|
+
- Keep the CLI login when you switch workspace. A leftover workspace from a previous switch no longer poisons the next login. `uru switch` marks the current workspace in the list. — surfaces: cli; reference: apps/cli/src/oauth-credential.ts
|
|
54
|
+
- Action: No action is required. After you switch workspace, the next command keeps the same login. A new login writes only the workspace the login response selected.
|
|
55
|
+
- Recover from a revoked CLI session without reusing the dead JWT. When the API returns `session_revoked`, the CLI now rotates the stored OAuth login once or clears it instead of sending the revoked token until local expiry. — surfaces: cli; reference: apps/cli/src/cli.ts
|
|
56
|
+
- Action: No action is required. Failures of this class now carry the `session_revoked` error code so they can be distinguished from a generic `auth_required` response.
|
|
21
57
|
- Report a non-JSON API response as what it is. A proxy or firewall that answers with an HTML page now produces the HTTP status and content type instead of `Unexpected token '<', "<!DOCTYPE "... is not valid JSON`. — surfaces: cli; reference: apps/cli/src/client.ts
|
|
22
58
|
- Action: No action is required. Failures of this class now carry the `non_json_response` error code, keep the auth exit code on a 401, and print a tip naming the likely cause.
|
|
23
59
|
- Report what a rejected credential actually means: `uru doctor` now runs a read-only data call instead of trusting `uru whoami`, API error envelopes are read in full, and auth advice follows where the token came from. — surfaces: cli; reference: apps/cli/src/doctor.ts
|
|
24
60
|
- Action: No action is required. `uru doctor` gains a `data access` check and fails when a credential validates but cannot execute tools; a token supplied through `--token` or `URU_TOKEN` is no longer told to run `uru login`.
|
|
61
|
+
- Send scope on uru automations create, honor --output/--json on uru tools run, and keep errorId plus httpStatus on JSON errors. — surfaces: cli; reference: apps/cli/src/local-commands.ts
|
|
62
|
+
- Action: uru automations create now sends scope=workspace by default. Pass --scope personal when creating a personal automation. JSON errors include errorId and httpStatus when the API provides them.
|
|
25
63
|
- Use the shared SemVer contract when deciding whether to show a CLI update notice. — surfaces: cli, release; reference: docs/plans/cli-sdk-native-release-modernization/PLAN.md
|
|
26
64
|
- Action: No action is required; prerelease and malformed registry versions now follow the same validation and ordering rules as release publication.
|
|
27
65
|
|
package/README.md
CHANGED
|
@@ -61,24 +61,41 @@ bun src/index.ts library search revenue
|
|
|
61
61
|
bun src/index.ts library mkdir 'library/Golden Gems'
|
|
62
62
|
bun src/index.ts library read 'library/Contexts/Client Brief.md'
|
|
63
63
|
bun src/index.ts library write 'library/Contexts/Client Brief.md' --file ./brief.md --create
|
|
64
|
-
bun src/index.ts library write 'library/Prompts/Sales Email.md' --content "Draft the follow-up." --create
|
|
64
|
+
bun src/index.ts library write 'library/Prompts/Sales Email.md' --content "Draft the follow-up." --create --folder-id <folder-id>
|
|
65
|
+
bun src/index.ts library patch-preview 'library/Prompts/Sales Email.md' --content "*** Begin Patch\n..."
|
|
66
|
+
bun src/index.ts library favorite 'library/Contexts/Client Brief.md'
|
|
67
|
+
bun src/index.ts library upload 'library/Assets/logo.png' --file ./logo.png
|
|
68
|
+
bun src/index.ts library upload complete --upload-id <id> --bucket <bucket> --object-path <path> --filename logo.png --size-bytes 1024
|
|
65
69
|
bun src/index.ts library patch 'library/Prompts/Sales Email.md' --stdin
|
|
66
70
|
bun src/index.ts library cp 'library/Notes/Brief.md' 'library/Archive/Brief.md'
|
|
67
71
|
bun src/index.ts library mv 'library/Notes/Draft.md' 'library/Notes/Final.md'
|
|
68
72
|
bun src/index.ts library rm 'library/Notes/Old.md'
|
|
69
73
|
bun src/index.ts library restore 'library/Notes/Old.md'
|
|
74
|
+
bun src/index.ts datasets ls --limit 50 --json
|
|
70
75
|
bun src/index.ts datasets query revenue_rows --limit 50 --response-format concise --json
|
|
71
76
|
# Registry-family commands accept canonical camelCase fields and adapt them at
|
|
72
77
|
# the tool-protocol boundary.
|
|
73
78
|
bun src/index.ts datasets get revenue-rows
|
|
79
|
+
bun src/index.ts datasets history revenue-rows --limit 20
|
|
80
|
+
bun src/index.ts datasets jobs revenue-rows --limit 20
|
|
74
81
|
bun src/index.ts datasets rows --params-json '{"op":"upsert","datasetId":"revenue-rows","rows":[{"name":"Acme"}]}'
|
|
75
82
|
bun src/index.ts datasets create --params-json '{"title":"Revenue Rows","properties":[{"clientKey":"name","name":"Name","type":"title","required":true,"nullable":false,"position":0,"config":{}}]}'
|
|
83
|
+
bun src/index.ts datasets sql --params-json '{"sql":"SELECT 1"}'
|
|
84
|
+
bun src/index.ts distribution list --limit 20
|
|
85
|
+
bun src/index.ts distribution get <collection-id>
|
|
86
|
+
bun src/index.ts distribution create "Client pack" --scope workspace
|
|
76
87
|
|
|
77
88
|
# Automation helpers over the platform tool surface.
|
|
78
89
|
bun src/index.ts automations ls --limit 100
|
|
79
90
|
bun src/index.ts automations get <automation-id>
|
|
80
91
|
bun src/index.ts automations create "Daily revenue digest" --status draft
|
|
92
|
+
bun src/index.ts automations update <automation-id> --description "Nightly digest"
|
|
81
93
|
bun src/index.ts automations enable <automation-id>
|
|
94
|
+
bun src/index.ts automations validate <automation-id> --mode structural --graph-json '{}'
|
|
95
|
+
bun src/index.ts automations graph-patch <automation-id> --patch-json '{"ops":[]}'
|
|
96
|
+
bun src/index.ts automations triggers list <automation-id>
|
|
97
|
+
bun src/index.ts automations connections list
|
|
98
|
+
bun src/index.ts automations delete <automation-id> --yes
|
|
82
99
|
bun src/index.ts automations trigger <automation-id> --input-message "Run now"
|
|
83
100
|
bun src/index.ts automations runs ls <automation-id> --scope workspace --limit 20
|
|
84
101
|
bun src/index.ts automations runs tail <run-id> --level warn
|
|
@@ -95,11 +112,21 @@ bun src/index.ts operations ls --family automations
|
|
|
95
112
|
bun src/index.ts operations run gem.inspect --params-json '{"path":"library/Golden Gems/My Gem.gem"}'
|
|
96
113
|
bun src/index.ts library search "client brief"
|
|
97
114
|
bun src/index.ts docs library_fs
|
|
115
|
+
bun src/index.ts docs search library_fs
|
|
98
116
|
bun src/index.ts api platform/tools/search_tools/execute -F query=gem
|
|
117
|
+
bun src/index.ts api /api/platform/tools/search_tools/execute -F query=gem
|
|
99
118
|
|
|
100
|
-
# MCP client config helper. Prefer
|
|
119
|
+
# MCP client config helper. Prefer ${URU_API_KEY} or --api-key. List never prints keys.
|
|
120
|
+
bun src/index.ts mcp list
|
|
121
|
+
bun src/index.ts mcp list --target cursor
|
|
101
122
|
bun src/index.ts mcp config --api-key "$URU_API_KEY"
|
|
123
|
+
bun src/index.ts mcp install --target cursor
|
|
102
124
|
bun src/index.ts mcp install --path ~/.config/claude-code/mcp.json --api-key "$URU_API_KEY"
|
|
125
|
+
bun src/index.ts mcp remove --target cursor
|
|
126
|
+
|
|
127
|
+
# Local auth facts. Never prints a JWT.
|
|
128
|
+
bun src/index.ts auth status --json
|
|
129
|
+
bun src/index.ts doctor --json
|
|
103
130
|
|
|
104
131
|
# Local shell integration.
|
|
105
132
|
bun src/index.ts complete bash
|
|
@@ -141,7 +168,7 @@ explicit token/API-key paths:
|
|
|
141
168
|
- `uru login --token ...` stores the token in OS credential storage when available: macOS Keychain, Linux `secret-tool`/libsecret, or Windows Credential Manager via PowerShell
|
|
142
169
|
- `uru login --token ... --insecure-storage` is the explicit plaintext fallback
|
|
143
170
|
- Linux token storage requires `secret-tool` (often installed as `libsecret-tools`); Windows token storage requires PowerShell access to Credential Manager. If the OS store is unavailable, login fails closed with an actionable `--insecure-storage` fallback message.
|
|
144
|
-
- browser/device credentials renew within five minutes of session expiry and
|
|
171
|
+
- browser/device credentials renew within five minutes of session expiry. A workspace switch is request scope and does not rotate the login.
|
|
145
172
|
- interactive commands with missing or expired stored auth start browser login and then retry the command without printing login success text to stdout
|
|
146
173
|
- `--no-input` disables implicit login and exits `4` when authentication is missing
|
|
147
174
|
- `uru logout` invalidates the current CLI session, revokes the renewable OAuth credential, and clears local auth state
|
|
@@ -151,6 +178,9 @@ explicit token/API-key paths:
|
|
|
151
178
|
- config file permissions: `0600`
|
|
152
179
|
- linked project state: `.uru/project.json` with `{workspaceId, gemId, libraryPath}`
|
|
153
180
|
- no credentials are written to `.uru/project.json`
|
|
181
|
+
- `uru auth status` reports logged-in / workspace / storage / expiry and never prints a JWT. `uru whoami` stays a server identity call.
|
|
182
|
+
- `uru switch` sets the local default workspace. `uru link` binds this directory to one Gem. `--workspace` / `URU_WORKSPACE_ID` override one invocation.
|
|
183
|
+
- The screen says Agent; Library paths and schemas say persona (`library/Agents/Name.persona.md`).
|
|
154
184
|
- Gem-scoped deploy tokens for CI use `uru tokens create|ls|revoke`
|
|
155
185
|
- `uru tokens create` requires `--name` plus exactly one lifetime flag:
|
|
156
186
|
`--expiry <duration>` or `--expires-at <iso timestamp>`
|
|
@@ -163,6 +193,21 @@ explicit token/API-key paths:
|
|
|
163
193
|
file
|
|
164
194
|
- `uru env run -- <cmd>` overlays local values and redacts all non-empty values from captured output
|
|
165
195
|
|
|
196
|
+
## CI cookbook
|
|
197
|
+
|
|
198
|
+
Use a Gem-scoped token, never a session JWT, and fail closed:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
uru tokens create 'library/Golden Gems/My Gem.gem' --name CI --expiry 30d --json
|
|
202
|
+
export URU_TOKEN=<token-from-create-once>
|
|
203
|
+
export URU_WORKSPACE_ID=<workspace-id>
|
|
204
|
+
uru --no-input doctor --json
|
|
205
|
+
uru --no-input auth status --json
|
|
206
|
+
uru --no-input whoami --json
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
`--no-input` exits instead of opening a browser. `auth status` and `doctor` warn if the token lives in `--insecure-storage` and do not print the token. `env pull` writes names only; it does not download secret values.
|
|
210
|
+
|
|
166
211
|
## Install shape
|
|
167
212
|
|
|
168
213
|
The package name is `@uru-intelligence/cli`; the installed binary is still `uru`:
|
package/dist/library.mjs
CHANGED
|
@@ -6595,10 +6595,6 @@ var zArtifactToolPolicyReceiptTerminalResponse = union([
|
|
|
6595
6595
|
terminalized: literal(false)
|
|
6596
6596
|
})
|
|
6597
6597
|
]);
|
|
6598
|
-
var zAuditorConversationBootstrapRequest = object({
|
|
6599
|
-
evaluationId: string2().nullish(),
|
|
6600
|
-
forceNew: boolean2().optional().default(false)
|
|
6601
|
-
});
|
|
6602
6598
|
var zAuthMode = _enum(["oauth2", "bearer", "none"]).default("none");
|
|
6603
6599
|
var zAuthPreflightResponse = object({
|
|
6604
6600
|
expiresAt: exports_iso.datetime({ offset: true })
|
|
@@ -8114,7 +8110,8 @@ var zGraphEdgeType = _enum([
|
|
|
8114
8110
|
"backlink",
|
|
8115
8111
|
"gem_sdk",
|
|
8116
8112
|
"workspace_default",
|
|
8117
|
-
"team"
|
|
8113
|
+
"team",
|
|
8114
|
+
"folder"
|
|
8118
8115
|
]).default("manual");
|
|
8119
8116
|
var zGraphEdge = object({
|
|
8120
8117
|
edgeType: zGraphEdgeType.optional(),
|
|
@@ -8139,7 +8136,8 @@ var zGraphNodeType = _enum([
|
|
|
8139
8136
|
"persona",
|
|
8140
8137
|
"dataset",
|
|
8141
8138
|
"file",
|
|
8142
|
-
"collection"
|
|
8139
|
+
"collection",
|
|
8140
|
+
"folder"
|
|
8143
8141
|
]);
|
|
8144
8142
|
var zGraphNode = object({
|
|
8145
8143
|
id: string2(),
|
|
@@ -8307,7 +8305,8 @@ var zHomePinKind = _enum([
|
|
|
8307
8305
|
"page",
|
|
8308
8306
|
"agent",
|
|
8309
8307
|
"prompt",
|
|
8310
|
-
"context"
|
|
8308
|
+
"context",
|
|
8309
|
+
"folder"
|
|
8311
8310
|
]);
|
|
8312
8311
|
var zHomePin = object({
|
|
8313
8312
|
createdAt: string2(),
|
|
@@ -9530,7 +9529,7 @@ var zNotificationItem = strictObject({
|
|
|
9530
9529
|
status: zNotificationStatus,
|
|
9531
9530
|
targetUrl: string2().nullish(),
|
|
9532
9531
|
updatedAt: exports_iso.datetime({ offset: true }),
|
|
9533
|
-
workspaceId: string2()
|
|
9532
|
+
workspaceId: string2().nullable()
|
|
9534
9533
|
});
|
|
9535
9534
|
var zNotificationType = _enum([
|
|
9536
9535
|
"content_shared",
|
|
@@ -10840,6 +10839,7 @@ var zThreadFileView = object({
|
|
|
10840
10839
|
});
|
|
10841
10840
|
var zThreadFileListResponse = object({
|
|
10842
10841
|
files: array(zThreadFileView),
|
|
10842
|
+
outputsNotDelivered: array(string2()),
|
|
10843
10843
|
outputsSettled: boolean2(),
|
|
10844
10844
|
protocol: _enum(["uru.thread.v1"])
|
|
10845
10845
|
});
|
|
@@ -11171,6 +11171,33 @@ var zThreadCreateRequest = strictObject({
|
|
|
11171
11171
|
title: string2().max(400).nullable(),
|
|
11172
11172
|
workspaceId: uuid2()
|
|
11173
11173
|
});
|
|
11174
|
+
var zThreadShareLink = object({
|
|
11175
|
+
messageCount: int(),
|
|
11176
|
+
mintedAt: string2(),
|
|
11177
|
+
mintedByUserId: string2(),
|
|
11178
|
+
revokedAt: string2().nullable(),
|
|
11179
|
+
shareId: string2(),
|
|
11180
|
+
snapshotLeafMessageId: string2().nullable(),
|
|
11181
|
+
threadId: string2()
|
|
11182
|
+
});
|
|
11183
|
+
var zThreadShareListResponse = object({
|
|
11184
|
+
links: array(zThreadShareLink)
|
|
11185
|
+
});
|
|
11186
|
+
var zThreadShareMintResponse = object({
|
|
11187
|
+
link: zThreadShareLink,
|
|
11188
|
+
token: string2(),
|
|
11189
|
+
url: string2().nullable()
|
|
11190
|
+
});
|
|
11191
|
+
var zThreadShareRevokeResponse = object({
|
|
11192
|
+
link: zThreadShareLink
|
|
11193
|
+
});
|
|
11194
|
+
var zThreadShareThread = object({
|
|
11195
|
+
activeLeafMessageId: string2().nullable(),
|
|
11196
|
+
createdAt: string2(),
|
|
11197
|
+
model: zThreadModelSelector.nullable(),
|
|
11198
|
+
threadId: string2(),
|
|
11199
|
+
title: string2().nullable()
|
|
11200
|
+
});
|
|
11174
11201
|
var zThreadSubagentInput = object({
|
|
11175
11202
|
agentId: uuid2(),
|
|
11176
11203
|
attemptCount: int().gte(0),
|
|
@@ -11388,6 +11415,7 @@ var zThreadMessagePart = union([
|
|
|
11388
11415
|
"context_window_exceeded",
|
|
11389
11416
|
"compaction_loop_exceeded",
|
|
11390
11417
|
"automation_turn_budget_exceeded",
|
|
11418
|
+
"output_length_limit_reached",
|
|
11391
11419
|
"out_of_usage",
|
|
11392
11420
|
"run_orphaned",
|
|
11393
11421
|
"tool_policy_denied",
|
|
@@ -11496,6 +11524,13 @@ var zThreadMessagesListResponse = object({
|
|
|
11496
11524
|
protocol: _enum(["uru.thread.v1"]),
|
|
11497
11525
|
siblings: record(string2(), array(string2()))
|
|
11498
11526
|
});
|
|
11527
|
+
var zThreadShareSnapshot = object({
|
|
11528
|
+
messages: array(zThreadExportMessage),
|
|
11529
|
+
schema: _enum(["uru.thread-share"]),
|
|
11530
|
+
sharedAt: string2(),
|
|
11531
|
+
thread: zThreadShareThread,
|
|
11532
|
+
version: literal(1)
|
|
11533
|
+
});
|
|
11499
11534
|
var zThreadUpdateRequest = strictObject({
|
|
11500
11535
|
settings: zThreadSettingsPatch,
|
|
11501
11536
|
title: object({
|
|
@@ -12931,21 +12966,6 @@ var zGetPrimaryRubricForAutomationApiAutomationsAutomationIdRubricGetQuery = obj
|
|
|
12931
12966
|
scope: _enum(["personal", "workspace"]).optional().default("personal")
|
|
12932
12967
|
});
|
|
12933
12968
|
var zGetPrimaryRubricForAutomationApiAutomationsAutomationIdRubricGetResponse = record(string2(), unknown());
|
|
12934
|
-
var zQuickCreateRubricForAutomationApiAutomationsAutomationIdRubricQuickCreatePostPath = object({
|
|
12935
|
-
automationId: string2()
|
|
12936
|
-
});
|
|
12937
|
-
var zQuickCreateRubricForAutomationApiAutomationsAutomationIdRubricQuickCreatePostQuery = object({
|
|
12938
|
-
scope: _enum(["personal", "workspace"]).optional().default("personal")
|
|
12939
|
-
});
|
|
12940
|
-
var zQuickCreateRubricForAutomationApiAutomationsAutomationIdRubricQuickCreatePostResponse = record(string2(), unknown());
|
|
12941
|
-
var zBootstrapRubricReviewConversationApiAutomationsAutomationIdRubricRubricIdConversationPostPath = object({
|
|
12942
|
-
automationId: string2(),
|
|
12943
|
-
rubricId: string2()
|
|
12944
|
-
});
|
|
12945
|
-
var zBootstrapRubricReviewConversationApiAutomationsAutomationIdRubricRubricIdConversationPostQuery = object({
|
|
12946
|
-
scope: _enum(["personal", "workspace"]).optional().default("personal")
|
|
12947
|
-
});
|
|
12948
|
-
var zBootstrapRubricReviewConversationApiAutomationsAutomationIdRubricRubricIdConversationPostResponse = record(string2(), unknown());
|
|
12949
12969
|
var zTriggerRubricEvaluationApiAutomationsAutomationIdRubricRubricIdEvaluatePostPath = object({
|
|
12950
12970
|
automationId: string2(),
|
|
12951
12971
|
rubricId: string2()
|
|
@@ -13899,6 +13919,19 @@ var zListAppLogsApiPlatformArtifactsArtifactSlugAppLogsGetQuery = object({
|
|
|
13899
13919
|
requestId: string2().nullish()
|
|
13900
13920
|
});
|
|
13901
13921
|
var zListAppLogsApiPlatformArtifactsArtifactSlugAppLogsGetResponse = array(zAppLogRecord);
|
|
13922
|
+
var zStreamAppLogsApiPlatformArtifactsArtifactSlugAppLogsStreamGetPath = object({
|
|
13923
|
+
artifactSlug: string2()
|
|
13924
|
+
});
|
|
13925
|
+
var zStreamAppLogsApiPlatformArtifactsArtifactSlugAppLogsStreamGetQuery = object({
|
|
13926
|
+
cursor: string2().nullish(),
|
|
13927
|
+
limit: int().gte(1).lte(500).optional().default(100),
|
|
13928
|
+
deploymentId: string2().nullish(),
|
|
13929
|
+
releaseId: string2().nullish(),
|
|
13930
|
+
runtimeRunId: string2().nullish(),
|
|
13931
|
+
level: string2().nullish(),
|
|
13932
|
+
requestId: string2().nullish()
|
|
13933
|
+
});
|
|
13934
|
+
var zStreamAppLogsApiPlatformArtifactsArtifactSlugAppLogsStreamGetResponse = string2();
|
|
13902
13935
|
var zGetAppReleaseOverviewApiPlatformArtifactsArtifactSlugAppReleaseOverviewGetPath = object({
|
|
13903
13936
|
artifactSlug: string2()
|
|
13904
13937
|
});
|
|
@@ -16388,6 +16421,9 @@ var zProviderInvokeAppQueryApiRuntimeProviderAppsDeploymentIdQueryCapabilityName
|
|
|
16388
16421
|
var zGetCspNonceApiSecurityCspNonceGetResponse = record(string2(), string2());
|
|
16389
16422
|
var zCspReportStatsApiSecurityCspReportStatsGetResponse = record(string2(), unknown());
|
|
16390
16423
|
var zCspViolationReportApiSecurityCspViolationReportPostBody = string2().default("");
|
|
16424
|
+
var zThreadShareReadPath = object({
|
|
16425
|
+
shareId: string2().min(1).max(128)
|
|
16426
|
+
});
|
|
16391
16427
|
var zBackfillSharedContentMetadataApiSharingBackfillMetadataPostResponse = record(string2(), string2());
|
|
16392
16428
|
var zDeleteNotificationsApiSharingNotificationsDeleteResponse = record(string2(), unknown());
|
|
16393
16429
|
var zGetNotificationsApiSharingNotificationsGetQuery = object({
|
|
@@ -16658,6 +16694,16 @@ var zThreadSandboxListPath = object({
|
|
|
16658
16694
|
var zThreadSandboxListQuery = object({
|
|
16659
16695
|
path: string2().max(512).optional()
|
|
16660
16696
|
});
|
|
16697
|
+
var zThreadShareListPath = object({
|
|
16698
|
+
threadId: uuid2()
|
|
16699
|
+
});
|
|
16700
|
+
var zThreadShareMintPath = object({
|
|
16701
|
+
threadId: uuid2()
|
|
16702
|
+
});
|
|
16703
|
+
var zThreadShareRevokePath = object({
|
|
16704
|
+
threadId: uuid2(),
|
|
16705
|
+
shareId: uuid2()
|
|
16706
|
+
});
|
|
16661
16707
|
var zListAvailableToolDefinitionsApiToolControlPlaneAvailableGetQuery = object({
|
|
16662
16708
|
enabledOnly: _enum(["true", "false"]).optional().default("true")
|
|
16663
16709
|
});
|
|
@@ -16857,7 +16903,7 @@ function pickString(record2, keys) {
|
|
|
16857
16903
|
// package.json
|
|
16858
16904
|
var package_default = {
|
|
16859
16905
|
name: "@uru-intelligence/cli",
|
|
16860
|
-
version: "0.4.
|
|
16906
|
+
version: "0.4.13",
|
|
16861
16907
|
private: false,
|
|
16862
16908
|
description: "Uru full-platform command line interface",
|
|
16863
16909
|
repository: {
|
|
@@ -16935,11 +16981,27 @@ var ExitCode = {
|
|
|
16935
16981
|
class CliError extends Error {
|
|
16936
16982
|
exitCode;
|
|
16937
16983
|
errorCode;
|
|
16984
|
+
confirmationRequired;
|
|
16985
|
+
suggestedCommand;
|
|
16986
|
+
errorId;
|
|
16987
|
+
httpStatus;
|
|
16938
16988
|
constructor(message, options = {}) {
|
|
16939
16989
|
super(message, options.cause === undefined ? undefined : { cause: options.cause });
|
|
16940
16990
|
this.name = "CliError";
|
|
16941
16991
|
this.exitCode = options.code ?? ExitCode.Failure;
|
|
16942
16992
|
this.errorCode = options.errorCode ?? defaultCliErrorCode(this.exitCode);
|
|
16993
|
+
if (options.confirmationRequired === true) {
|
|
16994
|
+
this.confirmationRequired = true;
|
|
16995
|
+
}
|
|
16996
|
+
if (options.suggestedCommand !== undefined) {
|
|
16997
|
+
this.suggestedCommand = options.suggestedCommand;
|
|
16998
|
+
}
|
|
16999
|
+
if (options.errorId !== undefined) {
|
|
17000
|
+
this.errorId = options.errorId;
|
|
17001
|
+
}
|
|
17002
|
+
if (options.httpStatus !== undefined) {
|
|
17003
|
+
this.httpStatus = options.httpStatus;
|
|
17004
|
+
}
|
|
16943
17005
|
}
|
|
16944
17006
|
}
|
|
16945
17007
|
function defaultCliErrorCode(exitCode) {
|
|
@@ -16957,6 +17019,9 @@ function defaultCliErrorCode(exitCode) {
|
|
|
16957
17019
|
}
|
|
16958
17020
|
}
|
|
16959
17021
|
|
|
17022
|
+
// src/oauth-credential.ts
|
|
17023
|
+
var SESSION_REFRESH_LEEWAY_MS = 5 * 60 * 1000;
|
|
17024
|
+
|
|
16960
17025
|
// ../../packages/types/src/mcp/gemResult.ts
|
|
16961
17026
|
var GEM_RESULT_SCHEMA_V1 = "uru.gem.result.v1";
|
|
16962
17027
|
// src/gem-result.ts
|
|
@@ -17009,6 +17074,7 @@ function gemToolError(operation, value) {
|
|
|
17009
17074
|
};
|
|
17010
17075
|
return new CliError(`Gem ${operation} failed: code=${error2.code}; message=${error2.message}; error_id=${error2.error_id}`, {
|
|
17011
17076
|
errorCode: error2.code,
|
|
17077
|
+
errorId: error2.error_id,
|
|
17012
17078
|
...error2.code === "source_revision_conflict" ? { code: ExitCode.Conflict } : {}
|
|
17013
17079
|
});
|
|
17014
17080
|
}
|
|
@@ -17145,6 +17211,40 @@ class UruApiClient {
|
|
|
17145
17211
|
}
|
|
17146
17212
|
return { streamed: false, payload: body.value };
|
|
17147
17213
|
}
|
|
17214
|
+
async requestSseStream(path, options = {}) {
|
|
17215
|
+
const query = buildQueryString(options.query);
|
|
17216
|
+
const signals = [this.signal, options.signal].filter((signal2) => signal2 !== undefined);
|
|
17217
|
+
const signal = signals.length === 0 ? undefined : signals.length === 1 ? signals[0] : AbortSignal.any(signals);
|
|
17218
|
+
const init = {
|
|
17219
|
+
method: options.method ?? "GET",
|
|
17220
|
+
...signal === undefined ? {} : { signal },
|
|
17221
|
+
headers: {
|
|
17222
|
+
Authorization: `Bearer ${this.token}`,
|
|
17223
|
+
Accept: "text/event-stream",
|
|
17224
|
+
"X-Uru-Client-Name": "uru-cli",
|
|
17225
|
+
"X-Uru-Client-Version": CLI_VERSION,
|
|
17226
|
+
...options.cliOperation === undefined ? {} : { "X-Uru-Client-Operation": options.cliOperation },
|
|
17227
|
+
...this.workspaceId === undefined ? {} : { "X-Uru-Workspace-Id": this.workspaceId },
|
|
17228
|
+
...options.lastEventId === undefined || options.lastEventId === "" ? {} : { "Last-Event-ID": options.lastEventId }
|
|
17229
|
+
}
|
|
17230
|
+
};
|
|
17231
|
+
const response = await this.fetchImpl(`${this.apiUrl}${path}${query}`, init);
|
|
17232
|
+
if (response.status === 404) {
|
|
17233
|
+
return { streamed: false, notFound: true };
|
|
17234
|
+
}
|
|
17235
|
+
if (response.ok && response.body !== null && isEventStreamResponse(response.headers.get("content-type"))) {
|
|
17236
|
+
return { streamed: true, stream: response.body };
|
|
17237
|
+
}
|
|
17238
|
+
const text = await response.text();
|
|
17239
|
+
const body = parseResponseBody(text);
|
|
17240
|
+
if (!body.parsed) {
|
|
17241
|
+
throw nonJsonResponseError(response.status, response.headers.get("content-type"));
|
|
17242
|
+
}
|
|
17243
|
+
if (!response.ok) {
|
|
17244
|
+
throw apiError(response.status, body.value, undefined);
|
|
17245
|
+
}
|
|
17246
|
+
throw new CliError("API returned a non-SSE runtime log stream.");
|
|
17247
|
+
}
|
|
17148
17248
|
async streamGemTool(name, parameters, operation, onEvent) {
|
|
17149
17249
|
const streamed = await this.streamTool(name, parameters, onEvent, operation);
|
|
17150
17250
|
if (streamed.streamed) {
|
|
@@ -17172,21 +17272,26 @@ function toolTransportError(body, requestBody) {
|
|
|
17172
17272
|
}
|
|
17173
17273
|
const status = body["httpStatus"];
|
|
17174
17274
|
const message = `${error2.message} (HTTP ${status})`;
|
|
17275
|
+
const structured = {
|
|
17276
|
+
...error2.errorCode === undefined ? {} : { errorCode: error2.errorCode },
|
|
17277
|
+
...error2.errorId === undefined ? {} : { errorId: error2.errorId },
|
|
17278
|
+
httpStatus: status
|
|
17279
|
+
};
|
|
17175
17280
|
if (status === 409) {
|
|
17176
17281
|
return new CliError(message, {
|
|
17177
17282
|
code: ExitCode.Conflict,
|
|
17178
|
-
...
|
|
17283
|
+
...structured
|
|
17179
17284
|
});
|
|
17180
17285
|
}
|
|
17181
17286
|
if (status === 401 || status === 403) {
|
|
17182
17287
|
return new CliError(message, {
|
|
17183
17288
|
code: ExitCode.AuthRequired,
|
|
17184
|
-
...
|
|
17289
|
+
...structured
|
|
17185
17290
|
});
|
|
17186
17291
|
}
|
|
17187
17292
|
return new CliError(message, {
|
|
17188
17293
|
code: error2.exitCode,
|
|
17189
|
-
...
|
|
17294
|
+
...structured
|
|
17190
17295
|
});
|
|
17191
17296
|
}
|
|
17192
17297
|
function normalizeApiUrl(value) {
|
|
@@ -17220,6 +17325,23 @@ function isNdjsonResponse(contentType) {
|
|
|
17220
17325
|
const normalized = String(contentType ?? "").toLowerCase();
|
|
17221
17326
|
return normalized.includes("application/x-ndjson") || normalized.includes("application/ndjson") || normalized.includes("text/x-ndjson");
|
|
17222
17327
|
}
|
|
17328
|
+
function isEventStreamResponse(contentType) {
|
|
17329
|
+
return String(contentType ?? "").toLowerCase().includes("text/event-stream");
|
|
17330
|
+
}
|
|
17331
|
+
function buildQueryString(query) {
|
|
17332
|
+
if (query === undefined) {
|
|
17333
|
+
return "";
|
|
17334
|
+
}
|
|
17335
|
+
const params = new URLSearchParams;
|
|
17336
|
+
for (const [key, value] of Object.entries(query)) {
|
|
17337
|
+
if (value === undefined || value === "") {
|
|
17338
|
+
continue;
|
|
17339
|
+
}
|
|
17340
|
+
params.set(key, String(value));
|
|
17341
|
+
}
|
|
17342
|
+
const encoded = params.toString();
|
|
17343
|
+
return encoded === "" ? "" : `?${encoded}`;
|
|
17344
|
+
}
|
|
17223
17345
|
async function readNdjsonStream(body, onEvent) {
|
|
17224
17346
|
const reader = body.getReader();
|
|
17225
17347
|
const decoder = new TextDecoder;
|
|
@@ -17286,9 +17408,12 @@ function apiError(status, payload, requestBody) {
|
|
|
17286
17408
|
"errorCode",
|
|
17287
17409
|
"error_code"
|
|
17288
17410
|
]);
|
|
17411
|
+
const errorId = pickStringFromJsonValue(envelope, ["errorId", "error_id"]);
|
|
17289
17412
|
return new CliError(message, {
|
|
17290
17413
|
code: status === 401 ? ExitCode.AuthRequired : ExitCode.Failure,
|
|
17291
|
-
errorCode: backendCode ?? (status === 401 ? "auth_required" : status === 403 ? "permission_denied" : "api_request_failed")
|
|
17414
|
+
errorCode: backendCode ?? (status === 401 ? "auth_required" : status === 403 ? "permission_denied" : "api_request_failed"),
|
|
17415
|
+
httpStatus: status,
|
|
17416
|
+
...errorId === undefined ? {} : { errorId }
|
|
17292
17417
|
});
|
|
17293
17418
|
}
|
|
17294
17419
|
function pickStringFromJsonValue(value, keys) {
|