mirror of
https://github.com/qwibitai/nanoclaw.git
synced 2026-07-09 18:57:08 +08:00
feat(harness): ncl surface for harness capabilities + dispatch escalation gate
groups config update gains --harness-capabilities 'k=on|off|default[,...]' (JSON-column read-modify-write, validated against the registry; a harness-only update passes the nothing-to-update guard). config get renders raw overrides plus a resolved view with (default)/(override) markers. dispatch blocks the arg from group-scoped agents exactly like cli_scope — an agent cannot re-enable capabilities its operator turned off. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -91,6 +91,13 @@ export async function dispatch(
|
||||
return err(req.id, 'forbidden', 'Cannot change cli_scope from a group-scoped agent.');
|
||||
}
|
||||
|
||||
// Same escalation shape for harness capabilities: an agent must not be
|
||||
// able to re-enable harness features (agent teams, Workflow) that the
|
||||
// operator turned off for its group.
|
||||
if (req.args.harness_capabilities !== undefined || req.args['harness-capabilities'] !== undefined) {
|
||||
return err(req.id, 'forbidden', 'Cannot change harness_capabilities from a group-scoped agent.');
|
||||
}
|
||||
|
||||
// Auto-fill agent-group-related args so the agent doesn't need
|
||||
// to pass its own group ID explicitly.
|
||||
const fill: Record<string, unknown> = {
|
||||
|
||||
Reference in New Issue
Block a user