instar 1.3.528 → 1.3.530
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/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +114 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +29 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/CoherenceJournal.d.ts +1 -1
- package/dist/core/CoherenceJournal.d.ts.map +1 -1
- package/dist/core/CoherenceJournal.js +27 -2
- package/dist/core/CoherenceJournal.js.map +1 -1
- package/dist/core/EvolutionManager.d.ts +35 -0
- package/dist/core/EvolutionManager.d.ts.map +1 -1
- package/dist/core/EvolutionManager.js +49 -0
- package/dist/core/EvolutionManager.js.map +1 -1
- package/dist/core/KnowledgeReplicatedStore.d.ts +310 -0
- package/dist/core/KnowledgeReplicatedStore.d.ts.map +1 -0
- package/dist/core/KnowledgeReplicatedStore.js +526 -0
- package/dist/core/KnowledgeReplicatedStore.js.map +1 -0
- package/dist/core/LearningsReplicatedStore.d.ts +298 -0
- package/dist/core/LearningsReplicatedStore.d.ts.map +1 -0
- package/dist/core/LearningsReplicatedStore.js +574 -0
- package/dist/core/LearningsReplicatedStore.js.map +1 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +49 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +10 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/knowledge/KnowledgeManager.d.ts +37 -0
- package/dist/knowledge/KnowledgeManager.d.ts.map +1 -1
- package/dist/knowledge/KnowledgeManager.js +45 -0
- package/dist/knowledge/KnowledgeManager.js.map +1 -1
- package/dist/scaffold/templates.d.ts.map +1 -1
- package/dist/scaffold/templates.js +3 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +20 -20
- package/src/scaffold/templates.ts +3 -1
- package/upgrades/1.3.529.md +33 -0
- package/upgrades/1.3.530.md +33 -0
- package/upgrades/side-effects/ws22-learnings.md +74 -0
- package/upgrades/side-effects/ws24-knowledge.md +77 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAgCH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAS3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAuBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAiH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAsBtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AAyID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAm1CD,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE,eAAe,EACzB,cAAc,EAAE,cAAc,EAC9B,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,WAAW,EACzB,WAAW,CAAC,EAAE,WAAW,EACzB,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,EAGvE,UAAU,CAAC,EAAE,MAAM,OAAO,8BAA8B,EAAE,WAAW,GAAG,IAAI,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EAAE,WAAW,GAAG,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,CAqtatE;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"}
|
package/dist/commands/server.js
CHANGED
|
@@ -3317,6 +3317,29 @@ 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);
|
|
3331
|
+
// WS2.4 (multi-machine-replicated-store-foundation) — register the FOURTH concrete
|
|
3332
|
+
// replicated kind, `knowledge-record`, onto the registry: the THIRD memory-family
|
|
3333
|
+
// kind (after WS2.3 relationships + WS2.2 learnings). Dual-registry's dynamic half
|
|
3334
|
+
// (the static half is CoherenceJournal.JOURNAL_KINDS, which now lists 'knowledge-record').
|
|
3335
|
+
// Registration is INERT — emission/serve/pull stay gated behind
|
|
3336
|
+
// `multiMachine.stateSync.knowledge.enabled` (default false ⇒ strict no-op). With it
|
|
3337
|
+
// registered, selfStateSyncReceive self-reports `knowledge:true` IFF the store is
|
|
3338
|
+
// enabled, and the rollback-unmerge resolves its contributing kind via getByStore. The
|
|
3339
|
+
// local generated id + filePath are NEVER replicated — only the catalog METADATA (never
|
|
3340
|
+
// the file body), keyed on a content fingerprint (KnowledgeReplicatedStore.deriveKnowledgeRecordKey).
|
|
3341
|
+
const { KNOWLEDGE_KIND_REGISTRATION } = await import('../core/KnowledgeReplicatedStore.js');
|
|
3342
|
+
replicatedKindRegistry.register(KNOWLEDGE_KIND_REGISTRATION);
|
|
3320
3343
|
// Snapshot-then-tail engine (Component 4 / build-order step 3,
|
|
3321
3344
|
// multi-machine-replicated-store-foundation §6). The cache (FIXED ceiling,
|
|
3322
3345
|
// §8.2 — NOT pool-scaled), the per-peer rebuild breaker (§6.3), and the engine
|
|
@@ -7538,6 +7561,97 @@ export async function startServer(options) {
|
|
|
7538
7561
|
...(config.evolution || {}),
|
|
7539
7562
|
});
|
|
7540
7563
|
console.log(pc.green(' Evolution system enabled'));
|
|
7564
|
+
// WS2.2 — the bypass-proof union reader for the `learnings` store. The single funnel
|
|
7565
|
+
// every replicated learning read routes through, so no caller reads a raw replica
|
|
7566
|
+
// around the no-clobber rule. `loadOriginRecords` materializes the OWN learning store
|
|
7567
|
+
// as the single origin today (via learningToOriginRecord, keyed on the content-
|
|
7568
|
+
// fingerprint identity surface — the local LRN-NNN id is NEVER replicated); when the
|
|
7569
|
+
// journal apply path lands peer `learning-record` replicas (a later rollout stage),
|
|
7570
|
+
// the seam extends to read those peer namespaces too. With only the own origin the
|
|
7571
|
+
// union is a strict no-op (= that one local record). tierOf returns HIGH (append-both-
|
|
7572
|
+
// and-flag never silently clobbers two divergent lessons; the READ layer is advisory,
|
|
7573
|
+
// injecting both variants as hints rather than blocking — fork #2). Consulted by a
|
|
7574
|
+
// learnings peer-read surface ONLY when stateSync.learnings.enabled is true.
|
|
7575
|
+
const { learningTierOf, learningToOriginRecord, deriveLearningRecordKey, LEARNING_STORE_KEY } = await import('../core/LearningsReplicatedStore.js');
|
|
7576
|
+
const learningsUnionReader = new ReplicatedStoreReader({
|
|
7577
|
+
registry: replicatedKindRegistry,
|
|
7578
|
+
stores: config.multiMachine?.stateSync,
|
|
7579
|
+
tierOf: learningTierOf,
|
|
7580
|
+
loadOriginRecords: (store, recordKey) => {
|
|
7581
|
+
if (store !== LEARNING_STORE_KEY || _meshSelfId === null)
|
|
7582
|
+
return [];
|
|
7583
|
+
for (const l of evolution.listLearnings()) {
|
|
7584
|
+
if (deriveLearningRecordKey(l.title, l.category, l.source) === recordKey) {
|
|
7585
|
+
const o = learningToOriginRecord(l, _meshSelfId);
|
|
7586
|
+
return o ? [o] : [];
|
|
7587
|
+
}
|
|
7588
|
+
}
|
|
7589
|
+
return [];
|
|
7590
|
+
},
|
|
7591
|
+
listRecordKeys: (store) => {
|
|
7592
|
+
if (store !== LEARNING_STORE_KEY)
|
|
7593
|
+
return [];
|
|
7594
|
+
const keys = [];
|
|
7595
|
+
for (const l of evolution.listLearnings()) {
|
|
7596
|
+
const k = deriveLearningRecordKey(l.title, l.category, l.source);
|
|
7597
|
+
if (k !== null)
|
|
7598
|
+
keys.push(k);
|
|
7599
|
+
}
|
|
7600
|
+
return keys;
|
|
7601
|
+
},
|
|
7602
|
+
droppedOrigins: droppedOriginRegistry,
|
|
7603
|
+
conflictStore,
|
|
7604
|
+
});
|
|
7605
|
+
void learningsUnionReader; // consumed by the learnings peer-read surface + the journal-apply rollout stage (WS2.2+)
|
|
7606
|
+
// WS2.4 — the bypass-proof union reader for the `knowledge` store + the emit seam on
|
|
7607
|
+
// the KnowledgeManager. The KnowledgeManager reads the local catalog.json (cheap, no
|
|
7608
|
+
// background work); we construct one here scoped to the replication wiring. The union
|
|
7609
|
+
// reader is the single funnel every replicated knowledge read routes through, so no
|
|
7610
|
+
// caller reads a raw replica around the no-clobber rule. `loadOriginRecords`
|
|
7611
|
+
// materializes the OWN catalog as the single origin today (via knowledgeToOriginRecord,
|
|
7612
|
+
// keyed on the content-fingerprint identity surface — the local id + filePath are NEVER
|
|
7613
|
+
// replicated); when the journal apply path lands peer `knowledge-record` replicas (a
|
|
7614
|
+
// later rollout stage), the seam extends to read those peer namespaces too. With only
|
|
7615
|
+
// the own origin the union is a strict no-op. tierOf returns HIGH (append-both-and-flag
|
|
7616
|
+
// never silently clobbers two divergent sources; the READ layer is advisory, injecting
|
|
7617
|
+
// both variants as hints rather than blocking — fork #3). The emit seam is attached ONLY
|
|
7618
|
+
// when stateSync.knowledge.enabled is true (default false ⇒ NOT injected ⇒ strict no-op,
|
|
7619
|
+
// byte-identical single-machine behavior; the catalog METADATA is emitted, never the
|
|
7620
|
+
// file body — fork #2).
|
|
7621
|
+
const { KnowledgeManager } = await import('../knowledge/KnowledgeManager.js');
|
|
7622
|
+
const knowledgeManager = new KnowledgeManager(config.stateDir);
|
|
7623
|
+
const { knowledgeTierOf, knowledgeToOriginRecord, deriveKnowledgeRecordKey, KNOWLEDGE_STORE_KEY, } = await import('../core/KnowledgeReplicatedStore.js');
|
|
7624
|
+
const knowledgeUnionReader = new ReplicatedStoreReader({
|
|
7625
|
+
registry: replicatedKindRegistry,
|
|
7626
|
+
stores: config.multiMachine?.stateSync,
|
|
7627
|
+
tierOf: knowledgeTierOf,
|
|
7628
|
+
loadOriginRecords: (store, recordKey) => {
|
|
7629
|
+
if (store !== KNOWLEDGE_STORE_KEY || _meshSelfId === null)
|
|
7630
|
+
return [];
|
|
7631
|
+
for (const s of knowledgeManager.getCatalog()) {
|
|
7632
|
+
if (deriveKnowledgeRecordKey(s.title, s.url, s.type) === recordKey) {
|
|
7633
|
+
const o = knowledgeToOriginRecord(s, _meshSelfId);
|
|
7634
|
+
return o ? [o] : [];
|
|
7635
|
+
}
|
|
7636
|
+
}
|
|
7637
|
+
return [];
|
|
7638
|
+
},
|
|
7639
|
+
listRecordKeys: (store) => {
|
|
7640
|
+
if (store !== KNOWLEDGE_STORE_KEY)
|
|
7641
|
+
return [];
|
|
7642
|
+
const keys = [];
|
|
7643
|
+
for (const s of knowledgeManager.getCatalog()) {
|
|
7644
|
+
const k = deriveKnowledgeRecordKey(s.title, s.url, s.type);
|
|
7645
|
+
if (k !== null)
|
|
7646
|
+
keys.push(k);
|
|
7647
|
+
}
|
|
7648
|
+
return keys;
|
|
7649
|
+
},
|
|
7650
|
+
droppedOrigins: droppedOriginRegistry,
|
|
7651
|
+
conflictStore,
|
|
7652
|
+
});
|
|
7653
|
+
void knowledgeUnionReader; // consumed by the knowledge peer-read surface + the journal-apply rollout stage (WS2.4+)
|
|
7654
|
+
void knowledgeManager.setKnowledgeReplicationEmitter; // the emit seam exists (unit-tested + dark by default); the journal-backed emitter is attached in a later rollout stage, mirroring the WS2.2 learnings sibling
|
|
7541
7655
|
// Start MemoryPressureMonitor (platform-aware memory tracking)
|
|
7542
7656
|
const { MemoryPressureMonitor } = await import('../monitoring/MemoryPressureMonitor.js');
|
|
7543
7657
|
const memoryMonitor = new MemoryPressureMonitor({ stateDir: config.stateDir });
|