instar 1.3.672 → 1.3.674

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 (36) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +113 -11
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/core/inboundLossRouting.d.ts +30 -0
  5. package/dist/core/inboundLossRouting.d.ts.map +1 -0
  6. package/dist/core/inboundLossRouting.js +35 -0
  7. package/dist/core/inboundLossRouting.js.map +1 -0
  8. package/dist/monitoring/EnforcedTerminationWatchdog.d.ts +91 -0
  9. package/dist/monitoring/EnforcedTerminationWatchdog.d.ts.map +1 -0
  10. package/dist/monitoring/EnforcedTerminationWatchdog.js +172 -0
  11. package/dist/monitoring/EnforcedTerminationWatchdog.js.map +1 -0
  12. package/dist/monitoring/enforcedTermination.d.ts +105 -0
  13. package/dist/monitoring/enforcedTermination.d.ts.map +1 -0
  14. package/dist/monitoring/enforcedTermination.js +105 -0
  15. package/dist/monitoring/enforcedTermination.js.map +1 -0
  16. package/dist/monitoring/enforcedTerminationWiring.d.ts +18 -0
  17. package/dist/monitoring/enforcedTerminationWiring.d.ts.map +1 -0
  18. package/dist/monitoring/enforcedTerminationWiring.js +80 -0
  19. package/dist/monitoring/enforcedTerminationWiring.js.map +1 -0
  20. package/dist/monitoring/guardManifest.d.ts.map +1 -1
  21. package/dist/monitoring/guardManifest.js +10 -0
  22. package/dist/monitoring/guardManifest.js.map +1 -1
  23. package/dist/server/AgentServer.d.ts +3 -0
  24. package/dist/server/AgentServer.d.ts.map +1 -1
  25. package/dist/server/AgentServer.js +1 -0
  26. package/dist/server/AgentServer.js.map +1 -1
  27. package/dist/server/routes.d.ts +3 -0
  28. package/dist/server/routes.d.ts.map +1 -1
  29. package/dist/server/routes.js +8 -0
  30. package/dist/server/routes.js.map +1 -1
  31. package/package.json +1 -1
  32. package/src/data/builtin-manifest.json +47 -47
  33. package/upgrades/1.3.673.md +50 -0
  34. package/upgrades/1.3.674.md +43 -0
  35. package/upgrades/side-effects/enforced-termination-watchdog.md +95 -0
  36. package/upgrades/side-effects/inbound-delivery-sacred.md +62 -0
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2CH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAwBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAwH7D,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;AAy4CD,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,CA8eN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAkghBtE;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;AA4CH,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAU3D,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AAwBjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAwH7D,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;AAy4CD,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,CA8eN;AA2lBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAsmhBtE;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"}
@@ -20,6 +20,7 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
20
20
  const execFileAsync = promisify(execFile);
21
21
  import { loadConfig, ensureStateDir, detectTmuxPath, detectGeminiPath } from '../core/Config.js';
22
22
  import { handleProcessLevelError } from '../core/uncaughtExceptionPolicy.js';
23
+ import { planInboundLossNotices } from '../core/inboundLossRouting.js';
23
24
  import { configureHostSpawnSemaphore } from '../core/hostSpawnSemaphore.js';
24
25
  import { SingleInstanceLock, installReleaseHandlers } from '../core/SingleInstanceLock.js';
25
26
  import { resolveDevAgentGate, resolveStateSyncStores } from '../core/devAgentGate.js';
@@ -31,7 +32,7 @@ import { TopicProfileOrchestrator, resolvedToApplied, } from '../core/TopicProfi
31
32
  import { CodexResumeMap } from '../core/CodexResumeMap.js';
32
33
  import { paneIdleWithEmptyInput } from '../core/ModelSwapService.js';
33
34
  import { escalatedModelIds, normalizeTierEscalationConfig } from '../core/ModelTierEscalation.js';
34
- import { activeAutonomousJobs, autonomousRunRemainingForTopic, listAutonomousJobs } from '../core/AutonomousSessions.js';
35
+ import { activeAutonomousJobs, autonomousRunRemainingForTopic, listAutonomousJobs, stopAutonomousTopic } from '../core/AutonomousSessions.js';
35
36
  import { AGE_LIMIT_ACTIVE_RUN_REASON, COMMITMENT_ACTIVE_RUN_REASON } from '../core/WorkEvidence.js';
36
37
  import { gapBEligibleForTopic, recentUserMessageFromHistory, recentUserMessageAtFromHistory, resolveGapBInjectionGate, decideGapBInjection } from '../core/gapBCommitmentEvidence.js';
37
38
  import { TopicProfileTransferCarrier, createTopicProfilePullHandler } from '../core/TopicProfileTransferCarrier.js';
@@ -2815,6 +2816,37 @@ export async function startServer(options) {
2815
2816
  }
2816
2817
  }
2817
2818
  }
2819
+ /**
2820
+ * F3 (Inbound Delivery Is Sacred): route an inbound-queue loss notice to each
2821
+ * ORIGINATING topic on the proven Telegram path (each loss item's sessionKey
2822
+ * IS the topic id the user messaged from), instead of the single attention
2823
+ * topic that `notify()` SILENTLY DROPS when unset. Items with no resolvable
2824
+ * numeric topic fall back to the attention topic; if THAT is also unset, the
2825
+ * loss is surfaced LOUDLY (console.error) — a lost inbound user message is
2826
+ * NEVER silently expired (the Inbound-Delivery-Is-Sacred corollary). Spec:
2827
+ * docs/specs/inbound-delivery-sacred.md.
2828
+ */
2829
+ function notifyInboundLoss(items, tier, buildMessage) {
2830
+ if (items.length === 0)
2831
+ return;
2832
+ const plan = planInboundLossNotices(items);
2833
+ // Each affected topic gets its OWN notice, in that topic (proven path).
2834
+ for (const { topicId, count } of plan.perTopic) {
2835
+ notify(tier, 'inbound-loss', buildMessage(count), topicId);
2836
+ }
2837
+ if (plan.unresolved > 0) {
2838
+ const attn = _notifyState?.get('agent-attention-topic') ?? 0;
2839
+ if (attn) {
2840
+ notify(tier, 'inbound-loss', buildMessage(plan.unresolved), attn);
2841
+ }
2842
+ else {
2843
+ // No resolvable topic AND no attention topic configured → the one place a
2844
+ // loss could go silent. Surface it LOUDLY instead (never a silent expiry).
2845
+ console.error(`[inbound-loss] ${plan.unresolved} lost inbound message(s) had no resolvable topic and no attention topic is ` +
2846
+ `configured — surfaced loudly per Inbound-Delivery-Is-Sacred (configure an attention topic so these reach you).`);
2847
+ }
2848
+ }
2849
+ }
2818
2850
  /**
2819
2851
  * Translate coherence check failures into human-readable, actionable messages.
2820
2852
  */
@@ -6853,6 +6885,7 @@ export async function startServer(options) {
6853
6885
  let resumeQueue = null;
6854
6886
  let resumeDrainer = null;
6855
6887
  let autonomousLivenessReconciler = null;
6888
+ let enforcedTerminationWatchdog = null;
6856
6889
  let prHandLease = null;
6857
6890
  // GAP-B Part A surface (spec: autonomous-registration-guarantee.md) — the
6858
6891
  // aggregated-attention chokepoint reference, hoisted to the handler's scope.
@@ -7517,6 +7550,79 @@ export async function startServer(options) {
7517
7550
  guardRegistry.register('monitoring.autonomousLivenessReconciler.enabled', () => reconciler.guardStatus());
7518
7551
  console.log(pc.green(` AutonomousLivenessReconciler started (${(livenessCfgRaw.dryRun ?? true) ? 'dry-run observe-only' : 'LIVE'})`));
7519
7552
  }
7553
+ // ── EnforcedTerminationWatchdog (spec: enforced-termination-watchdog.md) ──
7554
+ // The counterweight to the reconciler: it keeps a run from outliving its
7555
+ // BUDGET (the 46h-on-24h-runaway class). Constructed in the SAME queue-
7556
+ // started scope so the durable-kill reuses the proven primitives the
7557
+ // reconciler's settleKill uses (clear endedMidWork → killSession), plus the
7558
+ // operator-stop record + resume-queue cancel so a terminated run is not
7559
+ // revived. Dev-gated (enabled OMITTED in ConfigDefaults), dryRun-first.
7560
+ const etCfgRaw = config.monitoring?.enforcedTermination ?? {};
7561
+ if (resolveDevAgentGate(etCfgRaw.enabled, config)) {
7562
+ const { EnforcedTerminationWatchdog } = await import('../monitoring/EnforcedTerminationWatchdog.js');
7563
+ const { buildEnforcedTerminationListRuns, buildEnforcedTerminationAudit } = await import('../monitoring/enforcedTerminationWiring.js');
7564
+ const etTerminate = async (topicId) => {
7565
+ const tnum = Number(topicId);
7566
+ let fileDeleted = false;
7567
+ let sessionKilled = false;
7568
+ try {
7569
+ fileDeleted = stopAutonomousTopic(config.stateDir, String(topicId));
7570
+ }
7571
+ catch { /* state-file delete best-effort */ }
7572
+ try {
7573
+ recordOperatorStop(tnum);
7574
+ }
7575
+ catch { /* operator-stop record best-effort */ }
7576
+ try {
7577
+ rq.cancelByTopic(tnum);
7578
+ }
7579
+ catch { /* resume-cancel best-effort */ }
7580
+ // Settle-kill: clear midWork FIRST (so the ResumeQueue does not revive an
7581
+ // operator-stopped topic), then kill — mirrors the reconciler's settleKill.
7582
+ try {
7583
+ const sess = sessionManager.listRunningSessions().find((s) => resolveTopicForTmux(s.tmuxSession) === tnum);
7584
+ if (sess) {
7585
+ sess.endedMidWork = false;
7586
+ state.saveSession(sess);
7587
+ sessionManager.killSession(sess.id);
7588
+ sessionKilled = true;
7589
+ }
7590
+ }
7591
+ catch { /* settle-kill best-effort; the operator-stop record prevents future revival */ }
7592
+ // spec §3: a termination is never silent to the user. Post one plain-English
7593
+ // notice to the run's topic (etTerminate is only ever called outside dryRun, so
7594
+ // this fires only on a REAL stop — "Degradation Is an Event").
7595
+ if (fileDeleted || sessionKilled) {
7596
+ try {
7597
+ notify('SUMMARY', 'enforced-termination', 'I stopped the autonomous run on this topic — it ran past the time budget it was given. ' +
7598
+ 'Anything unfinished is in its notes; tell me to relaunch if you want me to continue.', tnum);
7599
+ }
7600
+ catch { /* notice best-effort; the stop already happened */ }
7601
+ }
7602
+ return fileDeleted || sessionKilled;
7603
+ };
7604
+ const etWatchdog = new EnforcedTerminationWatchdog({
7605
+ listRuns: buildEnforcedTerminationListRuns(config.stateDir),
7606
+ terminate: etTerminate,
7607
+ audit: buildEnforcedTerminationAudit(path.join(_projectDir, 'logs')),
7608
+ }, {
7609
+ enabled: true, // constructed only when the dev-gate passed
7610
+ dryRun: etCfgRaw.dryRun ?? true,
7611
+ graceSeconds: etCfgRaw.graceSeconds,
7612
+ absoluteCeilingSeconds: etCfgRaw.absoluteCeilingSeconds,
7613
+ maxIterations: etCfgRaw.maxIterations,
7614
+ tickIntervalSec: etCfgRaw.tickIntervalSec ?? 120,
7615
+ maxTerminationsPerWindow: etCfgRaw.maxTerminationsPerWindow,
7616
+ confirmThreshold: etCfgRaw.confirmThreshold,
7617
+ });
7618
+ etWatchdog.start();
7619
+ enforcedTerminationWatchdog = etWatchdog;
7620
+ guardRegistry.register('monitoring.enforcedTermination.enabled', () => {
7621
+ const s = etWatchdog.guardStatus();
7622
+ return { enabled: s.enabled, dryRun: s.dryRun, lastTickAt: s.lastTickAt ?? undefined };
7623
+ });
7624
+ console.log(pc.green(` EnforcedTerminationWatchdog started (${(etCfgRaw.dryRun ?? true) ? 'dry-run observe-only' : 'LIVE'})`));
7625
+ }
7520
7626
  }
7521
7627
  }
7522
7628
  sessionManager.on('sessionReaped', (e) => {
@@ -7736,12 +7842,10 @@ export async function startServer(options) {
7736
7842
  clearPisRecord: (sk) => { for (const r of pisRecordsForTopic(sk))
7737
7843
  sweepPis.clear(r.tmuxSession); },
7738
7844
  reportLoss: (items, reason) => {
7739
- const topics = [...new Set(items.map((i) => i.sessionKey))].join(', ');
7740
- notify('SUMMARY', 'inbound-queue', `I didn't get to ${items.length} queued message(s) (${reason}; topics: ${topics}) — resend anything still needed.`);
7845
+ notifyInboundLoss(items, 'SUMMARY', (count) => `I didn't get to ${count} of your message(s) (${reason}) — resend anything still needed.`);
7741
7846
  },
7742
7847
  reportPossiblyNotInjected: (items) => {
7743
- const topics = [...new Set(items.map((i) => i.sessionKey))].join(', ');
7744
- notify('SUMMARY', 'inbound-queue', `${items.length} message(s) may not have been injected before a crash (topics: ${topics}) — if a message went unanswered, resend it.`);
7848
+ notifyInboundLoss(items, 'SUMMARY', (count) => `${count} of your message(s) may not have been injected before a crash — if a message went unanswered, resend it.`);
7745
7849
  },
7746
7850
  raiseAttention: (title, body) => notify('IMMEDIATE', 'inbound-queue', `${title}: ${body}`),
7747
7851
  log: (line) => console.log(pc.dim(` ${line}`)),
@@ -7774,7 +7878,7 @@ export async function startServer(options) {
7774
7878
  }
7775
7879
  }
7776
7880
  if (dropped.length > 0) {
7777
- notify('SUMMARY', 'inbound-queue', `I didn't get to ${dropped.length} queued message(s) (the queue is enabled but this machine has no mesh identity, so the drain never started; topics: ${[...new Set(dropped)].join(', ')}) — resend anything still needed.`);
7881
+ notifyInboundLoss(dropped.map((sk) => ({ sessionKey: sk })), 'SUMMARY', (count) => `I didn't get to ${count} of your message(s) (the queue is enabled but this machine has no mesh identity, so the drain never started) — resend anything still needed.`);
7778
7882
  }
7779
7883
  store.close();
7780
7884
  _sweptInboundStore = null;
@@ -17519,12 +17623,10 @@ export async function startServer(options) {
17519
17623
  }
17520
17624
  },
17521
17625
  reportLoss: (items, reason) => {
17522
- const topics = [...new Set(items.map((i) => i.sessionKey))].join(', ');
17523
- notify('SUMMARY', 'inbound-queue', `I didn't get to ${items.length} queued message(s) (${reason}; topics: ${topics}) — resend anything still needed.`);
17626
+ notifyInboundLoss(items, 'SUMMARY', (count) => `I didn't get to ${count} of your message(s) (${reason}) — resend anything still needed.`);
17524
17627
  },
17525
17628
  reportPossiblyNotInjected: (items) => {
17526
- const topics = [...new Set(items.map((i) => i.sessionKey))].join(', ');
17527
- notify('SUMMARY', 'inbound-queue', `${items.length} message(s) may not have been injected (topics: ${topics}) — if a message went unanswered, resend it.`);
17629
+ notifyInboundLoss(items, 'SUMMARY', (count) => `${count} of your message(s) may not have been injected — if a message went unanswered, resend it.`);
17528
17630
  },
17529
17631
  log: (line) => console.log(pc.dim(` ${line}`)),
17530
17632
  reportDegradation: (reason) => {
@@ -18155,7 +18257,7 @@ export async function startServer(options) {
18155
18257
  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) {
18156
18258
  peers = (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== _meshSelfId && !!m.lastKnownUrl).map((m) => ({ machineId: m.machineId, nickname: m.nickname ?? m.machineId, url: m.lastKnownUrl }));
18157
18259
  } if (peers.length === 0)
18158
- 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, prHandLease: prHandLease ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
18260
+ 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
18159
18261
  // wired before the server existed; from here on inbound binds use the
18160
18262
  // server's own store instance.
18161
18263
  _agentServerRef = server;