ticlawk 0.1.17-dev.5 → 0.1.17-dev.6
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/package.json
CHANGED
|
@@ -375,7 +375,7 @@ export async function getAgentServerInfo({ actingAgentId }) {
|
|
|
375
375
|
// ── Reminders ──
|
|
376
376
|
|
|
377
377
|
export async function scheduleAgentReminder({
|
|
378
|
-
actingAgentId, title, fireAt, anchorConversationId, anchorMessageId,
|
|
378
|
+
actingAgentId, title, fireAt, anchorConversationId, anchorMessageId, recurrence,
|
|
379
379
|
}) {
|
|
380
380
|
return apiFetch('/api/agent/reminders', {
|
|
381
381
|
method: 'POST',
|
|
@@ -385,6 +385,7 @@ export async function scheduleAgentReminder({
|
|
|
385
385
|
fire_at: fireAt,
|
|
386
386
|
anchor_conversation_id: anchorConversationId,
|
|
387
387
|
anchor_message_id: anchorMessageId ?? null,
|
|
388
|
+
recurrence: recurrence ?? null,
|
|
388
389
|
}),
|
|
389
390
|
});
|
|
390
391
|
}
|
|
@@ -557,6 +557,18 @@ export async function runReminderScheduleCommand(args) {
|
|
|
557
557
|
console.error('--target or --anchor-conversation-id is required');
|
|
558
558
|
return 2;
|
|
559
559
|
}
|
|
560
|
+
// Optional recurrence: --recur-at HH:MM [--recur-tz <IANA>] [--recur-weekday 1,2,3].
|
|
561
|
+
// --fire-at remains the FIRST occurrence; the rule advances it after each fire.
|
|
562
|
+
let recurrence = null;
|
|
563
|
+
const recurAt = getArg(args, 'recur-at');
|
|
564
|
+
if (recurAt) {
|
|
565
|
+
const tz = getArg(args, 'recur-tz') || 'UTC';
|
|
566
|
+
const wdRaw = getArg(args, 'recur-weekday');
|
|
567
|
+
const byWeekday = wdRaw
|
|
568
|
+
? String(wdRaw).split(',').map((s) => parseInt(s.trim(), 10)).filter((n) => n >= 1 && n <= 7)
|
|
569
|
+
: [];
|
|
570
|
+
recurrence = { at: recurAt, tz, ...(byWeekday.length ? { by_weekday: byWeekday } : {}) };
|
|
571
|
+
}
|
|
560
572
|
const res = await daemonRequest({
|
|
561
573
|
method: 'POST',
|
|
562
574
|
path: '/agent/reminder/schedule',
|
|
@@ -567,6 +579,7 @@ export async function runReminderScheduleCommand(args) {
|
|
|
567
579
|
target,
|
|
568
580
|
anchor_conversation_id: anchorConversationId,
|
|
569
581
|
anchor_message_id: anchorMessageId,
|
|
582
|
+
recurrence,
|
|
570
583
|
},
|
|
571
584
|
});
|
|
572
585
|
printJson(res.body);
|
|
@@ -1425,7 +1438,7 @@ export const AGENT_COMMAND_HELP = {
|
|
|
1425
1438
|
to a user, use \`ticlawk message send --attach <file>\` instead.
|
|
1426
1439
|
`,
|
|
1427
1440
|
reminder: `ticlawk reminder <schedule|list|snooze|update|cancel|log>
|
|
1428
|
-
ticlawk reminder schedule --title <t> (--fire-at <iso> | --in-seconds N | --in-minutes N) (--target "<target>" | --anchor-conversation-id <id>) [--anchor-message-id <id>]
|
|
1441
|
+
ticlawk reminder schedule --title <t> (--fire-at <iso> | --in-seconds N | --in-minutes N) (--target "<target>" | --anchor-conversation-id <id>) [--anchor-message-id <id>] [--recur-at HH:MM [--recur-tz <IANA>] [--recur-weekday 1,2,3]]
|
|
1429
1442
|
ticlawk reminder list [--status active|fired|canceled]
|
|
1430
1443
|
ticlawk reminder snooze <reminder-id> (--fire-at <iso> | --in-seconds N | --in-minutes N)
|
|
1431
1444
|
ticlawk reminder update <reminder-id> [--title <t>] [--fire-at <iso>]
|
|
@@ -1435,6 +1448,17 @@ export const AGENT_COMMAND_HELP = {
|
|
|
1435
1448
|
Use reminders for follow-up that depends on future state you cannot resolve
|
|
1436
1449
|
now. A reminder fires by posting a system message into the anchor
|
|
1437
1450
|
conversation and waking the owner agent via an explicit delivery.
|
|
1451
|
+
|
|
1452
|
+
RECURRING: for a fixed cadence (e.g. a daily/weekly meal-time check-in), use
|
|
1453
|
+
ONE recurring reminder instead of enumerating many one-shots. Pass --recur-at
|
|
1454
|
+
(local HH:MM), --recur-tz (the owner's IANA timezone), and optionally
|
|
1455
|
+
--recur-weekday (ISO 1=Mon..7=Sun, comma-separated; omit for every day).
|
|
1456
|
+
--fire-at is still the FIRST occurrence; on each fire the reminder
|
|
1457
|
+
auto-advances to the next occurrence and stays active. Example — weekday
|
|
1458
|
+
18:30 Beijing dinner check-in:
|
|
1459
|
+
ticlawk reminder schedule --title "晚餐" --anchor-conversation-id <id> \\
|
|
1460
|
+
--fire-at <next 18:30 Beijing as ISO> \\
|
|
1461
|
+
--recur-at 18:30 --recur-tz Asia/Shanghai --recur-weekday 1,2,3,4,5
|
|
1438
1462
|
`,
|
|
1439
1463
|
task: `ticlawk task <create|claim|unclaim|update|list>
|
|
1440
1464
|
ticlawk task create --target "<target>" [--title <t>] [--assign-agent <agent-id>]
|
|
@@ -590,6 +590,7 @@ export async function handleReminderSchedule(req, body, ctx) {
|
|
|
590
590
|
fireAt: body.fire_at,
|
|
591
591
|
anchorConversationId,
|
|
592
592
|
anchorMessageId: body?.anchor_message_id || null,
|
|
593
|
+
recurrence: body?.recurrence ?? null,
|
|
593
594
|
});
|
|
594
595
|
debugLog('agent-cli', 'reminder.schedule', {
|
|
595
596
|
actingAgentId,
|
|
@@ -39,3 +39,5 @@ Use `ticlawk credential request --name <ENV_VAR>` to create the credential slot.
|
|
|
39
39
|
## Reminders
|
|
40
40
|
|
|
41
41
|
Use reminders only for external/time-based future follow-up or visible, persistent resume conditions. Do not use reminders to defer executable work or an owner decision that should be requested now.
|
|
42
|
+
|
|
43
|
+
For a fixed cadence (a daily or weekly check-in, e.g. meal-time reminders), use ONE recurring reminder, not many enumerated one-shots: `ticlawk reminder schedule ... --recur-at HH:MM --recur-tz <owner IANA tz> [--recur-weekday 1,2,3]`. It auto-advances to the next occurrence on each fire and stays active, so the cadence never runs out.
|