codex-copilot-dx 0.6.4 → 0.6.5
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.
- package/README.md +18 -18
- package/package.json +1 -1
- package/src/adapter.mjs +3 -5
- package/src/auto-review-model.mjs +1 -1
- package/src/cli-options.mjs +1 -1
- package/src/launcher.mjs +2 -3
package/README.md
CHANGED
|
@@ -111,7 +111,7 @@ active account or profile. GPT requests continue to use the bearer supplied by
|
|
|
111
111
|
the current PM profile; exact enabled Anthropic model IDs use the isolated
|
|
112
112
|
CCDX Claude profile. Neither credential is copied into the other application.
|
|
113
113
|
|
|
114
|
-
The
|
|
114
|
+
The current patch recipe supports only an exact, unmodified PM Studio 2.9.7 bundle on
|
|
115
115
|
macOS. Authorize the isolated Claude profile first, quit PM Studio and its
|
|
116
116
|
updater, then run the one-time setup command:
|
|
117
117
|
|
|
@@ -127,7 +127,7 @@ and relay without changing files:
|
|
|
127
127
|
ccdx pms status
|
|
128
128
|
```
|
|
129
129
|
|
|
130
|
-
`pm-studio status` and `pm-studio setup` are equivalent long-form aliases.
|
|
130
|
+
`ccdx pm-studio status` and `ccdx pm-studio setup` are equivalent long-form aliases.
|
|
131
131
|
|
|
132
132
|
`ccdx pms setup` performs only local preflight, backup, staging, integrity,
|
|
133
133
|
signing, and replacement work. It never starts Device Flow, the adapter,
|
|
@@ -187,13 +187,13 @@ To change the model used by Codex Auto-review, run:
|
|
|
187
187
|
ccdx auto-review-model
|
|
188
188
|
```
|
|
189
189
|
|
|
190
|
-
The selector
|
|
191
|
-
model
|
|
190
|
+
The selector first queries the running adapter, including its last-known-good
|
|
191
|
+
model list when live refresh is unavailable, then falls back to the non-expired
|
|
192
|
+
local model cache. It offers only enabled models that advertise a Responses endpoint.
|
|
192
193
|
It saves the selection in `~/.config/codex-copilot-dx/config.json` (or under
|
|
193
194
|
`XDG_CONFIG_HOME` when set); choosing `gpt-5.5` clears the override and restores
|
|
194
|
-
the package default. A running
|
|
195
|
-
|
|
196
|
-
be restarted.
|
|
195
|
+
the package default. A running adapter reads the setting on the next Auto-review
|
|
196
|
+
request, so it does not need to be restarted.
|
|
197
197
|
|
|
198
198
|
To update the globally installed package, choose a source interactively:
|
|
199
199
|
|
|
@@ -213,26 +213,26 @@ ccdx update github
|
|
|
213
213
|
The npm source installs `codex-copilot-dx@latest` through the registry already
|
|
214
214
|
configured for npm, including a company mirror. The GitHub source installs the
|
|
215
215
|
latest commit from `DaleXiao/codex-copilot-dx` `main` and opts in to Git fetching
|
|
216
|
-
for that command
|
|
217
|
-
|
|
216
|
+
for that command. It does not change npm's persistent `allow-git` setting. Both
|
|
217
|
+
paths use npm's global installer without shell
|
|
218
218
|
interpolation. A currently running adapter keeps its loaded version until it is
|
|
219
219
|
stopped and started again.
|
|
220
220
|
If a configured npm mirror has not synchronized the current release yet, use
|
|
221
221
|
the GitHub source to install the current `main` revision.
|
|
222
222
|
|
|
223
|
-
On
|
|
224
|
-
1.
|
|
225
|
-
2.
|
|
226
|
-
3.
|
|
223
|
+
On a normal launch, it will:
|
|
224
|
+
1. Print the local package version and check for a newer npm release in the background
|
|
225
|
+
2. Reuse a compatible running adapter when available; otherwise authenticate with GitHub if needed, after first trying compatible local Copilot token sources
|
|
226
|
+
3. When starting a new adapter, refresh Copilot model metadata and listen on loopback (`127.0.0.1:2026`)
|
|
227
227
|
4. Configure Codex (`~/.codex/config.toml`) to use the adapter, including stale shell env base URLs if present
|
|
228
228
|
5. Configure Claude Code (`~/.claude/settings.json`) to use the adapter; it creates the file when missing, otherwise backs up `settings.json.bak` before updating the local API env keys
|
|
229
|
-
6.
|
|
229
|
+
6. On macOS, attempt to launch Codex or ChatGPT unless `CCDX_AUTO_LAUNCH` disables it
|
|
230
230
|
|
|
231
231
|
Claude Code picks up the new `ANTHROPIC_BASE_URL` on its next launch.
|
|
232
232
|
|
|
233
|
-
If
|
|
233
|
+
If a compatible CCDX adapter is already running on the configured host and port, a second launch reuses it instead of starting another proxy. The second launch still refreshes Codex and Claude Code config, then exits.
|
|
234
234
|
|
|
235
|
-
The running adapter reports its package and protocol versions. After upgrading
|
|
235
|
+
The running adapter reports its package and protocol versions. After upgrading the package, stop the old process before starting the new version; the new CLI refuses to silently reuse an incompatible adapter.
|
|
236
236
|
|
|
237
237
|
Do not set Claude Code by manually exporting `ANTHROPIC_BASE_URL` or `ANTHROPIC_AUTH_TOKEN` in your shell. Let `ccdx` write the local config files instead. If you previously exported those variables, remove them from shell startup files and restart the terminal before launching Claude Code.
|
|
238
238
|
|
|
@@ -337,7 +337,7 @@ Environment variables:
|
|
|
337
337
|
| `CCDX_REQUEST_BODY_TIMEOUT_MS` | `120000` | Maximum time to receive and decode one request body before returning `408` |
|
|
338
338
|
| `CCDX_MAX_UPSTREAM_BODY_BYTES` | `31457280` | Strict maximum forwarded Responses body size; larger payloads are adapted locally or rejected with `413` |
|
|
339
339
|
| `CCDX_MAX_SSE_BUFFER_BYTES` | `8388608` | Maximum buffered bytes for one unterminated upstream SSE line/event |
|
|
340
|
-
| `CCDX_UPSTREAM_TIMEOUT_MS` | `120000` |
|
|
340
|
+
| `CCDX_UPSTREAM_TIMEOUT_MS` | `120000` | Per-phase timeout for Responses preparation and non-streaming upstream Copilot requests |
|
|
341
341
|
| `CCDX_STREAM_HANDSHAKE_TIMEOUT_MS` | `120000` | Timeout while waiting for upstream streaming response headers |
|
|
342
342
|
| `CCDX_STREAM_IDLE_TIMEOUT_MS` | `120000` | Maximum idle time between upstream streaming body chunks |
|
|
343
343
|
| `CCDX_UPSTREAM_RETRIES` | `2` | Retries for safe requests and clearly pre-connect POST failures; capped at `5` |
|
|
@@ -398,7 +398,7 @@ The final serialized UTF-8 request body is measured before forwarding. Above the
|
|
|
398
398
|
|
|
399
399
|
Completed image transforms are reused from a byte-bounded process-local LRU cache, and concurrent requests for the same transform share one encode. The cache key includes source content, MIME type, model-aware dimensions, WebP quality, and encoder settings; failures are not cached and request cancellation remains isolated.
|
|
400
400
|
|
|
401
|
-
Before image encoding, CCDX leaves ordinary visual history byte-for-byte unchanged while it has at most 24 historical images and the expanded body is at most 18 MiB. Above either threshold, the temporary upstream view keeps every current-turn image and at most 16 recent historical images, targeting 16 MiB. If that history tree then times out during local preparation or upstream
|
|
401
|
+
Before image encoding, CCDX leaves ordinary visual history byte-for-byte unchanged while it has at most 24 historical images and the expanded body is at most 18 MiB. Above either threshold, the temporary upstream view keeps every current-turn image and at most 16 recent historical images, targeting 16 MiB. If that history tree then times out during local preparation, a streaming handshake, or a non-streaming upstream request, or if the upstream returns HTTP 408, the next retry automatically uses an 8-image, 10 MiB recovery window for ten minutes. Two successful requests or a successful compaction clear recovery mode. CCDX never transparently repeats the ambiguous timed-out POST, and no local history is deleted; retrying does not require restarting the service.
|
|
402
402
|
|
|
403
403
|
When expanded Responses history exceeds Copilot's 50-image request limit, the adapter removes older duplicate image occurrences first, then keeps the 50 most recent images. This applies only to the forwarded request: local history remains complete, current images are preferred over older history, and requests at or below the limit are unchanged.
|
|
404
404
|
|
package/package.json
CHANGED
package/src/adapter.mjs
CHANGED
|
@@ -366,11 +366,9 @@ export function startAdapter(port = 2026, host = "127.0.0.1", options = {}) {
|
|
|
366
366
|
server.once("close", cleanupTerminalActivity);
|
|
367
367
|
|
|
368
368
|
server.on("upgrade", (req, socket) => {
|
|
369
|
-
//
|
|
370
|
-
//
|
|
371
|
-
//
|
|
372
|
-
// 5-attempt reconnect storm. Refuse the upgrade so Codex falls back to
|
|
373
|
-
// plain HTTP SSE, which this adapter handles correctly.
|
|
369
|
+
// The responses_websockets upgrade expects a server-push protocol that this
|
|
370
|
+
// adapter does not implement. Refuse it so the client can fall back to the
|
|
371
|
+
// supported HTTP SSE transport instead of waiting on an unusable socket.
|
|
374
372
|
socket.write("HTTP/1.1 426 Upgrade Required\r\nConnection: close\r\nContent-Length: 0\r\n\r\n");
|
|
375
373
|
socket.destroy();
|
|
376
374
|
});
|
|
@@ -135,7 +135,7 @@ export async function runAutoReviewModelCommand({
|
|
|
135
135
|
if (String(env.CCDX_AUTO_REVIEW_MODEL || "").trim()) {
|
|
136
136
|
output.write(`CCDX_AUTO_REVIEW_MODEL=${current.model} remains the effective override until it is unset.\n`);
|
|
137
137
|
} else {
|
|
138
|
-
output.write("The running
|
|
138
|
+
output.write("The running adapter will use this model on the next Auto Review request.\n");
|
|
139
139
|
}
|
|
140
140
|
return { ...result, cancelled: false, model: selectedModel };
|
|
141
141
|
}
|
package/src/cli-options.mjs
CHANGED
|
@@ -258,7 +258,7 @@ export function cliCommandName() {
|
|
|
258
258
|
|
|
259
259
|
function topicHelp(name, topic) {
|
|
260
260
|
const sections = {
|
|
261
|
-
start: `Usage:\n ${name} [start] [--configure-claude-app] [--show-request-id]\n\nStarts or reuses the local adapter, updates Codex and Claude Code configuration, and
|
|
261
|
+
start: `Usage:\n ${name} [start] [--configure-claude-app] [--show-request-id]\n\nStarts or reuses the local adapter, updates Codex and Claude Code configuration, and attempts to open Codex or ChatGPT when auto-launch is enabled and supported.\n--configure-claude-app also creates or updates the managed Claude App gateway profile.`,
|
|
262
262
|
auth: `Usage:\n ${name} auth status [--online]\n ${name} auth login claude [--github-login <login>] [--reauth]\n\nShows the two account profiles or configures the isolated Claude account. Device login starts only when no reusable local Copilot credential is available or --reauth is used.`,
|
|
263
263
|
"auth status": `Usage:\n ${name} auth status [--online]\n\nShows account routing without exposing credentials. --online also verifies both configured Copilot entitlements and model catalogs.`,
|
|
264
264
|
"auth login": `Usage:\n ${name} auth login claude [--github-login <login>] [--reauth]\n\nReuses a compatible local Copilot credential when possible. --reauth forces GitHub Device Flow.`,
|
package/src/launcher.mjs
CHANGED
|
@@ -3,9 +3,8 @@ import { status } from "./status.mjs";
|
|
|
3
3
|
|
|
4
4
|
export { ensureAuth } from "./auth.mjs";
|
|
5
5
|
|
|
6
|
-
//
|
|
7
|
-
//
|
|
8
|
-
// Codex.app and the new ChatGPT.app regardless of where they are installed.
|
|
6
|
+
// Prefer the Codex bundle identifier, then fall back to the known app paths.
|
|
7
|
+
// This supports both Codex.app and ChatGPT.app regardless of installation path.
|
|
9
8
|
const CODEX_BUNDLE_ID = "com.openai.codex";
|
|
10
9
|
const APP_PATH_CANDIDATES = [
|
|
11
10
|
"/Applications/Codex.app",
|