You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: rename agent_spec.format → outputFormat + guard registration collisions (#1127)
The flat composite registration in buildRegistrationSchema used a silent
"first wins" merge across per-action fields. agent_spec.format (enum
full|prompt-only, default full) was registered before doctor.format and
init.format (enum table|json), so the SDK-level schema injected the wrong
default into every orchestrate call and rejected doctor/init's valid
format values at the MCP boundary. Parity tests missed it because they
dispatch() directly, bypassing the registered SDK schema.
Rename agent_spec.format → outputFormat to eliminate the current
collision. Add a narrow collision-detection guard that throws at
registration time when two actions declare the same field with
incompatible base types, different enum value sets, or different
defaults — catching the class of bug structurally. Constraint drift
(min/max/optionality) remains first-wins since handler-level schemas
re-validate.
New regression tests exercise the real exarchos_orchestrate registry
through the registration schema, confirming doctor({}),
doctor({format:'json'}), init({nonInteractive:true}), and
agent_spec({outputFormat:...}) are all reachable end-to-end.
Closes#1127.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(mcp): classify ZodLiteral/NativeEnum/Union as enum for collision detection
Addresses CodeRabbit feedback on PR #1144: the contract classifier
treated ZodLiteral, ZodNativeEnum, and ZodUnion as 'other', which
meant describeContractConflict couldn't spot mismatches between
two actions declaring the same field with incompatible literal
values, native-enum sets, or union-of-literals sets — exactly the
#1127-class hazard the registration-time guard is meant to catch.
Teach extractEnumValues to pull values from:
* ZodLiteral (1-member enum; JSON-stringified for non-string values)
* ZodNativeEnum (TS enum values, dedup-stringified)
* ZodUnion whose branches are all ZodLiteral
Heterogeneous unions (e.g. z.union([z.string(), z.array(z.string())]))
still fall through to baseKind, preserving current behavior — only
the enum-ish cases get new scrutiny.
Also adds the regression tests CodeRabbit called out:
* default-only collision ('full' vs 'json' on same base type)
* literal-valued field with different values
* union-of-literals with divergent value sets
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Copy file name to clipboardExpand all lines: documentation/reference/tools/orchestrate.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -360,15 +360,15 @@ Retrieve an agent specification for subagent dispatch. Returns the agent's syste
360
360
{
361
361
"action": "agent_spec",
362
362
"agent": "implementer",
363
-
"format": "full"
363
+
"outputFormat": "full"
364
364
}
365
365
```
366
366
367
367
| Parameter | Required | Type | Description |
368
368
|-----------|----------|------|-------------|
369
369
|`agent`| yes | string (enum) | Agent identifier from the registered spec list |
370
370
|`context`| no | object | Key-value pairs for template variable interpolation in prompts |
371
-
|`format`| no |`"full"`\|`"prompt-only"` (default: `"full"`) |`full` returns the complete spec; `prompt-only` returns just the system prompt |
371
+
|`outputFormat`| no |`"full"`\|`"prompt-only"` (default: `"full"`) |`full` returns the complete spec; `prompt-only` returns just the system prompt. Renamed from `format` in #1127 to avoid a registration collision with the `format: "table" \| "json"` parameter on `doctor` and `init`.|
0 commit comments