@kisev/agentomatic 11.0.0-dev.56.gb561d6a5e919 → 11.0.0-dev.57.gb877c35a2446

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.
@@ -394,8 +394,26 @@ export async function applyConfigSetup(selection, scope, cwd = process.cwd(), ho
394
394
  const built = await build(selection, scope, cwd, home);
395
395
  if (await recoverTransaction(root, stateRoot, built.allowedRoots))
396
396
  throw new ConfigSetupError("recovered_transaction", "Recovered an interrupted transaction; request a fresh plan");
397
- if (!built.plan.confirmable)
397
+ const corePluginActive = built.plan.operations.some((item) => item.target === "opencode" &&
398
+ item.fragment === "core-plugin" &&
399
+ item.operation !== "conflict");
400
+ const provision = async () => {
401
+ try {
402
+ await ensureDependency(planDependency(scope, cwd, home), options.dependencyRunner);
403
+ }
404
+ catch (error) {
405
+ if (error instanceof LifecycleError)
406
+ throw new ConfigSetupError(error.code, error.message);
407
+ throw error;
408
+ }
409
+ };
410
+ if (!built.plan.confirmable) {
411
+ if (corePluginActive) {
412
+ await provision();
413
+ return built.plan;
414
+ }
398
415
  throw new ConfigSetupError("invalid_state", "Config setup plan has no applicable changes");
416
+ }
399
417
  await applyTransaction(root, stateRoot, built.mutations, {
400
418
  validateFinal: async () => {
401
419
  for (const mutation of built.mutations) {
@@ -408,19 +426,8 @@ export async function applyConfigSetup(selection, scope, cwd = process.cwd(), ho
408
426
  }
409
427
  },
410
428
  });
411
- const corePluginApplied = built.plan.operations.some((item) => item.target === "opencode" &&
412
- item.fragment === "core-plugin" &&
413
- item.operation !== "conflict");
414
- if (corePluginApplied) {
415
- try {
416
- await ensureDependency(planDependency(scope, cwd, home), options.dependencyRunner);
417
- }
418
- catch (error) {
419
- if (error instanceof LifecycleError)
420
- throw new ConfigSetupError(error.code, error.message);
421
- throw error;
422
- }
423
- }
429
+ if (corePluginActive)
430
+ await provision();
424
431
  return built.plan;
425
432
  });
426
433
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kisev/agentomatic",
3
- "version": "11.0.0-dev.56.gb561d6a5e919",
3
+ "version": "11.0.0-dev.57.gb877c35a2446",
4
4
  "description": "OpenCode integration and opt-in installer for portable Agent Skills.",
5
5
  "homepage": "https://github.com/kisev/skills#readme",
6
6
  "bugs": {
@@ -49,8 +49,8 @@
49
49
  "pack:check": "node test/pack-allowlist.mjs"
50
50
  },
51
51
  "dependencies": {
52
- "@kisev/memomatic": "1.0.0-dev.56.gb561d6a5e919",
53
- "@kisev/safe-fs": "1.0.0-dev.56.gb561d6a5e919"
52
+ "@kisev/memomatic": "1.0.0-dev.57.gb877c35a2446",
53
+ "@kisev/safe-fs": "1.0.0-dev.57.gb877c35a2446"
54
54
  },
55
55
  "devDependencies": {
56
56
  "@opencode-ai/plugin": "1.18.29",