Admit candidate authentication from sanitized launch bindings

Allow candidate profiles to report missing authentication before native initialization stalls.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-09-28 12:15:13 -05:00
1 parent 0ece23ad7d
commit 0adc3b1a5e
2 files changed
+5 -1

No files matched your search

@@ -12,6 +12,9 @@ export async function verifyAcpxProfileInstallation(profile: QualifiedAcpxProfil
/** Provider policy admission is repeated immediately before each process launch. */
export async function assertAcpxProfileWorkspace(_agent: QualifiedAcpxAgent, _workspace: string): Promise<void> {}
/** Candidate branches validate only explicitly bound, sanitized launch credentials. */
export function assertAcpxProfileEnvironment(_agent: QualifiedAcpxAgent, _environment: Readonly<NodeJS.ProcessEnv>): void {}
/** Optional provider-specific classification; never changes whether admission succeeded. */
export function classifyAcpxProfileError(_agent: QualifiedAcpxAgent, _error: unknown): Error | null {
return null;
@@ -1,5 +1,5 @@
import { dirname, join } from "node:path";
import { assertAcpxProfileWorkspace, classifyAcpxProfileError, verifyAcpxProfileInstallation } from "./profile-installation.js";
import { assertAcpxProfileEnvironment, assertAcpxProfileWorkspace, classifyAcpxProfileError, verifyAcpxProfileInstallation } from "./profile-installation.js";
import { createAcpxRuntimeSkillLease } from "./runtime-skill-lease.js";
import { claudeNativeSkillPrompt } from "./native-skill-prompt.js";
import { nativeMcpLaunchBinding } from "../native-mcp.js";
@@ -442,6 +442,7 @@ export class AcpxRuntimeHost {
dependencies.reportRetainedCleanupFailure(failure),
});
}
assertAcpxProfileEnvironment(options.agent, sandbox.launchEnvironment);
let launchEnvironment = sandbox.launchEnvironment;
if (options.agent === "pi") {
const skills = await acquireAbortableAdmissionResource({