Commit 249105e
feat(vault): M5 slice 2 — TUI reveal + agent-side clipboard copy
Wire the TUI's detail pane to show and copy secrets, gated on a new
agent-side copy path so the plaintext never crosses the socket and the
auto-clear survives the TUI quitting.
Protocol (vault-ipc): Request::Get gains `id: Option<String>`; new
Request::Copy { id, name, field, clear_after_secs } returns Response::Ok.
Agent: get_item targets an exact cipher id when given (name is the
fallback/label), closing the duplicate-name footgun where copy/reveal
could hit the wrong item. New default-on `clipboard` feature holds an
arboard handle; the Copy arm decrypts the field, places it on the agent's
own clipboard, and schedules a 30s auto-clear that wipes only if the
clipboard still holds what we wrote (or can't be read — fail-safe).
--no-default-features drops the X11/Wayland tree and declines Copy cleanly.
CLI: cmd_get passes `id: None` (behavior unchanged).
TUI: Space reveals the selected login's password (id-targeted Get,
re-masked on any navigation, held in a zeroizing/Debug-redacted
RevealedSecret); c/u/o copy password/username/URI via Copy with a
status-bar toast. Copy/reveal act only when the item list is focused.
Tests: id-targeting-among-duplicates regression, should_clear_clipboard
and clipboard_set-when-None units, a dispatch-level Copy-while-locked
test, and TUI reveal/re-mask/toast/Debug-redaction units plus TestBackend
smokes for masked/revealed/toast states.
Supply-chain: arboard pulls error-code (BSL-1.0, via Windows-only
clipboard-win) — added to deny.toml's allow-list (FSF GPL-compatible).
No new advisories.
Known limitation (tracked): on Quit/stop-agent a pending clear task dies
with the runtime, so a just-copied secret can linger until overwritten.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 7c4c0a1 commit 249105e
15 files changed
Lines changed: 976 additions & 40 deletions
File tree
- crates
- vault-agent
- src
- vault-cli/src
- vault-ipc
- src
- tests
- vault-tui
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
13 | 47 | | |
14 | 48 | | |
15 | 49 | | |
| |||
0 commit comments