@pinepaper.studio/mcp-server 1.5.3 → 1.5.5

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.
Files changed (77) hide show
  1. package/README.md +6 -4
  2. package/dist/agent/types.d.ts +16 -16
  3. package/dist/browser/url-target.d.ts +26 -0
  4. package/dist/browser/url-target.d.ts.map +1 -0
  5. package/dist/browser/url-target.js +50 -0
  6. package/dist/browser/url-target.js.map +1 -0
  7. package/dist/cli.js +2 -1
  8. package/dist/cli.js.map +1 -1
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +48 -4
  11. package/dist/index.js.map +1 -1
  12. package/dist/ontology/hints.d.ts +71 -0
  13. package/dist/ontology/hints.d.ts.map +1 -0
  14. package/dist/ontology/hints.js +189 -0
  15. package/dist/ontology/hints.js.map +1 -0
  16. package/dist/ontology/vocabulary.d.ts.map +1 -1
  17. package/dist/ontology/vocabulary.js +34 -0
  18. package/dist/ontology/vocabulary.js.map +1 -1
  19. package/dist/prompts/index.d.ts.map +1 -1
  20. package/dist/prompts/index.js +146 -0
  21. package/dist/prompts/index.js.map +1 -1
  22. package/dist/tools/compact-descriptions.d.ts +3 -0
  23. package/dist/tools/compact-descriptions.d.ts.map +1 -1
  24. package/dist/tools/compact-descriptions.js +17 -9
  25. package/dist/tools/compact-descriptions.js.map +1 -1
  26. package/dist/tools/definitions.d.ts +1 -1
  27. package/dist/tools/definitions.d.ts.map +1 -1
  28. package/dist/tools/definitions.js +1251 -2327
  29. package/dist/tools/definitions.js.map +1 -1
  30. package/dist/tools/handlers/camera.d.ts +19 -0
  31. package/dist/tools/handlers/camera.d.ts.map +1 -0
  32. package/dist/tools/handlers/camera.js +100 -0
  33. package/dist/tools/handlers/camera.js.map +1 -0
  34. package/dist/tools/handlers/export.d.ts +12 -0
  35. package/dist/tools/handlers/export.d.ts.map +1 -0
  36. package/dist/tools/handlers/export.js +30 -0
  37. package/dist/tools/handlers/export.js.map +1 -0
  38. package/dist/tools/handlers/font.d.ts +12 -0
  39. package/dist/tools/handlers/font.d.ts.map +1 -0
  40. package/dist/tools/handlers/font.js +135 -0
  41. package/dist/tools/handlers/font.js.map +1 -0
  42. package/dist/tools/handlers/maps.d.ts +19 -0
  43. package/dist/tools/handlers/maps.d.ts.map +1 -0
  44. package/dist/tools/handlers/maps.js +184 -0
  45. package/dist/tools/handlers/maps.js.map +1 -0
  46. package/dist/tools/handlers/ontology.d.ts +20 -0
  47. package/dist/tools/handlers/ontology.d.ts.map +1 -0
  48. package/dist/tools/handlers/ontology.js +185 -0
  49. package/dist/tools/handlers/ontology.js.map +1 -0
  50. package/dist/tools/handlers/tool-guide.d.ts +14 -0
  51. package/dist/tools/handlers/tool-guide.d.ts.map +1 -0
  52. package/dist/tools/handlers/tool-guide.js +52 -0
  53. package/dist/tools/handlers/tool-guide.js.map +1 -0
  54. package/dist/tools/handlers.d.ts +18 -0
  55. package/dist/tools/handlers.d.ts.map +1 -1
  56. package/dist/tools/handlers.js +213 -695
  57. package/dist/tools/handlers.js.map +1 -1
  58. package/dist/tools/minimal-descriptions.d.ts +4 -0
  59. package/dist/tools/minimal-descriptions.d.ts.map +1 -1
  60. package/dist/tools/minimal-descriptions.js +45 -66
  61. package/dist/tools/minimal-descriptions.js.map +1 -1
  62. package/dist/tools/toolkits.d.ts.map +1 -1
  63. package/dist/tools/toolkits.js +36 -62
  64. package/dist/tools/toolkits.js.map +1 -1
  65. package/dist/types/code-generator.d.ts +35 -34
  66. package/dist/types/code-generator.d.ts.map +1 -1
  67. package/dist/types/code-generator.js +869 -474
  68. package/dist/types/code-generator.js.map +1 -1
  69. package/dist/types/schemas.d.ts +1047 -988
  70. package/dist/types/schemas.d.ts.map +1 -1
  71. package/dist/types/schemas.js +282 -84
  72. package/dist/types/schemas.js.map +1 -1
  73. package/dist/version.d.ts +11 -0
  74. package/dist/version.d.ts.map +1 -0
  75. package/dist/version.js +18 -0
  76. package/dist/version.js.map +1 -0
  77. package/package.json +1 -1
@@ -4,6 +4,9 @@
4
4
  * Activated via PINEPAPER_VERBOSITY=compact env var.
5
5
  * Each description says ONLY what the tool does in 1-2 sentences.
6
6
  * Workflow instructions belong in pinepaper_tool_guide, not here.
7
+ *
8
+ * Vocabulary enumerations are derived from the ontology + Zod schemas so the
9
+ * lists below never drift from what the server actually validates.
7
10
  */
8
11
  export declare const COMPACT_DESCRIPTIONS: Record<string, string>;
9
12
  //# sourceMappingURL=compact-descriptions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compact-descriptions.d.ts","sourceRoot":"","sources":["../../src/tools/compact-descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA4HvD,CAAC"}
1
+ {"version":3,"file":"compact-descriptions.d.ts","sourceRoot":"","sources":["../../src/tools/compact-descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA0HvD,CAAC"}
@@ -4,7 +4,16 @@
4
4
  * Activated via PINEPAPER_VERBOSITY=compact env var.
5
5
  * Each description says ONLY what the tool does in 1-2 sentences.
6
6
  * Workflow instructions belong in pinepaper_tool_guide, not here.
7
+ *
8
+ * Vocabulary enumerations are derived from the ontology + Zod schemas so the
9
+ * lists below never drift from what the server actually validates.
7
10
  */
11
+ import { ItemTypeSchema, RelationTypeSchema, GeneratorNameSchema } from '../types/schemas.js';
12
+ import { DIAGRAM_SHAPE_MAP } from '../ontology/vocabulary.js';
13
+ const ITEM_TYPES = ItemTypeSchema.options.join(', ');
14
+ const RELATION_TYPES = RelationTypeSchema.options.join(', ');
15
+ const DIAGRAM_SHAPES = Object.keys(DIAGRAM_SHAPE_MAP).join(', ');
16
+ const GENERATORS = GeneratorNameSchema.options.join(', ');
8
17
  export const COMPACT_DESCRIPTIONS = {
9
18
  // -------------------------------------------------------------------------
10
19
  // Minimal toolkit tools
@@ -24,7 +33,6 @@ Pass description for creative direction and canvasPreset for platform sizing. WO
24
33
  pinepaper_agent_end_job: `Finish the current job and get a screenshot. Show it to the user.`,
25
34
  pinepaper_agent_reset: `Quick canvas reset. Faster than refresh_page.`,
26
35
  pinepaper_agent_analyze: `Analyze what's on the canvas and get export recommendations.`,
27
- pinepaper_get_canvas_presets: `List available canvas size presets (YouTube, Instagram, TikTok, etc.).`,
28
36
  pinepaper_tool_guide: `Get detailed docs for any tool or category. Call with no args for the full workflow guide.`,
29
37
  pinepaper_set_toolkit: `Switch available tools. Toolkits: agent, diagram, map, font, full, minimal. Verbosity: verbose, compact, minimal.`,
30
38
  // -------------------------------------------------------------------------
@@ -40,7 +48,7 @@ VARIABLE REFERENCES: "$0", "$1" etc. reference items by creation order within th
40
48
  // -------------------------------------------------------------------------
41
49
  pinepaper_create_item: `Create a text, shape, or graphic on the canvas. Returns an itemId for later reference.
42
50
 
43
- ITEM TYPES: text, circle, rectangle, star, triangle, polygon, ellipse, path, line, arc.
51
+ ITEM TYPES: ${ITEM_TYPES}.
44
52
  STYLING: gradients (color object with stops), shadows, blend modes, opacity. See inputSchema for properties.`,
45
53
  // -------------------------------------------------------------------------
46
54
  // p5_draw
@@ -54,15 +62,15 @@ NOT SUPPORTED: setup()/draw() loop, noise(), text(), loadImage(), transforms, be
54
62
  // -------------------------------------------------------------------------
55
63
  pinepaper_create_scene: `Create a complete scene with items, relations, and animations in one call. Define items with name references, then use those names in relations and animations.
56
64
 
57
- Item types: text, circle, star, rectangle, triangle, polygon, ellipse, path, line, arc.
58
- Relations: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to.
65
+ Item types: ${ITEM_TYPES}.
66
+ Relations: ${RELATION_TYPES}.
59
67
  Animations: pulse, rotate, bounce, fade, wobble, slide, typewriter.`,
60
68
  // -------------------------------------------------------------------------
61
69
  // execute_generator
62
70
  // -------------------------------------------------------------------------
63
- pinepaper_execute_generator: `Run a procedural background generator (sunburst, bokeh, gradient mesh, etc.).
71
+ pinepaper_execute_generator: `Run a procedural background generator (sunburst, bokeh, gradient mesh, PineMath plots, etc.).
64
72
 
65
- GENERATORS (14): drawSunburst, drawSunsetScene, drawGrid, drawStackedCircles, drawCircuit, drawWaves, drawPattern, drawBokeh, drawGradientMesh, drawGeometricAbstract, drawWindField, drawFluidFlow, drawOrganicFlow, drawNoiseTexture.`,
73
+ GENERATORS (${GeneratorNameSchema.options.length}): ${GENERATORS}.`,
66
74
  // -------------------------------------------------------------------------
67
75
  // get_performance_metrics
68
76
  // -------------------------------------------------------------------------
@@ -72,13 +80,13 @@ GENERATORS (14): drawSunburst, drawSunsetScene, drawGrid, drawStackedCircles, dr
72
80
  // -------------------------------------------------------------------------
73
81
  pinepaper_add_relation: `Add a behavior relation between two items (orbits, follows, attached_to, etc.). Relations are compositional — an item can have multiple.
74
82
 
75
- RELATION TYPES: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to (+ more in inputSchema).`,
83
+ RELATION TYPES: ${RELATION_TYPES}.`,
76
84
  // -------------------------------------------------------------------------
77
85
  // create_diagram_shape
78
86
  // -------------------------------------------------------------------------
79
87
  pinepaper_create_diagram_shape: `Create a diagram shape (process, decision, terminal, etc.) for flowcharts and UML.
80
88
 
81
- SHAPE TYPES — Flowchart: process, decision, terminal, data, document, database, preparation. UML: uml-class, uml-usecase, uml-actor. Network: cloud, server. Basic: rectangle, circle, triangle, star.`,
89
+ SHAPE TYPES: ${DIAGRAM_SHAPES}.`,
82
90
  // -------------------------------------------------------------------------
83
91
  // search_assets
84
92
  // -------------------------------------------------------------------------
@@ -98,6 +106,6 @@ SHAPE TYPES — Flowchart: process, decision, terminal, data, document, database
98
106
  // -------------------------------------------------------------------------
99
107
  // agent_export
100
108
  // -------------------------------------------------------------------------
101
- pinepaper_agent_export: `Export as MP4, GIF, PNG, SVG, or PDF. Formats: svg, png, gif, mp4, webm, pdf. Quality: draft, standard, high.`,
109
+ pinepaper_agent_export: `Export as MP4, GIF, PNG, SVG, or PDF. Formats: svg, png, gif, mp4, webm, pdf. Quality: draft, standard, high. Framing: canvas (default) or camera (camera_animates viewport — video formats only).`,
102
110
  };
103
111
  //# sourceMappingURL=compact-descriptions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"compact-descriptions.js","sourceRoot":"","sources":["../../src/tools/compact-descriptions.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAA2B;IAE1D,4EAA4E;IAC5E,wBAAwB;IACxB,4EAA4E;IAC5E,8BAA8B,EAAE,4EAA4E;IAE5G,yBAAyB,EAAE,0IAA0I;IAErK,yBAAyB,EAAE,sCAAsC;IAEjE,sBAAsB,EAAE,mCAAmC;IAE3D,sBAAsB,EAAE,sDAAsD;IAE9E,yBAAyB,EAAE,+EAA+E;IAE1G,4BAA4B,EAAE,8BAA8B;IAE5D,4BAA4B,EAAE,0CAA0C;IAExE,wBAAwB,EAAE,kCAAkC;IAE5D,yBAAyB,EAAE;;iJAEoH;IAE/I,uBAAuB,EAAE,mEAAmE;IAE5F,qBAAqB,EAAE,+CAA+C;IAEtE,uBAAuB,EAAE,8DAA8D;IAEvF,4BAA4B,EAAE,wEAAwE;IAEtG,oBAAoB,EAAE,4FAA4F;IAElH,qBAAqB,EAAE,mHAAmH;IAE1I,4EAA4E;IAC5E,gBAAgB;IAChB,4EAA4E;IAC5E,6BAA6B,EAAE;;;;yFAIwD;IAEvF,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAC5E,qBAAqB,EAAE;;;6GAGoF;IAE3G,4EAA4E;IAC5E,UAAU;IACV,4EAA4E;IAC5E,iBAAiB,EAAE;;;qGAGgF;IAEnG,4EAA4E;IAC5E,eAAe;IACf,4EAA4E;IAC5E,sBAAsB,EAAE;;;;oEAI0C;IAElE,4EAA4E;IAC5E,oBAAoB;IACpB,4EAA4E;IAC5E,2BAA2B,EAAE;;wOAEyM;IAEtO,4E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5E,uBAAuB,EAAE,kHAAkH;IAE3I,4EAA4E;IAC5E,UAAU;IACV,4EAA4E;IAC5E,iBAAiB,EAAE,mIAAmI;IAEtJ,4EAA4E;IAC5E,cAAc;IACd,4EAA4E;IAC5E,qBAAqB,EAAE,oGAAoG;IAE3H,4EAA4E;IAC5E,eAAe;IACf,4EAA4E;IAC5E,sBAAsB,EAAE,sGAAsG;IAE9H,4EAA4E;IAC5E,eAAe;IACf,4EAA4E;IAC5E,sBAAsB,EAAE,oMAAoM;CAE7N,CAAC"}
@@ -9,7 +9,7 @@
9
9
  */
10
10
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
11
11
  import { I18nManager } from '../i18n/index.js';
12
- export declare const AI_AGENT_GUIDE = "\u26A0\uFE0F You are connected to PinePaper Studio via MCP tools. ALWAYS use these tools to create visual content.\nNEVER create standalone HTML pages, React components, or web apps as a substitute. Do NOT use frontend design skills or CSS-only animations instead of PinePaper.\nPinePaper tools ARE the implementation \u2014 they generate Paper.js/JavaScript code that runs on the canvas and produce Canvas 2D, SVG, MP4, GIF, PNG exports.\nIf a tool fails, report the error \u2014 do NOT fall back to generating HTML pages.\nThe generated code is shown in tool responses and can be copied into PinePaper's Code Console.\n\n\u26A0\uFE0F KNOWN CONFLICT: The \"frontend-design\" plugin instructs agents to generate HTML/CSS pages for visual content. This conflicts with PinePaper. If you keep generating HTML instead of calling PinePaper tools, the user should disable the frontend-design plugin.\n\nWORKFLOW \u2014 Create \u2192 Validate \u2192 Iterate:\n\n1. pinepaper_agent_start_job (clearCanvas: true, canvasPreset)\n2. pinepaper_agent_batch_execute \u2014 ONE call with ALL operations:\n set_canvas_size \u2192 set_background / execute_generator \u2192 create items \u2192 animate / keyframe_animate \u2192 relation \u2192 apply_mask \u2192 apply_effect \u2192 play_timeline\n3. pinepaper_agent_end_job \u2014 returns screenshot\n4. Show screenshot to user for validation\n5. If user wants changes \u2192 modify specific items or start a new job\n\n\u26A0\uFE0F CRITICAL \u2014 Every operation is LIVE on the canvas:\nEvery create, animate, relation, or generator call IMMEDIATELY executes on the connected browser canvas.\nCalling the same operation twice creates DUPLICATE elements. There is no \"preview\" \u2014 it's all live.\nIf you restart the pipeline or re-call batch_execute, you DOUBLE every item on the canvas.\nTo fix mistakes: use modify/delete operations, or start a NEW job with clearCanvas: true.\n\nRULES:\n- NEVER restart the pipeline \u2014 one start_job, one batch_execute, one end_job\n- ALL operations go in batch_execute \u2014 canvas, background, items, animation, masks, effects, playback\n- EXCEPTION: Diagrams (flowcharts, UML) use pinepaper_create_diagram_shape + pinepaper_connect, NOT batch_execute\n- Use generators for rich backgrounds \u2014 the built-in templates are limited, generators create much better visuals\n- Use \"$0\", \"$1\" to reference items by creation order within the batch\n\n\u2500\u2500\u2500 BATCH OPERATIONS (12 types, in order) \u2500\u2500\u2500\n\nCANVAS: set_canvas_size (width/height or preset) \u2192 set_background (color) \u2192 execute_generator (procedural art)\nITEMS: create (itemType, position, properties) \u2192 modify (itemId, properties) \u2192 delete (itemId)\nANIMATE: animate (loop presets) \u2192 keyframe_animate (timed reveals) \u2192 relation (behavioral links)\nEFFECTS: apply_mask (reveal animations) \u2192 apply_effect (sparkle/blast)\nPLAY: play_timeline (start playback)\n\n\u2500\u2500\u2500 GENERATORS (prefer these for backgrounds) \u2500\u2500\u2500\n\nGenerators fill the canvas with procedural art \u2014 much richer than solid colors.\nChoose based on mood:\n Dreamy/soft: drawBokeh, drawGradientMesh, drawOrganicFlow\n Techy/modern: drawCircuit, drawGrid, drawWindField\n Nature/warm: drawSunsetScene, drawSunburst, drawWaves\n Abstract: drawGeometricAbstract, drawFluidFlow, drawNoiseTexture\n Decorative: drawPattern, drawStackedCircles\n\n\u2500\u2500\u2500 ITEMS \u2500\u2500\u2500\n\nShapes: circle, rectangle, star, ellipse, triangle, polygon, line, arc, path\nText: text (content, fontSize, fontFamily, color, fontWeight)\nAll items: opacity, shadowColor, shadowBlur, blendMode, strokeColor, strokeWidth\n\nSVG imports for recognizable objects (planes, cars, animals, buildings):\n pinepaper_search_assets \u2192 pinepaper_import_asset (850k+ SVG icons)\n\n\u2500\u2500\u2500 ANIMATION (all in batch) \u2500\u2500\u2500\n\nLoop presets (animate): pulse, rotate, bounce, fade, wobble, slide, typewriter\nKeyframe (keyframe_animate): [{time, properties, easing}] \u2192 opacity, scale, scaleX, scaleY, x, y, rotation, fillColor, strokeColor, fontSize\nRelations (relation): orbits, follows, attached_to, points_at, mirrors, parallax, wave_through, morphs_to (+ 9 more in batch_execute schema)\nMasks (apply_mask): wipeLeft, wipeRight, wipeUp, wipeDown, iris, irisOut, star, heart, curtainHorizontal, curtainVertical, cinematic, diagonalWipe, revealUp, revealDown\nEffects (apply_effect): sparkle, blast\n\nComposability: one item can have loop + keyframe + relation + mask simultaneously.\n\nTiming templates (stagger reveals across duration):\n 5s: bg 0s \u2192 elements 1-2s \u2192 text 2.5-3.5s \u2192 final 4-5s\n 10s: bg 0-1s \u2192 elements 1-4s \u2192 main 4-7s \u2192 details 7-9s \u2192 finale 9-10s\n\n\u2500\u2500\u2500 VISUAL COMPOSITION \u2500\u2500\u2500\n\nLayer order: background \u2192 large shapes (low opacity) \u2192 main subjects \u2192 text on top\nColor: dark bg (#0f172a) + bright accents (#f472b6, #818cf8, #fbbf24)\nScale: main subject 40-60% of canvas, supporting elements smaller\nSpacing: distribute across canvas with breathing room, don't cluster\n\n\u26A0\uFE0F SIZING \u2014 All positions and sizes MUST fit within the canvas:\n Default canvas is 800x600. For infographics/social media, SET A PRESET FIRST.\n start_job returns canvasSize \u2014 use it to calculate positions.\n Keep all items within 5%-95% of canvas width/height (leave margins).\n Font sizes relative to canvas: titles \u2264 5% of canvas width, body \u2264 3%.\n Example for 1080x1080: title fontSize \u2264 54, body \u2264 32, positions 54-1026.\n Example for 800x600: title fontSize \u2264 40, body \u2264 24, positions 40-760.\n\n\u26A0\uFE0F TEXT OVERLAP \u2014 NEVER place multiple text items at the same position:\n Each text item MUST have a unique Y position. Stack vertically with spacing \u2265 fontSize \u00D7 1.4.\n For N words stacked vertically: startY = centerY - (N-1) \u00D7 spacing / 2, then increment Y by spacing.\n Example for 5 words at fontSize 48 on 800x600: spacing=67, startY=166, positions: 166, 233, 300, 367, 434.\n\n\u2500\u2500\u2500 DIAGRAMS (flowcharts, UML \u2014 do NOT use batch_execute) \u2500\u2500\u2500\n\nDiagrams use their own tools, not batch_execute:\n pinepaper_create_diagram_shape \u2192 pinepaper_connect \u2192 pinepaper_auto_layout\nShapes: process (rect), decision (diamond), terminal (rounded), data, document, database, cloud, server\nWorkflow: create shapes with positions \u2192 connect with arrows \u2192 optional auto_layout\nSee pinepaper://docs/diagrams for full examples.\n\n\u2500\u2500\u2500 CANVAS & EXPORT \u2500\u2500\u2500\n\nPresets: instagram (1080x1080), youtube (1920x1080), tiktok (1080x1920), twitter (1200x675)\nExport: pinepaper_agent_export (SVG/PNG/GIF/MP4/WebM/PDF), pinepaper_export_svg";
12
+ export declare const AI_AGENT_GUIDE = "\u26A0\uFE0F You are connected to PinePaper Studio via MCP tools. ALWAYS use these tools to create visual content.\nNEVER create standalone HTML pages, React components, or web apps as a substitute. Do NOT use frontend design skills or CSS-only animations instead of PinePaper.\nPinePaper tools ARE the implementation \u2014 they generate Paper.js/JavaScript code that runs on the canvas and produce Canvas 2D, SVG, MP4, GIF, PNG exports.\nIf a tool fails, report the error \u2014 do NOT fall back to generating HTML pages.\nThe generated code is shown in tool responses and can be copied into PinePaper's Code Console.\n\n\u26A0\uFE0F KNOWN CONFLICT: The \"frontend-design\" plugin instructs agents to generate HTML/CSS pages for visual content. This conflicts with PinePaper. If you keep generating HTML instead of calling PinePaper tools, the user should disable the frontend-design plugin.\n\nWORKFLOW \u2014 Create \u2192 Validate \u2192 Iterate:\n\n1. pinepaper_agent_start_job (clearCanvas: true, canvasPreset)\n2. pinepaper_agent_batch_execute \u2014 ONE call with ALL operations:\n set_canvas_size \u2192 set_background / execute_generator \u2192 create items \u2192 animate / keyframe_animate \u2192 relation \u2192 apply_mask \u2192 apply_effect \u2192 play_timeline\n3. pinepaper_agent_end_job \u2014 returns screenshot\n4. Show screenshot to user for validation\n5. If user wants changes \u2192 modify specific items or start a new job\n\n\u26A0\uFE0F CRITICAL \u2014 Every operation is LIVE on the canvas:\nEvery create, animate, relation, or generator call IMMEDIATELY executes on the connected browser canvas.\nCalling the same operation twice creates DUPLICATE elements. There is no \"preview\" \u2014 it's all live.\nIf you restart the pipeline or re-call batch_execute, you DOUBLE every item on the canvas.\nTo fix mistakes: use modify/delete operations, or start a NEW job with clearCanvas: true.\n\nRULES:\n- NEVER restart the pipeline \u2014 one start_job, one batch_execute, one end_job\n- ALL operations go in batch_execute \u2014 canvas, background, items, animation, masks, effects, playback\n- EXCEPTION: Diagrams (flowcharts, UML) use pinepaper_create_diagram_shape + pinepaper_connect, NOT batch_execute\n- Use generators for rich backgrounds \u2014 the built-in templates are limited, generators create much better visuals\n- Use \"$0\", \"$1\" to reference items by creation order within the batch\n\n\u2500\u2500\u2500 BATCH OPERATIONS (12 types, in order) \u2500\u2500\u2500\n\nCANVAS: set_canvas_size (width/height or preset) \u2192 set_background (color) \u2192 execute_generator (procedural art)\nITEMS: create (itemType, position, properties) \u2192 modify (itemId, properties) \u2192 delete (itemId)\nANIMATE: animate (loop presets) \u2192 keyframe_animate (timed reveals) \u2192 relation (behavioral links)\nEFFECTS: apply_mask (reveal animations) \u2192 apply_effect (sparkle/blast/bubbles/fireflies/trail...)\nPLAY: play_timeline (start playback)\n\n\u2500\u2500\u2500 GENERATORS (prefer these for backgrounds) \u2500\u2500\u2500\n\nGenerators fill the canvas with procedural art \u2014 much richer than solid colors.\nChoose based on mood:\n Dreamy/soft: drawBokeh, drawGradientMesh, drawOrganicFlow\n Techy/modern: drawCircuit, drawGrid, drawWindField\n Nature/warm: drawSunsetScene, drawSunburst, drawWaves\n Abstract: drawGeometricAbstract, drawFluidFlow, drawNoiseTexture\n Decorative: drawPattern, drawStackedCircles\n\n\u2500\u2500\u2500 ITEMS \u2500\u2500\u2500\n\nShapes: circle, rectangle, star, ellipse, triangle, polygon, line, arc, path\nText: text (content, fontSize, fontFamily, color, fontWeight)\n Dynamic text: set contentType on text items \u2192 clock (live time), timer (elapsed), countdown (from N seconds), stopwatch (pauseable)\nAll items: opacity, shadowColor, shadowBlur, blendMode, strokeColor, strokeWidth\n\nSVG imports for recognizable objects (planes, cars, animals, buildings):\n pinepaper_search_assets \u2192 pinepaper_import_asset (850k+ SVG icons)\n\n\u2500\u2500\u2500 ANIMATION (all in batch) \u2500\u2500\u2500\n\nLoop presets (animate): pulse, rotate, bounce, fade, wobble, slide, typewriter\nKeyframe (keyframe_animate): [{time, properties, easing}] \u2192 opacity, scale, scaleX, scaleY, x, y, rotation, fillColor, strokeColor, fontSize\nRelations (relation): orbits, follows, attached_to, points_at, mirrors, parallax, wave_through, morphs_to, group_morphs_to, moves_along_path (+ 9 more in batch_execute schema)\nMasks (apply_mask): wipeLeft, wipeRight, wipeUp, wipeDown, iris, irisOut, star, heart, curtainHorizontal, curtainVertical, cinematic, diagonalWipe, revealUp, revealDown\nEffects (apply_effect): sparkle, blast\n\nComposability: one item can have loop + keyframe + relation + mask simultaneously.\n\nTiming templates (stagger reveals across duration):\n 5s: bg 0s \u2192 elements 1-2s \u2192 text 2.5-3.5s \u2192 final 4-5s\n 10s: bg 0-1s \u2192 elements 1-4s \u2192 main 4-7s \u2192 details 7-9s \u2192 finale 9-10s\n\n\u2500\u2500\u2500 VISUAL COMPOSITION \u2500\u2500\u2500\n\nLayer order: background \u2192 large shapes (low opacity) \u2192 main subjects \u2192 text on top\nColor: dark bg (#0f172a) + bright accents (#f472b6, #818cf8, #fbbf24)\nScale: main subject 40-60% of canvas, supporting elements smaller\nSpacing: distribute across canvas with breathing room, don't cluster\n\n\u26A0\uFE0F SIZING \u2014 All positions and sizes MUST fit within the canvas:\n Default canvas is 800x600. For infographics/social media, SET A PRESET FIRST.\n start_job returns canvasSize \u2014 use it to calculate positions.\n Keep all items within 5%-95% of canvas width/height (leave margins).\n Font sizes relative to canvas: titles \u2264 5% of canvas width, body \u2264 3%.\n Example for 1080x1080: title fontSize \u2264 54, body \u2264 32, positions 54-1026.\n Example for 800x600: title fontSize \u2264 40, body \u2264 24, positions 40-760.\n\n\u26A0\uFE0F TEXT OVERLAP \u2014 NEVER place multiple text items at the same position:\n Each text item MUST have a unique Y position. Stack vertically with spacing \u2265 fontSize \u00D7 1.4.\n For N words stacked vertically: startY = centerY - (N-1) \u00D7 spacing / 2, then increment Y by spacing.\n Example for 5 words at fontSize 48 on 800x600: spacing=67, startY=166, positions: 166, 233, 300, 367, 434.\n\n\u2500\u2500\u2500 DIAGRAMS (flowcharts, UML \u2014 do NOT use batch_execute) \u2500\u2500\u2500\n\nDiagrams use their own tools, not batch_execute:\n pinepaper_create_diagram_shape \u2192 pinepaper_connect \u2192 pinepaper_auto_layout\nShapes: process (rect), decision (diamond), terminal (rounded), data, document, database, cloud, server\nWorkflow: create shapes with positions \u2192 connect with arrows \u2192 optional auto_layout\nSee pinepaper://docs/diagrams for full examples.\n\n\u2500\u2500\u2500 STANDALONE TOOLS (not batch \u2014 call directly) \u2500\u2500\u2500\n\nDeformation: pinepaper_deform \u2014 vertex-level presets (fold, squeeze, twist, ripple, wave, breathe, wobble...)\n Phase-driven animation: sin, blink, pingpong, elastic, heartbeat, stepped\n Use for organic motion that keyframes can't achieve.\n\nSprite Sheets: pinepaper_sprite_sheet \u2014 generate from skeleton poses, play, export (PNG + atlas)\n For character animation and game sprite pipelines.\n\nInteraction: pinepaper_interaction \u2014 continuous physics behaviors (repel, attract, follow, orbit, slingshot)\n For interactive storytelling, quizzes, games. trigger_action for state changes (incrementScore, navigate, showFeedback).\n\nData Viz: pinepaper_create_chart \u2014 create/update/reconfigure/remove charts (bar, line, scatter, area)\n Pass data as array of objects + options. Auto-animated with expression-driven oscillation.\n\nMagic: pinepaper_magic \u2014 ontology-aware auto-animation + style remix\n One-click animate (mood: calm/professional/energetic/dramatic/whimsical) or remix (cycle colors/fonts).\n\nPhysics: pinepaper_physics \u2014 rigid body simulation (init, add_body, apply_force, create_joint)\n For interactive simulations, gravity, collisions. Based on Box2D/Planck.js.\n\nMeasurement: pinepaper_measurement \u2014 rulers, grid, snap-to-grid, get item dimensions\n For precise layouts and alignment.\n\n\u2500\u2500\u2500 CANVAS & EXPORT \u2500\u2500\u2500\n\nPresets: instagram (1080x1080), youtube (1920x1080), tiktok (1080x1920), twitter (1200x675)\nExport: pinepaper_agent_export (SVG/PNG/GIF/MP4/WebM/PDF), pinepaper_export_svg\nWidget: pinepaper_export_widget (pp:PinePaper ontology JSON), pinepaper_export_widget_html (self-contained HTML with tree-shaken runtime)";
13
13
  export declare const PINEPAPER_TOOLS: Tool[];
14
14
  /**
15
15
  * Get a tool definition by name
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAQ/C,eAAO,MAAM,cAAc,+vNAsGqD,CAAC;AAWjF,eAAO,MAAM,eAAe,EAAE,IAAI,EAumNjC,CAAC;AAEF;;GAEG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAE5D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAEvC;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,IAAI,EAAE,CAO3D;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAE9D;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI,EAAE,CAQrE"}
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[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