1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Routine data model, agent registry, command builder, service functions, and HTTP handlers.
//!
//! A *routine* is a scheduled AI-agent task. Unlike a [`crate::cron_jobs::CronJob`] (which runs a
//! handler script), a routine launches an agent (claude code, codex, …) inside an interactive tmux
//! session rooted in a fresh workbench. moadim never clones the routine's `repositories`; it lists
//! them in the prompt as context and the agent clones any it needs.
//!
//! The module is split by concern:
//! - `model` — persisted types, API responses, and request bodies.
//! - `agents` — the agent registry and built-in default agent configs.
//! - `defaults` — built-in default routines seeded on startup when absent.
//! - `command` — prompt composition and the single-line launch command builder.
//! - `service` — store-mutating service functions (list/get/create/update/delete/trigger/logs).
//! - `cleanup` — auto-removal of finished, expired run workbenches (per-routine TTL).
//! - `ical` — iCalendar (`.ics`) export of upcoming routine fire times.
//! - `handlers` — the Axum HTTP handlers.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
// `command` holds only crate-internal helpers (slugify, compose_prompt, build_routine_command, …).
pub use *;