feat(cli): kb remote login signs in with OAuth #67
All Vouch review confidence checks passed
Residual risk 0.45 = Change Risk (0.60) × (1 − Review Confidence (0.25)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 215 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 57% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.322
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #67"
general
weight: 0.35
chatgpt-codex-connector[bot]
Before: to use the remote commands or a scheduled Obsidian vault sync, the owner enrolled a client on the host and pasted its 64-hex bearer into
kb remote credential-set, then repeated that whenever the bearer expired.After:
kb remote login --profile work --endpoint https://memory.example.com --scope "project:demo retrieval:read status:read memory:export"prints an address, the owner approves on the host withkb-admin oauth-approve, and the command line keeps itself signed in for the grant's whole lifetime.How:
remote-login.service.ts: reads kb's authorization server metadata and refuses it unless the issuer and every endpoint are on the named origin and S256 is offered; registers a public client for a random127.0.0.1callback path; sends PKCE, a randomstateandresource=<origin>/v1(needs #66); ignores redirects with anotherstate; checksiss; exchanges the code.RemoteCredentialsstores the grant undercom.beaudry.kb.remote.oauth.get()returns its access token, refreshing it within two minutes of expiry under a lock in~/.kb/remote-oauth/and re-reading the record inside the lock, because kb ends a grant whose refresh token is used twice. A refused refresh forgets the grant; an outage keeps a token that has not expired.credential-setandloginreplace each other.remote,transfer, the inject hook, the MCP bridge launcher) keeps callingget(), so none of them changed.Not covered:
kb remote mcpgets one access token at launch (at most an hour); the guide says to use OAuth on/mcpfor long MCP sessions.---
_Generated by Claude Code_