Expand description
Deterministic post-edit actions: bounded indentation normalization for inserted/replaced code and host-provided formatter/validator hooks. These actions are tool-scoped; there are no session-level watcher loops.
Structs§
- Post
Edit Diagnostic - Post
Edit Hooks - Post
Edit Outcome - Post
Edit Validator - Host-provided validator callback: receives
(path, content)and returns structured diagnostics. The attached policy decides whether diagnostics warn or block the edit.
Enums§
Functions§
- normalize_
inserted_ indentation - Bounded indentation normalization for inserted/replaced multiline code.
- run_
post_ edit_ hooks - Run the optional formatter then validators over the edited content for one path. Formatter failures become diagnostics and leave content unchanged; validator behavior follows each validator’s policy.
Type Aliases§
- Formatter
Hook - Host-provided formatter callback: receives
(path, content)and returnsOk(Some(formatted))to replace the content,Ok(None)to leave it unchanged, orErrfor a formatter failure (reported as a diagnostic, never silently swallowed).