@pinepaper.studio/mcp-server 1.6.28 → 1.6.29

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 (52) hide show
  1. package/README.md +27 -0
  2. package/SECURITY.md +2 -3
  3. package/dist/agent/export-manager.js +125 -125
  4. package/dist/assets/repositories/fontawesome.d.ts.map +1 -1
  5. package/dist/assets/repositories/fontawesome.js +2 -1
  6. package/dist/assets/repositories/fontawesome.js.map +1 -1
  7. package/dist/assets/repositories/iconify.d.ts.map +1 -1
  8. package/dist/assets/repositories/iconify.js +4 -3
  9. package/dist/assets/repositories/iconify.js.map +1 -1
  10. package/dist/browser/puppeteer-controller.js +38 -23
  11. package/dist/build-info.json +2 -2
  12. package/dist/cli.js +54 -54
  13. package/dist/execution/canvas-state.js +25 -25
  14. package/dist/i18n/locales/en.js +22 -22
  15. package/dist/i18n/locales/fil.js +44 -44
  16. package/dist/i18n/locales/is.js +22 -22
  17. package/dist/i18n/locales/ur.js +22 -22
  18. package/dist/index.js +5559 -5559
  19. package/dist/ontology/upstream-vocabulary.js +4 -4
  20. package/dist/tools/craft-tools.js +18 -18
  21. package/dist/tools/definitions.d.ts.map +1 -1
  22. package/dist/tools/definitions.js +2816 -2815
  23. package/dist/tools/definitions.js.map +1 -1
  24. package/dist/tools/effect-check.js +68 -68
  25. package/dist/tools/engine-methods.d.ts.map +1 -1
  26. package/dist/tools/engine-methods.js +1 -1
  27. package/dist/tools/engine-methods.js.map +1 -1
  28. package/dist/tools/handlers/font.js +22 -22
  29. package/dist/tools/handlers/generate.d.ts.map +1 -1
  30. package/dist/tools/handlers/generate.js +2 -1
  31. package/dist/tools/handlers/generate.js.map +1 -1
  32. package/dist/tools/handlers.js +16 -16
  33. package/dist/tools/lane.js +64 -64
  34. package/dist/tools/p5-compat/p5-helpers.js +341 -341
  35. package/dist/tools/timeline.js +82 -82
  36. package/dist/types/code-generator.d.ts.map +1 -1
  37. package/dist/types/code-generator.js +6616 -5859
  38. package/dist/types/code-generator.js.map +1 -1
  39. package/dist/types/schemas.d.ts +2 -0
  40. package/dist/types/schemas.d.ts.map +1 -1
  41. package/dist/types/schemas.js +2 -0
  42. package/dist/types/schemas.js.map +1 -1
  43. package/dist/utils/safe-fetch.d.ts +8 -0
  44. package/dist/utils/safe-fetch.d.ts.map +1 -1
  45. package/dist/utils/safe-fetch.js +125 -34
  46. package/dist/utils/safe-fetch.js.map +1 -1
  47. package/dist/vendor/design/device-mockup-generator.js +167 -150
  48. package/dist/vendor/design/recursive-subdivision-generator.js +107 -107
  49. package/dist/vendor/design/textile-weave-generator.js +429 -429
  50. package/dist/vendor/design/ui-kit-runtime.js +674 -674
  51. package/manifest.json +1 -1
  52. package/package.json +7 -4
@@ -221,7 +221,7 @@ export const UPSTREAM_TYPES = Object.freeze({
221
221
  },
222
222
  "pp:Character": {
223
223
  "anchor": "wd:Q95074",
224
- "description": "A figure that is ONE THING made of many drawn parts — addressed, placed, recoloured and directed as a unit. The graph could not say this before 2026-09-11: it could name a rigged character, a 3D world body and a drawn eye, and had no word for the ordinary case of a figure assembled from parts. Three realisations exist and they are not interchangeable: pp:RiggedCharacter is skeleton-driven (bones, IK, poses); pp:WorldCharacter is a body in a pp:World3D; and a figure composed from the design graph is a set of sibling parts bound by pp:partOfFigure, each carrying its own keyframe track. Abstract on purpose — there is no create(\"character\") and inventing one would be the phantom this file exists to prevent. The parts are made with create(\"path\") and bound by pp:partOfFigure — NOT by addParts, which writes pp:partOf and would cascade the root's position onto parts that already carry that motion in their own tracks. NO engineMethod is claimed here on purpose: there is no one call that makes a character, and naming the nearest one would send a model to the wrong door — which is the phantom in miniature. The composing door is the MCP pinepaper_character tool, which expands a concept and its beats into create + keyframe + pp:partOfFigure calls.",
224
+ "description": ("A figure that is ONE THING made of many drawn parts — addressed, placed, recoloured and directed as a unit. The graph could not say this before 2026-09-11: it could name a rigged character, a 3D world body and a drawn eye, and had no word for the ordinary case of a figure assembled from parts. Three realisations exist and they are not interchangeable: pp:RiggedCharacter is skeleton-driven (bones, IK, poses); pp:WorldCharacter is a body in a pp:World3D; and a figure composed from the design graph is a set of sibling parts bound by pp:partOfFigure, each carrying its own keyframe track. Abstract on purpose — there is no create(\"character\") and inventing one would be the phantom this file ex" + "ists to prevent. The parts are made with create(\"path\") and bound by pp:partOfFigure — NOT by addParts, which writes pp:partOf and would cascade the root's position onto parts that already carry that motion in their own tracks. NO engineMethod is claimed here on purpose: there is no one call that makes a character, and naming the nearest one would send a model to the wrong door — which is the phantom in miniature. The composing door is the MCP pinepaper_character tool, which expands a concept and its beats into create + keyframe + pp:partOfFigure calls."),
225
225
  "parentType": "pp:Concept"
226
226
  },
227
227
  "pp:CharacterAction": {
@@ -748,7 +748,7 @@ export const UPSTREAM_TYPES = Object.freeze({
748
748
  },
749
749
  "pp:ProceduralField": {
750
750
  "anchor": "wd:Q3519388",
751
- "description": "A full-canvas surface whose pixels are COMPUTED rather than drawn — a generator's output, materialized as one raster the registry holds under its own id. It is a PLACE, not a decoration, and that distinction is the reason it is a node at all: a tunnel is a thing you can put something inside, so a rigged figure can run through one and a boat can sit on an ocean. A pp:ShaderEffectRelation, by contrast, is applied TO an item and dies with it. NOISE PROVENANCE: these programs call the SHARED pp:ShaderNode primitives from js/gpu/AuraNoiseGLSL.js, so a walk can descend from a field to the maths that draws it. Each used to inline its own hash and value noise — a third family beside the original auras' inline set and the shared one — which meant no usesShaderNode edge could be declared for any of them; that was corrected 2026-09-11 by porting them onto the shared module. pp:OceanField and pp:TunnelField declare no edge and that is not an omission: one is a sum of sine waves and the other a rotation, and neither hashes anything.",
751
+ "description": ("A full-canvas surface whose pixels are COMPUTED rather than drawn — a generator's output, materialized as one raster the registry holds under its own id. It is a PLACE, not a decoration, and that distinction is the reason it is a node at all: a tunnel is a thing you can put something inside, so a rigged figure can run through one and a boat can sit on an ocean. A pp:ShaderEffectRelation, by contrast, is applied TO an item and dies with it. NOISE PROVENANCE: these programs call the SHARED pp:ShaderNode primitives from js/gpu/AuraNoiseGLSL.js, so a walk can descend from a field to the maths that draws it. Each used to inline its own hash and value noise — a third family beside the original a" + "uras' inline set and the shared one — which meant no usesShaderNode edge could be declared for any of them; that was corrected 2026-09-11 by porting them onto the shared module. pp:OceanField and pp:TunnelField declare no edge and that is not an omission: one is a sum of sine waves and the other a rotation, and neither hashes anything."),
752
752
  "parentType": "pp:CanvasElement"
753
753
  },
754
754
  "pp:ProcessShape": {
@@ -820,7 +820,7 @@ export const UPSTREAM_TYPES = Object.freeze({
820
820
  },
821
821
  "pp:ShaderMesh": {
822
822
  "anchor": "wd:Q1154597",
823
- "description": "Geometry in a 3D world drawn by an author-supplied vertex and fragment program. Unlike pp:WorldObject, which is a box with a colour, its SHAPE and its SHADING are both the author's: vertices and triangles supplied as data, transformed by a vertex program that may displace them per frame. A registry citizen under its own id, so relations can target it — anchor a label to a procedural surface, or drive its uniforms from an event. INSTANCED when created with `instances`: one mesh drawn N times in one draw call, each copy six floats [x, y, z, scale, rotY, variant] (scale > 0 — the default program reads 0 as unbound and draws it full size). app.setWorldMeshInstances rewrites the copies; app.setWorldMeshInstanceDriver moves them on the SCENE clock — per-channel expressions in t, i, n, col, row, cols, rows, u, v, d and the base values, or keyframes [{t, instances}] — inside renderAt, so it scrubs and exports frame-exact; app.addWorldBoxField lays a cols × rows field of boxes (BoxGeometry) as one instanced mesh (a pin-art board: motion y = A*sin(d*k - t*w)). The on-device assistant reaches all three through its pinepaper_world3d tool (cube_field, set_mesh_instances, animate_mesh_instances); the server MCP tool does not expose them yet. Neither the geometry nor a driver is persisted.",
823
+ "description": ("Geometry in a 3D world drawn by an author-supplied vertex and fragment program. Unlike pp:WorldObject, which is a box with a colour, its SHAPE and its SHADING are both the author's: vertices and triangles supplied as data, transformed by a vertex program that may displace them per frame. A registry citizen under its own id, so relations can target it — anchor a label to a procedural surface, or drive its uniforms from an event. INSTANCED when created with `instances`: one mesh drawn N times in one draw call, each copy six floats [x, y, z, scale, rotY, variant] (scale > 0 — the default program reads 0 as unbound and draws it full size). app.setWorldMeshInstances rewrites the copies; app.set" + "WorldMeshInstanceDriver moves them on the SCENE clock — per-channel expressions in t, i, n, col, row, cols, rows, u, v, d and the base values, or keyframes [{t, instances}] — inside renderAt, so it scrubs and exports frame-exact; app.addWorldBoxField lays a cols × rows field of boxes (BoxGeometry) as one instanced mesh (a pin-art board: motion y = A*sin(d*k - t*w)). The on-device assistant reaches all three through its pinepaper_world3d tool (cube_field, set_mesh_instances, animate_mesh_instances); the server MCP tool does not expose them yet. Neither the geometry nor a driver is persisted."),
824
824
  "parentType": "pp:WorldObject"
825
825
  },
826
826
  "pp:ShaderNode": {
@@ -1059,7 +1059,7 @@ export const UPSTREAM_TYPES = Object.freeze({
1059
1059
  },
1060
1060
  "pp:WorldMaterial": {
1061
1061
  "anchor": null,
1062
- "description": "A named, SHARED surface description referenced by many world objects: one node, many users, so a single edit restyles all of them. That sharing is the whole point — a per-object colour already existed, and a material that styled one thing would be a rename rather than a capability. Carries colour and emissive, and — since js/world3d/PBR.js landed a real Cook-Torrance GGX BRDF — metalness and roughness, in Three.js's names and with Three.js's defaults, so a material authored against Three, Blender or Substance means the same thing here. WHERE THEY ACTUALLY RENDER is the part an agent must not guess: metalness and roughness reach the shader ONLY on the mesh path (addWorldMesh, and imported OBJ/glTF, which ride them through the uniforms bag into DEFAULT_MESH_FRAG). A plain pp:WorldObject — a box or a scattered prop — is drawn by PART_FRAG/PROP_FRAG, which shade with the older lambert term and declare no such uniform, so a material's metalness on a box is stored, listed and ignored. emissiveIntensity IS read: World3D scales the material's emissive by it before the frame is built, so it reaches every path that draws emissive. aoMapIntensity, normalScale and envMapIntensity have been REMOVED — each one scales a MAP, and there is no aoMap, no normalMap and no envMap; a knob that scales nothing is the claim-about-nothing defect wearing a Three.js name, and being Three's spelling does not make it real. They come back with the maps they scale, together, and not before. (This sentence previously said all four were accepted-but-inert. That was true when written and false from the moment emissiveIntensity was wired and the other three deleted; it is corrected here rather than quietly dropped, because a drifted claim is worse than a missing one.) clearcoat, clearcoatRoughness, sheenColor and sheenRoughness are REAL on the mesh path and carry Three's names and Three's defaults, which are inert: clearcoat 0 and a black sheenColor mean a material authored before they existed lights identically. Clearcoat is a second, always-DIELECTRIC specular lobe with its own roughness — a clearcoated metal shows a white highlight over a coloured one, which is what separates a coat from extra gloss — and it ATTENUATES the base beneath it, because light the coat reflects never reaches the base. Sheen is the Charlie retroreflective lobe that peaks at GRAZING angles, where GGX cannot reach at any roughness; it is what makes cloth read as cloth. Both are additive over the same Cook-Torrance evaluation and, like metalness and roughness, reach the shader ONLY on the mesh path. transmission, ior, thickness and opacity are ABSENT, and for one shared reason rather than as an oversight: each needs depth-sorted transparency, which this renderer does not have. They are named here so an agent learns the GATE rather than guessing the knob was forgotten. setMaterial patches colour, emissive, metalness, roughness, emissiveIntensity, clearcoat, clearcoatRoughness, sheenColor and sheenRoughness. Anchored to nothing: a plausible-looking Wikidata concept would be worse than none.",
1062
+ "description": ("A named, SHARED surface description referenced by many world objects: one node, many users, so a single edit restyles all of them. That sharing is the whole point — a per-object colour already existed, and a material that styled one thing would be a rename rather than a capability. Carries colour and emissive, and — since js/world3d/PBR.js landed a real Cook-Torrance GGX BRDF — metalness and roughness, in Three.js's names and with Three.js's defaults, so a material authored against Three, Blender or Substance means the same thing here. WHERE THEY ACTUALLY RENDER is the part an agent must not guess: metalness and roughness reach the shader ONLY on the mesh path (addWorldMesh, and imported O" + "BJ/glTF, which ride them through the uniforms bag into DEFAULT_MESH_FRAG). A plain pp:WorldObject — a box or a scattered prop — is drawn by PART_FRAG/PROP_FRAG, which shade with the older lambert term and declare no such uniform, so a material's metalness on a box is stored, listed and ignored. emissiveIntensity IS read: World3D scales the material's emissive by it before the frame is built, so it reaches every path that draws emissive. aoMapIntensity, normalScale and envMapIntensity have been REMOVED — each one scales a MAP, and there is no aoMap, no normalMap and no envMap; a knob that scales nothing is the claim-about-nothing defect wearing a Three.js name, and being Three's spelling do" + "es not make it real. They come back with the maps they scale, together, and not before. (This sentence previously said all four were accepted-but-inert. That was true when written and false from the moment emissiveIntensity was wired and the other three deleted; it is corrected here rather than quietly dropped, because a drifted claim is worse than a missing one.) clearcoat, clearcoatRoughness, sheenColor and sheenRoughness are REAL on the mesh path and carry Three's names and Three's defaults, which are inert: clearcoat 0 and a black sheenColor mean a material authored before they existed lights identically. Clearcoat is a second, always-DIELECTRIC specular lobe with its own roughness — a" + " clearcoated metal shows a white highlight over a coloured one, which is what separates a coat from extra gloss — and it ATTENUATES the base beneath it, because light the coat reflects never reaches the base. Sheen is the Charlie retroreflective lobe that peaks at GRAZING angles, where GGX cannot reach at any roughness; it is what makes cloth read as cloth. Both are additive over the same Cook-Torrance evaluation and, like metalness and roughness, reach the shader ONLY on the mesh path. transmission, ior, thickness and opacity are ABSENT, and for one shared reason rather than as an oversight: each needs depth-sorted transparency, which this renderer does not have. They are named here so an" + " agent learns the GATE rather than guessing the knob was forgotten. setMaterial patches colour, emissive, metalness, roughness, emissiveIntensity, clearcoat, clearcoatRoughness, sheenColor and sheenRoughness. Anchored to nothing: a plausible-looking Wikidata concept would be worse than none."),
1063
1063
  "parentType": "pp:CanvasElement"
1064
1064
  },
1065
1065
  "pp:WorldObject": {
@@ -117,23 +117,23 @@ export function generateUiKit(input) {
117
117
  const brandFaces = [brand?.headingFont, brand?.bodyFont].filter((f) => typeof f === 'string' && /^[\w \-]{1,60}$/.test(f.trim()));
118
118
  const ensure = (family, slot) => ` ${slot} = await (async function() {${emitEnsureFont(family).replace(/\n/g, '\n ')}\n return __font;\n })();\n if (${slot}) __fonts.push(${slot});`;
119
119
  const runtime = UI_KIT_RUNTIME.replace(KIT_DEFAULT_FONTS, KIT_LOADED_FONTS);
120
- return `// UI kit: ${input.action}
121
- (async function() {
122
- const __fonts = [];
123
- let __geist, __geistMono, __b;
124
- ${ensure('Geist', '__geist')}
125
- ${ensure('Geist Mono', '__geistMono')}
126
- ${[...new Set(brandFaces.map((f) => f.trim()))].map((f) => ensure(f, '__b')).join('\n')}
127
- // Geist is the kit's face; a studio that cannot load it draws in Inter, its own face, not a browser substitute.
128
- var __kitFace = (__geist && __geist.available === false) ? 'Inter' : 'Geist';
129
- var __kitMono = (__geistMono && __geistMono.available === false) ? 'monospace' : 'Geist Mono';
130
- ${runtime}
131
- ${brand ? '' : " if (typeof window !== 'undefined' && window.__ppActiveBrand) UIKit.brand(window.__ppActiveBrand);\n"} var __before = app.itemRegistry ? app.itemRegistry.getAll().length : 0;
132
- ${call}
133
- return { success: true, tool: 'pinepaper_ui_kit', action: ${JSON.stringify(input.action)},
134
- itemCount: app.itemRegistry ? app.itemRegistry.getAll().length - __before : null,
135
- face: __kitFace, brand: ${brand ? "'call'" : "(typeof window !== 'undefined' && window.__ppActiveBrand) ? 'active brand kit' : 'kit defaults'"},
136
- ...(__fonts.length ? { fonts: __fonts } : {}) };
137
- })();`;
120
+ return ("// UI kit: " +
121
+ String(input.action) +
122
+ "\n(async function() {\n const __fonts = [];\n let __geist, __geistMono, __b;\n" +
123
+ String(ensure('Geist', '__geist')) +
124
+ "\n" +
125
+ String(ensure('Geist Mono', '__geistMono')) +
126
+ "\n" +
127
+ String([...new Set(brandFaces.map((f) => f.trim()))].map((f) => ensure(f, '__b')).join('\n')) +
128
+ "\n // Geist is the kit's face; a studio that cannot load it draws in Inter, its own face, not a browser substitute.\n var __kitFace = (__geist && __geist.available === false) ? 'Inter' : 'Geist';\n var __kitMono = (__geistMono && __geistMono.available === false) ? 'monospace' : 'Geist Mono';\n" +
129
+ String(runtime) +
130
+ "\n" +
131
+ String(brand ? '' : " if (typeof window !== 'undefined' && window.__ppActiveBrand) UIKit.brand(window.__ppActiveBrand);\n") +
132
+ " var __before = app.itemRegistry ? app.itemRegistry.getAll().length : 0;\n" +
133
+ String(call) +
134
+ "\n return { success: true, tool: 'pinepaper_ui_kit', action: " +
135
+ String(JSON.stringify(input.action)) +
136
+ ",\n itemCount: app.itemRegistry ? app.itemRegistry.getAll().length - __before : null,\n face: __kitFace, brand: " +
137
+ String(brand ? "'call'" : "(typeof window !== 'undefined' && window.__ppActiveBrand) ? 'active brand kit' : 'kit defaults'") + ",\n ...(__fonts.length ? { fonts: __fonts } : {}) };\n})();");
138
138
  }
139
139
  //# sourceMappingURL=craft-tools.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAqE/C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAYnE;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,QAAmB,CAAC;AAEhD,yGAAyG;AACzG,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAmG,CAAC;AAE5I,eAAO,MAAM,cAAc,QA8K+G,CAAC;AAW3I,eAAO,MAAM,eAAe,EAAE,IAAI,EAglTjC,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"}
1
+ {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAqE/C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,SAAS,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,MAAM,CAYnE;AAED,0EAA0E;AAC1E,eAAO,MAAM,eAAe,QAAmB,CAAC;AAEhD,yGAAyG;AACzG,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAmG,CAAC;AAE5I,eAAO,MAAM,cAAc,QA8K+G,CAAC;AAW3I,eAAO,MAAM,eAAe,EAAE,IAAI,EAilTjC,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"}