<!-- entire-trail-link-start -->
https://entire.io/gh/jdx/mise/trails/819
<!-- entire-trail-link-end -->
Internal change: the daemon declaration loader, ports, urls, presets,
prune, providers, and the supervisor runtime (about 10k lines) become
the `mise-daemons` crate. Behavior is unchanged.
Daemons are tied to mise's toolsets more tightly than the other splits,
so this PR separates what only describes and runs daemons from what
drives mise's config and toolsets, and moves the first group:
- **In `mise-daemons`:** the `[daemons]`, `[daemons_settings]`, and
`[daemon_groups]` loader (`load`) and `DaemonSet`, ports, hostnames and
urls, the preset engine, the preset registry itself
(`registry/daemon-presets/*.toml` moved to
`crates/mise-daemons/presets/`, with its build-time validation moved
into the crate's `build.rs`), prune, providers, and the supervisor
runtime.
- **Staying in `src/daemons/`:** `glue` (resolving and installing a
project's tools for its daemons, plus `DaemonSetExt` for the toolset
requests, exported env entries, and task validation that need mise's
types), the `mise daemons providers` and `resource` commands, task
daemons, and the hook-env integration. `mise::daemons` re-exports the
crate, so existing `crate::daemons::…` paths still resolve.
The crate reaches mise only through `daemons::host`: a view of the
loaded config files, config discovery and trust checks, and three
function-level entries (`global_runtime`, `install_provider_tools`,
`provider_tool_paths`) for the tool resolution a provider needs. mise
registers it at startup from `daemons::glue`. Callers outside the crate
convert a real `ConfigMap` with `glue::view_map`, or call `glue::load`.
Tests: the 165 tests that do not need mise's config run in the crate,
against a stand-in host that parses the daemon tables from a config body
and keeps its own trust list. The 13 that do (tool requests, exported
env entries, and `paranoid` trust) moved to `src/daemons/glue_tests.rs`
and still run in mise.
Stacked on #14582. `release-plz` publishes `mise-daemons` after
`mise-oci`; it depends only on `mise-settings` and `mise-util`.
## Validation
- `cargo clippy --workspace --all-features --all-targets -- -D warnings`
is clean.
- `cargo check --workspace --all-targets` passes on Linux and
`x86_64-pc-windows-gnu`.
- `cargo test -p mise -p mise-daemons --lib`: 3057 pass in mise and 165
in mise-daemons, one failure in mise
(`has_linked_version_ignores_mise_managed_absolute_targets`, which fails
on `main` in this sandbox). Together they account for the same tests as
before the split.
- I did not run the daemon e2e tests, which need pitchfork.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
*AI-assisted — Tool: Claude Code; model: anthropic/claude-sonnet-5-5;
version: claude-code_2-1-299_agent.*
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Large module move across process supervision, config loading, and
preset codegen with host injection; behavior is intended to be unchanged
but integration regressions in experimental `[daemons]` are plausible.
>
> **Overview**
> **Extracts daemon logic into a workspace crate** `mise-daemons`, so
declaration loading, ports, URLs, presets, providers, prune, and the
supervisor runtime live outside the main `mise` binary while CLI
integration stays behind `src/daemons/glue` and `pub use
mise_daemons::*`.
>
> Daemon preset TOMLs move from `registry/daemon-presets/` to
`crates/mise-daemons/presets/`, and **build-time preset
embedding/validation** moves from the root `build.rs` into
`crates/mise-daemons/build.rs` (root `build.rs` no longer generates
`daemon_presets.rs`). The workspace adds the `mise-daemons` member and
dependency; packaging drops the old registry preset path from the main
crate `include` list.
>
> The crate talks to mise only through **`daemons::host`**: config-file
views, discovery/trust hooks, and async hooks for global runtime and
provider tool install/path resolution (registered from glue at startup).
Config loading now calls **`glue::load`** instead of in-tree
`daemons::load`; task daemon validation uses
**`glue::config_for_root`**.
>
> Docs/tooling paths update (`AGENTS.md`, `.taplo.toml` preset schema
include). Port helpers in the crate use **`mise_util`** (e.g. git
worktree detection, hashing) instead of main-crate modules.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
9ebc43b369. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added daemon provider commands for listing, starting, stopping, and
restarting providers, as well as managing shared resources.
* Added support for daemon configuration, runtime setup, and provider
tools through the app’s existing configuration and tool-management
workflows.
* Added validation for daemon preset files, with errors identifying
invalid configuration.
* **Refactor**
* Reorganized daemon management into a separate package while preserving
its integration with the app.
* **Documentation**
* Updated architecture and build documentation to cover the daemon
package.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
33 lines
623 B
TOML
33 lines
623 B
TOML
# Taplo configuration for mise
|
|
|
|
exclude = ["docs/settings.toml"]
|
|
|
|
|
|
[formatting]
|
|
align_entries = false
|
|
align_comments = false
|
|
array_auto_collapse = true
|
|
array_auto_expand = true
|
|
indent_tables = false
|
|
reorder_keys = false
|
|
|
|
[[rule]]
|
|
include = ["registry/*.toml"]
|
|
schema.path = "./schema/mise-registry-tool.json"
|
|
|
|
[rule.formatting]
|
|
reorder_keys = true
|
|
reorder_arrays = false
|
|
|
|
[[rule]]
|
|
include = ["settings.toml"]
|
|
schema.path = "./schema/mise-settings.json"
|
|
|
|
[rule.formatting]
|
|
reorder_keys = true
|
|
reorder_arrays = false
|
|
|
|
[[rule]]
|
|
include = ["crates/mise-daemons/presets/*.toml"]
|
|
schema.path = "./schema/mise-daemon-preset.json"
|