Repository navigation
Apps can use a key from Keys: every app in the workspace, or one app at a time - #188
Closed
TigerYWang wants to merge 3 commits into
Closed
TigerYWang wants to merge 3 commits into
TigerYWang wants to merge 3 commits into
Conversation
…at a time A key saved for This workspace in Keys now has a switch, "Every app in this workspace can use it". Each app gets the key as a variable of the same name when it's built, new apps too, with nobody acting and the owner's Mac off. An app's Variables gain "From Keys": its keys from Keys by name, every app's and its own, and "Use a key from Keys" to give it one under a name of its choosing. orgo-web keeps the links and fills the value in at each build from the owner's vault, whoever deployed it, so only names pass through Bops: the owner's Mac, a member's Bops, Bops Cloud and runners never see the value. The owner, an Admin or a Member given Keys may link; one app's link in a shared workspace also needs Your Apps at Write. The owner's keys for all their workspaces stay theirs and are never offered. When Keys gets a new value, Previews that use it are built again at once and Published gets it at its next Publish. The window says that anyone who can change an app's code can read its keys. An Orgo without the new route gets "Orgo can't link keys to apps yet." and no switches. A bot working on an app is told to read keys from the environment and never write one into the folder, a commit or a chat.
# Conflicts: # components/app/keys.tsx
TigerYWang
marked this pull request as ready for review
November 12, 2026 15:14
Contributor
Author
|
Shipped inside #191 for 0.0.52. |
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.
What changes
Apps can use a key from Keys (ANTHROPIC_API_KEY, say), so nobody copies it into each new app.
appsShown).lib/server/app-keys.tsandapp/api/keys/apps(GET, PUT; Bops window only; under/api/keys, so it works in a shared workspace). It calls orgo-web's/api/projects/{id}/bops-keys/appswith the user's own Orgo key. The project is the open workspace's (keysProject, or the shared copy's), never one from the request.projectKeysinshared-keys.tsis exported and takes PUT. Only names are sent or answered; anything else orgo-web sends is dropped.bops-keys/{name}), a 404 that isn't orgo-web's own, or 503APP_KEYS_UNAVAILABLEmakes the list sayold. The window then shows "Orgo can't link keys to apps yet." and no switches.settingsOfmaps orgo-web's newenv_from_keystoAppSettingsAnswer.keyed, names only. An older orgo-web leaves it out.components/app/app-key-links.tsx. The mounts are one line each inapp-settings.tsx,shared-apps.tsxandkeys.tsx, away from Your Apps: review changes before publishing #186's hunks.Why
A shared workspace's Admin keeps the Anthropic key in Keys, and every new client app needs it as an environment variable. Today the owner pastes it into each app by hand from their own Mac. With this change, orgo-web (OrgoAI/orgo-web#1841) keeps the link and fills the value in at each build from the owner's vault for the workspace. Only names pass through Bops: the owner's Mac, a member's Bops, Bops Cloud and runners never see the value. Deploys from any Mac or runner version get it.
How I checked it
node --conditions=react-server scripts/test-keys.mjs: 51 passed (3 new). In the owner's workspace: the link goes to the workspace's own project with the user's key, never one from the request, and no value is sent. In a shared workspace: every app's link needs Keys, one app's also needs Write, and both are refused before Orgo is asked. Bad names are refused in plain words. Only from the window, and only where apps are open. Older orgo-web (405, a page 404, 503) reads asold. Anything but names from orgo-web is dropped.node --conditions=react-server scripts/test-hosted-apps.mjs: 143 passed (1 new:env_from_keystokeyed, names only).node scripts/test-hosted-apps-ui.mjs: 74 passed (1 new). It covers the From Keys rows, Remove only on the app's own links, the picker only for those who may, the Every app switch only on This workspace's own keys, the older Orgo line, no dashes in the copy, and the three mount lines.node scripts/test-shared.mjs: 70 passed.npx next typegen,npx tsc --noEmit -p .,npx tsc -p cloud/tsconfig.json --noEmit,npm run lint: clean (no warnings in touched files).check-public.sh: OK.Not done or limits
SettingsPart, which Your Apps: review changes before publishing #186 wraps in a disclosure. A rebase there may need a one-line touch.AppHosting.github) doesn't get keys: the link reaches Orgo deploys only. Keys never go to GitHub.