@pinepaper.studio/mcp-server 1.6.7 → 1.6.8

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 (164) hide show
  1. package/README.de.md +9 -5
  2. package/README.es.md +9 -5
  3. package/README.fr.md +9 -5
  4. package/README.hi.md +8 -5
  5. package/README.ja.md +8 -5
  6. package/README.ko.md +8 -4
  7. package/README.md +171 -17
  8. package/README.pt-BR.md +9 -5
  9. package/README.zh-CN.md +6 -4
  10. package/dist/character/data/concepts.json +1 -0
  11. package/dist/character/data/depictions.json +1 -0
  12. package/dist/character/data/styles.json +1 -0
  13. package/dist/character/duration-scale.d.ts +13 -0
  14. package/dist/character/duration-scale.d.ts.map +1 -0
  15. package/dist/character/duration-scale.js +13 -0
  16. package/dist/character/duration-scale.js.map +1 -0
  17. package/dist/character/path-bbox.d.ts +82 -0
  18. package/dist/character/path-bbox.d.ts.map +1 -0
  19. package/dist/character/path-bbox.js +496 -0
  20. package/dist/character/path-bbox.js.map +1 -0
  21. package/dist/character/perform.d.ts +149 -0
  22. package/dist/character/perform.d.ts.map +1 -0
  23. package/dist/character/perform.js +626 -0
  24. package/dist/character/perform.js.map +1 -0
  25. package/dist/character/resolve.d.ts +51 -0
  26. package/dist/character/resolve.d.ts.map +1 -0
  27. package/dist/character/resolve.js +239 -0
  28. package/dist/character/resolve.js.map +1 -0
  29. package/dist/design/design-systems.d.ts +126 -0
  30. package/dist/design/design-systems.d.ts.map +1 -0
  31. package/dist/design/design-systems.js +240 -0
  32. package/dist/design/design-systems.js.map +1 -0
  33. package/dist/execution/canvas-state.d.ts +7 -0
  34. package/dist/execution/canvas-state.d.ts.map +1 -1
  35. package/dist/execution/canvas-state.js +20 -8
  36. package/dist/execution/canvas-state.js.map +1 -1
  37. package/dist/index.d.ts +20 -0
  38. package/dist/index.d.ts.map +1 -1
  39. package/dist/index.js +12 -4
  40. package/dist/index.js.map +1 -1
  41. package/dist/ontology/design-graph.d.ts +9 -0
  42. package/dist/ontology/design-graph.d.ts.map +1 -1
  43. package/dist/ontology/design-graph.js +98 -3
  44. package/dist/ontology/design-graph.js.map +1 -1
  45. package/dist/ontology/types.d.ts +42 -0
  46. package/dist/ontology/types.d.ts.map +1 -1
  47. package/dist/ontology/vocabulary.d.ts.map +1 -1
  48. package/dist/ontology/vocabulary.js +20 -0
  49. package/dist/ontology/vocabulary.js.map +1 -1
  50. package/dist/tools/compact-descriptions.d.ts.map +1 -1
  51. package/dist/tools/compact-descriptions.js +25 -0
  52. package/dist/tools/compact-descriptions.js.map +1 -1
  53. package/dist/tools/definitions.d.ts +1 -1
  54. package/dist/tools/definitions.d.ts.map +1 -1
  55. package/dist/tools/definitions.js +343 -24
  56. package/dist/tools/definitions.js.map +1 -1
  57. package/dist/tools/engine-methods.d.ts +18 -0
  58. package/dist/tools/engine-methods.d.ts.map +1 -0
  59. package/dist/tools/engine-methods.js +239 -0
  60. package/dist/tools/engine-methods.js.map +1 -0
  61. package/dist/tools/handlers/character.d.ts +121 -0
  62. package/dist/tools/handlers/character.d.ts.map +1 -0
  63. package/dist/tools/handlers/character.js +315 -0
  64. package/dist/tools/handlers/character.js.map +1 -0
  65. package/dist/tools/handlers.d.ts +2 -0
  66. package/dist/tools/handlers.d.ts.map +1 -1
  67. package/dist/tools/handlers.js +316 -16
  68. package/dist/tools/handlers.js.map +1 -1
  69. package/dist/tools/minimal-descriptions.d.ts.map +1 -1
  70. package/dist/tools/minimal-descriptions.js +13 -2
  71. package/dist/tools/minimal-descriptions.js.map +1 -1
  72. package/dist/tools/toolkits.d.ts.map +1 -1
  73. package/dist/tools/toolkits.js +7 -0
  74. package/dist/tools/toolkits.js.map +1 -1
  75. package/dist/types/code-generator.d.ts +96 -1
  76. package/dist/types/code-generator.d.ts.map +1 -1
  77. package/dist/types/code-generator.js +1200 -12
  78. package/dist/types/code-generator.js.map +1 -1
  79. package/dist/types/schemas.d.ts +6792 -151
  80. package/dist/types/schemas.d.ts.map +1 -1
  81. package/dist/types/schemas.js +587 -17
  82. package/dist/types/schemas.js.map +1 -1
  83. package/dist/vendor/design/art-deco-generator.d.ts +52 -0
  84. package/dist/vendor/design/art-deco-generator.d.ts.map +1 -0
  85. package/dist/vendor/design/art-deco-generator.js +144 -0
  86. package/dist/vendor/design/art-deco-generator.js.map +1 -0
  87. package/dist/vendor/design/art-nouveau-generator.d.ts +46 -0
  88. package/dist/vendor/design/art-nouveau-generator.d.ts.map +1 -0
  89. package/dist/vendor/design/art-nouveau-generator.js +134 -0
  90. package/dist/vendor/design/art-nouveau-generator.js.map +1 -0
  91. package/dist/vendor/design/bauhaus-generator.d.ts +53 -0
  92. package/dist/vendor/design/bauhaus-generator.d.ts.map +1 -0
  93. package/dist/vendor/design/bauhaus-generator.js +126 -0
  94. package/dist/vendor/design/bauhaus-generator.js.map +1 -0
  95. package/dist/vendor/design/brutalist-generator.d.ts +53 -0
  96. package/dist/vendor/design/brutalist-generator.d.ts.map +1 -0
  97. package/dist/vendor/design/brutalist-generator.js +148 -0
  98. package/dist/vendor/design/brutalist-generator.js.map +1 -0
  99. package/dist/vendor/design/claymorphism-generator.d.ts +46 -0
  100. package/dist/vendor/design/claymorphism-generator.d.ts.map +1 -0
  101. package/dist/vendor/design/claymorphism-generator.js +135 -0
  102. package/dist/vendor/design/claymorphism-generator.js.map +1 -0
  103. package/dist/vendor/design/corporate-memphis-generator.d.ts +47 -0
  104. package/dist/vendor/design/corporate-memphis-generator.d.ts.map +1 -0
  105. package/dist/vendor/design/corporate-memphis-generator.js +144 -0
  106. package/dist/vendor/design/corporate-memphis-generator.js.map +1 -0
  107. package/dist/vendor/design/cyberpunk-generator.d.ts +52 -0
  108. package/dist/vendor/design/cyberpunk-generator.d.ts.map +1 -0
  109. package/dist/vendor/design/cyberpunk-generator.js +162 -0
  110. package/dist/vendor/design/cyberpunk-generator.js.map +1 -0
  111. package/dist/vendor/design/de-stijl-generator.d.ts +50 -0
  112. package/dist/vendor/design/de-stijl-generator.d.ts.map +1 -0
  113. package/dist/vendor/design/de-stijl-generator.js +154 -0
  114. package/dist/vendor/design/de-stijl-generator.js.map +1 -0
  115. package/dist/vendor/design/design-style.d.ts +3 -0
  116. package/dist/vendor/design/design-style.d.ts.map +1 -0
  117. package/dist/vendor/design/design-style.js +12 -0
  118. package/dist/vendor/design/design-style.js.map +1 -0
  119. package/dist/vendor/design/design-systems-dtcg.d.ts +59 -0
  120. package/dist/vendor/design/design-systems-dtcg.d.ts.map +1 -0
  121. package/dist/vendor/design/design-systems-dtcg.js +571 -0
  122. package/dist/vendor/design/design-systems-dtcg.js.map +1 -0
  123. package/dist/vendor/design/frutiger-aero-generator.d.ts +46 -0
  124. package/dist/vendor/design/frutiger-aero-generator.d.ts.map +1 -0
  125. package/dist/vendor/design/frutiger-aero-generator.js +133 -0
  126. package/dist/vendor/design/frutiger-aero-generator.js.map +1 -0
  127. package/dist/vendor/design/memphis-generator.d.ts +56 -0
  128. package/dist/vendor/design/memphis-generator.d.ts.map +1 -0
  129. package/dist/vendor/design/memphis-generator.js +158 -0
  130. package/dist/vendor/design/memphis-generator.js.map +1 -0
  131. package/dist/vendor/design/mid-century-upa-generator.d.ts +46 -0
  132. package/dist/vendor/design/mid-century-upa-generator.d.ts.map +1 -0
  133. package/dist/vendor/design/mid-century-upa-generator.js +137 -0
  134. package/dist/vendor/design/mid-century-upa-generator.js.map +1 -0
  135. package/dist/vendor/design/neumorphic-generator.d.ts +53 -0
  136. package/dist/vendor/design/neumorphic-generator.d.ts.map +1 -0
  137. package/dist/vendor/design/neumorphic-generator.js +182 -0
  138. package/dist/vendor/design/neumorphic-generator.js.map +1 -0
  139. package/dist/vendor/design/op-art-generator.d.ts +45 -0
  140. package/dist/vendor/design/op-art-generator.d.ts.map +1 -0
  141. package/dist/vendor/design/op-art-generator.js +116 -0
  142. package/dist/vendor/design/op-art-generator.js.map +1 -0
  143. package/dist/vendor/design/pixel-art-generator.d.ts +45 -0
  144. package/dist/vendor/design/pixel-art-generator.d.ts.map +1 -0
  145. package/dist/vendor/design/pixel-art-generator.js +143 -0
  146. package/dist/vendor/design/pixel-art-generator.js.map +1 -0
  147. package/dist/vendor/design/pop-art-generator.d.ts +53 -0
  148. package/dist/vendor/design/pop-art-generator.d.ts.map +1 -0
  149. package/dist/vendor/design/pop-art-generator.js +164 -0
  150. package/dist/vendor/design/pop-art-generator.js.map +1 -0
  151. package/dist/vendor/design/risograph-generator.d.ts +53 -0
  152. package/dist/vendor/design/risograph-generator.d.ts.map +1 -0
  153. package/dist/vendor/design/risograph-generator.js +170 -0
  154. package/dist/vendor/design/risograph-generator.js.map +1 -0
  155. package/dist/vendor/design/swiss-style-generator.d.ts +55 -0
  156. package/dist/vendor/design/swiss-style-generator.d.ts.map +1 -0
  157. package/dist/vendor/design/swiss-style-generator.js +147 -0
  158. package/dist/vendor/design/swiss-style-generator.js.map +1 -0
  159. package/dist/vendor/design/vaporwave-generator.d.ts +51 -0
  160. package/dist/vendor/design/vaporwave-generator.d.ts.map +1 -0
  161. package/dist/vendor/design/vaporwave-generator.js +139 -0
  162. package/dist/vendor/design/vaporwave-generator.js.map +1 -0
  163. package/manifest.json +29 -1
  164. package/package.json +13 -5
@@ -0,0 +1,315 @@
1
+ /**
2
+ * `pinepaper_character` — a symbol and some beats become a figure that performs.
3
+ *
4
+ * This clears a PHANTOM. The tool was defined here and dispatched nowhere
5
+ * (b06fcde): advertised in tools/list, counted in the manifest, offered by a
6
+ * toolkit, and answering every call with UNKNOWN_TOOL. A missing tool is
7
+ * invisible; a phantom is a capability the model is told it has and plans
8
+ * around, and only discovers is absent at call time.
9
+ *
10
+ * NOTHING HERE REIMPLEMENTS THE PERFORMANCE. `resolveCharacter` composes the
11
+ * drawing across the concept's ancestry and hands it to the vendored
12
+ * `performCharacter`, which returns ops naming exactly two tools this package
13
+ * already emits. Those ops go through the EXISTING `generateCreateItem` and
14
+ * `generateKeyframeAnimate`, so there is no second code path to drift: a figure
15
+ * is created and keyframed by the same generators as everything else.
16
+ *
17
+ * ── THE ONE ADAPTATION, AND WHY IT IS NOT OPTIONAL ──────────────────────────
18
+ *
19
+ * The cloud's ops are written for the cloud's rasterizer, and the two renderers
20
+ * disagree about what `position` means next to `pathData`.
21
+ *
22
+ * `performCharacter` emits geometry ALREADY SHIFTED to canvas coordinates — a
23
+ * pigeon asked for at (470, 250) comes back with `pathData` in the 400-700
24
+ * range — and pairs it with `position: {x: 0, y: 0}`, which its own renderer
25
+ * ignores. PinePaper does not ignore it. `create('path', …)` treats pathData as
26
+ * the OTHER convention — a shape authored around its own origin and placed by
27
+ * (x, y) — and its guard is `params.x !== undefined`, which `0` satisfies. So
28
+ * the ops as the cloud writes them would move every part's centre to (0, 0) and
29
+ * stack the whole figure on the canvas origin.
30
+ *
31
+ * That is not hypothetical: PinePaper's own comment at that line records it,
32
+ * "measured on a rigged figure whose 27 parts all drew correctly and all landed
33
+ * on the canvas origin, stacked, while every other signal (item count,
34
+ * registry, attachments) said the scene was fine."
35
+ *
36
+ * So each part is converted to PinePaper's convention here: the pathData is
37
+ * shifted to sit around its own bbox centre, and that centre is passed as the
38
+ * position. Same pixels, stated the way this engine reads them. Converting
39
+ * rather than re-authoring keeps `performCharacter` the single source of the
40
+ * performance — the adaptation is a coordinate convention, not a second
41
+ * implementation.
42
+ */
43
+ import { resolveCharacter } from '../../character/resolve.js';
44
+ import { pathBBox, shiftPath } from '../../character/path-bbox.js';
45
+ /**
46
+ * Restate one create op in PinePaper's pathData convention.
47
+ *
48
+ * A part whose pathData cannot be measured is passed through UNCHANGED rather
49
+ * than guessed at: it will be misplaced, which is visible, instead of being
50
+ * silently dropped, which is not.
51
+ */
52
+ export function toEngineConvention(op, centres) {
53
+ if (op.tool === 'pinepaper_keyframe_animate') {
54
+ // TWO CHANGES, BOTH REQUIRED FOR THE OP TO VALIDATE OR BEHAVE.
55
+ //
56
+ // (1) SHAPE. The cloud writes FLAT keyframes — `{time, x, opacity, easing}`
57
+ // — because its own reader (`extractKfProps`) accepts either form. This
58
+ // package's `KeyframeSchema` does not: it requires `{time, properties}`,
59
+ // and a flat keyframe is rejected at validation. Copied verbatim, every
60
+ // character call would have failed zod with "properties: Required".
61
+ //
62
+ // (2) UNITS. Beats are seconds. The keyframe path carries a legacy
63
+ // heuristic that reads a time over 100 as milliseconds and divides, which
64
+ // is right for old scenes and would collapse a two-minute performance into
65
+ // its first tenth of a second. `timeUnits` is the documented way off it.
66
+ const kfs = (op.args.keyframes ?? []);
67
+ // (3) ORIGIN. The create branch below re-places each part at its path's
68
+ // BBOX CENTRE, because that is the point PinePaper's `position` names. The
69
+ // cloud's tracks are anchored on the depiction's DECLARED anchor instead —
70
+ // `baseX = at.x + p.at[0]*k` — and the two are not the same point. Left
71
+ // alone, every animated part jumps from its placed centre to its anchor the
72
+ // instant the t=0 keyframe evaluates: measured at 19.6px for a pigeon's
73
+ // beak, which detaches it from the head. That is the very failure the
74
+ // `carriedBy` machinery exists to prevent, arriving through the back door.
75
+ //
76
+ // A track is RELATIVE MOTION around a base, so re-basing it on the centre
77
+ // the item was actually placed at preserves every displacement and removes
78
+ // the snap. The alternative — recentring `pathData` on the anchor so the
79
+ // two agree by construction — also works, and was not chosen because it
80
+ // moves the scale and rotation pivot off the shape's centre, changing how
81
+ // every non-animated part renders to fix the animated ones.
82
+ //
83
+ // A part whose path could not be measured records no centre and is left
84
+ // exactly as it came: misplaced and visible, never silently adjusted.
85
+ const centre = centres?.get(String(op.args.itemId ?? ''));
86
+ const times = kfs.map((k) => (typeof k.time === 'number' ? k.time : Infinity));
87
+ const firstIdx = times.indexOf(Math.min(...times));
88
+ const baseline = (axis) => {
89
+ if (!centre || firstIdx < 0)
90
+ return null;
91
+ const first = kfs[firstIdx];
92
+ const flat = first?.[axis];
93
+ const nested = first?.properties?.[axis];
94
+ const v = typeof flat === 'number' ? flat : (typeof nested === 'number' ? nested : null);
95
+ return v === null ? null : (axis === 'x' ? centre.cx : centre.cy) - v;
96
+ };
97
+ const dx = baseline('x');
98
+ const dy = baseline('y');
99
+ const rebase = (props) => {
100
+ const out = { ...props };
101
+ if (dx !== null && typeof out.x === 'number')
102
+ out.x = out.x + dx;
103
+ if (dy !== null && typeof out.y === 'number')
104
+ out.y = out.y + dy;
105
+ return out;
106
+ };
107
+ return {
108
+ ...op,
109
+ args: {
110
+ ...op.args,
111
+ timeUnits: 'seconds',
112
+ keyframes: kfs.map((k) => {
113
+ const { time, easing, properties, ...rest } = k;
114
+ return {
115
+ time,
116
+ ...(typeof easing === 'string' ? { easing } : {}),
117
+ properties: rebase({ ...(properties ?? {}), ...rest }),
118
+ };
119
+ }),
120
+ },
121
+ };
122
+ }
123
+ if (op.tool !== 'pinepaper_create_item')
124
+ return op;
125
+ const props = (op.args.properties ?? {});
126
+ const d = props.pathData;
127
+ if (typeof d !== 'string' || !d)
128
+ return op;
129
+ const box = pathBBox(d);
130
+ if (!box)
131
+ return op;
132
+ const cx = (box.minX + box.maxX) / 2;
133
+ const cy = (box.minY + box.maxY) / 2;
134
+ // `groupId` IS DROPPED, NOT PASSED THROUGH. The cloud sets it so its own
135
+ // composition gate does not count a rigged figure as N competing elements —
136
+ // a cloud concern with a cloud reader. PinePaper's `create()` builds a path's
137
+ // `item.data` fresh (`{ shapeType: 'path' }`), so the field never arrives;
138
+ // and `item.data.groupId` means something else here — the engine mints it for
139
+ // real Paper groups and reads it as a COLLAGE id. Emitting a field that this
140
+ // engine either ignores or would misread is the phantom in miniature.
141
+ //
142
+ // The honest consequence: nothing in the emitted program says these thirteen
143
+ // parts are ONE figure. Wrapping them in a Paper group would say it and would
144
+ // also put one transform over all of them, which is the wrong trade for a
145
+ // performance keyed per part — the same reason text-effect glyphs are
146
+ // siblings joined by edges rather than a group. Filed, not faked.
147
+ const { groupId: _dropped, ...rest } = props;
148
+ return {
149
+ ...op,
150
+ args: {
151
+ ...op.args,
152
+ position: { x: cx, y: cy },
153
+ properties: { ...rest, pathData: shiftPath(d, -cx, -cy) },
154
+ },
155
+ };
156
+ }
157
+ /**
158
+ * Convert a whole program, not one op at a time.
159
+ *
160
+ * The keyframe tracks cannot be converted without knowing where the create ops
161
+ * actually placed each part, so the creates go first and record their centres.
162
+ * Converting op-by-op is what left the tracks anchored on a different point
163
+ * from the items they drive.
164
+ */
165
+ export function convertOps(ops) {
166
+ const centres = new Map();
167
+ const converted = ops.map((op) => {
168
+ if (op.tool !== 'pinepaper_create_item')
169
+ return op;
170
+ const out = toEngineConvention(op);
171
+ const id = (op.args.properties ?? {}).id;
172
+ const pos = out.args.position;
173
+ // Only a part that was actually re-placed records a centre: an unmeasurable
174
+ // path is passed through untouched and must not re-base anything.
175
+ if (typeof id === 'string' && pos && out !== op)
176
+ centres.set(id, { cx: pos.x, cy: pos.y });
177
+ return out;
178
+ });
179
+ return converted.map((op) => (op.tool === 'pinepaper_keyframe_animate' ? toEngineConvention(op, centres) : op));
180
+ }
181
+ /**
182
+ * Plan a character call: ops in PinePaper's convention, or a refusal.
183
+ *
184
+ * Separated from the handler so it can be tested WITHOUT `handleToolCall`,
185
+ * which tries to reach a browser and times out at 5001ms.
186
+ */
187
+ export function planCharacter(args) {
188
+ const r = resolveCharacter(args);
189
+ if (!r.ok)
190
+ return r;
191
+ return {
192
+ ...r,
193
+ ops: convertOps(r.ops),
194
+ concept: String(args.concept ?? ''),
195
+ root: figureRoot(r.parts),
196
+ };
197
+ }
198
+ /**
199
+ * The part the others hang off.
200
+ *
201
+ * `part_of_figure` points at a SIBLING, exactly as `glyph_of` points at the
202
+ * root glyph — there is no wrapper item, and inventing one would be the Paper
203
+ * group this design deliberately avoids. The body is the natural root because
204
+ * it is the part every other one is drawn against; failing that, the first in
205
+ * z-order, which is stable for a given concept.
206
+ */
207
+ export function figureRoot(parts) {
208
+ if (!parts.length)
209
+ return null;
210
+ // The ink copies are duplicates of a source part and must never be the root.
211
+ const real = parts.filter((p) => !p.endsWith('__ink'));
212
+ const pool = real.length ? real : parts;
213
+ return pool.find((p) => p.endsWith('_body')) ?? pool[0] ?? null;
214
+ }
215
+ /**
216
+ * The whole performance as one program.
217
+ *
218
+ * Emitted as a single block with one history save at the end, like
219
+ * `batch_create`: thirteen parts and eight tracks are ONE authoring act, and
220
+ * thirteen undo steps to remove one pigeon is not what anybody means by undo.
221
+ *
222
+ * Every interpolated value goes through `JSON.stringify`. Prose is DATA — an
223
+ * apostrophe in a refusal message, interpolated into a single-quoted literal,
224
+ * once made every generated `auto_walk` program a SyntaxError.
225
+ */
226
+ export function generateCharacterCode(plan, gen, parse) {
227
+ const out = [];
228
+ for (const note of plan.notes)
229
+ out.push(`// ${note.replace(/\r?\n/g, ' ')}`);
230
+ // ── THE PART IDS THE PERFORMANCE NAMES ARE NOT THE IDS THE ENGINE MINTS ────
231
+ //
232
+ // `performCharacter` names its parts `pigeon_eye`, `pigeon_head` … and keys
233
+ // every keyframe track on those names. PinePaper does not accept a
234
+ // caller-supplied id: `create()` never forwards `params.id` to
235
+ // `itemRegistry.register`, which mints `item_1`, `item_2` … of its own. So
236
+ // `addAnimation('pigeon_eye', …)` finds nothing — and it does not throw, it
237
+ // `console.warn`s, and production strips console.
238
+ //
239
+ // MEASURED, because the unit tests could not see it: thirteen parts rendered
240
+ // correctly at the right place and ZERO of them carried a keyframe. The
241
+ // figure appears, and simply never moves. Every signal short of reading the
242
+ // items said the call had succeeded.
243
+ //
244
+ // So the program binds each part to the id the engine actually assigned and
245
+ // the tracks reference that, which is what makes the performance run.
246
+ // On a CURRENT studio this map is the identity — FxTool's `create()` now
247
+ // honours a caller-supplied `id` (and suffixes rather than steals a taken
248
+ // one). It is kept because an MCP server talks to whatever studio is open,
249
+ // and on an older one the minted ids are all that exist. Reading the id back
250
+ // from the item is correct on both.
251
+ out.push('const __ppChar = {};');
252
+ // ONE AUTHORING ACT, ONE UNDO. Each generated op ends with its own
253
+ // `saveState()`, which for a thirteen-part figure is thirteen undo steps to
254
+ // remove one pigeon. The optional call means an older studio without
255
+ // batching still runs — it just undoes in pieces.
256
+ out.push('app.historyManager?.beginBatch?.();');
257
+ for (const op of plan.ops) {
258
+ // BLOCK-SCOPED, BECAUSE EVERY GENERATED CREATE DECLARES `const item`.
259
+ // Concatenated, thirteen parts are thirteen redeclarations in one scope and
260
+ // the whole program is a SyntaxError before a single shape is drawn — it
261
+ // does not draw twelve parts and fail on the last, it draws nothing.
262
+ if (op.tool === 'pinepaper_create_item') {
263
+ const partId = String(op.args.properties?.id ?? '');
264
+ const body = gen.generateCreateItem(parse.createItem(op.args));
265
+ // `itemId` is declared by the generated code inside this same block.
266
+ const bind = partId ? `\n__ppChar[${JSON.stringify(partId)}] = itemId;` : '';
267
+ out.push(`{\n${body}${bind}\n}`);
268
+ }
269
+ else if (op.tool === 'pinepaper_keyframe_animate') {
270
+ const partId = String(op.args.itemId ?? '');
271
+ // Generated against a placeholder, then the placeholder LITERAL is
272
+ // swapped for the lookup. A placeholder rather than the part id itself
273
+ // because the id also appears in the op's trailing result object, and a
274
+ // blanket string replace there would be a silent rewrite of something
275
+ // else — this way the only thing that can match is the token this
276
+ // function put in.
277
+ const token = `__PP_REF_${partId}__`;
278
+ const body = gen
279
+ .generateKeyframeAnimate(parse.keyframeAnimate({ ...op.args, itemId: token }))
280
+ .split(JSON.stringify(token)).join(`__ppChar[${JSON.stringify(partId)}]`)
281
+ .split(`'${token}'`).join(`__ppChar[${JSON.stringify(partId)}]`);
282
+ out.push(`{\n${body}\n}`);
283
+ }
284
+ }
285
+ // ── THE PARTS ARE ONE FIGURE, AND ONLY THE GRAPH CAN SAY SO ───────────────
286
+ //
287
+ // Nothing else in the program does. They are thirteen sibling paths; a Paper
288
+ // group would bind them and would also put ONE transform over all of them,
289
+ // which is wrong for a performance keyed per part — the same trade text
290
+ // effects make by joining glyphs with edges instead of grouping them.
291
+ //
292
+ // `part_of_figure` is an ANNOTATION: inert at frame time. It is deliberately
293
+ // not `part_of`, which cascades the parent's position — every carried part
294
+ // already has that motion baked into its own track by `carriedBy`, so the two
295
+ // together would move it twice.
296
+ if (plan.root) {
297
+ const bindings = plan.parts
298
+ .filter((p) => p !== plan.root)
299
+ .map((p) => ({ part: p, role: p.replace(/^[^_]+_/, '').replace(/__ink$/, '') }));
300
+ if (bindings.length) {
301
+ out.push([
302
+ `// ${bindings.length} parts bound into one figure, rooted on ${plan.root}`,
303
+ 'if (app.addRelation) {',
304
+ ...bindings.map((b) => ` app.addRelation(__ppChar[${JSON.stringify(b.part)}], __ppChar[${JSON.stringify(plan.root)}],` +
305
+ ` 'part_of_figure', { role: ${JSON.stringify(b.role)}, concept: ${JSON.stringify(plan.concept)} });`),
306
+ '}',
307
+ ].join('\n'));
308
+ }
309
+ }
310
+ out.push('app.historyManager?.endBatch?.(true);');
311
+ out.push(`// ${plan.parts.length} parts, ${plan.tracks} keyframe tracks`);
312
+ out.push(`return ${JSON.stringify({ parts: plan.parts, tracks: plan.tracks, notes: plan.notes })};`);
313
+ return out.join('\n\n');
314
+ }
315
+ //# sourceMappingURL=character.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character.js","sourceRoot":"","sources":["../../../src/tools/handlers/character.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAE,gBAAgB,EAAsB,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAInE;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAe,EAAE,OAAiD;IACnG,IAAI,EAAE,CAAC,IAAI,KAAK,4BAA4B,EAAE,CAAC;QAC7C,+DAA+D;QAC/D,EAAE;QACF,4EAA4E;QAC5E,wEAAwE;QACxE,yEAAyE;QACzE,wEAAwE;QACxE,oEAAoE;QACpE,EAAE;QACF,mEAAmE;QACnE,0EAA0E;QAC1E,2EAA2E;QAC3E,yEAAyE;QACzE,MAAM,GAAG,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAmC,CAAC;QAExE,wEAAwE;QACxE,2EAA2E;QA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O,CAAC,MAAM,CACvG;gBACD,GAAG;aACJ,CAAC,IAAI,CAAC,IAAI,CAAC,CACb,CAAC;QACJ,CAAC;IACH,CAAC;IAED,GAAG,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;IAClD,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,WAAW,IAAI,CAAC,MAAM,kBAAkB,CAAC,CAAC;IAC1E,GAAG,CAAC,IAAI,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;IACrG,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC1B,CAAC"}
@@ -23,6 +23,8 @@ export type ScreenshotMode = 'on_request' | 'always' | 'never';
23
23
  * Defaults to 'on_request' for optimal performance.
24
24
  */
25
25
  export declare function getScreenshotMode(): ScreenshotMode;
26
+ export declare const ALWAYS_SAVE_FORMATS: Set<string>;
27
+ export declare function getFileExtension(format: string): string;
26
28
  /**
27
29
  * Execution modes for tool behavior.
28
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/tools/handlers.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,cAAc,EAA6B,MAAM,oCAAoC,CAAC;AAsI/F,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAG3B,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,YAAY,EAA0C,MAAM,uBAAuB,CAAC;AA4B7F;;;;;;;GAOG;AACH,MAAM,MAAM,cAAc,GAAG,YAAY,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE/D;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAOlD;AA+C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