refactor(cli): make multi-agent operations agent-owned (#123871)

* refactor(cli): make multi-agent operations agent-owned

* fix(cli): keep provider setup on agent target

* fix(cli): preserve legacy operation ownership

* fix(cli): align capability target calls with current resolver

* fix(cli): preserve operation-specific agent errors

* fix(cli): keep allowlist selection agent-scoped

* fix(cli): preserve agent-owned model operations

* fix(cli): preserve list-form agent rosters

---------

Co-authored-by: Josh Lehman <550978+jalehman@users.noreply.github.com>
This commit is contained in:
Jacqueline Henriksen
2026-08-19 19:54:00 -07:00
committed by GitHub
parent 29cfd195d1
commit eed64163b6
14 changed files with 523 additions and 50 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import {
parseStrictFiniteNumber,
parseStrictPositiveInteger,
} from "@openclaw/normalization-core/number-coercion";
import { listAgentIds, resolveAmbientOwnerAgentId } from "../../agents/agent-scope-config.js";
import { listAgentIds, resolveAgentOperationAgentId } from "../../agents/agent-scope-config.js";
import { resolveAgentDir } from "../../agents/agent-scope.js";
import {
listProfilesForProvider,
@@ -111,7 +111,7 @@ export function resolveCapabilityProviderAgentId(
if (rawAgentId !== undefined && !requestedAgentId) {
throw new Error("--agent must not be blank");
}
const agentId = resolveAmbientOwnerAgentId(cfg, requestedAgentId, {
const agentId = resolveAgentOperationAgentId(cfg, requestedAgentId, {
surface,
hint: "Pass --agent <id> or set agents.defaults.systemAgent.agentId.",
});