codex-copilot-dx 1.0.0 → 1.1.0
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 +16 -16
- package/bin/cli.mjs +24 -3
- package/docs/ARCHITECTURE.md +35 -7
- package/docs/README.md +1 -0
- package/docs/REFERENCE.md +148 -73
- package/package.json +1 -1
- package/src/adapter.mjs +17 -3
- package/src/browser-launch.mjs +22 -0
- package/src/claude-client-config.mjs +7 -2
- package/src/claude-gateway.mjs +18 -2
- package/src/cli-animation.mjs +1 -1
- package/src/cli-image.mjs +3 -0
- package/src/cli-m365.mjs +1 -1
- package/src/cli-options.mjs +7 -3
- package/src/cli-table.mjs +1 -1
- package/src/client-integration.mjs +5 -1
- package/src/dashboard/console.js +141 -0
- package/src/dashboard/index.html +102 -52
- package/src/dashboard/language.js +65 -0
- package/src/dashboard/status.js +27 -5
- package/src/dashboard/ui.css +43 -0
- package/src/dashboard/ui.js +7 -8
- package/src/dashboard-api.mjs +24 -0
- package/src/dashboard.mjs +1 -0
- package/src/image-mcp.mjs +9 -6
- package/src/log.mjs +13 -11
- package/src/m365-settings.mjs +0 -2
- package/src/native-prediction-recovery.mjs +1 -0
- package/src/native-prediction.mjs +6 -2
- package/src/observability.mjs +8 -1
- package/src/optional-routes.mjs +2 -2
- package/src/provider-runtime.mjs +20 -13
- package/src/response-failures.mjs +1 -1
- package/src/service-control.mjs +60 -0
- package/src/startup-ui.mjs +4 -3
- package/src/terminal-console.mjs +87 -0
- package/src/usage-store.mjs +11 -1
- package/src/usage.mjs +1 -0
- package/src/user-settings.mjs +21 -0
package/README.md
CHANGED
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Use Codex App with GitHub Copilot through a local adapter, with isolated Microsoft 365 access where authorized.
|
|
4
4
|
|
|
5
|
-
CCDX keeps GitHub Copilot as the default Codex source: discovery, adapted model catalogs, Responses streaming, tool calls and conversation history. Eligible Microsoft 365 environments can also use a
|
|
5
|
+
CCDX keeps GitHub Copilot as the default Codex source: discovery, adapted model catalogs, Responses streaming, tool calls and conversation history. Eligible Microsoft 365 environments can also use a protocol-isolated Claude gateway on the main listener and manually select M365 as a Codex backup.
|
|
6
6
|
Default Auto-review: **GPT-6.1 Sol / low**. Image generation is **off by default**. Native predictions are also **off by default**.
|
|
7
7
|
|
|
8
8
|
## Install and run
|
|
9
9
|
|
|
10
|
-
Requires macOS or Windows, Codex App, Node.js **22.15+**, and a GitHub account with Copilot
|
|
11
|
-
access to the models you want to use.
|
|
10
|
+
Requires macOS or Windows, Codex App, Node.js **22.15+**, and a GitHub account with Copilot access to the models you want to use.
|
|
12
11
|
|
|
13
12
|
```bash
|
|
14
13
|
npm install -g codex-copilot-dx@latest
|
|
@@ -16,20 +15,25 @@ ccdx
|
|
|
16
15
|
```
|
|
17
16
|
|
|
18
17
|
CCDX reuses a compatible local credential or starts GitHub Device Flow, listens
|
|
19
|
-
on `127.0.0.1:2026`, configures Codex, and opens the App. No client binary patch
|
|
18
|
+
on `127.0.0.1:2026`, configures Codex, and opens the App. Interactive desktop starts also open the local WebUI once; use `ccdx --no-browser` or disable this in WebUI settings. No client binary patch
|
|
20
19
|
is needed. On Windows, open the App manually unless native prediction setup is
|
|
21
20
|
enabled. In restricted Windows PowerShell, use `npm.cmd` to install and `ccdx.cmd` for the first launch, or run `ccdx.cmd doctor --fix`. Startup, updates and explicit repair remove only CCDX's exact npm-generated `.ps1` launchers so later calls can use `ccdx`. No install script, alias or policy change is added; custom launchers are preserved. npm's own script is untouched. The configured `dummy` API key is a placeholder, not a credential.
|
|
22
21
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
The [local control console](http://127.0.0.1:2026/) has a sidebar for **Overview, Clients, Model services, Usage and diagnostics, System and settings**. Codex image generation, input predictions and conversation buffering are explicitly Codex-specific. Provider authorization, model directories, retained usage and operations keep their own scopes. Browsing a catalog never switches the active source.
|
|
23
|
+
|
|
24
|
+
Startup shows bounded checks, existing owned-configuration reconciliation and enabled prediction recovery. After Ready, an interactive terminal has a fixed four-line status region with returned usage for this process, business activity and coalesced notices. It does not scroll individual requests. `ccdx --verbose` (also `--show-request-id`, or debug logging) retains detail output; optional file logging remains independently controlled. Non-TTY, CI, dumb or very narrow terminals use plain output. `Ready` only means the core service is available.
|
|
25
|
+
|
|
26
|
+
WebUI settings apply animation choices live, pause/resume configured image calls and prediction adaptation without removing credentials/trust, change the Codex source explicitly, and manage the conversation-buffer limit. Saved preference and effective state are separate. First-time image/prediction setup still uses the existing CLI; trust, client routing and cached client capabilities may require a normal App relaunch. Busy M365 requests must finish before disabling that provider. See the [control reference](docs/REFERENCE.md#control-console-and-online-settings).
|
|
27
|
+
|
|
28
|
+
While visible and auto-refresh is on, the console reads the small status snapshot about every two seconds and source/settings evidence about every 16 seconds. Catalogs and retained usage are fetched on demand and at most once per 30-minute refresh interval while their view is open. Hidden pages stop scheduled reads. First output uses **ms**, estimated speed **token/s**, and each protocol has its own samples. HTTP traffic includes catalog and routing requests; it is not a conversation count.
|
|
26
29
|
|
|
27
30
|
## Commands
|
|
28
31
|
|
|
29
32
|
| Command | Purpose |
|
|
30
33
|
| --- | --- |
|
|
31
34
|
| `ccdx help` | Command help; use `ccdx help <command>` for details |
|
|
32
|
-
| `ccdx start` | Start
|
|
35
|
+
| `ccdx start` | Start/reuse the adapter, open Codex when enabled, and open WebUI on interactive desktop starts |
|
|
36
|
+
| `ccdx --no-browser` / `ccdx --verbose` | Skip WebUI opening once / retain detailed terminal logs |
|
|
33
37
|
| `ccdx status` | Runtime, limits and bounded request diagnostics |
|
|
34
38
|
| `ccdx doctor` | Configuration, adapter and read-only App/catalog diagnostics |
|
|
35
39
|
| `ccdx doctor --fix` | Repair owned launchers/config, recover existing auth and enabled prediction routing once |
|
|
@@ -56,11 +60,10 @@ Auto refresh runs every 30 minutes while visible and can be switched off. Hidden
|
|
|
56
60
|
|
|
57
61
|
## Microsoft 365 access
|
|
58
62
|
|
|
59
|
-
Eligible macOS/Windows machines attempt silent Microsoft authorization at startup,
|
|
60
|
-
without Copilot CLI or a browser login. MDM alone is insufficient: account, tenant,
|
|
63
|
+
Eligible macOS/Windows machines attempt silent Microsoft authorization at startup, without Copilot CLI or a browser login. MDM alone is insufficient: account, tenant,
|
|
61
64
|
device policy and Loki entitlement must permit access. Optional failure does not block GitHub.
|
|
62
65
|
|
|
63
|
-
Claude clients use
|
|
66
|
+
Claude clients use `http://127.0.0.1:2026/anthropic` (or the configured main port), a private local gateway key and a Claude-only catalog. No second Claude listener is opened. Existing unchanged CCDX-owned 2027 addresses migrate automatically; hand-written or managed addresses are preserved and need explicit migration. The optional prediction CONNECT/PAC bridge remains a separate transport.
|
|
64
67
|
Existing custom/managed settings are preserved; already-running clients may need a normal restart.
|
|
65
68
|
Canonical Claude IDs and advertised effort caps refresh only in unchanged CCDX-owned settings. User and managed choices are preserved; supported App versions can update model knowledge through Anthropic's signed catalog. New protocol semantics may require a client or CCDX update. See the [model reference](docs/REFERENCE.md#claude-gateway-and-client-ownership).
|
|
66
69
|
`ccdx m365 off` restores unchanged owned fields; `remove` also clears owned M365 state.
|
|
@@ -112,9 +115,7 @@ Updates install the exact stable tag; dependencies still use npm's configured re
|
|
|
112
115
|
Updates warn about mismatched npm targets without changing PATH/prefix and verify the installed target version (exact tag for GitHub). Restart the adapter separately. Full `ccdx doctor` reports this target and readonly credential permissions; it never changes ACLs.
|
|
113
116
|
Recent errors separate HTTP and model failures. By default HTTP metadata retains status, source and IDs, not error bodies or prompts; original errors still reach Codex unchanged. Explicit, bounded error-excerpt collection is described in the [reference](docs/REFERENCE.md#http-error-diagnostics).
|
|
114
117
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
See the [complete reference](https://github.com/DaleXiao/codex-copilot-dx/blob/main/docs/REFERENCE.md) for authentication, configuration, limits, logging, images and compatibility. It is also included as `docs/REFERENCE.md` in the npm package.
|
|
118
|
+
See [architecture boundaries](docs/ARCHITECTURE.md) and the [complete reference](https://github.com/DaleXiao/codex-copilot-dx/blob/main/docs/REFERENCE.md) for authentication, configuration, limits, logging, images and compatibility. It is also included as `docs/REFERENCE.md` in the npm package.
|
|
118
119
|
|
|
119
120
|
## Development
|
|
120
121
|
|
|
@@ -124,7 +125,6 @@ npm run verify
|
|
|
124
125
|
node scripts/config-startup-replay.mjs
|
|
125
126
|
```
|
|
126
127
|
|
|
127
|
-
Verification covers unit tests, isolated HTTP/idle-stream replay, performance/resource gates and package contents—not an upstream service SLA.
|
|
128
|
-
CI also tests Node 22.15/24 on Linux, Windows and macOS, temporary-prefix installation/upgrade and installed image processing.
|
|
128
|
+
Verification covers unit tests, isolated HTTP/idle-stream replay, performance/resource gates and package contents—not an upstream service SLA. CI also tests Node 22.15/24 on Linux, Windows and macOS, temporary-prefix installation/upgrade and installed image processing.
|
|
129
129
|
|
|
130
130
|
License: MIT.
|
package/bin/cli.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { runInBackground } from "../src/startup.mjs";
|
|
|
14
14
|
import { cliCommandName, cliHelp, parseAdapterAddressOptions, parseAdapterProbeOptions, parseCliArgs, parseRuntimeOptions } from "../src/cli-options.mjs";
|
|
15
15
|
import { formatAdapterStatus, readAdapterStatus } from "../src/cli-status.mjs";
|
|
16
16
|
import { closeHttpServer } from "../src/shutdown.mjs";
|
|
17
|
-
import { autoReviewModelPreference, autoReviewPreference, responseHistoryLimitPreference, terminalAnimationPreference } from "../src/user-settings.mjs";
|
|
17
|
+
import { autoReviewModelPreference, autoReviewPreference, responseHistoryLimitPreference, terminalAnimationPreference, servicePreferences } from "../src/user-settings.mjs";
|
|
18
18
|
import { formatLiveCopilotModels } from "../src/cli-models.mjs";
|
|
19
19
|
import { runAuthCommand } from "../src/cli-auth.mjs";
|
|
20
20
|
import { createProfileRuntime } from "../src/profile-runtime.mjs";
|
|
@@ -23,6 +23,9 @@ import { createCodexModelCatalog } from "../src/codex-model-catalog.mjs";
|
|
|
23
23
|
import { createProviderRuntime } from "../src/provider-runtime.mjs";
|
|
24
24
|
import { setResponseHistoryMaxBytes } from "../src/response-history.mjs";
|
|
25
25
|
import { startupBanner, startupCheck, startupReady, startupLogger, predictionStartupCheck } from "../src/startup-ui.mjs";
|
|
26
|
+
import { createTerminalConsole } from "../src/terminal-console.mjs";
|
|
27
|
+
import { createServiceControl } from "../src/service-control.mjs";
|
|
28
|
+
import { openDashboard } from "../src/browser-launch.mjs";
|
|
26
29
|
|
|
27
30
|
const LOCAL_VERSION = localPackageVersion();
|
|
28
31
|
const CLI_NAME = cliCommandName();
|
|
@@ -284,6 +287,14 @@ let shuttingDown = false;
|
|
|
284
287
|
let nativePrediction = null;
|
|
285
288
|
let clientIntegration = null;
|
|
286
289
|
let providerRuntime = null;
|
|
290
|
+
let terminalConsole = null;
|
|
291
|
+
const webUiUrl = `http://${ADAPTER_HOST === "::1" ? "[::1]" : "127.0.0.1"}:${ADAPTER_PORT}`;
|
|
292
|
+
async function launchDashboard() {
|
|
293
|
+
try {
|
|
294
|
+
const result = await openDashboard(webUiUrl, { enabled: !CLI.noBrowser && servicePreferences().open_webui });
|
|
295
|
+
if (result.state === "unavailable") console.warn(startupCheck("warn", "WebUI", `Browser unavailable; open ${webUiUrl}`));
|
|
296
|
+
} catch (error) { console.warn(startupCheck("warn", "WebUI", error.message)); }
|
|
297
|
+
}
|
|
287
298
|
|
|
288
299
|
async function clientIntegrations() {
|
|
289
300
|
if (!clientIntegration) {
|
|
@@ -342,6 +353,7 @@ async function reuseRunningAdapterIfAvailable() {
|
|
|
342
353
|
console.log(startupCheck(imageEnabled && imageMcpSkipped ? "warn" : "info", "Images", imageEnabled
|
|
343
354
|
? imageMcpSkipped ? "Client setup skipped; see warning above" : "Configured; provider not tested" : "Off"));
|
|
344
355
|
console.log(startupReady({ baseUrl: running.baseUrl, commandName: CLI_NAME, reused: true }));
|
|
356
|
+
await launchDashboard();
|
|
345
357
|
await compressionSetup;
|
|
346
358
|
return true;
|
|
347
359
|
}
|
|
@@ -370,8 +382,7 @@ async function printUpdateNotice() {
|
|
|
370
382
|
try {
|
|
371
383
|
const { latestVersion, updateAvailable } = await checkForUpdate({ currentVersion: LOCAL_VERSION });
|
|
372
384
|
if (!updateAvailable) return;
|
|
373
|
-
console.
|
|
374
|
-
console.log(`Run ${CLI_NAME} update github to update, then restart ${CLI_NAME}.\n`);
|
|
385
|
+
console.warn(`\n${status("warn", `Update available: ${LOCAL_VERSION} -> ${latestVersion}. Run ${CLI_NAME} update github to update, then restart ${CLI_NAME}.`)}\n`);
|
|
375
386
|
} catch {
|
|
376
387
|
// Never block startup on the update check.
|
|
377
388
|
}
|
|
@@ -437,6 +448,10 @@ try {
|
|
|
437
448
|
|
|
438
449
|
// Start the in-process adapter.
|
|
439
450
|
const terminalAnimationTheme = terminalAnimationPreference().theme;
|
|
451
|
+
terminalConsole = createTerminalConsole({ baseUrl: webUiUrl, verbose: CLI.verbose === true || CLI.showRequestId === true || LOGGING.level === "debug",
|
|
452
|
+
snapshot: () => activeServer?.ccdxSnapshot?.() || {},
|
|
453
|
+
preferences: () => ({ ...servicePreferences(), theme: terminalAnimationPreference().theme }) });
|
|
454
|
+
const serviceControl = createServiceControl({ providerRuntime, clientIntegration: earlyIntegration, terminal: terminalConsole });
|
|
440
455
|
const codexModelCatalog = createCodexModelCatalog();
|
|
441
456
|
activeServer = await startAdapter(ADAPTER_PORT, ADAPTER_HOST, {
|
|
442
457
|
log: startupLogger("Adapter"),
|
|
@@ -450,6 +465,8 @@ try {
|
|
|
450
465
|
streamHandshakeTimeoutMs: RUNTIME.streamHandshakeTimeoutMs,
|
|
451
466
|
streamIdleTimeoutMs: RUNTIME.streamIdleTimeoutMs,
|
|
452
467
|
terminalAnimationTheme,
|
|
468
|
+
terminalActivity: terminalConsole,
|
|
469
|
+
dashboardOptions: { serviceControl, applyAnimation: theme => terminalConsole.apply({ theme }) },
|
|
453
470
|
nativePredictionPac: () => clientIntegration?.pacUrl() || null,
|
|
454
471
|
fixPrediction: async () => (await clientIntegrations()).fix(),
|
|
455
472
|
clientIntegrationSnapshot: () => clientIntegration?.snapshot() || null,
|
|
@@ -483,10 +500,13 @@ try {
|
|
|
483
500
|
|
|
484
501
|
startupComplete = true;
|
|
485
502
|
console.log(startupReady({ baseUrl: adapterBaseUrl(ADAPTER_HOST, ADAPTER_PORT), commandName: CLI_NAME }));
|
|
503
|
+
await launchDashboard();
|
|
504
|
+
terminalConsole.start();LOGGING.setTerminalSink((method, args) => terminalConsole.log(method, args));
|
|
486
505
|
|
|
487
506
|
const shutdown = async (signal) => {
|
|
488
507
|
if (shuttingDown) return;
|
|
489
508
|
shuttingDown = true;
|
|
509
|
+
LOGGING.setTerminalSink(null);terminalConsole?.cleanup();
|
|
490
510
|
console.log(`\n${status("wait", `Shutting down on ${signal}...`)}`);
|
|
491
511
|
let exitCode = 0;
|
|
492
512
|
try {
|
|
@@ -508,6 +528,7 @@ try {
|
|
|
508
528
|
process.once("SIGTERM", () => { void shutdown("SIGTERM"); });
|
|
509
529
|
await compressionSetup;
|
|
510
530
|
} catch (e) {
|
|
531
|
+
LOGGING.setTerminalSink(null);terminalConsole?.cleanup();
|
|
511
532
|
console.error(status("err", e.message));
|
|
512
533
|
await clientIntegration?.close().catch(() => {});
|
|
513
534
|
await providerRuntime?.close().catch(() => {});
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -45,12 +45,12 @@ The fixed Loki target, account-bound catalog and dedicated network agent belong
|
|
|
45
45
|
to M365. No GitHub token, image credential or browser Cookie is reused. Windows can
|
|
46
46
|
use a separate OS WinHTTP worker for M365 company routing; macOS preserves static
|
|
47
47
|
system/environment routing and reports unsupported dynamic PAC. Native runtime
|
|
48
|
-
absence
|
|
49
|
-
Claude
|
|
50
|
-
readiness. A
|
|
48
|
+
absence and policy refusal do not disable GitHub.
|
|
49
|
+
Claude handler/configuration readiness is also separate from M365 provider
|
|
50
|
+
readiness. A Claude setup failure or a GPT-only catalog cannot block the explicitly
|
|
51
51
|
selected Codex backup; a catalog without Claude models does not install Claude settings.
|
|
52
52
|
|
|
53
|
-
The Claude gateway
|
|
53
|
+
The Claude gateway is mounted at /anthropic in the main listener, independently requires a loopback socket/Host and its private local key, and
|
|
54
54
|
rejects browser-origin requests. It preserves native Messages/SSE bytes, observes
|
|
55
55
|
bounded usage/terminal metadata and honors downstream backpressure. The client
|
|
56
56
|
writer records field-level ownership before applying changes and restores only
|
|
@@ -264,8 +264,11 @@ invalidated on profile generation/account changes. It cancels obsolete reads and
|
|
|
264
264
|
prevents stale apply across tabs. `status.js` renders source-neutral authorization
|
|
265
265
|
and client evidence; `usage.js` renders usage and date selection. View state remains
|
|
266
266
|
page-local; only existing preferences and the viewed model Provider are saved in
|
|
267
|
-
the browser. Expanded sections read on demand. There is no Node data watcher
|
|
268
|
-
|
|
267
|
+
the browser. Expanded sections read on demand. There is no Node data watcher.
|
|
268
|
+
The sidebar controller reads small process-local status snapshots every two seconds
|
|
269
|
+
while visible/automatic, and source/settings evidence every eight status ticks.
|
|
270
|
+
Catalog and retained-log reads retain their slower, view-scoped policy. Animation
|
|
271
|
+
frames still load once per page when opened.
|
|
269
272
|
|
|
270
273
|
`claude-models.mjs` owns exact ID spelling and capability-cap projection shared by
|
|
271
274
|
configuration and model discovery. M365 resolves both canonical and existing raw
|
|
@@ -284,6 +287,31 @@ implementation and lookup parameters share one in-flight lookup. A waiter can
|
|
|
284
287
|
cancel independently; the last cancellation aborts the lookup. Completed results
|
|
285
288
|
are not cached as live, and each waiter receives its own snapshot.
|
|
286
289
|
|
|
290
|
+
|
|
291
|
+
### Shared listener and service controls
|
|
292
|
+
|
|
293
|
+
The main adapter counts each HTTP request once. /anthropic dispatch strips only
|
|
294
|
+
the protocol mount prefix and preserves its query; the mounted handler retains
|
|
295
|
+
native authentication, admission, Messages timing and response ownership. Closing
|
|
296
|
+
Claude cannot close the main listener. Provider credentials/history namespaces and
|
|
297
|
+
protocol-specific timing stay independent; the UI names the scope rather than
|
|
298
|
+
summing incompatible counters. Root legacy Messages routes remain retired.
|
|
299
|
+
|
|
300
|
+
`service-control.mjs` composes explicit preference/Provider/cache/integration
|
|
301
|
+
actions with serialized writes and effective-state readback. It has no transport,
|
|
302
|
+
UI or shell dependency. `dashboard-api.mjs` supplies the local/same-origin HTTP
|
|
303
|
+
boundary. Client configuration migration reuses field ownership and its original
|
|
304
|
+
before-values, preserving foreign or edited fields. Saved allow gates are separate
|
|
305
|
+
from provisioning; pausing never deletes the Provider key or prediction trust.
|
|
306
|
+
|
|
307
|
+
`terminal-console.mjs` owns a bounded TTY status region and activity only.
|
|
308
|
+
`log.mjs` routes terminal presentation independently from existing opt-in,
|
|
309
|
+
redacted rotating file records. Returned usage accumulates scalar process-local
|
|
310
|
+
totals in `usage-store.mjs`, without a historical-log scan or per-token callback.
|
|
311
|
+
`browser-launch.mjs` makes one bounded local desktop-open attempt after readiness;
|
|
312
|
+
no headless/SSH launch, browser dependency, generic shell or background tab watcher
|
|
313
|
+
is added. Neither terminal nor WebUI rendering is required for inference.
|
|
314
|
+
|
|
287
315
|
## Configuration ownership
|
|
288
316
|
|
|
289
317
|
`CODEX_HOME` selects Codex configuration. App profile/trust paths have their own
|
|
@@ -330,7 +358,7 @@ Empty-stream diagnostics are additive scalar metadata, not a new retry policy.
|
|
|
330
358
|
Release reports describe a specific environment, not an SLA or a guarantee of
|
|
331
359
|
compatibility with every future client or corporate network policy.
|
|
332
360
|
CI runs Node 22.15 and 24 on Linux, Windows and macOS. The owned temporary-prefix
|
|
333
|
-
package smoke installs 0.9.
|
|
361
|
+
package smoke installs its 0.9.41 baseline (or an explicit local artifact), upgrades to the packed candidate and exercises
|
|
334
362
|
installed sharp without provider calls. It does not claim a live Codex UI test
|
|
335
363
|
or the GitHub updater's network installation; the Windows command chain has a
|
|
336
364
|
separate actual-process fixture. Direct runtime dependencies are exact versions;
|
package/docs/README.md
CHANGED
package/docs/REFERENCE.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# CCDX command, configuration and compatibility reference
|
|
2
2
|
|
|
3
3
|
Use Codex App with GPT models available to your **GitHub Copilot** account by default.
|
|
4
|
-
The optional [Microsoft 365 provider](#microsoft-365-provider) supplies a
|
|
4
|
+
The optional [Microsoft 365 provider](#microsoft-365-provider) supplies a protocol-isolated
|
|
5
5
|
Claude gateway and an explicitly selected Codex backup.
|
|
6
6
|
|
|
7
7
|
## Microsoft 365 provider
|
|
@@ -90,18 +90,29 @@ optional image MCP/skill/API remains separately configured and off by default.
|
|
|
90
90
|
|
|
91
91
|
### Claude gateway and client ownership
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
93
|
+
Since 1.1.0, Claude mounts under the main HTTP listener at
|
|
94
|
+
`http://127.0.0.1:<ADAPTER_PORT>/anthropic` (default main port 2026).
|
|
95
|
+
It exposes `GET /anthropic/v1/models`, `POST /anthropic/v1/messages` and
|
|
96
|
+
`POST /anthropic/v1/messages/count_tokens`. The Claude Base URL excludes the final `/v1`.
|
|
97
|
+
The local socket, loopback Host, native-client Origin rejection and private Bearer
|
|
98
|
+
or `x-api-key` checks remain independent of any main-listener LAN opt-in.
|
|
99
|
+
Messages tools, thinking, signatures, image blocks, beta headers and SSE retain
|
|
100
|
+
their native protocol and backpressure/cancellation handling. Provider-specific
|
|
101
|
+
cache policy is described below; the local gateway key is never forwarded upstream.
|
|
102
|
+
|
|
103
|
+
The protocol handler owns only its responses, never the shared server. Codex,
|
|
104
|
+
WebUI and Claude share the main port; native prediction keeps its CONNECT/PAC
|
|
105
|
+
transport and saved port. Root `/v1/messages` remains retired, including on a
|
|
106
|
+
custom main port. Claude requests never reach GitHub. M365 GPT-only catalogs do
|
|
107
|
+
not configure Claude. Optional Claude setup failure leaves the Codex backup independent.
|
|
108
|
+
|
|
109
|
+
Unchanged CCDX-owned Code/App addresses migrate from 2027 to the shared prefix,
|
|
110
|
+
with the original restoration values preserved. User-edited fields, managed
|
|
111
|
+
settings and explicit environment routes remain preserved. CCDX does not keep
|
|
112
|
+
a permanent 2027 compatibility listener; migrate hand-written old URLs explicitly.
|
|
113
|
+
Already-running clients may need a normal restart to reload their base URL.
|
|
114
|
+
Disabling/removing M365 is rejected while its Codex or Claude inference is active,
|
|
115
|
+
so an accepted disable does not cut off those requests.
|
|
105
116
|
|
|
106
117
|
Loki explicitly rejects one-hour prompt-cache retention. M365's request policy
|
|
107
118
|
caps standard `cache_control: {type: "ephemeral", ttl: "1h"}` fields to `5m`,
|
|
@@ -698,8 +709,8 @@ Credentials found are not labeled online-authorized, cached model lists are not
|
|
|
698
709
|
labeled fresh upstream data, and image configuration is not a provider test.
|
|
699
710
|
Ready reports core readiness independently of optional prediction/image warnings.
|
|
700
711
|
Model refresh logs show counts; `ccdx models` retains the complete live list.
|
|
701
|
-
After Ready,
|
|
702
|
-
|
|
712
|
+
After Ready, the default foreground display becomes a fixed status region;
|
|
713
|
+
request and background-refresh detail is available with `--verbose` or explicit file logging. Status messages remove terminal controls and collapse newlines;
|
|
703
714
|
the static banner and multiline interactive prompts retain their own presentation.
|
|
704
715
|
VS Code compatibility-version details remain available in debug logging. Startup
|
|
705
716
|
does not wait for optional update/compression work or add online doctor/model probes.
|
|
@@ -757,6 +768,65 @@ ccdx limits --decoded default
|
|
|
757
768
|
|
|
758
769
|
`ccdx limits` distinguishes the saved decoded request-body limit from the running adapter's active limit. The default is 128 MiB; the opt-in saved limit accepts 128–512 MiB. Changes take effect only after restarting the adapter, never restart it automatically, and do not clear conversations or caches. `CCDX_MAX_DECODED_BODY_BYTES` overrides the saved setting; unset it before changing the saved limit. The separate 64 MiB raw/compressed-body limit is not changed. Larger decoded requests can use substantially more process memory during JSON parsing and image preparation; raising this limit may enable a large thread to compact, but does not guarantee successful inference or compaction. Return to `default` after temporary use.
|
|
759
770
|
|
|
771
|
+
### Control console and online settings
|
|
772
|
+
|
|
773
|
+
The sidebar separates Overview, Codex/Claude clients, Model services, Usage and
|
|
774
|
+
diagnostics, and System/settings. Codex owns optional image generation, native
|
|
775
|
+
prediction adaptation and the temporary Responses conversation buffer. That
|
|
776
|
+
buffer supports continuation; it is not a chat archive. Shared HTTP traffic and
|
|
777
|
+
per-protocol model outcomes are distinct. Claude Messages metrics are not labeled
|
|
778
|
+
as all Microsoft 365 traffic. Saved credentials, authorization, catalog discovery,
|
|
779
|
+
client configuration and successful requests are separate evidence.
|
|
780
|
+
|
|
781
|
+
Interactive desktop starts open the default browser once after core readiness.
|
|
782
|
+
`--no-browser` skips this for one invocation; `open_webui:false` in
|
|
783
|
+
`~/.config/codex-copilot-dx/config.json` disables subsequent automatic opening.
|
|
784
|
+
Query commands do not open it. Headless/CI/SSH or noninteractive starts skip it;
|
|
785
|
+
a browser-launch failure does not stop the service. This is an opening attempt,
|
|
786
|
+
not a guarantee that every browser will reuse an existing tab.
|
|
787
|
+
|
|
788
|
+
The default TTY display uses four bounded lines, without an alternate screen or
|
|
789
|
+
raw keyboard input. It shows usage returned since this process began; pending
|
|
790
|
+
usage is excluded, missing usage stays partial, and this is not an invoice.
|
|
791
|
+
Business requests drive activity; status/catalog polling does not. Existing nine
|
|
792
|
+
animation themes retain their timing/palette and cycle pauses. `--verbose`,
|
|
793
|
+
`--show-request-id` or `CCDX_LOG_LEVEL=debug` restore detailed terminal output.
|
|
794
|
+
Non-TTY/CI/dumb/very narrow terminals use plain output; repeated identical notices
|
|
795
|
+
are coalesced. File logging retains its existing explicit opt-in and redaction.
|
|
796
|
+
In-memory usage still updates when `CCDX_DISABLE_USAGE=1` disables persistence.
|
|
797
|
+
|
|
798
|
+
The settings API is local, requires the dashboard header, bounded JSON and
|
|
799
|
+
same-origin POST. It invokes the same Provider, cache and integration operations;
|
|
800
|
+
it does not spawn a CLI or generic shell command. Settings reads do not reveal
|
|
801
|
+
upstream keys. Each operation reads back saved and effective state. Corrupt saved
|
|
802
|
+
service preferences fail closed for optional calls rather than reopening them.
|
|
803
|
+
|
|
804
|
+
| Control | Effective scope |
|
|
805
|
+
| --- | --- |
|
|
806
|
+
| Terminal theme/animation | Live supported status terminal; plain/verbose/environment-disabled modes are reported separately |
|
|
807
|
+
| Open WebUI | Next interactive desktop start |
|
|
808
|
+
| Image calls | New local MCP calls; keeps provider credentials and allows an already-started call to finish |
|
|
809
|
+
| Prediction adaptation | Subsequent configuration traffic on an already-provisioned bridge; keeps trust/route, and App caches can remain |
|
|
810
|
+
| Model source | Explicit validated selection for subsequent Codex requests; existing requests retain their binding |
|
|
811
|
+
| Conversation buffer | Live validated limit; cleanup refuses pinned/active data and can invalidate old unused continuation IDs |
|
|
812
|
+
|
|
813
|
+
Boolean allow preferences `terminal_animation_enabled`, `image_enabled` and
|
|
814
|
+
`prediction_enabled` default to true, preserving already configured features;
|
|
815
|
+
they do not provision or enable the default-off image/prediction integrations.
|
|
816
|
+
The existing explicit CLI enable commands resume the corresponding paused gate.
|
|
817
|
+
`disable-image` and `prediction off` retain their documented full cleanup
|
|
818
|
+
semantics, distinct from a WebUI pause. First-time setup and client trust/routing
|
|
819
|
+
changes still use existing compatibility checks and may require a normal App
|
|
820
|
+
relaunch. Environment-controlled limits cannot be overridden through the page.
|
|
821
|
+
|
|
822
|
+
Visible auto-refresh reads the in-memory status approximately every two seconds,
|
|
823
|
+
and Provider/settings evidence approximately every 16 seconds. Hidden pages stop
|
|
824
|
+
scheduled reads. Catalogs and retained usage are fetched only for their open view
|
|
825
|
+
or an explicit lookup; their normal refresh interval remains 30 minutes. Paused
|
|
826
|
+
auto-refresh still permits manual refresh/settings retry. No history-log scan is
|
|
827
|
+
performed at the status cadence. The atom moves on load/manual refresh only and
|
|
828
|
+
respects reduced motion. Client attribution absent from older records stays unknown.
|
|
829
|
+
|
|
760
830
|
### Terminal animation
|
|
761
831
|
|
|
762
832
|
Choose the terminal activity animation interactively:
|
|
@@ -781,7 +851,7 @@ All nine rows preview their animations together while you enter a number to sele
|
|
|
781
851
|
|
|
782
852
|
All nine animations use the same 20-column colon track and cyan/blue palette. They indicate activity, not completion percentage. Braille was removed in 0.7.7. A saved `terminal_animation: "braille"` falls back to Comet without rewriting the settings file; choosing another animation replaces it, and explicitly choosing Comet clears it. Other settings remain intact.
|
|
783
853
|
|
|
784
|
-
|
|
854
|
+
Running 1.1.0+ services pick up a changed saved theme without restarting. The WebUI applies it directly; the CLI gallery save is picked up by the status renderer within about one second. Older services still need a restart after upgrade. `CCDX_TERMINAL_ANIMATION=0` (also `false`, `no`, or `off`) remains the boolean gate that disables terminal animation regardless of the selected theme.
|
|
785
855
|
|
|
786
856
|
### Optional image generation
|
|
787
857
|
|
|
@@ -1022,60 +1092,65 @@ JSON reply to a streaming request is still not silently converted to SSE.
|
|
|
1022
1092
|
|
|
1023
1093
|
### Local dashboard
|
|
1024
1094
|
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1095
|
+
Interactive desktop starts open [http://127.0.0.1:2026/](http://127.0.0.1:2026/)
|
|
1096
|
+
once by default, using the configured main port when customized. See
|
|
1097
|
+
[control console and online settings](#control-console-and-online-settings) for
|
|
1098
|
+
startup preferences, output modes and effective-state rules. Assets require both
|
|
1099
|
+
a loopback connection and loopback Host, including when the main listener uses LAN mode.
|
|
1100
|
+
|
|
1101
|
+
The sidebar separates Overview, Codex/Claude clients, Model services, Usage and
|
|
1102
|
+
diagnostics, and System/settings. Codex-specific images, prediction integration
|
|
1103
|
+
and conversation buffering stay under Codex. HTTP traffic counts include model
|
|
1104
|
+
catalogs and route errors; model outcomes and timing are named by protocol.
|
|
1105
|
+
Microsoft 365's Claude Messages summary is not a Provider-wide request total.
|
|
1106
|
+
|
|
1107
|
+
The account table uses bounded local credential metadata and Provider snapshots.
|
|
1108
|
+
A locally saved GitHub credential is not online entitlement. Account names with
|
|
1109
|
+
underscores retain their exact display value; identity, keys and environment
|
|
1110
|
+
values are not inferred from model names. Client configuration, gateway state,
|
|
1111
|
+
recent requests and actual inference are separate observations. The top summary
|
|
1112
|
+
shows selected client-to-Provider routes; it is not an account label.
|
|
1113
|
+
|
|
1114
|
+
Catalog tabs browse registered Provider directories without changing routing.
|
|
1115
|
+
Rows retain protocol, eligible clients, reasoning metadata and directory state.
|
|
1116
|
+
Unknown metadata stays unknown; listings are not verified inference access.
|
|
1117
|
+
A separate explicit source form validates and applies subsequent Codex routing.
|
|
1118
|
+
Existing active streams keep their Provider binding. User/organization client
|
|
1119
|
+
configuration is not overwritten by browsing or by a pause operation.
|
|
1120
|
+
|
|
1121
|
+
Top Refresh updates local evidence and open data groups, plus current-page settings.
|
|
1122
|
+
Auto-refresh defaults on and is browser-local. Small status snapshots update about
|
|
1123
|
+
every two seconds; source/settings evidence updates every eight status ticks.
|
|
1124
|
+
Catalogs and retained usage load only on demand or in their open view, with the
|
|
1125
|
+
existing 30-minute cadence and short freshness gate. Hidden pages stop scheduled
|
|
1126
|
+
reads. Catalog requests are deduplicated, stale tab reads are cancelled and late
|
|
1127
|
+
results rejected. Failed reads preserve last-good data and label it as stale.
|
|
1128
|
+
Service-setting errors are visible on the current page and can be retried manually.
|
|
1129
|
+
|
|
1130
|
+
The usage selector retains current and historical sources. Combined model rows
|
|
1131
|
+
and daily analytics preserve source identity; old records without a client label
|
|
1132
|
+
are not guessed into one. Legacy untagged Provider records retain their historical
|
|
1133
|
+
GitHub attribution. Cache-read tokens are included in input, not added twice.
|
|
1134
|
+
The separate current-run summary updates from returned usage in memory, without
|
|
1135
|
+
rescanning retained logs at the status cadence.
|
|
1136
|
+
|
|
1137
|
+
Usage analytics remains collapsed until opened: 7/30/90-day bars and a bounded
|
|
1138
|
+
365-day calendar in the browser time zone. Model/range/day selection reuses its
|
|
1139
|
+
snapshot. Days outside retained history are distinct from zero recorded activity.
|
|
1140
|
+
Filters, chart nodes and unsaved animation selection survive unrelated refreshes.
|
|
1141
|
+
Dark/light, English/Chinese and reduced motion remain supported. Language changes
|
|
1142
|
+
translate page labels in place without fetching models or rebuilding charts;
|
|
1143
|
+
commands, identifiers and upstream error text retain their original values.
|
|
1144
|
+
|
|
1145
|
+
Terminal appearance lives in System/settings, with a sidebar shortcut on wide
|
|
1146
|
+
screens. Preview frames load on opening; closing, hiding the view/page or reduced
|
|
1147
|
+
motion stops preview timers. Saving changes the running supported status terminal.
|
|
1148
|
+
|
|
1149
|
+
The recent-failure view merges bounded Responses events, main-listener HTTP
|
|
1150
|
+
failures and recent Responses/compact/Messages request timelines, with at most ten
|
|
1151
|
+
visible entries. Request IDs correlate final outcomes; a retry alone is not proof
|
|
1152
|
+
of recovery. It is diagnostic metadata, not a session archive. Original error
|
|
1153
|
+
responses remain unchanged. Review upstream diagnostic prose before sharing.
|
|
1079
1154
|
|
|
1080
1155
|
Inspect only the local Codex configuration:
|
|
1081
1156
|
|
|
@@ -1261,11 +1336,11 @@ unset the variable after the investigation. Records disappear on service exit.
|
|
|
1261
1336
|
| `CCDX_UPSTREAM_RETRIES` | `2` | Retries for safe requests and clearly pre-connect POST failures; capped at `5` |
|
|
1262
1337
|
| `CCDX_UPSTREAM_RETRY_DELAY_MS` | `300` | Initial upstream retry backoff in milliseconds; capped at `5000` |
|
|
1263
1338
|
| `CCDX_AUTO_REVIEW_MODEL` | saved selection or `gpt-6.1-sol` | Copilot Responses model used for Codex Auto-review; overrides the interactive selection |
|
|
1264
|
-
| `CCDX_LOG_PATH` | unset |
|
|
1339
|
+
| `CCDX_LOG_PATH` | unset | Record diagnostic logs independently of quiet terminal presentation; set to `1` for `~/.local/share/codex-copilot-dx/debug.log` |
|
|
1265
1340
|
| `CCDX_LOG_LEVEL` | `info` | Set to `debug` for upstream attempts, status codes, retry causes, and timings |
|
|
1266
1341
|
| `CCDX_HTTP_ERROR_DETAILS` | unset | Set to `1` on a new service to retain redacted HTTP error excerpts (500 characters) in bounded memory; review before sharing, no file logging is enabled |
|
|
1267
1342
|
| `CCDX_LOG_MAX_BYTES` | `16777216` | Rotate the debug log at this size and retain one `.1` backup; set to `0` to disable rotation |
|
|
1268
|
-
| `CCDX_TERMINAL_ANIMATION` | auto |
|
|
1343
|
+
| `CCDX_TERMINAL_ANIMATION` | auto | Allow the selected animation in the fixed interactive status region during business activity; set to `0`, `false`, `no`, or `off` to disable |
|
|
1269
1344
|
| `CCDX_IMG_MAX_DIM` | `2048` | Maximum long edge in pixels for image downscaling |
|
|
1270
1345
|
| `CCDX_IMG_QUALITY` | `82` | Initial WebP quality for image re-encoding |
|
|
1271
1346
|
| `CCDX_IMG_MIN_BYTES` | `100000` | In-bounds images smaller than this skip re-encoding; oversized dimensions still trigger an optimization attempt |
|
|
@@ -1309,7 +1384,7 @@ Diagnostic redaction removes Basic authorization payloads and URL userinfo, and
|
|
|
1309
1384
|
|
|
1310
1385
|
## Debug logging
|
|
1311
1386
|
|
|
1312
|
-
Set `CCDX_LOG_PATH=1` to
|
|
1387
|
+
Set `CCDX_LOG_PATH=1` to record diagnostic logs independently of quiet terminal presentation to `~/.local/share/codex-copilot-dx/debug.log`, or provide a custom path. Add `CCDX_LOG_LEVEL=debug` for upstream attempts, retry causes, status codes, and timings. The adapter does not deliberately dump request/response bodies or authorization headers. File diagnostics redact common credential forms and labelled content echoes, but this cannot identify every secret in arbitrary external prose; review logs before sharing them. File writes are asynchronous and batched with a 4096-record / 2 MiB pending-and-in-flight ceiling. Overflow drops excess file records with one warning and a status counter; terminal output continues. CLI exit paths flush for at most 1.5 seconds. `ccdx doctor config` bypasses file logging entirely.
|
|
1313
1388
|
|
|
1314
1389
|
## Large histories and images
|
|
1315
1390
|
|