codex-copilot-dx 1.2.0 → 1.2.1

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
@@ -7,19 +7,18 @@ Default Auto-review: **GPT-6.1 Sol / low**. Image generation is **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 access to the models you want to use.
10
+ For Codex App, use macOS or Windows and a GitHub account with access to the desired Copilot models. With Node.js **22.15+** and npm already available:
11
11
 
12
12
  ```bash
13
13
  npm install -g codex-copilot-dx@latest
14
14
  ccdx
15
15
  ```
16
16
 
17
- CCDX reuses a compatible local credential or starts GitHub Device Flow, listens
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
19
- is needed. On Windows, open the App manually unless native prediction setup is
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.
17
+ No Node or Git? Download [install.sh](https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.1/install.sh) (macOS/Linux) or [install.ps1](https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.1/install.ps1) (Windows), then run `sh install.sh` or `./install.ps1` under your current shell policy. The bootstrap reuses compatible Node/npm or installs verified official Node 24.22.0 privately for CCDX. It adds no Git, compiler or system package manager. It keeps registry/proxy/certificate policy, verifies the Release package and installed runtime, and restores the prior CCDX package if installation fails. Dependencies still need your configured registry. See [installation limits and private command paths](docs/REFERENCE.md#install-without-node-or-git).
21
18
 
22
- The [local control console](http://127.0.0.1:2026/) has a sidebar for **Overview, Apps, Model sources, Usage and issues, 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.
19
+ CCDX reuses a compatible local credential or starts GitHub Device Flow, listens 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 is needed. On Windows, open the App manually unless native prediction setup is 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`. The npm package adds no install hook or policy change; custom launchers are preserved. npm's own script is untouched. The configured `dummy` API key is a placeholder, not a credential.
20
+
21
+ The [local control console](http://127.0.0.1:2026/) keeps indented Codex/Claude pages, Model sources, Usage, Requests and Settings. Codex owns source/model, Auto Review, images, input suggestions and conversation buffering; Model sources owns accounts, catalogs and Microsoft 365 access. Browsing a catalog never changes routing. The existing visual style, logo and motion remain.
23
22
 
24
23
  Startup shows bounded checks, sources with discovered model lists and Claude Code/App configuration. Prediction normally uses one summary line; `ccdx prediction status` retains recovery and environment details. After Ready, an interactive terminal shows current source/Claude state and a line-framed table of this process's returned usage and inference counters. Notices and activity each have their own line; individual requests do not scroll. Input includes reused input tokens. `ccdx --verbose` (also `--show-request-id`, or debug logging) retains detail output; optional file logging remains independently controlled. Source and Claude summaries wrap on narrow terminals. Failed reads show previous-data status and the last successful update time. Non-TTY, CI, dumb, or terminals too small for the full region use plain output (at least 40 columns / 16 rows are required). `Ready` only means the core service is available; discovered catalogs and configured clients do not prove inference access.
25
24
 
@@ -111,8 +110,8 @@ See the [M365 reference](docs/REFERENCE.md#microsoft-365-provider) for ownership
111
110
  for the API. Inference rejects browser Origin headers; native clients remain supported. Diagnostic errors may contain sensitive upstream text.
112
111
 
113
112
  Startup checks GitHub's latest-release web redirect, not npm or the anonymous REST quota, and suggests `ccdx update github`.
114
- Updates install the exact stable tag; dependencies still use npm's configured registry. Lookup errors identify HTTP refusal, timeout, network failure or invalid redirects. For npm `EALLOWREMOTE`, only if policy permits and the update is trusted, use `ccdx update github --allow-remote`: explicit URL-download permission for that installation's whole dependency tree, not a hostname allowlist. Persistent npm settings stay unchanged.
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
+ GitHub updates verify and install the exact Release tarball without Git; dependencies still use npm's configured registry. Lookup errors identify HTTP refusal, timeout, network failure or invalid redirects. For npm `EALLOWREMOTE`, only if policy permits and the update is trusted, use `ccdx update github --allow-remote`: explicit URL-download permission for that installation's whole dependency tree, not a hostname allowlist. Persistent npm settings stay unchanged.
114
+ Updates back up the discovered CCDX package and commands, restore them on install/runtime-check failure, and verify the installed version (exact for GitHub). Mismatched npm targets warn without changing PATH/prefix. Restart the adapter separately. Full `ccdx doctor` reports this target and readonly credential permissions; it never changes ACLs.
116
115
  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).
117
116
 
118
117
  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.
@@ -382,3 +382,23 @@ Stream performance retains existing route totals and adds `by_route.<route>.by_p
382
382
  `operation-error.mjs` distinguishes client cancellation, unspecified abort, timeout, network/TLS/proxy, authentication and access denial. HTTP 403 is not proof of credential expiry. Claude and Codex cancellations are informational; request-body timeouts use 408, upstream/idle timeouts 504, and local client cancellation diagnostics 499. Original upstream error status/body and protocol-specific stream bytes retain their existing path.
383
383
 
384
384
  Byte-weighted request admission is not a simultaneous-stream limit. The 1.2.0 load replay exercises 16/64/128 small-body held streams, management responsiveness and downstream cancellation against 1.1.1. It does not establish a universal safe concurrency maximum. Existing defaults remain unchanged; see the release receipt for measured bounds.
385
+
386
+ ## Installation and release delivery
387
+
388
+ `release-install.mjs` is a standalone helper with built-in static imports, shared by the updater
389
+ and no-Node bootstraps. It bounds downloads/decompression, verifies the exact
390
+ release package and checksum, backs up only this package/commands under an
391
+ exclusive lock, restores on failure and validates the version/sharp/broker.
392
+ It reuses the selected npm's bundled downloader with named proxy/CA/TLS/offline settings and no retries; no new download dependency is added. No installer work runs on startup or inference paths. `package-update.mjs` keeps
393
+ source choice, named npm-policy probes and fixed platform launch arguments;
394
+ verified filenames enter cmd.exe, while paths enter cwd. Private-runtime commands
395
+ are regenerated before committing a successful update. This provides error
396
+ rollback, not power-loss atomicity; failed restore retains a named backup/lock.
397
+
398
+ The platform scripts reuse Node/npm or verify pinned official Node 24.22.0 inside
399
+ a private prefix, without system installation or automatic Git/compiler setup.
400
+ They verify the standalone helper before execution. `scripts/release-artifacts.mjs`
401
+ builds one npm tarball plus checksummed platform scripts/helper; the npm publish
402
+ workflow and GitHub Release must deliver those same package bytes. WebUI source
403
+ selection and Auto Review remain under Codex; M365 lifecycle stays in source
404
+ management. CLI and UI share advertised effort filtering and preference writes.
package/docs/REFERENCE.md CHANGED
@@ -263,7 +263,7 @@ certificate store is opened. Existing valid PEM credentials are reused without
263
263
  conversion or reauthorization. macOS retains its system OpenSSL setup path.
264
264
  CCDX does not download a runtime or bypass company PowerShell policy; unavailable
265
265
  system APIs fail the optional setup without preventing core service startup.
266
- This does not remove Git from the separate `ccdx update github` installation path.
266
+ Git is also unnecessary for `ccdx update github` since 1.2.1; it uses a verified Release tarball.
267
267
  Run CCDX using Windows-native Node, not inside WSL. The App's agent may still use
268
268
  WSL independently. No administrator prompt or execution-policy change is added.
269
269
  AppData may be virtualized by MSIX: setup selects an existing `Codex/Local State`
@@ -770,7 +770,7 @@ ccdx limits --decoded default
770
770
 
771
771
  ### Control console and online settings
772
772
 
773
- The sidebar separates Overview, Codex/Claude Apps, Model sources, Usage and issues, and Settings. Codex owns optional image generation, native
773
+ The sidebar separates Overview, indented Codex/Claude Apps, Model sources, Usage, Requests, and Settings. Codex owns optional image generation, native
774
774
  prediction adaptation and the temporary Responses conversation buffer. That
775
775
  buffer supports continuation; it is not a chat archive. Shared HTTP traffic and
776
776
  per-protocol model outcomes are distinct. Claude Messages metrics are not labeled
@@ -791,7 +791,7 @@ animation themes retain their timing/palette and cycle pauses. `--verbose`,
791
791
  `--show-request-id` or `CCDX_LOG_LEVEL=debug` restore detailed terminal output.
792
792
  Failed reads show previous-data status and the last successful update time, or that no data has been received. Narrow summaries wrap rather than hiding Claude App/Code state. Non-TTY/CI/dumb/too-small terminals use plain output; repeated identical notices
793
793
  are coalesced. File logging retains its existing explicit opt-in and redaction.
794
- In-memory usage still updates when `CCDX_DISABLE_USAGE=1` disables persistence. `runtime_usage.by_provider` separates returned process-local usage by source. The Usage and issues view adds Requests by source; `ccdx status` also lists source/protocol outcomes. Unknown outcomes and partial usage remain distinct. CLI remains English; WebUI keeps English/Chinese.
794
+ In-memory usage still updates when `CCDX_DISABLE_USAGE=1` disables persistence. `runtime_usage.by_provider` separates returned process-local usage by source. The Requests view contains Requests by source, recent failures and request context; `ccdx status` also lists source/protocol outcomes. Unknown outcomes and partial usage remain distinct. CLI remains English; WebUI keeps English/Chinese.
795
795
 
796
796
  The Clear conversation buffer action clears all process-local conversation continuation data. If image optimization or conversation history is active, cleanup is refused; retry after current requests finish. Old chats may fail to continue; saved Codex transcripts remain. It invokes the existing image-transform/history cleanup operation, rather than an inactive-only selector.
797
797
 
@@ -911,97 +911,132 @@ ccdx update npm
911
911
  ccdx update github
912
912
  ```
913
913
 
914
- In Windows PowerShell, use `ccdx.cmd update github` (or `ccdx.cmd update npm`)
915
- when script policy blocks npm's `.ps1` shim. Since `0.9.31`, the updater runs
916
- `npm.cmd` through the system `cmd.exe`, with AutoRun and delayed expansion
917
- disabled, fixed installer arguments and a validated stable release tag.
918
- It does not enable Node's generic `shell` option, change PowerShell policy,
919
- rewrite npm configuration or add an external dependency. The caller's PATH,
920
- registry, proxy, prefix/cache settings and terminal streams are preserved.
921
- macOS/Linux retain direct `npm` execution and separate argument arrays.
922
-
923
- Versions through `0.9.30` can fail with `spawn EINVAL` before the Windows
924
- installer starts. To bootstrap this fix, run the installer directly:
925
-
926
- ```powershell
927
- npm.cmd install -g --allow-git=all 'github:DaleXiao/codex-copilot-dx#v0.9.33'
928
- ccdx.cmd version
929
- ```
930
-
931
- This GitHub installation still requires Git on PATH. Stop/restart the running
932
- adapter after installation; installation alone does not update a running process.
933
- Installer errors and nonzero exits fail the update without a success message or
934
- automatic retry. Missing Git, blocked dependency downloads or npm cache-only
935
- settings remain npm/environment errors, not fixed by changing the launcher.
936
-
937
- After a zero installer exit, CCDX reads bounded metadata from npm's selected global
938
- target and verifies the package name and stable version. GitHub requires the exact
939
- selected release version. A missing/mismatched target fails verification without
940
- retrying installation; if the global target could not be discovered, the command
941
- explicitly reports that the installed version is unverified rather than announcing
942
- an update. This check neither changes PATH/prefix/registry nor restarts a running
943
- adapter, and it does not verify package-file integrity or npm's current latest tag.
944
-
945
- Normal startup checks the official GitHub `releases/latest` web endpoint once in
946
- the background, without accessing the npm registry or REST API. The anonymous
947
- check requires no PAT or Copilot credentials, has a two-second deadline, validates
948
- only the redirect header, cancels the response body without reading HTML, and
949
- silently skips errors. Redirects must use HTTPS, the exact GitHub repository and
950
- a stable version tag with no credentials, query or fragment. It never follows
951
- the redirect, retries, polls, installs or restarts. On adapter reuse, Ready is
952
- displayed before waiting for any remaining check budget.
953
-
954
- `ccdx update gh` is accepted as shorthand for the GitHub source. The npm source installs `codex-copilot-dx@latest` through the registry already configured for npm, including a company mirror. The GitHub source queries the latest stable published Release (ten-second deadline), validates its version tag, and installs that exact tag from `DaleXiao/codex-copilot-dx`, not `main`. Lookup failure stops before installation, without an npm fallback. It opts in to Git fetching only for that command and does not change npm's persistent `allow-git` setting.
955
-
956
- GitHub is the package source, not a replacement for the npm installer. Dependencies such as `sharp` may still need the configured npm registry during an explicit update; use a company-approved mirror/cache where required. GitHub updates do not promise an entirely registry-free installation.
957
-
958
- Since `0.9.38`, update reads the npm version and named global `allow-remote` and
959
- registry settings using bounded probes. It never reads the full configuration or
960
- prints registry credentials. The global context matches `npm install --global`;
961
- an unrelated project's `.npmrc` cannot silently grant update permission. Old npm
962
- versions without this restriction do not receive an unsupported option. Failed
963
- policy discovery does not block an ordinary installation; explicitly requesting
964
- an override with unknown support fails before installation.
965
-
966
- npm 12 normally sets `allow-remote=none`. A company registry may return a tarball
967
- URL on a different origin/path, which can trigger `EALLOWREMOTE` even for a named
968
- dependency such as sharp. The default update does not weaken this policy. When
969
- the installation fails under a restrictive policy, CCDX gives conditional guidance
970
- to check npm's actual error; it does not label every failure a remote-policy error.
971
-
972
- Only if permitted by company policy and you trust the package/dependency tree,
973
- grant URL downloads for one explicit update:
914
+ Since 1.2.1, the GitHub channel resolves the latest stable Release, downloads
915
+ `codex-copilot-dx-VERSION.tgz` and `SHA256SUMS` from that exact release, checks
916
+ SHA-256 and the packed package name/version, and gives the verified local file
917
+ to npm. **Git is not required.** It never installs `main`, falls back to another
918
+ channel or automatically grants remote-download permission. Each asset has a
919
+ 60-second download deadline and bounded size (64 KiB manifest, 16 MiB package,
920
+ 64 MiB decompressed metadata scan). The checksum comes from the same HTTPS
921
+ release; it detects corrupt/mismatched files and is not a separate signature.
922
+ Dependencies still use npm's configured registry, including a company mirror.
923
+ This is not a fully offline or registry-free distribution.
924
+
925
+ Windows runs `npm.cmd` through system `cmd.exe` with AutoRun and delayed expansion
926
+ disabled. Its fixed tarball basename is passed separately from the temporary
927
+ working directory, including when that path has spaces or shell metacharacters.
928
+ Use `ccdx.cmd` if PowerShell blocks npm's `.ps1` entry. No PowerShell policy,
929
+ registry, proxy, certificate setting or persistent npm permission is changed.
930
+ macOS/Linux keep direct npm execution with separate argument arrays.
931
+
932
+ Before npm changes a discovered global target, CCDX backs up only its package
933
+ and two command entries and acquires an exclusive install lock. A linked target
934
+ is preserved and refused. Installer or runtime-verification failure restores the
935
+ old package/commands; successful installation removes the backup. A failed restore
936
+ reports the retained backup and lock for manual recovery. A lock left by a killed
937
+ installer requires checking that no installation is running before removing it.
938
+ There is no promise of crash/power-loss atomicity. Other apps, credentials,
939
+ settings, caches and the running service are not replaced. Readonly/busy Windows
940
+ files can prevent installation; finish use of that installation and retry.
941
+
942
+ The selected target must have the correct name/stable version (exact version for
943
+ GitHub), a working version command and working sharp. A previously installed
944
+ native M365 broker must remain loadable. A mismatched npm prefix warns and retains
945
+ the caller's choice; if the target cannot be discovered, verification/rollback
946
+ cannot be guaranteed and the command explicitly says so. Restart CCDX separately.
947
+
948
+ Normal startup still checks GitHub's `releases/latest` web redirect once in the
949
+ background, with a two-second deadline and no npm/REST/PAT access. It validates
950
+ only the redirect header, cancels the body and silently skips errors; it never
951
+ installs, polls or retries. Explicit GitHub updates use a ten-second lookup.
952
+ `ccdx update gh` is shorthand. `ccdx update npm` keeps the configured registry and
953
+ installs `codex-copilot-dx@latest`; it never silently switches to GitHub.
954
+
955
+ npm policy is read using bounded named global fields, without printing credentials.
956
+ An unrelated project's `.npmrc` cannot grant permission. npm 12's
957
+ `allow-remote=none` can reject a mirror's cross-origin dependency URL with
958
+ `EALLOWREMOTE`. Only if company policy permits and you trust this entire package
959
+ tree, use the explicit one-install exception:
974
960
 
975
961
  ```sh
976
962
  ccdx update github --allow-remote
977
- # Or, for the configured npm registry:
978
963
  ccdx update npm --allow-remote
979
964
  ```
980
965
 
981
- The option permits URL dependencies throughout that one installation, including
982
- transitive dependencies. It is **not** an allowlist for one registry or tarball
983
- host. It neither changes `.npmrc`/registry/proxy/prefix nor automatically retries
984
- the failed install. npm still enforces package integrity and its other policies;
985
- this is not permission to run every package script. Windows uses the same fixed
986
- system `cmd.exe` launch; use `ccdx.cmd` if PowerShell blocks `.ps1` shims.
966
+ This grants URL downloads throughout that installation's dependency tree, not a
967
+ hostname allowlist. It does not change `.npmrc`, add a retry, allow every script
968
+ or override other administrator policy. Older npm receives no unsupported flag.
969
+ Unknown support prevents an explicitly requested exception from starting.
987
970
 
988
- An older CCDX executable cannot gain this option before it is upgraded. To
989
- bootstrap `0.9.38` from a version that fails with `EALLOWREMOTE`, the equivalent
990
- explicit per-install command is, only with the same policy/trust approval:
971
+ For an older updater that still requires Git, install the Release tarball directly:
991
972
 
992
973
  ```sh
993
- npm install -g --allow-git=all --allow-remote=all 'github:DaleXiao/codex-copilot-dx#v0.9.38'
974
+ npm install -g https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.1/codex-copilot-dx-1.2.1.tgz
994
975
  # Windows PowerShell: use npm.cmd instead of npm.
995
976
  ```
996
977
 
997
- Check `ccdx version`, then restart CCDX. This does not guarantee access through
998
- every company mirror: authentication, offline/cache-only rules, unsynchronized
999
- packages and administrator-enforced policies still apply. If URL permission
1000
- cannot be granted, the registry must expose compatible allowed tarball URLs;
1001
- CCDX does not bypass that boundary. The source lock pins versions and integrity
1002
- without a developer-specific corporate smol-toml URL.
1003
-
1004
- If a configured npm mirror has not synchronized the current release yet, use the GitHub source. A running adapter keeps its loaded version until it is stopped and restarted.
978
+ This manual npm URL command relies on npm/HTTPS and does not perform CCDX's
979
+ separate SHA-256 check. Under strict remote policy, use the verified bootstrap or
980
+ an administrator-approved local package/cache; do not automatically broaden policy.
981
+ A failed old `github:owner/repo#tag` install with `spawn git ENOENT` means npm
982
+ could not launch Git, often because Git was absent from the terminal's PATH.
983
+ It is unrelated to Wave styling; unknown-option warnings are separate.
984
+
985
+ ### Install without Node or Git
986
+
987
+ The Release also contains `install.sh`, `install.ps1`, `ccdx-install.mjs` and
988
+ `SHA256SUMS`. Download the platform script from the intended release and run it
989
+ with the current shell policy. The scripts reuse compatible Node/npm and the
990
+ configured global prefix. If unavailable, they download **only official Node
991
+ 24.22.0 LTS** for the current platform, verify the pinned official SHA-256,
992
+ and keep it inside CCDX's private directory. macOS arm64/x64, Windows arm64/x64
993
+ and glibc Linux arm64/x64 archives are selected explicitly. Linux musl users can
994
+ reuse an existing approved compatible Node; this bootstrap does not add libc.
995
+ Unsupported platforms fail before installing a system runtime.
996
+
997
+ Default private prefixes are `${XDG_DATA_HOME:-~/.local/share}/ccdx` and
998
+ `%LOCALAPPDATA%\CCDX`; an explicit `npm_config_prefix` takes precedence. No global
999
+ Node, Git, Python, compiler, Build Tools or package manager is installed. Native
1000
+ packages use prebuilt dependencies with install scripts disabled. The bootstrap
1001
+ verifies sharp and the native broker on macOS/Windows; a missing required prebuilt
1002
+ component fails and restores the old CCDX package. The private Node remains
1003
+ available for a retry if a later package download is blocked.
1004
+
1005
+ The helper and package are verified against the release checksum list. The
1006
+ bootstrap script itself is initially trusted through the selected HTTPS release;
1007
+ review it or compare its checksum through an independent trusted copy if needed.
1008
+ The helper reuses the selected npm's bundled `make-fetch-happen` downloader and
1009
+ bounded named proxy/no-proxy/CA/TLS/offline settings, with no automatic retries.
1010
+ It adds no downloader dependency, forwards no registry credentials and refuses
1011
+ network downloads in npm offline mode. A nonstandard npm missing that component
1012
+ fails with local-package guidance. Outer platform-script downloads use curl or
1013
+ Windows' download tool under their existing network/certificate policy; managed
1014
+ PAC-only/offline environments may require administrator-provided Release files.
1015
+ The bootstrap keeps user/global npm configuration, proxy and certificate choices.
1016
+ Unavailable downloads or restrictive policy stop with no channel fallback.
1017
+ It still needs approved access to GitHub Release assets, Node downloads when
1018
+ needed, and the configured registry for dependencies. For offline/managed devices,
1019
+ ask the administrator to pre-stage these exact files and dependency cache or use
1020
+ an approved existing Node/npm distribution; CCDX does not bypass network policy.
1021
+
1022
+ Private launchers bind the chosen Node and set `CCDX_PRIVATE_INSTALL_PREFIX` for
1023
+ future updates. Windows bootstrap uses these validated commands even with an
1024
+ existing Node, so spaces and shell metacharacters in the prefix do not break npm's generated batch commands. Exact npm-owned PowerShell launchers are removed; custom scripts and script policy stay unchanged. They supply a private `npm_config_prefix` only when the caller has
1025
+ not set one. Updates preserve those launchers. PATH and shell profiles are not
1026
+ rewritten: the installer prints the full command path and the directory to add
1027
+ for `ccdx` shorthand. Compatible POSIX installations keep npm's normal commands. Windows PowerShell
1028
+ expands percent signs in batch command filenames, before CCDX can run. The
1029
+ Windows bootstrap refuses an install prefix containing `%` before modifying it;
1030
+ choose a writable prefix without `%` using `npm_config_prefix`. Unicode, spaces,
1031
+ `&` and `!` are covered, including a legacy console code page. This avoids shipping
1032
+ an additional native executable just to bypass the shell's path parsing.
1033
+ No install hook is added to the npm package.
1034
+
1035
+ The scripts accept only `sh install.sh [--allow-remote]` or
1036
+ `./install.ps1 [-AllowRemote]`; the permission is explicit and applies to that
1037
+ one installation, with the same whole-tree meaning described above. Do not use
1038
+ it when company policy forbids it. Interrupted runtime downloads stay in a cleaned
1039
+ temporary directory; installed private runtime cleanup is a separate user choice.
1005
1040
 
1006
1041
  ## Diagnostics
1007
1042
 
@@ -1098,7 +1133,7 @@ once by default, using the configured main port when customized. See
1098
1133
  startup preferences, output modes and effective-state rules. Assets require both
1099
1134
  a loopback connection and loopback Host, including when the main listener uses LAN mode.
1100
1135
 
1101
- The sidebar separates Overview, Codex/Claude Apps, Model sources, Usage and issues, and Settings. Codex-specific images, prediction integration
1136
+ The sidebar separates Overview, indented Codex/Claude Apps, Model sources, Usage, Requests, and Settings. Codex-specific images, prediction integration
1102
1137
  and conversation buffering stay under Codex. HTTP traffic counts include model
1103
1138
  catalogs and route errors; model outcomes and timing are named by protocol.
1104
1139
  Microsoft 365's Claude Messages summary is not a Provider-wide request total.
@@ -1113,7 +1148,7 @@ shows selected client-to-Provider routes; it is not an account label.
1113
1148
  Catalog tabs browse registered Provider directories without changing routing.
1114
1149
  Rows retain protocol, eligible clients, reasoning metadata and directory state.
1115
1150
  Unknown metadata stays unknown; listings are not verified inference access.
1116
- A separate explicit source form validates and applies subsequent Codex routing.
1151
+ The source form lives under Codex and explicitly applies subsequent routing. GitHub conversation models are selected in Codex, so its conversation-model field is hidden rather than empty. Auto Review has its own model/effort form under Codex, for either source; choices use the same advertised-effort policy and preference storage as the CLI. First source setup initializes the review choices atomically; later conversation-model saves preserve the saved review choice, and review changes use their own Save button. The GitHub model environment override is shown and locked. Microsoft 365 enable/disable stays under Model sources; disabling confirms that Claude local access stops, unchanged CCDX-owned settings are restored and Codex returns to GitHub. Active requests still block disabling.
1117
1152
  Existing active streams keep their Provider binding. User/organization client
1118
1153
  configuration is not overwritten by browsing or by a pause operation.
1119
1154
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-copilot-dx",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Local Codex adapter and optional Microsoft 365 Claude gateway",
5
5
  "author": "Dale Xiao",
6
6
  "type": "module",
@@ -48,11 +48,13 @@
48
48
  "bench:check": "node scripts/benchmark.mjs --check",
49
49
  "pack:check": "npm pack --dry-run --json",
50
50
  "verify": "npm test && npm run test:smoke && npm run bench:check && npm run pack:check",
51
- "prepublishOnly": "npm run verify"
51
+ "prepublishOnly": "npm run verify",
52
+ "release:pack": "node scripts/release-artifacts.mjs",
53
+ "test:release-network": "node scripts/release-network-replay.mjs"
52
54
  },
53
55
  "dependencies": {
54
- "sharp": "0.35.3",
55
- "smol-toml": "1.8.0"
56
+ "sharp": "0.35.5",
57
+ "smol-toml": "1.9.1"
56
58
  },
57
59
  "optionalDependencies": {
58
60
  "@azure/msal-node-runtime": "0.20.6"
@@ -398,7 +398,7 @@ function topicHelp(name, topic) {
398
398
  "suggestion": `The CCDX prediction panel has been retired. Run ${name} suggestion off to safely remove unchanged CCDX registrations. This cleanup does not change native predictions; see ${name} prediction --help for that separate opt-in feature.`,
399
399
  m365: `Usage:\n ${name} m365 [status|models|on|off|remove]\n ${name} m365 switch [github|m365] [--model ID] [--auto-review-model ID]\n\n- M365 is discovered silently at startup on supported managed environments.\n- Claude uses /anthropic on the same local port.\n- Codex stays on GitHub unless you explicitly switch.\n- M365 switching requires a running compatible adapter and available GPT/Auto-review choices; it never substitutes unavailable models.\n- Select an available model in Codex after switching an existing thread.\n- Off restores only owned Claude settings and selects GitHub.\n- Remove also clears the CCDX M365 profile, retaining a disabled preference and historical usage.\n- System Microsoft sign-in, GitHub credentials, predictions and images are preserved.`,
400
400
  prediction: `Usage:\n ${name} prediction [status|on|off|fix]\n\n- Optional native next-message predictions; off by default. macOS and Windows.\n- Windows requires the registered official MSIX App, an initialized profile, Windows PowerShell and .NET Framework 4.7.2+; Git/OpenSSL is not required for prediction setup.\n- Quit Codex before on/off, then restart ccdx.\n- On adds private App-profile certificate trust and an App-only route for chatgpt.com and ab.chatgpt.com.\n- HTTPS on those hosts is decrypted locally; only prediction configuration is changed.\n- No client program files, OS trust, account permissions, MCP or Hooks are changed.\n- Static HTTP/HTTPS/SOCKS5 proxies and bypass rules are preserved.\n- Windows supports company PAC/WPAD; macOS dynamic PAC/WPAD remains unsupported.\n- Static IPv4/IPv6 CIDRs match URL IP literals without DNS.\n- The bridge port persists across restarts/updates; a busy saved port disables only predictions.\n- Launch/reuse checks the App's actual route; an older random or missing route may require one full App quit.\n- Official prediction configuration is preserved; the conversation's model is used.\n- App updates require another compatibility check.\n- Status distinguishes saved preference and observed config traffic from unverified candidate visibility.\n- Fix asks a compatible running CCDX adapter to repair the enabled bridge once on its saved port.\n- It never enables predictions, renews certificates or force-restarts Codex.\n- Healthy unchanged bridges are retained.\n- Fix rechecks system proxy settings.\n- Changed routes may need a normal App relaunch to reload cached PAC; failed rechecks preserve the previous bridge with a nonzero exit.\n- Process environment variables and Node trust are not hot-reloaded; changed trust inputs need a CCDX service restart.\n- Startup, status and doctor share sanitized environment diagnostics.\n- Missing App routes require a normal full quit and ccdx launch; partial repair exits 1.\n- An older adapter must first be upgraded and restarted once to gain this repair endpoint.`,
401
- update: `Usage:\n ${name} update [npm|github] [--allow-remote]\n\n- Updates the global package from the configured npm registry or the latest stable GitHub release.\n- With no source, an interactive terminal prompts for one.\n- Windows uses system cmd.exe to run npm.cmd without changing PowerShell policy; use the .cmd entrypoint if scripts are blocked.\n- GitHub installs require Git on PATH and dependencies may still use the configured npm registry.\n- By default npm's remote-download policy is preserved.\n- If npm reports EALLOWREMOTE for a trusted mirror tarball, --allow-remote explicitly permits URL dependencies for this one installation's entire dependency tree; it is not a hostname allowlist.\n- No .npmrc, registry or persistent policy is changed, and failed installations are not retried automatically.\n- Use this only if company policy permits it.\n- Restart the running adapter after installation.`,
401
+ update: `Usage:\n ${name} update [npm|github] [--allow-remote]\n\n- Updates the global package from the configured npm registry or the latest stable GitHub release.\n- With no source, an interactive terminal prompts for one.\n- Windows uses system cmd.exe to run npm.cmd without changing PowerShell policy; use the .cmd entrypoint if scripts are blocked.\n- GitHub verifies a Release tarball; Git is not required. Dependencies use the configured npm registry.\n- By default npm's remote-download policy is preserved.\n- If npm reports EALLOWREMOTE for a trusted mirror tarball, --allow-remote explicitly permits URL dependencies for this one installation's entire dependency tree; it is not a hostname allowlist.\n- No .npmrc, registry or persistent policy is changed, and failed installations are not retried automatically.\n- Use this only if company policy permits it.\n- Restart the running adapter after installation.`,
402
402
  version: `Usage:\n ${name} --version`,
403
403
  };
404
404
  return sections[topic];
@@ -1,9 +1,9 @@
1
1
  (() => {
2
2
  const el = id => document.getElementById(id);
3
3
  const label = (node, key, values = {}) => globalThis.ccdxLanguage.set(node, key, values);
4
- const titles = { overview: "overview", codex: "Codex", claude: "Claude", models: "model_services", usage: "usage_and_diagnostics", system: "system_and_settings" };
4
+ const titles = { overview: "overview", codex: "Codex", claude: "Claude", models: "model_services", usage: "usage_and_diagnostics", requests: "request_records", system: "system_and_settings" };
5
5
  let current = "overview", settings = null, settingsPending = false, stopped = false, timer = null, ticks = 0;
6
- let sourceDirty = false, sourceGeneration = 0, modelsSource = null;
6
+ let sourceDirty = false, reviewDirty = false, sourceModels = [], modelsPreference = null, sourceGeneration = 0, modelsSource = null;
7
7
  let settingsReadAt = null;
8
8
  function navigate() {
9
9
  const route = location.hash.slice(1), next = Object.hasOwn(titles, route) ? route : "overview";
@@ -28,7 +28,24 @@
28
28
  const states = { immediate: "effective_now", terminal_unavailable: "terminal_animation_unavailable_in_this_output_mode", next_start: "next_ccdx_start", next_call: "applies_to_new_calls", needs_setup: "setup_required",
29
29
  next_config_request: "next_configuration_request_cached_suggestions_may_remain", needs_app_relaunch: "reopen_the_client_to_finish", needs_service_restart: "restart_ccdx_to_finish" };
30
30
  const selectedSource = () => providerEntries.find(source => source.id === el("source-provider").value);
31
- const sourceReady = () => Boolean(selectedSource()) && (!selectedSource().selection.models_required || Boolean(el("source-model").value && el("source-review").value));
31
+ const sourceReady = () => Boolean(selectedSource()) && (!selectedSource().selection.models_required || Boolean(modelsSource === selectedSource().id && el("source-model").value && el("source-review").value));
32
+ const reviewLocked = () => selectedSource()?.id === "github" && settings?.providers?.github?.preference?.source === "environment";
33
+ function syncReviewButton() {
34
+ const sameSource = selectedSource()?.id === settings?.providers?.codex_provider;
35
+ el("save-review").disabled = settingsPending || !sameSource || reviewLocked() || modelsSource !== selectedSource()?.id || !el("source-review").value;
36
+ el("source-review").disabled = settingsPending || reviewLocked() || !sourceModels.length;
37
+ el("source-review-effort").disabled = el("source-review").disabled;
38
+ if (reviewLocked()) label(el("review-control-note"), "review_environment_override");
39
+ else if (!sameSource) label(el("review-control-note"), "review_save_source_first");
40
+ }
41
+ function syncEfforts(chosen) {
42
+ const model = sourceModels.find(model => model.id === el("source-review").value);
43
+ const efforts = model?.auto_review_efforts || model?.reasoning_efforts || [];
44
+ const follow = document.createElement("option");follow.value = "";label(follow, "follow_client");
45
+ el("source-review-effort").replaceChildren(follow, ...efforts.map(effort => { const option = document.createElement("option");option.value = effort;option.textContent = effort;return option; }));
46
+ el("source-review-effort").value = efforts.includes(chosen) ? chosen : "";
47
+ syncReviewButton();
48
+ }
32
49
  function syncSources() {
33
50
  const selector = el("source-provider"), selected = sourceDirty ? selector.value : settings?.providers?.codex_provider || selector.value;
34
51
  const entries = providerEntries.filter(source => source.selection?.codex);
@@ -40,8 +57,9 @@
40
57
  }
41
58
  if (entries.some(source => source.id === selected)) selector.value = selected;
42
59
  el("apply-source").disabled = settingsPending || !sourceReady();
60
+ syncReviewButton();
43
61
  }
44
- window.addEventListener("ccdx:providers", () => { syncSources();void loadSourceModels(); });
62
+ window.addEventListener("ccdx:providers", () => { syncSources();if (current === "codex") void loadSourceModels(); });
45
63
  function applySettings(data) {
46
64
  settings = data;
47
65
  for (const key of ["terminal_animation_enabled", "open_webui", "image_enabled", "prediction_enabled"]) {
@@ -57,21 +75,19 @@
57
75
  label(el("effect-history"), data.history.source === "environment" ? "controlled_by_environment" : "applies_to_new_calls");
58
76
  label(el("settings-note"), "settings_read_from_the_running_service");
59
77
  el("page-settings-note").textContent = "";
60
- const state = data.providers, previousSource = el("source-provider").value;
78
+ const state = data.providers;
61
79
  syncSources();
62
- if (state && !sourceDirty && (previousSource !== state.codex_provider || selectedSource()?.selection.models_required && !el("source-model").value)) {
63
- void loadSourceModels();
64
- }
65
- el("source-control-note").replaceChildren();
80
+ if (current === "codex" && state && (modelsSource !== el("source-provider").value || !sourceDirty && !reviewDirty && modelsPreference !== JSON.stringify(state[el("source-provider").value]?.preference))) void loadSourceModels();
81
+ el("m365-control-note").replaceChildren();
66
82
  if (state) {
67
83
  const source = document.createElement("span"), m365 = document.createElement("span");
68
84
  label(source, "codex_source_source", { source: providerEntries.find(entry => entry.id === state.codex_provider)?.name || state.codex_provider });
69
85
  const status = { ready: "ready", checking: "checking", disabled: "disabled", unsupported: "unsupported", idle: "unknown", unavailable: "unavailable" }[state.m365?.state] || "unknown";
70
86
  label(m365, "microsoft_365_state", { state: { key: status } });
71
- el("source-control-note").append(source, document.createElement("br"), m365);
87
+ el("source-control-note").replaceChildren(source);el("m365-control-note").append(m365);
72
88
  if (state.m365?.reason) {
73
89
  const detail = document.createElement("details"), summary = document.createElement("summary"), code = document.createElement("code");
74
- label(summary, "message");code.textContent = state.m365.reason;detail.append(summary, code);el("source-control-note").append(detail);
90
+ label(summary, "message");code.textContent = state.m365.reason;detail.append(summary, code);el("m365-control-note").append(detail);
75
91
  }
76
92
  }
77
93
  el("process-notice").textContent = data.terminal?.last_notice || "";
@@ -86,28 +102,32 @@
86
102
  el(id).title = error.message;
87
103
  }
88
104
  }
89
- finally { settingsPending = false;el("apply-source").disabled = !sourceReady(); }
105
+ finally { settingsPending = false;el("apply-source").disabled = !sourceReady();syncReviewButton(); }
90
106
  }
91
107
  async function change(body, button) {
92
108
  if (settingsPending) return;
93
109
  settingsPending = true;
94
- const controls = [...document.querySelectorAll("[role=switch], #save-history, #clean-history, #fix-prediction, #apply-source, #m365-on, #m365-off")];
110
+ const controls = [...document.querySelectorAll("[role=switch], #save-history, #clean-history, #fix-prediction, #apply-source, #save-review, #source-provider, #source-model, #source-review, #source-review-effort, #m365-on, #m365-off")];
95
111
  controls.forEach(input => { input.disabled = true; });
96
112
  label(el("settings-note"), "applying");
97
113
  if (button) button.setAttribute("aria-busy", "true");
98
114
  try {
99
- const data = await api(body);if (body.action === "provider" && body.operation === "switch") sourceDirty = false;
115
+ const data = await api(body);
116
+ if (body.action === "provider" && body.operation === "switch") sourceDirty = false;
117
+ if (body.action === "provider" && body.operation === "auto-review") reviewDirty = false;
118
+ if (body.action === "provider" && body.operation === "off") { sourceDirty = false;reviewDirty = false; }
119
+ el("review-control-note").textContent = "";
100
120
  applySettings(data);await dashboardRefresh.refresh("status", { force: true });await dashboardRefresh.refresh("auth", { force: true });
101
121
  }
102
122
  catch (error) {
103
123
  if (settings) applySettings(settings);
104
- el("settings-note").textContent = error.message;el("source-control-note").textContent = error.message;el("effect-history").textContent = error.message;
124
+ el("settings-note").textContent = error.message;el("source-control-note").textContent = error.message;el("m365-control-note").textContent = error.message;el("review-control-note").textContent = error.message;el("effect-history").textContent = error.message;
105
125
  if (body.key) el(`effect-${body.key}`).textContent = error.message;
106
126
  } finally {
107
127
  settingsPending = false;controls.forEach(input => { input.disabled = false; });
108
128
  if (settings) for (const [key, value] of Object.entries(settings.effective)) if (value.locked) el(`setting-${key}`).disabled = true;
109
129
  if (settings?.history.source === "environment") el("save-history").disabled = true;
110
- el("apply-source").disabled = !selectedSource() || selectedSource()?.selection.models_required && (!el("source-model").value || !el("source-review").value);
130
+ el("apply-source").disabled = !sourceReady();el("source-model").disabled = !selectedSource()?.selection.models_required;syncReviewButton();
111
131
  button?.removeAttribute("aria-busy");
112
132
  }
113
133
  }
@@ -119,36 +139,58 @@
119
139
  if (window.confirm(globalThis.ccdxLanguage.format("clear_inactive_codex_conversation_data_older_continuation_ids_ma"))) void change({ action: "history_clean" }, el("clean-history"));
120
140
  });
121
141
  el("fix-prediction").addEventListener("click", () => void change({ action: "prediction_fix" }, el("fix-prediction")));
122
- for (const operation of ["on", "off"]) el(`m365-${operation}`).addEventListener("click", () => void change({ action: "provider", operation }, el(`m365-${operation}`)));
142
+ for (const operation of ["on", "off"]) el(`m365-${operation}`).addEventListener("click", () => {
143
+ if (operation === "off" && !window.confirm(globalThis.ccdxLanguage.format("confirm_disable_m365"))) return;
144
+ void change({ action: "provider", operation }, el(`m365-${operation}`));
145
+ });
123
146
  async function loadSourceModels() {
124
147
  const generation = ++sourceGeneration;
125
148
  const source = selectedSource(), needsModels = source?.selection.models_required;
126
- el("source-model").disabled = el("source-review").disabled = !needsModels;
127
- if (!needsModels) { el("apply-source").disabled = settingsPending || !source;return; }
128
- const unsaved = sourceDirty && modelsSource === source.id ? { model: el("source-model").value, auto_review_model: el("source-review").value } : null;
129
- el("apply-source").disabled = true;
130
- el("source-model").replaceChildren();el("source-review").replaceChildren();
149
+ el("source-model-field").hidden = !needsModels;el("source-model-note").hidden = Boolean(needsModels);
150
+ el("source-model").disabled = !needsModels;
151
+ if (!source) { sourceModels = [];syncReviewButton();return; }
152
+ const unsaved = (sourceDirty || reviewDirty) && modelsSource === source.id ? {
153
+ model: el("source-model").value, auto_review_model: el("source-review").value, auto_review_effort: el("source-review-effort").value } : null;
154
+ el("save-review").disabled = true;el("source-review").disabled = true;el("source-review-effort").disabled = true;
155
+ el("apply-source").disabled = settingsPending || Boolean(needsModels);
156
+ label(el("review-control-note"), "model_choices_loading");
131
157
  try {
132
158
  const response = await fetch(`/_ccdx/ui/models/live?provider=${encodeURIComponent(source.id)}`, { headers: { "X-CCDX-Dashboard": "1" }, cache: "no-store", signal: AbortSignal.timeout(15000) });
133
- const data = await response.json();if (!response.ok) throw new Error(data.error);
159
+ const data = await response.json();if (!response.ok || !Array.isArray(data.models)) throw new Error(data.error || "Invalid model list");
134
160
  if (generation !== sourceGeneration) return;
135
161
  const models = data.models.filter(model => model.selectable && model.clients.includes("codex"));
136
- for (const [id, list] of [["source-model", models], ["source-review", models.filter(model => model.reasoning_efforts?.includes("low"))]]) {
137
- el(id).replaceChildren(...list.map(model => { const option = document.createElement("option");option.value = model.id;option.textContent = model.id;return option; }));
138
- const saved = settings?.providers?.[source.id]?.preference?.[id === "source-model" ? "model" : "auto_review_model"];
139
- const chosen = unsaved?.[id === "source-model" ? "model" : "auto_review_model"] || (!sourceDirty ? saved : null);
140
- if (chosen && list.some(model => model.id === chosen)) el(id).value = chosen;
162
+ sourceModels = models;
163
+ const preference = settings?.providers?.[source.id]?.preference;
164
+ for (const [id, key] of [["source-model", "model"], ["source-review", "auto_review_model"]]) {
165
+ el(id).replaceChildren(...models.map(model => { const option = document.createElement("option");option.value = model.id;option.textContent = model.id;return option; }));
166
+ const saved = key === "auto_review_model" && source.id === "github" ? preference?.model : preference?.[key];
167
+ const chosen = unsaved?.[key] || saved;
168
+ if (chosen && models.some(model => model.id === chosen)) el(id).value = chosen;
169
+ }
170
+ modelsSource = source.id;modelsPreference = JSON.stringify(preference);
171
+ const savedEffort = source.id === "github" ? preference?.reasoningEffort : preference?.auto_review_effort === undefined ? "low" : preference.auto_review_effort;
172
+ el("review-control-note").textContent = "";
173
+ syncEfforts(unsaved ? unsaved.auto_review_effort : savedEffort);
174
+ el("apply-source").disabled = settingsPending || !sourceReady();
175
+ } catch (error) {
176
+ if (generation === sourceGeneration) {
177
+ modelsSource = null;sourceModels = [];el("source-review").replaceChildren();el("source-review-effort").replaceChildren();
178
+ el("review-control-note").textContent = error.message;el("apply-source").disabled = settingsPending || !sourceReady();
141
179
  }
142
- modelsSource = source.id;
143
- el("apply-source").disabled = !el("source-model").value || !el("source-review").value;
144
- } catch (error) { if (generation === sourceGeneration) el("source-control-note").textContent = error.message; }
180
+ }
145
181
  }
146
- el("source-provider").addEventListener("change", () => { sourceDirty = true;void loadSourceModels(); });
147
- for (const id of ["source-model", "source-review"]) el(id).addEventListener("change", () => { sourceDirty = true; });
182
+ el("source-provider").addEventListener("change", () => { sourceDirty = true;reviewDirty = false;void loadSourceModels(); });
183
+ el("source-model").addEventListener("change", () => { sourceDirty = true; });
184
+ el("source-review").addEventListener("change", () => { reviewDirty = true;syncEfforts("low"); });
185
+ el("source-review-effort").addEventListener("change", () => { reviewDirty = true; });
148
186
  el("apply-source").addEventListener("click", () => {
149
187
  const provider = el("source-provider").value;
150
- void change({ action: "provider", operation: "switch", provider, ...(selectedSource()?.selection.models_required ? { model: el("source-model").value, auto_review_model: el("source-review").value } : {}) }, el("apply-source"));
188
+ void change({ action: "provider", operation: "switch", provider, ...(selectedSource()?.selection.models_required ? {
189
+ model: el("source-model").value, ...(settings?.providers?.codex_provider === provider ? {} : {
190
+ auto_review_model: el("source-review").value, auto_review_effort: el("source-review-effort").value || null }) } : {}) }, el("apply-source"));
151
191
  });
192
+ el("save-review").addEventListener("click", () => void change({ action: "provider", operation: "auto-review", provider: el("source-provider").value,
193
+ model: el("source-review").value, auto_review_effort: el("source-review-effort").value || null }, el("save-review")));
152
194
  // Only the small in-memory status snapshot is read at this cadence. Catalogs
153
195
  // and retained usage keep their existing on-demand, bounded refresh policy.
154
196
  function schedule() {