* Thresholds from tengu_onyx_plover. The enabled gate lives in config.ts * (isAutoDreamEnabled); this returns only the scheduling knobs. Defensive * per-field validation since GB cache can return stale wrong-type values.
()
| 71 | * per-field validation since GB cache can return stale wrong-type values. |
| 72 | */ |
| 73 | function getConfig(): AutoDreamConfig { |
| 74 | const raw = |
| 75 | getFeatureValue_CACHED_MAY_BE_STALE<Partial<AutoDreamConfig> | null>( |
| 76 | 'tengu_onyx_plover', |
| 77 | null, |
| 78 | ) |
| 79 | return { |
| 80 | minHours: |
| 81 | typeof raw?.minHours === 'number' && |
| 82 | Number.isFinite(raw.minHours) && |
| 83 | raw.minHours > 0 |
| 84 | ? raw.minHours |
| 85 | : DEFAULTS.minHours, |
| 86 | minSessions: |
| 87 | typeof raw?.minSessions === 'number' && |
| 88 | Number.isFinite(raw.minSessions) && |
| 89 | raw.minSessions > 0 |
| 90 | ? raw.minSessions |
| 91 | : DEFAULTS.minSessions, |
| 92 | } |
| 93 | } |
| 94 | |
| 95 | function isGateOpen(): boolean { |
| 96 | if (getKairosActive()) return false // KAIROS mode uses disk-skill dream |
no test coverage detected