@uru-intelligence/cli 0.4.12 → 0.4.14
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 +2 -0
- package/dist/library.mjs +70 -5
- package/dist/uru.mjs +147 -10
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -52,6 +52,8 @@
|
|
|
52
52
|
- Action: No action is required. Agents and scripts can read `suggestedCommand` from JSON errors instead of guessing the confirmation flag.
|
|
53
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
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
|
+
- Pin URU_API_BASE and URU_PROXY_URL in generated MCP client config from the CLI API host, and send the MCP 2026-07-28 request envelope from CLI staging smoke. — surfaces: cli; reference: apps/cli/src/mcp-commands.ts
|
|
56
|
+
- Action: After `uru mcp config` against development or staging, set URU_API_KEY and use the emitted URU_PROXY_URL so clients do not fall through to production MCP. Prefer published CLI >= 0.4.14.
|
|
55
57
|
- 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
58
|
- 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.
|
|
57
59
|
- 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
|
package/dist/library.mjs
CHANGED
|
@@ -8110,7 +8110,8 @@ var zGraphEdgeType = _enum([
|
|
|
8110
8110
|
"backlink",
|
|
8111
8111
|
"gem_sdk",
|
|
8112
8112
|
"workspace_default",
|
|
8113
|
-
"team"
|
|
8113
|
+
"team",
|
|
8114
|
+
"folder"
|
|
8114
8115
|
]).default("manual");
|
|
8115
8116
|
var zGraphEdge = object({
|
|
8116
8117
|
edgeType: zGraphEdgeType.optional(),
|
|
@@ -8135,7 +8136,8 @@ var zGraphNodeType = _enum([
|
|
|
8135
8136
|
"persona",
|
|
8136
8137
|
"dataset",
|
|
8137
8138
|
"file",
|
|
8138
|
-
"collection"
|
|
8139
|
+
"collection",
|
|
8140
|
+
"folder"
|
|
8139
8141
|
]);
|
|
8140
8142
|
var zGraphNode = object({
|
|
8141
8143
|
id: string2(),
|
|
@@ -8303,7 +8305,8 @@ var zHomePinKind = _enum([
|
|
|
8303
8305
|
"page",
|
|
8304
8306
|
"agent",
|
|
8305
8307
|
"prompt",
|
|
8306
|
-
"context"
|
|
8308
|
+
"context",
|
|
8309
|
+
"folder"
|
|
8307
8310
|
]);
|
|
8308
8311
|
var zHomePin = object({
|
|
8309
8312
|
createdAt: string2(),
|
|
@@ -9526,7 +9529,7 @@ var zNotificationItem = strictObject({
|
|
|
9526
9529
|
status: zNotificationStatus,
|
|
9527
9530
|
targetUrl: string2().nullish(),
|
|
9528
9531
|
updatedAt: exports_iso.datetime({ offset: true }),
|
|
9529
|
-
workspaceId: string2()
|
|
9532
|
+
workspaceId: string2().nullable()
|
|
9530
9533
|
});
|
|
9531
9534
|
var zNotificationType = _enum([
|
|
9532
9535
|
"content_shared",
|
|
@@ -10836,6 +10839,7 @@ var zThreadFileView = object({
|
|
|
10836
10839
|
});
|
|
10837
10840
|
var zThreadFileListResponse = object({
|
|
10838
10841
|
files: array(zThreadFileView),
|
|
10842
|
+
outputsNotDelivered: array(string2()),
|
|
10839
10843
|
outputsSettled: boolean2(),
|
|
10840
10844
|
protocol: _enum(["uru.thread.v1"])
|
|
10841
10845
|
});
|
|
@@ -11167,6 +11171,33 @@ var zThreadCreateRequest = strictObject({
|
|
|
11167
11171
|
title: string2().max(400).nullable(),
|
|
11168
11172
|
workspaceId: uuid2()
|
|
11169
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
|
+
});
|
|
11170
11201
|
var zThreadSubagentInput = object({
|
|
11171
11202
|
agentId: uuid2(),
|
|
11172
11203
|
attemptCount: int().gte(0),
|
|
@@ -11384,6 +11415,7 @@ var zThreadMessagePart = union([
|
|
|
11384
11415
|
"context_window_exceeded",
|
|
11385
11416
|
"compaction_loop_exceeded",
|
|
11386
11417
|
"automation_turn_budget_exceeded",
|
|
11418
|
+
"output_length_limit_reached",
|
|
11387
11419
|
"out_of_usage",
|
|
11388
11420
|
"run_orphaned",
|
|
11389
11421
|
"tool_policy_denied",
|
|
@@ -11492,6 +11524,13 @@ var zThreadMessagesListResponse = object({
|
|
|
11492
11524
|
protocol: _enum(["uru.thread.v1"]),
|
|
11493
11525
|
siblings: record(string2(), array(string2()))
|
|
11494
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
|
+
});
|
|
11495
11534
|
var zThreadUpdateRequest = strictObject({
|
|
11496
11535
|
settings: zThreadSettingsPatch,
|
|
11497
11536
|
title: object({
|
|
@@ -13880,6 +13919,19 @@ var zListAppLogsApiPlatformArtifactsArtifactSlugAppLogsGetQuery = object({
|
|
|
13880
13919
|
requestId: string2().nullish()
|
|
13881
13920
|
});
|
|
13882
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();
|
|
13883
13935
|
var zGetAppReleaseOverviewApiPlatformArtifactsArtifactSlugAppReleaseOverviewGetPath = object({
|
|
13884
13936
|
artifactSlug: string2()
|
|
13885
13937
|
});
|
|
@@ -16369,6 +16421,9 @@ var zProviderInvokeAppQueryApiRuntimeProviderAppsDeploymentIdQueryCapabilityName
|
|
|
16369
16421
|
var zGetCspNonceApiSecurityCspNonceGetResponse = record(string2(), string2());
|
|
16370
16422
|
var zCspReportStatsApiSecurityCspReportStatsGetResponse = record(string2(), unknown());
|
|
16371
16423
|
var zCspViolationReportApiSecurityCspViolationReportPostBody = string2().default("");
|
|
16424
|
+
var zThreadShareReadPath = object({
|
|
16425
|
+
shareId: string2().min(1).max(128)
|
|
16426
|
+
});
|
|
16372
16427
|
var zBackfillSharedContentMetadataApiSharingBackfillMetadataPostResponse = record(string2(), string2());
|
|
16373
16428
|
var zDeleteNotificationsApiSharingNotificationsDeleteResponse = record(string2(), unknown());
|
|
16374
16429
|
var zGetNotificationsApiSharingNotificationsGetQuery = object({
|
|
@@ -16639,6 +16694,16 @@ var zThreadSandboxListPath = object({
|
|
|
16639
16694
|
var zThreadSandboxListQuery = object({
|
|
16640
16695
|
path: string2().max(512).optional()
|
|
16641
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
|
+
});
|
|
16642
16707
|
var zListAvailableToolDefinitionsApiToolControlPlaneAvailableGetQuery = object({
|
|
16643
16708
|
enabledOnly: _enum(["true", "false"]).optional().default("true")
|
|
16644
16709
|
});
|
|
@@ -16838,7 +16903,7 @@ function pickString(record2, keys) {
|
|
|
16838
16903
|
// package.json
|
|
16839
16904
|
var package_default = {
|
|
16840
16905
|
name: "@uru-intelligence/cli",
|
|
16841
|
-
version: "0.4.
|
|
16906
|
+
version: "0.4.14",
|
|
16842
16907
|
private: false,
|
|
16843
16908
|
description: "Uru full-platform command line interface",
|
|
16844
16909
|
repository: {
|
package/dist/uru.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import { homedir as homedir3 } from "node:os";
|
|
|
21
21
|
// package.json
|
|
22
22
|
var package_default = {
|
|
23
23
|
name: "@uru-intelligence/cli",
|
|
24
|
-
version: "0.4.
|
|
24
|
+
version: "0.4.14",
|
|
25
25
|
private: false,
|
|
26
26
|
description: "Uru full-platform command line interface",
|
|
27
27
|
repository: {
|
|
@@ -1112,6 +1112,9 @@ function getPlatformOperationForToolCall(backendToolName, parameters) {
|
|
|
1112
1112
|
return platformOperations.find((operation) => operation.backendToolName.toLowerCase() === toolName && (operation.backendOp === undefined ? backendOp === undefined : operation.backendOp.toLowerCase() === backendOp));
|
|
1113
1113
|
}
|
|
1114
1114
|
function operationRequiresExplicitConfirmation(operation, parameters) {
|
|
1115
|
+
if (parameters["preview_only"] === true) {
|
|
1116
|
+
return false;
|
|
1117
|
+
}
|
|
1115
1118
|
return operation.safety === "destructive" || operation.id === "library.rm" && parameters["permanent"] === true;
|
|
1116
1119
|
}
|
|
1117
1120
|
function platformOperationsForSurface(surface) {
|
|
@@ -10806,7 +10809,8 @@ var zGraphEdgeType = _enum([
|
|
|
10806
10809
|
"backlink",
|
|
10807
10810
|
"gem_sdk",
|
|
10808
10811
|
"workspace_default",
|
|
10809
|
-
"team"
|
|
10812
|
+
"team",
|
|
10813
|
+
"folder"
|
|
10810
10814
|
]).default("manual");
|
|
10811
10815
|
var zGraphEdge = object({
|
|
10812
10816
|
edgeType: zGraphEdgeType.optional(),
|
|
@@ -10831,7 +10835,8 @@ var zGraphNodeType = _enum([
|
|
|
10831
10835
|
"persona",
|
|
10832
10836
|
"dataset",
|
|
10833
10837
|
"file",
|
|
10834
|
-
"collection"
|
|
10838
|
+
"collection",
|
|
10839
|
+
"folder"
|
|
10835
10840
|
]);
|
|
10836
10841
|
var zGraphNode = object({
|
|
10837
10842
|
id: string2(),
|
|
@@ -10999,7 +11004,8 @@ var zHomePinKind = _enum([
|
|
|
10999
11004
|
"page",
|
|
11000
11005
|
"agent",
|
|
11001
11006
|
"prompt",
|
|
11002
|
-
"context"
|
|
11007
|
+
"context",
|
|
11008
|
+
"folder"
|
|
11003
11009
|
]);
|
|
11004
11010
|
var zHomePin = object({
|
|
11005
11011
|
createdAt: string2(),
|
|
@@ -12222,7 +12228,7 @@ var zNotificationItem = strictObject({
|
|
|
12222
12228
|
status: zNotificationStatus,
|
|
12223
12229
|
targetUrl: string2().nullish(),
|
|
12224
12230
|
updatedAt: exports_iso.datetime({ offset: true }),
|
|
12225
|
-
workspaceId: string2()
|
|
12231
|
+
workspaceId: string2().nullable()
|
|
12226
12232
|
});
|
|
12227
12233
|
var zNotificationType = _enum([
|
|
12228
12234
|
"content_shared",
|
|
@@ -13532,6 +13538,7 @@ var zThreadFileView = object({
|
|
|
13532
13538
|
});
|
|
13533
13539
|
var zThreadFileListResponse = object({
|
|
13534
13540
|
files: array(zThreadFileView),
|
|
13541
|
+
outputsNotDelivered: array(string2()),
|
|
13535
13542
|
outputsSettled: boolean2(),
|
|
13536
13543
|
protocol: _enum(["uru.thread.v1"])
|
|
13537
13544
|
});
|
|
@@ -13863,6 +13870,33 @@ var zThreadCreateRequest = strictObject({
|
|
|
13863
13870
|
title: string2().max(400).nullable(),
|
|
13864
13871
|
workspaceId: uuid2()
|
|
13865
13872
|
});
|
|
13873
|
+
var zThreadShareLink = object({
|
|
13874
|
+
messageCount: int(),
|
|
13875
|
+
mintedAt: string2(),
|
|
13876
|
+
mintedByUserId: string2(),
|
|
13877
|
+
revokedAt: string2().nullable(),
|
|
13878
|
+
shareId: string2(),
|
|
13879
|
+
snapshotLeafMessageId: string2().nullable(),
|
|
13880
|
+
threadId: string2()
|
|
13881
|
+
});
|
|
13882
|
+
var zThreadShareListResponse = object({
|
|
13883
|
+
links: array(zThreadShareLink)
|
|
13884
|
+
});
|
|
13885
|
+
var zThreadShareMintResponse = object({
|
|
13886
|
+
link: zThreadShareLink,
|
|
13887
|
+
token: string2(),
|
|
13888
|
+
url: string2().nullable()
|
|
13889
|
+
});
|
|
13890
|
+
var zThreadShareRevokeResponse = object({
|
|
13891
|
+
link: zThreadShareLink
|
|
13892
|
+
});
|
|
13893
|
+
var zThreadShareThread = object({
|
|
13894
|
+
activeLeafMessageId: string2().nullable(),
|
|
13895
|
+
createdAt: string2(),
|
|
13896
|
+
model: zThreadModelSelector.nullable(),
|
|
13897
|
+
threadId: string2(),
|
|
13898
|
+
title: string2().nullable()
|
|
13899
|
+
});
|
|
13866
13900
|
var zThreadSubagentInput = object({
|
|
13867
13901
|
agentId: uuid2(),
|
|
13868
13902
|
attemptCount: int().gte(0),
|
|
@@ -14080,6 +14114,7 @@ var zThreadMessagePart = union([
|
|
|
14080
14114
|
"context_window_exceeded",
|
|
14081
14115
|
"compaction_loop_exceeded",
|
|
14082
14116
|
"automation_turn_budget_exceeded",
|
|
14117
|
+
"output_length_limit_reached",
|
|
14083
14118
|
"out_of_usage",
|
|
14084
14119
|
"run_orphaned",
|
|
14085
14120
|
"tool_policy_denied",
|
|
@@ -14188,6 +14223,13 @@ var zThreadMessagesListResponse = object({
|
|
|
14188
14223
|
protocol: _enum(["uru.thread.v1"]),
|
|
14189
14224
|
siblings: record(string2(), array(string2()))
|
|
14190
14225
|
});
|
|
14226
|
+
var zThreadShareSnapshot = object({
|
|
14227
|
+
messages: array(zThreadExportMessage),
|
|
14228
|
+
schema: _enum(["uru.thread-share"]),
|
|
14229
|
+
sharedAt: string2(),
|
|
14230
|
+
thread: zThreadShareThread,
|
|
14231
|
+
version: literal(1)
|
|
14232
|
+
});
|
|
14191
14233
|
var zThreadUpdateRequest = strictObject({
|
|
14192
14234
|
settings: zThreadSettingsPatch,
|
|
14193
14235
|
title: object({
|
|
@@ -16576,6 +16618,19 @@ var zListAppLogsApiPlatformArtifactsArtifactSlugAppLogsGetQuery = object({
|
|
|
16576
16618
|
requestId: string2().nullish()
|
|
16577
16619
|
});
|
|
16578
16620
|
var zListAppLogsApiPlatformArtifactsArtifactSlugAppLogsGetResponse = array(zAppLogRecord);
|
|
16621
|
+
var zStreamAppLogsApiPlatformArtifactsArtifactSlugAppLogsStreamGetPath = object({
|
|
16622
|
+
artifactSlug: string2()
|
|
16623
|
+
});
|
|
16624
|
+
var zStreamAppLogsApiPlatformArtifactsArtifactSlugAppLogsStreamGetQuery = object({
|
|
16625
|
+
cursor: string2().nullish(),
|
|
16626
|
+
limit: int().gte(1).lte(500).optional().default(100),
|
|
16627
|
+
deploymentId: string2().nullish(),
|
|
16628
|
+
releaseId: string2().nullish(),
|
|
16629
|
+
runtimeRunId: string2().nullish(),
|
|
16630
|
+
level: string2().nullish(),
|
|
16631
|
+
requestId: string2().nullish()
|
|
16632
|
+
});
|
|
16633
|
+
var zStreamAppLogsApiPlatformArtifactsArtifactSlugAppLogsStreamGetResponse = string2();
|
|
16579
16634
|
var zGetAppReleaseOverviewApiPlatformArtifactsArtifactSlugAppReleaseOverviewGetPath = object({
|
|
16580
16635
|
artifactSlug: string2()
|
|
16581
16636
|
});
|
|
@@ -19065,6 +19120,9 @@ var zProviderInvokeAppQueryApiRuntimeProviderAppsDeploymentIdQueryCapabilityName
|
|
|
19065
19120
|
var zGetCspNonceApiSecurityCspNonceGetResponse = record(string2(), string2());
|
|
19066
19121
|
var zCspReportStatsApiSecurityCspReportStatsGetResponse = record(string2(), unknown());
|
|
19067
19122
|
var zCspViolationReportApiSecurityCspViolationReportPostBody = string2().default("");
|
|
19123
|
+
var zThreadShareReadPath = object({
|
|
19124
|
+
shareId: string2().min(1).max(128)
|
|
19125
|
+
});
|
|
19068
19126
|
var zBackfillSharedContentMetadataApiSharingBackfillMetadataPostResponse = record(string2(), string2());
|
|
19069
19127
|
var zDeleteNotificationsApiSharingNotificationsDeleteResponse = record(string2(), unknown());
|
|
19070
19128
|
var zGetNotificationsApiSharingNotificationsGetQuery = object({
|
|
@@ -19335,6 +19393,16 @@ var zThreadSandboxListPath = object({
|
|
|
19335
19393
|
var zThreadSandboxListQuery = object({
|
|
19336
19394
|
path: string2().max(512).optional()
|
|
19337
19395
|
});
|
|
19396
|
+
var zThreadShareListPath = object({
|
|
19397
|
+
threadId: uuid2()
|
|
19398
|
+
});
|
|
19399
|
+
var zThreadShareMintPath = object({
|
|
19400
|
+
threadId: uuid2()
|
|
19401
|
+
});
|
|
19402
|
+
var zThreadShareRevokePath = object({
|
|
19403
|
+
threadId: uuid2(),
|
|
19404
|
+
shareId: uuid2()
|
|
19405
|
+
});
|
|
19338
19406
|
var zListAvailableToolDefinitionsApiToolControlPlaneAvailableGetQuery = object({
|
|
19339
19407
|
enabledOnly: _enum(["true", "false"]).optional().default("true")
|
|
19340
19408
|
});
|
|
@@ -20969,7 +21037,7 @@ Destructive verbs require --yes.
|
|
|
20969
21037
|
uru automations triggers list <automation-id>
|
|
20970
21038
|
uru automations triggers discover [--source platform|app] [--app-name <name>]
|
|
20971
21039
|
uru automations connections list [--app-name <name>]
|
|
20972
|
-
uru automations runs ls
|
|
21040
|
+
uru automations runs ls <automation-id> [--scope personal|workspace] [--limit 100]
|
|
20973
21041
|
uru automations runs tail <run-id> [--limit 1000] [--level debug|info|warn|error]
|
|
20974
21042
|
uru automations runs debug|timeline <run-id>
|
|
20975
21043
|
uru automations runs cancel <run-id> --yes
|
|
@@ -23711,6 +23779,7 @@ async function removeMcpConfig(ctx, args) {
|
|
|
23711
23779
|
}
|
|
23712
23780
|
function buildMcpServerConfig(ctx, flags) {
|
|
23713
23781
|
return mcpServerConfig({
|
|
23782
|
+
apiUrl: ctx.apiUrl,
|
|
23714
23783
|
workspaceId: ctx.workspace,
|
|
23715
23784
|
serverName: flags.values["--server-name"] ?? DEFAULT_SERVER_NAME,
|
|
23716
23785
|
packageName: flags.values["--package"] ?? DEFAULT_MCP_PACKAGE
|
|
@@ -23721,7 +23790,27 @@ function writeMcpConfigJson(ctx, config2) {
|
|
|
23721
23790
|
`);
|
|
23722
23791
|
}
|
|
23723
23792
|
var MCP_API_KEY_PLACEHOLDER = "${URU_API_KEY}";
|
|
23793
|
+
function mcpProxyUrlFromApiUrl(apiUrl) {
|
|
23794
|
+
let host;
|
|
23795
|
+
try {
|
|
23796
|
+
host = new URL(apiUrl).hostname.toLowerCase();
|
|
23797
|
+
} catch {
|
|
23798
|
+
return;
|
|
23799
|
+
}
|
|
23800
|
+
if (host === "api.uruintelligence.com") {
|
|
23801
|
+
return "https://mcp.uruintelligence.com/mcp";
|
|
23802
|
+
}
|
|
23803
|
+
const match = /^api-(development|staging|uat)\.uruintelligence\.com$/u.exec(host);
|
|
23804
|
+
if (match !== null) {
|
|
23805
|
+
return `https://mcp-${match[1]}.uruintelligence.com/mcp`;
|
|
23806
|
+
}
|
|
23807
|
+
if (host === "localhost" || host === "127.0.0.1") {
|
|
23808
|
+
return "http://localhost:3001";
|
|
23809
|
+
}
|
|
23810
|
+
return;
|
|
23811
|
+
}
|
|
23724
23812
|
function mcpServerConfig(args) {
|
|
23813
|
+
const proxyUrl = mcpProxyUrlFromApiUrl(args.apiUrl);
|
|
23725
23814
|
return {
|
|
23726
23815
|
mcpServers: {
|
|
23727
23816
|
[args.serverName]: {
|
|
@@ -23729,6 +23818,8 @@ function mcpServerConfig(args) {
|
|
|
23729
23818
|
args: ["-y", args.packageName],
|
|
23730
23819
|
env: {
|
|
23731
23820
|
URU_API_KEY: MCP_API_KEY_PLACEHOLDER,
|
|
23821
|
+
URU_API_BASE: args.apiUrl,
|
|
23822
|
+
...proxyUrl === undefined ? {} : { URU_PROXY_URL: proxyUrl },
|
|
23732
23823
|
...args.workspaceId === undefined ? {} : { URU_WORKSPACE_ID: args.workspaceId }
|
|
23733
23824
|
}
|
|
23734
23825
|
}
|
|
@@ -25826,7 +25917,7 @@ async function enqueueGemHostedJob(ctx, flags, linkedProject, options) {
|
|
|
25826
25917
|
await emitGemHostedJob(ctx, ack, options.outdir);
|
|
25827
25918
|
return;
|
|
25828
25919
|
}
|
|
25829
|
-
const hostedJobId = stringField(ack, ["hosted_job_id"]);
|
|
25920
|
+
const hostedJobId = stringField(ack, ["hosted_job_id", "hostedJobId"]);
|
|
25830
25921
|
const initialStatus = typeof ack["status"] === "string" ? ack["status"].trim() : "";
|
|
25831
25922
|
if (hostedJobId === undefined) {
|
|
25832
25923
|
if (GEM_BUILD_TERMINAL_STATUSES.has(initialStatus)) {
|
|
@@ -25882,7 +25973,7 @@ async function enqueueGemHostedJob(ctx, flags, linkedProject, options) {
|
|
|
25882
25973
|
async function emitSettledGemHostedJob(ctx, job, status, outdir) {
|
|
25883
25974
|
await emitGemHostedJob(ctx, job, outdir);
|
|
25884
25975
|
if (GEM_BUILD_FAILED_STATUSES.has(status)) {
|
|
25885
|
-
const hostedJobId = stringField(job, ["hosted_job_id"]) ?? "unknown";
|
|
25976
|
+
const hostedJobId = stringField(job, ["hosted_job_id", "hostedJobId"]) ?? "unknown";
|
|
25886
25977
|
throw new CliError(`Gem compile ${hostedJobId} ${status}.`, {
|
|
25887
25978
|
errorCode: `gem_build_${status}`
|
|
25888
25979
|
});
|
|
@@ -25906,7 +25997,7 @@ function emitGemHostedJobSync(ctx, job) {
|
|
|
25906
25997
|
writeJson(ctx.io, job);
|
|
25907
25998
|
return;
|
|
25908
25999
|
}
|
|
25909
|
-
const hostedJobId = stringField(job, ["hosted_job_id"]);
|
|
26000
|
+
const hostedJobId = stringField(job, ["hosted_job_id", "hostedJobId"]);
|
|
25910
26001
|
const status = typeof job["status"] === "string" ? job["status"] : "";
|
|
25911
26002
|
if (hostedJobId === undefined) {
|
|
25912
26003
|
writeText(ctx.io, JSON.stringify(job, null, 2));
|
|
@@ -27097,7 +27188,16 @@ function adaptRegistryFamilyParams(params) {
|
|
|
27097
27188
|
}
|
|
27098
27189
|
return adapted;
|
|
27099
27190
|
}
|
|
27191
|
+
var REGISTRY_FAMILY_SNAKE_CASE_ALIASES = new Set([
|
|
27192
|
+
"automation_id",
|
|
27193
|
+
"dataset_ids",
|
|
27194
|
+
"item_id",
|
|
27195
|
+
"max_results"
|
|
27196
|
+
]);
|
|
27100
27197
|
function canonicalCliFieldToToolProtocol(key) {
|
|
27198
|
+
if (REGISTRY_FAMILY_SNAKE_CASE_ALIASES.has(key)) {
|
|
27199
|
+
return key;
|
|
27200
|
+
}
|
|
27101
27201
|
if (!/^[a-z][A-Za-z0-9]*$/u.test(key)) {
|
|
27102
27202
|
throw new CliError(`--params-json field ${JSON.stringify(key)} is not canonical camelCase. Registry-family commands accept canonical CLI fields and adapt them at the tool-protocol boundary.`);
|
|
27103
27203
|
}
|
|
@@ -27766,6 +27866,9 @@ async function dispatchAutomationRuns(ctx, sub, args) {
|
|
|
27766
27866
|
if (params["automation_id"] === undefined && flags.positionals[0] !== undefined) {
|
|
27767
27867
|
params["automation_id"] = flags.positionals[0];
|
|
27768
27868
|
}
|
|
27869
|
+
if (params["automation_id"] === undefined) {
|
|
27870
|
+
throw new CliError("Usage: uru automations runs ls <automation-id> [--scope personal|workspace] [--limit 100]. automation_id is required.");
|
|
27871
|
+
}
|
|
27769
27872
|
await emitTool(ctx, "automation.runs_list", params, {
|
|
27770
27873
|
textExtractor: formatAutomationRunList
|
|
27771
27874
|
});
|
|
@@ -28059,7 +28162,8 @@ async function dispatchTokens(ctx, sub, args, linkedProject) {
|
|
|
28059
28162
|
params["scopes"] = scopes;
|
|
28060
28163
|
}
|
|
28061
28164
|
await emitTool(ctx, "token.create", params, {
|
|
28062
|
-
textExtractor: extractCreatedToken
|
|
28165
|
+
textExtractor: extractCreatedToken,
|
|
28166
|
+
...ctx.json ? { transform: formatCreatedTokenJson } : {}
|
|
28063
28167
|
});
|
|
28064
28168
|
return;
|
|
28065
28169
|
}
|
|
@@ -28393,6 +28497,39 @@ function extractCreatedToken(value) {
|
|
|
28393
28497
|
const payload = delegatedPayload(value);
|
|
28394
28498
|
return isJsonObject2(payload) && typeof payload["token"] === "string" ? payload["token"] : undefined;
|
|
28395
28499
|
}
|
|
28500
|
+
function formatCreatedTokenJson(value) {
|
|
28501
|
+
const payload = delegatedPayload(value);
|
|
28502
|
+
if (!isJsonObject2(payload)) {
|
|
28503
|
+
return value;
|
|
28504
|
+
}
|
|
28505
|
+
const metadata = isJsonObject2(payload["token_metadata"]) ? payload["token_metadata"] : isJsonObject2(payload["tokenMetadata"]) ? payload["tokenMetadata"] : undefined;
|
|
28506
|
+
const token = typeof payload["token"] === "string" ? payload["token"] : undefined;
|
|
28507
|
+
const formatted = {};
|
|
28508
|
+
const id = metadata === undefined ? undefined : stringField(metadata, ["id"]);
|
|
28509
|
+
if (id !== undefined) {
|
|
28510
|
+
formatted["id"] = id;
|
|
28511
|
+
}
|
|
28512
|
+
if (token !== undefined) {
|
|
28513
|
+
formatted["token"] = token;
|
|
28514
|
+
}
|
|
28515
|
+
const keyPrefix = metadata === undefined ? undefined : stringField(metadata, ["key_prefix", "keyPrefix"]);
|
|
28516
|
+
if (keyPrefix !== undefined) {
|
|
28517
|
+
formatted["key_prefix"] = keyPrefix;
|
|
28518
|
+
}
|
|
28519
|
+
const expiresAt = metadata === undefined ? undefined : stringField(metadata, ["expires_at", "expiresAt"]);
|
|
28520
|
+
if (expiresAt !== undefined) {
|
|
28521
|
+
formatted["expires_at"] = expiresAt;
|
|
28522
|
+
}
|
|
28523
|
+
const gemId = metadata === undefined ? undefined : stringField(metadata, ["gem_id", "artifact_id", "gemId", "artifactId"]);
|
|
28524
|
+
if (gemId !== undefined) {
|
|
28525
|
+
formatted["gem_id"] = gemId;
|
|
28526
|
+
}
|
|
28527
|
+
const name = metadata === undefined ? undefined : stringField(metadata, ["name"]);
|
|
28528
|
+
if (name !== undefined) {
|
|
28529
|
+
formatted["name"] = name;
|
|
28530
|
+
}
|
|
28531
|
+
return Object.keys(formatted).length > 0 ? formatted : payload;
|
|
28532
|
+
}
|
|
28396
28533
|
function formatTokenList(value) {
|
|
28397
28534
|
const payload = delegatedPayload(value);
|
|
28398
28535
|
if (!isJsonObject2(payload) || !Array.isArray(payload["tokens"])) {
|