@pinepaper.studio/mcp-server 1.6.7 → 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 (174) 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 +256 -17
  8. package/README.pt-BR.md +9 -5
  9. package/README.zh-CN.md +6 -4
  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/character/data/concepts.json +1 -0
  19. package/dist/character/data/depictions.json +1 -0
  20. package/dist/character/data/styles.json +1 -0
  21. package/dist/character/duration-scale.d.ts +13 -0
  22. package/dist/character/duration-scale.d.ts.map +1 -0
  23. package/dist/character/duration-scale.js +13 -0
  24. package/dist/character/duration-scale.js.map +1 -0
  25. package/dist/character/path-bbox.d.ts +82 -0
  26. package/dist/character/path-bbox.d.ts.map +1 -0
  27. package/dist/character/path-bbox.js +496 -0
  28. package/dist/character/path-bbox.js.map +1 -0
  29. package/dist/character/perform.d.ts +149 -0
  30. package/dist/character/perform.d.ts.map +1 -0
  31. package/dist/character/perform.js +626 -0
  32. package/dist/character/perform.js.map +1 -0
  33. package/dist/character/resolve.d.ts +51 -0
  34. package/dist/character/resolve.d.ts.map +1 -0
  35. package/dist/character/resolve.js +239 -0
  36. package/dist/character/resolve.js.map +1 -0
  37. package/dist/cli.js +12 -0
  38. package/dist/cli.js.map +1 -1
  39. package/dist/design/design-systems.d.ts +224 -0
  40. package/dist/design/design-systems.d.ts.map +1 -0
  41. package/dist/design/design-systems.js +434 -0
  42. package/dist/design/design-systems.js.map +1 -0
  43. package/dist/execution/canvas-state.d.ts +7 -0
  44. package/dist/execution/canvas-state.d.ts.map +1 -1
  45. package/dist/execution/canvas-state.js +20 -8
  46. package/dist/execution/canvas-state.js.map +1 -1
  47. package/dist/index.d.ts +20 -0
  48. package/dist/index.d.ts.map +1 -1
  49. package/dist/index.js +12 -4
  50. package/dist/index.js.map +1 -1
  51. package/dist/ontology/design-graph.d.ts +9 -0
  52. package/dist/ontology/design-graph.d.ts.map +1 -1
  53. package/dist/ontology/design-graph.js +98 -3
  54. package/dist/ontology/design-graph.js.map +1 -1
  55. package/dist/ontology/types.d.ts +42 -0
  56. package/dist/ontology/types.d.ts.map +1 -1
  57. package/dist/ontology/vocabulary.d.ts.map +1 -1
  58. package/dist/ontology/vocabulary.js +20 -0
  59. package/dist/ontology/vocabulary.js.map +1 -1
  60. package/dist/tools/compact-descriptions.d.ts.map +1 -1
  61. package/dist/tools/compact-descriptions.js +25 -0
  62. package/dist/tools/compact-descriptions.js.map +1 -1
  63. package/dist/tools/definitions.d.ts +1 -1
  64. package/dist/tools/definitions.d.ts.map +1 -1
  65. package/dist/tools/definitions.js +404 -25
  66. package/dist/tools/definitions.js.map +1 -1
  67. package/dist/tools/engine-methods.d.ts +18 -0
  68. package/dist/tools/engine-methods.d.ts.map +1 -0
  69. package/dist/tools/engine-methods.js +241 -0
  70. package/dist/tools/engine-methods.js.map +1 -0
  71. package/dist/tools/handlers/character.d.ts +121 -0
  72. package/dist/tools/handlers/character.d.ts.map +1 -0
  73. package/dist/tools/handlers/character.js +315 -0
  74. package/dist/tools/handlers/character.js.map +1 -0
  75. package/dist/tools/handlers.d.ts +2 -0
  76. package/dist/tools/handlers.d.ts.map +1 -1
  77. package/dist/tools/handlers.js +522 -18
  78. package/dist/tools/handlers.js.map +1 -1
  79. package/dist/tools/minimal-descriptions.d.ts.map +1 -1
  80. package/dist/tools/minimal-descriptions.js +15 -3
  81. package/dist/tools/minimal-descriptions.js.map +1 -1
  82. package/dist/tools/toolkits.d.ts.map +1 -1
  83. package/dist/tools/toolkits.js +8 -0
  84. package/dist/tools/toolkits.js.map +1 -1
  85. package/dist/types/code-generator.d.ts +106 -1
  86. package/dist/types/code-generator.d.ts.map +1 -1
  87. package/dist/types/code-generator.js +1273 -18
  88. package/dist/types/code-generator.js.map +1 -1
  89. package/dist/types/schemas.d.ts +6805 -124
  90. package/dist/types/schemas.d.ts.map +1 -1
  91. package/dist/types/schemas.js +627 -17
  92. package/dist/types/schemas.js.map +1 -1
  93. package/dist/vendor/design/art-deco-generator.d.ts +52 -0
  94. package/dist/vendor/design/art-deco-generator.d.ts.map +1 -0
  95. package/dist/vendor/design/art-deco-generator.js +144 -0
  96. package/dist/vendor/design/art-deco-generator.js.map +1 -0
  97. package/dist/vendor/design/art-nouveau-generator.d.ts +46 -0
  98. package/dist/vendor/design/art-nouveau-generator.d.ts.map +1 -0
  99. package/dist/vendor/design/art-nouveau-generator.js +134 -0
  100. package/dist/vendor/design/art-nouveau-generator.js.map +1 -0
  101. package/dist/vendor/design/bauhaus-generator.d.ts +53 -0
  102. package/dist/vendor/design/bauhaus-generator.d.ts.map +1 -0
  103. package/dist/vendor/design/bauhaus-generator.js +126 -0
  104. package/dist/vendor/design/bauhaus-generator.js.map +1 -0
  105. package/dist/vendor/design/brutalist-generator.d.ts +53 -0
  106. package/dist/vendor/design/brutalist-generator.d.ts.map +1 -0
  107. package/dist/vendor/design/brutalist-generator.js +148 -0
  108. package/dist/vendor/design/brutalist-generator.js.map +1 -0
  109. package/dist/vendor/design/claymorphism-generator.d.ts +46 -0
  110. package/dist/vendor/design/claymorphism-generator.d.ts.map +1 -0
  111. package/dist/vendor/design/claymorphism-generator.js +135 -0
  112. package/dist/vendor/design/claymorphism-generator.js.map +1 -0
  113. package/dist/vendor/design/corporate-memphis-generator.d.ts +47 -0
  114. package/dist/vendor/design/corporate-memphis-generator.d.ts.map +1 -0
  115. package/dist/vendor/design/corporate-memphis-generator.js +144 -0
  116. package/dist/vendor/design/corporate-memphis-generator.js.map +1 -0
  117. package/dist/vendor/design/cyberpunk-generator.d.ts +52 -0
  118. package/dist/vendor/design/cyberpunk-generator.d.ts.map +1 -0
  119. package/dist/vendor/design/cyberpunk-generator.js +162 -0
  120. package/dist/vendor/design/cyberpunk-generator.js.map +1 -0
  121. package/dist/vendor/design/de-stijl-generator.d.ts +50 -0
  122. package/dist/vendor/design/de-stijl-generator.d.ts.map +1 -0
  123. package/dist/vendor/design/de-stijl-generator.js +154 -0
  124. package/dist/vendor/design/de-stijl-generator.js.map +1 -0
  125. package/dist/vendor/design/design-style.d.ts +3 -0
  126. package/dist/vendor/design/design-style.d.ts.map +1 -0
  127. package/dist/vendor/design/design-style.js +12 -0
  128. package/dist/vendor/design/design-style.js.map +1 -0
  129. package/dist/vendor/design/design-systems-dtcg.d.ts +59 -0
  130. package/dist/vendor/design/design-systems-dtcg.d.ts.map +1 -0
  131. package/dist/vendor/design/design-systems-dtcg.js +571 -0
  132. package/dist/vendor/design/design-systems-dtcg.js.map +1 -0
  133. package/dist/vendor/design/frutiger-aero-generator.d.ts +46 -0
  134. package/dist/vendor/design/frutiger-aero-generator.d.ts.map +1 -0
  135. package/dist/vendor/design/frutiger-aero-generator.js +133 -0
  136. package/dist/vendor/design/frutiger-aero-generator.js.map +1 -0
  137. package/dist/vendor/design/memphis-generator.d.ts +56 -0
  138. package/dist/vendor/design/memphis-generator.d.ts.map +1 -0
  139. package/dist/vendor/design/memphis-generator.js +158 -0
  140. package/dist/vendor/design/memphis-generator.js.map +1 -0
  141. package/dist/vendor/design/mid-century-upa-generator.d.ts +46 -0
  142. package/dist/vendor/design/mid-century-upa-generator.d.ts.map +1 -0
  143. package/dist/vendor/design/mid-century-upa-generator.js +137 -0
  144. package/dist/vendor/design/mid-century-upa-generator.js.map +1 -0
  145. package/dist/vendor/design/neumorphic-generator.d.ts +53 -0
  146. package/dist/vendor/design/neumorphic-generator.d.ts.map +1 -0
  147. package/dist/vendor/design/neumorphic-generator.js +182 -0
  148. package/dist/vendor/design/neumorphic-generator.js.map +1 -0
  149. package/dist/vendor/design/op-art-generator.d.ts +45 -0
  150. package/dist/vendor/design/op-art-generator.d.ts.map +1 -0
  151. package/dist/vendor/design/op-art-generator.js +116 -0
  152. package/dist/vendor/design/op-art-generator.js.map +1 -0
  153. package/dist/vendor/design/pixel-art-generator.d.ts +45 -0
  154. package/dist/vendor/design/pixel-art-generator.d.ts.map +1 -0
  155. package/dist/vendor/design/pixel-art-generator.js +143 -0
  156. package/dist/vendor/design/pixel-art-generator.js.map +1 -0
  157. package/dist/vendor/design/pop-art-generator.d.ts +53 -0
  158. package/dist/vendor/design/pop-art-generator.d.ts.map +1 -0
  159. package/dist/vendor/design/pop-art-generator.js +164 -0
  160. package/dist/vendor/design/pop-art-generator.js.map +1 -0
  161. package/dist/vendor/design/risograph-generator.d.ts +53 -0
  162. package/dist/vendor/design/risograph-generator.d.ts.map +1 -0
  163. package/dist/vendor/design/risograph-generator.js +170 -0
  164. package/dist/vendor/design/risograph-generator.js.map +1 -0
  165. package/dist/vendor/design/swiss-style-generator.d.ts +55 -0
  166. package/dist/vendor/design/swiss-style-generator.d.ts.map +1 -0
  167. package/dist/vendor/design/swiss-style-generator.js +147 -0
  168. package/dist/vendor/design/swiss-style-generator.js.map +1 -0
  169. package/dist/vendor/design/vaporwave-generator.d.ts +51 -0
  170. package/dist/vendor/design/vaporwave-generator.d.ts.map +1 -0
  171. package/dist/vendor/design/vaporwave-generator.js +139 -0
  172. package/dist/vendor/design/vaporwave-generator.js.map +1 -0
  173. package/manifest.json +33 -1
  174. package/package.json +13 -5
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Engine methods a tool REFUSES without — guarded with `!==` in the emitters.
3
+ *
4
+ * A studio missing one of these cannot serve the tools that need it, and will
5
+ * say so by name when called. Probe them all at once with
6
+ * `pinepaper_query_capabilities { action: 'studio' }` instead of discovering
7
+ * it one call at a time.
8
+ */
9
+ export declare const REQUIRED_ENGINE_METHODS: readonly string[];
10
+ /**
11
+ * Engine methods a tool DEGRADES without — probed with `===` in the emitters.
12
+ *
13
+ * Their absence narrows an answer rather than failing it: a canvas that cannot
14
+ * be resized is not a failed compose. Reported separately so an older studio
15
+ * does not read as an unusable one.
16
+ */
17
+ export declare const OPTIONAL_ENGINE_METHODS: readonly string[];
18
+ //# sourceMappingURL=engine-methods.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-methods.d.ts","sourceRoot":"","sources":["../../src/tools/engine-methods.ts"],"names":[],"mappings":"AAUA;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAwMpD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAcpD,CAAC"}
@@ -0,0 +1,241 @@
1
+ /* GENERATED — DO NOT EDIT.
2
+ *
3
+ * Source: src/types/code-generator.ts (its own `typeof app.X` guards)
4
+ * Generator: scripts/sync-engine-methods.mjs
5
+ *
6
+ * Re-run the generator after adding or removing a guard. A hand edit here is a
7
+ * second copy of a list that already exists in the emitters, which is the
8
+ * drift this file was created to prevent.
9
+ */
10
+ /**
11
+ * Engine methods a tool REFUSES without — guarded with `!==` in the emitters.
12
+ *
13
+ * A studio missing one of these cannot serve the tools that need it, and will
14
+ * say so by name when called. Probe them all at once with
15
+ * `pinepaper_query_capabilities { action: 'studio' }` instead of discovering
16
+ * it one call at a time.
17
+ */
18
+ export const REQUIRED_ENGINE_METHODS = [
19
+ 'addComment',
20
+ 'addPhysicsBody3D',
21
+ 'addRelation',
22
+ 'addWorldActor',
23
+ 'addWorldLight',
24
+ 'addWorldMaterial',
25
+ 'analyzeAudio',
26
+ 'analyzePalette',
27
+ 'animateItems',
28
+ 'animateToBeat',
29
+ 'applyChromaKey',
30
+ 'applyDirectorShots',
31
+ 'applyHatching',
32
+ 'applyImageFilter',
33
+ 'applyPhysicsImpulse3D',
34
+ 'applyRelationPreset',
35
+ 'applyStorySpec',
36
+ 'applyTemplateWithParams',
37
+ 'applyTextEffect',
38
+ 'applyTextStyle',
39
+ 'applyThreadPainting',
40
+ 'applyTrackMatte',
41
+ 'autoDirectStory',
42
+ 'bindTimelineToScroll',
43
+ 'booleanOp',
44
+ 'breakApart',
45
+ 'bringForward',
46
+ 'bringToFront',
47
+ 'buildSoundFromText',
48
+ 'canvasToGround',
49
+ 'captureFramesAt',
50
+ 'chordFrequencies',
51
+ 'composeCollage',
52
+ 'configureWorld3D',
53
+ 'convertTextToCollage',
54
+ 'create',
55
+ 'createCursiveText',
56
+ 'createEquationPath',
57
+ 'createEvent',
58
+ 'createSceneGraph',
59
+ 'createSound',
60
+ 'createTilemap',
61
+ 'createWorld3D',
62
+ 'cropImage',
63
+ 'defineComponent',
64
+ 'deleteComment',
65
+ 'deleteItem',
66
+ 'describeWorld3D',
67
+ 'detachComponentInstance',
68
+ 'detectObjects',
69
+ 'diffAgainstVersion',
70
+ 'diffHistoryStates',
71
+ 'distillArticle',
72
+ 'dollyWorldCamera',
73
+ 'ensureHeavyModules',
74
+ 'estimateExportSize',
75
+ 'exportBVH',
76
+ 'exportDotLottie',
77
+ 'exportEngine.exportToStore',
78
+ 'exportEngine.listExports',
79
+ 'exportEngine.readExport',
80
+ 'exportEngine.releaseExport',
81
+ 'exportEngine.sceneHasAudio',
82
+ 'exportGLB',
83
+ 'exportLottie',
84
+ 'exportPNGSequence',
85
+ 'extractObject',
86
+ 'extrudeToMesh',
87
+ 'findPath',
88
+ 'fireProjectile3D',
89
+ 'fitToFrame',
90
+ 'flipItems',
91
+ 'getCapabilities',
92
+ 'getDependents',
93
+ 'getItemProvenance',
94
+ 'getLineage',
95
+ 'getPathGeometry',
96
+ 'getProgress',
97
+ 'getTemplateParams',
98
+ 'getTimeScale',
99
+ 'getWorldNavTarget',
100
+ 'groundHeightAt',
101
+ 'importBVH',
102
+ 'importFigmaSVG',
103
+ 'importGLTFToWorld',
104
+ 'importLayeredCharacter',
105
+ 'importLottie',
106
+ 'importOBJToWorld',
107
+ 'importSpine',
108
+ 'instantiateComponent',
109
+ 'latheToMesh',
110
+ 'lintScene',
111
+ 'listArtboardPresets',
112
+ 'listCameraTreatments',
113
+ 'listCollagePatterns',
114
+ 'listComments',
115
+ 'listComponents',
116
+ 'listDesignMedia',
117
+ 'listFlowFields',
118
+ 'listGeneratorMotions',
119
+ 'listHatchOptions',
120
+ 'listInstruments',
121
+ 'listPercussion',
122
+ 'listPhysicsBodies3D',
123
+ 'listPositionForms',
124
+ 'listReveals',
125
+ 'listScrubAnchors',
126
+ 'listSfx',
127
+ 'listStaggerOrigins',
128
+ 'listStitches',
129
+ 'listStyles',
130
+ 'listTextEffects',
131
+ 'listTextStyles',
132
+ 'listWorldLights',
133
+ 'listWorldMaterials',
134
+ 'listWorldMeshClips',
135
+ 'listWorldMeshes',
136
+ 'mapSystem.animateGlobeRotation',
137
+ 'mapSystem.enableGlobeMode',
138
+ 'mapSystem.pinItemToGlobe',
139
+ 'mapSystem.rotateGlobeTo',
140
+ 'mapSystem.stopWorldTour',
141
+ 'mapSystem.tourItemAlongCoords',
142
+ 'mapSystem.tourRegions',
143
+ 'mapSystem.worldTour',
144
+ 'matchCut',
145
+ 'outlineStroke',
146
+ 'panWorldCamera',
147
+ 'patternFrom',
148
+ 'placeSequence',
149
+ 'planBook',
150
+ 'playChord',
151
+ 'playPercussion',
152
+ 'playSfx',
153
+ 'playSound',
154
+ 'playSoundFromText',
155
+ 'playTone',
156
+ 'pulseEvent',
157
+ 'raycastWorld',
158
+ 'recolorPalette',
159
+ 'recordFlipState',
160
+ 'recordLineage',
161
+ 'registerInstrument',
162
+ 'registerPercussion',
163
+ 'registerSfx',
164
+ 'removePhysicsBody3D',
165
+ 'removeSound',
166
+ 'removeWorld3D',
167
+ 'removeWorldLight',
168
+ 'removeWorldMaterial',
169
+ 'removeWorldMesh',
170
+ 'renderSoundtrackWav',
171
+ 'resolveComment',
172
+ 'resolveDesignMedium',
173
+ 'resolveTimelinePosition',
174
+ 'retargetBVH',
175
+ 'sendBackward',
176
+ 'sendToBack',
177
+ 'setArtboard',
178
+ 'setCollageTreatment',
179
+ 'setComponentOverride',
180
+ 'setFontAxes',
181
+ 'setItemConstraints',
182
+ 'setItemLocked',
183
+ 'setPhysicsVelocity3D',
184
+ 'setProgress',
185
+ 'setSoundPlacement',
186
+ 'setTimeRemap',
187
+ 'setTimeScale',
188
+ 'setWorldLight',
189
+ 'setWorldMaterial',
190
+ 'setWorldMeshClip',
191
+ 'setWorldMeshInstances',
192
+ 'setWorldNavTarget',
193
+ 'shatterImage',
194
+ 'simplifyPath',
195
+ 'solveODE',
196
+ 'speedRamp',
197
+ 'staggerDelays',
198
+ 'staggerItems',
199
+ 'stepPhysics3D',
200
+ 'stickFigure',
201
+ 'stickSet',
202
+ 'stitchPoses',
203
+ 'stopLiveMatte',
204
+ 'stopSounds',
205
+ 'storyFromText',
206
+ 'syncComponent',
207
+ 'timbreFromPath',
208
+ 'togglePathClosed',
209
+ 'unlockAllItems',
210
+ 'unwrapText',
211
+ 'updateComponentFromInstance',
212
+ 'validateOp',
213
+ 'validateScene',
214
+ 'validateSceneGraph',
215
+ 'worldLineOfSight',
216
+ 'worldToCanvas',
217
+ 'wrapText',
218
+ ];
219
+ /**
220
+ * Engine methods a tool DEGRADES without — probed with `===` in the emitters.
221
+ *
222
+ * Their absence narrows an answer rather than failing it: a canvas that cannot
223
+ * be resized is not a failed compose. Reported separately so an older studio
224
+ * does not read as an unusable one.
225
+ */
226
+ export const OPTIONAL_ENGINE_METHODS = [
227
+ '_resolveRaster',
228
+ 'activeWindowOf',
229
+ 'captureFrameDataURL',
230
+ 'clearCanvas',
231
+ 'instantiateOntology',
232
+ 'itemRegistry.getAll',
233
+ 'listFontAxes',
234
+ 'listTextPalettes',
235
+ 'registerItem',
236
+ 'relationRegistry.exportForSave',
237
+ 'sceneAt',
238
+ 'setBackgroundColor',
239
+ 'setCanvasSize',
240
+ ];
241
+ //# sourceMappingURL=engine-methods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"engine-methods.js","sourceRoot":"","sources":["../../src/tools/engine-methods.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,YAAY;IACZ,kBAAkB;IAClB,aAAa;IACb,eAAe;IACf,eAAe;IACf,kBAAkB;IAClB,cAAc;IACd,gBAAgB;IAChB,cAAc;IACd,eAAe;IACf,gBAAgB;IAChB,oBAAoB;IACpB,eAAe;IACf,kBAAkB;IAClB,uBAAuB;IACvB,qBAAqB;IACrB,gBAAgB;IAChB,yBAAyB;IACzB,iBAAiB;IACjB,gBAAgB;IAChB,qBAAqB;IACrB,iBAAiB;IACjB,iBAAiB;IACjB,sBAAsB;IACtB,WAAW;IACX,YAAY;IACZ,cAAc;IACd,cAAc;IACd,oBAAoB;IACpB,gBAAgB;IAChB,iBAAiB;IACjB,kBAAkB;IAClB,gBAAgB;IAChB,kBAAkB;IAClB,sBAAsB;IACtB,QAAQ;IACR,mBAAmB;IACnB,oBAAoB;IACpB,aAAa;IACb,kBAAkB;IAClB,aAAa;IACb,eAAe;IACf,eAAe;IACf,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,YAAY;IACZ,iBAAiB;IACjB,yBAAyB;IACzB,eAAe;IACf,oBAAoB;IACpB,mBAAmB;IACnB,gBAAgB;IAChB,kBAAkB;IAClB,oBAAoB;IACpB,oBAAoB;IACpB,WAAW;IACX,iBAAiB;IACjB,4BAA4B;IAC5B,0BAA0B;IAC1B,yBAAyB;IACzB,4BAA4B;IAC5B,4BAA4B;IAC5B,WAAW;IACX,cAAc;IACd,mBAAmB;IACnB,eAAe;IACf,eAAe;IACf,UAAU;IACV,kBAAkB;IAClB,YAAY;IACZ,WAAW;IACX,iBAAiB;IACjB,eAAe;IACf,mBAAmB;IACnB,YAAY;IACZ,iBAAiB;IACjB,aAAa;IACb,mBAAmB;IACnB,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B,mBAAmB;IACnB,cAAc;IACd,cAAc;IACd,UAAU;IACV,WAAW;IACX,eAAe;IACf,cAAc;IACd,eAAe;IACf,aAAa;IACb,UAAU;IACV,aAAa;IACb,eAAe;IACf,YAAY;IACZ,eAAe;IACf,eAAe;IACf,gBAAgB;IAChB,kBAAkB;IAClB,gBAAgB;IAChB,YAAY;IACZ,6BAA6B;IAC7B,YAAY;IACZ,eAAe;IACf,oBAAoB;IACpB,kBAAkB;IAClB,eAAe;IACf,UAAU;CACX,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsB;IACxD,gBAAgB;IAChB,gBAAgB;IAChB,qBAAqB;IACrB,aAAa;IACb,qBAAqB;IACrB,qBAAqB;IACrB,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,gCAAgC;IAChC,SAAS;IACT,oBAAoB;IACpB,eAAe;CAChB,CAAC"}
@@ -0,0 +1,121 @@
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 { type CharacterArgs } from '../../character/resolve.js';
44
+ export interface CharacterOp {
45
+ tool: string;
46
+ args: Record<string, unknown>;
47
+ }
48
+ /**
49
+ * Restate one create op in PinePaper's pathData convention.
50
+ *
51
+ * A part whose pathData cannot be measured is passed through UNCHANGED rather
52
+ * than guessed at: it will be misplaced, which is visible, instead of being
53
+ * silently dropped, which is not.
54
+ */
55
+ export declare function toEngineConvention(op: CharacterOp, centres?: Map<string, {
56
+ cx: number;
57
+ cy: number;
58
+ }>): CharacterOp;
59
+ /**
60
+ * Convert a whole program, not one op at a time.
61
+ *
62
+ * The keyframe tracks cannot be converted without knowing where the create ops
63
+ * actually placed each part, so the creates go first and record their centres.
64
+ * Converting op-by-op is what left the tracks anchored on a different point
65
+ * from the items they drive.
66
+ */
67
+ export declare function convertOps(ops: CharacterOp[]): CharacterOp[];
68
+ /**
69
+ * Plan a character call: ops in PinePaper's convention, or a refusal.
70
+ *
71
+ * Separated from the handler so it can be tested WITHOUT `handleToolCall`,
72
+ * which tries to reach a browser and times out at 5001ms.
73
+ */
74
+ export declare function planCharacter(args: CharacterArgs): {
75
+ ok: true;
76
+ ops: CharacterOp[];
77
+ parts: string[];
78
+ tracks: number;
79
+ notes: string[];
80
+ concept: string;
81
+ root: string | null;
82
+ } | {
83
+ ok: false;
84
+ reason: string;
85
+ };
86
+ /**
87
+ * The part the others hang off.
88
+ *
89
+ * `part_of_figure` points at a SIBLING, exactly as `glyph_of` points at the
90
+ * root glyph — there is no wrapper item, and inventing one would be the Paper
91
+ * group this design deliberately avoids. The body is the natural root because
92
+ * it is the part every other one is drawn against; failing that, the first in
93
+ * z-order, which is stable for a given concept.
94
+ */
95
+ export declare function figureRoot(parts: string[]): string | null;
96
+ /**
97
+ * The whole performance as one program.
98
+ *
99
+ * Emitted as a single block with one history save at the end, like
100
+ * `batch_create`: thirteen parts and eight tracks are ONE authoring act, and
101
+ * thirteen undo steps to remove one pigeon is not what anybody means by undo.
102
+ *
103
+ * Every interpolated value goes through `JSON.stringify`. Prose is DATA — an
104
+ * apostrophe in a refusal message, interpolated into a single-quoted literal,
105
+ * once made every generated `auto_walk` program a SyntaxError.
106
+ */
107
+ export declare function generateCharacterCode(plan: {
108
+ ops: CharacterOp[];
109
+ parts: string[];
110
+ tracks: number;
111
+ notes: string[];
112
+ concept?: string;
113
+ root?: string | null;
114
+ }, gen: {
115
+ generateCreateItem: (input: unknown) => string;
116
+ generateKeyframeAnimate: (input: unknown) => string;
117
+ }, parse: {
118
+ createItem: (a: unknown) => unknown;
119
+ keyframeAnimate: (a: unknown) => unknown;
120
+ }): string;
121
+ //# sourceMappingURL=character.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"character.d.ts","sourceRoot":"","sources":["../../../src/tools/handlers/character.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,OAAO,EAAoB,KAAK,aAAa,EAAE,MAAM,4BAA4B,CAAC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