@pinepaper.studio/mcp-server 1.5.1 → 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.
- package/dist/agent/types.d.ts +6 -6
- package/dist/browser/puppeteer-controller.d.ts +5 -1
- package/dist/browser/puppeteer-controller.d.ts.map +1 -1
- package/dist/browser/puppeteer-controller.js +11 -3
- package/dist/browser/puppeteer-controller.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +80 -106
- package/dist/index.js.map +1 -1
- package/dist/ontology/design-graph.d.ts +85 -0
- package/dist/ontology/design-graph.d.ts.map +1 -0
- package/dist/ontology/design-graph.js +944 -0
- package/dist/ontology/design-graph.js.map +1 -0
- package/dist/ontology/index.d.ts +11 -0
- package/dist/ontology/index.d.ts.map +1 -0
- package/dist/ontology/index.js +14 -0
- package/dist/ontology/index.js.map +1 -0
- package/dist/ontology/semantic-vocabulary.d.ts +12 -0
- package/dist/ontology/semantic-vocabulary.d.ts.map +1 -0
- package/dist/ontology/semantic-vocabulary.js +26 -0
- package/dist/ontology/semantic-vocabulary.js.map +1 -0
- package/dist/ontology/types.d.ts +255 -0
- package/dist/ontology/types.d.ts.map +1 -0
- package/dist/ontology/types.js +10 -0
- package/dist/ontology/types.js.map +1 -0
- package/dist/ontology/validator.d.ts +36 -0
- package/dist/ontology/validator.d.ts.map +1 -0
- package/dist/ontology/validator.js +374 -0
- package/dist/ontology/validator.js.map +1 -0
- package/dist/ontology/vocabulary.d.ts +34 -0
- package/dist/ontology/vocabulary.d.ts.map +1 -0
- package/dist/ontology/vocabulary.js +395 -0
- package/dist/ontology/vocabulary.js.map +1 -0
- package/dist/tools/compact-descriptions.d.ts +2 -2
- package/dist/tools/compact-descriptions.d.ts.map +1 -1
- package/dist/tools/compact-descriptions.js +45 -233
- package/dist/tools/compact-descriptions.js.map +1 -1
- package/dist/tools/definitions.d.ts +1 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +638 -31
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +290 -145
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/minimal-descriptions.d.ts.map +1 -1
- package/dist/tools/minimal-descriptions.js +22 -2
- package/dist/tools/minimal-descriptions.js.map +1 -1
- package/dist/tools/toolkits.d.ts.map +1 -1
- package/dist/tools/toolkits.js +31 -1
- package/dist/tools/toolkits.js.map +1 -1
- package/dist/types/code-generator.d.ts +14 -2
- package/dist/types/code-generator.d.ts.map +1 -1
- package/dist/types/code-generator.js +635 -6
- package/dist/types/code-generator.js.map +1 -1
- package/dist/types/schemas.d.ts +387 -82
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +136 -2
- package/dist/types/schemas.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,290 +2,102 @@
|
|
|
2
2
|
* Compact tool descriptions for reduced context usage.
|
|
3
3
|
*
|
|
4
4
|
* Activated via PINEPAPER_VERBOSITY=compact env var.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
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
|
-
// Minimal toolkit tools
|
|
10
|
+
// Minimal toolkit tools
|
|
11
11
|
// -------------------------------------------------------------------------
|
|
12
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)
|
|
13
|
+
pinepaper_set_canvas_size: `Set canvas dimensions. Use width+height or a preset: instagram (1080x1080), youtube (1920x1080), tiktok (1080x1920), twitter (1200x675).`,
|
|
14
14
|
pinepaper_get_canvas_size: `Get current canvas width and height.`,
|
|
15
15
|
pinepaper_clear_canvas: `Remove all items from the canvas.`,
|
|
16
16
|
pinepaper_refresh_page: `Reload the PinePaper browser page for a clean start.`,
|
|
17
|
-
pinepaper_browser_connect: `Connect to PinePaper Studio.
|
|
17
|
+
pinepaper_browser_connect: `Connect to PinePaper Studio. Pass headless: false to show the browser window.`,
|
|
18
18
|
pinepaper_browser_disconnect: `Disconnect from the browser.`,
|
|
19
|
-
pinepaper_browser_screenshot: `Take a screenshot of the current canvas
|
|
19
|
+
pinepaper_browser_screenshot: `Take a screenshot of the current canvas.`,
|
|
20
20
|
pinepaper_browser_status: `Check browser connection status.`,
|
|
21
|
-
pinepaper_agent_start_job: `
|
|
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.
|
|
22
22
|
|
|
23
|
-
Pass
|
|
24
|
-
|
|
25
|
-
WORKFLOW: start_job → batch_execute (ONE call with ALL operations) → end_job → show screenshot → export if requested.`,
|
|
26
|
-
pinepaper_agent_end_job: `Finish the current animation job. Returns a screenshot — SHOW it to the user and ask if the design looks good.`,
|
|
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.`,
|
|
27
25
|
pinepaper_agent_reset: `Quick canvas reset. Faster than refresh_page.`,
|
|
28
26
|
pinepaper_agent_analyze: `Analyze what's on the canvas and get export recommendations.`,
|
|
29
27
|
pinepaper_get_canvas_presets: `List available canvas size presets (YouTube, Instagram, TikTok, etc.).`,
|
|
30
|
-
pinepaper_tool_guide: `Get detailed docs for any tool or category. Call with no args for the full workflow guide
|
|
31
|
-
pinepaper_set_toolkit: `Switch available tools
|
|
32
|
-
|
|
33
|
-
Toolkits: agent (animations/graphics), diagram (flowcharts/UML), map (geographic maps), font (font creation), full (all 120+ tools), minimal (core only).
|
|
34
|
-
Verbosity: verbose (full docs), compact (shorter), minimal (1-line summaries).
|
|
35
|
-
|
|
36
|
-
Example: User asks for a map → call set_toolkit({toolkit: "map"}).`,
|
|
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.`,
|
|
37
30
|
// -------------------------------------------------------------------------
|
|
38
|
-
// batch_execute
|
|
31
|
+
// batch_execute
|
|
39
32
|
// -------------------------------------------------------------------------
|
|
40
|
-
pinepaper_agent_batch_execute: `
|
|
41
|
-
|
|
42
|
-
NOTE: For diagrams (flowcharts, UML), use pinepaper_create_diagram_shape + pinepaper_connect instead.
|
|
43
|
-
|
|
44
|
-
⚠️ EVERY operation executes LIVE on the canvas. Calling this twice DOUBLES all items. Call ONCE per pipeline.
|
|
45
|
-
|
|
46
|
-
WORKFLOW: pinepaper_agent_start_job → pinepaper_agent_batch_execute → pinepaper_agent_end_job
|
|
47
|
-
|
|
48
|
-
PATTERN — Always follow this order:
|
|
49
|
-
1. set_canvas_size / set_background / execute_generator (canvas setup)
|
|
50
|
-
2. create (items — text, shapes, etc.)
|
|
51
|
-
3. animate or keyframe_animate for EACH created item ("$0", "$1", ...) — REQUIRED for animated content
|
|
52
|
-
4. relation / apply_mask / apply_effect (optional enhancements)
|
|
53
|
-
5. play_timeline (REQUIRED — starts playback, without this nothing moves)
|
|
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.
|
|
54
34
|
|
|
55
35
|
OPERATION TYPES (12): set_canvas_size, set_background, execute_generator, create, modify, delete, animate, keyframe_animate, relation, apply_mask, apply_effect, play_timeline.
|
|
56
36
|
|
|
57
|
-
VARIABLE REFERENCES: "$0", "$1" etc. reference items by creation order within the batch
|
|
58
|
-
|
|
59
|
-
⚠️ 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.
|
|
60
|
-
|
|
61
|
-
See inputSchema for per-operation params and enum values. See pinepaper://docs/getting-started for full workflow.`,
|
|
37
|
+
VARIABLE REFERENCES: "$0", "$1" etc. reference items by creation order within the batch.`,
|
|
62
38
|
// -------------------------------------------------------------------------
|
|
63
|
-
// create_item
|
|
39
|
+
// create_item
|
|
64
40
|
// -------------------------------------------------------------------------
|
|
65
|
-
pinepaper_create_item: `Create
|
|
66
|
-
|
|
67
|
-
USE WHEN: Adding text, shapes, or graphics to the canvas.
|
|
68
|
-
|
|
69
|
-
IMPORTANT:
|
|
70
|
-
- Save the returned itemId for later use with relations, modify, delete, etc.
|
|
71
|
-
- If there's a welcome template on the canvas, use pinepaper_clear_canvas first.
|
|
72
|
-
- Position defaults to canvas center (400, 300). Use position: {x, y} to place elsewhere.
|
|
73
|
-
- DO NOT take screenshots after every create. Trust the API response — take ONE screenshot at the end.
|
|
74
|
-
|
|
75
|
-
⚠️ COMPLEX CHARACTERS (witch, cat face, person): Use pinepaper_import_svg or compose from simple shapes. Do NOT attempt pixel-level path drawing.
|
|
41
|
+
pinepaper_create_item: `Create a text, shape, or graphic on the canvas. Returns an itemId for later reference.
|
|
76
42
|
|
|
77
43
|
ITEM TYPES: text, circle, rectangle, star, triangle, polygon, ellipse, path, line, arc.
|
|
78
|
-
|
|
79
|
-
PATH FOR CUSTOM SHAPES: Use itemType "path" with segments ([[x,y]...]) or pathData (SVG string).
|
|
80
|
-
|
|
81
|
-
STYLING: All shapes support gradients (color object with stops), shadows (shadowColor, shadowBlur, shadowOffset), blend modes, and opacity. See inputSchema for full properties per type.
|
|
82
|
-
|
|
83
|
-
EXAMPLE: {itemType: "text", properties: {content: "HELLO", color: "#ef4444", fontSize: 48}}
|
|
84
|
-
|
|
85
|
-
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.`,
|
|
86
45
|
// -------------------------------------------------------------------------
|
|
87
|
-
// p5_draw
|
|
46
|
+
// p5_draw
|
|
88
47
|
// -------------------------------------------------------------------------
|
|
89
|
-
pinepaper_p5_draw: `
|
|
90
|
-
|
|
91
|
-
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.
|
|
92
|
-
|
|
93
|
-
NOT SUPPORTED (use native PinePaper tools instead):
|
|
94
|
-
- setup()/draw() loop → pinepaper_animate / pinepaper_add_relation
|
|
95
|
-
- noise(), text(), loadImage(), push()/pop()/translate()/rotate()/scale(), beginShape()/vertex()/endShape()
|
|
96
|
-
|
|
97
|
-
Code runs directly — NO setup() or draw() wrapper. Items are auto-registered, selectable, animatable, and exportable.
|
|
48
|
+
pinepaper_p5_draw: `Draw on canvas using p5.js-style code (circle, rect, line, fill, etc.). Code is translated to Paper.js automatically.
|
|
98
49
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
noStroke();
|
|
102
|
-
for (let i = 0; i < 20; i++) {
|
|
103
|
-
fill(random(255), random(255), random(255));
|
|
104
|
-
circle(random(width), random(height), random(20, 80));
|
|
105
|
-
}`,
|
|
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().`,
|
|
106
52
|
// -------------------------------------------------------------------------
|
|
107
|
-
// create_scene
|
|
53
|
+
// create_scene
|
|
108
54
|
// -------------------------------------------------------------------------
|
|
109
|
-
pinepaper_create_scene: `Create a complete scene with
|
|
110
|
-
|
|
111
|
-
USE WHEN: Creating multi-item animated scenes (solar systems, bouncing balls, etc.) where performance matters. Reduces 4+ tool calls to 1.
|
|
112
|
-
|
|
113
|
-
HOW IT WORKS:
|
|
114
|
-
1. Define items with "name" references (e.g., "sun", "earth", "moon")
|
|
115
|
-
2. Define relations using those names (e.g., source: "earth", target: "sun")
|
|
116
|
-
3. Define animations using names (e.g., target: "sun", type: "pulse")
|
|
117
|
-
4. Server creates all items, then establishes relations and animations
|
|
118
|
-
|
|
119
|
-
EXAMPLE — Solar System:
|
|
120
|
-
{backgroundColor: "#0a0a0a", items: [
|
|
121
|
-
{name: "sun", itemType: "circle", position: {x: 400, y: 300}, properties: {radius: 50, color: "#fbbf24"}},
|
|
122
|
-
{name: "earth", itemType: "circle", position: {x: 550, y: 300}, properties: {radius: 20, color: "#3b82f6"}}
|
|
123
|
-
], relations: [
|
|
124
|
-
{source: "earth", target: "sun", type: "orbits", params: {radius: 150, speed: 0.5}}
|
|
125
|
-
], animations: [
|
|
126
|
-
{target: "sun", type: "pulse", speed: 0.3}
|
|
127
|
-
]}
|
|
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.
|
|
128
56
|
|
|
129
57
|
Item types: text, circle, star, rectangle, triangle, polygon, ellipse, path, line, arc.
|
|
130
|
-
Relations: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to
|
|
58
|
+
Relations: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to.
|
|
131
59
|
Animations: pulse, rotate, bounce, fade, wobble, slide, typewriter.`,
|
|
132
60
|
// -------------------------------------------------------------------------
|
|
133
|
-
// execute_generator
|
|
61
|
+
// execute_generator
|
|
134
62
|
// -------------------------------------------------------------------------
|
|
135
|
-
pinepaper_execute_generator: `
|
|
63
|
+
pinepaper_execute_generator: `Run a procedural background generator (sunburst, bokeh, gradient mesh, etc.).
|
|
136
64
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
GENERATORS (14):
|
|
140
|
-
Classic: drawSunburst, drawSunsetScene, drawGrid, drawStackedCircles, drawCircuit, drawWaves, drawPattern
|
|
141
|
-
Effects: drawBokeh
|
|
142
|
-
Organic: drawGradientMesh, drawFluidFlow, drawOrganicFlow
|
|
143
|
-
Geometric: drawGeometricAbstract
|
|
144
|
-
Particles: drawWindField
|
|
145
|
-
Textures: drawNoiseTexture
|
|
146
|
-
|
|
147
|
-
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.`,
|
|
148
66
|
// -------------------------------------------------------------------------
|
|
149
|
-
// get_performance_metrics
|
|
67
|
+
// get_performance_metrics
|
|
150
68
|
// -------------------------------------------------------------------------
|
|
151
|
-
pinepaper_get_performance_metrics: `
|
|
152
|
-
|
|
153
|
-
USE WHEN: Analyzing tool performance, debugging slow operations, optimizing workflows.
|
|
154
|
-
|
|
155
|
-
RETURNS: Per-tool timing breakdown (validation, code gen, execution, screenshot), aggregate statistics (avg, p50, p95, p99), success rates, error counts.
|
|
156
|
-
|
|
157
|
-
FORMAT OPTIONS: 'summary' (human-readable, slowest first), 'detailed' (full JSON), 'csv' (spreadsheet export).
|
|
158
|
-
|
|
159
|
-
FILTER OPTIONS: toolName, phase, since (Unix timestamp), limit.
|
|
160
|
-
|
|
161
|
-
EXAMPLES:
|
|
162
|
-
- Summary of all: {}
|
|
163
|
-
- Last 50 create_item ops: {toolName: 'pinepaper_create_item', limit: 50}
|
|
164
|
-
- Export CSV: {format: 'csv'}`,
|
|
69
|
+
pinepaper_get_performance_metrics: `Get execution timing and performance data. Formats: summary, detailed, csv.`,
|
|
165
70
|
// -------------------------------------------------------------------------
|
|
166
|
-
// add_relation
|
|
71
|
+
// add_relation
|
|
167
72
|
// -------------------------------------------------------------------------
|
|
168
|
-
pinepaper_add_relation: `
|
|
73
|
+
pinepaper_add_relation: `Add a behavior relation between two items (orbits, follows, attached_to, etc.). Relations are compositional — an item can have multiple.
|
|
169
74
|
|
|
170
|
-
|
|
171
|
-
- "moon orbits earth" → orbits
|
|
172
|
-
- "label follows player" → follows
|
|
173
|
-
- "hat attached to character" → attached_to
|
|
174
|
-
- "arrow points at target" → points_at
|
|
175
|
-
- "reflection mirrors original" → mirrors
|
|
176
|
-
- "background parallax" → parallax
|
|
177
|
-
|
|
178
|
-
RELATION TYPES: orbits, follows, attached_to, maintains_distance, points_at, mirrors, parallax, bounds_to, morphs_to (+ more in inputSchema, each with specific params).
|
|
179
|
-
|
|
180
|
-
COMPATIBILITY: Position-based relations (orbits, follows, attached_to, etc.) work with ALL item types including imported SVGs/images. morphs_to has type-specific behavior.
|
|
181
|
-
|
|
182
|
-
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).`,
|
|
183
76
|
// -------------------------------------------------------------------------
|
|
184
|
-
// create_diagram_shape
|
|
77
|
+
// create_diagram_shape
|
|
185
78
|
// -------------------------------------------------------------------------
|
|
186
|
-
pinepaper_create_diagram_shape: `Create a diagram shape
|
|
187
|
-
|
|
188
|
-
USE WHEN: Creating flowcharts, process diagrams, UML diagrams, network topologies, org charts, or decision trees.
|
|
79
|
+
pinepaper_create_diagram_shape: `Create a diagram shape (process, decision, terminal, etc.) for flowcharts and UML.
|
|
189
80
|
|
|
190
|
-
SHAPE TYPES:
|
|
191
|
-
Flowchart: process, decision, terminal, data, document, database, preparation
|
|
192
|
-
UML: uml-class, uml-usecase, uml-actor
|
|
193
|
-
Network: cloud, server
|
|
194
|
-
Basic: rectangle, circle, triangle, star
|
|
195
|
-
|
|
196
|
-
All shapes have connection ports, support labels, and can be connected via pinepaper_connect.
|
|
197
|
-
|
|
198
|
-
EXAMPLE: {shapeType: "terminal", label: "Start", position: {x: 400, y: 100}}
|
|
199
|
-
|
|
200
|
-
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.`,
|
|
201
82
|
// -------------------------------------------------------------------------
|
|
202
|
-
// search_assets
|
|
83
|
+
// search_assets
|
|
203
84
|
// -------------------------------------------------------------------------
|
|
204
|
-
pinepaper_search_assets: `Search for free SVG
|
|
205
|
-
|
|
206
|
-
USE WHEN: Need icons, illustrations, clipart, or graphics too complex to draw with paths.
|
|
207
|
-
|
|
208
|
-
WORKFLOW:
|
|
209
|
-
1. Search: pinepaper_search_assets(query: "rocket")
|
|
210
|
-
2. Review results (assetIds, previews, licenses)
|
|
211
|
-
3. Import: pinepaper_import_asset(assetId: "svgrepo_rocket_12345")
|
|
212
|
-
|
|
213
|
-
IMPORTANT: Always check license field. CC-BY requires attribution (tracked automatically). CC0 has no restrictions.
|
|
214
|
-
|
|
215
|
-
Set includeSvgContent: true to fetch SVG markup inline (slower, use lower limit). Search queries work best with simple, specific terms.
|
|
216
|
-
|
|
217
|
-
EXAMPLE: {query: "rocket", limit: 5}`,
|
|
85
|
+
pinepaper_search_assets: `Search for free SVG icons and illustrations from open repositories (SVGRepo, OpenClipart, Iconify, FontAwesome).`,
|
|
218
86
|
// -------------------------------------------------------------------------
|
|
219
|
-
// connect
|
|
87
|
+
// connect
|
|
220
88
|
// -------------------------------------------------------------------------
|
|
221
|
-
pinepaper_connect: `
|
|
222
|
-
|
|
223
|
-
USE WHEN: Drawing arrows between flowchart steps, UML associations, network connections, or any diagram needing lines/arrows.
|
|
224
|
-
|
|
225
|
-
FEATURES: Auto port selection, smart routing, animated bolt effect, labels.
|
|
226
|
-
|
|
227
|
-
ROUTING: orthogonal (right-angle, default), direct (straight), curved (bezier).
|
|
228
|
-
ARROW STYLES: classic, stealth, sharp, open, diamond, circle, none — see inputSchema for head/tail options.
|
|
229
|
-
LINE STYLES: solid, dashed, dotted.
|
|
230
|
-
|
|
231
|
-
Enable boltEnabled: true for animated data flow particles.
|
|
232
|
-
|
|
233
|
-
EXAMPLES:
|
|
234
|
-
- Simple arrow: {sourceItemId: "shape_1", targetItemId: "shape_2"}
|
|
235
|
-
- Labeled: {sourceItemId: "a", targetItemId: "b", label: "1..*"}
|
|
236
|
-
- 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.`,
|
|
237
90
|
// -------------------------------------------------------------------------
|
|
238
|
-
// auto_layout
|
|
91
|
+
// auto_layout
|
|
239
92
|
// -------------------------------------------------------------------------
|
|
240
|
-
pinepaper_auto_layout: `
|
|
241
|
-
|
|
242
|
-
USE WHEN: Items are messy/overlapping, need professional layout, or creating hierarchical structures.
|
|
243
|
-
|
|
244
|
-
LAYOUT TYPES:
|
|
245
|
-
- hierarchical: Flowcharts, org charts, dependency graphs (direction: TB/BT/LR/RL)
|
|
246
|
-
- force-directed: Network diagrams, relationship graphs (physics simulation)
|
|
247
|
-
- tree: Hierarchies, file systems (optimized tree structure)
|
|
248
|
-
- radial: Mind maps, hub-and-spoke (concentric circles)
|
|
249
|
-
- grid: Equal-importance items, component libraries (rows/columns)
|
|
250
|
-
|
|
251
|
-
Set animate: false for instant repositioning. Pass itemIds to layout only specific items.
|
|
252
|
-
|
|
253
|
-
EXAMPLES:
|
|
254
|
-
- Flowchart: {layoutType: "hierarchical", options: {direction: "TB", levelSpacing: 100}}
|
|
255
|
-
- Network: {layoutType: "force-directed", options: {iterations: 200}}
|
|
256
|
-
- Grid: {layoutType: "grid", options: {columns: 4}}`,
|
|
93
|
+
pinepaper_auto_layout: `Arrange diagram items using a layout algorithm (hierarchical, force-directed, tree, radial, grid).`,
|
|
257
94
|
// -------------------------------------------------------------------------
|
|
258
|
-
// import_asset
|
|
95
|
+
// import_asset
|
|
259
96
|
// -------------------------------------------------------------------------
|
|
260
|
-
pinepaper_import_asset: `Import an SVG asset from search results or
|
|
261
|
-
|
|
262
|
-
USE WHEN: After searching with pinepaper_search_assets, or importing from a direct SVG URL.
|
|
263
|
-
|
|
264
|
-
WORKFLOW: Search → Choose (check license) → Import → Modify/Animate as needed.
|
|
265
|
-
|
|
266
|
-
PARAMS: assetId (from search) OR url (direct SVG URL), position, scale, color (override for monochrome icons).
|
|
267
|
-
|
|
268
|
-
License metadata is tracked automatically. CC-BY attribution is added to canvas metadata. Downloaded SVGs are cached in memory for the session.
|
|
269
|
-
|
|
270
|
-
EXAMPLE: {assetId: "svgrepo_rocket_001", position: {x: 400, y: 300}, scale: 2.0}
|
|
271
|
-
|
|
272
|
-
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.`,
|
|
273
98
|
// -------------------------------------------------------------------------
|
|
274
|
-
// agent_export
|
|
99
|
+
// agent_export
|
|
275
100
|
// -------------------------------------------------------------------------
|
|
276
|
-
pinepaper_agent_export: `Export
|
|
277
|
-
|
|
278
|
-
PLATFORMS & FORMATS:
|
|
279
|
-
| Platform | Size | Static | Animated |
|
|
280
|
-
|------------------|------------|--------|----------|
|
|
281
|
-
| instagram | 1080x1080 | PNG | MP4 |
|
|
282
|
-
| tiktok | 1080x1920 | PNG | MP4 |
|
|
283
|
-
| youtube | 1920x1080 | PNG | MP4 |
|
|
284
|
-
| twitter | 1200x675 | PNG | GIF |
|
|
285
|
-
| web | flexible | SVG | SVG |
|
|
286
|
-
|
|
287
|
-
DEFAULT: When user asks for "video" or "export", use format: "mp4". Only use svg/gif if user specifically requests them.
|
|
288
|
-
Formats: svg, png, gif, mp4, webm, pdf. Quality: draft, standard, high.
|
|
289
|
-
⚠️ If export fails, do NOT retry with different formats — report the error to the user.`,
|
|
101
|
+
pinepaper_agent_export: `Export as MP4, GIF, PNG, SVG, or PDF. Formats: svg, png, gif, mp4, webm, pdf. Quality: draft, standard, high.`,
|
|
290
102
|
};
|
|
291
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,
|
|
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,4EAA4E;IAC5E,0BAA0B;IAC1B,4EAA4E;IAC5E,iCAAiC,EAAE,6EAA6E;IAEhH,4EAA4E;IAC5E,eAAe;IACf,4EAA4E;IAC5E,sBAAsB,EAAE;;8IAEoH;IAE5I,4EAA4E;IAC5E,uBAAuB;IACvB,4EAA4E;IAC5E,8BAA8B,EAAE;;uMAEqK;IAErM,4EAA4E;IAC5E,gBAAgB;IAChB,4EAA4E;IAC5E,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,+GAA+G;CAExI,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 = "
|
|
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";
|
|
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,
|
|
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"}
|