mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-25 09:41:04 +01:00
fix(release): vendor Runner D in the server package
Keep the clean-consumer Runner D package out of first-publish CI enrollment while bundling its compiled runtime into the released server artifact. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
65b51afd67
commit
2e6a418868
11 files changed
+37
-18
No files matched your search
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "@paperclipai/paperclip-runner",
|
||||
"version": "0.1.2",
|
||||
"private": true,
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
"exports": {
|
||||
|
||||
@@ -82,12 +82,7 @@
|
||||
{
|
||||
"dir": "packages/paperclip-eval-kernel",
|
||||
"name": "@paperclipai/paperclip-eval-kernel",
|
||||
"publishFromCi": true
|
||||
},
|
||||
{
|
||||
"dir": "packages/paperclip-runner",
|
||||
"name": "@paperclipai/paperclip-runner",
|
||||
"publishFromCi": true
|
||||
"publishFromCi": false
|
||||
},
|
||||
{
|
||||
"dir": "packages/plugins/sdk",
|
||||
|
||||
+3
-3
@@ -35,8 +35,8 @@
|
||||
"dev": "tsx src/index.ts",
|
||||
"dev:watch": "cross-env PAPERCLIP_MIGRATION_PROMPT=never PAPERCLIP_MIGRATION_AUTO_APPLY=true tsx ./scripts/dev-watch.ts",
|
||||
"prepare:ui-dist": "bash ../scripts/prepare-server-ui-dist.sh",
|
||||
"build": "tsc && mkdir -p dist/onboarding-assets dist/built-ins && cp -R src/onboarding-assets/. dist/onboarding-assets/ && cp -R src/built-ins/. dist/built-ins/",
|
||||
"prepack": "pnpm run prepare:ui-dist",
|
||||
"build": "pnpm --filter @paperclipai/paperclip-runner build:typescript && tsc && mkdir -p dist/onboarding-assets dist/built-ins && cp -R src/onboarding-assets/. dist/onboarding-assets/ && cp -R src/built-ins/. dist/built-ins/ && node scripts/vendor-paperclip-runner.mjs",
|
||||
"prepack": "pnpm run prepare:ui-dist && node scripts/vendor-paperclip-runner.mjs",
|
||||
"postpack": "rm -rf ui-dist",
|
||||
"clean": "rm -rf dist",
|
||||
"start": "node dist/index.js",
|
||||
@@ -57,7 +57,6 @@
|
||||
"@paperclipai/adapter-utils": "workspace:*",
|
||||
"@paperclipai/db": "workspace:*",
|
||||
"@paperclipai/plugin-sdk": "workspace:*",
|
||||
"@paperclipai/paperclip-runner": "workspace:*",
|
||||
"@paperclipai/shared": "workspace:*",
|
||||
"@paperclipai/skills-catalog": "workspace:*",
|
||||
"@paperclipai/hermes-paperclip-adapter": "workspace:*",
|
||||
@@ -83,6 +82,7 @@
|
||||
"zod": "^3.24.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@paperclipai/paperclip-runner": "workspace:*",
|
||||
"@types/express": "^5.0.0",
|
||||
"@types/express-serve-static-core": "^5.1.3",
|
||||
"@types/jsdom": "^28.0.0",
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import { access, cp, mkdir, rm } from "node:fs/promises";
|
||||
import { resolve } from "node:path";
|
||||
|
||||
const serverRoot = resolve(import.meta.dirname, "..");
|
||||
const runnerDist = resolve(serverRoot, "../packages/paperclip-runner/dist");
|
||||
const vendorRoot = resolve(serverRoot, "dist/vendor");
|
||||
const vendorDist = resolve(vendorRoot, "paperclip-runner");
|
||||
|
||||
await access(resolve(runnerDist, "index.js")).catch(() => {
|
||||
throw new Error(
|
||||
"Runner D build output is missing. Run pnpm --filter @paperclipai/paperclip-runner build:typescript first.",
|
||||
);
|
||||
});
|
||||
|
||||
await rm(vendorDist, { recursive: true, force: true });
|
||||
await mkdir(vendorRoot, { recursive: true });
|
||||
await cp(runnerDist, vendorDist, { recursive: true });
|
||||
|
||||
process.stdout.write("Vendored Runner D JavaScript into the server distribution.\n");
|
||||
@@ -99,7 +99,7 @@ import {
|
||||
parseNativeExecutionInput,
|
||||
type NativeExecutionInputV1,
|
||||
type NativeSessionBackend,
|
||||
} from "@paperclipai/paperclip-runner";
|
||||
} from "../vendor/paperclip-runner/index.js";
|
||||
import { normalizeResponsibleUserDenialCode } from "./responsible-user-denial-run-outcomes.js";
|
||||
import { getRunLogStore, type RunLogHandle } from "./run-log-store.js";
|
||||
import { getServerAdapter, listAdapterModelProfiles, runningProcesses } from "../adapters/index.js";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { and, desc, eq } from "drizzle-orm";
|
||||
import type { Db } from "@paperclipai/db";
|
||||
import { completionContracts } from "@paperclipai/db";
|
||||
import type { StrictCompletionContractInput } from "@paperclipai/paperclip-runner";
|
||||
import type { StrictCompletionContractInput } from "../../vendor/paperclip-runner/index.js";
|
||||
import { nativeSha256 } from "./canonical.js";
|
||||
|
||||
export const NATIVE_COMPLETION_CONTRACT_SCHEMA = "paperclip.completion-contract.v1";
|
||||
|
||||
@@ -2,8 +2,8 @@ import type {
|
||||
NativeExecutionInputV1,
|
||||
NativeInteractionResponseEnvelope,
|
||||
StrictCompletionContractInput,
|
||||
} from "@paperclipai/paperclip-runner";
|
||||
import { parseNativeExecutionInput } from "@paperclipai/paperclip-runner";
|
||||
} from "../../vendor/paperclip-runner/index.js";
|
||||
import { parseNativeExecutionInput } from "../../vendor/paperclip-runner/index.js";
|
||||
|
||||
/** Closed constructor: callers cannot spread legacy context or environment data. */
|
||||
export function buildNativeExecutionInput(input: {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { Db } from "@paperclipai/db";
|
||||
import type { NativeInteractionResponseEnvelope } from "@paperclipai/paperclip-runner";
|
||||
import type { NativeInteractionResponseEnvelope } from "../../vendor/paperclip-runner/index.js";
|
||||
import { and, asc, eq, inArray } from "drizzle-orm";
|
||||
import {
|
||||
agents,
|
||||
|
||||
@@ -5,11 +5,11 @@ import type {
|
||||
NativeExecutionInputV1,
|
||||
NativeSession,
|
||||
NativeSessionBackend,
|
||||
} from "@paperclipai/paperclip-runner";
|
||||
} from "../../vendor/paperclip-runner/index.js";
|
||||
import {
|
||||
createCodexNativeSessionBackend,
|
||||
executeNativeSession,
|
||||
} from "@paperclipai/paperclip-runner";
|
||||
} from "../../vendor/paperclip-runner/index.js";
|
||||
import type { Db } from "@paperclipai/db";
|
||||
import { and, eq, sql } from "drizzle-orm";
|
||||
import { heartbeatRuns, issues, nativeRunFinalizations } from "@paperclipai/db";
|
||||
|
||||
@@ -16,11 +16,11 @@ import type {
|
||||
PrpEvent,
|
||||
PrpTerminalState,
|
||||
ReplayControlPlaneEventsInput,
|
||||
} from "@paperclipai/paperclip-runner";
|
||||
} from "../../vendor/paperclip-runner/index.js";
|
||||
import {
|
||||
validatePrpEvent,
|
||||
validatePrpStructuredRunResult,
|
||||
} from "@paperclipai/paperclip-runner";
|
||||
} from "../../vendor/paperclip-runner/index.js";
|
||||
import { appendHeartbeatRunEvent } from "../heartbeat-run-events.js";
|
||||
import { nativeSha256 } from "./canonical.js";
|
||||
|
||||
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
// Development and test builds resolve the workspace package here. The server
|
||||
// build replaces this compiled shim with the package's built distribution so
|
||||
// published server installs do not need a separate Runner D npm bootstrap.
|
||||
export * from "@paperclipai/paperclip-runner";
|
||||
Reference in new issue
Block a user