omnara 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +248 -80
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -971,6 +971,9 @@ var client = createClient(createConfig({ throwOnError: true }));
|
|
|
971
971
|
|
|
972
972
|
// ../sdk/src/generated/zod.gen.ts
|
|
973
973
|
import * as z from "zod";
|
|
974
|
+
var zResourceName = z.string().min(1).refine((value) => Array.from(value).length <= 64, { message: "Resource name cannot exceed 64 Unicode characters" }).transform((value) => value.normalize("NFC")).refine((value) => Array.from(value).length <= 64, { message: "Resource name cannot exceed 64 Unicode characters" }).refine((value) => !new RegExp("^\\p{White_Space}|\\p{White_Space}$", "u").test(value), { message: "Resource name must not start or end with whitespace" }).refine((value) => !/[\p{Cc}\p{Cf}\p{Cs}\p{Default_Ignorable_Code_Point}⠀]/u.test(value), { message: "Resource name contains an unsupported invisible, control, or format character" }).refine((value) => !value.includes("\uFFFD"), { message: "Resource name contains the Unicode replacement character" }).refine((value) => !Array.from(value).some((character) => character !== " " && new RegExp("\\p{White_Space}", "u").test(character)), { message: "Resource name may only use ordinary spaces" });
|
|
975
|
+
var zAgentName = z.string().refine((value) => Array.from(value).length <= 64, { message: "Resource name cannot exceed 64 Unicode characters" }).transform((value) => value.normalize("NFC")).refine((value) => Array.from(value).length <= 64, { message: "Resource name cannot exceed 64 Unicode characters" }).refine((value) => !new RegExp("^\\p{White_Space}|\\p{White_Space}$", "u").test(value), { message: "Resource name must not start or end with whitespace" }).refine((value) => !/[\p{Cc}\p{Cf}\p{Cs}\p{Default_Ignorable_Code_Point}⠀]/u.test(value), { message: "Resource name contains an unsupported invisible, control, or format character" }).refine((value) => !value.includes("\uFFFD"), { message: "Resource name contains the Unicode replacement character" }).refine((value) => !Array.from(value).some((character) => character !== " " && new RegExp("\\p{White_Space}", "u").test(character)), { message: "Resource name may only use ordinary spaces" });
|
|
976
|
+
var zSkillName = z.string().min(1).max(64).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
|
|
974
977
|
var zResourceListSort = z.enum([
|
|
975
978
|
"name",
|
|
976
979
|
"-name",
|
|
@@ -1098,7 +1101,7 @@ var zModelCatalog = z.object({
|
|
|
1098
1101
|
error: z.string().optional()
|
|
1099
1102
|
});
|
|
1100
1103
|
var zCreateConfiguredModelRequest = z.object({
|
|
1101
|
-
name:
|
|
1104
|
+
name: zResourceName,
|
|
1102
1105
|
provider_model_slug: z.string().min(1),
|
|
1103
1106
|
context_window_tokens: z.int().gte(2).lte(2147483647),
|
|
1104
1107
|
max_output_tokens: z.int().gte(1).lte(2147483647).optional(),
|
|
@@ -1113,7 +1116,7 @@ var zCreateConfiguredModelRequest = z.object({
|
|
|
1113
1116
|
api_variant_options: zModelApiVariantOptions.optional()
|
|
1114
1117
|
});
|
|
1115
1118
|
var zUpdateConfiguredModelRequest = z.object({
|
|
1116
|
-
name:
|
|
1119
|
+
name: zResourceName.optional(),
|
|
1117
1120
|
provider_model_slug: z.string().min(1).optional(),
|
|
1118
1121
|
context_window_tokens: z.int().gte(2).lte(2147483647).optional(),
|
|
1119
1122
|
max_output_tokens: z.int().gte(1).lte(2147483647).optional(),
|
|
@@ -1162,7 +1165,7 @@ var zSkillRevisionId = z.string().regex(/^skr_[a-z2-7]{26}$/);
|
|
|
1162
1165
|
var zSkillGrantId = z.string().regex(/^skg_[a-z2-7]{26}$/);
|
|
1163
1166
|
var zSecretId = z.string().regex(/^sec_[a-z2-7]{26}$/);
|
|
1164
1167
|
var zCreateModelProviderConfigRequest = z.object({
|
|
1165
|
-
name:
|
|
1168
|
+
name: zResourceName,
|
|
1166
1169
|
preset: z.enum([
|
|
1167
1170
|
"openai",
|
|
1168
1171
|
"openrouter",
|
|
@@ -1200,7 +1203,7 @@ var zModelProviderConfig = z.object({
|
|
|
1200
1203
|
id: zModelProviderConfigId,
|
|
1201
1204
|
org_id: zOrganizationId,
|
|
1202
1205
|
management_kind: zManagementKind,
|
|
1203
|
-
name:
|
|
1206
|
+
name: zResourceName,
|
|
1204
1207
|
api_format: zModelApiFormat,
|
|
1205
1208
|
api_variant: zModelProviderApiVariantResponse,
|
|
1206
1209
|
base_url: z.string(),
|
|
@@ -1227,7 +1230,7 @@ var zConfiguredModel = z.object({
|
|
|
1227
1230
|
org_id: zOrganizationId,
|
|
1228
1231
|
model_provider_config_id: zModelProviderConfigId,
|
|
1229
1232
|
management_kind: zManagementKind,
|
|
1230
|
-
name:
|
|
1233
|
+
name: zResourceName,
|
|
1231
1234
|
current_revision_id: zConfiguredModelRevisionId,
|
|
1232
1235
|
provider_model_slug: z.string(),
|
|
1233
1236
|
context_window_tokens: z.int(),
|
|
@@ -1274,8 +1277,8 @@ var zConfiguredModelSummary = z.object({
|
|
|
1274
1277
|
id: zConfiguredModelId,
|
|
1275
1278
|
org_id: zOrganizationId,
|
|
1276
1279
|
model_provider_config_id: zModelProviderConfigId,
|
|
1277
|
-
name:
|
|
1278
|
-
provider_config:
|
|
1280
|
+
name: zResourceName,
|
|
1281
|
+
provider_config: zResourceName,
|
|
1279
1282
|
created_at: zTimestamp,
|
|
1280
1283
|
updated_at: zTimestamp
|
|
1281
1284
|
});
|
|
@@ -1326,7 +1329,7 @@ var zSkill = z.object({
|
|
|
1326
1329
|
id: zSkillId,
|
|
1327
1330
|
org_id: zOrganizationId,
|
|
1328
1331
|
owner: zSkillOwner,
|
|
1329
|
-
name:
|
|
1332
|
+
name: zSkillName,
|
|
1330
1333
|
revision_id: zSkillRevisionId,
|
|
1331
1334
|
revision: z.int().gte(1).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1332
1335
|
description: z.string(),
|
|
@@ -1465,8 +1468,8 @@ var zToolCatalog = z.object({
|
|
|
1465
1468
|
mcp_tool_permissions: zToolPermissionProfile
|
|
1466
1469
|
});
|
|
1467
1470
|
var zAgentConfigModel = z.object({
|
|
1468
|
-
provider_config:
|
|
1469
|
-
name:
|
|
1471
|
+
provider_config: zResourceName,
|
|
1472
|
+
name: zResourceName,
|
|
1470
1473
|
provider_model_slug: z.string(),
|
|
1471
1474
|
configured_model_id: zConfiguredModelId,
|
|
1472
1475
|
current_revision_id: zConfiguredModelRevisionId,
|
|
@@ -1497,7 +1500,7 @@ var zAgentConfig = z.object({
|
|
|
1497
1500
|
created_at: zTimestamp
|
|
1498
1501
|
});
|
|
1499
1502
|
var zCreateAgentProfileRequest = z.object({
|
|
1500
|
-
name:
|
|
1503
|
+
name: zResourceName,
|
|
1501
1504
|
config: zAgentConfigId
|
|
1502
1505
|
});
|
|
1503
1506
|
var zUpdateAgentProfileRequest = z.object({
|
|
@@ -1505,13 +1508,13 @@ var zUpdateAgentProfileRequest = z.object({
|
|
|
1505
1508
|
expected_current_config_id: zAgentConfigId
|
|
1506
1509
|
});
|
|
1507
1510
|
var zRenameAgentProfileRequest = z.object({
|
|
1508
|
-
name:
|
|
1511
|
+
name: zResourceName
|
|
1509
1512
|
});
|
|
1510
1513
|
var zAgentProfile = z.object({
|
|
1511
1514
|
id: zAgentProfileId,
|
|
1512
1515
|
org_id: zOrganizationId,
|
|
1513
1516
|
project_id: zProjectId,
|
|
1514
|
-
name:
|
|
1517
|
+
name: zResourceName,
|
|
1515
1518
|
current_config_id: zAgentConfigId,
|
|
1516
1519
|
current_generation: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
1517
1520
|
current_config: zAgentConfig,
|
|
@@ -1543,7 +1546,7 @@ var zCronTriggerFailureReport = z.object({
|
|
|
1543
1546
|
failed_at: zTimestamp
|
|
1544
1547
|
});
|
|
1545
1548
|
var zCreateCronTriggerRequest = z.object({
|
|
1546
|
-
name:
|
|
1549
|
+
name: zResourceName,
|
|
1547
1550
|
target: zCronTriggerTarget,
|
|
1548
1551
|
cron: zCronExpression,
|
|
1549
1552
|
timezone: zCronTimezone.optional(),
|
|
@@ -1551,7 +1554,7 @@ var zCreateCronTriggerRequest = z.object({
|
|
|
1551
1554
|
enabled: z.boolean().optional().default(true)
|
|
1552
1555
|
});
|
|
1553
1556
|
var zUpdateCronTriggerRequest = z.object({
|
|
1554
|
-
name:
|
|
1557
|
+
name: zResourceName.optional(),
|
|
1555
1558
|
cron: zCronExpression.optional(),
|
|
1556
1559
|
timezone: zCronTimezone.optional(),
|
|
1557
1560
|
message_template: zCronMessageTemplate.optional(),
|
|
@@ -1561,7 +1564,7 @@ var zCronTrigger = z.object({
|
|
|
1561
1564
|
id: zCronTriggerId,
|
|
1562
1565
|
org_id: zOrganizationId,
|
|
1563
1566
|
project_id: zProjectId,
|
|
1564
|
-
name:
|
|
1567
|
+
name: zResourceName,
|
|
1565
1568
|
target: zCronTriggerTarget,
|
|
1566
1569
|
cron: zCronExpression,
|
|
1567
1570
|
timezone: zCronTimezone,
|
|
@@ -1580,12 +1583,12 @@ var zListCronTriggersResponse = z.object({
|
|
|
1580
1583
|
var zCreateAgentRequest = z.object({
|
|
1581
1584
|
profile: zAgentProfileId.optional(),
|
|
1582
1585
|
config: zAgentConfigId,
|
|
1583
|
-
name:
|
|
1586
|
+
name: zAgentName.optional(),
|
|
1584
1587
|
message: z.string().optional()
|
|
1585
1588
|
});
|
|
1586
1589
|
var zAgentModel = z.object({
|
|
1587
|
-
provider_config:
|
|
1588
|
-
name:
|
|
1590
|
+
provider_config: zResourceName,
|
|
1591
|
+
name: zResourceName
|
|
1589
1592
|
});
|
|
1590
1593
|
var zIntegrationTarget = z.object({
|
|
1591
1594
|
provider: z.string(),
|
|
@@ -1600,7 +1603,7 @@ var zAgent = z.object({
|
|
|
1600
1603
|
project_id: zProjectId,
|
|
1601
1604
|
agent_profile_id: zAgentProfileId.optional(),
|
|
1602
1605
|
state: z.enum(["active", "archived"]),
|
|
1603
|
-
name:
|
|
1606
|
+
name: zAgentName,
|
|
1604
1607
|
integration_target: zIntegrationTarget.optional(),
|
|
1605
1608
|
current_config_id: zAgentConfigId.optional(),
|
|
1606
1609
|
model: zAgentModel.optional(),
|
|
@@ -2174,7 +2177,7 @@ var zSecretOwnerInput = z.discriminatedUnion("kind", [
|
|
|
2174
2177
|
var zMcpoAuthStartRequest = z.object({
|
|
2175
2178
|
owner: zSecretOwnerInput,
|
|
2176
2179
|
mcp_url: z.string().min(1),
|
|
2177
|
-
name:
|
|
2180
|
+
name: zResourceName,
|
|
2178
2181
|
return_to: z.string().optional(),
|
|
2179
2182
|
client_id: z.string().optional(),
|
|
2180
2183
|
client_secret: z.string().optional(),
|
|
@@ -2233,12 +2236,12 @@ var zSecretMaterial = z.discriminatedUnion("kind", [
|
|
|
2233
2236
|
]);
|
|
2234
2237
|
var zCreateSecretRequest = z.object({
|
|
2235
2238
|
owner: zSecretOwnerInput,
|
|
2236
|
-
name:
|
|
2239
|
+
name: zResourceName,
|
|
2237
2240
|
metadata: zMetadata.optional(),
|
|
2238
2241
|
material: zSecretMaterial
|
|
2239
2242
|
});
|
|
2240
2243
|
var zUpdateSecretRequest = z.object({
|
|
2241
|
-
name:
|
|
2244
|
+
name: zResourceName.optional(),
|
|
2242
2245
|
metadata: zMetadata.optional()
|
|
2243
2246
|
});
|
|
2244
2247
|
var zSecretVersionRequest = z.object({
|
|
@@ -2258,7 +2261,7 @@ var zSecret = z.object({
|
|
|
2258
2261
|
org_id: zOrganizationId,
|
|
2259
2262
|
management_kind: zManagementKind,
|
|
2260
2263
|
owner: zSecretOwner,
|
|
2261
|
-
name:
|
|
2264
|
+
name: zResourceName,
|
|
2262
2265
|
kind: zSecretKind,
|
|
2263
2266
|
metadata: zMetadata,
|
|
2264
2267
|
current_version_number: z.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
|
|
@@ -2299,11 +2302,11 @@ var zSecretGrant = z.object({
|
|
|
2299
2302
|
created_at: zTimestamp
|
|
2300
2303
|
});
|
|
2301
2304
|
var zCreateOrganizationRequest = z.object({
|
|
2302
|
-
name:
|
|
2305
|
+
name: zResourceName
|
|
2303
2306
|
});
|
|
2304
2307
|
var zOrganization = z.object({
|
|
2305
2308
|
id: zOrganizationId,
|
|
2306
|
-
name:
|
|
2309
|
+
name: zResourceName,
|
|
2307
2310
|
created_at: zTimestamp,
|
|
2308
2311
|
updated_at: zTimestamp
|
|
2309
2312
|
});
|
|
@@ -2316,7 +2319,7 @@ var zOrganizationMembership = z.object({
|
|
|
2316
2319
|
var zOrgInvitation = z.object({
|
|
2317
2320
|
id: zOrgInvitationId,
|
|
2318
2321
|
org_id: zOrganizationId,
|
|
2319
|
-
org_name:
|
|
2322
|
+
org_name: zResourceName,
|
|
2320
2323
|
email: z.email(),
|
|
2321
2324
|
org_role: z.string(),
|
|
2322
2325
|
created_at: zTimestamp
|
|
@@ -2330,12 +2333,12 @@ var zCreateOrgInvitationRequest = z.object({
|
|
|
2330
2333
|
role: z.string()
|
|
2331
2334
|
});
|
|
2332
2335
|
var zCreatePersonalAccessTokenRequest = z.object({
|
|
2333
|
-
name:
|
|
2336
|
+
name: zResourceName
|
|
2334
2337
|
});
|
|
2335
2338
|
var zPersonalAccessToken = z.object({
|
|
2336
2339
|
id: zPersonalAccessTokenId,
|
|
2337
2340
|
user_id: zUserId,
|
|
2338
|
-
name:
|
|
2341
|
+
name: zResourceName,
|
|
2339
2342
|
token_id: z.string(),
|
|
2340
2343
|
created_at: zTimestamp,
|
|
2341
2344
|
last_used_at: zTimestamp.nullable(),
|
|
@@ -2349,7 +2352,7 @@ var zOrgApiKeyRole = z.enum(["admin", "member"]);
|
|
|
2349
2352
|
var zOrgApiKey = z.object({
|
|
2350
2353
|
id: zOrgApiKeyId,
|
|
2351
2354
|
org_id: zOrganizationId,
|
|
2352
|
-
name:
|
|
2355
|
+
name: zResourceName,
|
|
2353
2356
|
token_id: z.string(),
|
|
2354
2357
|
org_role: z.string(),
|
|
2355
2358
|
created_by_user_id: zUserId,
|
|
@@ -2359,7 +2362,7 @@ var zOrgApiKey = z.object({
|
|
|
2359
2362
|
revoked_at: zTimestamp.nullable()
|
|
2360
2363
|
});
|
|
2361
2364
|
var zCreateOrgApiKeyRequest = z.object({
|
|
2362
|
-
name:
|
|
2365
|
+
name: zResourceName,
|
|
2363
2366
|
org_role: zOrgApiKeyRole
|
|
2364
2367
|
});
|
|
2365
2368
|
var zCreateOrgApiKeyResponse = z.object({
|
|
@@ -2367,7 +2370,7 @@ var zCreateOrgApiKeyResponse = z.object({
|
|
|
2367
2370
|
api_key: zOrgApiKey
|
|
2368
2371
|
});
|
|
2369
2372
|
var zUpdateOrgApiKeyRequest = z.object({
|
|
2370
|
-
name:
|
|
2373
|
+
name: zResourceName.optional(),
|
|
2371
2374
|
org_role: zOrgApiKeyRole.optional()
|
|
2372
2375
|
});
|
|
2373
2376
|
var zListOrgApiKeysResponse = z.object({
|
|
@@ -2386,7 +2389,7 @@ var zArtifact = z.object({
|
|
|
2386
2389
|
created_at: zTimestamp
|
|
2387
2390
|
});
|
|
2388
2391
|
var zCreateMachinePoolRequestBase = z.object({
|
|
2389
|
-
name:
|
|
2392
|
+
name: zResourceName,
|
|
2390
2393
|
description: z.string().optional(),
|
|
2391
2394
|
provider: z.string().min(1),
|
|
2392
2395
|
default_machine_cpu: z.int().gte(1).lte(2147483647).optional(),
|
|
@@ -2405,6 +2408,7 @@ var zCreateMachinePoolRequestBase = z.object({
|
|
|
2405
2408
|
min_machine_memory_mb: z.int().gte(0).lte(2147483647).optional(),
|
|
2406
2409
|
max_machine_cpu: z.int().gte(1).lte(2147483647).optional(),
|
|
2407
2410
|
max_machine_memory_mb: z.int().gte(1).lte(2147483647).optional(),
|
|
2411
|
+
delete_after_idle_minutes: z.int().gte(5).lte(2147483647).optional(),
|
|
2408
2412
|
metadata: zMachineMetadata.optional()
|
|
2409
2413
|
});
|
|
2410
2414
|
var zCreateMachinePoolRequest = zCreateMachinePoolRequestBase.and(z.union([
|
|
@@ -2432,7 +2436,7 @@ var zCreateMachinePoolRequest = zCreateMachinePoolRequestBase.and(z.union([
|
|
|
2432
2436
|
})
|
|
2433
2437
|
]));
|
|
2434
2438
|
var zUpdateMachinePoolRequest = z.object({
|
|
2435
|
-
name:
|
|
2439
|
+
name: zResourceName.optional(),
|
|
2436
2440
|
description: z.string().optional(),
|
|
2437
2441
|
default_machine_cpu: z.int().gte(1).lte(2147483647).nullish(),
|
|
2438
2442
|
default_machine_memory_mb: z.int().gte(1).lte(2147483647).nullish(),
|
|
@@ -2450,6 +2454,7 @@ var zUpdateMachinePoolRequest = z.object({
|
|
|
2450
2454
|
min_machine_memory_mb: z.int().gte(0).lte(2147483647).nullish(),
|
|
2451
2455
|
max_machine_cpu: z.int().gte(1).lte(2147483647).nullish(),
|
|
2452
2456
|
max_machine_memory_mb: z.int().gte(1).lte(2147483647).nullish(),
|
|
2457
|
+
delete_after_idle_minutes: z.int().gte(5).lte(2147483647).nullish(),
|
|
2453
2458
|
metadata: zMachineMetadata.optional()
|
|
2454
2459
|
});
|
|
2455
2460
|
var zMachinePoolUsage = z.object({
|
|
@@ -2460,7 +2465,7 @@ var zMachinePoolUsage = z.object({
|
|
|
2460
2465
|
var zMachinePool = z.object({
|
|
2461
2466
|
id: zMachinePoolId,
|
|
2462
2467
|
org_id: zOrganizationId,
|
|
2463
|
-
name:
|
|
2468
|
+
name: zResourceName,
|
|
2464
2469
|
management_kind: zManagementKind,
|
|
2465
2470
|
description: z.string(),
|
|
2466
2471
|
provider: z.string(),
|
|
@@ -2480,6 +2485,7 @@ var zMachinePool = z.object({
|
|
|
2480
2485
|
min_machine_memory_mb: z.int().gte(0).lte(2147483647).nullable(),
|
|
2481
2486
|
max_machine_cpu: z.int().gte(1).lte(2147483647).nullable(),
|
|
2482
2487
|
max_machine_memory_mb: z.int().gte(1).lte(2147483647).nullable(),
|
|
2488
|
+
delete_after_idle_minutes: z.int().gte(5).lte(2147483647).nullable(),
|
|
2483
2489
|
metadata: zMetadata,
|
|
2484
2490
|
created_at: zTimestamp,
|
|
2485
2491
|
updated_at: zTimestamp,
|
|
@@ -2510,7 +2516,7 @@ var zMachine = z.object({
|
|
|
2510
2516
|
org_id: zOrganizationId,
|
|
2511
2517
|
source_kind: zMachineSourceKind,
|
|
2512
2518
|
machine_pool_id: zMachinePoolId.nullish(),
|
|
2513
|
-
display_name:
|
|
2519
|
+
display_name: zResourceName,
|
|
2514
2520
|
description: z.string(),
|
|
2515
2521
|
provider: z.string(),
|
|
2516
2522
|
lifecycle_state: zMachineLifecycleState,
|
|
@@ -2532,7 +2538,7 @@ var zMachine = z.object({
|
|
|
2532
2538
|
updated_at: zTimestamp
|
|
2533
2539
|
});
|
|
2534
2540
|
var zCreateMachineRequest = z.object({
|
|
2535
|
-
display_name:
|
|
2541
|
+
display_name: zResourceName,
|
|
2536
2542
|
description: z.string().optional(),
|
|
2537
2543
|
cwd: z.string().optional(),
|
|
2538
2544
|
env: z.record(z.string(), z.string()).optional(),
|
|
@@ -2540,7 +2546,7 @@ var zCreateMachineRequest = z.object({
|
|
|
2540
2546
|
metadata: zMachineMetadata.optional()
|
|
2541
2547
|
});
|
|
2542
2548
|
var zConnectByoMachineRequest = z.object({
|
|
2543
|
-
display_name:
|
|
2549
|
+
display_name: zResourceName,
|
|
2544
2550
|
project_ids: z.array(zProjectId).max(100)
|
|
2545
2551
|
});
|
|
2546
2552
|
var zUpdateMachineRequest = z.object({
|
|
@@ -2552,7 +2558,7 @@ var zMachineSummaryFields = z.object({
|
|
|
2552
2558
|
id: zMachineId,
|
|
2553
2559
|
org_id: zOrganizationId,
|
|
2554
2560
|
source_kind: zMachineSourceKind,
|
|
2555
|
-
display_name:
|
|
2561
|
+
display_name: zResourceName,
|
|
2556
2562
|
description: z.string(),
|
|
2557
2563
|
provider: z.string(),
|
|
2558
2564
|
lifecycle_state: zMachineLifecycleState,
|
|
@@ -2628,6 +2634,10 @@ var zProjectMachinePoolGrant = z.object({
|
|
|
2628
2634
|
min_machine_memory_mb: z.int().gte(0).lte(2147483647).nullable(),
|
|
2629
2635
|
max_machine_cpu: z.int().gte(1).lte(2147483647).nullable(),
|
|
2630
2636
|
max_machine_memory_mb: z.int().gte(1).lte(2147483647).nullable(),
|
|
2637
|
+
delete_after_idle_minutes: z.union([
|
|
2638
|
+
z.literal(0),
|
|
2639
|
+
z.int().gte(5).lte(2147483647)
|
|
2640
|
+
]).nullable(),
|
|
2631
2641
|
metadata: zMetadata,
|
|
2632
2642
|
created_at: zTimestamp,
|
|
2633
2643
|
updated_at: zTimestamp
|
|
@@ -2648,6 +2658,10 @@ var zCreateProjectMachinePoolGrantRequest = z.object({
|
|
|
2648
2658
|
min_machine_memory_mb: z.int().gte(0).lte(2147483647).optional(),
|
|
2649
2659
|
max_machine_cpu: z.int().gte(1).lte(2147483647).optional(),
|
|
2650
2660
|
max_machine_memory_mb: z.int().gte(1).lte(2147483647).optional(),
|
|
2661
|
+
delete_after_idle_minutes: z.union([
|
|
2662
|
+
z.literal(0),
|
|
2663
|
+
z.int().gte(5).lte(2147483647)
|
|
2664
|
+
]).optional(),
|
|
2651
2665
|
metadata: zMetadata.optional()
|
|
2652
2666
|
});
|
|
2653
2667
|
var zUpdateProjectMachinePoolGrantRequest = z.object({
|
|
@@ -2665,12 +2679,16 @@ var zUpdateProjectMachinePoolGrantRequest = z.object({
|
|
|
2665
2679
|
min_machine_memory_mb: z.int().gte(0).lte(2147483647).nullish(),
|
|
2666
2680
|
max_machine_cpu: z.int().gte(1).lte(2147483647).nullish(),
|
|
2667
2681
|
max_machine_memory_mb: z.int().gte(1).lte(2147483647).nullish(),
|
|
2682
|
+
delete_after_idle_minutes: z.union([
|
|
2683
|
+
z.literal(0),
|
|
2684
|
+
z.int().gte(5).lte(2147483647)
|
|
2685
|
+
]).nullish(),
|
|
2668
2686
|
metadata: zMetadata.optional()
|
|
2669
2687
|
});
|
|
2670
2688
|
var zMachinePoolSummary = z.object({
|
|
2671
2689
|
id: zMachinePoolId,
|
|
2672
2690
|
org_id: zOrganizationId,
|
|
2673
|
-
name:
|
|
2691
|
+
name: zResourceName,
|
|
2674
2692
|
management_kind: zManagementKind,
|
|
2675
2693
|
description: z.string(),
|
|
2676
2694
|
provider: z.string(),
|
|
@@ -2686,14 +2704,14 @@ var zListProjectMachinePoolGrantsResponse = z.object({
|
|
|
2686
2704
|
next_cursor: z.string().nullable()
|
|
2687
2705
|
});
|
|
2688
2706
|
var zCreateMachineDaemonTokenRequest = z.object({
|
|
2689
|
-
name:
|
|
2707
|
+
name: zResourceName.optional(),
|
|
2690
2708
|
metadata: zMetadata.optional()
|
|
2691
2709
|
});
|
|
2692
2710
|
var zMachineDaemonToken = z.object({
|
|
2693
2711
|
id: zMachineDaemonTokenId,
|
|
2694
2712
|
org_id: zOrganizationId,
|
|
2695
2713
|
machine_id: zMachineId,
|
|
2696
|
-
name:
|
|
2714
|
+
name: zResourceName,
|
|
2697
2715
|
metadata: zMetadata,
|
|
2698
2716
|
created_at: zTimestamp,
|
|
2699
2717
|
last_used_at: zTimestamp.nullable(),
|
|
@@ -2803,12 +2821,12 @@ var zBootstrapDaemonResponse = z.object({
|
|
|
2803
2821
|
machine_id: zMachineId
|
|
2804
2822
|
});
|
|
2805
2823
|
var zCreateProjectRequest = z.object({
|
|
2806
|
-
name:
|
|
2824
|
+
name: zResourceName
|
|
2807
2825
|
});
|
|
2808
2826
|
var zProjectFields = z.object({
|
|
2809
2827
|
id: zProjectId,
|
|
2810
2828
|
org_id: zOrganizationId,
|
|
2811
|
-
name:
|
|
2829
|
+
name: zResourceName,
|
|
2812
2830
|
created_at: zTimestamp,
|
|
2813
2831
|
updated_at: zTimestamp
|
|
2814
2832
|
});
|
|
@@ -2859,7 +2877,7 @@ var zCurrentUserIdentity = z.object({
|
|
|
2859
2877
|
});
|
|
2860
2878
|
var zCurrentUserOrg = z.object({
|
|
2861
2879
|
id: zOrganizationId,
|
|
2862
|
-
name:
|
|
2880
|
+
name: zResourceName,
|
|
2863
2881
|
role: z.string(),
|
|
2864
2882
|
created_at: zTimestamp
|
|
2865
2883
|
});
|
|
@@ -2890,7 +2908,7 @@ var zSetProjectMembershipRequest = z.object({
|
|
|
2890
2908
|
});
|
|
2891
2909
|
var zProjectMembershipGrant = z.object({
|
|
2892
2910
|
project_id: zProjectId,
|
|
2893
|
-
project_name:
|
|
2911
|
+
project_name: zResourceName,
|
|
2894
2912
|
role: z.string(),
|
|
2895
2913
|
created_at: zTimestamp
|
|
2896
2914
|
});
|
|
@@ -3274,7 +3292,6 @@ var zListAgentProfilesQuery = z.object({
|
|
|
3274
3292
|
cursor: z.string().max(1024).optional()
|
|
3275
3293
|
});
|
|
3276
3294
|
var zListAgentProfilesResponse2 = zListAgentProfilesResponse;
|
|
3277
|
-
var zCreateAgentProfileBody = zCreateAgentProfileRequest;
|
|
3278
3295
|
var zCreateAgentProfileHeaders = z.object({
|
|
3279
3296
|
"Idempotency-Key": z.string().min(1).max(255).optional()
|
|
3280
3297
|
});
|
|
@@ -3376,7 +3393,6 @@ var zListAgentsQuery = z.object({
|
|
|
3376
3393
|
cursor: z.string().max(1024).optional()
|
|
3377
3394
|
});
|
|
3378
3395
|
var zListAgentsResponse2 = zListAgentsResponse;
|
|
3379
|
-
var zCreateAgentBody = zCreateAgentRequest;
|
|
3380
3396
|
var zCreateAgentHeaders = z.object({
|
|
3381
3397
|
"Idempotency-Key": z.string().min(1).max(255).optional()
|
|
3382
3398
|
});
|
|
@@ -6330,6 +6346,32 @@ var ApiError = class _ApiError extends Error {
|
|
|
6330
6346
|
};
|
|
6331
6347
|
|
|
6332
6348
|
// ../sdk/src/client.ts
|
|
6349
|
+
function stripClientSelector(client2) {
|
|
6350
|
+
const strip = (dispatch) => (options) => {
|
|
6351
|
+
if (options == null || !("client" in options)) return dispatch(options);
|
|
6352
|
+
const rest = { ...options };
|
|
6353
|
+
delete rest.client;
|
|
6354
|
+
return dispatch(rest);
|
|
6355
|
+
};
|
|
6356
|
+
const methods = [
|
|
6357
|
+
"connect",
|
|
6358
|
+
"delete",
|
|
6359
|
+
"get",
|
|
6360
|
+
"head",
|
|
6361
|
+
"options",
|
|
6362
|
+
"patch",
|
|
6363
|
+
"post",
|
|
6364
|
+
"put",
|
|
6365
|
+
"request",
|
|
6366
|
+
"trace"
|
|
6367
|
+
];
|
|
6368
|
+
const wrap = (target) => {
|
|
6369
|
+
const dispatches = target;
|
|
6370
|
+
for (const method of methods) dispatches[method] &&= strip(dispatches[method]);
|
|
6371
|
+
};
|
|
6372
|
+
wrap(client2);
|
|
6373
|
+
wrap(client2.sse);
|
|
6374
|
+
}
|
|
6333
6375
|
function createOmnaraClient(options = {}) {
|
|
6334
6376
|
const client2 = createClient(
|
|
6335
6377
|
createConfig({
|
|
@@ -6352,6 +6394,7 @@ function createOmnaraClient(options = {}) {
|
|
|
6352
6394
|
if (!response.ok) throw await ApiError.fromResponse(response);
|
|
6353
6395
|
return response;
|
|
6354
6396
|
});
|
|
6397
|
+
stripClientSelector(client2);
|
|
6355
6398
|
return client2;
|
|
6356
6399
|
}
|
|
6357
6400
|
|
|
@@ -7208,7 +7251,10 @@ function registerOperation(parent, config2, spec) {
|
|
|
7208
7251
|
const base = options.body === void 0 ? {} : parseWithSchema(zBodyObject, options.body, "--body");
|
|
7209
7252
|
const body = deepMerge(base, collectFlagValues(bodyFlags, options));
|
|
7210
7253
|
const parsed = parseWithSchema(spec.body, body, "request body");
|
|
7211
|
-
input.body = spec.transformBody ? await spec.transformBody(parsed
|
|
7254
|
+
input.body = spec.transformBody ? await spec.transformBody(parsed, {
|
|
7255
|
+
client: config2.client,
|
|
7256
|
+
path: input.path ?? {}
|
|
7257
|
+
}) : parsed;
|
|
7212
7258
|
}
|
|
7213
7259
|
const data = await callOperation(spec, input);
|
|
7214
7260
|
if (options.json === true) {
|
|
@@ -7249,6 +7295,7 @@ function registerGroup(program2, config2, group) {
|
|
|
7249
7295
|
// src/login.ts
|
|
7250
7296
|
import { hostname } from "node:os";
|
|
7251
7297
|
import { intro as intro2, log as log2, note as note2, outro as outro2, spinner as spinner2 } from "@clack/prompts";
|
|
7298
|
+
import * as z7 from "zod";
|
|
7252
7299
|
|
|
7253
7300
|
// src/browser.ts
|
|
7254
7301
|
import { spawn } from "node:child_process";
|
|
@@ -7346,6 +7393,14 @@ function plainReporter2() {
|
|
|
7346
7393
|
}
|
|
7347
7394
|
};
|
|
7348
7395
|
}
|
|
7396
|
+
function loginTokenName(explicit, hostName) {
|
|
7397
|
+
const candidate = explicit ?? `Omnara CLI on ${hostName}`;
|
|
7398
|
+
const result = zResourceName.safeParse(candidate);
|
|
7399
|
+
if (result.success) return result.data;
|
|
7400
|
+
if (explicit === void 0) return "Omnara CLI";
|
|
7401
|
+
throw new CliInputError(`invalid token name:
|
|
7402
|
+
${z7.prettifyError(result.error)}`);
|
|
7403
|
+
}
|
|
7349
7404
|
function registerLoginCommand(program2, cli) {
|
|
7350
7405
|
program2.command("login").description("Log in via the browser and save an API token").option("--no-browser", "print the approval URL instead of opening a browser").option("--token-name <name>", "name for the created API token").action(async (options) => {
|
|
7351
7406
|
await runCliAction(async () => {
|
|
@@ -7354,7 +7409,7 @@ function registerLoginCommand(program2, cli) {
|
|
|
7354
7409
|
const start = await startDeviceAuth({
|
|
7355
7410
|
baseUrl: cli.baseUrl,
|
|
7356
7411
|
clientName: "Omnara CLI",
|
|
7357
|
-
tokenName: options.tokenName
|
|
7412
|
+
tokenName: loginTokenName(options.tokenName, hostname())
|
|
7358
7413
|
});
|
|
7359
7414
|
report.showCode(start.userCode, start.verificationUriComplete);
|
|
7360
7415
|
if (options.browser) {
|
|
@@ -7424,7 +7479,75 @@ function registerLoginCommand(program2, cli) {
|
|
|
7424
7479
|
}
|
|
7425
7480
|
|
|
7426
7481
|
// src/manifest.ts
|
|
7427
|
-
import * as
|
|
7482
|
+
import * as z13 from "zod";
|
|
7483
|
+
|
|
7484
|
+
// src/config-attachment.ts
|
|
7485
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
7486
|
+
import * as z8 from "zod";
|
|
7487
|
+
var zConfigSourceAttachment = z8.object({
|
|
7488
|
+
file: z8.string().min(1).optional().describe("path to an agent config file (.yaml, .yml, or .json)"),
|
|
7489
|
+
source: z8.string().min(1).optional().describe("inline agent config source (YAML or JSON)")
|
|
7490
|
+
});
|
|
7491
|
+
var zConfigAttachment = z8.object({
|
|
7492
|
+
config: zAgentConfigId.optional().describe("existing agent config ID"),
|
|
7493
|
+
...zConfigSourceAttachment.shape
|
|
7494
|
+
});
|
|
7495
|
+
var ATTACHMENT_HINT = "pass exactly one of --config, --file, or --source";
|
|
7496
|
+
var SOURCE_HINT = "pass exactly one of --file or --source";
|
|
7497
|
+
function requireExactlyOne(values, hint) {
|
|
7498
|
+
const provided = values.filter((value) => value !== void 0);
|
|
7499
|
+
if (provided.length !== 1) throw new CliInputError(hint);
|
|
7500
|
+
}
|
|
7501
|
+
function fileFormat(filePath) {
|
|
7502
|
+
const lower = filePath.toLowerCase();
|
|
7503
|
+
if (lower.endsWith(".json")) return "json";
|
|
7504
|
+
if (lower.endsWith(".yaml") || lower.endsWith(".yml")) return "yaml";
|
|
7505
|
+
throw new CliInputError(`config file must end in .yaml, .yml, or .json: ${filePath}`);
|
|
7506
|
+
}
|
|
7507
|
+
function inlineFormat(source) {
|
|
7508
|
+
try {
|
|
7509
|
+
JSON.parse(source);
|
|
7510
|
+
return "json";
|
|
7511
|
+
} catch {
|
|
7512
|
+
return "yaml";
|
|
7513
|
+
}
|
|
7514
|
+
}
|
|
7515
|
+
function renderConfigSource(attachment) {
|
|
7516
|
+
requireExactlyOne([attachment.file, attachment.source], SOURCE_HINT);
|
|
7517
|
+
if (attachment.file !== void 0) {
|
|
7518
|
+
const format = fileFormat(attachment.file);
|
|
7519
|
+
let source;
|
|
7520
|
+
try {
|
|
7521
|
+
source = readFileSync2(attachment.file, "utf8");
|
|
7522
|
+
} catch {
|
|
7523
|
+
throw new CliInputError(`could not read config file: ${attachment.file}`);
|
|
7524
|
+
}
|
|
7525
|
+
return { source, source_format: format };
|
|
7526
|
+
}
|
|
7527
|
+
if (attachment.source !== void 0) {
|
|
7528
|
+
return { source: attachment.source, source_format: inlineFormat(attachment.source) };
|
|
7529
|
+
}
|
|
7530
|
+
throw new CliInputError(SOURCE_HINT);
|
|
7531
|
+
}
|
|
7532
|
+
var zProjectScope = z8.object({
|
|
7533
|
+
orgID: z8.string().min(1),
|
|
7534
|
+
projectID: z8.string().min(1)
|
|
7535
|
+
});
|
|
7536
|
+
async function resolveConfigId(client2, path, attachment) {
|
|
7537
|
+
requireExactlyOne([attachment.config, attachment.file, attachment.source], ATTACHMENT_HINT);
|
|
7538
|
+
if (attachment.config !== void 0) return attachment.config;
|
|
7539
|
+
const { data } = await sdk_gen_exports.createAgentConfig({
|
|
7540
|
+
client: client2,
|
|
7541
|
+
path: zProjectScope.parse(path),
|
|
7542
|
+
body: renderConfigSource(attachment)
|
|
7543
|
+
});
|
|
7544
|
+
return data.id;
|
|
7545
|
+
}
|
|
7546
|
+
var zProfilePath = zProjectScope.extend({ agentProfileID: z8.string().min(1) });
|
|
7547
|
+
async function currentProfileConfigId(client2, path) {
|
|
7548
|
+
const { data } = await sdk_gen_exports.getAgentProfile({ client: client2, path: zProfilePath.parse(path) });
|
|
7549
|
+
return data.current_config_id;
|
|
7550
|
+
}
|
|
7428
7551
|
|
|
7429
7552
|
// src/format.ts
|
|
7430
7553
|
function pickFields(source, fields) {
|
|
@@ -7453,10 +7576,10 @@ function formatVoid(message = "ok") {
|
|
|
7453
7576
|
|
|
7454
7577
|
// src/mcp-add.ts
|
|
7455
7578
|
import { isMap, isScalar as isScalar2, parseDocument } from "yaml";
|
|
7456
|
-
import * as
|
|
7579
|
+
import * as z10 from "zod";
|
|
7457
7580
|
|
|
7458
7581
|
// src/mcp-oauth.ts
|
|
7459
|
-
import * as
|
|
7582
|
+
import * as z9 from "zod";
|
|
7460
7583
|
|
|
7461
7584
|
// src/poll.ts
|
|
7462
7585
|
var POLL_INTERVAL_SECONDS = 2;
|
|
@@ -7504,7 +7627,7 @@ async function authorizeMcpOAuthSecret(options) {
|
|
|
7504
7627
|
}
|
|
7505
7628
|
});
|
|
7506
7629
|
}
|
|
7507
|
-
var zBrowserFlag =
|
|
7630
|
+
var zBrowserFlag = z9.boolean().default(true).describe("open the authorization URL in a browser");
|
|
7508
7631
|
function openAuthorizationUrl(report, title, url3, browser) {
|
|
7509
7632
|
report.url(title, url3);
|
|
7510
7633
|
if (browser) {
|
|
@@ -7540,11 +7663,11 @@ async function runMcpOAuth(context) {
|
|
|
7540
7663
|
// src/mcp-add.ts
|
|
7541
7664
|
var SERVER_KEY_PATTERN = /^[a-zA-Z][a-zA-Z0-9-]{0,31}$/;
|
|
7542
7665
|
var zMcpAddBody = zMcpoAuthStartRequest.omit({ owner: true, name: true }).extend({
|
|
7543
|
-
server_name:
|
|
7666
|
+
server_name: z10.string().regex(
|
|
7544
7667
|
SERVER_KEY_PATTERN,
|
|
7545
7668
|
"must start with a letter and contain at most 32 letters, digits, or hyphens"
|
|
7546
7669
|
).describe("MCP server key used in the agent config"),
|
|
7547
|
-
secret_name:
|
|
7670
|
+
secret_name: zResourceName.optional().describe("OAuth secret name; defaults to <server-name>-mcp"),
|
|
7548
7671
|
browser: zBrowserFlag
|
|
7549
7672
|
});
|
|
7550
7673
|
function targetLabel(target) {
|
|
@@ -7553,7 +7676,7 @@ function targetLabel(target) {
|
|
|
7553
7676
|
function serverEntry(url3, secretId) {
|
|
7554
7677
|
return { url: url3, auth: { type: "oauth", secret_id: secretId } };
|
|
7555
7678
|
}
|
|
7556
|
-
var zJsonRecord =
|
|
7679
|
+
var zJsonRecord = z10.record(z10.string(), z10.json());
|
|
7557
7680
|
function prepareJsonConfig(config2, serverName, mcpUrl) {
|
|
7558
7681
|
let parsedJson;
|
|
7559
7682
|
try {
|
|
@@ -7717,13 +7840,13 @@ function runProfileMcpAdd(context) {
|
|
|
7717
7840
|
}
|
|
7718
7841
|
|
|
7719
7842
|
// src/skill-archive.ts
|
|
7720
|
-
import { readdirSync, readFileSync as
|
|
7843
|
+
import { readdirSync, readFileSync as readFileSync3, statSync } from "node:fs";
|
|
7721
7844
|
import { basename, dirname as dirname2, join as join2, resolve } from "node:path";
|
|
7722
7845
|
import * as tar from "tar";
|
|
7723
|
-
import * as
|
|
7724
|
-
var zCreateSkillCliBody =
|
|
7846
|
+
import * as z11 from "zod";
|
|
7847
|
+
var zCreateSkillCliBody = z11.object({
|
|
7725
7848
|
owner: zSkillOwnerInput,
|
|
7726
|
-
archive:
|
|
7849
|
+
archive: z11.string().min(1).describe("path to a skill directory (packed automatically) or a .zip/.tar.gz archive")
|
|
7727
7850
|
});
|
|
7728
7851
|
var ARCHIVE_SUFFIXES = [".zip", ".tar.gz", ".tgz"];
|
|
7729
7852
|
function assertPackable(dir) {
|
|
@@ -7761,20 +7884,20 @@ async function loadSkillArchive(archivePath) {
|
|
|
7761
7884
|
`archive must be a directory or a ${ARCHIVE_SUFFIXES.join("/")} file: ${archivePath}`
|
|
7762
7885
|
);
|
|
7763
7886
|
}
|
|
7764
|
-
return new File([new Uint8Array(
|
|
7887
|
+
return new File([new Uint8Array(readFileSync3(archivePath))], filename);
|
|
7765
7888
|
}
|
|
7766
7889
|
|
|
7767
7890
|
// src/slack-integration.ts
|
|
7768
|
-
import * as
|
|
7769
|
-
var zSlackBody =
|
|
7770
|
-
app_name:
|
|
7771
|
-
app_configuration_token:
|
|
7772
|
-
icon_filename:
|
|
7773
|
-
icon_data_base64:
|
|
7774
|
-
client_id:
|
|
7775
|
-
client_secret:
|
|
7776
|
-
signing_secret:
|
|
7777
|
-
return_to:
|
|
7891
|
+
import * as z12 from "zod";
|
|
7892
|
+
var zSlackBody = z12.object({
|
|
7893
|
+
app_name: z12.string().optional().describe("name for a new Slack app"),
|
|
7894
|
+
app_configuration_token: z12.string().optional().describe("Slack app configuration token for a new app"),
|
|
7895
|
+
icon_filename: z12.string().optional().describe("filename for the new Slack app icon"),
|
|
7896
|
+
icon_data_base64: z12.string().optional().describe("base64-encoded Slack app icon"),
|
|
7897
|
+
client_id: z12.string().optional().describe("existing Slack app client ID"),
|
|
7898
|
+
client_secret: z12.string().optional().describe("existing Slack app client secret"),
|
|
7899
|
+
signing_secret: z12.string().optional().describe("existing Slack app signing secret"),
|
|
7900
|
+
return_to: z12.string().optional().describe("console-relative path opened after authorization"),
|
|
7778
7901
|
browser: zBrowserFlag
|
|
7779
7902
|
});
|
|
7780
7903
|
function parseRequest(body) {
|
|
@@ -7803,7 +7926,7 @@ function parseRequest(body) {
|
|
|
7803
7926
|
if (!result2.success) {
|
|
7804
7927
|
throw new CliInputError(
|
|
7805
7928
|
`invalid existing Slack app parameters:
|
|
7806
|
-
${
|
|
7929
|
+
${z12.prettifyError(result2.error)}`
|
|
7807
7930
|
);
|
|
7808
7931
|
}
|
|
7809
7932
|
return { kind: "existing-app", body: result2.data };
|
|
@@ -7825,7 +7948,7 @@ ${z10.prettifyError(result2.error)}`
|
|
|
7825
7948
|
if (!result.success) {
|
|
7826
7949
|
throw new CliInputError(
|
|
7827
7950
|
`invalid Slack app parameters:
|
|
7828
|
-
${
|
|
7951
|
+
${z12.prettifyError(result.error)}
|
|
7829
7952
|
Pass --app-name and --app-configuration-token, or existing app credentials.`
|
|
7830
7953
|
);
|
|
7831
7954
|
}
|
|
@@ -7917,7 +8040,31 @@ var commandGroups = [
|
|
|
7917
8040
|
fn: sdk_gen_exports.createAgent,
|
|
7918
8041
|
format: formatRecord(),
|
|
7919
8042
|
path: zCreateAgentPath,
|
|
7920
|
-
body:
|
|
8043
|
+
body: zConfigAttachment.extend({
|
|
8044
|
+
profile: zAgentProfileId.optional(),
|
|
8045
|
+
name: zAgentName.optional(),
|
|
8046
|
+
message: z13.string().optional()
|
|
8047
|
+
}),
|
|
8048
|
+
transformBody: async ({ profile, name, message, ...attachment }, { client: client2, path }) => ({
|
|
8049
|
+
profile,
|
|
8050
|
+
name,
|
|
8051
|
+
message,
|
|
8052
|
+
config: await resolveConfigId(client2, path, attachment)
|
|
8053
|
+
})
|
|
8054
|
+
}),
|
|
8055
|
+
op({
|
|
8056
|
+
verb: "update",
|
|
8057
|
+
summary: "Replace a running agent's config",
|
|
8058
|
+
fn: sdk_gen_exports.updateAgentConfig,
|
|
8059
|
+
format: (response) => formatRecord()(response.agent_config),
|
|
8060
|
+
path: zUpdateAgentConfigPath,
|
|
8061
|
+
body: zConfigSourceAttachment.extend({
|
|
8062
|
+
expected_current_config_id: zAgentConfigId.optional().describe("fail unless the agent still runs this config")
|
|
8063
|
+
}),
|
|
8064
|
+
transformBody: ({ expected_current_config_id, ...attachment }) => ({
|
|
8065
|
+
...renderConfigSource(attachment),
|
|
8066
|
+
expected_current_config_id
|
|
8067
|
+
})
|
|
7921
8068
|
}),
|
|
7922
8069
|
op({
|
|
7923
8070
|
verb: "cancel",
|
|
@@ -7937,7 +8084,7 @@ var commandGroups = [
|
|
|
7937
8084
|
flowOp({
|
|
7938
8085
|
verb: "mcp-add",
|
|
7939
8086
|
summary: "Create an OAuth secret and add an MCP server to an agent",
|
|
7940
|
-
path:
|
|
8087
|
+
path: z13.object({
|
|
7941
8088
|
orgID: zOrganizationId,
|
|
7942
8089
|
projectID: zProjectId,
|
|
7943
8090
|
agentID: zAgentId
|
|
@@ -8399,7 +8546,7 @@ var commandGroups = [
|
|
|
8399
8546
|
flowOp({
|
|
8400
8547
|
verb: "mcp-oauth",
|
|
8401
8548
|
summary: "Create a secret through an MCP server OAuth flow",
|
|
8402
|
-
path:
|
|
8549
|
+
path: z13.object({ orgID: zOrganizationId }),
|
|
8403
8550
|
body: zMcpOAuthBody,
|
|
8404
8551
|
run: runMcpOAuth
|
|
8405
8552
|
})
|
|
@@ -8472,7 +8619,28 @@ var commandGroups = [
|
|
|
8472
8619
|
fn: sdk_gen_exports.createAgentProfile,
|
|
8473
8620
|
format: formatRecord(),
|
|
8474
8621
|
path: zCreateAgentProfilePath,
|
|
8475
|
-
body:
|
|
8622
|
+
body: zConfigAttachment.extend({ name: zResourceName }),
|
|
8623
|
+
transformBody: async ({ name, ...attachment }, { client: client2, path }) => ({
|
|
8624
|
+
name,
|
|
8625
|
+
config: await resolveConfigId(client2, path, attachment)
|
|
8626
|
+
})
|
|
8627
|
+
}),
|
|
8628
|
+
op({
|
|
8629
|
+
verb: "update",
|
|
8630
|
+
summary: "Point an agent profile at a new config",
|
|
8631
|
+
fn: sdk_gen_exports.updateAgentProfile,
|
|
8632
|
+
format: formatRecord(),
|
|
8633
|
+
path: zUpdateAgentProfilePath,
|
|
8634
|
+
body: zConfigAttachment.extend({
|
|
8635
|
+
expected_current_config_id: zAgentConfigId.optional().describe("fail unless the profile still points at this config")
|
|
8636
|
+
}),
|
|
8637
|
+
transformBody: async ({ expected_current_config_id, ...attachment }, { client: client2, path }) => {
|
|
8638
|
+
const expected = expected_current_config_id ?? await currentProfileConfigId(client2, path);
|
|
8639
|
+
return {
|
|
8640
|
+
config: await resolveConfigId(client2, path, attachment),
|
|
8641
|
+
expected_current_config_id: expected
|
|
8642
|
+
};
|
|
8643
|
+
}
|
|
8476
8644
|
}),
|
|
8477
8645
|
op({
|
|
8478
8646
|
verb: "rename",
|
|
@@ -8492,7 +8660,7 @@ var commandGroups = [
|
|
|
8492
8660
|
flowOp({
|
|
8493
8661
|
verb: "mcp-add",
|
|
8494
8662
|
summary: "Create an OAuth secret and add an MCP server to an agent profile",
|
|
8495
|
-
path:
|
|
8663
|
+
path: z13.object({
|
|
8496
8664
|
orgID: zOrganizationId,
|
|
8497
8665
|
projectID: zProjectId,
|
|
8498
8666
|
agentProfileID: zAgentProfileId
|
|
@@ -8504,7 +8672,7 @@ var commandGroups = [
|
|
|
8504
8672
|
verb: "slack",
|
|
8505
8673
|
aliases: ["slack-setup"],
|
|
8506
8674
|
summary: "Connect Slack to an agent profile through OAuth",
|
|
8507
|
-
path:
|
|
8675
|
+
path: z13.object({
|
|
8508
8676
|
orgID: zOrganizationId,
|
|
8509
8677
|
projectID: zProjectId,
|
|
8510
8678
|
agentProfileID: zAgentProfileId
|
package/package.json
CHANGED