Repository navigation
feat(secrets): /secform shares named secrets with a thread or bot, with expiry, single use and a revocable chip - #2539
Merged
Merged
Conversation
…ain, password and API keys masked)
…bot chats, with expiry, who may use them, single use and a chip to revoke
… chip; council wording for the agent's note
…two Windows secret tests listed as known (#2537)
…at kept the values; docs for /secform
…ve stays off with no field
Collaborator
Author
This was referenced Dec 1, 2026
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.








Problem
To give an agent or a bot a key, password or token, the person had to wait for it to ask with
secret_request, one value per card. There was no way to hand over several secrets up front without typing them into the chat.Change
/secformin the composer of agent threads and bot chats./secformopens one field,/secform 3three, and/secform for email, password and openrouterkeythree named fields: Email (EMAIL, shown as typed), Password (PASSWORD) and Openrouter API key (OPENROUTER_API_KEY), both hidden with show/hide. The fields are read in the composer (parseSecform), never by a model. The/list keeps the row while the fields are typed ("Opens a form for Email, Password, Openrouter API key"), and Enter opens the form.secrets.share→SecretShares→SecretVault), all or none. Names already taken get the next free name; names that commands already use (PATH,NODE_OPTIONS, ...) are refused. A Never secret is kept for its thread or bot only and is not offered to other threads as a saved key.postNotewithattention: 'none'for a thread; a Mousse line in a bot's chat). It never starts a turn. The wording (secretShareNote) was reviewed by three independent reviewers; it says the note asks for nothing, gives the end as a time, shows only thesecret_runenvironment-variable route, and for single use says the firstsecret_runthat names it uses it up, so not to test it first.secret_run. Its command's output is masked with a masker built before the use is counted.secrets.share,secrets.shares.listandsecrets.shares.revokeare routed thread rows, so a form for a thread of another computer is filled in here and sent once over the encrypted link to that computer's store. Only a person at a Mousse window (here, or another of the user's computers) may call them; agents may not. The values travel in their own key (values), which the owner's request ledger leaves out of its retry match (ROUTED_SECRET_KEYS), so no hash of a value is kept there. The other secret methods stay local.How to review
src/shared/secform.ts: parser, options, chip words.src/mms/secrets/SecretShares.ts,SecretVault.ts(expiry, single use, share id),registerMethods.ts(who may call),secretShareNote.ts.MousseMainService.ts,OrchestratorService.recordSecretShare,BotChatService.postSecretShare, bot chat projection.shared/bridge/routed.ts,OwnerRoutes.ts(ledger match).SecformCard.tsx,SecretShareChip.tsx,OrchestratorChat.tsx,BotChatView.tsx, composer and bot commands,SecretsSettings.tsx.The risk is in step 2 and 4: where values may go.
tests/secrets/secformWiring.test.tsboots the real service, shares a value from a window and checks that only the secret store file holds it afterwards.Verification
Tier 5. On a90b2da:
node scripts/verify.mjs tests/secrets/secretShares.test.ts tests/secrets/secformWiring.test.ts tests/secrets/secretVault.test.ts tests/secrets/keepPasted.test.ts tests/secrets/keepPastedWiring.test.ts tests/secrets/secretRequestNoLeak.test.ts tests/secrets/botSecretContainment.test.ts tests/secrets/terminalRetiredSecrets.test.ts tests/secrets/serviceBinding.test.ts tests/shared/secform.test.ts tests/slashCommands.test.ts tests/composerSlashSkills.test.ts tests/renderer/botCommands.test.ts tests/renderer/botChatShape.test.ts tests/renderer/boundSecretsSettings.test.ts tests/renderer/secretRequestCard.test.ts tests/renderer/secformCard.test.ts tests/mousseToUI.test.ts tests/mmsProtocolServer.test.ts tests/net/bridge/routed/table.test.ts tests/net/bridge/routed/owner.test.ts tests/bots/botServiceLines.test.ts tests/platformWorkflowInvocation.test.ts tests/renderer/threadTags.test.ts --typecheck all: 511 tests passed, 5 known failures (on master too: botMarks and serviceBinding tests fail on Windows #2210, and Two secret tests fail on Windows (printf in keepPasted; secretRequestCard times out cold) #2537 filed here for two Windows secret tests, listed intests/known-failures.json); both typechecks clean./row, the named form (Email plain, the others masked),/secform 3, Add field and remove, Save securely off until every field has a value, the saved chip, Revoke to revoked, the Settings rows, and/secformin a bot chat with its chip. A search of the whole development home found the made-up values only in the secret store file, and nowhere after Revoke. That check also caught the form opening empty under React Strict Mode, fixed in 895d269 with a test.#tags), now on master; its tests pass here.tests/secrets/serviceBinding.test.ts.Notes
A bot that lives on another computer is not offered the form yet: its chat says to share from that computer. It needs a remote bot method of its own, and comes next as a separate PR.
Refs #595