@eminent337/aery 0.1.21 → 0.1.22

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.
@@ -646,10 +646,29 @@ export class InteractiveMode {
646
646
  try {
647
647
  const { execFile } = await import("node:child_process");
648
648
  const { promisify } = await import("node:util");
649
+ const { existsSync, readFileSync, writeFileSync } = await import("node:fs");
650
+ const { join } = await import("node:path");
651
+ const { homedir } = await import("node:os");
649
652
  const exec = promisify(execFile);
650
653
  await exec("aery", ["install", "https://github.com/eminent337/aery-extensions"], {
651
654
  timeout: 30000,
652
655
  });
656
+ // Wire core extensions into settings.json
657
+ const repoPath = join(homedir(), ".aery", "agent", "git", "github.com", "eminent337", "aery-extensions");
658
+ const settingsPath = join(homedir(), ".aery", "agent", "settings.json");
659
+ const CORE = ["auto-compact", "damage-control", "provider-profiles", "model-failover", "web-search", "web-fetch", "commands", "hooks", "circuit-breaker", "auto-router", "memory-include", "aery-header", "aery-footer"];
660
+ if (existsSync(settingsPath)) {
661
+ const settings = JSON.parse(readFileSync(settingsPath, "utf-8"));
662
+ const existing = new Set(settings.extensions || []);
663
+ for (const ext of CORE) {
664
+ const p = join(repoPath, "core", ext + ".ts");
665
+ if (existsSync(p) && !existing.has(p)) {
666
+ settings.extensions = settings.extensions || [];
667
+ settings.extensions.push(p);
668
+ }
669
+ }
670
+ writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
671
+ }
653
672
  }
654
673
  catch {
655
674
  // Silent fail — user can install manually