feat: adapter-level Divi release lock, content-create and site status
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -7,8 +7,10 @@ namespace LIT\MCP\Integrations\Divi\Library;
|
||||
use LIT\MCP\Abilities\WriteFailed;
|
||||
use LIT\MCP\Integrations\Divi\Release\Call;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviAdapter;
|
||||
use LIT\MCP\Integrations\Divi\Release\DiviLocked;
|
||||
use LIT\MCP\Integrations\Divi\Release\Manifest;
|
||||
use LIT\MCP\Integrations\Divi\Release\Mirror;
|
||||
use LIT\MCP\Integrations\Divi\Release\ReleaseGate;
|
||||
use LIT\MCP\Integrations\WordPress\Content\NewDraft;
|
||||
use RuntimeException;
|
||||
use Throwable;
|
||||
@@ -211,9 +213,11 @@ class DiviLibraryStore implements DiviAdapter
|
||||
* when that delete fails; a throwing insert hook is a partial write without ID.
|
||||
*
|
||||
* @throws WriteFailed
|
||||
* @throws DiviLocked When Divi is not released (spec §5.5) – before anything is written.
|
||||
*/
|
||||
public function create(LibraryItemSpec $spec, NewDraft $draft): int
|
||||
{
|
||||
ReleaseGate::assertWritable();
|
||||
$missing = $this->missingTaxonomies();
|
||||
if ($missing !== []) {
|
||||
throw WriteFailed::rolledBack(
|
||||
|
||||
Reference in New Issue
Block a user