Commit Graph

4 Commits

Author SHA1 Message Date
Joel Cooper
5dae98ca33 fix: avoid cron self-deadlock when embedded agent calls cron tools
When a cron job triggers an agent that calls back into cron (e.g.
cron.list), the non-reentrant async mutex in locked() causes a
circular wait: onTimer holds the lock waiting for the agent, the
agent's cron.list waits for the lock.

Fix by:
1. Splitting onTimer to collect due jobs under the lock, then
   execute them after releasing it. The runningAtMs sentinel
   prevents double-runs.
2. Adding a module-level CronService registry so the cron tool
   can call the service directly in-process, bypassing the
   gateway WebSocket round-trip entirely.

AI-assisted (Claude). Tested locally with cron jobs that call
cron.list mid-execution — previously deadlocked, now works.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 14:28:50 -07:00
Peter Steinberger
fdaeada3ec feat: mirror delivered outbound messages (#1031)
Co-authored-by: T Savo <TSavo@users.noreply.github.com>
2026-01-17 02:03:18 +00:00
Peter Steinberger
c379191f80 chore: migrate to oxlint and oxfmt
Co-authored-by: Christoph Nakazawa <christoph.pojer@gmail.com>
2026-01-14 15:02:19 +00:00
Peter Steinberger
bcbfb357be refactor(src): split oversized modules 2026-01-14 01:17:56 +00:00