Skip to content

docs(readme): Interchange-style install and examples (CL-8775) - #5

Merged
TheGreatAxios merged 6 commits into
mainfrom
cl-8775-readme-codex
Sep 22, 2026
Merged

TheGreatAxios merged 6 commits into
mainfrom
cl-8775-readme-codex

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Quickstart now leads with how this package is actually consumed in production: registering its exports as one entry in a host's OAuthLoginProviders map, passed to @corbits/oauth-core/hub's mountOAuthLogin and createOAuthTokenRefresher. 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-core owns all of that.

The OAuth entry shows the real signatures:

  • refresh only ever receives the stored refresh secret, so refreshCodexTokens's third argument (the "previous" tokens) is seeded with just that secret
  • metadata extracts accountId from the exchanged tokens, since the Codex backend rejects inference without that header

Inference-adapter registration (createCodexResponsesAdapter, withCodexContentTypeRepair) moves to its own "Register the inference adapter" subsection, unchanged from before.

What changed

  • No in-memory Maps, fake token stores, or standalone re-wiring of this package's own exports into itself
  • Every export name in the README exists in src/ (CODEX_PROVIDER, codexOAuthConfig, exchangeCodexCode, refreshCodexTokens, createCodexResponsesAdapter, withCodexContentTypeRepair)
  • Both code fences were verified against tsc --noEmit in this repo before committing

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.
@TheGreatAxios
TheGreatAxios merged commit 8b02664 into main Sep 22, 2026
1 check passed
@TheGreatAxios
TheGreatAxios deleted the cl-8775-readme-codex branch September 22, 2026 05:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant