feat(pasqal): validator list-projects mode + sandbox env passthrough (#194) - #198
Merged
Conversation
) When PASQAL_PROJECT_ID is absent, authenticate on username+password alone and return the caller's projects ({ok, mode:'list', projects:[{id,name}], token, expires_at}) so the panel can offer a picker. When present, the original connect-and-validate behavior is unchanged. Fixed error messages only; no secret ever printed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…code server (#194) Adds a fixed allowlist of non-secret amico state locations (pasqal.json / cloud.json / connections.json / ops dir / keychain service / validator / python) that pass through buildServerSpawnEnv when set. Keeps the minimal-env discipline (never a process.env spread; unset vars never appear) while letting an isolated sandbox launch its own ~/.amico + keychain, separate from the real install. Enables the VS Code extension sandbox for #194 testing. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The amicode-side support for the #194 two-step Pasqal auth (username+password → pick a project). Pairs with harmoniqs/opencode PR #43 (the server + panel). Verified end-to-end live and in the VS Code sandbox.
Changes
scripts/pasqal-connector/pasqal_validate.py— list-projects modeWhen
PASQAL_PROJECT_IDis absent, authenticate on username+password alone and return the caller's projects so the panel can offer a picker:{"ok": true, "mode": "list", "projects": [{"id","name"}], "token", "expires_at"}(via
GET account/api/v1/projects, the endpoint Jack's session confirmed). When a project id IS present, the original connect-and-validate behavior is unchanged. Fixed error messages only — no secret ever printed.src/server_auth.ts— sandbox env passthroughbuildServerSpawnEnvspawns opencode with a deliberately minimal env (PATH + config + per-boot password). Added a fixed allowlist passthrough of non-secret amico state locations (AMICO_PASQAL_FILE/AMICO_CLOUD_FILE/AMICODE_CONNECTIONS_FILE/AMICODE_OPS_DIR/AMICO_PASQAL_KEYCHAIN_SERVICE/AMICO_PASQAL_VALIDATOR/AMICO_PYTHON) when set — keeps the minimal-env discipline (never aprocess.envspread; unset vars never appear) while letting an isolated sandbox point its~/.amico+ keychain slot elsewhere, separate from the real install.Verification
pnpm --filter amicode run typecheck— cleanbun test packages/extension/test/server_auth.test.ts— 12 pass (base env unchanged when the vars are unset; passthrough only adds set keys)python3 -m py_compile pasqal_validate.py— clean; list-mode presentNotes
amico pasqal submit --devicedevice set (Pasqal device path — optimized pulse to a Pasqal Cloud device through the Pasqal Connection #160) is a separate follow-up.🤖 Generated with Claude Code