@pinepaper.studio/mcp-server 1.6.8 → 1.6.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.de.md +1 -1
- package/README.es.md +1 -1
- package/README.fr.md +1 -1
- package/README.hi.md +1 -1
- package/README.ja.md +1 -1
- package/README.ko.md +1 -1
- package/README.md +207 -7
- package/README.pt-BR.md +1 -1
- package/README.zh-CN.md +1 -1
- package/dist/agent/export-manager.d.ts.map +1 -1
- package/dist/agent/export-manager.js +5 -3
- package/dist/agent/export-manager.js.map +1 -1
- package/dist/browser/index.d.ts +1 -1
- package/dist/browser/index.d.ts.map +1 -1
- package/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/puppeteer-controller.d.ts +86 -2
- package/dist/browser/puppeteer-controller.d.ts.map +1 -1
- package/dist/browser/puppeteer-controller.js +271 -63
- package/dist/browser/puppeteer-controller.js.map +1 -1
- package/dist/cli.js +12 -0
- package/dist/cli.js.map +1 -1
- package/dist/design/design-systems.d.ts +105 -7
- package/dist/design/design-systems.d.ts.map +1 -1
- package/dist/design/design-systems.js +210 -16
- package/dist/design/design-systems.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +94 -6
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/engine-methods.d.ts.map +1 -1
- package/dist/tools/engine-methods.js +2 -0
- package/dist/tools/engine-methods.js.map +1 -1
- package/dist/tools/engine-surface.d.ts +30 -0
- package/dist/tools/engine-surface.d.ts.map +1 -0
- package/dist/tools/engine-surface.js +1188 -0
- package/dist/tools/engine-surface.js.map +1 -0
- package/dist/tools/handlers/font.d.ts.map +1 -1
- package/dist/tools/handlers/font.js +77 -10
- package/dist/tools/handlers/font.js.map +1 -1
- package/dist/tools/handlers.d.ts +16 -0
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +329 -12
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/minimal-descriptions.d.ts.map +1 -1
- package/dist/tools/minimal-descriptions.js +2 -1
- package/dist/tools/minimal-descriptions.js.map +1 -1
- package/dist/tools/toolkits.d.ts.map +1 -1
- package/dist/tools/toolkits.js +1 -0
- package/dist/tools/toolkits.js.map +1 -1
- package/dist/types/code-generator.d.ts +10 -0
- package/dist/types/code-generator.d.ts.map +1 -1
- package/dist/types/code-generator.js +437 -87
- package/dist/types/code-generator.js.map +1 -1
- package/dist/types/schemas.d.ts +119 -74
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +62 -6
- package/dist/types/schemas.js.map +1 -1
- package/manifest.json +5 -1
- package/package.json +5 -2
package/README.de.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Der PinePaper MCP-Server lässt KI-Assistenten über das Model Context Protocol Grafiken in [PinePaper Studio](https://pinepaper.studio) erstellen und animieren. Funktioniert mit jeder KI, die MCP-Tool-Aufrufe unterstützt (Claude, GPT, Gemini, lokale Modelle usw.).
|
|
16
16
|
|
|
17
|
-
Der Server bietet **
|
|
17
|
+
Der Server bietet **152 Tools**: Zeichnen, Animation, Diagramme, Karten, Typografie, Physik, Bildbearbeitung, Datenvisualisierung und Export:
|
|
18
18
|
|
|
19
19
|
- Text, Formen, Geometrie und komplexe Grafiken erstellen
|
|
20
20
|
- Mit deklarativen **Relationen** animieren statt mit Keyframes
|
package/README.es.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
El servidor MCP de PinePaper permite a los asistentes de IA crear y animar gráficos en [PinePaper Studio](https://pinepaper.studio) a través del Model Context Protocol. Funciona con cualquier IA que soporte llamadas a herramientas MCP (Claude, GPT, Gemini, modelos locales, etc.).
|
|
16
16
|
|
|
17
|
-
Expone **
|
|
17
|
+
Expone **152 herramientas**: dibujo, animación, diagramas, mapas, tipografía, física, edición de imágenes, visualización de datos y exportación:
|
|
18
18
|
|
|
19
19
|
- Crear texto, formas, geometría y gráficos complejos
|
|
20
20
|
- Animar con **relaciones** declarativas en lugar de fotogramas clave
|
package/README.fr.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
Le serveur MCP PinePaper permet aux assistants IA de créer et d'animer des graphiques dans [PinePaper Studio](https://pinepaper.studio) via le Model Context Protocol. Compatible avec toute IA gérant les appels d'outils MCP (Claude, GPT, Gemini, modèles locaux, etc.).
|
|
16
16
|
|
|
17
|
-
Il expose **
|
|
17
|
+
Il expose **152 outils** : dessin, animation, diagrammes, cartes, typographie, physique, retouche d'image, visualisation de données et export :
|
|
18
18
|
|
|
19
19
|
- Créer du texte, des formes, de la géométrie et des graphiques complexes
|
|
20
20
|
- Animer avec des **relations** déclaratives plutôt que des images clés
|
package/README.hi.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
PinePaper MCP सर्वर AI असिस्टेंट्स को Model Context Protocol के ज़रिए [PinePaper Studio](https://pinepaper.studio) में ग्राफ़िक्स बनाने और एनिमेट करने देता है। MCP टूल कॉलिंग वाले किसी भी AI (Claude, GPT, Gemini, लोकल मॉडल आदि) के साथ काम करता है।
|
|
16
16
|
|
|
17
|
-
सर्वर **
|
|
17
|
+
सर्वर **152 टूल** देता है — ड्रॉइंग, एनिमेशन, डायग्राम, नक्शे, टाइपोग्राफ़ी, फिज़िक्स, इमेज एडिटिंग, डेटा विज़ुअलाइज़ेशन और एक्सपोर्ट:
|
|
18
18
|
|
|
19
19
|
- टेक्स्ट, आकृतियाँ, ज्यामिति और जटिल ग्राफ़िक्स बनाना
|
|
20
20
|
- कीफ़्रेम की जगह व्यवहार बताने वाले **रिलेशन** से एनिमेशन
|
package/README.ja.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
PinePaper MCP サーバーは、MCP 経由で AI アシスタントが [PinePaper Studio](https://pinepaper.studio) 上にグラフィックを作成・アニメーションさせるためのサーバーです。MCP ツールコールに対応した AI(Claude、GPT、Gemini、ローカルモデルなど)で動作します。
|
|
16
16
|
|
|
17
|
-
**
|
|
17
|
+
**152 個のツール**を提供 — 描画・アニメーション・図・地図・タイポグラフィ・物理・画像編集・データ可視化・エクスポート:
|
|
18
18
|
|
|
19
19
|
- テキスト、図形、ジオメトリ、複雑なグラフィックの作成
|
|
20
20
|
- キーフレームではなく、ふるまいを宣言する**リレーション**でアニメーション
|
package/README.ko.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
PinePaper MCP 서버는 AI 어시스턴트가 MCP를 통해 [PinePaper Studio](https://pinepaper.studio)에서 그래픽을 만들고 애니메이션하게 해줍니다. MCP 툴 콜을 지원하는 모든 AI(Claude, GPT, Gemini, 로컬 모델 등)와 호환됩니다.
|
|
16
16
|
|
|
17
|
-
**
|
|
17
|
+
**152개의 툴** 제공 — 드로잉, 애니메이션, 다이어그램, 지도, 타이포그래피, 물리, 이미지 편집, 데이터 시각화, 내보내기:
|
|
18
18
|
|
|
19
19
|
- 텍스트·도형·기하·복잡한 그래픽 생성
|
|
20
20
|
- 키프레임 대신 행동을 선언하는 **릴레이션**으로 애니메이션
|
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
PinePaper MCP Server enables AI assistants to create and animate graphics in [PinePaper Studio](https://pinepaper.studio) via the Model Context Protocol (MCP). Works with any AI that supports MCP tool calling (Claude, GPT, Gemini, local models, etc.).
|
|
27
27
|
|
|
28
|
-
The server exposes **
|
|
28
|
+
The server exposes **152 tools** across drawing, animation, diagrams, maps, typography, physics, image editing, data visualization, and export. Using natural language, you can:
|
|
29
29
|
|
|
30
30
|
- Create geometric shapes, text collages, diagrams, and data charts
|
|
31
31
|
- Apply 37+ character-level text effects and 28+ vertex deformation presets
|
|
@@ -36,7 +36,7 @@ The server exposes **151 tools** across drawing, animation, diagrams, maps, typo
|
|
|
36
36
|
|
|
37
37
|
## Running it: local or hosted
|
|
38
38
|
|
|
39
|
-
**Local is free and complete.** Every one of the
|
|
39
|
+
**Local is free and complete.** Every one of the 152 tools works when you run
|
|
40
40
|
this server yourself. There is no reduced tier and nothing held back.
|
|
41
41
|
|
|
42
42
|
What it needs:
|
|
@@ -57,9 +57,18 @@ install one, or your machine cannot spare the browser.
|
|
|
57
57
|
|
|
58
58
|
Hosting costs money, so the hosted option is paid — it runs on credits. See
|
|
59
59
|
[cloud.pinepaper.studio](https://cloud.pinepaper.studio) for current pricing. Run it
|
|
60
|
-
locally if you can, but it is not identical
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
locally if you can, but it is not identical, and the differences run both ways.
|
|
61
|
+
|
|
62
|
+
The hosted service runs a tested set of LLMs, repairs generated code before it
|
|
63
|
+
reaches the canvas — which a local server structurally cannot do for itself —
|
|
64
|
+
and **encodes video server-side**, in an ffmpeg container that owns the job
|
|
65
|
+
durably. Locally, an export runs in your own browser: it needs Chrome and
|
|
66
|
+
Puppeteer, it is bounded by your machine, and a long render occupies that
|
|
67
|
+
browser for its duration.
|
|
68
|
+
|
|
69
|
+
What the local server has instead is the whole tool surface. Tools that need
|
|
70
|
+
the editor's UI — selection, drag-and-drop, mode toggles — work here against a
|
|
71
|
+
visible browser and are excluded from headless operation. Which model to trust is a
|
|
63
72
|
question you can answer yourself rather than take on trust: a benchmark runs one
|
|
64
73
|
prompt across several models and puts the results side by side, any run
|
|
65
74
|
shareable. It is in invite-only beta.
|
|
@@ -208,6 +217,186 @@ If you do not want an agent executing anything, `code` mode is a first-class pat
|
|
|
208
217
|
- Puppeteer mode launches Chrome with `--no-sandbox` and `--disable-setuid-sandbox`. That is routine for headless automation and it does weaken Chrome's own process sandbox. If that matters where you are running it, use `code` mode or put the server in a container.
|
|
209
218
|
- Puppeteer itself is an **optional** peer dependency, kept out of the default tree precisely because a headless browser plus an install script is what scanners flag hardest. Install it only if you want the executing mode.
|
|
210
219
|
|
|
220
|
+
## What's new in 1.6.10
|
|
221
|
+
|
|
222
|
+
### Fixed: the nine diagram tools called an object that does not exist
|
|
223
|
+
|
|
224
|
+
Every diagram tool — shapes, connectors, ports, auto-layout, diagram mode — called `app.diagramManager`, which has never existed in the studio. All nine failed with "Cannot read properties of undefined", which read as "diagrams are broken" when the studio side was fine. Fixed, along with three argument bugs behind it: shape type is passed separately from its config, `add_ports` takes a port-type name, and auto-layout takes items rather than ids and is awaited.
|
|
225
|
+
|
|
226
|
+
`update_connector` now applies colour and width directly and **refuses the rest by name**, pointing you at remove-and-recreate. It previously reported success over a connector it had not changed.
|
|
227
|
+
|
|
228
|
+
### Fixed: six of sixteen font actions
|
|
229
|
+
|
|
230
|
+
`set_name`, `get_required_chars`, `get_status`, `create_space` and `export` all called renamed methods and failed. `show_studio` now says plainly that opening the panel has no engine entry point — the other fifteen actions work without it.
|
|
231
|
+
|
|
232
|
+
### Fixed: local image files, and errors that say why
|
|
233
|
+
|
|
234
|
+
`pinepaper_import_image` now accepts a **local file path** (absolute, relative, or `file://`) as well as http(s) and data URLs. A browser page cannot open `file://`, so the server reads the file and hands the page the data.
|
|
235
|
+
|
|
236
|
+
Remote failures now report the reason — HTTP status, refused connection, or a URL that returned a web page instead of an image — instead of a bare "Failed to load image from URL".
|
|
237
|
+
|
|
238
|
+
### Fixed: tools could report success when the work failed
|
|
239
|
+
|
|
240
|
+
Any tool whose underlying operation failed could return success with the error buried in the payload. A failed operation is now an error. This is the general form of the export fix in 1.6.9, and it covers every tool.
|
|
241
|
+
|
|
242
|
+
### Fixed: tools failed when called immediately after connecting
|
|
243
|
+
|
|
244
|
+
Map, physics, rigging, sprite-sheet and Lottie tools could report the studio as too old for a capability it has, if called within the first second or so of connecting. They now wait for the relevant subsystem to finish loading.
|
|
245
|
+
|
|
246
|
+
### Fixed: `pinepaper_batch_modify`
|
|
247
|
+
|
|
248
|
+
It passed item ids in the field meant for live items, so every modification was rejected, and then misread the result as a list. It now reports how many items changed and names any it skipped, with the reason.
|
|
249
|
+
|
|
250
|
+
### Fixed: rigging bone angles were read as radians
|
|
251
|
+
|
|
252
|
+
`add_bone` and inline poses document degrees, and the solver read the number as radians — so a documented 90° came out as 90 radians and characters came apart on the first pose. Angles are now converted.
|
|
253
|
+
|
|
254
|
+
Two things the tool never told you, now in its description: a bone angle is **relative to its parent**, and a bone has no position — it starts at its parent's tip, so length and angle are what place it.
|
|
255
|
+
|
|
256
|
+
### Fixed: `pinepaper_precomp` and `pinepaper_import_mermaid`
|
|
257
|
+
|
|
258
|
+
`precomp` passed ids where live items were required, and now names any id that does not resolve instead of quietly leaving it out. `import_mermaid` returned raw canvas objects that could not be serialised, so a working import reported a failure; it now returns ids, labels and bounds — and an import that creates nothing is no longer reported as a success.
|
|
259
|
+
|
|
260
|
+
### Letter-collage animation works again
|
|
261
|
+
|
|
262
|
+
The animation type was discarded on every call (fixed in 1.6.9) and the studio was skipping the relation that drives it. Both halves are in place. **Needs a studio build from 2026-09-20 or later.**
|
|
263
|
+
|
|
264
|
+
### Responses are ~90% smaller on batch work
|
|
265
|
+
|
|
266
|
+
A successful tool call no longer reads your own request back to you. On a 50-item batch create that was 8,740 characters of echoed source against 983 characters of actual result — and it grew with every item you spelled out, which is what made enumerating through tools far more expensive than writing the equivalent loop.
|
|
267
|
+
|
|
268
|
+
The generated code is still returned where it is the point: `PINEPAPER_EXECUTION_MODE=code`, and every error, which carries the code as evidence. `PINEPAPER_ECHO_CODE=1` restores it everywhere if you are debugging.
|
|
269
|
+
|
|
270
|
+
### `pinepaper_execute_custom_code` documents the traps
|
|
271
|
+
|
|
272
|
+
Writing JavaScript opts out of the schema protection tool callers get, and six engine behaviours fail silently when you do: `app.create` returns a numeric Paper.js id where everything else wants the `item.data.registryId` string, an unknown item type creates nothing, `addAnimation` ignores a JSON-string argument and an unresolvable id, keyframes live at `item.data.keyframes`, and `transformOrigin` is ignored so rotation always pivots on the item centre. All six are now in the tool description.
|
|
273
|
+
|
|
274
|
+
### Three routes you had to find by reading source
|
|
275
|
+
|
|
276
|
+
- **Text that changes over time.** `content` *is* keyframeable, and it holds rather than tweening — `pinepaper_keyframe_animate` now says so, and points at the cheaper route for a cascade. For a word cascade it points at `app.textSequence(item, words, { interval })`: one item cycling its words in one call, instead of one item per word with opacity tracks faking the cut.
|
|
277
|
+
- **Does this survive export?** Answered once, as a rule rather than a per-tool label: if it ticks inside the engine's update loop, it exports — loop animations, relations, keyframes, generators and camera moves all do. Anything driven by the wall clock outside that loop does not. And if exported frames look frozen, check the sampling first: a loop at speed 1 has a one-second period, so frames a whole second apart are identical by design.
|
|
278
|
+
- **Bone angles** are sent as degrees *and* radians, so the studio reads the units you meant rather than inferring them.
|
|
279
|
+
|
|
280
|
+
### Fixed: tools called just after connecting could find a subsystem missing
|
|
281
|
+
|
|
282
|
+
Two different races wore the same symptom, and only one of them was already handled.
|
|
283
|
+
|
|
284
|
+
Some subsystems are code-split and arrive about a second after boot; those are now waited for **by name**, which matters because the studio's bulk loader deliberately never fails — waiting on it meant "the prefetch finished", not "the thing I need is here". Others, like Font Studio, are built during startup itself, so no amount of module loading helps them; those now wait for the editor to finish initialising. Both waits are bounded and apply only to calls that actually touch such a subsystem.
|
|
285
|
+
|
|
286
|
+
### Fixed: unknown font axes were dropped before the studio saw them
|
|
287
|
+
|
|
288
|
+
`set_font_axes` declared the three standard axes and silently discarded anything else, so asking for an axis the tool didn't name reached the studio as an empty request — which then reported nothing rejected, and the tool reported success over axes that were never applied. Axes are passed through as written now; the studio says which it took and which it did not, including OpenType tags like `wght`. And nothing applied while something was rejected is an error rather than a success.
|
|
289
|
+
|
|
290
|
+
### `quality` no longer hides what it changes
|
|
291
|
+
|
|
292
|
+
`quality` sets three things: draft = 15fps/72dpi, standard = 30fps/150dpi, high = 60fps/300dpi. So asking for high doubled your frame count and render time against standard, with nothing saying so. That's now in the tool description, and `fps` is a parameter — as `scale` already was for resolution — so you can raise compression quality without also doubling the frames.
|
|
293
|
+
|
|
294
|
+
### Fixed: a batch could report success when an operation failed
|
|
295
|
+
|
|
296
|
+
`pinepaper_agent_batch_execute` wrapped each operation in try/catch and treated *not throwing* as succeeding. Most failures here do not throw — a missing preset, an unloaded subsystem, an unmet precondition all come back as a returned error — so the operation reported the problem correctly and the batch said the scene was built.
|
|
297
|
+
|
|
298
|
+
A failed operation now fails the batch, and the result **names which one and why**, so a failure in a sixty-operation batch does not mean reading sixty entries. `apply_effect` also discarded the engine's verdict entirely and returned its own; it passes failures through now.
|
|
299
|
+
|
|
300
|
+
### New: find out which fonts you can use
|
|
301
|
+
|
|
302
|
+
`pinepaper_font` gains three actions that answer questions the tool could not answer before:
|
|
303
|
+
|
|
304
|
+
- `list_available` — every font family the studio can render, optionally filtered by category, each marked with whether its file has loaded yet.
|
|
305
|
+
- `check` — is a family really there, and **can it draw your string**? Those are different questions: a font with four glyphs is installed and will still render most characters in a fallback face, and the second answer is the one that decides the pixels. Pass the text you mean to draw.
|
|
306
|
+
- `fallbacks` — which text items on the canvas are silently rendering in something other than the family they asked for.
|
|
307
|
+
|
|
308
|
+
The rest of that tool authors a typeface. These three are about using one, which previously had no answer short of reading the server's source.
|
|
309
|
+
|
|
310
|
+
`check` and `fallbacks` **need a studio build from 2026-09-20 or later** and say so plainly if yours is older; `list_available` works today.
|
|
311
|
+
|
|
312
|
+
### Fixed: `pinepaper_execute_custom_code` could not do anything asynchronous
|
|
313
|
+
|
|
314
|
+
Your snippet was wrapped in a synchronous function. A top-level `await` is a syntax error inside one, so any snippet that awaited something failed to parse — and async work started without `await` was simply dropped, with the tool reporting success before it happened.
|
|
315
|
+
|
|
316
|
+
That is the whole async half of the engine — export, image import, rigging bake, layout — unreachable from the one tool that exists for reaching what the other tools do not cover. Snippets now run in an async wrapper, so `await` works and the result is the resolved value.
|
|
317
|
+
|
|
318
|
+
### Fixed: rotation read back as 0 on a rotated item
|
|
319
|
+
|
|
320
|
+
`pinepaper_get_items`, `get_by_id` and `get_dimensions` reported `rotation: 0` for items that are visibly rotated. Creating an item with a rotation bakes the angle into its geometry, so the property really is 0 — and reporting that is why rotation got filed as broken against an engine that rotates correctly. All three now report the true angle.
|
|
321
|
+
|
|
322
|
+
### Under the hood
|
|
323
|
+
|
|
324
|
+
Every engine call this server emits is now checked against the studio's actual API before release, including calls made through sub-objects. That check found and fixed nine more dead calls beyond the ones reported, including one in the agent guide that was teaching a method that does not exist.
|
|
325
|
+
|
|
326
|
+
## What's new in 1.6.9
|
|
327
|
+
|
|
328
|
+
### New: `pinepaper_export_store`
|
|
329
|
+
|
|
330
|
+
Recover an export the studio is still holding, instead of re-rendering it.
|
|
331
|
+
|
|
332
|
+
- `list` — what is held: `{id, format, size, createdAt}`, newest first. IDs survive a page reload.
|
|
333
|
+
- `save` — page it out to a file and release it. Returns a `filePath`, and is safe to repeat.
|
|
334
|
+
- `release` — drop it without saving.
|
|
335
|
+
|
|
336
|
+
Reach for it when an export fails with `Failed to write data to data pipe` — that is the browser's transport, not the encoder, so the bytes are often already stored — or when an error names an `exportId`.
|
|
337
|
+
|
|
338
|
+
**Retention:** held exports last until released, or until a later export needs the space, and eviction drops the oldest first. Save or release each export before starting the next one.
|
|
339
|
+
|
|
340
|
+
### New: `scale` on `pinepaper_agent_export`
|
|
341
|
+
|
|
342
|
+
Render video at a fraction of the platform preset (`0.1`–`1`).
|
|
343
|
+
|
|
344
|
+
- `scale: 0.5` with `quality: "draft"` is a fast look-check before committing to a full render.
|
|
345
|
+
- Smaller frames also mean smaller files: the encoder derives its target from resolution, so this is the size control. There is no bitrate option.
|
|
346
|
+
- Video only (`mp4`/`webm`/`gif`) — passing it to `png`/`svg`/`pdf`/`wav` is rejected rather than ignored. Omitting it leaves exports exactly as before.
|
|
347
|
+
|
|
348
|
+
### New: `list_motion` on `pinepaper_design_system`
|
|
349
|
+
|
|
350
|
+
Returns each licensed design system's motion curves **and** its durations; previously only the curves were reachable. Durations come back in milliseconds and in seconds.
|
|
351
|
+
|
|
352
|
+
These are the design systems' motion scales — Material's duration ladder, and so on. Aesthetic styles such as `bauhaus_geometric` carry no motion data of their own, so pair a system's motion with a style.
|
|
353
|
+
|
|
354
|
+
### `list_styles` now returns style tokens
|
|
355
|
+
|
|
356
|
+
`pinepaper_design_system` `list_styles` returns each style's palette, background, font stacks, type sizes and variants, not just its name. Building in a style by hand no longer means reading the generator source to find its colours.
|
|
357
|
+
|
|
358
|
+
### Fixed: `compose` placed everything off-centre
|
|
359
|
+
|
|
360
|
+
`compose` positioned items by their top-left corner while the canvas positions by centre, so every composed scene was displaced and left-aligned headlines ran off the edge of the canvas. Composed scenes now land where the layout intends.
|
|
361
|
+
|
|
362
|
+
### Fixed: exports could report success while failing
|
|
363
|
+
|
|
364
|
+
`pinepaper_agent_export` could return success when the export itself had failed, so a failed render passed silently and a batch could lose chunks without saying so. A failed export is now an error, and names a recovery path when the failure looks like a transport problem.
|
|
365
|
+
|
|
366
|
+
### Fixed: long exports timed out at ten seconds
|
|
367
|
+
|
|
368
|
+
Video exports running longer than about ten seconds failed with a `PP_TIMEOUT` that looked like a problem with the scene.
|
|
369
|
+
|
|
370
|
+
- `PINEPAPER_EXPORT_TIMEOUT` sets the budget (default `300000` ms). For exports over five minutes, raise `PINEPAPER_TIMEOUT` to match.
|
|
371
|
+
- `PINEPAPER_GOVERNOR=off` is an escape hatch for older studio builds.
|
|
372
|
+
|
|
373
|
+
### Fixed: exports failed on a fresh session
|
|
374
|
+
|
|
375
|
+
Exporting immediately after connecting failed with a message blaming the studio's version. The export now waits for the studio's export subsystem to finish loading.
|
|
376
|
+
|
|
377
|
+
### Fixed: large exports could be left undeliverable
|
|
378
|
+
|
|
379
|
+
A read failure partway through paging a large export left the file unrecoverable. Reads now retry at a smaller size, and anything still held can be recovered with `pinepaper_export_store`.
|
|
380
|
+
|
|
381
|
+
### Fixed: connection failures behind proxies, and a false "ready"
|
|
382
|
+
|
|
383
|
+
Connecting could burn the full timeout against a studio that was already usable, and the connection had no configuration.
|
|
384
|
+
|
|
385
|
+
- `PINEPAPER_WAIT_UNTIL` — what a navigation waits for (default `domcontentloaded`; set `networkidle2` for the previous behaviour).
|
|
386
|
+
- `PINEPAPER_TIMEOUT` — navigation and readiness timeout in ms (default `30000`).
|
|
387
|
+
- `PINEPAPER_PROXY` — routes Chrome through a proxy, for origins that reject headless Chrome. Setting it also relaxes certificate checking, which an intercepting proxy requires.
|
|
388
|
+
|
|
389
|
+
Connections now wait for the studio's API rather than for its canvas library, so "connected" means tool calls will work.
|
|
390
|
+
|
|
391
|
+
### Fixed: `pinepaper_animate_letter_collage` ignored its animation type
|
|
392
|
+
|
|
393
|
+
The requested animation type was discarded on every call. **This fix also needs a studio update** — the other half is an engine change that has not shipped yet, so collage animation stays static until it does.
|
|
394
|
+
|
|
395
|
+
### Documentation
|
|
396
|
+
|
|
397
|
+
- **Rotation** — `pinepaper_create_item` documents `properties: { rotation: 45 }`, and that rotation is baked into the geometry, so reading `item.rotation` back returns `0`. Verify a rotation by geometry or pixels, not by re-reading the property.
|
|
398
|
+
- **Dense motion** — `pinepaper_keyframe_animate` points at cheaper routes before you author hundreds of keyframes: the `time_expression` relation for motion that is a function of time, `staggered_with` / `wave_through` for a whole group, and `pinepaper_execute_custom_code` for procedural scenes.
|
|
399
|
+
|
|
211
400
|
## What's new in 1.6.8
|
|
212
401
|
|
|
213
402
|
**Long-form export stops crossing the bridge as one string.** `pinepaper_agent_export` handed the bytes back as a base64 data URL. Two things were wrong with that and only one of them was a bug.
|
|
@@ -490,7 +679,7 @@ Fourteen new tools (121 → 135) and new actions across the surface — the rele
|
|
|
490
679
|
|
|
491
680
|
## Toolkits & Token Budget
|
|
492
681
|
|
|
493
|
-
|
|
682
|
+
152 tools is a lot of context. The server ships a **toolkit** system that serves only the tools a given client needs, plus a **verbosity** system that controls how long each tool description is.
|
|
494
683
|
|
|
495
684
|
**Toolkit profiles** (`PINEPAPER_TOOLKIT`):
|
|
496
685
|
|
|
@@ -695,7 +884,7 @@ Generate instruction/code pairs for LLM fine-tuning:
|
|
|
695
884
|
|
|
696
885
|
## Tools Reference
|
|
697
886
|
|
|
698
|
-
All
|
|
887
|
+
All 152 tools, grouped by the tag used for toolkit filtering.
|
|
699
888
|
|
|
700
889
|
### Canvas (`canvas`)
|
|
701
890
|
| Tool | Description |
|
|
@@ -936,6 +1125,7 @@ All 151 tools, grouped by the tag used for toolkit filtering.
|
|
|
936
1125
|
| `pinepaper_agent_batch_execute` | Execute multiple operations in batch |
|
|
937
1126
|
| `pinepaper_interchange` | Lottie, dotLottie, GLB, BVH, PNG sequence |
|
|
938
1127
|
| `pinepaper_agent_export` | Smart export with platform auto-detection |
|
|
1128
|
+
| `pinepaper_export_store` | Recover an export the studio is still holding — list, save to a file, or release |
|
|
939
1129
|
| `pinepaper_agent_analyze` | Analyze content for export recommendations |
|
|
940
1130
|
|
|
941
1131
|
### Browser (`browser`)
|
|
@@ -1197,6 +1387,16 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
|
|
|
1197
1387
|
| `PINEPAPER_METRICS_ENABLED` | Enable performance metrics tracking | `true` |
|
|
1198
1388
|
| `PINEPAPER_METRICS_RETENTION` | Max metrics to retain in memory | `1000` |
|
|
1199
1389
|
| `PINEPAPER_SCREENSHOT_MODE` | Screenshot mode (`on_request`/`always`/`never`) | `on_request` |
|
|
1390
|
+
| `PINEPAPER_WAIT_UNTIL` | What a navigation waits for (`load`/`domcontentloaded`/`networkidle0`/`networkidle2`) | `domcontentloaded` |
|
|
1391
|
+
| `PINEPAPER_TIMEOUT` | Navigation and readiness timeout, in ms | `30000` |
|
|
1392
|
+
| `PINEPAPER_PROXY` | Chrome `--proxy-server` value; also ignores certificate errors, for an intercepting proxy | unset |
|
|
1393
|
+
| `PINEPAPER_EXPORT_TIMEOUT` | Governor budget for an export run, in ms (raise `PINEPAPER_TIMEOUT` alongside it) | `300000` |
|
|
1394
|
+
| `PINEPAPER_GOVERNOR` | `off` runs code by raw eval — no governor report, no error codes, no seeded determinism | on |
|
|
1395
|
+
|
|
1396
|
+
Behind a proxy, or against a Studio with analytics or polling connections open,
|
|
1397
|
+
`networkidle2` may never settle: set `PINEPAPER_WAIT_UNTIL` only if you need the
|
|
1398
|
+
old behaviour back. Readiness does not depend on it — the connection waits for
|
|
1399
|
+
Studio's `app.create` either way.
|
|
1200
1400
|
|
|
1201
1401
|
### Performance Metrics
|
|
1202
1402
|
|
package/README.pt-BR.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
O servidor MCP do PinePaper permite que assistentes de IA criem e animem gráficos no [PinePaper Studio](https://pinepaper.studio) via Model Context Protocol. Funciona com qualquer IA que suporte chamadas de ferramenta MCP (Claude, GPT, Gemini, modelos locais etc.).
|
|
16
16
|
|
|
17
|
-
São **
|
|
17
|
+
São **152 ferramentas**: desenho, animação, diagramas, mapas, tipografia, física, edição de imagens, visualização de dados e exportação:
|
|
18
18
|
|
|
19
19
|
- Criar texto, formas, geometria e gráficos complexos
|
|
20
20
|
- Animar com **relações** declarativas em vez de keyframes
|
package/README.zh-CN.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
PinePaper MCP 服务器让 AI 助手通过 MCP 协议在 [PinePaper Studio](https://pinepaper.studio) 中创建和驱动图形动画。兼容任何支持 MCP 工具调用的 AI(Claude、GPT、Gemini、本地模型等)。
|
|
16
16
|
|
|
17
|
-
服务器提供 **
|
|
17
|
+
服务器提供 **152 个工具**,覆盖绘图、动画、图表、地图、排版、物理、图像编辑、数据可视化与导出:
|
|
18
18
|
|
|
19
19
|
- 创建文本、形状、几何图形与复杂图稿
|
|
20
20
|
- 用行为驱动的**关系(relations)**做动画,而不是逐帧关键帧
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-manager.d.ts","sourceRoot":"","sources":["../../src/agent/export-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EAEd,eAAe,EACf,oBAAoB,EAC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AAE;IA0BzD;;OAEG;IACH,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,eAAe,GAAG,YAAY;IAU7E;;OAEG;IACH,kBAAkB,CAChB,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,YAAY,EACpB,OAAO,GAAE;QAAE,OAAO,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,CAAA;KAAO,GACxD,MAAM;IA4BT;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAkB7B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA+B7B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IAoC7B;;OAEG;IACH,OAAO,CAAC,uBAAuB;IA0C/B;;OAEG;IACH,OAAO,CAAC,qBAAqB;IA8B7B;;OAEG;IACH,yBAAyB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM;CAWtD;AAQD;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,kBAAkB,CAKrD"}
|
|
@@ -300,9 +300,11 @@ export class SmartExportManager {
|
|
|
300
300
|
generatePNGExportCode(dpi) {
|
|
301
301
|
return `
|
|
302
302
|
(async function() {
|
|
303
|
-
//
|
|
304
|
-
|
|
305
|
-
|
|
303
|
+
// High-DPI PNG goes through the export engine. This guarded
|
|
304
|
+
// app.exportPrintPNG, which has never existed, so the branch never fired and
|
|
305
|
+
// every print-resolution export quietly took the screen-resolution path.
|
|
306
|
+
if (app.exportEngine && typeof app.exportEngine.exportPNG === 'function' && ${dpi} >= 150) {
|
|
307
|
+
const dataUrl = await app.exportEngine.exportPNG({ dpi: ${dpi} });
|
|
306
308
|
return {
|
|
307
309
|
success: true,
|
|
308
310
|
format: 'png',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"export-manager.js","sourceRoot":"","sources":["../../src/agent/export-manager.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAIL,gBAAgB,GAGjB,MAAM,YAAY,CAAC;AAEpB,gFAA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C,WAAW,CAAC,CAAC,CAAC,YAAY,CAAC;QAE/D,OAAO;;;uCAG4B,MAAM,CAAC,WAAW,EAAE;;;;;+DAKI,MAAM,aAAa,GAAG;;;oEAGjB,MAAM,WAAW,GAAG;;;;uCAIjD,MAAM,CAAC,WAAW,EAAE;;;;;;;;mBAQxC,MAAM;;qBAEJ,QAAQ;;;;;;;KAOxB,CAAC,IAAI,EAAE,CAAC;IACX,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,GAAW;QACvC,OAAO;;;;;;;WAOA,GAAG;;;;;;;;;;;;;eAaC,GAAG;;;;;;KAMb,CAAC,IAAI,EAAE,CAAC;IACX,CAAC;IAED;;OAEG;IACH,yBAAyB,CAAC,QAAkB;QAC1C,MAAM,MAAM,GAAG,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC1C,OAAO;yBACc,QAAQ;;WAEtB,MAAM,CAAC,UAAU,CAAC,KAAK;YACtB,MAAM,CAAC,UAAU,CAAC,MAAM;;+BAEL,QAAQ,kBAAkB,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC;KACrF,CAAC,IAAI,EAAE,CAAC;IACX,CAAC;CACF;AAED,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF,IAAI,qBAAqB,GAA8B,IAAI,CAAC;AAE5D;;GAEG;AACH,MAAM,UAAU,gBAAgB;IAC9B,IAAI,CAAC,qBAAqB,EAAE,CAAC;QAC3B,qBAAqB,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACnD,CAAC;IACD,OAAO,qBAAqB,CAAC;AAC/B,CAAC"}
|
package/dist/browser/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Exports for browser-side usage of PinePaper MCP tools.
|
|
5
5
|
*/
|
|
6
6
|
export { PinePaperBridge, PinePaperStudioHandler, createBridge, createStudioHandler, type BridgeMessage, type BridgeConfig, } from './bridge.js';
|
|
7
|
-
export { PinePaperBrowserController, getBrowserController, resetBrowserController, resetBrowserControllerSync, type BrowserControllerConfig, type ExecuteResult, type AgentConnectOptions, type BatchExecuteResult, } from './puppeteer-controller.js';
|
|
7
|
+
export { PinePaperBrowserController, getBrowserController, resetBrowserController, resetBrowserControllerSync, PAGE_WAIT_UNTIL, type BrowserControllerConfig, type ExecuteCodeOptions, type PageWaitUntil, type ExecuteResult, type AgentConnectOptions, type BatchExecuteResult, } from './puppeteer-controller.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,EACnB,KAAK,aAAa,EAClB,KAAK,YAAY,GAClB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,EACf,KAAK,uBAAuB,EAC5B,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,GACxB,MAAM,2BAA2B,CAAC"}
|
package/dist/browser/index.js
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Exports for browser-side usage of PinePaper MCP tools.
|
|
5
5
|
*/
|
|
6
6
|
export { PinePaperBridge, PinePaperStudioHandler, createBridge, createStudioHandler, } from './bridge.js';
|
|
7
|
-
export { PinePaperBrowserController, getBrowserController, resetBrowserController, resetBrowserControllerSync, } from './puppeteer-controller.js';
|
|
7
|
+
export { PinePaperBrowserController, getBrowserController, resetBrowserController, resetBrowserControllerSync, PAGE_WAIT_UNTIL, } from './puppeteer-controller.js';
|
|
8
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,GAGpB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/browser/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,mBAAmB,GAGpB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,0BAA0B,EAC1B,eAAe,GAOhB,MAAM,2BAA2B,CAAC"}
|
|
@@ -4,6 +4,13 @@
|
|
|
4
4
|
* Controls a real browser instance running PinePaper Studio.
|
|
5
5
|
* Executes code directly via page.evaluate() and provides screenshots.
|
|
6
6
|
*/
|
|
7
|
+
/**
|
|
8
|
+
* What a navigation waits for. Puppeteer's own union, spelled out here so the
|
|
9
|
+
* env var can be validated against it without importing puppeteer — which is
|
|
10
|
+
* an optional peer, absent on most installs (see connect()).
|
|
11
|
+
*/
|
|
12
|
+
export type PageWaitUntil = 'load' | 'domcontentloaded' | 'networkidle0' | 'networkidle2';
|
|
13
|
+
export declare const PAGE_WAIT_UNTIL: readonly PageWaitUntil[];
|
|
7
14
|
export interface BrowserControllerConfig {
|
|
8
15
|
/** PinePaper Studio URL (default: https://pinepaper.studio) */
|
|
9
16
|
studioUrl?: string;
|
|
@@ -17,6 +24,45 @@ export interface BrowserControllerConfig {
|
|
|
17
24
|
timeout?: number;
|
|
18
25
|
/** Enable agent mode with ?agent=1 URL parameter */
|
|
19
26
|
agentMode?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* What navigations wait for (default: 'domcontentloaded').
|
|
29
|
+
*
|
|
30
|
+
* Every goto/reload used to be networkidle2, which asks for two-or-fewer
|
|
31
|
+
* connections held for half a second — a bar Studio never clears behind a
|
|
32
|
+
* proxy, or with analytics and polling sockets open. Connect then burned the
|
|
33
|
+
* entire timeout and failed against a page that had been usable for seconds.
|
|
34
|
+
* Readiness is waitForPinePaper()'s job; a navigation only has to hand us a
|
|
35
|
+
* document.
|
|
36
|
+
*/
|
|
37
|
+
waitUntil?: PageWaitUntil;
|
|
38
|
+
/**
|
|
39
|
+
* Chrome --proxy-server value (e.g. 'http://127.0.0.1:8080'). Setting it also
|
|
40
|
+
* passes --ignore-certificate-errors, because a proxy that intercepts TLS
|
|
41
|
+
* presents its own certificate and Chrome would otherwise refuse every
|
|
42
|
+
* origin. Unset → neither flag, and certificate checking stays on.
|
|
43
|
+
*/
|
|
44
|
+
proxy?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Run code through FxTool's governor (app.runGenerated) when the build has
|
|
47
|
+
* one. Default true. False raw-evals instead — see ExecuteCodeOptions.
|
|
48
|
+
*/
|
|
49
|
+
governor?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface ExecuteCodeOptions {
|
|
52
|
+
/**
|
|
53
|
+
* Governor budget for this run, in ms. FxTool's runGenerated defaults to
|
|
54
|
+
* 10_000 (RUN_DEFAULTS.timeoutMs, an async-tail Promise.race): a sane guard
|
|
55
|
+
* against a runaway script, and the wrong number for an export — the one
|
|
56
|
+
* operation that legitimately runs for minutes.
|
|
57
|
+
*/
|
|
58
|
+
governorTimeoutMs?: number;
|
|
59
|
+
/**
|
|
60
|
+
* Skip app.runGenerated entirely and raw-eval the code. That gives up the
|
|
61
|
+
* governor report, the structured error codes and the seeded PRNG, so it is
|
|
62
|
+
* the escape hatch for a deployed build whose governor ignores the budget
|
|
63
|
+
* above — never a fast path. Defaults to the controller's `governor: false`.
|
|
64
|
+
*/
|
|
65
|
+
bypassGovernor?: boolean;
|
|
20
66
|
}
|
|
21
67
|
export interface AgentConnectOptions {
|
|
22
68
|
/** Run browser in headless mode (default: true for agent workflows) */
|
|
@@ -62,6 +108,29 @@ export interface ExecuteResult {
|
|
|
62
108
|
*/
|
|
63
109
|
canvasReset?: boolean;
|
|
64
110
|
}
|
|
111
|
+
/**
|
|
112
|
+
* Is PinePaper Studio actually usable? Evaluated IN THE PAGE, so it closes over
|
|
113
|
+
* nothing.
|
|
114
|
+
*
|
|
115
|
+
* The old test was `app !== undefined || pinepaper !== undefined || paper !==
|
|
116
|
+
* undefined`, hand-copied into four places. `window.paper` is Paper.js, which
|
|
117
|
+
* attaches the moment the canvas script loads — long before Studio has built
|
|
118
|
+
* its API — so all four sites could report ready against a page that would
|
|
119
|
+
* throw on the first call.
|
|
120
|
+
*
|
|
121
|
+
* The test is FxTool's own, mirrored rather than invented: js/app.js polls
|
|
122
|
+
* `app && app.itemRegistry && typeof app.create === 'function'` under the
|
|
123
|
+
* comment "No global ready event exists — poll for the app surface the executor
|
|
124
|
+
* needs". Two ordering details make both halves earn their place:
|
|
125
|
+
* `window.PinePaper` is first assigned the CLASS at module load (no `create` —
|
|
126
|
+
* create() is an instance method) and only later the instance, and the instance
|
|
127
|
+
* assigns itself to the global from INSIDE its own constructor.
|
|
128
|
+
*
|
|
129
|
+
* Every candidate global is tested, not just the first truthy one: picking
|
|
130
|
+
* `window.app` because it exists and then failing it would trade a false ready
|
|
131
|
+
* for a false not-ready, which costs the whole timeout.
|
|
132
|
+
*/
|
|
133
|
+
export declare function pinePaperIsReady(): boolean;
|
|
65
134
|
/**
|
|
66
135
|
* Controls PinePaper Studio via Puppeteer.
|
|
67
136
|
*
|
|
@@ -78,6 +147,13 @@ export declare class PinePaperBrowserController {
|
|
|
78
147
|
private isAgentMode;
|
|
79
148
|
private connectingPromise;
|
|
80
149
|
constructor(config?: BrowserControllerConfig);
|
|
150
|
+
/**
|
|
151
|
+
* Chrome flags shared by both launch paths, so a proxy configured once does
|
|
152
|
+
* not go missing from whichever path the caller happens to take.
|
|
153
|
+
*/
|
|
154
|
+
private launchArgs;
|
|
155
|
+
/** Launch options shared by both paths — see MIN_PROTOCOL_TIMEOUT_MS. */
|
|
156
|
+
private launchOptions;
|
|
81
157
|
/**
|
|
82
158
|
* Get URL with agent mode parameter
|
|
83
159
|
*/
|
|
@@ -102,6 +178,14 @@ export declare class PinePaperBrowserController {
|
|
|
102
178
|
* Whether the browser is running in headless mode
|
|
103
179
|
*/
|
|
104
180
|
get isHeadless(): boolean;
|
|
181
|
+
/**
|
|
182
|
+
* The resolved connection settings. Read-only, and a copy: these are what the
|
|
183
|
+
* env vars and the caller's config actually worked out to, which is otherwise
|
|
184
|
+
* only observable by launching a browser.
|
|
185
|
+
*/
|
|
186
|
+
get connectionSettings(): Readonly<Required<BrowserControllerConfig>>;
|
|
187
|
+
/** The Chrome flags this controller would launch with. Exposed for tests. */
|
|
188
|
+
chromeArgs(): string[];
|
|
105
189
|
/**
|
|
106
190
|
* Launch browser and navigate to PinePaper Studio.
|
|
107
191
|
* When agentMode is enabled (default), this automatically uses connectAgent().
|
|
@@ -134,7 +218,7 @@ export declare class PinePaperBrowserController {
|
|
|
134
218
|
/**
|
|
135
219
|
* Execute JavaScript code in PinePaper Studio
|
|
136
220
|
*/
|
|
137
|
-
executeCode(code: string, takeScreenshot?: boolean): Promise<ExecuteResult>;
|
|
221
|
+
executeCode(code: string, takeScreenshot?: boolean, options?: ExecuteCodeOptions): Promise<ExecuteResult>;
|
|
138
222
|
/**
|
|
139
223
|
* Take a screenshot of the current canvas
|
|
140
224
|
*/
|
|
@@ -180,7 +264,7 @@ export declare class PinePaperBrowserController {
|
|
|
180
264
|
/**
|
|
181
265
|
* Execute code with a timeout
|
|
182
266
|
*/
|
|
183
|
-
executeWithTimeout(code: string, timeoutMs: number, takeScreenshot?: boolean): Promise<ExecuteResult>;
|
|
267
|
+
executeWithTimeout(code: string, timeoutMs: number, takeScreenshot?: boolean, options?: ExecuteCodeOptions): Promise<ExecuteResult>;
|
|
184
268
|
/**
|
|
185
269
|
* Quick reset: Clear canvas without full page refresh
|
|
186
270
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puppeteer-controller.d.ts","sourceRoot":"","sources":["../../src/browser/puppeteer-controller.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"puppeteer-controller.d.ts","sourceRoot":"","sources":["../../src/browser/puppeteer-controller.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH;;;;GAIG;AACH,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,kBAAkB,GAAG,cAAc,GAAG,cAAc,CAAC;AAE1F,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAAiE,CAAC;AAEtH,MAAM,WAAW,uBAAuB;IACtC,+DAA+D;IAC/D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yDAAyD;IACzD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC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