@pinepaper.studio/mcp-server 1.5.0 → 1.5.3

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 (78) hide show
  1. package/README.md +0 -25
  2. package/dist/agent/export-manager.d.ts.map +1 -1
  3. package/dist/agent/export-manager.js +24 -14
  4. package/dist/agent/export-manager.js.map +1 -1
  5. package/dist/agent/types.d.ts +6 -6
  6. package/dist/browser/puppeteer-controller.d.ts +5 -1
  7. package/dist/browser/puppeteer-controller.d.ts.map +1 -1
  8. package/dist/browser/puppeteer-controller.js +11 -3
  9. package/dist/browser/puppeteer-controller.js.map +1 -1
  10. package/dist/cli.js +61 -66
  11. package/dist/cli.js.map +1 -1
  12. package/dist/index.d.ts +4 -1
  13. package/dist/index.d.ts.map +1 -1
  14. package/dist/index.js +145 -122
  15. package/dist/index.js.map +1 -1
  16. package/dist/metrics/types.d.ts +3 -1
  17. package/dist/metrics/types.d.ts.map +1 -1
  18. package/dist/ontology/design-graph.d.ts +85 -0
  19. package/dist/ontology/design-graph.d.ts.map +1 -0
  20. package/dist/ontology/design-graph.js +944 -0
  21. package/dist/ontology/design-graph.js.map +1 -0
  22. package/dist/ontology/index.d.ts +11 -0
  23. package/dist/ontology/index.d.ts.map +1 -0
  24. package/dist/ontology/index.js +14 -0
  25. package/dist/ontology/index.js.map +1 -0
  26. package/dist/ontology/semantic-vocabulary.d.ts +12 -0
  27. package/dist/ontology/semantic-vocabulary.d.ts.map +1 -0
  28. package/dist/ontology/semantic-vocabulary.js +26 -0
  29. package/dist/ontology/semantic-vocabulary.js.map +1 -0
  30. package/dist/ontology/types.d.ts +255 -0
  31. package/dist/ontology/types.d.ts.map +1 -0
  32. package/dist/ontology/types.js +10 -0
  33. package/dist/ontology/types.js.map +1 -0
  34. package/dist/ontology/validator.d.ts +36 -0
  35. package/dist/ontology/validator.d.ts.map +1 -0
  36. package/dist/ontology/validator.js +374 -0
  37. package/dist/ontology/validator.js.map +1 -0
  38. package/dist/ontology/vocabulary.d.ts +34 -0
  39. package/dist/ontology/vocabulary.d.ts.map +1 -0
  40. package/dist/ontology/vocabulary.js +395 -0
  41. package/dist/ontology/vocabulary.js.map +1 -0
  42. package/dist/prompts/index.d.ts +3 -12
  43. package/dist/prompts/index.d.ts.map +1 -1
  44. package/dist/prompts/index.js +5 -96
  45. package/dist/prompts/index.js.map +1 -1
  46. package/dist/tools/compact-descriptions.d.ts +3 -3
  47. package/dist/tools/compact-descriptions.d.ts.map +1 -1
  48. package/dist/tools/compact-descriptions.js +58 -215
  49. package/dist/tools/compact-descriptions.js.map +1 -1
  50. package/dist/tools/definitions.d.ts +6 -4
  51. package/dist/tools/definitions.d.ts.map +1 -1
  52. package/dist/tools/definitions.js +789 -65
  53. package/dist/tools/definitions.js.map +1 -1
  54. package/dist/tools/handlers.d.ts.map +1 -1
  55. package/dist/tools/handlers.js +616 -86
  56. package/dist/tools/handlers.js.map +1 -1
  57. package/dist/tools/index.d.ts +3 -1
  58. package/dist/tools/index.d.ts.map +1 -1
  59. package/dist/tools/index.js +2 -1
  60. package/dist/tools/index.js.map +1 -1
  61. package/dist/tools/minimal-descriptions.d.ts +9 -0
  62. package/dist/tools/minimal-descriptions.d.ts.map +1 -0
  63. package/dist/tools/minimal-descriptions.js +178 -0
  64. package/dist/tools/minimal-descriptions.js.map +1 -0
  65. package/dist/tools/toolkits.d.ts +51 -0
  66. package/dist/tools/toolkits.d.ts.map +1 -0
  67. package/dist/tools/toolkits.js +366 -0
  68. package/dist/tools/toolkits.js.map +1 -0
  69. package/dist/types/code-generator.d.ts +14 -6
  70. package/dist/types/code-generator.d.ts.map +1 -1
  71. package/dist/types/code-generator.js +654 -196
  72. package/dist/types/code-generator.js.map +1 -1
  73. package/dist/types/schemas.d.ts +429 -147
  74. package/dist/types/schemas.d.ts.map +1 -1
  75. package/dist/types/schemas.js +159 -49
  76. package/dist/types/schemas.js.map +1 -1
  77. package/manifest.json +30 -6
  78. package/package.json +2 -2
@@ -1,38 +1,12 @@
1
1
  /**
2
2
  * MCP Prompts — Template Recipes
3
3
  *
4
- * Each prompt replicates a specific PinePaper template pattern.
5
- * The assistant message is kept ultra-concise to prevent:
6
- * - Token waste from verbose planning
7
- * - Pipeline restarts from step-by-step tool lists
8
- * - Duplicate items from re-execution
9
- *
10
- * Rules:
11
- * - User message: frames the request with the user's description
12
- * - Assistant message: short commitment to single-pass execution
13
- * - Visual templates: use SINGLE_PASS_RULES (batch_execute) with layer labels (CANVAS/ITEMS/ANIMATE/EFFECTS/PLAY)
14
- * - Diagram templates: use DIAGRAM_RULES (create_diagram_shape + connect + auto_layout)
15
- * - NEVER restart the pipeline
4
+ * Each prompt frames a user request as a single user message.
5
+ * No assistant pre-fill — let the model respond naturally.
6
+ * Workflow rules are handled by start_job guidance and tool descriptions.
16
7
  */
17
8
  // -----------------------------------------------------------------------------
18
- // Shared rules injected into every assistant message
19
- // -----------------------------------------------------------------------------
20
- const SINGLE_PASS_RULES = `RULES — follow exactly:
21
- - start_job → batch_execute (ALL operations in ONE call) → end_job (screenshot) → show user → iterate
22
- - batch_execute supports: set_canvas_size, set_background, execute_generator, create, modify, delete, animate, keyframe_animate, relation, apply_mask, apply_effect, play_timeline
23
- - Use execute_generator for rich backgrounds (drawBokeh, drawGradientMesh, drawWaves, etc.) — much better than solid colors
24
- - NEVER restart the pipeline — if user wants changes, modify items or start a new job
25
- - After end_job, SHOW the screenshot and ask user if the design looks good`;
26
- const DIAGRAM_RULES = `RULES — follow exactly:
27
- - start_job → create shapes (pinepaper_create_diagram_shape) → connect (pinepaper_connect) → optionally auto_layout → end_job
28
- - Analyze the description to infer ALL shapes, decisions, and connections
29
- - Shape types: terminal (start/end), process (steps), decision (branches), data (I/O), document, database
30
- - Position shapes explicitly when layout matters; use auto_layout only for tree/hierarchical flows
31
- - Curved connectors follow source→target regardless of positioning, so manual placement works fine
32
- - NEVER restart the pipeline
33
- - After end_job, SHOW the screenshot and ask user if the design looks good`;
34
- // -----------------------------------------------------------------------------
35
- // Prompt definitions — each has a single declarative description argument
9
+ // Prompt definitions
36
10
  // -----------------------------------------------------------------------------
37
11
  const MOTIVATIONAL_QUOTE_PROMPT = {
38
12
  name: 'motivational-quote',
@@ -100,7 +74,7 @@ export const PROMPTS = [
100
74
  CINEMA_TITLES_PROMPT,
101
75
  ];
102
76
  // -----------------------------------------------------------------------------
103
- // Message builders — ultra-concise, batch-first, no tool lists
77
+ // Message builders — user message only, no assistant pre-fill
104
78
  // -----------------------------------------------------------------------------
105
79
  function buildMotivationalQuote(args = {}) {
106
80
  const description = args.description || 'Dream big — bold and energetic';
@@ -112,19 +86,6 @@ function buildMotivationalQuote(args = {}) {
112
86
  text: `Create an animated motivational quote poster: ${description}`,
113
87
  },
114
88
  },
115
- {
116
- role: 'assistant',
117
- content: {
118
- type: 'text',
119
- text: `I'll create this. All operations in one batch_execute call, then show you the result for feedback.
120
-
121
- ${SINGLE_PASS_RULES}
122
-
123
- CANVAS: execute_generator (match mood) / ITEMS: create text (quote + attribution) / ANIMATE: keyframe_animate (staggered reveals) / EFFECTS: apply_mask (wipeUp or iris) / PLAY: play_timeline.
124
-
125
- Starting now.`,
126
- },
127
- },
128
89
  ];
129
90
  }
130
91
  function buildTextRevealUp(args = {}) {
@@ -137,19 +98,6 @@ function buildTextRevealUp(args = {}) {
137
98
  text: `Create a text reveal animation: ${description}`,
138
99
  },
139
100
  },
140
- {
141
- role: 'assistant',
142
- content: {
143
- type: 'text',
144
- text: `I'll create this. All operations in one batch_execute call, then show you the result.
145
-
146
- ${SINGLE_PASS_RULES}
147
-
148
- CANVAS: execute_generator (match style) / ITEMS: create text (one per word, each on its own line — stack vertically with Y spacing ≥ fontSize × 1.4, NEVER same position) / ANIMATE: keyframe_animate (staggered fade-in, each word 0.3s after previous) / EFFECTS: apply_mask (wipeUp per item) / PLAY: play_timeline.
149
-
150
- Starting now.`,
151
- },
152
- },
153
101
  ];
154
102
  }
155
103
  function buildSimpleDecisionFlow(args = {}) {
@@ -162,19 +110,6 @@ function buildSimpleDecisionFlow(args = {}) {
162
110
  text: `Create a decision flowchart: ${description}`,
163
111
  },
164
112
  },
165
- {
166
- role: 'assistant',
167
- content: {
168
- type: 'text',
169
- text: `I'll create this flowchart using diagram tools, then show you the result.
170
-
171
- ${DIAGRAM_RULES}
172
-
173
- DESIGN: Analyze description → identify shapes (terminal, process, decision) → create_diagram_shape each (position explicitly or let auto_layout arrange) → connect with arrows.
174
-
175
- Starting now.`,
176
- },
177
- },
178
113
  ];
179
114
  }
180
115
  function buildSolarSystem(args = {}) {
@@ -187,19 +122,6 @@ function buildSolarSystem(args = {}) {
187
122
  text: `Create an animated solar system: ${description}`,
188
123
  },
189
124
  },
190
- {
191
- role: 'assistant',
192
- content: {
193
- type: 'text',
194
- text: `I'll create this. All operations in one batch_execute call, then show you the result.
195
-
196
- ${SINGLE_PASS_RULES}
197
-
198
- CANVAS: set_background (#0a0a2e) + execute_generator (drawBokeh starfield) / ITEMS: create (sun, orbits, planets) / ANIMATE: animate (sun pulse) + relation (orbits) + keyframe_animate (comet) / PLAY: play_timeline.
199
-
200
- Starting now.`,
201
- },
202
- },
203
125
  ];
204
126
  }
205
127
  function buildCinemaTitles(args = {}) {
@@ -212,19 +134,6 @@ function buildCinemaTitles(args = {}) {
212
134
  text: `Create a cinematic title sequence: ${description}`,
213
135
  },
214
136
  },
215
- {
216
- role: 'assistant',
217
- content: {
218
- type: 'text',
219
- text: `I'll create this. All operations in one batch_execute call, then show you the result.
220
-
221
- ${SINGLE_PASS_RULES}
222
-
223
- CANVAS: set_background (#000000) / ITEMS: create text (title + subtitle, opacity:0) / ANIMATE: keyframe_animate (fade in + scale, staggered) / EFFECTS: apply_mask (cinematic letterbox) / PLAY: play_timeline.
224
-
225
- Starting now.`,
226
- },
227
- },
228
137
  ];
229
138
  }
230
139
  // -----------------------------------------------------------------------------
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AA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I,IAAI,EAAE,CAAC;KAC9B,CAAC;AACJ,CAAC"}
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * Compact tool descriptions for reduced context usage.
3
3
  *
4
- * Activated via PINEPAPER_TOOL_VERBOSITY=compact env var.
5
- * Cuts ~58% from the 13 largest tool descriptions while preserving
6
- * USE WHEN guidance, critical warnings, and resource doc references.
4
+ * Activated via PINEPAPER_VERBOSITY=compact env var.
5
+ * Each description says ONLY what the tool does in 1-2 sentences.
6
+ * Workflow instructions belong in pinepaper_tool_guide, not here.
7
7
  */
8
8
  export declare const COMPACT_DESCRIPTIONS: Record<string, string>;
9
9
  //# 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,CAyQvD,CAAC"}
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,260 +1,103 @@
1
1
  /**
2
2
  * Compact tool descriptions for reduced context usage.
3
3
  *
4
- * Activated via PINEPAPER_TOOL_VERBOSITY=compact env var.
5
- * Cuts ~58% from the 13 largest tool descriptions while preserving
6
- * USE WHEN guidance, critical warnings, and resource doc references.
4
+ * Activated via PINEPAPER_VERBOSITY=compact env var.
5
+ * Each description says ONLY what the tool does in 1-2 sentences.
6
+ * Workflow instructions belong in pinepaper_tool_guide, not here.
7
7
  */
8
8
  export const COMPACT_DESCRIPTIONS = {
9
9
  // -------------------------------------------------------------------------
10
- // batch_execute — 4382 → ~1200 chars
10
+ // Minimal toolkit tools
11
11
  // -------------------------------------------------------------------------
12
- pinepaper_agent_batch_execute: `Execute ALL operations in a single call for building animated scenes — canvas setup, backgrounds, items, animations, masks, effects, and playback.
12
+ pinepaper_set_background_color: `Set the canvas background color. Pass a hex color string (e.g. "#0f172a").`,
13
+ pinepaper_set_canvas_size: `Set canvas dimensions. Use width+height or a preset: instagram (1080x1080), youtube (1920x1080), tiktok (1080x1920), twitter (1200x675).`,
14
+ pinepaper_get_canvas_size: `Get current canvas width and height.`,
15
+ pinepaper_clear_canvas: `Remove all items from the canvas.`,
16
+ pinepaper_refresh_page: `Reload the PinePaper browser page for a clean start.`,
17
+ pinepaper_browser_connect: `Connect to PinePaper Studio. Pass headless: false to show the browser window.`,
18
+ pinepaper_browser_disconnect: `Disconnect from the browser.`,
19
+ pinepaper_browser_screenshot: `Take a screenshot of the current canvas.`,
20
+ pinepaper_browser_status: `Check browser connection status.`,
21
+ pinepaper_agent_start_job: `CALL THIS when the user asks to create any animation, video, graphic, or visual content. Do NOT create standalone HTML pages, React apps, or use frontend design skills — PinePaper tools ARE the implementation. If tools fail, report the error — never fall back to HTML pages.
13
22
 
14
- NOTE: For diagrams (flowcharts, UML), use pinepaper_create_diagram_shape + pinepaper_connect instead.
15
-
16
- ⚠️ EVERY operation executes LIVE on the canvas. Calling this twice DOUBLES all items. Call ONCE per pipeline.
17
-
18
- WORKFLOW: pinepaper_agent_start_job → pinepaper_agent_batch_execute → pinepaper_agent_end_job
19
-
20
- OPERATION TYPES (12, use in order): set_canvas_size, set_background, execute_generator, create, modify, delete, animate, keyframe_animate, relation, apply_mask, apply_effect, play_timeline.
21
-
22
- VARIABLE REFERENCES: "$0", "$1" etc. reference items by creation order within the batch.
23
-
24
- ⚠️ SIZING: All positions/sizes MUST fit within the canvas. start_job returns canvasSize — keep items within 5%-95% of canvas width/height. Max canvas: 4096x4096.
25
-
26
- See inputSchema for per-operation params and enum values. See pinepaper://docs/getting-started for full workflow.`,
23
+ Pass description for creative direction and canvasPreset for platform sizing. WORKFLOW: start_job → batch_execute (ONE call) → end_job → export.`,
24
+ pinepaper_agent_end_job: `Finish the current job and get a screenshot. Show it to the user.`,
25
+ pinepaper_agent_reset: `Quick canvas reset. Faster than refresh_page.`,
26
+ 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
+ pinepaper_tool_guide: `Get detailed docs for any tool or category. Call with no args for the full workflow guide.`,
29
+ pinepaper_set_toolkit: `Switch available tools. Toolkits: agent, diagram, map, font, full, minimal. Verbosity: verbose, compact, minimal.`,
27
30
  // -------------------------------------------------------------------------
28
- // create_item — 4287 → ~1500 chars
31
+ // batch_execute
29
32
  // -------------------------------------------------------------------------
30
- pinepaper_create_item: `Create an item on the PinePaper canvas. Returns an itemId (e.g., "item_1") that you MUST save to reference this item later.
31
-
32
- USE WHEN: Adding text, shapes, or graphics to the canvas.
33
+ pinepaper_agent_batch_execute: `Execute multiple operations in a single call — canvas setup, items, animations, effects, playback. Call ONCE per pipeline — calling twice doubles all items.
33
34
 
34
- IMPORTANT:
35
- - Save the returned itemId for later use with relations, modify, delete, etc.
36
- - If there's a welcome template on the canvas, use pinepaper_clear_canvas first.
37
- - Position defaults to canvas center (400, 300). Use position: {x, y} to place elsewhere.
38
- - DO NOT take screenshots after every create. Trust the API response — take ONE screenshot at the end.
35
+ OPERATION TYPES (12): set_canvas_size, set_background, execute_generator, create, modify, delete, animate, keyframe_animate, relation, apply_mask, apply_effect, play_timeline.
39
36
 
40
- ⚠️ COMPLEX CHARACTERS (witch, cat face, person): Use pinepaper_import_svg or compose from simple shapes. Do NOT attempt pixel-level path drawing.
37
+ VARIABLE REFERENCES: "$0", "$1" etc. reference items by creation order within the batch.`,
38
+ // -------------------------------------------------------------------------
39
+ // create_item
40
+ // -------------------------------------------------------------------------
41
+ pinepaper_create_item: `Create a text, shape, or graphic on the canvas. Returns an itemId for later reference.
41
42
 
42
43
  ITEM TYPES: text, circle, rectangle, star, triangle, polygon, ellipse, path, line, arc.
43
-
44
- PATH FOR CUSTOM SHAPES: Use itemType "path" with segments ([[x,y]...]) or pathData (SVG string).
45
-
46
- STYLING: All shapes support gradients (color object with stops), shadows (shadowColor, shadowBlur, shadowOffset), blend modes, and opacity. See inputSchema for full properties per type.
47
-
48
- EXAMPLE: {itemType: "text", properties: {content: "HELLO", color: "#ef4444", fontSize: 48}}
49
-
50
- After creating items, use pinepaper_add_relation to animate them.`,
44
+ STYLING: gradients (color object with stops), shadows, blend modes, opacity. See inputSchema for properties.`,
51
45
  // -------------------------------------------------------------------------
52
- // p5_draw — 3394 → ~1200 chars
46
+ // p5_draw
53
47
  // -------------------------------------------------------------------------
54
- pinepaper_p5_draw: `Execute p5.js-style drawing code on the PinePaper canvas. Code is translated to Paper.js automatically. This is a SUBSET of p5.js for static drawings.
55
-
56
- AVAILABLE: circle, ellipse, rect, line, triangle, quad, arc, point, fill, noFill, stroke, noStroke, strokeWeight, background, random, map, constrain, dist, lerp, radians, degrees, rectMode, ellipseMode, width, height, PI, TWO_PI, HALF_PI.
48
+ pinepaper_p5_draw: `Draw on canvas using p5.js-style code (circle, rect, line, fill, etc.). Code is translated to Paper.js automatically.
57
49
 
58
- NOT SUPPORTED (use native PinePaper tools instead):
59
- - setup()/draw() loop → pinepaper_animate / pinepaper_add_relation
60
- - noise(), text(), loadImage(), push()/pop()/translate()/rotate()/scale(), beginShape()/vertex()/endShape()
61
-
62
- Code runs directly — NO setup() or draw() wrapper. Items are auto-registered, selectable, animatable, and exportable.
63
-
64
- EXAMPLE:
65
- background(30);
66
- noStroke();
67
- for (let i = 0; i < 20; i++) {
68
- fill(random(255), random(255), random(255));
69
- circle(random(width), random(height), random(20, 80));
70
- }`,
50
+ AVAILABLE: circle, ellipse, rect, line, triangle, quad, arc, point, fill, noFill, stroke, noStroke, strokeWeight, background, random, map, constrain, dist, lerp, radians, degrees, width, height, PI, TWO_PI, HALF_PI.
51
+ NOT SUPPORTED: setup()/draw() loop, noise(), text(), loadImage(), transforms, beginShape()/vertex().`,
71
52
  // -------------------------------------------------------------------------
72
- // create_scene — 2754 → ~1500 chars
53
+ // create_scene
73
54
  // -------------------------------------------------------------------------
74
- pinepaper_create_scene: `Create a complete scene with multiple items, relations, and animations in a single operation. The MOST EFFICIENT way to create complex animated scenes.
75
-
76
- USE WHEN: Creating multi-item animated scenes (solar systems, bouncing balls, etc.) where performance matters. Reduces 4+ tool calls to 1.
77
-
78
- HOW IT WORKS:
79
- 1. Define items with "name" references (e.g., "sun", "earth", "moon")
80
- 2. Define relations using those names (e.g., source: "earth", target: "sun")
81
- 3. Define animations using names (e.g., target: "sun", type: "pulse")
82
- 4. Server creates all items, then establishes relations and animations
83
-
84
- EXAMPLE — Solar System:
85
- {backgroundColor: "#0a0a0a", items: [
86
- {name: "sun", itemType: "circle", position: {x: 400, y: 300}, properties: {radius: 50, color: "#fbbf24"}},
87
- {name: "earth", itemType: "circle", position: {x: 550, y: 300}, properties: {radius: 20, color: "#3b82f6"}}
88
- ], relations: [
89
- {source: "earth", target: "sun", type: "orbits", params: {radius: 150, speed: 0.5}}
90
- ], animations: [
91
- {target: "sun", type: "pulse", speed: 0.3}
92
- ]}
55
+ 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.
93
56
 
94
57
  Item types: text, circle, star, rectangle, triangle, polygon, ellipse, path, line, arc.
95
- Relations: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to, + more (see inputSchema).
58
+ Relations: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to.
96
59
  Animations: pulse, rotate, bounce, fade, wobble, slide, typewriter.`,
97
60
  // -------------------------------------------------------------------------
98
- // execute_generator — 2202 → ~900 chars
61
+ // execute_generator
99
62
  // -------------------------------------------------------------------------
100
- pinepaper_execute_generator: `Execute a background generator to create procedural patterns.
101
-
102
- USE WHEN: Creating dynamic procedural backgrounds — sunbursts, bokeh, gradients, waves, noise textures, etc.
103
-
104
- GENERATORS (14):
105
- Classic: drawSunburst, drawSunsetScene, drawGrid, drawStackedCircles, drawCircuit, drawWaves, drawPattern
106
- Effects: drawBokeh
107
- Organic: drawGradientMesh, drawFluidFlow, drawOrganicFlow
108
- Geometric: drawGeometricAbstract
109
- Particles: drawWindField
110
- Textures: drawNoiseTexture
63
+ pinepaper_execute_generator: `Run a procedural background generator (sunburst, bokeh, gradient mesh, etc.).
111
64
 
112
- Each generator accepts generatorParams — see pinepaper://docs/generators for full parameter docs per generator, or use inputSchema for the param schema.`,
65
+ GENERATORS (14): drawSunburst, drawSunsetScene, drawGrid, drawStackedCircles, drawCircuit, drawWaves, drawPattern, drawBokeh, drawGradientMesh, drawGeometricAbstract, drawWindField, drawFluidFlow, drawOrganicFlow, drawNoiseTexture.`,
113
66
  // -------------------------------------------------------------------------
114
- // get_performance_metrics — 2176 → ~1000 chars
67
+ // get_performance_metrics
115
68
  // -------------------------------------------------------------------------
116
- pinepaper_get_performance_metrics: `[Utility] Get execution performance metrics to identify bottlenecks and optimize workflows.
117
-
118
- USE WHEN: Analyzing tool performance, debugging slow operations, optimizing workflows.
119
-
120
- RETURNS: Per-tool timing breakdown (validation, code gen, execution, screenshot), aggregate statistics (avg, p50, p95, p99), success rates, error counts.
121
-
122
- FORMAT OPTIONS: 'summary' (human-readable, slowest first), 'detailed' (full JSON), 'csv' (spreadsheet export).
123
-
124
- FILTER OPTIONS: toolName, phase, since (Unix timestamp), limit.
125
-
126
- EXAMPLES:
127
- - Summary of all: {}
128
- - Last 50 create_item ops: {toolName: 'pinepaper_create_item', limit: 50}
129
- - Export CSV: {format: 'csv'}`,
69
+ pinepaper_get_performance_metrics: `Get execution timing and performance data. Formats: summary, detailed, csv.`,
130
70
  // -------------------------------------------------------------------------
131
- // add_relation — 2025 → ~1200 chars
71
+ // add_relation
132
72
  // -------------------------------------------------------------------------
133
- pinepaper_add_relation: `Create a behavior relationship between two items. Relations are the PRIMARY way to add animation in PinePaper — they describe HOW items behave relative to each other.
134
-
135
- USE WHEN:
136
- - "moon orbits earth" → orbits
137
- - "label follows player" → follows
138
- - "hat attached to character" → attached_to
139
- - "arrow points at target" → points_at
140
- - "reflection mirrors original" → mirrors
141
- - "background parallax" → parallax
142
-
143
- RELATION TYPES: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to (+ more in inputSchema, each with specific params).
73
+ pinepaper_add_relation: `Add a behavior relation between two items (orbits, follows, attached_to, etc.). Relations are compositional — an item can have multiple.
144
74
 
145
- COMPATIBILITY: Position-based relations (orbits, follows, attached_to, etc.) work with ALL item types including imported SVGs/images. morphs_to has type-specific behavior.
146
-
147
- Relations are COMPOSITIONAL — an item can have multiple relations that work together.`,
75
+ RELATION TYPES: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to (+ more in inputSchema).`,
148
76
  // -------------------------------------------------------------------------
149
- // create_diagram_shape — 1974 → ~1000 chars
77
+ // create_diagram_shape
150
78
  // -------------------------------------------------------------------------
151
- pinepaper_create_diagram_shape: `Create a diagram shape for flowcharts, UML, network diagrams, and technical drawings.
152
-
153
- USE WHEN: Creating flowcharts, process diagrams, UML diagrams, network topologies, org charts, or decision trees.
154
-
155
- SHAPE TYPES:
156
- Flowchart: process, decision, terminal, data, document, database, preparation
157
- UML: uml-class, uml-usecase, uml-actor
158
- Network: cloud, server
159
- Basic: rectangle, circle, triangle, star
160
-
161
- All shapes have connection ports, support labels, and can be connected via pinepaper_connect.
79
+ pinepaper_create_diagram_shape: `Create a diagram shape (process, decision, terminal, etc.) for flowcharts and UML.
162
80
 
163
- EXAMPLE: {shapeType: "terminal", label: "Start", position: {x: 400, y: 100}}
164
-
165
- WORKFLOW: Create shapes → pinepaper_connect to draw connectors → pinepaper_auto_layout to arrange. See pinepaper://docs/diagrams for detailed guide.`,
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.`,
166
82
  // -------------------------------------------------------------------------
167
- // search_assets — 1939 → ~1000 chars
83
+ // search_assets
168
84
  // -------------------------------------------------------------------------
169
- pinepaper_search_assets: `Search for free SVG assets from open repositories (SVGRepo, OpenClipart, Iconify, FontAwesome).
170
-
171
- USE WHEN: Need icons, illustrations, clipart, or graphics too complex to draw with paths.
172
-
173
- WORKFLOW:
174
- 1. Search: pinepaper_search_assets(query: "rocket")
175
- 2. Review results (assetIds, previews, licenses)
176
- 3. Import: pinepaper_import_asset(assetId: "svgrepo_rocket_12345")
177
-
178
- IMPORTANT: Always check license field. CC-BY requires attribution (tracked automatically). CC0 has no restrictions.
179
-
180
- Set includeSvgContent: true to fetch SVG markup inline (slower, use lower limit). Search queries work best with simple, specific terms.
181
-
182
- EXAMPLE: {query: "rocket", limit: 5}`,
85
+ pinepaper_search_assets: `Search for free SVG icons and illustrations from open repositories (SVGRepo, OpenClipart, Iconify, FontAwesome).`,
183
86
  // -------------------------------------------------------------------------
184
- // connect — 1863 → ~1000 chars
87
+ // connect
185
88
  // -------------------------------------------------------------------------
186
- pinepaper_connect: `Connect two items with a smart connector — the primary way to draw lines/arrows between diagram shapes.
187
-
188
- USE WHEN: Drawing arrows between flowchart steps, UML associations, network connections, or any diagram needing lines/arrows.
189
-
190
- FEATURES: Auto port selection, smart routing, animated bolt effect, labels.
191
-
192
- ROUTING: orthogonal (right-angle, default), direct (straight), curved (bezier).
193
- ARROW STYLES: classic, stealth, sharp, open, diamond, circle, none — see inputSchema for head/tail options.
194
- LINE STYLES: solid, dashed, dotted.
195
-
196
- Enable boltEnabled: true for animated data flow particles.
197
-
198
- EXAMPLES:
199
- - Simple arrow: {sourceItemId: "shape_1", targetItemId: "shape_2"}
200
- - Labeled: {sourceItemId: "a", targetItemId: "b", label: "1..*"}
201
- - Dashed: {sourceItemId: "a", targetItemId: "b", lineStyle: "dashed", headStyle: "open"}`,
89
+ pinepaper_connect: `Draw a connector/arrow between two diagram shapes. Routing: orthogonal, direct, curved. Supports labels and animated bolt effect.`,
202
90
  // -------------------------------------------------------------------------
203
- // auto_layout — 1853 → ~1000 chars
91
+ // auto_layout
204
92
  // -------------------------------------------------------------------------
205
- pinepaper_auto_layout: `Automatically arrange diagram items using a layout algorithm for cleaner, more readable diagrams.
206
-
207
- USE WHEN: Items are messy/overlapping, need professional layout, or creating hierarchical structures.
208
-
209
- LAYOUT TYPES:
210
- - hierarchical: Flowcharts, org charts, dependency graphs (direction: TB/BT/LR/RL)
211
- - force-directed: Network diagrams, relationship graphs (physics simulation)
212
- - tree: Hierarchies, file systems (optimized tree structure)
213
- - radial: Mind maps, hub-and-spoke (concentric circles)
214
- - grid: Equal-importance items, component libraries (rows/columns)
215
-
216
- Set animate: false for instant repositioning. Pass itemIds to layout only specific items.
217
-
218
- EXAMPLES:
219
- - Flowchart: {layoutType: "hierarchical", options: {direction: "TB", levelSpacing: 100}}
220
- - Network: {layoutType: "force-directed", options: {iterations: 200}}
221
- - Grid: {layoutType: "grid", options: {columns: 4}}`,
93
+ pinepaper_auto_layout: `Arrange diagram items using a layout algorithm (hierarchical, force-directed, tree, radial, grid).`,
222
94
  // -------------------------------------------------------------------------
223
- // import_asset — 1714 → ~800 chars
95
+ // import_asset
224
96
  // -------------------------------------------------------------------------
225
- pinepaper_import_asset: `Import an SVG asset from search results or direct URL onto the canvas.
226
-
227
- USE WHEN: After searching with pinepaper_search_assets, or importing from a direct SVG URL.
228
-
229
- WORKFLOW: Search → Choose (check license) → Import → Modify/Animate as needed.
230
-
231
- PARAMS: assetId (from search) OR url (direct SVG URL), position, scale, color (override for monochrome icons).
232
-
233
- License metadata is tracked automatically. CC-BY attribution is added to canvas metadata. Downloaded SVGs are cached in memory for the session.
234
-
235
- EXAMPLE: {assetId: "svgrepo_rocket_001", position: {x: 400, y: 300}, scale: 2.0}
236
-
237
- RETURNS: itemId (for further modifications), metadata (including license).`,
97
+ pinepaper_import_asset: `Import an SVG asset from search results or URL onto the canvas. Returns an itemId for modifications.`,
238
98
  // -------------------------------------------------------------------------
239
- // agent_export — 1615 → ~900 chars
99
+ // agent_export
240
100
  // -------------------------------------------------------------------------
241
- pinepaper_agent_export: `Smart export with automatic format detection and platform optimization.
242
-
243
- USE WHEN: Exporting for social media, print, or web with optimal format auto-selected.
244
-
245
- PLATFORMS:
246
- | Platform | Size | Static | Animated |
247
- |------------------|------------|--------|----------|
248
- | instagram | 1080x1080 | PNG | MP4 |
249
- | instagram-story | 1080x1920 | PNG | MP4 |
250
- | tiktok | 1080x1920 | PNG | MP4@60fps|
251
- | youtube | 1920x1080 | PNG | MP4 |
252
- | youtube-thumbnail| 1280x720 | PNG | PNG |
253
- | twitter | 1200x675 | PNG | GIF |
254
- | linkedin | 1200x627 | PNG | GIF |
255
- | web | flexible | SVG | SVG |
256
- | print-a4/letter | A4/Letter | PDF | PDF |
257
-
258
- Format override: svg, png, gif, mp4, webm, pdf. Quality: draft, standard, high. See inputSchema for details.`,
101
+ pinepaper_agent_export: `Export as MP4, GIF, PNG, SVG, or PDF. Formats: svg, png, gif, mp4, webm, pdf. Quality: draft, standard, high.`,
259
102
  };
260
103
  //# 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,qCAAqC;IACrC,4EAA4E;IAC5E,6BAA6B,EAAE;;;;;;;;;;;;;;kHAciF;IAEhH,4EAA4E;IAC5E,mCAAmC;IACnC,4EAA4E;IAC5E,qBAAqB,EAAE;;;;;;;;;;;;;;;;;;;;kEAoByC;IAEhE,4EAA4E;IAC5E,+BAA+B;IAC/B,4EAA4E;IAC5E,iBAAiB,EAAE;;;;;;;;;;;;;;;;EAgBnB;IAEA,4EAA4E;IAC5E,oCAAoC;IACpC,4EAA4E;IAC5E,sBAAsB,EAAE;;;;;;;;;;;;;;;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;IAC5E,sBAAsB,EAAE,+GAA+G;CAExI,CAAC"}
@@ -9,6 +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
13
  export declare const PINEPAPER_TOOLS: Tool[];
13
14
  /**
14
15
  * Get a tool definition by name
@@ -25,14 +26,15 @@ export declare function getToolNames(): string[];
25
26
  export declare function getLocalizedTools(i18n: I18nManager): Tool[];
26
27
  /**
27
28
  * Tool description verbosity level.
28
- * - 'verbose': Full descriptions (default, ~42K tokens)
29
+ * - 'verbose': Full descriptions (~42K tokens for full toolkit)
29
30
  * - 'compact': Trimmed descriptions for the 13 largest tools (~37K tokens)
31
+ * - 'minimal': 1-line summaries for all tools (~22K tokens). Use pinepaper_tool_guide for details.
30
32
  */
31
- export type ToolVerbosity = 'verbose' | 'compact';
33
+ export type ToolVerbosity = 'verbose' | 'compact' | 'minimal';
32
34
  /**
33
35
  * Get tools with the specified verbosity level.
34
- * Compact mode swaps in shorter descriptions for the 13 largest tools,
35
- * reducing context usage by ~5K tokens while preserving critical guidance.
36
+ * Compact mode swaps in shorter descriptions for the 13 largest tools.
37
+ * Minimal mode swaps in 1-line summaries for ALL tools (on-demand guide available).
36
38
  */
37
39
  export declare function getToolsForVerbosity(verbosity: ToolVerbosity): Tool[];
38
40
  //# sourceMappingURL=definitions.d.ts.map
@@ -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;AA4G/C,eAAO,MAAM,eAAe,EA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