fix(dot): honor standalone rollout in imports and dev startup

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-10-07 17:52:55 -05:00
1 parent c3a53dfca0
commit 5a1bdea4ca
5 files changed
+58 -12

No files matched your search

+22 -9
View File
@@ -109,6 +109,7 @@ import type {
import {
PaperclipRunnerProviderProfileError,
resolvePaperclipRunnerProviderProfile,
validatePaperclipRunnerDotConfig,
} from "./native-runtime/provider-profile.js";
import { managedAgentProfileService } from "./managed-agent-profiles.js";
import { remoteAgentProfileService } from "./remote-agent-profiles.js";
@@ -3600,6 +3601,10 @@ export function companyPortabilityService(db: Db, storage?: StorageService) {
if (adapterType === "paperclip_runner") {
let profile;
try {
if (adapterConfig.provider === "openai_dot") {
validatePaperclipRunnerDotConfig(adapterConfig, false);
return;
}
profile = resolvePaperclipRunnerProviderProfile(adapterConfig);
} catch (error) {
if (error instanceof PaperclipRunnerProviderProfileError) {
@@ -5248,19 +5253,27 @@ export function companyPortabilityService(db: Db, storage?: StorageService) {
.filter((entry) => entry.action !== "skip")
.map((entry) => entry.slug),
);
const selectsNativeRunner = sourceManifest.agents.some((agent) =>
const runnerSelections = sourceManifest.agents.filter((agent) =>
importedAgentSlugs.has(agent.slug)
&& (input.adapterOverrides?.[agent.slug]?.adapterType ?? agent.adapterType)
=== "paperclip_runner",
);
if (
selectsNativeRunner
&& (await instanceSettingsService(db).getExperimental()).enableNativeRunner !== true
) {
throw unprocessable(
"Paperclip Runner is experimental and disabled on this instance.",
{ code: "paperclip_runner_rollout_disabled" },
);
if (runnerSelections.length > 0) {
const experimental = await instanceSettingsService(db).getExperimental();
for (const agent of runnerSelections) {
const config = input.adapterOverrides?.[agent.slug]?.adapterConfig ?? agent.adapterConfig;
if (config.provider === "openai_dot") {
if (experimental.enableOpenAiDot !== true) throw unprocessable(
"OpenAI Dot is experimental and disabled on this instance.",
{ code: "paperclip_runner_dot_disabled" },
);
} else if (experimental.enableNativeRunner !== true) {
throw unprocessable(
"Paperclip Runner is experimental and disabled on this instance.",
{ code: "paperclip_runner_rollout_disabled" },
);
}
}
}
}
+1 -1
View File
@@ -95,7 +95,7 @@ function createBroker(db: Db) {
return {
enabled,
async createPairing(input: { companyId: string; agentId: string; operatorId: string; dotUrl?: string }) {
if (!await enabled()) throw fail("Enable OpenAI Dot, Paperclip Runner, and Assistant connections (MCP) in experimental settings.");
if (!await enabled()) throw fail("Enable OpenAI Dot and Assistant connections (MCP) in experimental settings.");
if (input.dotUrl && !/^https:\/\/chatgpt\.com\/dots\/[A-Za-z0-9-]+$/.test(input.dotUrl)) throw fail("Use the Dot's ChatGPT URL.");
const code = randomBytes(24).toString("base64url");
const binding = await db.transaction(async tx => {