Add built-in scheduler with group-scoped tasks
- Custom nanoclaw MCP server with scheduling tools (schedule_task, list_tasks, get_task, update_task, pause/resume/cancel_task, send_message) - Tasks run as full agents in their group's context - Support for cron, interval, and one-time schedules - Task run logging with duration and results - Main channel has Bash access for admin tasks (query DB, manage groups) - Other groups restricted to file operations only - Updated docs and requirements Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
23
src/types.ts
23
src/types.ts
@@ -17,3 +17,26 @@ export interface NewMessage {
|
||||
content: string;
|
||||
timestamp: string;
|
||||
}
|
||||
|
||||
export interface ScheduledTask {
|
||||
id: string;
|
||||
group_folder: string;
|
||||
chat_jid: string;
|
||||
prompt: string;
|
||||
schedule_type: 'cron' | 'interval' | 'once';
|
||||
schedule_value: string;
|
||||
next_run: string | null;
|
||||
last_run: string | null;
|
||||
last_result: string | null;
|
||||
status: 'active' | 'paused' | 'completed';
|
||||
created_at: string;
|
||||
}
|
||||
|
||||
export interface TaskRunLog {
|
||||
task_id: string;
|
||||
run_at: string;
|
||||
duration_ms: number;
|
||||
status: 'success' | 'error';
|
||||
result: string | null;
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user