Skip to content

Commit 7f3fa42

Browse files
feat(adapter-codex-local): add device-login proof CLI
Wire the Daytona SDK to the injected SandboxLoginDriver and prove the device login end to end. Require a Daytona environment id argument and fail loud when it is absent, when no controlling terminal exists, or when the environment provider is not daytona. Stream the login output in memory through a non-persisting exec path, write the URL and the code only to the controlling terminal, install the credential into a run-scoped proof home, and run a second sandbox that uses the saved credential. Delete the proof home and every sandbox in a finally block on every terminal path. Resolve the environment record through the workspace database client (a devDependency). Load the Daytona SDK through a dynamic import against a local interface, so the adapter never declares the heavy SDK dependency; a live run installs @daytonaio/sdk or sets PAPERCLIP_DAYTONA_SDK_MODULE. Co-authored-by: Paperclip <noreply@paperclip.ing>
1 parent 9e8c585 commit 7f3fa42

6 files changed

Lines changed: 435 additions & 4 deletions

File tree

packages/adapters/codex-local/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,18 @@
4949
"build": "tsc && cp src/server/codex-auth-merge-decision.cjs src/server/codex-auth-merge-extract.sh dist/server/",
5050
"clean": "rm -rf dist",
5151
"typecheck": "tsc --noEmit",
52-
"probe:quota": "pnpm exec tsx src/cli/quota-probe.ts --json"
52+
"probe:quota": "pnpm exec tsx src/cli/quota-probe.ts --json",
53+
"proof:device-login": "pnpm exec tsx src/cli/device-login-proof.ts"
5354
},
5455
"dependencies": {
5556
"@agentclientprotocol/codex-acp": "^1.1.4",
5657
"@paperclipai/adapter-utils": "workspace:*",
5758
"picocolors": "^1.1.1"
5859
},
5960
"devDependencies": {
61+
"@paperclipai/db": "workspace:*",
6062
"@types/node": "^22.20.1",
63+
"drizzle-orm": "^0.45.2",
6164
"typescript": "^5.7.3"
6265
}
6366
}

0 commit comments

Comments
 (0)