feat(desktop-monitor): multi-account pool with failover and cooldown
Add monitor-account-pool to select authorized, non-blocked candidates for an AI-platform monitor task, classify failover reasons (risk control, challenge, auth failure, empty/unknown result) and cool the account down before rotating to the next. Wire runtime-controller to run monitor tasks through the pool, retrying across accounts and annotating the result with per-account attempt diagnostics and a failover count. Expose the pool state via the runtime snapshot. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@ import { getCircuitBreakerState } from './circuit-breaker'
|
||||
import { collectRecoverySnapshot } from './crash-recovery'
|
||||
import { getKeepAlivePlan } from './keep-alive'
|
||||
import { getLeaseManagerSnapshot } from './lease-manager'
|
||||
import { getMonitorAccountPoolSnapshot } from './monitor-account-pool'
|
||||
import { getMonitorSchedulerSnapshot } from './monitor-scheduler'
|
||||
import { getObservedRequestSnapshot } from './network-observer'
|
||||
import { getHiddenPlaywrightSnapshot } from './playwright-cdp'
|
||||
@@ -206,6 +207,7 @@ function createLiveRuntimeSnapshot(controller: RuntimeControllerSnapshot) {
|
||||
circuitBreaker: getCircuitBreakerState(),
|
||||
keepAlive: getKeepAlivePlan(),
|
||||
leaseManager,
|
||||
monitorAccountPool: getMonitorAccountPoolSnapshot(now),
|
||||
rateLimiter,
|
||||
recovery: collectRecoverySnapshot(),
|
||||
runtimeController: {
|
||||
|
||||
Reference in New Issue
Block a user