instar 1.3.697 → 1.3.699

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 (74) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +81 -7
  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 +9 -0
  6. package/dist/config/ConfigDefaults.js.map +1 -1
  7. package/dist/core/CoherenceJournal.d.ts +10 -1
  8. package/dist/core/CoherenceJournal.d.ts.map +1 -1
  9. package/dist/core/CoherenceJournal.js +31 -3
  10. package/dist/core/CoherenceJournal.js.map +1 -1
  11. package/dist/core/MachinePoolRegistry.d.ts +13 -0
  12. package/dist/core/MachinePoolRegistry.d.ts.map +1 -1
  13. package/dist/core/MachinePoolRegistry.js +22 -3
  14. package/dist/core/MachinePoolRegistry.js.map +1 -1
  15. package/dist/core/MessagingToneGate.d.ts +38 -0
  16. package/dist/core/MessagingToneGate.d.ts.map +1 -1
  17. package/dist/core/MessagingToneGate.js +30 -3
  18. package/dist/core/MessagingToneGate.js.map +1 -1
  19. package/dist/core/OwnershipApplier.d.ts +21 -0
  20. package/dist/core/OwnershipApplier.d.ts.map +1 -1
  21. package/dist/core/OwnershipApplier.js +60 -5
  22. package/dist/core/OwnershipApplier.js.map +1 -1
  23. package/dist/core/OwnershipReconciler.d.ts +70 -1
  24. package/dist/core/OwnershipReconciler.d.ts.map +1 -1
  25. package/dist/core/OwnershipReconciler.js +177 -7
  26. package/dist/core/OwnershipReconciler.js.map +1 -1
  27. package/dist/core/TopicPinReplicatedStore.d.ts +68 -0
  28. package/dist/core/TopicPinReplicatedStore.d.ts.map +1 -0
  29. package/dist/core/TopicPinReplicatedStore.js +148 -0
  30. package/dist/core/TopicPinReplicatedStore.js.map +1 -0
  31. package/dist/core/TopicPlacementPinStore.d.ts +20 -2
  32. package/dist/core/TopicPlacementPinStore.d.ts.map +1 -1
  33. package/dist/core/TopicPlacementPinStore.js +5 -3
  34. package/dist/core/TopicPlacementPinStore.js.map +1 -1
  35. package/dist/core/ask-when-authorized.d.ts +32 -0
  36. package/dist/core/ask-when-authorized.d.ts.map +1 -0
  37. package/dist/core/ask-when-authorized.js +73 -0
  38. package/dist/core/ask-when-authorized.js.map +1 -0
  39. package/dist/core/bias-to-action-telemetry.d.ts +35 -0
  40. package/dist/core/bias-to-action-telemetry.d.ts.map +1 -0
  41. package/dist/core/bias-to-action-telemetry.js +40 -0
  42. package/dist/core/bias-to-action-telemetry.js.map +1 -0
  43. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  44. package/dist/core/devGatedFeatures.js +12 -0
  45. package/dist/core/devGatedFeatures.js.map +1 -1
  46. package/dist/core/ownershipApplierWiring.d.ts +5 -0
  47. package/dist/core/ownershipApplierWiring.d.ts.map +1 -1
  48. package/dist/core/ownershipApplierWiring.js +3 -0
  49. package/dist/core/ownershipApplierWiring.js.map +1 -1
  50. package/dist/core/standing-authorization.d.ts +72 -0
  51. package/dist/core/standing-authorization.d.ts.map +1 -0
  52. package/dist/core/standing-authorization.js +130 -0
  53. package/dist/core/standing-authorization.js.map +1 -0
  54. package/dist/core/types.d.ts +30 -0
  55. package/dist/core/types.d.ts.map +1 -1
  56. package/dist/core/types.js.map +1 -1
  57. package/dist/messaging/TelegramAdapter.d.ts +12 -0
  58. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  59. package/dist/messaging/TelegramAdapter.js +8 -0
  60. package/dist/messaging/TelegramAdapter.js.map +1 -1
  61. package/dist/server/AgentServer.d.ts +2 -0
  62. package/dist/server/AgentServer.d.ts.map +1 -1
  63. package/dist/server/AgentServer.js +1 -0
  64. package/dist/server/AgentServer.js.map +1 -1
  65. package/dist/server/routes.d.ts +2 -0
  66. package/dist/server/routes.d.ts.map +1 -1
  67. package/dist/server/routes.js +132 -1
  68. package/dist/server/routes.js.map +1 -1
  69. package/package.json +1 -1
  70. package/src/data/builtin-manifest.json +47 -47
  71. package/upgrades/1.3.698.md +90 -0
  72. package/upgrades/1.3.699.md +31 -0
  73. package/upgrades/side-effects/bias-to-action.md +126 -0
  74. package/upgrades/side-effects/cross-machine-reconciler-convergence.md +56 -0
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8CH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAyBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAyH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA+EtD;;;;;;;;;;;;;;;;;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;AAi7CD,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,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CAihBN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAuwhBtE;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;AA8CH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAyBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAyH7D,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AA+EtD;;;;;;;;;;;;;;;;;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;AAq7CD,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,MAAM,MAAM,GAAG,IAAI,GAAG,SAAS,GACpD,IAAI,CAihBN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CA40hBtE;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"}
@@ -691,6 +691,10 @@ let _slackInboundDispatch = null;
691
691
  // Null until startServer constructs it; the Telegram /restart handler falls
692
692
  // back to the inline kill+respawn path when null (e.g. early in boot).
693
693
  let _sessionRefresh = null;
694
+ // Cross-machine convergence (Fix #3 observability): the WS1.3 OwnershipReconciler, hoisted so
695
+ // the `/pool/reconciler` readout (status + per-topic explain) can reach it. Null until the
696
+ // pool block constructs it (single-machine / dark → stays null → the route 503s).
697
+ let _ownershipReconciler = null;
694
698
  // Subscription & Auth Standard P1.3 — quota-aware account-swap scheduler. Null
695
699
  // until wired (requires SessionRefresh + the subscription pool).
696
700
  let _quotaAwareScheduler = null;
@@ -3677,6 +3681,13 @@ export async function startServer(options) {
3677
3681
  // re-mint-per-machine default (Mechanism B); see ws52-account-follow-me-security.md.
3678
3682
  const { SUBSCRIPTION_ACCOUNT_META_KIND_REGISTRATION } = await import('../core/SubscriptionAccountMetaReplicatedStore.js');
3679
3683
  replicatedKindRegistry.register(SUBSCRIPTION_ACCOUNT_META_KIND_REGISTRATION);
3684
+ // Cross-machine ownership-reconciler convergence Fix #2 (docs/specs/cross-machine-
3685
+ // reconciler-convergence.md): register `topic-pin-record` so the user's PIN (move-intent)
3686
+ // replicates to the OWNING machine — the reconciler there reads it (HLC-ordered, advisory)
3687
+ // and starts the cooperative transfer. Registration is INERT; emission stays gated behind
3688
+ // the store-enable flag (ws13PinReplicate), so a single-machine / dark agent is a no-op.
3689
+ const { TOPIC_PIN_KIND_REGISTRATION } = await import('../core/TopicPinReplicatedStore.js');
3690
+ replicatedKindRegistry.register(TOPIC_PIN_KIND_REGISTRATION);
3680
3691
  // ── WS2 SEND-SIDE wiring (docs/specs/WS2-SEND-SIDE-EMISSION-SPEC.md). The
3681
3692
  // substrate above ships the registry + receive/serve machinery + advert; THIS
3682
3693
  // wires the SEND half that was deferred ("the journal-backed emitter is attached
@@ -3787,9 +3798,19 @@ export async function startServer(options) {
3787
3798
  // gate resolves OFF the entry is absent ⇒ the emitter's `enabled===true` check fails ⇒ strict
3788
3799
  // no-op (no account metadata ever crosses), exactly like the dark stateSync stores.
3789
3800
  const _accountFollowMeEnabled = resolveDevAgentGate(config.multiMachine?.accountFollowMe?.enabled, config);
3790
- const _stateSyncStoresResolved = _accountFollowMeEnabled
3791
- ? { ...(_stateSyncStoresBase ?? {}), subscriptionAccountMeta: { enabled: true } }
3792
- : _stateSyncStoresBase;
3801
+ // Cross-machine convergence Fix #2 — the `topicPins` store gates on
3802
+ // `multiMachine.seamlessness.ws13PinReplicate` (dev-live / fleet-dark, same ladder as the
3803
+ // rest of WS1.3). When OFF the entry is absent ⇒ the emitter's enabled-check fails ⇒ no pin
3804
+ // record ever crosses (a dark/single-machine agent is a strict no-op).
3805
+ const _pinReplicateEnabled = resolveDevAgentGate(config.multiMachine?.seamlessness?.ws13PinReplicate, config);
3806
+ const _stateSyncStoresResolved = (() => {
3807
+ let s = _stateSyncStoresBase ?? {};
3808
+ if (_accountFollowMeEnabled)
3809
+ s = { ...s, subscriptionAccountMeta: { enabled: true } };
3810
+ if (_pinReplicateEnabled)
3811
+ s = { ...s, topicPins: { enabled: true } };
3812
+ return _accountFollowMeEnabled || _pinReplicateEnabled || _stateSyncStoresBase ? s : _stateSyncStoresBase;
3813
+ })();
3793
3814
  // WS2 send-side: the generic journal-backed record emitter (the concrete emitter
3794
3815
  // the per-store managers' emit hooks call). Needs the journal sink, the HLC clock,
3795
3816
  // the registry (store → kind), this machine's origin id, the resolved stateSync
@@ -15617,7 +15638,11 @@ export async function startServer(options) {
15617
15638
  if (hbApi) {
15618
15639
  for (const r of hbApi.listAll()) {
15619
15640
  if (r.machineId !== poolSelfId) {
15620
- machinePoolRegistry.recordHeartbeat({ machineId: r.machineId, selfReportedLastSeen: r.lastHeartbeatAt });
15641
+ // COARSE: the file-based MachineHeartbeat is git-synced + written every
15642
+ // ~30min, so its lastHeartbeatAt is NOT a live clock reading. Mark it coarse
15643
+ // so it refreshes liveness but never drives the 5-min clock-skew quarantine
15644
+ // FSM (the permanent false-positive Laptop↔Mini quarantine, 2026-06-30).
15645
+ machinePoolRegistry.recordHeartbeat({ machineId: r.machineId, selfReportedLastSeen: r.lastHeartbeatAt, coarseHeartbeat: true });
15621
15646
  }
15622
15647
  }
15623
15648
  }
@@ -15944,6 +15969,11 @@ export async function startServer(options) {
15944
15969
  if (_topicPinStore && _meshSelfId) {
15945
15970
  const ws13Cfg = () => (config.multiMachine?.seamlessness ?? {});
15946
15971
  const { OwnershipReconciler } = await import('../core/OwnershipReconciler.js');
15972
+ // Fix #2 advisory-pin read: the merged replicated `topic-pin-record` view (HLC-ordered)
15973
+ // the reconciler consults so the OWNING machine sees a pin set on another machine.
15974
+ const { mergeUnionToPins, compareHlc, TOPIC_PIN_RECORD_KIND } = await import('../core/TopicPinReplicatedStore.js');
15975
+ const { CoherenceJournalReader: PinAdvReader } = await import('../core/CoherenceJournalReader.js');
15976
+ const pinAdvisoryReader = new PinAdvReader({ stateDir: config.stateDir });
15947
15977
  const reconciler = new OwnershipReconciler({
15948
15978
  // DEV-AGENT DARK GATE (operator directive 2026-06-13, topic 13481):
15949
15979
  // read ws13Reconcile through resolveDevAgentGate so the reconcile loop
@@ -15956,6 +15986,24 @@ export async function startServer(options) {
15956
15986
  dryRun: () => ws13Cfg().ws13DryRun !== false,
15957
15987
  selfMachineId: _meshSelfId,
15958
15988
  pinStore: _topicPinStore,
15989
+ // Fix #2: the merged ADVISORY replicated pins (HLC-ordered). Gated by
15990
+ // ws13PinReplicate (resolves LIVE on a dev agent / DARK on the fleet) so a
15991
+ // dark/single-machine agent reads no advisory pins (today's behavior).
15992
+ advisoryPins: () => {
15993
+ try {
15994
+ if (!resolveDevAgentGate(ws13Cfg().ws13PinReplicate, config))
15995
+ return new Map();
15996
+ const res = pinAdvisoryReader.query({ kind: TOPIC_PIN_RECORD_KIND, limit: 2000 });
15997
+ const merged = mergeUnionToPins(res.entries.map((e) => ({ data: e.data, origin: typeof e.data.origin === 'string' ? e.data.origin : '' })), compareHlc);
15998
+ const out = new Map();
15999
+ for (const [topic, p] of merged)
16000
+ out.set(topic, { preferredMachine: p.preferredMachine, hlc: p.hlc });
16001
+ return out;
16002
+ }
16003
+ catch {
16004
+ return new Map(); /* @silent-fallback-ok — advisory read fault → no advisory pins this tick; the next tick retries, never blocks the reconciler */
16005
+ }
16006
+ },
15959
16007
  ownership: ownReg,
15960
16008
  machines: () => {
15961
16009
  try {
@@ -15984,10 +16032,21 @@ export async function startServer(options) {
15984
16032
  try {
15985
16033
  const topicNum = Number(sessionKey);
15986
16034
  if (Number.isFinite(topicNum)) {
16035
+ const rr = r.record;
15987
16036
  state.getCoherenceJournal()?.emitPlacement(topicNum, {
15988
- owner: r.record.ownerMachineId ?? '',
15989
- epoch: r.record.ownershipEpoch,
16037
+ owner: rr.ownerMachineId ?? '',
16038
+ epoch: rr.ownershipEpoch,
15990
16039
  reason: 'reconcile',
16040
+ // Fix #3 (Finding INT2): a reconciler cooperative transfer emits the
16041
+ // `transferring` intermediate so the target machine claims cross-machine.
16042
+ ...(rr.status === 'transferring'
16043
+ ? {
16044
+ status: 'transferring',
16045
+ ...(rr.transferTo ? { transferTo: rr.transferTo } : {}),
16046
+ ...(typeof rr.timestamp === 'number' ? { timestamp: rr.timestamp } : {}),
16047
+ ...(rr.drainInFlight ? { drainInFlight: true } : {}),
16048
+ }
16049
+ : {}),
15991
16050
  });
15992
16051
  }
15993
16052
  }
@@ -15995,6 +16054,7 @@ export async function startServer(options) {
15995
16054
  },
15996
16055
  logger: (m) => console.log(pc.dim(` ${m}`)),
15997
16056
  });
16057
+ _ownershipReconciler = reconciler; // hoist for the /pool/reconciler readout
15998
16058
  const tickMs = Math.max(5000, ws13Cfg().ws13TickMs ?? 30000);
15999
16059
  const ws13Timer = setInterval(() => {
16000
16060
  try {
@@ -16031,6 +16091,9 @@ export async function startServer(options) {
16031
16091
  durableOwnershipStore,
16032
16092
  reader: new CoherenceJournalReader({ stateDir: config.stateDir }),
16033
16093
  getSelfMachineId: () => _meshSelfId,
16094
+ // Fix #3: validate a replicated `transferring` entry's `transferTo` against the
16095
+ // live known-machine set before materializing (else downgrade to active(owner)).
16096
+ knownMachines: () => new Set((machinePoolRegistry?.getCapacities() ?? []).map((c) => c.machineId)),
16034
16097
  logger: (m) => console.log(pc.dim(` ${m}`)),
16035
16098
  });
16036
16099
  if (ownershipApplier) {
@@ -16078,6 +16141,17 @@ export async function startServer(options) {
16078
16141
  ...(prevOwner ? { prevOwner } : {}),
16079
16142
  epoch: rec.ownershipEpoch,
16080
16143
  reason,
16144
+ // Cross-machine convergence (Fix #3 / Finding INT2): carry the `transferring`
16145
+ // intermediate so the target's OwnershipApplier materializes it and the target's
16146
+ // reconciler claims (completing the handoff cross-machine). Absent for `active`.
16147
+ ...(rec.status === 'transferring'
16148
+ ? {
16149
+ status: 'transferring',
16150
+ ...(rec.transferTo ? { transferTo: rec.transferTo } : {}),
16151
+ ...(typeof rec.timestamp === 'number' ? { timestamp: rec.timestamp } : {}),
16152
+ ...(rec.drainInFlight ? { drainInFlight: true } : {}),
16153
+ }
16154
+ : {}),
16081
16155
  });
16082
16156
  }
16083
16157
  catch { /* observability never endangers the observed */ }
@@ -18497,7 +18571,7 @@ export async function startServer(options) {
18497
18571
  const server = new AgentServer({ config, sessionManager, state, scheduler, telegram, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, cartographer: cartographer ?? undefined, coherenceGate: scopeVerifier, contextHierarchy, canonicalState, operationGate, sentinel, adaptiveTrust, memoryMonitor, orphanReaper, coherenceMonitor, commitmentTracker, subscriptionPool, accountFollowMePeerViews: async () => { const nickById = new Map((_listPoolMachines?.() ?? []).map((m) => [m.machineId, m.nickname ?? m.machineId])); let peers = (_resolvePeerUrls?.() ?? []).map((p) => ({ machineId: p.machineId, nickname: nickById.get(p.machineId) ?? p.machineId, url: p.url })); if (peers.length === 0) {
18498
18572
  peers = (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== _meshSelfId && !!m.lastKnownUrl).map((m) => ({ machineId: m.machineId, nickname: m.nickname ?? m.machineId, url: m.lastKnownUrl }));
18499
18573
  } if (peers.length === 0)
18500
- return []; const { fetchPeerSubscriptionViews } = await import('../core/fetchPeerSubscriptionViews.js'); return fetchPeerSubscriptionViews({ peers: () => peers, fetchImpl: fetch, authToken: config.authToken ?? '' }); }, quotaPoller, quotaAwareScheduler: _quotaAwareScheduler ?? undefined, proactiveSwapMonitor: _proactiveSwapMonitor ?? undefined, inUseAccountResolver, enrollmentWizard, accountFollowMeRevocation, credentialRepointing, semanticMemory, activitySentinel, rateLimitSentinel, releaseReadinessSentinel: releaseReadinessSentinel ?? undefined, greenPrAutoMerger: greenPrAutoMerger ?? undefined, guardLatchStore: guardLatchStore ?? undefined, messageRouter, summarySentinel, spawnManager, systemReviewer, capabilityMapper, selfKnowledgeTree, coverageAuditor, topicResumeMap: _topicResumeMap ?? undefined, topicProfile: _topicProfileCtx ?? undefined, sessionRefresh: _sessionRefresh ?? undefined, autonomyManager, trustElevationTracker, autonomousEvolution, coordinator: coordinator.enabled ? coordinator : undefined, meshBindActive: coordinator.managers.identityManager.hasIdentity() && config.multiMachine?.meshTransport?.enabled !== false, localSigningKeyPem, leaseTransport, peerEndpointRecorder, getSelfMeshEndpoints, onLeasePullRequest: () => leaseCoordinatorRef?.currentLease() ?? null, liveTailReceiver, handoffWireTransport, onHandoffBegin, onHandoffInitiate: handoffInitiate, handoffInProgress: handoffSentinelInProgress, messageLedger, currentInboundByTopic, replyMarkerTransport, onReplyMarker: messageLedger ? (marker) => { const m = marker; messageLedger.applyRemoteReplyMarker(m.dedupeKey, { platform: m.platform, replyIdempotencyKey: m.replyIdempotencyKey, epoch: m.epoch, topic: m.topic ?? null }); } : undefined, whatsapp: whatsappAdapter, slack: slackAdapter, imessage: imessageAdapter, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, threadlineReplyWaiters, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, responseReviewGate, messagingToneGate, outboundDedupGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, completionEvaluator, unifiedTrust, liveConfig, sharedStateLedger, ledgerSessionRegistry, worktreeManager, oidcEnrolledRepos: parallelDevConfig?.oidcEnrolledRepos, initiativeTracker, projectRoundRunner, projectDriftChecker, machineHeartbeat, machinePoolRegistry, getInboundQueue: () => _inboundQueue, meshRpcDispatcher, workingSetPullCoordinator, commitmentReplicaStore, preferenceReplicaStore, replicatedRecordEmitter, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, forwardCommitmentMutate, sessionOwnershipRegistry, topicPinStore: _topicPinStore ?? undefined, streamTicketStore: _streamTicketStore ?? undefined, poolStreamAllowRemoteInput: config.dashboard?.poolStream?.allowRemoteInput ?? false, poolStreamConnector: _poolStreamConnector ?? undefined, secretSync: _secretSyncHandle ?? undefined, meshSelfId: _meshSelfId ?? undefined, resolveRouterUrl: _resolveRouterUrl ?? undefined, resolvePeerUrls: _resolvePeerUrls ?? undefined, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, deliverMandateToMachine: _deliverMandateToMachine ?? undefined, poolLink: _poolLink ?? undefined, poolPollCache: _poolPollCache ?? undefined, sessionPoolE2EResultStore, proxyCoordinator, topicIntentStore, topicIntentArcCheck, usherSignalStore, intelligence: sharedIntelligence ?? undefined, telegramBridgeConfig, telegramBridge: telegramBridge ?? undefined, threadlineObservability, briefDeps, workingMemory, taskFlowRegistry, threadlineFlowBridge, sessionReaper, agentWorktreeReaper, orphanedWorkSentinel, mcpProcessReaper, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, autonomousLivenessReconciler, enforcedTerminationStatus: () => enforcedTerminationWatchdog?.guardStatus() ?? null, prHandLease: prHandLease ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
18574
+ return []; const { fetchPeerSubscriptionViews } = await import('../core/fetchPeerSubscriptionViews.js'); return fetchPeerSubscriptionViews({ peers: () => peers, fetchImpl: fetch, authToken: config.authToken ?? '' }); }, quotaPoller, quotaAwareScheduler: _quotaAwareScheduler ?? undefined, proactiveSwapMonitor: _proactiveSwapMonitor ?? undefined, inUseAccountResolver, enrollmentWizard, accountFollowMeRevocation, credentialRepointing, semanticMemory, activitySentinel, rateLimitSentinel, releaseReadinessSentinel: releaseReadinessSentinel ?? undefined, greenPrAutoMerger: greenPrAutoMerger ?? undefined, guardLatchStore: guardLatchStore ?? undefined, messageRouter, summarySentinel, spawnManager, systemReviewer, capabilityMapper, selfKnowledgeTree, coverageAuditor, topicResumeMap: _topicResumeMap ?? undefined, topicProfile: _topicProfileCtx ?? undefined, sessionRefresh: _sessionRefresh ?? undefined, autonomyManager, trustElevationTracker, autonomousEvolution, coordinator: coordinator.enabled ? coordinator : undefined, meshBindActive: coordinator.managers.identityManager.hasIdentity() && config.multiMachine?.meshTransport?.enabled !== false, localSigningKeyPem, leaseTransport, peerEndpointRecorder, getSelfMeshEndpoints, onLeasePullRequest: () => leaseCoordinatorRef?.currentLease() ?? null, liveTailReceiver, handoffWireTransport, onHandoffBegin, onHandoffInitiate: handoffInitiate, handoffInProgress: handoffSentinelInProgress, messageLedger, currentInboundByTopic, replyMarkerTransport, onReplyMarker: messageLedger ? (marker) => { const m = marker; messageLedger.applyRemoteReplyMarker(m.dedupeKey, { platform: m.platform, replyIdempotencyKey: m.replyIdempotencyKey, epoch: m.epoch, topic: m.topic ?? null }); } : undefined, whatsapp: whatsappAdapter, slack: slackAdapter, imessage: imessageAdapter, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, threadlineReplyWaiters, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, responseReviewGate, messagingToneGate, outboundDedupGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, completionEvaluator, unifiedTrust, liveConfig, sharedStateLedger, ledgerSessionRegistry, worktreeManager, oidcEnrolledRepos: parallelDevConfig?.oidcEnrolledRepos, initiativeTracker, projectRoundRunner, projectDriftChecker, machineHeartbeat, machinePoolRegistry, getInboundQueue: () => _inboundQueue, meshRpcDispatcher, workingSetPullCoordinator, commitmentReplicaStore, preferenceReplicaStore, replicatedRecordEmitter, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, forwardCommitmentMutate, sessionOwnershipRegistry, topicPinStore: _topicPinStore ?? undefined, ownershipReconciler: _ownershipReconciler ?? undefined, streamTicketStore: _streamTicketStore ?? undefined, poolStreamAllowRemoteInput: config.dashboard?.poolStream?.allowRemoteInput ?? false, poolStreamConnector: _poolStreamConnector ?? undefined, secretSync: _secretSyncHandle ?? undefined, meshSelfId: _meshSelfId ?? undefined, resolveRouterUrl: _resolveRouterUrl ?? undefined, resolvePeerUrls: _resolvePeerUrls ?? undefined, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, deliverMandateToMachine: _deliverMandateToMachine ?? undefined, poolLink: _poolLink ?? undefined, poolPollCache: _poolPollCache ?? undefined, sessionPoolE2EResultStore, proxyCoordinator, topicIntentStore, topicIntentArcCheck, usherSignalStore, intelligence: sharedIntelligence ?? undefined, telegramBridgeConfig, telegramBridge: telegramBridge ?? undefined, threadlineObservability, briefDeps, workingMemory, taskFlowRegistry, threadlineFlowBridge, sessionReaper, agentWorktreeReaper, orphanedWorkSentinel, mcpProcessReaper, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, autonomousLivenessReconciler, enforcedTerminationStatus: () => enforcedTerminationWatchdog?.guardStatus() ?? null, prHandLease: prHandLease ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
18501
18575
  // wired before the server existed; from here on inbound binds use the
18502
18576
  // server's own store instance.
18503
18577
  _agentServerRef = server;