atomiechen/dmon
Manage background tasks and local service stacks for developers and coding agents, with inspectable process state across sessions.
Change Log
All notable changes to dmon will be documented in this file.
The format is based on Keep a Changelog.
[0.5.0] - 2026-10-04
Added
-
Add explicit
dmon stack repair STACK TASKfor live foreground/detached supervisors. Preserve healthy members, reuse the retained launch environment, wait for replacement readiness, and include the replacement in later cleanup. Run-scoped operation IDs support rechecking uncertain client outcomes. -
Add optional
ready.require_ownedfor literal-loopback HTTP/TCP probes. Stack startup and configured waits verify a task or descendant listener and reportlistener-unverifiedwhen ownership cannot be confirmed. -
Retain observed descendant process identities in stack records, allowing cleanup after a parent exit followed by a supervisor crash. Structured task snapshots expose verified
live_descendant_pids. -
Add a portable local-service setup and handoff skill under
skills/dmon. The skill is installed separately from the CLI.
Fixed
-
Anchor new task and stack metadata/log paths before resolution on Windows Python 3.8, so missing parent directories cannot produce relative ownership records that later reject their own location.
-
Preserve shell command quoting when launching the log-rotation runner, including quoted executable paths and arguments containing spaces.
-
Retry transient Windows metadata read permission errors for a bounded period; persistent errors and invalid ownership records remain failures.
-
Preserve and reject runtime records with missing or invalid PID/creation-time identities instead of reporting stale cleanup success or raising a traceback.
-
Keep the failing task and startup/readiness cause in detached stack status after rollback, instead of replacing them with a generic supervisor error. Report a missing inherited PATH when environment replacement prevents launch.
-
Return concrete task-start errors through the silent Python API.
-
Identify the executable when Windows launch errors omit its filename, without including command arguments in the added diagnostic.
-
Handle environment-file errors during readiness as startup failures, with cleanup and detailed diagnostics kept out of persisted status.
-
Reject copied or moved task/stack metadata with a location diagnostic before it can inspect or control the original run. Preserve the record and processes; accept symlink aliases of the original location and legacy stack paths.
-
Preserve metadata and report incomplete cleanup for unverified residual POSIX process-group members, instead of silently reporting success. Refuse to overwrite stale task metadata while those residual processes remain.
-
Recheck task identity and cancellation after a successful readiness probe.
-
Preserve foreground stack ownership records when cleanup is incomplete.
[0.4.0] - 2026-08-08
Added
- Add
dmon stack upfor supervised stacks with dependency ordering, readiness probes, attached foreground logs, runtime degradation reporting, optional fail-fast behavior, and automatic cleanup. - Add HTTP, TCP, and command readiness probes.
- Add detached stack supervision with
dmon stack up -d, detailed status and listing, anddmon stack down. - Add detached stack restart with
dmon stack restart. - Add read-only stack log snapshots and following with
dmon stack logsanddmon stack logs -f. - Make foreground stacks discoverable through
dmon stack statusanddmon stack list, and safely stoppable from another terminal withdmon stack down. - Add a silent, structured Python API through
from dmon import Dmonfor task lifecycle and task/stack inspection. - Add
--format jsonto finite task and stack status/list commands. - Add
dmon waitandDmon.wait()for configured task readiness, plus direct HTTP, TCP, and command waits with finite JSON results. - Add config-relative
env_fileloading with ordered layering, dotenv expansion, explicit precedence, and support across task, stack, wait, and Python API workflows.
Fixed
- Publish start reservations only after their JSON is complete, so concurrent starts never observe a partially written metadata file.
- Retry transient Windows permission errors while atomically replacing metadata that another process is reading.
- Keep configured environment values and environment-file paths out of process metadata and structured inspection output.
[0.3.1] - 2026-08-07
Added
- All paths in the config file are relative to the config file location, and the command will be executed in the config file directory as well. This allows more flexible usage such as running
dmonfrom anywhere with--configpointing to another directory, or running from a subdirectory, which will search for config file in parent directories. - Add
-calias of--configoption for shorter command line usage. - Add automated tests on Linux, macOS, and Windows, including Python 3.8 compatibility.
- Add opt-in backup counts for task and runner logs; archives remain unlimited when omitted.
Fixed
- Stop the complete child process tree instead of leaving descendants running when the parent exits quickly.
- Report missing executables without a Python traceback and summarize partial multi-task start failures.
- Reserve and update metadata atomically to prevent concurrent duplicate starts and corrupted partial writes.
- Treat zombie and exited processes as stopped, return a failing status for exited tasks, and clean stale metadata safely.
- Resolve explicit
stopandstatustask metadata relative to the selected config file. - Allow ad-hoc
dmon runoutside a directory containing a dmon config file. - Accept child-command options in
dmon runwith or without a--separator. - Deliver Ctrl-C only once to foreground tasks run with
dmon exec. - Use one consistent, cross-platform timestamp format for task and runner log archives.
[0.3.0] - 2026-01-09
Added
- Multiple task names support for
start,restart,stop, andstatuscommands --allflag forstart,restart,stop, andstatuscommands to operate on all tasks
Changed
stopandstatuscommands can combine task names,--meta-file, and (newly added)--allflag simultaneously
[0.2.4] - 2025-12-16
Added
- Config
log_max_sizeandrotate_log_max_sizenow support float values representing size in MB.
[0.2.3] - 2025-10-25
Added
- Add
default_taskkey to config to specify the default task to run when no task name is provided. --confignow supports specifying a directory to search in, not just a file path.- Add
python-dmonas CLI alias in addition todmonfor better package name consistency.
Fixed
- Fix
--confignon-existing path
[0.2.2] - 2025-10-09
Fixed
execuse full path for the executable on windows whenshell=False- One pass searching for both
dmon.y(a)mlandpyproject.tomlwhen going up the directory tree. The previous behavior will search fordmon.y(a)mlfirst, then if not found, start over and search forpyproject.toml. - Fix "AttributeError: 'DmonMeta' object has no attribute 'name'" when listing processes (should be
taskinstead ofname)
[0.2.1] - 2025-10-09
Added
- Support
--configoption to specify custom config file path - Add
execsubcommand to run task in the foreground (maybe for test or debug purpose) - CLI now prints version information
Changed
- Rename
namekey totask(task name) in meta files and rename any other related variables in the codebase.
[0.2.0] - 2025-10-08
Changed
Change distribution name from dmon to python-dmon to pass PyPI name allowance check.
[0.1.0] - 2025-10-07
Added
Initial release of dmon, a lightweight and handy daemon manager for running and managing background processes.