opencode-magi 0.0.0-dev-20260521140727 → 0.0.0-dev-20260521143330
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 +53 -45
- package/dist/orchestrator/review.js +14 -15
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -61,26 +61,33 @@ Add the following content to the configuration file.
|
|
|
61
61
|
```json
|
|
62
62
|
{
|
|
63
63
|
"$schema": "https://raw.githubusercontent.com/magi-ai/opencode-magi/main/schema.json",
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
{
|
|
67
|
-
"
|
|
68
|
-
"
|
|
64
|
+
"agents": {
|
|
65
|
+
"refs": {
|
|
66
|
+
"account-1": {
|
|
67
|
+
"model": "openai/gpt-5.5",
|
|
68
|
+
"account": "account-1"
|
|
69
69
|
},
|
|
70
|
-
{
|
|
71
|
-
"
|
|
72
|
-
"
|
|
70
|
+
"account-2": {
|
|
71
|
+
"model": "anthropic/claude-opus-4-7",
|
|
72
|
+
"account": "account-2"
|
|
73
73
|
},
|
|
74
|
-
{
|
|
75
|
-
"
|
|
76
|
-
"
|
|
74
|
+
"account-3": {
|
|
75
|
+
"model": "opencode/kimi-k2-6",
|
|
76
|
+
"account": "account-3"
|
|
77
77
|
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"review": {
|
|
81
|
+
"agents": [
|
|
82
|
+
{ "ref": "account-1" },
|
|
83
|
+
{ "ref": "account-2" },
|
|
84
|
+
{ "ref": "account-3" }
|
|
78
85
|
]
|
|
79
86
|
}
|
|
80
87
|
}
|
|
81
88
|
```
|
|
82
89
|
|
|
83
|
-
`review.agents[].account` is the GitHub account used to post reviews and approvals. Must be authenticated with `gh auth token --user <account>` and must be unique.
|
|
90
|
+
After refs are expanded, `review.agents[].account` is the GitHub account used to post reviews and approvals. Must be authenticated with `gh auth token --user <account>` and must be unique.
|
|
84
91
|
|
|
85
92
|
#### Set project config
|
|
86
93
|
|
|
@@ -101,53 +108,54 @@ Add the following content to the configuration file.
|
|
|
101
108
|
"owner": "your-owner",
|
|
102
109
|
"repo": "your-repo"
|
|
103
110
|
},
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
{
|
|
107
|
-
"
|
|
108
|
-
"
|
|
111
|
+
"agents": {
|
|
112
|
+
"refs": {
|
|
113
|
+
"account-1": {
|
|
114
|
+
"model": "openai/gpt-5.5",
|
|
115
|
+
"account": "account-1"
|
|
109
116
|
},
|
|
110
|
-
{
|
|
111
|
-
"
|
|
112
|
-
"
|
|
117
|
+
"account-2": {
|
|
118
|
+
"model": "anthropic/claude-opus-4-7",
|
|
119
|
+
"account": "account-2"
|
|
113
120
|
},
|
|
114
|
-
{
|
|
115
|
-
"
|
|
116
|
-
"
|
|
121
|
+
"account-3": {
|
|
122
|
+
"model": "opencode/kimi-k2-6",
|
|
123
|
+
"account": "account-3"
|
|
124
|
+
},
|
|
125
|
+
"account-4": {
|
|
126
|
+
"model": "openai/gpt-5.5",
|
|
127
|
+
"account": "account-4",
|
|
128
|
+
"author": {
|
|
129
|
+
"name": "account-4",
|
|
130
|
+
"email": "your-email@example.com"
|
|
131
|
+
}
|
|
117
132
|
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"review": {
|
|
136
|
+
"agents": [
|
|
137
|
+
{ "ref": "account-1" },
|
|
138
|
+
{ "ref": "account-2" },
|
|
139
|
+
{ "ref": "account-3" }
|
|
118
140
|
]
|
|
119
141
|
},
|
|
120
142
|
"merge": {
|
|
121
|
-
"editor": {
|
|
122
|
-
"account": "your-editor-account",
|
|
123
|
-
"model": "openai/gpt-5.5",
|
|
124
|
-
"author": {
|
|
125
|
-
"name": "your-account",
|
|
126
|
-
"email": "your-email@example.com"
|
|
127
|
-
}
|
|
128
|
-
}
|
|
143
|
+
"editor": { "ref": "account-4" }
|
|
129
144
|
},
|
|
130
145
|
"triage": {
|
|
131
|
-
"account": "
|
|
146
|
+
"account": "account-5",
|
|
132
147
|
"agents": [
|
|
133
|
-
{
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
"id": "maintenance",
|
|
139
|
-
"model": "anthropic/claude-opus-4-7"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"id": "product",
|
|
143
|
-
"model": "opencode/kimi-k2-6"
|
|
144
|
-
}
|
|
148
|
+
{ "ref": "account-1" },
|
|
149
|
+
{ "ref": "account-2" },
|
|
150
|
+
{ "ref": "account-3" }
|
|
145
151
|
]
|
|
146
152
|
}
|
|
147
153
|
}
|
|
148
154
|
```
|
|
149
155
|
|
|
150
|
-
|
|
156
|
+
Entries with `ref` are expanded from `agents.refs`. Fields set alongside `ref` override fields from the preset.
|
|
157
|
+
|
|
158
|
+
After refs are expanded, `review.agents[].account` is the GitHub account used to post reviews and approvals. Must be authenticated with `gh auth token --user <account>` and must be unique. `merge.editor.account` is used by `/magi:merge` to push fixes, close PRs, and merge PRs.
|
|
151
159
|
|
|
152
160
|
#### Validate config
|
|
153
161
|
|
|
@@ -161,7 +161,20 @@ function reviewFindingsFromBody(body) {
|
|
|
161
161
|
continue;
|
|
162
162
|
}
|
|
163
163
|
if (line === "Requirement findings:") {
|
|
164
|
-
section =
|
|
164
|
+
section = undefined;
|
|
165
|
+
continue;
|
|
166
|
+
}
|
|
167
|
+
const requirementMatch = /^- Missing issue #(\d+) requirement: (.+)$/.exec(line ?? "");
|
|
168
|
+
const evidence = /^\s+Evidence: (.+)$/.exec(lines[index + 1] ?? "");
|
|
169
|
+
const requirementFix = /^\s+Fix: (.+)$/.exec(lines[index + 2] ?? "");
|
|
170
|
+
if (requirementMatch && evidence && requirementFix) {
|
|
171
|
+
requirementFindings.push({
|
|
172
|
+
evidence: evidence[1] ?? "See review body.",
|
|
173
|
+
fix: requirementFix[1] ?? "Please address this before merging.",
|
|
174
|
+
issueNumber: Number(requirementMatch[1]),
|
|
175
|
+
requirement: requirementMatch[2] ?? "Review requirement.",
|
|
176
|
+
});
|
|
177
|
+
index += 2;
|
|
165
178
|
continue;
|
|
166
179
|
}
|
|
167
180
|
if (section === "finding") {
|
|
@@ -177,20 +190,6 @@ function reviewFindingsFromBody(body) {
|
|
|
177
190
|
index += 1;
|
|
178
191
|
continue;
|
|
179
192
|
}
|
|
180
|
-
if (section !== "requirement")
|
|
181
|
-
continue;
|
|
182
|
-
const match = /^- Missing issue #(\d+) requirement: (.+)$/.exec(line ?? "");
|
|
183
|
-
const evidence = /^\s+Evidence: (.+)$/.exec(lines[index + 1] ?? "");
|
|
184
|
-
const fix = /^\s+Fix: (.+)$/.exec(lines[index + 2] ?? "");
|
|
185
|
-
if (!match || !evidence || !fix)
|
|
186
|
-
continue;
|
|
187
|
-
requirementFindings.push({
|
|
188
|
-
evidence: evidence[1] ?? "See review body.",
|
|
189
|
-
fix: fix[1] ?? "Please address this before merging.",
|
|
190
|
-
issueNumber: Number(match[1]),
|
|
191
|
-
requirement: match[2] ?? "Review requirement.",
|
|
192
|
-
});
|
|
193
|
-
index += 2;
|
|
194
193
|
}
|
|
195
194
|
return { findings, requirementFindings };
|
|
196
195
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-magi",
|
|
3
|
-
"version": "0.0.0-dev-
|
|
3
|
+
"version": "0.0.0-dev-20260521143330",
|
|
4
4
|
"description": "Multi-agent PR review and merge orchestration plugin for OpenCode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Hirotomo Yamada <hirotomo.yamada@avap.co.jp>",
|