@pinepaper.studio/mcp-server 1.6.8 → 1.6.9

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 (48) hide show
  1. package/README.de.md +1 -1
  2. package/README.es.md +1 -1
  3. package/README.fr.md +1 -1
  4. package/README.hi.md +1 -1
  5. package/README.ja.md +1 -1
  6. package/README.ko.md +1 -1
  7. package/README.md +89 -4
  8. package/README.pt-BR.md +1 -1
  9. package/README.zh-CN.md +1 -1
  10. package/dist/browser/index.d.ts +1 -1
  11. package/dist/browser/index.d.ts.map +1 -1
  12. package/dist/browser/index.js +1 -1
  13. package/dist/browser/index.js.map +1 -1
  14. package/dist/browser/puppeteer-controller.d.ts +86 -2
  15. package/dist/browser/puppeteer-controller.d.ts.map +1 -1
  16. package/dist/browser/puppeteer-controller.js +143 -60
  17. package/dist/browser/puppeteer-controller.js.map +1 -1
  18. package/dist/cli.js +12 -0
  19. package/dist/cli.js.map +1 -1
  20. package/dist/design/design-systems.d.ts +105 -7
  21. package/dist/design/design-systems.d.ts.map +1 -1
  22. package/dist/design/design-systems.js +210 -16
  23. package/dist/design/design-systems.js.map +1 -1
  24. package/dist/tools/definitions.d.ts.map +1 -1
  25. package/dist/tools/definitions.js +63 -3
  26. package/dist/tools/definitions.js.map +1 -1
  27. package/dist/tools/engine-methods.d.ts.map +1 -1
  28. package/dist/tools/engine-methods.js +2 -0
  29. package/dist/tools/engine-methods.js.map +1 -1
  30. package/dist/tools/handlers.d.ts.map +1 -1
  31. package/dist/tools/handlers.js +212 -8
  32. package/dist/tools/handlers.js.map +1 -1
  33. package/dist/tools/minimal-descriptions.d.ts.map +1 -1
  34. package/dist/tools/minimal-descriptions.js +2 -1
  35. package/dist/tools/minimal-descriptions.js.map +1 -1
  36. package/dist/tools/toolkits.d.ts.map +1 -1
  37. package/dist/tools/toolkits.js +1 -0
  38. package/dist/tools/toolkits.js.map +1 -1
  39. package/dist/types/code-generator.d.ts +10 -0
  40. package/dist/types/code-generator.d.ts.map +1 -1
  41. package/dist/types/code-generator.js +75 -8
  42. package/dist/types/code-generator.js.map +1 -1
  43. package/dist/types/schemas.d.ts +75 -35
  44. package/dist/types/schemas.d.ts.map +1 -1
  45. package/dist/types/schemas.js +43 -3
  46. package/dist/types/schemas.js.map +1 -1
  47. package/manifest.json +5 -1
  48. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"design-systems.d.ts","sourceRoot":"","sources":["../../src/design/design-systems.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAIL,KAAK,gBAAgB,EAErB,KAAK,aAAa,EACnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAqBpE;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,gFAAgF;IAChF,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO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;;;;;;;;;;;;GAqCG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAoD/E"}
@@ -121,8 +121,98 @@ export const ALL_STYLES = [
121
121
  'constructivism_suprematism', 'art_nouveau', 'op_art_psychedelic',
122
122
  'print_monochrome_crisp', 'print_early_learner', 'print_stem_technical',
123
123
  ];
124
+ /**
125
+ * Styles whose palette a named variant changes. Only art deco has one today,
126
+ * and it is listed rather than inferred because `emeraldVariant` is a bespoke
127
+ * boolean on that one generator, not a shape the others share.
128
+ */
129
+ const STYLE_VARIANTS = {
130
+ art_deco_geometric: ['emerald'],
131
+ };
132
+ /**
133
+ * A style's palette and type, DERIVED by composing it — never transcribed.
134
+ *
135
+ * The data was always one layer below the API: every generator holds its colours
136
+ * in a `*_PALETTE` constant and its type in per-element `fontFamily` strings,
137
+ * and `listStyles` published neither. The only way to build an authentic
138
+ * bauhaus or memphis scene by hand was to read this server's own source, which
139
+ * is the report that prompted this.
140
+ *
141
+ * Reading the 18 `*_PALETTE` constants would have been the obvious fix and the
142
+ * wrong one: they are 18 different shapes under 18 different names, so a
143
+ * hand-written map is a second copy that drifts the first time `sync:design`
144
+ * pulls an upstream change — the exact failure this repo keeps paying to
145
+ * remove. Composing a throwaway poster and reading what comes out cannot drift:
146
+ * it reports what the generator will actually draw.
147
+ *
148
+ * Safe to do eagerly because no generator is procedural — there is no
149
+ * `Math.random` in any vendored file, so one run is the whole palette for that
150
+ * variant, and a style with variants says so rather than pretending its first
151
+ * variant is all of it.
152
+ */
153
+ export function styleTokens(style) {
154
+ if (!ALL_STYLES.includes(style))
155
+ return null;
156
+ const composable = !!COMPOSERS[style];
157
+ const variants = STYLE_VARIANTS[style];
158
+ if (!composable) {
159
+ // Describable but not composable: there is no generator to ask, and an
160
+ // invented palette would be worse than an empty one.
161
+ return { style, composable, palette: [], fonts: [], fontSizes: [] };
162
+ }
163
+ let scene = null;
164
+ try {
165
+ scene = compose(style, { title: 'Title', subtitle: 'Subtitle', body: 'Body' });
166
+ }
167
+ catch {
168
+ // normalise() throws when an upstream shape changed. That is a real signal
169
+ // and design-systems.test.ts asserts on it through compose(); here it only
170
+ // means the tokens are unavailable, and losing the whole listing to one
171
+ // broken generator would be the worse trade.
172
+ return { style, composable, palette: [], fonts: [], fontSizes: [], ...(variants ? { variants } : {}) };
173
+ }
174
+ if (!scene)
175
+ return { style, composable, palette: [], fonts: [], fontSizes: [] };
176
+ const uses = new Map();
177
+ const count = (hex) => {
178
+ if (!hex || hex === 'transparent' || hex === 'none')
179
+ return;
180
+ uses.set(hex, (uses.get(hex) ?? 0) + 1);
181
+ };
182
+ const fonts = new Set();
183
+ const sizes = new Set();
184
+ for (const el of scene.elements) {
185
+ count(el.fillHex);
186
+ count(el.strokeHex);
187
+ if (el.fontFamily)
188
+ fonts.add(el.fontFamily);
189
+ if (el.fontSize !== undefined)
190
+ sizes.add(el.fontSize);
191
+ }
192
+ // A declared palette leads, in its own order: the eleven layout-shape
193
+ // generators publish one, and the author's ordering carries intent that a
194
+ // frequency count does not. Observed colours follow, so a hue used once in a
195
+ // motif is still reachable.
196
+ const declared = (scene.palette ?? []).filter((c) => c && c !== 'transparent');
197
+ const observed = [...uses.entries()].sort((a, b) => b[1] - a[1]).map(([hex]) => hex);
198
+ const palette = [...new Set([...declared, ...observed])];
199
+ return {
200
+ style, composable, palette,
201
+ ...(scene.backgroundHex ? { background: scene.backgroundHex } : {}),
202
+ fonts: [...fonts],
203
+ fontSizes: [...sizes].sort((a, b) => a - b),
204
+ ...(variants ? { variants } : {}),
205
+ };
206
+ }
207
+ /**
208
+ * Every style, with its tokens.
209
+ *
210
+ * The tokens ride along rather than sitting behind a second call: an agent that
211
+ * did not know palettes existed here will not go looking for the action that
212
+ * reveals them, and undiscoverability is the complaint this answers.
213
+ */
124
214
  export function listStyles() {
125
- return ALL_STYLES.map((style) => ({ style, composable: !!COMPOSERS[style] }));
215
+ return ALL_STYLES.map((style) => styleTokens(style));
126
216
  }
127
217
  export function listSystems() {
128
218
  return Object.values(OPEN_DESIGN_SYSTEMS).map((s) => ({
@@ -145,13 +235,66 @@ export function getSystem(systemId, tokenType) {
145
235
  return { ...sys, tokens };
146
236
  }
147
237
  /**
148
- * Every cubicBezier token across every system, as a named easing.
238
+ * A duration token in milliseconds. DTCG writes them as strings.
239
+ *
240
+ * Every value in the vendored systems is `<n>ms` today, and `<n>s` is parsed
241
+ * too rather than silently returning null on an upstream change — a dropped
242
+ * token would thin the listing without anything saying so.
243
+ */
244
+ function tokenToMilliseconds(token) {
245
+ if (token.$type !== 'duration')
246
+ return null;
247
+ const raw = String(token.$value).trim();
248
+ const ms = /^(\d+(?:\.\d+)?)ms$/.exec(raw);
249
+ if (ms)
250
+ return Number(ms[1]);
251
+ const s = /^(\d+(?:\.\d+)?)s$/.exec(raw);
252
+ if (s)
253
+ return Number(s[1]) * 1000;
254
+ return null;
255
+ }
256
+ /**
257
+ * The other half of a motion token, which this surface was not publishing.
258
+ *
259
+ * `listEasings` exposed the 27 cubicBezier tokens and nothing read the 47
260
+ * duration tokens sitting beside them in the same store — so an agent could
261
+ * match a system's CURVE and had to invent its TIMING, which is half a motion
262
+ * vocabulary and the half that is easy to get wrong. A curve is a shape; a
263
+ * motion is a shape over a length.
149
264
  *
150
- * The provenance flag is the part that matters. A vendor's published curve and
151
- * one we had to invent because the system does not specify motion are both
152
- * usable, and they are not the same claim — so `authored` rides along instead
153
- * of the two being flattened into one list of equally-official numbers.
265
+ * These are the licensed SYSTEMS' motion scales — Material's duration ladder,
266
+ * Carbon's, and so on. They are NOT per-aesthetic-style motion: a style like
267
+ * bauhaus_geometric has no upstream motion data at all, and manufacturing some
268
+ * would be inventing a fact about someone else's design system.
154
269
  */
270
+ export function listDurations(authoredOnly) {
271
+ const out = [];
272
+ for (const sys of Object.values(OPEN_DESIGN_SYSTEMS)) {
273
+ for (const [path, token] of Object.entries(sys.tokens ?? {})) {
274
+ const ms = tokenToMilliseconds(token);
275
+ if (ms === null)
276
+ continue;
277
+ const authored = token.$extensions?.['pinepaper:authored'] === true;
278
+ if (authoredOnly !== undefined && authored !== authoredOnly)
279
+ continue;
280
+ out.push({
281
+ name: `${sys.id}.${path}`,
282
+ system: sys.id,
283
+ systemName: sys.name,
284
+ token: path,
285
+ ms,
286
+ // Every animation tool here takes seconds. Publishing only the DTCG
287
+ // unit would make each caller do the same division, and one of them
288
+ // would do it wrong.
289
+ seconds: Math.round((ms / 1000) * 1000) / 1000,
290
+ description: token.$description,
291
+ license: sys.license,
292
+ authored,
293
+ });
294
+ }
295
+ }
296
+ return out;
297
+ }
155
298
  export function listEasings(authoredOnly) {
156
299
  const out = [];
157
300
  for (const sys of Object.values(OPEN_DESIGN_SYSTEMS)) {
@@ -198,36 +341,87 @@ export function compose(style, options) {
198
341
  /**
199
342
  * A composed scene as create-item ops.
200
343
  *
201
- * Every generator returns absolutely-positioned elements with hex fills, which
202
- * is already what `app.create` wants — so this is a rename, not a layout pass.
203
- * Text keeps its content and size; everything else becomes a rectangle at the
204
- * element's bounds, because a style's "fan_motif" is a named shape upstream
205
- * and a filled box here rather than a silently dropped element.
344
+ * Every generator returns absolutely-positioned elements with hex fills. Text
345
+ * keeps its content and size; everything else becomes a rectangle at the
346
+ * element's bounds, because a style's "fan_motif" is a named shape upstream and
347
+ * a filled box here rather than a silently dropped element.
348
+ *
349
+ * IT IS NOT A RENAME, which is what this used to claim while passing `x`/`y`
350
+ * straight through. The generators author CSS-shaped layout — a TOP-LEFT box —
351
+ * and `app.create` is CENTRE-anchored: js/shapes/basic.js builds a rectangle at
352
+ * `point: position - size/2` and a circle at `center: position`. So every
353
+ * composed scene rendered half a box up and to the left of where the generator
354
+ * put it, and a left-aligned headline was worse than that: bauhaus authors its
355
+ * title at x = 0.1 × width, which on a 1080 canvas is 108, and a 600px-wide
356
+ * string centred on 108 starts at -192. That is the "title half off-canvas"
357
+ * this surface was reported with, and why composing was abandoned for
358
+ * hand-built primitives.
359
+ *
360
+ * Three conventions, resolved per element, because one blanket shift breaks two
361
+ * of them:
362
+ *
363
+ * - **A box** (`width`/`height`, no radius) → the centre is (x + w/2, y + h/2).
364
+ * - **An explicit `radius`** → x/y is ALREADY the centre. art-nouveau's halo
365
+ * and op-art's concentric rings are authored from a ring centre, so shifting
366
+ * them by a radius would break the styles that are currently *correct*.
367
+ * - **Text** → PinePaper reads `alignment` ('left' makes x the LEFT edge,
368
+ * 'right' the right edge, y the bounds centre either way). That accommodation
369
+ * exists in the engine specifically for scene authors, and this function was
370
+ * dropping `textAlign` on the floor — so every left-aligned string centred on
371
+ * its anchor even once the boxes were right.
372
+ *
373
+ * The one place this stops short of certain: the layout-shape generators author
374
+ * text as x/y/fontSize with no box at all, and nothing upstream says whether
375
+ * that y is the top or the baseline. Where there is a box, y moves by half of
376
+ * it; where there is not, y is left alone rather than shifted by a guess. The
377
+ * horizontal fix — the one that put titles off-canvas — applies either way.
206
378
  */
207
379
  export function sceneToOps(scene) {
208
380
  const ops = [];
209
381
  for (const el of scene.elements) {
382
+ const isText = el.content !== undefined && el.content !== '';
383
+ const authorsOwnCentre = el.radius !== undefined;
384
+ const w = el.width ?? 0;
385
+ const h = el.height ?? 0;
386
+ // 'center' is the engine's default and the only other value it reads.
387
+ const alignment = el.textAlign === 'left' || el.textAlign === 'right' ? el.textAlign : 'center';
388
+ let x = el.x;
389
+ let y = el.y;
390
+ if (isText) {
391
+ if (alignment === 'center')
392
+ x = el.x + w / 2;
393
+ else if (alignment === 'right')
394
+ x = el.x + w;
395
+ // 'left': x is the left edge, which is what the engine wants for it.
396
+ if (el.height !== undefined)
397
+ y = el.y + h / 2;
398
+ }
399
+ else if (!authorsOwnCentre) {
400
+ x = el.x + w / 2;
401
+ y = el.y + h / 2;
402
+ }
210
403
  const common = {
211
- x: el.x, y: el.y,
404
+ x, y,
212
405
  fillColor: el.fillHex,
213
406
  ...(el.strokeHex ? { strokeColor: el.strokeHex } : {}),
214
407
  ...(el.strokeWidthPx !== undefined ? { strokeWidth: el.strokeWidthPx } : {}),
215
408
  };
216
- if (el.content !== undefined && el.content !== '') {
409
+ if (isText) {
217
410
  ops.push({
218
411
  type: 'text', name: el.id, ...common, content: el.content,
219
412
  ...(el.fontSize !== undefined ? { fontSize: el.fontSize } : {}),
220
413
  ...(el.fontFamily ? { fontFamily: el.fontFamily } : {}),
221
414
  ...(el.fontWeight !== undefined ? { fontWeight: el.fontWeight } : {}),
415
+ alignment,
222
416
  });
223
417
  }
224
- else if (el.type === 'circle' || el.radius !== undefined) {
225
- ops.push({ type: 'circle', name: el.id, ...common, radius: el.radius ?? (el.width ?? 0) / 2 });
418
+ else if (el.type === 'circle' || authorsOwnCentre) {
419
+ ops.push({ type: 'circle', name: el.id, ...common, radius: el.radius ?? w / 2 });
226
420
  }
227
421
  else {
228
422
  ops.push({
229
423
  type: 'rectangle', name: el.id, ...common,
230
- width: el.width ?? 0, height: el.height ?? 0,
424
+ width: w, height: h,
231
425
  // The upstream type is kept as a note rather than dropped: a caller
232
426
  // re-reading the scene can tell a frame from a fan motif even though
233
427
  // both arrive as rectangles.
@@ -1 +1 @@
1
- {"version":3,"file":"design-systems.js","sourceRoot":"","sources":["../../src/design/design-systems.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,GAInB,MAAM,yCAAyC,CAAC;AAGjD,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAC9E,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iDAAiD,CAAC;AACjG,OAAO,EAAE,uBAAuB,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AGG;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":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAwB/C,eAAO,MAAM,cAAc,ilZAyJ+G,CAAC;AAW3I,eAAO,MAAM,eAAe,EAAE,IAAI,EAwtQjC,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"}
@@ -351,7 +351,9 @@ USE WHEN:
351
351
  IMPORTANT:
352
352
  - Save the returned itemId! You need it for pinepaper_add_relation, pinepaper_modify_item, pinepaper_delete_item, etc.
353
353
  - If there's a welcome template on the canvas, use pinepaper_clear_canvas first
354
- - Position defaults to canvas center (400, 300). Use position: {x, y} or [x, y] (both forms accepted) to place elsewhere.
354
+ - Position defaults to canvas center (400, 300). Use position: {x, y} or [x, y] (both forms accepted) to place elsewhere. Position is the item's bounding-box CENTRE, not its top-left corner.
355
+ - ROTATION is a property, at creation: properties: { rotation: 45 } — degrees, clockwise, about the item's own centre. It does not need a second call, and pinepaper_update_item takes the same property afterwards; keyframe_animate and the driven_by relation both animate it. A radial figure — a sunburst of thin triangles, a clock face, a compass rose — is N creates at rotation: i * (360/N), which is what pinepaper_agent_batch_execute is for. Nothing here needs to be faked with arcs or chevrons.
356
+ ⚠️ Rotation applies at create and in keyframes; it is BAKED INTO THE GEOMETRY, so reading item.rotation back returns 0. Verify by geometry or pixels, never by re-reading the property — a 12-ray sunburst has 12 visibly different rays that every report rotation 0, and checking the property is how you conclude a working feature does nothing.
355
357
  - DO NOT take screenshots after every create operation. Trust the API response - if it returns success, the item was created. Take ONE screenshot at the end to verify the final result.
356
358
 
357
359
  ⚠️ COMPLEX CHARACTERS/ILLUSTRATIONS:
@@ -2264,13 +2266,15 @@ An AESTHETIC STYLE is a look: Bauhaus, Art Deco, Swiss typographic, De Stijl, va
2264
2266
 
2265
2267
  - list_systems / get_system: the licensed systems and their tokens, filterable by token type.
2266
2268
  - list_easings: every motion curve across every system as a named easing, with its licence and whether it was authored here. Use these to make a motion match a system it has to sit beside.
2267
- - list_styles / compose: build a titled scene in a style. Layout is decided in this server by a pure function, so 'compose' with draw:false returns the scene and the ops as DATA and draws nothing — read it before committing, the same way pinepaper_story's distill works.
2269
+ - list_motion: those curves AND the duration scale sitting beside them — the other half of a motion token, published nowhere until now. A curve is a shape; a motion is a shape over a length, and matching a system's easing while inventing its timing gets only the easy half right. Durations come back in ms and in seconds, because every animation tool here takes seconds. These are the licensed SYSTEMS' motion scales: an aesthetic style carries no upstream motion data, so pair one of these with a style rather than expecting the style to name its own.
2270
+ - list_styles: every style with its TOKENS — palette, background, font stacks, type sizes and any variants — derived by composing it, so they are what the generator will actually draw. Read these to hand-build in a style rather than reverse-engineering its colours.
2271
+ - compose: build a titled scene in a style. Layout is decided in this server by a pure function, so 'compose' with draw:false returns the scene and the ops as DATA and draws nothing — read it before committing, the same way pinepaper_story's distill works. Element boxes are converted to the centre anchor app.create wants, and text carries its alignment, so a left-aligned headline starts at its x instead of centring on it.
2268
2272
 
2269
2273
  A partial composition reports as a failure with the elements that did not create, rather than as a success with half a poster.`,
2270
2274
  inputSchema: {
2271
2275
  type: 'object',
2272
2276
  properties: {
2273
- action: { type: 'string', enum: ['list_systems', 'get_system', 'list_easings', 'list_styles', 'compose'], description: 'Which design-system operation.' },
2277
+ action: { type: 'string', enum: ['list_systems', 'get_system', 'list_easings', 'list_motion', 'list_styles', 'compose'], description: 'Which design-system operation.' },
2274
2278
  systemId: { type: 'string', description: "get_system: e.g. 'material_3', 'ibm_carbon', 'uswds'. Call list_systems for ids." },
2275
2279
  tokenType: { type: 'string', enum: ['dimension', 'duration', 'cubicBezier', 'color', 'fontFamily', 'fontWeight', 'number', 'shadow', 'grid'], description: 'get_system: return only tokens of this DTCG type.' },
2276
2280
  style: { type: 'string', description: "compose: the aesthetic style, e.g. 'bauhaus_geometric'. Call list_styles for the composable ones." },
@@ -3111,10 +3115,15 @@ USE WHEN:
3111
3115
  - Custom item registration
3112
3116
  - Accessing PinePaper APIs directly
3113
3117
  - Prototyping new features
3118
+ - A scene whose repetition is the point: dozens of items built in a loop. This is the cheapest route by an order of magnitude — a 63-item animated scene is ~4k characters here against ~147k as keyframe tool calls — because the loop collapses the repetition instead of restating it per item. Synchronous build work is bounded by the governor's 4s deadline, which such a scene fits easily.
3119
+
3120
+ WHAT THE CHEAP ROUTE COSTS, so the choice is deliberate: items built and animated in raw JS carry NO behavioral record. No graph edge, nothing SMIL or widget export can lift, nothing the ontology can read — the scene renders and cannot describe itself. Relations are the canonical behavior surface here, so for motion that is a function of time prefer pinepaper_add_relation with 'time_expression' (still ~5.7x cheaper than keyframes), and for a whole group moving together staggered_with or wave_through. Reach for a loop when the geometry is procedural, not merely to avoid the typing.
3114
3121
 
3115
3122
  AVAILABLE GLOBALS:
3116
3123
  - app: PinePaper application instance
3117
3124
  - app.create(type, params): Create items
3125
+ - app.addAnimation(itemId, keyframes, options): Attach keyframe TRACKS programmatically — the other half of a procedural scene, and what makes the loop route cheap: the keyframes are generated, not typed. Accepts an id or the item itself; options.timeUnits ('seconds'|'ms') overrides the ms auto-detect, which long-form timelines need
3126
+ - app.animate(item, params): Attach a LOOP animation (pulse, bounce, wobble, …) — the other kind of motion, and not what addAnimation does
3118
3127
  - app.addRelation(sourceId, targetId, type, params): Add relations
3119
3128
  - app.registerRelationRule(name, definition): Register custom relations
3120
3129
  - app.itemRegistry: Access all registered items
@@ -3233,6 +3242,13 @@ USE WHEN:
3233
3242
  - "first fade in, then rotate, then fade out"
3234
3243
  - Any animation with specific timing or sequential stages
3235
3244
 
3245
+ BEFORE AUTHORING DENSE TRACKS — three routes are cheaper, and two of them keep the scene describable. Measured on the same 63-item, 32-keyframes-each scene:
3246
+ - Motion that is a FUNCTION OF TIME (bob, pulse, sweep, phase-offset wave) → pinepaper_add_relation with relationType 'time_expression'. One call per property instead of one keyframe per sample: 26k characters against 147k. It also survives into the design graph, save/reload and widget export, which keyframes generated from a formula do not describe.
3247
+ - PER-ITEM VARIATION across many items → staggered_with or wave_through express the whole group in ONE call. That collapses the 63-fold repetition a per-item time_expression still pays for.
3248
+ - GENUINELY PROCEDURAL scenes → pinepaper_execute_custom_code with app.create + app.addAnimation (which attaches keyframe tracks programmatically, so the keyframes are generated rather than typed), at 4k characters for the same scene — cheapest by an order of magnitude, because a loop collapses the repetition entirely. The trade is real and worth making deliberately: raw JS leaves NO behavioral record — no graph edge, nothing SMIL or widget export can lift, nothing the ontology can read. Scene building fits the governor's 4s synchronous deadline easily (it is the injected loop guards, not the 10s async-tail budget, that bites a build loop).
3249
+
3250
+ Keyframes are for motion that is AUTHORED, not computed. A track of hundreds of entries produced from a formula is the signal that one of the three above is the right route.
3251
+
3236
3252
  ANIMATABLE PROPERTIES:
3237
3253
  - position: [x, y] array (a { x, y } object is also accepted and normalized)
3238
3254
  - x, y: Individual coordinates
@@ -7593,6 +7609,50 @@ EXAMPLE — Animated sky scene with timed reveals:
7593
7609
  required: ['operations'],
7594
7610
  },
7595
7611
  },
7612
+ {
7613
+ name: 'pinepaper_export_store',
7614
+ annotations: {
7615
+ title: 'Export Store',
7616
+ readOnlyHint: false,
7617
+ destructiveHint: true,
7618
+ idempotentHint: false,
7619
+ openWorldHint: false,
7620
+ },
7621
+ description: `Recover an export the studio is still holding.
7622
+
7623
+ A long export is not returned inline — the studio keeps the encoded file and pinepaper_agent_export pages it out to a file for you. When that PAGING half fails, the render has already succeeded and the bytes are sitting in the store. This is how you go and get them, instead of re-rendering something that already exists.
7624
+
7625
+ ACTIONS:
7626
+ - list: {} — what is held, newest first: {id, format, size, createdAt}. The id IS the stored filename and the store is origin-persistent, so ids survive a page reload; an id lost with a dropped tool result is recoverable here.
7627
+ - save: {exportId} — page it out to a file and release it once the file is whole. Returns a filePath, the same shape agent_export returns. Safe to repeat: reading a held export mutates nothing, so a failed save can simply be run again.
7628
+ - release: {exportId} — drop it WITHOUT saving. The store is the only copy; this is not undoable.
7629
+
7630
+ WHEN TO REACH FOR IT:
7631
+ - An export failed with "Failed to write data to data pipe". That is the browser's transport refusing to carry one oversized value, not the encoder failing — the bytes may already be in the store. Call 'list' BEFORE re-rendering.
7632
+ - An export error named an exportId and a byte count reached. That error is a true promise: call 'save' with the id.
7633
+
7634
+ RETENTION, AND THE ONE WAY TO LOSE WORK:
7635
+ Held exports last until released, or until a LATER export needs the space — and eviction drops the OLDEST first. Rendering five chunks and paging them out at the end can evict chunk 1 to make room for chunk 5. Save or release each export before starting the next one. An id dropped this way usually says "evicted" rather than "not found", including after a page reload — but that record is best-effort browser storage, so a miss can still be genuinely ambiguous. Treat the absence of "evicted" as "unknown", never as proof the export never existed.`,
7636
+ inputSchema: {
7637
+ type: 'object',
7638
+ properties: {
7639
+ action: {
7640
+ type: 'string',
7641
+ enum: ['list', 'save', 'release'],
7642
+ description: "'list' (what is held), 'save' (page it to a file, then release), 'release' (drop it unsaved).",
7643
+ },
7644
+ exportId: {
7645
+ type: 'string',
7646
+ description: "Required for 'save' and 'release'. From a failed export's error, or from 'list'.",
7647
+ },
7648
+ platform: {
7649
+ type: 'string',
7650
+ description: "save: a label for the saved filename only. Defaults to 'recovered'.",
7651
+ },
7652
+ },
7653
+ required: ['action'],
7654
+ },
7655
+ },
7596
7656
  {
7597
7657
  name: 'pinepaper_agent_export',
7598
7658
  annotations: {