codex-copilot-dx 1.2.32 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/README.md +65 -113
  2. package/bin/cli.mjs +61 -103
  3. package/docs/ARCHITECTURE.md +51 -3
  4. package/docs/README.md +9 -76
  5. package/docs/REFERENCE.md +137 -1827
  6. package/package.json +11 -4
  7. package/src/access-settings.mjs +2 -2
  8. package/src/adapter.mjs +1 -1
  9. package/src/auth-credentials.mjs +1 -1
  10. package/src/auto-review-model.mjs +2 -2
  11. package/src/cli-animation.mjs +2 -2
  12. package/src/cli-auth.mjs +3 -3
  13. package/src/cli-cache.mjs +2 -2
  14. package/src/cli-command-spec.mjs +325 -0
  15. package/src/cli-image.mjs +4 -4
  16. package/src/cli-limits.mjs +2 -2
  17. package/src/cli-m365.mjs +1 -1
  18. package/src/cli-management.mjs +344 -0
  19. package/src/cli-options.mjs +73 -443
  20. package/src/cli-status.mjs +7 -7
  21. package/src/cli-tools.mjs +3 -2
  22. package/src/client-integration.mjs +7 -3
  23. package/src/config.mjs +4 -3
  24. package/src/connection-runtime.mjs +1414 -350
  25. package/src/copilot-token-session.mjs +1 -1
  26. package/src/dashboard/connections.js +23 -4
  27. package/src/dashboard/ui.css +9 -2
  28. package/src/dashboard-api.mjs +5 -5
  29. package/src/doctor.mjs +4 -4
  30. package/src/image-mcp.mjs +2 -2
  31. package/src/native-prediction-fix.mjs +1 -1
  32. package/src/native-prediction-profile.mjs +1 -1
  33. package/src/native-prediction-windows.mjs +1 -1
  34. package/src/native-prediction.mjs +6 -6
  35. package/src/nightly-update.mjs +2 -2
  36. package/src/provider-runtime.mjs +1 -1
  37. package/src/providers/m365-accounts.mjs +1 -1
  38. package/src/release-install.mjs +11 -15
  39. package/src/service-control.mjs +1 -1
  40. package/src/settings-preferences.mjs +6 -4
  41. package/src/startup-ui.mjs +34 -2
  42. package/src/terminal-console.mjs +32 -30
  43. package/src/terminal-state.mjs +69 -0
  44. package/src/usage.mjs +5 -5
  45. package/src/windows-command.mjs +2 -2
  46. package/bin/codex-copilot-dx.mjs +0 -11
  47. package/src/cli-models.mjs +0 -94
  48. package/src/legacy-command-warning.mjs +0 -38
@@ -13,7 +13,7 @@ export function createClientIntegration({ port, host, info = () => {}, warning =
13
13
  const prediction = createPredictionState();
14
14
  let native = null;
15
15
  let operation = null, operationName = null, closed = false;
16
- let pendingRoutePid = null;
16
+ let pendingRoutePid = null, codexSetup = null;
17
17
  async function startPredictionBridge(expectedPort, environment) {
18
18
  const started = await startPrediction({ state: prediction, warning: info,
19
19
  ...(environment ? { environment } : {}), ...(expectedPort ? { expectedPort } : {}) });
@@ -52,7 +52,11 @@ export function createClientIntegration({ port, host, info = () => {}, warning =
52
52
  retirePredictionIntegration();
53
53
  } catch { /* Legacy cleanup is optional; never interrupt or clutter core startup. */ }
54
54
  const enabled = Boolean(readImageProviderConfig());
55
- const { imageMcpSkipped } = ensureCodexConfig(port, { host, imageProviderEnabled: enabled, ...(configLog ? { log: configLog } : {}) });
55
+ let imageMcpSkipped;
56
+ try {
57
+ const result = ensureCodexConfig(port, { host, imageProviderEnabled: enabled, ...(configLog ? { log: configLog } : {}) });
58
+ imageMcpSkipped = result.imageMcpSkipped;codexSetup = { setup: result.coreSetup, checked_at: new Date().toISOString() };
59
+ } catch (error) { codexSetup = { setup: "configuration_unavailable", checked_at: new Date().toISOString() };throw error; }
56
60
  if (enabled && !imageMcpSkipped) {
57
61
  try {
58
62
  const { syncEnabledImageSkill } = await import("./cli-image.mjs");
@@ -120,7 +124,7 @@ export function createClientIntegration({ port, host, info = () => {}, warning =
120
124
  const active = native?.setActive?.(value) ?? false;
121
125
  return { active, state: active ? "active" : native ? "paused" : "needs_setup" };
122
126
  },
123
- snapshot() { return { prediction: { ...prediction.snapshot(), active: native?.enabled?.() === true } }; },
127
+ snapshot() { return { codex: codexSetup ? { ...codexSetup } : null, prediction: { ...prediction.snapshot(), active: native?.enabled?.() === true } }; },
124
128
  busy: () => Boolean(operation),
125
129
  bridgeHealthy: () => native?.healthy?.() === true,
126
130
  pauseForUpdate() { return serialize("pause", async () => { await native?.close();native = null; }); },
package/src/config.mjs CHANGED
@@ -315,7 +315,8 @@ function ensureCodexConfigUnlocked(adapterPort = 2026, {
315
315
  }
316
316
  // Disabled means no image maintenance, including no implicit removal of old
317
317
  // or user-owned entries. Explicit disable-image owns the cleanup operation.
318
- if (!imageProviderEnabled) return { imageMcpSkipped: false };
318
+ const coreSetup = parseCodexToml(core.content).openai_base_url === baseUrl ? "configured" : "preserved";
319
+ if (!imageProviderEnabled) return { coreSetup, imageMcpSkipped: false };
319
320
  try {
320
321
  const previousBaseUrl = content === undefined ? undefined : parseCodexToml(content).openai_base_url;
321
322
  const image = computeImageConfig(core.content, { enabled: true, adapterPort, adapterHost: host }, previousBaseUrl);
@@ -325,9 +326,9 @@ function ensureCodexConfigUnlocked(adapterPort = 2026, {
325
326
  }
326
327
  atomicWriteFileIfChangedSync(filePath, image.content);
327
328
  }
328
- return { imageMcpSkipped: false };
329
+ return { coreSetup, imageMcpSkipped: false };
329
330
  } catch (error) {
330
331
  console.warn(status("warn", `Image MCP setup was skipped: ${error.message}. Core proxy startup will continue.`));
331
- return { imageMcpSkipped: true };
332
+ return { coreSetup, imageMcpSkipped: true };
332
333
  }
333
334
  }