Skip to main content

weavatrix_refactor_plan/
lib.rs

1#![forbid(unsafe_code)]
2#![doc = include_str!("../README.md")]
3
4mod canonical;
5mod code;
6mod conversion;
7mod error;
8mod evidence;
9mod evidence_validation;
10mod extension;
11mod fingerprint;
12mod limits;
13mod metadata;
14mod operation;
15mod parser;
16mod path;
17mod structure;
18mod validation;
19
20pub use code::{ScopeKind, StatusCode, SubjectKind, UncertaintyCode, WarningCode};
21pub use conversion::{
22    attach_annotations, detach_annotations, extract_annotations, replace_annotations,
23};
24pub use error::{PlanError, PlanErrorCode};
25pub use evidence::{
26    CompletenessProof, EvidenceScope, GraphRevision, NotModified, PlanAnnotations, PlanEvidence,
27    PlannerIdentity, TypedSubject, UncertainReference,
28};
29pub(crate) use fingerprint::fingerprint_validated;
30pub use fingerprint::{
31    FINGERPRINT_ALGORITHM, FingerprintParseError, PlanFingerprint, canonical_plan_bytes,
32    canonical_plan_bytes_with_limits, fingerprint_plan, fingerprint_plan_with_limits,
33};
34pub use limits::{PlanStats, RefactorPlanLimits};
35pub use operation::{
36    CreateFile, CreatePermissions, DeleteFile, REFACTOR_PLAN_SCHEMA, RefactorOperation,
37    RefactorPlan, RenameFile,
38};
39pub use parser::parse_refactor_plan;
40pub use path::{portable_path_key, validate_plan_path};
41pub use validation::{
42    ValidatedConsumerPlan, ValidatedExecutorPlan, ValidatedPlannerPlan, ValidatedRefactorPlan,
43    validate_consumer_plan, validate_executor_plan, validate_planner_plan,
44};
45
46/// Direct access to the lower-level edit crate for advanced consumers.
47pub use weavatrix_edit;
48pub use weavatrix_edit::{
49    ApplyLimits, BatchLimits, BorrowedFileEdit, Completeness, EDIT_PLAN_SCHEMA, EditError,
50    EditPlan, EditValidationStats, ErrorCode, FILE_EDIT_RESERVED_EXTENSION_KEYS, FileEdit,
51    LineIndexLimits, MAX_PLAN_OPERATION_BYTES, PlanLimits, Position, PositionEncoding, Provenance,
52    TextEdit, TextRange, ValidatedEditPlan, WriteSummary, apply_edits_with_limits,
53    prepare_edits_with_limits, validate_edit_plan, validate_file_edits,
54};
55
56/// This crate's package version.
57pub const VERSION: &str = env!("CARGO_PKG_VERSION");