AttractorEx.Agent.ApplyPatch (attractor_phoenix v0.1.0)

Copy Markdown View Source

Applies apply_patch v4a-style filesystem updates against a local execution environment.

The implementation is intentionally conservative. It supports add, delete, update, and move operations using the appendix-style patch envelope and verifies update hunks against current file contents before writing changes.

Summary

Types

operation_result()

@type operation_result() :: %{operation: String.t(), path: String.t()}

Functions

apply(env, patch)

@spec apply(term(), String.t()) :: {:ok, [operation_result()]} | {:error, String.t()}