-
Notifications
You must be signed in to change notification settings - Fork 904
feat(agent-core): add cron tools and scheduler for session-level recurring tasks #136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
e96f255
4edb7ce
7507ac7
27ddbc8
aed8d24
1785457
2e09ef8
e5a01a3
60a87f7
fbb6fb6
d79b95c
72c0af4
1b828ab
825cf7b
9916c0d
601c90c
31eb542
a30f163
be1e864
a387914
6c476ee
f7ba348
3f2204e
a6777c4
c263009
9dfd5ed
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| "@moonshot-ai/agent-core": minor | ||
| "@moonshot-ai/kimi-code": minor | ||
| --- | ||
|
|
||
| Add session-scoped scheduled prompts so the assistant can register, list, and cancel recurring or one-shot reminders that fire later in the same session. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -246,6 +246,8 @@ function isReplayUserTurnRecord(record: AgentReplayRecord): boolean { | |
| return message.origin.trigger === 'user-slash'; | ||
| case 'background_task': | ||
| case 'compaction_summary': | ||
| case 'cron_job': | ||
| case 'cron_missed': | ||
|
Comment on lines
+249
to
+250
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
When a resumed session contains cron fires, this filter stops counting Useful? React with 👍 / 👎. |
||
| case 'hook_result': | ||
| case 'injection': | ||
| case 'system_trigger': | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { CronManager, type CronManagerOptions } from './manager'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These cron-origin messages are excluded from
limitReplayRecordsByTurn, butrenderReplayUserMessagehas no cron branch and falls through toadvanceReplayTurn()for the same records. In a session with many cron-fired turns and few real user turns, resume can therefore include far more thanREPLAY_TURN_LIMITrendered turns while also showing cron prompts as plain user messages; either count these as turn starts or render/skip them consistently as internal cron events.Useful? React with 👍 / 👎.