mirror of
https://github.com/penpot/penpot.git
synced 2026-10-31 06:50:33 +00:00
The server refuses to send a task to a plugin whose last heartbeat is older than 30 s, taking its tab for frozen. The plugin sent heartbeats only from a 10 s timer, and Chrome runs the timers of a hidden page as rarely as once a minute: without Energy Saver after about a minute hidden, and at once with it. A Penpot tab hidden for a minute therefore failed that check about half the time, although it could run tasks. Chrome handles socket messages of a hidden page at once, and a frozen page cannot handle them at all. The server now sends each plugin a heartbeat request every 10 s, and the plugin answers it with a heartbeat, so the heartbeat age again tells a frozen tab from a hidden one. The plugin keeps its timer, so it still sends heartbeats to a server that does not ask. A plugin that does not know the request passes it to the plugin code, which ignores it.
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.