@equationalapplications/core-llm-wiki 7.17.2 → 7.18.0

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.mjs CHANGED
@@ -3891,6 +3891,32 @@ var RememberService = class {
3891
3891
  }
3892
3892
  };
3893
3893
 
3894
+ // src/utils/upgradeNotice.ts
3895
+ function upcomingDefaultsWarning(config) {
3896
+ const strategyUnset = config?.librarian?.strategy === void 0;
3897
+ const maintenanceUnset = config?.maintenance === void 0;
3898
+ if (!strategyUnset && !maintenanceUnset) return null;
3899
+ const unset = [];
3900
+ const keep = [];
3901
+ if (strategyUnset) {
3902
+ unset.push("`librarian.strategy` (default becomes 'ops')");
3903
+ keep.push("`librarian: { strategy: 'legacy' }`");
3904
+ }
3905
+ if (maintenanceUnset) {
3906
+ unset.push("`maintenance` (default becomes 'deferred')");
3907
+ keep.push("`maintenance: 'auto'`");
3908
+ }
3909
+ const deferredNote = maintenanceUnset ? " Under 'deferred', the auto-run thresholds stop applying and nothing runs until the host calls runPendingMaintenance()." : "";
3910
+ return `[core-llm-wiki] 8.0.0 changes engine defaults, and this config does not set ${unset.join(" or ")}.${deferredNote} To keep today's behavior, set ${keep.join(" and ")}.`;
3911
+ }
3912
+ var warned = /* @__PURE__ */ new Set();
3913
+ function warnUpcomingDefaultsOnce(config) {
3914
+ const message = upcomingDefaultsWarning(config);
3915
+ if (message === null || warned.has(message)) return;
3916
+ warned.add(message);
3917
+ console.warn(message);
3918
+ }
3919
+
3894
3920
  // src/WikiMemory.ts
3895
3921
  var TABLE_PREFIX_PATTERN = /^[A-Za-z][A-Za-z0-9_]{0,30}_$/;
3896
3922
  var SEARCH_REINIT_COOLDOWN_MS = 5e3;
@@ -3933,6 +3959,7 @@ var WikiMemory = class {
3933
3959
  `Invalid tablePrefix: ${JSON.stringify(this.prefix)}. Must match ${TABLE_PREFIX_PATTERN} (letter, then alphanumeric/underscore, ending in "_", max 32 chars total).`
3934
3960
  );
3935
3961
  }
3962
+ warnUpcomingDefaultsOnce(options.config);
3936
3963
  this.outboxRepo = new OutboxRepository(this.db, this.prefix, !!options.config?.enableOutbox);
3937
3964
  this.entryRepo = new EntryRepository(this.db, this.prefix, this.outboxRepo);
3938
3965
  this.sourceRefIndexRepo = new SourceRefIndexRepository(this.db, this.prefix);