opencode-magi 0.0.0-dev-20260721030358 → 0.0.0-dev-20260721051405
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/dist/magi.js +13 -3
- package/package.json +1 -1
package/dist/magi.js
CHANGED
|
@@ -6,7 +6,7 @@ import { dirname, isAbsolute, join } from "node:path";
|
|
|
6
6
|
import { Octokit } from "octokit";
|
|
7
7
|
import { getConfig, resolvePermissions, validateConfig } from "@/config";
|
|
8
8
|
import { graphql } from "@/graphql";
|
|
9
|
-
import { command, createExec, filterEmpty, isArray, isNumber, isObject, merge, quote, rm, } from "@/utils";
|
|
9
|
+
import { command, createExec, filterEmpty, isArray, isNumber, isObject, isUndefined, merge, quote, rm, } from "@/utils";
|
|
10
10
|
const active = new Set(["preparing", "running"]);
|
|
11
11
|
export class MagiError extends Error {
|
|
12
12
|
status;
|
|
@@ -204,7 +204,12 @@ export class Magi {
|
|
|
204
204
|
title,
|
|
205
205
|
}, { signal });
|
|
206
206
|
if (result.error) {
|
|
207
|
-
|
|
207
|
+
if (!isUndefined(result.response) && result.response.statusText)
|
|
208
|
+
throw new Error(result.response.statusText);
|
|
209
|
+
else if (result.error instanceof Error)
|
|
210
|
+
throw new Error(result.error.message);
|
|
211
|
+
else
|
|
212
|
+
throw new Error(JSON.stringify(result.error));
|
|
208
213
|
}
|
|
209
214
|
else {
|
|
210
215
|
const id = result.data.id;
|
|
@@ -217,7 +222,12 @@ export class Magi {
|
|
|
217
222
|
sessionID,
|
|
218
223
|
}, { signal });
|
|
219
224
|
if (result.error) {
|
|
220
|
-
|
|
225
|
+
if (!isUndefined(result.response) && result.response.statusText)
|
|
226
|
+
throw new Error(result.response.statusText);
|
|
227
|
+
else if (result.error instanceof Error)
|
|
228
|
+
throw new Error(result.error.message);
|
|
229
|
+
else
|
|
230
|
+
throw new Error(JSON.stringify(result.error));
|
|
221
231
|
}
|
|
222
232
|
else {
|
|
223
233
|
const output = result.data.parts
|
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-20260721051405",
|
|
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>",
|