MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / debugInvalidSpec

Function debugInvalidSpec

packages/agent-core/src/tools/cron/clock.ts:138–148  ·  view source on GitHub ↗
(spec: string, reason: string)

Source from the content-addressed store, hash-verified

136}
137
138function debugInvalidSpec(spec: string, reason: string): void {
139 // We do not pull in a logger here — `clock.ts` is the lowest layer of
140 // the cron module and must stay dependency-free so it can be imported
141 // from anywhere (including lint rules, type files). A stderr write
142 // gated on KIMI_CRON_DEBUG is enough — production is silent.
143 if (process.env['KIMI_CRON_DEBUG'] === '1') {
144 process.stderr.write(
145 `[cron/clock] invalid KIMI_CRON_CLOCK spec ${JSON.stringify(spec)}: ${reason} — falling back to system clock\n`,
146 );
147 }
148}

Callers 1

resolveClockSourcesFunction · 0.85

Calls 1

writeMethod · 0.65

Tested by

no test coverage detected