opencode-magi 0.0.0-dev-20260726065546 → 0.0.0-dev-20260727045328
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.
|
@@ -95,9 +95,7 @@ function createSyntheticThreads() {
|
|
|
95
95
|
}));
|
|
96
96
|
}
|
|
97
97
|
function addSyntheticReplies(threads) {
|
|
98
|
-
const output = this.state.editor
|
|
99
|
-
if (!output)
|
|
100
|
-
throw new MagiError("blocked", "Editor output not found.");
|
|
98
|
+
const output = this.state.editor.outputs.at(-1);
|
|
101
99
|
return threads.map((thread) => ({
|
|
102
100
|
...thread,
|
|
103
101
|
comments: [
|
|
@@ -183,12 +183,6 @@ async function setAccount() {
|
|
|
183
183
|
await this.exec(command("git", "config", "user.email", quote(this.state.editor.author.email)), options);
|
|
184
184
|
}
|
|
185
185
|
async function push() {
|
|
186
|
-
if (!this.state.editor?.account)
|
|
187
|
-
throw new MagiError("blocked", "Editor account not found.");
|
|
188
|
-
if (!this.state.pr?.metadata)
|
|
189
|
-
throw new MagiError("blocked", "PR metadata not found.");
|
|
190
|
-
if (!this.state.worktree)
|
|
191
|
-
throw new MagiError("blocked", "PR worktree not found.");
|
|
192
186
|
const token = await this.magi.getGhToken(this.state.editor.account, this.context.abort);
|
|
193
187
|
const url = `https://${this.config.github.host}/${this.state.pr.metadata.head.repo.owner.login}/${this.state.pr.metadata.head.repo.name}.git`;
|
|
194
188
|
const ref = `HEAD:refs/heads/${this.state.pr.metadata.head.ref}`;
|
|
@@ -208,8 +202,6 @@ async function push() {
|
|
|
208
202
|
return getMetadata.call(this);
|
|
209
203
|
}
|
|
210
204
|
async function getConflictedFiles() {
|
|
211
|
-
if (!this.state.worktree)
|
|
212
|
-
throw new MagiError("blocked", "PR worktree not found.");
|
|
213
205
|
const options = { cwd: this.state.worktree.path, signal: this.context.abort };
|
|
214
206
|
try {
|
|
215
207
|
await this.exec(command("git", "merge", "--no-commit", "--no-ff", "FETCH_HEAD"), options);
|
|
@@ -421,8 +421,6 @@ async function waitMergeQueue(enqueuedAt, leftMergeQueue = false, retries = 0) {
|
|
|
421
421
|
async function isConflict() {
|
|
422
422
|
if (!this.state.worktree)
|
|
423
423
|
return false;
|
|
424
|
-
if (!this.state.pr?.metadata)
|
|
425
|
-
throw new MagiError("blocked", "PR metadata not found.");
|
|
426
424
|
const options = { cwd: this.state.worktree.path, signal: this.context.abort };
|
|
427
425
|
const status = await this.exec(command("git", "status", "--porcelain"), options);
|
|
428
426
|
if (status)
|
|
@@ -69,8 +69,6 @@ export async function checkExistingReviews() {
|
|
|
69
69
|
for (const [id, reviewer] of Object.entries(reviewers)) {
|
|
70
70
|
if (reviewer.status !== "skip")
|
|
71
71
|
continue;
|
|
72
|
-
if (!reviewer.review)
|
|
73
|
-
throw new MagiError("blocked", `No review found for reviewer ${id}.`);
|
|
74
72
|
const single = this.config.mode === "single";
|
|
75
73
|
const author = single ? this.config.account : reviewer.account;
|
|
76
74
|
const hasUserReply = threads.some(({ comments, isResolved }) => {
|
|
@@ -86,7 +84,7 @@ export async function checkExistingReviews() {
|
|
|
86
84
|
const last = comments.at(-1);
|
|
87
85
|
return (!!last &&
|
|
88
86
|
last.author?.login !== author &&
|
|
89
|
-
(!reviewer.review
|
|
87
|
+
(!reviewer.review.submitted_at ||
|
|
90
88
|
last.createdAt.localeCompare(reviewer.review.submitted_at) > 0));
|
|
91
89
|
});
|
|
92
90
|
if (hasUserReply) {
|
|
@@ -243,8 +241,6 @@ export async function getInlineCommentTargets() {
|
|
|
243
241
|
return inlineCommentTargets;
|
|
244
242
|
}
|
|
245
243
|
async function hasCommit(sha) {
|
|
246
|
-
if (!this.state.worktree)
|
|
247
|
-
throw new MagiError("blocked", "PR worktree not found.");
|
|
248
244
|
try {
|
|
249
245
|
await this.exec(command("git", "cat-file", "-e", quote(`${sha}^{commit}`)), {
|
|
250
246
|
cwd: this.state.worktree.path,
|
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-20260727045328",
|
|
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>",
|