mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-06 14:02:36 +01:00
feat: default Claude to the native runner on Apple Silicon
Carry Claude effort through versioned native admission and recovery. Preserve existing connections and saved runner choices, and price Opus 5.5 API receipts. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
058af8f1b6
commit
6fd56c445d
77 files changed
+909
-296
No files matched your search
@@ -1846,7 +1846,7 @@ export function agentRoutes(
|
||||
"OpenAI Dot is experimental and disabled on this instance.",
|
||||
{ code: "paperclip_runner_dot_disabled" },
|
||||
);
|
||||
} else if (!([undefined, "codex"].includes(asRecord(config)?.provider as string | undefined)) && experimental.enableNativeRunner !== true) {
|
||||
} else if (!([undefined, "codex"].includes(asRecord(config)?.provider as string | undefined)) && agentHarnessType("paperclip_runner", asRecord(config) ?? {}) !== "claude_local" && experimental.enableNativeRunner !== true) {
|
||||
throw unprocessable(
|
||||
"Paperclip Runner is experimental and disabled on this instance.",
|
||||
{ code: "paperclip_runner_rollout_disabled" },
|
||||
@@ -2248,12 +2248,12 @@ export function agentRoutes(
|
||||
const noInheritance = { adapterConfig, inheritedFixedClaudeOAuthBinding: false };
|
||||
if (asRecord(runtimeConfig)?.aiConnection) return noInheritance;
|
||||
if (req.actor.type !== "agent" || !req.actor.agentId) return noInheritance;
|
||||
const harness = agentHarnessType(adapterType ?? "", adapterConfig) === "codex_local" ? "codex_local" : adapterType ?? "";
|
||||
const harness = agentHarnessType(adapterType ?? "", adapterConfig);
|
||||
const credentialKeys = INHERITABLE_AGENT_CREDENTIAL_ENV_KEYS[harness];
|
||||
if (!credentialKeys) return noInheritance;
|
||||
|
||||
const parent = await svc.getById(req.actor.agentId);
|
||||
if (!parent || parent.companyId !== companyId || (harness === "codex_local" ? agentHarnessType(parent.adapterType, parent.adapterConfig) !== harness : parent.adapterType !== adapterType)) return noInheritance;
|
||||
if (!parent || parent.companyId !== companyId || agentHarnessType(parent.adapterType, parent.adapterConfig) !== harness) return noInheritance;
|
||||
// Managed parents must not pass stale legacy credential references to hires.
|
||||
if (aiRuntimeConnectionBindingSchema.safeParse(parent.runtimeConfig.aiConnection).success) return noInheritance;
|
||||
const parentEnv = asRecord(asRecord(parent.adapterConfig)?.env);
|
||||
@@ -2262,7 +2262,7 @@ export function agentRoutes(
|
||||
const existingEnv = asRecord(adapterConfig.env);
|
||||
const claudeCredentialKeys = INHERITABLE_AGENT_CREDENTIAL_ENV_KEYS.claude_local;
|
||||
const childHasClaudeCredential =
|
||||
adapterType === "claude_local" &&
|
||||
harness === "claude_local" &&
|
||||
existingEnv !== null &&
|
||||
claudeCredentialKeys.some((key) => existingEnv[key] !== undefined);
|
||||
if (childHasClaudeCredential) return noInheritance;
|
||||
|
||||
Reference in new issue
Block a user