UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

19 lines (18 loc) 894 B
import { _ as resolveConfiguredAgentId, f as resolveAgentOperationAgentId, m as resolveAgentWorkspaceDir } from "./agent-scope-config-DcbEhP0R.js"; import "./agent-scope-DbtJyKUL.js"; //#region src/commands/channel-setup/owner.ts /** Validate the selected operation owner before using its workspace for discovery. */ function resolveChannelSetupOwner(cfg, requestedAgentId) { const requested = requestedAgentId?.trim(); if (requestedAgentId !== void 0 && !requested) throw new Error("--agent must not be blank"); const agentId = resolveConfiguredAgentId(cfg, requested ?? resolveAgentOperationAgentId(cfg, void 0, { surface: "channel plugin discovery", hint: "Pass --agent <id> to channels commands or set agents.defaults.systemAgent.agentId." })); return { agentId, workspaceDir: resolveAgentWorkspaceDir(cfg, agentId) }; } //#endregion export { resolveChannelSetupOwner as t };