codex-copilot-dx 1.2.24 → 1.2.26

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
@@ -11,7 +11,7 @@ npm install -g codex-copilot-dx@latest
11
11
  ccdx
12
12
  ```
13
13
 
14
- No Node or Git? Download [install.sh](https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.24/install.sh) (macOS/Linux) or [install.ps1](https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.24/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).
14
+ No Node or Git? Download [install.sh](https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.26/install.sh) (macOS/Linux) or [install.ps1](https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.26/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).
15
15
 
16
16
  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.
17
17
 
@@ -54,14 +54,13 @@ Requests shows live app/source/model flow above existing summaries and finished
54
54
 
55
55
  Run `ccdx web` without GitHub sign-in. In **Model sources → Add API**, enter the HTTPS address/key, read the catalog, select models and declare their real interfaces. Then open **Codex** or **Claude**, choose visible models across sources, set a default and save. Claude App/Code use Messages; Codex uses Responses, all on port 2026. GitHub-only Codex selections retain native OpenAI mode and readable model names. Token counting is separate from message generation. For manual APIs, an observed count-endpoint 404 is remembered for one minute per model/API-header scope; CCDX returns a clear 404 without inventing a token count. Unknown count capabilities share their first admitted request; a 404 prevents distinct waiting inputs from fanning out. A supported endpoint still counts each distinct input separately. Identical small count requests share bounded work. A request stays on its selected deployment; there is no automatic cross-source retry or model replacement. Reopen clients after configuration changes and start a new conversation after source/key changes. Stop management before normal `ccdx` startup for the live terminal.
56
56
 
57
- Keys use system credential protection or an explicit environment reference; clients receive separate local credentials. Saving reads model metadata automatically, without inference. Startup and the existing model refresh cycle also refresh enabled APIs when the 30-minute cache expires; failed reads retain saved configuration. Closed sources can be restored on Model sources; closed apps remain reachable for restoration on their app pages. Pinned streams finish on their original source. The version-two graph preserves old single-source visibility and saves a byte-for-byte v1 backup before migration. User and managed client settings remain protected.
57
+ Keys use system credential protection or an explicit environment reference; clients receive separate local credentials. Saving reads model metadata automatically, without inference. Startup and the existing model refresh cycle also refresh enabled APIs when the 30-minute cache expires; failed reads retain saved configuration. Selecting no models pauses access; enable a source and select models to resume. Closed sources can be restored on Model sources; closed apps remain reachable for restoration on their app pages. Pinned streams finish on their original source. The version-two graph preserves old single-source visibility and saves a byte-for-byte v1 backup before migration. User and managed client settings remain protected.
58
58
 
59
- Model lists/details preserve the upstream maker declaration separately from your API source name. Missing maker metadata shows Not provided; model names are never used to guess a maker. Maker evidence is rebuildable display cache and does not change the strict connection schema or routing identity. Model details show upstream capabilities per API, with optional manual overrides collapsed below. Context, input/output limits, reasoning levels, thinking modes, input types, tools and native search are deployment-specific. Structured Anthropic declarations are mapped to Messages; they do not grant the same capabilities to a gateway's other interfaces. Missing and unrecognized metadata are distinguished, without guessing from model names. Manual overrides, including false, take priority. Claude synchronization projects compatible routes, supported host controls and per-model budgets. Unknown or out-of-range windows and unverified client versions are reported as limited; they are not promoted to 1M. Output requests are bounded by declared limits. Compatibility routes do not prove that every model supports every App tool, search or reasoning mode. See the [capability and synchronization limits](docs/REFERENCE.md#model-capabilities-and-claude-synchronization). [1.2.24 changes and verification](https://github.com/DaleXiao/codex-copilot-dx/blob/main/docs/RELEASE_1.2.24.md) cover upstream maker metadata, first-wave token-count compatibility, memory-model dependency notices and dashed flow activity while retaining native GitHub sign-in/model protections.
59
+ Model lists/details preserve the upstream maker declaration separately from your API source name. Missing maker metadata shows Not provided; model names are never used to guess a maker. Maker evidence is rebuildable display cache and does not change the strict connection schema or routing identity. Model details show upstream capabilities per API, with optional manual overrides collapsed below. Context, input/output limits, reasoning levels, thinking modes, input types, tools and native search are deployment-specific. Structured Anthropic declarations are mapped to Messages; they do not grant the same capabilities to a gateway's other interfaces. Missing and unrecognized metadata are distinguished, without guessing from model names. Manual overrides, including false, take priority. Claude synchronization projects compatible routes, supported host controls and per-model budgets. Unknown or out-of-range windows and unverified client versions are reported as limited; they are not promoted to 1M. Output requests are bounded by declared limits. Compatibility routes do not prove that every model supports every App tool, search or reasoning mode. See the [capability and synchronization limits](docs/REFERENCE.md#model-capabilities-and-claude-synchronization). [1.2.26 changes and verification](https://github.com/DaleXiao/codex-copilot-dx/blob/main/docs/RELEASE_1.2.26.md) cover the M365 service origin, automatic settings saving, bounded restore backups and lighter dashboard status while retaining native GitHub sign-in/model protections.
60
60
 
61
61
  ## Microsoft 365 access
62
62
 
63
- Eligible macOS/Windows machines attempt silent Microsoft authorization at startup, without Copilot CLI or a browser login. MDM alone is insufficient: account, tenant,
64
- device policy and Loki entitlement must permit access. Optional failure does not block GitHub. Saved bindings stay selected; unresolved company accounts can be chosen under **Model sources → Microsoft 365** or `ccdx m365 account` in the updated running service. Listing is local; changing accounts validates only the selected account, affects M365 in Codex/Claude and requires new conversations. See the reference for identity and history limits.
63
+ Eligible macOS/Windows machines attempt silent Microsoft authorization at startup, without Copilot CLI or a browser login. MDM alone is insufficient: account, tenant, device policy and Loki entitlement must permit access. Optional failure does not block GitHub. Saved bindings stay selected; unresolved company accounts can be chosen under **Model sources → Microsoft 365** or `ccdx m365 account` in the updated running service. Listing is local; changing accounts validates only the selected account, affects M365 in Codex/Claude and requires new conversations. See the reference for identity and history limits. Microsoft 365 uses the fixed `loki.delve.office.com` service origin. Account/origin-bound model discovery is separate from inference; old environment caches are not advertised as current. This does not enable a paused source or change existing application routing.
65
64
 
66
65
  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.
67
66
  Existing custom/managed settings are preserved; already-running clients may need a normal restart.
@@ -111,6 +110,7 @@ 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
  Open `ccdx web` for source-specific account tools and Checks & repairs without signing in first. It starts a management-only service when needed; stop it before normal app startup. Safe reauth, config preview/backup, local reports, feature pause/resume and matching circle SVG status icons are described in the [account tools reference](docs/REFERENCE.md#account-and-repair-tools). Existing themes, layout and bilingual support are preserved. Startup checks GitHub's latest-release web redirect, not npm or the anonymous REST quota, and suggests `ccdx update github`. Settings → Version & updates shows the running version, release dates and newer releases, with copyable update and macOS/Windows recovery commands. This separate, cached GitHub metadata check never installs; failed checks remain unknown. The separate **Update overnight** switch defaults off and requires a normal CCDX restart after enabling. Its foreground supervisor checks during 00:00–04:00 local time after ten observed idle minutes, selects same-series stable patches at least 24 hours old, stages verified packages and attempts rollback on failure. Ctrl+C stops it; no OS service is installed. Review the displayed risk and [handoff limits](docs/REFERENCE.md#nightly-updates-opt-in) before enabling. See the [reference](docs/REFERENCE.md#version-and-update-information).
113
+ Settings → **Save & restore**, immediately after Version & updates, defaults to automatic saving of this page’s preferences. Turn it off to save or discard drafts manually. Restore defaults backs up the saved preferences first and offers Restore backup; it preserves accounts, keys, model/source selections, native sign-in, client connections, image/prediction access, chats and usage. Browser appearance stays browser-local; failed or conflicting saves retain the draft and show the actual result. See the [scope and recovery rules](docs/REFERENCE.md#settings-saving-and-restore).
114
114
  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.
115
115
  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. Manual updates require a separate adapter restart. Full `ccdx doctor` reports this target and readonly credential permissions; it never changes ACLs.
116
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).
@@ -24,6 +24,15 @@ which owns grants, switches, versioned model-deployment bindings and lifecycle.
24
24
  validates strict versioned metadata and locked atomic writes; stale cross-process
25
25
  saves are rejected. Accepted inputs and public snapshots do not share mutable
26
26
  objects with the live graph. The built-in registry does not load external code.
27
+ One Codex access-mode calculation distinguishes disabled, paused (no selections),
28
+ native GitHub and gateway bindings. Sync and request authorization share that
29
+ calculation; paused access is rejected before credential checks without expanding
30
+ model visibility or changing sign-in.
31
+
32
+ Manual API setup uses abort-aware shared waits for credentials and transport.
33
+ A cancelled caller releases its wait independently; a late shared result cannot
34
+ resume its request. Messages keeps body upload, preparation and upstream budgets
35
+ separate using the existing request-abort boundary.
27
36
 
28
37
  `model-capabilities.mjs` owns neutral limits, reasoning/tool/input/search fields,
29
38
  strict manual values, per-field evidence and deployment revisions. It reads no
@@ -175,6 +184,8 @@ absence and policy refusal do not disable GitHub.
175
184
 
176
185
  `network-route.mjs` canonicalizes abbreviated IPv4 CIDRs only while adapting system `ExceptionsList` input, before merging it with the unchanged strict `NO_PROXY` input. `network-bypass.mjs` remains the shared strict Node/PAC matcher; it performs no DNS lookup. This fixes no-proxy and static-proxy macOS configurations without dropping exception rules or weakening unsupported dynamic-PAC protection.
177
186
 
187
+ `providers/m365-endpoint.mjs` declares the fixed production origin and path shared by Node transport and the Windows parent whitelist. A regression checks the C# worker’s matching fixed-host policy. Catalog publication and history namespaces include the service origin and company account; legacy/different-origin caches stay on disk but do not publish as the new catalog. No cross-environment retry or implicit source switch is introduced.
188
+
178
189
  `providers/m365-network-diagnostic.mjs` is a small pure projection of fixed proxy failure codes, source and stage, shared by transport, provider state, protected dashboard routes and CLI. Raw error chains/settings never cross that boundary. M365 retains existing outer error categories; the source runtime forwards the bounded diagnostic, and existing bilingual renderers expose a readable explanation with technical details. Startup uses the same fixed English explanation. Refresh failures retain last-good catalogs and never change the selected provider; successful transport creation clears the setup diagnostic. No new service, storage, dependency, route fallback or provider retry is introduced.
179
190
 
180
191
  `claude-client-lifecycle.mjs` owns configuration reconciliation and restore state, independently from source auth/catalog code. It checks lifecycle/profile validity after asynchronous policy inspection and preserves the existing field-ownership writer.
@@ -408,11 +419,28 @@ prevents stale apply across tabs. `status.js` renders source-neutral authorizati
408
419
  and client evidence; `usage.js` renders usage and date selection. View state remains
409
420
  page-local; only existing preferences and the viewed model Provider are saved in
410
421
  the browser. Expanded sections read on demand. The directory and Codex selectors share the same catalog resource, freshness and single-flight read. Changing sources cancels an obsolete waiter; generation checks reject late results. Account changes clear old-source drafts and snapshots; ordinary refreshes retain pending choices. There is no Node data watcher.
411
- The sidebar controller reads small process-local status snapshots every two seconds
422
+ The sidebar controller reads view-scoped process-local status snapshots every two seconds
412
423
  while visible/automatic, and source/settings evidence every eight status ticks.
413
424
  Catalog and retained-log reads retain their slower, view-scoped policy. Animation
414
425
  frames still load once per page when opened.
415
426
 
427
+ `settings-preferences.mjs` owns the explicit settings-page allowlist, normalized
428
+ defaults, revision checks and the single private pre-reset snapshot. Reset uses the
429
+ existing file-pair transaction with the backup written first; unrelated config
430
+ keys stay in the original file and never enter the backup. `service-control.mjs`
431
+ keeps its existing serialized action boundary and applies terminal/update effects
432
+ after the saved preferences commit. It never routes this operation through client
433
+ setup, account recovery or connection migration.
434
+
435
+ `dashboard/preferences.js` owns page-local drafts, coalesced writes, manual saving,
436
+ revision conflicts and browser-local appearance backup. The existing theme and
437
+ animation views expose small explicit preview/selection hooks. Settings writes
438
+ invalidate only animation/settings evidence, without model or account refresh.
439
+ Summary and complete status have separate refresh resources. `status-summary.mjs`
440
+ projects the optional lightweight response; full status stays the default public
441
+ contract. Hidden status regions defer DOM updates, and summary rendering never
442
+ replaces the full request/history cache.
443
+
416
444
  `dashboard/usage.js` owns bar/curve geometry and viewport-gated, one-shot Web Animations. The two views share retained analytics and accessible day buttons; their paths never connect unavailable history or overshoot adjacent values. View-only changes leave the calendar nodes intact. The UI lifecycle cancels motion on hidden/suspended views and reduced-motion changes; no animation timer or chart dependency is added. `usage-store.mjs` shares cache-evidence validation between retained summaries and process-local totals; runtime snapshots expose the weighted cache ratio plus a partial-evidence flag, without new persistence or log scans. The Overview renderer formats that snapshot and preserves unknown/invalid values.
417
445
 
418
446
  `dashboard-updates.mjs` is loaded only by the protected update-information route. It projects bounded public stable-release metadata and publication dates, with process-local single-flight, five-minute success and one-minute failure caches. Its asynchronous npm network-configuration read reuses the installer's existing policy-preserving downloader; it adds no runtime dependency, credentials or synchronous child process on the service event loop. Metadata has a four-second per-request deadline and 128 KiB decoded-body bound. It never installs or restarts anything and does not alter startup's independent web-redirect lookup. `dashboard/updates.js` renders current/available/unknown states and validated, pinned installation command text; `refresh.js` owns its visible Settings refresh cadence. Failed checks preserve explicitly labeled prior metadata. No provider authentication or inference is involved.
@@ -533,6 +561,8 @@ Byte-weighted request admission is not a simultaneous-stream limit. The 1.2.0 lo
533
561
  and no-Node bootstraps. It bounds downloads/decompression, verifies the exact
534
562
  release package and checksum, backs up only this package/commands under an
535
563
  exclusive lock, restores on failure and validates the version/sharp/broker.
564
+ The lock records its PID, timestamp and backup path; existing/legacy locks remain
565
+ explicit recovery barriers, while unrelated I/O failures keep their own cause.
536
566
  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 network installation runs on ordinary startup or inference paths. Opted-in supervisor startup copies/verifies its current immutable runtime; its separate night scheduler is described below. `package-update.mjs` keeps
537
567
  source choice, named npm-policy probes and fixed platform launch arguments;
538
568
  verified filenames enter cmd.exe, while paths enter cwd. Private-runtime commands
package/docs/REFERENCE.md CHANGED
@@ -92,6 +92,15 @@ starts. Its value is never returned by management or copied into client config.
92
92
  Private helpers omit unrelated credentials and Node hooks. API error bodies are
93
93
  replaced with stable codes; valid Retry-After metadata is retained.
94
94
 
95
+ An explicit empty Codex deployment array pauses CCDX access, including after a
96
+ restart or disabling the last selected source. Models, Responses and compact
97
+ requests return `503 ccdx_client_source_disabled` before checking a client key;
98
+ no upstream call, automatic model selection or login repair is attempted. Enable
99
+ the app/source and select at least one model to resume. GitHub-only selections
100
+ retain native OpenAI mode; nonempty mixed/API deployments retain private-key
101
+ authentication. With automatic sync enabled, pausing restores only owned Codex
102
+ configuration; manual sync leaves native files unchanged. Neither changes login.
103
+
95
104
  `client-gateway-keys.json` holds local credentials separately. Disabled sources leave normal source lists. **Model sources** owns **Disabled sources**; application access cards own **Disabled clients**. App navigation remains available while access is closed, so its restoration control stays reachable. Each
96
105
  collapsed list appears only when it has entries and provides **Enable again**.
97
106
  Closing a client stops CCDX access, not the app. Disabling an in-use source
@@ -324,10 +333,10 @@ restore existing client settings; use `m365 off` for that explicit operation.
324
333
  Entra tokens are retained in memory until renewal/close, never saved in a CCDX
325
334
  credential file. Renewal is silent and single-flight, with a 28-second helper
326
335
  deadline and one-minute failure backoff. The provider uses only
327
- `https://df.loki.delve.office.com/api/v1/llmapi`; discovery uses `/models` and
336
+ `https://loki.delve.office.com/api/v1/llmapi`; discovery uses `/models` and
328
337
  inference uses its advertised native Responses or Messages endpoints. This is a
329
- dogfood service, not a promised public SLA. No request is redirected to another
330
- origin. Explicit proxy/trust settings are preserved. Windows delegates system
338
+ private service, not a promised public SLA. Its fixed origin is shared by the Node and Windows target policies; authentication resources and company network policy are unchanged. No request is redirected to another
339
+ origin. Model caches and replay namespaces are bound to this service origin and account. A legacy cache with no origin, or one from the prior dogfood origin, is preserved on disk but is not published as this environment’s catalog; a successful discovery replaces it. Disabled sources and saved client/model selections are not automatically changed. Explicit proxy/trust settings are preserved. Windows delegates system
331
340
  PAC/WPAD and integrated authentication to its own isolated WinHTTP worker;
332
341
  unsupported macOS dynamic PAC is reported rather than bypassed.
333
342
 
@@ -1264,8 +1273,13 @@ Before npm changes a discovered global target, CCDX backs up only its package
1264
1273
  and two command entries and acquires an exclusive install lock. A linked target
1265
1274
  is preserved and refused. Installer or runtime-verification failure restores the
1266
1275
  old package/commands; successful installation removes the backup. A failed restore
1267
- reports the retained backup and lock for manual recovery. A lock left by a killed
1268
- installer requires checking that no installation is running before removing it.
1276
+ reports the retained backup and lock for manual recovery. New lock records include
1277
+ the installer PID, creation time and backup directory. Existing-lock errors name
1278
+ the exact file; other lock-creation failures retain their actual I/O error rather
1279
+ than claiming another install. Old empty locks remain owner-unknown. A lock left
1280
+ by a killed installer requires checking that no installation is running and
1281
+ inspecting its retained backup before recovery. Locks are not removed merely
1282
+ because they are old; an incomplete restore must be completed first.
1269
1283
  There is no promise of crash/power-loss atomicity. Other apps, credentials,
1270
1284
  settings, caches and the running service are not replaced. Readonly/busy Windows
1271
1285
  files can prevent installation; finish use of that installation and retry.
@@ -1302,7 +1316,7 @@ Unknown support prevents an explicitly requested exception from starting.
1302
1316
  For an older updater that still requires Git, install the Release tarball directly:
1303
1317
 
1304
1318
  ```sh
1305
- npm install -g https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.24/codex-copilot-dx-1.2.24.tgz
1319
+ npm install -g https://github.com/DaleXiao/codex-copilot-dx/releases/download/v1.2.26/codex-copilot-dx-1.2.26.tgz
1306
1320
  # Windows PowerShell: use npm.cmd instead of npm.
1307
1321
  ```
1308
1322
 
@@ -1492,6 +1506,54 @@ reads. Catalog requests are deduplicated, stale tab reads are cancelled and late
1492
1506
  results rejected. Failed reads preserve last-good data and label it as stale.
1493
1507
  Service-setting errors are visible on the current page and can be retried manually.
1494
1508
 
1509
+ ### Settings saving and restore
1510
+
1511
+ Settings → **Save & restore**, after Version & updates, controls only this page’s
1512
+ preferences. **Save changes automatically** defaults on. Terminal palette,
1513
+ animation, animation enablement, opening the webpage at startup and overnight-update
1514
+ preferences save after a short coalescing delay. Webpage appearance stays in the
1515
+ current browser. Turning automatic saving off reveals Save changes and Discard
1516
+ changes; enabling it with a draft asks before saving that draft. Invalid or failed
1517
+ saves keep the draft. Polls do not overwrite drafts, old responses do not replace
1518
+ newer edits, and a conflicting settings revision requires reviewing the current
1519
+ settings. Ordinary appearance saves do not enumerate accounts, authenticate or
1520
+ refresh provider catalogs. Overnight updates remain off by default and enabling
1521
+ them confirms the existing restart risk; saving the preference never installs an update.
1522
+
1523
+ Restore defaults confirms the scope, backs up the saved preferences first, then
1524
+ writes the settings-page fields in one locked atomic transaction. Defaults are:
1525
+ green webpage and terminal palettes, dark webpage appearance, Comet animation,
1526
+ terminal animation on, open webpage on startup, overnight updates off and automatic
1527
+ saving on. Language, model/source selections, API keys, native sign-in and client
1528
+ configuration, review/memory choices, image/prediction access, history, usage and
1529
+ network/environment policy are preserved. Environment-controlled effective values
1530
+ remain controlled. Pending drafts are explicitly discarded only after confirmation.
1531
+
1532
+ The private `settings-preferences-backup.json` beside the settings file contains
1533
+ only the six allowlisted service preferences, version, ID and creation time; it
1534
+ contains no credentials or provider settings. Restore backup uses the latest
1535
+ pre-reset snapshot. Backup failure aborts reset; a failed settings write restores
1536
+ the prior settings and prior backup. A repeated reset with its same operation ID
1537
+ cannot overwrite the original snapshot after a lost response. Unreadable settings
1538
+ or backups are preserved and reported.
1539
+
1540
+ Browser appearance has its own origin-local backup linked to the operation ID.
1541
+ At most two entries are held while a reset result is uncertain, reducing to the
1542
+ matching latest backup after a confirmed settings read. Service and browser storage
1543
+ are not one atomic transaction: a browser-storage failure after the service save is
1544
+ reported as partial completion and can be retried. Another browser without the
1545
+ matching appearance backup reports that limitation rather than claiming a complete
1546
+ restore. No periodic backup service, credential export or full configuration reset
1547
+ is added.
1548
+
1549
+ The full `/_ccdx/status` response remains the default CLI/diagnostic contract.
1550
+ Overview and Settings use an explicit `?scope=summary` projection containing service
1551
+ identity, uptime, model activity and current-run usage. The browser keeps summary
1552
+ and full reads in separate resource entries; summary data cannot replace request
1553
+ history or turn missing full fields into zero values. Other pages request full
1554
+ status when opened. Hidden data regions skip DOM work, retaining their last data
1555
+ until a visible full read; native inference and the selected model are unaffected.
1556
+
1495
1557
  The usage selector retains current and historical sources. Combined model rows
1496
1558
  and daily analytics preserve source identity; old records without a client label
1497
1559
  are not guessed into one. Legacy untagged Provider records retain their historical
@@ -1749,7 +1811,7 @@ unset the variable after the investigation. Records disappear on service exit.
1749
1811
  | `CCDX_REQUEST_BODY_TIMEOUT_MS` | `120000` | Maximum time to receive and decode a request body before returning `408` |
1750
1812
  | `CCDX_MAX_UPSTREAM_BODY_BYTES` | `31457280` | Strict maximum forwarded Responses body size; larger payloads are adapted locally or rejected with `413` |
1751
1813
  | `CCDX_MAX_SSE_BUFFER_BYTES` | `8388608` | Maximum buffered bytes for one unterminated upstream SSE line or event |
1752
- | `CCDX_UPSTREAM_TIMEOUT_MS` | `120000` | Per-phase timeout for Responses preparation and non-streaming upstream requests |
1814
+ | `CCDX_UPSTREAM_TIMEOUT_MS` | `120000` | Per-phase timeout for Responses/Messages preparation and non-streaming upstream requests |
1753
1815
  | `CCDX_STREAM_HANDSHAKE_TIMEOUT_MS` | `120000` | Timeout while waiting for upstream streaming response headers |
1754
1816
  | `CCDX_STREAM_IDLE_TIMEOUT_MS` | `120000` | Maximum idle time between upstream streaming body chunks |
1755
1817
  | `CCDX_UPSTREAM_RETRIES` | `2` | Retries for safe requests and clearly pre-connect POST failures; capped at `5` |
@@ -1829,6 +1891,16 @@ Native Responses forwards Codex `agent_message` items unchanged. When a model re
1829
1891
 
1830
1892
  After the stream handshake succeeds, stream liveness uses the idle timeout rather than the expired handshake deadline. Eligible HTTP-200 failure recovery acquires a bounded preparation budget and history admission before rebuilding its payload, then releases those reservations when the retry opens upstream or fails. Normal streams still release preparation admission after their response headers arrive.
1831
1893
 
1894
+ Messages and token counting stop the body-upload timer after JSON is read, then
1895
+ use `CCDX_UPSTREAM_TIMEOUT_MS` for preparation. A preparation timeout returns
1896
+ `504 messages_prepare_timeout`; a slow body upload remains governed by its own
1897
+ body timeout. Upstream dispatch starts the existing handshake/non-streaming
1898
+ budget, and counting keeps its shared dispatch deadline across capability waits.
1899
+ Cancelling a manual API credential waiter returns promptly without cancelling
1900
+ other callers or forwarding after a late credential result. The shared OS secret
1901
+ read may finish under its existing ten-second bound. No new timeout setting or
1902
+ inference retry is added.
1903
+
1832
1904
  Downstream backpressure waits also observe cancellation and the stream deadline. A client that stops reading cannot retain the pending stream indefinitely after timeout; CCDX closes that connection without retrying its request. Final error-frame delivery has a separate one-second maximum drain wait.
1833
1905
 
1834
1906
  Successful streaming responses are accepted only when the upstream body is SSE and reaches its protocol terminal event. Unexpected EOF becomes a protocol-native stream error, and repeated blank tool-argument deltas are stopped per tool call. Allowlisted rate-limit, retry, model, trace, and upstream request-ID metadata are forwarded; cookies, authorization, body-length, and encoding headers are not.
@@ -2120,7 +2192,11 @@ one unambiguous local HTTP 400 model. No prompt, memory text or model-name
2120
2192
  heuristic is used. Explicit configuration is labelled Configured in Codex;
2121
2193
  observations are Recently observed. The current client does not expose its
2122
2194
  compiled default in the queried interface, so CCDX does not label a guessed
2123
- model as Codex default. Without evidence it shows Not detected.
2195
+ model as Codex default. With memory generation explicitly enabled but no model
2196
+ evidence, the editor shows Chosen by Codex and Default model ID not available;
2197
+ this does not infer a model from the checked model list or claim a successful
2198
+ memory write. With generation explicitly disabled it shows Memory generation is
2199
+ off. Unknown generation state and no model evidence remain Not detected.
2124
2200
 
2125
2201
  The optional native log helper runs only on startup/connection-view reads (including an explicit WebUI refresh),
2126
2202
  coalesced and at least one minute apart, with a 2.5-second limit. It reads up to
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codex-copilot-dx",
3
- "version": "1.2.24",
3
+ "version": "1.2.26",
4
4
  "description": "Local gateway for Codex and Claude with Copilot, Microsoft 365 and custom APIs",
5
5
  "author": "Dale Xiao",
6
6
  "type": "module",
@@ -13,7 +13,7 @@ export const CLIENT_NAMES = Object.freeze({ codex: "Codex App", claude_app: "Cla
13
13
  const APIS = ["messages", "responses", "chat"];
14
14
  const messages = {
15
15
  ccdx_codex_catalog_cache_unavailable: "Codex model cache could not be refreshed safely. Close Codex App and try again; existing files were kept.",
16
- ccdx_client_source_disabled: "This client's CCDX access or selected source is disabled. Review Settings.",
16
+ ccdx_client_source_disabled: "CCDX access is paused. Enable the app and source, then select a model in the WebUI.",
17
17
  ccdx_client_credential_required: "The client's local CCDX credential is missing or outdated. Reopen the client after setup.",
18
18
  ccdx_conversation_source_changed: "This conversation was observed on another source or key. Start a new conversation.",
19
19
  ccdx_conversation_state_invalid: "Conversation source records are unreadable. The existing file was preserved.",
@@ -130,6 +130,7 @@ export function createClaudeGatewayHandler({ provider, apiKey, desktopAliases =
130
130
  release = await acquireRequest(req, { signal: abort.signal });
131
131
  abort.setTimeout(config.requestBodyTimeoutMs, "request_body_timeout");
132
132
  let body = await readJsonBody(req, { admission: release, signal: abort.signal, maxBodyBytes: config.maxBodyBytes, maxDecodedBodyBytes: decodedLimit });
133
+ abort.setTimeout(config.upstreamTimeoutMs, "messages_prepare_timeout");
133
134
  observeRequestedModel(body);
134
135
  context.requestOptions = requestOptionsEvidence(body);
135
136
  if (!body || typeof body.model !== "string" || !Array.isArray(body.messages)) {
@@ -159,6 +160,7 @@ export function createClaudeGatewayHandler({ provider, apiKey, desktopAliases =
159
160
  if (value.upstream) { context.upstreamAttempts = (context.upstreamAttempts || 0) + 1;tracker?.upstreamStarted(false); }
160
161
  },
161
162
  onUpstreamStart() {
163
+ if (abort.signal.aborted) throw abort.signal.reason;
162
164
  const timeout = streamed ? config.streamHandshakeTimeoutMs : config.upstreamTimeoutMs;
163
165
  if (countTokens) countDeadline ??= Date.now() + timeout;
164
166
  abort.setTimeout(countTokens ? Math.max(1, countDeadline - Date.now()) : timeout, "upstream_timeout");
@@ -224,7 +226,7 @@ export function createClaudeGatewayHandler({ provider, apiKey, desktopAliases =
224
226
  context.onHttpError?.({ code: detail.code, origin: terminalOrigin, ...(diagnostic ? { transport: diagnostic } : {}) });
225
227
  if (outcome === "cancelled") return;
226
228
  if (!res.headersSent) {
227
- const value = apiError(error.code || abort.reason || "ccdx_gateway_error", message);
229
+ const value = apiError(abort.reason || error.code || "ccdx_gateway_error", message);
228
230
  if (diagnostic) value.error.diagnostic = diagnostic;
229
231
  send(res, statusCode, value);
230
232
  }
package/src/cli-m365.mjs CHANGED
@@ -40,7 +40,9 @@ export async function fetchActiveProviderModels({ control = providerControl, ...
40
40
  }
41
41
  const address = parseAdapterAddressOptions(options.env || process.env);
42
42
  const result = await control({ host: address.adapterHost, port: address.adapterPort, ...options, action: { action: "models", family: "gpt" } });
43
- return { source: "catalog", upstreamHost: "Microsoft 365", advertised: result.models.length,
43
+ let upstreamHost = "Microsoft 365";
44
+ try { const origin = new URL(result.state?.m365?.service_origin);if (origin.protocol === "https:") upstreamHost = origin.hostname; } catch {}
45
+ return { source: "catalog", upstreamHost, advertised: result.models.length,
44
46
  models: result.models.map(model => ({ id: model.id, vendor: model.publisher, endpoints: ["responses"], preview: false })) };
45
47
  }
46
48
 
@@ -50,8 +50,16 @@ export function createConnectionRuntime({ legacy, home, env = process.env, platf
50
50
  const binding = id => managed ? settings.clients[id] : { ...settings.clients[id], source: id === "codex" ? legacy.selection().codex : legacy.snapshot().m365.enabled ? "m365" : null };
51
51
  // GitHub-only selections retain the existing native loopback access contract.
52
52
  // Any other deployment still requires the private per-client credential.
53
- const codexRequiresKey = () => !Array.isArray(binding("codex").deployments)
54
- || !binding("codex").deployments.length || binding("codex").deployments.some(item => item.source !== "github");
53
+ function codexAccessMode() {
54
+ const client = binding("codex");
55
+ if (!client.enabled) return "disabled";
56
+ if (Array.isArray(client.deployments)) {
57
+ if (!client.deployments.length) return "paused";
58
+ return client.deployments.every(item => item.source === "github") ? "native" : "gateway";
59
+ }
60
+ return !client.source ? "paused" : client.source === "github" ? "native" : "gateway";
61
+ }
62
+ const codexRequiresKey = () => codexAccessMode() === "gateway";
55
63
  function requireCodexKey(req) {
56
64
  if (gatewayClient(req.headers, identities()) === "codex") return;
57
65
  // An old native process may still send its ChatGPT bearer. A local access
@@ -147,9 +155,12 @@ export function createConnectionRuntime({ legacy, home, env = process.env, platf
147
155
  if (!managed || closed) return;
148
156
  if (options.preserveClientConfiguration?.()) { for (const id of targets) setup[id] = "preserved";return; }
149
157
  const codex = binding("codex"), compiledCodex = plan("codex");
150
- const explicit = Array.isArray(codex.deployments), native = explicit ? codex.deployments.length > 0 && codex.deployments.every(item => item.source === "github") : codex.source === "github";
158
+ const explicit = Array.isArray(codex.deployments), mode = codexAccessMode(), native = mode === "native";
151
159
  if (targets.has("codex")) try {
152
- if (codex.enabled && codex.auto_sync === false) setup.codex = "manual_sync";
160
+ if (mode === "paused" || mode === "disabled") {
161
+ if (mode === "disabled" || codex.auto_sync !== false) configureCodex({ ...options, restore: true });
162
+ setup.codex = mode;
163
+ } else if (codex.auto_sync === false) setup.codex = "manual_sync";
153
164
  else if (codex.enabled && compiledCodex.defaultUnavailable && !native) setup.codex = "default_unavailable";
154
165
  else {
155
166
  setup.codex = configureCodex({ ...options, ...(codex.enabled && (native || explicit && codex.deployments.length || codex.source?.startsWith("api_"))
@@ -387,9 +398,10 @@ export function createConnectionRuntime({ legacy, home, env = process.env, platf
387
398
  },
388
399
  current(req) {
389
400
  if (!managed) return legacy.current();
401
+ const mode = codexAccessMode();
402
+ if (mode === "paused" || mode === "disabled") throw accessError("ccdx_client_source_disabled", 503);
390
403
  const c = binding("codex"), compiled = plan("codex");
391
404
  if (Array.isArray(c.deployments) && req?.method === "GET") {
392
- if (!c.enabled) throw accessError("ccdx_client_source_disabled", 503);
393
405
  if (codexRequiresKey()) requireCodexKey(req);
394
406
  return { id: "connections", registry: { models: { data: compiled.models.map(model => ({ ...model, id: model.public_id })) } },
395
407
  client: { listModels: async () => ({ status: 200, body: JSON.stringify({ data: compiled.models.map(model => ({ ...model, id: model.public_id })) }) }) },
@@ -407,7 +419,10 @@ export function createConnectionRuntime({ legacy, home, env = process.env, platf
407
419
  },
408
420
  hasModelBindings(client = "codex") { return managed && Array.isArray(binding(client).deployments); },
409
421
  resolveCodex(body, req) {
410
- if (!managed || !Array.isArray(binding("codex").deployments)) return null;
422
+ if (!managed) return null;
423
+ const mode = codexAccessMode();
424
+ if (mode === "paused" || mode === "disabled") throw accessError("ccdx_client_source_disabled", 503);
425
+ if (!Array.isArray(binding("codex").deployments)) return null;
411
426
  if (codexRequiresKey()) requireCodexKey(req);
412
427
  const requested = body.model === "codex-auto-review" ? binding("codex").auto_review_model || plan("codex").defaultModel : body.model;
413
428
  if (body.model === "codex-auto-review") {
@@ -91,6 +91,7 @@
91
91
  element("save-animation").disabled = selectedAnimation === savedAnimation;
92
92
  updateAnimationState();
93
93
  syncAnimationPreview();
94
+ globalThis.ccdxSettingsPreferences?.selectAnimation(theme.id);
94
95
  });
95
96
  const name = document.createElement("span");
96
97
  name.className = "theme-name";
@@ -145,6 +146,7 @@
145
146
  }
146
147
  updateAnimationState();
147
148
  text("animation-note", animationNote(data));
149
+ globalThis.ccdxSettingsPreferences?.render();
148
150
  }
149
151
 
150
152
  function updateAnimationState() {
@@ -180,6 +182,12 @@
180
182
  }
181
183
 
182
184
  return { apply: applyAnimation, load: loadAnimation, save: saveAnimation, sync: syncAnimationPreview, stop: stopAnimationPreview,
185
+ select(theme) {
186
+ if (!animationRows.has(theme) || selectedAnimation === theme) return;
187
+ selectedAnimation = theme;
188
+ for (const [id, row] of animationRows) row.setAttribute("aria-pressed", String(id === theme));
189
+ updateAnimationState();syncAnimationPreview();
190
+ },
183
191
  get saving() { return animationSaving; }, get framesLoaded() { return animationFramesLoaded; } };
184
192
  }
185
193
  globalThis.ccdxDashboardAnimation = { create };
@@ -264,8 +264,8 @@
264
264
  const area = el("connection-memory-model");if (!area || !data) return;
265
265
  area.hidden = editingClient !== "codex";if (area.hidden) return;
266
266
  const c = client("codex"), dep = c.memory_model || {};
267
- el("connection-memory-name").textContent = dep.model || format("memory_not_detected");
268
- words(el("connection-memory-basis"), dep.model ? `memory_basis_${dep.basis}` : "");
267
+ el("connection-memory-name").textContent = dep.model || format(dep.enabled === true ? "memory_codex_default" : dep.enabled === false ? "memory_generation_off" : "memory_not_detected");
268
+ words(el("connection-memory-basis"), dep.model ? `memory_basis_${dep.basis}` : dep.enabled === true ? "memory_default_unknown" : "");
269
269
  const selected = (c.deployments || c.model_plan?.models || []).some(memoryMatches);
270
270
  const draft = dep.model && [...bindingSelection].some(key => {
271
271
  const [source, id] = key.split("\0");return memoryMatches({ id, route_id: c.model_plan?.available?.find(x => x.source === source && x.id === id)?.route_id });
@@ -44,6 +44,9 @@
44
44
  if (next !== "codex") sourceGeneration++;
45
45
  if (!["codex", "models"].includes(next) && dashboardRefresh.state("models").pending) dashboardRefresh.invalidate("models");
46
46
  for (const view of document.querySelectorAll("[data-view]")) view.hidden = view.dataset.view !== next;
47
+ const snapshot = dashboardRefresh.state(statusResourceKey()).value;
48
+ if (snapshot) render(snapshot);
49
+ void refreshStatus();
47
50
  globalThis.ccdxDashboardActivity?.visibilityChanged();
48
51
  globalThis.ccdxDashboardFlow?.visibilityChanged();
49
52
  for (const item of document.querySelectorAll("[data-route]")) {
@@ -58,6 +61,7 @@
58
61
  if (next === "usage") { void dashboardRefresh.refresh("usage");usageView.revealChart(); } else usageView.stopMotion();
59
62
  if (next === "requests") renderContext();
60
63
  if (next === "system") { void dashboardRefresh.refresh("animation");void dashboardRefresh.refresh("updates"); }
64
+ preferences?.render();
61
65
  syncAnimationPreview();
62
66
  }
63
67
  async function api(body) {
@@ -66,6 +70,10 @@
66
70
  ...(body ? { body: JSON.stringify(body) } : {}), signal: AbortSignal.timeout(body?.operation === "account" ? 65000 : 15000) });
67
71
  const data = await response.json();if (!response.ok) throw Object.assign(new Error(data.error || `HTTP ${response.status}`), { code: data.code });return data;
68
72
  }
73
+ const preferences = globalThis.ccdxDashboardPreferences?.create({ element: el, api, applied: applySettings, time,
74
+ selectAnimation: theme => animationView.select(theme),
75
+ refreshAnimation() { dashboardRefresh.invalidate("animation");if (current === "system") void dashboardRefresh.refresh("animation", { force: true }); } });
76
+ globalThis.ccdxSettingsPreferences = preferences;
69
77
  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",
70
78
  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" };
71
79
  const selectedSource = () => providerEntries.find(source => source.id === el("source-provider").value);
@@ -103,7 +111,7 @@
103
111
  syncReviewButton();
104
112
  }
105
113
  window.addEventListener("ccdx:providers", () => { syncSources();if (current === "codex") void loadSourceModels(); });
106
- function applySettings(data) {
114
+ function applySettings(data, meta) {
107
115
  settings = data;
108
116
  const nightly = data.nightly_update;
109
117
  el("nightly-update").checked = nightly?.enabled === true;el("nightly-update").disabled = false;
@@ -164,13 +172,15 @@
164
172
  }
165
173
  }
166
174
  el("process-notice").textContent = data.terminal?.last_notice || "";
175
+ preferences?.sync(data, meta);
167
176
  }
168
177
  async function loadSettings() {
169
178
  if (settingsPending) return;
170
179
  settingsPending = true;
171
180
  el("terminal-color-theme").disabled = true;
172
181
  syncAccountControls();
173
- try { applySettings(await api());settingsReadAt = time(Date.now());void globalThis.ccdxConnections?.load(); }
182
+ const readVersion = preferences?.version;
183
+ try { applySettings(await api(), { readVersion });settingsReadAt = time(Date.now());void globalThis.ccdxConnections?.load(); }
174
184
  catch (error) {
175
185
  for (const id of ["settings-note", ...(settingsViews.includes(current) ? ["page-settings-note"] : [])]) {
176
186
  label(el(id), settingsReadAt ? "showing_previous_data_updated_time" : "could_not_read_settings", { time: settingsReadAt });
@@ -206,7 +216,7 @@
206
216
  dashboardRefresh.invalidate("models", { clear: true });
207
217
  label(el("m365-account-note"), "company_account_checked");
208
218
  }
209
- if (body.action !== "color_theme") { await dashboardRefresh.refresh("status", { force: true });await dashboardRefresh.refresh("auth", { force: true }); }
219
+ if (body.action !== "color_theme") { await refreshStatus();await dashboardRefresh.refresh("auth", { force: true }); }
210
220
  }
211
221
  catch (error) {
212
222
  if (settings) applySettings(settings);
@@ -223,9 +233,10 @@
223
233
  }
224
234
  }
225
235
  for (const input of document.querySelectorAll('[role=switch][id^="setting-"]')) input.addEventListener("change", () => {
236
+ if (preferences && input.closest('[data-view="system"]')) return;
226
237
  void change({ action: "preference", key: input.id.slice("setting-".length), value: input.checked }, input);
227
238
  });
228
- el("terminal-color-theme").addEventListener("change", () => void change({ action: "color_theme", theme: el("terminal-color-theme").value }, el("terminal-color-theme")));
239
+ if (!preferences) el("terminal-color-theme").addEventListener("change", () => void change({ action: "color_theme", theme: el("terminal-color-theme").value }, el("terminal-color-theme")));
229
240
  el("save-history").addEventListener("click", () => void change({ action: "history_limit", mib: Number(el("history-limit").value) }, el("save-history")));
230
241
  el("clean-history").addEventListener("click", () => {
231
242
  if (window.confirm(globalThis.ccdxLanguage.format("clear_inactive_codex_conversation_data_older_continuation_ids_ma"))) void change({ action: "history_clean" }, el("clean-history"));
@@ -283,7 +294,7 @@
283
294
  model: el("source-model").value, ...(settings?.providers?.codex_provider === provider ? {} : {
284
295
  auto_review_model: el("source-review").value, auto_review_effort: el("source-review-effort").value || null }) } : {}) }, el("apply-source"));
285
296
  });
286
- el("nightly-update").addEventListener("change", () => void change({ action: "nightly_update", enabled: el("nightly-update").checked }, el("nightly-update")));
297
+ if (!preferences) el("nightly-update").addEventListener("change", () => void change({ action: "nightly_update", enabled: el("nightly-update").checked }, el("nightly-update")));
287
298
  el("save-review").addEventListener("click", () => void change({ action: "provider", operation: "auto-review", provider: el("source-provider").value,
288
299
  model: el("source-review").value, auto_review_effort: el("source-review-effort").value || null }, el("save-review")));
289
300
  // Only the small in-memory status snapshot is read at this cadence. Catalogs
@@ -292,7 +303,7 @@
292
303
  clearTimeout(timer);if (stopped || document.visibilityState !== "visible" || !dashboardRefresh.automatic) return;
293
304
  timer = setTimeout(async () => {
294
305
  if (document.visibilityState === "visible" && dashboardRefresh.automatic) {
295
- await dashboardRefresh.refresh("status", { force: true });
306
+ await refreshStatus();
296
307
  if (++ticks % 8 === 0) {
297
308
  await dashboardRefresh.refresh("auth", { force: true });
298
309
  if (settingsViews.includes(current)) await loadSettings();
@@ -303,7 +314,7 @@
303
314
  }
304
315
  window.addEventListener("hashchange", navigate);
305
316
  document.addEventListener("visibilitychange", () => {
306
- if (!stopped && document.visibilityState === "visible" && dashboardRefresh.automatic) void dashboardRefresh.refresh("status", { force: true });
317
+ if (!stopped && document.visibilityState === "visible" && dashboardRefresh.automatic) void refreshStatus();
307
318
  schedule();
308
319
  });
309
320
  el("auto-refresh").addEventListener("click", schedule);
@@ -7,6 +7,7 @@
7
7
  const format = (key, values = {}) => globalThis.ccdxLanguage.format(key, values);
8
8
  const nodes = { apps: new Map(), models: new Map() };
9
9
  const detailRows = new Map();
10
+ const movingWires = new Map();
10
11
  let rows = [], total = null, omitted = 0, fresh = false, deadline = 0, expiry = null;
11
12
  let selected = null, expanded = false, lastSignature = "", geometry = "", wireState = "", positions = null, known = false;
12
13
  let lastApps = [], lastModels = [];
@@ -150,17 +151,25 @@
150
151
  const matches = rows.filter(row => (edge.left ? row.application : modelKey(row)) === edge.id && related(row));
151
152
  return { active: fresh && matches.length > 0, moving: fresh && matches.some(responding), dim: edge.node.dataset.related === "false" };
152
153
  });
153
- const state = JSON.stringify(states), wires = el("flow-wires");
154
+ const state = JSON.stringify(states), wires = el("flow-wires"), activity = el("flow-active-wires");
154
155
  if (next === geometry && state === wireState) return;
155
156
  if (next !== geometry) {
156
157
  geometry = next;wires.setAttribute("viewBox", `0 0 ${width} ${height}`);wires.replaceChildren();
158
+ activity.setAttribute("viewBox", `0 0 ${width} ${height}`);activity.replaceChildren();movingWires.clear();
157
159
  for (const edge of edges) wires.append(svg("path", { d: edge.d }));
158
160
  }
159
161
  wireState = state;
160
162
  edges.forEach((edge, index) => {
161
163
  const value = states[index], path = wires.children[index];
162
- path.setAttribute("class", `flow-wire${value.dim ? " flow-dim" : value.active ? " flow-live" : ""}${value.moving ? " flow-streaming" : value.active ? " flow-waiting" : ""}`);
164
+ const classes = `flow-wire${value.dim ? " flow-dim" : value.active ? " flow-live" : ""}${value.moving ? " flow-streaming" : value.active ? " flow-waiting" : ""}`;
165
+ path.setAttribute("class", classes + (value.moving ? " flow-split" : ""));
166
+ let copy = movingWires.get(path);
167
+ if (value.moving) {
168
+ if (!copy) { copy = svg("path", { d: edge.d });activity.append(copy);movingWires.set(path, copy); }
169
+ copy.setAttribute("class", classes);
170
+ } else if (copy) { copy.remove();movingWires.delete(path); }
163
171
  });
172
+ if (movingWires.size) activity.removeAttribute("hidden");else activity.setAttribute("hidden", "");
164
173
  }
165
174
  function unavailable() { clearTimeout(expiry);expiry = null;fresh = false;deadline = 0;render(); }
166
175
  function visibilityChanged() { if (deadline && Date.now() >= deadline) { unavailable();return; }render();draw(); }
@@ -18,7 +18,7 @@
18
18
  }
19
19
  const kind = value => ["running", "active"].includes(value) ? "running"
20
20
  : ["ready", "authorized", "configured", "saved", "passed", "ok", "completed"].includes(value) ? "ok"
21
- : ["unavailable", "disabled", "unsupported", "not_installed", "unconfigured"].includes(value) ? "unavailable"
21
+ : ["unavailable", "disabled", "paused", "unsupported", "not_installed", "unconfigured"].includes(value) ? "unavailable"
22
22
  : ["warn", "err", "invalid", "failed", "configuration_unavailable"].includes(value) ? "warning" : "unknown";
23
23
  globalThis.ccdxIcons = { icon, set, kind };
24
24
  })();