codex-copilot-dx 1.3.15 → 1.3.16
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 +1 -1
- package/bin/cli.mjs +7 -9
- package/docs/ARCHITECTURE.md +3 -1
- package/docs/REFERENCE.md +2 -2
- package/package.json +1 -1
- package/src/codex-image-host.mjs +3 -1
- package/src/launcher.mjs +7 -0
- package/src/startup-ui.mjs +6 -0
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Use `ccdx help` or `ccdx <command> --help` for options. The CLI uses English; th
|
|
|
63
63
|
Use the Web UI for accounts, APIs, models, client access, input suggestions, native images, local masking, appearance, diagnostics and updates. CLI commands remain available for automation and recovery. See the [control reference](docs/REFERENCE.md#webui-and-cli-controls).
|
|
64
64
|
|
|
65
65
|
- **Input suggestions:** new integrations attempt setup by default when Codex is closed. Saved off choices are retained. The Web UI can enable, disable, finish setup, open Codex and repair the bridge. Setup synchronizes Show predictions, adds App-profile trust and locally decrypts the prediction hosts' HTTPS traffic. App/thread eligibility still applies. [Details](docs/REFERENCE.md#optional-native-predictions).
|
|
66
|
-
- **Images:** Codex native host tools use the selected GitHub image model, with GPT Image 2.5 Flare as the default. Images start enabled; saved off choices are retained. On macOS with Codex 0.166+, start Codex through CCDX and use a new chat
|
|
66
|
+
- **Images:** Codex native host tools use the selected GitHub image model, with GPT Image 2.5 Flare as the default. Images start enabled; saved off choices are retained. On macOS with Codex 0.166+, fully quit a running App that lacks the host, start Codex through CCDX, and use a new chat. ChatGPT sign-in and Apps are retained. The Web UI provides model selection without an extra API key, MCP or CCDX image skill. [Details](docs/REFERENCE.md#native-image-generation).
|
|
67
67
|
- **Updates:** Settings → Install update downloads and verifies a stable release, then switches the installed service when idle. Busy work postpones the switch. Unmanaged launches require the installer or an installed command. [Details](docs/REFERENCE.md#installation-and-updates).
|
|
68
68
|
|
|
69
69
|
Web UI activity updates through server push; the terminal uses the same in-process activity feed. Reconnecting restores current state and bounded recent records.
|
package/bin/cli.mjs
CHANGED
|
@@ -282,7 +282,7 @@ const { createProfileModelRuntime } = await import("../src/profile-model-runtime
|
|
|
282
282
|
const { createCodexModelCatalog } = await import("../src/codex-model-catalog.mjs");
|
|
283
283
|
const { createProviderRuntime } = await import("../src/provider-runtime.mjs");
|
|
284
284
|
const { setResponseHistoryMaxBytes } = await import("../src/response-history.mjs");
|
|
285
|
-
const { startupBanner, startupCheck, startupReady, startupLogger, predictionStartupCheck, providerStartupChecks, createStartupPresentation } = await import("../src/startup-ui.mjs");
|
|
285
|
+
const { startupBanner, startupCheck, startupReady, startupLogger, predictionStartupCheck, imageStartupCheck, providerStartupChecks, createStartupPresentation } = await import("../src/startup-ui.mjs");
|
|
286
286
|
const { createTerminalConsole } = await import("../src/terminal-console.mjs");
|
|
287
287
|
const { createServiceControl } = await import("../src/service-control.mjs");
|
|
288
288
|
const { openDashboard } = await import("../src/browser-launch.mjs");
|
|
@@ -375,12 +375,11 @@ async function reuseRunningAdapterIfAvailable() {
|
|
|
375
375
|
if (!predictionPacUrl) console.warn(status("warn", "Restart ccdx to activate the newly enabled prediction bridge"));
|
|
376
376
|
}
|
|
377
377
|
} catch (error) { console.warn(status("warn", error.message)); }
|
|
378
|
-
|
|
379
|
-
|
|
378
|
+
const imageHost = codexEnabled && imageEnabled ? await (await clientIntegrations()).imageHostLaunch() : null;
|
|
379
|
+
if (codexEnabled) await openCodex({ predictionPacUrl, predictionApp, predictionProfile, persistedPredictionRoute, imageHost,
|
|
380
380
|
onPredictionRoute: route => { launchRoute = route; }, log: startupLogger("App") });
|
|
381
381
|
console.log(predictionStartupCheck({ configured: predictionConfigured, bridge: predictionPacUrl ? "running" : "unknown", launch_route: launchRoute }));
|
|
382
|
-
console.log(
|
|
383
|
-
? imageMcpSkipped ? "App setup skipped; see warning" : "Configured; not tested" : "Off"));
|
|
382
|
+
console.log(imageStartupCheck({ enabled: imageEnabled, prepared: Boolean(imageHost), skipped: imageMcpSkipped }));
|
|
384
383
|
console.log(providerStartupChecks((await serviceStatus)?.data));
|
|
385
384
|
console.log(startupReady({ baseUrl: running.baseUrl, commandName: CLI_NAME, reused: true }));
|
|
386
385
|
await launchDashboard();
|
|
@@ -533,13 +532,12 @@ try {
|
|
|
533
532
|
const persistentRoute = await nativePrediction?.prepareRoute();
|
|
534
533
|
|
|
535
534
|
// Launch Codex when available. A running App is never forcibly restarted.
|
|
536
|
-
|
|
537
|
-
|
|
535
|
+
const imageHost = codexEnabled && imageEnabled ? await clientIntegration.imageHostLaunch() : null;
|
|
536
|
+
if (codexEnabled) await openCodex({ predictionPacUrl: nativePrediction?.pacUrl, predictionApp: nativePrediction?.app, predictionProfile: nativePrediction?.profile, imageHost,
|
|
538
537
|
preparePredictionRoute: () => nativePrediction?.prepareRoute(), persistedPredictionRoute: persistentRoute?.status === "installed",
|
|
539
538
|
onPredictionRoute: route => clientIntegration?.launched(route), log: startupLogger("App") });
|
|
540
539
|
console.log(predictionStartupCheck(clientIntegration?.snapshot().prediction));
|
|
541
|
-
console.log(
|
|
542
|
-
? imageMcpSkipped ? "App setup skipped; see warning" : "Configured; not tested" : "Off"));
|
|
540
|
+
console.log(imageStartupCheck({ enabled: imageEnabled, prepared: Boolean(imageHost), skipped: imageMcpSkipped }));
|
|
543
541
|
console.log(providerStartupChecks(activeServer.ccdxSnapshot?.()));
|
|
544
542
|
|
|
545
543
|
// Periodically refresh the model list + endpoint cache so a long-running
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -11,7 +11,7 @@ Client integration, image tools and the dashboard are not a general plugin frame
|
|
|
11
11
|
| Provider composition | `provider-runtime.mjs`, `connection-runtime.mjs`, provider/access settings | Explicit selection, lifecycle, history namespaces and snapshots |
|
|
12
12
|
| Claude clients | `claude-gateway.mjs`, `claude-client-lifecycle.mjs`, `claude-client-config.mjs`, `claude-models.mjs` | Native Messages relay and field-owned reversible client setup |
|
|
13
13
|
| Client integration | `client-integration.mjs`, Codex config, native prediction | Client setup, optional start/stop, diagnostic snapshots |
|
|
14
|
-
| Native images | Images routes, native SDK host tools, GHC client, preference controls and legacy retirement | Native tool progress and
|
|
14
|
+
| Native images | Images routes, native SDK host tools, GHC client, preference controls and legacy retirement | Native tool progress and image content through the existing GitHub account; ChatGPT Apps and sign-in retained, no image MCP or separate credential |
|
|
15
15
|
| Management | CLI, dashboard, observability, package updates | Bounded metadata and explicit user actions |
|
|
16
16
|
| Shared foundations | Codex paths, file locks, atomic files, network routes | No dependency on inference or dashboard rendering |
|
|
17
17
|
|
|
@@ -1077,6 +1077,8 @@ Claude passthrough now holds incomplete SSE frames and validates complete data b
|
|
|
1077
1077
|
|
|
1078
1078
|
`image-setup.mjs` projects native GHC image availability and selection; `service-control.mjs` serializes toggle and model-selection changes. `image-retirement.mjs` removes the independent image credential, recognizable old MCP declarations and unmodified guidance. Customized files are preserved with a warning. Codex’s native image extension sends separate JSON generation/edit requests through its configured provider, saves the resulting pixels and emits image items to the App; CCDX reuses GHC authentication and maps the native alias to the saved GHC image selection. `image-models.mjs` interprets declared image capabilities independently of conversation picker flags; `clients.codex.image_model` is the canonical selection shared by controls, model configuration and the Images route. Image-only selection does not change conversation bindings or history isolation. The browser has no image API address/key form. The model compatibility action uses `doctor-compat.mjs` through local tools and requires explicit quota confirmation.
|
|
1079
1079
|
|
|
1080
|
+
On macOS, the owned Codex launcher supplies the stdio host adapter to a new App process without changing the signed App or account. The host reads the loopback dashboard settings route with its required dashboard header before registering the image tool; disabled or unreadable settings leave it unregistered. A running App retains its old environment, so startup explains how to activate a missing host without restarting that App.
|
|
1081
|
+
|
|
1080
1082
|
The existing supervisor accepts a bounded manual update request as well as its optional nightly scheduler. Both use the same staged package verification, immutable worker, state-transfer, installation commit and rollback path. Manual and scheduled updates are mutually exclusive; settings operations contribute to busy state and stable prediction intent/trust participate in the state fingerprint; the legacy image credential path remains in this fingerprint for old-worker compatibility, and legacy image cleanup runs only after activation; native port allocation and App stat bookkeeping do not. Warm handoff suppresses first-time prediction setup and pending display writes. Explicit prediction reconfiguration replaces the old bridge after committing trust. An unowned installation falls back to the existing standalone launch and exposes that self-update is unavailable. No inference protocol, privacy transport or native authentication path is changed by these controls.
|
|
1081
1083
|
|
|
1082
1084
|
Native discovery, configuration and startup environment inspection run in bounded temporary `prediction-operations.mjs` workers. PowerShell, certificate and filesystem work do not block the gateway event loop. Registered-App discovery precedes default trust/proxy setup; missing Apps leave core startup available. Private environment results feed only bridge initialization and are not returned by WebUI actions.
|
package/docs/REFERENCE.md
CHANGED
|
@@ -582,9 +582,9 @@ was recreated on the original address, not that gray text appeared.
|
|
|
582
582
|
|
|
583
583
|
Codex’s built-in `image_gen.imagegen` tool uses the current CCDX address for separate Images API requests. CCDX serves `POST /v1/images/generations` and `POST /v1/images/edits`, reuses the existing GitHub Copilot authentication, and maps the native client’s `gpt-image-2` request to the selected available GHC image model. GPT Image 2.5 Flare is the default when advertised. The `X-CCDX-Image-Model` response header identifies the actual model. Image usage counts toward the GitHub account’s image credits; organization model policies still apply. The image model does not replace the selected conversation model.
|
|
584
584
|
|
|
585
|
-
On macOS with Codex 0.166 or later, CCDX launches the unchanged Codex CLI through a local stdio host adapter. The adapter registers `ccdx_images.imagegen` using Codex’s native `dynamicTools` interface. Codex emits native tool progress and
|
|
585
|
+
On macOS with Codex 0.166 or later, CCDX launches the unchanged Codex CLI through a local stdio host adapter. The adapter registers `ccdx_images.imagegen` using Codex’s native `dynamicTools` interface. Codex emits native tool progress and includes image content in the chat history; display in the signed App depends on the client and requires a real-window check. CCDX saves image files under the active Codex home’s `generated_images/ccdx/` directory and uses these files for later edits, including after a host restart. No separate image address or key, image MCP registration, or CCDX image skill is required. Windows continues to expose the Images API; automatic host activation on Windows is not yet provided.
|
|
586
586
|
|
|
587
|
-
The adapter uses `CODEX_CLI_PATH` only for the App launch requested by CCDX. It does not modify App binaries, ChatGPT authentication files, credential storage mode or account-plan declarations. All other app-server traffic, including Apps and approval requests, passes through to the original CLI. Existing custom CLI routes and unowned launcher files are preserved.
|
|
587
|
+
The adapter uses `CODEX_CLI_PATH` only for the App launch requested by CCDX. It does not modify App binaries, ChatGPT authentication files, credential storage mode or account-plan declarations. All other app-server traffic, including Apps and approval requests, passes through to the original CLI. Existing custom CLI routes and unowned launcher files are preserved. A running App retains its existing launch environment. If its image tool is missing, fully quit the App, start Codex through CCDX, and use a new chat. CCDX does not forcibly restart the App. Native built-in image tool availability still depends on the installed client and thread. A successful direct API request alone does not establish visible App behavior.
|
|
588
588
|
|
|
589
589
|
The WebUI’s image switch is on by default and pauses or resumes new requests. A previously saved off choice is preserved. Available GHC image models appear below the switch; multiple models use one radio selection. The same image purpose appears in Model sources and Codex model configuration. Image models stay out of Codex’s conversation-model picker and conversation default selection. Saved pause choices survive upgrades, and active calls may finish. The CLI uses the same preference:
|
|
590
590
|
|
package/package.json
CHANGED
package/src/codex-image-host.mjs
CHANGED
|
@@ -66,7 +66,9 @@ export function createImageHostBridge({ baseUrl, codexHome, sendToCodex, fetchIm
|
|
|
66
66
|
const folder = id => path.join(root, createHash("sha256").update(id).digest("hex").slice(0, 32));
|
|
67
67
|
const enabled = imageEnabled || (async () => {
|
|
68
68
|
try {
|
|
69
|
-
const response = await fetchImpl(baseUrl.replace(/\/v1$/, "/_ccdx/settings"), {
|
|
69
|
+
const response = await fetchImpl(baseUrl.replace(/\/v1$/, "/_ccdx/ui/settings"), {
|
|
70
|
+
headers: { "X-CCDX-Dashboard": "1" }, signal: AbortSignal.timeout(1000),
|
|
71
|
+
});
|
|
70
72
|
if (!response.ok) return false;
|
|
71
73
|
const settings = await boundedJson(response);return settings.features?.image?.enabled === true;
|
|
72
74
|
} catch { return false; }
|
package/src/launcher.mjs
CHANGED
|
@@ -127,6 +127,8 @@ export async function openCodex({ env = process.env, spawnImpl = spawn, platform
|
|
|
127
127
|
const imageArgs = platform === "darwin" && imageHost?.env?.CODEX_CLI_PATH
|
|
128
128
|
? ["--env", "CODEX_CLI_PATH=" + imageHost.env.CODEX_CLI_PATH] : [];
|
|
129
129
|
if (imageArgs.length) log(status("info", "Image host configured for the next Codex launch and new chats; a running App is not restarted"));
|
|
130
|
+
const imageApp = imageArgs.length && APP_PATH_CANDIDATES.includes(imageHost.app) ? imageHost.app : null;
|
|
131
|
+
const warnRunningImageApp = () => log(status("warn", "Codex is already running. If the image tool is missing, fully quit the App and start it through CCDX."));
|
|
130
132
|
const extraArgs = isPredictionPacUrl(predictionPacUrl)
|
|
131
133
|
&& APP_PATH_CANDIDATES.includes(predictionApp)
|
|
132
134
|
? ["--args", `--proxy-pac-url=${predictionPacUrl}`] : [];
|
|
@@ -134,6 +136,7 @@ export async function openCodex({ env = process.env, spawnImpl = spawn, platform
|
|
|
134
136
|
try {
|
|
135
137
|
const running = macAppProcesses(predictionApp);
|
|
136
138
|
if (running.length) {
|
|
139
|
+
if (imageApp === predictionApp) warnRunningImageApp();
|
|
137
140
|
if (running.length === 1 && running[0].readable && running[0].route === predictionPacUrl) {
|
|
138
141
|
onPredictionRoute("verified");log(status("ok", "Codex already running"));return true;
|
|
139
142
|
}
|
|
@@ -160,6 +163,10 @@ export async function openCodex({ env = process.env, spawnImpl = spawn, platform
|
|
|
160
163
|
onPredictionRoute("unverified");log(status("warn", `Optional macOS prediction launch skipped: ${error.message}`));return false;
|
|
161
164
|
}
|
|
162
165
|
}
|
|
166
|
+
if (imageApp) {
|
|
167
|
+
try { if (macAppProcesses(imageApp).length) warnRunningImageApp(); }
|
|
168
|
+
catch { log(status("warn", "Could not check the running Codex App. If the image tool is missing, start the App through CCDX after quitting it.")); }
|
|
169
|
+
}
|
|
163
170
|
const attempts = imageArgs.length && APP_PATH_CANDIDATES.includes(imageHost.app) ? [[imageHost.app]] : launchAttempts();
|
|
164
171
|
for (const attempt of attempts) {
|
|
165
172
|
const args = [...attempt, ...imageArgs, ...extraArgs];
|
package/src/startup-ui.mjs
CHANGED
|
@@ -89,6 +89,12 @@ export function predictionStartupCheck(prediction) {
|
|
|
89
89
|
return lines.join("\n");
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
export function imageStartupCheck({ enabled, prepared, skipped } = {}) {
|
|
93
|
+
if (!enabled) return startupCheck("info", "Images", "Off");
|
|
94
|
+
if (!prepared || skipped) return startupCheck("warn", "Images", "App host not prepared");
|
|
95
|
+
return startupCheck("info", "Images", "App launch prepared; not tested");
|
|
96
|
+
}
|
|
97
|
+
|
|
92
98
|
// Catalog discovery, client configuration and inference access are distinct.
|
|
93
99
|
export function providerStartupSummary(data = {}) {
|
|
94
100
|
if (!data.providers) return { catalogs: "Status unavailable; see WebUI", claude: "Configuration not checked", warning: false };
|