opencode-magi 0.0.0-dev-20260520155356 → 0.0.0-dev-20260520163717

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.
@@ -675,6 +675,28 @@ async function fetchPermissions(config, exec, account) {
675
675
  const raw = await exec(`gh api${ghHostOption(config)} repos/${config.github?.owner}/${config.github?.repo} --jq .permissions`, { env: { GH_TOKEN: token } });
676
676
  return JSON.parse(raw);
677
677
  }
678
+ async function validateWorktreeConfig(config, exec, options, errors) {
679
+ const agents = resolveAgents(config);
680
+ const checkEditor = Boolean(agents.editor && (options.requireEditor || options.requireWorktreeConfig));
681
+ const checkTriageCreator = Boolean(config.triage?.automation?.pr &&
682
+ agents.triageCreator &&
683
+ (options.requireTriage || options.requireWorktreeConfig));
684
+ if (!checkEditor && !checkTriageCreator)
685
+ return;
686
+ if (!exec)
687
+ return;
688
+ const error = "git config extensions.worktreeConfig must be true when editor or triage PR creator is configured";
689
+ try {
690
+ const value = (await exec("git config --bool --get extensions.worktreeConfig"))
691
+ .trim()
692
+ .toLowerCase();
693
+ if (value !== "true")
694
+ errors.push(error);
695
+ }
696
+ catch {
697
+ errors.push(error);
698
+ }
699
+ }
678
700
  async function validateRepositoryPermissions(config, exec, errors, warnings) {
679
701
  if (!config.github?.owner || !config.github.repo)
680
702
  return;
@@ -784,6 +806,7 @@ export async function validateConfig(config, options = {}) {
784
806
  }
785
807
  validateString(config.review?.output, "review.output", errors);
786
808
  validateString(config.review?.worktree, "review.worktree", errors);
809
+ await validateWorktreeConfig(config, options.exec, options, errors);
787
810
  if (options.checkAuth && !errors.length) {
788
811
  if (!options.exec) {
789
812
  errors.push("validateConfig requires exec when checkAuth is true");
package/dist/index.js CHANGED
@@ -232,6 +232,7 @@ export async function validateMagiConfigFiles(directory, options = {}) {
232
232
  : undefined,
233
233
  modelCatalog: options.modelCatalog,
234
234
  requireGithub: hasProjectConfig && Boolean(mergedConfig.review?.agents),
235
+ requireWorktreeConfig: true,
235
236
  });
236
237
  loadedFrom = existing.map((status) => status.path).join(", ");
237
238
  errors.push(...validation.errors);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-magi",
3
- "version": "0.0.0-dev-20260520155356",
3
+ "version": "0.0.0-dev-20260520163717",
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>",