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 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 separate Claude gateway and manually select M365 as a Codex backup.
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
- Open [the local dashboard](http://127.0.0.1:2026/) for status, model discovery, usage, cache/limits, recent failures, request context and animation settings. First output uses **ms**; estimated output speed uses **token/s**. Inference HTTP failures are retained separately from route and MCP-method errors.
24
- Provider tabs browse sources without changing routing. Separate disclosures show authorization, clients, resources and optional capabilities. Saved credentials and catalog listings do not prove inference access; historical sources remain filterable.
25
- Auto refresh runs every 30 minutes while visible and can be switched off. Hidden pages pause; opening sections and manual refresh still work. The atom rotates once on page load and manual refresh, respecting reduced motion. Startup uses a compact six-line atom and aligned checks; `Ready` refers to the core service. Narrow/non-color terminals use a plain title.
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 or reuse the adapter and open Codex when auto-launch is enabled |
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 the separate, keyed `127.0.0.1:2027` gateway and Claude-only catalog.
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
- The dashboard and CLI separate prediction preference, bridge state and observed config traffic; candidate visibility stays unknown. See [architecture boundaries](docs/ARCHITECTURE.md) for separate inference, integration, image and management ownership.
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.log(`\n${status("warn", `Update available: ${LOCAL_VERSION} -> ${latestVersion}`)}`);
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(() => {});
@@ -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, policy refusal and gateway-port conflicts do not disable GitHub.
49
- Claude listener/configuration readiness is also separate from M365 provider
50
- readiness. A busy Claude port or a GPT-only catalog cannot block the explicitly
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 listens on loopback only, requires its private local key and
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 or
268
- new poller. Animation frames still load once per page when opened.
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.31, upgrades to the packed candidate and exercises
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
@@ -1,5 +1,6 @@
1
1
  # Documentation index
2
2
 
3
+ - [1.1.0: Shared entry, control console and quiet terminal](RELEASE_1.1.0.md)
3
4
  - [1.0.0: Provider dashboard and Claude effort adaptation](RELEASE_1.0.0.md)
4
5
 
5
6
  The [root README](../README.md) is the quick start; the [command/configuration
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 separate
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
- The gateway is a second listener in the same Node service, on `127.0.0.1:2027`.
94
- If the core service itself is configured on 2027, CCDX reserves that port for the
95
- core and skips only the Claude listener/setup. M365 GPT backup still works. Select
96
- a different core `ADAPTER_PORT` if both client surfaces are needed; no port is moved automatically.
97
- It accepts a private local Bearer key or `x-api-key`, rejects browser Origin
98
- headers and exposes Claude only: `GET /v1/models`, `POST /v1/messages` and
99
- `POST /v1/messages/count_tokens` (upstream support remains authoritative).
100
- Messages tools, thinking, cache breakpoints, image blocks, beta headers and native
101
- SSE are relayed without OpenAI-format conversion. Cancellation and downstream
102
- backpressure are preserved. Upstream and local gateway credentials are distinct;
103
- the local key is never forwarded upstream. The legacy Claude URL on port 2026
104
- remains retired. Claude requests never reach GitHub.
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, background refresh uses the same two-column status/message layout as
702
- other runtime logs. Status messages remove terminal controls and collapse newlines;
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
- The selected theme is loaded once when a new adapter starts, so changing it does not restart or alter an adapter that is already running. Stop and start CCDX to apply the new theme. `CCDX_TERMINAL_ANIMATION=0` (also `false`, `no`, or `off`) remains the boolean gate that disables terminal animation regardless of the selected theme.
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
- After starting `ccdx`, open [http://127.0.0.1:2026/](http://127.0.0.1:2026/) in a browser. If `ADAPTER_PORT` is customized, use that port instead. The dashboard shares the existing adapter listener; CCDX does not open a browser automatically or start another service. The page and its assets require both a loopback connection and a loopback Host header, even when LAN binding is enabled.
1026
-
1027
- The dashboard reads local runtime/Provider snapshots and local usage metadata.
1028
- Account Authorization lists saved identity, authorization evidence, service state,
1029
- last successful token acquisition and TTL where known. GitHub local credential
1030
- validity is labeled saved, never online entitlement. Client Connections separately
1031
- shows configuration, gateway state, observed requests and Codex native prediction.
1032
- Runtime Resources retains Responses outcomes/timing and local history; Additional
1033
- Capabilities retains optional image status. Codex model/request overview counts
1034
- are scoped to the Codex surface; Claude request counters remain separately labeled.
1035
-
1036
- Model Catalog tabs come from the backend Provider descriptors. Selecting a tab
1037
- only selects a read resource, not the inference route. GitHub's dashboard view
1038
- includes upstream directory entries beyond selectable Codex GPT models; the CLI's
1039
- existing GPT filtering is unchanged. Rows show protocol, eligible clients,
1040
- upstream-advertised reasoning and directory state. An unknown field is displayed
1041
- as unknown, not unsupported. A directory listing is not inference verification.
1042
- The header count is the active Codex in-memory catalog, not a sum of tab results.
1043
- The usage selector combines registered Providers and retained historical sources.
1044
- Mixed-source model rows and combined daily analytics retain source identity;
1045
- source-filtered views show model names within that source. Legacy untagged records
1046
- remain GitHub records. Current and rotated logs remain bounded metadata reads.
1047
-
1048
- Top Refresh updates local status/Provider evidence and expanded data groups.
1049
- Auto refresh is browser-local, defaults on and runs every 30 minutes while visible.
1050
- Opening a data section updates its group unless attempted within 30 seconds;
1051
- hidden pages pause and returning catches up once. In-flight reads are deduplicated;
1052
- tab changes cancel obsolete page requests and reject late responses. Each tab
1053
- retains only its own last-good catalog; account/generation changes discard it.
1054
- Errors preserve the successful timestamp and mark the read as failed. Provider
1055
- lookups never enable a disabled source or open an interactive login. No server
1056
- poller, event bus, extra inference call or runtime dependency is added.
1057
-
1058
- Dark/light themes, English/Chinese, reduced motion and unsaved animation choices
1059
- are retained. Provider tabs support keyboard navigation. Data requests require the
1060
- same loopback address/Host and custom dashboard header; animation writes also
1061
- require a matching Origin. The page cannot switch Providers or manage credentials.
1062
- Limit changes remain CLI-only. The dashboard does not initialize images; unknown
1063
- image status still requires `ccdx image-status`. Review diagnostics before sharing
1064
- screenshots: upstream error prose may contain sensitive details.
1065
-
1066
- The dashboard labels the upstream token cache hit metric **Reuse Rate** and cached input **Reused Input**, separate from **Local History**. Chinese uses short functional names such as “对话暂存”, “重用输入” and “重用比例”. English and Chinese preserve model IDs, commands, units, HTTP status codes and raw diagnostic values. Animation display names translate in place; theme IDs and CLI parameters do not change.
1067
-
1068
- The transparent, single-color atom-orbit favicon follows the dashboard's saved light/dark choice without a separate network request.
1069
-
1070
- The saved GitHub Copilot account appears immediately to the left of the Status updated time. It uses the same local credentials and fingerprint-bound identity metadata as `ccdx auth status`, with username (or numeric ID fallback) and a `SAVED` label; this is not an online entitlement check. Missing, invalid, unidentified, or unreadable credentials are shown explicitly. The account read runs on page load, top Refresh and visible-page automatic updates, independently of adapter status and without upstream authentication calls. Its timestamp is in the account tooltip; failed updates retain the prior account and explicitly label the failure. Its loopback-only, custom-header-protected API exposes no token, fingerprint, credential path, or raw metadata. The general status endpoint retains its existing identity-free contract.
1071
-
1072
- Account names containing underscores are supported, including `dingxiao_microsoft`. A numeric ID is a fallback, not a replacement for an available, safely displayable username; the existing length bounds and credential-shaped text suppression still apply.
1073
-
1074
- The language button immediately right of the appearance button switches between English and Simplified Chinese. English remains the default; the choice is saved only in the current browser, separately from light/dark mode. Switching translates the existing page in place: it does not fetch API data, rebuild charts, change selected filters, discard unsaved animation choices, or reset expanded failure details. Static labels, live status text, chart tooltips and accessibility labels follow the selected language. Model IDs, account names, dates, numeric values and upstream diagnostic prose stay unchanged; copied diagnostic fields retain their original names and values. The local translation asset adds no dependency, external service, polling or inference-path work.
1075
-
1076
- Usage Trends is collapsed by default. Opening it adds daily input/output token bars (7/30/90 days) and a 365-day calendar of recorded usage calls or tokens, grouped in the browser's time zone. Cache-read tokens are already part of input and are not added again. Model and range filters use the current snapshot without additional requests; selecting a day shows its filtered model totals in the Model Usage table, and Show all restores the original table. Analytics shares the existing current/rotated-log scan and exposes only bounded metadata (365 days, up to 100 model filters). Days before retained history are hatched, not presented as zero; the oldest retained day may be partial. Counts describe retained usage records, not messages, session time, or all HTTP requests. Open-section, manual and visible-page automatic refresh update the snapshot. Analytics are requested only while expanded inside the open usage section or while a day filter needs them. Filters and selected dates survive refresh; a closed unfiltered chart reuses its displayed data until reopened. There is no server background collection.
1077
-
1078
- Terminal Animation is collapsed at the bottom of the page, with an Animation shortcut in the header. Preview frames load only when opened; closing it, hiding the page, or requesting reduced motion stops the preview timer. Unsaved choices survive folding and reopening. Recent response failures expand to diagnostic fields (time, model, code, message, response/request IDs, and retry policy) with a Copy details control. The view combines the last 10 retained `response.failed` events with failures from the 20 most recently finished Responses/compact requests, showing at most 10 entries. Matching local request IDs attach the final outcome and timing metadata, so a recovered event can show `completed`; an uncorrelated retry attempt does not prove recovery. Transport failures and incomplete/cancelled requests can appear without a `response.failed` event. These are bounded runtime observations, not complete session histories. Diagnostic prose is redacted by the existing recorder but can still contain sensitive context: review before copying or sharing.
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 | Mirror terminal logs to a file; set to `1` for `~/.local/share/codex-copilot-dx/debug.log` |
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 | Show the selected transient animation while an interactive terminal has active requests and no output for 800 ms; set to `0`, `false`, `no`, or `off` to disable |
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 mirror terminal logs 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.
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-copilot-dx",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "description": "Local Codex adapter and optional Microsoft 365 Claude gateway",
5
5
  "author": "Dale Xiao",
6
6
  "type": "module",