@vm0/cli 9.16.0 → 9.17.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 +562 -437
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -1887,9 +1887,109 @@ var credentialsByNameContract = c10.router({
1887
1887
  }
1888
1888
  });
1889
1889
 
1890
- // ../../packages/core/src/contracts/model-providers.ts
1890
+ // ../../packages/core/src/contracts/secrets.ts
1891
1891
  import { z as z14 } from "zod";
1892
1892
  var c11 = initContract();
1893
+ var secretNameSchema = z14.string().min(1, "Secret name is required").max(255, "Secret name must be at most 255 characters").regex(
1894
+ /^[A-Z][A-Z0-9_]*$/,
1895
+ "Secret name must contain only uppercase letters, numbers, and underscores, and must start with a letter (e.g., MY_API_KEY)"
1896
+ );
1897
+ var secretTypeSchema = z14.enum(["user", "model-provider"]);
1898
+ var secretResponseSchema = z14.object({
1899
+ id: z14.string().uuid(),
1900
+ name: z14.string(),
1901
+ description: z14.string().nullable(),
1902
+ type: secretTypeSchema,
1903
+ createdAt: z14.string(),
1904
+ updatedAt: z14.string()
1905
+ });
1906
+ var secretListResponseSchema = z14.object({
1907
+ secrets: z14.array(secretResponseSchema)
1908
+ });
1909
+ var setSecretRequestSchema = z14.object({
1910
+ name: secretNameSchema,
1911
+ value: z14.string().min(1, "Secret value is required"),
1912
+ description: z14.string().max(1e3).optional()
1913
+ });
1914
+ var secretsMainContract = c11.router({
1915
+ /**
1916
+ * GET /api/secrets
1917
+ * List all secrets for the current user's scope (metadata only)
1918
+ */
1919
+ list: {
1920
+ method: "GET",
1921
+ path: "/api/secrets",
1922
+ headers: authHeadersSchema,
1923
+ responses: {
1924
+ 200: secretListResponseSchema,
1925
+ 401: apiErrorSchema,
1926
+ 500: apiErrorSchema
1927
+ },
1928
+ summary: "List all secrets (metadata only)"
1929
+ },
1930
+ /**
1931
+ * PUT /api/secrets
1932
+ * Create or update a secret
1933
+ */
1934
+ set: {
1935
+ method: "PUT",
1936
+ path: "/api/secrets",
1937
+ headers: authHeadersSchema,
1938
+ body: setSecretRequestSchema,
1939
+ responses: {
1940
+ 200: secretResponseSchema,
1941
+ 201: secretResponseSchema,
1942
+ 400: apiErrorSchema,
1943
+ 401: apiErrorSchema,
1944
+ 500: apiErrorSchema
1945
+ },
1946
+ summary: "Create or update a secret"
1947
+ }
1948
+ });
1949
+ var secretsByNameContract = c11.router({
1950
+ /**
1951
+ * GET /api/secrets/:name
1952
+ * Get a secret by name (metadata only)
1953
+ */
1954
+ get: {
1955
+ method: "GET",
1956
+ path: "/api/secrets/:name",
1957
+ headers: authHeadersSchema,
1958
+ pathParams: z14.object({
1959
+ name: secretNameSchema
1960
+ }),
1961
+ responses: {
1962
+ 200: secretResponseSchema,
1963
+ 401: apiErrorSchema,
1964
+ 404: apiErrorSchema,
1965
+ 500: apiErrorSchema
1966
+ },
1967
+ summary: "Get secret metadata by name"
1968
+ },
1969
+ /**
1970
+ * DELETE /api/secrets/:name
1971
+ * Delete a secret by name
1972
+ */
1973
+ delete: {
1974
+ method: "DELETE",
1975
+ path: "/api/secrets/:name",
1976
+ headers: authHeadersSchema,
1977
+ pathParams: z14.object({
1978
+ name: secretNameSchema
1979
+ }),
1980
+ responses: {
1981
+ 204: c11.noBody(),
1982
+ 401: apiErrorSchema,
1983
+ 404: apiErrorSchema,
1984
+ 500: apiErrorSchema
1985
+ },
1986
+ summary: "Delete a secret"
1987
+ }
1988
+ });
1989
+
1990
+ // ../../packages/core/src/contracts/model-providers.ts
1991
+ import { z as z15 } from "zod";
1992
+ var c12 = initContract();
1893
1993
  var MODEL_PROVIDER_TYPES = {
1894
1994
  "claude-code-oauth-token": {
1895
1995
  framework: "claude-code",
@@ -1990,6 +2090,25 @@ var MODEL_PROVIDER_TYPES = {
1990
2090
  models: ["deepseek-chat"],
1991
2091
  defaultModel: "deepseek-chat"
1992
2092
  },
2093
+ "zai-api-key": {
2094
+ framework: "claude-code",
2095
+ credentialName: "ZAI_API_KEY",
2096
+ label: "Z.AI (GLM)",
2097
+ credentialLabel: "API key",
2098
+ helpText: "Get your API key at: https://z.ai/model-api",
2099
+ environmentMapping: {
2100
+ ANTHROPIC_AUTH_TOKEN: "$credential",
2101
+ ANTHROPIC_BASE_URL: "https://api.z.ai/api/anthropic",
2102
+ ANTHROPIC_MODEL: "$model",
2103
+ ANTHROPIC_DEFAULT_OPUS_MODEL: "$model",
2104
+ ANTHROPIC_DEFAULT_SONNET_MODEL: "$model",
2105
+ ANTHROPIC_DEFAULT_HAIKU_MODEL: "$model",
2106
+ CLAUDE_CODE_SUBAGENT_MODEL: "$model",
2107
+ API_TIMEOUT_MS: "3000000"
2108
+ },
2109
+ models: ["GLM-4.7", "GLM-4.5-Air"],
2110
+ defaultModel: "GLM-4.7"
2111
+ },
1993
2112
  "aws-bedrock": {
1994
2113
  framework: "claude-code",
1995
2114
  label: "AWS Bedrock",
@@ -2056,16 +2175,17 @@ var MODEL_PROVIDER_TYPES = {
2056
2175
  customModelPlaceholder: "anthropic.claude-sonnet-4-20250514-v1:0"
2057
2176
  }
2058
2177
  };
2059
- var modelProviderTypeSchema = z14.enum([
2178
+ var modelProviderTypeSchema = z15.enum([
2060
2179
  "claude-code-oauth-token",
2061
2180
  "anthropic-api-key",
2062
2181
  "openrouter-api-key",
2063
2182
  "moonshot-api-key",
2064
2183
  "minimax-api-key",
2065
2184
  "deepseek-api-key",
2185
+ "zai-api-key",
2066
2186
  "aws-bedrock"
2067
2187
  ]);
2068
- var modelProviderFrameworkSchema = z14.enum(["claude-code", "codex"]);
2188
+ var modelProviderFrameworkSchema = z15.enum(["claude-code", "codex"]);
2069
2189
  function hasAuthMethods(type) {
2070
2190
  const config = MODEL_PROVIDER_TYPES[type];
2071
2191
  return "authMethods" in config;
@@ -2106,45 +2226,45 @@ function getCustomModelPlaceholder(type) {
2106
2226
  const config = MODEL_PROVIDER_TYPES[type];
2107
2227
  return "customModelPlaceholder" in config ? config.customModelPlaceholder : void 0;
2108
2228
  }
2109
- var modelProviderResponseSchema = z14.object({
2110
- id: z14.string().uuid(),
2229
+ var modelProviderResponseSchema = z15.object({
2230
+ id: z15.string().uuid(),
2111
2231
  type: modelProviderTypeSchema,
2112
2232
  framework: modelProviderFrameworkSchema,
2113
- credentialName: z14.string().nullable(),
2233
+ credentialName: z15.string().nullable(),
2114
2234
  // Legacy single-credential (deprecated for multi-auth)
2115
- authMethod: z14.string().nullable(),
2235
+ authMethod: z15.string().nullable(),
2116
2236
  // For multi-auth providers
2117
- credentialNames: z14.array(z14.string()).nullable(),
2237
+ credentialNames: z15.array(z15.string()).nullable(),
2118
2238
  // For multi-auth providers
2119
- isDefault: z14.boolean(),
2120
- selectedModel: z14.string().nullable(),
2121
- createdAt: z14.string(),
2122
- updatedAt: z14.string()
2239
+ isDefault: z15.boolean(),
2240
+ selectedModel: z15.string().nullable(),
2241
+ createdAt: z15.string(),
2242
+ updatedAt: z15.string()
2123
2243
  });
2124
- var modelProviderListResponseSchema = z14.object({
2125
- modelProviders: z14.array(modelProviderResponseSchema)
2244
+ var modelProviderListResponseSchema = z15.object({
2245
+ modelProviders: z15.array(modelProviderResponseSchema)
2126
2246
  });
2127
- var upsertModelProviderRequestSchema = z14.object({
2247
+ var upsertModelProviderRequestSchema = z15.object({
2128
2248
  type: modelProviderTypeSchema,
2129
- credential: z14.string().min(1).optional(),
2249
+ credential: z15.string().min(1).optional(),
2130
2250
  // Legacy single credential
2131
- authMethod: z14.string().optional(),
2251
+ authMethod: z15.string().optional(),
2132
2252
  // For multi-auth providers
2133
- credentials: z14.record(z14.string(), z14.string()).optional(),
2253
+ credentials: z15.record(z15.string(), z15.string()).optional(),
2134
2254
  // For multi-auth providers
2135
- convert: z14.boolean().optional(),
2136
- selectedModel: z14.string().optional()
2255
+ convert: z15.boolean().optional(),
2256
+ selectedModel: z15.string().optional()
2137
2257
  });
2138
- var upsertModelProviderResponseSchema = z14.object({
2258
+ var upsertModelProviderResponseSchema = z15.object({
2139
2259
  provider: modelProviderResponseSchema,
2140
- created: z14.boolean()
2260
+ created: z15.boolean()
2141
2261
  });
2142
- var checkCredentialResponseSchema = z14.object({
2143
- exists: z14.boolean(),
2144
- credentialName: z14.string(),
2145
- currentType: z14.enum(["user", "model-provider"]).optional()
2262
+ var checkCredentialResponseSchema = z15.object({
2263
+ exists: z15.boolean(),
2264
+ credentialName: z15.string(),
2265
+ currentType: z15.enum(["user", "model-provider"]).optional()
2146
2266
  });
2147
- var modelProvidersMainContract = c11.router({
2267
+ var modelProvidersMainContract = c12.router({
2148
2268
  list: {
2149
2269
  method: "GET",
2150
2270
  path: "/api/model-providers",
@@ -2172,12 +2292,12 @@ var modelProvidersMainContract = c11.router({
2172
2292
  summary: "Create or update a model provider"
2173
2293
  }
2174
2294
  });
2175
- var modelProvidersCheckContract = c11.router({
2295
+ var modelProvidersCheckContract = c12.router({
2176
2296
  check: {
2177
2297
  method: "GET",
2178
2298
  path: "/api/model-providers/check/:type",
2179
2299
  headers: authHeadersSchema,
2180
- pathParams: z14.object({
2300
+ pathParams: z15.object({
2181
2301
  type: modelProviderTypeSchema
2182
2302
  }),
2183
2303
  responses: {
@@ -2188,16 +2308,16 @@ var modelProvidersCheckContract = c11.router({
2188
2308
  summary: "Check if credential exists for a model provider type"
2189
2309
  }
2190
2310
  });
2191
- var modelProvidersByTypeContract = c11.router({
2311
+ var modelProvidersByTypeContract = c12.router({
2192
2312
  delete: {
2193
2313
  method: "DELETE",
2194
2314
  path: "/api/model-providers/:type",
2195
2315
  headers: authHeadersSchema,
2196
- pathParams: z14.object({
2316
+ pathParams: z15.object({
2197
2317
  type: modelProviderTypeSchema
2198
2318
  }),
2199
2319
  responses: {
2200
- 204: c11.noBody(),
2320
+ 204: c12.noBody(),
2201
2321
  401: apiErrorSchema,
2202
2322
  404: apiErrorSchema,
2203
2323
  500: apiErrorSchema
@@ -2205,15 +2325,15 @@ var modelProvidersByTypeContract = c11.router({
2205
2325
  summary: "Delete a model provider"
2206
2326
  }
2207
2327
  });
2208
- var modelProvidersConvertContract = c11.router({
2328
+ var modelProvidersConvertContract = c12.router({
2209
2329
  convert: {
2210
2330
  method: "POST",
2211
2331
  path: "/api/model-providers/:type/convert",
2212
2332
  headers: authHeadersSchema,
2213
- pathParams: z14.object({
2333
+ pathParams: z15.object({
2214
2334
  type: modelProviderTypeSchema
2215
2335
  }),
2216
- body: z14.undefined(),
2336
+ body: z15.undefined(),
2217
2337
  responses: {
2218
2338
  200: modelProviderResponseSchema,
2219
2339
  400: apiErrorSchema,
@@ -2224,15 +2344,15 @@ var modelProvidersConvertContract = c11.router({
2224
2344
  summary: "Convert existing user credential to model provider"
2225
2345
  }
2226
2346
  });
2227
- var modelProvidersSetDefaultContract = c11.router({
2347
+ var modelProvidersSetDefaultContract = c12.router({
2228
2348
  setDefault: {
2229
2349
  method: "POST",
2230
2350
  path: "/api/model-providers/:type/set-default",
2231
2351
  headers: authHeadersSchema,
2232
- pathParams: z14.object({
2352
+ pathParams: z15.object({
2233
2353
  type: modelProviderTypeSchema
2234
2354
  }),
2235
- body: z14.undefined(),
2355
+ body: z15.undefined(),
2236
2356
  responses: {
2237
2357
  200: modelProviderResponseSchema,
2238
2358
  401: apiErrorSchema,
@@ -2242,15 +2362,15 @@ var modelProvidersSetDefaultContract = c11.router({
2242
2362
  summary: "Set a model provider as default for its framework"
2243
2363
  }
2244
2364
  });
2245
- var updateModelRequestSchema = z14.object({
2246
- selectedModel: z14.string().optional()
2365
+ var updateModelRequestSchema = z15.object({
2366
+ selectedModel: z15.string().optional()
2247
2367
  });
2248
- var modelProvidersUpdateModelContract = c11.router({
2368
+ var modelProvidersUpdateModelContract = c12.router({
2249
2369
  updateModel: {
2250
2370
  method: "PATCH",
2251
2371
  path: "/api/model-providers/:type/model",
2252
2372
  headers: authHeadersSchema,
2253
- pathParams: z14.object({
2373
+ pathParams: z15.object({
2254
2374
  type: modelProviderTypeSchema
2255
2375
  }),
2256
2376
  body: updateModelRequestSchema,
@@ -2265,42 +2385,42 @@ var modelProvidersUpdateModelContract = c11.router({
2265
2385
  });
2266
2386
 
2267
2387
  // ../../packages/core/src/contracts/sessions.ts
2268
- import { z as z15 } from "zod";
2269
- var c12 = initContract();
2270
- var sessionResponseSchema = z15.object({
2271
- id: z15.string(),
2272
- agentComposeId: z15.string(),
2273
- agentComposeVersionId: z15.string().nullable(),
2274
- conversationId: z15.string().nullable(),
2275
- artifactName: z15.string().nullable(),
2276
- vars: z15.record(z15.string(), z15.string()).nullable(),
2277
- secretNames: z15.array(z15.string()).nullable(),
2278
- volumeVersions: z15.record(z15.string(), z15.string()).nullable(),
2279
- createdAt: z15.string(),
2280
- updatedAt: z15.string()
2388
+ import { z as z16 } from "zod";
2389
+ var c13 = initContract();
2390
+ var sessionResponseSchema = z16.object({
2391
+ id: z16.string(),
2392
+ agentComposeId: z16.string(),
2393
+ agentComposeVersionId: z16.string().nullable(),
2394
+ conversationId: z16.string().nullable(),
2395
+ artifactName: z16.string().nullable(),
2396
+ vars: z16.record(z16.string(), z16.string()).nullable(),
2397
+ secretNames: z16.array(z16.string()).nullable(),
2398
+ volumeVersions: z16.record(z16.string(), z16.string()).nullable(),
2399
+ createdAt: z16.string(),
2400
+ updatedAt: z16.string()
2281
2401
  });
2282
- var agentComposeSnapshotSchema = z15.object({
2283
- agentComposeVersionId: z15.string(),
2284
- vars: z15.record(z15.string(), z15.string()).optional(),
2285
- secretNames: z15.array(z15.string()).optional()
2402
+ var agentComposeSnapshotSchema = z16.object({
2403
+ agentComposeVersionId: z16.string(),
2404
+ vars: z16.record(z16.string(), z16.string()).optional(),
2405
+ secretNames: z16.array(z16.string()).optional()
2286
2406
  });
2287
- var artifactSnapshotSchema2 = z15.object({
2288
- artifactName: z15.string(),
2289
- artifactVersion: z15.string()
2407
+ var artifactSnapshotSchema2 = z16.object({
2408
+ artifactName: z16.string(),
2409
+ artifactVersion: z16.string()
2290
2410
  });
2291
- var volumeVersionsSnapshotSchema2 = z15.object({
2292
- versions: z15.record(z15.string(), z15.string())
2411
+ var volumeVersionsSnapshotSchema2 = z16.object({
2412
+ versions: z16.record(z16.string(), z16.string())
2293
2413
  });
2294
- var checkpointResponseSchema = z15.object({
2295
- id: z15.string(),
2296
- runId: z15.string(),
2297
- conversationId: z15.string(),
2414
+ var checkpointResponseSchema = z16.object({
2415
+ id: z16.string(),
2416
+ runId: z16.string(),
2417
+ conversationId: z16.string(),
2298
2418
  agentComposeSnapshot: agentComposeSnapshotSchema,
2299
2419
  artifactSnapshot: artifactSnapshotSchema2.nullable(),
2300
2420
  volumeVersionsSnapshot: volumeVersionsSnapshotSchema2.nullable(),
2301
- createdAt: z15.string()
2421
+ createdAt: z16.string()
2302
2422
  });
2303
- var sessionsByIdContract = c12.router({
2423
+ var sessionsByIdContract = c13.router({
2304
2424
  /**
2305
2425
  * GET /api/agent/sessions/:id
2306
2426
  * Get session by ID
@@ -2309,8 +2429,8 @@ var sessionsByIdContract = c12.router({
2309
2429
  method: "GET",
2310
2430
  path: "/api/agent/sessions/:id",
2311
2431
  headers: authHeadersSchema,
2312
- pathParams: z15.object({
2313
- id: z15.string().min(1, "Session ID is required")
2432
+ pathParams: z16.object({
2433
+ id: z16.string().min(1, "Session ID is required")
2314
2434
  }),
2315
2435
  responses: {
2316
2436
  200: sessionResponseSchema,
@@ -2321,7 +2441,7 @@ var sessionsByIdContract = c12.router({
2321
2441
  summary: "Get session by ID"
2322
2442
  }
2323
2443
  });
2324
- var checkpointsByIdContract = c12.router({
2444
+ var checkpointsByIdContract = c13.router({
2325
2445
  /**
2326
2446
  * GET /api/agent/checkpoints/:id
2327
2447
  * Get checkpoint by ID
@@ -2330,8 +2450,8 @@ var checkpointsByIdContract = c12.router({
2330
2450
  method: "GET",
2331
2451
  path: "/api/agent/checkpoints/:id",
2332
2452
  headers: authHeadersSchema,
2333
- pathParams: z15.object({
2334
- id: z15.string().min(1, "Checkpoint ID is required")
2453
+ pathParams: z16.object({
2454
+ id: z16.string().min(1, "Checkpoint ID is required")
2335
2455
  }),
2336
2456
  responses: {
2337
2457
  200: checkpointResponseSchema,
@@ -2344,93 +2464,93 @@ var checkpointsByIdContract = c12.router({
2344
2464
  });
2345
2465
 
2346
2466
  // ../../packages/core/src/contracts/schedules.ts
2347
- import { z as z16 } from "zod";
2348
- var c13 = initContract();
2349
- var scheduleTriggerSchema = z16.object({
2350
- cron: z16.string().optional(),
2351
- at: z16.string().optional(),
2352
- timezone: z16.string().default("UTC")
2467
+ import { z as z17 } from "zod";
2468
+ var c14 = initContract();
2469
+ var scheduleTriggerSchema = z17.object({
2470
+ cron: z17.string().optional(),
2471
+ at: z17.string().optional(),
2472
+ timezone: z17.string().default("UTC")
2353
2473
  }).refine((data) => data.cron && !data.at || !data.cron && data.at, {
2354
2474
  message: "Exactly one of 'cron' or 'at' must be specified"
2355
2475
  });
2356
- var scheduleRunConfigSchema = z16.object({
2357
- agent: z16.string().min(1, "Agent reference required"),
2358
- prompt: z16.string().min(1, "Prompt required"),
2359
- vars: z16.record(z16.string(), z16.string()).optional(),
2360
- secrets: z16.record(z16.string(), z16.string()).optional(),
2361
- artifactName: z16.string().optional(),
2362
- artifactVersion: z16.string().optional(),
2363
- volumeVersions: z16.record(z16.string(), z16.string()).optional()
2476
+ var scheduleRunConfigSchema = z17.object({
2477
+ agent: z17.string().min(1, "Agent reference required"),
2478
+ prompt: z17.string().min(1, "Prompt required"),
2479
+ vars: z17.record(z17.string(), z17.string()).optional(),
2480
+ secrets: z17.record(z17.string(), z17.string()).optional(),
2481
+ artifactName: z17.string().optional(),
2482
+ artifactVersion: z17.string().optional(),
2483
+ volumeVersions: z17.record(z17.string(), z17.string()).optional()
2364
2484
  });
2365
- var scheduleDefinitionSchema = z16.object({
2485
+ var scheduleDefinitionSchema = z17.object({
2366
2486
  on: scheduleTriggerSchema,
2367
2487
  run: scheduleRunConfigSchema
2368
2488
  });
2369
- var scheduleYamlSchema = z16.object({
2370
- version: z16.literal("1.0"),
2371
- schedules: z16.record(z16.string(), scheduleDefinitionSchema)
2372
- });
2373
- var deployScheduleRequestSchema = z16.object({
2374
- name: z16.string().min(1).max(64, "Schedule name max 64 chars"),
2375
- cronExpression: z16.string().optional(),
2376
- atTime: z16.string().optional(),
2377
- timezone: z16.string().default("UTC"),
2378
- prompt: z16.string().min(1, "Prompt required"),
2379
- vars: z16.record(z16.string(), z16.string()).optional(),
2380
- secrets: z16.record(z16.string(), z16.string()).optional(),
2381
- artifactName: z16.string().optional(),
2382
- artifactVersion: z16.string().optional(),
2383
- volumeVersions: z16.record(z16.string(), z16.string()).optional(),
2489
+ var scheduleYamlSchema = z17.object({
2490
+ version: z17.literal("1.0"),
2491
+ schedules: z17.record(z17.string(), scheduleDefinitionSchema)
2492
+ });
2493
+ var deployScheduleRequestSchema = z17.object({
2494
+ name: z17.string().min(1).max(64, "Schedule name max 64 chars"),
2495
+ cronExpression: z17.string().optional(),
2496
+ atTime: z17.string().optional(),
2497
+ timezone: z17.string().default("UTC"),
2498
+ prompt: z17.string().min(1, "Prompt required"),
2499
+ vars: z17.record(z17.string(), z17.string()).optional(),
2500
+ secrets: z17.record(z17.string(), z17.string()).optional(),
2501
+ artifactName: z17.string().optional(),
2502
+ artifactVersion: z17.string().optional(),
2503
+ volumeVersions: z17.record(z17.string(), z17.string()).optional(),
2384
2504
  // Resolved agent compose ID (CLI resolves scope/name:version → composeId)
2385
- composeId: z16.string().uuid("Invalid compose ID")
2505
+ composeId: z17.string().uuid("Invalid compose ID")
2386
2506
  }).refine(
2387
2507
  (data) => data.cronExpression && !data.atTime || !data.cronExpression && data.atTime,
2388
2508
  {
2389
2509
  message: "Exactly one of 'cronExpression' or 'atTime' must be specified"
2390
2510
  }
2391
2511
  );
2392
- var scheduleResponseSchema = z16.object({
2393
- id: z16.string().uuid(),
2394
- composeId: z16.string().uuid(),
2395
- composeName: z16.string(),
2396
- scopeSlug: z16.string(),
2397
- name: z16.string(),
2398
- cronExpression: z16.string().nullable(),
2399
- atTime: z16.string().nullable(),
2400
- timezone: z16.string(),
2401
- prompt: z16.string(),
2402
- vars: z16.record(z16.string(), z16.string()).nullable(),
2512
+ var scheduleResponseSchema = z17.object({
2513
+ id: z17.string().uuid(),
2514
+ composeId: z17.string().uuid(),
2515
+ composeName: z17.string(),
2516
+ scopeSlug: z17.string(),
2517
+ name: z17.string(),
2518
+ cronExpression: z17.string().nullable(),
2519
+ atTime: z17.string().nullable(),
2520
+ timezone: z17.string(),
2521
+ prompt: z17.string(),
2522
+ vars: z17.record(z17.string(), z17.string()).nullable(),
2403
2523
  // Secret names only (values are never returned)
2404
- secretNames: z16.array(z16.string()).nullable(),
2405
- artifactName: z16.string().nullable(),
2406
- artifactVersion: z16.string().nullable(),
2407
- volumeVersions: z16.record(z16.string(), z16.string()).nullable(),
2408
- enabled: z16.boolean(),
2409
- nextRunAt: z16.string().nullable(),
2410
- lastRunAt: z16.string().nullable(),
2411
- retryStartedAt: z16.string().nullable(),
2412
- createdAt: z16.string(),
2413
- updatedAt: z16.string()
2414
- });
2415
- var runSummarySchema = z16.object({
2416
- id: z16.string().uuid(),
2417
- status: z16.enum(["pending", "running", "completed", "failed", "timeout"]),
2418
- createdAt: z16.string(),
2419
- completedAt: z16.string().nullable(),
2420
- error: z16.string().nullable()
2421
- });
2422
- var scheduleRunsResponseSchema = z16.object({
2423
- runs: z16.array(runSummarySchema)
2424
- });
2425
- var scheduleListResponseSchema = z16.object({
2426
- schedules: z16.array(scheduleResponseSchema)
2427
- });
2428
- var deployScheduleResponseSchema = z16.object({
2524
+ secretNames: z17.array(z17.string()).nullable(),
2525
+ artifactName: z17.string().nullable(),
2526
+ artifactVersion: z17.string().nullable(),
2527
+ volumeVersions: z17.record(z17.string(), z17.string()).nullable(),
2528
+ enabled: z17.boolean(),
2529
+ nextRunAt: z17.string().nullable(),
2530
+ lastRunAt: z17.string().nullable(),
2531
+ retryStartedAt: z17.string().nullable(),
2532
+ createdAt: z17.string(),
2533
+ updatedAt: z17.string()
2534
+ });
2535
+ var runSummarySchema = z17.object({
2536
+ id: z17.string().uuid(),
2537
+ status: z17.enum(["pending", "running", "completed", "failed", "timeout"]),
2538
+ createdAt: z17.string(),
2539
+ completedAt: z17.string().nullable(),
2540
+ error: z17.string().nullable()
2541
+ });
2542
+ var scheduleRunsResponseSchema = z17.object({
2543
+ runs: z17.array(runSummarySchema)
2544
+ });
2545
+ var scheduleListResponseSchema = z17.object({
2546
+ schedules: z17.array(scheduleResponseSchema)
2547
+ });
2548
+ var deployScheduleResponseSchema = z17.object({
2429
2549
  schedule: scheduleResponseSchema,
2430
- created: z16.boolean()
2550
+ created: z17.boolean()
2431
2551
  // true if created, false if updated
2432
2552
  });
2433
- var schedulesMainContract = c13.router({
2553
+ var schedulesMainContract = c14.router({
2434
2554
  /**
2435
2555
  * POST /api/agent/schedules
2436
2556
  * Deploy (create or update) a schedule
@@ -2468,7 +2588,7 @@ var schedulesMainContract = c13.router({
2468
2588
  summary: "List all schedules"
2469
2589
  }
2470
2590
  });
2471
- var schedulesByNameContract = c13.router({
2591
+ var schedulesByNameContract = c14.router({
2472
2592
  /**
2473
2593
  * GET /api/agent/schedules/:name
2474
2594
  * Get schedule by name
@@ -2477,11 +2597,11 @@ var schedulesByNameContract = c13.router({
2477
2597
  method: "GET",
2478
2598
  path: "/api/agent/schedules/:name",
2479
2599
  headers: authHeadersSchema,
2480
- pathParams: z16.object({
2481
- name: z16.string().min(1, "Schedule name required")
2600
+ pathParams: z17.object({
2601
+ name: z17.string().min(1, "Schedule name required")
2482
2602
  }),
2483
- query: z16.object({
2484
- composeId: z16.string().uuid("Compose ID required")
2603
+ query: z17.object({
2604
+ composeId: z17.string().uuid("Compose ID required")
2485
2605
  }),
2486
2606
  responses: {
2487
2607
  200: scheduleResponseSchema,
@@ -2498,21 +2618,21 @@ var schedulesByNameContract = c13.router({
2498
2618
  method: "DELETE",
2499
2619
  path: "/api/agent/schedules/:name",
2500
2620
  headers: authHeadersSchema,
2501
- pathParams: z16.object({
2502
- name: z16.string().min(1, "Schedule name required")
2621
+ pathParams: z17.object({
2622
+ name: z17.string().min(1, "Schedule name required")
2503
2623
  }),
2504
- query: z16.object({
2505
- composeId: z16.string().uuid("Compose ID required")
2624
+ query: z17.object({
2625
+ composeId: z17.string().uuid("Compose ID required")
2506
2626
  }),
2507
2627
  responses: {
2508
- 204: c13.noBody(),
2628
+ 204: c14.noBody(),
2509
2629
  401: apiErrorSchema,
2510
2630
  404: apiErrorSchema
2511
2631
  },
2512
2632
  summary: "Delete schedule"
2513
2633
  }
2514
2634
  });
2515
- var schedulesEnableContract = c13.router({
2635
+ var schedulesEnableContract = c14.router({
2516
2636
  /**
2517
2637
  * POST /api/agent/schedules/:name/enable
2518
2638
  * Enable a disabled schedule
@@ -2521,11 +2641,11 @@ var schedulesEnableContract = c13.router({
2521
2641
  method: "POST",
2522
2642
  path: "/api/agent/schedules/:name/enable",
2523
2643
  headers: authHeadersSchema,
2524
- pathParams: z16.object({
2525
- name: z16.string().min(1, "Schedule name required")
2644
+ pathParams: z17.object({
2645
+ name: z17.string().min(1, "Schedule name required")
2526
2646
  }),
2527
- body: z16.object({
2528
- composeId: z16.string().uuid("Compose ID required")
2647
+ body: z17.object({
2648
+ composeId: z17.string().uuid("Compose ID required")
2529
2649
  }),
2530
2650
  responses: {
2531
2651
  200: scheduleResponseSchema,
@@ -2542,11 +2662,11 @@ var schedulesEnableContract = c13.router({
2542
2662
  method: "POST",
2543
2663
  path: "/api/agent/schedules/:name/disable",
2544
2664
  headers: authHeadersSchema,
2545
- pathParams: z16.object({
2546
- name: z16.string().min(1, "Schedule name required")
2665
+ pathParams: z17.object({
2666
+ name: z17.string().min(1, "Schedule name required")
2547
2667
  }),
2548
- body: z16.object({
2549
- composeId: z16.string().uuid("Compose ID required")
2668
+ body: z17.object({
2669
+ composeId: z17.string().uuid("Compose ID required")
2550
2670
  }),
2551
2671
  responses: {
2552
2672
  200: scheduleResponseSchema,
@@ -2556,7 +2676,7 @@ var schedulesEnableContract = c13.router({
2556
2676
  summary: "Disable schedule"
2557
2677
  }
2558
2678
  });
2559
- var scheduleRunsContract = c13.router({
2679
+ var scheduleRunsContract = c14.router({
2560
2680
  /**
2561
2681
  * GET /api/agent/schedules/:name/runs
2562
2682
  * List recent runs for a schedule
@@ -2565,12 +2685,12 @@ var scheduleRunsContract = c13.router({
2565
2685
  method: "GET",
2566
2686
  path: "/api/agent/schedules/:name/runs",
2567
2687
  headers: authHeadersSchema,
2568
- pathParams: z16.object({
2569
- name: z16.string().min(1, "Schedule name required")
2688
+ pathParams: z17.object({
2689
+ name: z17.string().min(1, "Schedule name required")
2570
2690
  }),
2571
- query: z16.object({
2572
- composeId: z16.string().uuid("Compose ID required"),
2573
- limit: z16.coerce.number().min(0).max(100).default(5)
2691
+ query: z17.object({
2692
+ composeId: z17.string().uuid("Compose ID required"),
2693
+ limit: z17.coerce.number().min(0).max(100).default(5)
2574
2694
  }),
2575
2695
  responses: {
2576
2696
  200: scheduleRunsResponseSchema,
@@ -2582,18 +2702,18 @@ var scheduleRunsContract = c13.router({
2582
2702
  });
2583
2703
 
2584
2704
  // ../../packages/core/src/contracts/realtime.ts
2585
- import { z as z17 } from "zod";
2586
- var c14 = initContract();
2587
- var ablyTokenRequestSchema = z17.object({
2588
- keyName: z17.string(),
2589
- ttl: z17.number().optional(),
2590
- timestamp: z17.number(),
2591
- capability: z17.string(),
2592
- clientId: z17.string().optional(),
2593
- nonce: z17.string(),
2594
- mac: z17.string()
2595
- });
2596
- var realtimeTokenContract = c14.router({
2705
+ import { z as z18 } from "zod";
2706
+ var c15 = initContract();
2707
+ var ablyTokenRequestSchema = z18.object({
2708
+ keyName: z18.string(),
2709
+ ttl: z18.number().optional(),
2710
+ timestamp: z18.number(),
2711
+ capability: z18.string(),
2712
+ clientId: z18.string().optional(),
2713
+ nonce: z18.string(),
2714
+ mac: z18.string()
2715
+ });
2716
+ var realtimeTokenContract = c15.router({
2597
2717
  /**
2598
2718
  * POST /api/realtime/token
2599
2719
  * Get an Ably token to subscribe to a run's events channel
@@ -2602,8 +2722,8 @@ var realtimeTokenContract = c14.router({
2602
2722
  method: "POST",
2603
2723
  path: "/api/realtime/token",
2604
2724
  headers: authHeadersSchema,
2605
- body: z17.object({
2606
- runId: z17.string().uuid("runId must be a valid UUID")
2725
+ body: z18.object({
2726
+ runId: z18.string().uuid("runId must be a valid UUID")
2607
2727
  }),
2608
2728
  responses: {
2609
2729
  200: ablyTokenRequestSchema,
@@ -2615,7 +2735,7 @@ var realtimeTokenContract = c14.router({
2615
2735
  summary: "Get Ably token for run event subscription"
2616
2736
  }
2617
2737
  });
2618
- var runnerRealtimeTokenContract = c14.router({
2738
+ var runnerRealtimeTokenContract = c15.router({
2619
2739
  /**
2620
2740
  * POST /api/runners/realtime/token
2621
2741
  * Get an Ably token to subscribe to a runner group's job notification channel
@@ -2624,7 +2744,7 @@ var runnerRealtimeTokenContract = c14.router({
2624
2744
  method: "POST",
2625
2745
  path: "/api/runners/realtime/token",
2626
2746
  headers: authHeadersSchema,
2627
- body: z17.object({
2747
+ body: z18.object({
2628
2748
  group: runnerGroupSchema
2629
2749
  }),
2630
2750
  responses: {
@@ -2638,11 +2758,11 @@ var runnerRealtimeTokenContract = c14.router({
2638
2758
  });
2639
2759
 
2640
2760
  // ../../packages/core/src/contracts/platform.ts
2641
- import { z as z19 } from "zod";
2761
+ import { z as z20 } from "zod";
2642
2762
 
2643
2763
  // ../../packages/core/src/contracts/public/common.ts
2644
- import { z as z18 } from "zod";
2645
- var publicApiErrorTypeSchema = z18.enum([
2764
+ import { z as z19 } from "zod";
2765
+ var publicApiErrorTypeSchema = z19.enum([
2646
2766
  "api_error",
2647
2767
  // Internal server error (5xx)
2648
2768
  "invalid_request_error",
@@ -2656,40 +2776,40 @@ var publicApiErrorTypeSchema = z18.enum([
2656
2776
  "rate_limit_error"
2657
2777
  // Rate limit exceeded (429)
2658
2778
  ]);
2659
- var publicApiErrorSchema = z18.object({
2660
- error: z18.object({
2779
+ var publicApiErrorSchema = z19.object({
2780
+ error: z19.object({
2661
2781
  type: publicApiErrorTypeSchema,
2662
- code: z18.string(),
2663
- message: z18.string(),
2664
- param: z18.string().optional(),
2665
- docUrl: z18.string().url().optional()
2782
+ code: z19.string(),
2783
+ message: z19.string(),
2784
+ param: z19.string().optional(),
2785
+ docUrl: z19.string().url().optional()
2666
2786
  })
2667
2787
  });
2668
- var paginationSchema = z18.object({
2669
- hasMore: z18.boolean(),
2670
- nextCursor: z18.string().nullable()
2788
+ var paginationSchema = z19.object({
2789
+ hasMore: z19.boolean(),
2790
+ nextCursor: z19.string().nullable()
2671
2791
  });
2672
2792
  function createPaginatedResponseSchema(dataSchema) {
2673
- return z18.object({
2674
- data: z18.array(dataSchema),
2793
+ return z19.object({
2794
+ data: z19.array(dataSchema),
2675
2795
  pagination: paginationSchema
2676
2796
  });
2677
2797
  }
2678
- var listQuerySchema = z18.object({
2679
- cursor: z18.string().optional(),
2680
- limit: z18.coerce.number().min(1).max(100).default(20)
2798
+ var listQuerySchema = z19.object({
2799
+ cursor: z19.string().optional(),
2800
+ limit: z19.coerce.number().min(1).max(100).default(20)
2681
2801
  });
2682
- var requestIdSchema = z18.string().uuid();
2683
- var timestampSchema = z18.string().datetime();
2802
+ var requestIdSchema = z19.string().uuid();
2803
+ var timestampSchema = z19.string().datetime();
2684
2804
 
2685
2805
  // ../../packages/core/src/contracts/platform.ts
2686
- var c15 = initContract();
2687
- var platformPaginationSchema = z19.object({
2688
- hasMore: z19.boolean(),
2689
- nextCursor: z19.string().nullable(),
2690
- totalPages: z19.number()
2806
+ var c16 = initContract();
2807
+ var platformPaginationSchema = z20.object({
2808
+ hasMore: z20.boolean(),
2809
+ nextCursor: z20.string().nullable(),
2810
+ totalPages: z20.number()
2691
2811
  });
2692
- var platformLogStatusSchema = z19.enum([
2812
+ var platformLogStatusSchema = z20.enum([
2693
2813
  "pending",
2694
2814
  "running",
2695
2815
  "completed",
@@ -2697,41 +2817,41 @@ var platformLogStatusSchema = z19.enum([
2697
2817
  "timeout",
2698
2818
  "cancelled"
2699
2819
  ]);
2700
- var platformLogEntrySchema = z19.object({
2701
- id: z19.string().uuid(),
2702
- sessionId: z19.string().nullable(),
2703
- agentName: z19.string(),
2704
- framework: z19.string().nullable(),
2820
+ var platformLogEntrySchema = z20.object({
2821
+ id: z20.string().uuid(),
2822
+ sessionId: z20.string().nullable(),
2823
+ agentName: z20.string(),
2824
+ framework: z20.string().nullable(),
2705
2825
  status: platformLogStatusSchema,
2706
- createdAt: z19.string()
2826
+ createdAt: z20.string()
2707
2827
  });
2708
- var platformLogsListResponseSchema = z19.object({
2709
- data: z19.array(platformLogEntrySchema),
2828
+ var platformLogsListResponseSchema = z20.object({
2829
+ data: z20.array(platformLogEntrySchema),
2710
2830
  pagination: platformPaginationSchema
2711
2831
  });
2712
- var artifactSchema = z19.object({
2713
- name: z19.string().nullable(),
2714
- version: z19.string().nullable()
2832
+ var artifactSchema = z20.object({
2833
+ name: z20.string().nullable(),
2834
+ version: z20.string().nullable()
2715
2835
  });
2716
- var platformLogDetailSchema = z19.object({
2717
- id: z19.string().uuid(),
2718
- sessionId: z19.string().nullable(),
2719
- agentName: z19.string(),
2720
- framework: z19.string().nullable(),
2836
+ var platformLogDetailSchema = z20.object({
2837
+ id: z20.string().uuid(),
2838
+ sessionId: z20.string().nullable(),
2839
+ agentName: z20.string(),
2840
+ framework: z20.string().nullable(),
2721
2841
  status: platformLogStatusSchema,
2722
- prompt: z19.string(),
2723
- error: z19.string().nullable(),
2724
- createdAt: z19.string(),
2725
- startedAt: z19.string().nullable(),
2726
- completedAt: z19.string().nullable(),
2842
+ prompt: z20.string(),
2843
+ error: z20.string().nullable(),
2844
+ createdAt: z20.string(),
2845
+ startedAt: z20.string().nullable(),
2846
+ completedAt: z20.string().nullable(),
2727
2847
  artifact: artifactSchema
2728
2848
  });
2729
- var platformLogsListContract = c15.router({
2849
+ var platformLogsListContract = c16.router({
2730
2850
  list: {
2731
2851
  method: "GET",
2732
2852
  path: "/api/platform/logs",
2733
2853
  query: listQuerySchema.extend({
2734
- search: z19.string().optional()
2854
+ search: z20.string().optional()
2735
2855
  }),
2736
2856
  responses: {
2737
2857
  200: platformLogsListResponseSchema,
@@ -2740,12 +2860,12 @@ var platformLogsListContract = c15.router({
2740
2860
  summary: "List agent run logs with pagination"
2741
2861
  }
2742
2862
  });
2743
- var platformLogsByIdContract = c15.router({
2863
+ var platformLogsByIdContract = c16.router({
2744
2864
  getById: {
2745
2865
  method: "GET",
2746
2866
  path: "/api/platform/logs/:id",
2747
- pathParams: z19.object({
2748
- id: z19.string().uuid("Invalid log ID")
2867
+ pathParams: z20.object({
2868
+ id: z20.string().uuid("Invalid log ID")
2749
2869
  }),
2750
2870
  responses: {
2751
2871
  200: platformLogDetailSchema,
@@ -2755,17 +2875,17 @@ var platformLogsByIdContract = c15.router({
2755
2875
  summary: "Get agent run log details by ID"
2756
2876
  }
2757
2877
  });
2758
- var artifactDownloadResponseSchema = z19.object({
2759
- url: z19.string().url(),
2760
- expiresAt: z19.string()
2878
+ var artifactDownloadResponseSchema = z20.object({
2879
+ url: z20.string().url(),
2880
+ expiresAt: z20.string()
2761
2881
  });
2762
- var platformArtifactDownloadContract = c15.router({
2882
+ var platformArtifactDownloadContract = c16.router({
2763
2883
  getDownloadUrl: {
2764
2884
  method: "GET",
2765
2885
  path: "/api/platform/artifacts/download",
2766
- query: z19.object({
2767
- name: z19.string().min(1, "Artifact name is required"),
2768
- version: z19.string().optional()
2886
+ query: z20.object({
2887
+ name: z20.string().min(1, "Artifact name is required"),
2888
+ version: z20.string().optional()
2769
2889
  }),
2770
2890
  responses: {
2771
2891
  200: artifactDownloadResponseSchema,
@@ -2777,29 +2897,29 @@ var platformArtifactDownloadContract = c15.router({
2777
2897
  });
2778
2898
 
2779
2899
  // ../../packages/core/src/contracts/llm.ts
2780
- import { z as z20 } from "zod";
2781
- var c16 = initContract();
2782
- var messageRoleSchema = z20.enum(["user", "assistant", "system"]);
2783
- var chatMessageSchema = z20.object({
2900
+ import { z as z21 } from "zod";
2901
+ var c17 = initContract();
2902
+ var messageRoleSchema = z21.enum(["user", "assistant", "system"]);
2903
+ var chatMessageSchema = z21.object({
2784
2904
  role: messageRoleSchema,
2785
- content: z20.string()
2905
+ content: z21.string()
2786
2906
  });
2787
- var tokenUsageSchema = z20.object({
2788
- promptTokens: z20.number(),
2789
- completionTokens: z20.number(),
2790
- totalTokens: z20.number()
2907
+ var tokenUsageSchema = z21.object({
2908
+ promptTokens: z21.number(),
2909
+ completionTokens: z21.number(),
2910
+ totalTokens: z21.number()
2791
2911
  });
2792
- var llmChatRequestSchema = z20.object({
2793
- model: z20.string().min(1).optional(),
2794
- messages: z20.array(chatMessageSchema).min(1, "At least one message is required"),
2795
- stream: z20.boolean().optional().default(false)
2912
+ var llmChatRequestSchema = z21.object({
2913
+ model: z21.string().min(1).optional(),
2914
+ messages: z21.array(chatMessageSchema).min(1, "At least one message is required"),
2915
+ stream: z21.boolean().optional().default(false)
2796
2916
  });
2797
- var llmChatResponseSchema = z20.object({
2798
- content: z20.string(),
2799
- model: z20.string(),
2917
+ var llmChatResponseSchema = z21.object({
2918
+ content: z21.string(),
2919
+ model: z21.string(),
2800
2920
  usage: tokenUsageSchema
2801
2921
  });
2802
- var llmChatContract = c16.router({
2922
+ var llmChatContract = c17.router({
2803
2923
  chat: {
2804
2924
  method: "POST",
2805
2925
  path: "/api/llm/chat",
@@ -2815,28 +2935,28 @@ var llmChatContract = c16.router({
2815
2935
  });
2816
2936
 
2817
2937
  // ../../packages/core/src/contracts/public/agents.ts
2818
- import { z as z21 } from "zod";
2819
- var c17 = initContract();
2820
- var publicAgentSchema = z21.object({
2821
- id: z21.string(),
2822
- name: z21.string(),
2823
- currentVersionId: z21.string().nullable(),
2938
+ import { z as z22 } from "zod";
2939
+ var c18 = initContract();
2940
+ var publicAgentSchema = z22.object({
2941
+ id: z22.string(),
2942
+ name: z22.string(),
2943
+ currentVersionId: z22.string().nullable(),
2824
2944
  createdAt: timestampSchema,
2825
2945
  updatedAt: timestampSchema
2826
2946
  });
2827
- var agentVersionSchema = z21.object({
2828
- id: z21.string(),
2829
- agentId: z21.string(),
2830
- versionNumber: z21.number(),
2947
+ var agentVersionSchema = z22.object({
2948
+ id: z22.string(),
2949
+ agentId: z22.string(),
2950
+ versionNumber: z22.number(),
2831
2951
  createdAt: timestampSchema
2832
2952
  });
2833
2953
  var publicAgentDetailSchema = publicAgentSchema;
2834
2954
  var paginatedAgentsSchema = createPaginatedResponseSchema(publicAgentSchema);
2835
2955
  var paginatedAgentVersionsSchema = createPaginatedResponseSchema(agentVersionSchema);
2836
2956
  var agentListQuerySchema = listQuerySchema.extend({
2837
- name: z21.string().optional()
2957
+ name: z22.string().optional()
2838
2958
  });
2839
- var publicAgentsListContract = c17.router({
2959
+ var publicAgentsListContract = c18.router({
2840
2960
  list: {
2841
2961
  method: "GET",
2842
2962
  path: "/v1/agents",
@@ -2851,13 +2971,13 @@ var publicAgentsListContract = c17.router({
2851
2971
  description: "List all agents in the current scope with pagination. Use the `name` query parameter to filter by agent name."
2852
2972
  }
2853
2973
  });
2854
- var publicAgentByIdContract = c17.router({
2974
+ var publicAgentByIdContract = c18.router({
2855
2975
  get: {
2856
2976
  method: "GET",
2857
2977
  path: "/v1/agents/:id",
2858
2978
  headers: authHeadersSchema,
2859
- pathParams: z21.object({
2860
- id: z21.string().min(1, "Agent ID is required")
2979
+ pathParams: z22.object({
2980
+ id: z22.string().min(1, "Agent ID is required")
2861
2981
  }),
2862
2982
  responses: {
2863
2983
  200: publicAgentDetailSchema,
@@ -2869,13 +2989,13 @@ var publicAgentByIdContract = c17.router({
2869
2989
  description: "Get agent details by ID"
2870
2990
  }
2871
2991
  });
2872
- var publicAgentVersionsContract = c17.router({
2992
+ var publicAgentVersionsContract = c18.router({
2873
2993
  list: {
2874
2994
  method: "GET",
2875
2995
  path: "/v1/agents/:id/versions",
2876
2996
  headers: authHeadersSchema,
2877
- pathParams: z21.object({
2878
- id: z21.string().min(1, "Agent ID is required")
2997
+ pathParams: z22.object({
2998
+ id: z22.string().min(1, "Agent ID is required")
2879
2999
  }),
2880
3000
  query: listQuerySchema,
2881
3001
  responses: {
@@ -2890,9 +3010,9 @@ var publicAgentVersionsContract = c17.router({
2890
3010
  });
2891
3011
 
2892
3012
  // ../../packages/core/src/contracts/public/runs.ts
2893
- import { z as z22 } from "zod";
2894
- var c18 = initContract();
2895
- var publicRunStatusSchema = z22.enum([
3013
+ import { z as z23 } from "zod";
3014
+ var c19 = initContract();
3015
+ var publicRunStatusSchema = z23.enum([
2896
3016
  "pending",
2897
3017
  "running",
2898
3018
  "completed",
@@ -2900,54 +3020,54 @@ var publicRunStatusSchema = z22.enum([
2900
3020
  "timeout",
2901
3021
  "cancelled"
2902
3022
  ]);
2903
- var publicRunSchema = z22.object({
2904
- id: z22.string(),
2905
- agentId: z22.string(),
2906
- agentName: z22.string(),
3023
+ var publicRunSchema = z23.object({
3024
+ id: z23.string(),
3025
+ agentId: z23.string(),
3026
+ agentName: z23.string(),
2907
3027
  status: publicRunStatusSchema,
2908
- prompt: z22.string(),
3028
+ prompt: z23.string(),
2909
3029
  createdAt: timestampSchema,
2910
3030
  startedAt: timestampSchema.nullable(),
2911
3031
  completedAt: timestampSchema.nullable()
2912
3032
  });
2913
3033
  var publicRunDetailSchema = publicRunSchema.extend({
2914
- error: z22.string().nullable(),
2915
- executionTimeMs: z22.number().nullable(),
2916
- checkpointId: z22.string().nullable(),
2917
- sessionId: z22.string().nullable(),
2918
- artifactName: z22.string().nullable(),
2919
- artifactVersion: z22.string().nullable(),
2920
- volumes: z22.record(z22.string(), z22.string()).optional()
3034
+ error: z23.string().nullable(),
3035
+ executionTimeMs: z23.number().nullable(),
3036
+ checkpointId: z23.string().nullable(),
3037
+ sessionId: z23.string().nullable(),
3038
+ artifactName: z23.string().nullable(),
3039
+ artifactVersion: z23.string().nullable(),
3040
+ volumes: z23.record(z23.string(), z23.string()).optional()
2921
3041
  });
2922
3042
  var paginatedRunsSchema = createPaginatedResponseSchema(publicRunSchema);
2923
- var createRunRequestSchema = z22.object({
3043
+ var createRunRequestSchema = z23.object({
2924
3044
  // Agent identification (one of: agent, agentId, sessionId, checkpointId)
2925
- agent: z22.string().optional(),
3045
+ agent: z23.string().optional(),
2926
3046
  // Agent name
2927
- agentId: z22.string().optional(),
3047
+ agentId: z23.string().optional(),
2928
3048
  // Agent ID
2929
- agentVersion: z22.string().optional(),
3049
+ agentVersion: z23.string().optional(),
2930
3050
  // Version specifier (e.g., "latest", "v1", specific ID)
2931
3051
  // Continue session
2932
- sessionId: z22.string().optional(),
3052
+ sessionId: z23.string().optional(),
2933
3053
  // Resume from checkpoint
2934
- checkpointId: z22.string().optional(),
3054
+ checkpointId: z23.string().optional(),
2935
3055
  // Required
2936
- prompt: z22.string().min(1, "Prompt is required"),
3056
+ prompt: z23.string().min(1, "Prompt is required"),
2937
3057
  // Optional configuration
2938
- variables: z22.record(z22.string(), z22.string()).optional(),
2939
- secrets: z22.record(z22.string(), z22.string()).optional(),
2940
- artifactName: z22.string().optional(),
3058
+ variables: z23.record(z23.string(), z23.string()).optional(),
3059
+ secrets: z23.record(z23.string(), z23.string()).optional(),
3060
+ artifactName: z23.string().optional(),
2941
3061
  // Artifact name to mount
2942
- artifactVersion: z22.string().optional(),
3062
+ artifactVersion: z23.string().optional(),
2943
3063
  // Artifact version (defaults to latest)
2944
- volumes: z22.record(z22.string(), z22.string()).optional()
3064
+ volumes: z23.record(z23.string(), z23.string()).optional()
2945
3065
  // volume_name -> version
2946
3066
  });
2947
3067
  var runListQuerySchema = listQuerySchema.extend({
2948
3068
  status: publicRunStatusSchema.optional()
2949
3069
  });
2950
- var publicRunsListContract = c18.router({
3070
+ var publicRunsListContract = c19.router({
2951
3071
  list: {
2952
3072
  method: "GET",
2953
3073
  path: "/v1/runs",
@@ -2979,13 +3099,13 @@ var publicRunsListContract = c18.router({
2979
3099
  description: "Create and execute a new agent run. Returns 202 Accepted as runs execute asynchronously."
2980
3100
  }
2981
3101
  });
2982
- var publicRunByIdContract = c18.router({
3102
+ var publicRunByIdContract = c19.router({
2983
3103
  get: {
2984
3104
  method: "GET",
2985
3105
  path: "/v1/runs/:id",
2986
3106
  headers: authHeadersSchema,
2987
- pathParams: z22.object({
2988
- id: z22.string().min(1, "Run ID is required")
3107
+ pathParams: z23.object({
3108
+ id: z23.string().min(1, "Run ID is required")
2989
3109
  }),
2990
3110
  responses: {
2991
3111
  200: publicRunDetailSchema,
@@ -2997,15 +3117,15 @@ var publicRunByIdContract = c18.router({
2997
3117
  description: "Get run details by ID"
2998
3118
  }
2999
3119
  });
3000
- var publicRunCancelContract = c18.router({
3120
+ var publicRunCancelContract = c19.router({
3001
3121
  cancel: {
3002
3122
  method: "POST",
3003
3123
  path: "/v1/runs/:id/cancel",
3004
3124
  headers: authHeadersSchema,
3005
- pathParams: z22.object({
3006
- id: z22.string().min(1, "Run ID is required")
3125
+ pathParams: z23.object({
3126
+ id: z23.string().min(1, "Run ID is required")
3007
3127
  }),
3008
- body: z22.undefined(),
3128
+ body: z23.undefined(),
3009
3129
  responses: {
3010
3130
  200: publicRunDetailSchema,
3011
3131
  400: publicApiErrorSchema,
@@ -3018,27 +3138,27 @@ var publicRunCancelContract = c18.router({
3018
3138
  description: "Cancel a pending or running execution"
3019
3139
  }
3020
3140
  });
3021
- var logEntrySchema = z22.object({
3141
+ var logEntrySchema = z23.object({
3022
3142
  timestamp: timestampSchema,
3023
- type: z22.enum(["agent", "system", "network"]),
3024
- level: z22.enum(["debug", "info", "warn", "error"]),
3025
- message: z22.string(),
3026
- metadata: z22.record(z22.string(), z22.unknown()).optional()
3143
+ type: z23.enum(["agent", "system", "network"]),
3144
+ level: z23.enum(["debug", "info", "warn", "error"]),
3145
+ message: z23.string(),
3146
+ metadata: z23.record(z23.string(), z23.unknown()).optional()
3027
3147
  });
3028
3148
  var paginatedLogsSchema = createPaginatedResponseSchema(logEntrySchema);
3029
3149
  var logsQuerySchema = listQuerySchema.extend({
3030
- type: z22.enum(["agent", "system", "network", "all"]).default("all"),
3150
+ type: z23.enum(["agent", "system", "network", "all"]).default("all"),
3031
3151
  since: timestampSchema.optional(),
3032
3152
  until: timestampSchema.optional(),
3033
- order: z22.enum(["asc", "desc"]).default("asc")
3153
+ order: z23.enum(["asc", "desc"]).default("asc")
3034
3154
  });
3035
- var publicRunLogsContract = c18.router({
3155
+ var publicRunLogsContract = c19.router({
3036
3156
  getLogs: {
3037
3157
  method: "GET",
3038
3158
  path: "/v1/runs/:id/logs",
3039
3159
  headers: authHeadersSchema,
3040
- pathParams: z22.object({
3041
- id: z22.string().min(1, "Run ID is required")
3160
+ pathParams: z23.object({
3161
+ id: z23.string().min(1, "Run ID is required")
3042
3162
  }),
3043
3163
  query: logsQuerySchema,
3044
3164
  responses: {
@@ -3051,30 +3171,30 @@ var publicRunLogsContract = c18.router({
3051
3171
  description: "Get unified logs for a run. Combines agent, system, and network logs."
3052
3172
  }
3053
3173
  });
3054
- var metricPointSchema = z22.object({
3174
+ var metricPointSchema = z23.object({
3055
3175
  timestamp: timestampSchema,
3056
- cpuPercent: z22.number(),
3057
- memoryUsedMb: z22.number(),
3058
- memoryTotalMb: z22.number(),
3059
- diskUsedMb: z22.number(),
3060
- diskTotalMb: z22.number()
3061
- });
3062
- var metricsSummarySchema = z22.object({
3063
- avgCpuPercent: z22.number(),
3064
- maxMemoryUsedMb: z22.number(),
3065
- totalDurationMs: z22.number().nullable()
3066
- });
3067
- var metricsResponseSchema2 = z22.object({
3068
- data: z22.array(metricPointSchema),
3176
+ cpuPercent: z23.number(),
3177
+ memoryUsedMb: z23.number(),
3178
+ memoryTotalMb: z23.number(),
3179
+ diskUsedMb: z23.number(),
3180
+ diskTotalMb: z23.number()
3181
+ });
3182
+ var metricsSummarySchema = z23.object({
3183
+ avgCpuPercent: z23.number(),
3184
+ maxMemoryUsedMb: z23.number(),
3185
+ totalDurationMs: z23.number().nullable()
3186
+ });
3187
+ var metricsResponseSchema2 = z23.object({
3188
+ data: z23.array(metricPointSchema),
3069
3189
  summary: metricsSummarySchema
3070
3190
  });
3071
- var publicRunMetricsContract = c18.router({
3191
+ var publicRunMetricsContract = c19.router({
3072
3192
  getMetrics: {
3073
3193
  method: "GET",
3074
3194
  path: "/v1/runs/:id/metrics",
3075
3195
  headers: authHeadersSchema,
3076
- pathParams: z22.object({
3077
- id: z22.string().min(1, "Run ID is required")
3196
+ pathParams: z23.object({
3197
+ id: z23.string().min(1, "Run ID is required")
3078
3198
  }),
3079
3199
  responses: {
3080
3200
  200: metricsResponseSchema2,
@@ -3086,7 +3206,7 @@ var publicRunMetricsContract = c18.router({
3086
3206
  description: "Get CPU, memory, and disk metrics for a run"
3087
3207
  }
3088
3208
  });
3089
- var sseEventTypeSchema = z22.enum([
3209
+ var sseEventTypeSchema = z23.enum([
3090
3210
  "status",
3091
3211
  // Run status change
3092
3212
  "output",
@@ -3098,26 +3218,26 @@ var sseEventTypeSchema = z22.enum([
3098
3218
  "heartbeat"
3099
3219
  // Keep-alive
3100
3220
  ]);
3101
- var sseEventSchema = z22.object({
3221
+ var sseEventSchema = z23.object({
3102
3222
  event: sseEventTypeSchema,
3103
- data: z22.unknown(),
3104
- id: z22.string().optional()
3223
+ data: z23.unknown(),
3224
+ id: z23.string().optional()
3105
3225
  // For Last-Event-ID reconnection
3106
3226
  });
3107
- var publicRunEventsContract = c18.router({
3227
+ var publicRunEventsContract = c19.router({
3108
3228
  streamEvents: {
3109
3229
  method: "GET",
3110
3230
  path: "/v1/runs/:id/events",
3111
3231
  headers: authHeadersSchema,
3112
- pathParams: z22.object({
3113
- id: z22.string().min(1, "Run ID is required")
3232
+ pathParams: z23.object({
3233
+ id: z23.string().min(1, "Run ID is required")
3114
3234
  }),
3115
- query: z22.object({
3116
- lastEventId: z22.string().optional()
3235
+ query: z23.object({
3236
+ lastEventId: z23.string().optional()
3117
3237
  // For reconnection
3118
3238
  }),
3119
3239
  responses: {
3120
- 200: z22.any(),
3240
+ 200: z23.any(),
3121
3241
  // SSE stream - actual content is text/event-stream
3122
3242
  401: publicApiErrorSchema,
3123
3243
  404: publicApiErrorSchema,
@@ -3129,28 +3249,28 @@ var publicRunEventsContract = c18.router({
3129
3249
  });
3130
3250
 
3131
3251
  // ../../packages/core/src/contracts/public/artifacts.ts
3132
- import { z as z23 } from "zod";
3133
- var c19 = initContract();
3134
- var publicArtifactSchema = z23.object({
3135
- id: z23.string(),
3136
- name: z23.string(),
3137
- currentVersionId: z23.string().nullable(),
3138
- size: z23.number(),
3252
+ import { z as z24 } from "zod";
3253
+ var c20 = initContract();
3254
+ var publicArtifactSchema = z24.object({
3255
+ id: z24.string(),
3256
+ name: z24.string(),
3257
+ currentVersionId: z24.string().nullable(),
3258
+ size: z24.number(),
3139
3259
  // Total size in bytes
3140
- fileCount: z23.number(),
3260
+ fileCount: z24.number(),
3141
3261
  createdAt: timestampSchema,
3142
3262
  updatedAt: timestampSchema
3143
3263
  });
3144
- var artifactVersionSchema = z23.object({
3145
- id: z23.string(),
3264
+ var artifactVersionSchema = z24.object({
3265
+ id: z24.string(),
3146
3266
  // SHA-256 content hash
3147
- artifactId: z23.string(),
3148
- size: z23.number(),
3267
+ artifactId: z24.string(),
3268
+ size: z24.number(),
3149
3269
  // Size in bytes
3150
- fileCount: z23.number(),
3151
- message: z23.string().nullable(),
3270
+ fileCount: z24.number(),
3271
+ message: z24.string().nullable(),
3152
3272
  // Optional commit message
3153
- createdBy: z23.string(),
3273
+ createdBy: z24.string(),
3154
3274
  createdAt: timestampSchema
3155
3275
  });
3156
3276
  var publicArtifactDetailSchema = publicArtifactSchema.extend({
@@ -3160,7 +3280,7 @@ var paginatedArtifactsSchema = createPaginatedResponseSchema(publicArtifactSchem
3160
3280
  var paginatedArtifactVersionsSchema = createPaginatedResponseSchema(
3161
3281
  artifactVersionSchema
3162
3282
  );
3163
- var publicArtifactsListContract = c19.router({
3283
+ var publicArtifactsListContract = c20.router({
3164
3284
  list: {
3165
3285
  method: "GET",
3166
3286
  path: "/v1/artifacts",
@@ -3175,13 +3295,13 @@ var publicArtifactsListContract = c19.router({
3175
3295
  description: "List all artifacts in the current scope with pagination"
3176
3296
  }
3177
3297
  });
3178
- var publicArtifactByIdContract = c19.router({
3298
+ var publicArtifactByIdContract = c20.router({
3179
3299
  get: {
3180
3300
  method: "GET",
3181
3301
  path: "/v1/artifacts/:id",
3182
3302
  headers: authHeadersSchema,
3183
- pathParams: z23.object({
3184
- id: z23.string().min(1, "Artifact ID is required")
3303
+ pathParams: z24.object({
3304
+ id: z24.string().min(1, "Artifact ID is required")
3185
3305
  }),
3186
3306
  responses: {
3187
3307
  200: publicArtifactDetailSchema,
@@ -3193,13 +3313,13 @@ var publicArtifactByIdContract = c19.router({
3193
3313
  description: "Get artifact details by ID"
3194
3314
  }
3195
3315
  });
3196
- var publicArtifactVersionsContract = c19.router({
3316
+ var publicArtifactVersionsContract = c20.router({
3197
3317
  list: {
3198
3318
  method: "GET",
3199
3319
  path: "/v1/artifacts/:id/versions",
3200
3320
  headers: authHeadersSchema,
3201
- pathParams: z23.object({
3202
- id: z23.string().min(1, "Artifact ID is required")
3321
+ pathParams: z24.object({
3322
+ id: z24.string().min(1, "Artifact ID is required")
3203
3323
  }),
3204
3324
  query: listQuerySchema,
3205
3325
  responses: {
@@ -3212,20 +3332,20 @@ var publicArtifactVersionsContract = c19.router({
3212
3332
  description: "List all versions of an artifact with pagination"
3213
3333
  }
3214
3334
  });
3215
- var publicArtifactDownloadContract = c19.router({
3335
+ var publicArtifactDownloadContract = c20.router({
3216
3336
  download: {
3217
3337
  method: "GET",
3218
3338
  path: "/v1/artifacts/:id/download",
3219
3339
  headers: authHeadersSchema,
3220
- pathParams: z23.object({
3221
- id: z23.string().min(1, "Artifact ID is required")
3340
+ pathParams: z24.object({
3341
+ id: z24.string().min(1, "Artifact ID is required")
3222
3342
  }),
3223
- query: z23.object({
3224
- versionId: z23.string().optional()
3343
+ query: z24.object({
3344
+ versionId: z24.string().optional()
3225
3345
  // Defaults to current version
3226
3346
  }),
3227
3347
  responses: {
3228
- 302: z23.undefined(),
3348
+ 302: z24.undefined(),
3229
3349
  // Redirect to presigned URL
3230
3350
  401: publicApiErrorSchema,
3231
3351
  404: publicApiErrorSchema,
@@ -3237,28 +3357,28 @@ var publicArtifactDownloadContract = c19.router({
3237
3357
  });
3238
3358
 
3239
3359
  // ../../packages/core/src/contracts/public/volumes.ts
3240
- import { z as z24 } from "zod";
3241
- var c20 = initContract();
3242
- var publicVolumeSchema = z24.object({
3243
- id: z24.string(),
3244
- name: z24.string(),
3245
- currentVersionId: z24.string().nullable(),
3246
- size: z24.number(),
3360
+ import { z as z25 } from "zod";
3361
+ var c21 = initContract();
3362
+ var publicVolumeSchema = z25.object({
3363
+ id: z25.string(),
3364
+ name: z25.string(),
3365
+ currentVersionId: z25.string().nullable(),
3366
+ size: z25.number(),
3247
3367
  // Total size in bytes
3248
- fileCount: z24.number(),
3368
+ fileCount: z25.number(),
3249
3369
  createdAt: timestampSchema,
3250
3370
  updatedAt: timestampSchema
3251
3371
  });
3252
- var volumeVersionSchema = z24.object({
3253
- id: z24.string(),
3372
+ var volumeVersionSchema = z25.object({
3373
+ id: z25.string(),
3254
3374
  // SHA-256 content hash
3255
- volumeId: z24.string(),
3256
- size: z24.number(),
3375
+ volumeId: z25.string(),
3376
+ size: z25.number(),
3257
3377
  // Size in bytes
3258
- fileCount: z24.number(),
3259
- message: z24.string().nullable(),
3378
+ fileCount: z25.number(),
3379
+ message: z25.string().nullable(),
3260
3380
  // Optional commit message
3261
- createdBy: z24.string(),
3381
+ createdBy: z25.string(),
3262
3382
  createdAt: timestampSchema
3263
3383
  });
3264
3384
  var publicVolumeDetailSchema = publicVolumeSchema.extend({
@@ -3266,7 +3386,7 @@ var publicVolumeDetailSchema = publicVolumeSchema.extend({
3266
3386
  });
3267
3387
  var paginatedVolumesSchema = createPaginatedResponseSchema(publicVolumeSchema);
3268
3388
  var paginatedVolumeVersionsSchema = createPaginatedResponseSchema(volumeVersionSchema);
3269
- var publicVolumesListContract = c20.router({
3389
+ var publicVolumesListContract = c21.router({
3270
3390
  list: {
3271
3391
  method: "GET",
3272
3392
  path: "/v1/volumes",
@@ -3281,13 +3401,13 @@ var publicVolumesListContract = c20.router({
3281
3401
  description: "List all volumes in the current scope with pagination"
3282
3402
  }
3283
3403
  });
3284
- var publicVolumeByIdContract = c20.router({
3404
+ var publicVolumeByIdContract = c21.router({
3285
3405
  get: {
3286
3406
  method: "GET",
3287
3407
  path: "/v1/volumes/:id",
3288
3408
  headers: authHeadersSchema,
3289
- pathParams: z24.object({
3290
- id: z24.string().min(1, "Volume ID is required")
3409
+ pathParams: z25.object({
3410
+ id: z25.string().min(1, "Volume ID is required")
3291
3411
  }),
3292
3412
  responses: {
3293
3413
  200: publicVolumeDetailSchema,
@@ -3299,13 +3419,13 @@ var publicVolumeByIdContract = c20.router({
3299
3419
  description: "Get volume details by ID"
3300
3420
  }
3301
3421
  });
3302
- var publicVolumeVersionsContract = c20.router({
3422
+ var publicVolumeVersionsContract = c21.router({
3303
3423
  list: {
3304
3424
  method: "GET",
3305
3425
  path: "/v1/volumes/:id/versions",
3306
3426
  headers: authHeadersSchema,
3307
- pathParams: z24.object({
3308
- id: z24.string().min(1, "Volume ID is required")
3427
+ pathParams: z25.object({
3428
+ id: z25.string().min(1, "Volume ID is required")
3309
3429
  }),
3310
3430
  query: listQuerySchema,
3311
3431
  responses: {
@@ -3318,20 +3438,20 @@ var publicVolumeVersionsContract = c20.router({
3318
3438
  description: "List all versions of a volume with pagination"
3319
3439
  }
3320
3440
  });
3321
- var publicVolumeDownloadContract = c20.router({
3441
+ var publicVolumeDownloadContract = c21.router({
3322
3442
  download: {
3323
3443
  method: "GET",
3324
3444
  path: "/v1/volumes/:id/download",
3325
3445
  headers: authHeadersSchema,
3326
- pathParams: z24.object({
3327
- id: z24.string().min(1, "Volume ID is required")
3446
+ pathParams: z25.object({
3447
+ id: z25.string().min(1, "Volume ID is required")
3328
3448
  }),
3329
- query: z24.object({
3330
- versionId: z24.string().optional()
3449
+ query: z25.object({
3450
+ versionId: z25.string().optional()
3331
3451
  // Defaults to current version
3332
3452
  }),
3333
3453
  responses: {
3334
- 302: z24.undefined(),
3454
+ 302: z25.undefined(),
3335
3455
  // Redirect to presigned URL
3336
3456
  401: publicApiErrorSchema,
3337
3457
  404: publicApiErrorSchema,
@@ -3952,8 +4072,8 @@ async function getUsage(options) {
3952
4072
  }
3953
4073
 
3954
4074
  // src/lib/domain/yaml-validator.ts
3955
- import { z as z25 } from "zod";
3956
- var cliAgentNameSchema = z25.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
4075
+ import { z as z26 } from "zod";
4076
+ var cliAgentNameSchema = z26.string().min(3, "Agent name must be at least 3 characters").max(64, "Agent name must be 64 characters or less").regex(
3957
4077
  /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
3958
4078
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
3959
4079
  );
@@ -3968,7 +4088,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
3968
4088
  const skillUrl = agent.skills[i];
3969
4089
  if (skillUrl && !validateGitHubTreeUrl(skillUrl)) {
3970
4090
  ctx.addIssue({
3971
- code: z25.ZodIssueCode.custom,
4091
+ code: z26.ZodIssueCode.custom,
3972
4092
  message: `Invalid skill URL: ${skillUrl}. Expected format: https://github.com/{owner}/{repo}/tree/{branch}/{path}`,
3973
4093
  path: ["skills", i]
3974
4094
  });
@@ -3977,15 +4097,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
3977
4097
  }
3978
4098
  }
3979
4099
  );
3980
- var cliComposeSchema = z25.object({
3981
- version: z25.string().min(1, "Missing config.version"),
3982
- agents: z25.record(cliAgentNameSchema, cliAgentDefinitionSchema),
3983
- volumes: z25.record(z25.string(), volumeConfigSchema).optional()
4100
+ var cliComposeSchema = z26.object({
4101
+ version: z26.string().min(1, "Missing config.version"),
4102
+ agents: z26.record(cliAgentNameSchema, cliAgentDefinitionSchema),
4103
+ volumes: z26.record(z26.string(), volumeConfigSchema).optional()
3984
4104
  }).superRefine((config, ctx) => {
3985
4105
  const agentKeys = Object.keys(config.agents);
3986
4106
  if (agentKeys.length === 0) {
3987
4107
  ctx.addIssue({
3988
- code: z25.ZodIssueCode.custom,
4108
+ code: z26.ZodIssueCode.custom,
3989
4109
  message: "agents must have at least one agent defined",
3990
4110
  path: ["agents"]
3991
4111
  });
@@ -3993,7 +4113,7 @@ var cliComposeSchema = z25.object({
3993
4113
  }
3994
4114
  if (agentKeys.length > 1) {
3995
4115
  ctx.addIssue({
3996
- code: z25.ZodIssueCode.custom,
4116
+ code: z26.ZodIssueCode.custom,
3997
4117
  message: "Multiple agents not supported yet. Only one agent allowed.",
3998
4118
  path: ["agents"]
3999
4119
  });
@@ -4005,7 +4125,7 @@ var cliComposeSchema = z25.object({
4005
4125
  if (agentVolumes && agentVolumes.length > 0) {
4006
4126
  if (!config.volumes) {
4007
4127
  ctx.addIssue({
4008
- code: z25.ZodIssueCode.custom,
4128
+ code: z26.ZodIssueCode.custom,
4009
4129
  message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
4010
4130
  path: ["volumes"]
4011
4131
  });
@@ -4015,7 +4135,7 @@ var cliComposeSchema = z25.object({
4015
4135
  const parts = volDeclaration.split(":");
4016
4136
  if (parts.length !== 2) {
4017
4137
  ctx.addIssue({
4018
- code: z25.ZodIssueCode.custom,
4138
+ code: z26.ZodIssueCode.custom,
4019
4139
  message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
4020
4140
  path: ["agents", agentName, "volumes"]
4021
4141
  });
@@ -4024,7 +4144,7 @@ var cliComposeSchema = z25.object({
4024
4144
  const volumeKey = parts[0].trim();
4025
4145
  if (!config.volumes[volumeKey]) {
4026
4146
  ctx.addIssue({
4027
- code: z25.ZodIssueCode.custom,
4147
+ code: z26.ZodIssueCode.custom,
4028
4148
  message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
4029
4149
  path: ["volumes", volumeKey]
4030
4150
  });
@@ -4840,6 +4960,7 @@ async function silentUpgradeAfterCommand(currentVersion) {
4840
4960
  }
4841
4961
 
4842
4962
  // src/commands/compose/index.ts
4963
+ var DEFAULT_CONFIG_FILE = "vm0.yaml";
4843
4964
  function getSecretsFromComposeContent(content) {
4844
4965
  const refs = extractVariableReferences(content);
4845
4966
  const grouped = groupVariablesBySource(refs);
@@ -5022,10 +5143,14 @@ function mergeSkillVariables(agent, variables) {
5022
5143
  agent.environment = environment;
5023
5144
  }
5024
5145
  }
5025
- var composeCommand = new Command7().name("compose").description("Create or update agent compose (e.g., vm0.yaml)").argument("<agent-yaml>", "Path to agent YAML file").option("-y, --yes", "Skip confirmation prompts for skill requirements").addOption(new Option("--no-auto-update").hideHelp()).action(
5146
+ var composeCommand = new Command7().name("compose").description("Create or update agent compose (e.g., vm0.yaml)").argument(
5147
+ "[agent-yaml]",
5148
+ `Path to agent YAML file (default: ${DEFAULT_CONFIG_FILE})`
5149
+ ).option("-y, --yes", "Skip confirmation prompts for skill requirements").addOption(new Option("--no-auto-update").hideHelp()).action(
5026
5150
  async (configFile, options) => {
5151
+ const resolvedConfigFile = configFile ?? DEFAULT_CONFIG_FILE;
5027
5152
  try {
5028
- const { config, agentName, agent, basePath } = await loadAndValidateConfig(configFile);
5153
+ const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
5029
5154
  checkLegacyImageFormat(config);
5030
5155
  const skillResults = await uploadAssets(agentName, agent, basePath);
5031
5156
  const environment = agent.environment || {};
@@ -5058,7 +5183,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
5058
5183
  )
5059
5184
  );
5060
5185
  if (options.autoUpdate !== false) {
5061
- await silentUpgradeAfterCommand("9.16.0");
5186
+ await silentUpgradeAfterCommand("9.17.0");
5062
5187
  }
5063
5188
  } catch (error) {
5064
5189
  if (error instanceof Error) {
@@ -5813,9 +5938,9 @@ var CodexEventParser = class {
5813
5938
  }
5814
5939
  }
5815
5940
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
5816
- const changes = item.changes.map((c21) => {
5817
- const action = c21.kind === "add" ? "Created" : c21.kind === "modify" ? "Modified" : "Deleted";
5818
- return `${action}: ${c21.path}`;
5941
+ const changes = item.changes.map((c22) => {
5942
+ const action = c22.kind === "add" ? "Created" : c22.kind === "modify" ? "Modified" : "Deleted";
5943
+ return `${action}: ${c22.path}`;
5819
5944
  }).join("\n");
5820
5945
  return {
5821
5946
  type: "text",
@@ -5969,9 +6094,9 @@ var CodexEventRenderer = class {
5969
6094
  return;
5970
6095
  }
5971
6096
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
5972
- const summary = item.changes.map((c21) => {
5973
- const icon = c21.kind === "add" ? "+" : c21.kind === "delete" ? "-" : "~";
5974
- return `${icon}${c21.path}`;
6097
+ const summary = item.changes.map((c22) => {
6098
+ const icon = c22.kind === "add" ? "+" : c22.kind === "delete" ? "-" : "~";
6099
+ return `${icon}${c22.path}`;
5975
6100
  }).join(", ");
5976
6101
  console.log(chalk7.green("[files]") + ` ${summary}`);
5977
6102
  return;
@@ -7289,7 +7414,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
7289
7414
  }
7290
7415
  showNextSteps(result);
7291
7416
  if (options.autoUpdate !== false) {
7292
- await silentUpgradeAfterCommand("9.16.0");
7417
+ await silentUpgradeAfterCommand("9.17.0");
7293
7418
  }
7294
7419
  } catch (error) {
7295
7420
  handleRunError(error, identifier);
@@ -8795,7 +8920,7 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
8795
8920
  ).option("-y, --yes", "Skip confirmation prompts").option("-v, --verbose", "Show full tool inputs and outputs").addOption(new Option5("--debug-no-mock-claude").hideHelp()).addOption(new Option5("--no-auto-update").hideHelp()).action(
8796
8921
  async (prompt, options) => {
8797
8922
  if (options.autoUpdate !== false) {
8798
- const shouldExit = await checkAndUpgrade("9.16.0", prompt);
8923
+ const shouldExit = await checkAndUpgrade("9.17.0", prompt);
8799
8924
  if (shouldExit) {
8800
8925
  process.exit(0);
8801
8926
  }
@@ -9509,7 +9634,7 @@ var listCommand4 = new Command36().name("list").alias("ls").description("List al
9509
9634
  );
9510
9635
  return;
9511
9636
  }
9512
- const nameWidth = Math.max(4, ...data.composes.map((c21) => c21.name.length));
9637
+ const nameWidth = Math.max(4, ...data.composes.map((c22) => c22.name.length));
9513
9638
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
9514
9639
  " "
9515
9640
  );
@@ -10291,7 +10416,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
10291
10416
  );
10292
10417
  process.exit(1);
10293
10418
  }
10294
- const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c21) => c21.value === existingFrequency) : 0;
10419
+ const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c22) => c22.value === existingFrequency) : 0;
10295
10420
  frequency = await promptSelect(
10296
10421
  "Schedule frequency",
10297
10422
  FREQUENCY_CHOICES,
@@ -10320,7 +10445,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
10320
10445
  process.exit(1);
10321
10446
  }
10322
10447
  if (frequency === "weekly") {
10323
- const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c21) => c21.value === existingDay) : 0;
10448
+ const defaultDayIndex = existingDay !== void 0 ? DAY_OF_WEEK_CHOICES.findIndex((c22) => c22.value === existingDay) : 0;
10324
10449
  const day2 = await promptSelect(
10325
10450
  "Day of week",
10326
10451
  DAY_OF_WEEK_CHOICES,
@@ -12379,16 +12504,16 @@ async function handleModelProvider(ctx) {
12379
12504
  const providerType = await step.prompt(
12380
12505
  () => promptSelect(
12381
12506
  "Select provider type:",
12382
- choices.map((c21) => ({
12383
- title: c21.label,
12384
- value: c21.type
12507
+ choices.map((c22) => ({
12508
+ title: c22.label,
12509
+ value: c22.type
12385
12510
  }))
12386
12511
  )
12387
12512
  );
12388
12513
  if (!providerType) {
12389
12514
  process.exit(0);
12390
12515
  }
12391
- const selectedChoice = choices.find((c21) => c21.type === providerType);
12516
+ const selectedChoice = choices.find((c22) => c22.type === providerType);
12392
12517
  if (selectedChoice?.helpText) {
12393
12518
  for (const line of selectedChoice.helpText.split("\n")) {
12394
12519
  step.detail(chalk58.dim(line));
@@ -12578,7 +12703,7 @@ var setupClaudeCommand = new Command58().name("setup-claude").description("Insta
12578
12703
 
12579
12704
  // src/index.ts
12580
12705
  var program = new Command59();
12581
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.16.0");
12706
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.17.0");
12582
12707
  program.addCommand(authCommand);
12583
12708
  program.addCommand(infoCommand);
12584
12709
  program.addCommand(composeCommand);