@codextheme/cli 0.2.9 → 0.2.10
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 +5 -5
- package/package.json +2 -2
- package/src/handoff-runner.mjs +2 -0
- package/src/lifecycle.mjs +5 -1
- package/src/main.mjs +6 -4
package/README.md
CHANGED
|
@@ -5,13 +5,13 @@ Fixed-version, one-command curated and private custom skins for Codex Desktop on
|
|
|
5
5
|
Apply a catalog skin:
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npx --yes @codextheme/cli@0.2.
|
|
8
|
+
npx --yes @codextheme/cli@0.2.10 apply cathedral-nocturne
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
The custom skin studio at [codextheme.tech](https://codextheme.tech) creates an expiring private command:
|
|
12
12
|
|
|
13
13
|
```sh
|
|
14
|
-
npx --yes @codextheme/cli@0.2.
|
|
14
|
+
npx --yes @codextheme/cli@0.2.10 apply-private <private-id>
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
Private packages are downloaded only from the fixed `https://codextheme.tech` origin, bounded, integrity-checked, schema-validated, safety-linted, and cached locally with owner-only permissions. The temporary server link expires after 24 hours; `reapply` uses the validated local cache and works after that link expires.
|
|
@@ -19,10 +19,10 @@ Private packages are downloaded only from the fixed `https://codextheme.tech` or
|
|
|
19
19
|
The CLI emits and applies only CodexTheme-owned package and renderer names. Historical cached packages are normalized by the runtime compatibility layer without exposing the former namespace in normal command output.
|
|
20
20
|
|
|
21
21
|
```sh
|
|
22
|
-
npx --yes @codextheme/cli@0.2.
|
|
23
|
-
npx --yes @codextheme/cli@0.2.
|
|
22
|
+
npx --yes @codextheme/cli@0.2.10 reapply
|
|
23
|
+
npx --yes @codextheme/cli@0.2.10 restore
|
|
24
24
|
```
|
|
25
25
|
|
|
26
|
-
The CLI has no install scripts, does not use `sudo`, and does not modify the Codex application bundle. Requirements: macOS, Node.js 22.4+, and Codex Desktop. A running Codex process is never closed or reopened without an explicit `y` confirmation. After confirmation, version 0.2.
|
|
26
|
+
The CLI has no install scripts, does not use `sudo`, and does not modify the Codex application bundle. Requirements: macOS, Node.js 22.4+, and Codex Desktop. A running Codex process is never closed or reopened without an explicit `y` confirmation. After confirmation, version 0.2.10 uses an owner-only detached one-shot worker so an apply started inside Codex survives that restart; it does not install a persistent service.
|
|
27
27
|
|
|
28
28
|
CodexTheme is an independent project and is not affiliated with or endorsed by OpenAI.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codextheme/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "One-command curated and private custom skins for Codex Desktop on macOS.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"test": "node --test"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@codextheme/runtime": "0.1.
|
|
21
|
+
"@codextheme/runtime": "0.1.4"
|
|
22
22
|
},
|
|
23
23
|
"engines": {
|
|
24
24
|
"node": ">=22.4"
|
package/src/handoff-runner.mjs
CHANGED
|
@@ -3,8 +3,10 @@ import { applyPrivateTheme, applyTheme } from "./lifecycle.mjs";
|
|
|
3
3
|
|
|
4
4
|
const PUBLIC_FAILURES = new Map([
|
|
5
5
|
["E_CODEX_NOT_FOUND", "没有找到已安装的 Codex Desktop。"],
|
|
6
|
+
["E_RESTART_FAILED", "重新打开 Codex 时,旧进程或本机调试端口未能及时释放。"],
|
|
6
7
|
["E_DOM_INCOMPATIBLE", "当前 Codex 界面结构与该主题暂不兼容。"],
|
|
7
8
|
["E_CORE_VERIFY", "主题应用后的完整性验证失败。"],
|
|
9
|
+
["E_RUNTIME_FAILED", "Codex 主题运行时未能完成本次操作。"],
|
|
8
10
|
["E_PRIVATE_CACHE", "无法安全读取本地私有主题缓存。"],
|
|
9
11
|
["E_RESTORE_FAILED", "主题应用失败,且未能完整恢复 Codex 官方外观。"],
|
|
10
12
|
["E_HANDOFF_BUSY", "已有一个 Codex 重启任务正在处理。"],
|
package/src/lifecycle.mjs
CHANGED
|
@@ -11,12 +11,16 @@ function mappedError(error) {
|
|
|
11
11
|
switch (error?.code) {
|
|
12
12
|
case "CODEXTHEME_RESTART_REQUIRED":
|
|
13
13
|
return new CliError("E_RESTART_REQUIRED", "需要得到你的确认后才能重新打开 Codex。");
|
|
14
|
+
case "CODEXTHEME_SHUTDOWN_TIMEOUT":
|
|
15
|
+
case "CODEXTHEME_PORT_OCCUPIED":
|
|
16
|
+
case "CODEXTHEME_TARGET_TIMEOUT":
|
|
17
|
+
return new CliError("E_RESTART_FAILED", "重新打开 Codex 时,旧进程或本机调试端口未能及时释放。");
|
|
14
18
|
case "CODEXTHEME_DOM_INCOMPATIBLE":
|
|
15
19
|
return new CliError("E_DOM_INCOMPATIBLE", "当前 Codex 界面结构与该主题暂不兼容。");
|
|
16
20
|
case "CODEXTHEME_VERIFY_FAILED":
|
|
17
21
|
return new CliError("E_CORE_VERIFY", "主题应用后的完整性验证失败,已尝试回滚。");
|
|
18
22
|
default:
|
|
19
|
-
return new CliError("
|
|
23
|
+
return new CliError("E_RUNTIME_FAILED", "Codex 主题运行时未能完成本次操作。");
|
|
20
24
|
}
|
|
21
25
|
}
|
|
22
26
|
|
package/src/main.mjs
CHANGED
|
@@ -7,9 +7,9 @@ import { confirmRestart } from "./prompt.mjs";
|
|
|
7
7
|
import { runtime as productionRuntime } from "./runtime.mjs";
|
|
8
8
|
import { createStateStore } from "./state.mjs";
|
|
9
9
|
|
|
10
|
-
export const VERSION = "0.2.
|
|
11
|
-
const REAPPLY = "npx --yes @codextheme/cli@0.2.
|
|
12
|
-
const RESTORE = "npx --yes @codextheme/cli@0.2.
|
|
10
|
+
export const VERSION = "0.2.10";
|
|
11
|
+
const REAPPLY = "npx --yes @codextheme/cli@0.2.10 reapply";
|
|
12
|
+
const RESTORE = "npx --yes @codextheme/cli@0.2.10 restore";
|
|
13
13
|
|
|
14
14
|
const HELP = `CodexTheme ${VERSION}
|
|
15
15
|
|
|
@@ -33,8 +33,10 @@ function safePublicError(error) {
|
|
|
33
33
|
"E_PLATFORM",
|
|
34
34
|
"E_CODEX_NOT_FOUND",
|
|
35
35
|
"E_RESTART_REQUIRED",
|
|
36
|
+
"E_RESTART_FAILED",
|
|
36
37
|
"E_DOM_INCOMPATIBLE",
|
|
37
38
|
"E_CORE_VERIFY",
|
|
39
|
+
"E_RUNTIME_FAILED",
|
|
38
40
|
"E_RESTORE_FAILED",
|
|
39
41
|
"E_PRIVATE_NOT_FOUND",
|
|
40
42
|
"E_PRIVATE_EXPIRED",
|
|
@@ -45,7 +47,7 @@ function safePublicError(error) {
|
|
|
45
47
|
"E_HANDOFF_FAILED",
|
|
46
48
|
]);
|
|
47
49
|
if (allowed.has(error?.code)) return { code: error.code, message: error.message, exitCode: 1 };
|
|
48
|
-
return { code: "
|
|
50
|
+
return { code: "E_RUNTIME_FAILED", message: "CodexTheme 未能完成本次操作。", exitCode: 1 };
|
|
49
51
|
}
|
|
50
52
|
|
|
51
53
|
function writeApplyResult(stdout, result, name, successMessage, { showReapply = true } = {}) {
|