An always-on doctor for a Mac. brew doctor and claude doctor run a
checklist once, when asked; Celador runs its checklist all the time, as root,
across every account, and keeps a list of what it finds.
- A small Rust daemon (
celadord) samples the machine (load, memory pressure, swap, disk, thermal, power, every process), keeps a 72-hour record, watches crash, hang and Jetsam reports and app logs, and opens findings at four levels: debug, info, warning, error. - A menu bar app shows a plain eye on a healthy day, a yellow mark for a warning and a red mark only when the machine itself is in trouble. Clicking it opens a panel that names the cause ("Load 41 on 18 cores for 6m; top: Xcode, cargo x5, node"), shows that resource over the last hour and who uses it, with the fix as a button; everything else is one click further, in "All readings". Right-click for the whole menu.
- After every restart it explains how the last session ended (a clean shutdown, a slow one, or an unexpected end) and writes a postmortem of the 15 minutes before it.
- Only when the machine is confirmed hung (a resource under pressure and an
independent distress signal, re-checked) does it act on its own: it stops the
largest groups of processes holding the pressured resource, within fixed
limits. It ships in
observemode, where it only records what it would have done. - Claude Code is the judgment layer. When you ask, Claude evaluates a finding or the unknown items in the inventory, decides what is normal and safe on this Mac, proposes or performs a fix, verifies it, and saves a verdict that Celador's later checks use. Nothing is sent to Claude unless you ask, and you override Claude.
Celador is built for a single-owner Mac: one person, possibly with more than one admin account. It was designed and tested on one M-series MacBook Pro (macOS 27, 18 cores, 64 GB) with a heavy developer and AI-agent workload, so expect rough edges elsewhere.
The design, and the reasoning behind every rule, is in SPEC.md. The socket protocol is docs/protocol.md; every config key is in docs/config.md.
On 2026-11-17 the Mac this was built for became unusable in the middle of the afternoon. A few minutes of switching accounts and quitting apps later it was logged out and restarted, and nobody could say what had happened, because nothing had recorded load, memory pressure or swap.
Reading what macOS had left on disk afterwards (docs/incident-2026-11-17.md) showed a different story from the obvious one. The screen never froze: WindowServer kept logging and every account switch completed in 2 to 4 seconds. What wedged was an AI agent gateway and its workers, alive but silent for five minutes, on a machine running on battery in Low Power Mode after a burst of about 600 new processes a second. There was no memory pressure that day. 500 of 524 crash reports came from inside iOS simulators. The "shutdown stall" report covered a normal 27-second restart, not the hang.
The cause is still not known. Celador exists so that next time the record answers it, and so that if the machine really does hang, something sensible happens.
Three programs, all Rust, in one cargo workspace:
| program | runs as | job |
|---|---|---|
celadord |
root, LaunchDaemon ai.elier.celador |
all monitoring, the record, the checks, the emergency response, and a fixed set of fix actions |
celador |
whoever runs it | the CLI; talks to the daemon over the socket and does nothing privileged itself |
Celador.app |
each logged-in user, LaunchAgent ai.elier.celador-tray |
the menu bar icon, its panel and menus; runs Claude and Tidy handoffs as its own account |
- The daemon has one event thread (a kqueue loop: timers, file events, the
socket, the log pipe), an I/O thread for every file read and write, and a
helper thread for the few subprocesses. They talk through fixed queues; a
full queue drops and counts work, never blocks. The steady state starts no
subprocesses: everything is read with kernel APIs (
proc_pidinfo,proc_pid_rusage,sysctl,host_statistics64,statfs). Sampling is every 5 s for the system and 15 s for processes, 2 s while a live resource warning is open. - Checks. Memory pressure, swap growth and swap-out rate (never a swap percentage: macOS allocates swap on demand), disk, thermal, runaway CPU, memory hogs and leaks (with VMs judged against their configured guest memory, and local model servers such as Ollama only under memory pressure), crash and restart loops, leftover dev processes, hang, panic and Jetsam reports (only system memory kills count as distress), log error spikes, and an optional agent-gateway liveness check. The load, memory pressure and swap growth findings, a possible hang and the postmortem name who: the top 3 contributor groups for the pressured resource, with account names ("Top memory: llama-server x2 (bob) 46.6 GB, colima (bob) 16.4 GB, …"). The full catalog is in SPEC.md "Check catalog".
- The machine profile. Celador learns what is normal for each program on this Mac (time-weighted histograms over 28 days, per program, user and metric) and flags what is far past its own normal. A problem never becomes normal by lasting: samples under an open finding are kept out of that program's metric.
- No flapping. Free disk and runaway CPU have hysteresis (free disk clears 2 points above the level that opened it, a runaway under 60% of a core). Thermal pressure must last 2 minutes and clears after 5 below. A thermal, CPU or loop finding seen again within 30 minutes of closing continues with the same id and an "again" count. An Apple job relaunching after a SIGHUP (a reload) is info.
- One finding per process. A process far past its own normal and past a fixed bar (runaway CPU; memory hog or leak) opens one finding, the profile one, with the fixed bar's numbers in its detail.
- Sysadmin judgement. Everything running and everything set to start gets
a tier: Typical, Probably okay, Iffy ("worth a look", info) or WTF (a
warning), from a shipped catalog (
catalog/catalog.json) plus signals such as the code signer, the folder, a missing program, listeners on every interface, and the app's last-opened date. A tier never turns the icon red. - Housekeeping. Once a day while the Mac is quiet, it suggests startup items to remove, apps not opened in 180 days, and leftovers of removed apps. Nothing is removed without your approval; approved leftovers are handed to Tidy, never deleted by the root daemon.
- Postmortem. Each session is recorded with its boot session id. At start
the daemon compares with the last session, using the clean-stop record,
utmpx shutdown records and new reports, and classifies the end (daemon
restart, clean OS shutdown, slow shutdown, unexpected end, uncertain).
An unexpected-end or stall error an older build left open is classified
again at start from the evidence it records; if the current code calls it
info, it closes as
reclassified. - Emergency. Five independent signals: memory (pressure critical for 30 s), CPU (load above 4x the cores for 60 s), screen (the menu bar app on screen can't get an answer from WindowServer for two pings), daemon starved (its own timers late beyond what its own CPU time explains), and reports (a WindowServer or loginwindow hang, or a Jetsam report with system memory kills). One signal is only a suspicion. A resource signal plus a distress signal from a different source, still there 10 s later, is confirmed. Then it acts on contributor groups (launchd coalitions, so a simulator or a VM is one group), in tiers: leftover dev processes and simulators, then background builds and agents, then VMs, then the largest remaining. It force quits when memory is under pressure and suspends (SIGSTOP, reversible) when only CPU is. Limits: 3 groups per step, 10 per incident, stop on no progress, a 30 minute cooldown, and a never-kill list (pid 1, WindowServer, loginwindow, anything under /System, /usr/libexec, /usr/sbin, /sbin, and your protect list).
- Claude.
celador ask <id>writes an evidence bundle (the finding, the record and events for its window, the inventory item, the profile entry, verdicts) to~/Library/Application Support/Celador/asks/<id>/and runs your ownclaude -pwith read-only tools.--fixruns it with edit access as you; privileged steps only go throughcelador act, and the finding closes only when Celador's own check passes. Claude never runs as root and is never started by the daemon.
- Nothing the daemon executes is in a user-writable place; helper commands are fixed absolute paths with fixed argument shapes and timeouts.
- The socket accepts a fixed command list only, checks every caller's uid
(
allowed_uids), and no command changes the config. - Actions touch only targets Celador inventoried, re-checked (start time,
path, user; for plists device, inode, size, mtime and hash) just before
acting. Disabling a startup item moves its plist byte for byte into
disabled/; re-enable puts back only what Celador disabled. - The accounts Celador serves are all admins of the same Mac and are not isolated from each other, by design.
Requirements: macOS on Apple silicon, Rust stable via rustup, and an admin account. From a checkout:
sudo scripts/install.sh # install or update (same command)
sudo scripts/uninstall.sh # keeps the data folder; --purge removes it
The install script builds the release binaries as you (never cargo as root)
and serves the admin who ran sudo by default. To serve several accounts,
list them:
sudo scripts/install.sh --users "501:alice,502:bob"
It checks that every listed account exists, has that name and is an admin,
installs the binaries, the app and the launchd plists, creates
/Library/Application Support/Celador/config.json with
{"emergency_mode": "observe"} only when it is missing (an update never
overwrites it), checks owners and modes, loads the daemon, and checks that
every listed account can talk to it and that an unlisted user can't.
scripts/install.sh --dry-run runs every check into a temp folder without
root; scripts/test-install.sh runs the dry-run checks.
What goes where (all root-owned; nothing the daemon runs is in a user-writable place):
| path | owner, mode | what |
|---|---|---|
/usr/local/libexec/celadord |
root:wheel 755 | the daemon |
/usr/local/bin/celador |
root:wheel 755 | the CLI |
/Library/LaunchDaemons/ai.elier.celador.plist |
root:wheel 644 | RunAtLoad, KeepAlive SuccessfulExit=false (restarted after a crash, not after Quit), socket activation on /var/run/celador.sock, ProcessType=Interactive |
/Applications/Celador.app |
root:wheel 755 | the menu bar app (Developer ID signed if you have an identity, else ad-hoc) |
/Library/LaunchAgents/ai.elier.celador-tray.plist |
root:wheel 644 | starts the app at login in every account with --login |
/usr/local/share/celador/catalog.json |
root:wheel 644 | what Celador knows about common software; replaced by every update |
/usr/local/bin/tidy |
root:wheel 755 | optional: a copy of tidy (see below), so every account has it |
/Library/Application Support/Celador/ |
root:admin 750 | the data folder: config.json (root:admin 640), the record, events, verdicts, the profile, the suspended list, the off flag |
/var/run/celador.sock |
root:admin 660 | the socket |
Update is the same command. It stops the app and the daemon (the daemon writes its clean-stop record on launchd's SIGTERM; anything Celador suspended stays suspended and the new daemon re-checks it), replaces the binaries, the app, the plists and the catalog, keeps config.json and all state, and starts everything again.
Uninstall runs celador quit first, so anything Celador suspended is
resumed, then unloads the daemon and the app, and removes the binaries, the
app, both plists, the catalog, the socket, and /usr/local/bin/tidy only if
it still has the hash the install recorded. It keeps the data folder unless
you pass --purge.
Quit and start. celador quit (or Quit Celador in the menu) resumes what
Celador suspended, writes an off flag and exits; launchd restarts neither the
daemon nor the app after a clean exit, and both stay down across restarts.
celador start, or opening Celador.app, wakes the daemon through the socket
(socket activation) with no password.
Approved leftovers of removed apps are handed to tidy, a separate
disk-cleanup tool, as tidy paths add <path> --mode once --reason <text> --source celador, run as the account that owns the path. The install copies
tidy from $TIDY_BIN or ~/.local/bin/tidy when it exists and has the
paths command; without it, approved leftovers simply wait. The contract is
in SPEC.md "Tidy's outside-paths list".
celador status # health, Celador's own health, emergency mode and state, suspended groups
celador doctor # the checkup: every area, unknowns named
celador findings [--level debug|info|warning|error] [--closed]
celador events [--since 2h] [--level ...]
celador top [--since 30m] # top processes from the record
celador record [--since 30m] [--md]
celador postmortem [--last | --list]
celador act <id> force-quit | disable | re-enable | ignore | snooze [1h|24h] | recheck
celador act <id> resume <group> | force-quit <group> # a group Celador suspended
celador ignore ['check|program|user|label'] # no argument: list them
celador chronic # usual-but-unhealthy conditions
celador act <c-id> ignore | not-normal # a chronic entry: known (off the list) or warn again
celador inventory [--tier typical|probably_okay|iffy|wtf] [--md] # everything running and set to start, by tier
celador act <id> normal | not-normal # your verdict on a finding or an inventory item
celador review [--tier iffy] [--again] # Review with Claude: one run over the unknown and iffy items
celador verdicts [--stale] · celador verdict revoke <id>
celador suggestions # housekeeping: startup items, unused apps, leftovers
celador act <id> approve | dismiss # a suggestion (approve: confirmed ones only)
celador ask <id> [--fix | --available] # Ask Claude about a finding; --fix: Fix with Claude
celador pause [1h|tomorrow|until-resumed] · celador resume · celador quit · celador start
The menu bar app offers the same actions. Force quit and moving an app to the Trash open a one-item confirm submenu instead of a dialog, so nothing takes focus.
/Library/Application Support/Celador/config.json, root:admin 640: every
configured account can read it, only root can write it. Every setting has a
compiled-in default; the file holds only what you changed. No CLI or socket
command changes it, and Claude never does (a fix that needs a config change is
written out as the exact command). You change it with sudo:
sudo /usr/local/libexec/celadord set-config emergency.mode act # checks key and value, writes the file in one step
sudo /usr/local/libexec/celadord check-config # is the file valid
/usr/local/libexec/celadord print-config # every default
or by editing the file. The daemon applies a valid change within a few seconds without a restart and records it in events.log; an invalid file keeps the last good config and shows "config.json not applied: (why)". Ignores, snoozes, pause, verdicts and the suspended list are state, changed over the socket, not config.
Every key, its default and what it means: docs/config.md
(generated from crates/core/src/config.rs by scripts/gen_config_doc.py).
emergency.mode is off, observe or act. The install uses observe: a
confirmed emergency is detected, recorded and shown with the groups act
would have force quit or suspended, and nothing is signalled. Switch to act
only when all of these hold (SPEC.md "Gates"):
- The emergency decision table and false-positive tests pass (
cargo test), and live tests 7 (emergency with injected signals and sacrificial processes) and 15 (the screen signal) pass. - The installed daemon has run 7 days in
observe. An update that changes the emergency code (EMERGENCY_REVincrates/core/src/emergency.rs) restarts the count;celador statusshows the days counted. - True-positive evidence: a real suspected or confirmed emergency recorded in
observewhose record shows the decision was right, or your explicit decision to switch without one.
Then: sudo /usr/local/libexec/celadord set-config emergency.mode act.
Celador was built on a Mac running an always-on AI agent gateway, and the
incident showed that a wedged gateway still accepts TCP connections. The
gateway check (on by default, gateway_enabled; harmless when no gateway
runs) targets Hermes Agent's gateway (an open-source
agent framework): an HTTP GET 127.0.0.1:8642/health must answer within 2 s, and the
heartbeat file ~/.hermes/state/gateway.heartbeat (rewritten from the
gateway's event loop every 30 s) must be younger than 90 s while the process
lives. Twice failing in a row opens "Hermes gateway alive but not responding
since HH:MM". It is never acted on and is never an emergency signal. The port,
paths, process match and log globs are all config keys.
cargo build && cargo test
cargo build --release
target/release/celadord run --dev --data-dir /tmp/celdev # dev daemon, no root; socket in the data dir
target/release/celador --dev-dir /tmp/celdev status
scripts/live_tests.py all # live tests against a dev daemon (cleans up after itself)
scripts/live_app.py states|t15|quit|hero|budget [M] # menu bar app tests (user's own GUI domain)
scripts/test-install.sh # install and uninstall dry-run checks
scripts/budget_scenarios.py <scenario> [minutes] # the budget measurements below
target/release/celadord groups # contributor groups as formed right now (read-only)
Dev mode only ever force quits or suspends processes the test harness started
and registered (celador dev register <pid>); emergency signals are injected
with celador dev inject <memory|cpu|screen|starved|reports|record> on|off.
No test hangs the Mac or signals a process it didn't start.
The menu can be checked without clicking: Celador --snapshot OUTDIR [--prefix p-] [--dev-dir D | --state FILE] renders the icon (light and dark)
and the open menu, plus the whole tree expanded, to PNG offscreen.
scripts/build-app.sh builds the app bundle without Xcode.
The targets are in SPEC.md "Hard constraints". These are the measurements on the development Mac (macOS 27, 18 cores, 64 GB, about 800 to 1,400 processes). Misses are shown with their cause; no target was changed to make a number pass.
Method: each scenario runs its own daemon after a 60 s warm-up. CPU is
user+system time over wall time, as % of one core, read from outside with
proc_pid_rusage every 5 s (the root daemon: its own cpu_ms, read every
60 s). Footprint is ri_phys_footprint. Latency covers every sample in the
window.
Daemon, dev mode (unprivileged), 30 minutes (5-minute runs for log storm and slow client):
| scenario | sampling | CPU | footprint avg / peak | process tick p50 / p95 | system sample p95 |
|---|---|---|---|---|---|
| normal: idle use | 5 s / 15 s | 0.089% | 7.2 / 8.75 MB | 6.2 / 13.9 ms | 0.41 ms |
| warning: a live-check warning open | 2 s / 2 s | 0.46% | 7.1 / 8.6 MB | 6.7 / 13.9 ms | 0.34 ms |
| log stream on, the daemon alone | 5 s / 15 s | 0.085% | 7.2 / 8.8 MB | 5.6 / 13.9 ms | 0.34 ms |
the log stream child itself |
1.23% | 2.7 MB | |||
| log storm: 2,500 ERROR lines/s, 59 MB | 2 s once the spike opened | 0.20% | 7.5 / 8.6 MB | 5.5 / 11.3 ms | 0.36 ms |
| slow client: 200 requests/s, never reads | 5 s / 15 s | 1.65% | 8.1 / 10.5 MB | 5.6 / 12.4 ms | 0.24 ms |
Daemon, installed as root, normal sampling, about 1,400 processes all measurable: 0.146% of one core, footprint ~10.8 MB (peak 11.2 MB idle), process tick p95 ~18 ms (the process sample alone 13 to 15 ms; the system sample 0.4 ms). In warning mode (2 s sampling) as root: 0.58 to 0.88%.
Celador.app, idle, 30 minutes, menu closed, pinged every 10 s: 0.019% of one core (0.14 wakeups/s), footprint 12.1 / 12.2 MB (resident 72 MB). With the panel (2026-11-25, 10 minutes, panel closed, dev daemon with 38 open findings): 0.0175% of one core (105 ms CPU in 602 s, 0.28 wakeups/s, all of it the pings), footprint 13.6 MB average, 14.0 MB peak. The panel has no timers and keeps nothing while closed; it was not measured open (it is only ever opened by a click).
Celador.app with a real Mac's state (2026-11-27). The installed app
(c4d9bc0) read 52 MB 20 s after login and 59 MB after 23 h; on 2026-11-27,
an hour after login, libproc read 41.3 MB footprint, 19.7 MB resident. In dev
mode, against a dev daemon restored from a copy of the installed state.json
(21 open findings; an inventory of 1,219 items, 568 KB of JSON), the app
idles at 11.8 MB. After 40 panel and menu open/close cycles, driven
offscreen with --test-cycle (nothing on screen), c4d9bc0's app code kept
24.2 MB (peak 38 MB; live heap 11.0 MB, because the whole inventory and
the filled menu stayed after the menu closed). Since card 6b it keeps
19.4 MB (peak 29 MB, with the test's offscreen render; live heap 5.7 MB):
once the panel and the menu are both closed, the app drops the panel's
window, the menu's items, the inventory and the Chronic list, and it asks for
the 25 inventory rows per tier the menu shows (per_tier), not the whole
list. The rest is malloc fragmentation and AppKit's one-time text and control
caches. The installed 41 to 59 MB was not reproduced in dev; a panel window
on a real screen (its backing store) can't be measured offscreen, so the
number to trust is footprint on the installed app after the update.
| target (SPEC) | result |
|---|---|
| daemon, normal: < 0.1% of one core | pass unprivileged (0.089%); miss as root (0.146%), because as root it also measures the other users' processes an unprivileged daemon can't read |
| daemon: < 4 MB footprint | miss: 7.2 MB unprivileged, ~10.8 MB as root |
| daemon: sample p95 < 5 ms | miss for the process tick (13.9 ms dev, ~18 ms root); pass for the system sample (0.4 ms) |
| log stream child: < 0.5% | miss (1.23%; 4.4% in an earlier 10-minute run), so log_stream ships off |
| menu bar app: 0% idle, < 30 MB | footprint passes in dev with a real Mac's state (11.8 MB idle, 19.4 MB after heavy use); the installed c4d9bc0 read 41 to 59 MB, to re-measure after the 6b update; CPU is not literally 0 (see below) |
| log storm and slow client stay bounded | pass: the storm log was skipped and counted, every slow client was dropped at its 1 MB buffer |
Causes of the misses:
- Footprint. The kinfo_proc table buffer (~650 KB), two process tables, malloc small-zone fragmentation, Foundation and IOKit data pages (~0.3 MB), today's profile accumulator (~1.5 MB for ~820 program-user pairs), the catalog, per-file signal cache and last tier pass (~1 MB), and housekeeping state (~0.5 MB). The live heap is about 3.2 MB of the 7.2. A warm process sample allocates nothing.
- Process tick p95. The process sample alone is 6.7 ms unprivileged (it reads every new process's path and, every 40th sample, thread and open-file counts); the rest is the launchd job list every 4th tick (~3 ms, one IPC round trip), the profile fold and the checks.
- Warning mode costs about 5x normal, so only a live resource warning (or a suspected emergency) switches to 2 s sampling. An early build sped up for any warning and sat at 0.58% all day on three warnings about launchd jobs whose program was gone, which faster sampling can't change.
- The app answers the daemon's ping every 10 s with a WindowServer query, about 1.8 ms of CPU per ping. That is the cost of the screen signal.
Other costs: a housekeeping pass takes 1.2 to 3 s wall and 0.5 to 1.4 s CPU
on the helper thread (about 44,000 entries walked, ~70 apps), plus ~45 ms in
helper processes (mdls, launchctl). Binary sizes (release, arm64):
celadord 1.8 MB, celador 654 KB, Celador.app 836 KB.
- Contributor groups.
proc_pidinfo(PROC_PIDCOALITIONINFO)is readable for every process, any user, unprivileged, and is the grouping for almost everything (681 of 696 groups in one sample): apps with their XPC helpers, and VMs, whose memory sits in Apple'scom.apple.Virtualization.VirtualMachineunder /System (never signalled) in the same coalition aslimactl. Coalitions owned by a terminal, multiplexer, remote shell or launcher (osascript) are split by process tree, stopping at shells, so eachnpxdev server under a shell is its own group. The responsible process is used when a process has no coalition; path + user is the fallback for lone orphans.celadord groupsprints the current grouping. - A VM's configured memory. For a VM process, the coalition names the VM;
colima's
colima.yamland Lima'slima.yamlmemory:and Docker Desktop'sMemoryMiBsetting give its guest size. A VM up to that size plusvm_margin_mbis neither a hog nor a leak: a guest fills its allotment with page cache. Files are read only when the hog or leak rule would otherwise fire, only if they are regular files owned by the VM's owner, at most 256 KB, cached. - Local model servers. A catalog entry with
model_server(Ollama, MLX LM) names a local model server, matched by program path or, for an interpreter, its command (uv'stools/mlx-lm/bin/python). Each process is decided once per catalog load, and only once it is big enough for the hog or leak rule. While memory pressure is normal such a process opens neither; at warn or critical the usual rules apply. - JetsamEvent kill reasons. Each report is a JSON header line plus a JSON
body; killed entries in
processes[]carry"reason". System memory reasons (jetsam_memory_reasons):low-swap,vm-pageshortage,vm-thrashing,fc-thrashing,vnode-limit,zone-map-exhaustion,vm-compressor-space-shortage.per-process-limitandidle-exitare not distress (info). The unit tests use small copies of real reports, ids zeroed. - Shutdown stalls. macOS writes a shutdownStall report whenever processes
are still exiting about 2 s into a shutdown. With clean-stop evidence it is
a slow shutdown, not a crash. A crash report whose termination is launchd's
SIGTERM timeout (
XPC_EXIT_REASON_SIGTERM_TIMEOUT) is launchd stopping a service, recorded at debug: iOS simulator teardowns produce hundreds. - New-process rate. From the pid of the newest live process at each process sample (pids are handed out in order and wrap from 99,999 to 100), divided by the time between samples. A lower bound.
- Power.
IOPSGetProvidingPowerSourceTypeand-[NSProcessInfo isLowPowerModeEnabled], polled every 30 s, recorded on change. Thermal pressure from thecom.apple.system.thermalpressurelevelnotify key works unprivileged. - The screen ping. The app answers only after
CGWindowListCopyWindowInforeturns, on a query thread, one at a time, 8 s timeout. On this macOS a status item's window has no CGWindowID in the window list, so the query returns an empty list; it is still a full request/reply to WindowServer (asampleof the app shows SkyLight'sSLWindowListCopyWindowInfowaiting inmach_msg2_trap). - kinfo_proc layout (for pgid and the nohup mark): size 648,
p_flagat 32,p_sigignoreat 232,e_pgidat 564,e_tdevat 572. - Unprivileged, the kernel refuses CPU and memory for other users' processes; they are counted as not measurable, never zero. As root the same code reads them.
| crate | used by | why |
|---|---|---|
libc |
daemon, CLI, core | the kernel APIs: sysctl, proc_pidinfo/proc_pid_rusage/proc_pidpath/proc_pidfdinfo, kqueue, host_statistics64, statfs, getutxent, getpeereid (csops is declared by hand) |
tinyjson |
daemon, CLI, core, app | the one small JSON crate, no dependencies of its own: config, catalog, the socket protocol, events, state files |
objc2 |
app | Objective-C runtime messaging for AppKit, with checked class and selector use |
objc2-foundation, objc2-app-kit |
app | typed bindings for the NSStatusItem, its panel (an NSPanel of labels, buttons, image views and one view drawn with NSBezierPath) and NSMenus, the icon, the offscreen snapshot; default features off |
objc2-encode, objc2-core-foundation, dispatch2, bitflags |
app (pulled in by the objc2 crates) | dependencies of the objc2 crates; not used directly |
No sysinfo, tokio or other async runtime, clap, tauri, winit, tao or
tray-icon. The daemon links IOKit and CoreFoundation (the power source) and
Foundation through the Objective-C runtime (Low Power Mode), +128 KB of
footprint. All unsafe code is in crates/core/src/ffi/ (and the app's own
crates/app/src/ffi.rs, plus the AppKit calls objc2 marks unsafe in the
app's ui.rs, panel_ui.rs and render.rs), each block with a SAFETY
comment.
| crate in this workspace | what |
|---|---|
celador-core |
everything that decides: FFI wrappers, sampling, the record, checks, findings, groups, the emergency decision, sessions and postmortems, config, protocol |
celadord |
the daemon: the event loop, I/O and helper threads, the socket server |
celador |
the CLI |
celador-app |
the menu bar app |
celador-testproc |
sacrificial processes for the live tests (never installed) |
MIT. See LICENSE.





