@herdctl/core 1.3.0 → 2.0.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 (181) hide show
  1. package/dist/config/__tests__/agent.test.js +12 -12
  2. package/dist/config/__tests__/agent.test.js.map +1 -1
  3. package/dist/config/__tests__/loader.test.js +201 -4
  4. package/dist/config/__tests__/loader.test.js.map +1 -1
  5. package/dist/config/__tests__/merge.test.js +29 -4
  6. package/dist/config/__tests__/merge.test.js.map +1 -1
  7. package/dist/config/__tests__/parser.test.js +13 -13
  8. package/dist/config/__tests__/parser.test.js.map +1 -1
  9. package/dist/config/__tests__/schema.test.js +10 -10
  10. package/dist/config/__tests__/schema.test.js.map +1 -1
  11. package/dist/config/index.d.ts +1 -1
  12. package/dist/config/index.d.ts.map +1 -1
  13. package/dist/config/index.js +2 -2
  14. package/dist/config/index.js.map +1 -1
  15. package/dist/config/loader.d.ts.map +1 -1
  16. package/dist/config/loader.js +71 -0
  17. package/dist/config/loader.js.map +1 -1
  18. package/dist/config/merge.d.ts +4 -1
  19. package/dist/config/merge.d.ts.map +1 -1
  20. package/dist/config/merge.js +16 -0
  21. package/dist/config/merge.js.map +1 -1
  22. package/dist/config/schema.d.ts +906 -89
  23. package/dist/config/schema.d.ts.map +1 -1
  24. package/dist/config/schema.js +109 -7
  25. package/dist/config/schema.js.map +1 -1
  26. package/dist/fleet-manager/__tests__/coverage.test.js +25 -24
  27. package/dist/fleet-manager/__tests__/coverage.test.js.map +1 -1
  28. package/dist/fleet-manager/__tests__/discord-manager.test.js +9 -2
  29. package/dist/fleet-manager/__tests__/discord-manager.test.js.map +1 -1
  30. package/dist/fleet-manager/__tests__/integration.test.js +27 -0
  31. package/dist/fleet-manager/__tests__/integration.test.js.map +1 -1
  32. package/dist/fleet-manager/__tests__/job-control.test.js +66 -0
  33. package/dist/fleet-manager/__tests__/job-control.test.js.map +1 -1
  34. package/dist/fleet-manager/__tests__/status-queries.test.js +12 -11
  35. package/dist/fleet-manager/__tests__/status-queries.test.js.map +1 -1
  36. package/dist/fleet-manager/config-reload.js +9 -9
  37. package/dist/fleet-manager/config-reload.js.map +1 -1
  38. package/dist/fleet-manager/discord-manager.d.ts.map +1 -1
  39. package/dist/fleet-manager/discord-manager.js +27 -4
  40. package/dist/fleet-manager/discord-manager.js.map +1 -1
  41. package/dist/fleet-manager/fleet-manager.d.ts +11 -0
  42. package/dist/fleet-manager/fleet-manager.d.ts.map +1 -1
  43. package/dist/fleet-manager/fleet-manager.js +27 -0
  44. package/dist/fleet-manager/fleet-manager.js.map +1 -1
  45. package/dist/fleet-manager/job-control.d.ts +1 -1
  46. package/dist/fleet-manager/job-control.d.ts.map +1 -1
  47. package/dist/fleet-manager/job-control.js +36 -14
  48. package/dist/fleet-manager/job-control.js.map +1 -1
  49. package/dist/fleet-manager/schedule-executor.d.ts +1 -1
  50. package/dist/fleet-manager/schedule-executor.d.ts.map +1 -1
  51. package/dist/fleet-manager/schedule-executor.js +11 -14
  52. package/dist/fleet-manager/schedule-executor.js.map +1 -1
  53. package/dist/fleet-manager/status-queries.js +7 -7
  54. package/dist/fleet-manager/status-queries.js.map +1 -1
  55. package/dist/fleet-manager/types.d.ts +10 -2
  56. package/dist/fleet-manager/types.d.ts.map +1 -1
  57. package/dist/fleet-manager/working-directory-helper.d.ts +29 -0
  58. package/dist/fleet-manager/working-directory-helper.d.ts.map +1 -0
  59. package/dist/fleet-manager/working-directory-helper.js +36 -0
  60. package/dist/fleet-manager/working-directory-helper.js.map +1 -0
  61. package/dist/index.d.ts +2 -1
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +4 -1
  64. package/dist/index.js.map +1 -1
  65. package/dist/runner/__tests__/job-executor.test.js +449 -118
  66. package/dist/runner/__tests__/job-executor.test.js.map +1 -1
  67. package/dist/runner/__tests__/sdk-adapter.test.js +147 -23
  68. package/dist/runner/__tests__/sdk-adapter.test.js.map +1 -1
  69. package/dist/runner/index.d.ts +2 -0
  70. package/dist/runner/index.d.ts.map +1 -1
  71. package/dist/runner/index.js +1 -0
  72. package/dist/runner/index.js.map +1 -1
  73. package/dist/runner/job-executor.d.ts +12 -8
  74. package/dist/runner/job-executor.d.ts.map +1 -1
  75. package/dist/runner/job-executor.js +257 -126
  76. package/dist/runner/job-executor.js.map +1 -1
  77. package/dist/runner/runtime/__tests__/cli-session-path.test.d.ts +2 -0
  78. package/dist/runner/runtime/__tests__/cli-session-path.test.d.ts.map +1 -0
  79. package/dist/runner/runtime/__tests__/cli-session-path.test.js +150 -0
  80. package/dist/runner/runtime/__tests__/cli-session-path.test.js.map +1 -0
  81. package/dist/runner/runtime/__tests__/docker-config.test.d.ts +2 -0
  82. package/dist/runner/runtime/__tests__/docker-config.test.d.ts.map +1 -0
  83. package/dist/runner/runtime/__tests__/docker-config.test.js +352 -0
  84. package/dist/runner/runtime/__tests__/docker-config.test.js.map +1 -0
  85. package/dist/runner/runtime/__tests__/docker-security.test.d.ts +2 -0
  86. package/dist/runner/runtime/__tests__/docker-security.test.d.ts.map +1 -0
  87. package/dist/runner/runtime/__tests__/docker-security.test.js +384 -0
  88. package/dist/runner/runtime/__tests__/docker-security.test.js.map +1 -0
  89. package/dist/runner/runtime/__tests__/factory.test.d.ts +2 -0
  90. package/dist/runner/runtime/__tests__/factory.test.d.ts.map +1 -0
  91. package/dist/runner/runtime/__tests__/factory.test.js +149 -0
  92. package/dist/runner/runtime/__tests__/factory.test.js.map +1 -0
  93. package/dist/runner/runtime/__tests__/integration.test.d.ts +2 -0
  94. package/dist/runner/runtime/__tests__/integration.test.d.ts.map +1 -0
  95. package/dist/runner/runtime/__tests__/integration.test.js +274 -0
  96. package/dist/runner/runtime/__tests__/integration.test.js.map +1 -0
  97. package/dist/runner/runtime/cli-runtime.d.ts +107 -0
  98. package/dist/runner/runtime/cli-runtime.d.ts.map +1 -0
  99. package/dist/runner/runtime/cli-runtime.js +335 -0
  100. package/dist/runner/runtime/cli-runtime.js.map +1 -0
  101. package/dist/runner/runtime/cli-session-path.d.ts +108 -0
  102. package/dist/runner/runtime/cli-session-path.d.ts.map +1 -0
  103. package/dist/runner/runtime/cli-session-path.js +173 -0
  104. package/dist/runner/runtime/cli-session-path.js.map +1 -0
  105. package/dist/runner/runtime/cli-session-watcher.d.ts +55 -0
  106. package/dist/runner/runtime/cli-session-watcher.d.ts.map +1 -0
  107. package/dist/runner/runtime/cli-session-watcher.js +187 -0
  108. package/dist/runner/runtime/cli-session-watcher.js.map +1 -0
  109. package/dist/runner/runtime/container-manager.d.ts +76 -0
  110. package/dist/runner/runtime/container-manager.d.ts.map +1 -0
  111. package/dist/runner/runtime/container-manager.js +229 -0
  112. package/dist/runner/runtime/container-manager.js.map +1 -0
  113. package/dist/runner/runtime/container-runner.d.ts +62 -0
  114. package/dist/runner/runtime/container-runner.d.ts.map +1 -0
  115. package/dist/runner/runtime/container-runner.js +235 -0
  116. package/dist/runner/runtime/container-runner.js.map +1 -0
  117. package/dist/runner/runtime/docker-config.d.ts +100 -0
  118. package/dist/runner/runtime/docker-config.d.ts.map +1 -0
  119. package/dist/runner/runtime/docker-config.js +98 -0
  120. package/dist/runner/runtime/docker-config.js.map +1 -0
  121. package/dist/runner/runtime/factory.d.ts +63 -0
  122. package/dist/runner/runtime/factory.d.ts.map +1 -0
  123. package/dist/runner/runtime/factory.js +68 -0
  124. package/dist/runner/runtime/factory.js.map +1 -0
  125. package/dist/runner/runtime/index.d.ts +20 -0
  126. package/dist/runner/runtime/index.d.ts.map +1 -0
  127. package/dist/runner/runtime/index.js +21 -0
  128. package/dist/runner/runtime/index.js.map +1 -0
  129. package/dist/runner/runtime/interface.d.ts +59 -0
  130. package/dist/runner/runtime/interface.d.ts.map +1 -0
  131. package/dist/runner/runtime/interface.js +12 -0
  132. package/dist/runner/runtime/interface.js.map +1 -0
  133. package/dist/runner/runtime/sdk-runtime.d.ts +46 -0
  134. package/dist/runner/runtime/sdk-runtime.d.ts.map +1 -0
  135. package/dist/runner/runtime/sdk-runtime.js +63 -0
  136. package/dist/runner/runtime/sdk-runtime.js.map +1 -0
  137. package/dist/runner/sdk-adapter.d.ts +4 -0
  138. package/dist/runner/sdk-adapter.d.ts.map +1 -1
  139. package/dist/runner/sdk-adapter.js +35 -16
  140. package/dist/runner/sdk-adapter.js.map +1 -1
  141. package/dist/runner/types.d.ts +12 -6
  142. package/dist/runner/types.d.ts.map +1 -1
  143. package/dist/scheduler/__tests__/schedule-runner.test.js +61 -50
  144. package/dist/scheduler/__tests__/schedule-runner.test.js.map +1 -1
  145. package/dist/scheduler/schedule-runner.d.ts +1 -4
  146. package/dist/scheduler/schedule-runner.d.ts.map +1 -1
  147. package/dist/scheduler/schedule-runner.js +40 -8
  148. package/dist/scheduler/schedule-runner.js.map +1 -1
  149. package/dist/state/__tests__/session-schema.test.js +4 -0
  150. package/dist/state/__tests__/session-schema.test.js.map +1 -1
  151. package/dist/state/__tests__/session-validation.test.d.ts +2 -0
  152. package/dist/state/__tests__/session-validation.test.d.ts.map +1 -0
  153. package/dist/state/__tests__/session-validation.test.js +446 -0
  154. package/dist/state/__tests__/session-validation.test.js.map +1 -0
  155. package/dist/state/__tests__/session.test.js +68 -0
  156. package/dist/state/__tests__/session.test.js.map +1 -1
  157. package/dist/state/__tests__/working-directory-validation.test.d.ts +5 -0
  158. package/dist/state/__tests__/working-directory-validation.test.d.ts.map +1 -0
  159. package/dist/state/__tests__/working-directory-validation.test.js +101 -0
  160. package/dist/state/__tests__/working-directory-validation.test.js.map +1 -0
  161. package/dist/state/index.d.ts +2 -0
  162. package/dist/state/index.d.ts.map +1 -1
  163. package/dist/state/index.js +4 -0
  164. package/dist/state/index.js.map +1 -1
  165. package/dist/state/schemas/session-info.d.ts +32 -0
  166. package/dist/state/schemas/session-info.d.ts.map +1 -1
  167. package/dist/state/schemas/session-info.js +22 -0
  168. package/dist/state/schemas/session-info.js.map +1 -1
  169. package/dist/state/session-validation.d.ts +202 -0
  170. package/dist/state/session-validation.d.ts.map +1 -0
  171. package/dist/state/session-validation.js +407 -0
  172. package/dist/state/session-validation.js.map +1 -0
  173. package/dist/state/session.d.ts +23 -3
  174. package/dist/state/session.d.ts.map +1 -1
  175. package/dist/state/session.js +41 -6
  176. package/dist/state/session.js.map +1 -1
  177. package/dist/state/working-directory-validation.d.ts +52 -0
  178. package/dist/state/working-directory-validation.d.ts.map +1 -0
  179. package/dist/state/working-directory-validation.js +81 -0
  180. package/dist/state/working-directory-validation.js.map +1 -0
  181. package/package.json +7 -2
@@ -4,7 +4,7 @@
4
4
  * Validates herdctl.yaml fleet configuration
5
5
  */
6
6
  import { z } from "zod";
7
- export declare const PermissionModeSchema: z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan"]>;
7
+ export declare const PermissionModeSchema: z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "delegate", "dontAsk"]>;
8
8
  export declare const BashPermissionsSchema: z.ZodObject<{
9
9
  allowed_commands: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
10
  denied_patterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
@@ -16,7 +16,7 @@ export declare const BashPermissionsSchema: z.ZodObject<{
16
16
  denied_patterns?: string[] | undefined;
17
17
  }>;
18
18
  export declare const PermissionsSchema: z.ZodObject<{
19
- mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan"]>>>;
19
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "delegate", "dontAsk"]>>>;
20
20
  allowed_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
21
21
  denied_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
22
22
  bash: z.ZodOptional<z.ZodObject<{
@@ -30,7 +30,7 @@ export declare const PermissionsSchema: z.ZodObject<{
30
30
  denied_patterns?: string[] | undefined;
31
31
  }>>;
32
32
  }, "strip", z.ZodTypeAny, {
33
- mode: "default" | "acceptEdits" | "bypassPermissions" | "plan";
33
+ mode: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk";
34
34
  allowed_tools?: string[] | undefined;
35
35
  denied_tools?: string[] | undefined;
36
36
  bash?: {
@@ -38,7 +38,7 @@ export declare const PermissionsSchema: z.ZodObject<{
38
38
  denied_patterns?: string[] | undefined;
39
39
  } | undefined;
40
40
  }, {
41
- mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
41
+ mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
42
42
  allowed_tools?: string[] | undefined;
43
43
  denied_tools?: string[] | undefined;
44
44
  bash?: {
@@ -284,14 +284,162 @@ export declare const InstancesSchema: z.ZodObject<{
284
284
  }, {
285
285
  max_concurrent?: number | undefined;
286
286
  }>;
287
- export declare const DockerSchema: z.ZodObject<{
287
+ /**
288
+ * Network isolation modes for Docker containers
289
+ * - "none": No network access (most secure, rare use case)
290
+ * - "bridge": Standard Docker networking with NAT (default)
291
+ * - "host": Share host network namespace (least isolated)
292
+ */
293
+ export declare const DockerNetworkModeSchema: z.ZodEnum<["none", "bridge", "host"]>;
294
+ /**
295
+ * Docker container configuration schema
296
+ *
297
+ * Supports container lifecycle, resource limits, and security options.
298
+ * All options are optional - defaults provide secure, sensible configuration.
299
+ *
300
+ * @example
301
+ * ```yaml
302
+ * docker:
303
+ * enabled: true
304
+ * ephemeral: false # Reuse container across jobs
305
+ * image: anthropic/claude-code:latest
306
+ * network: bridge # Full network access
307
+ * memory: 2g # Memory limit
308
+ * cpu_shares: 512 # CPU weight
309
+ * user: "1000:1000" # Run as specific UID:GID
310
+ * max_containers: 5 # Keep last 5 containers per agent
311
+ * volumes: # Additional volume mounts
312
+ * - "/host/data:/container/data:ro"
313
+ * ```
314
+ */
315
+ export declare const DockerSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
316
+ /** Enable Docker containerization for this agent (default: false) */
288
317
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
318
+ /** Use ephemeral containers (fresh per job, auto-removed) vs persistent (reuse across jobs, kept for inspection) */
319
+ ephemeral: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
320
+ /** Docker image to use (default: anthropic/claude-code:latest) */
321
+ image: z.ZodOptional<z.ZodString>;
322
+ /** Network isolation mode (default: bridge for full network access) */
323
+ network: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "bridge", "host"]>>>;
324
+ /** Memory limit (e.g., "2g", "512m") (default: 2g) */
325
+ memory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
326
+ /** CPU shares (relative weight, 512 is normal) */
327
+ cpu_shares: z.ZodOptional<z.ZodNumber>;
328
+ /** Container user as "UID:GID" string (default: match host user) */
329
+ user: z.ZodOptional<z.ZodString>;
330
+ /** Maximum containers to keep per agent before cleanup (default: 5) */
331
+ max_containers: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
332
+ /** Additional volume mounts in Docker format: "host:container:mode" */
333
+ volumes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
334
+ /** Workspace mount mode: rw (read-write, default) or ro (read-only) */
335
+ workspace_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["rw", "ro"]>>>;
336
+ /** Environment variables to pass to the container (supports ${VAR} interpolation) */
337
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
338
+ /** @deprecated Use 'image' instead */
289
339
  base_image: z.ZodOptional<z.ZodString>;
290
340
  }, "strip", z.ZodTypeAny, {
291
341
  enabled: boolean;
342
+ ephemeral: boolean;
343
+ network: "none" | "bridge" | "host";
344
+ memory: string;
345
+ max_containers: number;
346
+ workspace_mode: "rw" | "ro";
347
+ image?: string | undefined;
348
+ cpu_shares?: number | undefined;
349
+ user?: string | undefined;
350
+ volumes?: string[] | undefined;
351
+ env?: Record<string, string> | undefined;
292
352
  base_image?: string | undefined;
293
353
  }, {
294
354
  enabled?: boolean | undefined;
355
+ ephemeral?: boolean | undefined;
356
+ image?: string | undefined;
357
+ network?: "none" | "bridge" | "host" | undefined;
358
+ memory?: string | undefined;
359
+ cpu_shares?: number | undefined;
360
+ user?: string | undefined;
361
+ max_containers?: number | undefined;
362
+ volumes?: string[] | undefined;
363
+ workspace_mode?: "rw" | "ro" | undefined;
364
+ env?: Record<string, string> | undefined;
365
+ base_image?: string | undefined;
366
+ }>, {
367
+ enabled: boolean;
368
+ ephemeral: boolean;
369
+ network: "none" | "bridge" | "host";
370
+ memory: string;
371
+ max_containers: number;
372
+ workspace_mode: "rw" | "ro";
373
+ image?: string | undefined;
374
+ cpu_shares?: number | undefined;
375
+ user?: string | undefined;
376
+ volumes?: string[] | undefined;
377
+ env?: Record<string, string> | undefined;
378
+ base_image?: string | undefined;
379
+ }, {
380
+ enabled?: boolean | undefined;
381
+ ephemeral?: boolean | undefined;
382
+ image?: string | undefined;
383
+ network?: "none" | "bridge" | "host" | undefined;
384
+ memory?: string | undefined;
385
+ cpu_shares?: number | undefined;
386
+ user?: string | undefined;
387
+ max_containers?: number | undefined;
388
+ volumes?: string[] | undefined;
389
+ workspace_mode?: "rw" | "ro" | undefined;
390
+ env?: Record<string, string> | undefined;
391
+ base_image?: string | undefined;
392
+ }>, {
393
+ enabled: boolean;
394
+ ephemeral: boolean;
395
+ network: "none" | "bridge" | "host";
396
+ memory: string;
397
+ max_containers: number;
398
+ workspace_mode: "rw" | "ro";
399
+ image?: string | undefined;
400
+ cpu_shares?: number | undefined;
401
+ user?: string | undefined;
402
+ volumes?: string[] | undefined;
403
+ env?: Record<string, string> | undefined;
404
+ base_image?: string | undefined;
405
+ }, {
406
+ enabled?: boolean | undefined;
407
+ ephemeral?: boolean | undefined;
408
+ image?: string | undefined;
409
+ network?: "none" | "bridge" | "host" | undefined;
410
+ memory?: string | undefined;
411
+ cpu_shares?: number | undefined;
412
+ user?: string | undefined;
413
+ max_containers?: number | undefined;
414
+ volumes?: string[] | undefined;
415
+ workspace_mode?: "rw" | "ro" | undefined;
416
+ env?: Record<string, string> | undefined;
417
+ base_image?: string | undefined;
418
+ }>, {
419
+ enabled: boolean;
420
+ ephemeral: boolean;
421
+ network: "none" | "bridge" | "host";
422
+ memory: string;
423
+ max_containers: number;
424
+ workspace_mode: "rw" | "ro";
425
+ image?: string | undefined;
426
+ cpu_shares?: number | undefined;
427
+ user?: string | undefined;
428
+ volumes?: string[] | undefined;
429
+ env?: Record<string, string> | undefined;
430
+ base_image?: string | undefined;
431
+ }, {
432
+ enabled?: boolean | undefined;
433
+ ephemeral?: boolean | undefined;
434
+ image?: string | undefined;
435
+ network?: "none" | "bridge" | "host" | undefined;
436
+ memory?: string | undefined;
437
+ cpu_shares?: number | undefined;
438
+ user?: string | undefined;
439
+ max_containers?: number | undefined;
440
+ volumes?: string[] | undefined;
441
+ workspace_mode?: "rw" | "ro" | undefined;
442
+ env?: Record<string, string> | undefined;
295
443
  base_image?: string | undefined;
296
444
  }>;
297
445
  export declare const SessionSchema: z.ZodObject<{
@@ -308,18 +456,138 @@ export declare const SessionSchema: z.ZodObject<{
308
456
  model?: string | undefined;
309
457
  }>;
310
458
  export declare const DefaultsSchema: z.ZodObject<{
311
- docker: z.ZodOptional<z.ZodObject<{
459
+ docker: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
460
+ /** Enable Docker containerization for this agent (default: false) */
312
461
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
462
+ /** Use ephemeral containers (fresh per job, auto-removed) vs persistent (reuse across jobs, kept for inspection) */
463
+ ephemeral: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
464
+ /** Docker image to use (default: anthropic/claude-code:latest) */
465
+ image: z.ZodOptional<z.ZodString>;
466
+ /** Network isolation mode (default: bridge for full network access) */
467
+ network: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "bridge", "host"]>>>;
468
+ /** Memory limit (e.g., "2g", "512m") (default: 2g) */
469
+ memory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
470
+ /** CPU shares (relative weight, 512 is normal) */
471
+ cpu_shares: z.ZodOptional<z.ZodNumber>;
472
+ /** Container user as "UID:GID" string (default: match host user) */
473
+ user: z.ZodOptional<z.ZodString>;
474
+ /** Maximum containers to keep per agent before cleanup (default: 5) */
475
+ max_containers: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
476
+ /** Additional volume mounts in Docker format: "host:container:mode" */
477
+ volumes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
478
+ /** Workspace mount mode: rw (read-write, default) or ro (read-only) */
479
+ workspace_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["rw", "ro"]>>>;
480
+ /** Environment variables to pass to the container (supports ${VAR} interpolation) */
481
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
482
+ /** @deprecated Use 'image' instead */
313
483
  base_image: z.ZodOptional<z.ZodString>;
314
484
  }, "strip", z.ZodTypeAny, {
315
485
  enabled: boolean;
486
+ ephemeral: boolean;
487
+ network: "none" | "bridge" | "host";
488
+ memory: string;
489
+ max_containers: number;
490
+ workspace_mode: "rw" | "ro";
491
+ image?: string | undefined;
492
+ cpu_shares?: number | undefined;
493
+ user?: string | undefined;
494
+ volumes?: string[] | undefined;
495
+ env?: Record<string, string> | undefined;
496
+ base_image?: string | undefined;
497
+ }, {
498
+ enabled?: boolean | undefined;
499
+ ephemeral?: boolean | undefined;
500
+ image?: string | undefined;
501
+ network?: "none" | "bridge" | "host" | undefined;
502
+ memory?: string | undefined;
503
+ cpu_shares?: number | undefined;
504
+ user?: string | undefined;
505
+ max_containers?: number | undefined;
506
+ volumes?: string[] | undefined;
507
+ workspace_mode?: "rw" | "ro" | undefined;
508
+ env?: Record<string, string> | undefined;
509
+ base_image?: string | undefined;
510
+ }>, {
511
+ enabled: boolean;
512
+ ephemeral: boolean;
513
+ network: "none" | "bridge" | "host";
514
+ memory: string;
515
+ max_containers: number;
516
+ workspace_mode: "rw" | "ro";
517
+ image?: string | undefined;
518
+ cpu_shares?: number | undefined;
519
+ user?: string | undefined;
520
+ volumes?: string[] | undefined;
521
+ env?: Record<string, string> | undefined;
522
+ base_image?: string | undefined;
523
+ }, {
524
+ enabled?: boolean | undefined;
525
+ ephemeral?: boolean | undefined;
526
+ image?: string | undefined;
527
+ network?: "none" | "bridge" | "host" | undefined;
528
+ memory?: string | undefined;
529
+ cpu_shares?: number | undefined;
530
+ user?: string | undefined;
531
+ max_containers?: number | undefined;
532
+ volumes?: string[] | undefined;
533
+ workspace_mode?: "rw" | "ro" | undefined;
534
+ env?: Record<string, string> | undefined;
535
+ base_image?: string | undefined;
536
+ }>, {
537
+ enabled: boolean;
538
+ ephemeral: boolean;
539
+ network: "none" | "bridge" | "host";
540
+ memory: string;
541
+ max_containers: number;
542
+ workspace_mode: "rw" | "ro";
543
+ image?: string | undefined;
544
+ cpu_shares?: number | undefined;
545
+ user?: string | undefined;
546
+ volumes?: string[] | undefined;
547
+ env?: Record<string, string> | undefined;
316
548
  base_image?: string | undefined;
317
549
  }, {
318
550
  enabled?: boolean | undefined;
551
+ ephemeral?: boolean | undefined;
552
+ image?: string | undefined;
553
+ network?: "none" | "bridge" | "host" | undefined;
554
+ memory?: string | undefined;
555
+ cpu_shares?: number | undefined;
556
+ user?: string | undefined;
557
+ max_containers?: number | undefined;
558
+ volumes?: string[] | undefined;
559
+ workspace_mode?: "rw" | "ro" | undefined;
560
+ env?: Record<string, string> | undefined;
561
+ base_image?: string | undefined;
562
+ }>, {
563
+ enabled: boolean;
564
+ ephemeral: boolean;
565
+ network: "none" | "bridge" | "host";
566
+ memory: string;
567
+ max_containers: number;
568
+ workspace_mode: "rw" | "ro";
569
+ image?: string | undefined;
570
+ cpu_shares?: number | undefined;
571
+ user?: string | undefined;
572
+ volumes?: string[] | undefined;
573
+ env?: Record<string, string> | undefined;
574
+ base_image?: string | undefined;
575
+ }, {
576
+ enabled?: boolean | undefined;
577
+ ephemeral?: boolean | undefined;
578
+ image?: string | undefined;
579
+ network?: "none" | "bridge" | "host" | undefined;
580
+ memory?: string | undefined;
581
+ cpu_shares?: number | undefined;
582
+ user?: string | undefined;
583
+ max_containers?: number | undefined;
584
+ volumes?: string[] | undefined;
585
+ workspace_mode?: "rw" | "ro" | undefined;
586
+ env?: Record<string, string> | undefined;
319
587
  base_image?: string | undefined;
320
588
  }>>;
321
589
  permissions: z.ZodOptional<z.ZodObject<{
322
- mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan"]>>>;
590
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "delegate", "dontAsk"]>>>;
323
591
  allowed_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
324
592
  denied_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
325
593
  bash: z.ZodOptional<z.ZodObject<{
@@ -333,7 +601,7 @@ export declare const DefaultsSchema: z.ZodObject<{
333
601
  denied_patterns?: string[] | undefined;
334
602
  }>>;
335
603
  }, "strip", z.ZodTypeAny, {
336
- mode: "default" | "acceptEdits" | "bypassPermissions" | "plan";
604
+ mode: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk";
337
605
  allowed_tools?: string[] | undefined;
338
606
  denied_tools?: string[] | undefined;
339
607
  bash?: {
@@ -341,7 +609,7 @@ export declare const DefaultsSchema: z.ZodObject<{
341
609
  denied_patterns?: string[] | undefined;
342
610
  } | undefined;
343
611
  }, {
344
- mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
612
+ mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
345
613
  allowed_tools?: string[] | undefined;
346
614
  denied_tools?: string[] | undefined;
347
615
  bash?: {
@@ -442,6 +710,22 @@ export declare const DefaultsSchema: z.ZodObject<{
442
710
  }, {
443
711
  max_concurrent?: number | undefined;
444
712
  }>>;
713
+ working_directory: z.ZodOptional<z.ZodLazy<z.ZodUnion<[z.ZodString, z.ZodObject<{
714
+ root: z.ZodString;
715
+ auto_clone: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
716
+ clone_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
717
+ default_branch: z.ZodDefault<z.ZodOptional<z.ZodString>>;
718
+ }, "strip", z.ZodTypeAny, {
719
+ root: string;
720
+ auto_clone: boolean;
721
+ clone_depth: number;
722
+ default_branch: string;
723
+ }, {
724
+ root: string;
725
+ auto_clone?: boolean | undefined;
726
+ clone_depth?: number | undefined;
727
+ default_branch?: string | undefined;
728
+ }>]>>>;
445
729
  session: z.ZodOptional<z.ZodObject<{
446
730
  max_turns: z.ZodOptional<z.ZodNumber>;
447
731
  timeout: z.ZodOptional<z.ZodString>;
@@ -457,16 +741,26 @@ export declare const DefaultsSchema: z.ZodObject<{
457
741
  }>>;
458
742
  model: z.ZodOptional<z.ZodString>;
459
743
  max_turns: z.ZodOptional<z.ZodNumber>;
460
- permission_mode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan"]>>;
744
+ permission_mode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "delegate", "dontAsk"]>>;
461
745
  }, "strip", z.ZodTypeAny, {
462
746
  max_turns?: number | undefined;
463
747
  model?: string | undefined;
464
748
  docker?: {
465
749
  enabled: boolean;
750
+ ephemeral: boolean;
751
+ network: "none" | "bridge" | "host";
752
+ memory: string;
753
+ max_containers: number;
754
+ workspace_mode: "rw" | "ro";
755
+ image?: string | undefined;
756
+ cpu_shares?: number | undefined;
757
+ user?: string | undefined;
758
+ volumes?: string[] | undefined;
759
+ env?: Record<string, string> | undefined;
466
760
  base_image?: string | undefined;
467
761
  } | undefined;
468
762
  permissions?: {
469
- mode: "default" | "acceptEdits" | "bypassPermissions" | "plan";
763
+ mode: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk";
470
764
  allowed_tools?: string[] | undefined;
471
765
  denied_tools?: string[] | undefined;
472
766
  bash?: {
@@ -498,21 +792,37 @@ export declare const DefaultsSchema: z.ZodObject<{
498
792
  instances?: {
499
793
  max_concurrent: number;
500
794
  } | undefined;
795
+ working_directory?: string | {
796
+ root: string;
797
+ auto_clone: boolean;
798
+ clone_depth: number;
799
+ default_branch: string;
800
+ } | undefined;
501
801
  session?: {
502
802
  max_turns?: number | undefined;
503
803
  timeout?: string | undefined;
504
804
  model?: string | undefined;
505
805
  } | undefined;
506
- permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
806
+ permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
507
807
  }, {
508
808
  max_turns?: number | undefined;
509
809
  model?: string | undefined;
510
810
  docker?: {
511
811
  enabled?: boolean | undefined;
812
+ ephemeral?: boolean | undefined;
813
+ image?: string | undefined;
814
+ network?: "none" | "bridge" | "host" | undefined;
815
+ memory?: string | undefined;
816
+ cpu_shares?: number | undefined;
817
+ user?: string | undefined;
818
+ max_containers?: number | undefined;
819
+ volumes?: string[] | undefined;
820
+ workspace_mode?: "rw" | "ro" | undefined;
821
+ env?: Record<string, string> | undefined;
512
822
  base_image?: string | undefined;
513
823
  } | undefined;
514
824
  permissions?: {
515
- mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
825
+ mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
516
826
  allowed_tools?: string[] | undefined;
517
827
  denied_tools?: string[] | undefined;
518
828
  bash?: {
@@ -544,14 +854,20 @@ export declare const DefaultsSchema: z.ZodObject<{
544
854
  instances?: {
545
855
  max_concurrent?: number | undefined;
546
856
  } | undefined;
857
+ working_directory?: string | {
858
+ root: string;
859
+ auto_clone?: boolean | undefined;
860
+ clone_depth?: number | undefined;
861
+ default_branch?: string | undefined;
862
+ } | undefined;
547
863
  session?: {
548
864
  max_turns?: number | undefined;
549
865
  timeout?: string | undefined;
550
866
  model?: string | undefined;
551
867
  } | undefined;
552
- permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
868
+ permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
553
869
  }>;
554
- export declare const WorkspaceSchema: z.ZodObject<{
870
+ export declare const WorkingDirectorySchema: z.ZodObject<{
555
871
  root: z.ZodString;
556
872
  auto_clone: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
557
873
  clone_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -691,9 +1007,12 @@ export declare const ScheduleSchema: z.ZodObject<{
691
1007
  outputToFile: z.ZodOptional<z.ZodBoolean>;
692
1008
  /** When false, schedule will not auto-trigger but can still be manually triggered (default: true) */
693
1009
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1010
+ /** When false, start a fresh session instead of resuming (default: true - resumes existing session) */
1011
+ resume_session: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
694
1012
  }, "strip", z.ZodTypeAny, {
695
1013
  type: "interval" | "cron" | "webhook" | "chat";
696
1014
  enabled: boolean;
1015
+ resume_session: boolean;
697
1016
  work_source?: {
698
1017
  type: "github";
699
1018
  repo: string;
@@ -747,6 +1066,7 @@ export declare const ScheduleSchema: z.ZodObject<{
747
1066
  expression?: string | undefined;
748
1067
  prompt?: string | undefined;
749
1068
  outputToFile?: boolean | undefined;
1069
+ resume_session?: boolean | undefined;
750
1070
  }>;
751
1071
  export declare const McpServerSchema: z.ZodObject<{
752
1072
  command: z.ZodOptional<z.ZodString>;
@@ -754,15 +1074,15 @@ export declare const McpServerSchema: z.ZodObject<{
754
1074
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
755
1075
  url: z.ZodOptional<z.ZodString>;
756
1076
  }, "strip", z.ZodTypeAny, {
757
- command?: string | undefined;
758
- args?: string[] | undefined;
759
1077
  url?: string | undefined;
760
1078
  env?: Record<string, string> | undefined;
761
- }, {
762
1079
  command?: string | undefined;
763
1080
  args?: string[] | undefined;
1081
+ }, {
764
1082
  url?: string | undefined;
765
1083
  env?: Record<string, string> | undefined;
1084
+ command?: string | undefined;
1085
+ args?: string[] | undefined;
766
1086
  }>;
767
1087
  /**
768
1088
  * Discord bot presence/activity configuration
@@ -1386,8 +1706,8 @@ export declare const WebhookHookConfigSchema: z.ZodObject<{
1386
1706
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1387
1707
  }, "strip", z.ZodTypeAny, {
1388
1708
  type: "webhook";
1389
- timeout: number;
1390
1709
  url: string;
1710
+ timeout: number;
1391
1711
  continue_on_error: boolean;
1392
1712
  method: "POST" | "PUT";
1393
1713
  name?: string | undefined;
@@ -1495,8 +1815,8 @@ export declare const HookConfigSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
1495
1815
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1496
1816
  }, "strip", z.ZodTypeAny, {
1497
1817
  type: "webhook";
1498
- timeout: number;
1499
1818
  url: string;
1819
+ timeout: number;
1500
1820
  continue_on_error: boolean;
1501
1821
  method: "POST" | "PUT";
1502
1822
  name?: string | undefined;
@@ -1602,8 +1922,8 @@ export declare const AgentHooksSchema: z.ZodObject<{
1602
1922
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1603
1923
  }, "strip", z.ZodTypeAny, {
1604
1924
  type: "webhook";
1605
- timeout: number;
1606
1925
  url: string;
1926
+ timeout: number;
1607
1927
  continue_on_error: boolean;
1608
1928
  method: "POST" | "PUT";
1609
1929
  name?: string | undefined;
@@ -1705,8 +2025,8 @@ export declare const AgentHooksSchema: z.ZodObject<{
1705
2025
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
1706
2026
  }, "strip", z.ZodTypeAny, {
1707
2027
  type: "webhook";
1708
- timeout: number;
1709
2028
  url: string;
2029
+ timeout: number;
1710
2030
  continue_on_error: boolean;
1711
2031
  method: "POST" | "PUT";
1712
2032
  name?: string | undefined;
@@ -1766,8 +2086,8 @@ export declare const AgentHooksSchema: z.ZodObject<{
1766
2086
  when?: string | undefined;
1767
2087
  } | {
1768
2088
  type: "webhook";
1769
- timeout: number;
1770
2089
  url: string;
2090
+ timeout: number;
1771
2091
  continue_on_error: boolean;
1772
2092
  method: "POST" | "PUT";
1773
2093
  name?: string | undefined;
@@ -1793,8 +2113,8 @@ export declare const AgentHooksSchema: z.ZodObject<{
1793
2113
  when?: string | undefined;
1794
2114
  } | {
1795
2115
  type: "webhook";
1796
- timeout: number;
1797
2116
  url: string;
2117
+ timeout: number;
1798
2118
  continue_on_error: boolean;
1799
2119
  method: "POST" | "PUT";
1800
2120
  name?: string | undefined;
@@ -1866,7 +2186,7 @@ export declare const AgentHooksSchema: z.ZodObject<{
1866
2186
  when?: string | undefined;
1867
2187
  })[] | undefined;
1868
2188
  }>;
1869
- export declare const AgentWorkspaceSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
2189
+ export declare const AgentWorkingDirectorySchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
1870
2190
  root: z.ZodString;
1871
2191
  auto_clone: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1872
2192
  clone_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -1885,7 +2205,7 @@ export declare const AgentWorkspaceSchema: z.ZodUnion<[z.ZodString, z.ZodObject<
1885
2205
  export declare const AgentConfigSchema: z.ZodObject<{
1886
2206
  name: z.ZodString;
1887
2207
  description: z.ZodOptional<z.ZodString>;
1888
- workspace: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
2208
+ working_directory: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
1889
2209
  root: z.ZodString;
1890
2210
  auto_clone: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
1891
2211
  clone_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -2099,9 +2419,12 @@ export declare const AgentConfigSchema: z.ZodObject<{
2099
2419
  outputToFile: z.ZodOptional<z.ZodBoolean>;
2100
2420
  /** When false, schedule will not auto-trigger but can still be manually triggered (default: true) */
2101
2421
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2422
+ /** When false, start a fresh session instead of resuming (default: true - resumes existing session) */
2423
+ resume_session: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
2102
2424
  }, "strip", z.ZodTypeAny, {
2103
2425
  type: "interval" | "cron" | "webhook" | "chat";
2104
2426
  enabled: boolean;
2427
+ resume_session: boolean;
2105
2428
  work_source?: {
2106
2429
  type: "github";
2107
2430
  repo: string;
@@ -2155,6 +2478,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
2155
2478
  expression?: string | undefined;
2156
2479
  prompt?: string | undefined;
2157
2480
  outputToFile?: boolean | undefined;
2481
+ resume_session?: boolean | undefined;
2158
2482
  }>>>;
2159
2483
  session: z.ZodOptional<z.ZodObject<{
2160
2484
  max_turns: z.ZodOptional<z.ZodNumber>;
@@ -2170,7 +2494,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
2170
2494
  model?: string | undefined;
2171
2495
  }>>;
2172
2496
  permissions: z.ZodOptional<z.ZodObject<{
2173
- mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan"]>>>;
2497
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "delegate", "dontAsk"]>>>;
2174
2498
  allowed_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2175
2499
  denied_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
2176
2500
  bash: z.ZodOptional<z.ZodObject<{
@@ -2184,7 +2508,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
2184
2508
  denied_patterns?: string[] | undefined;
2185
2509
  }>>;
2186
2510
  }, "strip", z.ZodTypeAny, {
2187
- mode: "default" | "acceptEdits" | "bypassPermissions" | "plan";
2511
+ mode: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk";
2188
2512
  allowed_tools?: string[] | undefined;
2189
2513
  denied_tools?: string[] | undefined;
2190
2514
  bash?: {
@@ -2192,7 +2516,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
2192
2516
  denied_patterns?: string[] | undefined;
2193
2517
  } | undefined;
2194
2518
  }, {
2195
- mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
2519
+ mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
2196
2520
  allowed_tools?: string[] | undefined;
2197
2521
  denied_tools?: string[] | undefined;
2198
2522
  bash?: {
@@ -2206,15 +2530,15 @@ export declare const AgentConfigSchema: z.ZodObject<{
2206
2530
  env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2207
2531
  url: z.ZodOptional<z.ZodString>;
2208
2532
  }, "strip", z.ZodTypeAny, {
2209
- command?: string | undefined;
2210
- args?: string[] | undefined;
2211
2533
  url?: string | undefined;
2212
2534
  env?: Record<string, string> | undefined;
2213
- }, {
2214
2535
  command?: string | undefined;
2215
2536
  args?: string[] | undefined;
2537
+ }, {
2216
2538
  url?: string | undefined;
2217
2539
  env?: Record<string, string> | undefined;
2540
+ command?: string | undefined;
2541
+ args?: string[] | undefined;
2218
2542
  }>>>;
2219
2543
  chat: z.ZodOptional<z.ZodObject<{
2220
2544
  discord: z.ZodOptional<z.ZodObject<{
@@ -2492,8 +2816,8 @@ export declare const AgentConfigSchema: z.ZodObject<{
2492
2816
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2493
2817
  }, "strip", z.ZodTypeAny, {
2494
2818
  type: "webhook";
2495
- timeout: number;
2496
2819
  url: string;
2820
+ timeout: number;
2497
2821
  continue_on_error: boolean;
2498
2822
  method: "POST" | "PUT";
2499
2823
  name?: string | undefined;
@@ -2595,8 +2919,8 @@ export declare const AgentConfigSchema: z.ZodObject<{
2595
2919
  timeout: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
2596
2920
  }, "strip", z.ZodTypeAny, {
2597
2921
  type: "webhook";
2598
- timeout: number;
2599
2922
  url: string;
2923
+ timeout: number;
2600
2924
  continue_on_error: boolean;
2601
2925
  method: "POST" | "PUT";
2602
2926
  name?: string | undefined;
@@ -2656,8 +2980,8 @@ export declare const AgentConfigSchema: z.ZodObject<{
2656
2980
  when?: string | undefined;
2657
2981
  } | {
2658
2982
  type: "webhook";
2659
- timeout: number;
2660
2983
  url: string;
2984
+ timeout: number;
2661
2985
  continue_on_error: boolean;
2662
2986
  method: "POST" | "PUT";
2663
2987
  name?: string | undefined;
@@ -2683,8 +3007,8 @@ export declare const AgentConfigSchema: z.ZodObject<{
2683
3007
  when?: string | undefined;
2684
3008
  } | {
2685
3009
  type: "webhook";
2686
- timeout: number;
2687
3010
  url: string;
3011
+ timeout: number;
2688
3012
  continue_on_error: boolean;
2689
3013
  method: "POST" | "PUT";
2690
3014
  name?: string | undefined;
@@ -2756,14 +3080,134 @@ export declare const AgentConfigSchema: z.ZodObject<{
2756
3080
  when?: string | undefined;
2757
3081
  })[] | undefined;
2758
3082
  }>>;
2759
- docker: z.ZodOptional<z.ZodObject<{
3083
+ docker: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
3084
+ /** Enable Docker containerization for this agent (default: false) */
2760
3085
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3086
+ /** Use ephemeral containers (fresh per job, auto-removed) vs persistent (reuse across jobs, kept for inspection) */
3087
+ ephemeral: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3088
+ /** Docker image to use (default: anthropic/claude-code:latest) */
3089
+ image: z.ZodOptional<z.ZodString>;
3090
+ /** Network isolation mode (default: bridge for full network access) */
3091
+ network: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "bridge", "host"]>>>;
3092
+ /** Memory limit (e.g., "2g", "512m") (default: 2g) */
3093
+ memory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3094
+ /** CPU shares (relative weight, 512 is normal) */
3095
+ cpu_shares: z.ZodOptional<z.ZodNumber>;
3096
+ /** Container user as "UID:GID" string (default: match host user) */
3097
+ user: z.ZodOptional<z.ZodString>;
3098
+ /** Maximum containers to keep per agent before cleanup (default: 5) */
3099
+ max_containers: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3100
+ /** Additional volume mounts in Docker format: "host:container:mode" */
3101
+ volumes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3102
+ /** Workspace mount mode: rw (read-write, default) or ro (read-only) */
3103
+ workspace_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["rw", "ro"]>>>;
3104
+ /** Environment variables to pass to the container (supports ${VAR} interpolation) */
3105
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3106
+ /** @deprecated Use 'image' instead */
2761
3107
  base_image: z.ZodOptional<z.ZodString>;
2762
3108
  }, "strip", z.ZodTypeAny, {
2763
3109
  enabled: boolean;
3110
+ ephemeral: boolean;
3111
+ network: "none" | "bridge" | "host";
3112
+ memory: string;
3113
+ max_containers: number;
3114
+ workspace_mode: "rw" | "ro";
3115
+ image?: string | undefined;
3116
+ cpu_shares?: number | undefined;
3117
+ user?: string | undefined;
3118
+ volumes?: string[] | undefined;
3119
+ env?: Record<string, string> | undefined;
3120
+ base_image?: string | undefined;
3121
+ }, {
3122
+ enabled?: boolean | undefined;
3123
+ ephemeral?: boolean | undefined;
3124
+ image?: string | undefined;
3125
+ network?: "none" | "bridge" | "host" | undefined;
3126
+ memory?: string | undefined;
3127
+ cpu_shares?: number | undefined;
3128
+ user?: string | undefined;
3129
+ max_containers?: number | undefined;
3130
+ volumes?: string[] | undefined;
3131
+ workspace_mode?: "rw" | "ro" | undefined;
3132
+ env?: Record<string, string> | undefined;
3133
+ base_image?: string | undefined;
3134
+ }>, {
3135
+ enabled: boolean;
3136
+ ephemeral: boolean;
3137
+ network: "none" | "bridge" | "host";
3138
+ memory: string;
3139
+ max_containers: number;
3140
+ workspace_mode: "rw" | "ro";
3141
+ image?: string | undefined;
3142
+ cpu_shares?: number | undefined;
3143
+ user?: string | undefined;
3144
+ volumes?: string[] | undefined;
3145
+ env?: Record<string, string> | undefined;
3146
+ base_image?: string | undefined;
3147
+ }, {
3148
+ enabled?: boolean | undefined;
3149
+ ephemeral?: boolean | undefined;
3150
+ image?: string | undefined;
3151
+ network?: "none" | "bridge" | "host" | undefined;
3152
+ memory?: string | undefined;
3153
+ cpu_shares?: number | undefined;
3154
+ user?: string | undefined;
3155
+ max_containers?: number | undefined;
3156
+ volumes?: string[] | undefined;
3157
+ workspace_mode?: "rw" | "ro" | undefined;
3158
+ env?: Record<string, string> | undefined;
3159
+ base_image?: string | undefined;
3160
+ }>, {
3161
+ enabled: boolean;
3162
+ ephemeral: boolean;
3163
+ network: "none" | "bridge" | "host";
3164
+ memory: string;
3165
+ max_containers: number;
3166
+ workspace_mode: "rw" | "ro";
3167
+ image?: string | undefined;
3168
+ cpu_shares?: number | undefined;
3169
+ user?: string | undefined;
3170
+ volumes?: string[] | undefined;
3171
+ env?: Record<string, string> | undefined;
2764
3172
  base_image?: string | undefined;
2765
3173
  }, {
2766
3174
  enabled?: boolean | undefined;
3175
+ ephemeral?: boolean | undefined;
3176
+ image?: string | undefined;
3177
+ network?: "none" | "bridge" | "host" | undefined;
3178
+ memory?: string | undefined;
3179
+ cpu_shares?: number | undefined;
3180
+ user?: string | undefined;
3181
+ max_containers?: number | undefined;
3182
+ volumes?: string[] | undefined;
3183
+ workspace_mode?: "rw" | "ro" | undefined;
3184
+ env?: Record<string, string> | undefined;
3185
+ base_image?: string | undefined;
3186
+ }>, {
3187
+ enabled: boolean;
3188
+ ephemeral: boolean;
3189
+ network: "none" | "bridge" | "host";
3190
+ memory: string;
3191
+ max_containers: number;
3192
+ workspace_mode: "rw" | "ro";
3193
+ image?: string | undefined;
3194
+ cpu_shares?: number | undefined;
3195
+ user?: string | undefined;
3196
+ volumes?: string[] | undefined;
3197
+ env?: Record<string, string> | undefined;
3198
+ base_image?: string | undefined;
3199
+ }, {
3200
+ enabled?: boolean | undefined;
3201
+ ephemeral?: boolean | undefined;
3202
+ image?: string | undefined;
3203
+ network?: "none" | "bridge" | "host" | undefined;
3204
+ memory?: string | undefined;
3205
+ cpu_shares?: number | undefined;
3206
+ user?: string | undefined;
3207
+ max_containers?: number | undefined;
3208
+ volumes?: string[] | undefined;
3209
+ workspace_mode?: "rw" | "ro" | undefined;
3210
+ env?: Record<string, string> | undefined;
2767
3211
  base_image?: string | undefined;
2768
3212
  }>>;
2769
3213
  instances: z.ZodOptional<z.ZodObject<{
@@ -2775,7 +3219,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
2775
3219
  }>>;
2776
3220
  model: z.ZodOptional<z.ZodString>;
2777
3221
  max_turns: z.ZodOptional<z.ZodNumber>;
2778
- permission_mode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan"]>>;
3222
+ permission_mode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "delegate", "dontAsk"]>>;
2779
3223
  /** Path to metadata JSON file written by agent (default: metadata.json in workspace) */
2780
3224
  metadata_file: z.ZodOptional<z.ZodString>;
2781
3225
  /**
@@ -2788,6 +3232,14 @@ export declare const AgentConfigSchema: z.ZodObject<{
2788
3232
  * Default: ["project"] when workspace is set, [] otherwise
2789
3233
  */
2790
3234
  setting_sources: z.ZodOptional<z.ZodArray<z.ZodEnum<["user", "project", "local"]>, "many">>;
3235
+ /**
3236
+ * Runtime backend for executing Claude agents
3237
+ * - "sdk" - Claude Agent SDK (default, standard pricing)
3238
+ * - "cli" - Claude CLI (Max plan pricing, Phase 2)
3239
+ *
3240
+ * Default: "sdk"
3241
+ */
3242
+ runtime: z.ZodOptional<z.ZodEnum<["sdk", "cli"]>>;
2791
3243
  }, "strict", z.ZodTypeAny, {
2792
3244
  name: string;
2793
3245
  repo?: string | undefined;
@@ -2795,10 +3247,20 @@ export declare const AgentConfigSchema: z.ZodObject<{
2795
3247
  model?: string | undefined;
2796
3248
  docker?: {
2797
3249
  enabled: boolean;
3250
+ ephemeral: boolean;
3251
+ network: "none" | "bridge" | "host";
3252
+ memory: string;
3253
+ max_containers: number;
3254
+ workspace_mode: "rw" | "ro";
3255
+ image?: string | undefined;
3256
+ cpu_shares?: number | undefined;
3257
+ user?: string | undefined;
3258
+ volumes?: string[] | undefined;
3259
+ env?: Record<string, string> | undefined;
2798
3260
  base_image?: string | undefined;
2799
3261
  } | undefined;
2800
3262
  permissions?: {
2801
- mode: "default" | "acceptEdits" | "bypassPermissions" | "plan";
3263
+ mode: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk";
2802
3264
  allowed_tools?: string[] | undefined;
2803
3265
  denied_tools?: string[] | undefined;
2804
3266
  bash?: {
@@ -2830,12 +3292,18 @@ export declare const AgentConfigSchema: z.ZodObject<{
2830
3292
  instances?: {
2831
3293
  max_concurrent: number;
2832
3294
  } | undefined;
3295
+ working_directory?: string | {
3296
+ root: string;
3297
+ auto_clone: boolean;
3298
+ clone_depth: number;
3299
+ default_branch: string;
3300
+ } | undefined;
2833
3301
  session?: {
2834
3302
  max_turns?: number | undefined;
2835
3303
  timeout?: string | undefined;
2836
3304
  model?: string | undefined;
2837
3305
  } | undefined;
2838
- permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
3306
+ permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
2839
3307
  chat?: {
2840
3308
  discord?: {
2841
3309
  bot_token_env: string;
@@ -2869,12 +3337,6 @@ export declare const AgentConfigSchema: z.ZodObject<{
2869
3337
  } | undefined;
2870
3338
  } | undefined;
2871
3339
  description?: string | undefined;
2872
- workspace?: string | {
2873
- root: string;
2874
- auto_clone: boolean;
2875
- clone_depth: number;
2876
- default_branch: string;
2877
- } | undefined;
2878
3340
  identity?: {
2879
3341
  name?: string | undefined;
2880
3342
  role?: string | undefined;
@@ -2885,6 +3347,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
2885
3347
  schedules?: Record<string, {
2886
3348
  type: "interval" | "cron" | "webhook" | "chat";
2887
3349
  enabled: boolean;
3350
+ resume_session: boolean;
2888
3351
  work_source?: {
2889
3352
  type: "github";
2890
3353
  repo: string;
@@ -2912,10 +3375,10 @@ export declare const AgentConfigSchema: z.ZodObject<{
2912
3375
  outputToFile?: boolean | undefined;
2913
3376
  }> | undefined;
2914
3377
  mcp_servers?: Record<string, {
2915
- command?: string | undefined;
2916
- args?: string[] | undefined;
2917
3378
  url?: string | undefined;
2918
3379
  env?: Record<string, string> | undefined;
3380
+ command?: string | undefined;
3381
+ args?: string[] | undefined;
2919
3382
  }> | undefined;
2920
3383
  hooks?: {
2921
3384
  after_run?: ({
@@ -2928,8 +3391,8 @@ export declare const AgentConfigSchema: z.ZodObject<{
2928
3391
  when?: string | undefined;
2929
3392
  } | {
2930
3393
  type: "webhook";
2931
- timeout: number;
2932
3394
  url: string;
3395
+ timeout: number;
2933
3396
  continue_on_error: boolean;
2934
3397
  method: "POST" | "PUT";
2935
3398
  name?: string | undefined;
@@ -2955,8 +3418,8 @@ export declare const AgentConfigSchema: z.ZodObject<{
2955
3418
  when?: string | undefined;
2956
3419
  } | {
2957
3420
  type: "webhook";
2958
- timeout: number;
2959
3421
  url: string;
3422
+ timeout: number;
2960
3423
  continue_on_error: boolean;
2961
3424
  method: "POST" | "PUT";
2962
3425
  name?: string | undefined;
@@ -2975,6 +3438,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
2975
3438
  } | undefined;
2976
3439
  metadata_file?: string | undefined;
2977
3440
  setting_sources?: ("user" | "project" | "local")[] | undefined;
3441
+ runtime?: "sdk" | "cli" | undefined;
2978
3442
  }, {
2979
3443
  name: string;
2980
3444
  repo?: string | undefined;
@@ -2982,10 +3446,20 @@ export declare const AgentConfigSchema: z.ZodObject<{
2982
3446
  model?: string | undefined;
2983
3447
  docker?: {
2984
3448
  enabled?: boolean | undefined;
3449
+ ephemeral?: boolean | undefined;
3450
+ image?: string | undefined;
3451
+ network?: "none" | "bridge" | "host" | undefined;
3452
+ memory?: string | undefined;
3453
+ cpu_shares?: number | undefined;
3454
+ user?: string | undefined;
3455
+ max_containers?: number | undefined;
3456
+ volumes?: string[] | undefined;
3457
+ workspace_mode?: "rw" | "ro" | undefined;
3458
+ env?: Record<string, string> | undefined;
2985
3459
  base_image?: string | undefined;
2986
3460
  } | undefined;
2987
3461
  permissions?: {
2988
- mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
3462
+ mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
2989
3463
  allowed_tools?: string[] | undefined;
2990
3464
  denied_tools?: string[] | undefined;
2991
3465
  bash?: {
@@ -3017,12 +3491,18 @@ export declare const AgentConfigSchema: z.ZodObject<{
3017
3491
  instances?: {
3018
3492
  max_concurrent?: number | undefined;
3019
3493
  } | undefined;
3494
+ working_directory?: string | {
3495
+ root: string;
3496
+ auto_clone?: boolean | undefined;
3497
+ clone_depth?: number | undefined;
3498
+ default_branch?: string | undefined;
3499
+ } | undefined;
3020
3500
  session?: {
3021
3501
  max_turns?: number | undefined;
3022
3502
  timeout?: string | undefined;
3023
3503
  model?: string | undefined;
3024
3504
  } | undefined;
3025
- permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
3505
+ permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
3026
3506
  chat?: {
3027
3507
  discord?: {
3028
3508
  bot_token_env: string;
@@ -3056,12 +3536,6 @@ export declare const AgentConfigSchema: z.ZodObject<{
3056
3536
  } | undefined;
3057
3537
  } | undefined;
3058
3538
  description?: string | undefined;
3059
- workspace?: string | {
3060
- root: string;
3061
- auto_clone?: boolean | undefined;
3062
- clone_depth?: number | undefined;
3063
- default_branch?: string | undefined;
3064
- } | undefined;
3065
3539
  identity?: {
3066
3540
  name?: string | undefined;
3067
3541
  role?: string | undefined;
@@ -3097,12 +3571,13 @@ export declare const AgentConfigSchema: z.ZodObject<{
3097
3571
  expression?: string | undefined;
3098
3572
  prompt?: string | undefined;
3099
3573
  outputToFile?: boolean | undefined;
3574
+ resume_session?: boolean | undefined;
3100
3575
  }> | undefined;
3101
3576
  mcp_servers?: Record<string, {
3102
- command?: string | undefined;
3103
- args?: string[] | undefined;
3104
3577
  url?: string | undefined;
3105
3578
  env?: Record<string, string> | undefined;
3579
+ command?: string | undefined;
3580
+ args?: string[] | undefined;
3106
3581
  }> | undefined;
3107
3582
  hooks?: {
3108
3583
  after_run?: ({
@@ -3162,6 +3637,7 @@ export declare const AgentConfigSchema: z.ZodObject<{
3162
3637
  } | undefined;
3163
3638
  metadata_file?: string | undefined;
3164
3639
  setting_sources?: ("user" | "project" | "local")[] | undefined;
3640
+ runtime?: "sdk" | "cli" | undefined;
3165
3641
  }>;
3166
3642
  /**
3167
3643
  * Schema for agent overrides in fleet config.
@@ -3231,18 +3707,138 @@ export declare const FleetConfigSchema: z.ZodObject<{
3231
3707
  description?: string | undefined;
3232
3708
  }>>;
3233
3709
  defaults: z.ZodOptional<z.ZodObject<{
3234
- docker: z.ZodOptional<z.ZodObject<{
3710
+ docker: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
3711
+ /** Enable Docker containerization for this agent (default: false) */
3235
3712
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3713
+ /** Use ephemeral containers (fresh per job, auto-removed) vs persistent (reuse across jobs, kept for inspection) */
3714
+ ephemeral: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3715
+ /** Docker image to use (default: anthropic/claude-code:latest) */
3716
+ image: z.ZodOptional<z.ZodString>;
3717
+ /** Network isolation mode (default: bridge for full network access) */
3718
+ network: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "bridge", "host"]>>>;
3719
+ /** Memory limit (e.g., "2g", "512m") (default: 2g) */
3720
+ memory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3721
+ /** CPU shares (relative weight, 512 is normal) */
3722
+ cpu_shares: z.ZodOptional<z.ZodNumber>;
3723
+ /** Container user as "UID:GID" string (default: match host user) */
3724
+ user: z.ZodOptional<z.ZodString>;
3725
+ /** Maximum containers to keep per agent before cleanup (default: 5) */
3726
+ max_containers: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3727
+ /** Additional volume mounts in Docker format: "host:container:mode" */
3728
+ volumes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3729
+ /** Workspace mount mode: rw (read-write, default) or ro (read-only) */
3730
+ workspace_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["rw", "ro"]>>>;
3731
+ /** Environment variables to pass to the container (supports ${VAR} interpolation) */
3732
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
3733
+ /** @deprecated Use 'image' instead */
3236
3734
  base_image: z.ZodOptional<z.ZodString>;
3237
3735
  }, "strip", z.ZodTypeAny, {
3238
3736
  enabled: boolean;
3737
+ ephemeral: boolean;
3738
+ network: "none" | "bridge" | "host";
3739
+ memory: string;
3740
+ max_containers: number;
3741
+ workspace_mode: "rw" | "ro";
3742
+ image?: string | undefined;
3743
+ cpu_shares?: number | undefined;
3744
+ user?: string | undefined;
3745
+ volumes?: string[] | undefined;
3746
+ env?: Record<string, string> | undefined;
3747
+ base_image?: string | undefined;
3748
+ }, {
3749
+ enabled?: boolean | undefined;
3750
+ ephemeral?: boolean | undefined;
3751
+ image?: string | undefined;
3752
+ network?: "none" | "bridge" | "host" | undefined;
3753
+ memory?: string | undefined;
3754
+ cpu_shares?: number | undefined;
3755
+ user?: string | undefined;
3756
+ max_containers?: number | undefined;
3757
+ volumes?: string[] | undefined;
3758
+ workspace_mode?: "rw" | "ro" | undefined;
3759
+ env?: Record<string, string> | undefined;
3760
+ base_image?: string | undefined;
3761
+ }>, {
3762
+ enabled: boolean;
3763
+ ephemeral: boolean;
3764
+ network: "none" | "bridge" | "host";
3765
+ memory: string;
3766
+ max_containers: number;
3767
+ workspace_mode: "rw" | "ro";
3768
+ image?: string | undefined;
3769
+ cpu_shares?: number | undefined;
3770
+ user?: string | undefined;
3771
+ volumes?: string[] | undefined;
3772
+ env?: Record<string, string> | undefined;
3773
+ base_image?: string | undefined;
3774
+ }, {
3775
+ enabled?: boolean | undefined;
3776
+ ephemeral?: boolean | undefined;
3777
+ image?: string | undefined;
3778
+ network?: "none" | "bridge" | "host" | undefined;
3779
+ memory?: string | undefined;
3780
+ cpu_shares?: number | undefined;
3781
+ user?: string | undefined;
3782
+ max_containers?: number | undefined;
3783
+ volumes?: string[] | undefined;
3784
+ workspace_mode?: "rw" | "ro" | undefined;
3785
+ env?: Record<string, string> | undefined;
3786
+ base_image?: string | undefined;
3787
+ }>, {
3788
+ enabled: boolean;
3789
+ ephemeral: boolean;
3790
+ network: "none" | "bridge" | "host";
3791
+ memory: string;
3792
+ max_containers: number;
3793
+ workspace_mode: "rw" | "ro";
3794
+ image?: string | undefined;
3795
+ cpu_shares?: number | undefined;
3796
+ user?: string | undefined;
3797
+ volumes?: string[] | undefined;
3798
+ env?: Record<string, string> | undefined;
3799
+ base_image?: string | undefined;
3800
+ }, {
3801
+ enabled?: boolean | undefined;
3802
+ ephemeral?: boolean | undefined;
3803
+ image?: string | undefined;
3804
+ network?: "none" | "bridge" | "host" | undefined;
3805
+ memory?: string | undefined;
3806
+ cpu_shares?: number | undefined;
3807
+ user?: string | undefined;
3808
+ max_containers?: number | undefined;
3809
+ volumes?: string[] | undefined;
3810
+ workspace_mode?: "rw" | "ro" | undefined;
3811
+ env?: Record<string, string> | undefined;
3812
+ base_image?: string | undefined;
3813
+ }>, {
3814
+ enabled: boolean;
3815
+ ephemeral: boolean;
3816
+ network: "none" | "bridge" | "host";
3817
+ memory: string;
3818
+ max_containers: number;
3819
+ workspace_mode: "rw" | "ro";
3820
+ image?: string | undefined;
3821
+ cpu_shares?: number | undefined;
3822
+ user?: string | undefined;
3823
+ volumes?: string[] | undefined;
3824
+ env?: Record<string, string> | undefined;
3239
3825
  base_image?: string | undefined;
3240
3826
  }, {
3241
3827
  enabled?: boolean | undefined;
3828
+ ephemeral?: boolean | undefined;
3829
+ image?: string | undefined;
3830
+ network?: "none" | "bridge" | "host" | undefined;
3831
+ memory?: string | undefined;
3832
+ cpu_shares?: number | undefined;
3833
+ user?: string | undefined;
3834
+ max_containers?: number | undefined;
3835
+ volumes?: string[] | undefined;
3836
+ workspace_mode?: "rw" | "ro" | undefined;
3837
+ env?: Record<string, string> | undefined;
3242
3838
  base_image?: string | undefined;
3243
3839
  }>>;
3244
3840
  permissions: z.ZodOptional<z.ZodObject<{
3245
- mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan"]>>>;
3841
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "delegate", "dontAsk"]>>>;
3246
3842
  allowed_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3247
3843
  denied_tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
3248
3844
  bash: z.ZodOptional<z.ZodObject<{
@@ -3256,7 +3852,7 @@ export declare const FleetConfigSchema: z.ZodObject<{
3256
3852
  denied_patterns?: string[] | undefined;
3257
3853
  }>>;
3258
3854
  }, "strip", z.ZodTypeAny, {
3259
- mode: "default" | "acceptEdits" | "bypassPermissions" | "plan";
3855
+ mode: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk";
3260
3856
  allowed_tools?: string[] | undefined;
3261
3857
  denied_tools?: string[] | undefined;
3262
3858
  bash?: {
@@ -3264,7 +3860,7 @@ export declare const FleetConfigSchema: z.ZodObject<{
3264
3860
  denied_patterns?: string[] | undefined;
3265
3861
  } | undefined;
3266
3862
  }, {
3267
- mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
3863
+ mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
3268
3864
  allowed_tools?: string[] | undefined;
3269
3865
  denied_tools?: string[] | undefined;
3270
3866
  bash?: {
@@ -3365,6 +3961,22 @@ export declare const FleetConfigSchema: z.ZodObject<{
3365
3961
  }, {
3366
3962
  max_concurrent?: number | undefined;
3367
3963
  }>>;
3964
+ working_directory: z.ZodOptional<z.ZodLazy<z.ZodUnion<[z.ZodString, z.ZodObject<{
3965
+ root: z.ZodString;
3966
+ auto_clone: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3967
+ clone_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
3968
+ default_branch: z.ZodDefault<z.ZodOptional<z.ZodString>>;
3969
+ }, "strip", z.ZodTypeAny, {
3970
+ root: string;
3971
+ auto_clone: boolean;
3972
+ clone_depth: number;
3973
+ default_branch: string;
3974
+ }, {
3975
+ root: string;
3976
+ auto_clone?: boolean | undefined;
3977
+ clone_depth?: number | undefined;
3978
+ default_branch?: string | undefined;
3979
+ }>]>>>;
3368
3980
  session: z.ZodOptional<z.ZodObject<{
3369
3981
  max_turns: z.ZodOptional<z.ZodNumber>;
3370
3982
  timeout: z.ZodOptional<z.ZodString>;
@@ -3380,16 +3992,26 @@ export declare const FleetConfigSchema: z.ZodObject<{
3380
3992
  }>>;
3381
3993
  model: z.ZodOptional<z.ZodString>;
3382
3994
  max_turns: z.ZodOptional<z.ZodNumber>;
3383
- permission_mode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan"]>>;
3995
+ permission_mode: z.ZodOptional<z.ZodEnum<["default", "acceptEdits", "bypassPermissions", "plan", "delegate", "dontAsk"]>>;
3384
3996
  }, "strip", z.ZodTypeAny, {
3385
3997
  max_turns?: number | undefined;
3386
3998
  model?: string | undefined;
3387
3999
  docker?: {
3388
4000
  enabled: boolean;
4001
+ ephemeral: boolean;
4002
+ network: "none" | "bridge" | "host";
4003
+ memory: string;
4004
+ max_containers: number;
4005
+ workspace_mode: "rw" | "ro";
4006
+ image?: string | undefined;
4007
+ cpu_shares?: number | undefined;
4008
+ user?: string | undefined;
4009
+ volumes?: string[] | undefined;
4010
+ env?: Record<string, string> | undefined;
3389
4011
  base_image?: string | undefined;
3390
4012
  } | undefined;
3391
4013
  permissions?: {
3392
- mode: "default" | "acceptEdits" | "bypassPermissions" | "plan";
4014
+ mode: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk";
3393
4015
  allowed_tools?: string[] | undefined;
3394
4016
  denied_tools?: string[] | undefined;
3395
4017
  bash?: {
@@ -3421,21 +4043,37 @@ export declare const FleetConfigSchema: z.ZodObject<{
3421
4043
  instances?: {
3422
4044
  max_concurrent: number;
3423
4045
  } | undefined;
4046
+ working_directory?: string | {
4047
+ root: string;
4048
+ auto_clone: boolean;
4049
+ clone_depth: number;
4050
+ default_branch: string;
4051
+ } | undefined;
3424
4052
  session?: {
3425
4053
  max_turns?: number | undefined;
3426
4054
  timeout?: string | undefined;
3427
4055
  model?: string | undefined;
3428
4056
  } | undefined;
3429
- permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
4057
+ permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
3430
4058
  }, {
3431
4059
  max_turns?: number | undefined;
3432
4060
  model?: string | undefined;
3433
4061
  docker?: {
3434
4062
  enabled?: boolean | undefined;
4063
+ ephemeral?: boolean | undefined;
4064
+ image?: string | undefined;
4065
+ network?: "none" | "bridge" | "host" | undefined;
4066
+ memory?: string | undefined;
4067
+ cpu_shares?: number | undefined;
4068
+ user?: string | undefined;
4069
+ max_containers?: number | undefined;
4070
+ volumes?: string[] | undefined;
4071
+ workspace_mode?: "rw" | "ro" | undefined;
4072
+ env?: Record<string, string> | undefined;
3435
4073
  base_image?: string | undefined;
3436
4074
  } | undefined;
3437
4075
  permissions?: {
3438
- mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
4076
+ mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
3439
4077
  allowed_tools?: string[] | undefined;
3440
4078
  denied_tools?: string[] | undefined;
3441
4079
  bash?: {
@@ -3467,14 +4105,20 @@ export declare const FleetConfigSchema: z.ZodObject<{
3467
4105
  instances?: {
3468
4106
  max_concurrent?: number | undefined;
3469
4107
  } | undefined;
4108
+ working_directory?: string | {
4109
+ root: string;
4110
+ auto_clone?: boolean | undefined;
4111
+ clone_depth?: number | undefined;
4112
+ default_branch?: string | undefined;
4113
+ } | undefined;
3470
4114
  session?: {
3471
4115
  max_turns?: number | undefined;
3472
4116
  timeout?: string | undefined;
3473
4117
  model?: string | undefined;
3474
4118
  } | undefined;
3475
- permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
4119
+ permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
3476
4120
  }>>;
3477
- workspace: z.ZodOptional<z.ZodObject<{
4121
+ working_directory: z.ZodOptional<z.ZodObject<{
3478
4122
  root: z.ZodString;
3479
4123
  auto_clone: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
3480
4124
  clone_depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
@@ -3540,14 +4184,134 @@ export declare const FleetConfigSchema: z.ZodObject<{
3540
4184
  port?: number | undefined;
3541
4185
  secret_env?: string | undefined;
3542
4186
  }>>;
3543
- docker: z.ZodOptional<z.ZodObject<{
4187
+ docker: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
4188
+ /** Enable Docker containerization for this agent (default: false) */
3544
4189
  enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4190
+ /** Use ephemeral containers (fresh per job, auto-removed) vs persistent (reuse across jobs, kept for inspection) */
4191
+ ephemeral: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
4192
+ /** Docker image to use (default: anthropic/claude-code:latest) */
4193
+ image: z.ZodOptional<z.ZodString>;
4194
+ /** Network isolation mode (default: bridge for full network access) */
4195
+ network: z.ZodDefault<z.ZodOptional<z.ZodEnum<["none", "bridge", "host"]>>>;
4196
+ /** Memory limit (e.g., "2g", "512m") (default: 2g) */
4197
+ memory: z.ZodDefault<z.ZodOptional<z.ZodString>>;
4198
+ /** CPU shares (relative weight, 512 is normal) */
4199
+ cpu_shares: z.ZodOptional<z.ZodNumber>;
4200
+ /** Container user as "UID:GID" string (default: match host user) */
4201
+ user: z.ZodOptional<z.ZodString>;
4202
+ /** Maximum containers to keep per agent before cleanup (default: 5) */
4203
+ max_containers: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
4204
+ /** Additional volume mounts in Docker format: "host:container:mode" */
4205
+ volumes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4206
+ /** Workspace mount mode: rw (read-write, default) or ro (read-only) */
4207
+ workspace_mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["rw", "ro"]>>>;
4208
+ /** Environment variables to pass to the container (supports ${VAR} interpolation) */
4209
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4210
+ /** @deprecated Use 'image' instead */
3545
4211
  base_image: z.ZodOptional<z.ZodString>;
3546
4212
  }, "strip", z.ZodTypeAny, {
3547
4213
  enabled: boolean;
4214
+ ephemeral: boolean;
4215
+ network: "none" | "bridge" | "host";
4216
+ memory: string;
4217
+ max_containers: number;
4218
+ workspace_mode: "rw" | "ro";
4219
+ image?: string | undefined;
4220
+ cpu_shares?: number | undefined;
4221
+ user?: string | undefined;
4222
+ volumes?: string[] | undefined;
4223
+ env?: Record<string, string> | undefined;
3548
4224
  base_image?: string | undefined;
3549
4225
  }, {
3550
4226
  enabled?: boolean | undefined;
4227
+ ephemeral?: boolean | undefined;
4228
+ image?: string | undefined;
4229
+ network?: "none" | "bridge" | "host" | undefined;
4230
+ memory?: string | undefined;
4231
+ cpu_shares?: number | undefined;
4232
+ user?: string | undefined;
4233
+ max_containers?: number | undefined;
4234
+ volumes?: string[] | undefined;
4235
+ workspace_mode?: "rw" | "ro" | undefined;
4236
+ env?: Record<string, string> | undefined;
4237
+ base_image?: string | undefined;
4238
+ }>, {
4239
+ enabled: boolean;
4240
+ ephemeral: boolean;
4241
+ network: "none" | "bridge" | "host";
4242
+ memory: string;
4243
+ max_containers: number;
4244
+ workspace_mode: "rw" | "ro";
4245
+ image?: string | undefined;
4246
+ cpu_shares?: number | undefined;
4247
+ user?: string | undefined;
4248
+ volumes?: string[] | undefined;
4249
+ env?: Record<string, string> | undefined;
4250
+ base_image?: string | undefined;
4251
+ }, {
4252
+ enabled?: boolean | undefined;
4253
+ ephemeral?: boolean | undefined;
4254
+ image?: string | undefined;
4255
+ network?: "none" | "bridge" | "host" | undefined;
4256
+ memory?: string | undefined;
4257
+ cpu_shares?: number | undefined;
4258
+ user?: string | undefined;
4259
+ max_containers?: number | undefined;
4260
+ volumes?: string[] | undefined;
4261
+ workspace_mode?: "rw" | "ro" | undefined;
4262
+ env?: Record<string, string> | undefined;
4263
+ base_image?: string | undefined;
4264
+ }>, {
4265
+ enabled: boolean;
4266
+ ephemeral: boolean;
4267
+ network: "none" | "bridge" | "host";
4268
+ memory: string;
4269
+ max_containers: number;
4270
+ workspace_mode: "rw" | "ro";
4271
+ image?: string | undefined;
4272
+ cpu_shares?: number | undefined;
4273
+ user?: string | undefined;
4274
+ volumes?: string[] | undefined;
4275
+ env?: Record<string, string> | undefined;
4276
+ base_image?: string | undefined;
4277
+ }, {
4278
+ enabled?: boolean | undefined;
4279
+ ephemeral?: boolean | undefined;
4280
+ image?: string | undefined;
4281
+ network?: "none" | "bridge" | "host" | undefined;
4282
+ memory?: string | undefined;
4283
+ cpu_shares?: number | undefined;
4284
+ user?: string | undefined;
4285
+ max_containers?: number | undefined;
4286
+ volumes?: string[] | undefined;
4287
+ workspace_mode?: "rw" | "ro" | undefined;
4288
+ env?: Record<string, string> | undefined;
4289
+ base_image?: string | undefined;
4290
+ }>, {
4291
+ enabled: boolean;
4292
+ ephemeral: boolean;
4293
+ network: "none" | "bridge" | "host";
4294
+ memory: string;
4295
+ max_containers: number;
4296
+ workspace_mode: "rw" | "ro";
4297
+ image?: string | undefined;
4298
+ cpu_shares?: number | undefined;
4299
+ user?: string | undefined;
4300
+ volumes?: string[] | undefined;
4301
+ env?: Record<string, string> | undefined;
4302
+ base_image?: string | undefined;
4303
+ }, {
4304
+ enabled?: boolean | undefined;
4305
+ ephemeral?: boolean | undefined;
4306
+ image?: string | undefined;
4307
+ network?: "none" | "bridge" | "host" | undefined;
4308
+ memory?: string | undefined;
4309
+ cpu_shares?: number | undefined;
4310
+ user?: string | undefined;
4311
+ max_containers?: number | undefined;
4312
+ volumes?: string[] | undefined;
4313
+ workspace_mode?: "rw" | "ro" | undefined;
4314
+ env?: Record<string, string> | undefined;
3551
4315
  base_image?: string | undefined;
3552
4316
  }>>;
3553
4317
  }, "strict", z.ZodTypeAny, {
@@ -3558,20 +4322,30 @@ export declare const FleetConfigSchema: z.ZodObject<{
3558
4322
  }[];
3559
4323
  docker?: {
3560
4324
  enabled: boolean;
4325
+ ephemeral: boolean;
4326
+ network: "none" | "bridge" | "host";
4327
+ memory: string;
4328
+ max_containers: number;
4329
+ workspace_mode: "rw" | "ro";
4330
+ image?: string | undefined;
4331
+ cpu_shares?: number | undefined;
4332
+ user?: string | undefined;
4333
+ volumes?: string[] | undefined;
4334
+ env?: Record<string, string> | undefined;
3561
4335
  base_image?: string | undefined;
3562
4336
  } | undefined;
4337
+ working_directory?: {
4338
+ root: string;
4339
+ auto_clone: boolean;
4340
+ clone_depth: number;
4341
+ default_branch: string;
4342
+ } | undefined;
3563
4343
  chat?: {
3564
4344
  discord?: {
3565
4345
  enabled: boolean;
3566
4346
  token_env?: string | undefined;
3567
4347
  } | undefined;
3568
4348
  } | undefined;
3569
- workspace?: {
3570
- root: string;
3571
- auto_clone: boolean;
3572
- clone_depth: number;
3573
- default_branch: string;
3574
- } | undefined;
3575
4349
  fleet?: {
3576
4350
  name?: string | undefined;
3577
4351
  description?: string | undefined;
@@ -3581,10 +4355,20 @@ export declare const FleetConfigSchema: z.ZodObject<{
3581
4355
  model?: string | undefined;
3582
4356
  docker?: {
3583
4357
  enabled: boolean;
4358
+ ephemeral: boolean;
4359
+ network: "none" | "bridge" | "host";
4360
+ memory: string;
4361
+ max_containers: number;
4362
+ workspace_mode: "rw" | "ro";
4363
+ image?: string | undefined;
4364
+ cpu_shares?: number | undefined;
4365
+ user?: string | undefined;
4366
+ volumes?: string[] | undefined;
4367
+ env?: Record<string, string> | undefined;
3584
4368
  base_image?: string | undefined;
3585
4369
  } | undefined;
3586
4370
  permissions?: {
3587
- mode: "default" | "acceptEdits" | "bypassPermissions" | "plan";
4371
+ mode: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk";
3588
4372
  allowed_tools?: string[] | undefined;
3589
4373
  denied_tools?: string[] | undefined;
3590
4374
  bash?: {
@@ -3616,12 +4400,18 @@ export declare const FleetConfigSchema: z.ZodObject<{
3616
4400
  instances?: {
3617
4401
  max_concurrent: number;
3618
4402
  } | undefined;
4403
+ working_directory?: string | {
4404
+ root: string;
4405
+ auto_clone: boolean;
4406
+ clone_depth: number;
4407
+ default_branch: string;
4408
+ } | undefined;
3619
4409
  session?: {
3620
4410
  max_turns?: number | undefined;
3621
4411
  timeout?: string | undefined;
3622
4412
  model?: string | undefined;
3623
4413
  } | undefined;
3624
- permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
4414
+ permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
3625
4415
  } | undefined;
3626
4416
  webhooks?: {
3627
4417
  enabled: boolean;
@@ -3631,20 +4421,30 @@ export declare const FleetConfigSchema: z.ZodObject<{
3631
4421
  }, {
3632
4422
  docker?: {
3633
4423
  enabled?: boolean | undefined;
4424
+ ephemeral?: boolean | undefined;
4425
+ image?: string | undefined;
4426
+ network?: "none" | "bridge" | "host" | undefined;
4427
+ memory?: string | undefined;
4428
+ cpu_shares?: number | undefined;
4429
+ user?: string | undefined;
4430
+ max_containers?: number | undefined;
4431
+ volumes?: string[] | undefined;
4432
+ workspace_mode?: "rw" | "ro" | undefined;
4433
+ env?: Record<string, string> | undefined;
3634
4434
  base_image?: string | undefined;
3635
4435
  } | undefined;
4436
+ working_directory?: {
4437
+ root: string;
4438
+ auto_clone?: boolean | undefined;
4439
+ clone_depth?: number | undefined;
4440
+ default_branch?: string | undefined;
4441
+ } | undefined;
3636
4442
  chat?: {
3637
4443
  discord?: {
3638
4444
  token_env?: string | undefined;
3639
4445
  enabled?: boolean | undefined;
3640
4446
  } | undefined;
3641
4447
  } | undefined;
3642
- workspace?: {
3643
- root: string;
3644
- auto_clone?: boolean | undefined;
3645
- clone_depth?: number | undefined;
3646
- default_branch?: string | undefined;
3647
- } | undefined;
3648
4448
  version?: number | undefined;
3649
4449
  fleet?: {
3650
4450
  name?: string | undefined;
@@ -3655,10 +4455,20 @@ export declare const FleetConfigSchema: z.ZodObject<{
3655
4455
  model?: string | undefined;
3656
4456
  docker?: {
3657
4457
  enabled?: boolean | undefined;
4458
+ ephemeral?: boolean | undefined;
4459
+ image?: string | undefined;
4460
+ network?: "none" | "bridge" | "host" | undefined;
4461
+ memory?: string | undefined;
4462
+ cpu_shares?: number | undefined;
4463
+ user?: string | undefined;
4464
+ max_containers?: number | undefined;
4465
+ volumes?: string[] | undefined;
4466
+ workspace_mode?: "rw" | "ro" | undefined;
4467
+ env?: Record<string, string> | undefined;
3658
4468
  base_image?: string | undefined;
3659
4469
  } | undefined;
3660
4470
  permissions?: {
3661
- mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
4471
+ mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
3662
4472
  allowed_tools?: string[] | undefined;
3663
4473
  denied_tools?: string[] | undefined;
3664
4474
  bash?: {
@@ -3690,12 +4500,18 @@ export declare const FleetConfigSchema: z.ZodObject<{
3690
4500
  instances?: {
3691
4501
  max_concurrent?: number | undefined;
3692
4502
  } | undefined;
4503
+ working_directory?: string | {
4504
+ root: string;
4505
+ auto_clone?: boolean | undefined;
4506
+ clone_depth?: number | undefined;
4507
+ default_branch?: string | undefined;
4508
+ } | undefined;
3693
4509
  session?: {
3694
4510
  max_turns?: number | undefined;
3695
4511
  timeout?: string | undefined;
3696
4512
  model?: string | undefined;
3697
4513
  } | undefined;
3698
- permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | undefined;
4514
+ permission_mode?: "default" | "acceptEdits" | "bypassPermissions" | "plan" | "delegate" | "dontAsk" | undefined;
3699
4515
  } | undefined;
3700
4516
  agents?: {
3701
4517
  path: string;
@@ -3717,9 +4533,10 @@ export type GitHubWorkSource = z.infer<typeof GitHubWorkSourceSchema>;
3717
4533
  export type BaseWorkSource = z.infer<typeof BaseWorkSourceSchema>;
3718
4534
  export type WorkSource = z.infer<typeof WorkSourceSchema>;
3719
4535
  export type Instances = z.infer<typeof InstancesSchema>;
4536
+ export type DockerInput = z.input<typeof DockerSchema>;
3720
4537
  export type Docker = z.infer<typeof DockerSchema>;
3721
4538
  export type Defaults = z.infer<typeof DefaultsSchema>;
3722
- export type Workspace = z.infer<typeof WorkspaceSchema>;
4539
+ export type WorkingDirectory = z.infer<typeof WorkingDirectorySchema>;
3723
4540
  export type AgentOverrides = z.infer<typeof AgentOverridesSchema>;
3724
4541
  export type AgentReference = z.infer<typeof AgentReferenceSchema>;
3725
4542
  export type DiscordChat = z.infer<typeof DiscordChatSchema>;
@@ -3737,7 +4554,7 @@ export type DiscordChannel = z.infer<typeof DiscordChannelSchema>;
3737
4554
  export type DiscordGuild = z.infer<typeof DiscordGuildSchema>;
3738
4555
  export type AgentChatDiscord = z.infer<typeof AgentChatDiscordSchema>;
3739
4556
  export type AgentChat = z.infer<typeof AgentChatSchema>;
3740
- export type AgentWorkspace = z.infer<typeof AgentWorkspaceSchema>;
4557
+ export type AgentWorkingDirectory = z.infer<typeof AgentWorkingDirectorySchema>;
3741
4558
  export type AgentConfig = z.infer<typeof AgentConfigSchema>;
3742
4559
  export type HookEvent = z.infer<typeof HookEventSchema>;
3743
4560
  export type ShellHookConfig = z.infer<typeof ShellHookConfigSchema>;