MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getConfig

Function getConfig

src/services/autoDream/autoDream.ts:73–93  ·  view source on GitHub ↗

* 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.

()

Source from the content-addressed store, hash-verified

71 * per-field validation since GB cache can return stale wrong-type values.
72 */
73function 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
95function isGateOpen(): boolean {
96 if (getKairosActive()) return false // KAIROS mode uses disk-skill dream

Callers 1

initAutoDreamFunction · 0.70

Tested by

no test coverage detected