mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-27 02:44:50 +01:00
When reusing a Codex sandbox, the workspace-restore step now performs an auth-merge check before adopting the sandbox's auth.json. The merge fails closed when: - host or sandbox Codex auth is unusable (missing token or account) - the subscription payload shapes differ between host and sandbox - subscription account identities do not match Additional hardening: node absence on PATH during the embedded decision script now exits non-zero instead of silently falling through. Co-change comments link parseAuth (the embedded script) to hasUsableAuthPayload (codex-home.ts) so a future auth-format change cannot silently diverge between the two implementations. Co-Authored-By: Paperclip <noreply@paperclip.ing>
18 lines
773 B
JavaScript
18 lines
773 B
JavaScript
import esbuild from "esbuild";
|
|
import { createPluginBundlerPresets } from "@paperclipai/plugin-sdk/bundlers";
|
|
|
|
const presets = createPluginBundlerPresets({ uiEntry: "src/ui/index.tsx" });
|
|
const watch = process.argv.includes("--watch");
|
|
|
|
const workerCtx = await esbuild.context(presets.esbuild.worker);
|
|
const manifestCtx = await esbuild.context(presets.esbuild.manifest);
|
|
const uiCtx = await esbuild.context(presets.esbuild.ui);
|
|
|
|
if (watch) {
|
|
await Promise.all([workerCtx.watch(), manifestCtx.watch(), uiCtx.watch()]);
|
|
console.log("esbuild watch mode enabled for worker, manifest, and ui");
|
|
} else {
|
|
await Promise.all([workerCtx.rebuild(), manifestCtx.rebuild(), uiCtx.rebuild()]);
|
|
await Promise.all([workerCtx.dispose(), manifestCtx.dispose(), uiCtx.dispose()]);
|
|
}
|