@vm0/cli 9.69.0 → 9.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1887 -1337
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -45,7 +45,7 @@ if (DSN) {
45
45
  Sentry.init({
46
46
  dsn: DSN,
47
47
  environment: process.env.SENTRY_ENVIRONMENT ?? "production",
48
- release: "9.69.0",
48
+ release: "9.70.0",
49
49
  sendDefaultPii: false,
50
50
  tracesSampleRate: 0,
51
51
  shutdownTimeout: 500,
@@ -64,7 +64,7 @@ if (DSN) {
64
64
  }
65
65
  });
66
66
  Sentry.setContext("cli", {
67
- version: "9.69.0",
67
+ version: "9.70.0",
68
68
  command: process.argv.slice(2).join(" ")
69
69
  });
70
70
  Sentry.setContext("runtime", {
@@ -675,7 +675,7 @@ function getConfigPath() {
675
675
  return join2(homedir2(), ".vm0", "config.json");
676
676
  }
677
677
  var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
678
- console.log(chalk4.bold(`VM0 CLI v${"9.69.0"}`));
678
+ console.log(chalk4.bold(`VM0 CLI v${"9.70.0"}`));
679
679
  console.log();
680
680
  const config = await loadConfig();
681
681
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -867,7 +867,7 @@ var agentDefinitionSchema = z4.object({
867
867
  )
868
868
  }).optional(),
869
869
  /**
870
- * VM profile for resource allocation (e.g., "vm0/default", "vm0/browser").
870
+ * VM profile for resource allocation (e.g., "vm0/default").
871
871
  * Determines rootfs image and VM resources (vCPU, memory).
872
872
  * Defaults to "vm0/default" when omitted.
873
873
  */
@@ -892,16 +892,6 @@ var agentDefinitionSchema = z4.object({
892
892
  */
893
893
  experimental_capabilities: z4.array(z4.enum(VALID_CAPABILITIES)).refine((arr) => new Set(arr).size === arr.length, {
894
894
  message: "Duplicate capabilities are not allowed"
895
- }).optional(),
896
- /**
897
- * Agent metadata for display and personalization.
898
- * - displayName: Human-readable name shown in the UI (preserves original casing).
899
- * - sound: Communication tone (e.g., "professional", "friendly").
900
- */
901
- metadata: z4.object({
902
- displayName: z4.string().optional(),
903
- description: z4.string().optional(),
904
- sound: z4.string().optional()
905
895
  }).optional()
906
896
  });
907
897
  var agentComposeContentSchema = z4.object({
@@ -1099,37 +1089,160 @@ var composesListContract = c.router({
1099
1089
  });
1100
1090
 
1101
1091
  // ../../packages/core/src/contracts/runs.ts
1102
- import { z as z7 } from "zod";
1092
+ import { z as z8 } from "zod";
1093
+
1094
+ // ../../packages/core/src/contracts/logs.ts
1095
+ import { z as z5 } from "zod";
1096
+ var paginationSchema = z5.object({
1097
+ hasMore: z5.boolean(),
1098
+ nextCursor: z5.string().nullable(),
1099
+ totalPages: z5.number()
1100
+ });
1101
+ var listQuerySchema = z5.object({
1102
+ cursor: z5.string().optional(),
1103
+ limit: z5.coerce.number().min(1).max(100).default(20)
1104
+ });
1105
+ var c2 = initContract();
1106
+ var logStatusSchema = z5.enum([
1107
+ "queued",
1108
+ "pending",
1109
+ "running",
1110
+ "completed",
1111
+ "failed",
1112
+ "timeout",
1113
+ "cancelled"
1114
+ ]);
1115
+ var triggerSourceSchema = z5.enum([
1116
+ "schedule",
1117
+ "web",
1118
+ "slack",
1119
+ "email",
1120
+ "telegram",
1121
+ "github",
1122
+ "cli"
1123
+ ]);
1124
+ var logEntrySchema = z5.object({
1125
+ id: z5.uuid(),
1126
+ sessionId: z5.string().nullable(),
1127
+ agentName: z5.string(),
1128
+ displayName: z5.string().nullable(),
1129
+ orgSlug: z5.string().nullable(),
1130
+ framework: z5.string().nullable(),
1131
+ triggerSource: triggerSourceSchema.nullable(),
1132
+ status: logStatusSchema,
1133
+ createdAt: z5.string(),
1134
+ startedAt: z5.string().nullable(),
1135
+ completedAt: z5.string().nullable()
1136
+ });
1137
+ var logsListResponseSchema = z5.object({
1138
+ data: z5.array(logEntrySchema),
1139
+ pagination: paginationSchema
1140
+ });
1141
+ var artifactSchema = z5.object({
1142
+ name: z5.string().nullable(),
1143
+ version: z5.string().nullable()
1144
+ });
1145
+ var logDetailSchema = z5.object({
1146
+ id: z5.uuid(),
1147
+ sessionId: z5.string().nullable(),
1148
+ agentName: z5.string(),
1149
+ displayName: z5.string().nullable(),
1150
+ framework: z5.string().nullable(),
1151
+ modelProvider: z5.string().nullable(),
1152
+ triggerSource: triggerSourceSchema.nullable(),
1153
+ status: logStatusSchema,
1154
+ prompt: z5.string(),
1155
+ appendSystemPrompt: z5.string().nullable(),
1156
+ error: z5.string().nullable(),
1157
+ createdAt: z5.string(),
1158
+ startedAt: z5.string().nullable(),
1159
+ completedAt: z5.string().nullable(),
1160
+ artifact: artifactSchema
1161
+ });
1162
+ var logsListContract = c2.router({
1163
+ list: {
1164
+ method: "GET",
1165
+ path: "/api/app/logs",
1166
+ query: listQuerySchema.extend({
1167
+ search: z5.string().optional(),
1168
+ agent: z5.string().optional(),
1169
+ name: z5.string().optional(),
1170
+ org: z5.string().optional(),
1171
+ status: logStatusSchema.optional()
1172
+ }),
1173
+ responses: {
1174
+ 200: logsListResponseSchema,
1175
+ 401: apiErrorSchema
1176
+ },
1177
+ summary: "List agent run logs with pagination"
1178
+ }
1179
+ });
1180
+ var logsByIdContract = c2.router({
1181
+ getById: {
1182
+ method: "GET",
1183
+ path: "/api/app/logs/:id",
1184
+ headers: authHeadersSchema,
1185
+ pathParams: z5.object({
1186
+ id: z5.string().uuid("Invalid log ID")
1187
+ }),
1188
+ responses: {
1189
+ 200: logDetailSchema,
1190
+ 401: apiErrorSchema,
1191
+ 404: apiErrorSchema
1192
+ },
1193
+ summary: "Get agent run log details by ID"
1194
+ }
1195
+ });
1196
+ var artifactDownloadResponseSchema = z5.object({
1197
+ url: z5.url(),
1198
+ expiresAt: z5.string()
1199
+ });
1200
+ var artifactDownloadContract = c2.router({
1201
+ getDownloadUrl: {
1202
+ method: "GET",
1203
+ path: "/api/app/artifacts/download",
1204
+ query: z5.object({
1205
+ name: z5.string().min(1, "Artifact name is required"),
1206
+ version: z5.string().optional()
1207
+ }),
1208
+ responses: {
1209
+ 200: artifactDownloadResponseSchema,
1210
+ 401: apiErrorSchema,
1211
+ 404: apiErrorSchema
1212
+ },
1213
+ summary: "Get presigned URL for artifact download"
1214
+ }
1215
+ });
1103
1216
 
1104
1217
  // ../../packages/core/src/contracts/orgs.ts
1105
- import { z as z6 } from "zod";
1218
+ import { z as z7 } from "zod";
1106
1219
 
1107
1220
  // ../../packages/core/src/contracts/org-members.ts
1108
- import { z as z5 } from "zod";
1109
- var c2 = initContract();
1110
- var orgRoleSchema = z5.enum(["admin", "member"]);
1111
- var orgMemberSchema = z5.object({
1112
- userId: z5.string(),
1113
- email: z5.string(),
1221
+ import { z as z6 } from "zod";
1222
+ var c3 = initContract();
1223
+ var orgRoleSchema = z6.enum(["admin", "member"]);
1224
+ var orgMemberSchema = z6.object({
1225
+ userId: z6.string(),
1226
+ email: z6.string(),
1114
1227
  role: orgRoleSchema,
1115
- joinedAt: z5.string()
1228
+ joinedAt: z6.string()
1116
1229
  });
1117
- var orgMembersResponseSchema = z5.object({
1118
- slug: z5.string(),
1230
+ var orgMembersResponseSchema = z6.object({
1231
+ slug: z6.string(),
1119
1232
  role: orgRoleSchema,
1120
- members: z5.array(orgMemberSchema),
1121
- createdAt: z5.string()
1233
+ members: z6.array(orgMemberSchema),
1234
+ createdAt: z6.string()
1122
1235
  });
1123
- var inviteOrgMemberRequestSchema = z5.object({
1124
- email: z5.string().email()
1236
+ var inviteOrgMemberRequestSchema = z6.object({
1237
+ email: z6.string().email()
1125
1238
  });
1126
- var removeOrgMemberRequestSchema = z5.object({
1127
- email: z5.string().email()
1239
+ var removeOrgMemberRequestSchema = z6.object({
1240
+ email: z6.string().email()
1128
1241
  });
1129
- var orgMessageResponseSchema = z5.object({
1130
- message: z5.string()
1242
+ var orgMessageResponseSchema = z6.object({
1243
+ message: z6.string()
1131
1244
  });
1132
- var orgMembersContract = c2.router({
1245
+ var orgMembersContract = c3.router({
1133
1246
  /**
1134
1247
  * GET /api/org/members
1135
1248
  * Get org members and status
@@ -1174,7 +1287,7 @@ var orgMembersContract = c2.router({
1174
1287
  method: "POST",
1175
1288
  path: "/api/org/leave",
1176
1289
  headers: authHeadersSchema,
1177
- body: z5.object({}),
1290
+ body: z6.object({}),
1178
1291
  responses: {
1179
1292
  200: orgMessageResponseSchema,
1180
1293
  401: apiErrorSchema,
@@ -1204,23 +1317,23 @@ var orgMembersContract = c2.router({
1204
1317
  });
1205
1318
 
1206
1319
  // ../../packages/core/src/contracts/orgs.ts
1207
- var c3 = initContract();
1208
- var orgTierSchema = z6.enum(["free", "pro", "max"]);
1209
- var orgSlugSchema = z6.string().min(3, "Org slug must be at least 3 characters").max(64, "Org slug must be at most 64 characters").regex(
1320
+ var c4 = initContract();
1321
+ var orgTierSchema = z7.enum(["free", "pro", "max"]);
1322
+ var orgSlugSchema = z7.string().min(3, "Org slug must be at least 3 characters").max(64, "Org slug must be at most 64 characters").regex(
1210
1323
  /^[a-z0-9][a-z0-9-]*[a-z0-9]$|^[a-z0-9]{1,2}$/,
1211
1324
  "Org slug must contain only lowercase letters, numbers, and hyphens, and must start and end with an alphanumeric character"
1212
1325
  ).transform((s) => s.toLowerCase());
1213
- var orgResponseSchema = z6.object({
1214
- id: z6.string(),
1215
- slug: z6.string(),
1216
- tier: z6.string().optional(),
1326
+ var orgResponseSchema = z7.object({
1327
+ id: z7.string(),
1328
+ slug: z7.string(),
1329
+ tier: z7.string().optional(),
1217
1330
  role: orgRoleSchema.optional()
1218
1331
  });
1219
- var updateOrgRequestSchema = z6.object({
1332
+ var updateOrgRequestSchema = z7.object({
1220
1333
  slug: orgSlugSchema,
1221
- force: z6.boolean().optional().default(false)
1334
+ force: z7.boolean().optional().default(false)
1222
1335
  });
1223
- var orgContract = c3.router({
1336
+ var orgContract = c4.router({
1224
1337
  /**
1225
1338
  * GET /api/org
1226
1339
  * Get current user's default org
@@ -1258,7 +1371,7 @@ var orgContract = c3.router({
1258
1371
  summary: "Update org slug"
1259
1372
  }
1260
1373
  });
1261
- var orgDefaultAgentContract = c3.router({
1374
+ var orgDefaultAgentContract = c4.router({
1262
1375
  /**
1263
1376
  * PUT /api/orgs/default-agent?org={slug}
1264
1377
  * Set or unset the default agent for an org.
@@ -1269,15 +1382,15 @@ var orgDefaultAgentContract = c3.router({
1269
1382
  method: "PUT",
1270
1383
  path: "/api/orgs/default-agent",
1271
1384
  headers: authHeadersSchema,
1272
- query: z6.object({
1273
- org: z6.string().optional()
1385
+ query: z7.object({
1386
+ org: z7.string().optional()
1274
1387
  }),
1275
- body: z6.object({
1276
- agentComposeId: z6.uuid().nullable()
1388
+ body: z7.object({
1389
+ agentComposeId: z7.uuid().nullable()
1277
1390
  }),
1278
1391
  responses: {
1279
- 200: z6.object({
1280
- agentComposeId: z6.uuid().nullable()
1392
+ 200: z7.object({
1393
+ agentComposeId: z7.uuid().nullable()
1281
1394
  }),
1282
1395
  400: apiErrorSchema,
1283
1396
  401: apiErrorSchema,
@@ -1290,7 +1403,7 @@ var orgDefaultAgentContract = c3.router({
1290
1403
  });
1291
1404
 
1292
1405
  // ../../packages/core/src/contracts/runs.ts
1293
- var c4 = initContract();
1406
+ var c5 = initContract();
1294
1407
  var ALL_RUN_STATUSES = [
1295
1408
  "queued",
1296
1409
  "pending",
@@ -1300,101 +1413,105 @@ var ALL_RUN_STATUSES = [
1300
1413
  "timeout",
1301
1414
  "cancelled"
1302
1415
  ];
1303
- var runStatusSchema = z7.enum(ALL_RUN_STATUSES);
1304
- var unifiedRunRequestSchema = z7.object({
1416
+ var runStatusSchema = z8.enum(ALL_RUN_STATUSES);
1417
+ var unifiedRunRequestSchema = z8.object({
1305
1418
  // High-level shortcuts (mutually exclusive with each other)
1306
- checkpointId: z7.string().optional(),
1307
- sessionId: z7.string().optional(),
1419
+ checkpointId: z8.string().optional(),
1420
+ sessionId: z8.string().optional(),
1308
1421
  // Base parameters (can be used directly or overridden after shortcut expansion)
1309
- agentComposeId: z7.string().optional(),
1310
- agentComposeVersionId: z7.string().optional(),
1311
- conversationId: z7.string().optional(),
1312
- artifactName: z7.string().optional(),
1313
- artifactVersion: z7.string().optional(),
1314
- vars: z7.record(z7.string(), z7.string()).optional(),
1315
- secrets: z7.record(z7.string(), z7.string()).optional(),
1316
- volumeVersions: z7.record(z7.string(), z7.string()).optional(),
1317
- memoryName: z7.string().optional(),
1422
+ agentComposeId: z8.string().optional(),
1423
+ agentComposeVersionId: z8.string().optional(),
1424
+ conversationId: z8.string().optional(),
1425
+ artifactName: z8.string().optional(),
1426
+ artifactVersion: z8.string().optional(),
1427
+ vars: z8.record(z8.string(), z8.string()).optional(),
1428
+ secrets: z8.record(z8.string(), z8.string()).optional(),
1429
+ volumeVersions: z8.record(z8.string(), z8.string()).optional(),
1430
+ memoryName: z8.string().optional(),
1318
1431
  // Debug flag to force real Claude in mock environments (internal use only)
1319
- debugNoMockClaude: z7.boolean().optional(),
1432
+ debugNoMockClaude: z8.boolean().optional(),
1320
1433
  // Model provider for automatic secret injection
1321
- modelProvider: z7.string().optional(),
1434
+ modelProvider: z8.string().optional(),
1322
1435
  // Environment validation flag - when true, validates secrets/vars before running
1323
- checkEnv: z7.boolean().optional(),
1436
+ checkEnv: z8.boolean().optional(),
1324
1437
  // Required
1325
- prompt: z7.string().min(1, "Missing prompt"),
1438
+ prompt: z8.string().min(1, "Missing prompt"),
1326
1439
  // Optional system prompt to append to the agent's system prompt
1327
- appendSystemPrompt: z7.string().optional()
1440
+ appendSystemPrompt: z8.string().optional(),
1441
+ // Optional list of tools to disable in Claude CLI (passed as --disallowed-tools)
1442
+ disallowedTools: z8.array(z8.string()).optional(),
1443
+ // How the run was triggered (defaults to "cli" on the server if not provided)
1444
+ triggerSource: triggerSourceSchema.optional()
1328
1445
  });
1329
- var createRunResponseSchema = z7.object({
1330
- runId: z7.string(),
1446
+ var createRunResponseSchema = z8.object({
1447
+ runId: z8.string(),
1331
1448
  status: runStatusSchema,
1332
- sandboxId: z7.string().optional(),
1333
- output: z7.string().optional(),
1334
- error: z7.string().optional(),
1335
- executionTimeMs: z7.number().optional(),
1336
- createdAt: z7.string()
1449
+ sandboxId: z8.string().optional(),
1450
+ output: z8.string().optional(),
1451
+ error: z8.string().optional(),
1452
+ executionTimeMs: z8.number().optional(),
1453
+ createdAt: z8.string()
1337
1454
  });
1338
- var getRunResponseSchema = z7.object({
1339
- runId: z7.string(),
1340
- agentComposeVersionId: z7.string().nullable(),
1455
+ var getRunResponseSchema = z8.object({
1456
+ runId: z8.string(),
1457
+ agentComposeVersionId: z8.string().nullable(),
1341
1458
  status: runStatusSchema,
1342
- prompt: z7.string(),
1343
- appendSystemPrompt: z7.string().nullable(),
1344
- vars: z7.record(z7.string(), z7.string()).optional(),
1345
- sandboxId: z7.string().optional(),
1346
- result: z7.object({
1347
- output: z7.string().optional(),
1348
- executionTimeMs: z7.number().optional(),
1349
- agentSessionId: z7.string().optional(),
1350
- checkpointId: z7.string().optional(),
1351
- conversationId: z7.string().optional()
1459
+ prompt: z8.string(),
1460
+ appendSystemPrompt: z8.string().nullable(),
1461
+ vars: z8.record(z8.string(), z8.string()).optional(),
1462
+ sandboxId: z8.string().optional(),
1463
+ result: z8.object({
1464
+ output: z8.string().optional(),
1465
+ executionTimeMs: z8.number().optional(),
1466
+ agentSessionId: z8.string().optional(),
1467
+ checkpointId: z8.string().optional(),
1468
+ conversationId: z8.string().optional()
1352
1469
  }).passthrough().optional(),
1353
- error: z7.string().optional(),
1354
- createdAt: z7.string(),
1355
- startedAt: z7.string().optional(),
1356
- completedAt: z7.string().optional()
1470
+ error: z8.string().optional(),
1471
+ createdAt: z8.string(),
1472
+ startedAt: z8.string().optional(),
1473
+ completedAt: z8.string().optional()
1357
1474
  });
1358
- var runEventSchema = z7.object({
1359
- sequenceNumber: z7.number(),
1360
- eventType: z7.string(),
1361
- eventData: z7.unknown(),
1362
- createdAt: z7.string()
1475
+ var runEventSchema = z8.object({
1476
+ sequenceNumber: z8.number(),
1477
+ eventType: z8.string(),
1478
+ eventData: z8.unknown(),
1479
+ createdAt: z8.string()
1363
1480
  });
1364
- var runResultSchema = z7.object({
1365
- checkpointId: z7.string(),
1366
- agentSessionId: z7.string(),
1367
- conversationId: z7.string(),
1368
- artifact: z7.record(z7.string(), z7.string()).optional(),
1481
+ var runResultSchema = z8.object({
1482
+ checkpointId: z8.string(),
1483
+ agentSessionId: z8.string(),
1484
+ conversationId: z8.string(),
1485
+ artifact: z8.record(z8.string(), z8.string()).optional(),
1369
1486
  // optional when run has no artifact
1370
- volumes: z7.record(z7.string(), z7.string()).optional(),
1371
- memory: z7.record(z7.string(), z7.string()).optional()
1487
+ volumes: z8.record(z8.string(), z8.string()).optional(),
1488
+ memory: z8.record(z8.string(), z8.string()).optional()
1372
1489
  });
1373
- var runStateSchema = z7.object({
1490
+ var runStateSchema = z8.object({
1374
1491
  status: runStatusSchema,
1375
1492
  result: runResultSchema.optional(),
1376
- error: z7.string().optional()
1493
+ error: z8.string().optional()
1377
1494
  });
1378
- var eventsResponseSchema = z7.object({
1379
- events: z7.array(runEventSchema),
1380
- hasMore: z7.boolean(),
1381
- nextSequence: z7.number(),
1495
+ var eventsResponseSchema = z8.object({
1496
+ events: z8.array(runEventSchema),
1497
+ hasMore: z8.boolean(),
1498
+ nextSequence: z8.number(),
1382
1499
  run: runStateSchema,
1383
- framework: z7.string()
1500
+ framework: z8.string()
1384
1501
  });
1385
- var runListItemSchema = z7.object({
1386
- id: z7.string(),
1387
- agentName: z7.string(),
1502
+ var runListItemSchema = z8.object({
1503
+ id: z8.string(),
1504
+ agentName: z8.string(),
1388
1505
  status: runStatusSchema,
1389
- prompt: z7.string(),
1390
- appendSystemPrompt: z7.string().nullable(),
1391
- createdAt: z7.string(),
1392
- startedAt: z7.string().nullable()
1506
+ prompt: z8.string(),
1507
+ appendSystemPrompt: z8.string().nullable(),
1508
+ createdAt: z8.string(),
1509
+ startedAt: z8.string().nullable()
1393
1510
  });
1394
- var runsListResponseSchema = z7.object({
1395
- runs: z7.array(runListItemSchema)
1511
+ var runsListResponseSchema = z8.object({
1512
+ runs: z8.array(runListItemSchema)
1396
1513
  });
1397
- var runsMainContract = c4.router({
1514
+ var runsMainContract = c5.router({
1398
1515
  /**
1399
1516
  * GET /api/agent/runs
1400
1517
  * List agent runs (pending and running by default)
@@ -1403,16 +1520,16 @@ var runsMainContract = c4.router({
1403
1520
  method: "GET",
1404
1521
  path: "/api/agent/runs",
1405
1522
  headers: authHeadersSchema,
1406
- query: z7.object({
1407
- status: z7.string().optional(),
1523
+ query: z8.object({
1524
+ status: z8.string().optional(),
1408
1525
  // comma-separated: "pending,running"
1409
- agent: z7.string().optional(),
1526
+ agent: z8.string().optional(),
1410
1527
  // agent name filter
1411
- since: z7.string().optional(),
1528
+ since: z8.string().optional(),
1412
1529
  // ISO timestamp
1413
- until: z7.string().optional(),
1530
+ until: z8.string().optional(),
1414
1531
  // ISO timestamp
1415
- limit: z7.coerce.number().min(1).max(100).default(50)
1532
+ limit: z8.coerce.number().min(1).max(100).default(50)
1416
1533
  }),
1417
1534
  responses: {
1418
1535
  200: runsListResponseSchema,
@@ -1441,7 +1558,7 @@ var runsMainContract = c4.router({
1441
1558
  summary: "Create and execute agent run"
1442
1559
  }
1443
1560
  });
1444
- var runsByIdContract = c4.router({
1561
+ var runsByIdContract = c5.router({
1445
1562
  /**
1446
1563
  * GET /api/agent/runs/:id
1447
1564
  * Get agent run status and results
@@ -1450,8 +1567,8 @@ var runsByIdContract = c4.router({
1450
1567
  method: "GET",
1451
1568
  path: "/api/agent/runs/:id",
1452
1569
  headers: authHeadersSchema,
1453
- pathParams: z7.object({
1454
- id: z7.string().min(1, "Run ID is required")
1570
+ pathParams: z8.object({
1571
+ id: z8.string().min(1, "Run ID is required")
1455
1572
  }),
1456
1573
  responses: {
1457
1574
  200: getRunResponseSchema,
@@ -1462,12 +1579,12 @@ var runsByIdContract = c4.router({
1462
1579
  summary: "Get agent run by ID"
1463
1580
  }
1464
1581
  });
1465
- var cancelRunResponseSchema = z7.object({
1466
- id: z7.string(),
1467
- status: z7.literal("cancelled"),
1468
- message: z7.string()
1582
+ var cancelRunResponseSchema = z8.object({
1583
+ id: z8.string(),
1584
+ status: z8.literal("cancelled"),
1585
+ message: z8.string()
1469
1586
  });
1470
- var runsCancelContract = c4.router({
1587
+ var runsCancelContract = c5.router({
1471
1588
  /**
1472
1589
  * POST /api/agent/runs/:id/cancel
1473
1590
  * Cancel a pending or running run
@@ -1476,10 +1593,10 @@ var runsCancelContract = c4.router({
1476
1593
  method: "POST",
1477
1594
  path: "/api/agent/runs/:id/cancel",
1478
1595
  headers: authHeadersSchema,
1479
- pathParams: z7.object({
1480
- id: z7.string().min(1, "Run ID is required")
1596
+ pathParams: z8.object({
1597
+ id: z8.string().min(1, "Run ID is required")
1481
1598
  }),
1482
- body: z7.undefined(),
1599
+ body: z8.undefined(),
1483
1600
  responses: {
1484
1601
  200: cancelRunResponseSchema,
1485
1602
  400: apiErrorSchema,
@@ -1490,7 +1607,7 @@ var runsCancelContract = c4.router({
1490
1607
  summary: "Cancel a pending or running run"
1491
1608
  }
1492
1609
  });
1493
- var runEventsContract = c4.router({
1610
+ var runEventsContract = c5.router({
1494
1611
  /**
1495
1612
  * GET /api/agent/runs/:id/events
1496
1613
  * Poll for agent run events with pagination
@@ -1499,12 +1616,12 @@ var runEventsContract = c4.router({
1499
1616
  method: "GET",
1500
1617
  path: "/api/agent/runs/:id/events",
1501
1618
  headers: authHeadersSchema,
1502
- pathParams: z7.object({
1503
- id: z7.string().min(1, "Run ID is required")
1619
+ pathParams: z8.object({
1620
+ id: z8.string().min(1, "Run ID is required")
1504
1621
  }),
1505
- query: z7.object({
1506
- since: z7.coerce.number().default(-1),
1507
- limit: z7.coerce.number().default(100)
1622
+ query: z8.object({
1623
+ since: z8.coerce.number().default(-1),
1624
+ limit: z8.coerce.number().default(100)
1508
1625
  }),
1509
1626
  responses: {
1510
1627
  200: eventsResponseSchema,
@@ -1514,50 +1631,50 @@ var runEventsContract = c4.router({
1514
1631
  summary: "Get agent run events"
1515
1632
  }
1516
1633
  });
1517
- var telemetryMetricSchema = z7.object({
1518
- ts: z7.string(),
1519
- cpu: z7.number(),
1520
- mem_used: z7.number(),
1521
- mem_total: z7.number(),
1522
- disk_used: z7.number(),
1523
- disk_total: z7.number()
1634
+ var telemetryMetricSchema = z8.object({
1635
+ ts: z8.string(),
1636
+ cpu: z8.number(),
1637
+ mem_used: z8.number(),
1638
+ mem_total: z8.number(),
1639
+ disk_used: z8.number(),
1640
+ disk_total: z8.number()
1524
1641
  });
1525
- var systemLogResponseSchema = z7.object({
1526
- systemLog: z7.string(),
1527
- hasMore: z7.boolean()
1642
+ var systemLogResponseSchema = z8.object({
1643
+ systemLog: z8.string(),
1644
+ hasMore: z8.boolean()
1528
1645
  });
1529
- var metricsResponseSchema = z7.object({
1530
- metrics: z7.array(telemetryMetricSchema),
1531
- hasMore: z7.boolean()
1646
+ var metricsResponseSchema = z8.object({
1647
+ metrics: z8.array(telemetryMetricSchema),
1648
+ hasMore: z8.boolean()
1532
1649
  });
1533
- var agentEventsResponseSchema = z7.object({
1534
- events: z7.array(runEventSchema),
1535
- hasMore: z7.boolean(),
1536
- framework: z7.string()
1650
+ var agentEventsResponseSchema = z8.object({
1651
+ events: z8.array(runEventSchema),
1652
+ hasMore: z8.boolean(),
1653
+ framework: z8.string()
1537
1654
  });
1538
- var networkLogEntrySchema = z7.object({
1539
- timestamp: z7.string(),
1540
- mode: z7.literal("mitm").optional(),
1541
- action: z7.enum(["ALLOW", "DENY"]).optional(),
1542
- host: z7.string().optional(),
1543
- port: z7.number().optional(),
1544
- rule_matched: z7.string().nullable().optional(),
1545
- method: z7.string().optional(),
1546
- url: z7.string().optional(),
1547
- status: z7.number().optional(),
1548
- latency_ms: z7.number().optional(),
1549
- request_size: z7.number().optional(),
1550
- response_size: z7.number().optional()
1655
+ var networkLogEntrySchema = z8.object({
1656
+ timestamp: z8.string(),
1657
+ mode: z8.literal("mitm").optional(),
1658
+ action: z8.enum(["ALLOW", "DENY"]).optional(),
1659
+ host: z8.string().optional(),
1660
+ port: z8.number().optional(),
1661
+ rule_matched: z8.string().nullable().optional(),
1662
+ method: z8.string().optional(),
1663
+ url: z8.string().optional(),
1664
+ status: z8.number().optional(),
1665
+ latency_ms: z8.number().optional(),
1666
+ request_size: z8.number().optional(),
1667
+ response_size: z8.number().optional()
1551
1668
  });
1552
- var networkLogsResponseSchema = z7.object({
1553
- networkLogs: z7.array(networkLogEntrySchema),
1554
- hasMore: z7.boolean()
1669
+ var networkLogsResponseSchema = z8.object({
1670
+ networkLogs: z8.array(networkLogEntrySchema),
1671
+ hasMore: z8.boolean()
1555
1672
  });
1556
- var telemetryResponseSchema = z7.object({
1557
- systemLog: z7.string(),
1558
- metrics: z7.array(telemetryMetricSchema)
1673
+ var telemetryResponseSchema = z8.object({
1674
+ systemLog: z8.string(),
1675
+ metrics: z8.array(telemetryMetricSchema)
1559
1676
  });
1560
- var runTelemetryContract = c4.router({
1677
+ var runTelemetryContract = c5.router({
1561
1678
  /**
1562
1679
  * GET /api/agent/runs/:id/telemetry
1563
1680
  * Get aggregated telemetry data for a run (legacy combined format)
@@ -1566,8 +1683,8 @@ var runTelemetryContract = c4.router({
1566
1683
  method: "GET",
1567
1684
  path: "/api/agent/runs/:id/telemetry",
1568
1685
  headers: authHeadersSchema,
1569
- pathParams: z7.object({
1570
- id: z7.string().min(1, "Run ID is required")
1686
+ pathParams: z8.object({
1687
+ id: z8.string().min(1, "Run ID is required")
1571
1688
  }),
1572
1689
  responses: {
1573
1690
  200: telemetryResponseSchema,
@@ -1577,7 +1694,7 @@ var runTelemetryContract = c4.router({
1577
1694
  summary: "Get run telemetry data"
1578
1695
  }
1579
1696
  });
1580
- var runSystemLogContract = c4.router({
1697
+ var runSystemLogContract = c5.router({
1581
1698
  /**
1582
1699
  * GET /api/agent/runs/:id/telemetry/system-log
1583
1700
  * Get system log with pagination
@@ -1586,13 +1703,13 @@ var runSystemLogContract = c4.router({
1586
1703
  method: "GET",
1587
1704
  path: "/api/agent/runs/:id/telemetry/system-log",
1588
1705
  headers: authHeadersSchema,
1589
- pathParams: z7.object({
1590
- id: z7.string().min(1, "Run ID is required")
1706
+ pathParams: z8.object({
1707
+ id: z8.string().min(1, "Run ID is required")
1591
1708
  }),
1592
- query: z7.object({
1593
- since: z7.coerce.number().optional(),
1594
- limit: z7.coerce.number().min(1).max(100).default(5),
1595
- order: z7.enum(["asc", "desc"]).default("desc")
1709
+ query: z8.object({
1710
+ since: z8.coerce.number().optional(),
1711
+ limit: z8.coerce.number().min(1).max(100).default(5),
1712
+ order: z8.enum(["asc", "desc"]).default("desc")
1596
1713
  }),
1597
1714
  responses: {
1598
1715
  200: systemLogResponseSchema,
@@ -1602,7 +1719,7 @@ var runSystemLogContract = c4.router({
1602
1719
  summary: "Get system log with pagination"
1603
1720
  }
1604
1721
  });
1605
- var runMetricsContract = c4.router({
1722
+ var runMetricsContract = c5.router({
1606
1723
  /**
1607
1724
  * GET /api/agent/runs/:id/telemetry/metrics
1608
1725
  * Get metrics with pagination
@@ -1611,13 +1728,13 @@ var runMetricsContract = c4.router({
1611
1728
  method: "GET",
1612
1729
  path: "/api/agent/runs/:id/telemetry/metrics",
1613
1730
  headers: authHeadersSchema,
1614
- pathParams: z7.object({
1615
- id: z7.string().min(1, "Run ID is required")
1731
+ pathParams: z8.object({
1732
+ id: z8.string().min(1, "Run ID is required")
1616
1733
  }),
1617
- query: z7.object({
1618
- since: z7.coerce.number().optional(),
1619
- limit: z7.coerce.number().min(1).max(100).default(5),
1620
- order: z7.enum(["asc", "desc"]).default("desc")
1734
+ query: z8.object({
1735
+ since: z8.coerce.number().optional(),
1736
+ limit: z8.coerce.number().min(1).max(100).default(5),
1737
+ order: z8.enum(["asc", "desc"]).default("desc")
1621
1738
  }),
1622
1739
  responses: {
1623
1740
  200: metricsResponseSchema,
@@ -1627,7 +1744,7 @@ var runMetricsContract = c4.router({
1627
1744
  summary: "Get metrics with pagination"
1628
1745
  }
1629
1746
  });
1630
- var runAgentEventsContract = c4.router({
1747
+ var runAgentEventsContract = c5.router({
1631
1748
  /**
1632
1749
  * GET /api/agent/runs/:id/telemetry/agent
1633
1750
  * Get agent events with pagination (for vm0 logs default)
@@ -1636,13 +1753,13 @@ var runAgentEventsContract = c4.router({
1636
1753
  method: "GET",
1637
1754
  path: "/api/agent/runs/:id/telemetry/agent",
1638
1755
  headers: authHeadersSchema,
1639
- pathParams: z7.object({
1640
- id: z7.string().min(1, "Run ID is required")
1756
+ pathParams: z8.object({
1757
+ id: z8.string().min(1, "Run ID is required")
1641
1758
  }),
1642
- query: z7.object({
1643
- since: z7.coerce.number().optional(),
1644
- limit: z7.coerce.number().min(1).max(100).default(5),
1645
- order: z7.enum(["asc", "desc"]).default("desc")
1759
+ query: z8.object({
1760
+ since: z8.coerce.number().optional(),
1761
+ limit: z8.coerce.number().min(1).max(100).default(5),
1762
+ order: z8.enum(["asc", "desc"]).default("desc")
1646
1763
  }),
1647
1764
  responses: {
1648
1765
  200: agentEventsResponseSchema,
@@ -1652,7 +1769,7 @@ var runAgentEventsContract = c4.router({
1652
1769
  summary: "Get agent events with pagination"
1653
1770
  }
1654
1771
  });
1655
- var runNetworkLogsContract = c4.router({
1772
+ var runNetworkLogsContract = c5.router({
1656
1773
  /**
1657
1774
  * GET /api/agent/runs/:id/telemetry/network
1658
1775
  * Get network logs with pagination (for vm0 logs --network)
@@ -1661,13 +1778,13 @@ var runNetworkLogsContract = c4.router({
1661
1778
  method: "GET",
1662
1779
  path: "/api/agent/runs/:id/telemetry/network",
1663
1780
  headers: authHeadersSchema,
1664
- pathParams: z7.object({
1665
- id: z7.string().min(1, "Run ID is required")
1781
+ pathParams: z8.object({
1782
+ id: z8.string().min(1, "Run ID is required")
1666
1783
  }),
1667
- query: z7.object({
1668
- since: z7.coerce.number().optional(),
1669
- limit: z7.coerce.number().min(1).max(100).default(5),
1670
- order: z7.enum(["asc", "desc"]).default("desc")
1784
+ query: z8.object({
1785
+ since: z8.coerce.number().optional(),
1786
+ limit: z8.coerce.number().min(1).max(100).default(5),
1787
+ order: z8.enum(["asc", "desc"]).default("desc")
1671
1788
  }),
1672
1789
  responses: {
1673
1790
  200: networkLogsResponseSchema,
@@ -1677,18 +1794,18 @@ var runNetworkLogsContract = c4.router({
1677
1794
  summary: "Get network logs with pagination"
1678
1795
  }
1679
1796
  });
1680
- var searchResultSchema = z7.object({
1681
- runId: z7.string(),
1682
- agentName: z7.string(),
1797
+ var searchResultSchema = z8.object({
1798
+ runId: z8.string(),
1799
+ agentName: z8.string(),
1683
1800
  matchedEvent: runEventSchema,
1684
- contextBefore: z7.array(runEventSchema),
1685
- contextAfter: z7.array(runEventSchema)
1801
+ contextBefore: z8.array(runEventSchema),
1802
+ contextAfter: z8.array(runEventSchema)
1686
1803
  });
1687
- var logsSearchResponseSchema = z7.object({
1688
- results: z7.array(searchResultSchema),
1689
- hasMore: z7.boolean()
1804
+ var logsSearchResponseSchema = z8.object({
1805
+ results: z8.array(searchResultSchema),
1806
+ hasMore: z8.boolean()
1690
1807
  });
1691
- var logsSearchContract = c4.router({
1808
+ var logsSearchContract = c5.router({
1692
1809
  /**
1693
1810
  * GET /api/logs/search
1694
1811
  * Search agent events across runs using keyword matching
@@ -1697,14 +1814,14 @@ var logsSearchContract = c4.router({
1697
1814
  method: "GET",
1698
1815
  path: "/api/logs/search",
1699
1816
  headers: authHeadersSchema,
1700
- query: z7.object({
1701
- keyword: z7.string().min(1),
1702
- agent: z7.string().optional(),
1703
- runId: z7.string().optional(),
1704
- since: z7.coerce.number().optional(),
1705
- limit: z7.coerce.number().min(1).max(50).default(20),
1706
- before: z7.coerce.number().min(0).max(10).default(0),
1707
- after: z7.coerce.number().min(0).max(10).default(0)
1817
+ query: z8.object({
1818
+ keyword: z8.string().min(1),
1819
+ agent: z8.string().optional(),
1820
+ runId: z8.string().optional(),
1821
+ since: z8.coerce.number().optional(),
1822
+ limit: z8.coerce.number().min(1).max(50).default(20),
1823
+ before: z8.coerce.number().min(0).max(10).default(0),
1824
+ after: z8.coerce.number().min(0).max(10).default(0)
1708
1825
  }),
1709
1826
  responses: {
1710
1827
  200: logsSearchResponseSchema,
@@ -1713,39 +1830,39 @@ var logsSearchContract = c4.router({
1713
1830
  summary: "Search agent events across runs"
1714
1831
  }
1715
1832
  });
1716
- var queueEntrySchema = z7.object({
1717
- position: z7.number(),
1718
- agentName: z7.string().nullable(),
1719
- agentDisplayName: z7.string().nullable(),
1720
- userEmail: z7.string().nullable(),
1721
- createdAt: z7.string(),
1722
- isOwner: z7.boolean(),
1723
- runId: z7.string().nullable(),
1724
- prompt: z7.string().nullable(),
1725
- triggerSource: z7.enum(["schedule", "chat", "api"]).nullable(),
1726
- sessionLink: z7.string().nullable()
1833
+ var queueEntrySchema = z8.object({
1834
+ position: z8.number(),
1835
+ agentName: z8.string().nullable(),
1836
+ agentDisplayName: z8.string().nullable(),
1837
+ userEmail: z8.string().nullable(),
1838
+ createdAt: z8.string(),
1839
+ isOwner: z8.boolean(),
1840
+ runId: z8.string().nullable(),
1841
+ prompt: z8.string().nullable(),
1842
+ triggerSource: triggerSourceSchema.nullable(),
1843
+ sessionLink: z8.string().nullable()
1727
1844
  });
1728
- var runningTaskSchema = z7.object({
1729
- runId: z7.string().nullable(),
1730
- agentName: z7.string(),
1731
- agentDisplayName: z7.string().nullable(),
1732
- userEmail: z7.string(),
1733
- startedAt: z7.string().nullable(),
1734
- isOwner: z7.boolean()
1845
+ var runningTaskSchema = z8.object({
1846
+ runId: z8.string().nullable(),
1847
+ agentName: z8.string(),
1848
+ agentDisplayName: z8.string().nullable(),
1849
+ userEmail: z8.string(),
1850
+ startedAt: z8.string().nullable(),
1851
+ isOwner: z8.boolean()
1735
1852
  });
1736
- var concurrencyInfoSchema = z7.object({
1853
+ var concurrencyInfoSchema = z8.object({
1737
1854
  tier: orgTierSchema,
1738
- limit: z7.number(),
1739
- active: z7.number(),
1740
- available: z7.number()
1855
+ limit: z8.number(),
1856
+ active: z8.number(),
1857
+ available: z8.number()
1741
1858
  });
1742
- var queueResponseSchema = z7.object({
1859
+ var queueResponseSchema = z8.object({
1743
1860
  concurrency: concurrencyInfoSchema,
1744
- queue: z7.array(queueEntrySchema),
1745
- runningTasks: z7.array(runningTaskSchema),
1746
- estimatedTimePerRun: z7.number().nullable()
1861
+ queue: z8.array(queueEntrySchema),
1862
+ runningTasks: z8.array(runningTaskSchema),
1863
+ estimatedTimePerRun: z8.number().nullable()
1747
1864
  });
1748
- var runsQueueContract = c4.router({
1865
+ var runsQueueContract = c5.router({
1749
1866
  /**
1750
1867
  * GET /api/agent/runs/queue
1751
1868
  * Get org run queue status including concurrency context and queued entries
@@ -1764,19 +1881,19 @@ var runsQueueContract = c4.router({
1764
1881
  });
1765
1882
 
1766
1883
  // ../../packages/core/src/contracts/storages.ts
1767
- import { z as z8 } from "zod";
1768
- var c5 = initContract();
1769
- var storageTypeSchema = z8.enum(["volume", "artifact", "memory"]);
1770
- var versionQuerySchema = z8.string().regex(/^[a-f0-9]{8,64}$/i, "Version must be 8-64 hex characters").optional();
1771
- var uploadStorageResponseSchema = z8.object({
1772
- name: z8.string(),
1773
- versionId: z8.string(),
1774
- size: z8.number(),
1775
- fileCount: z8.number(),
1884
+ import { z as z9 } from "zod";
1885
+ var c6 = initContract();
1886
+ var storageTypeSchema = z9.enum(["volume", "artifact", "memory"]);
1887
+ var versionQuerySchema = z9.string().regex(/^[a-f0-9]{8,64}$/i, "Version must be 8-64 hex characters").optional();
1888
+ var uploadStorageResponseSchema = z9.object({
1889
+ name: z9.string(),
1890
+ versionId: z9.string(),
1891
+ size: z9.number(),
1892
+ fileCount: z9.number(),
1776
1893
  type: storageTypeSchema,
1777
- deduplicated: z8.boolean()
1894
+ deduplicated: z9.boolean()
1778
1895
  });
1779
- var storagesContract = c5.router({
1896
+ var storagesContract = c6.router({
1780
1897
  /**
1781
1898
  * POST /api/storages
1782
1899
  * Upload a storage (tar.gz file)
@@ -1793,7 +1910,7 @@ var storagesContract = c5.router({
1793
1910
  path: "/api/storages",
1794
1911
  headers: authHeadersSchema,
1795
1912
  contentType: "multipart/form-data",
1796
- body: c5.type(),
1913
+ body: c6.type(),
1797
1914
  responses: {
1798
1915
  200: uploadStorageResponseSchema,
1799
1916
  400: apiErrorSchema,
@@ -1816,15 +1933,15 @@ var storagesContract = c5.router({
1816
1933
  method: "GET",
1817
1934
  path: "/api/storages",
1818
1935
  headers: authHeadersSchema,
1819
- query: z8.object({
1820
- name: z8.string().min(1, "Storage name is required"),
1936
+ query: z9.object({
1937
+ name: z9.string().min(1, "Storage name is required"),
1821
1938
  version: versionQuerySchema
1822
1939
  }),
1823
1940
  responses: {
1824
1941
  // Binary response - actual handling done at route level
1825
- 200: c5.otherResponse({
1942
+ 200: c6.otherResponse({
1826
1943
  contentType: "application/gzip",
1827
- body: c5.type()
1944
+ body: c6.type()
1828
1945
  }),
1829
1946
  400: apiErrorSchema,
1830
1947
  401: apiErrorSchema,
@@ -1835,41 +1952,41 @@ var storagesContract = c5.router({
1835
1952
  }
1836
1953
  });
1837
1954
  var MAX_FILE_SIZE_BYTES = 104857600;
1838
- var fileEntryWithHashSchema = z8.object({
1839
- path: z8.string().min(1, "File path is required"),
1840
- hash: z8.string().length(64, "Hash must be SHA-256 (64 hex chars)"),
1841
- size: z8.number().int().min(0, "Size must be non-negative").max(MAX_FILE_SIZE_BYTES, "File size exceeds 100MB limit")
1955
+ var fileEntryWithHashSchema = z9.object({
1956
+ path: z9.string().min(1, "File path is required"),
1957
+ hash: z9.string().length(64, "Hash must be SHA-256 (64 hex chars)"),
1958
+ size: z9.number().int().min(0, "Size must be non-negative").max(MAX_FILE_SIZE_BYTES, "File size exceeds 100MB limit")
1842
1959
  });
1843
- var storageChangesSchema = z8.object({
1844
- added: z8.array(z8.string()),
1845
- modified: z8.array(z8.string()),
1846
- deleted: z8.array(z8.string())
1960
+ var storageChangesSchema = z9.object({
1961
+ added: z9.array(z9.string()),
1962
+ modified: z9.array(z9.string()),
1963
+ deleted: z9.array(z9.string())
1847
1964
  });
1848
- var presignedUploadSchema = z8.object({
1849
- key: z8.string(),
1850
- presignedUrl: z8.url()
1965
+ var presignedUploadSchema = z9.object({
1966
+ key: z9.string(),
1967
+ presignedUrl: z9.url()
1851
1968
  });
1852
- var storagesPrepareContract = c5.router({
1969
+ var storagesPrepareContract = c6.router({
1853
1970
  prepare: {
1854
1971
  method: "POST",
1855
1972
  path: "/api/storages/prepare",
1856
1973
  headers: authHeadersSchema,
1857
- body: z8.object({
1858
- storageName: z8.string().min(1, "Storage name is required"),
1974
+ body: z9.object({
1975
+ storageName: z9.string().min(1, "Storage name is required"),
1859
1976
  storageType: storageTypeSchema,
1860
- files: z8.array(fileEntryWithHashSchema),
1861
- force: z8.boolean().optional(),
1862
- runId: z8.string().optional(),
1977
+ files: z9.array(fileEntryWithHashSchema),
1978
+ force: z9.boolean().optional(),
1979
+ runId: z9.string().optional(),
1863
1980
  // For sandbox auth
1864
- baseVersion: z8.string().optional(),
1981
+ baseVersion: z9.string().optional(),
1865
1982
  // For incremental uploads
1866
1983
  changes: storageChangesSchema.optional()
1867
1984
  }),
1868
1985
  responses: {
1869
- 200: z8.object({
1870
- versionId: z8.string(),
1871
- existing: z8.boolean(),
1872
- uploads: z8.object({
1986
+ 200: z9.object({
1987
+ versionId: z9.string(),
1988
+ existing: z9.boolean(),
1989
+ uploads: z9.object({
1873
1990
  archive: presignedUploadSchema,
1874
1991
  manifest: presignedUploadSchema
1875
1992
  }).optional()
@@ -1884,27 +2001,27 @@ var storagesPrepareContract = c5.router({
1884
2001
  summary: "Prepare for direct S3 upload"
1885
2002
  }
1886
2003
  });
1887
- var storagesCommitContract = c5.router({
2004
+ var storagesCommitContract = c6.router({
1888
2005
  commit: {
1889
2006
  method: "POST",
1890
2007
  path: "/api/storages/commit",
1891
2008
  headers: authHeadersSchema,
1892
- body: z8.object({
1893
- storageName: z8.string().min(1, "Storage name is required"),
2009
+ body: z9.object({
2010
+ storageName: z9.string().min(1, "Storage name is required"),
1894
2011
  storageType: storageTypeSchema,
1895
- versionId: z8.string().min(1, "Version ID is required"),
1896
- files: z8.array(fileEntryWithHashSchema),
1897
- runId: z8.string().optional(),
1898
- message: z8.string().optional()
2012
+ versionId: z9.string().min(1, "Version ID is required"),
2013
+ files: z9.array(fileEntryWithHashSchema),
2014
+ runId: z9.string().optional(),
2015
+ message: z9.string().optional()
1899
2016
  }),
1900
2017
  responses: {
1901
- 200: z8.object({
1902
- success: z8.literal(true),
1903
- versionId: z8.string(),
1904
- storageName: z8.string(),
1905
- size: z8.number(),
1906
- fileCount: z8.number(),
1907
- deduplicated: z8.boolean().optional()
2018
+ 200: z9.object({
2019
+ success: z9.literal(true),
2020
+ versionId: z9.string(),
2021
+ storageName: z9.string(),
2022
+ size: z9.number(),
2023
+ fileCount: z9.number(),
2024
+ deduplicated: z9.boolean().optional()
1908
2025
  }),
1909
2026
  400: apiErrorSchema,
1910
2027
  401: apiErrorSchema,
@@ -1918,31 +2035,31 @@ var storagesCommitContract = c5.router({
1918
2035
  summary: "Commit uploaded storage"
1919
2036
  }
1920
2037
  });
1921
- var storagesDownloadContract = c5.router({
2038
+ var storagesDownloadContract = c6.router({
1922
2039
  download: {
1923
2040
  method: "GET",
1924
2041
  path: "/api/storages/download",
1925
2042
  headers: authHeadersSchema,
1926
- query: z8.object({
1927
- name: z8.string().min(1, "Storage name is required"),
2043
+ query: z9.object({
2044
+ name: z9.string().min(1, "Storage name is required"),
1928
2045
  type: storageTypeSchema,
1929
2046
  version: versionQuerySchema
1930
2047
  }),
1931
2048
  responses: {
1932
2049
  // Normal response with presigned URL
1933
- 200: z8.union([
1934
- z8.object({
1935
- url: z8.url(),
1936
- versionId: z8.string(),
1937
- fileCount: z8.number(),
1938
- size: z8.number()
2050
+ 200: z9.union([
2051
+ z9.object({
2052
+ url: z9.url(),
2053
+ versionId: z9.string(),
2054
+ fileCount: z9.number(),
2055
+ size: z9.number()
1939
2056
  }),
1940
2057
  // Empty artifact response
1941
- z8.object({
1942
- empty: z8.literal(true),
1943
- versionId: z8.string(),
1944
- fileCount: z8.literal(0),
1945
- size: z8.literal(0)
2058
+ z9.object({
2059
+ empty: z9.literal(true),
2060
+ versionId: z9.string(),
2061
+ fileCount: z9.literal(0),
2062
+ size: z9.literal(0)
1946
2063
  })
1947
2064
  ]),
1948
2065
  400: apiErrorSchema,
@@ -1954,21 +2071,21 @@ var storagesDownloadContract = c5.router({
1954
2071
  summary: "Get presigned download URL"
1955
2072
  }
1956
2073
  });
1957
- var storagesListContract = c5.router({
2074
+ var storagesListContract = c6.router({
1958
2075
  list: {
1959
2076
  method: "GET",
1960
2077
  path: "/api/storages/list",
1961
2078
  headers: authHeadersSchema,
1962
- query: z8.object({
2079
+ query: z9.object({
1963
2080
  type: storageTypeSchema
1964
2081
  }),
1965
2082
  responses: {
1966
- 200: z8.array(
1967
- z8.object({
1968
- name: z8.string(),
1969
- size: z8.number(),
1970
- fileCount: z8.number(),
1971
- updatedAt: z8.string()
2083
+ 200: z9.array(
2084
+ z9.object({
2085
+ name: z9.string(),
2086
+ size: z9.number(),
2087
+ fileCount: z9.number(),
2088
+ updatedAt: z9.string()
1972
2089
  })
1973
2090
  ),
1974
2091
  401: apiErrorSchema,
@@ -1980,24 +2097,24 @@ var storagesListContract = c5.router({
1980
2097
  });
1981
2098
 
1982
2099
  // ../../packages/core/src/contracts/webhooks.ts
1983
- import { z as z9 } from "zod";
1984
- var c6 = initContract();
1985
- var agentEventSchema = z9.object({
1986
- type: z9.string(),
1987
- sequenceNumber: z9.number().int().nonnegative()
2100
+ import { z as z10 } from "zod";
2101
+ var c7 = initContract();
2102
+ var agentEventSchema = z10.object({
2103
+ type: z10.string(),
2104
+ sequenceNumber: z10.number().int().nonnegative()
1988
2105
  }).passthrough();
1989
- var artifactSnapshotSchema = z9.object({
1990
- artifactName: z9.string(),
1991
- artifactVersion: z9.string()
2106
+ var artifactSnapshotSchema = z10.object({
2107
+ artifactName: z10.string(),
2108
+ artifactVersion: z10.string()
1992
2109
  });
1993
- var memorySnapshotSchema = z9.object({
1994
- memoryName: z9.string(),
1995
- memoryVersion: z9.string()
2110
+ var memorySnapshotSchema = z10.object({
2111
+ memoryName: z10.string(),
2112
+ memoryVersion: z10.string()
1996
2113
  });
1997
- var volumeVersionsSnapshotSchema = z9.object({
1998
- versions: z9.record(z9.string(), z9.string())
2114
+ var volumeVersionsSnapshotSchema = z10.object({
2115
+ versions: z10.record(z10.string(), z10.string())
1999
2116
  });
2000
- var webhookEventsContract = c6.router({
2117
+ var webhookEventsContract = c7.router({
2001
2118
  /**
2002
2119
  * POST /api/webhooks/agent/events
2003
2120
  * Receive agent events from sandbox
@@ -2006,15 +2123,15 @@ var webhookEventsContract = c6.router({
2006
2123
  method: "POST",
2007
2124
  path: "/api/webhooks/agent/events",
2008
2125
  headers: authHeadersSchema,
2009
- body: z9.object({
2010
- runId: z9.string().min(1, "runId is required"),
2011
- events: z9.array(agentEventSchema).min(1, "events array cannot be empty")
2126
+ body: z10.object({
2127
+ runId: z10.string().min(1, "runId is required"),
2128
+ events: z10.array(agentEventSchema).min(1, "events array cannot be empty")
2012
2129
  }),
2013
2130
  responses: {
2014
- 200: z9.object({
2015
- received: z9.number(),
2016
- firstSequence: z9.number(),
2017
- lastSequence: z9.number()
2131
+ 200: z10.object({
2132
+ received: z10.number(),
2133
+ firstSequence: z10.number(),
2134
+ lastSequence: z10.number()
2018
2135
  }),
2019
2136
  400: apiErrorSchema,
2020
2137
  401: apiErrorSchema,
@@ -2024,7 +2141,7 @@ var webhookEventsContract = c6.router({
2024
2141
  summary: "Receive agent events from sandbox"
2025
2142
  }
2026
2143
  });
2027
- var webhookCompleteContract = c6.router({
2144
+ var webhookCompleteContract = c7.router({
2028
2145
  /**
2029
2146
  * POST /api/webhooks/agent/complete
2030
2147
  * Handle agent run completion (success or failure)
@@ -2033,15 +2150,15 @@ var webhookCompleteContract = c6.router({
2033
2150
  method: "POST",
2034
2151
  path: "/api/webhooks/agent/complete",
2035
2152
  headers: authHeadersSchema,
2036
- body: z9.object({
2037
- runId: z9.string().min(1, "runId is required"),
2038
- exitCode: z9.number(),
2039
- error: z9.string().optional()
2153
+ body: z10.object({
2154
+ runId: z10.string().min(1, "runId is required"),
2155
+ exitCode: z10.number(),
2156
+ error: z10.string().optional()
2040
2157
  }),
2041
2158
  responses: {
2042
- 200: z9.object({
2043
- success: z9.boolean(),
2044
- status: z9.enum(["completed", "failed"])
2159
+ 200: z10.object({
2160
+ success: z10.boolean(),
2161
+ status: z10.enum(["completed", "failed"])
2045
2162
  }),
2046
2163
  400: apiErrorSchema,
2047
2164
  401: apiErrorSchema,
@@ -2051,7 +2168,7 @@ var webhookCompleteContract = c6.router({
2051
2168
  summary: "Handle agent run completion"
2052
2169
  }
2053
2170
  });
2054
- var webhookCheckpointsContract = c6.router({
2171
+ var webhookCheckpointsContract = c7.router({
2055
2172
  /**
2056
2173
  * POST /api/webhooks/agent/checkpoints
2057
2174
  * Create checkpoint for completed agent run
@@ -2060,23 +2177,23 @@ var webhookCheckpointsContract = c6.router({
2060
2177
  method: "POST",
2061
2178
  path: "/api/webhooks/agent/checkpoints",
2062
2179
  headers: authHeadersSchema,
2063
- body: z9.object({
2064
- runId: z9.string().min(1, "runId is required"),
2065
- cliAgentType: z9.string().min(1, "cliAgentType is required"),
2066
- cliAgentSessionId: z9.string().min(1, "cliAgentSessionId is required"),
2067
- cliAgentSessionHistory: z9.string().min(1, "cliAgentSessionHistory is required"),
2180
+ body: z10.object({
2181
+ runId: z10.string().min(1, "runId is required"),
2182
+ cliAgentType: z10.string().min(1, "cliAgentType is required"),
2183
+ cliAgentSessionId: z10.string().min(1, "cliAgentSessionId is required"),
2184
+ cliAgentSessionHistory: z10.string().min(1, "cliAgentSessionHistory is required"),
2068
2185
  artifactSnapshot: artifactSnapshotSchema.optional(),
2069
2186
  memorySnapshot: memorySnapshotSchema.optional(),
2070
2187
  volumeVersionsSnapshot: volumeVersionsSnapshotSchema.optional()
2071
2188
  }),
2072
2189
  responses: {
2073
- 200: z9.object({
2074
- checkpointId: z9.string(),
2075
- agentSessionId: z9.string(),
2076
- conversationId: z9.string(),
2190
+ 200: z10.object({
2191
+ checkpointId: z10.string(),
2192
+ agentSessionId: z10.string(),
2193
+ conversationId: z10.string(),
2077
2194
  artifact: artifactSnapshotSchema.optional(),
2078
2195
  memory: memorySnapshotSchema.optional(),
2079
- volumes: z9.record(z9.string(), z9.string()).optional()
2196
+ volumes: z10.record(z10.string(), z10.string()).optional()
2080
2197
  }),
2081
2198
  400: apiErrorSchema,
2082
2199
  401: apiErrorSchema,
@@ -2086,7 +2203,7 @@ var webhookCheckpointsContract = c6.router({
2086
2203
  summary: "Create checkpoint for agent run"
2087
2204
  }
2088
2205
  });
2089
- var webhookHeartbeatContract = c6.router({
2206
+ var webhookHeartbeatContract = c7.router({
2090
2207
  /**
2091
2208
  * POST /api/webhooks/agent/heartbeat
2092
2209
  * Receive heartbeat signals from sandbox
@@ -2095,12 +2212,12 @@ var webhookHeartbeatContract = c6.router({
2095
2212
  method: "POST",
2096
2213
  path: "/api/webhooks/agent/heartbeat",
2097
2214
  headers: authHeadersSchema,
2098
- body: z9.object({
2099
- runId: z9.string().min(1, "runId is required")
2215
+ body: z10.object({
2216
+ runId: z10.string().min(1, "runId is required")
2100
2217
  }),
2101
2218
  responses: {
2102
- 200: z9.object({
2103
- ok: z9.boolean()
2219
+ 200: z10.object({
2220
+ ok: z10.boolean()
2104
2221
  }),
2105
2222
  400: apiErrorSchema,
2106
2223
  401: apiErrorSchema,
@@ -2110,7 +2227,7 @@ var webhookHeartbeatContract = c6.router({
2110
2227
  summary: "Receive heartbeat from sandbox"
2111
2228
  }
2112
2229
  });
2113
- var webhookStoragesContract = c6.router({
2230
+ var webhookStoragesContract = c7.router({
2114
2231
  /**
2115
2232
  * POST /api/webhooks/agent/storages
2116
2233
  * Create a new version of a storage from sandbox
@@ -2126,13 +2243,13 @@ var webhookStoragesContract = c6.router({
2126
2243
  path: "/api/webhooks/agent/storages",
2127
2244
  headers: authHeadersSchema,
2128
2245
  contentType: "multipart/form-data",
2129
- body: c6.type(),
2246
+ body: c7.type(),
2130
2247
  responses: {
2131
- 200: z9.object({
2132
- versionId: z9.string(),
2133
- storageName: z9.string(),
2134
- size: z9.number(),
2135
- fileCount: z9.number()
2248
+ 200: z10.object({
2249
+ versionId: z10.string(),
2250
+ storageName: z10.string(),
2251
+ size: z10.number(),
2252
+ fileCount: z10.number()
2136
2253
  }),
2137
2254
  400: apiErrorSchema,
2138
2255
  401: apiErrorSchema,
@@ -2142,7 +2259,7 @@ var webhookStoragesContract = c6.router({
2142
2259
  summary: "Upload storage version from sandbox"
2143
2260
  }
2144
2261
  });
2145
- var webhookStoragesIncrementalContract = c6.router({
2262
+ var webhookStoragesIncrementalContract = c7.router({
2146
2263
  /**
2147
2264
  * POST /api/webhooks/agent/storages/incremental
2148
2265
  * Create a new version using incremental upload
@@ -2160,19 +2277,19 @@ var webhookStoragesIncrementalContract = c6.router({
2160
2277
  path: "/api/webhooks/agent/storages/incremental",
2161
2278
  headers: authHeadersSchema,
2162
2279
  contentType: "multipart/form-data",
2163
- body: c6.type(),
2280
+ body: c7.type(),
2164
2281
  responses: {
2165
- 200: z9.object({
2166
- versionId: z9.string(),
2167
- storageName: z9.string(),
2168
- size: z9.number(),
2169
- fileCount: z9.number(),
2170
- incrementalStats: z9.object({
2171
- addedFiles: z9.number(),
2172
- modifiedFiles: z9.number(),
2173
- deletedFiles: z9.number(),
2174
- unchangedFiles: z9.number(),
2175
- bytesUploaded: z9.number()
2282
+ 200: z10.object({
2283
+ versionId: z10.string(),
2284
+ storageName: z10.string(),
2285
+ size: z10.number(),
2286
+ fileCount: z10.number(),
2287
+ incrementalStats: z10.object({
2288
+ addedFiles: z10.number(),
2289
+ modifiedFiles: z10.number(),
2290
+ deletedFiles: z10.number(),
2291
+ unchangedFiles: z10.number(),
2292
+ bytesUploaded: z10.number()
2176
2293
  }).optional()
2177
2294
  }),
2178
2295
  400: apiErrorSchema,
@@ -2183,36 +2300,36 @@ var webhookStoragesIncrementalContract = c6.router({
2183
2300
  summary: "Upload storage version incrementally from sandbox"
2184
2301
  }
2185
2302
  });
2186
- var metricDataSchema = z9.object({
2187
- ts: z9.string(),
2188
- cpu: z9.number(),
2189
- mem_used: z9.number(),
2190
- mem_total: z9.number(),
2191
- disk_used: z9.number(),
2192
- disk_total: z9.number()
2303
+ var metricDataSchema = z10.object({
2304
+ ts: z10.string(),
2305
+ cpu: z10.number(),
2306
+ mem_used: z10.number(),
2307
+ mem_total: z10.number(),
2308
+ disk_used: z10.number(),
2309
+ disk_total: z10.number()
2193
2310
  });
2194
- var sandboxOperationSchema = z9.object({
2195
- ts: z9.string(),
2196
- action_type: z9.string(),
2197
- duration_ms: z9.number(),
2198
- success: z9.boolean(),
2199
- error: z9.string().optional()
2311
+ var sandboxOperationSchema = z10.object({
2312
+ ts: z10.string(),
2313
+ action_type: z10.string(),
2314
+ duration_ms: z10.number(),
2315
+ success: z10.boolean(),
2316
+ error: z10.string().optional()
2200
2317
  });
2201
- var networkLogSchema = z9.object({
2202
- timestamp: z9.string(),
2203
- mode: z9.literal("mitm").optional(),
2204
- action: z9.enum(["ALLOW", "DENY"]).optional(),
2205
- host: z9.string().optional(),
2206
- port: z9.number().optional(),
2207
- rule_matched: z9.string().nullable().optional(),
2208
- method: z9.string().optional(),
2209
- url: z9.string().optional(),
2210
- status: z9.number().optional(),
2211
- latency_ms: z9.number().optional(),
2212
- request_size: z9.number().optional(),
2213
- response_size: z9.number().optional()
2318
+ var networkLogSchema = z10.object({
2319
+ timestamp: z10.string(),
2320
+ mode: z10.literal("mitm").optional(),
2321
+ action: z10.enum(["ALLOW", "DENY"]).optional(),
2322
+ host: z10.string().optional(),
2323
+ port: z10.number().optional(),
2324
+ rule_matched: z10.string().nullable().optional(),
2325
+ method: z10.string().optional(),
2326
+ url: z10.string().optional(),
2327
+ status: z10.number().optional(),
2328
+ latency_ms: z10.number().optional(),
2329
+ request_size: z10.number().optional(),
2330
+ response_size: z10.number().optional()
2214
2331
  });
2215
- var webhookTelemetryContract = c6.router({
2332
+ var webhookTelemetryContract = c7.router({
2216
2333
  /**
2217
2334
  * POST /api/webhooks/agent/telemetry
2218
2335
  * Receive telemetry data (system log, metrics, network logs, and sandbox operations) from sandbox
@@ -2221,17 +2338,17 @@ var webhookTelemetryContract = c6.router({
2221
2338
  method: "POST",
2222
2339
  path: "/api/webhooks/agent/telemetry",
2223
2340
  headers: authHeadersSchema,
2224
- body: z9.object({
2225
- runId: z9.string().min(1, "runId is required"),
2226
- systemLog: z9.string().optional(),
2227
- metrics: z9.array(metricDataSchema).optional(),
2228
- networkLogs: z9.array(networkLogSchema).optional(),
2229
- sandboxOperations: z9.array(sandboxOperationSchema).optional()
2341
+ body: z10.object({
2342
+ runId: z10.string().min(1, "runId is required"),
2343
+ systemLog: z10.string().optional(),
2344
+ metrics: z10.array(metricDataSchema).optional(),
2345
+ networkLogs: z10.array(networkLogSchema).optional(),
2346
+ sandboxOperations: z10.array(sandboxOperationSchema).optional()
2230
2347
  }),
2231
2348
  responses: {
2232
- 200: z9.object({
2233
- success: z9.boolean(),
2234
- id: z9.string()
2349
+ 200: z10.object({
2350
+ success: z10.boolean(),
2351
+ id: z10.string()
2235
2352
  }),
2236
2353
  400: apiErrorSchema,
2237
2354
  401: apiErrorSchema,
@@ -2241,26 +2358,27 @@ var webhookTelemetryContract = c6.router({
2241
2358
  summary: "Receive telemetry data from sandbox"
2242
2359
  }
2243
2360
  });
2244
- var webhookStoragesPrepareContract = c6.router({
2361
+ var webhookStoragesPrepareContract = c7.router({
2245
2362
  prepare: {
2246
2363
  method: "POST",
2247
2364
  path: "/api/webhooks/agent/storages/prepare",
2248
2365
  headers: authHeadersSchema,
2249
- body: z9.object({
2250
- runId: z9.string().min(1, "runId is required"),
2366
+ body: z10.object({
2367
+ runId: z10.string().min(1, "runId is required"),
2251
2368
  // Required for webhook auth
2252
- storageName: z9.string().min(1, "Storage name is required"),
2369
+ storageName: z10.string().min(1, "Storage name is required"),
2253
2370
  storageType: storageTypeSchema,
2254
- files: z9.array(fileEntryWithHashSchema),
2255
- force: z9.boolean().optional(),
2256
- baseVersion: z9.string().optional(),
2371
+ files: z10.array(fileEntryWithHashSchema),
2372
+ parentVersionId: z10.string().optional(),
2373
+ force: z10.boolean().optional(),
2374
+ baseVersion: z10.string().optional(),
2257
2375
  changes: storageChangesSchema.optional()
2258
2376
  }),
2259
2377
  responses: {
2260
- 200: z9.object({
2261
- versionId: z9.string(),
2262
- existing: z9.boolean(),
2263
- uploads: z9.object({
2378
+ 200: z10.object({
2379
+ versionId: z10.string(),
2380
+ existing: z10.boolean(),
2381
+ uploads: z10.object({
2264
2382
  archive: presignedUploadSchema,
2265
2383
  manifest: presignedUploadSchema
2266
2384
  }).optional()
@@ -2274,28 +2392,29 @@ var webhookStoragesPrepareContract = c6.router({
2274
2392
  summary: "Prepare for direct S3 upload from sandbox"
2275
2393
  }
2276
2394
  });
2277
- var webhookStoragesCommitContract = c6.router({
2395
+ var webhookStoragesCommitContract = c7.router({
2278
2396
  commit: {
2279
2397
  method: "POST",
2280
2398
  path: "/api/webhooks/agent/storages/commit",
2281
2399
  headers: authHeadersSchema,
2282
- body: z9.object({
2283
- runId: z9.string().min(1, "runId is required"),
2400
+ body: z10.object({
2401
+ runId: z10.string().min(1, "runId is required"),
2284
2402
  // Required for webhook auth
2285
- storageName: z9.string().min(1, "Storage name is required"),
2403
+ storageName: z10.string().min(1, "Storage name is required"),
2286
2404
  storageType: storageTypeSchema,
2287
- versionId: z9.string().min(1, "Version ID is required"),
2288
- files: z9.array(fileEntryWithHashSchema),
2289
- message: z9.string().optional()
2405
+ versionId: z10.string().min(1, "Version ID is required"),
2406
+ parentVersionId: z10.string().optional(),
2407
+ files: z10.array(fileEntryWithHashSchema),
2408
+ message: z10.string().optional()
2290
2409
  }),
2291
2410
  responses: {
2292
- 200: z9.object({
2293
- success: z9.literal(true),
2294
- versionId: z9.string(),
2295
- storageName: z9.string(),
2296
- size: z9.number(),
2297
- fileCount: z9.number(),
2298
- deduplicated: z9.boolean().optional()
2411
+ 200: z10.object({
2412
+ success: z10.literal(true),
2413
+ versionId: z10.string(),
2414
+ storageName: z10.string(),
2415
+ size: z10.number(),
2416
+ fileCount: z10.number(),
2417
+ deduplicated: z10.boolean().optional()
2299
2418
  }),
2300
2419
  400: apiErrorSchema,
2301
2420
  401: apiErrorSchema,
@@ -2310,13 +2429,13 @@ var webhookStoragesCommitContract = c6.router({
2310
2429
  });
2311
2430
 
2312
2431
  // ../../packages/core/src/contracts/cli-auth.ts
2313
- import { z as z10 } from "zod";
2314
- var c7 = initContract();
2315
- var oauthErrorSchema = z10.object({
2316
- error: z10.string(),
2317
- error_description: z10.string()
2432
+ import { z as z11 } from "zod";
2433
+ var c8 = initContract();
2434
+ var oauthErrorSchema = z11.object({
2435
+ error: z11.string(),
2436
+ error_description: z11.string()
2318
2437
  });
2319
- var cliAuthDeviceContract = c7.router({
2438
+ var cliAuthDeviceContract = c8.router({
2320
2439
  /**
2321
2440
  * POST /api/cli/auth/device
2322
2441
  * Initiate device authorization flow
@@ -2324,21 +2443,21 @@ var cliAuthDeviceContract = c7.router({
2324
2443
  create: {
2325
2444
  method: "POST",
2326
2445
  path: "/api/cli/auth/device",
2327
- body: z10.object({}).optional(),
2446
+ body: z11.object({}).optional(),
2328
2447
  responses: {
2329
- 200: z10.object({
2330
- device_code: z10.string(),
2331
- user_code: z10.string(),
2332
- verification_path: z10.string(),
2333
- expires_in: z10.number(),
2334
- interval: z10.number()
2448
+ 200: z11.object({
2449
+ device_code: z11.string(),
2450
+ user_code: z11.string(),
2451
+ verification_path: z11.string(),
2452
+ expires_in: z11.number(),
2453
+ interval: z11.number()
2335
2454
  }),
2336
2455
  500: oauthErrorSchema
2337
2456
  },
2338
2457
  summary: "Initiate device authorization flow"
2339
2458
  }
2340
2459
  });
2341
- var cliAuthTokenContract = c7.router({
2460
+ var cliAuthTokenContract = c8.router({
2342
2461
  /**
2343
2462
  * POST /api/cli/auth/token
2344
2463
  * Exchange device code for access token
@@ -2346,16 +2465,16 @@ var cliAuthTokenContract = c7.router({
2346
2465
  exchange: {
2347
2466
  method: "POST",
2348
2467
  path: "/api/cli/auth/token",
2349
- body: z10.object({
2350
- device_code: z10.string().min(1, "device_code is required")
2468
+ body: z11.object({
2469
+ device_code: z11.string().min(1, "device_code is required")
2351
2470
  }),
2352
2471
  responses: {
2353
2472
  // Success - token issued
2354
- 200: z10.object({
2355
- access_token: z10.string(),
2356
- token_type: z10.literal("Bearer"),
2357
- expires_in: z10.number(),
2358
- org_slug: z10.string().optional()
2473
+ 200: z11.object({
2474
+ access_token: z11.string(),
2475
+ token_type: z11.literal("Bearer"),
2476
+ expires_in: z11.number(),
2477
+ org_slug: z11.string().optional()
2359
2478
  }),
2360
2479
  // Authorization pending
2361
2480
  202: oauthErrorSchema,
@@ -2368,9 +2487,9 @@ var cliAuthTokenContract = c7.router({
2368
2487
  });
2369
2488
 
2370
2489
  // ../../packages/core/src/contracts/auth.ts
2371
- import { z as z11 } from "zod";
2372
- var c8 = initContract();
2373
- var authContract = c8.router({
2490
+ import { z as z12 } from "zod";
2491
+ var c9 = initContract();
2492
+ var authContract = c9.router({
2374
2493
  /**
2375
2494
  * GET /api/auth/me
2376
2495
  * Get current user information
@@ -2380,9 +2499,9 @@ var authContract = c8.router({
2380
2499
  path: "/api/auth/me",
2381
2500
  headers: authHeadersSchema,
2382
2501
  responses: {
2383
- 200: z11.object({
2384
- userId: z11.string(),
2385
- email: z11.string()
2502
+ 200: z12.object({
2503
+ userId: z12.string(),
2504
+ email: z12.string()
2386
2505
  }),
2387
2506
  401: apiErrorSchema,
2388
2507
  403: apiErrorSchema,
@@ -2394,23 +2513,21 @@ var authContract = c8.router({
2394
2513
  });
2395
2514
 
2396
2515
  // ../../packages/core/src/contracts/cron.ts
2397
- import { z as z12 } from "zod";
2398
- var c9 = initContract();
2399
- var cleanupResultSchema = z12.object({
2400
- runId: z12.string(),
2401
- sandboxId: z12.string().nullable(),
2402
- status: z12.enum(["cleaned", "error"]),
2403
- error: z12.string().optional(),
2404
- reason: z12.string().optional()
2516
+ import { z as z13 } from "zod";
2517
+ var c10 = initContract();
2518
+ var cleanupResultSchema = z13.object({
2519
+ runId: z13.string(),
2520
+ sandboxId: z13.string().nullable(),
2521
+ status: z13.enum(["cleaned", "error"]),
2522
+ error: z13.string().optional(),
2523
+ reason: z13.string().optional()
2405
2524
  });
2406
- var cleanupResponseSchema = z12.object({
2407
- cleaned: z12.number(),
2408
- errors: z12.number(),
2409
- results: z12.array(cleanupResultSchema),
2410
- composeJobsCleaned: z12.number(),
2411
- composeJobErrors: z12.number()
2525
+ var cleanupResponseSchema = z13.object({
2526
+ cleaned: z13.number(),
2527
+ errors: z13.number(),
2528
+ results: z13.array(cleanupResultSchema)
2412
2529
  });
2413
- var cronCleanupSandboxesContract = c9.router({
2530
+ var cronCleanupSandboxesContract = c10.router({
2414
2531
  /**
2415
2532
  * GET /api/cron/cleanup-sandboxes
2416
2533
  * Cron job to cleanup sandboxes that have stopped sending heartbeats
@@ -2429,30 +2546,30 @@ var cronCleanupSandboxesContract = c9.router({
2429
2546
  });
2430
2547
 
2431
2548
  // ../../packages/core/src/contracts/secrets.ts
2432
- import { z as z13 } from "zod";
2433
- var c10 = initContract();
2434
- var secretNameSchema = z13.string().min(1, "Secret name is required").max(255, "Secret name must be at most 255 characters").regex(
2549
+ import { z as z14 } from "zod";
2550
+ var c11 = initContract();
2551
+ var secretNameSchema = z14.string().min(1, "Secret name is required").max(255, "Secret name must be at most 255 characters").regex(
2435
2552
  /^[A-Z][A-Z0-9_]*$/,
2436
2553
  "Secret name must contain only uppercase letters, numbers, and underscores, and must start with a letter (e.g., MY_API_KEY)"
2437
2554
  );
2438
- var secretTypeSchema = z13.enum(["user", "model-provider", "connector"]);
2439
- var secretResponseSchema = z13.object({
2440
- id: z13.uuid(),
2441
- name: z13.string(),
2442
- description: z13.string().nullable(),
2555
+ var secretTypeSchema = z14.enum(["user", "model-provider", "connector"]);
2556
+ var secretResponseSchema = z14.object({
2557
+ id: z14.uuid(),
2558
+ name: z14.string(),
2559
+ description: z14.string().nullable(),
2443
2560
  type: secretTypeSchema,
2444
- createdAt: z13.string(),
2445
- updatedAt: z13.string()
2561
+ createdAt: z14.string(),
2562
+ updatedAt: z14.string()
2446
2563
  });
2447
- var secretListResponseSchema = z13.object({
2448
- secrets: z13.array(secretResponseSchema)
2564
+ var secretListResponseSchema = z14.object({
2565
+ secrets: z14.array(secretResponseSchema)
2449
2566
  });
2450
- var setSecretRequestSchema = z13.object({
2567
+ var setSecretRequestSchema = z14.object({
2451
2568
  name: secretNameSchema,
2452
- value: z13.string().min(1, "Secret value is required"),
2453
- description: z13.string().max(1e3).optional()
2569
+ value: z14.string().min(1, "Secret value is required"),
2570
+ description: z14.string().max(1e3).optional()
2454
2571
  });
2455
- var secretsMainContract = c10.router({
2572
+ var secretsMainContract = c11.router({
2456
2573
  /**
2457
2574
  * GET /api/secrets
2458
2575
  * List all secrets for the current user's org (metadata only)
@@ -2487,7 +2604,7 @@ var secretsMainContract = c10.router({
2487
2604
  summary: "Create or update a secret"
2488
2605
  }
2489
2606
  });
2490
- var secretsByNameContract = c10.router({
2607
+ var secretsByNameContract = c11.router({
2491
2608
  /**
2492
2609
  * GET /api/secrets/:name
2493
2610
  * Get a secret by name (metadata only)
@@ -2496,7 +2613,7 @@ var secretsByNameContract = c10.router({
2496
2613
  method: "GET",
2497
2614
  path: "/api/secrets/:name",
2498
2615
  headers: authHeadersSchema,
2499
- pathParams: z13.object({
2616
+ pathParams: z14.object({
2500
2617
  name: secretNameSchema
2501
2618
  }),
2502
2619
  responses: {
@@ -2515,11 +2632,11 @@ var secretsByNameContract = c10.router({
2515
2632
  method: "DELETE",
2516
2633
  path: "/api/secrets/:name",
2517
2634
  headers: authHeadersSchema,
2518
- pathParams: z13.object({
2635
+ pathParams: z14.object({
2519
2636
  name: secretNameSchema
2520
2637
  }),
2521
2638
  responses: {
2522
- 204: c10.noBody(),
2639
+ 204: c11.noBody(),
2523
2640
  401: apiErrorSchema,
2524
2641
  404: apiErrorSchema,
2525
2642
  500: apiErrorSchema
@@ -2529,29 +2646,29 @@ var secretsByNameContract = c10.router({
2529
2646
  });
2530
2647
 
2531
2648
  // ../../packages/core/src/contracts/variables.ts
2532
- import { z as z14 } from "zod";
2533
- var c11 = initContract();
2534
- var variableNameSchema = z14.string().min(1, "Variable name is required").max(255, "Variable name must be at most 255 characters").regex(
2649
+ import { z as z15 } from "zod";
2650
+ var c12 = initContract();
2651
+ var variableNameSchema = z15.string().min(1, "Variable name is required").max(255, "Variable name must be at most 255 characters").regex(
2535
2652
  /^[A-Z][A-Z0-9_]*$/,
2536
2653
  "Variable name must contain only uppercase letters, numbers, and underscores, and must start with a letter (e.g., MY_VAR)"
2537
2654
  );
2538
- var variableResponseSchema = z14.object({
2539
- id: z14.uuid(),
2540
- name: z14.string(),
2541
- value: z14.string(),
2542
- description: z14.string().nullable(),
2543
- createdAt: z14.string(),
2544
- updatedAt: z14.string()
2655
+ var variableResponseSchema = z15.object({
2656
+ id: z15.uuid(),
2657
+ name: z15.string(),
2658
+ value: z15.string(),
2659
+ description: z15.string().nullable(),
2660
+ createdAt: z15.string(),
2661
+ updatedAt: z15.string()
2545
2662
  });
2546
- var variableListResponseSchema = z14.object({
2547
- variables: z14.array(variableResponseSchema)
2663
+ var variableListResponseSchema = z15.object({
2664
+ variables: z15.array(variableResponseSchema)
2548
2665
  });
2549
- var setVariableRequestSchema = z14.object({
2666
+ var setVariableRequestSchema = z15.object({
2550
2667
  name: variableNameSchema,
2551
- value: z14.string().min(1, "Variable value is required"),
2552
- description: z14.string().max(1e3).optional()
2668
+ value: z15.string().min(1, "Variable value is required"),
2669
+ description: z15.string().max(1e3).optional()
2553
2670
  });
2554
- var variablesMainContract = c11.router({
2671
+ var variablesMainContract = c12.router({
2555
2672
  /**
2556
2673
  * GET /api/variables
2557
2674
  * List all variables for the current user's org (includes values)
@@ -2586,7 +2703,7 @@ var variablesMainContract = c11.router({
2586
2703
  summary: "Create or update a variable"
2587
2704
  }
2588
2705
  });
2589
- var variablesByNameContract = c11.router({
2706
+ var variablesByNameContract = c12.router({
2590
2707
  /**
2591
2708
  * GET /api/variables/:name
2592
2709
  * Get a variable by name (includes value)
@@ -2595,7 +2712,7 @@ var variablesByNameContract = c11.router({
2595
2712
  method: "GET",
2596
2713
  path: "/api/variables/:name",
2597
2714
  headers: authHeadersSchema,
2598
- pathParams: z14.object({
2715
+ pathParams: z15.object({
2599
2716
  name: variableNameSchema
2600
2717
  }),
2601
2718
  responses: {
@@ -2614,11 +2731,11 @@ var variablesByNameContract = c11.router({
2614
2731
  method: "DELETE",
2615
2732
  path: "/api/variables/:name",
2616
2733
  headers: authHeadersSchema,
2617
- pathParams: z14.object({
2734
+ pathParams: z15.object({
2618
2735
  name: variableNameSchema
2619
2736
  }),
2620
2737
  responses: {
2621
- 204: c11.noBody(),
2738
+ 204: c12.noBody(),
2622
2739
  401: apiErrorSchema,
2623
2740
  404: apiErrorSchema,
2624
2741
  500: apiErrorSchema
@@ -2628,7 +2745,30 @@ var variablesByNameContract = c11.router({
2628
2745
  });
2629
2746
 
2630
2747
  // ../../packages/core/src/contracts/model-providers.ts
2631
- import { z as z15 } from "zod";
2748
+ import { z as z16 } from "zod";
2749
+ var VM0_MODEL_TO_PROVIDER = {
2750
+ "claude-sonnet-4.6": {
2751
+ concreteType: "anthropic-api-key",
2752
+ vendor: "anthropic"
2753
+ },
2754
+ "claude-opus-4.6": {
2755
+ concreteType: "anthropic-api-key",
2756
+ vendor: "anthropic"
2757
+ },
2758
+ "kimi-k2.5": { concreteType: "moonshot-api-key", vendor: "moonshot" },
2759
+ "kimi-k2-thinking-turbo": {
2760
+ concreteType: "moonshot-api-key",
2761
+ vendor: "moonshot"
2762
+ },
2763
+ "kimi-k2-thinking": {
2764
+ concreteType: "moonshot-api-key",
2765
+ vendor: "moonshot"
2766
+ },
2767
+ "glm-5": { concreteType: "zai-api-key", vendor: "zai" },
2768
+ "glm-4.7": { concreteType: "zai-api-key", vendor: "zai" },
2769
+ "glm-4.5-air": { concreteType: "zai-api-key", vendor: "zai" },
2770
+ "MiniMax-M2.1": { concreteType: "minimax-api-key", vendor: "minimax" }
2771
+ };
2632
2772
  var MODEL_PROVIDER_TYPES = {
2633
2773
  "claude-code-oauth-token": {
2634
2774
  framework: "claude-code",
@@ -2877,21 +3017,126 @@ var MODEL_PROVIDER_TYPES = {
2877
3017
  defaultModel: "",
2878
3018
  allowCustomModel: true,
2879
3019
  customModelPlaceholder: "anthropic.claude-sonnet-4-20250514-v1:0"
3020
+ },
3021
+ vm0: {
3022
+ framework: "claude-code",
3023
+ label: "VM0 Managed",
3024
+ models: Object.keys(VM0_MODEL_TO_PROVIDER),
3025
+ defaultModel: "claude-sonnet-4.6"
2880
3026
  }
2881
3027
  };
2882
- var modelProviderTypeSchema = z15.enum([
2883
- "claude-code-oauth-token",
2884
- "anthropic-api-key",
2885
- "openrouter-api-key",
2886
- "moonshot-api-key",
2887
- "minimax-api-key",
2888
- "deepseek-api-key",
2889
- "zai-api-key",
3028
+ var HIDDEN_PROVIDER_TYPES = /* @__PURE__ */ new Set([
3029
+ "aws-bedrock",
3030
+ "azure-foundry"
3031
+ ]);
3032
+ function getSelectableProviderTypes() {
3033
+ return Object.keys(MODEL_PROVIDER_TYPES).filter(
3034
+ (type2) => !HIDDEN_PROVIDER_TYPES.has(type2)
3035
+ );
3036
+ }
3037
+ var ANTHROPIC_API_BASE = "https://api.anthropic.com";
3038
+ function getFirewallBaseUrl(type2) {
3039
+ return getEnvironmentMapping(type2)?.ANTHROPIC_BASE_URL ?? ANTHROPIC_API_BASE;
3040
+ }
3041
+ function mpFirewall(type2, authHeaders, placeholders) {
3042
+ return {
3043
+ name: `model-provider:${type2}`,
3044
+ ref: "__auto__",
3045
+ apis: [
3046
+ {
3047
+ base: getFirewallBaseUrl(type2),
3048
+ auth: { headers: authHeaders },
3049
+ permissions: [{ name: "all", rules: ["ANY /{path*}"] }]
3050
+ }
3051
+ ],
3052
+ placeholders
3053
+ };
3054
+ }
3055
+ var MODEL_PROVIDER_FIREWALL_CONFIGS = {
3056
+ // Placeholder: sk-ant-api03-{93 word/hyphen chars}AA (108 chars total)
3057
+ // Source: Semgrep regex \Bsk-ant-api03-[\w\-]{93}AA\B
3058
+ // https://semgrep.dev/blog/2025/secrets-story-and-prefixed-secrets/
3059
+ "anthropic-api-key": mpFirewall(
3060
+ "anthropic-api-key",
3061
+ { "x-api-key": "${{ secrets.ANTHROPIC_API_KEY }}" },
3062
+ {
3063
+ ANTHROPIC_API_KEY: "sk-ant-api03-vm0placeholder0000000000000000000000000000000000000000000000000000000000000000000000000000000AA"
3064
+ }
3065
+ ),
3066
+ // Placeholder: sk-ant-oat01-{93 word/hyphen chars}AA (108 chars total)
3067
+ // Source: same structure as API key; prefix from claude setup-token output
3068
+ // https://github.com/anthropics/claude-code/issues/18340
3069
+ // Example: sk-ant-oat01-xxxxx...xxxxx (1-year OAuth token)
3070
+ "claude-code-oauth-token": mpFirewall(
3071
+ "claude-code-oauth-token",
3072
+ { Authorization: "Bearer ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}" },
3073
+ {
3074
+ CLAUDE_CODE_OAUTH_TOKEN: "sk-ant-oat01-vm0placeholder0000000000000000000000000000000000000000000000000000000000000000000000000000000AA"
3075
+ }
3076
+ ),
3077
+ // Placeholder: sk-or-v1-{64 hex chars} (73 chars total)
3078
+ // Source: real key observed in GitHub issue
3079
+ // https://github.com/continuedev/continue/issues/6191
3080
+ // Example: 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
3081
+ "openrouter-api-key": mpFirewall(
3082
+ "openrouter-api-key",
3083
+ { Authorization: "Bearer ${{ secrets.OPENROUTER_API_KEY }}" },
3084
+ {
3085
+ OPENROUTER_API_KEY: "sk-or-v1-vm0placeholder00000000000000000000000000000000000000000000000000"
3086
+ }
3087
+ ),
3088
+ // Placeholder: sk-{32 chars} (35 chars total)
3089
+ // Source: no authoritative format documentation found; using generic sk- prefix
3090
+ "moonshot-api-key": mpFirewall(
3091
+ "moonshot-api-key",
3092
+ { Authorization: "Bearer ${{ secrets.MOONSHOT_API_KEY }}" },
3093
+ { MOONSHOT_API_KEY: "sk-vm0placeholder000000000000000000" }
3094
+ ),
3095
+ // Placeholder: eyJ... (JWT-style, variable length)
3096
+ // Source: no authoritative format documentation found; MiniMax docs do not disclose key format
3097
+ // https://platform.minimax.io/docs/api-reference/api-overview
3098
+ "minimax-api-key": mpFirewall(
3099
+ "minimax-api-key",
3100
+ { Authorization: "Bearer ${{ secrets.MINIMAX_API_KEY }}" },
3101
+ { MINIMAX_API_KEY: "eyvm0placeholder000000000000000000000000000000000000" }
3102
+ ),
3103
+ // Placeholder: sk-{32 hex chars} (35 chars total)
3104
+ // Source: Semgrep regex \bsk-[a-f0-9]{32}\b
3105
+ // https://semgrep.dev/blog/2025/secrets-story-and-prefixed-secrets/
3106
+ "deepseek-api-key": mpFirewall(
3107
+ "deepseek-api-key",
3108
+ { Authorization: "Bearer ${{ secrets.DEEPSEEK_API_KEY }}" },
3109
+ { DEEPSEEK_API_KEY: "sk-vm0placeholder000000000000000000" }
3110
+ ),
3111
+ // Placeholder: sk-{32 chars} (35 chars total)
3112
+ // Source: no authoritative format documentation found; using generic sk- prefix
3113
+ "zai-api-key": mpFirewall(
3114
+ "zai-api-key",
3115
+ { Authorization: "Bearer ${{ secrets.ZAI_API_KEY }}" },
3116
+ { ZAI_API_KEY: "sk-vm0placeholder000000000000000000" }
3117
+ ),
3118
+ // Placeholder: sk-{32 chars} (35 chars total)
3119
+ // Source: no authoritative format documentation found; Vercel gateway proxies upstream providers
3120
+ "vercel-ai-gateway": mpFirewall(
3121
+ "vercel-ai-gateway",
3122
+ { Authorization: "Bearer ${{ secrets.VERCEL_AI_GATEWAY_API_KEY }}" },
3123
+ { VERCEL_AI_GATEWAY_API_KEY: "sk-vm0placeholder000000000000000000" }
3124
+ )
3125
+ };
3126
+ var modelProviderTypeSchema = z16.enum([
3127
+ "claude-code-oauth-token",
3128
+ "anthropic-api-key",
3129
+ "openrouter-api-key",
3130
+ "moonshot-api-key",
3131
+ "minimax-api-key",
3132
+ "deepseek-api-key",
3133
+ "zai-api-key",
2890
3134
  "vercel-ai-gateway",
2891
3135
  "azure-foundry",
2892
- "aws-bedrock"
3136
+ "aws-bedrock",
3137
+ "vm0"
2893
3138
  ]);
2894
- var modelProviderFrameworkSchema = z15.enum(["claude-code"]);
3139
+ var modelProviderFrameworkSchema = z16.enum(["claude-code"]);
2895
3140
  function hasAuthMethods(type2) {
2896
3141
  const config = MODEL_PROVIDER_TYPES[type2];
2897
3142
  return "authMethods" in config;
@@ -2912,6 +3157,10 @@ function getSecretsForAuthMethod(type2, authMethod) {
2912
3157
  const method = authMethods[authMethod];
2913
3158
  return method?.secrets;
2914
3159
  }
3160
+ function getEnvironmentMapping(type2) {
3161
+ const config = MODEL_PROVIDER_TYPES[type2];
3162
+ return "environmentMapping" in config ? config.environmentMapping : void 0;
3163
+ }
2915
3164
  function getModels(type2) {
2916
3165
  const config = MODEL_PROVIDER_TYPES[type2];
2917
3166
  return "models" in config ? config.models : void 0;
@@ -2932,91 +3181,91 @@ function getCustomModelPlaceholder(type2) {
2932
3181
  const config = MODEL_PROVIDER_TYPES[type2];
2933
3182
  return "customModelPlaceholder" in config ? config.customModelPlaceholder : void 0;
2934
3183
  }
2935
- var modelProviderResponseSchema = z15.object({
2936
- id: z15.uuid(),
3184
+ var modelProviderResponseSchema = z16.object({
3185
+ id: z16.uuid(),
2937
3186
  type: modelProviderTypeSchema,
2938
3187
  framework: modelProviderFrameworkSchema,
2939
- secretName: z15.string().nullable(),
3188
+ secretName: z16.string().nullable(),
2940
3189
  // Legacy single-secret (deprecated for multi-auth)
2941
- authMethod: z15.string().nullable(),
3190
+ authMethod: z16.string().nullable(),
2942
3191
  // For multi-auth providers
2943
- secretNames: z15.array(z15.string()).nullable(),
3192
+ secretNames: z16.array(z16.string()).nullable(),
2944
3193
  // For multi-auth providers
2945
- isDefault: z15.boolean(),
2946
- selectedModel: z15.string().nullable(),
2947
- createdAt: z15.string(),
2948
- updatedAt: z15.string()
3194
+ isDefault: z16.boolean(),
3195
+ selectedModel: z16.string().nullable(),
3196
+ createdAt: z16.string(),
3197
+ updatedAt: z16.string()
2949
3198
  });
2950
- var modelProviderListResponseSchema = z15.object({
2951
- modelProviders: z15.array(modelProviderResponseSchema)
3199
+ var modelProviderListResponseSchema = z16.object({
3200
+ modelProviders: z16.array(modelProviderResponseSchema)
2952
3201
  });
2953
- var upsertModelProviderRequestSchema = z15.object({
3202
+ var upsertModelProviderRequestSchema = z16.object({
2954
3203
  type: modelProviderTypeSchema,
2955
- secret: z15.string().min(1).optional(),
3204
+ secret: z16.string().min(1).optional(),
2956
3205
  // Legacy single secret
2957
- authMethod: z15.string().optional(),
3206
+ authMethod: z16.string().optional(),
2958
3207
  // For multi-auth providers
2959
- secrets: z15.record(z15.string(), z15.string()).optional(),
3208
+ secrets: z16.record(z16.string(), z16.string()).optional(),
2960
3209
  // For multi-auth providers
2961
- selectedModel: z15.string().optional()
3210
+ selectedModel: z16.string().optional()
2962
3211
  });
2963
- var upsertModelProviderResponseSchema = z15.object({
3212
+ var upsertModelProviderResponseSchema = z16.object({
2964
3213
  provider: modelProviderResponseSchema,
2965
- created: z15.boolean()
3214
+ created: z16.boolean()
2966
3215
  });
2967
- var updateModelRequestSchema = z15.object({
2968
- selectedModel: z15.string().optional()
3216
+ var updateModelRequestSchema = z16.object({
3217
+ selectedModel: z16.string().optional()
2969
3218
  });
2970
3219
 
2971
3220
  // ../../packages/core/src/contracts/sessions.ts
2972
- import { z as z16 } from "zod";
2973
- var c12 = initContract();
2974
- var storedChatMessageSchema = z16.object({
2975
- role: z16.enum(["user", "assistant"]),
2976
- content: z16.string(),
2977
- runId: z16.string().optional(),
2978
- summaries: z16.array(z16.string()).optional(),
2979
- createdAt: z16.string()
3221
+ import { z as z17 } from "zod";
3222
+ var c13 = initContract();
3223
+ var storedChatMessageSchema = z17.object({
3224
+ role: z17.enum(["user", "assistant"]),
3225
+ content: z17.string(),
3226
+ runId: z17.string().optional(),
3227
+ summaries: z17.array(z17.string()).optional(),
3228
+ createdAt: z17.string()
2980
3229
  });
2981
- var sessionResponseSchema = z16.object({
2982
- id: z16.string(),
2983
- agentComposeId: z16.string(),
2984
- conversationId: z16.string().nullable(),
2985
- artifactName: z16.string().nullable(),
2986
- secretNames: z16.array(z16.string()).nullable(),
2987
- chatMessages: z16.array(storedChatMessageSchema).optional(),
2988
- createdAt: z16.string(),
2989
- updatedAt: z16.string()
3230
+ var sessionResponseSchema = z17.object({
3231
+ id: z17.string(),
3232
+ agentComposeId: z17.string(),
3233
+ conversationId: z17.string().nullable(),
3234
+ artifactName: z17.string().nullable(),
3235
+ secretNames: z17.array(z17.string()).nullable(),
3236
+ chatMessages: z17.array(storedChatMessageSchema).optional(),
3237
+ createdAt: z17.string(),
3238
+ updatedAt: z17.string()
2990
3239
  });
2991
- var sessionListItemSchema = z16.object({
2992
- id: z16.string(),
2993
- createdAt: z16.string(),
2994
- updatedAt: z16.string(),
2995
- messageCount: z16.number(),
2996
- preview: z16.string().nullable()
3240
+ var sessionListItemSchema = z17.object({
3241
+ id: z17.string(),
3242
+ createdAt: z17.string(),
3243
+ updatedAt: z17.string(),
3244
+ messageCount: z17.number(),
3245
+ preview: z17.string().nullable()
2997
3246
  });
2998
- var agentComposeSnapshotSchema = z16.object({
2999
- agentComposeVersionId: z16.string(),
3000
- vars: z16.record(z16.string(), z16.string()).optional(),
3001
- secretNames: z16.array(z16.string()).optional()
3247
+ var agentComposeSnapshotSchema = z17.object({
3248
+ agentComposeVersionId: z17.string(),
3249
+ vars: z17.record(z17.string(), z17.string()).optional(),
3250
+ secretNames: z17.array(z17.string()).optional()
3002
3251
  });
3003
- var artifactSnapshotSchema2 = z16.object({
3004
- artifactName: z16.string(),
3005
- artifactVersion: z16.string()
3252
+ var artifactSnapshotSchema2 = z17.object({
3253
+ artifactName: z17.string(),
3254
+ artifactVersion: z17.string()
3006
3255
  });
3007
- var volumeVersionsSnapshotSchema2 = z16.object({
3008
- versions: z16.record(z16.string(), z16.string())
3256
+ var volumeVersionsSnapshotSchema2 = z17.object({
3257
+ versions: z17.record(z17.string(), z17.string())
3009
3258
  });
3010
- var checkpointResponseSchema = z16.object({
3011
- id: z16.string(),
3012
- runId: z16.string(),
3013
- conversationId: z16.string(),
3259
+ var checkpointResponseSchema = z17.object({
3260
+ id: z17.string(),
3261
+ runId: z17.string(),
3262
+ conversationId: z17.string(),
3014
3263
  agentComposeSnapshot: agentComposeSnapshotSchema,
3015
3264
  artifactSnapshot: artifactSnapshotSchema2.nullable(),
3016
3265
  volumeVersionsSnapshot: volumeVersionsSnapshotSchema2.nullable(),
3017
- createdAt: z16.string()
3266
+ createdAt: z17.string()
3018
3267
  });
3019
- var sessionsContract = c12.router({
3268
+ var sessionsContract = c13.router({
3020
3269
  /**
3021
3270
  * GET /api/agent/sessions?agentComposeId=X
3022
3271
  * List chat sessions for an agent
@@ -3025,17 +3274,17 @@ var sessionsContract = c12.router({
3025
3274
  method: "GET",
3026
3275
  path: "/api/agent/sessions",
3027
3276
  headers: authHeadersSchema,
3028
- query: z16.object({
3029
- agentComposeId: z16.string().min(1, "agentComposeId is required")
3277
+ query: z17.object({
3278
+ agentComposeId: z17.string().min(1, "agentComposeId is required")
3030
3279
  }),
3031
3280
  responses: {
3032
- 200: z16.object({ sessions: z16.array(sessionListItemSchema) }),
3281
+ 200: z17.object({ sessions: z17.array(sessionListItemSchema) }),
3033
3282
  401: apiErrorSchema
3034
3283
  },
3035
3284
  summary: "List chat sessions for an agent"
3036
3285
  }
3037
3286
  });
3038
- var sessionsByIdContract = c12.router({
3287
+ var sessionsByIdContract = c13.router({
3039
3288
  /**
3040
3289
  * GET /api/agent/sessions/:id
3041
3290
  * Get session by ID
@@ -3044,8 +3293,8 @@ var sessionsByIdContract = c12.router({
3044
3293
  method: "GET",
3045
3294
  path: "/api/agent/sessions/:id",
3046
3295
  headers: authHeadersSchema,
3047
- pathParams: z16.object({
3048
- id: z16.string().min(1, "Session ID is required")
3296
+ pathParams: z17.object({
3297
+ id: z17.string().min(1, "Session ID is required")
3049
3298
  }),
3050
3299
  responses: {
3051
3300
  200: sessionResponseSchema,
@@ -3056,7 +3305,7 @@ var sessionsByIdContract = c12.router({
3056
3305
  summary: "Get session by ID"
3057
3306
  }
3058
3307
  });
3059
- var sessionMessagesContract = c12.router({
3308
+ var sessionMessagesContract = c13.router({
3060
3309
  /**
3061
3310
  * POST /api/agent/sessions/:id/messages
3062
3311
  * Append chat messages to a session
@@ -3065,20 +3314,20 @@ var sessionMessagesContract = c12.router({
3065
3314
  method: "POST",
3066
3315
  path: "/api/agent/sessions/:id/messages",
3067
3316
  headers: authHeadersSchema,
3068
- pathParams: z16.object({
3069
- id: z16.string().min(1, "Session ID is required")
3317
+ pathParams: z17.object({
3318
+ id: z17.string().min(1, "Session ID is required")
3070
3319
  }),
3071
- body: z16.object({
3072
- messages: z16.array(
3073
- z16.object({
3074
- role: z16.enum(["user", "assistant"]),
3075
- content: z16.string(),
3076
- runId: z16.string().optional()
3320
+ body: z17.object({
3321
+ messages: z17.array(
3322
+ z17.object({
3323
+ role: z17.enum(["user", "assistant"]),
3324
+ content: z17.string(),
3325
+ runId: z17.string().optional()
3077
3326
  })
3078
3327
  )
3079
3328
  }),
3080
3329
  responses: {
3081
- 200: z16.object({ success: z16.literal(true) }),
3330
+ 200: z17.object({ success: z17.literal(true) }),
3082
3331
  401: apiErrorSchema,
3083
3332
  403: apiErrorSchema,
3084
3333
  404: apiErrorSchema
@@ -3086,7 +3335,7 @@ var sessionMessagesContract = c12.router({
3086
3335
  summary: "Append chat messages to a session"
3087
3336
  }
3088
3337
  });
3089
- var checkpointsByIdContract = c12.router({
3338
+ var checkpointsByIdContract = c13.router({
3090
3339
  /**
3091
3340
  * GET /api/agent/checkpoints/:id
3092
3341
  * Get checkpoint by ID
@@ -3095,8 +3344,8 @@ var checkpointsByIdContract = c12.router({
3095
3344
  method: "GET",
3096
3345
  path: "/api/agent/checkpoints/:id",
3097
3346
  headers: authHeadersSchema,
3098
- pathParams: z16.object({
3099
- id: z16.string().min(1, "Checkpoint ID is required")
3347
+ pathParams: z17.object({
3348
+ id: z17.string().min(1, "Checkpoint ID is required")
3100
3349
  }),
3101
3350
  responses: {
3102
3351
  200: checkpointResponseSchema,
@@ -3109,48 +3358,48 @@ var checkpointsByIdContract = c12.router({
3109
3358
  });
3110
3359
 
3111
3360
  // ../../packages/core/src/contracts/chat-threads.ts
3112
- import { z as z17 } from "zod";
3113
- var c13 = initContract();
3114
- var chatThreadListItemSchema = z17.object({
3115
- id: z17.string(),
3116
- title: z17.string().nullable(),
3117
- preview: z17.string().nullable(),
3118
- createdAt: z17.string(),
3119
- updatedAt: z17.string()
3361
+ import { z as z18 } from "zod";
3362
+ var c14 = initContract();
3363
+ var chatThreadListItemSchema = z18.object({
3364
+ id: z18.string(),
3365
+ title: z18.string().nullable(),
3366
+ preview: z18.string().nullable(),
3367
+ createdAt: z18.string(),
3368
+ updatedAt: z18.string()
3120
3369
  });
3121
- var storedChatMessageSchema2 = z17.object({
3122
- role: z17.enum(["user", "assistant"]),
3123
- content: z17.string(),
3124
- runId: z17.string().optional(),
3125
- createdAt: z17.string()
3370
+ var storedChatMessageSchema2 = z18.object({
3371
+ role: z18.enum(["user", "assistant"]),
3372
+ content: z18.string(),
3373
+ runId: z18.string().optional(),
3374
+ createdAt: z18.string()
3126
3375
  });
3127
- var unsavedRunSchema = z17.object({
3128
- runId: z17.string(),
3129
- status: z17.string(),
3130
- prompt: z17.string(),
3131
- error: z17.string().nullable()
3376
+ var unsavedRunSchema = z18.object({
3377
+ runId: z18.string(),
3378
+ status: z18.string(),
3379
+ prompt: z18.string(),
3380
+ error: z18.string().nullable()
3132
3381
  });
3133
- var chatThreadDetailSchema = z17.object({
3134
- id: z17.string(),
3135
- title: z17.string().nullable(),
3136
- agentComposeId: z17.string(),
3137
- chatMessages: z17.array(storedChatMessageSchema2),
3138
- latestSessionId: z17.string().nullable(),
3139
- unsavedRuns: z17.array(unsavedRunSchema),
3140
- createdAt: z17.string(),
3141
- updatedAt: z17.string()
3382
+ var chatThreadDetailSchema = z18.object({
3383
+ id: z18.string(),
3384
+ title: z18.string().nullable(),
3385
+ agentComposeId: z18.string(),
3386
+ chatMessages: z18.array(storedChatMessageSchema2),
3387
+ latestSessionId: z18.string().nullable(),
3388
+ unsavedRuns: z18.array(unsavedRunSchema),
3389
+ createdAt: z18.string(),
3390
+ updatedAt: z18.string()
3142
3391
  });
3143
- var chatThreadsContract = c13.router({
3392
+ var chatThreadsContract = c14.router({
3144
3393
  create: {
3145
3394
  method: "POST",
3146
3395
  path: "/api/chat-threads",
3147
3396
  headers: authHeadersSchema,
3148
- body: z17.object({
3149
- agentComposeId: z17.string().min(1),
3150
- title: z17.string().optional()
3397
+ body: z18.object({
3398
+ agentComposeId: z18.string().min(1),
3399
+ title: z18.string().optional()
3151
3400
  }),
3152
3401
  responses: {
3153
- 201: z17.object({ id: z17.string(), createdAt: z17.string() }),
3402
+ 201: z18.object({ id: z18.string(), createdAt: z18.string() }),
3154
3403
  401: apiErrorSchema
3155
3404
  },
3156
3405
  summary: "Create a new chat thread"
@@ -3159,22 +3408,22 @@ var chatThreadsContract = c13.router({
3159
3408
  method: "GET",
3160
3409
  path: "/api/chat-threads",
3161
3410
  headers: authHeadersSchema,
3162
- query: z17.object({
3163
- agentComposeId: z17.string().min(1, "agentComposeId is required")
3411
+ query: z18.object({
3412
+ agentComposeId: z18.string().min(1, "agentComposeId is required")
3164
3413
  }),
3165
3414
  responses: {
3166
- 200: z17.object({ threads: z17.array(chatThreadListItemSchema) }),
3415
+ 200: z18.object({ threads: z18.array(chatThreadListItemSchema) }),
3167
3416
  401: apiErrorSchema
3168
3417
  },
3169
3418
  summary: "List chat threads for an agent"
3170
3419
  }
3171
3420
  });
3172
- var chatThreadByIdContract = c13.router({
3421
+ var chatThreadByIdContract = c14.router({
3173
3422
  get: {
3174
3423
  method: "GET",
3175
3424
  path: "/api/chat-threads/:id",
3176
3425
  headers: authHeadersSchema,
3177
- pathParams: z17.object({ id: z17.string() }),
3426
+ pathParams: z18.object({ id: z18.string() }),
3178
3427
  responses: {
3179
3428
  200: chatThreadDetailSchema,
3180
3429
  401: apiErrorSchema,
@@ -3183,17 +3432,17 @@ var chatThreadByIdContract = c13.router({
3183
3432
  summary: "Get chat thread detail with messages"
3184
3433
  }
3185
3434
  });
3186
- var chatThreadRunsContract = c13.router({
3435
+ var chatThreadRunsContract = c14.router({
3187
3436
  addRun: {
3188
3437
  method: "POST",
3189
3438
  path: "/api/chat-threads/:id/runs",
3190
3439
  headers: authHeadersSchema,
3191
- pathParams: z17.object({ id: z17.string() }),
3192
- body: z17.object({
3193
- runId: z17.string().min(1)
3440
+ pathParams: z18.object({ id: z18.string() }),
3441
+ body: z18.object({
3442
+ runId: z18.string().min(1)
3194
3443
  }),
3195
3444
  responses: {
3196
- 204: z17.void(),
3445
+ 204: z18.void(),
3197
3446
  401: apiErrorSchema,
3198
3447
  404: apiErrorSchema
3199
3448
  },
@@ -3202,32 +3451,32 @@ var chatThreadRunsContract = c13.router({
3202
3451
  });
3203
3452
 
3204
3453
  // ../../packages/core/src/contracts/runners.ts
3205
- import { z as z18 } from "zod";
3206
- var c14 = initContract();
3207
- var runnerGroupSchema = z18.string().regex(
3454
+ import { z as z19 } from "zod";
3455
+ var c15 = initContract();
3456
+ var runnerGroupSchema = z19.string().regex(
3208
3457
  /^[a-z0-9-]+\/[a-z0-9-]+$/,
3209
3458
  "Runner group must be in org/name format (e.g., acme/production)"
3210
3459
  );
3211
- var jobSchema = z18.object({
3212
- runId: z18.uuid(),
3213
- prompt: z18.string(),
3214
- appendSystemPrompt: z18.string().nullable(),
3215
- agentComposeVersionId: z18.string().nullable(),
3216
- vars: z18.record(z18.string(), z18.string()).nullable(),
3217
- checkpointId: z18.uuid().nullable(),
3218
- experimentalProfile: z18.string().optional()
3460
+ var jobSchema = z19.object({
3461
+ runId: z19.uuid(),
3462
+ prompt: z19.string(),
3463
+ appendSystemPrompt: z19.string().nullable(),
3464
+ agentComposeVersionId: z19.string().nullable(),
3465
+ vars: z19.record(z19.string(), z19.string()).nullable(),
3466
+ checkpointId: z19.uuid().nullable(),
3467
+ experimentalProfile: z19.string().optional()
3219
3468
  });
3220
- var runnersPollContract = c14.router({
3469
+ var runnersPollContract = c15.router({
3221
3470
  poll: {
3222
3471
  method: "POST",
3223
3472
  path: "/api/runners/poll",
3224
3473
  headers: authHeadersSchema,
3225
- body: z18.object({
3474
+ body: z19.object({
3226
3475
  group: runnerGroupSchema,
3227
- profiles: z18.array(z18.string()).optional()
3476
+ profiles: z19.array(z19.string()).optional()
3228
3477
  }),
3229
3478
  responses: {
3230
- 200: z18.object({
3479
+ 200: z19.object({
3231
3480
  job: jobSchema.nullable()
3232
3481
  }),
3233
3482
  400: apiErrorSchema,
@@ -3237,101 +3486,105 @@ var runnersPollContract = c14.router({
3237
3486
  summary: "Poll for pending jobs (long-polling with 30s timeout)"
3238
3487
  }
3239
3488
  });
3240
- var storageEntrySchema = z18.object({
3241
- mountPath: z18.string(),
3242
- archiveUrl: z18.string().nullable()
3489
+ var storageEntrySchema = z19.object({
3490
+ mountPath: z19.string(),
3491
+ archiveUrl: z19.string().nullable()
3243
3492
  });
3244
- var artifactEntrySchema = z18.object({
3245
- mountPath: z18.string(),
3246
- archiveUrl: z18.string().nullable(),
3247
- vasStorageName: z18.string(),
3248
- vasVersionId: z18.string()
3493
+ var artifactEntrySchema = z19.object({
3494
+ mountPath: z19.string(),
3495
+ archiveUrl: z19.string().nullable(),
3496
+ vasStorageName: z19.string(),
3497
+ vasVersionId: z19.string()
3249
3498
  });
3250
- var storageManifestSchema = z18.object({
3251
- storages: z18.array(storageEntrySchema),
3499
+ var storageManifestSchema = z19.object({
3500
+ storages: z19.array(storageEntrySchema),
3252
3501
  artifact: artifactEntrySchema.nullable(),
3253
3502
  memory: artifactEntrySchema.nullable()
3254
3503
  });
3255
- var resumeSessionSchema = z18.object({
3256
- sessionId: z18.string(),
3257
- sessionHistory: z18.string()
3504
+ var resumeSessionSchema = z19.object({
3505
+ sessionId: z19.string(),
3506
+ sessionHistory: z19.string()
3258
3507
  });
3259
- var storedExecutionContextSchema = z18.object({
3260
- workingDir: z18.string(),
3508
+ var storedExecutionContextSchema = z19.object({
3509
+ workingDir: z19.string(),
3261
3510
  storageManifest: storageManifestSchema.nullable(),
3262
- environment: z18.record(z18.string(), z18.string()).nullable(),
3511
+ environment: z19.record(z19.string(), z19.string()).nullable(),
3263
3512
  resumeSession: resumeSessionSchema.nullable(),
3264
- encryptedSecrets: z18.string().nullable(),
3513
+ encryptedSecrets: z19.string().nullable(),
3265
3514
  // AES-256-GCM encrypted Record<string, string> (secret name → value)
3266
3515
  // Maps secret names to OAuth connector types for runtime token refresh (e.g. { "GMAIL_ACCESS_TOKEN": "gmail" })
3267
- secretConnectorMap: z18.record(z18.string(), z18.string()).nullable().optional(),
3268
- cliAgentType: z18.string(),
3516
+ secretConnectorMap: z19.record(z19.string(), z19.string()).nullable().optional(),
3517
+ cliAgentType: z19.string(),
3269
3518
  // Debug flag to force real Claude in mock environments (internal use only)
3270
- debugNoMockClaude: z18.boolean().optional(),
3519
+ debugNoMockClaude: z19.boolean().optional(),
3271
3520
  // Dispatch timestamp for E2E timing metrics
3272
- apiStartTime: z18.number().optional(),
3521
+ apiStartTime: z19.number().optional(),
3273
3522
  // User's timezone preference (IANA format, e.g., "Asia/Shanghai")
3274
- userTimezone: z18.string().optional(),
3523
+ userTimezone: z19.string().optional(),
3275
3524
  // Agent metadata for VM0_AGENT_NAME, VM0_AGENT_COMPOSE_ID, and VM0_AGENT_ORG env vars
3276
- agentName: z18.string().optional(),
3277
- agentComposeId: z18.string().optional(),
3278
- agentOrgSlug: z18.string().optional(),
3525
+ agentName: z19.string().optional(),
3526
+ agentComposeId: z19.string().optional(),
3527
+ agentOrgSlug: z19.string().optional(),
3279
3528
  // Memory storage name (for first-run when manifest.memory is null)
3280
- memoryName: z18.string().optional(),
3529
+ memoryName: z19.string().optional(),
3281
3530
  // Experimental firewall for proxy-side token replacement
3282
3531
  experimentalFirewalls: experimentalFirewallsSchema.optional(),
3283
3532
  // Experimental capabilities for agent permission enforcement
3284
- experimentalCapabilities: z18.array(z18.enum(VALID_CAPABILITIES)).optional(),
3285
- // VM profile for resource allocation (e.g., "vm0/default", "vm0/browser")
3286
- experimentalProfile: z18.string().optional()
3533
+ experimentalCapabilities: z19.array(z19.enum(VALID_CAPABILITIES)).optional(),
3534
+ // Tools to disable in Claude CLI (passed as --disallowed-tools)
3535
+ disallowedTools: z19.array(z19.string()).optional(),
3536
+ // VM profile for resource allocation (e.g., "vm0/default")
3537
+ experimentalProfile: z19.string().optional()
3287
3538
  });
3288
- var executionContextSchema = z18.object({
3289
- runId: z18.uuid(),
3290
- prompt: z18.string(),
3291
- appendSystemPrompt: z18.string().nullable(),
3292
- agentComposeVersionId: z18.string().nullable(),
3293
- vars: z18.record(z18.string(), z18.string()).nullable(),
3294
- checkpointId: z18.uuid().nullable(),
3295
- sandboxToken: z18.string(),
3539
+ var executionContextSchema = z19.object({
3540
+ runId: z19.uuid(),
3541
+ prompt: z19.string(),
3542
+ appendSystemPrompt: z19.string().nullable(),
3543
+ agentComposeVersionId: z19.string().nullable(),
3544
+ vars: z19.record(z19.string(), z19.string()).nullable(),
3545
+ checkpointId: z19.uuid().nullable(),
3546
+ sandboxToken: z19.string(),
3296
3547
  // New fields for E2B parity:
3297
- workingDir: z18.string(),
3548
+ workingDir: z19.string(),
3298
3549
  storageManifest: storageManifestSchema.nullable(),
3299
- environment: z18.record(z18.string(), z18.string()).nullable(),
3550
+ environment: z19.record(z19.string(), z19.string()).nullable(),
3300
3551
  resumeSession: resumeSessionSchema.nullable(),
3301
- secretValues: z18.array(z18.string()).nullable(),
3552
+ secretValues: z19.array(z19.string()).nullable(),
3302
3553
  // AES-256-GCM encrypted Record<string, string> — passed through to mitm-addon for auth resolution
3303
- encryptedSecrets: z18.string().nullable(),
3554
+ encryptedSecrets: z19.string().nullable(),
3304
3555
  // Maps secret names to OAuth connector types for runtime token refresh
3305
- secretConnectorMap: z18.record(z18.string(), z18.string()).nullable().optional(),
3306
- cliAgentType: z18.string(),
3556
+ secretConnectorMap: z19.record(z19.string(), z19.string()).nullable().optional(),
3557
+ cliAgentType: z19.string(),
3307
3558
  // Debug flag to force real Claude in mock environments (internal use only)
3308
- debugNoMockClaude: z18.boolean().optional(),
3559
+ debugNoMockClaude: z19.boolean().optional(),
3309
3560
  // Dispatch timestamp for E2E timing metrics
3310
- apiStartTime: z18.number().optional(),
3561
+ apiStartTime: z19.number().optional(),
3311
3562
  // User's timezone preference (IANA format, e.g., "Asia/Shanghai")
3312
- userTimezone: z18.string().optional(),
3563
+ userTimezone: z19.string().optional(),
3313
3564
  // Agent metadata
3314
- agentName: z18.string().optional(),
3315
- agentComposeId: z18.string().optional(),
3316
- agentOrgSlug: z18.string().optional(),
3565
+ agentName: z19.string().optional(),
3566
+ agentComposeId: z19.string().optional(),
3567
+ agentOrgSlug: z19.string().optional(),
3317
3568
  // Memory storage name (for first-run when manifest.memory is null)
3318
- memoryName: z18.string().optional(),
3569
+ memoryName: z19.string().optional(),
3319
3570
  // Experimental firewall for proxy-side token replacement
3320
3571
  experimentalFirewalls: experimentalFirewallsSchema.optional(),
3321
3572
  // Experimental capabilities for agent permission enforcement
3322
- experimentalCapabilities: z18.array(z18.enum(VALID_CAPABILITIES)).optional(),
3323
- // VM profile for resource allocation (e.g., "vm0/default", "vm0/browser")
3324
- experimentalProfile: z18.string().optional()
3573
+ experimentalCapabilities: z19.array(z19.enum(VALID_CAPABILITIES)).optional(),
3574
+ // Tools to disable in Claude CLI (passed as --disallowed-tools)
3575
+ disallowedTools: z19.array(z19.string()).optional(),
3576
+ // VM profile for resource allocation (e.g., "vm0/default")
3577
+ experimentalProfile: z19.string().optional()
3325
3578
  });
3326
- var runnersJobClaimContract = c14.router({
3579
+ var runnersJobClaimContract = c15.router({
3327
3580
  claim: {
3328
3581
  method: "POST",
3329
3582
  path: "/api/runners/jobs/:id/claim",
3330
3583
  headers: authHeadersSchema,
3331
- pathParams: z18.object({
3332
- id: z18.uuid()
3584
+ pathParams: z19.object({
3585
+ id: z19.uuid()
3333
3586
  }),
3334
- body: z18.object({}),
3587
+ body: z19.object({}),
3335
3588
  responses: {
3336
3589
  200: executionContextSchema,
3337
3590
  400: apiErrorSchema,
@@ -3348,13 +3601,13 @@ var runnersJobClaimContract = c14.router({
3348
3601
  });
3349
3602
 
3350
3603
  // ../../packages/core/src/contracts/schedules.ts
3351
- import { z as z19 } from "zod";
3352
- var c15 = initContract();
3353
- var scheduleTriggerSchema = z19.object({
3354
- cron: z19.string().optional(),
3355
- at: z19.string().optional(),
3356
- loop: z19.object({ interval: z19.number().int().min(0) }).optional(),
3357
- timezone: z19.string().default("UTC")
3604
+ import { z as z20 } from "zod";
3605
+ var c16 = initContract();
3606
+ var scheduleTriggerSchema = z20.object({
3607
+ cron: z20.string().optional(),
3608
+ at: z20.string().optional(),
3609
+ loop: z20.object({ interval: z20.number().int().min(0) }).optional(),
3610
+ timezone: z20.string().default("UTC")
3358
3611
  }).refine(
3359
3612
  (data) => {
3360
3613
  const triggers = [data.cron, data.at, data.loop].filter(Boolean);
@@ -3364,43 +3617,43 @@ var scheduleTriggerSchema = z19.object({
3364
3617
  message: "Exactly one of 'cron', 'at', or 'loop' must be specified"
3365
3618
  }
3366
3619
  );
3367
- var scheduleRunConfigSchema = z19.object({
3368
- agent: z19.string().min(1, "Agent reference required"),
3369
- prompt: z19.string().min(1, "Prompt required"),
3370
- appendSystemPrompt: z19.string().optional(),
3371
- vars: z19.record(z19.string(), z19.string()).optional(),
3372
- secrets: z19.record(z19.string(), z19.string()).optional(),
3373
- artifactName: z19.string().optional(),
3374
- artifactVersion: z19.string().optional(),
3375
- volumeVersions: z19.record(z19.string(), z19.string()).optional()
3620
+ var scheduleRunConfigSchema = z20.object({
3621
+ agent: z20.string().min(1, "Agent reference required"),
3622
+ prompt: z20.string().min(1, "Prompt required"),
3623
+ appendSystemPrompt: z20.string().optional(),
3624
+ vars: z20.record(z20.string(), z20.string()).optional(),
3625
+ secrets: z20.record(z20.string(), z20.string()).optional(),
3626
+ artifactName: z20.string().optional(),
3627
+ artifactVersion: z20.string().optional(),
3628
+ volumeVersions: z20.record(z20.string(), z20.string()).optional()
3376
3629
  });
3377
- var scheduleDefinitionSchema = z19.object({
3630
+ var scheduleDefinitionSchema = z20.object({
3378
3631
  on: scheduleTriggerSchema,
3379
3632
  run: scheduleRunConfigSchema
3380
3633
  });
3381
- var scheduleYamlSchema = z19.object({
3382
- version: z19.literal("1.0"),
3383
- schedules: z19.record(z19.string(), scheduleDefinitionSchema)
3634
+ var scheduleYamlSchema = z20.object({
3635
+ version: z20.literal("1.0"),
3636
+ schedules: z20.record(z20.string(), scheduleDefinitionSchema)
3384
3637
  });
3385
- var deployScheduleRequestSchema = z19.object({
3386
- name: z19.string().min(1).max(64, "Schedule name max 64 chars"),
3387
- cronExpression: z19.string().optional(),
3388
- atTime: z19.string().optional(),
3389
- intervalSeconds: z19.number().int().min(0).optional(),
3390
- timezone: z19.string().default("UTC"),
3391
- prompt: z19.string().min(1, "Prompt required"),
3392
- appendSystemPrompt: z19.string().optional(),
3638
+ var deployScheduleRequestSchema = z20.object({
3639
+ name: z20.string().min(1).max(64, "Schedule name max 64 chars"),
3640
+ cronExpression: z20.string().optional(),
3641
+ atTime: z20.string().optional(),
3642
+ intervalSeconds: z20.number().int().min(0).optional(),
3643
+ timezone: z20.string().default("UTC"),
3644
+ prompt: z20.string().min(1, "Prompt required"),
3645
+ appendSystemPrompt: z20.string().optional(),
3393
3646
  // vars and secrets removed - now managed via server-side tables
3394
- artifactName: z19.string().optional(),
3395
- artifactVersion: z19.string().optional(),
3396
- volumeVersions: z19.record(z19.string(), z19.string()).optional(),
3647
+ artifactName: z20.string().optional(),
3648
+ artifactVersion: z20.string().optional(),
3649
+ volumeVersions: z20.record(z20.string(), z20.string()).optional(),
3397
3650
  // Resolved agent compose ID (CLI resolves org/name:version → composeId)
3398
- composeId: z19.string().uuid("Invalid compose ID"),
3651
+ composeId: z20.string().uuid("Invalid compose ID"),
3399
3652
  // Enable schedule immediately upon creation
3400
- enabled: z19.boolean().optional(),
3653
+ enabled: z20.boolean().optional(),
3401
3654
  // Per-schedule notification control (AND'd with user global preferences)
3402
- notifyEmail: z19.boolean().optional(),
3403
- notifySlack: z19.boolean().optional()
3655
+ notifyEmail: z20.boolean().optional(),
3656
+ notifySlack: z20.boolean().optional()
3404
3657
  }).refine(
3405
3658
  (data) => {
3406
3659
  const triggers = [
@@ -3414,39 +3667,39 @@ var deployScheduleRequestSchema = z19.object({
3414
3667
  message: "Exactly one of 'cronExpression', 'atTime', or 'intervalSeconds' must be specified"
3415
3668
  }
3416
3669
  );
3417
- var scheduleResponseSchema = z19.object({
3418
- id: z19.uuid(),
3419
- composeId: z19.uuid(),
3420
- composeName: z19.string(),
3421
- orgSlug: z19.string(),
3422
- userId: z19.string(),
3423
- name: z19.string(),
3424
- triggerType: z19.enum(["cron", "once", "loop"]),
3425
- cronExpression: z19.string().nullable(),
3426
- atTime: z19.string().nullable(),
3427
- intervalSeconds: z19.number().nullable(),
3428
- timezone: z19.string(),
3429
- prompt: z19.string(),
3430
- appendSystemPrompt: z19.string().nullable(),
3431
- vars: z19.record(z19.string(), z19.string()).nullable(),
3670
+ var scheduleResponseSchema = z20.object({
3671
+ id: z20.uuid(),
3672
+ composeId: z20.uuid(),
3673
+ composeName: z20.string(),
3674
+ orgSlug: z20.string(),
3675
+ userId: z20.string(),
3676
+ name: z20.string(),
3677
+ triggerType: z20.enum(["cron", "once", "loop"]),
3678
+ cronExpression: z20.string().nullable(),
3679
+ atTime: z20.string().nullable(),
3680
+ intervalSeconds: z20.number().nullable(),
3681
+ timezone: z20.string(),
3682
+ prompt: z20.string(),
3683
+ appendSystemPrompt: z20.string().nullable(),
3684
+ vars: z20.record(z20.string(), z20.string()).nullable(),
3432
3685
  // Secret names only (values are never returned)
3433
- secretNames: z19.array(z19.string()).nullable(),
3434
- artifactName: z19.string().nullable(),
3435
- artifactVersion: z19.string().nullable(),
3436
- volumeVersions: z19.record(z19.string(), z19.string()).nullable(),
3437
- enabled: z19.boolean(),
3438
- notifyEmail: z19.boolean(),
3439
- notifySlack: z19.boolean(),
3440
- nextRunAt: z19.string().nullable(),
3441
- lastRunAt: z19.string().nullable(),
3442
- retryStartedAt: z19.string().nullable(),
3443
- consecutiveFailures: z19.number(),
3444
- createdAt: z19.string(),
3445
- updatedAt: z19.string()
3686
+ secretNames: z20.array(z20.string()).nullable(),
3687
+ artifactName: z20.string().nullable(),
3688
+ artifactVersion: z20.string().nullable(),
3689
+ volumeVersions: z20.record(z20.string(), z20.string()).nullable(),
3690
+ enabled: z20.boolean(),
3691
+ notifyEmail: z20.boolean(),
3692
+ notifySlack: z20.boolean(),
3693
+ nextRunAt: z20.string().nullable(),
3694
+ lastRunAt: z20.string().nullable(),
3695
+ retryStartedAt: z20.string().nullable(),
3696
+ consecutiveFailures: z20.number(),
3697
+ createdAt: z20.string(),
3698
+ updatedAt: z20.string()
3446
3699
  });
3447
- var runSummarySchema = z19.object({
3448
- id: z19.uuid(),
3449
- status: z19.enum([
3700
+ var runSummarySchema = z20.object({
3701
+ id: z20.uuid(),
3702
+ status: z20.enum([
3450
3703
  "queued",
3451
3704
  "pending",
3452
3705
  "running",
@@ -3454,22 +3707,22 @@ var runSummarySchema = z19.object({
3454
3707
  "failed",
3455
3708
  "timeout"
3456
3709
  ]),
3457
- createdAt: z19.string(),
3458
- completedAt: z19.string().nullable(),
3459
- error: z19.string().nullable()
3710
+ createdAt: z20.string(),
3711
+ completedAt: z20.string().nullable(),
3712
+ error: z20.string().nullable()
3460
3713
  });
3461
- var scheduleRunsResponseSchema = z19.object({
3462
- runs: z19.array(runSummarySchema)
3714
+ var scheduleRunsResponseSchema = z20.object({
3715
+ runs: z20.array(runSummarySchema)
3463
3716
  });
3464
- var scheduleListResponseSchema = z19.object({
3465
- schedules: z19.array(scheduleResponseSchema)
3717
+ var scheduleListResponseSchema = z20.object({
3718
+ schedules: z20.array(scheduleResponseSchema)
3466
3719
  });
3467
- var deployScheduleResponseSchema = z19.object({
3720
+ var deployScheduleResponseSchema = z20.object({
3468
3721
  schedule: scheduleResponseSchema,
3469
- created: z19.boolean()
3722
+ created: z20.boolean()
3470
3723
  // true if created, false if updated
3471
3724
  });
3472
- var schedulesMainContract = c15.router({
3725
+ var schedulesMainContract = c16.router({
3473
3726
  /**
3474
3727
  * POST /api/agent/schedules
3475
3728
  * Deploy (create or update) a schedule
@@ -3507,7 +3760,7 @@ var schedulesMainContract = c15.router({
3507
3760
  summary: "List all schedules"
3508
3761
  }
3509
3762
  });
3510
- var schedulesByNameContract = c15.router({
3763
+ var schedulesByNameContract = c16.router({
3511
3764
  /**
3512
3765
  * GET /api/agent/schedules/:name
3513
3766
  * Get schedule by name
@@ -3516,11 +3769,11 @@ var schedulesByNameContract = c15.router({
3516
3769
  method: "GET",
3517
3770
  path: "/api/agent/schedules/:name",
3518
3771
  headers: authHeadersSchema,
3519
- pathParams: z19.object({
3520
- name: z19.string().min(1, "Schedule name required")
3772
+ pathParams: z20.object({
3773
+ name: z20.string().min(1, "Schedule name required")
3521
3774
  }),
3522
- query: z19.object({
3523
- composeId: z19.string().uuid("Compose ID required")
3775
+ query: z20.object({
3776
+ composeId: z20.string().uuid("Compose ID required")
3524
3777
  }),
3525
3778
  responses: {
3526
3779
  200: scheduleResponseSchema,
@@ -3538,14 +3791,14 @@ var schedulesByNameContract = c15.router({
3538
3791
  method: "DELETE",
3539
3792
  path: "/api/agent/schedules/:name",
3540
3793
  headers: authHeadersSchema,
3541
- pathParams: z19.object({
3542
- name: z19.string().min(1, "Schedule name required")
3794
+ pathParams: z20.object({
3795
+ name: z20.string().min(1, "Schedule name required")
3543
3796
  }),
3544
- query: z19.object({
3545
- composeId: z19.string().uuid("Compose ID required")
3797
+ query: z20.object({
3798
+ composeId: z20.string().uuid("Compose ID required")
3546
3799
  }),
3547
3800
  responses: {
3548
- 204: c15.noBody(),
3801
+ 204: c16.noBody(),
3549
3802
  401: apiErrorSchema,
3550
3803
  403: apiErrorSchema,
3551
3804
  404: apiErrorSchema
@@ -3553,7 +3806,7 @@ var schedulesByNameContract = c15.router({
3553
3806
  summary: "Delete schedule"
3554
3807
  }
3555
3808
  });
3556
- var schedulesEnableContract = c15.router({
3809
+ var schedulesEnableContract = c16.router({
3557
3810
  /**
3558
3811
  * POST /api/agent/schedules/:name/enable
3559
3812
  * Enable a disabled schedule
@@ -3562,11 +3815,11 @@ var schedulesEnableContract = c15.router({
3562
3815
  method: "POST",
3563
3816
  path: "/api/agent/schedules/:name/enable",
3564
3817
  headers: authHeadersSchema,
3565
- pathParams: z19.object({
3566
- name: z19.string().min(1, "Schedule name required")
3818
+ pathParams: z20.object({
3819
+ name: z20.string().min(1, "Schedule name required")
3567
3820
  }),
3568
- body: z19.object({
3569
- composeId: z19.string().uuid("Compose ID required")
3821
+ body: z20.object({
3822
+ composeId: z20.string().uuid("Compose ID required")
3570
3823
  }),
3571
3824
  responses: {
3572
3825
  200: scheduleResponseSchema,
@@ -3584,11 +3837,11 @@ var schedulesEnableContract = c15.router({
3584
3837
  method: "POST",
3585
3838
  path: "/api/agent/schedules/:name/disable",
3586
3839
  headers: authHeadersSchema,
3587
- pathParams: z19.object({
3588
- name: z19.string().min(1, "Schedule name required")
3840
+ pathParams: z20.object({
3841
+ name: z20.string().min(1, "Schedule name required")
3589
3842
  }),
3590
- body: z19.object({
3591
- composeId: z19.string().uuid("Compose ID required")
3843
+ body: z20.object({
3844
+ composeId: z20.string().uuid("Compose ID required")
3592
3845
  }),
3593
3846
  responses: {
3594
3847
  200: scheduleResponseSchema,
@@ -3599,7 +3852,7 @@ var schedulesEnableContract = c15.router({
3599
3852
  summary: "Disable schedule"
3600
3853
  }
3601
3854
  });
3602
- var scheduleRunsContract = c15.router({
3855
+ var scheduleRunsContract = c16.router({
3603
3856
  /**
3604
3857
  * GET /api/agent/schedules/:name/runs
3605
3858
  * List recent runs for a schedule
@@ -3608,12 +3861,12 @@ var scheduleRunsContract = c15.router({
3608
3861
  method: "GET",
3609
3862
  path: "/api/agent/schedules/:name/runs",
3610
3863
  headers: authHeadersSchema,
3611
- pathParams: z19.object({
3612
- name: z19.string().min(1, "Schedule name required")
3864
+ pathParams: z20.object({
3865
+ name: z20.string().min(1, "Schedule name required")
3613
3866
  }),
3614
- query: z19.object({
3615
- composeId: z19.string().uuid("Compose ID required"),
3616
- limit: z19.coerce.number().min(0).max(100).default(5)
3867
+ query: z20.object({
3868
+ composeId: z20.string().uuid("Compose ID required"),
3869
+ limit: z20.coerce.number().min(0).max(100).default(5)
3617
3870
  }),
3618
3871
  responses: {
3619
3872
  200: scheduleRunsResponseSchema,
@@ -3626,18 +3879,18 @@ var scheduleRunsContract = c15.router({
3626
3879
  });
3627
3880
 
3628
3881
  // ../../packages/core/src/contracts/realtime.ts
3629
- import { z as z20 } from "zod";
3630
- var c16 = initContract();
3631
- var ablyTokenRequestSchema = z20.object({
3632
- keyName: z20.string(),
3633
- ttl: z20.number().optional(),
3634
- timestamp: z20.number(),
3635
- capability: z20.string(),
3636
- clientId: z20.string().optional(),
3637
- nonce: z20.string(),
3638
- mac: z20.string()
3882
+ import { z as z21 } from "zod";
3883
+ var c17 = initContract();
3884
+ var ablyTokenRequestSchema = z21.object({
3885
+ keyName: z21.string(),
3886
+ ttl: z21.number().optional(),
3887
+ timestamp: z21.number(),
3888
+ capability: z21.string(),
3889
+ clientId: z21.string().optional(),
3890
+ nonce: z21.string(),
3891
+ mac: z21.string()
3639
3892
  });
3640
- var runnerRealtimeTokenContract = c16.router({
3893
+ var runnerRealtimeTokenContract = c17.router({
3641
3894
  /**
3642
3895
  * POST /api/runners/realtime/token
3643
3896
  * Get an Ably token to subscribe to a runner group's job notification channel
@@ -3646,7 +3899,7 @@ var runnerRealtimeTokenContract = c16.router({
3646
3899
  method: "POST",
3647
3900
  path: "/api/runners/realtime/token",
3648
3901
  headers: authHeadersSchema,
3649
- body: z20.object({
3902
+ body: z21.object({
3650
3903
  group: runnerGroupSchema
3651
3904
  }),
3652
3905
  responses: {
@@ -3659,224 +3912,9 @@ var runnerRealtimeTokenContract = c16.router({
3659
3912
  }
3660
3913
  });
3661
3914
 
3662
- // ../../packages/core/src/contracts/logs.ts
3663
- import { z as z21 } from "zod";
3664
- var paginationSchema = z21.object({
3665
- hasMore: z21.boolean(),
3666
- nextCursor: z21.string().nullable(),
3667
- totalPages: z21.number()
3668
- });
3669
- var listQuerySchema = z21.object({
3670
- cursor: z21.string().optional(),
3671
- limit: z21.coerce.number().min(1).max(100).default(20)
3672
- });
3673
- var c17 = initContract();
3674
- var logStatusSchema = z21.enum([
3675
- "queued",
3676
- "pending",
3677
- "running",
3678
- "completed",
3679
- "failed",
3680
- "timeout",
3681
- "cancelled"
3682
- ]);
3683
- var logEntrySchema = z21.object({
3684
- id: z21.uuid(),
3685
- sessionId: z21.string().nullable(),
3686
- agentName: z21.string(),
3687
- displayName: z21.string().nullable(),
3688
- orgSlug: z21.string().nullable(),
3689
- framework: z21.string().nullable(),
3690
- status: logStatusSchema,
3691
- createdAt: z21.string(),
3692
- startedAt: z21.string().nullable(),
3693
- completedAt: z21.string().nullable()
3694
- });
3695
- var logsListResponseSchema = z21.object({
3696
- data: z21.array(logEntrySchema),
3697
- pagination: paginationSchema
3698
- });
3699
- var artifactSchema = z21.object({
3700
- name: z21.string().nullable(),
3701
- version: z21.string().nullable()
3702
- });
3703
- var logDetailSchema = z21.object({
3704
- id: z21.uuid(),
3705
- sessionId: z21.string().nullable(),
3706
- agentName: z21.string(),
3707
- displayName: z21.string().nullable(),
3708
- framework: z21.string().nullable(),
3709
- status: logStatusSchema,
3710
- prompt: z21.string(),
3711
- error: z21.string().nullable(),
3712
- createdAt: z21.string(),
3713
- startedAt: z21.string().nullable(),
3714
- completedAt: z21.string().nullable(),
3715
- artifact: artifactSchema
3716
- });
3717
- var logsListContract = c17.router({
3718
- list: {
3719
- method: "GET",
3720
- path: "/api/app/logs",
3721
- query: listQuerySchema.extend({
3722
- search: z21.string().optional(),
3723
- agent: z21.string().optional(),
3724
- name: z21.string().optional(),
3725
- org: z21.string().optional(),
3726
- status: logStatusSchema.optional()
3727
- }),
3728
- responses: {
3729
- 200: logsListResponseSchema,
3730
- 401: apiErrorSchema
3731
- },
3732
- summary: "List agent run logs with pagination"
3733
- }
3734
- });
3735
- var logsByIdContract = c17.router({
3736
- getById: {
3737
- method: "GET",
3738
- path: "/api/app/logs/:id",
3739
- headers: authHeadersSchema,
3740
- pathParams: z21.object({
3741
- id: z21.string().uuid("Invalid log ID")
3742
- }),
3743
- responses: {
3744
- 200: logDetailSchema,
3745
- 401: apiErrorSchema,
3746
- 404: apiErrorSchema
3747
- },
3748
- summary: "Get agent run log details by ID"
3749
- }
3750
- });
3751
- var artifactDownloadResponseSchema = z21.object({
3752
- url: z21.url(),
3753
- expiresAt: z21.string()
3754
- });
3755
- var artifactDownloadContract = c17.router({
3756
- getDownloadUrl: {
3757
- method: "GET",
3758
- path: "/api/app/artifacts/download",
3759
- query: z21.object({
3760
- name: z21.string().min(1, "Artifact name is required"),
3761
- version: z21.string().optional()
3762
- }),
3763
- responses: {
3764
- 200: artifactDownloadResponseSchema,
3765
- 401: apiErrorSchema,
3766
- 404: apiErrorSchema
3767
- },
3768
- summary: "Get presigned URL for artifact download"
3769
- }
3770
- });
3771
-
3772
- // ../../packages/core/src/contracts/compose-jobs.ts
3915
+ // ../../packages/core/src/contracts/connectors.ts
3773
3916
  import { z as z22 } from "zod";
3774
3917
  var c18 = initContract();
3775
- var composeJobStatusSchema = z22.enum([
3776
- "pending",
3777
- "running",
3778
- "completed",
3779
- "failed"
3780
- ]);
3781
- var composeJobResultSchema = z22.object({
3782
- composeId: z22.string(),
3783
- composeName: z22.string(),
3784
- versionId: z22.string(),
3785
- warnings: z22.array(z22.string())
3786
- });
3787
- var composeJobSourceSchema = z22.enum(["github", "platform", "slack"]);
3788
- var createComposeJobRequestSchema = z22.union([
3789
- z22.object({
3790
- githubUrl: z22.url().check(z22.startsWith("https://github.com/")),
3791
- overwrite: z22.boolean().optional().default(false)
3792
- }),
3793
- z22.object({
3794
- content: z22.record(z22.string(), z22.unknown()),
3795
- instructions: z22.string().optional()
3796
- })
3797
- ]);
3798
- var composeJobResponseSchema = z22.object({
3799
- jobId: z22.string(),
3800
- status: composeJobStatusSchema,
3801
- githubUrl: z22.string().optional(),
3802
- source: composeJobSourceSchema.optional(),
3803
- result: composeJobResultSchema.optional(),
3804
- error: z22.string().optional(),
3805
- createdAt: z22.string(),
3806
- startedAt: z22.string().optional(),
3807
- completedAt: z22.string().optional()
3808
- });
3809
- var composeJobsMainContract = c18.router({
3810
- /**
3811
- * POST /api/compose/jobs
3812
- * Create a new compose job from GitHub URL or platform content
3813
- */
3814
- create: {
3815
- method: "POST",
3816
- path: "/api/compose/jobs",
3817
- headers: authHeadersSchema,
3818
- body: createComposeJobRequestSchema,
3819
- responses: {
3820
- 201: composeJobResponseSchema,
3821
- 200: composeJobResponseSchema,
3822
- // Returned when existing job found (idempotency)
3823
- 400: apiErrorSchema,
3824
- 401: apiErrorSchema
3825
- },
3826
- summary: "Create compose job"
3827
- }
3828
- });
3829
- var composeJobsByIdContract = c18.router({
3830
- /**
3831
- * GET /api/compose/jobs/:jobId
3832
- * Get compose job status and result
3833
- */
3834
- getById: {
3835
- method: "GET",
3836
- path: "/api/compose/jobs/:jobId",
3837
- headers: authHeadersSchema,
3838
- pathParams: z22.object({
3839
- jobId: z22.uuid()
3840
- }),
3841
- responses: {
3842
- 200: composeJobResponseSchema,
3843
- 401: apiErrorSchema,
3844
- 404: apiErrorSchema
3845
- },
3846
- summary: "Get compose job status"
3847
- }
3848
- });
3849
- var webhookComposeCompleteContract = c18.router({
3850
- /**
3851
- * POST /api/webhooks/compose/complete
3852
- * Handle compose job completion from sandbox
3853
- */
3854
- complete: {
3855
- method: "POST",
3856
- path: "/api/webhooks/compose/complete",
3857
- headers: authHeadersSchema,
3858
- body: z22.object({
3859
- jobId: z22.uuid(),
3860
- success: z22.boolean(),
3861
- // Result from CLI compose command
3862
- result: composeJobResultSchema.optional(),
3863
- error: z22.string().optional()
3864
- }),
3865
- responses: {
3866
- 200: z22.object({
3867
- success: z22.boolean()
3868
- }),
3869
- 400: apiErrorSchema,
3870
- 401: apiErrorSchema,
3871
- 404: apiErrorSchema
3872
- },
3873
- summary: "Handle compose job completion"
3874
- }
3875
- });
3876
-
3877
- // ../../packages/core/src/contracts/connectors.ts
3878
- import { z as z23 } from "zod";
3879
- var c19 = initContract();
3880
3918
  var CONNECTOR_TYPES_DEF = {
3881
3919
  axiom: {
3882
3920
  label: "Axiom",
@@ -4519,6 +4557,23 @@ var CONNECTOR_TYPES_DEF = {
4519
4557
  },
4520
4558
  defaultAuthMethod: "api-token"
4521
4559
  },
4560
+ instantly: {
4561
+ label: "Instantly",
4562
+ helpText: "Connect your Instantly account to manage email campaigns, leads, and outreach sequences",
4563
+ authMethods: {
4564
+ "api-token": {
4565
+ label: "API Key",
4566
+ secrets: {
4567
+ INSTANTLY_API_KEY: {
4568
+ label: "API Key",
4569
+ required: true,
4570
+ placeholder: "your-instantly-api-key"
4571
+ }
4572
+ }
4573
+ }
4574
+ },
4575
+ defaultAuthMethod: "api-token"
4576
+ },
4522
4577
  jam: {
4523
4578
  label: "Jam",
4524
4579
  helpText: "Connect your Jam account to capture bugs, manage reports, and access debugging telemetry",
@@ -4536,17 +4591,67 @@ var CONNECTOR_TYPES_DEF = {
4536
4591
  },
4537
4592
  defaultAuthMethod: "api-token"
4538
4593
  },
4594
+ jira: {
4595
+ label: "Jira",
4596
+ helpText: "Connect your Jira account to manage projects, issues, sprints, and workflows",
4597
+ authMethods: {
4598
+ "api-token": {
4599
+ label: "API Token",
4600
+ secrets: {
4601
+ JIRA_API_TOKEN: {
4602
+ label: "API Token",
4603
+ required: true
4604
+ },
4605
+ JIRA_DOMAIN: {
4606
+ label: "Jira Domain",
4607
+ required: true,
4608
+ type: "variable",
4609
+ placeholder: "your-domain.atlassian.net"
4610
+ },
4611
+ JIRA_EMAIL: {
4612
+ label: "Jira Email",
4613
+ required: true,
4614
+ type: "variable",
4615
+ placeholder: "your-email@example.com"
4616
+ }
4617
+ }
4618
+ }
4619
+ },
4620
+ defaultAuthMethod: "api-token"
4621
+ },
4539
4622
  jotform: {
4540
4623
  label: "Jotform",
4541
4624
  helpText: "Connect your Jotform account to manage forms, submissions, and automate form workflows",
4542
4625
  authMethods: {
4543
4626
  "api-token": {
4544
4627
  label: "API Key",
4545
- helpText: "1. Log in to your [Jotform account](https://www.jotform.com/myaccount/api)\n2. Navigate to **Settings** \u2192 **API**\n3. Click **Create New Key**\n4. Copy your **API Key**",
4628
+ helpText: "1. Log in to your [Jotform account](https://www.jotform.com/myaccount/api)\n2. Navigate to **Settings** \u2192 **API**\n3. Click **Create New Key**\n4. Copy your **API Key**",
4629
+ secrets: {
4630
+ JOTFORM_TOKEN: {
4631
+ label: "API Key",
4632
+ required: true
4633
+ }
4634
+ }
4635
+ }
4636
+ },
4637
+ defaultAuthMethod: "api-token"
4638
+ },
4639
+ kommo: {
4640
+ label: "Kommo",
4641
+ helpText: "Connect your Kommo account to manage leads, contacts, and sales pipelines",
4642
+ authMethods: {
4643
+ "api-token": {
4644
+ label: "API Key",
4546
4645
  secrets: {
4547
- JOTFORM_TOKEN: {
4646
+ KOMMO_API_KEY: {
4548
4647
  label: "API Key",
4549
4648
  required: true
4649
+ },
4650
+ KOMMO_SUBDOMAIN: {
4651
+ label: "Subdomain",
4652
+ required: true,
4653
+ type: "variable",
4654
+ placeholder: "your-subdomain"
4550
4655
  }
4551
4656
  }
4552
4657
  }
@@ -4702,6 +4807,27 @@ var CONNECTOR_TYPES_DEF = {
4702
4807
  },
4703
4808
  defaultAuthMethod: "api-token"
4704
4809
  },
4810
+ cronlytic: {
4811
+ label: "Cronlytic",
4812
+ helpText: "Connect your Cronlytic account to monitor cron jobs and scheduled tasks",
4813
+ authMethods: {
4814
+ "api-token": {
4815
+ label: "API Key",
4816
+ secrets: {
4817
+ CRONLYTIC_API_KEY: {
4818
+ label: "API Key",
4819
+ required: true
4820
+ },
4821
+ CRONLYTIC_USER_ID: {
4822
+ label: "User ID",
4823
+ required: true,
4824
+ type: "variable"
4825
+ }
4826
+ }
4827
+ }
4828
+ },
4829
+ defaultAuthMethod: "api-token"
4830
+ },
4705
4831
  dify: {
4706
4832
  label: "Dify",
4707
4833
  helpText: "Connect your Dify account to build and manage AI-powered workflows, chatbots, and agentic applications",
@@ -5852,6 +5978,40 @@ var CONNECTOR_TYPES_DEF = {
5852
5978
  },
5853
5979
  defaultAuthMethod: "api-token"
5854
5980
  },
5981
+ bitrix: {
5982
+ label: "Bitrix24",
5983
+ helpText: "Connect your Bitrix24 account to manage CRM, tasks, and workflows",
5984
+ authMethods: {
5985
+ "api-token": {
5986
+ label: "Webhook URL",
5987
+ secrets: {
5988
+ BITRIX_WEBHOOK_URL: {
5989
+ label: "Webhook URL",
5990
+ required: true,
5991
+ placeholder: "https://your-domain.bitrix24.com/rest/1/xxx/"
5992
+ }
5993
+ }
5994
+ }
5995
+ },
5996
+ defaultAuthMethod: "api-token"
5997
+ },
5998
+ "brave-search": {
5999
+ label: "Brave Search",
6000
+ helpText: "Connect your Brave Search account to perform privacy-focused web, image, video, and news searches",
6001
+ authMethods: {
6002
+ "api-token": {
6003
+ label: "API Key",
6004
+ secrets: {
6005
+ BRAVE_API_KEY: {
6006
+ label: "API Key",
6007
+ required: true,
6008
+ placeholder: "BSAxxxxxxxxxxxxxxxx"
6009
+ }
6010
+ }
6011
+ }
6012
+ },
6013
+ defaultAuthMethod: "api-token"
6014
+ },
5855
6015
  "bright-data": {
5856
6016
  label: "Bright Data",
5857
6017
  helpText: "Connect your Bright Data account to scrape websites, manage proxies, and access web data",
@@ -6120,226 +6280,459 @@ var CONNECTOR_TYPES_DEF = {
6120
6280
  QIITA_TOKEN: {
6121
6281
  label: "Access Token",
6122
6282
  required: true,
6123
- placeholder: "your-qiita-access-token"
6283
+ placeholder: "your-qiita-access-token"
6284
+ }
6285
+ }
6286
+ }
6287
+ },
6288
+ defaultAuthMethod: "api-token"
6289
+ },
6290
+ zeptomail: {
6291
+ label: "ZeptoMail",
6292
+ helpText: "Connect your ZeptoMail account to send transactional emails via Zoho's email delivery service",
6293
+ authMethods: {
6294
+ "api-token": {
6295
+ label: "Send Mail Token",
6296
+ secrets: {
6297
+ ZEPTOMAIL_TOKEN: {
6298
+ label: "Send Mail Token",
6299
+ required: true,
6300
+ placeholder: "your-zeptomail-send-mail-token"
6301
+ }
6302
+ }
6303
+ }
6304
+ },
6305
+ defaultAuthMethod: "api-token"
6306
+ },
6307
+ runway: {
6308
+ label: "Runway",
6309
+ helpText: "Connect your Runway account to generate AI videos from images, text, or video inputs",
6310
+ authMethods: {
6311
+ "api-token": {
6312
+ label: "API Key",
6313
+ secrets: {
6314
+ RUNWAY_TOKEN: {
6315
+ label: "API Key",
6316
+ required: true,
6317
+ placeholder: "your-runway-api-key"
6318
+ }
6319
+ }
6320
+ }
6321
+ },
6322
+ defaultAuthMethod: "api-token"
6323
+ },
6324
+ shortio: {
6325
+ label: "Short.io",
6326
+ helpText: "Connect your Short.io account to create and manage short links and track click analytics",
6327
+ authMethods: {
6328
+ "api-token": {
6329
+ label: "API Key",
6330
+ secrets: {
6331
+ SHORTIO_TOKEN: {
6332
+ label: "API Key",
6333
+ required: true,
6334
+ placeholder: "your-shortio-api-key"
6335
+ }
6336
+ }
6337
+ }
6338
+ },
6339
+ defaultAuthMethod: "api-token"
6340
+ },
6341
+ streak: {
6342
+ label: "Streak",
6343
+ helpText: "Connect your Streak account to manage CRM pipelines, contacts, and deals inside Gmail",
6344
+ authMethods: {
6345
+ "api-token": {
6346
+ label: "API Key",
6347
+ secrets: {
6348
+ STREAK_TOKEN: {
6349
+ label: "API Key",
6350
+ required: true,
6351
+ placeholder: "your-streak-api-key"
6352
+ }
6353
+ }
6354
+ }
6355
+ },
6356
+ defaultAuthMethod: "api-token"
6357
+ },
6358
+ supadata: {
6359
+ label: "Supadata",
6360
+ helpText: "Connect your Supadata account to extract YouTube transcripts, channel data, and video metadata",
6361
+ authMethods: {
6362
+ "api-token": {
6363
+ label: "API Key",
6364
+ secrets: {
6365
+ SUPADATA_TOKEN: {
6366
+ label: "API Key",
6367
+ required: true,
6368
+ placeholder: "your-supadata-api-key"
6369
+ }
6370
+ }
6371
+ }
6372
+ },
6373
+ defaultAuthMethod: "api-token"
6374
+ },
6375
+ tavily: {
6376
+ label: "Tavily",
6377
+ helpText: "Connect your Tavily account to perform AI-optimized web searches and content extraction",
6378
+ authMethods: {
6379
+ "api-token": {
6380
+ label: "API Key",
6381
+ secrets: {
6382
+ TAVILY_TOKEN: {
6383
+ label: "API Key",
6384
+ required: true,
6385
+ placeholder: "tvly-..."
6386
+ }
6387
+ }
6388
+ }
6389
+ },
6390
+ defaultAuthMethod: "api-token"
6391
+ },
6392
+ tldv: {
6393
+ label: "tl;dv",
6394
+ helpText: "Connect your tl;dv account to access meeting recordings, transcripts, and AI-generated notes",
6395
+ authMethods: {
6396
+ "api-token": {
6397
+ label: "API Key",
6398
+ secrets: {
6399
+ TLDV_TOKEN: {
6400
+ label: "API Key",
6401
+ required: true,
6402
+ placeholder: "your-tldv-api-key"
6403
+ }
6404
+ }
6405
+ }
6406
+ },
6407
+ defaultAuthMethod: "api-token"
6408
+ },
6409
+ twenty: {
6410
+ label: "Twenty",
6411
+ helpText: "Connect your Twenty CRM account to manage contacts, companies, and deals",
6412
+ authMethods: {
6413
+ "api-token": {
6414
+ label: "API Key",
6415
+ secrets: {
6416
+ TWENTY_TOKEN: {
6417
+ label: "API Key",
6418
+ required: true,
6419
+ placeholder: "your-twenty-api-key"
6420
+ }
6421
+ }
6422
+ }
6423
+ },
6424
+ defaultAuthMethod: "api-token"
6425
+ },
6426
+ youtube: {
6427
+ label: "YouTube",
6428
+ helpText: "Connect your YouTube account to search videos, get channel info, and fetch comments via the Data API",
6429
+ authMethods: {
6430
+ "api-token": {
6431
+ label: "API Key",
6432
+ helpText: "1. Go to [Google Cloud Console](https://console.cloud.google.com/)\n2. Enable **YouTube Data API v3**\n3. Go to **Credentials** \u2192 **Create Credentials** \u2192 **API Key**\n4. Copy the API key",
6433
+ secrets: {
6434
+ YOUTUBE_TOKEN: {
6435
+ label: "API Key",
6436
+ required: true,
6437
+ placeholder: "AIzaSy..."
6438
+ }
6439
+ }
6440
+ }
6441
+ },
6442
+ defaultAuthMethod: "api-token"
6443
+ },
6444
+ zapier: {
6445
+ label: "Zapier",
6446
+ helpText: "Connect your Zapier account to trigger zaps and use AI Actions (NLA) to automate workflows",
6447
+ authMethods: {
6448
+ "api-token": {
6449
+ label: "API Key",
6450
+ secrets: {
6451
+ ZAPIER_TOKEN: {
6452
+ label: "API Key",
6453
+ required: true,
6454
+ placeholder: "your-zapier-api-key"
6455
+ }
6456
+ }
6457
+ }
6458
+ },
6459
+ defaultAuthMethod: "api-token"
6460
+ },
6461
+ zapsign: {
6462
+ label: "ZapSign",
6463
+ helpText: "Connect your ZapSign account to create documents for electronic signature and track signing status",
6464
+ authMethods: {
6465
+ "api-token": {
6466
+ label: "API Token",
6467
+ secrets: {
6468
+ ZAPSIGN_TOKEN: {
6469
+ label: "API Token",
6470
+ required: true,
6471
+ placeholder: "your-zapsign-api-token"
6472
+ }
6473
+ }
6474
+ }
6475
+ },
6476
+ defaultAuthMethod: "api-token"
6477
+ },
6478
+ zendesk: {
6479
+ label: "Zendesk",
6480
+ helpText: "Connect your Zendesk account to manage support tickets, users, organizations, and automate customer support workflows",
6481
+ authMethods: {
6482
+ "api-token": {
6483
+ label: "API Token",
6484
+ helpText: "1. Log in to [Zendesk Admin Center](https://www.zendesk.com/admin/)\n2. Go to **Apps and integrations \u2192 APIs \u2192 Zendesk API**\n3. Enable **Token Access** under the Settings tab\n4. Click **Add API token** and copy the token",
6485
+ secrets: {
6486
+ ZENDESK_API_TOKEN: {
6487
+ label: "API Token",
6488
+ required: true,
6489
+ placeholder: "your-zendesk-api-token"
6490
+ },
6491
+ ZENDESK_EMAIL: {
6492
+ label: "Email",
6493
+ required: true,
6494
+ placeholder: "your-email@company.com",
6495
+ helpText: "The email address associated with your Zendesk account",
6496
+ type: "variable"
6497
+ },
6498
+ ZENDESK_SUBDOMAIN: {
6499
+ label: "Subdomain",
6500
+ required: true,
6501
+ placeholder: "yourcompany",
6502
+ helpText: "Your Zendesk subdomain (e.g. 'yourcompany' from yourcompany.zendesk.com)",
6503
+ type: "variable"
6124
6504
  }
6125
6505
  }
6126
6506
  }
6127
6507
  },
6128
6508
  defaultAuthMethod: "api-token"
6129
6509
  },
6130
- zeptomail: {
6131
- label: "ZeptoMail",
6132
- helpText: "Connect your ZeptoMail account to send transactional emails via Zoho's email delivery service",
6510
+ htmlcsstoimage: {
6511
+ label: "HTML/CSS to Image",
6512
+ helpText: "Connect your HTML/CSS to Image account to generate images from HTML and CSS",
6133
6513
  authMethods: {
6134
6514
  "api-token": {
6135
- label: "Send Mail Token",
6515
+ label: "API Key",
6136
6516
  secrets: {
6137
- ZEPTOMAIL_TOKEN: {
6138
- label: "Send Mail Token",
6517
+ HCTI_API_KEY: {
6518
+ label: "API Key",
6519
+ required: true
6520
+ },
6521
+ HCTI_USER_ID: {
6522
+ label: "User ID",
6139
6523
  required: true,
6140
- placeholder: "your-zeptomail-send-mail-token"
6524
+ type: "variable"
6141
6525
  }
6142
6526
  }
6143
6527
  }
6144
6528
  },
6145
6529
  defaultAuthMethod: "api-token"
6146
6530
  },
6147
- runway: {
6148
- label: "Runway",
6149
- helpText: "Connect your Runway account to generate AI videos from images, text, or video inputs",
6531
+ imgur: {
6532
+ label: "Imgur",
6533
+ helpText: "Connect your Imgur account to upload, manage, and share images",
6150
6534
  authMethods: {
6151
6535
  "api-token": {
6152
- label: "API Key",
6536
+ label: "API Token",
6153
6537
  secrets: {
6154
- RUNWAY_TOKEN: {
6155
- label: "API Key",
6538
+ IMGUR_CLIENT_ID: {
6539
+ label: "Client ID",
6156
6540
  required: true,
6157
- placeholder: "your-runway-api-key"
6541
+ placeholder: "your-imgur-client-id"
6158
6542
  }
6159
6543
  }
6160
6544
  }
6161
6545
  },
6162
6546
  defaultAuthMethod: "api-token"
6163
6547
  },
6164
- shortio: {
6165
- label: "Short.io",
6166
- helpText: "Connect your Short.io account to create and manage short links and track click analytics",
6548
+ instagram: {
6549
+ label: "Instagram",
6550
+ helpText: "Connect your Instagram Business account to manage posts, stories, and insights",
6167
6551
  authMethods: {
6168
6552
  "api-token": {
6169
- label: "API Key",
6553
+ label: "API Token",
6170
6554
  secrets: {
6171
- SHORTIO_TOKEN: {
6172
- label: "API Key",
6555
+ INSTAGRAM_ACCESS_TOKEN: {
6556
+ label: "Access Token",
6557
+ required: true
6558
+ },
6559
+ INSTAGRAM_BUSINESS_ACCOUNT_ID: {
6560
+ label: "Business Account ID",
6173
6561
  required: true,
6174
- placeholder: "your-shortio-api-key"
6562
+ type: "variable"
6175
6563
  }
6176
6564
  }
6177
6565
  }
6178
6566
  },
6179
6567
  defaultAuthMethod: "api-token"
6180
6568
  },
6181
- streak: {
6182
- label: "Streak",
6183
- helpText: "Connect your Streak account to manage CRM pipelines, contacts, and deals inside Gmail",
6569
+ "prisma-postgres": {
6570
+ label: "Prisma Postgres",
6571
+ helpText: "Connect your Prisma Postgres database to manage schemas, run queries, and access data through Prisma's serverless database platform",
6184
6572
  authMethods: {
6185
6573
  "api-token": {
6186
6574
  label: "API Key",
6187
6575
  secrets: {
6188
- STREAK_TOKEN: {
6576
+ PRISMA_POSTGRES_TOKEN: {
6189
6577
  label: "API Key",
6190
6578
  required: true,
6191
- placeholder: "your-streak-api-key"
6579
+ placeholder: "eyJhbGci..."
6192
6580
  }
6193
6581
  }
6194
6582
  }
6195
6583
  },
6196
6584
  defaultAuthMethod: "api-token"
6197
6585
  },
6198
- supadata: {
6199
- label: "Supadata",
6200
- helpText: "Connect your Supadata account to extract YouTube transcripts, channel data, and video metadata",
6586
+ discord: {
6587
+ label: "Discord",
6588
+ helpText: "Connect your Discord bot to manage servers, channels, messages, and automate interactions",
6201
6589
  authMethods: {
6202
6590
  "api-token": {
6203
- label: "API Key",
6591
+ label: "Bot Token",
6204
6592
  secrets: {
6205
- SUPADATA_TOKEN: {
6206
- label: "API Key",
6593
+ DISCORD_BOT_TOKEN: {
6594
+ label: "Bot Token",
6207
6595
  required: true,
6208
- placeholder: "your-supadata-api-key"
6596
+ placeholder: "your-discord-bot-token"
6209
6597
  }
6210
6598
  }
6211
6599
  }
6212
6600
  },
6213
6601
  defaultAuthMethod: "api-token"
6214
6602
  },
6215
- tavily: {
6216
- label: "Tavily",
6217
- helpText: "Connect your Tavily account to perform AI-optimized web searches and content extraction",
6603
+ lark: {
6604
+ label: "Lark",
6605
+ helpText: "Connect your Lark (Feishu) app to manage messages, documents, calendars, and workflows",
6218
6606
  authMethods: {
6219
6607
  "api-token": {
6220
- label: "API Key",
6608
+ label: "App Credentials",
6221
6609
  secrets: {
6222
- TAVILY_TOKEN: {
6223
- label: "API Key",
6610
+ LARK_TOKEN: {
6611
+ label: "App Secret",
6224
6612
  required: true,
6225
- placeholder: "tvly-..."
6613
+ type: "secret"
6614
+ },
6615
+ LARK_APP_ID: {
6616
+ label: "App ID",
6617
+ required: true,
6618
+ type: "variable"
6226
6619
  }
6227
6620
  }
6228
6621
  }
6229
6622
  },
6230
6623
  defaultAuthMethod: "api-token"
6231
6624
  },
6232
- tldv: {
6233
- label: "tl;dv",
6234
- helpText: "Connect your tl;dv account to access meeting recordings, transcripts, and AI-generated notes",
6625
+ mailsac: {
6626
+ label: "Mailsac",
6627
+ helpText: "Connect your Mailsac account to manage disposable email inboxes for testing",
6235
6628
  authMethods: {
6236
6629
  "api-token": {
6237
6630
  label: "API Key",
6238
6631
  secrets: {
6239
- TLDV_TOKEN: {
6632
+ MAILSAC_TOKEN: {
6240
6633
  label: "API Key",
6241
6634
  required: true,
6242
- placeholder: "your-tldv-api-key"
6635
+ placeholder: "your-mailsac-api-key"
6243
6636
  }
6244
6637
  }
6245
6638
  }
6246
6639
  },
6247
6640
  defaultAuthMethod: "api-token"
6248
6641
  },
6249
- twenty: {
6250
- label: "Twenty",
6251
- helpText: "Connect your Twenty CRM account to manage contacts, companies, and deals",
6642
+ minio: {
6643
+ label: "MinIO",
6644
+ helpText: "Connect your MinIO instance to manage S3-compatible object storage buckets and objects",
6252
6645
  authMethods: {
6253
6646
  "api-token": {
6254
- label: "API Key",
6647
+ label: "Access Credentials",
6255
6648
  secrets: {
6256
- TWENTY_TOKEN: {
6257
- label: "API Key",
6649
+ MINIO_TOKEN: {
6650
+ label: "Access Key",
6258
6651
  required: true,
6259
- placeholder: "your-twenty-api-key"
6652
+ type: "secret"
6653
+ },
6654
+ MINIO_SECRET_TOKEN: {
6655
+ label: "Secret Key",
6656
+ required: true,
6657
+ type: "secret"
6658
+ },
6659
+ MINIO_ENDPOINT: {
6660
+ label: "Endpoint URL",
6661
+ required: true,
6662
+ placeholder: "https://minio.example.com",
6663
+ type: "variable"
6260
6664
  }
6261
6665
  }
6262
6666
  }
6263
6667
  },
6264
6668
  defaultAuthMethod: "api-token"
6265
6669
  },
6266
- youtube: {
6267
- label: "YouTube",
6268
- helpText: "Connect your YouTube account to search videos, get channel info, and fetch comments via the Data API",
6670
+ pdforge: {
6671
+ label: "PDForge",
6672
+ helpText: "Connect your PDForge account to generate PDF documents from templates",
6269
6673
  authMethods: {
6270
6674
  "api-token": {
6271
6675
  label: "API Key",
6272
- helpText: "1. Go to [Google Cloud Console](https://console.cloud.google.com/)\n2. Enable **YouTube Data API v3**\n3. Go to **Credentials** \u2192 **Create Credentials** \u2192 **API Key**\n4. Copy the API key",
6273
6676
  secrets: {
6274
- YOUTUBE_TOKEN: {
6677
+ PDFORGE_API_KEY: {
6275
6678
  label: "API Key",
6276
6679
  required: true,
6277
- placeholder: "AIzaSy..."
6680
+ placeholder: "your-pdforge-api-key"
6278
6681
  }
6279
6682
  }
6280
6683
  }
6281
6684
  },
6282
6685
  defaultAuthMethod: "api-token"
6283
6686
  },
6284
- zapier: {
6285
- label: "Zapier",
6286
- helpText: "Connect your Zapier account to trigger zaps and use AI Actions (NLA) to automate workflows",
6687
+ "discord-webhook": {
6688
+ label: "Discord Webhook",
6689
+ helpText: "Connect a Discord webhook to send messages to channels",
6287
6690
  authMethods: {
6288
6691
  "api-token": {
6289
- label: "API Key",
6692
+ label: "Webhook URL",
6290
6693
  secrets: {
6291
- ZAPIER_TOKEN: {
6292
- label: "API Key",
6694
+ DISCORD_WEBHOOK_URL: {
6695
+ label: "Webhook URL",
6293
6696
  required: true,
6294
- placeholder: "your-zapier-api-key"
6697
+ placeholder: "https://discord.com/api/webhooks/xxx/xxx"
6295
6698
  }
6296
6699
  }
6297
6700
  }
6298
6701
  },
6299
6702
  defaultAuthMethod: "api-token"
6300
6703
  },
6301
- zapsign: {
6302
- label: "ZapSign",
6303
- helpText: "Connect your ZapSign account to create documents for electronic signature and track signing status",
6704
+ "slack-webhook": {
6705
+ label: "Slack Webhook",
6706
+ helpText: "Connect a Slack incoming webhook to send messages to channels",
6304
6707
  authMethods: {
6305
6708
  "api-token": {
6306
- label: "API Token",
6709
+ label: "Webhook URL",
6307
6710
  secrets: {
6308
- ZAPSIGN_TOKEN: {
6309
- label: "API Token",
6711
+ SLACK_WEBHOOK_URL: {
6712
+ label: "Webhook URL",
6310
6713
  required: true,
6311
- placeholder: "your-zapsign-api-token"
6714
+ placeholder: "https://hooks.slack.com/services/xxx/xxx/xxx"
6312
6715
  }
6313
6716
  }
6314
6717
  }
6315
6718
  },
6316
6719
  defaultAuthMethod: "api-token"
6317
6720
  },
6318
- zendesk: {
6319
- label: "Zendesk",
6320
- helpText: "Connect your Zendesk account to manage support tickets, users, organizations, and automate customer support workflows",
6721
+ gitlab: {
6722
+ label: "GitLab",
6723
+ helpText: "Connect your GitLab account to manage repositories, issues, merge requests, and CI/CD pipelines",
6321
6724
  authMethods: {
6322
6725
  "api-token": {
6323
- label: "API Token",
6324
- helpText: "1. Log in to [Zendesk Admin Center](https://www.zendesk.com/admin/)\n2. Go to **Apps and integrations \u2192 APIs \u2192 Zendesk API**\n3. Enable **Token Access** under the Settings tab\n4. Click **Add API token** and copy the token",
6726
+ label: "Personal Access Token",
6325
6727
  secrets: {
6326
- ZENDESK_API_TOKEN: {
6327
- label: "API Token",
6328
- required: true,
6329
- placeholder: "your-zendesk-api-token"
6330
- },
6331
- ZENDESK_EMAIL: {
6332
- label: "Email",
6333
- required: true,
6334
- placeholder: "your-email@company.com",
6335
- helpText: "The email address associated with your Zendesk account",
6336
- type: "variable"
6728
+ GITLAB_TOKEN: {
6729
+ label: "Personal Access Token",
6730
+ required: true
6337
6731
  },
6338
- ZENDESK_SUBDOMAIN: {
6339
- label: "Subdomain",
6340
- required: true,
6341
- placeholder: "yourcompany",
6342
- helpText: "Your Zendesk subdomain (e.g. 'yourcompany' from yourcompany.zendesk.com)",
6732
+ GITLAB_HOST: {
6733
+ label: "GitLab Host",
6734
+ required: false,
6735
+ placeholder: "gitlab.com",
6343
6736
  type: "variable"
6344
6737
  }
6345
6738
  }
@@ -6347,17 +6740,17 @@ var CONNECTOR_TYPES_DEF = {
6347
6740
  },
6348
6741
  defaultAuthMethod: "api-token"
6349
6742
  },
6350
- "prisma-postgres": {
6351
- label: "Prisma Postgres",
6352
- helpText: "Connect your Prisma Postgres database to manage schemas, run queries, and access data through Prisma's serverless database platform",
6743
+ wix: {
6744
+ label: "Wix",
6745
+ helpText: "Connect your Wix account to manage sites, collections, and content",
6353
6746
  authMethods: {
6354
6747
  "api-token": {
6355
6748
  label: "API Key",
6356
6749
  secrets: {
6357
- PRISMA_POSTGRES_TOKEN: {
6750
+ WIX_TOKEN: {
6358
6751
  label: "API Key",
6359
6752
  required: true,
6360
- placeholder: "eyJhbGci..."
6753
+ placeholder: "your-wix-api-key"
6361
6754
  }
6362
6755
  }
6363
6756
  }
@@ -6366,7 +6759,7 @@ var CONNECTOR_TYPES_DEF = {
6366
6759
  }
6367
6760
  };
6368
6761
  var CONNECTOR_TYPES = CONNECTOR_TYPES_DEF;
6369
- var connectorTypeSchema = z23.enum([
6762
+ var connectorTypeSchema = z22.enum([
6370
6763
  "agentmail",
6371
6764
  "ahrefs",
6372
6765
  "atlassian",
@@ -6465,7 +6858,25 @@ var connectorTypeSchema = z23.enum([
6465
6858
  "zapier",
6466
6859
  "zapsign",
6467
6860
  "zendesk",
6468
- "prisma-postgres"
6861
+ "prisma-postgres",
6862
+ "bitrix",
6863
+ "brave-search",
6864
+ "cronlytic",
6865
+ "discord",
6866
+ "discord-webhook",
6867
+ "gitlab",
6868
+ "htmlcsstoimage",
6869
+ "imgur",
6870
+ "instantly",
6871
+ "instagram",
6872
+ "jira",
6873
+ "kommo",
6874
+ "lark",
6875
+ "mailsac",
6876
+ "minio",
6877
+ "pdforge",
6878
+ "slack-webhook",
6879
+ "wix"
6469
6880
  ]);
6470
6881
  function getConnectorEnvironmentMapping(type2) {
6471
6882
  const config = CONNECTOR_TYPES[type2];
@@ -6519,24 +6930,24 @@ function getScopeDiff(connectorType, storedScopes) {
6519
6930
  storedScopes: stored
6520
6931
  };
6521
6932
  }
6522
- var connectorResponseSchema = z23.object({
6523
- id: z23.uuid().nullable(),
6933
+ var connectorResponseSchema = z22.object({
6934
+ id: z22.uuid().nullable(),
6524
6935
  type: connectorTypeSchema,
6525
- authMethod: z23.string(),
6526
- externalId: z23.string().nullable(),
6527
- externalUsername: z23.string().nullable(),
6528
- externalEmail: z23.string().nullable(),
6529
- oauthScopes: z23.array(z23.string()).nullable(),
6530
- needsReconnect: z23.boolean(),
6531
- createdAt: z23.string(),
6532
- updatedAt: z23.string()
6936
+ authMethod: z22.string(),
6937
+ externalId: z22.string().nullable(),
6938
+ externalUsername: z22.string().nullable(),
6939
+ externalEmail: z22.string().nullable(),
6940
+ oauthScopes: z22.array(z22.string()).nullable(),
6941
+ needsReconnect: z22.boolean(),
6942
+ createdAt: z22.string(),
6943
+ updatedAt: z22.string()
6533
6944
  });
6534
- var connectorListResponseSchema = z23.object({
6535
- connectors: z23.array(connectorResponseSchema),
6536
- configuredTypes: z23.array(connectorTypeSchema),
6537
- connectorProvidedSecretNames: z23.array(z23.string())
6945
+ var connectorListResponseSchema = z22.object({
6946
+ connectors: z22.array(connectorResponseSchema),
6947
+ configuredTypes: z22.array(connectorTypeSchema),
6948
+ connectorProvidedSecretNames: z22.array(z22.string())
6538
6949
  });
6539
- var connectorsMainContract = c19.router({
6950
+ var connectorsMainContract = c18.router({
6540
6951
  list: {
6541
6952
  method: "GET",
6542
6953
  path: "/api/connectors",
@@ -6549,12 +6960,12 @@ var connectorsMainContract = c19.router({
6549
6960
  summary: "List all connectors for the authenticated user"
6550
6961
  }
6551
6962
  });
6552
- var connectorsByTypeContract = c19.router({
6963
+ var connectorsByTypeContract = c18.router({
6553
6964
  get: {
6554
6965
  method: "GET",
6555
6966
  path: "/api/connectors/:type",
6556
6967
  headers: authHeadersSchema,
6557
- pathParams: z23.object({
6968
+ pathParams: z22.object({
6558
6969
  type: connectorTypeSchema
6559
6970
  }),
6560
6971
  responses: {
@@ -6569,11 +6980,11 @@ var connectorsByTypeContract = c19.router({
6569
6980
  method: "DELETE",
6570
6981
  path: "/api/connectors/:type",
6571
6982
  headers: authHeadersSchema,
6572
- pathParams: z23.object({
6983
+ pathParams: z22.object({
6573
6984
  type: connectorTypeSchema
6574
6985
  }),
6575
6986
  responses: {
6576
- 204: c19.noBody(),
6987
+ 204: c18.noBody(),
6577
6988
  401: apiErrorSchema,
6578
6989
  404: apiErrorSchema,
6579
6990
  500: apiErrorSchema
@@ -6581,18 +6992,18 @@ var connectorsByTypeContract = c19.router({
6581
6992
  summary: "Disconnect a connector"
6582
6993
  }
6583
6994
  });
6584
- var scopeDiffResponseSchema = z23.object({
6585
- addedScopes: z23.array(z23.string()),
6586
- removedScopes: z23.array(z23.string()),
6587
- currentScopes: z23.array(z23.string()),
6588
- storedScopes: z23.array(z23.string())
6995
+ var scopeDiffResponseSchema = z22.object({
6996
+ addedScopes: z22.array(z22.string()),
6997
+ removedScopes: z22.array(z22.string()),
6998
+ currentScopes: z22.array(z22.string()),
6999
+ storedScopes: z22.array(z22.string())
6589
7000
  });
6590
- var connectorScopeDiffContract = c19.router({
7001
+ var connectorScopeDiffContract = c18.router({
6591
7002
  getScopeDiff: {
6592
7003
  method: "GET",
6593
7004
  path: "/api/connectors/:type/scope-diff",
6594
7005
  headers: authHeadersSchema,
6595
- pathParams: z23.object({ type: connectorTypeSchema }),
7006
+ pathParams: z22.object({ type: connectorTypeSchema }),
6596
7007
  responses: {
6597
7008
  200: scopeDiffResponseSchema,
6598
7009
  401: apiErrorSchema,
@@ -6602,27 +7013,27 @@ var connectorScopeDiffContract = c19.router({
6602
7013
  summary: "Get scope diff for a connector"
6603
7014
  }
6604
7015
  });
6605
- var connectorSessionStatusSchema = z23.enum([
7016
+ var connectorSessionStatusSchema = z22.enum([
6606
7017
  "pending",
6607
7018
  "complete",
6608
7019
  "expired",
6609
7020
  "error"
6610
7021
  ]);
6611
- var connectorSessionResponseSchema = z23.object({
6612
- id: z23.uuid(),
6613
- code: z23.string(),
7022
+ var connectorSessionResponseSchema = z22.object({
7023
+ id: z22.uuid(),
7024
+ code: z22.string(),
6614
7025
  type: connectorTypeSchema,
6615
7026
  status: connectorSessionStatusSchema,
6616
- verificationUrl: z23.string(),
6617
- expiresIn: z23.number(),
6618
- interval: z23.number(),
6619
- errorMessage: z23.string().nullable().optional()
7027
+ verificationUrl: z22.string(),
7028
+ expiresIn: z22.number(),
7029
+ interval: z22.number(),
7030
+ errorMessage: z22.string().nullable().optional()
6620
7031
  });
6621
- var connectorSessionStatusResponseSchema = z23.object({
7032
+ var connectorSessionStatusResponseSchema = z22.object({
6622
7033
  status: connectorSessionStatusSchema,
6623
- errorMessage: z23.string().nullable().optional()
7034
+ errorMessage: z22.string().nullable().optional()
6624
7035
  });
6625
- var connectorSessionsContract = c19.router({
7036
+ var connectorSessionsContract = c18.router({
6626
7037
  /**
6627
7038
  * POST /api/connectors/:type/sessions
6628
7039
  * Create a new connector session for CLI device flow
@@ -6631,10 +7042,10 @@ var connectorSessionsContract = c19.router({
6631
7042
  method: "POST",
6632
7043
  path: "/api/connectors/:type/sessions",
6633
7044
  headers: authHeadersSchema,
6634
- pathParams: z23.object({
7045
+ pathParams: z22.object({
6635
7046
  type: connectorTypeSchema
6636
7047
  }),
6637
- body: z23.object({}).optional(),
7048
+ body: z22.object({}).optional(),
6638
7049
  responses: {
6639
7050
  200: connectorSessionResponseSchema,
6640
7051
  400: apiErrorSchema,
@@ -6644,7 +7055,7 @@ var connectorSessionsContract = c19.router({
6644
7055
  summary: "Create connector session for CLI device flow"
6645
7056
  }
6646
7057
  });
6647
- var connectorSessionByIdContract = c19.router({
7058
+ var connectorSessionByIdContract = c18.router({
6648
7059
  /**
6649
7060
  * GET /api/connectors/:type/sessions/:sessionId
6650
7061
  * Get connector session status (for CLI polling)
@@ -6653,9 +7064,9 @@ var connectorSessionByIdContract = c19.router({
6653
7064
  method: "GET",
6654
7065
  path: "/api/connectors/:type/sessions/:sessionId",
6655
7066
  headers: authHeadersSchema,
6656
- pathParams: z23.object({
7067
+ pathParams: z22.object({
6657
7068
  type: connectorTypeSchema,
6658
- sessionId: z23.uuid()
7069
+ sessionId: z22.uuid()
6659
7070
  }),
6660
7071
  responses: {
6661
7072
  200: connectorSessionStatusResponseSchema,
@@ -6667,19 +7078,19 @@ var connectorSessionByIdContract = c19.router({
6667
7078
  summary: "Get connector session status"
6668
7079
  }
6669
7080
  });
6670
- var computerConnectorCreateResponseSchema = z23.object({
6671
- id: z23.uuid(),
6672
- ngrokToken: z23.string(),
6673
- bridgeToken: z23.string(),
6674
- endpointPrefix: z23.string(),
6675
- domain: z23.string()
7081
+ var computerConnectorCreateResponseSchema = z22.object({
7082
+ id: z22.uuid(),
7083
+ ngrokToken: z22.string(),
7084
+ bridgeToken: z22.string(),
7085
+ endpointPrefix: z22.string(),
7086
+ domain: z22.string()
6676
7087
  });
6677
- var computerConnectorContract = c19.router({
7088
+ var computerConnectorContract = c18.router({
6678
7089
  create: {
6679
7090
  method: "POST",
6680
7091
  path: "/api/connectors/computer",
6681
7092
  headers: authHeadersSchema,
6682
- body: z23.object({}).optional(),
7093
+ body: z22.object({}).optional(),
6683
7094
  responses: {
6684
7095
  200: computerConnectorCreateResponseSchema,
6685
7096
  400: apiErrorSchema,
@@ -6705,7 +7116,7 @@ var computerConnectorContract = c19.router({
6705
7116
  path: "/api/connectors/computer",
6706
7117
  headers: authHeadersSchema,
6707
7118
  responses: {
6708
- 204: c19.noBody(),
7119
+ 204: c18.noBody(),
6709
7120
  401: apiErrorSchema,
6710
7121
  404: apiErrorSchema,
6711
7122
  500: apiErrorSchema
@@ -7057,21 +7468,21 @@ async function expandFirewallConfigs(config, fetchFn) {
7057
7468
  }
7058
7469
 
7059
7470
  // ../../packages/core/src/contracts/user-preferences.ts
7060
- import { z as z24 } from "zod";
7061
- var c20 = initContract();
7062
- var sendModeSchema = z24.enum(["enter", "cmd-enter"]);
7063
- var userPreferencesResponseSchema = z24.object({
7064
- timezone: z24.string().nullable(),
7065
- notifyEmail: z24.boolean(),
7066
- notifySlack: z24.boolean(),
7067
- pinnedAgentIds: z24.array(z24.string()),
7471
+ import { z as z23 } from "zod";
7472
+ var c19 = initContract();
7473
+ var sendModeSchema = z23.enum(["enter", "cmd-enter"]);
7474
+ var userPreferencesResponseSchema = z23.object({
7475
+ timezone: z23.string().nullable(),
7476
+ notifyEmail: z23.boolean(),
7477
+ notifySlack: z23.boolean(),
7478
+ pinnedAgentIds: z23.array(z23.string()),
7068
7479
  sendMode: sendModeSchema
7069
7480
  });
7070
- var updateUserPreferencesRequestSchema = z24.object({
7071
- timezone: z24.string().min(1).optional(),
7072
- notifyEmail: z24.boolean().optional(),
7073
- notifySlack: z24.boolean().optional(),
7074
- pinnedAgentIds: z24.array(z24.string()).max(4).optional(),
7481
+ var updateUserPreferencesRequestSchema = z23.object({
7482
+ timezone: z23.string().min(1).optional(),
7483
+ notifyEmail: z23.boolean().optional(),
7484
+ notifySlack: z23.boolean().optional(),
7485
+ pinnedAgentIds: z23.array(z23.string()).optional(),
7075
7486
  sendMode: sendModeSchema.optional()
7076
7487
  }).refine(
7077
7488
  (data) => data.timezone !== void 0 || data.notifyEmail !== void 0 || data.notifySlack !== void 0 || data.pinnedAgentIds !== void 0 || data.sendMode !== void 0,
@@ -7079,7 +7490,7 @@ var updateUserPreferencesRequestSchema = z24.object({
7079
7490
  message: "At least one preference must be provided"
7080
7491
  }
7081
7492
  );
7082
- var userPreferencesContract = c20.router({
7493
+ var userPreferencesContract = c19.router({
7083
7494
  /**
7084
7495
  * GET /api/user/preferences
7085
7496
  * Get current user's preferences
@@ -7115,17 +7526,17 @@ var userPreferencesContract = c20.router({
7115
7526
  });
7116
7527
 
7117
7528
  // ../../packages/core/src/contracts/org-list.ts
7118
- import { z as z25 } from "zod";
7119
- var c21 = initContract();
7120
- var orgListItemSchema = z25.object({
7121
- slug: z25.string(),
7122
- role: z25.string()
7529
+ import { z as z24 } from "zod";
7530
+ var c20 = initContract();
7531
+ var orgListItemSchema = z24.object({
7532
+ slug: z24.string(),
7533
+ role: z24.string()
7123
7534
  });
7124
- var orgListResponseSchema = z25.object({
7125
- orgs: z25.array(orgListItemSchema),
7126
- active: z25.string().optional()
7535
+ var orgListResponseSchema = z24.object({
7536
+ orgs: z24.array(orgListItemSchema),
7537
+ active: z24.string().optional()
7127
7538
  });
7128
- var orgListContract = c21.router({
7539
+ var orgListContract = c20.router({
7129
7540
  /**
7130
7541
  * GET /api/org/list
7131
7542
  * List all orgs accessible to the user
@@ -7144,24 +7555,24 @@ var orgListContract = c21.router({
7144
7555
  });
7145
7556
 
7146
7557
  // ../../packages/core/src/contracts/onboarding.ts
7147
- import { z as z26 } from "zod";
7148
- var c22 = initContract();
7149
- var onboardingStatusResponseSchema = z26.object({
7150
- needsOnboarding: z26.boolean(),
7151
- isAdmin: z26.boolean(),
7152
- hasOrg: z26.boolean(),
7153
- hasModelProvider: z26.boolean(),
7154
- hasDefaultAgent: z26.boolean(),
7155
- defaultAgentName: z26.string().nullable(),
7156
- defaultAgentComposeId: z26.string().nullable(),
7157
- defaultAgentMetadata: z26.object({
7158
- displayName: z26.string().optional(),
7159
- description: z26.string().optional(),
7160
- sound: z26.string().optional()
7558
+ import { z as z25 } from "zod";
7559
+ var c21 = initContract();
7560
+ var onboardingStatusResponseSchema = z25.object({
7561
+ needsOnboarding: z25.boolean(),
7562
+ isAdmin: z25.boolean(),
7563
+ hasOrg: z25.boolean(),
7564
+ hasModelProvider: z25.boolean(),
7565
+ hasDefaultAgent: z25.boolean(),
7566
+ defaultAgentName: z25.string().nullable(),
7567
+ defaultAgentComposeId: z25.string().nullable(),
7568
+ defaultAgentMetadata: z25.object({
7569
+ displayName: z25.string().optional(),
7570
+ description: z25.string().optional(),
7571
+ sound: z25.string().optional()
7161
7572
  }).nullable(),
7162
- defaultAgentSkills: z26.array(z26.string())
7573
+ defaultAgentSkills: z25.array(z25.string())
7163
7574
  });
7164
- var onboardingStatusContract = c22.router({
7575
+ var onboardingStatusContract = c21.router({
7165
7576
  getStatus: {
7166
7577
  method: "GET",
7167
7578
  path: "/api/onboarding/status",
@@ -7175,31 +7586,31 @@ var onboardingStatusContract = c22.router({
7175
7586
  });
7176
7587
 
7177
7588
  // ../../packages/core/src/contracts/skills.ts
7178
- import { z as z27 } from "zod";
7179
- var c23 = initContract();
7180
- var skillFrontmatterSchema = z27.object({
7181
- name: z27.string().optional(),
7182
- description: z27.string().optional(),
7183
- vm0_secrets: z27.array(z27.string()).optional(),
7184
- vm0_vars: z27.array(z27.string()).optional()
7589
+ import { z as z26 } from "zod";
7590
+ var c22 = initContract();
7591
+ var skillFrontmatterSchema = z26.object({
7592
+ name: z26.string().optional(),
7593
+ description: z26.string().optional(),
7594
+ vm0_secrets: z26.array(z26.string()).optional(),
7595
+ vm0_vars: z26.array(z26.string()).optional()
7185
7596
  });
7186
- var resolvedSkillSchema = z27.object({
7187
- storageName: z27.string(),
7188
- versionHash: z27.string(),
7597
+ var resolvedSkillSchema = z26.object({
7598
+ storageName: z26.string(),
7599
+ versionHash: z26.string(),
7189
7600
  frontmatter: skillFrontmatterSchema
7190
7601
  });
7191
- var skillsResolveContract = c23.router({
7602
+ var skillsResolveContract = c22.router({
7192
7603
  resolve: {
7193
7604
  method: "POST",
7194
7605
  path: "/api/skills/resolve",
7195
7606
  headers: authHeadersSchema,
7196
- body: z27.object({
7197
- skills: z27.array(z27.url()).min(1).max(100)
7607
+ body: z26.object({
7608
+ skills: z26.array(z26.url()).min(1).max(100)
7198
7609
  }),
7199
7610
  responses: {
7200
- 200: z27.object({
7201
- resolved: z27.record(z27.string(), resolvedSkillSchema),
7202
- unresolved: z27.array(z27.string())
7611
+ 200: z26.object({
7612
+ resolved: z26.record(z26.string(), resolvedSkillSchema),
7613
+ unresolved: z26.array(z26.string())
7203
7614
  }),
7204
7615
  400: apiErrorSchema,
7205
7616
  401: apiErrorSchema
@@ -7209,9 +7620,9 @@ var skillsResolveContract = c23.router({
7209
7620
  });
7210
7621
 
7211
7622
  // ../../packages/core/src/contracts/org-model-providers.ts
7212
- import { z as z28 } from "zod";
7213
- var c24 = initContract();
7214
- var orgModelProvidersMainContract = c24.router({
7623
+ import { z as z27 } from "zod";
7624
+ var c23 = initContract();
7625
+ var orgModelProvidersMainContract = c23.router({
7215
7626
  list: {
7216
7627
  method: "GET",
7217
7628
  path: "/api/org/model-providers",
@@ -7239,16 +7650,16 @@ var orgModelProvidersMainContract = c24.router({
7239
7650
  summary: "Create or update an org-level model provider (admin only)"
7240
7651
  }
7241
7652
  });
7242
- var orgModelProvidersByTypeContract = c24.router({
7653
+ var orgModelProvidersByTypeContract = c23.router({
7243
7654
  delete: {
7244
7655
  method: "DELETE",
7245
7656
  path: "/api/org/model-providers/:type",
7246
7657
  headers: authHeadersSchema,
7247
- pathParams: z28.object({
7658
+ pathParams: z27.object({
7248
7659
  type: modelProviderTypeSchema
7249
7660
  }),
7250
7661
  responses: {
7251
- 204: c24.noBody(),
7662
+ 204: c23.noBody(),
7252
7663
  401: apiErrorSchema,
7253
7664
  403: apiErrorSchema,
7254
7665
  404: apiErrorSchema,
@@ -7257,15 +7668,15 @@ var orgModelProvidersByTypeContract = c24.router({
7257
7668
  summary: "Delete an org-level model provider (admin only)"
7258
7669
  }
7259
7670
  });
7260
- var orgModelProvidersSetDefaultContract = c24.router({
7671
+ var orgModelProvidersSetDefaultContract = c23.router({
7261
7672
  setDefault: {
7262
7673
  method: "POST",
7263
7674
  path: "/api/org/model-providers/:type/set-default",
7264
7675
  headers: authHeadersSchema,
7265
- pathParams: z28.object({
7676
+ pathParams: z27.object({
7266
7677
  type: modelProviderTypeSchema
7267
7678
  }),
7268
- body: z28.undefined(),
7679
+ body: z27.undefined(),
7269
7680
  responses: {
7270
7681
  200: modelProviderResponseSchema,
7271
7682
  401: apiErrorSchema,
@@ -7276,12 +7687,12 @@ var orgModelProvidersSetDefaultContract = c24.router({
7276
7687
  summary: "Set org-level model provider as default (admin only)"
7277
7688
  }
7278
7689
  });
7279
- var orgModelProvidersUpdateModelContract = c24.router({
7690
+ var orgModelProvidersUpdateModelContract = c23.router({
7280
7691
  updateModel: {
7281
7692
  method: "PATCH",
7282
7693
  path: "/api/org/model-providers/:type/model",
7283
7694
  headers: authHeadersSchema,
7284
- pathParams: z28.object({
7695
+ pathParams: z27.object({
7285
7696
  type: modelProviderTypeSchema
7286
7697
  }),
7287
7698
  body: updateModelRequestSchema,
@@ -7297,9 +7708,9 @@ var orgModelProvidersUpdateModelContract = c24.router({
7297
7708
  });
7298
7709
 
7299
7710
  // ../../packages/core/src/contracts/org-secrets.ts
7300
- import { z as z29 } from "zod";
7301
- var c25 = initContract();
7302
- var orgSecretsMainContract = c25.router({
7711
+ import { z as z28 } from "zod";
7712
+ var c24 = initContract();
7713
+ var orgSecretsMainContract = c24.router({
7303
7714
  list: {
7304
7715
  method: "GET",
7305
7716
  path: "/api/org/secrets",
@@ -7327,16 +7738,16 @@ var orgSecretsMainContract = c25.router({
7327
7738
  summary: "Create or update an org-level secret (admin only)"
7328
7739
  }
7329
7740
  });
7330
- var orgSecretsByNameContract = c25.router({
7741
+ var orgSecretsByNameContract = c24.router({
7331
7742
  delete: {
7332
7743
  method: "DELETE",
7333
7744
  path: "/api/org/secrets/:name",
7334
7745
  headers: authHeadersSchema,
7335
- pathParams: z29.object({
7746
+ pathParams: z28.object({
7336
7747
  name: secretNameSchema
7337
7748
  }),
7338
7749
  responses: {
7339
- 204: c25.noBody(),
7750
+ 204: c24.noBody(),
7340
7751
  401: apiErrorSchema,
7341
7752
  403: apiErrorSchema,
7342
7753
  404: apiErrorSchema,
@@ -7347,9 +7758,9 @@ var orgSecretsByNameContract = c25.router({
7347
7758
  });
7348
7759
 
7349
7760
  // ../../packages/core/src/contracts/org-variables.ts
7350
- import { z as z30 } from "zod";
7351
- var c26 = initContract();
7352
- var orgVariablesMainContract = c26.router({
7761
+ import { z as z29 } from "zod";
7762
+ var c25 = initContract();
7763
+ var orgVariablesMainContract = c25.router({
7353
7764
  list: {
7354
7765
  method: "GET",
7355
7766
  path: "/api/org/variables",
@@ -7377,16 +7788,16 @@ var orgVariablesMainContract = c26.router({
7377
7788
  summary: "Create or update an org-level variable (admin only)"
7378
7789
  }
7379
7790
  });
7380
- var orgVariablesByNameContract = c26.router({
7791
+ var orgVariablesByNameContract = c25.router({
7381
7792
  delete: {
7382
7793
  method: "DELETE",
7383
7794
  path: "/api/org/variables/:name",
7384
7795
  headers: authHeadersSchema,
7385
- pathParams: z30.object({
7796
+ pathParams: z29.object({
7386
7797
  name: variableNameSchema
7387
7798
  }),
7388
7799
  responses: {
7389
- 204: c26.noBody(),
7800
+ 204: c25.noBody(),
7390
7801
  401: apiErrorSchema,
7391
7802
  403: apiErrorSchema,
7392
7803
  404: apiErrorSchema,
@@ -7396,6 +7807,103 @@ var orgVariablesByNameContract = c26.router({
7396
7807
  }
7397
7808
  });
7398
7809
 
7810
+ // ../../packages/core/src/contracts/zero-agents.ts
7811
+ import { z as z30 } from "zod";
7812
+ var c26 = initContract();
7813
+ var zeroAgentResponseSchema = z30.object({
7814
+ name: z30.string(),
7815
+ agentComposeId: z30.string(),
7816
+ description: z30.string().nullable(),
7817
+ displayName: z30.string().nullable(),
7818
+ sound: z30.string().nullable(),
7819
+ connectors: z30.array(z30.string())
7820
+ });
7821
+ var zeroAgentRequestSchema = z30.object({
7822
+ description: z30.string().optional(),
7823
+ displayName: z30.string().optional(),
7824
+ sound: z30.string().optional(),
7825
+ connectors: z30.array(z30.string())
7826
+ });
7827
+ var zeroAgentInstructionsResponseSchema = z30.object({
7828
+ content: z30.string().nullable(),
7829
+ filename: z30.string().nullable()
7830
+ });
7831
+ var zeroAgentInstructionsRequestSchema = z30.object({
7832
+ content: z30.string()
7833
+ });
7834
+ var zeroAgentsMainContract = c26.router({
7835
+ create: {
7836
+ method: "POST",
7837
+ path: "/api/zero/agents",
7838
+ headers: authHeadersSchema,
7839
+ body: zeroAgentRequestSchema,
7840
+ responses: {
7841
+ 201: zeroAgentResponseSchema,
7842
+ 400: apiErrorSchema,
7843
+ 401: apiErrorSchema,
7844
+ 422: apiErrorSchema
7845
+ },
7846
+ summary: "Create zero agent"
7847
+ }
7848
+ });
7849
+ var zeroAgentsByNameContract = c26.router({
7850
+ get: {
7851
+ method: "GET",
7852
+ path: "/api/zero/agents/:name",
7853
+ headers: authHeadersSchema,
7854
+ pathParams: z30.object({ name: z30.string() }),
7855
+ responses: {
7856
+ 200: zeroAgentResponseSchema,
7857
+ 401: apiErrorSchema,
7858
+ 404: apiErrorSchema
7859
+ },
7860
+ summary: "Get zero agent by name"
7861
+ },
7862
+ update: {
7863
+ method: "PUT",
7864
+ path: "/api/zero/agents/:name",
7865
+ headers: authHeadersSchema,
7866
+ pathParams: z30.object({ name: z30.string() }),
7867
+ body: zeroAgentRequestSchema,
7868
+ responses: {
7869
+ 200: zeroAgentResponseSchema,
7870
+ 400: apiErrorSchema,
7871
+ 401: apiErrorSchema,
7872
+ 404: apiErrorSchema,
7873
+ 422: apiErrorSchema
7874
+ },
7875
+ summary: "Update zero agent"
7876
+ }
7877
+ });
7878
+ var zeroAgentInstructionsContract = c26.router({
7879
+ get: {
7880
+ method: "GET",
7881
+ path: "/api/zero/agents/:name/instructions",
7882
+ headers: authHeadersSchema,
7883
+ pathParams: z30.object({ name: z30.string() }),
7884
+ responses: {
7885
+ 200: zeroAgentInstructionsResponseSchema,
7886
+ 401: apiErrorSchema,
7887
+ 404: apiErrorSchema
7888
+ },
7889
+ summary: "Get zero agent instructions"
7890
+ },
7891
+ update: {
7892
+ method: "PUT",
7893
+ path: "/api/zero/agents/:name/instructions",
7894
+ headers: authHeadersSchema,
7895
+ pathParams: z30.object({ name: z30.string() }),
7896
+ body: zeroAgentInstructionsRequestSchema,
7897
+ responses: {
7898
+ 200: zeroAgentResponseSchema,
7899
+ 401: apiErrorSchema,
7900
+ 404: apiErrorSchema,
7901
+ 422: apiErrorSchema
7902
+ },
7903
+ summary: "Update zero agent instructions"
7904
+ }
7905
+ });
7906
+
7399
7907
  // ../../packages/core/src/storage-names.ts
7400
7908
  function getInstructionsStorageName(agentName) {
7401
7909
  return `agent-instructions@${agentName}`;
@@ -7460,6 +7968,10 @@ var STAFF_USER_HASHES = [
7460
7968
  "67a65740246389d7fecf7702f8b7d6914ad38dc5",
7461
7969
  "55651a8b2c85b35ff0629fa3d4718b9476069d0f"
7462
7970
  ];
7971
+ var GOOGLE_OAUTH_REVIEWER_EMAIL_HASHES = [
7972
+ "da04f6515e16a883d6e8c4b03932f51ccc362c10"
7973
+ // Google OAuth reviewer
7974
+ ];
7463
7975
  var FEATURE_SWITCHES = {
7464
7976
  ["pricing" /* Pricing */]: {
7465
7977
  maintainer: "ethan@vm0.ai",
@@ -7523,27 +8035,32 @@ var FEATURE_SWITCHES = {
7523
8035
  ["gmailConnector" /* GmailConnector */]: {
7524
8036
  maintainer: "ethan@vm0.ai",
7525
8037
  enabled: false,
7526
- enabledUserHashes: STAFF_USER_HASHES
8038
+ enabledUserHashes: STAFF_USER_HASHES,
8039
+ enabledEmailHashes: GOOGLE_OAUTH_REVIEWER_EMAIL_HASHES
7527
8040
  },
7528
8041
  ["googleSheetsConnector" /* GoogleSheetsConnector */]: {
7529
8042
  maintainer: "ethan@vm0.ai",
7530
8043
  enabled: false,
7531
- enabledUserHashes: STAFF_USER_HASHES
8044
+ enabledUserHashes: STAFF_USER_HASHES,
8045
+ enabledEmailHashes: GOOGLE_OAUTH_REVIEWER_EMAIL_HASHES
7532
8046
  },
7533
8047
  ["googleDocsConnector" /* GoogleDocsConnector */]: {
7534
8048
  maintainer: "ethan@vm0.ai",
7535
8049
  enabled: false,
7536
- enabledUserHashes: STAFF_USER_HASHES
8050
+ enabledUserHashes: STAFF_USER_HASHES,
8051
+ enabledEmailHashes: GOOGLE_OAUTH_REVIEWER_EMAIL_HASHES
7537
8052
  },
7538
8053
  ["googleDriveConnector" /* GoogleDriveConnector */]: {
7539
8054
  maintainer: "ethan@vm0.ai",
7540
8055
  enabled: false,
7541
- enabledUserHashes: STAFF_USER_HASHES
8056
+ enabledUserHashes: STAFF_USER_HASHES,
8057
+ enabledEmailHashes: GOOGLE_OAUTH_REVIEWER_EMAIL_HASHES
7542
8058
  },
7543
8059
  ["googleCalendarConnector" /* GoogleCalendarConnector */]: {
7544
8060
  maintainer: "ethan@vm0.ai",
7545
8061
  enabled: false,
7546
- enabledUserHashes: STAFF_USER_HASHES
8062
+ enabledUserHashes: STAFF_USER_HASHES,
8063
+ enabledEmailHashes: GOOGLE_OAUTH_REVIEWER_EMAIL_HASHES
7547
8064
  },
7548
8065
  ["mercuryConnector" /* MercuryConnector */]: {
7549
8066
  maintainer: "ethan@vm0.ai",
@@ -7634,16 +8151,30 @@ var FEATURE_SWITCHES = {
7634
8151
  maintainer: "ethan@vm0.ai",
7635
8152
  enabled: false,
7636
8153
  enabledUserHashes: STAFF_USER_HASHES
8154
+ },
8155
+ ["showSystemPrompt" /* ShowSystemPrompt */]: {
8156
+ maintainer: "ethan@vm0.ai",
8157
+ enabled: false,
8158
+ enabledUserHashes: STAFF_USER_HASHES
8159
+ },
8160
+ ["vm0ModelProvider" /* Vm0ModelProvider */]: {
8161
+ maintainer: "ethan@vm0.ai",
8162
+ enabled: false,
8163
+ enabledUserHashes: STAFF_USER_HASHES
7637
8164
  }
7638
8165
  };
7639
- async function isFeatureEnabled(key, userId) {
8166
+ async function isFeatureEnabled(key, userId, email) {
7640
8167
  const featureSwitch = FEATURE_SWITCHES[key];
7641
8168
  if (featureSwitch.enabled) {
7642
8169
  return true;
7643
8170
  }
7644
8171
  if (userId && featureSwitch.enabledUserHashes?.length) {
7645
8172
  const hash = await sha1(userId);
7646
- return featureSwitch.enabledUserHashes.includes(hash);
8173
+ if (featureSwitch.enabledUserHashes.includes(hash)) return true;
8174
+ }
8175
+ if (email && featureSwitch.enabledEmailHashes?.length) {
8176
+ const hash = await sha1(email.toLowerCase());
8177
+ if (featureSwitch.enabledEmailHashes.includes(hash)) return true;
7647
8178
  }
7648
8179
  return false;
7649
8180
  }
@@ -7834,7 +8365,7 @@ async function listRuns(params) {
7834
8365
  async function getRunQueue() {
7835
8366
  const config = await getClientConfig();
7836
8367
  const client = initClient2(runsQueueContract, config);
7837
- const result = await client.getQueue({});
8368
+ const result = await client.getQueue({ headers: {} });
7838
8369
  if (result.status === 200) {
7839
8370
  return result.body;
7840
8371
  }
@@ -9695,7 +10226,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
9695
10226
  options.autoUpdate = false;
9696
10227
  }
9697
10228
  if (options.autoUpdate !== false) {
9698
- await startSilentUpgrade("9.69.0");
10229
+ await startSilentUpgrade("9.70.0");
9699
10230
  }
9700
10231
  try {
9701
10232
  let result;
@@ -10513,11 +11044,14 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
10513
11044
  ).option(
10514
11045
  "--append-system-prompt <text>",
10515
11046
  "Append text to the agent's system prompt"
11047
+ ).option(
11048
+ "--disallowed-tools <tools...>",
11049
+ "Tools to disable in Claude CLI (e.g., CronCreate WebSearch)"
10516
11050
  ).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option2("--debug-no-mock-claude").hideHelp()).addOption(new Option2("--no-auto-update").hideHelp()).action(
10517
11051
  withErrorHandler(
10518
11052
  async (identifier, prompt, options) => {
10519
11053
  if (options.autoUpdate !== false) {
10520
- await startSilentUpgrade("9.69.0");
11054
+ await startSilentUpgrade("9.70.0");
10521
11055
  }
10522
11056
  const { org, name, version } = parseIdentifier(identifier);
10523
11057
  let composeId;
@@ -10570,6 +11104,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
10570
11104
  conversationId: options.conversation,
10571
11105
  modelProvider: options.modelProvider,
10572
11106
  appendSystemPrompt: options.appendSystemPrompt,
11107
+ disallowedTools: options.disallowedTools,
10573
11108
  checkEnv: options.checkEnv || void 0,
10574
11109
  debugNoMockClaude: options.debugNoMockClaude || void 0
10575
11110
  });
@@ -10620,6 +11155,9 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
10620
11155
  ).option(
10621
11156
  "--append-system-prompt <text>",
10622
11157
  "Append text to the agent's system prompt"
11158
+ ).option(
11159
+ "--disallowed-tools <tools...>",
11160
+ "Tools to disable in Claude CLI (e.g., CronCreate WebSearch)"
10623
11161
  ).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option3("--debug-no-mock-claude").hideHelp()).action(
10624
11162
  withErrorHandler(
10625
11163
  async (checkpointId, prompt, options, command) => {
@@ -10643,6 +11181,7 @@ var resumeCommand = new Command9().name("resume").description("Resume an agent r
10643
11181
  volumeVersions: Object.keys(allOpts.volumeVersion).length > 0 ? allOpts.volumeVersion : void 0,
10644
11182
  modelProvider: options.modelProvider || allOpts.modelProvider,
10645
11183
  appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
11184
+ disallowedTools: options.disallowedTools || allOpts.disallowedTools,
10646
11185
  checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
10647
11186
  debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
10648
11187
  });
@@ -10686,6 +11225,9 @@ var continueCommand = new Command10().name("continue").description(
10686
11225
  ).option(
10687
11226
  "--append-system-prompt <text>",
10688
11227
  "Append text to the agent's system prompt"
11228
+ ).option(
11229
+ "--disallowed-tools <tools...>",
11230
+ "Tools to disable in Claude CLI (e.g., CronCreate WebSearch)"
10689
11231
  ).option("--verbose", "Show full tool inputs and outputs").option("--check-env", "Validate secrets and vars before running").addOption(new Option4("--debug-no-mock-claude").hideHelp()).action(
10690
11232
  withErrorHandler(
10691
11233
  async (agentSessionId, prompt, options, command) => {
@@ -10709,6 +11251,7 @@ var continueCommand = new Command10().name("continue").description(
10709
11251
  secrets: loadedSecrets,
10710
11252
  modelProvider: options.modelProvider || allOpts.modelProvider,
10711
11253
  appendSystemPrompt: options.appendSystemPrompt || allOpts.appendSystemPrompt,
11254
+ disallowedTools: options.disallowedTools || allOpts.disallowedTools,
10712
11255
  checkEnv: options.checkEnv || allOpts.checkEnv || void 0,
10713
11256
  debugNoMockClaude: options.debugNoMockClaude || allOpts.debugNoMockClaude || void 0
10714
11257
  });
@@ -12246,7 +12789,7 @@ var cookAction = new Command35().name("cook").description("Quick start: prepare,
12246
12789
  withErrorHandler(
12247
12790
  async (prompt, options) => {
12248
12791
  if (options.autoUpdate !== false) {
12249
- const shouldExit = await checkAndUpgrade("9.69.0", prompt);
12792
+ const shouldExit = await checkAndUpgrade("9.70.0", prompt);
12250
12793
  if (shouldExit) {
12251
12794
  process.exit(0);
12252
12795
  }
@@ -14188,23 +14731,22 @@ async function handleInteractiveMode() {
14188
14731
  }
14189
14732
  const { modelProviders: configuredProviders } = await listOrgModelProviders();
14190
14733
  const configuredTypes = new Set(configuredProviders.map((p) => p.type));
14191
- const annotatedChoices = Object.entries(MODEL_PROVIDER_TYPES).map(
14192
- ([type3, config2]) => {
14193
- const isConfigured = configuredTypes.has(type3);
14194
- const isExperimental = hasAuthMethods(type3);
14195
- let title = config2.label;
14196
- if (isConfigured) {
14197
- title = `${title} \u2713`;
14198
- }
14199
- if (isExperimental) {
14200
- title = `${title} ${chalk53.dim("(experimental)")}`;
14201
- }
14202
- return {
14203
- title,
14204
- value: type3
14205
- };
14734
+ const annotatedChoices = getSelectableProviderTypes().map((type3) => {
14735
+ const config2 = MODEL_PROVIDER_TYPES[type3];
14736
+ const isConfigured = configuredTypes.has(type3);
14737
+ const isExperimental = hasAuthMethods(type3);
14738
+ let title = config2.label;
14739
+ if (isConfigured) {
14740
+ title = `${title} \u2713`;
14206
14741
  }
14207
- );
14742
+ if (isExperimental) {
14743
+ title = `${title} ${chalk53.dim("(experimental)")}`;
14744
+ }
14745
+ return {
14746
+ title,
14747
+ value: type3
14748
+ };
14749
+ });
14208
14750
  const typeResponse = await prompts3(
14209
14751
  {
14210
14752
  type: "select",
@@ -14244,7 +14786,9 @@ async function handleInteractiveMode() {
14244
14786
  }
14245
14787
  const config = MODEL_PROVIDER_TYPES[type2];
14246
14788
  console.log();
14247
- console.log(chalk53.dim(config.helpText));
14789
+ if ("helpText" in config) {
14790
+ console.log(chalk53.dim(config.helpText));
14791
+ }
14248
14792
  console.log();
14249
14793
  if (hasAuthMethods(type2)) {
14250
14794
  const authMethod = await promptForAuthMethod(type2);
@@ -14440,6 +14984,12 @@ function cleanComposeContent(content) {
14440
14984
  if (agent.skills) cleaned.skills = agent.skills;
14441
14985
  if (agent.experimental_runner)
14442
14986
  cleaned.experimental_runner = agent.experimental_runner;
14987
+ if (agent.experimental_profile)
14988
+ cleaned.experimental_profile = agent.experimental_profile;
14989
+ if (agent.experimental_capabilities)
14990
+ cleaned.experimental_capabilities = agent.experimental_capabilities;
14991
+ if (agent.experimental_firewalls)
14992
+ cleaned.experimental_firewalls = agent.experimental_firewalls;
14443
14993
  agents[name] = cleaned;
14444
14994
  }
14445
14995
  const result = {
@@ -17036,7 +17586,7 @@ function getProviderChoices() {
17036
17586
  return {
17037
17587
  type: type2,
17038
17588
  label: config.label,
17039
- helpText: config.helpText,
17589
+ helpText: "helpText" in config ? config.helpText : "",
17040
17590
  secretLabel: "secretLabel" in config ? config.secretLabel : "",
17041
17591
  models: getModels(type2),
17042
17592
  defaultModel: getDefaultModel(type2)
@@ -17591,13 +18141,13 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
17591
18141
  if (latestVersion === null) {
17592
18142
  throw new Error("Could not check for updates. Please try again later.");
17593
18143
  }
17594
- if (latestVersion === "9.69.0") {
17595
- console.log(chalk86.green(`\u2713 Already up to date (${"9.69.0"})`));
18144
+ if (latestVersion === "9.70.0") {
18145
+ console.log(chalk86.green(`\u2713 Already up to date (${"9.70.0"})`));
17596
18146
  return;
17597
18147
  }
17598
18148
  console.log(
17599
18149
  chalk86.yellow(
17600
- `Current version: ${"9.69.0"} -> Latest version: ${latestVersion}`
18150
+ `Current version: ${"9.70.0"} -> Latest version: ${latestVersion}`
17601
18151
  )
17602
18152
  );
17603
18153
  console.log();
@@ -17624,7 +18174,7 @@ var upgradeCommand = new Command94().name("upgrade").description("Upgrade vm0 CL
17624
18174
  const success = await performUpgrade(packageManager);
17625
18175
  if (success) {
17626
18176
  console.log(
17627
- chalk86.green(`\u2713 Upgraded from ${"9.69.0"} to ${latestVersion}`)
18177
+ chalk86.green(`\u2713 Upgraded from ${"9.70.0"} to ${latestVersion}`)
17628
18178
  );
17629
18179
  return;
17630
18180
  }
@@ -17698,7 +18248,7 @@ var whoamiCommand = new Command95().name("whoami").description("Show current ide
17698
18248
 
17699
18249
  // src/index.ts
17700
18250
  var program = new Command96();
17701
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.69.0");
18251
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.70.0");
17702
18252
  program.addCommand(authCommand);
17703
18253
  program.addCommand(infoCommand);
17704
18254
  program.addCommand(composeCommand);