@ranger1/dx 0.1.18 → 0.1.20
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.
|
@@ -32,8 +32,7 @@ echo "agent-browser:" && (which agent-browser && agent-browser --version 2>/dev/
|
|
|
32
32
|
# 批次 2: 项目文件检测
|
|
33
33
|
echo "=== PROJECT_FILES ===";
|
|
34
34
|
echo "AGENTS.md:" && (test -f AGENTS.md && echo "FOUND" || echo "NOT_FOUND");
|
|
35
|
-
echo "
|
|
36
|
-
echo "instructions:" && (if [ -f opencode.json ]; then grep -q '"AGENTS.md"' opencode.json && grep -q '"ruler/' opencode.json && echo "VALID" || echo "INVALID"; else echo "SKIP"; fi);
|
|
35
|
+
echo "instructions:" && (grep -q '"AGENTS.md"' ~/.config/opencode/opencode.json 2>/dev/null && grep -q '"ruler/' ~/.config/opencode/opencode.json 2>/dev/null && echo "CONFIGURED" || echo "NOT_CONFIGURED");
|
|
37
36
|
```
|
|
38
37
|
|
|
39
38
|
```bash
|
|
@@ -49,8 +48,8 @@ echo "opencode-openai-codex-auth:" && (grep -q 'opencode-openai-codex-auth' ~/.c
|
|
|
49
48
|
echo "=== OMO_CONFIG ===";
|
|
50
49
|
echo "sisyphus_agent:" && (grep -q '"sisyphus_agent"' ~/.config/opencode/oh-my-opencode.json 2>/dev/null && echo "CONFIGURED" || echo "NOT_CONFIGURED");
|
|
51
50
|
echo "agents.sisyphus.variant:" && (node -e "const fs=require('node:fs');const os=require('node:os');const p=os.homedir()+'/.config/opencode/oh-my-opencode.json';try{const j=JSON.parse(fs.readFileSync(p,'utf8'));process.exit(j?.agents?.sisyphus?.variant==='none'?0:1)}catch(e){process.exit(1)}" 2>/dev/null && echo "CONFIGURED" || echo "NOT_CONFIGURED");
|
|
52
|
-
echo "
|
|
53
|
-
echo "
|
|
51
|
+
echo "agent.quick:" && (grep -Eq '"agent"[[:space:]]*:' ~/.config/opencode/opencode.json 2>/dev/null && grep -Eq '"quick"[[:space:]]*:' ~/.config/opencode/opencode.json 2>/dev/null && echo "CONFIGURED" || echo "NOT_CONFIGURED");
|
|
52
|
+
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");
|
|
54
53
|
```
|
|
55
54
|
|
|
56
55
|
---
|
|
@@ -60,19 +59,18 @@ echo "agents.middle:" && (grep -Eq '"agents"[[:space:]]*:' ~/.config/opencode/op
|
|
|
60
59
|
汇总结果,输出表格:
|
|
61
60
|
|
|
62
61
|
```
|
|
63
|
-
工具
|
|
64
|
-
opencode
|
|
65
|
-
dx
|
|
66
|
-
AGENTS.md
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
agents.middle 配置 | <状态> | -
|
|
62
|
+
工具 | 状态 | 版本
|
|
63
|
+
opencode | <状态> | <版本>
|
|
64
|
+
dx | <状态> | <版本>
|
|
65
|
+
AGENTS.md | <状态> | -
|
|
66
|
+
全局 instructions 配置 | <状态> | -
|
|
67
|
+
oh-my-opencode 插件 | <状态> | -
|
|
68
|
+
opencode-openai-codex-auth 插件 | <状态> | -
|
|
69
|
+
agent-browser | <状态> | <版本>
|
|
70
|
+
全局 sisyphus_agent 配置 | <状态> | -
|
|
71
|
+
全局 agents.sisyphus.variant 配置 | <状态> | -
|
|
72
|
+
全局 agent.quick 配置 | <状态> | -
|
|
73
|
+
全局 agent.middle 配置 | <状态> | -
|
|
76
74
|
```
|
|
77
75
|
|
|
78
76
|
---
|
|
@@ -100,12 +98,19 @@ brew install opencode || npm install -g opencode
|
|
|
100
98
|
|
|
101
99
|
- AGENTS.md 文件不存在,OpenCode 需要此文件作为项目指令入口
|
|
102
100
|
- 建议创建或检查文件路径
|
|
101
|
+
- AGENTS.md 应位于项目根目录,并在全局 `~/.config/opencode/opencode.json` 的 `instructions` 中引用
|
|
103
102
|
|
|
104
|
-
### 3.3 opencode.json
|
|
103
|
+
### 3.3 全局 opencode.json instructions 配置缺失
|
|
105
104
|
|
|
106
|
-
|
|
105
|
+
**注意:instructions 配置应在全局配置文件 `~/.config/opencode/opencode.json` 中,而非项目根目录。项目根目录不需要 opencode.json 文件。**
|
|
107
106
|
|
|
108
|
-
|
|
107
|
+
1. 先读取现有全局配置:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
cat ~/.config/opencode/opencode.json
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
2. 使用 Edit 工具在 `~/.config/opencode/opencode.json` 中添加或修改 `instructions` 配置:
|
|
109
114
|
|
|
110
115
|
```json
|
|
111
116
|
{
|
|
@@ -114,24 +119,24 @@ brew install opencode || npm install -g opencode
|
|
|
114
119
|
}
|
|
115
120
|
```
|
|
116
121
|
|
|
117
|
-
### 3.4
|
|
122
|
+
### 3.4 全局配置指令无效
|
|
118
123
|
|
|
119
|
-
使用 Edit 工具修复 opencode.json
|
|
124
|
+
使用 Edit 工具修复 `~/.config/opencode/opencode.json`,确保包含:
|
|
120
125
|
|
|
121
126
|
- `"AGENTS.md"`: 主配置文件
|
|
122
127
|
- `"ruler/**/*.md"`: 自动加载 ruler 目录下所有 .md 文件(因 OpenCode 不支持 @ 引用)
|
|
123
128
|
|
|
124
|
-
### 3.5 OpenCode 插件安装
|
|
129
|
+
### 3.5 全局 OpenCode 插件安装
|
|
125
130
|
|
|
126
|
-
|
|
131
|
+
**注意:OpenCode 插件配置应在全局配置文件 `~/.config/opencode/opencode.json` 中,而非项目根目录。**
|
|
127
132
|
|
|
128
|
-
1.
|
|
133
|
+
1. 先读取现有全局配置:
|
|
129
134
|
|
|
130
135
|
```bash
|
|
131
136
|
cat ~/.config/opencode/opencode.json
|
|
132
137
|
```
|
|
133
138
|
|
|
134
|
-
2. 使用 Edit 工具在 `plugin` 数组中添加缺失的插件:
|
|
139
|
+
2. 使用 Edit 工具在 `~/.config/opencode/opencode.json` 的 `plugin` 数组中添加缺失的插件:
|
|
135
140
|
- `oh-my-opencode`
|
|
136
141
|
- `opencode-openai-codex-auth`
|
|
137
142
|
|
|
@@ -158,11 +163,11 @@ grep -E 'oh-my-opencode|opencode-openai-codex-auth' ~/.config/opencode/opencode.
|
|
|
158
163
|
npm install -g agent-browser && agent-browser install
|
|
159
164
|
```
|
|
160
165
|
|
|
161
|
-
### 3.7 oh-my-opencode.json 配置缺失
|
|
166
|
+
### 3.7 全局 oh-my-opencode.json 配置缺失
|
|
162
167
|
|
|
163
|
-
|
|
168
|
+
**注意:oh-my-opencode 配置应在全局配置文件 `~/.config/opencode/oh-my-opencode.json` 中,而非项目根目录。**
|
|
164
169
|
|
|
165
|
-
1.
|
|
170
|
+
1. 先读取现有全局配置:
|
|
166
171
|
|
|
167
172
|
```bash
|
|
168
173
|
cat ~/.config/opencode/oh-my-opencode.json
|
|
@@ -211,13 +216,15 @@ grep -q '"sisyphus_agent"' ~/.config/opencode/oh-my-opencode.json && echo "✅ s
|
|
|
211
216
|
node -e "const fs=require('node:fs');const os=require('node:os');const p=os.homedir()+'/.config/opencode/oh-my-opencode.json';const j=JSON.parse(fs.readFileSync(p,'utf8'));console.log(j?.agents?.sisyphus?.variant||'MISSING');process.exit(j?.agents?.sisyphus?.variant==='none'?0:1)" && echo "✅ agents.sisyphus.variant=none" || echo "❌ agents.sisyphus.variant 不是 none"
|
|
212
217
|
```
|
|
213
218
|
|
|
214
|
-
### 3.8 opencode.json
|
|
219
|
+
### 3.8 全局 opencode.json agent 配置缺失
|
|
220
|
+
|
|
221
|
+
**注意:agent 配置应在全局配置文件 `~/.config/opencode/opencode.json` 中,而非项目根目录。**
|
|
215
222
|
|
|
216
|
-
如果 `~/.config/opencode/opencode.json` 缺少 `
|
|
223
|
+
如果 `~/.config/opencode/opencode.json` 缺少 `agent.quick` 或 `agent.middle`,使用 Edit 工具添加:
|
|
217
224
|
|
|
218
225
|
```json
|
|
219
226
|
{
|
|
220
|
-
"
|
|
227
|
+
"agent": {
|
|
221
228
|
"quick": {
|
|
222
229
|
"model": "github-copilot/claude-haiku-4.5"
|
|
223
230
|
},
|
|
@@ -231,11 +238,11 @@ node -e "const fs=require('node:fs');const os=require('node:os');const p=os.home
|
|
|
231
238
|
验证配置:
|
|
232
239
|
|
|
233
240
|
```bash
|
|
234
|
-
# 检查
|
|
235
|
-
grep -Eq '"
|
|
241
|
+
# 检查 agent.quick
|
|
242
|
+
grep -Eq '"agent"[[:space:]]*:' ~/.config/opencode/opencode.json && grep -Eq '"quick"[[:space:]]*:' ~/.config/opencode/opencode.json && echo "✅ agent.quick 已配置" || echo "❌ agent.quick 缺失"
|
|
236
243
|
|
|
237
|
-
# 检查
|
|
238
|
-
grep -Eq '"
|
|
244
|
+
# 检查 agent.middle
|
|
245
|
+
grep -Eq '"agent"[[:space:]]*:' ~/.config/opencode/opencode.json && grep -Eq '"middle"[[:space:]]*:' ~/.config/opencode/opencode.json && echo "✅ agent.middle 已配置" || echo "❌ agent.middle 缺失"
|
|
239
246
|
```
|
|
240
247
|
|
|
241
248
|
---
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
allowed-tools: [Bash, Read, Glob, TodoWrite, Edit, Grep]
|
|
3
3
|
description: 'Git 工作流:Issue/Commit/PR 自动化'
|
|
4
|
-
agent:
|
|
4
|
+
agent: middle
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
## 用法
|
|
@@ -245,7 +245,7 @@ EOF
|
|
|
245
245
|
|
|
246
246
|
```
|
|
247
247
|
💡 提示:运行以下命令启动自动评审
|
|
248
|
-
/
|
|
248
|
+
/pr-review-loop --pr <PR_NUMBER>
|
|
249
249
|
```
|
|
250
250
|
|
|
251
251
|
---
|
|
@@ -262,7 +262,7 @@ Commit: <hash> <主题>
|
|
|
262
262
|
PR: #<编号> → <URL>
|
|
263
263
|
|
|
264
264
|
💡 下一步:运行以下命令启动自动评审
|
|
265
|
-
/
|
|
265
|
+
/pr-review-loop --pr <编号>
|
|
266
266
|
```
|
|
267
267
|
|
|
268
268
|
**部分完成:**
|