codex-copilot-dx 1.1.1 → 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 +10 -11
- package/bin/cli.mjs +23 -23
- package/docs/ARCHITECTURE.md +40 -6
- package/docs/REFERENCE.md +128 -94
- package/package.json +6 -4
- package/src/auth-device-flow.mjs +1 -1
- package/src/auth-status.mjs +1 -1
- package/src/auto-review-model.mjs +2 -2
- package/src/claude-client-lifecycle.mjs +33 -0
- package/src/claude-gateway.mjs +15 -6
- package/src/cli-auth.mjs +6 -6
- package/src/cli-cache.mjs +5 -5
- package/src/cli-image.mjs +1 -1
- package/src/cli-m365.mjs +5 -5
- package/src/cli-models.mjs +2 -2
- package/src/cli-options.mjs +26 -26
- package/src/cli-status.mjs +6 -1
- package/src/dashboard/console.js +112 -38
- package/src/dashboard/index.html +122 -90
- package/src/dashboard/language.js +791 -362
- package/src/dashboard/status.js +53 -41
- package/src/dashboard/ui.css +13 -0
- package/src/dashboard/ui.js +31 -28
- package/src/dashboard/usage.js +16 -16
- package/src/dashboard-api.mjs +2 -0
- package/src/doctor.mjs +4 -4
- package/src/http-transport.mjs +3 -2
- package/src/launcher.mjs +8 -8
- package/src/native-prediction.mjs +3 -3
- package/src/operation-error.mjs +12 -7
- package/src/package-update.mjs +43 -11
- package/src/prediction-retirement.mjs +2 -7
- package/src/provider-metadata.mjs +2 -1
- package/src/provider-registry.mjs +19 -0
- package/src/provider-runtime.mjs +42 -33
- package/src/provider-settings.mjs +2 -1
- package/src/release-install.mjs +192 -0
- package/src/response-failures.mjs +2 -1
- package/src/service-control.mjs +7 -8
- package/src/startup-ui.mjs +17 -9
- package/src/stream-performance.mjs +29 -1
- package/src/terminal-console.mjs +43 -15
- package/src/usage-store.mjs +10 -5
- package/src/user-settings.mjs +16 -3
- package/src/version.mjs +2 -6
- package/src/windows-command.mjs +13 -1
package/README.md
CHANGED
|
@@ -7,28 +7,27 @@ Default Auto-review: **GPT-6.1 Sol / low**. Image generation is **off by default
|
|
|
7
7
|
|
|
8
8
|
## Install and run
|
|
9
9
|
|
|
10
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
23
20
|
|
|
24
|
-
|
|
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.
|
|
25
22
|
|
|
26
|
-
|
|
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.
|
|
24
|
+
|
|
25
|
+
WebUI settings apply animation choices live, pause/resume configured image calls and prediction adaptation without removing credentials/trust, change the Codex source explicitly, and manage the conversation-buffer limit. Saved preference and effective state are separate; browser opening is labeled for the next start. Clearing the conversation buffer clears **all** buffered continuations. Busy cleanup is refused; retry after active requests finish. Saved Codex transcripts are retained. First-time image/prediction setup still uses the existing CLI; trust, client routing and cached client capabilities may require a normal App relaunch. Busy M365 requests must finish before disabling that provider. See the [control reference](docs/REFERENCE.md#control-console-and-online-settings).
|
|
27
26
|
|
|
28
27
|
While visible and auto-refresh is on, the console reads the small status snapshot about every two seconds and source/settings evidence about every 16 seconds. Catalogs and retained usage are fetched on demand and at most once per 30-minute refresh interval while their view is open. Hidden pages stop scheduled reads. First output uses **ms**, estimated speed **token/s**, and each protocol has its own samples. HTTP traffic includes catalog and routing requests; it is not a conversation count.
|
|
28
|
+
The **Requests by source** section and `ccdx status` separate request outcomes by source and protocol. Process-local returned usage also retains bounded source totals; missing usage remains partial. Configuration, sign-in, discovery and a completed reply remain separate evidence. CLI text stays English; WebUI stays bilingual. See the [copy inventory](https://github.com/DaleXiao/codex-copilot-dx/blob/main/docs/UX_COPY.md) and [1.2.0 verification](https://github.com/DaleXiao/codex-copilot-dx/blob/main/docs/RELEASE_1.2.0.md).
|
|
29
29
|
|
|
30
30
|
## Commands
|
|
31
|
-
|
|
32
31
|
| Command | Purpose |
|
|
33
32
|
| --- | --- |
|
|
34
33
|
| `ccdx help` | Command help; use `ccdx help <command>` for details |
|
|
@@ -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
|
-
|
|
115
|
-
Updates
|
|
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.
|
package/bin/cli.mjs
CHANGED
|
@@ -14,7 +14,7 @@ import { runInBackground } from "../src/startup.mjs";
|
|
|
14
14
|
import { cliCommandName, cliHelp, parseAdapterAddressOptions, parseAdapterProbeOptions, parseCliArgs, parseRuntimeOptions } from "../src/cli-options.mjs";
|
|
15
15
|
import { formatAdapterStatus, readAdapterStatus } from "../src/cli-status.mjs";
|
|
16
16
|
import { closeHttpServer } from "../src/shutdown.mjs";
|
|
17
|
-
import { autoReviewModelPreference, autoReviewPreference, responseHistoryLimitPreference, terminalAnimationPreference, servicePreferences } from "../src/user-settings.mjs";
|
|
17
|
+
import { autoReviewModelPreference, autoReviewPreference, responseHistoryLimitPreference, terminalAnimationPreference, servicePreferences, serviceSettingsSnapshot } from "../src/user-settings.mjs";
|
|
18
18
|
import { formatLiveCopilotModels } from "../src/cli-models.mjs";
|
|
19
19
|
import { runAuthCommand } from "../src/cli-auth.mjs";
|
|
20
20
|
import { createProfileRuntime } from "../src/profile-runtime.mjs";
|
|
@@ -36,7 +36,7 @@ try {
|
|
|
36
36
|
CLI = parseCliArgs(process.argv.slice(2));
|
|
37
37
|
} catch (e) {
|
|
38
38
|
console.error(e.message);
|
|
39
|
-
console.error(`
|
|
39
|
+
console.error(`Help: ${CLI_NAME} --help`);
|
|
40
40
|
process.exit(2);
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -88,9 +88,9 @@ if (CLI.command === "suggestion") {
|
|
|
88
88
|
try {
|
|
89
89
|
const { retirePredictionIntegration } = await import("../src/prediction-retirement.mjs");
|
|
90
90
|
const result = retirePredictionIntegration({ dryRun: CLI.action === "status" });
|
|
91
|
-
console.log("The
|
|
91
|
+
console.log("The old suggestion panel is no longer supported.");
|
|
92
92
|
if (CLI.action === "status" && result.changed) console.log(`Legacy settings remain; run ${CLI_NAME} suggestion off to clean them up.`);
|
|
93
|
-
if (result.preserved) console.warn("
|
|
93
|
+
if (result.preserved) console.warn("Your edited suggestion settings were kept.");
|
|
94
94
|
process.exit(0);
|
|
95
95
|
} catch (error) {
|
|
96
96
|
console.error(status("err", error.message));
|
|
@@ -292,8 +292,8 @@ const webUiUrl = `http://${ADAPTER_HOST === "::1" ? "[::1]" : "127.0.0.1"}:${ADA
|
|
|
292
292
|
async function launchDashboard() {
|
|
293
293
|
try {
|
|
294
294
|
const result = await openDashboard(webUiUrl, { enabled: !CLI.noBrowser && servicePreferences().open_webui });
|
|
295
|
-
if (result.state === "unavailable") console.warn(startupCheck("warn", "
|
|
296
|
-
} catch (error) { console.warn(startupCheck("warn", "
|
|
295
|
+
if (result.state === "unavailable") console.warn(startupCheck("warn", "Dashboard", `Could not open browser. Open ${webUiUrl}`));
|
|
296
|
+
} catch (error) { console.warn(startupCheck("warn", "Dashboard", error.message)); }
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
async function clientIntegrations() {
|
|
@@ -301,14 +301,14 @@ async function clientIntegrations() {
|
|
|
301
301
|
const { createClientIntegration } = await import("../src/client-integration.mjs");
|
|
302
302
|
clientIntegration = createClientIntegration({ port: ADAPTER_PORT, host: ADAPTER_HOST,
|
|
303
303
|
configLog: startupLogger("Config"),
|
|
304
|
-
info: (message) => console.log(startupCheck("info", "
|
|
304
|
+
info: (message) => console.log(startupCheck("info", "App", message)), warning: (message) => console.warn(startupCheck("warn", "App", message)) });
|
|
305
305
|
}
|
|
306
306
|
return clientIntegration;
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
if (LOGGING.filePath) {
|
|
310
|
-
console.log(status("info", `
|
|
311
|
-
if (LOGGING.level === "debug") console.log(status("debug", "
|
|
310
|
+
console.log(status("info", `Details log: ${LOGGING.filePath}`));
|
|
311
|
+
if (LOGGING.level === "debug") console.log(status("debug", "Detailed logging on"));
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
async function reuseRunningAdapterIfAvailable() {
|
|
@@ -324,8 +324,8 @@ async function reuseRunningAdapterIfAvailable() {
|
|
|
324
324
|
if (!running.ok) return false;
|
|
325
325
|
|
|
326
326
|
const serviceStatus = readAdapterStatus({ host: ADAPTER_HOST, port: ADAPTER_PORT }).catch(() => null);
|
|
327
|
-
console.log(startupCheck("ok", "
|
|
328
|
-
console.log(startupCheck("info", "
|
|
327
|
+
console.log(startupCheck("ok", "Service", `Using running service: ${running.baseUrl}`));
|
|
328
|
+
console.log(startupCheck("info", "Sign-in", "Using saved sign-in; not rechecked"));
|
|
329
329
|
const { compressionSetup, imageEnabled, imageMcpSkipped } = await configureCodexClient();
|
|
330
330
|
|
|
331
331
|
let predictionPacUrl = null;
|
|
@@ -352,7 +352,7 @@ async function reuseRunningAdapterIfAvailable() {
|
|
|
352
352
|
onPredictionRoute: route => { launchRoute = route; }, log: startupLogger("App") });
|
|
353
353
|
console.log(predictionStartupCheck({ configured: predictionConfigured, bridge: predictionPacUrl ? "running" : "unknown", launch_route: launchRoute }));
|
|
354
354
|
console.log(startupCheck(imageEnabled && imageMcpSkipped ? "warn" : "info", "Images", imageEnabled
|
|
355
|
-
? imageMcpSkipped ? "
|
|
355
|
+
? imageMcpSkipped ? "App setup skipped; see warning" : "Configured; not tested" : "Off"));
|
|
356
356
|
console.log(providerStartupChecks((await serviceStatus)?.data));
|
|
357
357
|
console.log(startupReady({ baseUrl: running.baseUrl, commandName: CLI_NAME, reused: true }));
|
|
358
358
|
await launchDashboard();
|
|
@@ -396,9 +396,9 @@ try {
|
|
|
396
396
|
try {
|
|
397
397
|
const { inspectWindowsCommand } = await import("../src/windows-command.mjs");
|
|
398
398
|
const command = inspectWindowsCommand({ repair: true });
|
|
399
|
-
if (command.changed) console.log(startupCheck("ok", "Command", "Windows command
|
|
399
|
+
if (command.changed) console.log(startupCheck("ok", "Command", "Windows command ready; use ccdx"));
|
|
400
400
|
else if (command.status === "preserved") console.warn(startupCheck("warn", "Command", "Existing launcher preserved; use ccdx.cmd doctor to inspect it"));
|
|
401
|
-
} catch { console.warn(startupCheck("warn", "Command", "
|
|
401
|
+
} catch { console.warn(startupCheck("warn", "Command", "Command setup skipped; service will start")); }
|
|
402
402
|
}
|
|
403
403
|
const updateNotice = runInBackground(printUpdateNotice);
|
|
404
404
|
if (await reuseRunningAdapterIfAvailable()) {
|
|
@@ -429,11 +429,11 @@ try {
|
|
|
429
429
|
log: (kind, message) => console.log(startupComplete ? status(kind, message) : startupCheck(kind, "M365", message)) });
|
|
430
430
|
const m365Setup = runInBackground(() => providerRuntime.start());
|
|
431
431
|
if (providerRuntime.selection().codex === "github") {
|
|
432
|
-
try { await ensureAuth({ log: startupLogger("
|
|
433
|
-
catch (error) { if (!await m365Setup) throw error;console.warn(startupCheck("warn", "
|
|
432
|
+
try { await ensureAuth({ log: startupLogger("Sign-in") }); }
|
|
433
|
+
catch (error) { if (!await m365Setup) throw error;console.warn(startupCheck("warn", "Sign-in", "GitHub authorization is unavailable; Microsoft 365 is independent. Check ccdx m365 status or switch")); }
|
|
434
434
|
} else {
|
|
435
435
|
await m365Setup;
|
|
436
|
-
console.log(startupCheck("info", "
|
|
436
|
+
console.log(startupCheck("info", "Source", "Codex source: Microsoft 365"));
|
|
437
437
|
}
|
|
438
438
|
profileRuntime = createProfileRuntime({ codexClient: defaultCopilotClient });
|
|
439
439
|
|
|
@@ -452,11 +452,11 @@ try {
|
|
|
452
452
|
const terminalAnimationTheme = terminalAnimationPreference().theme;
|
|
453
453
|
terminalConsole = createTerminalConsole({ baseUrl: webUiUrl, verbose: CLI.verbose === true || CLI.showRequestId === true || LOGGING.level === "debug",
|
|
454
454
|
snapshot: () => activeServer?.ccdxSnapshot?.() || {},
|
|
455
|
-
preferences: () =>
|
|
455
|
+
preferences: () => { const { saved, theme } = serviceSettingsSnapshot();return { ...saved, theme }; } });
|
|
456
456
|
const serviceControl = createServiceControl({ providerRuntime, clientIntegration: earlyIntegration, terminal: terminalConsole });
|
|
457
457
|
const codexModelCatalog = createCodexModelCatalog();
|
|
458
458
|
activeServer = await startAdapter(ADAPTER_PORT, ADAPTER_HOST, {
|
|
459
|
-
log: startupLogger("
|
|
459
|
+
log: startupLogger("Service"),
|
|
460
460
|
autoReviewModelResolver: () => autoReviewPreference(),
|
|
461
461
|
codexClient: profileRuntime.codexClient,
|
|
462
462
|
codexModelCatalog,
|
|
@@ -487,7 +487,7 @@ try {
|
|
|
487
487
|
onPredictionRoute: route => clientIntegration?.launched(route), log: startupLogger("App") });
|
|
488
488
|
console.log(predictionStartupCheck(clientIntegration?.snapshot().prediction));
|
|
489
489
|
console.log(startupCheck(imageEnabled && imageMcpSkipped ? "warn" : "info", "Images", imageEnabled
|
|
490
|
-
? imageMcpSkipped ? "
|
|
490
|
+
? imageMcpSkipped ? "App setup skipped; see warning" : "Configured; not tested" : "Off"));
|
|
491
491
|
console.log(providerStartupChecks(activeServer.ccdxSnapshot?.()));
|
|
492
492
|
|
|
493
493
|
// Periodically refresh the model list + endpoint cache so a long-running
|
|
@@ -510,18 +510,18 @@ try {
|
|
|
510
510
|
if (shuttingDown) return;
|
|
511
511
|
shuttingDown = true;
|
|
512
512
|
LOGGING.setTerminalSink(null);terminalConsole?.cleanup();
|
|
513
|
-
console.log(`\n${status("wait", `
|
|
513
|
+
console.log(`\n${status("wait", `Stopping: ${signal}`)}`);
|
|
514
514
|
let exitCode = 0;
|
|
515
515
|
try {
|
|
516
516
|
if (modelRefreshTimer) clearInterval(modelRefreshTimer);
|
|
517
517
|
await clientIntegration?.close();
|
|
518
518
|
await providerRuntime?.close();
|
|
519
519
|
const result = await closeHttpServer(activeServer, { timeoutMs: RUNTIME.shutdownTimeoutMs });
|
|
520
|
-
if (result.forced) console.warn(status("warn", "
|
|
520
|
+
if (result.forced) console.warn(status("warn", "Remaining service connections closed"));
|
|
521
521
|
await flushUsageWrites();
|
|
522
522
|
} catch (e) {
|
|
523
523
|
exitCode = 1;
|
|
524
|
-
console.error(status("err", `
|
|
524
|
+
console.error(status("err", `Could not stop: ${e.message}`));
|
|
525
525
|
} finally {
|
|
526
526
|
await LOGGING.cleanup();
|
|
527
527
|
process.exit(exitCode);
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -8,8 +8,8 @@ Client integration, image tools and the dashboard are not a general plugin frame
|
|
|
8
8
|
| --- | --- | --- |
|
|
9
9
|
| Core inference | `adapter.mjs`, Responses modules, model catalog, history | Codex wire contracts, streaming and recovery |
|
|
10
10
|
| Providers | `providers/github.mjs`, `providers/m365*.mjs` | Source-owned auth, discovery, routing, capabilities and transport |
|
|
11
|
-
| Provider composition | `provider-runtime.mjs`, `provider-settings.mjs` | Explicit selection, lifecycle, history namespaces and snapshots |
|
|
12
|
-
| Claude clients | `claude-gateway.mjs`, `claude-client-config.mjs`, `claude-models.mjs` | Native Messages relay and field-owned reversible client setup |
|
|
11
|
+
| Provider composition | `provider-runtime.mjs`, `provider-registry.mjs`, `provider-settings.mjs` | Explicit selection, lifecycle, history namespaces and snapshots |
|
|
12
|
+
| Claude clients | `claude-gateway.mjs`, `claude-client-lifecycle.mjs`, `claude-client-config.mjs`, `claude-models.mjs` | Native Messages relay and field-owned reversible client setup |
|
|
13
13
|
| Client integration | `client-integration.mjs`, Codex config, native prediction | Client setup, optional start/stop, diagnostic snapshots |
|
|
14
14
|
| Optional images | Image provider, CLI setup, image MCP and skill | Opt-in API access and image delivery; failures do not block core startup |
|
|
15
15
|
| Management | CLI, dashboard, observability, package updates | Bounded metadata and explicit user actions |
|
|
@@ -25,6 +25,8 @@ its Fast mapping, retries and recovery are not applied blindly to M365. Protocol
|
|
|
25
25
|
adaptation belongs to the client boundary. There is no generic intermediate message
|
|
26
26
|
format that would erase native Responses or Anthropic semantics.
|
|
27
27
|
|
|
28
|
+
`provider-registry.mjs` declares the bounded internal source metadata used by selection validation and dashboard source choices. It loads no external code; GitHub and M365 are the two production sources. Source-specific selection/model rules remain with composition. A third source is only a contract test fixture.
|
|
29
|
+
|
|
28
30
|
`provider-runtime.mjs` owns source selection, not the providers themselves. Each
|
|
29
31
|
request pins a provider before admission. An explicit change affects later requests;
|
|
30
32
|
it does not reroute an in-flight stream or retry it through another account. Core
|
|
@@ -46,6 +48,7 @@ to M365. No GitHub token, image credential or browser Cookie is reused. Windows
|
|
|
46
48
|
use a separate OS WinHTTP worker for M365 company routing; macOS preserves static
|
|
47
49
|
system/environment routing and reports unsupported dynamic PAC. Native runtime
|
|
48
50
|
absence and policy refusal do not disable GitHub.
|
|
51
|
+
`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.
|
|
49
52
|
Claude handler/configuration readiness is also separate from M365 provider
|
|
50
53
|
readiness. A Claude setup failure or a GPT-only catalog cannot block the explicitly
|
|
51
54
|
selected Codex backup; a catalog without Claude models does not install Claude settings.
|
|
@@ -305,18 +308,21 @@ before-values, preserving foreign or edited fields. Saved allow gates are separa
|
|
|
305
308
|
from provisioning; pausing never deletes the Provider key or prediction trust.
|
|
306
309
|
|
|
307
310
|
`terminal-console.mjs` owns a bounded TTY status region and activity only.
|
|
308
|
-
Its
|
|
311
|
+
Its region has wrapping source/Claude summaries, a responsive line-framed table,
|
|
309
312
|
then separate notice and activity rows. Snapshot data is read about once a second;
|
|
310
|
-
animation ticks reuse the table and write only changed rows. Small viewports
|
|
311
|
-
(under 40 columns or 16 rows) retain plain output. Client-originated cancellations
|
|
313
|
+
animation ticks reuse the table and write only changed rows. Small viewports (under 40 columns / 16 rows, or unable to fit the full region) retain plain output. Failed snapshot/preference reads preserve the last successful view with an explicit stale marker and timestamp; initial read failure is distinct. Client-originated cancellations
|
|
312
314
|
are informational; timeouts and actual failures remain notices and file diagnostics.
|
|
313
315
|
`log.mjs` routes terminal presentation independently from existing opt-in,
|
|
314
|
-
redacted rotating file records. Returned usage accumulates
|
|
316
|
+
redacted rotating file records. Returned usage accumulates bounded process-local/source
|
|
315
317
|
totals in `usage-store.mjs`, without a historical-log scan or per-token callback.
|
|
316
318
|
`browser-launch.mjs` makes one bounded local desktop-open attempt after readiness;
|
|
317
319
|
no headless/SSH launch, browser dependency, generic shell or background tab watcher
|
|
318
320
|
is added. Neither terminal nor WebUI rendering is required for inference.
|
|
319
321
|
|
|
322
|
+
Dashboard messages have stable IDs independent of English and Chinese display text. Static HTML carries IDs and readable English; dynamic rendering uses the same catalog. Compatibility keys remain for runtime state/diagnostic messages. The synchronous catalog preserves language/theme initialization without an extra fetch.
|
|
323
|
+
|
|
324
|
+
`serviceSettingsSnapshot` projects flags, animation and the history preference from one strict file read per update; no new persistence cache hides external edits or corrupt configuration.
|
|
325
|
+
|
|
320
326
|
## Configuration ownership
|
|
321
327
|
|
|
322
328
|
`CODEX_HOME` selects Codex configuration. App profile/trust paths have their own
|
|
@@ -368,3 +374,31 @@ installed sharp without provider calls. It does not claim a live Codex UI test
|
|
|
368
374
|
or the GitHub updater's network installation; the Windows command chain has a
|
|
369
375
|
separate actual-process fixture. Direct runtime dependencies are exact versions;
|
|
370
376
|
the lockfile fixes CI transitives, not consumers' future transitive resolution.
|
|
377
|
+
|
|
378
|
+
### Source-level observations
|
|
379
|
+
|
|
380
|
+
Stream performance retains existing route totals and adds `by_route.<route>.by_provider`. Each source has started/active/finished counts, terminal totals, bounded model outcomes, request-to-first-output timing and preparation histograms. Source assignment is pinned once. There are at most 16 source labels plus `other`, and 32 model labels plus `other` per source. Unassigned finished requests use `unknown`; request IDs, accounts and URLs never become metric labels. Recent requests remain capped at 20. `runtime_usage.by_provider` has at most 16 labels plus `other`; unknown usage stays partial and persisted historical records retain their source.
|
|
381
|
+
|
|
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
|
+
|
|
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.
|