10 Commits

Author SHA1 Message Date
Yanxin Lu
f05a84d8ca contacts: extract into standalone skill, add himalaya wrapper for all email sends
Refactors the contacts system from being embedded in cal_tool.py into a
standalone contacts skill that serves as the single source of truth for
recipient validation across all outbound email paths.

- New skills/contacts/ skill: list, add, delete, resolve commands
- New skills/himalaya/scripts/himalaya.sh wrapper: validates To/Cc/Bcc
  recipients against contacts for message send, template send, and
  message write commands; passes everything else through unchanged
- cal_tool.py now delegates to contacts.py resolve instead of inline logic
- TOOLS.md updated: agent should use himalaya wrapper, not raw himalaya
2026-03-31 11:12:08 -07:00
Yanxin Lu
cd1ee050ed calendar: add contacts system to prevent recipient address hallucination
Agent hallucinated "xiaojuzi@meta.com" instead of looking up the correct
address from USER.md. Prompting rules can't reliably prevent this, so
recipient validation is now enforced at the tool level.

- Add contact list/add/delete subcommands (vCard .vcf files synced via CardDAV)
- send --to now resolves through contacts: accepts names, name:type, or
  known emails; rejects unknown addresses with available contacts shown
- Multi-email contacts supported with type qualifier (e.g. "小橘子:work")
- Adding contacts and sending are separate operations (no chaining)
2026-03-31 10:43:06 -07:00
Yanxin Lu
c66ccc4c44 calendar: add --alarm flag to send command for custom reminder triggers
Previously the send command hardcoded a 1-day VALARM. Now accepts
--alarm with duration format (e.g. 1h, 30m, 2d), defaulting to 1d.
2026-03-27 09:05:30 -07:00
Yanxin Lu
e1f1c0f334 calendar: add EXDATE support for cancelling single occurrences of recurring events
event delete on a recurring event previously deleted the entire .ics file,
killing the whole series. Now requires --date (adds EXDATE) or --all (deletes
series) for recurring events, refusing to act without either flag.
2026-03-26 09:19:02 -07:00
Yanxin Lu
35f048dd83 calendar: add recurring events, event management, and safety rules
Add --rrule flag to send with DTSTART/BYDAY validation (RFC 5545).
Add event list (via khal) and event delete (safe single-event removal).
Document safety rules from 2026-03-25 incident: always dry-run recurring
events, never rm .ics files, space out SMTP sends.
2026-03-25 09:32:22 -07:00
Yanxin Lu
734790a599 calendar: add todo edit command
Allow editing todo fields (due date, priority) in place via todoman,
instead of requiring delete + recreate. Updates all docs for consistency.
2026-03-24 21:56:23 -07:00
Yanxin Lu
b2ff8effd4 calendar: fix stale docs and remove unnecessary METHOD from todo add
- Remove duplicate email rule in TOOLS.md
- Add todo mutations to sync description in TOOLS.md
- Remove METHOD:REQUEST from todo add ICS (no longer emailed)
- Update todo check description in SKILL.md
2026-03-23 14:48:05 -07:00
Yanxin Lu
ab9f7da592 calendar: remove self-notification emails (CalDAV sync replaces them)
Remove three redundant email flows since all devices sync via CalDAV:
- Auto-adding mail@luyx.org as attendee on outgoing invites
- Forwarding invites to mail@luyx.org on accept/tentative
- Emailing todos to mail@luyx.org on todo add
2026-03-23 14:27:28 -07:00
Yanxin Lu
383b33cc30 calendar: use todoman for VTODO list/complete/delete/check
Replaces custom .ics parsing with todoman CLI (--porcelain for JSON).
todo add still uses icalendar directly (needs ICS creation + email).
Updates MIGRATION.md with todoman install/config instructions.
2026-03-22 15:00:20 -07:00
Yanxin Lu
44fbbea29b VTODO skill 2026-03-22 14:10:54 -07:00