codex-copilot-dx 1.2.33 → 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.
- package/README.md +64 -110
- package/bin/cli.mjs +38 -102
- package/docs/ARCHITECTURE.md +23 -7
- package/docs/README.md +9 -76
- package/docs/REFERENCE.md +137 -1936
- package/package.json +11 -4
- package/src/access-settings.mjs +2 -2
- package/src/adapter.mjs +1 -1
- package/src/auth-credentials.mjs +1 -1
- package/src/auto-review-model.mjs +2 -2
- package/src/cli-animation.mjs +2 -2
- package/src/cli-auth.mjs +3 -3
- package/src/cli-cache.mjs +2 -2
- package/src/cli-command-spec.mjs +260 -58
- package/src/cli-image.mjs +2 -2
- package/src/cli-limits.mjs +2 -2
- package/src/cli-m365.mjs +1 -1
- package/src/cli-management.mjs +7 -3
- package/src/cli-options.mjs +71 -408
- package/src/connection-runtime.mjs +1408 -377
- package/src/copilot-token-session.mjs +1 -1
- package/src/dashboard/connections.js +23 -4
- package/src/dashboard/ui.css +9 -2
- package/src/dashboard-api.mjs +5 -5
- package/src/doctor.mjs +4 -4
- package/src/image-mcp.mjs +2 -2
- package/src/native-prediction-fix.mjs +1 -1
- package/src/native-prediction-profile.mjs +1 -1
- package/src/native-prediction-windows.mjs +1 -1
- package/src/native-prediction.mjs +6 -6
- package/src/nightly-update.mjs +2 -2
- package/src/provider-runtime.mjs +1 -1
- package/src/providers/m365-accounts.mjs +1 -1
- package/src/release-install.mjs +11 -15
- package/src/startup-ui.mjs +15 -11
- package/src/terminal-console.mjs +5 -4
- package/src/terminal-state.mjs +1 -1
- package/src/usage.mjs +5 -5
- package/src/windows-command.mjs +2 -2
- package/bin/codex-copilot-dx.mjs +0 -11
- package/src/cli-models.mjs +0 -94
- package/src/legacy-command-warning.mjs +0 -38
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import os from "node:os";
|
|
3
|
-
import path from "node:path";
|
|
4
|
-
import { atomicWriteFileSync } from "./atomic-file.mjs";
|
|
5
|
-
|
|
6
|
-
export const LEGACY_COMMAND_WARNING_INTERVAL_MS = 7 * 24 * 60 * 60 * 1000;
|
|
7
|
-
export const LEGACY_COMMAND_WARNING = "codex-copilot-dx is deprecated; use ccdx instead. The compatibility alias will be removed in a future breaking release.";
|
|
8
|
-
|
|
9
|
-
export function legacyCommandWarningPath({ env = process.env, home = os.homedir() } = {}) {
|
|
10
|
-
const xdgCacheHome = String(env.XDG_CACHE_HOME || "").trim();
|
|
11
|
-
const cacheRoot = xdgCacheHome || path.join(home, ".cache");
|
|
12
|
-
return path.join(cacheRoot, "codex-copilot-dx", "legacy-command-warning");
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export function shouldShowLegacyCommandWarning({
|
|
16
|
-
env = process.env,
|
|
17
|
-
home = os.homedir(),
|
|
18
|
-
interactive = process.stderr.isTTY === true,
|
|
19
|
-
now = Date.now(),
|
|
20
|
-
} = {}) {
|
|
21
|
-
if (!interactive) return false;
|
|
22
|
-
const filePath = legacyCommandWarningPath({ env, home });
|
|
23
|
-
try {
|
|
24
|
-
const previous = Number.parseInt(fs.readFileSync(filePath, "utf8"), 10);
|
|
25
|
-
if (Number.isFinite(previous) && Math.abs(now - previous) < LEGACY_COMMAND_WARNING_INTERVAL_MS) {
|
|
26
|
-
return false;
|
|
27
|
-
}
|
|
28
|
-
} catch {
|
|
29
|
-
// A missing or unreadable cache must not prevent the compatibility command.
|
|
30
|
-
}
|
|
31
|
-
try {
|
|
32
|
-
atomicWriteFileSync(filePath, `${now}\n`, { mode: 0o600 });
|
|
33
|
-
return true;
|
|
34
|
-
} catch {
|
|
35
|
-
// Stay silent when the throttle cannot persist, otherwise every invocation would warn.
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
}
|