@ranger1/dx 0.1.22 → 0.1.24

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: sisyphus
4
+ agent: middle
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` 中,而非项目根目录。**
@@ -34,18 +34,20 @@ agent: sisyphus
34
34
  - 若仍返回 `{"ok":false,"fixFile":"..."}`:第 2 次 Task `pr-fix` → 再 Task `pr-precheck`
35
35
  - 若仍不是 `{"ok":true}`:终止并回传错误(建议:`{"error":"PRECHECK_NOT_CLEAN_AFTER_FIX"}`)
36
36
 
37
- 1. Task: `pr-context`
37
+ 1. Task: `pr-context` **(必须先完成,不可与 Step 2 并行)**
38
38
 
39
39
  - prompt 必须包含:`PR #{{PR_NUMBER}}`、`round: <ROUND>`
40
40
  - 若返回 `{"error":"..."}`:立即终止本轮并回传错误(不再调用 reviewers)
41
41
  - 取出:`contextFile`、`runId`、`headOid`(如有)
42
+ - **CRITICAL**: 必须等待此 Task 成功完成并获取到 `contextFile` 后,才能进入 Step 2
42
43
 
43
- 2. Task(并行): `codex-reviewer` + `claude-reviewer` + `gemini-reviewer`
44
+ 2. Task(并行): `codex-reviewer` + `claude-reviewer` + `gemini-reviewer` **(依赖 Step 1 的 contextFile)**
44
45
 
46
+ - **DEPENDENCY**: 这三个 reviewers 依赖 Step 1 返回的 `contextFile`,因此**必须等 Step 1 完成后才能并行启动**
45
47
  - 每个 reviewer prompt 必须包含:
46
48
  - `PR #{{PR_NUMBER}}`
47
49
  - `round: <ROUND>`
48
- - `contextFile: <path>`
50
+ - `contextFile: <path>`(来自 Step 1 的输出)
49
51
  - reviewer 默认读 `contextFile`;必要时允许用 `git/gh` 只读命令拿 diff
50
52
  - 忽略问题:1.格式化代码引起的噪音 2.已经lint检查以外的格式问题
51
53
  - 特别关注: 逻辑、安全、性能、可维护性
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ranger1/dx",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "repository": {