A cloud workspace can read its environment's variable names, and a deploy CLI's token can be one
An agent in a cloud workspace couldn't see which variables its environment gives it, and VERCEL_TOKEN / VERCEL_ORG_ID couldn't be environment variables at all. Both block using vercel, wrangler and eas from a box (binaries land in #7863).
Changes
environment.secrets.listjoinsSANDBOX_ALLOWED_PROCEDURES. It returns names, visibility and timestamps, never values.setandremovestay a person's call.- CLI: in a box,
environments secrets listis visible;setanddeletecarrysandbox: falsethemselves instead of the whole group. A box runs with the internal audience, soenvironmentsdoesn't vanish there with the next bundle. - The reserved secret prefix narrows from
VERCEL_toVERCEL_SANDBOX_, the only Vercel family the provisioner reads. New test pins it.
Verification
bun testfor shared (new) and cli-framework pass; typecheck passes for cli, trpc and shared; biome clean.- Built CLI: with
SUPERSET_SANDBOX_WORKSPACE_IDset,environments secretslists onlylist, andsetis an unknown command. Outside a box without the internal audience,environmentsstays hidden. - Not verified end to end in a box: that needs this deployed plus a bundle with the new CLI.
After merge
Set VERCEL_ORG_ID and a fresh scoped VERCEL_TOKEN on the internal Superset environment (prod rejects VERCEL_ names until this deploys). EXPO_TOKEN is already set; Cloudflare and Neon were already there.
Summary by cubic
Lets a cloud workspace see which variables its environment provides, and lets deploy CLI credentials like VERCEL_TOKEN and VERCEL_ORG_ID live as environment variables so vercel, wrangler, and eas work from a box.
environment.secrets.listjoins the sandbox allowlist and returns names, visibility, and timestamps, never values.- The CLI shows
environments secrets listin a box;setanddeleteare markedsandbox: falseindividually, and a box runs with the internal audience soenvironmentsstays visible. - The reserved secret prefix narrows from
VERCEL_toVERCEL_SANDBOX_, the only Vercel family the provisioner reads.
Migration
After deploy, set VERCEL_ORG_ID and a fresh scoped VERCEL_TOKEN on the internal Superset environment (prod currently rejects VERCEL_ names).
Summary by CodeRabbit
-
New Features
- CLI access now supports both internal and public audiences when running in a sandbox workspace.
- Sandbox credentials can access the environment secrets list.
- Environment variable names beginning with
VERCEL_can now be used, except those beginning withVERCEL_SANDBOX_.
-
Bug Fixes
- Environment secret set and delete commands now work correctly in sandbox contexts.