UNPKG

openclaw

Version:

Multi-channel AI gateway with extensible messaging integrations

31 lines (30 loc) • 1.31 kB
import { n as isImplicitAcpWorkspaceCandidate, p as resolveAgentWorkspaceProvisioning } from "./agent-scope-config-DmXgFGKP.mjs"; import { n as resolveAcpSessionCwd } from "./session-identifiers-dCLUDxk0.mjs"; //#region src/agents/acp-workspace-provisioning.ts /** * Turn-level ACP workspace provisioning resolution (#92015). * * Resolves the provisioning mode for one concrete invocation by using the * invocation's own cwd — the live session's ACP meta cwd first, then the * configured ACP binding that owns the session key — instead of an agent-wide * binding scan, so mixed-binding agents and workspace-equal cwds keep standard * bootstrap behavior. */ async function resolveAcpAgentWorkspaceProvisioningForTurn(e) { if (!isImplicitAcpWorkspaceCandidate(e.cfg, e.agentId)) return "standard"; const t = e.workspaceDir ? { workspaceDir: e.workspaceDir } : void 0; let n = e.cwd || resolveAcpSessionCwd(e.sessionEntry?.acp); if (!n && e.sessionKey) { const { resolveConfiguredAcpBindingSpecBySessionKey: t } = await import("./persistent-bindings.resolve-Dc7EimQh.mjs"); n = t({ cfg: e.cfg, sessionKey: e.sessionKey })?.cwd; } return resolveAgentWorkspaceProvisioning(e.cfg, e.agentId, n ? { ...t, cwd: n } : t); } //#endregion export { resolveAcpAgentWorkspaceProvisioningForTurn };