Repository navigation
Connect a Bitwarden vault to a session - #168
Draft
giordano-lucas wants to merge 7 commits into
Draft
giordano-lucas wants to merge 7 commits into
giordano-lucas wants to merge 7 commits into
Conversation
[Critical impact] The latest changes appear safe to merge, with no new actionable issues found.
|
GET /payments and GET /payments/connection (nottelabs/monorepo#5047) serve the console Payments page; a CLI command for them is a follow-up. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
giordano-lucas
force-pushed
the
feat/vaults-connect-bitwarden
branch
from
November 4, 2026 10:04
1ca3180 to
07e8bf3
Compare
`notte vaults connect --provider bitwarden` runs `aac listen --reusable-psk`
(Agent Access) in the terminal and connects it to the session: the session's
login fills then ask the user's Bitwarden vault, and the user approves each
request in aac. Quitting aac disconnects the session. With --token (or
AAC_TOKEN) the user runs the listener and the command only connects.
`notte vaults disconnect` disconnects it.
The token is `<psk>_<listener fingerprint>`, read from aac's reusable PSK
store (created when empty) and `aac connections list`, not from its screen.
The session routes (POST/DELETE /sessions/{id}/vault/connection) are not in
the published schema yet, so the client calls them by hand like payments.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A --token value is in argv, where other processes can read it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- A SIGTERM or SIGINT sent to notte alone is forwarded to aac, which is killed if it has not quit within 5 s; the session is then disconnected. - An aac exit other than a quit the user or such a signal asked for is reported as an error (the session is still disconnected). - Concurrent first connects agree on one PSK: the store is written to a temporary file and linked into place only if none exists, then re-read. - The connect request never follows a redirect, which would resend the token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
giordano-lucas
force-pushed
the
feat/vaults-connect-bitwarden
branch
from
November 4, 2026 10:18
07e8bf3 to
8d19275
Compare
When the connect fails, aac is interrupted and the main loop waits for it, so the kill deadline and further stop signals still apply: an aac that ignores the interrupt no longer hangs the command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@greptileai review |
A connect whose answer was lost or cut short may still have stored the token; only an answer refusing it rules that out. The CLI now disconnects in every other case, and says to run `notte vaults disconnect` if that fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
Author
|
@greptileai review |
giordano-lucas
marked this pull request as draft
November 4, 2026 18:35
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.
Based on #170 (API client regeneration, which
mainneeds to pass CI): its two commits show in this diff until #170 merges, then I rebase ontomain.Adds
notte vaults connect --provider bitwardenandnotte vaults disconnect. A cloud session can then fill logins from the user's Bitwarden Password Manager through Agent Access (aac). The backend is nottelabs/monorepo#5083; the commands do nothing useful until it's deployed.Usage
How
vaults connectworksaac listen --reusable-pskin the terminal. The user unlocks the vault there (/unlock) and approves each login request.<psk>_<listener fingerprint>from aac's own files, not its screen:~/.access-protocol/psk_store_user_client.json, which--reusable-pskloads; the CLI writes one when the store is empty;aac connections list --client-type user.POST /sessions/{id}/vault/connection. The token is never printed.DELETEon the same route.With
--token(orAAC_TOKEN), the user runs the listener themselves and the command only connects. Only reusable PSK tokens are accepted: a/paircode pairs once. A hidden--aac-providerflag runs aac's demo provider (example), for trying the flow without a vault.The routes are outside the published schema for now, so
internal/api/vault_connection.gocalls them by hand, aspayments.godoes.check-skillsneeds nottelabs/notte-skills#61 merged first.Testing
Unit tests:
internal/aac: PSK store creation and reuse, aac's PSK id, refusal of invalid stores, fingerprint parsing, token shape.internal/cmd: token mode, a pairing code refused, the listener run until it quits followed by a disconnect, and the listener stopped when the session refuses the connect.go test -race ./...andgolangci-lintpass.checkcoverage -check skillspasses against the skills branch.Live: the built binary ran in a PTY with real aac v0.11.0 (demo provider) against a recording API:
POSTwith a well-formed token from the stored PSK.DELETEand exited 0.Live against monorepo #5083's full-stack preview:
form_fillon github.com/login filled the demo login after one approval, with neither value in the responses.Not verified with a real Bitwarden vault.
🤖 Generated with Claude Code