@ranger1/dx 0.1.23 → 0.1.25

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.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  allowed-tools: [Bash, AskUserQuestion, Edit, Read, Write]
3
3
  description: '环境诊断'
4
- agent: middle
4
+ agent: build
5
5
  ---
6
6
 
7
7
  ---
@@ -16,6 +16,16 @@ pnpm i -g @ranger1/dx
16
16
 
17
17
  ---
18
18
 
19
+ ## Step 0.1: 强制执行 dx initial(同步 OpenCode 模板)
20
+
21
+ **安装完成后,必须执行一次(可重复执行):**
22
+
23
+ ```bash
24
+ dx initial
25
+ ```
26
+
27
+ ---
28
+
19
29
  ## Step 1: 并行检测
20
30
 
21
31
  **同时执行以下 3 个 Bash 调用(真正并行):**
@@ -52,6 +62,13 @@ echo "agent.quick:" && (grep -Eq '"agent"[[:space:]]*:' ~/.config/opencode/openc
52
62
  echo "agent.middle:" && (grep -Eq '"agent"[[:space:]]*:' ~/.config/opencode/opencode.json 2>/dev/null && grep -Eq '"middle"[[:space:]]*:' ~/.config/opencode/opencode.json 2>/dev/null && echo "CONFIGURED" || echo "NOT_CONFIGURED");
53
63
  ```
54
64
 
65
+ ```bash
66
+ # 批次 5: Python 检测(python3 + python 软链接)
67
+ echo "=== PYTHON ===";
68
+ echo "python3:" && (which python3 && python3 --version 2>/dev/null || echo "NOT_FOUND");
69
+ echo "python:" && (which python && python --version 2>/dev/null || echo "NOT_FOUND");
70
+ ```
71
+
55
72
  ---
56
73
 
57
74
  ## Step 2: 输出报告
@@ -62,6 +79,8 @@ echo "agent.middle:" && (grep -Eq '"agent"[[:space:]]*:' ~/.config/opencode/open
62
79
  工具 | 状态 | 版本
63
80
  opencode | <状态> | <版本>
64
81
  dx | <状态> | <版本>
82
+ python3 | <状态> | <版本>
83
+ python(软链接) | <状态> | <版本>
65
84
  AGENTS.md | <状态> | -
66
85
  全局 instructions 配置 | <状态> | -
67
86
  oh-my-opencode 插件 | <状态> | -
@@ -163,6 +182,47 @@ grep -E 'oh-my-opencode|opencode-openai-codex-auth' ~/.config/opencode/opencode.
163
182
  npm install -g agent-browser && agent-browser install
164
183
  ```
165
184
 
185
+ ### 3.6.1 python3 未安装
186
+
187
+ 执行安装:
188
+
189
+ ```bash
190
+ # macOS (Homebrew)
191
+ brew install python
192
+ ```
193
+
194
+ ### 3.6.2 python 命令缺失(需要软链接到 python3)
195
+
196
+ 如果 `python` 不存在但 `python3` 存在,执行:
197
+
198
+ ```bash
199
+ set -e
200
+
201
+ if command -v python >/dev/null 2>&1; then
202
+ python --version
203
+ exit 0
204
+ fi
205
+
206
+ PY3="$(command -v python3 2>/dev/null || true)"
207
+ if [ -z "$PY3" ]; then
208
+ echo "python3 NOT_FOUND"
209
+ exit 1
210
+ fi
211
+
212
+ PY_DIR="$(dirname "$PY3")"
213
+ if [ -w "$PY_DIR" ]; then
214
+ ln -sf "$PY3" "$PY_DIR/python"
215
+ echo "linked: $PY_DIR/python -> $PY3"
216
+ else
217
+ mkdir -p "$HOME/.local/bin"
218
+ ln -sf "$PY3" "$HOME/.local/bin/python"
219
+ echo "linked: $HOME/.local/bin/python -> $PY3"
220
+ echo "NOTE: ensure $HOME/.local/bin is in PATH"
221
+ fi
222
+
223
+ python --version
224
+ ```
225
+
166
226
  ### 3.7 全局 oh-my-opencode.json 配置缺失
167
227
 
168
228
  **注意:oh-my-opencode 配置应在全局配置文件 `~/.config/opencode/oh-my-opencode.json` 中,而非项目根目录。**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranger1/dx",
3
- "version": "0.1.23",
3
+ "version": "0.1.25",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {