mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-10 20:50:08 +02:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Installed agents need their own runtime dependencies. > - Native Codex startup and browser login could depend on a global CLI. > - npm bundles do not inherit workspace dependency overrides or patches. > - Codex native packages must come from npm for the consumer host. > - This PR fixes executable resolution and the required npm dependency layout. > - Usable installed CLI versions can run without a numeric version gate. ## Linked Issues or Issue Description Refs: #15422. This is a prerequisite for the later Codex-default change. **What happened?** Packaged native Codex startup and browser login could require a global Codex CLI. The server's vendored runner lacked its own declared Codex bridge. A bundled wrapper could retain producer-host binaries or select the legacy adapter's separate platform version. **Expected behavior** Prefer the installed Codex executable. Accept usable older or newer versions. Use the selected host's PATH when the dependency is absent. Keep the patched JavaScript graph. Let npm install official native packages for the consumer platform. Grant sandbox reads only to the selected vendor resources. **Steps to reproduce** 1. Prepare a clean npm installation without a global Codex command. 2. Start native Codex or its browser login. 3. Inspect the selected executable, installed host package, and sandbox resource paths. **Paperclip version or commit** Frozen master base: `1881894973a2b25838d8abed9bd8aeebc3af4441`. **Deployment mode** Source and packaged self-hosted installation. ## What Changed - Share installed Codex command resolution across native startup, direct evals, and browser login. Accept usable version differences. Preserve explicit commands, recorded sessions, remote host boundaries, and the Linux ARM64 legacy login path. Return safe errors for missing executables and failed login terminals. - Declare the server's Codex bridge. Retain the patched JavaScript dependency graph in npm packages. Strip Codex native payloads. Declare official optional host packages on the published server manifest so native and legacy versions remain separate. Preserve consumer esbuild platform dependencies. - Adjust resource lookup for npm's separate platform packages. Retain package identity, path containment, resolver ownership, and narrow sandbox reads. Keep exact version and digest checks for explicit ACPX artifact qualification. - Extend existing packaging, installed-consumer, login, selection, recovery, and integrity tests. Document the retained behavior. The diff is now 23 files, 1,709 additions, and 53 deletions. The prior diff had 35 files and about 3,700 changed lines. Removed work is preserved on `codex/runner-packaging-full-snapshot` at `6f3060beaa842ffcee21af058370d3cab5f571e9`. Removed from this PR: release workflows and assembly, provider-pack changes, Docker materialization, Git installer changes, extra login HOME/working-directory isolation, and unrelated CI fixture repairs. This PR does not change agent defaults, stored runner choices, UI, schema, or provider qualification. ## Verification - Final candidate: `dde37d7ed0121c10b60b8801eda80f8dc17909ad`. [All 47 ordinary CI jobs passed](https://github.com/paperclipai/paperclip/actions/runs/37842288835) on attempt 1, including typecheck, tests, build, E2E, runner checks, and the installed-consumer canary. [Fresh Greptile review](https://github.com/paperclipai/paperclip/pull/15555#issuecomment-6059581546) is 5/5 on this head; no unresolved threads remain. Human approval is still outstanding. - Reused focused controls passed with Node 24: 71 initial narrowed checks, then 56 affected Codex/selection/eval checks after the relative PATH correction. Runner TypeScript no-emit, syntax, and diff checks passed. The existing fixture reproduces the original relative PATH failure and verifies working-directory selection, empty entries, ordering, and absolute launch. One CLI entrypoint test was initially blocked by sandbox IPC and passed with its existing local socket allowed. Login HOME, config-directory assignments, and working directory match master. - [The actual clean Linux npm consumer](https://github.com/paperclipai/paperclip/actions/runs/37842288835/job/113535523044) passed on the final candidate's CI integration. All 17 Paperclip tarballs omit native Codex payloads. Official npm host packages retain their own integrity and `inBundle=false`. Native Codex selects 0.160.0; the legacy closure retains 0.156.1. Package admission, command leases, narrow native sandbox resources, consumer hooks, preserved lock, and offline lifecycle controls passed. Provider calls were zero. No new workflow is added. - Actual official Codex 0.156.1 passed on the final committed source on macOS ARM64: installed dependency preference, absolute and relative PATH fallback, narrow resource lookup, and app-server initialize/initialized. Executed module hashes match the candidate. One scripts-disabled install, three version probes, and one handshake completed in 26 seconds; owned files and process group were removed. No login, account/model request, or provider task ran. - CI checked out `dfda8e708e87306d22ed735d78bdfcbe770e99b7` on base `65b558180533039a891ee0cd1ccab9988aa79adc`. Its 13 upstream paths do not overlap this PR's 23 paths or alter packaging/Codex inputs. The consumer report records producer `7b8e94c08657b5ddc265946459762340f125726c`, after the existing canary staged a generated-lock-only commit (one file, three insertions). These identities are kept separate; raw generated-lock bytes were not retained. - No local Docker or Rust build, paid provider turn, merge, or deployment. Later PRs must prove live onboarding and production cloud packaging before changing defaults. ## Risks - npm must install optional host dependencies. Missing dependencies still return errors. Paperclip tarballs do not pre-bundle Codex executables. - The repository requires CI-owned lockfile updates. PR CI resolves the changed manifest and stages its own producer lockfile. A raw source Docker build with `--frozen-lockfile` must wait for the existing master lockfile bot to merge its refresh, or use a disposable resolved checkout. No Docker build or deployment is qualified by this PR. - Ordinary Codex startup accepts version differences. Actual protocol or login failures remain errors. Explicit ACPX artifact checks retain their release pins. - The published server delegates platform installation outside its bundled JavaScript graph. Focused negative controls reject unsafe package metadata and paths. The hosted consumer test passed on this candidate’s CI integration. - Existing agents retain their stored runner choices. There is no data migration or automatic upgrade. Release pipeline and platform qualification work remain separate prerequisites for later defaults. ## Model Used OpenAI Codex, GPT-6, with reasoning, tool use, code execution, and parallel agents. The exact serving snapshot and context window are not exposed in this session. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
183 lines
5.9 KiB
JSON
183 lines
5.9 KiB
JSON
{
|
|
"name": "@paperclipai/server",
|
|
"version": "0.3.1",
|
|
"license": "MIT",
|
|
"homepage": "https://github.com/paperclipai/paperclip",
|
|
"bugs": {
|
|
"url": "https://github.com/paperclipai/paperclip/issues"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/paperclipai/paperclip",
|
|
"directory": "server"
|
|
},
|
|
"type": "module",
|
|
"exports": {
|
|
".": "./src/index.ts"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.js"
|
|
}
|
|
},
|
|
"main": "./dist/index.js",
|
|
"types": "./dist/index.d.ts"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"ui-dist",
|
|
"skills"
|
|
],
|
|
"scripts": {
|
|
"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": "pnpm run prepare:runner-vendor && node scripts/verify-runner-vendor-dependencies.mjs && tsc && mkdir -p dist/onboarding-assets dist/built-ins dist/services/scripts dist/vendor/paperclip-runner && cp -R src/onboarding-assets/. dist/onboarding-assets/ && cp -R src/built-ins/. dist/built-ins/ && cp -R src/services/scripts/. dist/services/scripts/ && cp -Rf ../packages/paperclip-runner/dist/. dist/vendor/paperclip-runner/ && node scripts/write-build-stamp.mjs",
|
|
"prepack": "pnpm run prepare:ui-dist && pnpm run build",
|
|
"postpack": "rm -rf ui-dist",
|
|
"clean": "rm -rf dist",
|
|
"start": "node dist/index.js",
|
|
"prepare:runner-vendor": "pnpm --filter @paperclipai/paperclip-runner build",
|
|
"typecheck": "pnpm run prepare:runner-vendor && pnpm --filter @paperclipai/plugin-sdk ensure-build-deps && tsc --noEmit"
|
|
},
|
|
"dependencies": {
|
|
"@agentclientprotocol/codex-acp": "1.6.2",
|
|
"ai": "7.0.130",
|
|
"@ai-sdk/openai": "4.0.86",
|
|
"@openrouter/ai-sdk-provider": "3.1.0",
|
|
"@aws-sdk/client-s3": "^3.1141.0",
|
|
"@chat-adapter/discord": "4.39.0",
|
|
"@chat-adapter/github": "4.39.0",
|
|
"@chat-adapter/slack": "4.39.0",
|
|
"@chat-adapter/teams": "4.39.0",
|
|
"@chat-adapter/telegram": "4.39.0",
|
|
"@discordjs/ws": "1.2.3",
|
|
"@grpc/grpc-js": "1.14.5",
|
|
"@modelcontextprotocol/sdk": "^1.31.0",
|
|
"@opentelemetry/api": "^1.9.0",
|
|
"@paperclipai/adapter-claude-local": "workspace:*",
|
|
"@paperclipai/adapter-codex-local": "workspace:*",
|
|
"@paperclipai/adapter-cursor-cloud": "workspace:*",
|
|
"@paperclipai/adapter-cursor-local": "workspace:*",
|
|
"@paperclipai/adapter-gemini-local": "workspace:*",
|
|
"@paperclipai/adapter-grok-local": "workspace:*",
|
|
"@paperclipai/adapter-kimi-local": "workspace:*",
|
|
"@paperclipai/adapter-openclaw-gateway": "workspace:*",
|
|
"@paperclipai/adapter-opencode-local": "workspace:*",
|
|
"@paperclipai/adapter-pi-local": "workspace:*",
|
|
"@paperclipai/adapter-utils": "workspace:*",
|
|
"@paperclipai/db": "workspace:*",
|
|
"@paperclipai/hermes-paperclip-adapter": "workspace:*",
|
|
"@paperclipai/plugin-sdk": "workspace:*",
|
|
"@paperclipai/shared": "workspace:*",
|
|
"@paperclipai/skills-catalog": "workspace:*",
|
|
"@photon-ai/advanced-imessage": "2.1.0",
|
|
"@vercel/connect": "2.3.3",
|
|
"acorn": "8.18.0",
|
|
"acpx": "0.13.1",
|
|
"ajv": "^8.20.0",
|
|
"ajv-formats": "^3.0.1",
|
|
"better-auth": "1.7.2",
|
|
"chat": "4.39.0",
|
|
"chokidar": "^5.0.0",
|
|
"compression": "^1.8.2",
|
|
"detect-port": "^2.1.0",
|
|
"dompurify": "^3.4.16",
|
|
"dotenv": "^17.4.2",
|
|
"drizzle-orm": "^0.45.2",
|
|
"embedded-postgres": "^18.1.0-beta.16",
|
|
"express": "^5.1.0",
|
|
"heif2jpeg": "0.1.6",
|
|
"jsdom": "^30.0.1",
|
|
"light-my-request": "^6.6.0",
|
|
"multer": "^2.4.0",
|
|
"nice-grpc": "2.1.17",
|
|
"nice-grpc-common": "2.0.4",
|
|
"open": "^11.0.4",
|
|
"pino": "^10.0.0",
|
|
"pino-http": "^11.0.0",
|
|
"pino-pretty": "^13.1.3",
|
|
"sharp": "^0.35.4",
|
|
"smol-toml": "^1.4.2",
|
|
"ssh2": "^1.17.0",
|
|
"svix": "1.76.1",
|
|
"ws": "^8.21.3",
|
|
"zod": "^4.4.3"
|
|
},
|
|
"bundleDependencies": [
|
|
"@agentclientprotocol/codex-acp",
|
|
"@chat-adapter/discord",
|
|
"@chat-adapter/github",
|
|
"@chat-adapter/slack",
|
|
"@chat-adapter/teams",
|
|
"@chat-adapter/telegram",
|
|
"@discordjs/ws",
|
|
"acpx"
|
|
],
|
|
"devDependencies": {
|
|
"@paperclipai/paperclip-runner": "workspace:*",
|
|
"@types/compression": "^1.8.1",
|
|
"@types/express": "^5.0.0",
|
|
"@types/express-serve-static-core": "^5.1.3",
|
|
"@types/jsdom": "^30.0.0",
|
|
"@types/multer": "^2.2.0",
|
|
"@types/node": "^24.0.0",
|
|
"@types/sharp": "^0.32.0",
|
|
"@types/supertest": "^7.2.1",
|
|
"@types/ws": "^8.18.1",
|
|
"cross-env": "^10.1.0",
|
|
"supertest": "^7.0.0",
|
|
"tsx": "^4.23.15",
|
|
"typescript": "^7.0.2",
|
|
"vite": "^8.2.2",
|
|
"vitest": "^5.0.3"
|
|
},
|
|
"peerDependencies": {
|
|
"@opentelemetry/auto-instrumentations-node": "0.79.0",
|
|
"@opentelemetry/exporter-trace-otlp-grpc": "0.221.0",
|
|
"@opentelemetry/exporter-trace-otlp-http": "0.221.0",
|
|
"@opentelemetry/exporter-trace-otlp-proto": "0.221.0",
|
|
"@opentelemetry/resources": "2.10.0",
|
|
"@opentelemetry/sdk-node": "0.221.0",
|
|
"@opentelemetry/semantic-conventions": "1.43.0",
|
|
"@sentry/node": "10.71.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"@opentelemetry/auto-instrumentations-node": {
|
|
"optional": true
|
|
},
|
|
"@opentelemetry/exporter-trace-otlp-grpc": {
|
|
"optional": true
|
|
},
|
|
"@opentelemetry/exporter-trace-otlp-http": {
|
|
"optional": true
|
|
},
|
|
"@opentelemetry/exporter-trace-otlp-proto": {
|
|
"optional": true
|
|
},
|
|
"@opentelemetry/resources": {
|
|
"optional": true
|
|
},
|
|
"@opentelemetry/sdk-node": {
|
|
"optional": true
|
|
},
|
|
"@opentelemetry/semantic-conventions": {
|
|
"optional": true
|
|
},
|
|
"@sentry/node": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"engines": {
|
|
"node": ">=24.11.0"
|
|
},
|
|
"optionalDependencies": {
|
|
"@github/copilot-darwin-arm64": "1.0.88",
|
|
"@github/copilot-darwin-x64": "1.0.88",
|
|
"@github/copilot-linux-x64": "1.0.88"
|
|
}
|
|
}
|