v0.2.0 — timer-driven, multi-trigger loops
Major refactor modelled on Claude Code's /loop.
Highlights
- Fixed-interval loops (
/loop 15m <prompt>): the interval is parsed at the command layer into a cron schedule and run by a self-re-arming timer. Continuation is the default — a loop no longer dies because the model forgot to reschedule, and15mis a real cadence instead of prompt text. - Self-paced mode kept as the no-interval form (
/loop <prompt>). - Event & hybrid triggers — fire on pi events (
tool_execution_end,turn_end,monitor:done, …) or cron+event with debounce. - Multiple concurrent loops with
LoopCreate/LoopList/LoopDeletetools and/loop list·/loop stop [id]. - Persistence under
.pi/loops, restored unexpired on--resume. - Per-loop
maxFires, 7-day expiry, deterministic jitter, read-only mode.
Internals
Split into src/{types,loop-parse,store,scheduler,triggers}.ts; entry stays loop.ts. Added tsconfig, typecheck/test scripts, and node:test coverage for parsing/cron/jitter.