feat(cron): add get and update actions to cron tool#2977
Conversation
Add GetJob and improved UpdateJob to CronService with proper cloning, schedule diffing, and next-run recomputation. Expose get/update actions in the cron tool so agents can inspect and partially update jobs without losing payloads or needing remove+add cycles. Includes access control for remote channels and command safety gates.
|
Hi, The new Since The PR itself adds tests describing the expected authorized behavior in go test ./pkg/tools -run 'TestCronTool_' |
|
@afjcjsbx Thanks mate. That makes sense. btw, After the fix, I noticed ci lint errors. Is that necessary to fix? |
|
yes please 🙏 |
📝 Description
Add
getandupdateactions to the existing agent-facingcrontool.This lets agents inspect the full persisted cron job payload before editing, then apply partial updates without recreating the job. The main goal is to prevent rescheduling flows from using
remove -> add, which can accidentally drop the original prompt, delivery target, command payload, or formatting instructions.This PR also updates cron service behavior so schedule/enabled changes recompute
NextRunAtMS, while payload-only updates preserve existing run state.🗣️ Type of Change
🤖 AI Code Generation
🔗 Related Issue
N/A
📚 Technical Context (Skip for Docs)
getexposes the full persisted job, andupdatepreserves omitted fields by default, making the recommended workflowlist -> get -> update.🧪 Test Environment
📸 Evidence (Optional)
Click to view Logs/Screenshots
☑️ Checklist