instar 1.3.1658 → 1.3.1660
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/dashboard/console/services-model.js +2 -0
- package/dist/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +146 -43
- package/dist/commands/server.js.map +1 -1
- package/dist/commands/setClaudeKey.d.ts.map +1 -1
- package/dist/commands/setClaudeKey.js +5 -3
- package/dist/commands/setClaudeKey.js.map +1 -1
- package/dist/commands/setup.d.ts.map +1 -1
- package/dist/commands/setup.js +19 -2
- package/dist/commands/setup.js.map +1 -1
- package/dist/config/ConfigDefaults.d.ts.map +1 -1
- package/dist/config/ConfigDefaults.js +9 -0
- package/dist/config/ConfigDefaults.js.map +1 -1
- package/dist/core/BackupManager.d.ts.map +1 -1
- package/dist/core/BackupManager.js +1 -0
- package/dist/core/BackupManager.js.map +1 -1
- package/dist/core/CodexLifecycleProductionComposition.d.ts +1 -1
- package/dist/core/CodexLifecycleProductionComposition.d.ts.map +1 -1
- package/dist/core/ModelTierEscalation.d.ts +1 -1
- package/dist/core/ModelTierEscalation.d.ts.map +1 -1
- package/dist/core/ModelTierEscalation.js +3 -0
- package/dist/core/ModelTierEscalation.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts +21 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +65 -4
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/SessionManager.d.ts.map +1 -1
- package/dist/core/SessionManager.js +15 -2
- package/dist/core/SessionManager.js.map +1 -1
- package/dist/core/SlackReplyRelayInstaller.d.ts.map +1 -1
- package/dist/core/SlackReplyRelayInstaller.js +3 -0
- package/dist/core/SlackReplyRelayInstaller.js.map +1 -1
- package/dist/core/TopicProfileResolver.d.ts +9 -0
- package/dist/core/TopicProfileResolver.d.ts.map +1 -1
- package/dist/core/TopicProfileResolver.js +33 -0
- package/dist/core/TopicProfileResolver.js.map +1 -1
- package/dist/core/UpdateChecker.d.ts +5 -0
- package/dist/core/UpdateChecker.d.ts.map +1 -1
- package/dist/core/UpdateChecker.js +142 -69
- package/dist/core/UpdateChecker.js.map +1 -1
- package/dist/core/UsageWallRescue.d.ts +259 -0
- package/dist/core/UsageWallRescue.d.ts.map +1 -0
- package/dist/core/UsageWallRescue.js +581 -0
- package/dist/core/UsageWallRescue.js.map +1 -0
- package/dist/core/codexCapabilities.d.ts +2 -0
- package/dist/core/codexCapabilities.d.ts.map +1 -1
- package/dist/core/codexCapabilities.js +26 -0
- package/dist/core/codexCapabilities.js.map +1 -1
- package/dist/core/devGatedFeatures.d.ts.map +1 -1
- package/dist/core/devGatedFeatures.js +6 -0
- package/dist/core/devGatedFeatures.js.map +1 -1
- package/dist/core/types.d.ts +35 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/types.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/lifeline/ServerSupervisor.d.ts.map +1 -1
- package/dist/lifeline/ServerSupervisor.js +14 -0
- package/dist/lifeline/ServerSupervisor.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginStore.d.ts +5 -0
- package/dist/messaging/telegram-origin/OriginStore.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginStore.js +2 -1
- package/dist/messaging/telegram-origin/OriginStore.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginStore.worker.js +1 -1
- package/dist/messaging/telegram-origin/OriginStore.worker.js.map +1 -1
- package/dist/messaging/telegram-origin/OriginStoreBackend.d.ts +18 -0
- package/dist/messaging/telegram-origin/OriginStoreBackend.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/OriginStoreBackend.js +50 -0
- package/dist/messaging/telegram-origin/OriginStoreBackend.js.map +1 -1
- package/dist/messaging/telegram-origin/SessionDeliveryNotice.d.ts +7 -0
- package/dist/messaging/telegram-origin/SessionDeliveryNotice.d.ts.map +1 -0
- package/dist/messaging/telegram-origin/SessionDeliveryNotice.js +25 -0
- package/dist/messaging/telegram-origin/SessionDeliveryNotice.js.map +1 -0
- package/dist/messaging/telegram-origin/TelegramOriginRuntime.d.ts +9 -2
- package/dist/messaging/telegram-origin/TelegramOriginRuntime.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/TelegramOriginRuntime.js +39 -7
- package/dist/messaging/telegram-origin/TelegramOriginRuntime.js.map +1 -1
- package/dist/messaging/telegram-origin/TelegramOriginService.d.ts +1 -0
- package/dist/messaging/telegram-origin/TelegramOriginService.d.ts.map +1 -1
- package/dist/messaging/telegram-origin/TelegramOriginService.js +5 -2
- package/dist/messaging/telegram-origin/TelegramOriginService.js.map +1 -1
- package/dist/monitoring/PresenceProxy.d.ts +17 -0
- package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
- package/dist/monitoring/PresenceProxy.js +61 -4
- package/dist/monitoring/PresenceProxy.js.map +1 -1
- package/dist/monitoring/SessionWatchdog.d.ts +22 -0
- package/dist/monitoring/SessionWatchdog.d.ts.map +1 -1
- package/dist/monitoring/SessionWatchdog.js +48 -1
- package/dist/monitoring/SessionWatchdog.js.map +1 -1
- package/dist/monitoring/delivery-failure-sentinel.js +5 -5
- package/dist/monitoring/delivery-failure-sentinel.js.map +1 -1
- package/dist/monitoring/rateLimitDetection.d.ts +37 -0
- package/dist/monitoring/rateLimitDetection.d.ts.map +1 -1
- package/dist/monitoring/rateLimitDetection.js +117 -0
- package/dist/monitoring/rateLimitDetection.js.map +1 -1
- package/dist/native/InstarWedgeCanary.app/Contents/MacOS/InstarWedgeCanary +0 -0
- package/dist/native/instar-desktop-host +0 -0
- package/dist/recommended/recipes.d.ts +37 -0
- package/dist/recommended/recipes.d.ts.map +1 -0
- package/dist/recommended/recipes.js +64 -0
- package/dist/recommended/recipes.js.map +1 -0
- package/dist/recommended/setupRestart.d.ts +18 -0
- package/dist/recommended/setupRestart.d.ts.map +1 -0
- package/dist/recommended/setupRestart.js +23 -0
- package/dist/recommended/setupRestart.js.map +1 -0
- package/dist/recommended/setupState.d.ts +25 -0
- package/dist/recommended/setupState.d.ts.map +1 -0
- package/dist/recommended/setupState.js +30 -0
- package/dist/recommended/setupState.js.map +1 -0
- package/dist/scaffold/templates.js +2 -2
- package/dist/server/AgentServer.d.ts +1 -0
- package/dist/server/AgentServer.d.ts.map +1 -1
- package/dist/server/AgentServer.js +4 -0
- package/dist/server/AgentServer.js.map +1 -1
- package/dist/server/CapabilityIndex.d.ts.map +1 -1
- package/dist/server/CapabilityIndex.js +12 -2
- package/dist/server/CapabilityIndex.js.map +1 -1
- package/dist/server/mobilePairingRoutes.d.ts.map +1 -1
- package/dist/server/mobilePairingRoutes.js +10 -0
- package/dist/server/mobilePairingRoutes.js.map +1 -1
- package/dist/server/mobilePermissionsRoutes.d.ts +260 -0
- package/dist/server/mobilePermissionsRoutes.d.ts.map +1 -0
- package/dist/server/mobilePermissionsRoutes.js +684 -0
- package/dist/server/mobilePermissionsRoutes.js.map +1 -0
- package/dist/server/recommendedServiceRoutes.d.ts +27 -1
- package/dist/server/recommendedServiceRoutes.d.ts.map +1 -1
- package/dist/server/recommendedServiceRoutes.js +219 -2
- package/dist/server/recommendedServiceRoutes.js.map +1 -1
- package/dist/server/routes.d.ts +5 -0
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +250 -60
- package/dist/server/routes.js.map +1 -1
- package/dist/testing/selfActionRegistry.d.ts.map +1 -1
- package/dist/testing/selfActionRegistry.js +89 -0
- package/dist/testing/selfActionRegistry.js.map +1 -1
- package/package.json +1 -1
- package/scripts/lint-template-sha-history.ts +41 -17
- package/scripts/locked-proof/configure-proof-agent.mjs +18 -5
- package/scripts/locked-proof/driver.mjs +45 -6
- package/scripts/locked-proof/stage-proof-agents.sh +31 -9
- package/src/data/builtin-manifest.json +66 -66
- package/src/data/feature-ladders.json +2 -1
- 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/src/data/state-coherence-registry.json +15 -0
- package/src/scaffold/templates.ts +2 -2
- package/upgrades/1.3.1659.md +28 -0
- package/upgrades/1.3.1660.md +82 -0
- package/upgrades/native-update-preflight.eli16.md +23 -0
- package/upgrades/side-effects/echo-bugs-codex-default.md +75 -0
- package/upgrades/side-effects/feedback-delivery-route-docs.md +70 -0
- package/upgrades/side-effects/locked-proof-harness-viewer.md +66 -0
- package/upgrades/side-effects/mobile-native-permissions.md +136 -0
- package/upgrades/side-effects/native-update-preflight.md +74 -0
- package/upgrades/side-effects/recommended-services-runner.md +88 -0
- package/upgrades/side-effects/restart-reply-order-and-loss.md +79 -0
- package/upgrades/side-effects/set-claude-key-no-cli.md +12 -0
- package/upgrades/side-effects/slack-relay-sha-history.md +92 -0
- package/upgrades/side-effects/usage-wall-rescue.md +101 -0
|
@@ -9,6 +9,8 @@ const BACKUP_WORDS = {
|
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
function choiceWord(s) {
|
|
12
|
+
if (s.stalled) return 'Setup stopped';
|
|
13
|
+
if (s.verified && s.verified.result === 'pass') return 'Working';
|
|
12
14
|
if (s.choice === 'yes') return 'You said yes';
|
|
13
15
|
if (s.choice === 'no' || s.legacyDeclined) return 'You said no';
|
|
14
16
|
return s.available ? 'Not decided' : 'Not available yet';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/commands/server.ts"],"names":[],"mappings":"AAkIA,OAAO,EAAE,cAAc,EAAwD,MAAM,2BAA2B,CAAC;AAgBjH,OAAO,EAAE,eAAe,EAAiC,MAAM,iCAAiC,CAAC;AA6BjG,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAGvD,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AA+J7D,OAAO,KAAK,EAAW,oBAAoB,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kBAAkB,CA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Auth Standard P1.3 — pre-limit proactive swap monitor. Null
|
|
1137
1137
|
// until wired (requires the scheduler; gated behind subscriptionPool.proactiveSwap).
|
|
1138
1138
|
let _proactiveSwapMonitor = null;
|
|
1139
|
+
// usage-wall-rescue — moves a session off a walled account (tagged or not) and
|
|
1140
|
+
// tags spawns. Null until wired next to the scheduler; read late by the
|
|
1141
|
+
// PresenceProxy wording hook.
|
|
1142
|
+
let _usageWallRescue = null;
|
|
1139
1143
|
// swap-continuity-antithrash §3/§4 — the anti-thrash spine. The ledger + engine
|
|
1140
1144
|
// load and hydrate UNCONDITIONALLY at boot (R4-L3: reactive rows append
|
|
1141
1145
|
// regardless of antiThrash.enabled, so the index is warm at a mid-run flag
|
|
@@ -1411,7 +1415,9 @@ spawnOpts) {
|
|
|
1411
1415
|
_topicResumeMap?.remove(topicId);
|
|
1412
1416
|
console.log(`[spawnSessionForTopic] Context-exhaustion latch active for topic ${topicId} — forcing fresh spawn`);
|
|
1413
1417
|
}
|
|
1414
|
-
|
|
1418
|
+
// A group default can change the resolved framework without a per-topic pin
|
|
1419
|
+
// event. Never pass a saved Claude UUID to Codex (or vice versa) at restart.
|
|
1420
|
+
let resumeSessionId = _topicResumeMap?.getForFramework(topicId, framework) ?? undefined;
|
|
1415
1421
|
if (resumeSessionId) {
|
|
1416
1422
|
console.log(`[spawnSessionForTopic] Found resume UUID for topic ${topicId}: ${resumeSessionId} (source: TopicResumeMap — trusted)`);
|
|
1417
1423
|
}
|
|
@@ -6577,23 +6583,64 @@ export async function startServer(options) {
|
|
|
6577
6583
|
telegramOriginBoot = await bootTelegramOrigin({ config, token: typeof originBotToken === 'string' && originBotToken ? originBotToken : undefined,
|
|
6578
6584
|
onRecoveredMessage: entry => {
|
|
6579
6585
|
telegram?.logRecoveredOriginMessage(entry);
|
|
6586
|
+
// A late acceptance is reported by the durable exception scan. Only
|
|
6587
|
+
// an on-time acceptance can close the held Attention item here.
|
|
6588
|
+
if (entry.acceptedAt - entry.preparedAt >= 300_000)
|
|
6589
|
+
return;
|
|
6580
6590
|
const attentionId = `telegram-origin-held-reply:${entry.operationId}`;
|
|
6581
6591
|
if (telegram?.clearAttentionCondition({ id: attentionId }, `Telegram accepted recovered message ${entry.messageId}.`).closed === 0) {
|
|
6582
6592
|
void telegram?.updateAttentionStatus(attentionId, 'DONE', { silent: true,
|
|
6583
6593
|
closedBy: 'cause-cleared', resolution: `Telegram accepted recovered message ${entry.messageId}.` });
|
|
6584
6594
|
}
|
|
6585
6595
|
},
|
|
6586
|
-
onSessionDeliveryHeld: entry => {
|
|
6596
|
+
onSessionDeliveryHeld: async (entry) => {
|
|
6587
6597
|
if (!telegram || !entry.chatId)
|
|
6588
6598
|
return;
|
|
6599
|
+
const { sessionDeliveryNotice, lateRecoveredReplyNotice } = await import('../messaging/telegram-origin/SessionDeliveryNotice.js');
|
|
6589
6600
|
const topicId = entry.chatId === String(originTelegramConfig.config.issuesChatId)
|
|
6590
6601
|
? 10_000_000_000 + (entry.threadId ?? 1) : entry.threadId;
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6602
|
+
const late = entry.state === 'accepted' && entry.preparedAt !== undefined && entry.acceptedAt !== null && entry.acceptedAt !== undefined
|
|
6603
|
+
? lateRecoveredReplyNotice(entry.preparedAt, entry.acceptedAt, entry.outOfOrder) : null;
|
|
6604
|
+
const attentionId = `telegram-origin-held-reply:${entry.operationId}`;
|
|
6605
|
+
const previous = telegram.getAttentionItem(attentionId);
|
|
6606
|
+
if (entry.state === 'accepted' && !late) {
|
|
6607
|
+
if (previous && previous.status !== 'DONE')
|
|
6608
|
+
await telegram.updateAttentionStatus(attentionId, 'DONE', { silent: true,
|
|
6609
|
+
closedBy: 'cause-cleared', resolution: 'Telegram accepted the original reply.' });
|
|
6610
|
+
return;
|
|
6611
|
+
}
|
|
6612
|
+
const copy = entry.state === 'accepted'
|
|
6613
|
+
? { summary: 'An earlier reply was confirmed after a delay and may be out of order with newer answers.', topicText: late }
|
|
6614
|
+
: sessionDeliveryNotice(entry.state ?? 'held', entry.uncertain);
|
|
6615
|
+
if (entry.state === 'accepted' && previous?.status === 'DONE' && previous.summary === copy.summary)
|
|
6616
|
+
return;
|
|
6617
|
+
await telegram.upsertAttentionItem({ id: attentionId,
|
|
6618
|
+
category: 'telegram-origin', priority: 'HIGH', title: 'A reply needs delivery attention',
|
|
6619
|
+
sourceContext: 'telegram-origin-session-hold', summary: copy.summary,
|
|
6620
|
+
description: `Original reply to topic ${topicId ?? 'unknown'}; delivery state ${entry.state ?? 'held'}.` });
|
|
6621
|
+
if (topicId === null)
|
|
6622
|
+
return;
|
|
6623
|
+
// A stable logical send id lets the origin outbox answer a repeated
|
|
6624
|
+
// notice with its original receipt, including after a server restart.
|
|
6625
|
+
// A held/uncertain notice is retried by the next durable scan.
|
|
6626
|
+
if (!telegramOriginBoot)
|
|
6627
|
+
throw new Error('origin notice sender not ready');
|
|
6628
|
+
const { postOriginAutomationReply } = await import('../messaging/telegram-origin/OriginAutomationReply.js');
|
|
6629
|
+
const noticeState = entry.state === 'accepted' ? 'late'
|
|
6630
|
+
: entry.uncertain || entry.state === 'outcome-unknown' ? 'uncertain'
|
|
6631
|
+
: entry.state === 'expired' || entry.state === 'known-failed' ? 'failed' : 'delayed';
|
|
6632
|
+
const response = await postOriginAutomationReply({ service: telegramOriginBoot.runtime.service,
|
|
6633
|
+
port: config.port, authToken: config.authToken ?? '', producerId: 'reply-delivery-notice',
|
|
6634
|
+
topicId, body: { text: copy.topicText, metadata: { messageKind: 'health-alert' } },
|
|
6635
|
+
logicalSendId: `reply-delivery-notice:${entry.operationId}:${noticeState}` });
|
|
6636
|
+
if (response.status !== 200)
|
|
6637
|
+
throw new Error(`origin notice not confirmed: HTTP ${response.status}`);
|
|
6638
|
+
if (entry.state === 'accepted') {
|
|
6639
|
+
if (telegram.clearAttentionCondition({ id: attentionId }, 'The late reply and its explanation reached the conversation.').closed === 0) {
|
|
6640
|
+
await telegram.updateAttentionStatus(attentionId, 'DONE', { silent: true,
|
|
6641
|
+
closedBy: 'cause-cleared', resolution: 'The late reply and its explanation reached the conversation.' });
|
|
6642
|
+
}
|
|
6643
|
+
}
|
|
6597
6644
|
},
|
|
6598
6645
|
noticeOwner: typeof originBotToken === 'string' && !!originBotToken && !lifelineOwnsTelegramPoll(config.stateDir, originBotToken) && options.telegram !== false,
|
|
6599
6646
|
holdsLease: () => coordinator.holdsLease(),
|
|
@@ -6824,6 +6871,7 @@ export async function startServer(options) {
|
|
|
6824
6871
|
defaultFramework: () => _defaultFramework,
|
|
6825
6872
|
configTopicFrameworks: () => _topicFrameworks,
|
|
6826
6873
|
configProfileDefaults: () => topicProfilesCfg?.defaults ?? {},
|
|
6874
|
+
configGroupDefaults: () => topicProfilesCfg?.groupDefaults ?? {},
|
|
6827
6875
|
frameworkDefaultModels: () => config.sessions?.frameworkDefaultModels ?? {},
|
|
6828
6876
|
tierEscalationConfig: () => normalizeTierEscalationConfig(config.models?.tierEscalation),
|
|
6829
6877
|
localModelBinding: (topicKey) => _topicLocalModelStore?.get(Number(topicKey)) ?? null,
|
|
@@ -16060,6 +16108,9 @@ export async function startServer(options) {
|
|
|
16060
16108
|
hasContextExhaustionLatch: sessionRecovery
|
|
16061
16109
|
? (topicId) => sessionRecovery.hasContextWedgedSeen(topicId)
|
|
16062
16110
|
: undefined,
|
|
16111
|
+
// usage-wall-rescue: when another account has room, the standby says
|
|
16112
|
+
// the session is being moved — never "paused until reset".
|
|
16113
|
+
describeQuotaWall: (sessionName) => _usageWallRescue?.describeWall(sessionName) ?? null,
|
|
16063
16114
|
// Shared per-topic mutex — coordinates with PromiseBeacon.
|
|
16064
16115
|
acquireProxyMutex: (topicId, holder) => proxyCoordinator.tryAcquire(topicId, holder),
|
|
16065
16116
|
releaseProxyMutex: (topicId, holder) => proxyCoordinator.release(topicId, holder),
|
|
@@ -21143,8 +21194,8 @@ export async function startServer(options) {
|
|
|
21143
21194
|
onNoAlternate: telegramRef ? (sessionName, exhaustedAccountId) => {
|
|
21144
21195
|
void telegramRef.createAttentionItem({
|
|
21145
21196
|
id: `subpool-no-alternate-${exhaustedAccountId}`,
|
|
21146
|
-
title: '
|
|
21147
|
-
summary: `Session "${sessionName}"
|
|
21197
|
+
title: 'Every subscription account is at its usage limit',
|
|
21198
|
+
summary: `Session "${sessionName}" reached the usage limit on account "${exhaustedAccountId}", and no other connected account has room. It will carry on by itself when the limit resets. Connecting another account would let it carry on sooner.`,
|
|
21148
21199
|
category: 'subscription-pool',
|
|
21149
21200
|
priority: 'HIGH',
|
|
21150
21201
|
sourceContext: 'subscription-pool:no-alternate',
|
|
@@ -21152,36 +21203,84 @@ export async function startServer(options) {
|
|
|
21152
21203
|
} : undefined,
|
|
21153
21204
|
logger: { log: (m) => console.log(m), warn: (m) => console.warn(m) },
|
|
21154
21205
|
});
|
|
21155
|
-
//
|
|
21156
|
-
//
|
|
21157
|
-
//
|
|
21158
|
-
|
|
21159
|
-
|
|
21160
|
-
|
|
21161
|
-
|
|
21162
|
-
|
|
21163
|
-
|
|
21164
|
-
|
|
21165
|
-
|
|
21166
|
-
|
|
21167
|
-
|
|
21168
|
-
|
|
21169
|
-
|
|
21170
|
-
|
|
21171
|
-
|
|
21172
|
-
|
|
21173
|
-
|
|
21174
|
-
|
|
21175
|
-
|
|
21206
|
+
// usage-wall-rescue (docs/specs/usage-wall-rescue.md). ONE switch,
|
|
21207
|
+
// `subscriptionPool.wallRescue.enabled` (default true, operator-approved
|
|
21208
|
+
// 2026-11-04), read LIVE; effective only while the pool has 2+ usable
|
|
21209
|
+
// accounts of the session's framework. Covers untagged sessions by
|
|
21210
|
+
// resolving the account the session is actually on.
|
|
21211
|
+
const { UsageWallRescue } = await import('../core/UsageWallRescue.js');
|
|
21212
|
+
const readWallRescueConfig = () => liveConfig.get('subscriptionPool', config.subscriptionPool);
|
|
21213
|
+
_usageWallRescue = new UsageWallRescue({
|
|
21214
|
+
readConfig: readWallRescueConfig,
|
|
21215
|
+
listAccounts: () => subscriptionPool.list(),
|
|
21216
|
+
getSession: (name) => state.listSessions({ status: 'running' }).find((s) => s.tmuxSession === name),
|
|
21217
|
+
configHomeForSession: (name) => sessionManager.configHomeForSession(name),
|
|
21218
|
+
resolveDefaultAccountId: async () => (await inUseAccountResolver.resolve(subscriptionPool.list())).activeAccountId,
|
|
21219
|
+
swap: (a) => _quotaAwareScheduler
|
|
21220
|
+
? _quotaAwareScheduler.onQuotaPressure(a)
|
|
21221
|
+
: Promise.resolve({ swapped: false, toAccountId: null, reason: 'scheduler-unavailable' }),
|
|
21222
|
+
// Plain notice to the conversation, only when the session cannot be
|
|
21223
|
+
// moved (no account has room, or moves kept failing).
|
|
21224
|
+
// Coalesced: one in-flight poll at a time and at most one per minute, so
|
|
21225
|
+
// many sessions holding on a stale reading cannot fan out pool polls.
|
|
21226
|
+
requestQuotaRefresh: (() => {
|
|
21227
|
+
let inFlight = false;
|
|
21228
|
+
let lastAt = 0;
|
|
21229
|
+
return () => {
|
|
21230
|
+
const now = Date.now();
|
|
21231
|
+
if (inFlight || now - lastAt < 60_000)
|
|
21232
|
+
return;
|
|
21233
|
+
inFlight = true;
|
|
21234
|
+
lastAt = now;
|
|
21235
|
+
void Promise.resolve(quotaPoller.pollAll())
|
|
21236
|
+
.catch(() => { })
|
|
21237
|
+
.finally(() => { inFlight = false; });
|
|
21238
|
+
};
|
|
21239
|
+
})(),
|
|
21240
|
+
notifyUser: (sessionName, text) => {
|
|
21241
|
+
const raw = telegram?.getTopicForSession(sessionName);
|
|
21242
|
+
const topicId = typeof raw === 'number' ? raw : Number(raw);
|
|
21243
|
+
if (raw == null || !Number.isFinite(topicId))
|
|
21244
|
+
return false;
|
|
21245
|
+
// Resolves true only on a confirmed send; anything else leaves the
|
|
21246
|
+
// standby to report the wall.
|
|
21247
|
+
return sendAutomationReply('usage-wall-rescue', topicId, { text, metadata: { provenance: 'automation' } }, deterministicAutomationAuthor())
|
|
21248
|
+
.then((resp) => resp.ok === true)
|
|
21249
|
+
.catch(() => false);
|
|
21250
|
+
},
|
|
21251
|
+
logger: { log: (m) => console.log(m), warn: (m) => console.warn(m) },
|
|
21252
|
+
});
|
|
21253
|
+
const wallRescue = _usageWallRescue;
|
|
21254
|
+
void wallRescue.refreshDefaultAccount();
|
|
21255
|
+
const wallRescueDefaultTimer = setInterval(() => { void wallRescue.refreshDefaultAccount(); }, 60_000);
|
|
21256
|
+
wallRescueDefaultTimer.unref?.();
|
|
21257
|
+
// The trigger: the watchdog's settled usage-wall signal.
|
|
21258
|
+
if (watchdog) {
|
|
21259
|
+
watchdog.on('usage-wall', (sessionName) => {
|
|
21260
|
+
void wallRescue.onUsageWall(sessionName);
|
|
21261
|
+
});
|
|
21262
|
+
watchdog.on('usage-wall-cleared', (sessionName) => {
|
|
21263
|
+
wallRescue.onWallCleared(sessionName);
|
|
21176
21264
|
});
|
|
21177
21265
|
}
|
|
21178
|
-
//
|
|
21179
|
-
//
|
|
21180
|
-
//
|
|
21181
|
-
//
|
|
21182
|
-
//
|
|
21183
|
-
|
|
21184
|
-
|
|
21266
|
+
// Legacy opt-in: an explicit autoSwapOnRateLimit:true also moves a session
|
|
21267
|
+
// on a server-throttle escalation (a throttle is shared capacity, so the
|
|
21268
|
+
// default-on rescue does not move sessions for it). It goes through the
|
|
21269
|
+
// SAME funnel and brakes as the wall; untagged sessions are resolved
|
|
21270
|
+
// instead of skipped. The live config is checked per event.
|
|
21271
|
+
rateLimitSentinel.on('rate-limit:escalated', (rlState) => {
|
|
21272
|
+
const sessionName = rlState?.sessionName;
|
|
21273
|
+
if (!sessionName)
|
|
21274
|
+
return;
|
|
21275
|
+
void wallRescue.onThrottleEscalated(sessionName);
|
|
21276
|
+
});
|
|
21277
|
+
// Session PINNING / tagging. An explicit pinSessionsToPool:true pins
|
|
21278
|
+
// every claude-code spawn (as before). Otherwise the rescue's resolver
|
|
21279
|
+
// tags spawns when the pool has 2+ usable accounts (so no session is
|
|
21280
|
+
// untagged) and, with pinning explicitly off, still refuses to launch on
|
|
21281
|
+
// a default login the pool knows is walled. 0/1 usable accounts → null →
|
|
21282
|
+
// the default login, exactly as before.
|
|
21283
|
+
if (config.subscriptionPool?.pinSessionsToPool === true) {
|
|
21185
21284
|
const { selectAccount } = await import('../core/QuotaAwareScheduler.js');
|
|
21186
21285
|
sessionManager.setSpawnAccountResolver(() => {
|
|
21187
21286
|
const acct = selectAccount(subscriptionPool.list(), { nowMs: Date.now(), framework: 'claude-code' });
|
|
@@ -21189,12 +21288,16 @@ export async function startServer(options) {
|
|
|
21189
21288
|
});
|
|
21190
21289
|
console.log(pc.green(' Subscription-pool session pinning enabled'));
|
|
21191
21290
|
}
|
|
21291
|
+
else {
|
|
21292
|
+
sessionManager.setSpawnAccountResolver(() => wallRescue.spawnAccount());
|
|
21293
|
+
}
|
|
21192
21294
|
// ProactiveSwapMonitor (Subscription & Auth Standard P1.3 — the PRE-LIMIT
|
|
21193
21295
|
// half). Moves a session OFF an account BEFORE it walls, at a lag-aware
|
|
21194
|
-
// measured threshold. Complements the reactive
|
|
21195
|
-
// only fires AFTER the wall)
|
|
21196
|
-
//
|
|
21197
|
-
//
|
|
21296
|
+
// measured threshold. Complements the reactive usage-wall rescue (which
|
|
21297
|
+
// only fires AFTER the wall). It does NOT move untagged sessions (Q3):
|
|
21298
|
+
// those are reached by the default-slot repoint arm, and on a pool with
|
|
21299
|
+
// 2+ usable accounts the wall rescue tags new spawns so few stay
|
|
21300
|
+
// untagged. DARK by default: only runs
|
|
21198
21301
|
// when subscriptionPool.proactiveSwap.enabled is true (moving live sessions
|
|
21199
21302
|
// is real authority).
|
|
21200
21303
|
const proactiveCfg = config.subscriptionPool?.proactiveSwap;
|
|
@@ -30372,7 +30475,7 @@ export async function startServer(options) {
|
|
|
30372
30475
|
const server = new AgentServer({ config, ecosystemLedger: _ecosystemLedger ?? undefined, recommendedServicesLedger: _recommendedServicesLedger ?? undefined, singleInstanceLock, agentIdentity: _agentIdentityDeps, 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, jobAnomalySendAutomationReply: sendAutomationReply, 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, verifiedEntityName(m.machineId, m.nickname) ?? ''])); let peers = (_resolvePeerUrls?.() ?? []).map((p) => ({ machineId: p.machineId, nickname: nickById.get(p.machineId) ?? '', url: p.url })); if (peers.length === 0) {
|
|
30373
30476
|
peers = (_listPoolMachines?.() ?? []).filter((m) => m.machineId !== _meshSelfId && !!m.lastKnownUrl).map((m) => ({ machineId: m.machineId, nickname: verifiedEntityName(m.machineId, m.nickname) ?? '', url: m.lastKnownUrl }));
|
|
30374
30477
|
} if (peers.length === 0)
|
|
30375
|
-
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, localVerify: localVerifyService ?? undefined, localVerifyStatus: localVerifyStatus ?? undefined, guardLatchStore: guardLatchStore ?? undefined, agentStopSurfacer: agentStopSurfacer ?? 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, appConversations: _appConversationService ?? undefined, slackInboundDispatch: () => _slackInboundDispatch, conversationFollowThrough, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, peerHomebaseRelay, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, pairingInvites: threadlinePairingInvites, getLastRelayEvent: threadlineGetLastRelayEvent, a2aRelayForward: _a2aRelayForwardCtx ?? undefined, threadlineReplyWaiters, threadlineMcpHttp, memoryPrivacy: _memoryPrivacyWired ?? undefined, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, relayVerdictCounters: threadlineRelayClient ? (() => ({ ...threadlineRelayClient.relayVerdictCounters, expiredMismatchIgnored: a2aDeliveryTracker?.expiredMismatchIgnored ?? 0 })) : undefined, inboundIdLedger: _inboundIdLedger ?? undefined, inboundIdLedgerDaemonDeferred: () => _inboundIdLedgerDaemonDeferred, 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, replicatedStoreReconciler, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, jevMemoryPicker, forwardCommitmentMutate, sessionOwnershipRegistry, sendDrain: _sendDrain ?? undefined, claimTopicOwnershipOnSpawn: (topicId) => _claimOwnershipForAutonomousSpawn ? _claimOwnershipForAutonomousSpawn(topicId) : 'unwired', 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, recordRopeResult: _recordRopeResult ?? undefined, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, deliverMandateToMachine: _deliverMandateToMachine ?? undefined, passkeyRevokeOutbox: _passkeyRevokeOutbox ? () => _passkeyRevokeOutbox : undefined, passkeyPeerOnline: _passkeyPeerOnline, passkeyPoolReader: _passkeyPoolReader ? () => _passkeyPoolReader : undefined, passkeyProofBrowser: async (profileDir) => { const { ChromeCdpReloginBrowser } = await import('../core/ChromeCdpReloginBrowser.js'); return new ChromeCdpReloginBrowser({ userDataDir: profileDir, passkeyMode: true, headless: true, launchTimeoutMs: 30_000, operationTimeoutMs: 20_000 }); }, 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, codexArmSessionSweeper, 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 });
|
|
30478
|
+
return []; const { fetchPeerSubscriptionViews } = await import('../core/fetchPeerSubscriptionViews.js'); return fetchPeerSubscriptionViews({ peers: () => peers, fetchImpl: fetch, authToken: config.authToken ?? '' }); }, quotaPoller, quotaAwareScheduler: _quotaAwareScheduler ?? undefined, proactiveSwapMonitor: _proactiveSwapMonitor ?? undefined, usageWallRescue: _usageWallRescue ?? undefined, inUseAccountResolver, enrollmentWizard, accountFollowMeRevocation, credentialRepointing, semanticMemory, activitySentinel, rateLimitSentinel, releaseReadinessSentinel: releaseReadinessSentinel ?? undefined, greenPrAutoMerger: greenPrAutoMerger ?? undefined, localVerify: localVerifyService ?? undefined, localVerifyStatus: localVerifyStatus ?? undefined, guardLatchStore: guardLatchStore ?? undefined, agentStopSurfacer: agentStopSurfacer ?? 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, appConversations: _appConversationService ?? undefined, slackInboundDispatch: () => _slackInboundDispatch, conversationFollowThrough, whatsappBusinessBackend, messageBridge, hookEventReceiver, worktreeMonitor, subagentTracker, instructionsVerifier, handshakeManager: threadlineHandshake, threadlineRouter, conversationStore, threadLog, threadMessageRecorder, warrantsReplyGate, collaborationSurfacer, peerHomebaseRelay, threadResumeMap, topicLinkageHandler: topicLinkageHandler ?? undefined, threadlineRelayClient, pairingInvites: threadlinePairingInvites, getLastRelayEvent: threadlineGetLastRelayEvent, a2aRelayForward: _a2aRelayForwardCtx ?? undefined, threadlineReplyWaiters, threadlineMcpHttp, memoryPrivacy: _memoryPrivacyWired ?? undefined, listenerManager: listenerManager ?? undefined, a2aDeliveryTracker: a2aDeliveryTracker ?? undefined, relayVerdictCounters: threadlineRelayClient ? (() => ({ ...threadlineRelayClient.relayVerdictCounters, expiredMismatchIgnored: a2aDeliveryTracker?.expiredMismatchIgnored ?? 0 })) : undefined, inboundIdLedger: _inboundIdLedger ?? undefined, inboundIdLedgerDaemonDeferred: () => _inboundIdLedgerDaemonDeferred, 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, replicatedStoreReconciler, conflictStore, rollbackUnmerge, droppedOriginRegistry, preferencesUnionReader, jevMemoryPicker, forwardCommitmentMutate, sessionOwnershipRegistry, sendDrain: _sendDrain ?? undefined, claimTopicOwnershipOnSpawn: (topicId) => _claimOwnershipForAutonomousSpawn ? _claimOwnershipForAutonomousSpawn(topicId) : 'unwired', 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, recordRopeResult: _recordRopeResult ?? undefined, guardRegistry, listPoolMachines: _listPoolMachines ?? undefined, deliverMandateToMachine: _deliverMandateToMachine ?? undefined, passkeyRevokeOutbox: _passkeyRevokeOutbox ? () => _passkeyRevokeOutbox : undefined, passkeyPeerOnline: _passkeyPeerOnline, passkeyPoolReader: _passkeyPoolReader ? () => _passkeyPoolReader : undefined, passkeyProofBrowser: async (profileDir) => { const { ChromeCdpReloginBrowser } = await import('../core/ChromeCdpReloginBrowser.js'); return new ChromeCdpReloginBrowser({ userDataDir: profileDir, passkeyMode: true, headless: true, launchTimeoutMs: 30_000, operationTimeoutMs: 20_000 }); }, 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, codexArmSessionSweeper, 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 });
|
|
30376
30479
|
if (_pendingCompactionEvidence)
|
|
30377
30480
|
featureEvidence.record('multiMachine.coherenceJournal.replication.compaction', _pendingCompactionEvidence); // Resolve the late-bound topic-operator getter (increment 2e): routing was
|
|
30378
30481
|
const readIdentityProjectionPeerRows = async () => {
|