Tokens: one keyring item per token, read back; the bridge says a locked keyring; token check
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
On the live books a reconnected bridge got no token from a keyring that couldn't be read, was told to "make a token", and after `token create --replace` kept on with the new token in memory while `download` read a revoked one from the keyring. - tokens.rs INVARIANT 4: keeping a token removes every item for its account in every collection, makes one and reads it back; reading finds every item and, finding several, refuses with how to keep one again; a locked or unreachable keyring is KeyringError::Unavailable, never "no token". The logic is shared by the OS keyring and the test files (now a folder per collection a test can lock, make unreachable, or plant a second item in). - make_token reads the token back before saying anything, or revokes it. - The bridge tells the agent the keyring is locked or unreachable and the token is fine (or that it holds several items), never to make a token; it reads the keyring again before every new session, even with a token held. - `wanderbooks token check --book ID [--name N]`: whether the token kept here is the books' live one, asked by its SHA-256 (admin op token_check), never its text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T3gXMVt7XJPi6ens1or9Dj
This commit is contained in:
9 files changed
+871
-95
No files matched your search
@@ -20,7 +20,7 @@ fn print_usage() {
|
||||
);
|
||||
eprintln!(" wanderbooks connect claude|codex --book ID");
|
||||
eprintln!(
|
||||
" wanderbooks token create --book ID | list | revoke --book ID | print --book ID"
|
||||
" wanderbooks token create --book ID | list | revoke --book ID | check --book ID | print --book ID"
|
||||
);
|
||||
eprintln!(" wanderbooks mcp --book ID [--token NAME]");
|
||||
eprintln!(" wanderbooks passphrase");
|
||||
|
||||
Reference in new issue
Block a user