@pinepaper.studio/mcp-server 1.6.27 → 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.
- package/README.md +112 -2
- package/SECURITY.md +6 -6
- package/dist/agent/export-manager.js +125 -125
- package/dist/assets/repositories/fontawesome.d.ts.map +1 -1
- package/dist/assets/repositories/fontawesome.js +2 -1
- package/dist/assets/repositories/fontawesome.js.map +1 -1
- package/dist/assets/repositories/iconify.d.ts.map +1 -1
- package/dist/assets/repositories/iconify.js +4 -3
- package/dist/assets/repositories/iconify.js.map +1 -1
- package/dist/browser/puppeteer-controller.js +38 -23
- package/dist/build-info.json +2 -2
- package/dist/cli.js +54 -54
- package/dist/execution/canvas-state.js +25 -25
- package/dist/i18n/locales/en.js +22 -22
- package/dist/i18n/locales/fil.js +44 -44
- package/dist/i18n/locales/is.js +22 -22
- package/dist/i18n/locales/ur.js +22 -22
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5563 -5560
- package/dist/index.js.map +1 -1
- package/dist/ontology/upstream-vocabulary.d.ts +2 -2
- package/dist/ontology/upstream-vocabulary.js +6 -6
- package/dist/tools/choreograph.d.ts.map +1 -1
- package/dist/tools/choreograph.js +7 -0
- package/dist/tools/choreograph.js.map +1 -1
- package/dist/tools/craft-tools.js +18 -18
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +2830 -2812
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/effect-check.js +68 -68
- package/dist/tools/engine-lists.d.ts +11 -4
- package/dist/tools/engine-lists.d.ts.map +1 -1
- package/dist/tools/engine-lists.js +49 -4
- package/dist/tools/engine-lists.js.map +1 -1
- package/dist/tools/engine-methods.d.ts.map +1 -1
- package/dist/tools/engine-methods.js +2 -1
- package/dist/tools/engine-methods.js.map +1 -1
- package/dist/tools/engine-surface.d.ts +1 -1
- package/dist/tools/engine-surface.d.ts.map +1 -1
- package/dist/tools/engine-surface.js +16 -4
- package/dist/tools/engine-surface.js.map +1 -1
- package/dist/tools/export-file-receipt.d.ts +21 -0
- package/dist/tools/export-file-receipt.d.ts.map +1 -1
- package/dist/tools/export-file-receipt.js +36 -13
- package/dist/tools/export-file-receipt.js.map +1 -1
- package/dist/tools/handlers/export.d.ts.map +1 -1
- package/dist/tools/handlers/export.js +6 -2
- package/dist/tools/handlers/export.js.map +1 -1
- package/dist/tools/handlers/font.js +22 -22
- package/dist/tools/handlers/generate.d.ts.map +1 -1
- package/dist/tools/handlers/generate.js +4 -3
- package/dist/tools/handlers/generate.js.map +1 -1
- package/dist/tools/handlers.d.ts +5 -0
- package/dist/tools/handlers.d.ts.map +1 -1
- package/dist/tools/handlers.js +29 -16
- package/dist/tools/handlers.js.map +1 -1
- package/dist/tools/lane.d.ts +7 -3
- package/dist/tools/lane.d.ts.map +1 -1
- package/dist/tools/lane.js +82 -67
- package/dist/tools/lane.js.map +1 -1
- package/dist/tools/p5-compat/p5-helpers.js +341 -341
- package/dist/tools/scene-cache-export.d.ts.map +1 -1
- package/dist/tools/scene-cache-export.js +8 -4
- package/dist/tools/scene-cache-export.js.map +1 -1
- package/dist/tools/shape-params.d.ts +2 -2
- package/dist/tools/shape-params.js +2 -2
- package/dist/tools/stick-vocabulary.d.ts +1 -1
- package/dist/tools/stick-vocabulary.js +1 -1
- package/dist/tools/timeline.js +82 -82
- package/dist/tools/toolkits.d.ts +1 -1
- package/dist/tools/toolkits.d.ts.map +1 -1
- package/dist/tools/toolkits.js +8 -2
- package/dist/tools/toolkits.js.map +1 -1
- package/dist/types/code-generator.d.ts.map +1 -1
- package/dist/types/code-generator.js +6682 -5832
- package/dist/types/code-generator.js.map +1 -1
- package/dist/types/schemas.d.ts +29 -2
- package/dist/types/schemas.d.ts.map +1 -1
- package/dist/types/schemas.js +9 -23
- package/dist/types/schemas.js.map +1 -1
- package/dist/utils/asset-paths.d.ts.map +1 -1
- package/dist/utils/asset-paths.js +11 -0
- package/dist/utils/asset-paths.js.map +1 -1
- package/dist/utils/capabilities.d.ts +15 -0
- package/dist/utils/capabilities.d.ts.map +1 -0
- package/dist/utils/capabilities.js +63 -0
- package/dist/utils/capabilities.js.map +1 -0
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +2 -1
- package/dist/utils/env.js.map +1 -1
- package/dist/utils/safe-fetch.d.ts +8 -0
- package/dist/utils/safe-fetch.d.ts.map +1 -1
- package/dist/utils/safe-fetch.js +125 -34
- package/dist/utils/safe-fetch.js.map +1 -1
- package/dist/vendor/design/device-mockup-generator.js +167 -150
- package/dist/vendor/design/recursive-subdivision-generator.js +107 -107
- package/dist/vendor/design/textile-weave-generator.js +429 -429
- package/dist/vendor/design/ui-kit-runtime.js +674 -674
- package/manifest.json +18 -2
- package/package.json +7 -4
package/dist/tools/lane.d.ts
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
*/
|
|
22
22
|
export declare const LANE_TOOL_NAMES: readonly ["pinepaper_agent_batch_execute", "pinepaper_keyframe_animate", "pinepaper_pattern", "pinepaper_agent_export", "pinepaper_lint_scene", "pinepaper_event", "pinepaper_clear_canvas", "pinepaper_register_custom_relation"];
|
|
23
23
|
/** Read by the model before any tool: what the lane is, the order of work, and what it cannot do. */
|
|
24
|
-
export declare const LANE_INSTRUCTIONS = "PinePaper Studio, agent lane: eight tools that build an animated scene on a live canvas and export it to a file.\n\nORDER OF WORK:\n1. pinepaper_agent_batch_execute: ONE call with the canvas size, the background, every item, their keyframes and any relations.\n2. pinepaper_lint_scene: check the scene before exporting (text running off the frame, unrelated items).\n3. pinepaper_agent_export: format, duration and fps for a video. It returns the file path and the file's sha256 (a small SVG comes back inline).\nUse pinepaper_keyframe_animate to re-key one item afterwards, and pinepaper_pattern to move many named items with one declaration.\nSomething that happens AT a time or ON a click (show, hide, recolour): make the event with pinepaper_event first, then bind it in the batch with relation ops.\nTo start over, call pinepaper_clear_canvas: it empties the canvas and ids start again at item_1, so the same batch gives the same ids.\nMOTION THAT IS A FUNCTION OF TIME (a bob, a pulse, a sweep, a wave) is a relation, not keyframes: a track of hundreds of keys computed from a formula is the sign of the wrong route.\n- One item: a relation op {\"type\":\"relation\",\"sourceId\":\"$0\",\"relationType\":\"time_expression\",\"relationOptions\":{\"property\":\"y\",\"expression\":\"360 + 40*sin(2*PI*t)\"}} with no targetId; property is x, y, rotation, opacity or scale.\n- Many items, each offset (a wave across dots): define it once with pinepaper_register_custom_relation, its formula reading params.index, and bind it to a name pattern (sourceId \"dot-*\"): each member gets index and count. Adding members later is the same op again.\n\nUNITS: pixels, top-left origin, y down; time in seconds; angles in degrees; colours as \"#rrggbb\".\nEvery call acts on the live canvas at once: re-sending a batch ADDS its items again (clear first to replay it). A failed atomic batch removes the items it made, so fix it and send it again (edits it made to items that already existed stay: the result says so).\nReport a tool error as it is; do not write HTML or other code instead of these tools.\nThis lane is for scenes built from shapes, text, keyframes and relations. For characters, styled scenes, maps, diagrams or sound, the full surface is PINEPAPER_TOOLKIT=agent.";
|
|
24
|
+
export declare const LANE_INSTRUCTIONS = "PinePaper Studio, agent lane: eight tools that build an animated scene on a live canvas and export it to a file.\n\nORDER OF WORK:\n1. pinepaper_agent_batch_execute: ONE call with the canvas size, the background, every item, their keyframes and any relations.\n2. pinepaper_lint_scene: check the scene before exporting (text running off the frame, unrelated items).\n3. pinepaper_agent_export: format, duration and fps for a video. It returns the file path and the file's sha256 (a small SVG comes back inline).\nUse pinepaper_keyframe_animate to re-key one item afterwards, and pinepaper_pattern to move many named items with one declaration.\nSomething that happens AT a time or ON a click (show, hide, recolour): make the event with pinepaper_event first, then bind it in the batch with relation ops.\nTo start over, call pinepaper_clear_canvas: it empties the canvas and ids start again at item_1, so the same batch gives the same ids.\nMOTION THAT IS A FUNCTION OF TIME (a bob, a pulse, a sweep, a wave) is a relation, not keyframes: a track of hundreds of keys computed from a formula is the sign of the wrong route.\n- One item: a relation op {\"type\":\"relation\",\"sourceId\":\"$0\",\"relationType\":\"time_expression\",\"relationOptions\":{\"property\":\"y\",\"expression\":\"360 + 40*sin(2*PI*t)\"}} with no targetId; property is x, y, rotation, opacity or scale.\n- Many items, each offset (a wave across dots): define it once with pinepaper_register_custom_relation (on a server started with PINEPAPER_ALLOW_CODE=1), its formula reading params.index, and bind it to a name pattern (sourceId \"dot-*\"): each member gets index and count. Adding members later is the same op again.\n\nUNITS: pixels, top-left origin, y down; time in seconds; angles in degrees; colours as \"#rrggbb\".\nEvery call acts on the live canvas at once: re-sending a batch ADDS its items again (clear first to replay it). A failed atomic batch removes the items it made, so fix it and send it again (edits it made to items that already existed stay: the result says so).\nReport a tool error as it is; do not write HTML or other code instead of these tools.\nThis lane is for scenes built from shapes, text, keyframes and relations. For characters, styled scenes, maps, diagrams or sound, the full surface is PINEPAPER_TOOLKIT=agent.";
|
|
25
25
|
interface LaneTool {
|
|
26
26
|
description: string;
|
|
27
27
|
inputSchema: Record<string, unknown>;
|
|
@@ -32,8 +32,12 @@ interface ToolLike {
|
|
|
32
32
|
description?: string;
|
|
33
33
|
inputSchema: unknown;
|
|
34
34
|
}
|
|
35
|
-
/** The
|
|
36
|
-
export declare
|
|
35
|
+
/** The edit profile (#43): an agent changing a scene that exists reads it with lint, changes it with the batch. */
|
|
36
|
+
export declare const EDIT_TOOL_NAMES: readonly ["pinepaper_lint_scene", "pinepaper_agent_batch_execute", "pinepaper_register_custom_relation", "pinepaper_agent_export"];
|
|
37
|
+
/** Read by an editing agent before any tool. */
|
|
38
|
+
export declare const EDIT_INSTRUCTIONS = "PinePaper Studio, edit profile: four tools for changing a scene that is already on the canvas.\n\n1. pinepaper_lint_scene first. Its edit section lists every relation and custom motion with the exact op that changes it, and for a group bound by a name pattern (\"dot-*\"), the ops that add or remove a member.\n2. Send those ops, with your values, in ONE pinepaper_agent_batch_execute call.\n3. pinepaper_agent_export to render; perScene: true on a scene chain renders only what changed.\nChange a custom motion's formula by sending its pinepaper_register_custom_relation call again with the new body (the server must be started with PINEPAPER_ALLOW_CODE=1).\nUnits: pixels, top-left origin, y down; seconds; degrees. Report a tool error as it is.";
|
|
39
|
+
/** The lane (or another set of lane tools): in order, each shown with its lane description and schema. */
|
|
40
|
+
export declare function applyLane<T extends ToolLike>(tools: T[], names?: readonly string[]): T[];
|
|
37
41
|
/** The contract an agent loads for the lane: the instructions plus the lane tools as tools/list sends them. */
|
|
38
42
|
export declare function laneContractText(tools: ToolLike[]): string;
|
|
39
43
|
export {};
|
package/dist/tools/lane.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lane.d.ts","sourceRoot":"","sources":["../../src/tools/lane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,oOASlB,CAAC;AAKX,qGAAqG;AACrG,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"lane.d.ts","sourceRoot":"","sources":["../../src/tools/lane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;;;;GAKG;AACH,eAAO,MAAM,eAAe,oOASlB,CAAC;AAKX,qGAAqG;AACrG,eAAO,MAAM,iBAAiB,sxEAgBiJ,CAAC;AAEhL,UAAU,QAAQ;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAqBD,eAAO,MAAM,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAiMnF,CAAC;AAEF,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,mHAAmH;AACnH,eAAO,MAAM,eAAe,oIAKlB,CAAC;AAEX,gDAAgD;AAChD,eAAO,MAAM,iBAAiB,gvBAM0D,CAAC;AAEzF,0GAA0G;AAC1G,wBAAgB,SAAS,CAAC,CAAC,SAAS,QAAQ,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,GAAE,SAAS,MAAM,EAAoB,GAAG,CAAC,EAAE,CASzG;AAED,+GAA+G;AAC/G,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,CAE1D"}
|
package/dist/tools/lane.js
CHANGED
|
@@ -33,23 +33,23 @@ export const LANE_TOOL_NAMES = [
|
|
|
33
33
|
/** The one keyframe shape, said once and used by both tools that take keyframes. */
|
|
34
34
|
const KEYFRAME_RULE = `A keyframe is {"time": seconds, "properties": {…}, "easing"?: name}. The values go INSIDE properties, never beside time: {"time":1,"properties":{"opacity":1}}, not {"time":1,"opacity":1} (refused). easing shapes the move ARRIVING at that key: linear (default), easeIn, easeOut, easeInOut, easeOutBack, easeInOutCubic, easeOutBounce, spring, hold. Before its first key an item holds the first key's values; after its last, the last key's. Keyable: x, y (the centre), opacity, scale, scaleX, scaleY, rotation (degrees), fillColor, strokeColor, strokeWidth, width, height, radius, fontSize, trimEnd (0→1 draws a path on).`;
|
|
35
35
|
/** Read by the model before any tool: what the lane is, the order of work, and what it cannot do. */
|
|
36
|
-
export const LANE_INSTRUCTIONS =
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
export const LANE_INSTRUCTIONS = ("PinePaper Studio, agent lane: eight tools that build an animated scene on a live canvas and export it to a file.\n\nORDER OF WORK:\n1. pinepaper_agent_batch_execute: ONE call with the canvas size, the background, every item, their keyframes and any relations.\n2. pinepaper_lint_scene: check the scene before exporting (text running off the frame, unrelated items).\n3. pinepaper_agent_export: format, duration and fps for a video. It returns the file path and the file's sha256 (a small SVG comes back inline).\nUse pinepaper_keyframe_animate to re-key one item afterwards, and pinepaper_pattern to move many named items with one declaration.\nSomething that happens AT a time or ON a click (show," +
|
|
37
|
+
" hide, recolour): make the event with pinepaper_event first, then bind it in the batch with relation ops.\nTo start over, call pinepaper_clear_canvas: it empties the canvas and ids start again at item_1, so the same batch gives the same ids.\nMOTION THAT IS A FUNCTION OF TIME (a bob, a pulse, a sweep, a wave) is a relation, not keyframes: a track of hundreds of keys computed from a formula is the sign of the wrong route.\n- One item: a relation op {\"type\":\"relation\",\"sourceId\":\"$0\",\"relationType\":\"time_expression\",\"relationOptions\":{\"property\":\"y\",\"expression\":\"360 + 40*sin(2*PI*t)\"}} with no targetId; property is x, y, rotation, opacity or scale.\n- Many items, each " +
|
|
38
|
+
"offset (a wave across dots): define it once with pinepaper_register_custom_relation (on a server started with PINEPAPER_ALLOW_CODE=1), its formula reading params.index, and bind it to a name pattern (sourceId \"dot-*\"): each member gets index and count. Adding members later is the same op again.\n\nUNITS: pixels, top-left origin, y down; time in seconds; angles in degrees; colours as \"#rrggbb\".\nEvery call acts on the live canvas at once: re-sending a batch ADDS its items again (clear first to replay it). A failed atomic batch removes the items it made, so fix it and send it again (edits it made to items that already existed stay: the result says so).\nReport a tool error as it is; do n" +
|
|
39
|
+
"ot write HTML or other code instead of these tools.\nThis lane is for scenes built from shapes, text, keyframes and relations. For characters, styled scenes, maps, diagrams or sound, the full surface is PINEPAPER_TOOLKIT=agent."
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
);
|
|
53
53
|
const POSITION = {
|
|
54
54
|
type: 'object',
|
|
55
55
|
properties: { x: { type: 'number' }, y: { type: 'number' } },
|
|
@@ -69,37 +69,37 @@ const KEYFRAMES = {
|
|
|
69
69
|
};
|
|
70
70
|
export const LANE_TOOLS = {
|
|
71
71
|
pinepaper_agent_batch_execute: {
|
|
72
|
-
description:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
72
|
+
description: ("Build the scene in ONE call: canvas, background, items, keyframes, relations. Ops run in order. \"$0\", \"$1\", … are the items THIS call made, in op order (create and group ops are numbered; a group of \"$0\",\"$1\" made next is \"$2\"). The result lists their ids in itemIds; use those ids in later calls.\n\nEach line is a correct op:\n{\"type\":\"set_canvas_size\",\"width\":1920,\"height\":1080}\n{\"type\":\"set_background\",\"backgroundColor\":\"#0b1026\"}\n{\"type\":\"create\",\"itemType\":\"text\",\"position\":{\"x\":200,\"y\":130},\"properties\":{\"content\":\"SIGNAL / NOISE\",\"fontSize\":72,\"color\":\"#ffffff\",\"anchor\":\"top-left\",\"name\":\"title\"}}\n{\"type\":\"create\",\"i" +
|
|
73
|
+
"temType\":\"circle\",\"position\":{\"x\":300,\"y\":600},\"properties\":{\"radius\":40,\"color\":\"#22d3ee\",\"name\":\"dot\"}}\n{\"type\":\"create\",\"itemType\":\"rectangle\",\"position\":{\"x\":260,\"y\":900},\"properties\":{\"width\":120,\"height\":280,\"color\":\"#38bdf8\",\"anchor\":\"bottom-left\",\"name\":\"bar-1\"}}\n{\"type\":\"keyframe_animate\",\"itemId\":\"$0\",\"keyframes\":[{\"time\":0,\"properties\":{\"opacity\":0}},{\"time\":1,\"properties\":{\"opacity\":1}}]}\n{\"type\":\"keyframe_animate\",\"itemId\":\"$1\",\"keyframes\":[{\"time\":1,\"properties\":{\"x\":300}},{\"time\":7,\"properties\":{\"x\":1620},\"easing\":\"easeInOut\"}]}\n{\"type\":\"relation\",\"sourceId\":\"$1\"," +
|
|
74
|
+
"\"targetId\":\"$2\",\"relationType\":\"orbits\",\"relationOptions\":{\"radius\":260,\"speed\":0.1667}}\n{\"type\":\"modify\",\"itemId\":\"item_3\",\"properties\":{\"color\":\"#f472b6\"}}\n{\"type\":\"timeline\",\"defaults\":{\"ease\":\"power2.out\"},\"tweens\":[{\"to\":\"bar-*\",\"from\":{\"scaleY\":0},\"vars\":{\"scaleY\":1},\"duration\":0.8,\"at\":0.5,\"stagger\":0.15}]}\n{\"type\":\"relation\",\"sourceId\":\"item_9\",\"targetId\":\"$0\",\"relationType\":\"on_event_set_visibility\",\"relationOptions\":{\"visible\":true}}\n{\"type\":\"relation\",\"sourceId\":\"$1\",\"targetId\":\"item_9\",\"relationType\":\"on_click_fire\"}\n\nRULES (each one has cost a failed build):\n- position {x,y} go" +
|
|
75
|
+
"es at the op's top level. Everything else about the item goes INSIDE properties: a text's words are properties.content, and so are fontSize, color, radius, width, height, opacity, name and anchor.\n- position is the item's CENTRE. A text grows both ways from it, so a title whose centre sits near an edge runs off the frame and the video shows \"IGNAL / NOISE\". When a spec gives a corner (\"top-left at (200, 130)\"), pass properties.anchor: \"top-left\" (or top-right, bottom-left, bottom-right). A bar that grows up from a baseline: anchor \"bottom-left\" at the baseline, key height.\n- " +
|
|
76
|
+
String(KEYFRAME_RULE) +
|
|
77
|
+
"\n- Two keyframe_animate ops on one item in a batch are merged into one track.\n- A timeline op is GSAP's timeline as JSON, compiled onto keyframe tracks: tweens [{to: a name, id, \"$N\", array or \"bar-*\"; vars: end values; from: start values; duration; at: seconds, \"<\", \">\" or \"+=0.2\"; stagger; ease: \"power2.out\", \"none\", \"back.out\"…; repeat; yoyo}]. There x and y are OFFSETS from where the item was created, as in GSAP; scaleY on a bottom-anchored item holds its baseline; drawSVG \"0%\"→\"100%\" draws a path on. Every track lasts the whole timeline. What it cannot carry is refused by name; each tween gets a receipt. An item takes keys from a timeline or keyframe_animate ops," +
|
|
78
|
+
" not both.\n- Name every item (properties.name). pinepaper_pattern selects members by name, e.g. \"bar-*\".\n- properties.id chooses an item's id (\"dot\"), so a replay after pinepaper_clear_canvas addresses the same ids.\n- A shape with a strokeColor and no color is an outline.\n- Relations: orbits {radius, speed (turns per second), direction, phaseDegrees}, follows {offset, smoothing}, attached_to {offset}, points_at, moves_along_path {path:[{x,y},…], speed}, time_expression {property, expression} (no targetId; the formula grammar: " +
|
|
79
|
+
String(expressionGrammarText()) +
|
|
80
|
+
"). sourceId moves; targetId is what it moves relative to. A name pattern as sourceId (\"dot-*\") binds every item named like it, in name order, each with index and count added to relationOptions; send the same op again after adding members and they join, with index and count updated. update: true changes the relationOptions of a relation already bound (same sourceId, targetId, relationType) instead of adding one.\n- Events (item_9 above is an eventId from pinepaper_event): an event → item relation is a reaction, run each time it fires: on_event_set_visibility {visible: true|false}, on_event_set_color {color}, on_event_set_property {property, value}. An item → event relation fires it: on_cl" +
|
|
81
|
+
"ick_fire, on_pointer_enter_fire, on_key_fire {key}. An item a reaction reveals starts hidden: properties.visible false.\n- set_canvas_size comes first; a video exports at the canvas size.\n- The call is LIVE: sending it twice makes every item twice. atomic (default) stops at the first failure and removes every item the call created, so the canvas holds no half batch: fix the op it names and send it again. Edits to items that already existed are not undone; the result says what was removed.\n\nitemType: text, circle, rectangle, ellipse, star, triangle, polygon, line, arc, path, hexagon, diamond, arrow, heart."
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
),
|
|
103
103
|
inputSchema: {
|
|
104
104
|
type: 'object',
|
|
105
105
|
properties: {
|
|
@@ -154,16 +154,16 @@ EXAMPLE: {"itemId":"item_2","keyframes":[{"time":1,"properties":{"x":300}},{"tim
|
|
|
154
154
|
},
|
|
155
155
|
},
|
|
156
156
|
pinepaper_pattern: {
|
|
157
|
-
description:
|
|
157
|
+
description: ("Move many NAMED items with one stored declaration instead of a track on each. Change a parameter once and every member follows; remove it and they go back.\n\nKINDS:\n- phase_wave: members move on a sine, each a phase after the last. params: property (\"y\" default, \"x\", \"rotation\", \"opacity\"), amplitude (px, degrees or 0..1), period (seconds a cycle), wavelength (members a cycle). window {from, to} in seconds limits when it plays.\n- stagger: each member's start is delayed by its place. params: step (seconds between neighbours), start, order (index, reverse, center, edges).\nmembers: {\"names\": \"bar-*\"} ('*' matches any run), or an array of ids. A name that matches nothing is rep" +
|
|
158
|
+
"orted.\nA relation between two items (orbits, follows) is a relation op in pinepaper_agent_batch_execute, not a pattern.\n\nACTIONS: create (id, kind, members, params) · modify (id + what changes) · remove (id) · list · get (id).\nEXAMPLE: {\"action\":\"create\",\"id\":\"wave\",\"kind\":\"phase_wave\",\"members\":{\"names\":\"bar-*\"},\"params\":{\"amplitude\":12,\"period\":1.2,\"wavelength\":5}}"
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
158
163
|
|
|
159
|
-
KINDS:
|
|
160
|
-
- phase_wave: members move on a sine, each a phase after the last. params: property ("y" default, "x", "rotation", "opacity"), amplitude (px, degrees or 0..1), period (seconds a cycle), wavelength (members a cycle). window {from, to} in seconds limits when it plays.
|
|
161
|
-
- stagger: each member's start is delayed by its place. params: step (seconds between neighbours), start, order (index, reverse, center, edges).
|
|
162
|
-
members: {"names": "bar-*"} ('*' matches any run), or an array of ids. A name that matches nothing is reported.
|
|
163
|
-
A relation between two items (orbits, follows) is a relation op in pinepaper_agent_batch_execute, not a pattern.
|
|
164
164
|
|
|
165
|
-
|
|
166
|
-
|
|
165
|
+
|
|
166
|
+
),
|
|
167
167
|
inputSchema: {
|
|
168
168
|
type: 'object',
|
|
169
169
|
properties: {
|
|
@@ -184,12 +184,12 @@ EXAMPLE: {"action":"create","id":"wave","kind":"phase_wave","members":{"names":"
|
|
|
184
184
|
},
|
|
185
185
|
},
|
|
186
186
|
pinepaper_agent_export: {
|
|
187
|
-
description:
|
|
187
|
+
description: ("Render the scene to a file and return where it is.\n\nA video needs format, duration and fps: {\"format\":\"mp4\",\"duration\":8,\"fps\":30}. duration defaults to 5 s, so an 8 s piece without it is cut at 5. The file is the canvas size; leave platform out. A still: {\"format\":\"png\",\"time\":4}.\nAn 8 s 1080p video takes a few minutes to render: wait for this call, and do not send it again while it runs.\n\nRETURNS \"File: <path>\", plus file {sha256, bytes}: the sha256 of the file on disk. MP4 and WebM add frameDigest and frames, a digest of every rendered frame (two renders of the same scene agree frame for frame when their frameDigest agrees); unreadFrames counts frames the digest cou" +
|
|
188
|
+
"ld not read. A small SVG comes back inline, with no file. video.frames {fed, distinct} says whether anything moved. fidelity.warnings names what the format could not carry. A failed export is an error naming the reason; it never reports a file it did not write."
|
|
189
|
+
|
|
188
190
|
|
|
189
|
-
A video needs format, duration and fps: {"format":"mp4","duration":8,"fps":30}. duration defaults to 5 s, so an 8 s piece without it is cut at 5. The file is the canvas size; leave platform out. A still: {"format":"png","time":4}.
|
|
190
|
-
An 8 s 1080p video takes a few minutes to render: wait for this call, and do not send it again while it runs.
|
|
191
191
|
|
|
192
|
-
|
|
192
|
+
),
|
|
193
193
|
inputSchema: {
|
|
194
194
|
type: 'object',
|
|
195
195
|
properties: {
|
|
@@ -227,11 +227,11 @@ A TIMED event fires itself at scene times, in the preview and in every video exp
|
|
|
227
227
|
inputSchema: { type: 'object', properties: {} },
|
|
228
228
|
},
|
|
229
229
|
pinepaper_register_custom_relation: {
|
|
230
|
-
description:
|
|
230
|
+
description: ("Needs a server started with PINEPAPER_ALLOW_CODE=1 (its bodies are JavaScript); otherwise it is refused, and time_expression relation ops do the motion instead. Define a relation of your own, then bind it in pinepaper_agent_batch_execute with relation ops: relationType is its name, relationOptions its params, targetId optional (leave it out when the motion needs no other item). One definition drives many items: bind it to a name pattern (sourceId \"dot-*\", each member gets index and count), and change a param later with one relation op with update: true. pinepaper_lint_scene lists the relations bound and the definitions registered. It lasts for this session: register it again after a rest" +
|
|
231
|
+
"art.\n\ncomputeFunction is a function BODY that gets fromPosition, toPosition, params, delta and time (scene seconds) and returns what apply needs. applyFunction is a body that gets item, target, computed and params and changes the item.\n{\"name\":\"bobs\",\"params\":{\"amp\":{\"type\":\"number\",\"default\":40}},\"computeFunction\":\"return {y: 360 + params.amp * Math.sin(Math.PI * time)};\",\"applyFunction\":\"if (computed) item.position.y = computed.y;\"}\nthen in the batch: {\"type\":\"relation\",\"sourceId\":\"$0\",\"relationType\":\"bobs\",\"relationOptions\":{\"amp\":100}}"
|
|
232
|
+
|
|
231
233
|
|
|
232
|
-
|
|
233
|
-
{"name":"bobs","params":{"amp":{"type":"number","default":40}},"computeFunction":"return {y: 360 + params.amp * Math.sin(Math.PI * time)};","applyFunction":"if (computed) item.position.y = computed.y;"}
|
|
234
|
-
then in the batch: {"type":"relation","sourceId":"$0","relationType":"bobs","relationOptions":{"amp":100}}`,
|
|
234
|
+
),
|
|
235
235
|
inputSchema: {
|
|
236
236
|
type: 'object',
|
|
237
237
|
properties: {
|
|
@@ -254,11 +254,26 @@ then in the batch: {"type":"relation","sourceId":"$0","relationType":"bobs","rel
|
|
|
254
254
|
},
|
|
255
255
|
},
|
|
256
256
|
};
|
|
257
|
-
/** The
|
|
258
|
-
export
|
|
257
|
+
/** The edit profile (#43): an agent changing a scene that exists reads it with lint, changes it with the batch. */
|
|
258
|
+
export const EDIT_TOOL_NAMES = [
|
|
259
|
+
'pinepaper_lint_scene',
|
|
260
|
+
'pinepaper_agent_batch_execute',
|
|
261
|
+
'pinepaper_register_custom_relation',
|
|
262
|
+
'pinepaper_agent_export',
|
|
263
|
+
];
|
|
264
|
+
/** Read by an editing agent before any tool. */
|
|
265
|
+
export const EDIT_INSTRUCTIONS = `PinePaper Studio, edit profile: four tools for changing a scene that is already on the canvas.
|
|
266
|
+
|
|
267
|
+
1. pinepaper_lint_scene first. Its edit section lists every relation and custom motion with the exact op that changes it, and for a group bound by a name pattern ("dot-*"), the ops that add or remove a member.
|
|
268
|
+
2. Send those ops, with your values, in ONE pinepaper_agent_batch_execute call.
|
|
269
|
+
3. pinepaper_agent_export to render; perScene: true on a scene chain renders only what changed.
|
|
270
|
+
Change a custom motion's formula by sending its pinepaper_register_custom_relation call again with the new body (the server must be started with PINEPAPER_ALLOW_CODE=1).
|
|
271
|
+
Units: pixels, top-left origin, y down; seconds; degrees. Report a tool error as it is.`;
|
|
272
|
+
/** The lane (or another set of lane tools): in order, each shown with its lane description and schema. */
|
|
273
|
+
export function applyLane(tools, names = LANE_TOOL_NAMES) {
|
|
259
274
|
const byName = new Map(tools.map((t) => [t.name, t]));
|
|
260
275
|
const out = [];
|
|
261
|
-
for (const name of
|
|
276
|
+
for (const name of names) {
|
|
262
277
|
const tool = byName.get(name);
|
|
263
278
|
if (!tool)
|
|
264
279
|
continue;
|
package/dist/tools/lane.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lane.js","sourceRoot":"","sources":["../../src/tools/lane.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,+BAA+B,EAAE,6BAA6B;IAC9D,4BAA4B,EAAK,qBAAqB;IACtD,mBAAmB,EAAc,wCAAwC;IACzE,wBAAwB,EAAS,yCAAyC;IAC1E,sBAAsB,EAAW,iBAAiB;IAClD,iBAAiB,EAAgB,qDAAqD;IACtF,wBAAwB,EAAS,mBAAmB;IACpD,oCAAoC,EAAE,2DAA2D;CACzF,CAAC;AAEX,oFAAoF;AACpF,MAAM,aAAa,GAAG,4mBAA4mB,CAAC;AAEnoB,qGAAq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