- Rust nightly, because
.cargo/config.tomluses nightly hardening flags. - Node.js 18+ for npm package checks and
install.js. - Linux x86-64 or arm64.
Install Rust with:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
-y --profile minimal --default-toolchain nightly \
--component rustfmt --component clippyThen:
. "$HOME/.cargo/env"cargo fmt --check
cargo clippy -- -D warnings
cargo test
cargo build --release
node --check scripts/install/install.js
python3 -m json.tool package.json >/dev/null
python3 -m json.tool integrations/lobehub/lhm.plugin.json >/dev/nullCommand-backed handlers respect two safety mechanisms:
"dry_run": truein MCP params returns a command/action preview without mutating the host.AETHER_MOCK_COMMANDS=1makes command-backed handlers returnMOCK: ...instead of executing binaries. This is used bytests/mock_action_tests.rs.
Example:
{
"action": "install",
"params": {
"package": "curl",
"dry_run": true
}
}Build first:
cargo buildThen run:
python3 scripts/smoke_stdio.pyThe script sends newline-delimited JSON-RPC messages to target/debug/aether-mcp-server. The server should respond to:
initializetools/listtools/callwith a safe read-only action such assystem_info/uptime
- stdout must remain JSON-RPC only.
- Use stderr for tracing and audit logs.
- Do not use
bash -c,sh -c, or interpolated command strings for tool actions. - Prefer direct Linux APIs:
/proc,/sys,nix,libc, DBus. - If a CLI is unavoidable, use
Command::new(program).args([...]). - Destructive actions require
force: true. - Kernel/system-dangerous actions require
.envfeature gates. - Every unsafe block must have a
// SAFETY:comment.
| File | Scope |
|---|---|
tests/config_tests.rs |
Feature gate defaults and env parsing |
tests/error_tests.rs |
Error formatting and helper behavior |
tests/integration_tests.rs |
Public API smoke tests |
tests/tool_dispatch_tests.rs |
Tool names, destructive action error shape, gate checks |