|
721 | 721 | "$ref": "#/definitions/llmConfig", |
722 | 722 | "description": "Default LLM configuration for all chat steps in the DAG. Steps with type: chat inherit this configuration if they don't specify their own llm field. If a step specifies llm, it completely overrides the DAG-level configuration." |
723 | 723 | }, |
| 724 | + "harness": { |
| 725 | + "$ref": "#/definitions/harnessDefaultsConfig", |
| 726 | + "description": "Default harness configuration for coding-agent steps in the DAG. Steps with type: harness inherit these defaults, and steps without an explicit type are treated as harness steps when this block is present. Step-level config overrides primary keys and replaces DAG-level fallback when fallback is set." |
| 727 | + }, |
| 728 | + "harnesses": { |
| 729 | + "$ref": "#/definitions/harnessDefinitions", |
| 730 | + "description": "Reusable custom harness definitions available to harness steps. Each definition describes how to invoke a named harness CLI; steps reference definitions via config.provider." |
| 731 | + }, |
724 | 732 | "steps": { |
725 | 733 | "oneOf": [ |
726 | 734 | { |
|
1727 | 1735 | } |
1728 | 1736 | } |
1729 | 1737 | }, |
| 1738 | + { |
| 1739 | + "if": { "properties": { "type": { "const": "harness" } } }, |
| 1740 | + "then": { |
| 1741 | + "properties": { |
| 1742 | + "config": { "$ref": "#/definitions/harnessExecutorConfig" } |
| 1743 | + } |
| 1744 | + } |
| 1745 | + }, |
1730 | 1746 | { |
1731 | 1747 | "if": { |
1732 | 1748 | "properties": { "type": { "const": "router" } }, |
|
3260 | 3276 | ], |
3261 | 3277 | "description": "Redis executor configuration for executing Redis commands, managing cache, pub/sub, streams, and distributed locks." |
3262 | 3278 | }, |
| 3279 | + "harnessConfigScalar": { |
| 3280 | + "oneOf": [ |
| 3281 | + { "type": "string" }, |
| 3282 | + { "type": "number" }, |
| 3283 | + { "type": "boolean" } |
| 3284 | + ], |
| 3285 | + "description": "Scalar harness flag value." |
| 3286 | + }, |
| 3287 | + "harnessConfigValue": { |
| 3288 | + "oneOf": [ |
| 3289 | + { |
| 3290 | + "$ref": "#/definitions/harnessConfigScalar" |
| 3291 | + }, |
| 3292 | + { |
| 3293 | + "type": "array", |
| 3294 | + "items": { |
| 3295 | + "$ref": "#/definitions/harnessConfigScalar" |
| 3296 | + } |
| 3297 | + } |
| 3298 | + ], |
| 3299 | + "description": "Harness flag value. Scalars become a single CLI flag value; arrays become repeated flags." |
| 3300 | + }, |
| 3301 | + "harnessNamedDefinition": { |
| 3302 | + "type": "object", |
| 3303 | + "additionalProperties": false, |
| 3304 | + "required": ["binary"], |
| 3305 | + "allOf": [ |
| 3306 | + { |
| 3307 | + "if": { |
| 3308 | + "properties": { |
| 3309 | + "prompt_mode": { "const": "flag" } |
| 3310 | + }, |
| 3311 | + "required": ["prompt_mode"] |
| 3312 | + }, |
| 3313 | + "then": { |
| 3314 | + "required": ["prompt_flag"] |
| 3315 | + } |
| 3316 | + }, |
| 3317 | + { |
| 3318 | + "if": { |
| 3319 | + "required": ["prompt_flag"] |
| 3320 | + }, |
| 3321 | + "then": { |
| 3322 | + "properties": { |
| 3323 | + "prompt_mode": { "const": "flag" } |
| 3324 | + }, |
| 3325 | + "required": ["prompt_mode"] |
| 3326 | + } |
| 3327 | + } |
| 3328 | + ], |
| 3329 | + "properties": { |
| 3330 | + "binary": { |
| 3331 | + "type": "string", |
| 3332 | + "description": "CLI binary name or path for the custom harness." |
| 3333 | + }, |
| 3334 | + "prefix_args": { |
| 3335 | + "type": "array", |
| 3336 | + "items": { |
| 3337 | + "type": "string" |
| 3338 | + }, |
| 3339 | + "description": "Arguments that always appear before prompt placement and runtime flags." |
| 3340 | + }, |
| 3341 | + "prompt_mode": { |
| 3342 | + "type": "string", |
| 3343 | + "enum": ["arg", "flag", "stdin"], |
| 3344 | + "description": "How the prompt is passed to the CLI." |
| 3345 | + }, |
| 3346 | + "prompt_flag": { |
| 3347 | + "type": "string", |
| 3348 | + "description": "Flag token used when prompt_mode is flag." |
| 3349 | + }, |
| 3350 | + "prompt_position": { |
| 3351 | + "type": "string", |
| 3352 | + "enum": ["before_flags", "after_flags"], |
| 3353 | + "description": "Whether prompt tokens appear before or after runtime flags." |
| 3354 | + }, |
| 3355 | + "flag_style": { |
| 3356 | + "type": "string", |
| 3357 | + "enum": ["gnu_long", "single_dash"], |
| 3358 | + "description": "Default flag prefix style for runtime options that do not have an explicit option_flags override." |
| 3359 | + }, |
| 3360 | + "option_flags": { |
| 3361 | + "type": "object", |
| 3362 | + "additionalProperties": { |
| 3363 | + "type": "string" |
| 3364 | + }, |
| 3365 | + "description": "Per-option override mapping from config key to exact CLI flag token." |
| 3366 | + } |
| 3367 | + } |
| 3368 | + }, |
| 3369 | + "harnessDefinitions": { |
| 3370 | + "type": "object", |
| 3371 | + "additionalProperties": { |
| 3372 | + "oneOf": [ |
| 3373 | + { "$ref": "#/definitions/harnessNamedDefinition" }, |
| 3374 | + { "type": "null" } |
| 3375 | + ] |
| 3376 | + }, |
| 3377 | + "description": "Reusable named custom harness definitions. Null entries remove inherited definitions from base config." |
| 3378 | + }, |
| 3379 | + "harnessProviderConfig": { |
| 3380 | + "type": "object", |
| 3381 | + "propertyNames": { |
| 3382 | + "not": { |
| 3383 | + "enum": ["binary", "prompt_args", "fallback"] |
| 3384 | + } |
| 3385 | + }, |
| 3386 | + "properties": { |
| 3387 | + "provider": { |
| 3388 | + "type": "string", |
| 3389 | + "description": "Harness provider name. May reference a built-in provider such as claude, codex, copilot, opencode, or pi, or a custom top-level harnesses entry. Supports ${VAR} interpolation." |
| 3390 | + } |
| 3391 | + }, |
| 3392 | + "additionalProperties": { |
| 3393 | + "$ref": "#/definitions/harnessConfigValue" |
| 3394 | + }, |
| 3395 | + "required": ["provider"], |
| 3396 | + "description": "Primary or fallback harness provider configuration. Reserved keys are provider and fallback; all other keys are passed through to the CLI as flags." |
| 3397 | + }, |
| 3398 | + "harnessExecutorConfig": { |
| 3399 | + "type": "object", |
| 3400 | + "propertyNames": { |
| 3401 | + "not": { |
| 3402 | + "enum": ["binary", "prompt_args"] |
| 3403 | + } |
| 3404 | + }, |
| 3405 | + "properties": { |
| 3406 | + "provider": { |
| 3407 | + "type": "string", |
| 3408 | + "description": "Harness provider name. May reference a built-in provider such as claude, codex, copilot, opencode, or pi, or a custom top-level harnesses entry. Supports ${VAR} interpolation." |
| 3409 | + }, |
| 3410 | + "fallback": { |
| 3411 | + "type": "array", |
| 3412 | + "items": { |
| 3413 | + "$ref": "#/definitions/harnessProviderConfig" |
| 3414 | + }, |
| 3415 | + "description": "Ordered fallback harness provider configs tried after the primary config fails. The fallback key is reserved and is not passed through as a CLI flag." |
| 3416 | + } |
| 3417 | + }, |
| 3418 | + "additionalProperties": { |
| 3419 | + "$ref": "#/definitions/harnessConfigValue" |
| 3420 | + }, |
| 3421 | + "description": "Harness step configuration. Unknown keys are passed through to the CLI as flags. When no DAG-level harness defaults exist, specify provider." |
| 3422 | + }, |
| 3423 | + "harnessDefaultsConfig": { |
| 3424 | + "allOf": [ |
| 3425 | + { |
| 3426 | + "$ref": "#/definitions/harnessExecutorConfig" |
| 3427 | + }, |
| 3428 | + { "required": ["provider"] } |
| 3429 | + ], |
| 3430 | + "description": "DAG-level harness defaults. Specify provider plus optional CLI flags and fallback providers." |
| 3431 | + }, |
3263 | 3432 | "kubernetesKeySelector": { |
3264 | 3433 | "type": "object", |
3265 | 3434 | "additionalProperties": false, |
|
4707 | 4876 | "postgres", |
4708 | 4877 | "sqlite", |
4709 | 4878 | "redis", |
| 4879 | + "harness", |
4710 | 4880 | "router", |
4711 | 4881 | "agent" |
4712 | 4882 | ], |
|
4833 | 5003 | } |
4834 | 5004 | } |
4835 | 5005 | }, |
| 5006 | + { |
| 5007 | + "if": { "properties": { "type": { "const": "harness" } } }, |
| 5008 | + "then": { |
| 5009 | + "properties": { |
| 5010 | + "config": { "$ref": "#/definitions/harnessExecutorConfig" } |
| 5011 | + } |
| 5012 | + } |
| 5013 | + }, |
4836 | 5014 | { |
4837 | 5015 | "if": { "properties": { "type": { "enum": ["command", "shell"] } } }, |
4838 | 5016 | "then": { |
|
0 commit comments