mirror of
https://github.com/penpot/penpot.git
synced 2026-11-18 16:12:24 +00:00
* 🐛 Make execute_code wait for save before success * 🐛 Address review feedback on waitForSave Reject with an Error carrying a `code`: save-timeout, rolled-back, save-retrying, or the failure code (save-failed by default). Lower the default timeout from 90s to 60s, leaving room for the 30s layout wait and the code under the MCP tool timeout. When persistence is already in error at the start of the wait, keep the stored failure code, and tell a failure Penpot keeps retrying apart from one that needs the file reopened. Share timeout validation with waitForLayoutUpdate through app.plugins.utils, and make reject-not-valid reject with an Error, which also fixes the string rejections of connectLibrary, restore, remove, pin, export, findVersions and saveVersion. The MCP execute_code handler now waits for the save only when the workspace is ready, like the layout wait, so dashboard calls no longer fail on a save error from an earlier file. Move the waitForSave tests to frontend-tests.plugins, add tests for the error codes, the retrying state and a failure during the wait, and add plugin API suite and MCP handler tests. Update the docs, CHANGELOG and the generated API files. AI-assisted-by: claude-opus-5-5
Penpot MCP Plugin
This project contains a Penpot plugin that accompanies the Penpot MCP server. It connects to the MCP server via WebSocket, subsequently allowing the MCP server to execute tasks in Penpot using the Plugin API.
Setup
-
Install Dependencies
pnpm install -
Build the Project
pnpm run build -
Start a Local Development Server
pnpm run startThis will start a local development server at
http://localhost:4400.