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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//! marver — a TUI workspace for running AI coding agents.
//!
//! You describe a task; marver creates a git worktree per repo it touches,
//! opens a tmux session in a directory holding them, and starts an agent there.
//! Agents keep running after the interface closes. When one finishes or gets
//! stuck it says so, and the diff is reviewed and committed from inside marver.
//!
//! # How it fits together
//!
//! Two processes share one SQLite database. [`daemon::Daemon`] owns the queue,
//! receives the agent's hooks, and keeps working while nothing is watching;
//! the [`tui`] is disposable and holds nothing it cannot re-fetch. [`Store`] is
//! the only place state lives, and it rejects any move the lifecycle disallows,
//! so no other component has to remember the diagram.
//!
//! Policy is kept separable from effect throughout, which is what makes the
//! interesting parts drivable without a tmux server or a real agent:
//! [`scheduler::Scheduler::plan`] decides what should start without starting
//! anything, [`review::Reviewer`] works against any store, and
//! [`scheduler::Launch`] is a trait, so the real [`launcher::Launcher`] can be
//! swapped for something inert.
//!
//! See `ARCHITECTURE.md` in the repository for the design and the reasoning
//! behind each decision.
//!
//! # Clocks and payloads
//!
//! Nothing here reads the clock: every call that writes takes the time as an
//! argument, which is what lets the state machine be tested at fixed instants.
//! [`chrono`] and [`serde_json`] are re-exported for that reason — their types
//! are unavoidable in this API, and a caller should not have to work out which
//! version to match.
// Re-exported because this crate's API cannot be used without them: almost
// every write takes a `chrono::DateTime<Utc>`, and `Event::payload` is a
// `serde_json::Value`. Depending on them directly means matching versions by
// hand for no reason.
pub use chrono;
pub use serde_json;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;