opencode-magi 0.0.0-dev-20260524020129 → 0.0.0-dev-20260524220537
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/index.js +6 -43
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -286,23 +286,6 @@ function parseOptionalIssue(value) {
|
|
|
286
286
|
function clearFlag(value) {
|
|
287
287
|
return typeof value === "boolean" ? value : undefined;
|
|
288
288
|
}
|
|
289
|
-
function clearToolFlag(value) {
|
|
290
|
-
if (value === true || value === "true")
|
|
291
|
-
return true;
|
|
292
|
-
if (value === "false")
|
|
293
|
-
return false;
|
|
294
|
-
return undefined;
|
|
295
|
-
}
|
|
296
|
-
function hasBlankSelector(args) {
|
|
297
|
-
return !args.runId?.trim() && !args.pr?.trim();
|
|
298
|
-
}
|
|
299
|
-
function hasDefaultedFalseClearFlags(args) {
|
|
300
|
-
return (hasBlankSelector(args) &&
|
|
301
|
-
args.branch === "false" &&
|
|
302
|
-
args.output === "false" &&
|
|
303
|
-
args.session === "false" &&
|
|
304
|
-
args.worktree === "false");
|
|
305
|
-
}
|
|
306
289
|
function parseQuestionAnswers(value) {
|
|
307
290
|
const trimmed = value.trim();
|
|
308
291
|
if (!trimmed)
|
|
@@ -692,41 +675,21 @@ export const MagiPlugin = async ({ client, directory }) => {
|
|
|
692
675
|
}),
|
|
693
676
|
magi_clear: tool({
|
|
694
677
|
description: "Clear all inactive Magi runs by deleting configured sessions, worktrees, branches, and output artifacts.",
|
|
695
|
-
args: {
|
|
696
|
-
|
|
697
|
-
pr: tool.schema.string().optional(),
|
|
698
|
-
issue: tool.schema.string().optional(),
|
|
699
|
-
branch: tool.schema.enum(["true", "false"]).optional(),
|
|
700
|
-
output: tool.schema.enum(["true", "false"]).optional(),
|
|
701
|
-
session: tool.schema.enum(["true", "false"]).optional(),
|
|
702
|
-
worktree: tool.schema.enum(["true", "false"]).optional(),
|
|
703
|
-
},
|
|
704
|
-
async execute(args) {
|
|
678
|
+
args: {},
|
|
679
|
+
async execute() {
|
|
705
680
|
const loaded = await loadConfig(directory).catch(() => undefined);
|
|
706
681
|
const clear = loaded?.config.clear;
|
|
707
|
-
const useConfiguredDefaults = hasDefaultedFalseClearFlags(args);
|
|
708
682
|
const options = {
|
|
709
|
-
branch: (
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
? undefined
|
|
714
|
-
: clearToolFlag(args.output)) ?? clearFlag(clear?.output),
|
|
715
|
-
session: (useConfiguredDefaults
|
|
716
|
-
? undefined
|
|
717
|
-
: clearToolFlag(args.session)) ?? clearFlag(clear?.session),
|
|
718
|
-
worktree: (useConfiguredDefaults
|
|
719
|
-
? undefined
|
|
720
|
-
: clearToolFlag(args.worktree)) ?? clearFlag(clear?.worktree),
|
|
683
|
+
branch: clearFlag(clear?.branch),
|
|
684
|
+
output: clearFlag(clear?.output),
|
|
685
|
+
session: clearFlag(clear?.session),
|
|
686
|
+
worktree: clearFlag(clear?.worktree),
|
|
721
687
|
};
|
|
722
688
|
return runManager.clear({
|
|
723
689
|
options,
|
|
724
|
-
issue: parseOptionalIssue(args.issue),
|
|
725
690
|
outputDir: loaded
|
|
726
691
|
? outputBaseDirs(directory, loaded.config)
|
|
727
692
|
: undefined,
|
|
728
|
-
pr: parseOptionalPr(args.pr),
|
|
729
|
-
runId: args.runId,
|
|
730
693
|
worktreeDir: loaded
|
|
731
694
|
? worktreeBaseDirs(directory, loaded.config)
|
|
732
695
|
: undefined,
|
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-20260524220537",
|
|
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>",
|