feat: StoredNodeGuard keeps S7/S26 for nodes moving between posts (E6)

Refuses, for users without unfiltered_html, non-Divi blocks, raw text parts,
unreadable opaque blocks, code modules, builder-only paths (also below the
state value), strings that are not sanitizer-stable and stored $variable
references that VariableRef::canonical() refuses or would change (P2, P3).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-27 01:42:26 +02:00
co-authored by Claude Opus 5.5
parent b7c714939d
commit f8275ad325
6 changed files with 620 additions and 1 deletions
@@ -10,6 +10,7 @@ use LIT\MCP\Integrations\Divi\Compose\LinkTargets;
use LIT\MCP\Integrations\Divi\Compose\MediaResolver;
use LIT\MCP\Integrations\Divi\Compose\Placeholders;
use LIT\MCP\Integrations\Divi\Compose\ShortformWriter;
use LIT\MCP\Integrations\Divi\Compose\StoredNodeGuard;
use LIT\MCP\Integrations\Divi\Compose\StructureRules;
use LIT\MCP\Integrations\Divi\Compose\TreeEditor;
use LIT\MCP\Integrations\Divi\Compose\ValueCleaner;
@@ -118,6 +119,12 @@ class DiviComposition
return new StructureRules($this->modules->catalog());
}
/** E6: the check for stored nodes that move into this composition's entry (same cleaner and references). */
public function storedGuard(): StoredNodeGuard
{
return new StoredNodeGuard($this->cleaner(), $this->references(), $this->sanitizer);
}
public function editor(): TreeEditor
{
return new TreeEditor($this->rules());