You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(vault): M4 slice 4 — --json on lifecycle verbs + real vault sync
Close the two remaining M4 items.
--json on unlock/lock/sync/stop-agent: all four stay silent on success in
human mode (existing pipelines unchanged) and emit a small envelope under
--json ({"unlocked":true}, {"locked":true}, {"stopped":true}, and for sync
{"synced":true,"items":N,"last_sync":"…"}). cmd_simple is retired in favour
of cmd_ack (Ok-only acks) and a dedicated cmd_sync.
vault sync now actually re-pulls /sync over the unlock-time session and
replaces the in-memory ciphers, folder map, and last_sync stamp (it was an
M3 stub that only checked the unlocked flag). The agent answers a successful
re-sync with a fresh Status snapshot so --json can report the new item count.
Parity with unlock: only the in-memory vault is refreshed — the agent still
doesn't write the on-disk vault-store cache. A sync long after unlock can 401
once the access token expires (no refresh-token flow in M4); it surfaces as
IpcError::Network, same as add/edit/remove.
The /sync → (ciphers, folders) decode is factored out of perform_unlock into
a shared unlock::ciphers_and_folders, now the single spine of both unlock and
resync, with two direct unit tests (typed-view decode + malformed-folder skip).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
0 commit comments