@pixerate/editor 0.81.0 → 0.83.0

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 (67) hide show
  1. package/dist/agent/index.cjs +36 -7
  2. package/dist/agent/index.cjs.map +1 -1
  3. package/dist/agent/index.d.cts +5 -3
  4. package/dist/agent/index.d.ts +5 -3
  5. package/dist/agent/index.js +43 -14
  6. package/dist/agent/index.js.map +1 -1
  7. package/dist/animation-editor/index.d.cts +1 -1
  8. package/dist/animation-editor/index.d.ts +1 -1
  9. package/dist/bridge/index.d.cts +3 -3
  10. package/dist/bridge/index.d.ts +3 -3
  11. package/dist/{bridge-client-C5dRjrz5.d.ts → bridge-client-CMGfnjTl.d.ts} +1 -1
  12. package/dist/{bridge-client-C5OziCRK.d.cts → bridge-client-VpnICVxP.d.cts} +1 -1
  13. package/dist/canvas/index.cjs +235 -104
  14. package/dist/canvas/index.cjs.map +1 -1
  15. package/dist/canvas/index.d.cts +59 -1
  16. package/dist/canvas/index.d.ts +59 -1
  17. package/dist/canvas/index.js +234 -103
  18. package/dist/canvas/index.js.map +1 -1
  19. package/dist/capture-DFEMFmVt.d.cts +133 -0
  20. package/dist/capture-wwNGaW05.d.ts +133 -0
  21. package/dist/chart/index.d.cts +1 -1
  22. package/dist/chart/index.d.ts +1 -1
  23. package/dist/{chunk-K73CKYUM.cjs → chunk-EI2MOVQ3.cjs} +198 -3
  24. package/dist/chunk-EI2MOVQ3.cjs.map +1 -0
  25. package/dist/chunk-FURT6ZFZ.cjs +1 -0
  26. package/dist/chunk-FURT6ZFZ.cjs.map +1 -0
  27. package/dist/{chunk-GPWNYQ7R.js → chunk-O2W2SP3C.js} +197 -2
  28. package/dist/chunk-O2W2SP3C.js.map +1 -0
  29. package/dist/chunk-REOJJIY3.js +201 -0
  30. package/dist/chunk-REOJJIY3.js.map +1 -0
  31. package/dist/chunk-RJ2BFKEN.js +1 -0
  32. package/dist/chunk-RJ2BFKEN.js.map +1 -0
  33. package/dist/chunk-VJUVNERT.cjs +201 -0
  34. package/dist/chunk-VJUVNERT.cjs.map +1 -0
  35. package/dist/commands/index.d.cts +1 -1
  36. package/dist/commands/index.d.ts +1 -1
  37. package/dist/diagram/index.d.cts +1 -1
  38. package/dist/diagram/index.d.ts +1 -1
  39. package/dist/dom-capture-7Wvf6Tyg.d.ts +59 -0
  40. package/dist/dom-capture-GyYuE-zq.d.cts +59 -0
  41. package/dist/generation/index.d.cts +2 -2
  42. package/dist/generation/index.d.ts +2 -2
  43. package/dist/image-editor/index.cjs +97 -1
  44. package/dist/image-editor/index.cjs.map +1 -1
  45. package/dist/image-editor/index.d.cts +24 -2
  46. package/dist/image-editor/index.d.ts +24 -2
  47. package/dist/image-editor/index.js +96 -0
  48. package/dist/image-editor/index.js.map +1 -1
  49. package/dist/{registry-DIpIaCkH.d.cts → registry-BqA1AZt0.d.cts} +1 -1
  50. package/dist/{registry-7AZFuand.d.ts → registry-D-4fit9C.d.ts} +1 -1
  51. package/dist/tools/index.cjs +33 -4
  52. package/dist/tools/index.cjs.map +1 -1
  53. package/dist/tools/index.d.cts +4 -2
  54. package/dist/tools/index.d.ts +4 -2
  55. package/dist/tools/index.js +43 -14
  56. package/dist/video-editor/index.cjs +557 -99
  57. package/dist/video-editor/index.cjs.map +1 -1
  58. package/dist/video-editor/index.d.cts +211 -6
  59. package/dist/video-editor/index.d.ts +211 -6
  60. package/dist/video-editor/index.js +493 -35
  61. package/dist/video-editor/index.js.map +1 -1
  62. package/package.json +1 -1
  63. package/skills/pixerate-canvas/SKILL.md +1 -0
  64. package/skills/pixerate-image-editor/SKILL.md +1 -0
  65. package/skills/pixerate-video-editor/SKILL.md +24 -6
  66. package/dist/chunk-GPWNYQ7R.js.map +0 -1
  67. package/dist/chunk-K73CKYUM.cjs.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pixerate/editor",
3
- "version": "0.81.0",
3
+ "version": "0.83.0",
4
4
  "description": "UI-agnostic rich text and media editing core library",
5
5
  "author": "Pixerate",
6
6
  "license": "MIT",
@@ -79,6 +79,7 @@ batching and error codes.
79
79
  | --- | --- |
80
80
  | `get_editor_state` | Read the canvas graph (`canvas.nodes`, `canvas.edges`) and, by default, the prompt document too. Pass `includeDocument: false` on a canvas-only task to keep the result small, `includeCanvas: false` for only the prompt. Call it first and again after edits made by the user. |
81
81
  | `view_editor` | Get an image of the editor: `scope` `viewport` (default) or `canvas` (the whole drawing's bounds), `format` `jpeg` (default) or `png`, `maxEdge` in pixels (default 1024). Use it after a batch to judge overlap, balance and legibility; agent cursors are left out. |
82
+ | `capture_view` | Screenshot part of the canvas to check a result: `region` `viewport` (default, as on screen), `content` (every node), `selection`, `nodes` (with `ids` from `get_editor_state`) or `rect` (canvas units); `padding` (default 16), `maxEdge` (default 1024), `format` `png` (default) or `jpeg`. The result gives the captured `rect` and `scale`, so image pixel (px, py) is canvas point (rect.x + px / scale, rect.y + py / scale). Prefer `nodes` to inspect what you just added at full detail. Selection boxes and agent cursors are left out unless `includeOverlays`. |
82
83
  | `list_components` | List main components (id, name, variant values, instance count) and component sets with their variant options. Call it before `create_instance`, `swap_instance` or any variant tool to get ids and the exact property names and values. |
83
84
  | `inspect_instance` | Describe one instance (or a layer inside it; default the first selected node): its main, variant, component property values with types, and per-layer overrides. Call it before `set_instance_properties` or `reset_overrides` so you use the right property names and override groups. |
84
85
 
@@ -90,6 +90,7 @@ then blur. See `pixerate-agent-tools` for errors, namespacing and command batchi
90
90
  | `get_image_info` | Read the geometry: source `image` size, `crop` box (source pixels, or null), `rotation` degrees, `flipH` / `flipV`, the `output` size after crop and rotation, the layer count and `canUndo` / `canRedo`. Call before cropping or selecting so coordinates are right. |
91
91
  | `get_histogram` | Judge exposure numerically: per channel and luminance `mean`, `p1` and `p99` (0..255), and `clipping` percent at pure black and white per channel. Reads the last render, so call `render_preview` first. `bins` (16, 32, 64 or 256) adds the counts. Cheaper than another image for checking a tonal change. |
92
92
  | `render_preview` | See the edited image (crop, adjustments, layers, annotations) as a PNG. `maxSide` 16..2048 px, default 512. Images cost tokens: render after a group of edits, use 512 for overall look and 1024+ to judge clipping, edges and masks. Fails in environments without rendering. |
93
+ | `capture_view` | Inspect detail in natural image pixels (the space of `get_selection` and `select_region`, before crop and rotation): `region` `content` (whole image, default), `selection` or `rect`; small regions are enlarged up to 8× with hard pixel edges, so a 64 px rect shows real pixels. `includeOverlays: true` shades unselected pixels and outlines the crop: use it to check a mask's edge before `apply_selection_as_mask`. Returns the `rect` and `scale`. Use `render_preview` for the final framed result. |
93
94
 
94
95
  ### Write
95
96
 
@@ -44,7 +44,9 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
44
44
  numbers; `render_video_frame` with `times` for a contact sheet of the sequence. Render
45
45
  after a batch, not after every edit.
46
46
  8. **Export** when asked: `export_video_ffmpeg` (a command to run, not a render) or
47
- `export_video_edl` (one track) for finishing elsewhere. Read the returned notes.
47
+ `export_video_edl` (one track) for finishing elsewhere. Read the returned notes. For a
48
+ delivery loudness, have the host run `export_video_loudness_measure` first and pass what it
49
+ prints as `loudness.measured`; one pass (`loudness` without `measured`) is fine for a draft.
48
50
 
49
51
  ## Best practices
50
52
 
@@ -76,6 +78,11 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
76
78
  - **Keyframes sparingly.** Use `set_video_keyframes` for a push-in (`scale` 1 to 1.1 over the
77
79
  shot), a duck under dialogue (`volume`), or a fade that is not at an edge; ease (`ease-in-out`)
78
80
  rather than linear for motion. Simple fades at the clip edges are `fadeIn` / `fadeOut`.
81
+ - **Tighten dialogue by ear, in numbers.** `find_video_silences` on an interview or voiceover clip
82
+ lists the pauses in timeline time; extract the long ones (keep 150-300 ms either side so speech
83
+ does not sound clipped: shrink each range before `extract_video_range`, and extract from the
84
+ last pause back to the first, or re-read, because each extract moves what follows). Use
85
+ `get_video_audio_levels` to find where a line starts before trimming or splitting at it.
79
86
  - **Close gaps.** Unintended gaps play as background colour and silence. `find_video_gaps`, then
80
87
  `close_video_gaps` or ripple deletes. Leave gaps only where you want black.
81
88
  - **Cut on frames.** Put starts, trims and splits on frame boundaries (multiples of 1000 / fps
@@ -83,7 +90,13 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
83
90
  - **Audio levels.** Dialogue is the reference; keep music under it (volume around 0.2-0.4 under
84
91
  speech, more between lines) and avoid gains above 1 that clip. Per-clip `volume` and track
85
92
  `volume` multiply. Give every audio clip that starts or ends mid-sound a short `fadeIn` /
86
- `fadeOut` (10-50 ms) to avoid clicks; fade music beds over 1-3 s.
93
+ `fadeOut` (10-50 ms) to avoid clicks; fade music beds over 1-3 s. Shape sound fades with
94
+ `fadeInCurve` / `fadeOutCurve`: `equal-power` where two sounds overlap (it keeps loudness
95
+ steady, where linear dips in the middle), `exponential` to fade music out to silence
96
+ naturally, `s-curve` for a gentle start and finish. Linear is the default.
97
+ - **Delivery loudness.** Normalise the final mix rather than pushing clip volumes: -14 LUFS for
98
+ web and streaming, -16 for podcasts, -23 (EBU R128) or -24 (ATSC) for broadcast, with true
99
+ peaks at or under -1 dBTP. Two passes keep the dynamics; one pass rides the level.
87
100
  - **Titles.** Keep text inside the title-safe area (about 90% of the frame), hold it at least as
88
101
  long as it takes to read twice, and use `background` for contrast over busy footage.
89
102
  - **Pacing.** Vary shot length with content; trim heads and tails of every clip to the
@@ -102,13 +115,16 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
102
115
  | `find_video_gaps` | List empty stretches between clips (and before the first) as `{ track, start, end }` ms, on every track or one `track`. Then `close_video_gaps` or ripple. |
103
116
  | `check_video_project` | After every batch and before export. Lists issues errors first with a code (`missing-asset`, `wrong-track`, `overlap`, `source-overrun`, `transition-without-cut`, `transition-too-long`, `transition-handles`, `fades-too-long`, `unknown-duration`, `unused-asset`, `marker-past-end`, `empty`), what it is about and how to fix it. |
104
117
  | `render_video_frame` | Look at the picture at `time`, or at 2-16 `times` as one labelled contact sheet (`columns` 1-8). SVG by default; `format: "png"` only when the host can rasterize. Video without a `poster` shows as a labelled box with its source timecode. |
105
- | `export_video_ffmpeg` | Get the ffmpeg command that renders the project: `args` (for spawn), `command` (one shell line), `filterComplex`, duration and notes on approximations. `output` default output.mp4, `crf` x264 quality 0-51 (default 18, lower is better). Fails when there are no clips. |
106
- | `export_video_edl` | Get one `track` (default the bottom video track) as a CMX 3600 EDL with source and record timecode, dissolves, speed changes and clip names, for conforming in another editor. `title` defaults to the project name. |
118
+ | `export_video_ffmpeg` | Get the ffmpeg command that renders the project: `args` (for spawn), `command` (one shell line), `filterComplex`, duration and notes on approximations. `output` default output.mp4, `crf` x264 quality 0-51 (default 18, lower is better). `loudness` normalises the mix (`integrated` LUFS default -14, `truePeak` dBTP default -1, `range`); with `loudness.measured` from `export_video_loudness_measure` it applies one fixed gain. Fails when there are no clips. |
119
+ | `export_video_loudness_measure` | First pass of loudness normalisation: the ffmpeg command that mixes only the sound and prints its loudness as JSON at the end of stderr. Takes the same target (`integrated` LUFS, `truePeak`, `range`) as the export. Map `input_i`, `input_tp`, `input_lra`, `input_thresh`, `target_offset` to `loudness.measured` for `export_video_ffmpeg`. |
120
+ | `export_video_edl` | Get one `track` (default the bottom video track) as a CMX 3600 EDL with source and record timecode, dissolves, speed changes and clip names, for conforming in another editor. `title` defaults to the project name. At 29.97 and 59.94 fps it writes drop-frame timecode (`HH:MM:SS;FF`, `FCM: DROP FRAME`), as other editors expect; `dropFrame: false` forces non-drop. |
107
121
 
108
122
  ### Write
109
123
 
110
124
  | Tool | Use it to |
111
125
  | --- | --- |
126
+ | `get_video_audio_levels` | Measure a media `clip`'s source sound (timeline times) or an `asset`'s (source times) between `from` and `to`: peak dBFS in each of `buckets` (default 50, up to 500) equal stretches, and the loudest peak. Levels are the recording before clip volume and fades. Use it to find where speech or a beat starts or to judge loudness. The first call for an asset decodes its file. |
127
+ | `find_video_silences` | List stretches of a `clip` or `asset` that stay below `thresholdDb` (default -40) for at least `minDuration` ms (default 300). For a clip the `{ start, end }` are timeline times that go straight into `extract_video_range` (cut a pause, closing up) or `split_video_at`. |
112
128
  | `seek_video` | Show the person a moment: `time`, a `clip`'s start or a `marker`, with `play` true or false. Does not change the project. Returns the playhead and clips under it. |
113
129
  | `set_video_settings` | Set `name`, `width` / `height` (pixels, 16-8192), `fps` (e.g. 24, 25, 30, 60) or `background` colour. One undo step. |
114
130
  | `add_video_asset` | Register a file: `kind` (video, audio, image), `src` (URL, path or data URL), `duration` ms (required in practice for video and audio), optional `id`, `name`, `width`, `height`, `hasAudio` (default true for video), `poster`. Returns the asset id. |
@@ -129,7 +145,7 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
129
145
  | `lift_video_range` | Empty `from`..`to` ms on all unlocked tracks or the given `tracks`, leaving a gap: clips inside are deleted, clips across an edge trimmed, a clip across both cut in two. Returns what was removed, trimmed and created. |
130
146
  | `extract_video_range` | Remove `from`..`to` ms and close it up: as lift, then later material moves earlier on those and every sync-locked track. Refused (naming the clip) when a sync-locked track outside `tracks` has material there. Use to cut a section out of a finished sequence. |
131
147
  | `delete_video_clips` | Remove `clips`; `ripple: true` pulls later clips up to close the gaps (a ripple delete). |
132
- | `update_video_clip` | Change properties via `set`: opacity, transform (`x`, `y` px from centre, `scale`, `rotation`), `fit` (contain default for media, cover, fill, none), `fadeIn` / `fadeOut`, name; media `volume` (0-4), `muted`, `speed` (0.05-20, keeps the source range so the length changes), `asset`; title text and style; colour. `remove` resets to defaults. Not for timing. |
148
+ | `update_video_clip` | Change properties via `set`: opacity, transform (`x`, `y` px from centre, `scale`, `rotation`), `fit` (contain default for media, cover, fill, none), `fadeIn` / `fadeOut`, name; media `volume` (0-4), `muted`, `fadeInCurve` / `fadeOutCurve` (the sound's fade shape: linear, equal-power, s-curve, exponential, logarithmic), `speed` (0.05-20, keeps the source range so the length changes), `asset`; title text and style; colour. `remove` resets to defaults. Not for timing. |
133
149
  | `set_video_keyframes` | Animate one `property` of a `clip` (`opacity` 0-1, `volume` 0-4 for media, `x` / `y` px from centre, `scale`, `rotation` degrees) with `keys` `[{ t, v, ease? }]`, replacing its keys. `t` is clip time (ms from the clip's start), so keys travel with the clip. `ease`: linear (default), hold, ease-in, ease-out, ease-in-out or cubic-bezier points. Returns the sorted keys. |
134
150
  | `remove_video_keyframes` | Remove all keys of a clip `property`, leaving the value it had at the clip's start. |
135
151
  | `set_video_transition` | Set the transition into a `clip` from the clip ending where it starts on the same track: `{ type: crossfade, dip or wipe, duration ms centred on the cut, color (dip, default black), direction (wipe, default right) }`, or `null` to remove. When handles are short the error gives the longest that fits. |
@@ -164,7 +180,9 @@ For errors, namespaced tool names and undo conventions, see `pixerate-agent-tool
164
180
  on the same track (`transition-without-cut`); close the gap first. Splitting keeps the
165
181
  transition on the left part.
166
182
  - **Fades are per clip.** `fadeIn + fadeOut` longer than the clip warns `fades-too-long`; fades
167
- affect picture and sound together.
183
+ affect picture and sound together. Fade curves shape only the sound (media clips); the picture
184
+ always fades linearly. Splitting keeps the fade-in curve on the left part and the fade-out
185
+ curve on the right.
168
186
  - **Locked tracks** refuse edits to their clips; unlock with `update_video_track` only if the user
169
187
  wants that track changed.
170
188
  - **Read-only**: when `get_video_project` says the project cannot be edited, write tools are
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/tools/definitions.ts"],"sourcesContent":["/**\n * Standard MCP Tool Definitions for @pixerate/editor.\n * Compatible with the Model Context Protocol (MCP) tool specification schema.\n */\n\nexport const MCP_TOOL_GET_EDITOR_STATE = {\n\tname: 'get_editor_state',\n\ttitle: 'Get editor state',\n\tannotations: {\n\t\ttitle: 'Get editor state',\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\tidempotentHint: true,\n\t\topenWorldHint: false\n\t},\n\tdescription:\n\t\t'Retrieves the current state of the document, variables, selection, and canvas graph (nodes and edges).',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tincludeDocument: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Whether to include the prompt document text and variables (default: true).'\n\t\t\t},\n\t\t\tincludeCanvas: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Whether to include the canvas nodes and edges (default: true).'\n\t\t\t}\n\t\t}\n\t}\n} as const;\n\nexport const MCP_TOOL_EDIT_CANVAS = {\n\tname: 'edit_canvas',\n\ttitle: 'Edit the canvas',\n\tannotations: {\n\t\ttitle: 'Edit the canvas',\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: false,\n\t\topenWorldHint: false\n\t},\n\tdescription:\n\t\t'Applies high-level structural operations to the visual canvas (adding nodes, connecting edges, organizing layout, or moving elements). ' +\n\t\t'Prefer the per-operation canvas_* tools when the host exposes them. Returns the ids of created nodes and edges.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\toperation: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: [\n\t\t\t\t\t'add_node',\n\t\t\t\t\t'remove_nodes',\n\t\t\t\t\t'connect',\n\t\t\t\t\t'update_node',\n\t\t\t\t\t'layout',\n\t\t\t\t\t'select',\n\t\t\t\t\t'highlight'\n\t\t\t\t],\n\t\t\t\tdescription: 'The canvas operation to execute.'\n\t\t\t},\n\t\t\tnode: {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: 'Node definition when operation is add_node. Can omit position to auto-place.'\n\t\t\t},\n\t\t\tnearNodeId: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Anchor node ID to position beside using collision-aware placement.'\n\t\t\t},\n\t\t\tside: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['top', 'right', 'bottom', 'left'],\n\t\t\t\tdescription: 'Side of the anchor node to place the new node beside.'\n\t\t\t},\n\t\t\tnodeIds: {\n\t\t\t\ttype: 'array',\n\t\t\t\titems: { type: 'string' },\n\t\t\t\tdescription: 'Array of node IDs for remove_nodes, select, or highlight.'\n\t\t\t},\n\t\t\tid: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Node ID for update_node (or pass `node: { id, data }`).'\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: 'Data fields to merge into the node for update_node.'\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'CSS color for highlight (default #3b82f6).'\n\t\t\t},\n\t\t\tdurationMs: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: 'How long the highlight lasts in ms (default 2000).'\n\t\t\t},\n\t\t\tsource: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Source node ID for connect operation.'\n\t\t\t},\n\t\t\ttarget: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Target node ID for connect operation.'\n\t\t\t},\n\t\t\tlabel: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Optional edge label for connect operation.'\n\t\t\t},\n\t\t\tdirection: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['LR', 'TB', 'RL', 'BT'],\n\t\t\t\tdescription: 'Layout direction (default LR).'\n\t\t\t},\n\t\t\tincremental: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Preserve existing node coordinates and blend layout (default true).'\n\t\t\t}\n\t\t},\n\t\trequired: ['operation']\n\t}\n} as const;\n\nexport const MCP_TOOL_EDIT_PROMPT = {\n\tname: 'edit_prompt',\n\ttitle: 'Edit the prompt',\n\tannotations: {\n\t\ttitle: 'Edit the prompt',\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: false,\n\t\topenWorldHint: false\n\t},\n\tdescription:\n\t\t'Applies edits to the prompt template document, including inserting text, replacing ranges, and setting variables.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\toperation: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['insert_text', 'replace_range', 'set_variable', 'select'],\n\t\t\t\tdescription: 'The prompt operation to execute.'\n\t\t\t},\n\t\t\ttext: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Text to insert or replace.'\n\t\t\t},\n\t\t\tat: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: 'Position to insert text at.'\n\t\t\t},\n\t\t\tfrom: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: 'Start offset for replace_range or select.'\n\t\t\t},\n\t\t\tto: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: 'End offset for replace_range or select.'\n\t\t\t},\n\t\t\tname: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Variable name for set_variable.'\n\t\t\t},\n\t\t\tvalue: {\n\t\t\t\tdescription: 'Variable value for set_variable.'\n\t\t\t}\n\t\t},\n\t\trequired: ['operation']\n\t}\n} as const;\n\nexport const MCP_TOOL_VIEW_EDITOR = {\n\tname: 'view_editor',\n\ttitle: 'View the editor',\n\tannotations: {\n\t\ttitle: 'View the editor',\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\tidempotentHint: true,\n\t\topenWorldHint: false\n\t},\n\tdescription:\n\t\t'Captures a visual image snapshot (JPEG or PNG) of the editor canvas or viewport for multimodal evaluation. Active agent cursor indicators are automatically excluded from the snapshot.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tscope: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['viewport', 'canvas'],\n\t\t\t\tdescription: 'Whether to capture only the visible viewport or the full canvas bounding box (default: viewport).'\n\t\t\t},\n\t\t\tformat: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['jpeg', 'png'],\n\t\t\t\tdescription: 'Image format of the base64 snapshot (default: jpeg).'\n\t\t\t},\n\t\t\tmaxEdge: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription: 'Maximum width or height dimension in pixels (default: 1024).'\n\t\t\t}\n\t\t}\n\t}\n} as const;\n\n// ---------------------------------------------------------------------------\n// Per-operation tools: one strict schema per canvas / prompt operation.\n// ---------------------------------------------------------------------------\n\nconst WRITE_ANNOTATIONS = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false } as const;\nconst DESTRUCTIVE_ANNOTATIONS = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false } as const;\nconst IDEMPOTENT_ANNOTATIONS = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false } as const;\n\nconst NODE_IDS = {\n\ttype: 'array',\n\titems: { type: 'string', minLength: 1 },\n\tminItems: 1,\n\tuniqueItems: true,\n\tdescription: 'Node ids (from get_editor_state).'\n} as const;\n\nconst POSITION = {\n\ttype: 'object',\n\tproperties: { x: { type: 'number' }, y: { type: 'number' } },\n\trequired: ['x', 'y'],\n\tadditionalProperties: false\n} as const;\n\nconst DOC_POSITION = { type: 'integer', minimum: 0 } as const;\n\nexport const MCP_TOOL_CANVAS_ADD_NODE = {\n\tname: 'canvas_add_node',\n\ttitle: 'Add a canvas node',\n\tannotations: { title: 'Add a canvas node', ...WRITE_ANNOTATIONS },\n\tdescription:\n\t\t'Adds a node to the canvas. Without `position` it is placed without overlaps beside `nearNodeId` (and connected from it) ' +\n\t\t'or beside the last node. Returns the new node id (generated unless you pass `node.id`) and the id of the connecting edge.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tnode: {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: 'The node. Extra host-specific fields are kept.',\n\t\t\t\tproperties: {\n\t\t\t\t\tid: { type: 'string', minLength: 1, description: 'Node id (default: generated). Must be unused.' },\n\t\t\t\t\ttype: { type: 'string', description: 'Node type registered by the host.' },\n\t\t\t\t\tdata: { type: 'object', description: 'Node data (e.g. { \"label\": \"...\" }).' },\n\t\t\t\t\tposition: { ...POSITION, description: 'Canvas coordinates (default: auto-placed).' },\n\t\t\t\t\twidth: { type: 'number', exclusiveMinimum: 0 },\n\t\t\t\t\theight: { type: 'number', exclusiveMinimum: 0 },\n\t\t\t\t\tparentId: { type: 'string', description: 'Parent (group/frame) node id.' }\n\t\t\t\t}\n\t\t\t},\n\t\t\tnearNodeId: { type: 'string', description: 'Existing node to place the new node beside and connect from.' },\n\t\t\tside: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['top', 'right', 'bottom', 'left'],\n\t\t\t\tdescription: 'Side of `nearNodeId` to place the node on (default right).'\n\t\t\t}\n\t\t},\n\t\trequired: ['node'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_REMOVE_NODES = {\n\tname: 'canvas_remove_nodes',\n\ttitle: 'Remove canvas nodes',\n\tannotations: { title: 'Remove canvas nodes', ...DESTRUCTIVE_ANNOTATIONS },\n\tdescription: 'Removes nodes (and their edges) from the canvas. Every id must exist.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: { nodeIds: NODE_IDS },\n\t\trequired: ['nodeIds'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_CONNECT = {\n\tname: 'canvas_connect',\n\ttitle: 'Connect canvas nodes',\n\tannotations: { title: 'Connect canvas nodes', ...WRITE_ANNOTATIONS },\n\tdescription: 'Adds an edge from one existing node to another. Returns the new edge id.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tsource: { type: 'string', minLength: 1, description: 'Source node id.' },\n\t\t\ttarget: { type: 'string', minLength: 1, description: 'Target node id.' },\n\t\t\tlabel: { type: 'string', description: 'Edge label.' }\n\t\t},\n\t\trequired: ['source', 'target'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_UPDATE_NODE = {\n\tname: 'canvas_update_node',\n\ttitle: 'Update a canvas node',\n\tannotations: { title: 'Update a canvas node', ...DESTRUCTIVE_ANNOTATIONS, idempotentHint: true },\n\tdescription: \"Merges fields into an existing node's data.\",\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tid: { type: 'string', minLength: 1, description: 'Node id.' },\n\t\t\tdata: { type: 'object', description: 'Data fields to merge (e.g. { \"label\": \"New\" }).' }\n\t\t},\n\t\trequired: ['id', 'data'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_LAYOUT = {\n\tname: 'canvas_layout',\n\ttitle: 'Lay out the canvas',\n\tannotations: { title: 'Lay out the canvas', ...IDEMPOTENT_ANNOTATIONS },\n\tdescription: 'Arranges the canvas graph automatically.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tdirection: { type: 'string', enum: ['LR', 'TB', 'RL', 'BT'], description: 'Layout direction (default LR).' },\n\t\t\tincremental: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Keep nodes that already have a position where they are (default true).'\n\t\t\t}\n\t\t},\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_SELECT = {\n\tname: 'canvas_select',\n\ttitle: 'Select canvas nodes',\n\tannotations: { title: 'Select canvas nodes', ...IDEMPOTENT_ANNOTATIONS },\n\tdescription: 'Replaces the canvas selection with these nodes (an empty list clears it).',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: { nodeIds: { ...NODE_IDS, minItems: 0 } },\n\t\trequired: ['nodeIds'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_HIGHLIGHT = {\n\tname: 'canvas_highlight',\n\ttitle: 'Highlight canvas nodes',\n\tannotations: { title: 'Highlight canvas nodes', ...IDEMPOTENT_ANNOTATIONS },\n\tdescription: 'Briefly highlights nodes to draw the user\\'s attention to them.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tnodeIds: NODE_IDS,\n\t\t\tcolor: { type: 'string', description: 'CSS color (default #3b82f6).' },\n\t\t\tdurationMs: { type: 'integer', minimum: 0, maximum: 60000, description: 'Duration in ms (default 2000).' }\n\t\t},\n\t\trequired: ['nodeIds'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_PROMPT_INSERT_TEXT = {\n\tname: 'prompt_insert_text',\n\ttitle: 'Insert prompt text',\n\tannotations: { title: 'Insert prompt text', ...WRITE_ANNOTATIONS },\n\tdescription: 'Inserts text into the prompt at a position, or at the cursor when `at` is omitted.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\ttext: { type: 'string', description: 'Text to insert.' },\n\t\t\tat: { ...DOC_POSITION, description: 'Position (as in get_editor_state `document.selection`).' }\n\t\t},\n\t\trequired: ['text'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_PROMPT_REPLACE_RANGE = {\n\tname: 'prompt_replace_range',\n\ttitle: 'Replace prompt text',\n\tannotations: { title: 'Replace prompt text', ...DESTRUCTIVE_ANNOTATIONS },\n\tdescription: 'Replaces the prompt text between two positions (an empty text deletes it).',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tfrom: { ...DOC_POSITION, description: 'Start position.' },\n\t\t\tto: { ...DOC_POSITION, description: 'End position (>= from).' },\n\t\t\ttext: { type: 'string', description: 'Replacement text.' }\n\t\t},\n\t\trequired: ['from', 'to', 'text'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_PROMPT_SET_VARIABLE = {\n\tname: 'prompt_set_variable',\n\ttitle: 'Set a prompt variable',\n\tannotations: { title: 'Set a prompt variable', ...DESTRUCTIVE_ANNOTATIONS, idempotentHint: true },\n\tdescription: 'Sets the value of a template variable used by the prompt.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tname: { type: 'string', minLength: 1, description: 'Variable name.' },\n\t\t\tvalue: { description: 'Variable value (any JSON value).' }\n\t\t},\n\t\trequired: ['name', 'value'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_PROMPT_SELECT = {\n\tname: 'prompt_select',\n\ttitle: 'Select prompt text',\n\tannotations: { title: 'Select prompt text', ...IDEMPOTENT_ANNOTATIONS },\n\tdescription: 'Selects the prompt text between two positions (from === to places the cursor).',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tfrom: { ...DOC_POSITION, description: 'Start position.' },\n\t\t\tto: { ...DOC_POSITION, description: 'End position (>= from).' }\n\t\t},\n\t\trequired: ['from', 'to'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\n/** Per-operation canvas tools, the strict alternative to `edit_canvas`. */\nexport const EDITOR_CANVAS_TOOLS = [\n\tMCP_TOOL_CANVAS_ADD_NODE,\n\tMCP_TOOL_CANVAS_REMOVE_NODES,\n\tMCP_TOOL_CANVAS_CONNECT,\n\tMCP_TOOL_CANVAS_UPDATE_NODE,\n\tMCP_TOOL_CANVAS_LAYOUT,\n\tMCP_TOOL_CANVAS_SELECT,\n\tMCP_TOOL_CANVAS_HIGHLIGHT\n] as const;\n\n/** Per-operation prompt tools, the strict alternative to `edit_prompt`. */\nexport const EDITOR_PROMPT_TOOLS = [\n\tMCP_TOOL_PROMPT_INSERT_TEXT,\n\tMCP_TOOL_PROMPT_REPLACE_RANGE,\n\tMCP_TOOL_PROMPT_SET_VARIABLE,\n\tMCP_TOOL_PROMPT_SELECT\n] as const;\n\n/**\n * Arguments each `edit_canvas` / `edit_prompt` operation needs, used to tell\n * an agent exactly what is missing (the combined schemas cannot express it).\n */\nexport const EDIT_OPERATION_REQUIRED_ARGUMENTS: Readonly<Record<'edit_canvas' | 'edit_prompt', Readonly<Record<string, readonly string[]>>>> = {\n\tedit_canvas: {\n\t\tadd_node: ['node'],\n\t\tremove_nodes: ['nodeIds'],\n\t\tconnect: ['source', 'target'],\n\t\tupdate_node: ['id'],\n\t\tlayout: [],\n\t\tselect: ['nodeIds'],\n\t\thighlight: ['nodeIds']\n\t},\n\tedit_prompt: {\n\t\tinsert_text: ['text'],\n\t\treplace_range: ['from', 'to', 'text'],\n\t\tset_variable: ['name'],\n\t\tselect: ['from', 'to']\n\t}\n};\n\n/**\n * CSS selectors for ephemeral UI overlays (such as agent cursors, presence tags, and transient bubbles)\n * that should be excluded during canvas image export and visual snapshot generation.\n */\nexport const EXPORT_EXCLUDED_SELECTORS = [\n\t'.pixerate-presence',\n\t'.agent-presence',\n\t'.ursula-presence'\n] as const;\n\nexport const EDITOR_MCP_TOOLS = [\n\tMCP_TOOL_GET_EDITOR_STATE,\n\tMCP_TOOL_EDIT_CANVAS,\n\tMCP_TOOL_EDIT_PROMPT,\n\tMCP_TOOL_VIEW_EDITOR\n] as const;\n\n"],"mappings":";AAKO,IAAM,4BAA4B;AAAA,EACxC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aAAa;AAAA,IACZ,OAAO;AAAA,IACP,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,eAAe;AAAA,EAChB;AAAA,EACA,aACC;AAAA,EACD,aAAa;AAAA,IACZ,MAAM;AAAA,IACN,YAAY;AAAA,MACX,iBAAiB;AAAA,QAChB,MAAM;AAAA,QACN,aAAa;AAAA,MACd;AAAA,MACA,eAAe;AAAA,QACd,MAAM;AAAA,QACN,aAAa;AAAA,MACd;AAAA,IACD;AAAA,EACD;AACD;AAEO,IAAM,uBAAuB;AAAA,EACnC,MAAM;AAAA,EACN,OAAO;AAAA,EACP,aAAa;AAAA,IACZ,OAAO;AAAA,IACP,cAAc;AAAA,IACd,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,eAAe;AAAA,EAChB;AAAA,EACA,aACC;AAAA,EAED,aAAa;AAAA,IACZ,MAAM;AAAA,IACN,YAAY;AAAA,MACX,WAAW;AAAA,QACV,MAAM;AAAA,QACN,MAAM;AAAA,UACL;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACD;AAAA,QACA,aAAa;A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Aa,kBAAkB;AAAA,MACxD,IAAI,EAAE,GAAG,cAAc,aAAa,0BAA0B;AAAA,IAC/D;AAAA,IACA,UAAU,CAAC,QAAQ,IAAI;AAAA,IACvB,sBAAsB;AAAA,EACvB;AACD;AAGO,IAAM,sBAAsB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAGO,IAAM,sBAAsB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;AAMO,IAAM,oCAAkI;AAAA,EAC9I,aAAa;AAAA,IACZ,UAAU,CAAC,MAAM;AAAA,IACjB,cAAc,CAAC,SAAS;AAAA,IACxB,SAAS,CAAC,UAAU,QAAQ;AAAA,IAC5B,aAAa,CAAC,IAAI;AAAA,IAClB,QAAQ,CAAC;AAAA,IACT,QAAQ,CAAC,SAAS;AAAA,IAClB,WAAW,CAAC,SAAS;AAAA,EACtB;AAAA,EACA,aAAa;AAAA,IACZ,aAAa,CAAC,MAAM;AAAA,IACpB,eAAe,CAAC,QAAQ,MAAM,MAAM;AAAA,IACpC,cAAc,CAAC,MAAM;AAAA,IACrB,QAAQ,CAAC,QAAQ,IAAI;AAAA,EACtB;AACD;AAMO,IAAM,4BAA4B;AAAA,EACxC;AAAA,EACA;AAAA,EACA;AACD;AAEO,IAAM,mBAAmB;AAAA,EAC/B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/editor/editor/packages/core/dist/chunk-K73CKYUM.cjs","../src/tools/definitions.ts"],"names":[],"mappings":"AAAA;ACKO,IAAM,0BAAA,EAA4B;AAAA,EACxC,IAAA,EAAM,kBAAA;AAAA,EACN,KAAA,EAAO,kBAAA;AAAA,EACP,WAAA,EAAa;AAAA,IACZ,KAAA,EAAO,kBAAA;AAAA,IACP,YAAA,EAAc,IAAA;AAAA,IACd,eAAA,EAAiB,KAAA;AAAA,IACjB,cA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AACA;AACF,urCAAC","file":"/home/runner/work/editor/editor/packages/core/dist/chunk-K73CKYUM.cjs","sourcesContent":[null,"/**\n * Standard MCP Tool Definitions for @pixerate/editor.\n * Compatible with the Model Context Protocol (MCP) tool specification schema.\n */\n\nexport const MCP_TOOL_GET_EDITOR_STATE = {\n\tname: 'get_editor_state',\n\ttitle: 'Get editor state',\n\tannotations: {\n\t\ttitle: 'Get editor state',\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\tidempotentHint: true,\n\t\topenWorldHint: false\n\t},\n\tdescription:\n\t\t'Retrieves the current state of the document, variables, selection, and canvas graph (nodes and edges).',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tincludeDocument: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Whether to include the prompt document text and variables (default: true).'\n\t\t\t},\n\t\t\tincludeCanvas: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Whether to include the canvas nodes and edges (default: true).'\n\t\t\t}\n\t\t}\n\t}\n} as const;\n\nexport const MCP_TOOL_EDIT_CANVAS = {\n\tname: 'edit_canvas',\n\ttitle: 'Edit the canvas',\n\tannotations: {\n\t\ttitle: 'Edit the canvas',\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: false,\n\t\topenWorldHint: false\n\t},\n\tdescription:\n\t\t'Applies high-level structural operations to the visual canvas (adding nodes, connecting edges, organizing layout, or moving elements). ' +\n\t\t'Prefer the per-operation canvas_* tools when the host exposes them. Returns the ids of created nodes and edges.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\toperation: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: [\n\t\t\t\t\t'add_node',\n\t\t\t\t\t'remove_nodes',\n\t\t\t\t\t'connect',\n\t\t\t\t\t'update_node',\n\t\t\t\t\t'layout',\n\t\t\t\t\t'select',\n\t\t\t\t\t'highlight'\n\t\t\t\t],\n\t\t\t\tdescription: 'The canvas operation to execute.'\n\t\t\t},\n\t\t\tnode: {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: 'Node definition when operation is add_node. Can omit position to auto-place.'\n\t\t\t},\n\t\t\tnearNodeId: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Anchor node ID to position beside using collision-aware placement.'\n\t\t\t},\n\t\t\tside: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['top', 'right', 'bottom', 'left'],\n\t\t\t\tdescription: 'Side of the anchor node to place the new node beside.'\n\t\t\t},\n\t\t\tnodeIds: {\n\t\t\t\ttype: 'array',\n\t\t\t\titems: { type: 'string' },\n\t\t\t\tdescription: 'Array of node IDs for remove_nodes, select, or highlight.'\n\t\t\t},\n\t\t\tid: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Node ID for update_node (or pass `node: { id, data }`).'\n\t\t\t},\n\t\t\tdata: {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: 'Data fields to merge into the node for update_node.'\n\t\t\t},\n\t\t\tcolor: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'CSS color for highlight (default #3b82f6).'\n\t\t\t},\n\t\t\tdurationMs: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: 'How long the highlight lasts in ms (default 2000).'\n\t\t\t},\n\t\t\tsource: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Source node ID for connect operation.'\n\t\t\t},\n\t\t\ttarget: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Target node ID for connect operation.'\n\t\t\t},\n\t\t\tlabel: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Optional edge label for connect operation.'\n\t\t\t},\n\t\t\tdirection: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['LR', 'TB', 'RL', 'BT'],\n\t\t\t\tdescription: 'Layout direction (default LR).'\n\t\t\t},\n\t\t\tincremental: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Preserve existing node coordinates and blend layout (default true).'\n\t\t\t}\n\t\t},\n\t\trequired: ['operation']\n\t}\n} as const;\n\nexport const MCP_TOOL_EDIT_PROMPT = {\n\tname: 'edit_prompt',\n\ttitle: 'Edit the prompt',\n\tannotations: {\n\t\ttitle: 'Edit the prompt',\n\t\treadOnlyHint: false,\n\t\tdestructiveHint: true,\n\t\tidempotentHint: false,\n\t\topenWorldHint: false\n\t},\n\tdescription:\n\t\t'Applies edits to the prompt template document, including inserting text, replacing ranges, and setting variables.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\toperation: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['insert_text', 'replace_range', 'set_variable', 'select'],\n\t\t\t\tdescription: 'The prompt operation to execute.'\n\t\t\t},\n\t\t\ttext: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Text to insert or replace.'\n\t\t\t},\n\t\t\tat: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: 'Position to insert text at.'\n\t\t\t},\n\t\t\tfrom: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: 'Start offset for replace_range or select.'\n\t\t\t},\n\t\t\tto: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: 'End offset for replace_range or select.'\n\t\t\t},\n\t\t\tname: {\n\t\t\t\ttype: 'string',\n\t\t\t\tdescription: 'Variable name for set_variable.'\n\t\t\t},\n\t\t\tvalue: {\n\t\t\t\tdescription: 'Variable value for set_variable.'\n\t\t\t}\n\t\t},\n\t\trequired: ['operation']\n\t}\n} as const;\n\nexport const MCP_TOOL_VIEW_EDITOR = {\n\tname: 'view_editor',\n\ttitle: 'View the editor',\n\tannotations: {\n\t\ttitle: 'View the editor',\n\t\treadOnlyHint: true,\n\t\tdestructiveHint: false,\n\t\tidempotentHint: true,\n\t\topenWorldHint: false\n\t},\n\tdescription:\n\t\t'Captures a visual image snapshot (JPEG or PNG) of the editor canvas or viewport for multimodal evaluation. Active agent cursor indicators are automatically excluded from the snapshot.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tscope: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['viewport', 'canvas'],\n\t\t\t\tdescription: 'Whether to capture only the visible viewport or the full canvas bounding box (default: viewport).'\n\t\t\t},\n\t\t\tformat: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['jpeg', 'png'],\n\t\t\t\tdescription: 'Image format of the base64 snapshot (default: jpeg).'\n\t\t\t},\n\t\t\tmaxEdge: {\n\t\t\t\ttype: 'integer',\n\t\t\t\tdescription: 'Maximum width or height dimension in pixels (default: 1024).'\n\t\t\t}\n\t\t}\n\t}\n} as const;\n\n// ---------------------------------------------------------------------------\n// Per-operation tools: one strict schema per canvas / prompt operation.\n// ---------------------------------------------------------------------------\n\nconst WRITE_ANNOTATIONS = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false } as const;\nconst DESTRUCTIVE_ANNOTATIONS = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false } as const;\nconst IDEMPOTENT_ANNOTATIONS = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false } as const;\n\nconst NODE_IDS = {\n\ttype: 'array',\n\titems: { type: 'string', minLength: 1 },\n\tminItems: 1,\n\tuniqueItems: true,\n\tdescription: 'Node ids (from get_editor_state).'\n} as const;\n\nconst POSITION = {\n\ttype: 'object',\n\tproperties: { x: { type: 'number' }, y: { type: 'number' } },\n\trequired: ['x', 'y'],\n\tadditionalProperties: false\n} as const;\n\nconst DOC_POSITION = { type: 'integer', minimum: 0 } as const;\n\nexport const MCP_TOOL_CANVAS_ADD_NODE = {\n\tname: 'canvas_add_node',\n\ttitle: 'Add a canvas node',\n\tannotations: { title: 'Add a canvas node', ...WRITE_ANNOTATIONS },\n\tdescription:\n\t\t'Adds a node to the canvas. Without `position` it is placed without overlaps beside `nearNodeId` (and connected from it) ' +\n\t\t'or beside the last node. Returns the new node id (generated unless you pass `node.id`) and the id of the connecting edge.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tnode: {\n\t\t\t\ttype: 'object',\n\t\t\t\tdescription: 'The node. Extra host-specific fields are kept.',\n\t\t\t\tproperties: {\n\t\t\t\t\tid: { type: 'string', minLength: 1, description: 'Node id (default: generated). Must be unused.' },\n\t\t\t\t\ttype: { type: 'string', description: 'Node type registered by the host.' },\n\t\t\t\t\tdata: { type: 'object', description: 'Node data (e.g. { \"label\": \"...\" }).' },\n\t\t\t\t\tposition: { ...POSITION, description: 'Canvas coordinates (default: auto-placed).' },\n\t\t\t\t\twidth: { type: 'number', exclusiveMinimum: 0 },\n\t\t\t\t\theight: { type: 'number', exclusiveMinimum: 0 },\n\t\t\t\t\tparentId: { type: 'string', description: 'Parent (group/frame) node id.' }\n\t\t\t\t}\n\t\t\t},\n\t\t\tnearNodeId: { type: 'string', description: 'Existing node to place the new node beside and connect from.' },\n\t\t\tside: {\n\t\t\t\ttype: 'string',\n\t\t\t\tenum: ['top', 'right', 'bottom', 'left'],\n\t\t\t\tdescription: 'Side of `nearNodeId` to place the node on (default right).'\n\t\t\t}\n\t\t},\n\t\trequired: ['node'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_REMOVE_NODES = {\n\tname: 'canvas_remove_nodes',\n\ttitle: 'Remove canvas nodes',\n\tannotations: { title: 'Remove canvas nodes', ...DESTRUCTIVE_ANNOTATIONS },\n\tdescription: 'Removes nodes (and their edges) from the canvas. Every id must exist.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: { nodeIds: NODE_IDS },\n\t\trequired: ['nodeIds'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_CONNECT = {\n\tname: 'canvas_connect',\n\ttitle: 'Connect canvas nodes',\n\tannotations: { title: 'Connect canvas nodes', ...WRITE_ANNOTATIONS },\n\tdescription: 'Adds an edge from one existing node to another. Returns the new edge id.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tsource: { type: 'string', minLength: 1, description: 'Source node id.' },\n\t\t\ttarget: { type: 'string', minLength: 1, description: 'Target node id.' },\n\t\t\tlabel: { type: 'string', description: 'Edge label.' }\n\t\t},\n\t\trequired: ['source', 'target'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_UPDATE_NODE = {\n\tname: 'canvas_update_node',\n\ttitle: 'Update a canvas node',\n\tannotations: { title: 'Update a canvas node', ...DESTRUCTIVE_ANNOTATIONS, idempotentHint: true },\n\tdescription: \"Merges fields into an existing node's data.\",\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tid: { type: 'string', minLength: 1, description: 'Node id.' },\n\t\t\tdata: { type: 'object', description: 'Data fields to merge (e.g. { \"label\": \"New\" }).' }\n\t\t},\n\t\trequired: ['id', 'data'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_LAYOUT = {\n\tname: 'canvas_layout',\n\ttitle: 'Lay out the canvas',\n\tannotations: { title: 'Lay out the canvas', ...IDEMPOTENT_ANNOTATIONS },\n\tdescription: 'Arranges the canvas graph automatically.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tdirection: { type: 'string', enum: ['LR', 'TB', 'RL', 'BT'], description: 'Layout direction (default LR).' },\n\t\t\tincremental: {\n\t\t\t\ttype: 'boolean',\n\t\t\t\tdescription: 'Keep nodes that already have a position where they are (default true).'\n\t\t\t}\n\t\t},\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_SELECT = {\n\tname: 'canvas_select',\n\ttitle: 'Select canvas nodes',\n\tannotations: { title: 'Select canvas nodes', ...IDEMPOTENT_ANNOTATIONS },\n\tdescription: 'Replaces the canvas selection with these nodes (an empty list clears it).',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: { nodeIds: { ...NODE_IDS, minItems: 0 } },\n\t\trequired: ['nodeIds'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_CANVAS_HIGHLIGHT = {\n\tname: 'canvas_highlight',\n\ttitle: 'Highlight canvas nodes',\n\tannotations: { title: 'Highlight canvas nodes', ...IDEMPOTENT_ANNOTATIONS },\n\tdescription: 'Briefly highlights nodes to draw the user\\'s attention to them.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tnodeIds: NODE_IDS,\n\t\t\tcolor: { type: 'string', description: 'CSS color (default #3b82f6).' },\n\t\t\tdurationMs: { type: 'integer', minimum: 0, maximum: 60000, description: 'Duration in ms (default 2000).' }\n\t\t},\n\t\trequired: ['nodeIds'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_PROMPT_INSERT_TEXT = {\n\tname: 'prompt_insert_text',\n\ttitle: 'Insert prompt text',\n\tannotations: { title: 'Insert prompt text', ...WRITE_ANNOTATIONS },\n\tdescription: 'Inserts text into the prompt at a position, or at the cursor when `at` is omitted.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\ttext: { type: 'string', description: 'Text to insert.' },\n\t\t\tat: { ...DOC_POSITION, description: 'Position (as in get_editor_state `document.selection`).' }\n\t\t},\n\t\trequired: ['text'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_PROMPT_REPLACE_RANGE = {\n\tname: 'prompt_replace_range',\n\ttitle: 'Replace prompt text',\n\tannotations: { title: 'Replace prompt text', ...DESTRUCTIVE_ANNOTATIONS },\n\tdescription: 'Replaces the prompt text between two positions (an empty text deletes it).',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tfrom: { ...DOC_POSITION, description: 'Start position.' },\n\t\t\tto: { ...DOC_POSITION, description: 'End position (>= from).' },\n\t\t\ttext: { type: 'string', description: 'Replacement text.' }\n\t\t},\n\t\trequired: ['from', 'to', 'text'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_PROMPT_SET_VARIABLE = {\n\tname: 'prompt_set_variable',\n\ttitle: 'Set a prompt variable',\n\tannotations: { title: 'Set a prompt variable', ...DESTRUCTIVE_ANNOTATIONS, idempotentHint: true },\n\tdescription: 'Sets the value of a template variable used by the prompt.',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tname: { type: 'string', minLength: 1, description: 'Variable name.' },\n\t\t\tvalue: { description: 'Variable value (any JSON value).' }\n\t\t},\n\t\trequired: ['name', 'value'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\nexport const MCP_TOOL_PROMPT_SELECT = {\n\tname: 'prompt_select',\n\ttitle: 'Select prompt text',\n\tannotations: { title: 'Select prompt text', ...IDEMPOTENT_ANNOTATIONS },\n\tdescription: 'Selects the prompt text between two positions (from === to places the cursor).',\n\tinputSchema: {\n\t\ttype: 'object',\n\t\tproperties: {\n\t\t\tfrom: { ...DOC_POSITION, description: 'Start position.' },\n\t\t\tto: { ...DOC_POSITION, description: 'End position (>= from).' }\n\t\t},\n\t\trequired: ['from', 'to'],\n\t\tadditionalProperties: false\n\t}\n} as const;\n\n/** Per-operation canvas tools, the strict alternative to `edit_canvas`. */\nexport const EDITOR_CANVAS_TOOLS = [\n\tMCP_TOOL_CANVAS_ADD_NODE,\n\tMCP_TOOL_CANVAS_REMOVE_NODES,\n\tMCP_TOOL_CANVAS_CONNECT,\n\tMCP_TOOL_CANVAS_UPDATE_NODE,\n\tMCP_TOOL_CANVAS_LAYOUT,\n\tMCP_TOOL_CANVAS_SELECT,\n\tMCP_TOOL_CANVAS_HIGHLIGHT\n] as const;\n\n/** Per-operation prompt tools, the strict alternative to `edit_prompt`. */\nexport const EDITOR_PROMPT_TOOLS = [\n\tMCP_TOOL_PROMPT_INSERT_TEXT,\n\tMCP_TOOL_PROMPT_REPLACE_RANGE,\n\tMCP_TOOL_PROMPT_SET_VARIABLE,\n\tMCP_TOOL_PROMPT_SELECT\n] as const;\n\n/**\n * Arguments each `edit_canvas` / `edit_prompt` operation needs, used to tell\n * an agent exactly what is missing (the combined schemas cannot express it).\n */\nexport const EDIT_OPERATION_REQUIRED_ARGUMENTS: Readonly<Record<'edit_canvas' | 'edit_prompt', Readonly<Record<string, readonly string[]>>>> = {\n\tedit_canvas: {\n\t\tadd_node: ['node'],\n\t\tremove_nodes: ['nodeIds'],\n\t\tconnect: ['source', 'target'],\n\t\tupdate_node: ['id'],\n\t\tlayout: [],\n\t\tselect: ['nodeIds'],\n\t\thighlight: ['nodeIds']\n\t},\n\tedit_prompt: {\n\t\tinsert_text: ['text'],\n\t\treplace_range: ['from', 'to', 'text'],\n\t\tset_variable: ['name'],\n\t\tselect: ['from', 'to']\n\t}\n};\n\n/**\n * CSS selectors for ephemeral UI overlays (such as agent cursors, presence tags, and transient bubbles)\n * that should be excluded during canvas image export and visual snapshot generation.\n */\nexport const EXPORT_EXCLUDED_SELECTORS = [\n\t'.pixerate-presence',\n\t'.agent-presence',\n\t'.ursula-presence'\n] as const;\n\nexport const EDITOR_MCP_TOOLS = [\n\tMCP_TOOL_GET_EDITOR_STATE,\n\tMCP_TOOL_EDIT_CANVAS,\n\tMCP_TOOL_EDIT_PROMPT,\n\tMCP_TOOL_VIEW_EDITOR\n] as const;\n\n"]}