Repository navigation
feat: add e2b-box auth refresh - #54
Merged
Merged
Conversation
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.
Summary
e2b-box auth refresh [ID] [--json]: one row per connection and discovered session, with status, time left, and the command to run when a row is stale. Barerefreshcovers everything; an ID narrows it.--oauthconnection (ADR 0015), once its bearer is inside its last 5 days or expired. Borrowed codex sessions (ADR 0010), claude setup-tokens and muse/amp keys are report-only. No running box is touched.expiringinside their last 30 days, since they have no refresh half.expired/unavailable), so it is safe to cron.bin/e2b-boxandauth --help; README paragraph.Out of scope, tracked separately: rotating grok's multi-use grant, and
--pushdelivery into running boxes.Known issue (predates this PR)
After a rotation,
auth liststill shows the connection asexpired:rewriteOauthSecretrewrites the token file but notexpiresAtin the metadata, andauth listreads the metadata.auth reconnecthas the same gap.auth refreshandauth checkread the token and are correct.Test plan
node --test test/auth-refresh.test.js(4 tests, including a CLI spawn)--oauthchain rotated to 9 days, exit 0;auth check codex-personalconfirmslocally-readye2b-box auth refresh --jsonande2b-box auth refresh <id>on your own config