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

Method addTask

packages/agent-core/src/agent/cron/manager.ts:198–204  ·  view source on GitHub ↗

* Add a fresh task to the in-memory store and, when persistence is * attached, mirror the new record to ` /cron/ .json`. * * The store call is synchronous (CronCreate needs the id for its * response); the on-disk write is fire-and-forget so a slow disk * never blocks the

(init: SessionCronTaskInit)

Source from the content-addressed store, hash-verified

196 * the agent loop.
197 */
198 addTask(init: SessionCronTaskInit): CronTask {
199 const task = this.store.add(init, this.clocks.wallNow());
200 this.persistEnqueue(task.id, () =>
201 this.persistStore!.write(task.id, task),
202 );
203 return task;
204 }
205
206 /**
207 * Remove a batch of tasks from the in-memory store and mirror each

Callers 2

resume.test.tsFile · 0.80
resolveExecutionMethod · 0.80

Calls 4

persistEnqueueMethod · 0.95
wallNowMethod · 0.80
addMethod · 0.65
writeMethod · 0.65

Tested by

no test coverage detected