feat: Cron tool and agent integration#23
Merged
lxowalle merged 6 commits intosipeed:mainfrom Feb 11, 2026
Merged
Conversation
- Add adhocore/gronx dependency for cron expression parsing - Fix CronService race conditions and add cron expression support - Add CronTool with add/list/remove/enable/disable actions - Add ContextualTool interface for tools needing channel/chatID context - Add ProcessDirectWithChannel to AgentLoop for cron job execution - Register CronTool in gateway and wire up onJob handler - Fix slice bounds panic in addJob for short messages Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add at_seconds parameter for one-time reminders (e.g., "remind me in 10 minutes") - Update every_seconds description to emphasize recurring-only usage - Route cron delivery: deliver=true sends directly, deliver=false uses agent - Fix cron data path from ~/.picoclaw/cron to workspace/cron - Fix sessions path from workspace/../sessions to workspace/sessions Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Code review fixes: - Use map for O(n) job lookup in cron service (was O(n²)) - Set DeleteAfterRun=true for one-time cron tasks - Restore context compression/summarization to prevent context overflow - Add pkg/utils/string.go with Unicode-aware Truncate function - Simplify setupCronTool to return only CronService - Change Chinese comments to English in context.go Refactoring: - Replace toolsSummary callback with SetToolsRegistry setter pattern - This makes dependency injection clearer and easier to test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove duplicate truncate/truncateString functions from loop.go and cron.go - Use utils.Truncate consistently across codebase - Add Workspace Layout section to README - Document cron/scheduled tasks functionality Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
emadomedher
pushed a commit
to emadomedher/picoclaw
that referenced
this pull request
Feb 17, 2026
feat: Cron tool and agent integration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add cron/scheduled task functionality with deep agent integration.
Features
utils.TruncateconsistentlyChanges
pkg/tools/cron.go(284 lines)pkg/agent/memory.gopkg/utils/string.gopkg/agent/loop.go(+505/-190 lines)pkg/cron/service.go- refactored with gronx librarypkg/tools/registry.go- added ExecuteWithContextREADME.md- added documentationTesting
go buildpassesgo testpasses