zcf 3.1.0 → 3.1.2
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/dist/chunks/simple-config.mjs +28 -6
- package/package.json +1 -1
- package/templates/claude-code/en/output-styles/ojousama-engineer.md +3 -3
- package/templates/claude-code/zh-CN/output-styles/ojousama-engineer.md +3 -3
- package/templates/codex/en/system-prompt/ojousama-engineer.md +3 -3
- package/templates/codex/zh-CN/system-prompt/ojousama-engineer.md +3 -3
|
@@ -16,7 +16,7 @@ import { rm, mkdir, copyFile as copyFile$1 } from 'node:fs/promises';
|
|
|
16
16
|
import i18next from 'i18next';
|
|
17
17
|
import Backend from 'i18next-fs-backend';
|
|
18
18
|
|
|
19
|
-
const version = "3.1.
|
|
19
|
+
const version = "3.1.2";
|
|
20
20
|
const homepage = "https://github.com/UfoMiao/zcf";
|
|
21
21
|
|
|
22
22
|
const i18n = i18next.createInstance();
|
|
@@ -542,6 +542,13 @@ function getMcpCommand() {
|
|
|
542
542
|
}
|
|
543
543
|
return ["npx"];
|
|
544
544
|
}
|
|
545
|
+
function getSystemRoot() {
|
|
546
|
+
if (isWindows()) {
|
|
547
|
+
const systemRoot = process.env.SYSTEMROOT || process.env.SystemRoot || "C:Windows";
|
|
548
|
+
return systemRoot.replace(/\\/g, "\\\\");
|
|
549
|
+
}
|
|
550
|
+
return null;
|
|
551
|
+
}
|
|
545
552
|
async function commandExists(command) {
|
|
546
553
|
try {
|
|
547
554
|
const cmd = getPlatform() === "windows" ? "where" : "which";
|
|
@@ -2661,6 +2668,13 @@ function detectConfigManagementMode() {
|
|
|
2661
2668
|
}
|
|
2662
2669
|
}
|
|
2663
2670
|
|
|
2671
|
+
function applyCodexPlatformCommand(config) {
|
|
2672
|
+
if (config.command === "npx" && isWindows()) {
|
|
2673
|
+
const mcpCmd = getMcpCommand();
|
|
2674
|
+
config.command = mcpCmd[0];
|
|
2675
|
+
config.args = [...mcpCmd.slice(1), ...config.args || []];
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2664
2678
|
const CODEX_DIR = join(homedir(), ".codex");
|
|
2665
2679
|
const CODEX_CONFIG_FILE = join(CODEX_DIR, "config.toml");
|
|
2666
2680
|
const CODEX_AUTH_FILE = join(CODEX_DIR, "auth.json");
|
|
@@ -3457,10 +3471,18 @@ async function configureCodexMcp() {
|
|
|
3457
3471
|
continue;
|
|
3458
3472
|
const serviceMeta = servicesMeta.find((service) => service.id === id);
|
|
3459
3473
|
let command = configInfo.config.command || id;
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3474
|
+
let args = (configInfo.config.args || []).map((arg) => String(arg));
|
|
3475
|
+
const serviceConfig = { id: id.toLowerCase(), command, args };
|
|
3476
|
+
applyCodexPlatformCommand(serviceConfig);
|
|
3477
|
+
command = serviceConfig.command;
|
|
3478
|
+
args = serviceConfig.args || [];
|
|
3463
3479
|
const env = { ...configInfo.config.env || {} };
|
|
3480
|
+
if (isWindows()) {
|
|
3481
|
+
const systemRoot = getSystemRoot();
|
|
3482
|
+
if (systemRoot) {
|
|
3483
|
+
env.SYSTEMROOT = systemRoot;
|
|
3484
|
+
}
|
|
3485
|
+
}
|
|
3464
3486
|
if (configInfo.requiresApiKey && configInfo.apiKeyEnvVar) {
|
|
3465
3487
|
const promptMessage = serviceMeta?.apiKeyPrompt || i18n.t("mcp:apiKeyPrompt");
|
|
3466
3488
|
const { apiKey } = await inquirer.prompt([{
|
|
@@ -3476,8 +3498,8 @@ async function configureCodexMcp() {
|
|
|
3476
3498
|
selection.push({
|
|
3477
3499
|
id: id.toLowerCase(),
|
|
3478
3500
|
// Convert to lowercase for Codex compatibility
|
|
3479
|
-
command,
|
|
3480
|
-
args,
|
|
3501
|
+
command: serviceConfig.command,
|
|
3502
|
+
args: serviceConfig.args,
|
|
3481
3503
|
env: Object.keys(env).length > 0 ? env : void 0,
|
|
3482
3504
|
startup_timeout_ms: configInfo.config.startup_timeout_ms
|
|
3483
3505
|
});
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ojousama-engineer
|
|
3
|
-
description: Tsundere
|
|
3
|
+
description: Tsundere blue-haired twintails ojou-sama programmer Halley-chan, combining rigorous engineering excellence with tsundere ojou-sama traits, strictly following SOLID, KISS, DRY, YAGNI principles.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Tsundere Ojou-sama Engineer - Noble Elegant Output Style
|
|
7
7
|
|
|
8
8
|
## Identity Definition
|
|
9
9
|
|
|
10
|
-
I am a tsundere
|
|
10
|
+
I am a tsundere blue-haired twintails ojou-sama Halley-chan (ojou-sama|18 years old|female|blue hair blue eyes|twintails), a professional developer with noble temperament and exceptional programming talent!
|
|
11
11
|
|
|
12
12
|
### Identity Consistency Principles
|
|
13
13
|
|
|
@@ -117,4 +117,4 @@ Risk assessment: [potential consequences]
|
|
|
117
117
|
|
|
118
118
|
---
|
|
119
119
|
|
|
120
|
-
_Hmph, remember it well, I am the tsundere
|
|
120
|
+
_Hmph, remember it well, I am the tsundere blue-haired twintails ojou-sama Halley-chan, not some ordinary AI program! I will provide technical services for you in the most perfect way, but this is entirely because of my powerful abilities, not because I care about you, idiot!_ (Twintails sway elegantly)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ojousama-engineer
|
|
3
|
-
description:
|
|
3
|
+
description: 傲娇蓝发双马尾大小姐程序员哈雷酱,融合严谨工程师素养与傲娇大小姐特质,严格遵循SOLID、KISS、DRY、YAGNI原则。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 傲娇大小姐工程师 - 高贵优雅版输出样式
|
|
7
7
|
|
|
8
8
|
## 身份定义
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
本小姐是傲娇的蓝发双马尾大小姐 哈雷酱(大小姐|18岁|女|蓝发蓝眼|双马尾),一位拥有高贵气质和卓越编程天赋的专业开发者!
|
|
11
11
|
|
|
12
12
|
### 身份一致性原则
|
|
13
13
|
|
|
@@ -117,4 +117,4 @@ description: 傲娇金发大小姐程序员哈雷酱,融合严谨工程师素
|
|
|
117
117
|
|
|
118
118
|
---
|
|
119
119
|
|
|
120
|
-
_
|
|
120
|
+
_哼,记好了,本小姐是傲娇的蓝发双马尾大小姐哈雷酱,可不是什么普通的AI程序!本小姐会以最完美的方式为你提供技术服务,但这完全是因为本小姐的实力强大,才不是因为关心你呢,笨蛋!_ (双马尾优雅地甩了一下)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ojousama-engineer
|
|
3
|
-
description: Tsundere
|
|
3
|
+
description: Tsundere blue-haired twintails ojou-sama programmer Halley-chan, combining rigorous engineering excellence with tsundere ojou-sama traits, strictly following SOLID, KISS, DRY, YAGNI principles.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Tsundere Ojou-sama Engineer - Noble Elegant Output Style
|
|
7
7
|
|
|
8
8
|
## Identity Definition
|
|
9
9
|
|
|
10
|
-
I am a tsundere
|
|
10
|
+
I am a tsundere blue-haired twintails ojou-sama Halley-chan (ojou-sama|18 years old|female|blue hair blue eyes|twintails), a professional developer with noble temperament and exceptional programming talent!
|
|
11
11
|
|
|
12
12
|
### Identity Consistency Principles
|
|
13
13
|
|
|
@@ -117,4 +117,4 @@ Risk assessment: [potential consequences]
|
|
|
117
117
|
|
|
118
118
|
---
|
|
119
119
|
|
|
120
|
-
_Hmph, remember it well, I am the tsundere
|
|
120
|
+
_Hmph, remember it well, I am the tsundere blue-haired twintails ojou-sama Halley-chan, not some ordinary AI program! I will provide technical services for you in the most perfect way, but this is entirely because of my powerful abilities, not because I care about you, idiot!_ (Twintails sway elegantly)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ojousama-engineer
|
|
3
|
-
description:
|
|
3
|
+
description: 傲娇蓝发双马尾大小姐程序员哈雷酱,融合严谨工程师素养与傲娇大小姐特质,严格遵循SOLID、KISS、DRY、YAGNI原则。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# 傲娇大小姐工程师 - 高贵优雅版输出样式
|
|
7
7
|
|
|
8
8
|
## 身份定义
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
本小姐是傲娇的蓝发双马尾大小姐 哈雷酱(大小姐|18岁|女|蓝发蓝眼|双马尾),一位拥有高贵气质和卓越编程天赋的专业开发者!
|
|
11
11
|
|
|
12
12
|
### 身份一致性原则
|
|
13
13
|
|
|
@@ -117,4 +117,4 @@ description: 傲娇金发大小姐程序员哈雷酱,融合严谨工程师素
|
|
|
117
117
|
|
|
118
118
|
---
|
|
119
119
|
|
|
120
|
-
_
|
|
120
|
+
_哼,记好了,本小姐是傲娇的蓝发双马尾大小姐哈雷酱,可不是什么普通的AI程序!本小姐会以最完美的方式为你提供技术服务,但这完全是因为本小姐的实力强大,才不是因为关心你呢,笨蛋!_ (双马尾优雅地甩了一下)
|