instar 1.3.529 → 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 +61 -0
- package/dist/commands/server.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +15 -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 +15 -2
- package/dist/core/CoherenceJournal.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/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +25 -1
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +5 -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 +2 -1
- package/dist/scaffold/templates.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +19 -19
- package/src/scaffold/templates.ts +2 -1
- package/upgrades/1.3.530.md +33 -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,E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AAE,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
|
@@ -3328,6 +3328,18 @@ export async function startServer(options) {
|
|
|
3328
3328
|
// recordKey is a content fingerprint (LearningsReplicatedStore.deriveLearningRecordKey).
|
|
3329
3329
|
const { LEARNING_KIND_REGISTRATION } = await import('../core/LearningsReplicatedStore.js');
|
|
3330
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);
|
|
3331
3343
|
// Snapshot-then-tail engine (Component 4 / build-order step 3,
|
|
3332
3344
|
// multi-machine-replicated-store-foundation §6). The cache (FIXED ceiling,
|
|
3333
3345
|
// §8.2 — NOT pool-scaled), the per-peer rebuild breaker (§6.3), and the engine
|
|
@@ -7591,6 +7603,55 @@ export async function startServer(options) {
|
|
|
7591
7603
|
conflictStore,
|
|
7592
7604
|
});
|
|
7593
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
|
|
7594
7655
|
// Start MemoryPressureMonitor (platform-aware memory tracking)
|
|
7595
7656
|
const { MemoryPressureMonitor } = await import('../monitoring/MemoryPressureMonitor.js');
|
|
7596
7657
|
const memoryMonitor = new MemoryPressureMonitor({ stateDir: config.stateDir });
|