mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-29 15:52:36 +01:00
feat: add Grok device login to the sandbox login panel (#12469)
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work > - Paperclip uses adapters to connect agents and model providers to its control plane > - The sandbox login panel supports displayed-code login for selected adapters > - Grok users need the same login path and a private credential home for later runs > - This pull request adds Grok support to the shared device-login path and preserves the existing Codex path > - The benefit is one secure login flow for both adapters with company-scoped credential storage ## Linked Issues or Issue Description **Agent or provider** Grok Local needs displayed-code login support in the sandbox login panel. **Why this adapter is useful** This change lets users sign in to Grok from the sandbox login panel. It also gives later Grok runs access to the stored credential. **How the agent is invoked** The Grok local adapter uses its login command through the shared displayed-code login flow. Later runs receive the managed home through `GROK_HOME`. **Additional context** The change uses adapter-scoped login lifecycle handling. It stores the credential in a company-scoped directory with mode `0700`, and it stores the credential file with mode `0600`. ## What Changed - Rename the shared device-login modules to adapter-neutral names. - Scope the shared login lifecycle to a closed adapter set. - Return the device-login URL that the provider prints. - Add the Grok prompt parser, login command, capability, and login panel entry. - Store the Grok credential in a private, company-scoped home directory. - Pass `GROK_HOME` to later Grok runs. - Add tests for the Grok adapter, the Daytona sandbox provider, the server login path, and the user interface. ## Verification - Run `pnpm vitest run packages/adapters/grok-local/src/server/adapter-auth-promotion.test.ts`. - Run the Grok adapter package suite. - Run the Daytona sandbox provider suite. - Run the server device-login suites. - Run the user interface suite. - Confirm the full CI suite passes. ## Risks The change extends shared login lifecycle code to another adapter. A regression could affect Codex login. The credential path uses explicit `chmod` calls to keep the directory at mode `0700` and the file at mode `0600`. ## Model Used OpenAI Codex, GPT-5. The runtime used tool calls and code review support. The runtime did not provide a context-window value. ## 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 - [ ] 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>
This commit is contained in:
1 parent
cec675ffca
commit
a20a4944ec
44 files changed
+2656
-222
No files matched your search
@@ -49,15 +49,15 @@
|
||||
"server/src/__tests__/cloud-image-bundled-plugins.test.ts": 211,
|
||||
"server/src/__tests__/cloud-instance.test.ts": 227,
|
||||
"server/src/__tests__/codex-auth-reconciliation.test.ts": 1256,
|
||||
"server/src/__tests__/codex-device-login-credential-read.test.ts": 605,
|
||||
"server/src/__tests__/codex-device-login-reaper.test.ts": 1310,
|
||||
"server/src/__tests__/codex-device-login-service.test.ts": 4054,
|
||||
"server/src/__tests__/device-login-credential-read.test.ts": 605,
|
||||
"server/src/__tests__/device-login-reaper.test.ts": 1310,
|
||||
"server/src/__tests__/device-login-service.test.ts": 4054,
|
||||
"server/src/__tests__/codex-local-adapter-environment.test.ts": 722,
|
||||
"server/src/__tests__/codex-local-adapter.test.ts": 739,
|
||||
"server/src/__tests__/codex-local-execute.test.ts": 2000,
|
||||
"server/src/__tests__/codex-local-skill-injection.test.ts": 674,
|
||||
"server/src/__tests__/codex-local-skill-sync.test.ts": 673,
|
||||
"server/src/__tests__/codex-login-session-runtime.test.ts": 1272,
|
||||
"server/src/__tests__/login-session-runtime.test.ts": 1272,
|
||||
"server/src/__tests__/companies-service.test.ts": 6166,
|
||||
"server/src/__tests__/company-artifacts-service.test.ts": 6065,
|
||||
"server/src/__tests__/company-cloud-floor.test.ts": 1279,
|
||||
|
||||
@@ -24,8 +24,10 @@ const nonServerProjects = [
|
||||
"@paperclipai/adapter-utils",
|
||||
"@paperclipai/adapter-claude-local",
|
||||
"@paperclipai/adapter-codex-local",
|
||||
"@paperclipai/adapter-grok-local",
|
||||
"@paperclipai/adapter-openclaw-gateway",
|
||||
"@paperclipai/adapter-opencode-local",
|
||||
"@paperclipai/plugin-daytona",
|
||||
"@paperclipai/plugin-sdk",
|
||||
"@paperclipai/create-paperclip-plugin",
|
||||
"@paperclipai/ui",
|
||||
|
||||
Reference in new issue
Block a user