Implement the shared installation workflow (ADR 0013). sys install, sys ask install and the explicit backend flags all use one path: identify -> evidence -> AI investigation -> deterministic validation/effects -> review -> approval -> execute -> verify -> history. - phoebus-ai::install: bounded, multi-turn investigation. The model may request typed read-only evidence (discover_candidates, inspect_candidate, check_backend, inspect_installation), ask one bounded question about intent, and must return a structured InstallProposal. Turn/request/size limits and repeated-request detection bound it; a rejected proposal is revised. - phoebus-core: add the four read-only investigation actions and strict validators; add a transaction id; backend/kind wire names now match as_str. - phoebus-executor::install: resolve_explicit (no model, no fallback), resolve_deterministic and resolve_with_ai; validate_proposal re-resolves the candidate against real metadata, rejects fabrication/ambiguity/staleness/ duplicates, maps it to the existing broker action, and binds approval to a digest; revalidate + verify_installed. chooser gains per-lane friendly-name resolution and structured evidence. - transaction::begin/finish record an in-progress transaction before mutation. - sys: --portage/--flatpak/--nix/--snap/--appimage/--ebuild (mutually exclusive) bypass the model; an unqualified install consults the model and, with none, prints the deterministic selection and installs nothing. - The installer persists /etc/phoebus/install.toml; sys loads it and adds free space, Wayland, usable lanes, saved preferences and recovery capability to the bounded facts. - Docs: ADR 0013, docs/SYS.md install sections and cases 23-31, CHANGELOG, STATUS, HANDOFF, ROADMAP. New live-VM workflow check script. Host gates pass: fmt, clippy (no new warnings), workspace tests, make test. VM: verified the workflow CLI and read-only investigation on the reference LiveGUI ISO; a full target install journey is running (see HANDOFF).
48 lines
1.1 KiB
Rust
48 lines
1.1 KiB
Rust
//! Phoebus executor: privileged, deterministic system operations.
|
|
//!
|
|
//! Every external command goes through the `Exec` context, which centralises
|
|
//! logging, redaction and dry-run. Destructive operations require a
|
|
//! `DestructiveAuthorization` token produced only after explicit confirmation.
|
|
|
|
pub mod actions;
|
|
pub mod admin;
|
|
pub mod ai;
|
|
pub mod appimage;
|
|
pub mod auth;
|
|
pub mod boot;
|
|
pub mod chooser;
|
|
pub mod command;
|
|
pub mod desktop;
|
|
pub mod ebuild;
|
|
pub mod encryption;
|
|
pub mod error;
|
|
pub mod exec;
|
|
pub mod install;
|
|
pub mod kernel;
|
|
pub mod live_nvidia;
|
|
pub mod log;
|
|
pub mod nix;
|
|
pub mod opencode;
|
|
pub mod opencode_client;
|
|
pub mod opencode_server;
|
|
pub mod portage;
|
|
pub mod probe;
|
|
pub mod rollback;
|
|
pub mod sandbox;
|
|
pub mod services;
|
|
pub mod snap;
|
|
pub mod snapshot;
|
|
pub mod stage3;
|
|
pub mod storage;
|
|
pub mod sys_runtime;
|
|
pub mod transaction;
|
|
pub mod update;
|
|
pub mod users;
|
|
|
|
pub use auth::{authorize, AutoConfirm, Confirmation, DenyConfirm, DestructiveAuthorization};
|
|
pub use command::{
|
|
CommandOutput, CommandSpec, NeverRunner, ProcessRunner, RealRunner, RecordingRunner,
|
|
};
|
|
pub use error::{ExecError, Result};
|
|
pub use exec::Exec;
|
|
pub use log::Logger;
|