instar 1.3.572 → 1.3.574

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.
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAkCH,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;AAkH7D,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;AAg4CD,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,EAK5E,qBAAqB,CAAC,EAAE,MAAM,OAAO,gCAAgC,EAAE,kBAAkB,GAAG,IAAI,EAKhG,mBAAmB,CAAC,EAAE,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E,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,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,CAqsctE;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"}
@@ -7997,7 +7997,7 @@ export async function startServer(options) {
7997
7997
  // file body — fork #2).
7998
7998
  const { KnowledgeManager } = await import('../knowledge/KnowledgeManager.js');
7999
7999
  const knowledgeManager = new KnowledgeManager(config.stateDir);
8000
- const { knowledgeTierOf, knowledgeToOriginRecord, deriveKnowledgeRecordKey, KNOWLEDGE_STORE_KEY, } = await import('../core/KnowledgeReplicatedStore.js');
8000
+ const { knowledgeTierOf, knowledgeToOriginRecord, deriveKnowledgeRecordKey, buildKnowledgeRecordData, buildKnowledgeTombstoneData, KNOWLEDGE_STORE_KEY, } = await import('../core/KnowledgeReplicatedStore.js');
8001
8001
  const knowledgeUnionReader = new ReplicatedStoreReader({
8002
8002
  registry: replicatedKindRegistry,
8003
8003
  stores: _stateSyncStoresResolved, // gate-resolved (dev-live / fleet-dark) per operator directive 2026-06-13
@@ -8028,7 +8028,23 @@ export async function startServer(options) {
8028
8028
  conflictStore,
8029
8029
  });
8030
8030
  void knowledgeUnionReader; // consumed by the knowledge peer-read surface + the journal-apply rollout stage (WS2.4+)
8031
- 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
8031
+ // WS2.4 SEND-SIDE: attach the journal-backed emitter to the KnowledgeManager's
8032
+ // replication hooks. The manager already fires emitPut on every ingested source and
8033
+ // emitDelete on remove() (KnowledgeManager.setKnowledgeReplicationEmitter); the adapter
8034
+ // maps the manager's emit signature to the knowledge build*RecordData projection. The
8035
+ // generic emitter owns the dark gate, HLC tick, `observed` witness, journal append, and
8036
+ // ALL the safety guards (null recordKey ⇒ skip, null projection ⇒ skip, over-cap throw ⇒
8037
+ // counted no-op) — so the adapter mirrors learnings/relationships with no extra guarding.
8038
+ // Only the catalog METADATA crosses (title/url/type/tags/summary/wordCount) — NEVER the
8039
+ // markdown file body, NEVER the local id/filePath (fork #2). Attached only when the
8040
+ // emitter exists; dark by default ⇒ no-op (byte-identical single-machine behavior).
8041
+ if (replicatedRecordEmitter) {
8042
+ const emitter = replicatedRecordEmitter;
8043
+ knowledgeManager.setKnowledgeReplicationEmitter({
8044
+ emitPut: (rec) => emitter.emit(KNOWLEDGE_STORE_KEY, deriveKnowledgeRecordKey(rec.title, rec.url, rec.type), (hlc, origin, observed) => buildKnowledgeRecordData({ record: rec, hlc, origin, observed })),
8045
+ emitDelete: (title, url, type, deletedAt) => emitter.emit(KNOWLEDGE_STORE_KEY, deriveKnowledgeRecordKey(title, url, type), (hlc, origin, observed) => buildKnowledgeTombstoneData({ title, url, type, hlc, origin, deletedAt, observed })),
8046
+ });
8047
+ }
8032
8048
  // WS2.5 — the bypass-proof union reader for the `evolutionActions` store. The single
8033
8049
  // funnel every replicated action read routes through, so no caller reads a raw replica
8034
8050
  // around the no-clobber rule. `loadOriginRecords` materializes the OWN action queue (the
@@ -8043,7 +8059,7 @@ export async function startServer(options) {
8043
8059
  // attached ONLY when stateSync.evolutionActions.enabled is true (default false ⇒ NOT
8044
8060
  // injected ⇒ strict no-op, byte-identical single-machine behavior; the ACT id never crosses
8045
8061
  // the wire — fork #1).
8046
- const { evolutionActionTierOf, evolutionActionToOriginRecord, deriveEvolutionActionRecordKey, EVOLUTION_ACTION_STORE_KEY, } = await import('../core/EvolutionActionsReplicatedStore.js');
8062
+ const { evolutionActionTierOf, evolutionActionToOriginRecord, deriveEvolutionActionRecordKey, buildEvolutionActionRecordData, buildEvolutionActionTombstoneData, EVOLUTION_ACTION_STORE_KEY, } = await import('../core/EvolutionActionsReplicatedStore.js');
8047
8063
  const evolutionActionsUnionReader = new ReplicatedStoreReader({
8048
8064
  registry: replicatedKindRegistry,
8049
8065
  stores: _stateSyncStoresResolved, // gate-resolved (dev-live / fleet-dark) per operator directive 2026-06-13
@@ -8074,7 +8090,25 @@ export async function startServer(options) {
8074
8090
  conflictStore,
8075
8091
  });
8076
8092
  void evolutionActionsUnionReader; // consumed by the evolution-actions peer-read surface + the journal-apply rollout stage (WS2.5+)
8077
- 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
8093
+ // WS2.5 SEND-SIDE: attach the journal-backed emitter to the EvolutionManager's
8094
+ // action-queue hooks. saveActions already fires emitPut on every surviving action
8095
+ // (so a STATUS CHANGE re-emits — a peer SEES completed/in_progress and won't redo it)
8096
+ // and emitDelete on every action actually pruned out of the queue (a RETAINED terminal
8097
+ // action is never tombstoned — only a real queue-removal is). The adapter maps the
8098
+ // manager's emit signature to the action build*RecordData projection; the generic emitter
8099
+ // owns the dark gate, HLC tick, `observed` witness, journal append, and ALL the safety
8100
+ // guards (null recordKey ⇒ skip, null projection ⇒ skip, over-cap throw ⇒ counted no-op).
8101
+ // `evolution` is the canonical instance handed to the AgentServer, so the action routes'
8102
+ // real writes flow through these hooks. Attached only when the emitter exists; dark by
8103
+ // default ⇒ no-op (byte-identical single-machine behavior; the local ACT-NNN id never
8104
+ // crosses the wire — fork #1, only the enumerated content projection does).
8105
+ if (replicatedRecordEmitter) {
8106
+ const emitter = replicatedRecordEmitter;
8107
+ evolution.setEvolutionActionReplicationEmitter({
8108
+ emitPut: (rec) => emitter.emit(EVOLUTION_ACTION_STORE_KEY, deriveEvolutionActionRecordKey(rec.title, rec.commitTo, rec.createdAt), (hlc, origin, observed) => buildEvolutionActionRecordData({ record: rec, hlc, origin, observed })),
8109
+ emitDelete: (title, commitTo, createdAt, deletedAt) => emitter.emit(EVOLUTION_ACTION_STORE_KEY, deriveEvolutionActionRecordKey(title, commitTo, createdAt), (hlc, origin, observed) => buildEvolutionActionTombstoneData({ title, commitTo, createdAt, hlc, origin, deletedAt, observed })),
8110
+ });
8111
+ }
8078
8112
  // WS2.6 — the bypass-proof union reader for the `userRegistry` store (the SECOND PII kind). The
8079
8113
  // single funnel every replicated user read routes through, so no caller reads a raw replica
8080
8114
  // around the no-clobber rule. `loadOriginRecords` materializes the OWN user registry as the