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:
Gabi Simons
2026-07-08 15:19:01 +03:00
parent 155e685c58
commit 8bdcf20a89
4 changed files with 194 additions and 5 deletions
+7
View File
@@ -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> = {