huskies: merge 1039
This commit is contained in:
@@ -108,7 +108,10 @@ mod tests {
|
||||
assert!(names.contains(&"unfreeze_story"));
|
||||
assert!(names.contains(&"find_orphaned_items"));
|
||||
assert!(names.contains(&"recover_half_written_items"));
|
||||
assert_eq!(tools.len(), 76);
|
||||
assert!(names.contains(&"schedule_timer"));
|
||||
assert!(names.contains(&"list_timers"));
|
||||
assert!(names.contains(&"cancel_timer"));
|
||||
assert_eq!(tools.len(), 79);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
@@ -357,6 +357,66 @@ pub(super) fn system_tools() -> Vec<Value> {
|
||||
"properties": {}
|
||||
}
|
||||
}),
|
||||
json!({
|
||||
"name": "schedule_timer",
|
||||
"description": "Register a durable scheduled timer that fires an MCP call or reminder at a specified time. Survives server restart and rebuild. Use 'once' for a one-shot timer or 'recurring' to re-arm automatically after each fire.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"when": {
|
||||
"type": "string",
|
||||
"description": "When to fire: relative duration ('in 2 hours', '15 minutes', '30s') or ISO 8601 absolute timestamp ('2026-05-15T10:00:00Z')"
|
||||
},
|
||||
"action": {
|
||||
"type": "object",
|
||||
"description": "What to do when the timer fires. Either {\"type\":\"mcp\",\"method\":\"tool_name\",\"args\":{...}} for an MCP call or {\"type\":\"prompt\",\"text\":\"...\"} for a server-log reminder.",
|
||||
"properties": {
|
||||
"type": { "type": "string", "enum": ["mcp", "prompt"] },
|
||||
"method": { "type": "string", "description": "MCP tool name (required for type='mcp')" },
|
||||
"args": { "type": "object", "description": "MCP tool arguments (for type='mcp')" },
|
||||
"text": { "type": "string", "description": "Reminder text (required for type='prompt')" }
|
||||
},
|
||||
"required": ["type"]
|
||||
},
|
||||
"mode": {
|
||||
"type": "string",
|
||||
"enum": ["once", "recurring"],
|
||||
"description": "Fire once (default) or keep recurring. For recurring with absolute 'when', also provide 'interval'."
|
||||
},
|
||||
"interval": {
|
||||
"type": "string",
|
||||
"description": "Re-arm interval for recurring timers when 'when' is an absolute timestamp (e.g. '24h', '1 hour', '30 minutes'). Optional when 'when' is relative — interval is inferred."
|
||||
},
|
||||
"label": {
|
||||
"type": "string",
|
||||
"description": "Optional human-readable label shown in list_timers output."
|
||||
}
|
||||
},
|
||||
"required": ["when", "action"]
|
||||
}
|
||||
}),
|
||||
json!({
|
||||
"name": "list_timers",
|
||||
"description": "List all pending scheduled timers registered via schedule_timer.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {}
|
||||
}
|
||||
}),
|
||||
json!({
|
||||
"name": "cancel_timer",
|
||||
"description": "Cancel a scheduled timer by its ID. Use list_timers to find the ID.",
|
||||
"inputSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "Timer ID to cancel (e.g. 'tm-a3f7b9c2')"
|
||||
}
|
||||
},
|
||||
"required": ["id"]
|
||||
}
|
||||
}),
|
||||
json!({
|
||||
"name": "recover_half_written_items",
|
||||
"description": "Recover half-written (orphaned) pipeline items by lifting each onto a fresh non-tombstoned ID. For each orphan, allocates a new ID, copies the content, re-applies item_type and depends_on from front matter, verifies the new entry is live in the CRDT, then removes the orphaned row. Pass 'only' to restrict recovery to specific orphan IDs (safe for live systems); omit to recover all. Returns old_id → new_id mappings for every successful recovery.",
|
||||
|
||||
Reference in New Issue
Block a user