docs(readme): Interchange-style install and examples (CL-8775) - #5
Merged
Merged
Conversation
Registry add commands for @corbits/codex-provider. Examples match public exports.
Use Quickstart / How it works / Development / License instead of Install / Use / Full example / Contributing.
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
The Quickstart now leads with how this package is actually consumed in production: registering its exports as one entry in a host's
OAuthLoginProvidersmap, passed to@corbits/oauth-core/hub'smountOAuthLoginandcreateOAuthTokenRefresher. That's the real pattern the Interchange hub (workbench) uses for "Continue with Codex" — this package never runs its own callback server, token store, or refresh loop;oauth-coreowns all of that.The OAuth entry shows the real signatures:
refreshonly ever receives the stored refresh secret, sorefreshCodexTokens's third argument (the "previous" tokens) is seeded with just that secretmetadataextractsaccountIdfrom the exchanged tokens, since the Codex backend rejects inference without that headerInference-adapter registration (
createCodexResponsesAdapter,withCodexContentTypeRepair) moves to its own "Register the inference adapter" subsection, unchanged from before.What changed
src/(CODEX_PROVIDER,codexOAuthConfig,exchangeCodexCode,refreshCodexTokens,createCodexResponsesAdapter,withCodexContentTypeRepair)tsc --noEmitin this repo before committing