instar 1.3.529 → 1.3.531
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 +120 -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 +28 -2
- package/dist/core/CoherenceJournal.js.map +1 -1
- package/dist/core/EvolutionActionsReplicatedStore.d.ts +317 -0
- package/dist/core/EvolutionActionsReplicatedStore.d.ts.map +1 -0
- package/dist/core/EvolutionActionsReplicatedStore.js +625 -0
- package/dist/core/EvolutionActionsReplicatedStore.js.map +1 -0
- package/dist/core/EvolutionManager.d.ts +42 -0
- package/dist/core/EvolutionManager.d.ts.map +1 -1
- package/dist/core/EvolutionManager.js +52 -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/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.530.md +33 -0
- package/upgrades/1.3.531.md +33 -0
- package/upgrades/side-effects/ws24-knowledge.md +77 -0
- package/upgrades/side-effects/ws25-evolution.md +84 -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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AAM,OAAO,8BAA8B,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,CAoxatE;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
|
@@ -3328,6 +3328,31 @@ 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);
|
|
3343
|
+
// WS2.5 (multi-machine-replicated-store-foundation) — register the FIFTH concrete
|
|
3344
|
+
// replicated kind, `evolution-action-record`, onto the registry: the FOURTH memory-family
|
|
3345
|
+
// kind (after WS2.4 knowledge + WS2.2 learnings + WS2.3 relationships). Dual-registry's
|
|
3346
|
+
// dynamic half (the static half is CoherenceJournal.JOURNAL_KINDS, which now lists
|
|
3347
|
+
// 'evolution-action-record'). Registration is INERT — emission/serve/pull stay gated
|
|
3348
|
+
// behind `multiMachine.stateSync.evolutionActions.enabled` (default false ⇒ strict no-op).
|
|
3349
|
+
// With it registered, selfStateSyncReceive self-reports `evolutionActions:true` IFF the
|
|
3350
|
+
// store is enabled, and the rollback-unmerge resolves its contributing kind via getByStore.
|
|
3351
|
+
// The local ACT-NNN id is NEVER replicated — keyed on a content fingerprint
|
|
3352
|
+
// (EvolutionActionsReplicatedStore.deriveEvolutionActionRecordKey). The load-bearing field
|
|
3353
|
+
// is `status`: a peer must SEE an action was already completed/in_progress elsewhere.
|
|
3354
|
+
const { EVOLUTION_ACTION_KIND_REGISTRATION } = await import('../core/EvolutionActionsReplicatedStore.js');
|
|
3355
|
+
replicatedKindRegistry.register(EVOLUTION_ACTION_KIND_REGISTRATION);
|
|
3331
3356
|
// Snapshot-then-tail engine (Component 4 / build-order step 3,
|
|
3332
3357
|
// multi-machine-replicated-store-foundation §6). The cache (FIXED ceiling,
|
|
3333
3358
|
// §8.2 — NOT pool-scaled), the per-peer rebuild breaker (§6.3), and the engine
|
|
@@ -7591,6 +7616,101 @@ export async function startServer(options) {
|
|
|
7591
7616
|
conflictStore,
|
|
7592
7617
|
});
|
|
7593
7618
|
void learningsUnionReader; // consumed by the learnings peer-read surface + the journal-apply rollout stage (WS2.2+)
|
|
7619
|
+
// WS2.4 — the bypass-proof union reader for the `knowledge` store + the emit seam on
|
|
7620
|
+
// the KnowledgeManager. The KnowledgeManager reads the local catalog.json (cheap, no
|
|
7621
|
+
// background work); we construct one here scoped to the replication wiring. The union
|
|
7622
|
+
// reader is the single funnel every replicated knowledge read routes through, so no
|
|
7623
|
+
// caller reads a raw replica around the no-clobber rule. `loadOriginRecords`
|
|
7624
|
+
// materializes the OWN catalog as the single origin today (via knowledgeToOriginRecord,
|
|
7625
|
+
// keyed on the content-fingerprint identity surface — the local id + filePath are NEVER
|
|
7626
|
+
// replicated); when the journal apply path lands peer `knowledge-record` replicas (a
|
|
7627
|
+
// later rollout stage), the seam extends to read those peer namespaces too. With only
|
|
7628
|
+
// the own origin the union is a strict no-op. tierOf returns HIGH (append-both-and-flag
|
|
7629
|
+
// never silently clobbers two divergent sources; the READ layer is advisory, injecting
|
|
7630
|
+
// both variants as hints rather than blocking — fork #3). The emit seam is attached ONLY
|
|
7631
|
+
// when stateSync.knowledge.enabled is true (default false ⇒ NOT injected ⇒ strict no-op,
|
|
7632
|
+
// byte-identical single-machine behavior; the catalog METADATA is emitted, never the
|
|
7633
|
+
// file body — fork #2).
|
|
7634
|
+
const { KnowledgeManager } = await import('../knowledge/KnowledgeManager.js');
|
|
7635
|
+
const knowledgeManager = new KnowledgeManager(config.stateDir);
|
|
7636
|
+
const { knowledgeTierOf, knowledgeToOriginRecord, deriveKnowledgeRecordKey, KNOWLEDGE_STORE_KEY, } = await import('../core/KnowledgeReplicatedStore.js');
|
|
7637
|
+
const knowledgeUnionReader = new ReplicatedStoreReader({
|
|
7638
|
+
registry: replicatedKindRegistry,
|
|
7639
|
+
stores: config.multiMachine?.stateSync,
|
|
7640
|
+
tierOf: knowledgeTierOf,
|
|
7641
|
+
loadOriginRecords: (store, recordKey) => {
|
|
7642
|
+
if (store !== KNOWLEDGE_STORE_KEY || _meshSelfId === null)
|
|
7643
|
+
return [];
|
|
7644
|
+
for (const s of knowledgeManager.getCatalog()) {
|
|
7645
|
+
if (deriveKnowledgeRecordKey(s.title, s.url, s.type) === recordKey) {
|
|
7646
|
+
const o = knowledgeToOriginRecord(s, _meshSelfId);
|
|
7647
|
+
return o ? [o] : [];
|
|
7648
|
+
}
|
|
7649
|
+
}
|
|
7650
|
+
return [];
|
|
7651
|
+
},
|
|
7652
|
+
listRecordKeys: (store) => {
|
|
7653
|
+
if (store !== KNOWLEDGE_STORE_KEY)
|
|
7654
|
+
return [];
|
|
7655
|
+
const keys = [];
|
|
7656
|
+
for (const s of knowledgeManager.getCatalog()) {
|
|
7657
|
+
const k = deriveKnowledgeRecordKey(s.title, s.url, s.type);
|
|
7658
|
+
if (k !== null)
|
|
7659
|
+
keys.push(k);
|
|
7660
|
+
}
|
|
7661
|
+
return keys;
|
|
7662
|
+
},
|
|
7663
|
+
droppedOrigins: droppedOriginRegistry,
|
|
7664
|
+
conflictStore,
|
|
7665
|
+
});
|
|
7666
|
+
void knowledgeUnionReader; // consumed by the knowledge peer-read surface + the journal-apply rollout stage (WS2.4+)
|
|
7667
|
+
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
|
|
7668
|
+
// WS2.5 — the bypass-proof union reader for the `evolutionActions` store. The single
|
|
7669
|
+
// funnel every replicated action read routes through, so no caller reads a raw replica
|
|
7670
|
+
// around the no-clobber rule. `loadOriginRecords` materializes the OWN action queue (the
|
|
7671
|
+
// same EvolutionManager that owns learnings) as the single origin today (via
|
|
7672
|
+
// evolutionActionToOriginRecord, keyed on the content-fingerprint identity surface — the
|
|
7673
|
+
// local ACT-NNN id is NEVER replicated); when the journal apply path lands peer
|
|
7674
|
+
// `evolution-action-record` replicas (a later rollout stage), the seam extends to read
|
|
7675
|
+
// those peer namespaces too. With only the own origin the union is a strict no-op. tierOf
|
|
7676
|
+
// returns HIGH (append-both-and-flag never silently clobbers two divergent action states —
|
|
7677
|
+
// e.g. one machine's completed vs another's in_progress; the READ layer is advisory,
|
|
7678
|
+
// injecting both variants as hints rather than blocking — fork #3). The emit seam is
|
|
7679
|
+
// attached ONLY when stateSync.evolutionActions.enabled is true (default false ⇒ NOT
|
|
7680
|
+
// injected ⇒ strict no-op, byte-identical single-machine behavior; the ACT id never crosses
|
|
7681
|
+
// the wire — fork #1).
|
|
7682
|
+
const { evolutionActionTierOf, evolutionActionToOriginRecord, deriveEvolutionActionRecordKey, EVOLUTION_ACTION_STORE_KEY, } = await import('../core/EvolutionActionsReplicatedStore.js');
|
|
7683
|
+
const evolutionActionsUnionReader = new ReplicatedStoreReader({
|
|
7684
|
+
registry: replicatedKindRegistry,
|
|
7685
|
+
stores: config.multiMachine?.stateSync,
|
|
7686
|
+
tierOf: evolutionActionTierOf,
|
|
7687
|
+
loadOriginRecords: (store, recordKey) => {
|
|
7688
|
+
if (store !== EVOLUTION_ACTION_STORE_KEY || _meshSelfId === null)
|
|
7689
|
+
return [];
|
|
7690
|
+
for (const a of evolution.listActions()) {
|
|
7691
|
+
if (deriveEvolutionActionRecordKey(a.title, a.commitTo, a.createdAt) === recordKey) {
|
|
7692
|
+
const o = evolutionActionToOriginRecord(a, _meshSelfId);
|
|
7693
|
+
return o ? [o] : [];
|
|
7694
|
+
}
|
|
7695
|
+
}
|
|
7696
|
+
return [];
|
|
7697
|
+
},
|
|
7698
|
+
listRecordKeys: (store) => {
|
|
7699
|
+
if (store !== EVOLUTION_ACTION_STORE_KEY)
|
|
7700
|
+
return [];
|
|
7701
|
+
const keys = [];
|
|
7702
|
+
for (const a of evolution.listActions()) {
|
|
7703
|
+
const k = deriveEvolutionActionRecordKey(a.title, a.commitTo, a.createdAt);
|
|
7704
|
+
if (k !== null)
|
|
7705
|
+
keys.push(k);
|
|
7706
|
+
}
|
|
7707
|
+
return keys;
|
|
7708
|
+
},
|
|
7709
|
+
droppedOrigins: droppedOriginRegistry,
|
|
7710
|
+
conflictStore,
|
|
7711
|
+
});
|
|
7712
|
+
void evolutionActionsUnionReader; // consumed by the evolution-actions peer-read surface + the journal-apply rollout stage (WS2.5+)
|
|
7713
|
+
void evolution.setEvolutionActionReplicationEmitter; // 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
7714
|
// Start MemoryPressureMonitor (platform-aware memory tracking)
|
|
7595
7715
|
const { MemoryPressureMonitor } = await import('../monitoring/MemoryPressureMonitor.js');
|
|
7596
7716
|
const memoryMonitor = new MemoryPressureMonitor({ stateDir: config.stateDir });
|