opencode-magi 0.0.0-dev-20260520185430 → 0.0.0-dev-20260520190626
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/config/resolve.js +1 -1
- package/dist/config/validate.js +5 -5
- package/dist/github/commands.js +12 -2
- package/dist/index.js +5 -5
- package/dist/orchestrator/ci.js +1 -1
- package/dist/orchestrator/triage.js +1 -1
- package/package.json +1 -1
- package/schema.json +1 -1
package/dist/config/resolve.js
CHANGED
|
@@ -183,7 +183,7 @@ export function resolveRepository(config) {
|
|
|
183
183
|
automation: {
|
|
184
184
|
clear: config.triage?.automation?.clear ?? ["triage"],
|
|
185
185
|
close: config.triage?.automation?.close ?? false,
|
|
186
|
-
|
|
186
|
+
create: config.triage?.automation?.create ?? false,
|
|
187
187
|
},
|
|
188
188
|
categories: resolveTriageCategories(config),
|
|
189
189
|
concurrency: {
|
package/dist/config/validate.js
CHANGED
|
@@ -99,7 +99,7 @@ const AUTOMATION_KEYS = new Set(["close", "merge"]);
|
|
|
99
99
|
const CLEAR_KEYS = new Set(["branch", "output", "session", "worktree"]);
|
|
100
100
|
const CONCURRENCY_KEYS = new Set(["reviewers", "runs"]);
|
|
101
101
|
const OUTPUT_KEYS = new Set(["repairAttempts"]);
|
|
102
|
-
const TRIAGE_AUTOMATION_KEYS = new Set(["clear", "close", "
|
|
102
|
+
const TRIAGE_AUTOMATION_KEYS = new Set(["clear", "close", "create"]);
|
|
103
103
|
const TRIAGE_CATEGORY_KEYS = new Set(["description", "id", "labels", "types"]);
|
|
104
104
|
const TRIAGE_CONCURRENCY_KEYS = new Set(["runs"]);
|
|
105
105
|
const TRIAGE_SAFETY_KEYS = new Set([
|
|
@@ -626,14 +626,14 @@ function validateTriage(config, errors, options) {
|
|
|
626
626
|
validateResolvedAgentKeys(resolveAgents(config).triage ?? [], "triage.resolvedAgents", errors);
|
|
627
627
|
}
|
|
628
628
|
validateTriageCreator(triage.creator, "triage.creator", errors, options.modelCatalog);
|
|
629
|
-
if (automation?.
|
|
630
|
-
errors.push("triage.creator is required when triage.automation.
|
|
629
|
+
if (automation?.create && !triage.creator)
|
|
630
|
+
errors.push("triage.creator is required when triage.automation.create is true");
|
|
631
631
|
if (automation != null && !isPlainObject(automation)) {
|
|
632
632
|
errors.push("triage.automation must be an object");
|
|
633
633
|
}
|
|
634
634
|
validateKnownKeys(automation, "triage.automation", TRIAGE_AUTOMATION_KEYS, errors);
|
|
635
635
|
validateBoolean(automation?.close, "triage.automation.close", errors);
|
|
636
|
-
validateBoolean(automation?.
|
|
636
|
+
validateBoolean(automation?.create, "triage.automation.create", errors);
|
|
637
637
|
validateStringArray(automation?.clear, "triage.automation.clear", errors);
|
|
638
638
|
validateKnownKeys(concurrency, "triage.concurrency", TRIAGE_CONCURRENCY_KEYS, errors);
|
|
639
639
|
if (concurrency?.runs != null &&
|
|
@@ -703,7 +703,7 @@ async function fetchPermissions(config, exec, account) {
|
|
|
703
703
|
async function validateWorktreeConfig(config, exec, options, errors) {
|
|
704
704
|
const agents = resolveAgents(config);
|
|
705
705
|
const checkEditor = Boolean(agents.editor && (options.requireEditor || options.requireWorktreeConfig));
|
|
706
|
-
const checkTriageCreator = Boolean(config.triage?.automation?.
|
|
706
|
+
const checkTriageCreator = Boolean(config.triage?.automation?.create &&
|
|
707
707
|
agents.triageCreator &&
|
|
708
708
|
(options.requireTriage || options.requireWorktreeConfig));
|
|
709
709
|
if (!checkEditor && !checkTriageCreator)
|
package/dist/github/commands.js
CHANGED
|
@@ -401,8 +401,18 @@ export function isCancelledCheck(check) {
|
|
|
401
401
|
export function isFailedCheck(check) {
|
|
402
402
|
return check.bucket === "fail" || check.state === "FAILURE";
|
|
403
403
|
}
|
|
404
|
-
export async function fetchPullRequestChecks(exec, repository, pr) {
|
|
405
|
-
|
|
404
|
+
export async function fetchPullRequestChecks(exec, repository, pr, options = {}) {
|
|
405
|
+
let raw;
|
|
406
|
+
try {
|
|
407
|
+
raw = await exec(`gh pr checks ${pr} --repo ${shellQuote(repoSpecifier(repository))} --json name,state,bucket,link,workflow`);
|
|
408
|
+
}
|
|
409
|
+
catch (error) {
|
|
410
|
+
if (options.tolerateMissingChecks &&
|
|
411
|
+
/no checks reported on the '.+' branch/i.test(errorText(error))) {
|
|
412
|
+
return [];
|
|
413
|
+
}
|
|
414
|
+
throw error;
|
|
415
|
+
}
|
|
406
416
|
return JSON.parse(raw);
|
|
407
417
|
}
|
|
408
418
|
export async function fetchWorkflowRunMeta(exec, repository, runId) {
|
package/dist/index.js
CHANGED
|
@@ -137,8 +137,8 @@ export function parseRunArguments(value, dryRun = false, command = "review") {
|
|
|
137
137
|
throw unsupportedFlag(token, command);
|
|
138
138
|
setConfigOverride(configOverrides, ["merge", "checks", "wait"], token === "--wait-checks-after-edit");
|
|
139
139
|
break;
|
|
140
|
-
case "--
|
|
141
|
-
case "--no-
|
|
140
|
+
case "--create":
|
|
141
|
+
case "--no-create":
|
|
142
142
|
throw unsupportedFlag(token, command);
|
|
143
143
|
default:
|
|
144
144
|
if (token.startsWith("--"))
|
|
@@ -166,9 +166,9 @@ export function parseIssueRunArguments(value, dryRun = false) {
|
|
|
166
166
|
case "--no-close":
|
|
167
167
|
setConfigOverride(configOverrides, ["triage", "automation", "close"], token === "--close");
|
|
168
168
|
break;
|
|
169
|
-
case "--
|
|
170
|
-
case "--no-
|
|
171
|
-
setConfigOverride(configOverrides, ["triage", "automation", "
|
|
169
|
+
case "--create":
|
|
170
|
+
case "--no-create":
|
|
171
|
+
setConfigOverride(configOverrides, ["triage", "automation", "create"], token === "--create");
|
|
172
172
|
break;
|
|
173
173
|
case "--run-concurrency":
|
|
174
174
|
setConfigOverride(configOverrides, ["triage", "concurrency", "runs"], parseIntegerFlag(nextFlagValue(tokens, ++index, token), token, 1));
|
package/dist/orchestrator/ci.js
CHANGED
|
@@ -221,7 +221,7 @@ async function watchRerunRuns(exec, repository, checks) {
|
|
|
221
221
|
await Promise.all(runIds.map((runId) => watchRun(exec, repository, runId)));
|
|
222
222
|
}
|
|
223
223
|
async function checksForHead(input) {
|
|
224
|
-
const checks = await fetchPullRequestChecks(input.exec, input.repository, input.pr);
|
|
224
|
+
const checks = await fetchPullRequestChecks(input.exec, input.repository, input.pr, { tolerateMissingChecks: Boolean(input.headSha) });
|
|
225
225
|
const targetChecks = [];
|
|
226
226
|
let hasAnyActionCheck = false;
|
|
227
227
|
let hasTargetActionCheck = false;
|
|
@@ -416,7 +416,7 @@ function actionPlan(input) {
|
|
|
416
416
|
const closeIssue = input.triage.automation.close &&
|
|
417
417
|
(input.result.disposition === "rejected" ||
|
|
418
418
|
input.result.disposition === "duplicate");
|
|
419
|
-
const createPr = input.triage.automation.
|
|
419
|
+
const createPr = input.triage.automation.create && input.result.disposition === "accepted";
|
|
420
420
|
return {
|
|
421
421
|
action: closeIssue ? "CLOSE" : createPr ? "PR" : "COMMENT",
|
|
422
422
|
allowedActions: [closeIssue ? "CLOSE" : createPr ? "PR" : "COMMENT"],
|
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-20260520190626",
|
|
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>",
|
package/schema.json
CHANGED
|
@@ -224,7 +224,7 @@
|
|
|
224
224
|
"additionalProperties": false,
|
|
225
225
|
"properties": {
|
|
226
226
|
"close": { "type": "boolean", "default": false },
|
|
227
|
-
"
|
|
227
|
+
"create": { "type": "boolean", "default": false },
|
|
228
228
|
"clear": {
|
|
229
229
|
"type": "array",
|
|
230
230
|
"items": { "type": "string" },
|