Scheduler Bridge
The Scheduler Bridge (lib/scheduler.ts) is the JavaScript-side interface to the Kotlin scheduler-module native module. It translates task instance data from SQLite into hardware alarm registrations on Android.Core Function
- Queries task_instances from SQLite for upcoming pending instances
- Serializes the instance data into a JSON payload
- Passes it to the Kotlin SchedulerModule via the native bridge
- The Kotlin module registers exact alarms via AlarmManager.setExactAndAllowWhileIdle()
When It Runs
The scheduler bridge is called as Step 3 of the Triple-Write Orchestrator. It also runs during:- HydrationSync completion (after delta ingestion)
- Manual Resync (after database rebuild)
- Cold boot (via the Kotlin Boot Receiver)