Introduces the shared on-disk schema that all binaries (CLI, daemon,
registry) will load from `~/.config/maestro/config.toml`. Sections:
[shared] registry_url, token — consumed by 2+ binaries
[cli] cookie
[daemon] daemon_id, hostname, daemon_url, bind_addr, state_dir, worktree_root
[registry] bind_addr
Exposes:
- MaestroConfigFile { shared, cli, daemon, registry } with strict load,
load-or-default, atomic save, and per-section empty-table suppression.
- default_config_path() / resolve_config_path() honoring MAESTRO_CONFIG.
- derive_daemon_ws_url() for the daemon's scheme-swap + /daemon suffix
off the shared http(s):// base URL.
- ConfigError::MissingFile with a hard-cutover message pointing the user
at `maestrod configure` (legacy paths are no longer read).
Consumers wired in follow-up commits.
40 lines
1.3 KiB
TOML
40 lines
1.3 KiB
TOML
[workspace]
|
|
resolver = "2"
|
|
members = ["crates/*"]
|
|
|
|
[workspace.package]
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
license = "MIT"
|
|
repository = "https://git.naps.pt/naps62/maestro"
|
|
publish = false
|
|
|
|
[workspace.dependencies]
|
|
axum = { version = "0.7", features = ["ws"] }
|
|
chrono = { version = "0.4", default-features = false, features = ["clock", "serde"] }
|
|
clap = { version = "4.5", features = ["derive", "env"] }
|
|
dirs = "5"
|
|
futures-util = { version = "0.3", default-features = false, features = ["sink", "std"] }
|
|
jsonwebtoken = { version = "9", default-features = false }
|
|
libc = "0.2"
|
|
maestro-config = { path = "crates/maestro-config" }
|
|
maestro-protocol = { path = "crates/maestro-protocol" }
|
|
nix = { version = "0.29", default-features = false, features = ["term", "signal"] }
|
|
rand = "0.8"
|
|
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls", "cookies"] }
|
|
rust-embed = "8"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
tempfile = "3"
|
|
thiserror = "1"
|
|
tokio = { version = "1", features = ["macros", "rt-multi-thread", "sync", "time", "net", "io-util", "fs", "signal", "process"] }
|
|
tokio-tungstenite = "0.21"
|
|
toml = "0.8"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
|
|
uuid = { version = "1", features = ["v4", "serde"] }
|
|
|
|
[profile.release]
|
|
lto = "thin"
|
|
codegen-units = 1
|