instar 1.3.368 → 1.3.370

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 (37) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +30 -1
  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 +3 -0
  6. package/dist/config/ConfigDefaults.js.map +1 -1
  7. package/dist/core/CoherenceJournal.d.ts +20 -1
  8. package/dist/core/CoherenceJournal.d.ts.map +1 -1
  9. package/dist/core/CoherenceJournal.js +100 -5
  10. package/dist/core/CoherenceJournal.js.map +1 -1
  11. package/dist/core/JournalSyncApplier.d.ts.map +1 -1
  12. package/dist/core/JournalSyncApplier.js +16 -0
  13. package/dist/core/JournalSyncApplier.js.map +1 -1
  14. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  15. package/dist/core/PostUpdateMigrator.js +16 -0
  16. package/dist/core/PostUpdateMigrator.js.map +1 -1
  17. package/dist/scaffold/templates.d.ts.map +1 -1
  18. package/dist/scaffold/templates.js +4 -0
  19. package/dist/scaffold/templates.js.map +1 -1
  20. package/dist/server/routes.d.ts.map +1 -1
  21. package/dist/server/routes.js +27 -0
  22. package/dist/server/routes.js.map +1 -1
  23. package/dist/threadline/ConversationMeshView.d.ts +50 -0
  24. package/dist/threadline/ConversationMeshView.d.ts.map +1 -0
  25. package/dist/threadline/ConversationMeshView.js +78 -0
  26. package/dist/threadline/ConversationMeshView.js.map +1 -0
  27. package/dist/threadline/ConversationStore.d.ts +17 -0
  28. package/dist/threadline/ConversationStore.d.ts.map +1 -1
  29. package/dist/threadline/ConversationStore.js +52 -0
  30. package/dist/threadline/ConversationStore.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/data/builtin-manifest.json +63 -63
  33. package/src/scaffold/templates.ts +4 -0
  34. package/upgrades/{1.3.368.md → 1.3.369.md} +29 -0
  35. package/upgrades/1.3.370.md +38 -0
  36. package/upgrades/side-effects/journal-lock-retry-pin-fallback.md +64 -0
  37. package/upgrades/side-effects/threadline-conversation-kind-p3.md +83 -0
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAk/StE;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"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6SH,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuxDD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA8gTtE;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"}
@@ -2467,6 +2467,12 @@ export async function startServer(options) {
2467
2467
  continue;
2468
2468
  if (!seenRuns.has(j.topic)) {
2469
2469
  const runId = autonomousRunId(j.startedAt, j.topic);
2470
+ // #925: while the writer is locked out the emit below is
2471
+ // dropped — do NOT mark the run seen, so it re-emits on a
2472
+ // later tick once the lock recovers (op-key dedupe makes
2473
+ // re-emits safe).
2474
+ if (journal.isLockedOut)
2475
+ continue;
2470
2476
  seenRuns.set(j.topic, { runId, file: j.file });
2471
2477
  journal.emitAutonomousRun(topicNum, { action: 'started', runId, artifactPaths: [j.file] });
2472
2478
  }
@@ -7475,6 +7481,15 @@ export async function startServer(options) {
7475
7481
  // (below), upstream of all three routing branches, with turn/novelty state
7476
7482
  // living on the Conversation (the one-shot worker can't self-police a loop).
7477
7483
  const conversationStore = new ConversationStore(config.stateDir);
7484
+ // P3 (THREADLINE-CONVERSATION-COHERENCE-SPEC §3.1): the lifecycle
7485
+ // emission seam — the store's commit() transition-diff drives the
7486
+ // journal's 4th kind. Harmless when the journal is absent/locked-out
7487
+ // (emit drops + counts); replication of the kind rides the existing
7488
+ // gate like every other kind.
7489
+ if (coherenceJournal) {
7490
+ const cj = coherenceJournal;
7491
+ conversationStore.setCoherenceJournalSeam((d) => cj.emitThreadlineConversation(d));
7492
+ }
7478
7493
  const warrantsReplyGate = new WarrantsReplyGate({ intelligence: sharedIntelligence });
7479
7494
  // CMT-509 §2: surface PARENTLESS Threadline conversations into a single
7480
7495
  // dedicated topic so a peer reaching out cold is visible (not an invisible
@@ -10093,7 +10108,21 @@ export async function startServer(options) {
10093
10108
  const wsSelf = cjOwnMachineId ?? meshSelfId;
10094
10109
  const wsOwnerOf = (topic) => {
10095
10110
  const rec = sessionOwnershipRegistry?.read(String(topic));
10096
- return { owner: rec?.ownerMachineId ?? null, epoch: rec?.ownershipEpoch ?? null };
10111
+ if (rec?.ownerMachineId) {
10112
+ return { owner: rec.ownerMachineId, epoch: rec.ownershipEpoch ?? null };
10113
+ }
10114
+ // Issue #926 (live 2026-06-06): ownership only CASes when real
10115
+ // traffic flows — a QUIET topic just moved here has owner:null
10116
+ // + a pin. The pin IS the live placement authority for unowned
10117
+ // topics; without this fallback the fetch reflex refuses in
10118
+ // exactly the post-move state it exists for. Epoch 0 keeps the
10119
+ // per-write recheck coherent (a real claim bumps past it and
10120
+ // the in-flight pull aborts as superseded, by design).
10121
+ const pin = _topicPinStore?.get(String(topic));
10122
+ if (pin?.pinned && pin.preferredMachine === wsSelf) {
10123
+ return { owner: wsSelf, epoch: 0 };
10124
+ }
10125
+ return { owner: null, epoch: null };
10097
10126
  };
10098
10127
  workingSetPullCoordinator = new wscMod.WorkingSetPullCoordinator({
10099
10128
  stateDir: config.stateDir,