Wire
Wire renders, previews, applies, inspects, and rolls back runtime configuration as a confirmation-gated transaction.
python3 scripts/mlx-agent wire render <repo> --target mlx_lm --path ./provider.json
python3 scripts/mlx-agent wire apply <repo> --target mlx_lm --path ./provider.json
python3 scripts/mlx-agent wire apply <repo> --target mlx_lm --path ./provider.json --confirm --preview-hash <hash>
python3 scripts/mlx-agent wire status <receipt>
python3 scripts/mlx-agent wire rollback <receipt> --confirm --preview-hash <hash>Targets
ollama (exact Modelfile), lmstudio / mlx_lm / mlx-vlm (JSON provider blocks), and litellm (bounded YAML subset). Model IDs are constrained to safe publisher/model form; resolved secrets are rejected before any write.
The transaction
- Preview — unified diff, secret scan of before and after, per-target
preview_hashbinding the exact bytes. - Confirm —
--confirm --preview-hashmust match the reviewed preview or the apply fails stale. - Apply — advisory locks, per-target backups, atomic replace, post-validation, optional loopback health check. Any mid-mutation failure auto-restores.
- Receipt — hashes, backups, and validations recorded for status and byte-exact rollback.
Wire never writes unowned files, never resolves secrets into configs, and never touches remote endpoints — health checks are loopback-only with state-changing paths banned.