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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
//! Directory names under `<mur_home>` that a fleet / deep-research run writes.
//!
//! One list, two readers that must never disagree: `mur-core` creates and
//! writes these while a run executes, and `mur-agent-runtime` carves exactly
//! these into the kernel sandbox for an agent-triggered run (`fleet_run`).
//! They lived as two separate literals and drifted — `runs/` was writable by
//! the CLI and denied to the sandbox, so every agent-triggered run failed to
//! register itself and `mur fleet status` reported nothing for a run that was
//! live (fleet develop-rust, 2026-09-09). The list lives here because the
//! runtime must not depend on `mur-core`.
use ;
/// Run-status records: `<mur_home>/runs/<run_id>/run.json`.
pub const RUNS: &str = "runs";
/// Fleet definitions: `<mur_home>/fleets/<name>/fleet.yaml`, plus the
/// operator's `.stopped` kill-switch and the daemon's `.last_run` stamp.
///
/// Configuration, not run state — deliberately absent from
/// [`RUN_STATE_DIRS`]. A run that could write here could rewrite its own
/// fleet's members, limits and HITL pre-approvals, or clear its own
/// kill-switch.
pub const FLEETS: &str = "fleets";
/// What a fleet's runs write, per fleet: `<mur_home>/fleet-state/<name>/`
/// (job queue, progress record, event log, parallel-track state).
///
/// Its own tree, not `runs/`: that store is keyed by run_id and lists every
/// directory in it as a run, so a fleet name dropped in there reads as a
/// phantom run. Not `fleets/`: that is configuration (see [`FLEETS`]).
pub const FLEET_STATE: &str = "fleet-state";
/// The fleet's single progress record, inside [`fleet_state_dir`]. Kept after
/// a run as the last-run record; overwritten by the next run. Read by both
/// the CLI and the runtime's `fleet_run` live-run guard, so named once here.
pub const FLEET_PROGRESS_FILE: &str = ".run_progress.json";
/// Exclusive advisory lock held for the life of a fleet run, inside
/// [`fleet_state_dir`]. Liveness is whether the lock can be taken, never a
/// stored pid. The holder's self-description lives in [`FLEET_RUN_OWNER_FILE`]
/// because Windows locks are mandatory and a held file cannot be read.
pub const FLEET_RUN_LOCK_FILE: &str = "run.lock";
/// Display-only owner record (pid, start time, host) beside the run lock.
pub const FLEET_RUN_OWNER_FILE: &str = "run.owner";
/// Every directory an in-sandbox fleet run must be able to write.
///
/// Add here FIRST, then use it. A directory the runner writes but this list
/// omits fails only in the sandboxed path — the one nobody runs by hand.
///
/// [`FLEET_STATE`] is listed for the CLI side and for tests; the sandbox
/// carves in only the `fleet_run.fleets` subdirectories of it (see
/// `mur-agent-runtime` `sandbox/policy/build.rs`), so an agent cannot queue work
/// for a fleet the operator never let it run.
///
/// `commander/` is deliberately absent: it holds the commander's private key
/// and `.env`, and its public keys are trust anchors. A run writes nothing
/// there; the sandbox grants read on the two public key files instead.
pub const RUN_STATE_DIRS: = ;
/// `<mur_home>/fleet-state/<name>/` — every file a run of `name` writes.
/// Directory holding the daemon's agent-readable heartbeat (#2116).
///
/// Not `murmurd.lock`: a sealed agent must know the daemon is up before it
/// queues a request only the daemon serves, and on Linux it reads only what
/// Landlock grants. A file grant is pinned to the inode present at seal time
/// and is skipped outright when the file does not exist yet (the daemon has
/// not started), so the grant is on this DIRECTORY, which the sandbox builder
/// creates before sealing; the daemon replaces the file inside it with
/// tmp + rename. Only a daemon that sweeps the fleet-dispatch inbox writes
/// it, so an older daemon reads as "down" — correctly, since it would never
/// serve the request.
pub const DAEMON_HEARTBEAT_DIR: &str = "daemon-heartbeat";
/// The heartbeat file inside [`DAEMON_HEARTBEAT_DIR`]: JSON carrying an
/// RFC 3339 `heartbeat_at`.
pub const DAEMON_HEARTBEAT_FILE: &str = "heartbeat.json";
/// `<mur_home>/daemon-heartbeat/heartbeat.json`.