instar 1.3.528 → 1.3.529

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.
Files changed (32) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +53 -0
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/config/ConfigDefaults.d.ts.map +1 -1
  5. package/dist/config/ConfigDefaults.js +14 -0
  6. package/dist/config/ConfigDefaults.js.map +1 -1
  7. package/dist/core/CoherenceJournal.d.ts +1 -1
  8. package/dist/core/CoherenceJournal.d.ts.map +1 -1
  9. package/dist/core/CoherenceJournal.js +14 -2
  10. package/dist/core/CoherenceJournal.js.map +1 -1
  11. package/dist/core/EvolutionManager.d.ts +35 -0
  12. package/dist/core/EvolutionManager.d.ts.map +1 -1
  13. package/dist/core/EvolutionManager.js +49 -0
  14. package/dist/core/EvolutionManager.js.map +1 -1
  15. package/dist/core/LearningsReplicatedStore.d.ts +298 -0
  16. package/dist/core/LearningsReplicatedStore.d.ts.map +1 -0
  17. package/dist/core/LearningsReplicatedStore.js +574 -0
  18. package/dist/core/LearningsReplicatedStore.js.map +1 -0
  19. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  20. package/dist/core/PostUpdateMigrator.js +25 -1
  21. package/dist/core/PostUpdateMigrator.js.map +1 -1
  22. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  23. package/dist/core/devGatedFeatures.js +5 -0
  24. package/dist/core/devGatedFeatures.js.map +1 -1
  25. package/dist/scaffold/templates.d.ts.map +1 -1
  26. package/dist/scaffold/templates.js +2 -1
  27. package/dist/scaffold/templates.js.map +1 -1
  28. package/package.json +1 -1
  29. package/src/data/builtin-manifest.json +20 -20
  30. package/src/scaffold/templates.ts +2 -1
  31. package/upgrades/1.3.529.md +33 -0
  32. package/upgrades/side-effects/ws22-learnings.md +74 -0
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"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G,IAAI,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CA8eN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAopatE;AAED,wBAAsB,UAAU,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAsDzE;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,aAAa,CAAC,OAAO,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAuD5E"}
@@ -3317,6 +3317,17 @@ export async function startServer(options) {
3317
3317
  // and the rollback-unmerge resolves its contributing kind via getByStore.
3318
3318
  const { RELATIONSHIP_KIND_REGISTRATION } = await import('../core/RelationshipsReplicatedStore.js');
3319
3319
  replicatedKindRegistry.register(RELATIONSHIP_KIND_REGISTRATION);
3320
+ // WS2.2 (multi-machine-replicated-store-foundation) — register the THIRD concrete
3321
+ // replicated kind, `learning-record`, onto the registry: the SECOND memory-family
3322
+ // kind (after WS2.3 relationships). Dual-registry's dynamic half (the static half is
3323
+ // CoherenceJournal.JOURNAL_KINDS, which now lists 'learning-record'). Registration is
3324
+ // INERT — emission/serve/pull stay gated behind `multiMachine.stateSync.learnings.enabled`
3325
+ // (default false ⇒ strict no-op). With it registered, selfStateSyncReceive self-reports
3326
+ // `learnings:true` IFF the store is enabled, and the rollback-unmerge resolves its
3327
+ // contributing kind via getByStore. The local LRN-NNN id is NEVER replicated — the
3328
+ // recordKey is a content fingerprint (LearningsReplicatedStore.deriveLearningRecordKey).
3329
+ const { LEARNING_KIND_REGISTRATION } = await import('../core/LearningsReplicatedStore.js');
3330
+ replicatedKindRegistry.register(LEARNING_KIND_REGISTRATION);
3320
3331
  // Snapshot-then-tail engine (Component 4 / build-order step 3,
3321
3332
  // multi-machine-replicated-store-foundation §6). The cache (FIXED ceiling,
3322
3333
  // §8.2 — NOT pool-scaled), the per-peer rebuild breaker (§6.3), and the engine
@@ -7538,6 +7549,48 @@ export async function startServer(options) {
7538
7549
  ...(config.evolution || {}),
7539
7550
  });
7540
7551
  console.log(pc.green(' Evolution system enabled'));
7552
+ // WS2.2 — the bypass-proof union reader for the `learnings` store. The single funnel
7553
+ // every replicated learning read routes through, so no caller reads a raw replica
7554
+ // around the no-clobber rule. `loadOriginRecords` materializes the OWN learning store
7555
+ // as the single origin today (via learningToOriginRecord, keyed on the content-
7556
+ // fingerprint identity surface — the local LRN-NNN id is NEVER replicated); when the
7557
+ // journal apply path lands peer `learning-record` replicas (a later rollout stage),
7558
+ // the seam extends to read those peer namespaces too. With only the own origin the
7559
+ // union is a strict no-op (= that one local record). tierOf returns HIGH (append-both-
7560
+ // and-flag never silently clobbers two divergent lessons; the READ layer is advisory,
7561
+ // injecting both variants as hints rather than blocking — fork #2). Consulted by a
7562
+ // learnings peer-read surface ONLY when stateSync.learnings.enabled is true.
7563
+ const { learningTierOf, learningToOriginRecord, deriveLearningRecordKey, LEARNING_STORE_KEY } = await import('../core/LearningsReplicatedStore.js');
7564
+ const learningsUnionReader = new ReplicatedStoreReader({
7565
+ registry: replicatedKindRegistry,
7566
+ stores: config.multiMachine?.stateSync,
7567
+ tierOf: learningTierOf,
7568
+ loadOriginRecords: (store, recordKey) => {
7569
+ if (store !== LEARNING_STORE_KEY || _meshSelfId === null)
7570
+ return [];
7571
+ for (const l of evolution.listLearnings()) {
7572
+ if (deriveLearningRecordKey(l.title, l.category, l.source) === recordKey) {
7573
+ const o = learningToOriginRecord(l, _meshSelfId);
7574
+ return o ? [o] : [];
7575
+ }
7576
+ }
7577
+ return [];
7578
+ },
7579
+ listRecordKeys: (store) => {
7580
+ if (store !== LEARNING_STORE_KEY)
7581
+ return [];
7582
+ const keys = [];
7583
+ for (const l of evolution.listLearnings()) {
7584
+ const k = deriveLearningRecordKey(l.title, l.category, l.source);
7585
+ if (k !== null)
7586
+ keys.push(k);
7587
+ }
7588
+ return keys;
7589
+ },
7590
+ droppedOrigins: droppedOriginRegistry,
7591
+ conflictStore,
7592
+ });
7593
+ void learningsUnionReader; // consumed by the learnings peer-read surface + the journal-apply rollout stage (WS2.2+)
7541
7594
  // Start MemoryPressureMonitor (platform-aware memory tracking)
7542
7595
  const { MemoryPressureMonitor } = await import('../monitoring/MemoryPressureMonitor.js');
7543
7596
  const memoryMonitor = new MemoryPressureMonitor({ stateDir: config.stateDir });