ace-tool-windows 0.2.6 → 0.2.7
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 +69 -63
- package/bin/ace-tool-win.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,37 +19,36 @@ npm i -g ace-tool-windows
|
|
|
19
19
|
- 优先通过环境变量或本地 MCP 配置注入。
|
|
20
20
|
- 即便使用 `codex` provider,`search_context` 仍依赖远端服务,必须配置 token。
|
|
21
21
|
|
|
22
|
-
## 3.
|
|
22
|
+
## 3. 模式速览(先选一个)
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
### 3.1 `remote` 模式
|
|
25
|
+
- 适合:不依赖本机 `codex` CLI,开箱可用。
|
|
26
|
+
- 依赖:远端 token/credits。
|
|
27
|
+
- 启动示例:
|
|
25
28
|
|
|
26
29
|
```powershell
|
|
27
|
-
ace-tool-win --base-url https://acemcp.heroman.wtf/relay/ --token <YOUR_TOKEN>
|
|
30
|
+
ace-tool-win --base-url https://acemcp.heroman.wtf/relay/ --token <YOUR_TOKEN> --provider remote
|
|
28
31
|
```
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
### 3.2 `codex` 模式
|
|
34
|
+
- 适合:希望本地走 Codex 增强,避免远端增强额度影响。
|
|
35
|
+
- 依赖:本机可执行 `codex` CLI(`codex --version` 可用)。
|
|
36
|
+
- 启动示例:
|
|
31
37
|
|
|
32
38
|
```powershell
|
|
33
|
-
ace-tool-win --base-url https://acemcp.heroman.wtf/relay/ --token <YOUR_TOKEN> --provider codex --codex-cmd codex
|
|
39
|
+
ace-tool-win --base-url https://acemcp.heroman.wtf/relay/ --token <YOUR_TOKEN> --provider codex --codex-cmd codex --codex-reasoning-effort low
|
|
34
40
|
```
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
- `--codex-reasoning-effort <none|minimal|low|medium|high|xhigh>`:Codex 推理强度,默认 `low`
|
|
41
|
-
- `--enhance-timeout-sec 90`:增强调用超时(10-600 秒);未显式配置时 `remote` 默认 90 秒,`codex` 默认 180 秒
|
|
42
|
+
关键说明:
|
|
43
|
+
- `search_context` 始终走远端,所以即便是 `codex` 模式也必须有可用 token。
|
|
44
|
+
- `codex_cmd` 推荐先用 `codex`(PATH 方案,跨设备更稳),确实找不到再写绝对路径。
|
|
45
|
+
- 交互窗口支持自适应布局;Codex 首轮超时会自动重试一次 `reasoning_effort=none`。
|
|
42
46
|
|
|
43
|
-
|
|
44
|
-
- 当前版本不会写死单一路径:`args.codex_cmd` > 启动参数/环境变量 > 默认 `codex`,再按“直接路径 -> PATH 查找 -> Windows 常见位置(Volta/npm)”解析可执行文件。
|
|
45
|
-
- 调用 Codex 时默认附加 `-c "mcp_servers.mcp-router.enabled=false"`,避免 Codex 内部 `mcp-router` 启动抖动影响首轮增强。
|
|
46
|
-
- Codex 超时时会自动降级重试一次 `reasoning_effort=none`(仅在首轮超时时触发)。
|
|
47
|
-
- `--ui-timeout-sec 480`:UI 会话超时(30-3600 秒)
|
|
48
|
-
- UI 窗口支持自适应布局(拖拽/缩放窗口时,编辑区与按钮区域会自动重排)。
|
|
47
|
+
## 4. MCP 配置模板(按模式复制)
|
|
49
48
|
|
|
50
|
-
|
|
49
|
+
### 4.1 `remote` 模式模板
|
|
51
50
|
|
|
52
|
-
|
|
51
|
+
JSON(适用于支持 `mcpServers` 的客户端):
|
|
53
52
|
|
|
54
53
|
```json
|
|
55
54
|
{
|
|
@@ -66,7 +65,21 @@ Windows 说明:
|
|
|
66
65
|
}
|
|
67
66
|
```
|
|
68
67
|
|
|
69
|
-
|
|
68
|
+
TOML(Codex CLI):
|
|
69
|
+
|
|
70
|
+
```toml
|
|
71
|
+
[mcpServers."ace-tool-windows"]
|
|
72
|
+
command = "ace-tool-win"
|
|
73
|
+
args = [
|
|
74
|
+
"--base-url", "https://acemcp.heroman.wtf/relay/",
|
|
75
|
+
"--token", "<YOUR_TOKEN>",
|
|
76
|
+
"--provider", "remote"
|
|
77
|
+
]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### 4.2 `codex` 模式模板
|
|
81
|
+
|
|
82
|
+
JSON(适用于支持 `mcpServers` 的客户端):
|
|
70
83
|
|
|
71
84
|
```json
|
|
72
85
|
{
|
|
@@ -76,14 +89,16 @@ Windows 说明:
|
|
|
76
89
|
"args": [
|
|
77
90
|
"--base-url", "https://acemcp.heroman.wtf/relay/",
|
|
78
91
|
"--token", "<YOUR_TOKEN>",
|
|
79
|
-
"--provider", "
|
|
92
|
+
"--provider", "codex",
|
|
93
|
+
"--codex-cmd", "codex",
|
|
94
|
+
"--codex-reasoning-effort", "low"
|
|
80
95
|
]
|
|
81
96
|
}
|
|
82
97
|
}
|
|
83
98
|
}
|
|
84
99
|
```
|
|
85
100
|
|
|
86
|
-
|
|
101
|
+
TOML(Codex CLI):
|
|
87
102
|
|
|
88
103
|
```toml
|
|
89
104
|
[mcpServers."ace-tool-windows"]
|
|
@@ -91,43 +106,18 @@ command = "ace-tool-win"
|
|
|
91
106
|
args = [
|
|
92
107
|
"--base-url", "https://acemcp.heroman.wtf/relay/",
|
|
93
108
|
"--token", "<YOUR_TOKEN>",
|
|
94
|
-
"--provider", "
|
|
109
|
+
"--provider", "codex",
|
|
110
|
+
"--codex-cmd", "codex",
|
|
111
|
+
"--codex-reasoning-effort", "low"
|
|
95
112
|
]
|
|
96
113
|
```
|
|
97
114
|
|
|
98
|
-
|
|
99
|
-
- `--provider`, `codex`
|
|
100
|
-
- `--codex-cmd`, `<codex 可执行路径或命令>`
|
|
101
|
-
|
|
102
|
-
## 5. Provider 选择(remote / codex)
|
|
103
|
-
|
|
104
|
-
优先级:
|
|
105
|
-
1. 启动参数 `--provider` / 环境变量
|
|
106
|
-
2. 默认 `remote`
|
|
107
|
-
3. `enhance_prompt` 调用参数 `provider` 只做一致性校验,不用于切换
|
|
108
|
-
|
|
109
|
-
注意:
|
|
110
|
-
- 仅 `enhance_prompt` 使用 provider 配置;`search_context` 始终使用远端。
|
|
111
|
-
- `provider` 只允许 `remote` / `codex`,非法值会导致启动报错。
|
|
112
|
-
- 请求级 `provider` 不允许与启动 provider 不一致;不一致会直接报错并拒绝执行(默认强约束,避免会话中途切到 remote)。
|
|
113
|
-
- `codex` provider 需要本地 `codex` CLI 可执行(可用 `--codex-cmd` 指定路径)。
|
|
114
|
-
- `codex_cmd` 不是固定绝对路径,默认会按当前机器环境自动解析;跨设备建议先用 `codex`,失败再改绝对路径。
|
|
115
|
+
## 5. Provider 行为(当前版本)
|
|
115
116
|
|
|
116
|
-
`
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
"prompt": "为当前项目添加登录功能 -enhance",
|
|
121
|
-
"conversation_history": "User: ...\nAssistant: ...",
|
|
122
|
-
"project_root_path": "F:/GitlabProjects/ace-tool-windows",
|
|
123
|
-
"provider": "codex",
|
|
124
|
-
"codex_cmd": "C:/Users/X1/AppData/Local/Volta/bin/codex"
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
说明:
|
|
129
|
-
- `codex_cmd` 是 `enhance_prompt` 的可选外部覆盖参数,优先级高于启动参数和环境变量。
|
|
130
|
-
- 用户输入里的触发后缀(`-enhance` / `-enhancer`)会在增强前自动剥离,不会进入最终增强文本。
|
|
117
|
+
- 启动时确定 provider:`--provider` / `ACE_TOOL_ENHANCE_PROVIDER`,默认 `remote`。
|
|
118
|
+
- 请求参数里的 `provider` 仅作为提示,不用于切换模式。
|
|
119
|
+
- 如果请求里的 `provider` 与启动 provider 不一致,会自动忽略,仍以启动 provider 为准。
|
|
120
|
+
- 不会再自动从 `codex` 降级到 `remote`。
|
|
131
121
|
|
|
132
122
|
## 6. 在 AI CLI 中触发增强
|
|
133
123
|
|
|
@@ -140,16 +130,32 @@ args = [
|
|
|
140
130
|
```
|
|
141
131
|
|
|
142
132
|
补充:
|
|
143
|
-
-
|
|
144
|
-
-
|
|
133
|
+
- 用户输入里的触发后缀(`-enhance` / `-enhancer`)会在增强前自动剥离,不会进入最终增强文本。
|
|
134
|
+
- 若本次调用的 `prompt` 仅包含触发后缀,服务端会自动回退到 `conversation_history` 提取可用提示,不再直接报错中断。
|
|
135
|
+
- 工具入口统一为 `enhance_prompt`,避免同义工具名导致重复触发。
|
|
136
|
+
- 服务端会对短时间内完全相同的增强请求做去重(约 180 秒),避免“窗口刚关又被同参再次拉起”。
|
|
137
|
+
- 增强文本采用“语义自适应”排版:在不改变语义前提下提升细节和可读性,不强制固定模板。
|
|
138
|
+
|
|
139
|
+
## 7. 环境变量(按模式)
|
|
140
|
+
|
|
141
|
+
### 7.1 `remote` 模式
|
|
142
|
+
|
|
143
|
+
```powershell
|
|
144
|
+
$env:ACE_TOOL_ENHANCE_PROVIDER = "remote"
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 7.2 `codex` 模式
|
|
148
|
+
|
|
149
|
+
```powershell
|
|
150
|
+
$env:ACE_TOOL_ENHANCE_PROVIDER = "codex"
|
|
151
|
+
$env:ACE_TOOL_CODEX_CMD = "codex"
|
|
152
|
+
$env:ACE_TOOL_CODEX_REASONING_EFFORT = "low"
|
|
153
|
+
```
|
|
145
154
|
|
|
146
|
-
|
|
155
|
+
### 7.3 通用变量
|
|
147
156
|
|
|
148
|
-
- `
|
|
149
|
-
- `
|
|
150
|
-
- `ACE_TOOL_CODEX_REASONING_EFFORT=low`
|
|
151
|
-
- `ACE_TOOL_ENHANCE_TIMEOUT_SEC=90`(未设置时 `remote` 默认 90 秒,`codex` 默认 180 秒)
|
|
152
|
-
- `ACE_TOOL_UI_TIMEOUT_SEC=480`
|
|
157
|
+
- `ACE_TOOL_ENHANCE_TIMEOUT_SEC=90`(范围 10-600;未显式配置时 `remote` 默认 90 秒,`codex` 默认 180 秒)
|
|
158
|
+
- `ACE_TOOL_UI_TIMEOUT_SEC=480`(范围 30-3600)
|
|
153
159
|
- `ACE_TOOL_HEADLESS=1`
|
|
154
160
|
- `ACE_TOOL_HEADLESS_ACTION=enhanced|end|timeout`
|
|
155
161
|
- `ACE_TOOL_DEBUG=1`
|
package/bin/ace-tool-win.exe
CHANGED
|
Binary file
|