instar 1.3.1260 → 1.3.1262
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 +128 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PasskeyCellActions.d.ts +20 -3
- package/dist/core/PasskeyCellActions.d.ts.map +1 -1
- package/dist/core/PasskeyCellActions.js +56 -0
- package/dist/core/PasskeyCellActions.js.map +1 -1
- package/dist/core/PasskeyCellHealth.d.ts +205 -0
- package/dist/core/PasskeyCellHealth.d.ts.map +1 -0
- package/dist/core/PasskeyCellHealth.js +415 -0
- package/dist/core/PasskeyCellHealth.js.map +1 -0
- package/dist/core/PasskeyPoolState.d.ts +347 -0
- package/dist/core/PasskeyPoolState.d.ts.map +1 -0
- package/dist/core/PasskeyPoolState.js +514 -0
- package/dist/core/PasskeyPoolState.js.map +1 -0
- package/dist/core/WriteDomainRegistry.d.ts.map +1 -1
- package/dist/core/WriteDomainRegistry.js +72 -0
- package/dist/core/WriteDomainRegistry.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/server/AgentServer.d.ts +7 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +12 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.js +1 -1
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/routes.d.ts +6 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +455 -0
- package/dist/server/routes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +47 -47
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/upgrades/1.3.1261.md +43 -0
- package/upgrades/1.3.1262.md +43 -0
- package/upgrades/side-effects/passkey-inc8-pool-read-path.md +258 -0
- package/upgrades/side-effects/passkey-inc9-cell-health.md +254 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAsGA,OAAO,EAAE,cAAc,EAAwD,MAAM,2BAA2B,CAAC;AAUjH,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AA4BjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAmI7D,OAAO,KAAK,EAAW,oBAAoB,EAAe,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACjG,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAkFtD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,yBAAyB,CACvC,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC1C,OAAO,CAUT;AA0ID,UAAU,YAAY;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;2DACuD;IACvD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAoDD,+EAA+E;AAC/E,wBAAgB,qCAAqC,CACnD,SAAS,EAAE,IAAI,CAAC,OAAO,2BAA2B,EAAE,cAAc,EAAE,QAAQ,CAAC,GAAG,IAAI,EACpF,OAAO,EAAE,MAAM,GACd,IAAI,CAEN;AAsrDD;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,YAAY,EACpB,YAAY,EAAE,oBAAoB,GAAG,IAAI,GACxC;IACD,YAAY,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,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AE,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,EAQrD,oBAAoB,CAAC,EAAE,MAAM;IAC3B,YAAY,EAAE,OAAO,kBAAkB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAC3C,QAAQ,EAAE,MAAM,CAAC;CAClB,GAAG,IAAI,GACP,IAAI,CA8yBN;AAgmBD,wBAAsB,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAo7vBtE;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
|
@@ -25842,10 +25842,131 @@ export async function startServer(options) {
|
|
|
25842
25842
|
// file-backed outbox (no timer), and the failure is logged here; boot is never blocked.
|
|
25843
25843
|
console.warn(`[passkeys] revoke outbox not started: ${err instanceof Error ? err.message : String(err)}`);
|
|
25844
25844
|
}
|
|
25845
|
+
// ── Agent-held Google passkeys: the pool read path (spec §5.1) ───────────────────────────
|
|
25846
|
+
// Same dev gate. One reader per server: every 5 minutes it queries each peer's
|
|
25847
|
+
// GET /passkeys/pool-state once (5 s per peer, 5 s overall), classifies peers with rope health,
|
|
25848
|
+
// keeps last-known rows durably, and serves ONE memo to every pool-wide check and to
|
|
25849
|
+
// GET /passkeys?scope=pool. Read-only observation; it restricts, never grants.
|
|
25850
|
+
let _passkeyPoolReader = null;
|
|
25851
|
+
let _passkeyPoolTimer = null;
|
|
25852
|
+
try {
|
|
25853
|
+
const pkCfg = config.passkeys;
|
|
25854
|
+
if (resolveDevAgentGate(pkCfg?.enabled, config)) {
|
|
25855
|
+
const { PasskeyPoolReader, PasskeyPeerExclusions, PasskeyAttemptLedger, buildLocalPasskeyMachineState, PASSKEY_POOL_STATE_MAX_BYTES } = await import('../core/PasskeyPoolState.js');
|
|
25856
|
+
const { PasskeyGrantStore } = await import('../core/PasskeyGrantStore.js');
|
|
25857
|
+
const { PasskeyCredentialStore, PASSKEY_DIR } = await import('../core/PasskeyCredentialStore.js');
|
|
25858
|
+
const { isPeerUrlAllowedForCredentials } = await import('../server/peerUrlGuard.js');
|
|
25859
|
+
const pkSelfId = _meshSelfId ?? coordinator?.identity?.machineId ?? machineHeartbeat.config.machineId;
|
|
25860
|
+
const outboxRef = _passkeyRevokeOutbox;
|
|
25861
|
+
_passkeyPoolReader = new PasskeyPoolReader({
|
|
25862
|
+
stateDir: config.stateDir, selfMachineId: pkSelfId,
|
|
25863
|
+
localState: () => {
|
|
25864
|
+
const grants = new PasskeyGrantStore({ stateDir: config.stateDir, machineId: pkSelfId });
|
|
25865
|
+
const list = grants.list();
|
|
25866
|
+
let custody = null;
|
|
25867
|
+
const pendingEmails = [];
|
|
25868
|
+
if (fs.existsSync(path.join(config.stateDir, PASSKEY_DIR, 'store.enc'))) {
|
|
25869
|
+
try {
|
|
25870
|
+
const store = new PasskeyCredentialStore({ stateDir: config.stateDir, machineId: pkSelfId, forceFileKey: config.secrets?.forceFileKey });
|
|
25871
|
+
const index = store.listIndex();
|
|
25872
|
+
custody = [];
|
|
25873
|
+
for (const email of new Set(list.map((g) => g.canonicalEmail))) {
|
|
25874
|
+
const entry = index.find((e) => e.emailKey === store.emailKey(email));
|
|
25875
|
+
if (entry)
|
|
25876
|
+
custody.push({ canonicalEmail: email, state: entry.custodyState });
|
|
25877
|
+
if (store.readPending(email))
|
|
25878
|
+
pendingEmails.push(email);
|
|
25879
|
+
}
|
|
25880
|
+
}
|
|
25881
|
+
catch (err) {
|
|
25882
|
+
// @silent-fallback-ok — NOT swallowed: custody reads `absent` (the restrictive direction) and the failure is logged.
|
|
25883
|
+
console.warn(`[passkeys] custody read failed while publishing pool state: ${err instanceof Error ? err.message : String(err)}`);
|
|
25884
|
+
custody = null;
|
|
25885
|
+
}
|
|
25886
|
+
}
|
|
25887
|
+
return buildLocalPasskeyMachineState({
|
|
25888
|
+
machineId: pkSelfId, grants: list, issuedPeerGrants: grants.listIssuedPeerGrants(), revokeHighWater: grants.revokeHighWater(),
|
|
25889
|
+
custody, pendingEmails, outbox: outboxRef?.list() ?? [], ledger: new PasskeyAttemptLedger({ stateDir: config.stateDir, machineId: pkSelfId }),
|
|
25890
|
+
pushEnabled: config.multiMachine?.secretSync?.pushEnabled === true,
|
|
25891
|
+
});
|
|
25892
|
+
},
|
|
25893
|
+
listPeers: () => (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== pkSelfId).map((m) => ({
|
|
25894
|
+
machineId: m.machineId, nickname: m.nickname ?? null, url: m.lastKnownUrl ?? null,
|
|
25895
|
+
online: machinePoolRegistry?.getCapacity(m.machineId)?.online ?? null,
|
|
25896
|
+
})),
|
|
25897
|
+
fetchPeerState: async (peer, timeoutMs) => {
|
|
25898
|
+
if (!peer.url)
|
|
25899
|
+
return { ok: false, reason: 'no-known-url' };
|
|
25900
|
+
if (!isPeerUrlAllowedForCredentials(peer.url, config.multiMachine?.peerUrlAllowlist).ok)
|
|
25901
|
+
return { ok: false, reason: 'url-rejected' };
|
|
25902
|
+
try {
|
|
25903
|
+
const r = await fetch(`${peer.url.replace(/\/$/, '')}/passkeys/pool-state`, {
|
|
25904
|
+
headers: { Authorization: `Bearer ${config.authToken ?? ''}`, 'X-Instar-Machine-Id': pkSelfId }, signal: AbortSignal.timeout(timeoutMs),
|
|
25905
|
+
});
|
|
25906
|
+
if (r.status === 404 || r.status === 503)
|
|
25907
|
+
return { ok: false, reason: 'route-missing' };
|
|
25908
|
+
if (r.status === 401 || r.status === 403)
|
|
25909
|
+
return { ok: false, reason: 'unauthorized' };
|
|
25910
|
+
if (!r.ok)
|
|
25911
|
+
return { ok: false, reason: r.status >= 500 ? 'error' : 'refused' };
|
|
25912
|
+
// Bound the body BEFORE parsing — this fetch runs unattended every 5 minutes.
|
|
25913
|
+
const text = await r.text();
|
|
25914
|
+
if (text.length > PASSKEY_POOL_STATE_MAX_BYTES)
|
|
25915
|
+
return { ok: false, reason: 'malformed' };
|
|
25916
|
+
return { ok: true, body: JSON.parse(text) };
|
|
25917
|
+
}
|
|
25918
|
+
catch (err) {
|
|
25919
|
+
// @silent-fallback-ok — NOT swallowed: classified into the peer's pool row (timeout / malformed /
|
|
25920
|
+
// unreachable ⇒ partitioned, the restrictive direction) and surfaced in `degradedReasons`.
|
|
25921
|
+
const name = err instanceof Error ? err.name : '';
|
|
25922
|
+
return { ok: false, reason: name === 'TimeoutError' || name === 'AbortError' ? 'timeout' : name === 'SyntaxError' ? 'malformed' : 'unreachable' };
|
|
25923
|
+
}
|
|
25924
|
+
},
|
|
25925
|
+
ropeCondition: (id) => ropeHealthMonitor?.status().peers.find((p) => p.machineId === id)?.condition ?? null,
|
|
25926
|
+
ropeAvailable: () => !!ropeHealthMonitor,
|
|
25927
|
+
exclusions: new PasskeyPeerExclusions({ stateDir: config.stateDir }),
|
|
25928
|
+
// `?scope=pool` and every check are served from the memo for a whole tick interval (§5.1
|
|
25929
|
+
// "always served from the tick memo"): a dashboard polling every few seconds never re-fans.
|
|
25930
|
+
memoTtlMs: 5 * 60_000,
|
|
25931
|
+
log: (line) => console.log(pc.dim(` ${line}`)),
|
|
25932
|
+
});
|
|
25933
|
+
const reader = _passkeyPoolReader;
|
|
25934
|
+
_passkeyPoolTimer = setInterval(() => {
|
|
25935
|
+
void reader.tick().catch((err) => console.warn(`[passkeys] pool read tick failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
25936
|
+
}, 5 * 60_000);
|
|
25937
|
+
_passkeyPoolTimer.unref?.();
|
|
25938
|
+
}
|
|
25939
|
+
}
|
|
25940
|
+
catch (err) {
|
|
25941
|
+
// @silent-fallback-ok — a reader init failure leaves it null: the routes fall back to a per-request
|
|
25942
|
+
// reader (no timer; last-known rows still on disk), and the failure is logged; boot is never blocked.
|
|
25943
|
+
console.warn(`[passkeys] pool reader not started: ${err instanceof Error ? err.message : String(err)}`);
|
|
25944
|
+
}
|
|
25945
|
+
// ── Agent-held Google passkeys: the health digest tick (spec §4 / §5.2 / §13) ───────────
|
|
25946
|
+
// Same dev gate. Every 5 minutes: advance the per-cell clocks (paused while the pool read path is
|
|
25947
|
+
// degraded) and upsert the ONE digest key (`passkey-health:digest`) when its ledger says so —
|
|
25948
|
+
// buzz at most once per 24h, security/suspension once per tick, peer-list changes silently. The
|
|
25949
|
+
// pass itself is late-bound by createRoutes (`ctx.passkeyHealthDigestTick`); the timer only calls it.
|
|
25950
|
+
let _passkeyHealthTimer = null;
|
|
25951
|
+
try {
|
|
25952
|
+
const pkCfg = config.passkeys;
|
|
25953
|
+
if (resolveDevAgentGate(pkCfg?.enabled, config)) {
|
|
25954
|
+
_passkeyHealthTimer = setInterval(() => {
|
|
25955
|
+
// @silent-fallback-ok — a failed pass is LOGGED and the next tick retries; the on-demand route
|
|
25956
|
+
// (`POST /passkeys/health/digest/refresh`) surfaces the same error as a 500 to the operator.
|
|
25957
|
+
void server.runPasskeyHealthDigestTick().catch((err) => console.warn(`[passkeys] health digest tick failed: ${err instanceof Error ? err.message : String(err)}`));
|
|
25958
|
+
}, 5 * 60_000);
|
|
25959
|
+
_passkeyHealthTimer.unref?.();
|
|
25960
|
+
}
|
|
25961
|
+
}
|
|
25962
|
+
catch (err) {
|
|
25963
|
+
// @silent-fallback-ok — a timer setup failure leaves the digest to the on-demand route; logged, never boot-blocking.
|
|
25964
|
+
console.warn(`[passkeys] health digest timer not started: ${err instanceof Error ? err.message : String(err)}`);
|
|
25965
|
+
}
|
|
25845
25966
|
const server = new AgentServer({ config, singleInstanceLock, terminateSessionAuthority: terminateWithAuthority, subscriptionEmailBinding: credentialLocationLedger, subscriptionEmailBarrier, subscriptionIdentityOracle, sessionManager, llmQueue: sharedLlmQueue, state, scheduler, telegram, telegramOrigin: telegramOriginBoot?.runtime, relationships, feedback, feedbackAnomalyDetector, dispatches, updateChecker, autoUpdater, autoDispatcher, quotaTracker, quotaManager, publisher, viewer, tunnel, evolution, watchdog, topicMemory, triageNurse, projectMapper, cartographerRoots: cartographerRoots ?? 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) {
|
|
25846
25967
|
peers = (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== _meshSelfId && !!m.lastKnownUrl).map((m) => ({ machineId: m.machineId, nickname: m.nickname ?? m.machineId, url: m.lastKnownUrl }));
|
|
25847
25968
|
} if (peers.length === 0)
|
|
25848
|
-
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, conversationRegistry, conversationBindAuth, conversationFollowThrough, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, getLastRelayEvent: threadlineGetLastRelayEvent, threadlineReplyWaiters, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, responseReviewGate, reviewCanaryBattery, messagingToneGate, outboundDedupGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, completionEvaluator, unifiedTrust, liveConfig, sharedStateLedger, ledgerSessionRegistry, worktreeManager, oidcEnrolledRepos: parallelDevConfig?.oidcEnrolledRepos, initiativeTracker, projectRoundRunner, projectDriftChecker, machineHeartbeat, machinePoolRegistry, ropeHealthMonitor, writeAdmission: writeAdmission ?? undefined, getInboundQueue: () => _inboundQueue, getMachineCoherence: () => _machineCoherenceSentinel, getSingleMachineFailoverGap: () => _singleMachineFailoverGap, getMissingLoginSession: () => _missingLoginSession, getSessionPoolFailoverRunner: () => _sessionPoolFailoverRunnerDriver?.status() ?? null, sessionPoolPromotionActivation: _sessionPoolPromotionActivation, meshRpcDispatcher, deliverA2aToMachine: _deliverA2aToMachine ?? undefined, workingSetPullCoordinator, workingSetArtifactManager, orchestratorPoller, commitmentReplicaStore, preferenceReplicaStore, replicatedRecordEmitter, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, forwardCommitmentMutate, sessionOwnershipRegistry, sendDrain: _sendDrain ?? undefined, topicPinStore: _topicPinStore ?? undefined, topicPinSkewQuarantine: _topicPinSkewQuarantine ?? undefined, topicPinFoldView: _topicPinFoldView ?? undefined, ownershipReconciler: _ownershipReconciler ?? undefined, staleOwnerEngine: _staleOwnerEngine ?? undefined, duplicateReconciler: _duplicateReconciler ?? undefined, ownerDarkLadder: _ownerDarkLadder ?? undefined, spawnAdmission: _spawnAdmission ?? undefined, judgmentProvenance: _judgmentProvenance ?? undefined, leaseHandback: _leaseHandbackCtx ?? 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, passkeyRevokeOutbox: _passkeyRevokeOutbox ? () => _passkeyRevokeOutbox : undefined, passkeyPeerOnline: _passkeyPeerOnline, 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, externalHogSentinel, orphanedWorkSentinel, mcpProcessReaper, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, autonomousLivenessReconciler, enforcedTerminationStatus: () => enforcedTerminationWatchdog?.guardStatus() ?? null, prHandLease: prHandLease ?? undefined, standDownRegistry: _standDownRegistry ?? undefined, standDownAudit: _standDownAudit ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
25969
|
+
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, conversationRegistry, conversationBindAuth, conversationFollowThrough, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, getLastRelayEvent: threadlineGetLastRelayEvent, threadlineReplyWaiters, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, responseReviewGate, reviewCanaryBattery, messagingToneGate, outboundDedupGate, telemetryHeartbeat, pasteManager, featureRegistry, discoveryEvaluator, completionEvaluator, unifiedTrust, liveConfig, sharedStateLedger, ledgerSessionRegistry, worktreeManager, oidcEnrolledRepos: parallelDevConfig?.oidcEnrolledRepos, initiativeTracker, projectRoundRunner, projectDriftChecker, machineHeartbeat, machinePoolRegistry, ropeHealthMonitor, writeAdmission: writeAdmission ?? undefined, getInboundQueue: () => _inboundQueue, getMachineCoherence: () => _machineCoherenceSentinel, getSingleMachineFailoverGap: () => _singleMachineFailoverGap, getMissingLoginSession: () => _missingLoginSession, getSessionPoolFailoverRunner: () => _sessionPoolFailoverRunnerDriver?.status() ?? null, sessionPoolPromotionActivation: _sessionPoolPromotionActivation, meshRpcDispatcher, deliverA2aToMachine: _deliverA2aToMachine ?? undefined, workingSetPullCoordinator, workingSetArtifactManager, orchestratorPoller, commitmentReplicaStore, preferenceReplicaStore, replicatedRecordEmitter, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, forwardCommitmentMutate, sessionOwnershipRegistry, sendDrain: _sendDrain ?? undefined, topicPinStore: _topicPinStore ?? undefined, topicPinSkewQuarantine: _topicPinSkewQuarantine ?? undefined, topicPinFoldView: _topicPinFoldView ?? undefined, ownershipReconciler: _ownershipReconciler ?? undefined, staleOwnerEngine: _staleOwnerEngine ?? undefined, duplicateReconciler: _duplicateReconciler ?? undefined, ownerDarkLadder: _ownerDarkLadder ?? undefined, spawnAdmission: _spawnAdmission ?? undefined, judgmentProvenance: _judgmentProvenance ?? undefined, leaseHandback: _leaseHandbackCtx ?? 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, passkeyRevokeOutbox: _passkeyRevokeOutbox ? () => _passkeyRevokeOutbox : undefined, passkeyPeerOnline: _passkeyPeerOnline, passkeyPoolReader: _passkeyPoolReader ? () => _passkeyPoolReader : 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, externalHogSentinel, orphanedWorkSentinel, mcpProcessReaper, geminiLoopRunner, sleepController, agentActivityState, reapLog, resumeQueue, resumeDrainer, autonomousLivenessReconciler, enforcedTerminationStatus: () => enforcedTerminationWatchdog?.guardStatus() ?? null, prHandLease: prHandLease ?? undefined, standDownRegistry: _standDownRegistry ?? undefined, standDownAudit: _standDownAudit ?? undefined, operatorStopRecorder: recordOperatorStop, sleepWakeDetector, unjustifiedStopGate, stopGateDb, stopNotifier, liveTestGate, liveTestGateMode, liveTestRunnerCtx }); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
25849
25970
|
const readIdentityProjectionPeerRows = async () => {
|
|
25850
25971
|
const peers = _resolvePeerUrls?.() ?? [];
|
|
25851
25972
|
const extra = config.multiMachine?.peerUrlAllowlist;
|
|
@@ -27224,6 +27345,8 @@ export async function startServer(options) {
|
|
|
27224
27345
|
}
|
|
27225
27346
|
}
|
|
27226
27347
|
catch (err) {
|
|
27348
|
+
// @silent-fallback-ok — shutdown path: the failure is logged loudly and the process is going
|
|
27349
|
+
// down regardless; a lost resume hint costs one fresh-start conversation, never lost state.
|
|
27227
27350
|
console.error('[shutdown] Failed to save resume UUIDs:', err);
|
|
27228
27351
|
}
|
|
27229
27352
|
}
|
|
@@ -27234,6 +27357,10 @@ export async function startServer(options) {
|
|
|
27234
27357
|
ropeHealthMonitor?.stop();
|
|
27235
27358
|
if (_passkeyOutboxTimer)
|
|
27236
27359
|
clearInterval(_passkeyOutboxTimer);
|
|
27360
|
+
if (_passkeyPoolTimer)
|
|
27361
|
+
clearInterval(_passkeyPoolTimer);
|
|
27362
|
+
if (_passkeyHealthTimer)
|
|
27363
|
+
clearInterval(_passkeyHealthTimer);
|
|
27237
27364
|
coherenceMonitor.stop();
|
|
27238
27365
|
commitmentTracker.stop();
|
|
27239
27366
|
commitmentSentinel?.stop();
|