mirror of
https://github.com/penpot/penpot.git
synced 2026-11-05 01:20:38 +00:00
The backend rejects a save after the call that made the changes has returned, and the workspace then undoes them. A plugin, or the MCP agent, went on working with shapes that were no longer there and never learned why. The rollback event now names the files that lost commits and the pages and page shapes their changes touched, and plugins get it as the new `contentrollback` event (`ContentRollback` type) through a subscription to the store stream, so no rollback is dropped by debouncing. The MCP plugin keeps the rollbacks it is told about and sends them with its next task response, failed or not. The server collects them per tool call and puts a warning first in that tool's response, naming what was affected; the instructions tell the agent to read the pages again and redo what is missing.
Penpot plugin-types
The @penpot/plugin-types package provides TypeScript type definitions for the Penpot Plugin API, making it easier to develop plugins for the Penpot design platform with full type safety and IDE support. It streamlines the development process by ensuring that your code is well-typed and less prone to errors.
Getting started
Installation
To add penpot's plugin-types to your project, use the following command:
npm install @penpot/plugin-types
Configuration
To ensure the typings work correctly in your project, update your tsconfig.json as follows:
"typeRoots": [
"./node_modules/@types",
"./node_modules/@penpot"
],
"types": ["plugin-types"],
Learn more
For more information on how to build plugins using the Penpot PLugin API, refer to the official documentation. You can also explore practical examples in the samples repository to see real-world implementations.