oc-codex-multi-auth 6.1.6 → 6.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/README.md +276 -121
  2. package/config/minimal-opencode.json +2 -1
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +3 -2
  5. package/dist/index.js.map +1 -1
  6. package/dist/lib/auto-update-checker.d.ts +7 -1
  7. package/dist/lib/auto-update-checker.d.ts.map +1 -1
  8. package/dist/lib/auto-update-checker.js +51 -3
  9. package/dist/lib/auto-update-checker.js.map +1 -1
  10. package/dist/lib/config.d.ts +1 -0
  11. package/dist/lib/config.d.ts.map +1 -1
  12. package/dist/lib/config.js +4 -0
  13. package/dist/lib/config.js.map +1 -1
  14. package/dist/lib/request/request-transformer.d.ts.map +1 -1
  15. package/dist/lib/request/request-transformer.js +7 -2
  16. package/dist/lib/request/request-transformer.js.map +1 -1
  17. package/dist/lib/runtime.d.ts +1 -1
  18. package/dist/lib/runtime.js +1 -1
  19. package/dist/lib/schemas.d.ts +1 -0
  20. package/dist/lib/schemas.d.ts.map +1 -1
  21. package/dist/lib/schemas.js +1 -0
  22. package/dist/lib/schemas.js.map +1 -1
  23. package/dist/lib/tools/codex-export.js +2 -2
  24. package/dist/lib/tools/codex-export.js.map +1 -1
  25. package/dist/lib/tools/codex-help.js +3 -3
  26. package/dist/lib/tools/codex-help.js.map +1 -1
  27. package/dist/lib/tools/codex-remove.js +3 -3
  28. package/dist/lib/tools/codex-remove.js.map +1 -1
  29. package/dist/lib/tools/index.d.ts +8 -14
  30. package/dist/lib/tools/index.d.ts.map +1 -1
  31. package/dist/lib/tools/index.js +4 -6
  32. package/dist/lib/tools/index.js.map +1 -1
  33. package/package.json +2 -2
  34. package/scripts/clean-dist.js +27 -0
  35. package/scripts/install-oc-codex-multi-auth-core.js +19 -1
  36. package/scripts/install-oc-codex-multi-auth.js +15 -3
  37. package/dist/lib/tools/_shared.d.ts +0 -16
  38. package/dist/lib/tools/_shared.d.ts.map +0 -1
  39. package/dist/lib/tools/_shared.js +0 -21
  40. package/dist/lib/tools/_shared.js.map +0 -1
package/README.md CHANGED
@@ -1,206 +1,361 @@
1
1
  # oc-codex-multi-auth
2
2
 
3
- <!--
4
- Badges: CI + OpenSSF Scorecard will turn green once Phase 3 Batch A (CI workflow + Scorecard workflow) lands and runs its first job. Until then they may render as "no status" / 404 — that is expected and self-resolves automatically.
5
- -->
6
3
  [![npm version](https://img.shields.io/npm/v/oc-codex-multi-auth.svg)](https://www.npmjs.com/package/oc-codex-multi-auth)
7
4
  [![npm downloads](https://img.shields.io/npm/dw/oc-codex-multi-auth.svg)](https://www.npmjs.com/package/oc-codex-multi-auth)
8
- [![Node.js Version](https://img.shields.io/node/v/oc-codex-multi-auth.svg)](https://nodejs.org)
9
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
5
+
6
+ OpenCode plugin for ChatGPT Plus/Pro OAuth, Codex-first GPT-5 workflows, and multi-account rotation.
10
7
 
11
8
  <img width="1227" height="702" alt="cover" src="https://github.com/user-attachments/assets/b796eb2f-282e-468a-ba6a-acadf09d731b" />
12
9
 
13
- Use your ChatGPT Plus/Pro subscription inside OpenCode with OAuth login, GPT-5/Codex model presets, and multi-account failover.
14
10
 
15
- `oc-codex-multi-auth` is an OpenCode plugin for developers who want Codex-first GPT-5 workflows in OpenCode without switching to separate Platform API credentials for personal use. It uses the same official OAuth flow as the Codex CLI, adds model templates for current GPT-5 families, and can rotate across multiple ChatGPT accounts when one account is rate-limited or unavailable.
16
11
 
17
- ## What This Project Does
12
+ > [!NOTE]
13
+ > This package is the supported OpenCode plugin line.
14
+ > Older package names and config entries should be replaced with `oc-codex-multi-auth`.
18
15
 
19
- - Adds an OpenCode plugin that authenticates with ChatGPT Plus/Pro through official OAuth
20
- - Ships ready-to-use GPT-5.5 OAuth model templates, variant picker presets, optional explicit selector IDs, `gpt-5-codex`, and related GPT-5 families
21
- - Routes requests through a stateless Codex-compatible request pipeline with automatic token refresh
22
- - Supports multi-account rotation, per-project account storage, and guided onboarding commands
16
+ ## What You Get
23
17
 
24
- ## Quick Start
18
+ - Official ChatGPT OAuth login through OpenCode's auth flow
19
+ - Ready-to-use GPT-5.5, GPT-5.5 Fast, GPT-5.4 Mini, GPT-5.4 Nano, GPT-5.1, and Codex model templates
20
+ - Compact modern OpenCode config with model variants, plus legacy explicit selector IDs when needed
21
+ - Stateless Codex-compatible request handling with `store: false` and `reasoning.encrypted_content`
22
+ - Multi-account rotation with health-aware selection, cooldowns, and automatic token refresh
23
+ - Per-project account storage under `~/.opencode/projects/<project-key>/...`
24
+ - Guided account setup, health, dashboard, export/import, keychain, and troubleshooting tools
25
+ - Optional OS-native keychain backend for stored account pools
26
+ - Request logging, metrics, and diagnostics for OpenCode integration debugging
27
+ - Stable docs set for install, config, troubleshooting, privacy, and development architecture
28
+
29
+ ---
30
+
31
+ <details open>
32
+ <summary><b>Terms and Usage Notice</b></summary>
33
+
34
+ > [!CAUTION]
35
+ > This project is for personal development use with your own ChatGPT Plus/Pro subscription.
36
+ >
37
+ > By using this plugin, you acknowledge:
38
+ > - This is an independent open-source project, not an official OpenAI product
39
+ > - It is not intended for commercial resale, shared multi-user access, or production services
40
+ > - You are responsible for your own usage and policy compliance
41
+ > - For production/commercial workloads, use the OpenAI Platform API
42
+
43
+ </details>
44
+
45
+ ---
46
+
47
+ ## Installation
48
+
49
+ <details open>
50
+ <summary><b>For Humans</b></summary>
51
+
52
+ ### Option A: Standard install
25
53
 
26
54
  ```bash
27
- # 1. Install or refresh the plugin config
28
55
  npx -y oc-codex-multi-auth@latest
56
+ ```
57
+
58
+ ### Option B: Full explicit model catalog
29
59
 
30
- # 2. Sign in with ChatGPT Plus/Pro
60
+ Use this when you want direct selector IDs such as `openai/gpt-5.5-medium` in addition to OpenCode variants.
61
+
62
+ ```bash
63
+ npx -y oc-codex-multi-auth@latest --full
64
+ ```
65
+
66
+ ### Option C: Verify wiring
67
+
68
+ ```bash
69
+ opencode --version
70
+ opencode debug config
31
71
  opencode auth login
72
+ ```
32
73
 
33
- # 3. Run a prompt in OpenCode
34
- opencode run "Explain this repository" --model=openai/gpt-5.5 --variant=medium
74
+ The installer updates `~/.config/opencode/opencode.json`, backs up the previous config, normalizes the plugin entry to `"oc-codex-multi-auth"`, and clears the OpenCode cached plugin copy so OpenCode reinstalls the latest package.
75
+
76
+ </details>
77
+
78
+ <details>
79
+ <summary><b>For LLM Agents</b></summary>
80
+
81
+ ### Step-by-step
82
+
83
+ 1. Install or refresh config:
84
+ - `npx -y oc-codex-multi-auth@latest`
85
+ 2. Run first login flow:
86
+ - `opencode auth login`
87
+ 3. Validate config:
88
+ - `opencode debug config`
89
+ 4. Run a smoke request:
90
+ - `opencode run "Explain this repository" --model=openai/gpt-5.5 --variant=medium`
91
+ 5. Inspect plugin state with the OpenCode tool surface:
92
+ - `codex-status`
93
+ - `codex-doctor`
94
+ - `codex-list`
95
+
96
+ ### Verification
97
+
98
+ ```bash
99
+ opencode debug config
100
+ opencode auth login
101
+ opencode run "ping" --model=openai/gpt-5.5 --variant=medium
35
102
  ```
36
103
 
37
- What the installer does:
104
+ </details>
105
+
106
+ ---
38
107
 
39
- - writes `~/.config/opencode/opencode.json`
40
- - backs up an existing config before changing it
41
- - normalizes the plugin entry to `"oc-codex-multi-auth"`
42
- - clears the cached plugin copy so OpenCode reinstalls the latest package
108
+ ## Quick Start
43
109
 
44
- By default, the installer writes the compact UI config:
45
- - model picker entries stay on actual OAuth model families such as `gpt-5.5` and `gpt-5.5-fast`
46
- - reasoning presets are selected through OpenCode's model variant picker (`none`, `low`, `medium`, `high`, `xhigh`)
47
- - rerunning the default installer removes explicit preset entries and stale base models from earlier plugin catalogs
110
+ Install and sign in:
48
111
 
49
- If you prefer direct model IDs such as `openai/gpt-5.5-medium` or `openai/gpt-5.5-fast-medium`, install with `--full`.
112
+ ```bash
113
+ npx -y oc-codex-multi-auth@latest
114
+ opencode auth login
115
+ ```
50
116
 
51
- ## Example Usage
117
+ Run a prompt with the compact modern selectors:
52
118
 
53
119
  ```bash
54
- # General GPT-5 workflow
55
120
  opencode run "Summarize the failing test and suggest a fix" --model=openai/gpt-5.5 --variant=medium
56
121
  opencode run "Summarize the failing test and suggest a fix" --model=openai/gpt-5.5-fast --variant=medium
122
+ ```
57
123
 
58
- # Codex-focused workflow
124
+ Use Codex-focused routing:
125
+
126
+ ```bash
59
127
  opencode run "Refactor the retry logic and update the tests" --model=openai/gpt-5-codex --variant=high
60
128
  ```
61
129
 
62
- ## Usage Notice
130
+ If browser launch is blocked, use the alternate login paths in [docs/getting-started.md](docs/getting-started.md#alternate-login-paths).
63
131
 
64
- > [!CAUTION]
65
- > This project is for personal development use with your own ChatGPT Plus/Pro subscription.
66
- >
67
- > - It is not intended for commercial resale, shared multi-user access, or production services.
68
- > - It uses official OAuth authentication, but it is an independent open-source project and is not affiliated with OpenAI.
69
- > - For production applications, use the [OpenAI Platform API](https://platform.openai.com/).
70
- > - You are responsible for complying with [OpenAI's Terms of Use](https://openai.com/policies/terms-of-use/).
132
+ ---
71
133
 
72
- ## Why This Exists
134
+ ## Command Toolkit
73
135
 
74
- OpenCode users often want the same GPT-5 and Codex model experience they use in ChatGPT, but inside a local terminal workflow. This plugin exists to bridge that gap cleanly:
136
+ ### Start here
75
137
 
76
- - official OAuth instead of scraped cookies or unofficial auth flows
77
- - OpenCode-ready model definitions instead of hand-rolled config every time
78
- - account rotation and recovery features for people who work across multiple ChatGPT accounts or workspaces
138
+ | Tool | What it answers |
139
+ | --- | --- |
140
+ | `codex-setup` | How do I finish first-run setup safely? |
141
+ | `codex-help` | Which plugin commands exist and what do they do? |
142
+ | `codex-doctor` | What is wrong with auth, config, storage, or routing? |
143
+ | `codex-next` | What should I do next to get unstuck? |
79
144
 
80
- ## Features
145
+ ### Daily use
81
146
 
82
- - Official OAuth login flow compatible with ChatGPT Plus/Pro access
83
- - GPT-5 and Codex model templates for modern and legacy OpenCode versions
84
- - Multi-account rotation with health-aware failover
85
- - Per-project account storage support
86
- - Beginner-focused commands such as `codex-setup`, `codex-help`, `codex-doctor`, and `codex-next`
87
- - Interactive account switching, labeling, tagging, and backup/import commands
88
- - Stateless request handling with `reasoning.encrypted_content` for multi-turn sessions
89
- - Request logging and troubleshooting hooks for debugging OpenCode integration issues
147
+ | Tool | What it answers |
148
+ | --- | --- |
149
+ | `codex-list` | Which accounts are saved and which one is active? |
150
+ | `codex-switch` | How do I move to a different saved account? |
151
+ | `codex-status` | Which account, model family, and routing state are active? |
152
+ | `codex-limits` | What quota or rate-limit state is visible now? |
153
+ | `codex-dashboard` | Can I manage accounts from one interactive surface? |
90
154
 
91
- ## Common Workflows
155
+ ### Account management
92
156
 
93
- - Personal coding sessions in OpenCode using `gpt-5.5` / `gpt-5.5-fast` with variants, or `gpt-5-codex`
94
- - Switching between personal and workspace-linked ChatGPT accounts
95
- - Keeping separate account pools per project or monorepo
96
- - Recovering from unsupported-model, auth, or rate-limit issues with guided commands
157
+ | Tool | What it answers |
158
+ | --- | --- |
159
+ | `codex-label` | How do I name an account? |
160
+ | `codex-tag` | How do I group accounts with tags? |
161
+ | `codex-note` | How do I attach a private note to an account? |
162
+ | `codex-remove` | How do I remove a saved account safely? |
163
+ | `codex-refresh` | How do I refresh or re-login an account? |
97
164
 
98
- ## How It Works
165
+ ### Diagnostics and backup
99
166
 
100
- The plugin sits between OpenCode and the ChatGPT-backed Codex workflow:
167
+ | Tool | What it answers |
168
+ | --- | --- |
169
+ | `codex-health` | Which accounts look healthy, limited, or disabled? |
170
+ | `codex-metrics` | What runtime counters and request metrics are visible? |
171
+ | `codex-diag` | Can I export a diagnostic snapshot? |
172
+ | `codex-diff` | What changed between account/config snapshots? |
173
+ | `codex-export` | How do I back up account storage? |
174
+ | `codex-import` | How do I restore accounts with a dry-run first? |
175
+ | `codex-keychain` | Which credential backend is active and can I migrate it? |
101
176
 
102
- 1. OpenCode loads the plugin and sends model requests through the plugin fetch pipeline.
103
- 2. The plugin authenticates with ChatGPT OAuth and refreshes tokens when needed.
104
- 3. Requests are normalized for the Codex backend and sent with `store: false`.
105
- 4. The plugin chooses the best account/workspace candidate, retries intelligently, and preserves conversation continuity through encrypted reasoning state.
177
+ ### Reliability behavior
106
178
 
107
- See [Architecture](docs/development/ARCHITECTURE.md) for implementation details.
179
+ - stateless request handling forces `store: false`
180
+ - `reasoning.encrypted_content` is preserved for multi-turn continuity
181
+ - account rotation is health-aware and avoids repeatedly selecting cooling accounts
182
+ - 5xx bursts, network failures, and quota responses penalize account health
183
+ - token refresh is queued to avoid refresh races
184
+ - unsupported-model fallback is strict by default, with opt-in fallback controls
108
185
 
109
- ## Installation
186
+ ---
110
187
 
111
- Use the quick-start path above for the fastest setup. For full setup, local development installs, legacy OpenCode support, and verification steps, see [Getting Started](docs/getting-started.md).
188
+ ## Storage Paths
112
189
 
113
- For direct selector IDs in scripts or older habits, use the full catalog:
190
+ | File | Default path |
191
+ | --- | --- |
192
+ | OpenCode config | `~/.config/opencode/opencode.json` |
193
+ | OpenCode auth tokens | `~/.opencode/auth/openai.json` |
194
+ | Plugin config | `~/.opencode/openai-codex-auth-config.json` |
195
+ | Global account storage | `~/.opencode/oc-codex-multi-auth-accounts.json` |
196
+ | Per-project accounts | `~/.opencode/projects/<project-key>/oc-codex-multi-auth-accounts.json` |
197
+ | Flagged accounts | `~/.opencode/oc-codex-multi-auth-flagged-accounts.json` |
198
+ | Backups | `~/.opencode/backups/` or `~/.opencode/projects/<project-key>/backups/` |
199
+ | Logs | `~/.opencode/logs/codex-plugin/` |
114
200
 
115
- ```bash
116
- npx -y oc-codex-multi-auth@latest --full
117
- ```
201
+ Per-project storage is enabled by default. The plugin walks up from the current directory to find a project root, then stores account pools under the project-specific key. If no project root is found, it falls back to global storage.
202
+
203
+ ---
118
204
 
119
205
  ## Configuration
120
206
 
121
- Detailed configuration lives outside this README:
207
+ Primary config files:
208
+ - `~/.config/opencode/opencode.json`
209
+ - `~/.opencode/openai-codex-auth-config.json`
210
+
211
+ Selected runtime/environment overrides:
212
+
213
+ | Variable | Effect |
214
+ | --- | --- |
215
+ | `CODEX_AUTH_REQUEST_TRANSFORM_MODE=legacy` | Re-enable legacy Codex request rewriting |
216
+ | `CODEX_MODE=0/1` | Disable/enable bridge prompt behavior |
217
+ | `CODEX_TUI_V2=0/1` | Disable/enable codex-style tool output |
218
+ | `CODEX_TUI_COLOR_PROFILE=truecolor|ansi256|ansi16` | Force terminal color profile |
219
+ | `CODEX_TUI_GLYPHS=ascii|unicode|auto` | Force terminal glyph style |
220
+ | `CODEX_AUTH_PER_PROJECT_ACCOUNTS=0/1` | Disable/enable per-project account pools |
221
+ | `CODEX_AUTH_AUTO_UPDATE=0/1` | Disable/enable daily npm update check and cache refresh |
222
+ | `CODEX_AUTH_UNSUPPORTED_MODEL_POLICY=strict|fallback` | Control unsupported-model retry behavior |
223
+ | `CODEX_AUTH_ACCOUNT_ID=<id>` | Force a specific workspace/account id |
224
+ | `CODEX_AUTH_FETCH_TIMEOUT_MS=<ms>` | Request timeout override |
225
+ | `CODEX_AUTH_STREAM_STALL_TIMEOUT_MS=<ms>` | SSE stream stall timeout override |
226
+ | `ENABLE_PLUGIN_REQUEST_LOGGING=1` | Enable request metadata logs |
227
+ | `CODEX_PLUGIN_LOG_BODIES=1` | Include raw request/response bodies in logs; sensitive |
228
+ | `CODEX_KEYCHAIN=1` | Opt in to OS-native keychain account storage |
229
+
230
+ Validate config after changes:
231
+
232
+ ```bash
233
+ opencode debug config
234
+ opencode run "test" --model=openai/gpt-5.5 --variant=medium
235
+ ```
236
+
237
+ Modern OpenCode versions use [config/opencode-modern.json](config/opencode-modern.json). Older versions can use [config/opencode-legacy.json](config/opencode-legacy.json). See [config/README.md](config/README.md) for the full model template matrix.
122
238
 
123
- - [Getting Started](docs/getting-started.md) for install and first-run setup
124
- - [Configuration Reference](docs/configuration.md) for config keys, env vars, and fallback behavior
125
- - [Config Templates](config/README.md) for modern vs legacy OpenCode examples
239
+ ---
126
240
 
127
241
  ## Credential Storage
128
242
 
129
- By default, this plugin stores OAuth refresh tokens as a V3 JSON file under the per-project path determined by `lib/storage/paths.ts`. File permissions are restricted (`0o600` on the file, `0o700` on containing directories) on platforms that honour them.
243
+ <details open>
244
+ <summary><b>Default JSON backend</b></summary>
130
245
 
131
- ### Optional: OS-native keychain
246
+ By default, account pools are stored locally as V3 JSON files. File permissions are restricted where the platform supports them.
132
247
 
133
- Set `CODEX_KEYCHAIN=1` in the environment to store credentials in the OS keychain instead:
248
+ Use JSON storage when you want predictable, inspectable local files and easy backup/export behavior.
134
249
 
135
- - **macOS**: Keychain
136
- - **Windows**: Credential Manager
137
- - **Linux**: libsecret (requires a running secret service such as GNOME Keyring or KWallet)
250
+ </details>
138
251
 
139
- The opt-in is strict: only the literal value `"1"` enables the keychain backend. Any other value (unset, `"0"`, `"false"`, `""`, `"yes"`, ...) leaves behavior identical to earlier releases. Existing users see zero change by default.
252
+ <details>
253
+ <summary><b>Optional OS keychain backend</b></summary>
140
254
 
141
- When enabled on an existing install, the plugin auto-migrates the JSON file into the keychain on the next credential write and renames the original as `accounts.json.migrated-to-keychain.<timestamp>` for rollback. The original is never deleted automatically.
255
+ Set `CODEX_KEYCHAIN=1` to store account pools in the OS keychain instead:
142
256
 
143
- Use the `codex-keychain` tool to inspect and manage the backend:
257
+ - macOS: Keychain
258
+ - Windows: Credential Manager
259
+ - Linux: libsecret, with a running secret service such as GNOME Keyring or KWallet
144
260
 
145
- ```bash
146
- codex-keychain status # which backend is active, is the keychain reachable
147
- codex-keychain migrate # force-migrate on-disk JSON to the keychain now
148
- codex-keychain rollback # restore the most recent .migrated-to-keychain.<ts> backup
261
+ Manage the backend from OpenCode:
262
+
263
+ ```text
264
+ codex-keychain status
265
+ codex-keychain migrate
266
+ codex-keychain rollback
149
267
  ```
150
268
 
151
- ### Keychain fallback
269
+ If the keychain is unavailable, the plugin logs a warning and falls back to JSON storage for that operation. Credentials are never silently deleted.
152
270
 
153
- If the OS keychain is unavailable (Linux without secret service, permission denied, locked session, missing native module), the plugin logs a clear warning and falls back to the JSON backend for that operation. Credentials are never silently lost.
271
+ </details>
154
272
 
155
- See [SECURITY.md](SECURITY.md#credential-storage-backends) for the threat model that applies to each backend.
273
+ ---
156
274
 
157
275
  ## Troubleshooting
158
276
 
159
- Start here if the plugin does not load or authenticate correctly:
277
+ <details open>
278
+ <summary><b>60-second recovery</b></summary>
160
279
 
161
- - [Troubleshooting](docs/troubleshooting.md)
162
- - [Privacy & Data Handling](docs/privacy.md)
163
- - [FAQ](docs/faq.md)
164
- - [Security Policy](SECURITY.md)
280
+ ```text
281
+ codex-doctor --fix
282
+ codex-next
283
+ codex-status format="json"
284
+ ```
165
285
 
166
- Common first checks:
286
+ If still broken:
167
287
 
168
- - confirm `"plugin": ["oc-codex-multi-auth"]` is present in your OpenCode config
288
+ ```bash
289
+ opencode auth login
290
+ ```
169
291
 
170
- ## 6.0.0 Cutover
292
+ </details>
293
+
294
+ <details>
295
+ <summary><b>Common symptoms</b></summary>
296
+
297
+ - Plugin does not load: rerun `npx -y oc-codex-multi-auth@latest`, then restart OpenCode
298
+ - Config looks wrong: run `opencode debug config` and confirm `"plugin": ["oc-codex-multi-auth"]`
299
+ - OAuth callback fails: free port `1455`, then rerun `opencode auth login`
300
+ - Browser launch is blocked: use the device-code/manual login path from [docs/getting-started.md](docs/getting-started.md#alternate-login-paths)
301
+ - Wrong account is selected: run `codex-list`, then `codex-switch`
302
+ - Account pool looks unhealthy: run `codex-health format="json"` and `codex-doctor deep=true format="json"`
303
+ - Import/export feels risky: run `codex-import path="..." dryRun=true` before applying
304
+ - Debugging model fallback: enable `ENABLE_PLUGIN_REQUEST_LOGGING=1` and inspect `~/.opencode/logs/codex-plugin/`
305
+
306
+ </details>
307
+
308
+ <details>
309
+ <summary><b>Diagnostics pack</b></summary>
310
+
311
+ ```text
312
+ codex-status format="json"
313
+ codex-limits format="json"
314
+ codex-health format="json"
315
+ codex-next format="json"
316
+ codex-list format="json"
317
+ codex-dashboard format="json"
318
+ codex-metrics format="json"
319
+ codex-doctor deep=true format="json"
320
+ ```
171
321
 
172
- This release intentionally breaks the old package line and moves the runtime to package-aligned storage names.
322
+ </details>
173
323
 
174
- - Rename the GitHub repository to `ndycode/oc-codex-multi-auth`
175
- - Publish `oc-codex-multi-auth@6.0.0`
176
- - Deprecate the legacy npm package with a pointer to the new package
177
- - Verify docs, badges, repo links, and OpenCode config examples all resolve to `oc-codex-multi-auth`
178
- - rerun `opencode auth login`
179
- - inspect `~/.opencode/logs/codex-plugin/` after running one request with `ENABLE_PLUGIN_REQUEST_LOGGING=1`
324
+ ---
180
325
 
181
- ## FAQ
326
+ ## Documentation
182
327
 
183
- Short answers for the most common questions live in [docs/faq.md](docs/faq.md), including:
328
+ - Docs portal: [docs/README.md](docs/README.md)
329
+ - Documentation map: [docs/DOCUMENTATION.md](docs/DOCUMENTATION.md)
330
+ - Getting started: [docs/getting-started.md](docs/getting-started.md)
331
+ - Configuration: [docs/configuration.md](docs/configuration.md)
332
+ - Config templates: [config/README.md](config/README.md)
333
+ - Troubleshooting: [docs/troubleshooting.md](docs/troubleshooting.md)
334
+ - FAQ: [docs/faq.md](docs/faq.md)
335
+ - Privacy: [docs/privacy.md](docs/privacy.md)
336
+ - Architecture: [docs/development/ARCHITECTURE.md](docs/development/ARCHITECTURE.md)
337
+ - Testing: [docs/development/TESTING.md](docs/development/TESTING.md)
338
+ - Audit index: [docs/audits/INDEX.md](docs/audits/INDEX.md)
184
339
 
185
- - who this plugin is for
186
- - which OpenCode versions it supports
187
- - how the modern and legacy config templates differ
188
- - when to use this plugin versus the OpenAI Platform API
340
+ ---
189
341
 
190
- ## Contributing
342
+ ## Release Notes
191
343
 
192
- Contributions are welcome if they keep the project accurate, maintainable, and aligned with its personal-use scope.
344
+ - Current package version: `6.1.7`
345
+ - Changelog: [CHANGELOG.md](CHANGELOG.md)
346
+ - Releases are automated with [release-please](https://github.com/googleapis/release-please)
193
347
 
194
- - [Contributing Guide](CONTRIBUTING.md)
195
- - [Code of Conduct](CODE_OF_CONDUCT.md)
196
- - [Security Policy](SECURITY.md)
348
+ Merging the release-please PR cuts the tagged release and publishes the package through the configured release workflow. Manual `npm publish` is not required for routine releases.
197
349
 
198
- ## Releases
350
+ ## License
199
351
 
200
- Releases are automated via [release-please](https://github.com/googleapis/release-please). Conventional Commits landed on `main` drive version bumps and CHANGELOG entries; merging the open "Release candidate" PR cuts a tagged release. Manual `npm publish` is not required for routine releases.
352
+ MIT License. See [LICENSE](LICENSE).
201
353
 
202
- ## License
354
+ <details>
355
+ <summary><b>Legal</b></summary>
203
356
 
204
- MIT. See [LICENSE](LICENSE).
357
+ - Not affiliated with OpenAI.
358
+ - "ChatGPT", "GPT-5", "Codex", and "OpenAI" are trademarks of OpenAI.
359
+ - You assume responsibility for your own usage and compliance.
205
360
 
206
- ChatGPT, GPT-5, Codex, and OpenAI are trademarks of OpenAI, L.L.C.
361
+ </details>
@@ -5,7 +5,8 @@
5
5
  "provider": {
6
6
  "openai": {
7
7
  "options": {
8
- "store": false
8
+ "store": false,
9
+ "include": ["reasoning.encrypted_content"]
9
10
  }
10
11
  }
11
12
  },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AAiM/D;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,iBAAiB,EAAE,MAy3G/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAoB,CAAC;AAElD,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AAkM/D;;;;;;;;;;;;;;;GAeG;AAEH,eAAO,MAAM,iBAAiB,EAAE,MA03G/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAoB,CAAC;AAElD,eAAe,iBAAiB,CAAC"}
package/dist/index.js CHANGED
@@ -32,7 +32,7 @@ import { queuedRefresh } from "./lib/refresh-queue.js";
32
32
  import { openBrowserUrl } from "./lib/auth/browser.js";
33
33
  import { startLocalOAuthServer } from "./lib/auth/server.js";
34
34
  import { promptAddAnotherAccount, promptLoginMode } from "./lib/cli.js";
35
- import { getCodexMode, getRequestTransformMode, getFastSession, getFastSessionStrategy, getFastSessionMaxInputItems, getRetryProfile, getRetryBudgetOverrides, getRateLimitToastDebounceMs, getRetryAllAccountsMaxRetries, getRetryAllAccountsMaxWaitMs, getRetryAllAccountsRateLimited, getFallbackToGpt52OnUnsupportedGpt53, getUnsupportedCodexPolicy, getUnsupportedCodexFallbackChain, getTokenRefreshSkewMs, getSessionRecovery, getAutoResume, getToastDurationMs, getPerProjectAccounts, getEmptyResponseMaxRetries, getEmptyResponseRetryDelayMs, getPidOffsetEnabled, getFetchTimeoutMs, getStreamStallTimeoutMs, getCodexTuiV2, getCodexTuiColorProfile, getCodexTuiGlyphMode, getBeginnerSafeMode, loadPluginConfig, } from "./lib/config.js";
35
+ import { getCodexMode, getRequestTransformMode, getFastSession, getFastSessionStrategy, getFastSessionMaxInputItems, getRetryProfile, getRetryBudgetOverrides, getRateLimitToastDebounceMs, getRetryAllAccountsMaxRetries, getRetryAllAccountsMaxWaitMs, getRetryAllAccountsRateLimited, getFallbackToGpt52OnUnsupportedGpt53, getUnsupportedCodexPolicy, getUnsupportedCodexFallbackChain, getTokenRefreshSkewMs, getSessionRecovery, getAutoResume, getAutoUpdate, getToastDurationMs, getPerProjectAccounts, getEmptyResponseMaxRetries, getEmptyResponseRetryDelayMs, getPidOffsetEnabled, getFetchTimeoutMs, getStreamStallTimeoutMs, getCodexTuiV2, getCodexTuiColorProfile, getCodexTuiGlyphMode, getBeginnerSafeMode, loadPluginConfig, } from "./lib/config.js";
36
36
  import { AUTH_LABELS, CODEX_BASE_URL, DUMMY_API_KEY, LOG_STAGES, PLUGIN_NAME, PROVIDER_ID, ACCOUNT_LIMITS, } from "./lib/constants.js";
37
37
  import { initLogger, logRequest, logDebug, logInfo, logWarn, logError, setCorrelationId, clearCorrelationId, } from "./lib/logger.js";
38
38
  import { checkAndNotify } from "./lib/auto-update-checker.js";
@@ -1054,6 +1054,7 @@ export const OpenAIOAuthPlugin = async ({ client }) => {
1054
1054
  const streamStallTimeoutMs = getStreamStallTimeoutMs(pluginConfig);
1055
1055
  const sessionRecoveryEnabled = getSessionRecovery(pluginConfig);
1056
1056
  const autoResumeEnabled = getAutoResume(pluginConfig);
1057
+ const autoUpdateEnabled = getAutoUpdate(pluginConfig);
1057
1058
  const emptyResponseMaxRetries = getEmptyResponseMaxRetries(pluginConfig);
1058
1059
  const emptyResponseRetryDelayMs = getEmptyResponseRetryDelayMs(pluginConfig);
1059
1060
  const pidOffsetEnabled = getPidOffsetEnabled(pluginConfig);
@@ -1092,7 +1093,7 @@ export const OpenAIOAuthPlugin = async ({ client }) => {
1092
1093
  : null;
1093
1094
  checkAndNotify(async (message, variant) => {
1094
1095
  await showToast(message, variant);
1095
- }).catch((err) => {
1096
+ }, { autoUpdate: autoUpdateEnabled }).catch((err) => {
1096
1097
  logDebug(`Update check failed: ${err instanceof Error ? err.message : String(err)}`);
1097
1098
  });
1098
1099
  await runStartupPreflight();