@wahooks/channel 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -231,23 +231,22 @@ async function processPendingQueue() {
|
|
|
231
231
|
const active = pending.filter((p) => new Date(p.addedAt) > cutoff);
|
|
232
232
|
for (const item of active) {
|
|
233
233
|
try {
|
|
234
|
+
console.error(`[wahooks-channel] Sending reminder ${item.reminderId} to Claude...`);
|
|
234
235
|
await mcp.notification({
|
|
235
236
|
method: "notifications/claude/channel",
|
|
236
237
|
params: {
|
|
237
|
-
content: `[Scheduled Reminder] ${item.task}
|
|
238
|
+
content: `[Scheduled Reminder] ${item.task}\n\nTarget chat: ${item.chatId}\nScheduled for: ${item.scheduledFor}\n\nPlease execute this task now and send the results to the target chat using wahooks_reply.`,
|
|
238
239
|
meta: {
|
|
239
240
|
from: item.chatId,
|
|
240
241
|
reminder_id: item.reminderId,
|
|
241
|
-
scheduled_for: item.scheduledFor,
|
|
242
|
-
type: "reminder",
|
|
243
242
|
},
|
|
244
243
|
},
|
|
245
244
|
});
|
|
246
|
-
console.error(`[wahooks-channel] Delivered reminder ${item.reminderId}
|
|
245
|
+
console.error(`[wahooks-channel] Delivered reminder ${item.reminderId}`);
|
|
247
246
|
}
|
|
248
|
-
catch {
|
|
247
|
+
catch (err) {
|
|
249
248
|
claudeConnected = false;
|
|
250
|
-
console.error(
|
|
249
|
+
console.error(`[wahooks-channel] Claude disconnected during reminder delivery: ${err}`);
|
|
251
250
|
return; // stop processing, items stay in queue
|
|
252
251
|
}
|
|
253
252
|
}
|
|
@@ -533,7 +532,8 @@ mcp.setRequestHandler(CallToolRequestSchema, async (req) => {
|
|
|
533
532
|
}
|
|
534
533
|
case "wahooks_schedule_reminder": {
|
|
535
534
|
const id = `rem_${Date.now().toString(36)}`;
|
|
536
|
-
const
|
|
535
|
+
const rawOneTime = args.one_time;
|
|
536
|
+
const oneTime = rawOneTime === true || rawOneTime === "true";
|
|
537
537
|
// Calculate next run
|
|
538
538
|
let nextRunAt;
|
|
539
539
|
try {
|