Allow named MCP servers in Claude stages
Add validated per-stage MCP allowlists while keeping builtin tools separate. Enable matching Claude Code permission rules only for Claude stages, reject unsupported harnesses, and document the unattended-stage safety model.
This commit is contained in:
@@ -118,6 +118,14 @@ func (ModelStage) Spec(def Definition) (ModelSpec, error) {
|
||||
return ModelSpec{}, err
|
||||
}
|
||||
}
|
||||
if backend != ClaudeBackend {
|
||||
tools, _, _ := ToolNames(def)
|
||||
if mcp, err := MCPTools(tools); err != nil {
|
||||
return ModelSpec{}, err
|
||||
} else if len(mcp) > 0 {
|
||||
return ModelSpec{}, fmt.Errorf("named MCP tools are supported only by the claude harness; remove mcp: entries or set harness=claude")
|
||||
}
|
||||
}
|
||||
if backend == ClaudeBackend {
|
||||
if def.Configs["provider"] != ClaudeProvider {
|
||||
return ModelSpec{}, fmt.Errorf("the claude harness needs provider=%s", ClaudeProvider)
|
||||
|
||||
Reference in New Issue
Block a user