pub struct Plan {
pub version: u32,
pub cwd: Option<String>,
pub write_policy: Option<WritePolicyOverride>,
pub strict: Option<bool>,
pub operations: Vec<Operation>,
pub format: Option<Vec<FormatStep>>,
pub validate: Option<Vec<ValidationStep>>,
pub verify: Option<Vec<VerifyCheck>>,
pub for_each: Option<ForEach>,
}Expand description
A transaction plan containing multiple operations to execute atomically.
Fields§
§version: u32Schema version. Defaults to 1 when omitted.
cwd: Option<String>Optional re-root for relative operation paths and lifecycle steps.
Relative values resolve from the invocation / MCP server workspace root
(not from the plan file location). Example: "fixtures/complex" with
op path "config.json" targets fixtures/complex/config.json.
On MCP, use a relative path that stays inside the server workspace;
absolute path strings and ../ escapes are rejected. Do not combine
with for_each on any surface (glob expansion uses the invocation cwd;
combining with plan.cwd double-prefixes {path}). Use
workspace-relative {path} templates without cwd instead.
CLI and library callers may use absolute paths when PathGuard policy
allows them (still without for_each).
write_policy: Option<WritePolicyOverride>§strict: Option<bool>When omitted from the plan, defaults to strict mode at execution time.
operations: Vec<Operation>Operations to run. Accepts alias ops (common agent shorthand).
format: Option<Vec<FormatStep>>§validate: Option<Vec<ValidationStep>>§verify: Option<Vec<VerifyCheck>>Pre/post-operation symbol verification checks.
for_each: Option<ForEach>Glob-driven batch: expand operations once per matching file.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Plan
impl<'de> Deserialize<'de> for Plan
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for Plan
impl JsonSchema for Plan
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for Plan
impl RefUnwindSafe for Plan
impl Send for Plan
impl Sync for Plan
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Plan
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more