Wire Pi candidate into verified installation and provider packs

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-28 15:14:57 -05:00
1 parent 60294a71ac
commit 714c4bddb2
3 files changed
+4 -3

No files matched your search

@@ -1,3 +1,4 @@
import { materializePiDistribution } from "./materialize-pi-distribution.mjs";
const CANDIDATES = new Set(["cursor", "copilot", "pi"]);
export function parseProviderPackArguments(args) {
@@ -18,5 +19,6 @@ export function parseProviderPackArguments(args) {
/** Closed source-owned builder registry; provider branches add their exact pins. */
export async function materializeCandidateProviderPack({ provider, outputRoot }) {
if (!CANDIDATES.has(provider)) throw new Error("Unknown candidate provider");
if (provider === "pi") return materializePiDistribution({ outputRoot });
throw new Error(`The ${provider} candidate distribution builder is not included in this source revision`);
}
@@ -1,8 +1,10 @@
import { verifyPiInstallation } from "./pi-installation.js";
import type { QualifiedAcpxAgent, QualifiedAcpxProfile } from "./qualified-profiles.js";
import { verifyQualifiedAcpxInstallation, type VerifiedAcpxInstallation } from "./installation-integrity.js";
/** Closed build-owned registry. Provider branches add their pinned installations here. */
export async function verifyAcpxProfileInstallation(profile: QualifiedAcpxProfile): Promise<VerifiedAcpxInstallation> {
if (profile.agent === "pi") return verifyPiInstallation(profile);
if (profile.agent !== "claude" && profile.agent !== "codex" && profile.agent !== "grok") {
throw new Error(`ACPX ${profile.agent} verified candidate distribution is not installed in this build`);
}
@@ -819,9 +819,6 @@ describe("ACPX runtime host", () => {
});
const options = { ...fixture.options, agent: "pi" as const, model,
permissionMode: "approve-all" as const, providerPolicy: { readOnly: true }, systemInstructions: "Bound instructions" };
await expect(AcpxRuntimeHost.open(options, { openRuntime, reportRetainedCleanupFailure: vi.fn() }))
.rejects.toThrow("verified candidate distribution is not installed");
expect(openRuntime).not.toHaveBeenCalled();
const host = await AcpxRuntimeHost.open(options, fixture.dependencies({
verifyInstallation: async () => ({ commandDigest: profile.commandDigest,
agentServerPackageJsonPath: join(fixture.root, "package.json"), agentRuntimePackageJsonPath: null,