@vm0/cli 9.15.2 → 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 +588 -441
  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",
@@ -1908,7 +2008,7 @@ var MODEL_PROVIDER_TYPES = {
1908
2008
  "openrouter-api-key": {
1909
2009
  framework: "claude-code",
1910
2010
  credentialName: "OPENROUTER_API_KEY",
1911
- label: "OpenRouter API Key",
2011
+ label: "OpenRouter",
1912
2012
  credentialLabel: "API key",
1913
2013
  helpText: "Get your API key at: https://openrouter.ai/settings/keys",
1914
2014
  environmentMapping: {
@@ -1931,7 +2031,7 @@ var MODEL_PROVIDER_TYPES = {
1931
2031
  "moonshot-api-key": {
1932
2032
  framework: "claude-code",
1933
2033
  credentialName: "MOONSHOT_API_KEY",
1934
- label: "Moonshot API Key (Kimi)",
2034
+ label: "Moonshot (Kimi)",
1935
2035
  credentialLabel: "API key",
1936
2036
  helpText: "Get your API key at: https://platform.moonshot.ai/console/api-keys",
1937
2037
  environmentMapping: {
@@ -1953,7 +2053,7 @@ var MODEL_PROVIDER_TYPES = {
1953
2053
  "minimax-api-key": {
1954
2054
  framework: "claude-code",
1955
2055
  credentialName: "MINIMAX_API_KEY",
1956
- label: "MiniMax API Key",
2056
+ label: "MiniMax",
1957
2057
  credentialLabel: "API key",
1958
2058
  helpText: "Get your API key at: https://platform.minimax.io/user-center/basic-information/interface-key",
1959
2059
  environmentMapping: {
@@ -1970,6 +2070,45 @@ var MODEL_PROVIDER_TYPES = {
1970
2070
  models: ["MiniMax-M2.1"],
1971
2071
  defaultModel: "MiniMax-M2.1"
1972
2072
  },
2073
+ "deepseek-api-key": {
2074
+ framework: "claude-code",
2075
+ credentialName: "DEEPSEEK_API_KEY",
2076
+ label: "DeepSeek",
2077
+ credentialLabel: "API key",
2078
+ helpText: "Get your API key at: https://platform.deepseek.com/api_keys",
2079
+ environmentMapping: {
2080
+ ANTHROPIC_AUTH_TOKEN: "$credential",
2081
+ ANTHROPIC_BASE_URL: "https://api.deepseek.com/anthropic",
2082
+ ANTHROPIC_MODEL: "$model",
2083
+ ANTHROPIC_DEFAULT_OPUS_MODEL: "$model",
2084
+ ANTHROPIC_DEFAULT_SONNET_MODEL: "$model",
2085
+ ANTHROPIC_DEFAULT_HAIKU_MODEL: "$model",
2086
+ CLAUDE_CODE_SUBAGENT_MODEL: "$model",
2087
+ API_TIMEOUT_MS: "600000",
2088
+ CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1"
2089
+ },
2090
+ models: ["deepseek-chat"],
2091
+ defaultModel: "deepseek-chat"
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
+ },
1973
2112
  "aws-bedrock": {
1974
2113
  framework: "claude-code",
1975
2114
  label: "AWS Bedrock",
@@ -2036,15 +2175,17 @@ var MODEL_PROVIDER_TYPES = {
2036
2175
  customModelPlaceholder: "anthropic.claude-sonnet-4-20250514-v1:0"
2037
2176
  }
2038
2177
  };
2039
- var modelProviderTypeSchema = z14.enum([
2178
+ var modelProviderTypeSchema = z15.enum([
2040
2179
  "claude-code-oauth-token",
2041
2180
  "anthropic-api-key",
2042
2181
  "openrouter-api-key",
2043
2182
  "moonshot-api-key",
2044
2183
  "minimax-api-key",
2184
+ "deepseek-api-key",
2185
+ "zai-api-key",
2045
2186
  "aws-bedrock"
2046
2187
  ]);
2047
- var modelProviderFrameworkSchema = z14.enum(["claude-code", "codex"]);
2188
+ var modelProviderFrameworkSchema = z15.enum(["claude-code", "codex"]);
2048
2189
  function hasAuthMethods(type) {
2049
2190
  const config = MODEL_PROVIDER_TYPES[type];
2050
2191
  return "authMethods" in config;
@@ -2085,45 +2226,45 @@ function getCustomModelPlaceholder(type) {
2085
2226
  const config = MODEL_PROVIDER_TYPES[type];
2086
2227
  return "customModelPlaceholder" in config ? config.customModelPlaceholder : void 0;
2087
2228
  }
2088
- var modelProviderResponseSchema = z14.object({
2089
- id: z14.string().uuid(),
2229
+ var modelProviderResponseSchema = z15.object({
2230
+ id: z15.string().uuid(),
2090
2231
  type: modelProviderTypeSchema,
2091
2232
  framework: modelProviderFrameworkSchema,
2092
- credentialName: z14.string().nullable(),
2233
+ credentialName: z15.string().nullable(),
2093
2234
  // Legacy single-credential (deprecated for multi-auth)
2094
- authMethod: z14.string().nullable(),
2235
+ authMethod: z15.string().nullable(),
2095
2236
  // For multi-auth providers
2096
- credentialNames: z14.array(z14.string()).nullable(),
2237
+ credentialNames: z15.array(z15.string()).nullable(),
2097
2238
  // For multi-auth providers
2098
- isDefault: z14.boolean(),
2099
- selectedModel: z14.string().nullable(),
2100
- createdAt: z14.string(),
2101
- updatedAt: z14.string()
2239
+ isDefault: z15.boolean(),
2240
+ selectedModel: z15.string().nullable(),
2241
+ createdAt: z15.string(),
2242
+ updatedAt: z15.string()
2102
2243
  });
2103
- var modelProviderListResponseSchema = z14.object({
2104
- modelProviders: z14.array(modelProviderResponseSchema)
2244
+ var modelProviderListResponseSchema = z15.object({
2245
+ modelProviders: z15.array(modelProviderResponseSchema)
2105
2246
  });
2106
- var upsertModelProviderRequestSchema = z14.object({
2247
+ var upsertModelProviderRequestSchema = z15.object({
2107
2248
  type: modelProviderTypeSchema,
2108
- credential: z14.string().min(1).optional(),
2249
+ credential: z15.string().min(1).optional(),
2109
2250
  // Legacy single credential
2110
- authMethod: z14.string().optional(),
2251
+ authMethod: z15.string().optional(),
2111
2252
  // For multi-auth providers
2112
- credentials: z14.record(z14.string(), z14.string()).optional(),
2253
+ credentials: z15.record(z15.string(), z15.string()).optional(),
2113
2254
  // For multi-auth providers
2114
- convert: z14.boolean().optional(),
2115
- selectedModel: z14.string().optional()
2255
+ convert: z15.boolean().optional(),
2256
+ selectedModel: z15.string().optional()
2116
2257
  });
2117
- var upsertModelProviderResponseSchema = z14.object({
2258
+ var upsertModelProviderResponseSchema = z15.object({
2118
2259
  provider: modelProviderResponseSchema,
2119
- created: z14.boolean()
2260
+ created: z15.boolean()
2120
2261
  });
2121
- var checkCredentialResponseSchema = z14.object({
2122
- exists: z14.boolean(),
2123
- credentialName: z14.string(),
2124
- 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()
2125
2266
  });
2126
- var modelProvidersMainContract = c11.router({
2267
+ var modelProvidersMainContract = c12.router({
2127
2268
  list: {
2128
2269
  method: "GET",
2129
2270
  path: "/api/model-providers",
@@ -2151,12 +2292,12 @@ var modelProvidersMainContract = c11.router({
2151
2292
  summary: "Create or update a model provider"
2152
2293
  }
2153
2294
  });
2154
- var modelProvidersCheckContract = c11.router({
2295
+ var modelProvidersCheckContract = c12.router({
2155
2296
  check: {
2156
2297
  method: "GET",
2157
2298
  path: "/api/model-providers/check/:type",
2158
2299
  headers: authHeadersSchema,
2159
- pathParams: z14.object({
2300
+ pathParams: z15.object({
2160
2301
  type: modelProviderTypeSchema
2161
2302
  }),
2162
2303
  responses: {
@@ -2167,16 +2308,16 @@ var modelProvidersCheckContract = c11.router({
2167
2308
  summary: "Check if credential exists for a model provider type"
2168
2309
  }
2169
2310
  });
2170
- var modelProvidersByTypeContract = c11.router({
2311
+ var modelProvidersByTypeContract = c12.router({
2171
2312
  delete: {
2172
2313
  method: "DELETE",
2173
2314
  path: "/api/model-providers/:type",
2174
2315
  headers: authHeadersSchema,
2175
- pathParams: z14.object({
2316
+ pathParams: z15.object({
2176
2317
  type: modelProviderTypeSchema
2177
2318
  }),
2178
2319
  responses: {
2179
- 204: c11.noBody(),
2320
+ 204: c12.noBody(),
2180
2321
  401: apiErrorSchema,
2181
2322
  404: apiErrorSchema,
2182
2323
  500: apiErrorSchema
@@ -2184,15 +2325,15 @@ var modelProvidersByTypeContract = c11.router({
2184
2325
  summary: "Delete a model provider"
2185
2326
  }
2186
2327
  });
2187
- var modelProvidersConvertContract = c11.router({
2328
+ var modelProvidersConvertContract = c12.router({
2188
2329
  convert: {
2189
2330
  method: "POST",
2190
2331
  path: "/api/model-providers/:type/convert",
2191
2332
  headers: authHeadersSchema,
2192
- pathParams: z14.object({
2333
+ pathParams: z15.object({
2193
2334
  type: modelProviderTypeSchema
2194
2335
  }),
2195
- body: z14.undefined(),
2336
+ body: z15.undefined(),
2196
2337
  responses: {
2197
2338
  200: modelProviderResponseSchema,
2198
2339
  400: apiErrorSchema,
@@ -2203,15 +2344,15 @@ var modelProvidersConvertContract = c11.router({
2203
2344
  summary: "Convert existing user credential to model provider"
2204
2345
  }
2205
2346
  });
2206
- var modelProvidersSetDefaultContract = c11.router({
2347
+ var modelProvidersSetDefaultContract = c12.router({
2207
2348
  setDefault: {
2208
2349
  method: "POST",
2209
2350
  path: "/api/model-providers/:type/set-default",
2210
2351
  headers: authHeadersSchema,
2211
- pathParams: z14.object({
2352
+ pathParams: z15.object({
2212
2353
  type: modelProviderTypeSchema
2213
2354
  }),
2214
- body: z14.undefined(),
2355
+ body: z15.undefined(),
2215
2356
  responses: {
2216
2357
  200: modelProviderResponseSchema,
2217
2358
  401: apiErrorSchema,
@@ -2221,15 +2362,15 @@ var modelProvidersSetDefaultContract = c11.router({
2221
2362
  summary: "Set a model provider as default for its framework"
2222
2363
  }
2223
2364
  });
2224
- var updateModelRequestSchema = z14.object({
2225
- selectedModel: z14.string().optional()
2365
+ var updateModelRequestSchema = z15.object({
2366
+ selectedModel: z15.string().optional()
2226
2367
  });
2227
- var modelProvidersUpdateModelContract = c11.router({
2368
+ var modelProvidersUpdateModelContract = c12.router({
2228
2369
  updateModel: {
2229
2370
  method: "PATCH",
2230
2371
  path: "/api/model-providers/:type/model",
2231
2372
  headers: authHeadersSchema,
2232
- pathParams: z14.object({
2373
+ pathParams: z15.object({
2233
2374
  type: modelProviderTypeSchema
2234
2375
  }),
2235
2376
  body: updateModelRequestSchema,
@@ -2244,42 +2385,42 @@ var modelProvidersUpdateModelContract = c11.router({
2244
2385
  });
2245
2386
 
2246
2387
  // ../../packages/core/src/contracts/sessions.ts
2247
- import { z as z15 } from "zod";
2248
- var c12 = initContract();
2249
- var sessionResponseSchema = z15.object({
2250
- id: z15.string(),
2251
- agentComposeId: z15.string(),
2252
- agentComposeVersionId: z15.string().nullable(),
2253
- conversationId: z15.string().nullable(),
2254
- artifactName: z15.string().nullable(),
2255
- vars: z15.record(z15.string(), z15.string()).nullable(),
2256
- secretNames: z15.array(z15.string()).nullable(),
2257
- volumeVersions: z15.record(z15.string(), z15.string()).nullable(),
2258
- createdAt: z15.string(),
2259
- 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()
2260
2401
  });
2261
- var agentComposeSnapshotSchema = z15.object({
2262
- agentComposeVersionId: z15.string(),
2263
- vars: z15.record(z15.string(), z15.string()).optional(),
2264
- 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()
2265
2406
  });
2266
- var artifactSnapshotSchema2 = z15.object({
2267
- artifactName: z15.string(),
2268
- artifactVersion: z15.string()
2407
+ var artifactSnapshotSchema2 = z16.object({
2408
+ artifactName: z16.string(),
2409
+ artifactVersion: z16.string()
2269
2410
  });
2270
- var volumeVersionsSnapshotSchema2 = z15.object({
2271
- versions: z15.record(z15.string(), z15.string())
2411
+ var volumeVersionsSnapshotSchema2 = z16.object({
2412
+ versions: z16.record(z16.string(), z16.string())
2272
2413
  });
2273
- var checkpointResponseSchema = z15.object({
2274
- id: z15.string(),
2275
- runId: z15.string(),
2276
- conversationId: z15.string(),
2414
+ var checkpointResponseSchema = z16.object({
2415
+ id: z16.string(),
2416
+ runId: z16.string(),
2417
+ conversationId: z16.string(),
2277
2418
  agentComposeSnapshot: agentComposeSnapshotSchema,
2278
2419
  artifactSnapshot: artifactSnapshotSchema2.nullable(),
2279
2420
  volumeVersionsSnapshot: volumeVersionsSnapshotSchema2.nullable(),
2280
- createdAt: z15.string()
2421
+ createdAt: z16.string()
2281
2422
  });
2282
- var sessionsByIdContract = c12.router({
2423
+ var sessionsByIdContract = c13.router({
2283
2424
  /**
2284
2425
  * GET /api/agent/sessions/:id
2285
2426
  * Get session by ID
@@ -2288,8 +2429,8 @@ var sessionsByIdContract = c12.router({
2288
2429
  method: "GET",
2289
2430
  path: "/api/agent/sessions/:id",
2290
2431
  headers: authHeadersSchema,
2291
- pathParams: z15.object({
2292
- id: z15.string().min(1, "Session ID is required")
2432
+ pathParams: z16.object({
2433
+ id: z16.string().min(1, "Session ID is required")
2293
2434
  }),
2294
2435
  responses: {
2295
2436
  200: sessionResponseSchema,
@@ -2300,7 +2441,7 @@ var sessionsByIdContract = c12.router({
2300
2441
  summary: "Get session by ID"
2301
2442
  }
2302
2443
  });
2303
- var checkpointsByIdContract = c12.router({
2444
+ var checkpointsByIdContract = c13.router({
2304
2445
  /**
2305
2446
  * GET /api/agent/checkpoints/:id
2306
2447
  * Get checkpoint by ID
@@ -2309,8 +2450,8 @@ var checkpointsByIdContract = c12.router({
2309
2450
  method: "GET",
2310
2451
  path: "/api/agent/checkpoints/:id",
2311
2452
  headers: authHeadersSchema,
2312
- pathParams: z15.object({
2313
- id: z15.string().min(1, "Checkpoint ID is required")
2453
+ pathParams: z16.object({
2454
+ id: z16.string().min(1, "Checkpoint ID is required")
2314
2455
  }),
2315
2456
  responses: {
2316
2457
  200: checkpointResponseSchema,
@@ -2323,93 +2464,93 @@ var checkpointsByIdContract = c12.router({
2323
2464
  });
2324
2465
 
2325
2466
  // ../../packages/core/src/contracts/schedules.ts
2326
- import { z as z16 } from "zod";
2327
- var c13 = initContract();
2328
- var scheduleTriggerSchema = z16.object({
2329
- cron: z16.string().optional(),
2330
- at: z16.string().optional(),
2331
- 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")
2332
2473
  }).refine((data) => data.cron && !data.at || !data.cron && data.at, {
2333
2474
  message: "Exactly one of 'cron' or 'at' must be specified"
2334
2475
  });
2335
- var scheduleRunConfigSchema = z16.object({
2336
- agent: z16.string().min(1, "Agent reference required"),
2337
- prompt: z16.string().min(1, "Prompt required"),
2338
- vars: z16.record(z16.string(), z16.string()).optional(),
2339
- secrets: z16.record(z16.string(), z16.string()).optional(),
2340
- artifactName: z16.string().optional(),
2341
- artifactVersion: z16.string().optional(),
2342
- 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()
2343
2484
  });
2344
- var scheduleDefinitionSchema = z16.object({
2485
+ var scheduleDefinitionSchema = z17.object({
2345
2486
  on: scheduleTriggerSchema,
2346
2487
  run: scheduleRunConfigSchema
2347
2488
  });
2348
- var scheduleYamlSchema = z16.object({
2349
- version: z16.literal("1.0"),
2350
- schedules: z16.record(z16.string(), scheduleDefinitionSchema)
2351
- });
2352
- var deployScheduleRequestSchema = z16.object({
2353
- name: z16.string().min(1).max(64, "Schedule name max 64 chars"),
2354
- cronExpression: z16.string().optional(),
2355
- atTime: z16.string().optional(),
2356
- timezone: z16.string().default("UTC"),
2357
- prompt: z16.string().min(1, "Prompt required"),
2358
- vars: z16.record(z16.string(), z16.string()).optional(),
2359
- secrets: z16.record(z16.string(), z16.string()).optional(),
2360
- artifactName: z16.string().optional(),
2361
- artifactVersion: z16.string().optional(),
2362
- 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(),
2363
2504
  // Resolved agent compose ID (CLI resolves scope/name:version → composeId)
2364
- composeId: z16.string().uuid("Invalid compose ID")
2505
+ composeId: z17.string().uuid("Invalid compose ID")
2365
2506
  }).refine(
2366
2507
  (data) => data.cronExpression && !data.atTime || !data.cronExpression && data.atTime,
2367
2508
  {
2368
2509
  message: "Exactly one of 'cronExpression' or 'atTime' must be specified"
2369
2510
  }
2370
2511
  );
2371
- var scheduleResponseSchema = z16.object({
2372
- id: z16.string().uuid(),
2373
- composeId: z16.string().uuid(),
2374
- composeName: z16.string(),
2375
- scopeSlug: z16.string(),
2376
- name: z16.string(),
2377
- cronExpression: z16.string().nullable(),
2378
- atTime: z16.string().nullable(),
2379
- timezone: z16.string(),
2380
- prompt: z16.string(),
2381
- 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(),
2382
2523
  // Secret names only (values are never returned)
2383
- secretNames: z16.array(z16.string()).nullable(),
2384
- artifactName: z16.string().nullable(),
2385
- artifactVersion: z16.string().nullable(),
2386
- volumeVersions: z16.record(z16.string(), z16.string()).nullable(),
2387
- enabled: z16.boolean(),
2388
- nextRunAt: z16.string().nullable(),
2389
- lastRunAt: z16.string().nullable(),
2390
- retryStartedAt: z16.string().nullable(),
2391
- createdAt: z16.string(),
2392
- updatedAt: z16.string()
2393
- });
2394
- var runSummarySchema = z16.object({
2395
- id: z16.string().uuid(),
2396
- status: z16.enum(["pending", "running", "completed", "failed", "timeout"]),
2397
- createdAt: z16.string(),
2398
- completedAt: z16.string().nullable(),
2399
- error: z16.string().nullable()
2400
- });
2401
- var scheduleRunsResponseSchema = z16.object({
2402
- runs: z16.array(runSummarySchema)
2403
- });
2404
- var scheduleListResponseSchema = z16.object({
2405
- schedules: z16.array(scheduleResponseSchema)
2406
- });
2407
- 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({
2408
2549
  schedule: scheduleResponseSchema,
2409
- created: z16.boolean()
2550
+ created: z17.boolean()
2410
2551
  // true if created, false if updated
2411
2552
  });
2412
- var schedulesMainContract = c13.router({
2553
+ var schedulesMainContract = c14.router({
2413
2554
  /**
2414
2555
  * POST /api/agent/schedules
2415
2556
  * Deploy (create or update) a schedule
@@ -2447,7 +2588,7 @@ var schedulesMainContract = c13.router({
2447
2588
  summary: "List all schedules"
2448
2589
  }
2449
2590
  });
2450
- var schedulesByNameContract = c13.router({
2591
+ var schedulesByNameContract = c14.router({
2451
2592
  /**
2452
2593
  * GET /api/agent/schedules/:name
2453
2594
  * Get schedule by name
@@ -2456,11 +2597,11 @@ var schedulesByNameContract = c13.router({
2456
2597
  method: "GET",
2457
2598
  path: "/api/agent/schedules/:name",
2458
2599
  headers: authHeadersSchema,
2459
- pathParams: z16.object({
2460
- name: z16.string().min(1, "Schedule name required")
2600
+ pathParams: z17.object({
2601
+ name: z17.string().min(1, "Schedule name required")
2461
2602
  }),
2462
- query: z16.object({
2463
- composeId: z16.string().uuid("Compose ID required")
2603
+ query: z17.object({
2604
+ composeId: z17.string().uuid("Compose ID required")
2464
2605
  }),
2465
2606
  responses: {
2466
2607
  200: scheduleResponseSchema,
@@ -2477,21 +2618,21 @@ var schedulesByNameContract = c13.router({
2477
2618
  method: "DELETE",
2478
2619
  path: "/api/agent/schedules/:name",
2479
2620
  headers: authHeadersSchema,
2480
- pathParams: z16.object({
2481
- name: z16.string().min(1, "Schedule name required")
2621
+ pathParams: z17.object({
2622
+ name: z17.string().min(1, "Schedule name required")
2482
2623
  }),
2483
- query: z16.object({
2484
- composeId: z16.string().uuid("Compose ID required")
2624
+ query: z17.object({
2625
+ composeId: z17.string().uuid("Compose ID required")
2485
2626
  }),
2486
2627
  responses: {
2487
- 204: c13.noBody(),
2628
+ 204: c14.noBody(),
2488
2629
  401: apiErrorSchema,
2489
2630
  404: apiErrorSchema
2490
2631
  },
2491
2632
  summary: "Delete schedule"
2492
2633
  }
2493
2634
  });
2494
- var schedulesEnableContract = c13.router({
2635
+ var schedulesEnableContract = c14.router({
2495
2636
  /**
2496
2637
  * POST /api/agent/schedules/:name/enable
2497
2638
  * Enable a disabled schedule
@@ -2500,11 +2641,11 @@ var schedulesEnableContract = c13.router({
2500
2641
  method: "POST",
2501
2642
  path: "/api/agent/schedules/:name/enable",
2502
2643
  headers: authHeadersSchema,
2503
- pathParams: z16.object({
2504
- name: z16.string().min(1, "Schedule name required")
2644
+ pathParams: z17.object({
2645
+ name: z17.string().min(1, "Schedule name required")
2505
2646
  }),
2506
- body: z16.object({
2507
- composeId: z16.string().uuid("Compose ID required")
2647
+ body: z17.object({
2648
+ composeId: z17.string().uuid("Compose ID required")
2508
2649
  }),
2509
2650
  responses: {
2510
2651
  200: scheduleResponseSchema,
@@ -2521,11 +2662,11 @@ var schedulesEnableContract = c13.router({
2521
2662
  method: "POST",
2522
2663
  path: "/api/agent/schedules/:name/disable",
2523
2664
  headers: authHeadersSchema,
2524
- pathParams: z16.object({
2525
- name: z16.string().min(1, "Schedule name required")
2665
+ pathParams: z17.object({
2666
+ name: z17.string().min(1, "Schedule name required")
2526
2667
  }),
2527
- body: z16.object({
2528
- composeId: z16.string().uuid("Compose ID required")
2668
+ body: z17.object({
2669
+ composeId: z17.string().uuid("Compose ID required")
2529
2670
  }),
2530
2671
  responses: {
2531
2672
  200: scheduleResponseSchema,
@@ -2535,7 +2676,7 @@ var schedulesEnableContract = c13.router({
2535
2676
  summary: "Disable schedule"
2536
2677
  }
2537
2678
  });
2538
- var scheduleRunsContract = c13.router({
2679
+ var scheduleRunsContract = c14.router({
2539
2680
  /**
2540
2681
  * GET /api/agent/schedules/:name/runs
2541
2682
  * List recent runs for a schedule
@@ -2544,12 +2685,12 @@ var scheduleRunsContract = c13.router({
2544
2685
  method: "GET",
2545
2686
  path: "/api/agent/schedules/:name/runs",
2546
2687
  headers: authHeadersSchema,
2547
- pathParams: z16.object({
2548
- name: z16.string().min(1, "Schedule name required")
2688
+ pathParams: z17.object({
2689
+ name: z17.string().min(1, "Schedule name required")
2549
2690
  }),
2550
- query: z16.object({
2551
- composeId: z16.string().uuid("Compose ID required"),
2552
- 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)
2553
2694
  }),
2554
2695
  responses: {
2555
2696
  200: scheduleRunsResponseSchema,
@@ -2561,18 +2702,18 @@ var scheduleRunsContract = c13.router({
2561
2702
  });
2562
2703
 
2563
2704
  // ../../packages/core/src/contracts/realtime.ts
2564
- import { z as z17 } from "zod";
2565
- var c14 = initContract();
2566
- var ablyTokenRequestSchema = z17.object({
2567
- keyName: z17.string(),
2568
- ttl: z17.number().optional(),
2569
- timestamp: z17.number(),
2570
- capability: z17.string(),
2571
- clientId: z17.string().optional(),
2572
- nonce: z17.string(),
2573
- mac: z17.string()
2574
- });
2575
- 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({
2576
2717
  /**
2577
2718
  * POST /api/realtime/token
2578
2719
  * Get an Ably token to subscribe to a run's events channel
@@ -2581,8 +2722,8 @@ var realtimeTokenContract = c14.router({
2581
2722
  method: "POST",
2582
2723
  path: "/api/realtime/token",
2583
2724
  headers: authHeadersSchema,
2584
- body: z17.object({
2585
- 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")
2586
2727
  }),
2587
2728
  responses: {
2588
2729
  200: ablyTokenRequestSchema,
@@ -2594,7 +2735,7 @@ var realtimeTokenContract = c14.router({
2594
2735
  summary: "Get Ably token for run event subscription"
2595
2736
  }
2596
2737
  });
2597
- var runnerRealtimeTokenContract = c14.router({
2738
+ var runnerRealtimeTokenContract = c15.router({
2598
2739
  /**
2599
2740
  * POST /api/runners/realtime/token
2600
2741
  * Get an Ably token to subscribe to a runner group's job notification channel
@@ -2603,7 +2744,7 @@ var runnerRealtimeTokenContract = c14.router({
2603
2744
  method: "POST",
2604
2745
  path: "/api/runners/realtime/token",
2605
2746
  headers: authHeadersSchema,
2606
- body: z17.object({
2747
+ body: z18.object({
2607
2748
  group: runnerGroupSchema
2608
2749
  }),
2609
2750
  responses: {
@@ -2617,11 +2758,11 @@ var runnerRealtimeTokenContract = c14.router({
2617
2758
  });
2618
2759
 
2619
2760
  // ../../packages/core/src/contracts/platform.ts
2620
- import { z as z19 } from "zod";
2761
+ import { z as z20 } from "zod";
2621
2762
 
2622
2763
  // ../../packages/core/src/contracts/public/common.ts
2623
- import { z as z18 } from "zod";
2624
- var publicApiErrorTypeSchema = z18.enum([
2764
+ import { z as z19 } from "zod";
2765
+ var publicApiErrorTypeSchema = z19.enum([
2625
2766
  "api_error",
2626
2767
  // Internal server error (5xx)
2627
2768
  "invalid_request_error",
@@ -2635,40 +2776,40 @@ var publicApiErrorTypeSchema = z18.enum([
2635
2776
  "rate_limit_error"
2636
2777
  // Rate limit exceeded (429)
2637
2778
  ]);
2638
- var publicApiErrorSchema = z18.object({
2639
- error: z18.object({
2779
+ var publicApiErrorSchema = z19.object({
2780
+ error: z19.object({
2640
2781
  type: publicApiErrorTypeSchema,
2641
- code: z18.string(),
2642
- message: z18.string(),
2643
- param: z18.string().optional(),
2644
- docUrl: z18.string().url().optional()
2782
+ code: z19.string(),
2783
+ message: z19.string(),
2784
+ param: z19.string().optional(),
2785
+ docUrl: z19.string().url().optional()
2645
2786
  })
2646
2787
  });
2647
- var paginationSchema = z18.object({
2648
- hasMore: z18.boolean(),
2649
- nextCursor: z18.string().nullable()
2788
+ var paginationSchema = z19.object({
2789
+ hasMore: z19.boolean(),
2790
+ nextCursor: z19.string().nullable()
2650
2791
  });
2651
2792
  function createPaginatedResponseSchema(dataSchema) {
2652
- return z18.object({
2653
- data: z18.array(dataSchema),
2793
+ return z19.object({
2794
+ data: z19.array(dataSchema),
2654
2795
  pagination: paginationSchema
2655
2796
  });
2656
2797
  }
2657
- var listQuerySchema = z18.object({
2658
- cursor: z18.string().optional(),
2659
- 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)
2660
2801
  });
2661
- var requestIdSchema = z18.string().uuid();
2662
- var timestampSchema = z18.string().datetime();
2802
+ var requestIdSchema = z19.string().uuid();
2803
+ var timestampSchema = z19.string().datetime();
2663
2804
 
2664
2805
  // ../../packages/core/src/contracts/platform.ts
2665
- var c15 = initContract();
2666
- var platformPaginationSchema = z19.object({
2667
- hasMore: z19.boolean(),
2668
- nextCursor: z19.string().nullable(),
2669
- 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()
2670
2811
  });
2671
- var platformLogStatusSchema = z19.enum([
2812
+ var platformLogStatusSchema = z20.enum([
2672
2813
  "pending",
2673
2814
  "running",
2674
2815
  "completed",
@@ -2676,41 +2817,41 @@ var platformLogStatusSchema = z19.enum([
2676
2817
  "timeout",
2677
2818
  "cancelled"
2678
2819
  ]);
2679
- var platformLogEntrySchema = z19.object({
2680
- id: z19.string().uuid(),
2681
- sessionId: z19.string().nullable(),
2682
- agentName: z19.string(),
2683
- 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(),
2684
2825
  status: platformLogStatusSchema,
2685
- createdAt: z19.string()
2826
+ createdAt: z20.string()
2686
2827
  });
2687
- var platformLogsListResponseSchema = z19.object({
2688
- data: z19.array(platformLogEntrySchema),
2828
+ var platformLogsListResponseSchema = z20.object({
2829
+ data: z20.array(platformLogEntrySchema),
2689
2830
  pagination: platformPaginationSchema
2690
2831
  });
2691
- var artifactSchema = z19.object({
2692
- name: z19.string().nullable(),
2693
- version: z19.string().nullable()
2832
+ var artifactSchema = z20.object({
2833
+ name: z20.string().nullable(),
2834
+ version: z20.string().nullable()
2694
2835
  });
2695
- var platformLogDetailSchema = z19.object({
2696
- id: z19.string().uuid(),
2697
- sessionId: z19.string().nullable(),
2698
- agentName: z19.string(),
2699
- 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(),
2700
2841
  status: platformLogStatusSchema,
2701
- prompt: z19.string(),
2702
- error: z19.string().nullable(),
2703
- createdAt: z19.string(),
2704
- startedAt: z19.string().nullable(),
2705
- 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(),
2706
2847
  artifact: artifactSchema
2707
2848
  });
2708
- var platformLogsListContract = c15.router({
2849
+ var platformLogsListContract = c16.router({
2709
2850
  list: {
2710
2851
  method: "GET",
2711
2852
  path: "/api/platform/logs",
2712
2853
  query: listQuerySchema.extend({
2713
- search: z19.string().optional()
2854
+ search: z20.string().optional()
2714
2855
  }),
2715
2856
  responses: {
2716
2857
  200: platformLogsListResponseSchema,
@@ -2719,12 +2860,12 @@ var platformLogsListContract = c15.router({
2719
2860
  summary: "List agent run logs with pagination"
2720
2861
  }
2721
2862
  });
2722
- var platformLogsByIdContract = c15.router({
2863
+ var platformLogsByIdContract = c16.router({
2723
2864
  getById: {
2724
2865
  method: "GET",
2725
2866
  path: "/api/platform/logs/:id",
2726
- pathParams: z19.object({
2727
- id: z19.string().uuid("Invalid log ID")
2867
+ pathParams: z20.object({
2868
+ id: z20.string().uuid("Invalid log ID")
2728
2869
  }),
2729
2870
  responses: {
2730
2871
  200: platformLogDetailSchema,
@@ -2734,17 +2875,17 @@ var platformLogsByIdContract = c15.router({
2734
2875
  summary: "Get agent run log details by ID"
2735
2876
  }
2736
2877
  });
2737
- var artifactDownloadResponseSchema = z19.object({
2738
- url: z19.string().url(),
2739
- expiresAt: z19.string()
2878
+ var artifactDownloadResponseSchema = z20.object({
2879
+ url: z20.string().url(),
2880
+ expiresAt: z20.string()
2740
2881
  });
2741
- var platformArtifactDownloadContract = c15.router({
2882
+ var platformArtifactDownloadContract = c16.router({
2742
2883
  getDownloadUrl: {
2743
2884
  method: "GET",
2744
2885
  path: "/api/platform/artifacts/download",
2745
- query: z19.object({
2746
- name: z19.string().min(1, "Artifact name is required"),
2747
- version: z19.string().optional()
2886
+ query: z20.object({
2887
+ name: z20.string().min(1, "Artifact name is required"),
2888
+ version: z20.string().optional()
2748
2889
  }),
2749
2890
  responses: {
2750
2891
  200: artifactDownloadResponseSchema,
@@ -2756,29 +2897,29 @@ var platformArtifactDownloadContract = c15.router({
2756
2897
  });
2757
2898
 
2758
2899
  // ../../packages/core/src/contracts/llm.ts
2759
- import { z as z20 } from "zod";
2760
- var c16 = initContract();
2761
- var messageRoleSchema = z20.enum(["user", "assistant", "system"]);
2762
- 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({
2763
2904
  role: messageRoleSchema,
2764
- content: z20.string()
2905
+ content: z21.string()
2765
2906
  });
2766
- var tokenUsageSchema = z20.object({
2767
- promptTokens: z20.number(),
2768
- completionTokens: z20.number(),
2769
- totalTokens: z20.number()
2907
+ var tokenUsageSchema = z21.object({
2908
+ promptTokens: z21.number(),
2909
+ completionTokens: z21.number(),
2910
+ totalTokens: z21.number()
2770
2911
  });
2771
- var llmChatRequestSchema = z20.object({
2772
- model: z20.string().min(1).optional(),
2773
- messages: z20.array(chatMessageSchema).min(1, "At least one message is required"),
2774
- 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)
2775
2916
  });
2776
- var llmChatResponseSchema = z20.object({
2777
- content: z20.string(),
2778
- model: z20.string(),
2917
+ var llmChatResponseSchema = z21.object({
2918
+ content: z21.string(),
2919
+ model: z21.string(),
2779
2920
  usage: tokenUsageSchema
2780
2921
  });
2781
- var llmChatContract = c16.router({
2922
+ var llmChatContract = c17.router({
2782
2923
  chat: {
2783
2924
  method: "POST",
2784
2925
  path: "/api/llm/chat",
@@ -2794,28 +2935,28 @@ var llmChatContract = c16.router({
2794
2935
  });
2795
2936
 
2796
2937
  // ../../packages/core/src/contracts/public/agents.ts
2797
- import { z as z21 } from "zod";
2798
- var c17 = initContract();
2799
- var publicAgentSchema = z21.object({
2800
- id: z21.string(),
2801
- name: z21.string(),
2802
- 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(),
2803
2944
  createdAt: timestampSchema,
2804
2945
  updatedAt: timestampSchema
2805
2946
  });
2806
- var agentVersionSchema = z21.object({
2807
- id: z21.string(),
2808
- agentId: z21.string(),
2809
- versionNumber: z21.number(),
2947
+ var agentVersionSchema = z22.object({
2948
+ id: z22.string(),
2949
+ agentId: z22.string(),
2950
+ versionNumber: z22.number(),
2810
2951
  createdAt: timestampSchema
2811
2952
  });
2812
2953
  var publicAgentDetailSchema = publicAgentSchema;
2813
2954
  var paginatedAgentsSchema = createPaginatedResponseSchema(publicAgentSchema);
2814
2955
  var paginatedAgentVersionsSchema = createPaginatedResponseSchema(agentVersionSchema);
2815
2956
  var agentListQuerySchema = listQuerySchema.extend({
2816
- name: z21.string().optional()
2957
+ name: z22.string().optional()
2817
2958
  });
2818
- var publicAgentsListContract = c17.router({
2959
+ var publicAgentsListContract = c18.router({
2819
2960
  list: {
2820
2961
  method: "GET",
2821
2962
  path: "/v1/agents",
@@ -2830,13 +2971,13 @@ var publicAgentsListContract = c17.router({
2830
2971
  description: "List all agents in the current scope with pagination. Use the `name` query parameter to filter by agent name."
2831
2972
  }
2832
2973
  });
2833
- var publicAgentByIdContract = c17.router({
2974
+ var publicAgentByIdContract = c18.router({
2834
2975
  get: {
2835
2976
  method: "GET",
2836
2977
  path: "/v1/agents/:id",
2837
2978
  headers: authHeadersSchema,
2838
- pathParams: z21.object({
2839
- id: z21.string().min(1, "Agent ID is required")
2979
+ pathParams: z22.object({
2980
+ id: z22.string().min(1, "Agent ID is required")
2840
2981
  }),
2841
2982
  responses: {
2842
2983
  200: publicAgentDetailSchema,
@@ -2848,13 +2989,13 @@ var publicAgentByIdContract = c17.router({
2848
2989
  description: "Get agent details by ID"
2849
2990
  }
2850
2991
  });
2851
- var publicAgentVersionsContract = c17.router({
2992
+ var publicAgentVersionsContract = c18.router({
2852
2993
  list: {
2853
2994
  method: "GET",
2854
2995
  path: "/v1/agents/:id/versions",
2855
2996
  headers: authHeadersSchema,
2856
- pathParams: z21.object({
2857
- id: z21.string().min(1, "Agent ID is required")
2997
+ pathParams: z22.object({
2998
+ id: z22.string().min(1, "Agent ID is required")
2858
2999
  }),
2859
3000
  query: listQuerySchema,
2860
3001
  responses: {
@@ -2869,9 +3010,9 @@ var publicAgentVersionsContract = c17.router({
2869
3010
  });
2870
3011
 
2871
3012
  // ../../packages/core/src/contracts/public/runs.ts
2872
- import { z as z22 } from "zod";
2873
- var c18 = initContract();
2874
- var publicRunStatusSchema = z22.enum([
3013
+ import { z as z23 } from "zod";
3014
+ var c19 = initContract();
3015
+ var publicRunStatusSchema = z23.enum([
2875
3016
  "pending",
2876
3017
  "running",
2877
3018
  "completed",
@@ -2879,54 +3020,54 @@ var publicRunStatusSchema = z22.enum([
2879
3020
  "timeout",
2880
3021
  "cancelled"
2881
3022
  ]);
2882
- var publicRunSchema = z22.object({
2883
- id: z22.string(),
2884
- agentId: z22.string(),
2885
- agentName: z22.string(),
3023
+ var publicRunSchema = z23.object({
3024
+ id: z23.string(),
3025
+ agentId: z23.string(),
3026
+ agentName: z23.string(),
2886
3027
  status: publicRunStatusSchema,
2887
- prompt: z22.string(),
3028
+ prompt: z23.string(),
2888
3029
  createdAt: timestampSchema,
2889
3030
  startedAt: timestampSchema.nullable(),
2890
3031
  completedAt: timestampSchema.nullable()
2891
3032
  });
2892
3033
  var publicRunDetailSchema = publicRunSchema.extend({
2893
- error: z22.string().nullable(),
2894
- executionTimeMs: z22.number().nullable(),
2895
- checkpointId: z22.string().nullable(),
2896
- sessionId: z22.string().nullable(),
2897
- artifactName: z22.string().nullable(),
2898
- artifactVersion: z22.string().nullable(),
2899
- 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()
2900
3041
  });
2901
3042
  var paginatedRunsSchema = createPaginatedResponseSchema(publicRunSchema);
2902
- var createRunRequestSchema = z22.object({
3043
+ var createRunRequestSchema = z23.object({
2903
3044
  // Agent identification (one of: agent, agentId, sessionId, checkpointId)
2904
- agent: z22.string().optional(),
3045
+ agent: z23.string().optional(),
2905
3046
  // Agent name
2906
- agentId: z22.string().optional(),
3047
+ agentId: z23.string().optional(),
2907
3048
  // Agent ID
2908
- agentVersion: z22.string().optional(),
3049
+ agentVersion: z23.string().optional(),
2909
3050
  // Version specifier (e.g., "latest", "v1", specific ID)
2910
3051
  // Continue session
2911
- sessionId: z22.string().optional(),
3052
+ sessionId: z23.string().optional(),
2912
3053
  // Resume from checkpoint
2913
- checkpointId: z22.string().optional(),
3054
+ checkpointId: z23.string().optional(),
2914
3055
  // Required
2915
- prompt: z22.string().min(1, "Prompt is required"),
3056
+ prompt: z23.string().min(1, "Prompt is required"),
2916
3057
  // Optional configuration
2917
- variables: z22.record(z22.string(), z22.string()).optional(),
2918
- secrets: z22.record(z22.string(), z22.string()).optional(),
2919
- 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(),
2920
3061
  // Artifact name to mount
2921
- artifactVersion: z22.string().optional(),
3062
+ artifactVersion: z23.string().optional(),
2922
3063
  // Artifact version (defaults to latest)
2923
- volumes: z22.record(z22.string(), z22.string()).optional()
3064
+ volumes: z23.record(z23.string(), z23.string()).optional()
2924
3065
  // volume_name -> version
2925
3066
  });
2926
3067
  var runListQuerySchema = listQuerySchema.extend({
2927
3068
  status: publicRunStatusSchema.optional()
2928
3069
  });
2929
- var publicRunsListContract = c18.router({
3070
+ var publicRunsListContract = c19.router({
2930
3071
  list: {
2931
3072
  method: "GET",
2932
3073
  path: "/v1/runs",
@@ -2958,13 +3099,13 @@ var publicRunsListContract = c18.router({
2958
3099
  description: "Create and execute a new agent run. Returns 202 Accepted as runs execute asynchronously."
2959
3100
  }
2960
3101
  });
2961
- var publicRunByIdContract = c18.router({
3102
+ var publicRunByIdContract = c19.router({
2962
3103
  get: {
2963
3104
  method: "GET",
2964
3105
  path: "/v1/runs/:id",
2965
3106
  headers: authHeadersSchema,
2966
- pathParams: z22.object({
2967
- id: z22.string().min(1, "Run ID is required")
3107
+ pathParams: z23.object({
3108
+ id: z23.string().min(1, "Run ID is required")
2968
3109
  }),
2969
3110
  responses: {
2970
3111
  200: publicRunDetailSchema,
@@ -2976,15 +3117,15 @@ var publicRunByIdContract = c18.router({
2976
3117
  description: "Get run details by ID"
2977
3118
  }
2978
3119
  });
2979
- var publicRunCancelContract = c18.router({
3120
+ var publicRunCancelContract = c19.router({
2980
3121
  cancel: {
2981
3122
  method: "POST",
2982
3123
  path: "/v1/runs/:id/cancel",
2983
3124
  headers: authHeadersSchema,
2984
- pathParams: z22.object({
2985
- id: z22.string().min(1, "Run ID is required")
3125
+ pathParams: z23.object({
3126
+ id: z23.string().min(1, "Run ID is required")
2986
3127
  }),
2987
- body: z22.undefined(),
3128
+ body: z23.undefined(),
2988
3129
  responses: {
2989
3130
  200: publicRunDetailSchema,
2990
3131
  400: publicApiErrorSchema,
@@ -2997,27 +3138,27 @@ var publicRunCancelContract = c18.router({
2997
3138
  description: "Cancel a pending or running execution"
2998
3139
  }
2999
3140
  });
3000
- var logEntrySchema = z22.object({
3141
+ var logEntrySchema = z23.object({
3001
3142
  timestamp: timestampSchema,
3002
- type: z22.enum(["agent", "system", "network"]),
3003
- level: z22.enum(["debug", "info", "warn", "error"]),
3004
- message: z22.string(),
3005
- 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()
3006
3147
  });
3007
3148
  var paginatedLogsSchema = createPaginatedResponseSchema(logEntrySchema);
3008
3149
  var logsQuerySchema = listQuerySchema.extend({
3009
- type: z22.enum(["agent", "system", "network", "all"]).default("all"),
3150
+ type: z23.enum(["agent", "system", "network", "all"]).default("all"),
3010
3151
  since: timestampSchema.optional(),
3011
3152
  until: timestampSchema.optional(),
3012
- order: z22.enum(["asc", "desc"]).default("asc")
3153
+ order: z23.enum(["asc", "desc"]).default("asc")
3013
3154
  });
3014
- var publicRunLogsContract = c18.router({
3155
+ var publicRunLogsContract = c19.router({
3015
3156
  getLogs: {
3016
3157
  method: "GET",
3017
3158
  path: "/v1/runs/:id/logs",
3018
3159
  headers: authHeadersSchema,
3019
- pathParams: z22.object({
3020
- id: z22.string().min(1, "Run ID is required")
3160
+ pathParams: z23.object({
3161
+ id: z23.string().min(1, "Run ID is required")
3021
3162
  }),
3022
3163
  query: logsQuerySchema,
3023
3164
  responses: {
@@ -3030,30 +3171,30 @@ var publicRunLogsContract = c18.router({
3030
3171
  description: "Get unified logs for a run. Combines agent, system, and network logs."
3031
3172
  }
3032
3173
  });
3033
- var metricPointSchema = z22.object({
3174
+ var metricPointSchema = z23.object({
3034
3175
  timestamp: timestampSchema,
3035
- cpuPercent: z22.number(),
3036
- memoryUsedMb: z22.number(),
3037
- memoryTotalMb: z22.number(),
3038
- diskUsedMb: z22.number(),
3039
- diskTotalMb: z22.number()
3040
- });
3041
- var metricsSummarySchema = z22.object({
3042
- avgCpuPercent: z22.number(),
3043
- maxMemoryUsedMb: z22.number(),
3044
- totalDurationMs: z22.number().nullable()
3045
- });
3046
- var metricsResponseSchema2 = z22.object({
3047
- 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),
3048
3189
  summary: metricsSummarySchema
3049
3190
  });
3050
- var publicRunMetricsContract = c18.router({
3191
+ var publicRunMetricsContract = c19.router({
3051
3192
  getMetrics: {
3052
3193
  method: "GET",
3053
3194
  path: "/v1/runs/:id/metrics",
3054
3195
  headers: authHeadersSchema,
3055
- pathParams: z22.object({
3056
- id: z22.string().min(1, "Run ID is required")
3196
+ pathParams: z23.object({
3197
+ id: z23.string().min(1, "Run ID is required")
3057
3198
  }),
3058
3199
  responses: {
3059
3200
  200: metricsResponseSchema2,
@@ -3065,7 +3206,7 @@ var publicRunMetricsContract = c18.router({
3065
3206
  description: "Get CPU, memory, and disk metrics for a run"
3066
3207
  }
3067
3208
  });
3068
- var sseEventTypeSchema = z22.enum([
3209
+ var sseEventTypeSchema = z23.enum([
3069
3210
  "status",
3070
3211
  // Run status change
3071
3212
  "output",
@@ -3077,26 +3218,26 @@ var sseEventTypeSchema = z22.enum([
3077
3218
  "heartbeat"
3078
3219
  // Keep-alive
3079
3220
  ]);
3080
- var sseEventSchema = z22.object({
3221
+ var sseEventSchema = z23.object({
3081
3222
  event: sseEventTypeSchema,
3082
- data: z22.unknown(),
3083
- id: z22.string().optional()
3223
+ data: z23.unknown(),
3224
+ id: z23.string().optional()
3084
3225
  // For Last-Event-ID reconnection
3085
3226
  });
3086
- var publicRunEventsContract = c18.router({
3227
+ var publicRunEventsContract = c19.router({
3087
3228
  streamEvents: {
3088
3229
  method: "GET",
3089
3230
  path: "/v1/runs/:id/events",
3090
3231
  headers: authHeadersSchema,
3091
- pathParams: z22.object({
3092
- id: z22.string().min(1, "Run ID is required")
3232
+ pathParams: z23.object({
3233
+ id: z23.string().min(1, "Run ID is required")
3093
3234
  }),
3094
- query: z22.object({
3095
- lastEventId: z22.string().optional()
3235
+ query: z23.object({
3236
+ lastEventId: z23.string().optional()
3096
3237
  // For reconnection
3097
3238
  }),
3098
3239
  responses: {
3099
- 200: z22.any(),
3240
+ 200: z23.any(),
3100
3241
  // SSE stream - actual content is text/event-stream
3101
3242
  401: publicApiErrorSchema,
3102
3243
  404: publicApiErrorSchema,
@@ -3108,28 +3249,28 @@ var publicRunEventsContract = c18.router({
3108
3249
  });
3109
3250
 
3110
3251
  // ../../packages/core/src/contracts/public/artifacts.ts
3111
- import { z as z23 } from "zod";
3112
- var c19 = initContract();
3113
- var publicArtifactSchema = z23.object({
3114
- id: z23.string(),
3115
- name: z23.string(),
3116
- currentVersionId: z23.string().nullable(),
3117
- 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(),
3118
3259
  // Total size in bytes
3119
- fileCount: z23.number(),
3260
+ fileCount: z24.number(),
3120
3261
  createdAt: timestampSchema,
3121
3262
  updatedAt: timestampSchema
3122
3263
  });
3123
- var artifactVersionSchema = z23.object({
3124
- id: z23.string(),
3264
+ var artifactVersionSchema = z24.object({
3265
+ id: z24.string(),
3125
3266
  // SHA-256 content hash
3126
- artifactId: z23.string(),
3127
- size: z23.number(),
3267
+ artifactId: z24.string(),
3268
+ size: z24.number(),
3128
3269
  // Size in bytes
3129
- fileCount: z23.number(),
3130
- message: z23.string().nullable(),
3270
+ fileCount: z24.number(),
3271
+ message: z24.string().nullable(),
3131
3272
  // Optional commit message
3132
- createdBy: z23.string(),
3273
+ createdBy: z24.string(),
3133
3274
  createdAt: timestampSchema
3134
3275
  });
3135
3276
  var publicArtifactDetailSchema = publicArtifactSchema.extend({
@@ -3139,7 +3280,7 @@ var paginatedArtifactsSchema = createPaginatedResponseSchema(publicArtifactSchem
3139
3280
  var paginatedArtifactVersionsSchema = createPaginatedResponseSchema(
3140
3281
  artifactVersionSchema
3141
3282
  );
3142
- var publicArtifactsListContract = c19.router({
3283
+ var publicArtifactsListContract = c20.router({
3143
3284
  list: {
3144
3285
  method: "GET",
3145
3286
  path: "/v1/artifacts",
@@ -3154,13 +3295,13 @@ var publicArtifactsListContract = c19.router({
3154
3295
  description: "List all artifacts in the current scope with pagination"
3155
3296
  }
3156
3297
  });
3157
- var publicArtifactByIdContract = c19.router({
3298
+ var publicArtifactByIdContract = c20.router({
3158
3299
  get: {
3159
3300
  method: "GET",
3160
3301
  path: "/v1/artifacts/:id",
3161
3302
  headers: authHeadersSchema,
3162
- pathParams: z23.object({
3163
- id: z23.string().min(1, "Artifact ID is required")
3303
+ pathParams: z24.object({
3304
+ id: z24.string().min(1, "Artifact ID is required")
3164
3305
  }),
3165
3306
  responses: {
3166
3307
  200: publicArtifactDetailSchema,
@@ -3172,13 +3313,13 @@ var publicArtifactByIdContract = c19.router({
3172
3313
  description: "Get artifact details by ID"
3173
3314
  }
3174
3315
  });
3175
- var publicArtifactVersionsContract = c19.router({
3316
+ var publicArtifactVersionsContract = c20.router({
3176
3317
  list: {
3177
3318
  method: "GET",
3178
3319
  path: "/v1/artifacts/:id/versions",
3179
3320
  headers: authHeadersSchema,
3180
- pathParams: z23.object({
3181
- id: z23.string().min(1, "Artifact ID is required")
3321
+ pathParams: z24.object({
3322
+ id: z24.string().min(1, "Artifact ID is required")
3182
3323
  }),
3183
3324
  query: listQuerySchema,
3184
3325
  responses: {
@@ -3191,20 +3332,20 @@ var publicArtifactVersionsContract = c19.router({
3191
3332
  description: "List all versions of an artifact with pagination"
3192
3333
  }
3193
3334
  });
3194
- var publicArtifactDownloadContract = c19.router({
3335
+ var publicArtifactDownloadContract = c20.router({
3195
3336
  download: {
3196
3337
  method: "GET",
3197
3338
  path: "/v1/artifacts/:id/download",
3198
3339
  headers: authHeadersSchema,
3199
- pathParams: z23.object({
3200
- id: z23.string().min(1, "Artifact ID is required")
3340
+ pathParams: z24.object({
3341
+ id: z24.string().min(1, "Artifact ID is required")
3201
3342
  }),
3202
- query: z23.object({
3203
- versionId: z23.string().optional()
3343
+ query: z24.object({
3344
+ versionId: z24.string().optional()
3204
3345
  // Defaults to current version
3205
3346
  }),
3206
3347
  responses: {
3207
- 302: z23.undefined(),
3348
+ 302: z24.undefined(),
3208
3349
  // Redirect to presigned URL
3209
3350
  401: publicApiErrorSchema,
3210
3351
  404: publicApiErrorSchema,
@@ -3216,28 +3357,28 @@ var publicArtifactDownloadContract = c19.router({
3216
3357
  });
3217
3358
 
3218
3359
  // ../../packages/core/src/contracts/public/volumes.ts
3219
- import { z as z24 } from "zod";
3220
- var c20 = initContract();
3221
- var publicVolumeSchema = z24.object({
3222
- id: z24.string(),
3223
- name: z24.string(),
3224
- currentVersionId: z24.string().nullable(),
3225
- 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(),
3226
3367
  // Total size in bytes
3227
- fileCount: z24.number(),
3368
+ fileCount: z25.number(),
3228
3369
  createdAt: timestampSchema,
3229
3370
  updatedAt: timestampSchema
3230
3371
  });
3231
- var volumeVersionSchema = z24.object({
3232
- id: z24.string(),
3372
+ var volumeVersionSchema = z25.object({
3373
+ id: z25.string(),
3233
3374
  // SHA-256 content hash
3234
- volumeId: z24.string(),
3235
- size: z24.number(),
3375
+ volumeId: z25.string(),
3376
+ size: z25.number(),
3236
3377
  // Size in bytes
3237
- fileCount: z24.number(),
3238
- message: z24.string().nullable(),
3378
+ fileCount: z25.number(),
3379
+ message: z25.string().nullable(),
3239
3380
  // Optional commit message
3240
- createdBy: z24.string(),
3381
+ createdBy: z25.string(),
3241
3382
  createdAt: timestampSchema
3242
3383
  });
3243
3384
  var publicVolumeDetailSchema = publicVolumeSchema.extend({
@@ -3245,7 +3386,7 @@ var publicVolumeDetailSchema = publicVolumeSchema.extend({
3245
3386
  });
3246
3387
  var paginatedVolumesSchema = createPaginatedResponseSchema(publicVolumeSchema);
3247
3388
  var paginatedVolumeVersionsSchema = createPaginatedResponseSchema(volumeVersionSchema);
3248
- var publicVolumesListContract = c20.router({
3389
+ var publicVolumesListContract = c21.router({
3249
3390
  list: {
3250
3391
  method: "GET",
3251
3392
  path: "/v1/volumes",
@@ -3260,13 +3401,13 @@ var publicVolumesListContract = c20.router({
3260
3401
  description: "List all volumes in the current scope with pagination"
3261
3402
  }
3262
3403
  });
3263
- var publicVolumeByIdContract = c20.router({
3404
+ var publicVolumeByIdContract = c21.router({
3264
3405
  get: {
3265
3406
  method: "GET",
3266
3407
  path: "/v1/volumes/:id",
3267
3408
  headers: authHeadersSchema,
3268
- pathParams: z24.object({
3269
- id: z24.string().min(1, "Volume ID is required")
3409
+ pathParams: z25.object({
3410
+ id: z25.string().min(1, "Volume ID is required")
3270
3411
  }),
3271
3412
  responses: {
3272
3413
  200: publicVolumeDetailSchema,
@@ -3278,13 +3419,13 @@ var publicVolumeByIdContract = c20.router({
3278
3419
  description: "Get volume details by ID"
3279
3420
  }
3280
3421
  });
3281
- var publicVolumeVersionsContract = c20.router({
3422
+ var publicVolumeVersionsContract = c21.router({
3282
3423
  list: {
3283
3424
  method: "GET",
3284
3425
  path: "/v1/volumes/:id/versions",
3285
3426
  headers: authHeadersSchema,
3286
- pathParams: z24.object({
3287
- id: z24.string().min(1, "Volume ID is required")
3427
+ pathParams: z25.object({
3428
+ id: z25.string().min(1, "Volume ID is required")
3288
3429
  }),
3289
3430
  query: listQuerySchema,
3290
3431
  responses: {
@@ -3297,20 +3438,20 @@ var publicVolumeVersionsContract = c20.router({
3297
3438
  description: "List all versions of a volume with pagination"
3298
3439
  }
3299
3440
  });
3300
- var publicVolumeDownloadContract = c20.router({
3441
+ var publicVolumeDownloadContract = c21.router({
3301
3442
  download: {
3302
3443
  method: "GET",
3303
3444
  path: "/v1/volumes/:id/download",
3304
3445
  headers: authHeadersSchema,
3305
- pathParams: z24.object({
3306
- id: z24.string().min(1, "Volume ID is required")
3446
+ pathParams: z25.object({
3447
+ id: z25.string().min(1, "Volume ID is required")
3307
3448
  }),
3308
- query: z24.object({
3309
- versionId: z24.string().optional()
3449
+ query: z25.object({
3450
+ versionId: z25.string().optional()
3310
3451
  // Defaults to current version
3311
3452
  }),
3312
3453
  responses: {
3313
- 302: z24.undefined(),
3454
+ 302: z25.undefined(),
3314
3455
  // Redirect to presigned URL
3315
3456
  401: publicApiErrorSchema,
3316
3457
  404: publicApiErrorSchema,
@@ -3931,8 +4072,8 @@ async function getUsage(options) {
3931
4072
  }
3932
4073
 
3933
4074
  // src/lib/domain/yaml-validator.ts
3934
- import { z as z25 } from "zod";
3935
- 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(
3936
4077
  /^[a-zA-Z0-9]([a-zA-Z0-9-]{0,62}[a-zA-Z0-9])?$/,
3937
4078
  "Agent name must start and end with letter or number, and contain only letters, numbers, and hyphens"
3938
4079
  );
@@ -3947,7 +4088,7 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
3947
4088
  const skillUrl = agent.skills[i];
3948
4089
  if (skillUrl && !validateGitHubTreeUrl(skillUrl)) {
3949
4090
  ctx.addIssue({
3950
- code: z25.ZodIssueCode.custom,
4091
+ code: z26.ZodIssueCode.custom,
3951
4092
  message: `Invalid skill URL: ${skillUrl}. Expected format: https://github.com/{owner}/{repo}/tree/{branch}/{path}`,
3952
4093
  path: ["skills", i]
3953
4094
  });
@@ -3956,15 +4097,15 @@ var cliAgentDefinitionSchema = agentDefinitionSchema.superRefine(
3956
4097
  }
3957
4098
  }
3958
4099
  );
3959
- var cliComposeSchema = z25.object({
3960
- version: z25.string().min(1, "Missing config.version"),
3961
- agents: z25.record(cliAgentNameSchema, cliAgentDefinitionSchema),
3962
- 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()
3963
4104
  }).superRefine((config, ctx) => {
3964
4105
  const agentKeys = Object.keys(config.agents);
3965
4106
  if (agentKeys.length === 0) {
3966
4107
  ctx.addIssue({
3967
- code: z25.ZodIssueCode.custom,
4108
+ code: z26.ZodIssueCode.custom,
3968
4109
  message: "agents must have at least one agent defined",
3969
4110
  path: ["agents"]
3970
4111
  });
@@ -3972,7 +4113,7 @@ var cliComposeSchema = z25.object({
3972
4113
  }
3973
4114
  if (agentKeys.length > 1) {
3974
4115
  ctx.addIssue({
3975
- code: z25.ZodIssueCode.custom,
4116
+ code: z26.ZodIssueCode.custom,
3976
4117
  message: "Multiple agents not supported yet. Only one agent allowed.",
3977
4118
  path: ["agents"]
3978
4119
  });
@@ -3984,7 +4125,7 @@ var cliComposeSchema = z25.object({
3984
4125
  if (agentVolumes && agentVolumes.length > 0) {
3985
4126
  if (!config.volumes) {
3986
4127
  ctx.addIssue({
3987
- code: z25.ZodIssueCode.custom,
4128
+ code: z26.ZodIssueCode.custom,
3988
4129
  message: "Agent references volumes but no volumes section defined. Each volume must have explicit name and version.",
3989
4130
  path: ["volumes"]
3990
4131
  });
@@ -3994,7 +4135,7 @@ var cliComposeSchema = z25.object({
3994
4135
  const parts = volDeclaration.split(":");
3995
4136
  if (parts.length !== 2) {
3996
4137
  ctx.addIssue({
3997
- code: z25.ZodIssueCode.custom,
4138
+ code: z26.ZodIssueCode.custom,
3998
4139
  message: `Invalid volume declaration: ${volDeclaration}. Expected format: volume-key:/mount/path`,
3999
4140
  path: ["agents", agentName, "volumes"]
4000
4141
  });
@@ -4003,7 +4144,7 @@ var cliComposeSchema = z25.object({
4003
4144
  const volumeKey = parts[0].trim();
4004
4145
  if (!config.volumes[volumeKey]) {
4005
4146
  ctx.addIssue({
4006
- code: z25.ZodIssueCode.custom,
4147
+ code: z26.ZodIssueCode.custom,
4007
4148
  message: `Volume "${volumeKey}" is not defined in volumes section. Each volume must have explicit name and version.`,
4008
4149
  path: ["volumes", volumeKey]
4009
4150
  });
@@ -4819,6 +4960,7 @@ async function silentUpgradeAfterCommand(currentVersion) {
4819
4960
  }
4820
4961
 
4821
4962
  // src/commands/compose/index.ts
4963
+ var DEFAULT_CONFIG_FILE = "vm0.yaml";
4822
4964
  function getSecretsFromComposeContent(content) {
4823
4965
  const refs = extractVariableReferences(content);
4824
4966
  const grouped = groupVariablesBySource(refs);
@@ -5001,10 +5143,14 @@ function mergeSkillVariables(agent, variables) {
5001
5143
  agent.environment = environment;
5002
5144
  }
5003
5145
  }
5004
- 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(
5005
5150
  async (configFile, options) => {
5151
+ const resolvedConfigFile = configFile ?? DEFAULT_CONFIG_FILE;
5006
5152
  try {
5007
- const { config, agentName, agent, basePath } = await loadAndValidateConfig(configFile);
5153
+ const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
5008
5154
  checkLegacyImageFormat(config);
5009
5155
  const skillResults = await uploadAssets(agentName, agent, basePath);
5010
5156
  const environment = agent.environment || {};
@@ -5037,7 +5183,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
5037
5183
  )
5038
5184
  );
5039
5185
  if (options.autoUpdate !== false) {
5040
- await silentUpgradeAfterCommand("9.15.2");
5186
+ await silentUpgradeAfterCommand("9.17.0");
5041
5187
  }
5042
5188
  } catch (error) {
5043
5189
  if (error instanceof Error) {
@@ -5792,9 +5938,9 @@ var CodexEventParser = class {
5792
5938
  }
5793
5939
  }
5794
5940
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
5795
- const changes = item.changes.map((c21) => {
5796
- const action = c21.kind === "add" ? "Created" : c21.kind === "modify" ? "Modified" : "Deleted";
5797
- 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}`;
5798
5944
  }).join("\n");
5799
5945
  return {
5800
5946
  type: "text",
@@ -5948,9 +6094,9 @@ var CodexEventRenderer = class {
5948
6094
  return;
5949
6095
  }
5950
6096
  if (itemType === "file_change" && item.changes && item.changes.length > 0) {
5951
- const summary = item.changes.map((c21) => {
5952
- const icon = c21.kind === "add" ? "+" : c21.kind === "delete" ? "-" : "~";
5953
- 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}`;
5954
6100
  }).join(", ");
5955
6101
  console.log(chalk7.green("[files]") + ` ${summary}`);
5956
6102
  return;
@@ -7268,7 +7414,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
7268
7414
  }
7269
7415
  showNextSteps(result);
7270
7416
  if (options.autoUpdate !== false) {
7271
- await silentUpgradeAfterCommand("9.15.2");
7417
+ await silentUpgradeAfterCommand("9.17.0");
7272
7418
  }
7273
7419
  } catch (error) {
7274
7420
  handleRunError(error, identifier);
@@ -8774,7 +8920,7 @@ var cookAction = new Command27().name("cook").description("Quick start: prepare,
8774
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(
8775
8921
  async (prompt, options) => {
8776
8922
  if (options.autoUpdate !== false) {
8777
- const shouldExit = await checkAndUpgrade("9.15.2", prompt);
8923
+ const shouldExit = await checkAndUpgrade("9.17.0", prompt);
8778
8924
  if (shouldExit) {
8779
8925
  process.exit(0);
8780
8926
  }
@@ -9488,7 +9634,7 @@ var listCommand4 = new Command36().name("list").alias("ls").description("List al
9488
9634
  );
9489
9635
  return;
9490
9636
  }
9491
- 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));
9492
9638
  const header = ["NAME".padEnd(nameWidth), "VERSION", "UPDATED"].join(
9493
9639
  " "
9494
9640
  );
@@ -10270,7 +10416,7 @@ async function gatherFrequency(optionFrequency, existingFrequency) {
10270
10416
  );
10271
10417
  process.exit(1);
10272
10418
  }
10273
- const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c21) => c21.value === existingFrequency) : 0;
10419
+ const defaultIndex = existingFrequency ? FREQUENCY_CHOICES.findIndex((c22) => c22.value === existingFrequency) : 0;
10274
10420
  frequency = await promptSelect(
10275
10421
  "Schedule frequency",
10276
10422
  FREQUENCY_CHOICES,
@@ -10299,7 +10445,7 @@ async function gatherDay(frequency, optionDay, existingDay) {
10299
10445
  process.exit(1);
10300
10446
  }
10301
10447
  if (frequency === "weekly") {
10302
- 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;
10303
10449
  const day2 = await promptSelect(
10304
10450
  "Day of week",
10305
10451
  DAY_OF_WEEK_CHOICES,
@@ -12155,7 +12301,8 @@ var ONBOARD_PROVIDER_TYPES = [
12155
12301
  "anthropic-api-key",
12156
12302
  "openrouter-api-key",
12157
12303
  "moonshot-api-key",
12158
- "minimax-api-key"
12304
+ "minimax-api-key",
12305
+ "deepseek-api-key"
12159
12306
  ];
12160
12307
  async function checkModelProviderStatus() {
12161
12308
  const response = await listModelProviders();
@@ -12357,16 +12504,16 @@ async function handleModelProvider(ctx) {
12357
12504
  const providerType = await step.prompt(
12358
12505
  () => promptSelect(
12359
12506
  "Select provider type:",
12360
- choices.map((c21) => ({
12361
- title: c21.label,
12362
- value: c21.type
12507
+ choices.map((c22) => ({
12508
+ title: c22.label,
12509
+ value: c22.type
12363
12510
  }))
12364
12511
  )
12365
12512
  );
12366
12513
  if (!providerType) {
12367
12514
  process.exit(0);
12368
12515
  }
12369
- const selectedChoice = choices.find((c21) => c21.type === providerType);
12516
+ const selectedChoice = choices.find((c22) => c22.type === providerType);
12370
12517
  if (selectedChoice?.helpText) {
12371
12518
  for (const line of selectedChoice.helpText.split("\n")) {
12372
12519
  step.detail(chalk58.dim(line));
@@ -12556,7 +12703,7 @@ var setupClaudeCommand = new Command58().name("setup-claude").description("Insta
12556
12703
 
12557
12704
  // src/index.ts
12558
12705
  var program = new Command59();
12559
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.15.2");
12706
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.17.0");
12560
12707
  program.addCommand(authCommand);
12561
12708
  program.addCommand(infoCommand);
12562
12709
  program.addCommand(composeCommand);