fix: retain warm sandbox bindings independently of worktree settings

Validate live engine coverage and physical sandbox reuse in deployed acceptance.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-07 14:56:30 -05:00
1 parent a5d7df55f6
commit e8a6fb02bf
7 files changed
+116 -8

No files matched your search

+13
View File
@@ -16,6 +16,19 @@ export interface DeployedStack {
profiles: Array<{ id: string; adapterType: string; engine: string; model: string; qualification: string; agentId: string }>;
}
/** Derive coverage from the live configuration, never a manifest's label. */
export function deployedAgentEngine(agent: { adapterType: string; adapterConfig: Record<string, unknown> }): string {
const config = agent.adapterConfig;
if (agent.adapterType === "paperclip_runner") {
assert(config.provider === "codex" || config.provider === "opencode" || config.provider === "acpx", "Unknown native provider");
if (config.provider !== "acpx") return config.provider;
assert(typeof config.acpxAgent === "string" && config.acpxAgent.length > 0, "Missing native ACPX engine");
return `acpx:${config.acpxAgent}`;
}
assert(config.engine === undefined || config.engine === "cli" || config.engine === "acp", "Unknown legacy engine");
return config.engine === "acp" ? "acp" : "cli";
}
export function loadDeployedStack(): DeployedStack {
const filename = process.env.PAPERCLIP_DEPLOYED_STACK_MANIFEST;
if (!filename) throw new Error("PAPERCLIP_DEPLOYED_STACK_MANIFEST is required");