1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Evidence-backed refactor operations for Weavatrix.
//!
//! This crate is to [`weavatrix_rust`] what a writer is to a reader: it consumes the read-only
//! evidence graph and produces `weavatrix.edit-plan.v1` envelopes, then applies them through
//! [`weavatrix_worktree`]'s crash-recoverable transaction. It owns no protocol; the MCP host
//! (`weavatrix-refactor`) composes this catalog with the read-only one.
//!
//! # The contract is frozen, not re-derived
//!
//! The eleven tool names, their schemas and every result state were recorded from the shipping
//! JavaScript implementation into `contract/refactor-tools.v1.json`. An operation here is
//! conformant when it answers with a status from that file — never a new one, never a renamed
//! one. That is what makes this an incremental replacement rather than a second protocol.
//!
//! # Safety boundary
//!
//! Producing a plan is a read. Applying one requires all three gates: the host exposes the edit
//! capability, `WEAVATRIX_ALLOW_SOURCE_EDITS=1` is set, and the call presents a single-use token
//! bound to that exact plan and repository. Nothing in this crate writes without them.
/// Version of this crate, reported by the host beside the engine version.
pub const VERSION: &str = env!;
/// Version of the frozen tool contract this crate implements.
pub const CONTRACT_VERSION: u32 = 1;
pub use ;
pub use ;