feat: lit/content-create with Divi short form

New input divi (1-30 sections, short form like lit-divi-insert) builds a Divi 5
layout in one divi/placeholder. The whole description is checked before the
insert (Divi's map for "no entry yet"); the draft is inserted with its normal
WordPress fields only, then DiviContentComposer composes again bound to the new
entry and stores it via DiviSaver::saveNew (same kses window as save(), strict
DiviFlags). A refusal or failure deletes the draft. Result adds tree_rev and the
outline.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 16:46:50 +02:00
co-authored by Claude Opus 5.5
parent 3efcfaabec
commit 5965e32acb
12 changed files with 861 additions and 23 deletions
@@ -7,6 +7,7 @@ namespace LIT\MCP\Tests\Unit\Integrations\Divi;
use LIT\MCP\Abilities\Ability;
use LIT\MCP\ChangeLog\ChangeLog;
use LIT\MCP\Integrations\Divi\DiviIntegration;
use LIT\MCP\Integrations\Divi\Pages\DiviContentComposer;
use LIT\MCP\Integrations\WordPress\Schema\ContentSchema;
use LIT\MCP\Tests\Unit\TestCase;
use Mockery;
@@ -44,4 +45,14 @@ final class DiviIntegrationTest extends TestCase
self::assertNotNull($ability->outputSchema(), $ability->name());
}
}
public function testGivesContentCreateTheDiviShortForm(): void
{
$integration = new DiviIntegration(Mockery::mock(ContentSchema::class), Mockery::mock(ChangeLog::class));
$composer = $integration->contentComposer();
self::assertInstanceOf(DiviContentComposer::class, $composer);
self::assertFalse($composer->available(), 'no Divi classes in unit tests');
}
}