@pixerate/editor 0.80.0 → 0.82.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 (107) hide show
  1. package/README.md +13 -3
  2. package/dist/agent/index.cjs +138 -13
  3. package/dist/agent/index.cjs.map +1 -1
  4. package/dist/agent/index.d.cts +9 -5
  5. package/dist/agent/index.d.ts +9 -5
  6. package/dist/agent/index.js +144 -19
  7. package/dist/agent/index.js.map +1 -1
  8. package/dist/animation-editor/index.d.cts +1 -1
  9. package/dist/animation-editor/index.d.ts +1 -1
  10. package/dist/bridge/index.d.cts +3 -3
  11. package/dist/bridge/index.d.ts +3 -3
  12. package/dist/{bridge-client-C5dRjrz5.d.ts → bridge-client-CMGfnjTl.d.ts} +1 -1
  13. package/dist/{bridge-client-C5OziCRK.d.cts → bridge-client-VpnICVxP.d.cts} +1 -1
  14. package/dist/{builtins-BKYlHH1s.d.ts → builtins-CV1fDj64.d.ts} +5 -1
  15. package/dist/{builtins-1kqwLUnb.d.cts → builtins-c4w0eAYl.d.cts} +5 -1
  16. package/dist/canvas/index.cjs +235 -104
  17. package/dist/canvas/index.cjs.map +1 -1
  18. package/dist/canvas/index.d.cts +59 -1
  19. package/dist/canvas/index.d.ts +59 -1
  20. package/dist/canvas/index.js +234 -103
  21. package/dist/canvas/index.js.map +1 -1
  22. package/dist/capture-DFEMFmVt.d.cts +133 -0
  23. package/dist/capture-wwNGaW05.d.ts +133 -0
  24. package/dist/chart/index.d.cts +1 -1
  25. package/dist/chart/index.d.ts +1 -1
  26. package/dist/{chunk-2CJ3LPYQ.js → chunk-424H3P4I.js} +13 -295
  27. package/dist/chunk-424H3P4I.js.map +1 -0
  28. package/dist/{chunk-K73CKYUM.cjs → chunk-EI2MOVQ3.cjs} +198 -3
  29. package/dist/chunk-EI2MOVQ3.cjs.map +1 -0
  30. package/dist/chunk-FURT6ZFZ.cjs +1 -0
  31. package/dist/chunk-FURT6ZFZ.cjs.map +1 -0
  32. package/dist/{chunk-GPWNYQ7R.js → chunk-O2W2SP3C.js} +197 -2
  33. package/dist/chunk-O2W2SP3C.js.map +1 -0
  34. package/dist/{chunk-UN33YOXW.cjs → chunk-PA5S7KPC.cjs} +293 -2
  35. package/dist/chunk-PA5S7KPC.cjs.map +1 -0
  36. package/dist/{chunk-IB3ZHQAX.js → chunk-PTYWCFFW.js} +29 -4
  37. package/dist/chunk-PTYWCFFW.js.map +1 -0
  38. package/dist/{chunk-JQ3BB3E6.js → chunk-PXDEFEG2.js} +293 -2
  39. package/dist/chunk-PXDEFEG2.js.map +1 -0
  40. package/dist/chunk-REOJJIY3.js +201 -0
  41. package/dist/chunk-REOJJIY3.js.map +1 -0
  42. package/dist/chunk-RJ2BFKEN.js +1 -0
  43. package/dist/chunk-RJ2BFKEN.js.map +1 -0
  44. package/dist/{chunk-YU4WQE5M.cjs → chunk-TAPXWP2B.cjs} +95 -377
  45. package/dist/chunk-TAPXWP2B.cjs.map +1 -0
  46. package/dist/{chunk-HXDMZQTD.cjs → chunk-TPOT575P.cjs} +29 -4
  47. package/dist/{chunk-IB3ZHQAX.js.map → chunk-TPOT575P.cjs.map} +1 -1
  48. package/dist/chunk-VJUVNERT.cjs +201 -0
  49. package/dist/chunk-VJUVNERT.cjs.map +1 -0
  50. package/dist/commands/index.cjs +2 -2
  51. package/dist/commands/index.d.cts +2 -2
  52. package/dist/commands/index.d.ts +2 -2
  53. package/dist/commands/index.js +1 -1
  54. package/dist/diagram/index.d.cts +1 -1
  55. package/dist/diagram/index.d.ts +1 -1
  56. package/dist/dom-capture-7Wvf6Tyg.d.ts +59 -0
  57. package/dist/dom-capture-GyYuE-zq.d.cts +59 -0
  58. package/dist/generation/index.cjs +932 -791
  59. package/dist/generation/index.cjs.map +1 -1
  60. package/dist/generation/index.d.cts +268 -242
  61. package/dist/generation/index.d.ts +268 -242
  62. package/dist/generation/index.js +926 -785
  63. package/dist/generation/index.js.map +1 -1
  64. package/dist/image-editor/index.cjs +362 -2
  65. package/dist/image-editor/index.cjs.map +1 -1
  66. package/dist/image-editor/index.d.cts +35 -2
  67. package/dist/image-editor/index.d.ts +35 -2
  68. package/dist/image-editor/index.js +361 -1
  69. package/dist/image-editor/index.js.map +1 -1
  70. package/dist/index.cjs +3 -3
  71. package/dist/index.cjs.map +1 -1
  72. package/dist/index.js +16 -16
  73. package/dist/{registry-DIpIaCkH.d.cts → registry-BqA1AZt0.d.cts} +1 -1
  74. package/dist/{registry-7AZFuand.d.ts → registry-D-4fit9C.d.ts} +1 -1
  75. package/dist/spreadsheet/index.cjs +3 -3
  76. package/dist/spreadsheet/index.cjs.map +1 -1
  77. package/dist/spreadsheet/index.js +16 -16
  78. package/dist/tools/index.cjs +33 -4
  79. package/dist/tools/index.cjs.map +1 -1
  80. package/dist/tools/index.d.cts +4 -2
  81. package/dist/tools/index.d.ts +4 -2
  82. package/dist/tools/index.js +43 -14
  83. package/dist/video-editor/index.d.cts +1 -1
  84. package/dist/video-editor/index.d.ts +1 -1
  85. package/package.json +2 -1
  86. package/skills/README.md +55 -0
  87. package/skills/pixerate-agent-tools/SKILL.md +75 -0
  88. package/skills/pixerate-animation-editor/SKILL.md +155 -0
  89. package/skills/pixerate-animation-editor/references/commands.md +123 -0
  90. package/skills/pixerate-canvas/SKILL.md +231 -0
  91. package/skills/pixerate-chart/SKILL.md +190 -0
  92. package/skills/pixerate-diagram/SKILL.md +134 -0
  93. package/skills/pixerate-generation/SKILL.md +109 -0
  94. package/skills/pixerate-image-editor/SKILL.md +140 -0
  95. package/skills/pixerate-parameters/SKILL.md +83 -0
  96. package/skills/pixerate-rich-text/SKILL.md +160 -0
  97. package/skills/pixerate-spreadsheet/SKILL.md +146 -0
  98. package/skills/pixerate-vector/SKILL.md +191 -0
  99. package/skills/pixerate-vector/references/commands.md +138 -0
  100. package/skills/pixerate-video-editor/SKILL.md +173 -0
  101. package/dist/chunk-2CJ3LPYQ.js.map +0 -1
  102. package/dist/chunk-GPWNYQ7R.js.map +0 -1
  103. package/dist/chunk-HXDMZQTD.cjs.map +0 -1
  104. package/dist/chunk-JQ3BB3E6.js.map +0 -1
  105. package/dist/chunk-K73CKYUM.cjs.map +0 -1
  106. package/dist/chunk-UN33YOXW.cjs.map +0 -1
  107. package/dist/chunk-YU4WQE5M.cjs.map +0 -1
@@ -0,0 +1,201 @@
1
+ // src/tools/capture.ts
2
+ function unionCaptureRects(rects) {
3
+ let minX = Infinity;
4
+ let minY = Infinity;
5
+ let maxX = -Infinity;
6
+ let maxY = -Infinity;
7
+ for (const r of rects) {
8
+ if (!r) continue;
9
+ minX = Math.min(minX, r.x);
10
+ minY = Math.min(minY, r.y);
11
+ maxX = Math.max(maxX, r.x + r.width);
12
+ maxY = Math.max(maxY, r.y + r.height);
13
+ }
14
+ return minX === Infinity ? null : { x: minX, y: minY, width: maxX - minX, height: maxY - minY };
15
+ }
16
+ function captureOutputSize(rect, maxEdge, maxScale = 2) {
17
+ const longest = Math.max(rect.width, rect.height);
18
+ const scale = Math.min(maxScale, maxEdge / longest);
19
+ return {
20
+ width: Math.max(1, Math.round(rect.width * scale)),
21
+ height: Math.max(1, Math.round(rect.height * scale)),
22
+ scale
23
+ };
24
+ }
25
+ function toCapturedImageData(image, fallbackMimeType) {
26
+ if (typeof image !== "string") return image;
27
+ if (!image.startsWith("data:")) return { data: image, mimeType: fallbackMimeType };
28
+ const match = /^data:([^;,]*)(?:;[^,]*)?,(.*)$/s.exec(image);
29
+ if (!match?.[1] || !match[2]) throw new Error("The surface returned an empty image; rendering may not be available in this environment.");
30
+ return { data: match[2], mimeType: match[1] };
31
+ }
32
+ var round = (n) => Math.round(n * 100) / 100;
33
+ var roundRect = (r) => ({ x: round(r.x), y: round(r.y), width: round(r.width), height: round(r.height) });
34
+ var pad = (r, p) => ({ x: r.x - p, y: r.y - p, width: r.width + 2 * p, height: r.height + 2 * p });
35
+ function regionsOf(surface) {
36
+ return [
37
+ ...surface.viewport ? ["viewport"] : [],
38
+ "content",
39
+ ...surface.selection ? ["selection"] : [],
40
+ ...surface.items ? [surface.items.region] : [],
41
+ "rect"
42
+ ];
43
+ }
44
+ function captureInputSchema(surface, options = {}) {
45
+ const regions = regionsOf(surface);
46
+ const units = surface.units;
47
+ const properties = {
48
+ region: {
49
+ type: "string",
50
+ enum: regions,
51
+ description: `What to capture (default ${regions[0]}): ` + [
52
+ surface.viewport ? '"viewport" is what is on screen now' : "",
53
+ '"content" is everything',
54
+ surface.selection ? '"selection" is the selected items' : "",
55
+ surface.items ? `"${surface.items.region}" is the ${surface.items.noun}s in "ids"` : "",
56
+ `"rect" is the area in "rect"`
57
+ ].filter(Boolean).join(", ") + "."
58
+ },
59
+ ...surface.items ? {
60
+ ids: {
61
+ type: "array",
62
+ items: { type: "string" },
63
+ minItems: 1,
64
+ description: `With region "${surface.items.region}": ids of the ${surface.items.noun}s to frame${surface.items.source ? ` (from ${surface.items.source})` : ""}.`
65
+ }
66
+ } : {},
67
+ rect: {
68
+ type: "object",
69
+ properties: {
70
+ x: { type: "number", description: `Left edge in ${units}.` },
71
+ y: { type: "number", description: `Top edge in ${units}.` },
72
+ width: { type: "number", exclusiveMinimum: 0, description: `Width in ${units}.` },
73
+ height: { type: "number", exclusiveMinimum: 0, description: `Height in ${units}.` }
74
+ },
75
+ required: ["x", "y", "width", "height"],
76
+ additionalProperties: false,
77
+ description: `With region "rect": the area to capture, in ${units}.`
78
+ },
79
+ padding: {
80
+ type: "number",
81
+ minimum: 0,
82
+ description: `Margin around content, selection${surface.items ? ` and ${surface.items.region}` : ""} regions, in ${units} (default ${options.defaultPadding ?? 16}).`
83
+ },
84
+ maxEdge: {
85
+ type: "integer",
86
+ minimum: 64,
87
+ maximum: 4096,
88
+ description: `Longest side of the image in pixels (default ${options.defaultMaxEdge ?? 1024}). Small regions are not enlarged beyond ${surface.maxScale ?? 2} pixels per unit.`
89
+ },
90
+ format: { type: "string", enum: ["png", "jpeg"], description: "Image format (default png; jpeg is smaller for photos)." },
91
+ quality: { type: "number", minimum: 0.1, maximum: 1, description: "JPEG quality from 0.1 to 1 (default 0.85). Ignored for png." },
92
+ ...surface.overlays ? { includeOverlays: { type: "boolean", description: `Also draw ${surface.overlays} (default false).` } } : {}
93
+ };
94
+ return { type: "object", properties, additionalProperties: false };
95
+ }
96
+ function resolveCaptureRequest(surface, args, options = {}) {
97
+ const regions = regionsOf(surface);
98
+ const region = args.region ?? regions[0];
99
+ if (!regions.includes(region)) throw new Error(`Unknown region "${region}". Use one of: ${regions.join(", ")}.`);
100
+ if (args.rect !== void 0 && region !== "rect") throw new Error(`"rect" only applies with region "rect"; drop it or set region to "rect".`);
101
+ if (args.ids !== void 0 && region !== surface.items?.region) {
102
+ throw new Error(`"ids" only applies with region "${surface.items?.region ?? "items"}"; drop it or change the region.`);
103
+ }
104
+ const padding = typeof args.padding === "number" ? args.padding : options.defaultPadding ?? 16;
105
+ let rect;
106
+ let ids;
107
+ if (region === "viewport") {
108
+ rect = surface.viewport();
109
+ if (!rect) throw new Error('The view is not on screen (not mounted or zero size). Use region "content" instead.');
110
+ } else if (region === "content") {
111
+ const content = surface.content();
112
+ if (!content) throw new Error("There is nothing to capture: the surface is empty.");
113
+ rect = pad(content, padding);
114
+ } else if (region === "selection") {
115
+ const selection = surface.selection();
116
+ if (!selection.rect) throw new Error('Nothing is selected. Select something first, or use region "content".');
117
+ rect = pad(selection.rect, padding);
118
+ ids = selection.ids;
119
+ } else if (region === "rect") {
120
+ if (!args.rect) throw new Error(`Region "rect" needs "rect": {"x", "y", "width", "height"} in ${surface.units}.`);
121
+ rect = { x: args.rect.x, y: args.rect.y, width: args.rect.width, height: args.rect.height };
122
+ } else {
123
+ const items = surface.items;
124
+ const wanted = Array.isArray(args.ids) ? args.ids : [];
125
+ if (!wanted.length) throw new Error(`Region "${items.region}" needs "ids": the ${items.noun} ids to frame.`);
126
+ const found = items.bounds(wanted);
127
+ if (found.missing.length) {
128
+ throw new Error(
129
+ `Unknown ${items.noun} id(s): ${found.missing.join(", ")}.${items.source ? ` Read the current ids with ${items.source}.` : ""}`
130
+ );
131
+ }
132
+ if (!found.rect) throw new Error(`The ${items.noun}s ${wanted.join(", ")} have no size yet; try again once they are drawn.`);
133
+ rect = pad(found.rect, padding);
134
+ ids = wanted;
135
+ }
136
+ if (!(rect.width > 0) || !(rect.height > 0)) {
137
+ throw new Error(`The ${region} region is empty (${rect.width} \xD7 ${rect.height} ${surface.units}); capture a larger area.`);
138
+ }
139
+ const maxEdge = typeof args.maxEdge === "number" ? args.maxEdge : options.defaultMaxEdge ?? 1024;
140
+ const size = captureOutputSize(rect, maxEdge, surface.maxScale ?? 2);
141
+ return {
142
+ region,
143
+ rect,
144
+ ...size,
145
+ format: args.format === "jpeg" ? "jpeg" : "png",
146
+ quality: typeof args.quality === "number" ? args.quality : 0.85,
147
+ includeOverlays: !!surface.overlays && args.includeOverlays === true,
148
+ ...ids ? { ids } : {}
149
+ };
150
+ }
151
+ function createCaptureTool(surface, options = {}) {
152
+ const title = options.title ?? "Capture a screenshot";
153
+ const subject = options.subject ?? "the view";
154
+ return {
155
+ name: options.name ?? "capture_view",
156
+ title,
157
+ description: `Takes a screenshot of ${subject} so you can check how it looks, without changing anything. Captures the ${regionsOf(surface).join(", ")} region and returns the image plus the captured rect (in ${surface.units}) and the pixel scale, so a point (px, py) in the image is at (rect.x + px / scale, rect.y + py / scale).` + (surface.overlays ? ` Transient overlays (${surface.overlays}) are left out unless includeOverlays is true.` : ""),
158
+ inputSchema: captureInputSchema(surface, options),
159
+ annotations: { title, readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
160
+ handler: async (args, context) => {
161
+ const { ids, ...request } = resolveCaptureRequest(surface, args, options);
162
+ const mimeType = request.format === "jpeg" ? "image/jpeg" : "image/png";
163
+ const image = toCapturedImageData(await surface.render({ ...request, signal: context.signal }), mimeType);
164
+ const rect = roundRect(request.rect);
165
+ const meta = {
166
+ region: request.region,
167
+ rect,
168
+ units: surface.units,
169
+ width: request.width,
170
+ height: request.height,
171
+ scale: round(request.scale),
172
+ mimeType: image.mimeType,
173
+ ...ids ? { ids } : {}
174
+ };
175
+ return {
176
+ content: [
177
+ { type: "image", data: image.data, mimeType: image.mimeType },
178
+ {
179
+ type: "text",
180
+ text: `Captured ${request.region} at ${request.width}\xD7${request.height} px: x ${rect.x}, y ${rect.y}, ${rect.width}\xD7${rect.height} ${surface.units} (${meta.scale} px per unit).`
181
+ }
182
+ ],
183
+ structuredContent: meta
184
+ };
185
+ }
186
+ };
187
+ }
188
+ function createCaptureToolProvider(surface, options = {}) {
189
+ return { id: options.id ?? "capture", namespace: options.namespace, tools: [createCaptureTool(surface, options)] };
190
+ }
191
+
192
+ export {
193
+ unionCaptureRects,
194
+ captureOutputSize,
195
+ toCapturedImageData,
196
+ captureInputSchema,
197
+ resolveCaptureRequest,
198
+ createCaptureTool,
199
+ createCaptureToolProvider
200
+ };
201
+ //# sourceMappingURL=chunk-REOJJIY3.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/tools/capture.ts"],"sourcesContent":["import type { AgentTool, AgentToolProvider, McpToolResult } from './registry.js';\nimport type { JsonSchema } from './schema.js';\n\n/** A rectangle in a surface's own units (canvas units, image pixels, CSS pixels). */\nexport interface CaptureRect {\n\tx: number;\n\ty: number;\n\twidth: number;\n\theight: number;\n}\n\n/**\n * What to capture: what is on screen (`viewport`), everything (`content`), the\n * selection, the bounds of some items by id (the surface's `items.region`,\n * e.g. `nodes`), or an explicit `rect`.\n */\nexport type CaptureRegion = 'viewport' | 'content' | 'selection' | 'rect' | (string & {});\n\nexport type CaptureFormat = 'png' | 'jpeg';\n\n/** What a surface is asked to draw. */\nexport interface CaptureRenderRequest {\n\t/** Region name the agent asked for. */\n\tregion: CaptureRegion;\n\t/** The area to draw, in surface units. */\n\trect: CaptureRect;\n\t/** Output size in pixels. */\n\twidth: number;\n\theight: number;\n\t/** Output pixels per surface unit (`width / rect.width`). */\n\tscale: number;\n\tformat: CaptureFormat;\n\t/** JPEG quality, 0-1. */\n\tquality: number;\n\t/** Draw selection boxes, presence cursors and other transient overlays too. */\n\tincludeOverlays: boolean;\n\tsignal?: AbortSignal;\n}\n\n/** A rendered image: base64 data with its MIME type, or a `data:` URL. */\nexport type CapturedImage = { data: string; mimeType: string } | string;\n\n/**\n * Something an agent can take a screenshot of. Bounds are in the surface's\n * own units; `render` draws a rectangle of it at a given pixel size.\n */\nexport interface CaptureSurface {\n\t/** Name of the coordinate space, used in the tool description and results (e.g. `canvas units`). */\n\tunits: string;\n\t/** What is on screen now. Omit when the surface has no viewport. */\n\tviewport?: () => CaptureRect | null;\n\t/** Bounds of everything, or `null` when the surface is empty. */\n\tcontent: () => CaptureRect | null;\n\t/** Bounds of the selection (`null` when nothing is selected) and the selected ids. */\n\tselection?: () => { rect: CaptureRect | null; ids?: string[] };\n\t/** Capture by item ids, e.g. canvas nodes. */\n\titems?: {\n\t\t/** Region name, e.g. `nodes`. */\n\t\tregion: string;\n\t\t/** Singular noun for messages, e.g. `node`. */\n\t\tnoun: string;\n\t\t/** Where the ids come from, for error messages (e.g. `get_editor_state`). */\n\t\tsource?: string;\n\t\t/** Bounds of the found items and the ids that were not found. */\n\t\tbounds: (ids: string[]) => { rect: CaptureRect | null; missing: string[] };\n\t};\n\t/** Describes the overlays `includeOverlays` adds; omit when the surface has none. */\n\toverlays?: string;\n\t/** Largest output pixels per surface unit (default 2). */\n\tmaxScale?: number;\n\trender: (request: CaptureRenderRequest) => CapturedImage | Promise<CapturedImage>;\n}\n\nexport interface CaptureToolOptions {\n\t/** Tool name (default `capture_view`). */\n\tname?: string;\n\t/** Tool title (default `Capture a screenshot`). */\n\ttitle?: string;\n\t/** What is being captured, for the description (default `the view`). */\n\tsubject?: string;\n\t/** Longest output side when the agent passes no `maxEdge` (default 1024). */\n\tdefaultMaxEdge?: number;\n\t/** Margin around `content`, `selection` and item regions when the agent passes no `padding` (default 16 units). */\n\tdefaultPadding?: number;\n}\n\nexport interface CaptureToolProviderOptions extends CaptureToolOptions {\n\t/** Provider id (unique per registry, default `capture`). */\n\tid?: string;\n\t/** Always prefix tool names with `<namespace>__`. */\n\tnamespace?: string;\n}\n\n/** Bounds of the capture: union of rects, `null` for none. */\nexport function unionCaptureRects(rects: readonly (CaptureRect | null | undefined)[]): CaptureRect | null {\n\tlet minX = Infinity;\n\tlet minY = Infinity;\n\tlet maxX = -Infinity;\n\tlet maxY = -Infinity;\n\tfor (const r of rects) {\n\t\tif (!r) continue;\n\t\tminX = Math.min(minX, r.x);\n\t\tminY = Math.min(minY, r.y);\n\t\tmaxX = Math.max(maxX, r.x + r.width);\n\t\tmaxY = Math.max(maxY, r.y + r.height);\n\t}\n\treturn minX === Infinity ? null : { x: minX, y: minY, width: maxX - minX, height: maxY - minY };\n}\n\n/**\n * Output pixel size for `rect`: the longest side at most `maxEdge`, never more\n * than `maxScale` pixels per unit, at least 1 × 1.\n */\nexport function captureOutputSize(rect: CaptureRect, maxEdge: number, maxScale = 2): { width: number; height: number; scale: number } {\n\tconst longest = Math.max(rect.width, rect.height);\n\tconst scale = Math.min(maxScale, maxEdge / longest);\n\treturn {\n\t\twidth: Math.max(1, Math.round(rect.width * scale)),\n\t\theight: Math.max(1, Math.round(rect.height * scale)),\n\t\tscale\n\t};\n}\n\n/** Splits a `data:` URL or plain base64 into base64 data and MIME type. */\nexport function toCapturedImageData(image: CapturedImage, fallbackMimeType: string): { data: string; mimeType: string } {\n\tif (typeof image !== 'string') return image;\n\tif (!image.startsWith('data:')) return { data: image, mimeType: fallbackMimeType };\n\tconst match = /^data:([^;,]*)(?:;[^,]*)?,(.*)$/s.exec(image);\n\tif (!match?.[1] || !match[2]) throw new Error('The surface returned an empty image; rendering may not be available in this environment.');\n\treturn { data: match[2], mimeType: match[1] };\n}\n\nconst round = (n: number) => Math.round(n * 100) / 100;\nconst roundRect = (r: CaptureRect): CaptureRect => ({ x: round(r.x), y: round(r.y), width: round(r.width), height: round(r.height) });\nconst pad = (r: CaptureRect, p: number): CaptureRect => ({ x: r.x - p, y: r.y - p, width: r.width + 2 * p, height: r.height + 2 * p });\n\nfunction regionsOf(surface: CaptureSurface): string[] {\n\treturn [\n\t\t...(surface.viewport ? ['viewport'] : []),\n\t\t'content',\n\t\t...(surface.selection ? ['selection'] : []),\n\t\t...(surface.items ? [surface.items.region] : []),\n\t\t'rect'\n\t];\n}\n\n/** JSON Schema of the capture tool's arguments for a surface (only the options it supports). */\nexport function captureInputSchema(surface: CaptureSurface, options: CaptureToolOptions = {}): JsonSchema & { type: 'object' } {\n\tconst regions = regionsOf(surface);\n\tconst units = surface.units;\n\tconst properties: Record<string, JsonSchema> = {\n\t\tregion: {\n\t\t\ttype: 'string',\n\t\t\tenum: regions,\n\t\t\tdescription:\n\t\t\t\t`What to capture (default ${regions[0]}): ` +\n\t\t\t\t[\n\t\t\t\t\tsurface.viewport ? '\"viewport\" is what is on screen now' : '',\n\t\t\t\t\t'\"content\" is everything',\n\t\t\t\t\tsurface.selection ? '\"selection\" is the selected items' : '',\n\t\t\t\t\tsurface.items ? `\"${surface.items.region}\" is the ${surface.items.noun}s in \"ids\"` : '',\n\t\t\t\t\t`\"rect\" is the area in \"rect\"`\n\t\t\t\t]\n\t\t\t\t\t.filter(Boolean)\n\t\t\t\t\t.join(', ') +\n\t\t\t\t'.'\n\t\t},\n\t\t...(surface.items\n\t\t\t? {\n\t\t\t\t\tids: {\n\t\t\t\t\t\ttype: 'array',\n\t\t\t\t\t\titems: { type: 'string' },\n\t\t\t\t\t\tminItems: 1,\n\t\t\t\t\t\tdescription: `With region \"${surface.items.region}\": ids of the ${surface.items.noun}s to frame${surface.items.source ? ` (from ${surface.items.source})` : ''}.`\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t: {}),\n\t\trect: {\n\t\t\ttype: 'object',\n\t\t\tproperties: {\n\t\t\t\tx: { type: 'number', description: `Left edge in ${units}.` },\n\t\t\t\ty: { type: 'number', description: `Top edge in ${units}.` },\n\t\t\t\twidth: { type: 'number', exclusiveMinimum: 0, description: `Width in ${units}.` },\n\t\t\t\theight: { type: 'number', exclusiveMinimum: 0, description: `Height in ${units}.` }\n\t\t\t},\n\t\t\trequired: ['x', 'y', 'width', 'height'],\n\t\t\tadditionalProperties: false,\n\t\t\tdescription: `With region \"rect\": the area to capture, in ${units}.`\n\t\t},\n\t\tpadding: {\n\t\t\ttype: 'number',\n\t\t\tminimum: 0,\n\t\t\tdescription: `Margin around content, selection${surface.items ? ` and ${surface.items.region}` : ''} regions, in ${units} (default ${options.defaultPadding ?? 16}).`\n\t\t},\n\t\tmaxEdge: {\n\t\t\ttype: 'integer',\n\t\t\tminimum: 64,\n\t\t\tmaximum: 4096,\n\t\t\tdescription: `Longest side of the image in pixels (default ${options.defaultMaxEdge ?? 1024}). Small regions are not enlarged beyond ${surface.maxScale ?? 2} pixels per unit.`\n\t\t},\n\t\tformat: { type: 'string', enum: ['png', 'jpeg'], description: 'Image format (default png; jpeg is smaller for photos).' },\n\t\tquality: { type: 'number', minimum: 0.1, maximum: 1, description: 'JPEG quality from 0.1 to 1 (default 0.85). Ignored for png.' },\n\t\t...(surface.overlays\n\t\t\t? { includeOverlays: { type: 'boolean', description: `Also draw ${surface.overlays} (default false).` } }\n\t\t\t: {})\n\t};\n\treturn { type: 'object', properties, additionalProperties: false };\n}\n\n/**\n * Works out the rectangle and pixel size for a capture call, checking the\n * arguments against the surface. Throws an error that says how to fix the call.\n */\nexport function resolveCaptureRequest(\n\tsurface: CaptureSurface,\n\targs: Record<string, any>,\n\toptions: CaptureToolOptions = {}\n): Omit<CaptureRenderRequest, 'signal'> & { ids?: string[] } {\n\tconst regions = regionsOf(surface);\n\tconst region: string = args.region ?? regions[0];\n\tif (!regions.includes(region)) throw new Error(`Unknown region \"${region}\". Use one of: ${regions.join(', ')}.`);\n\tif (args.rect !== undefined && region !== 'rect') throw new Error(`\"rect\" only applies with region \"rect\"; drop it or set region to \"rect\".`);\n\tif (args.ids !== undefined && region !== surface.items?.region) {\n\t\tthrow new Error(`\"ids\" only applies with region \"${surface.items?.region ?? 'items'}\"; drop it or change the region.`);\n\t}\n\tconst padding = typeof args.padding === 'number' ? args.padding : (options.defaultPadding ?? 16);\n\tlet rect: CaptureRect | null;\n\tlet ids: string[] | undefined;\n\tif (region === 'viewport') {\n\t\trect = surface.viewport!();\n\t\tif (!rect) throw new Error('The view is not on screen (not mounted or zero size). Use region \"content\" instead.');\n\t} else if (region === 'content') {\n\t\tconst content = surface.content();\n\t\tif (!content) throw new Error('There is nothing to capture: the surface is empty.');\n\t\trect = pad(content, padding);\n\t} else if (region === 'selection') {\n\t\tconst selection = surface.selection!();\n\t\tif (!selection.rect) throw new Error('Nothing is selected. Select something first, or use region \"content\".');\n\t\trect = pad(selection.rect, padding);\n\t\tids = selection.ids;\n\t} else if (region === 'rect') {\n\t\tif (!args.rect) throw new Error(`Region \"rect\" needs \"rect\": {\"x\", \"y\", \"width\", \"height\"} in ${surface.units}.`);\n\t\trect = { x: args.rect.x, y: args.rect.y, width: args.rect.width, height: args.rect.height };\n\t} else {\n\t\tconst items = surface.items!;\n\t\tconst wanted = Array.isArray(args.ids) ? (args.ids as string[]) : [];\n\t\tif (!wanted.length) throw new Error(`Region \"${items.region}\" needs \"ids\": the ${items.noun} ids to frame.`);\n\t\tconst found = items.bounds(wanted);\n\t\tif (found.missing.length) {\n\t\t\tthrow new Error(\n\t\t\t\t`Unknown ${items.noun} id(s): ${found.missing.join(', ')}.${items.source ? ` Read the current ids with ${items.source}.` : ''}`\n\t\t\t);\n\t\t}\n\t\tif (!found.rect) throw new Error(`The ${items.noun}s ${wanted.join(', ')} have no size yet; try again once they are drawn.`);\n\t\trect = pad(found.rect, padding);\n\t\tids = wanted;\n\t}\n\tif (!(rect.width > 0) || !(rect.height > 0)) {\n\t\tthrow new Error(`The ${region} region is empty (${rect.width} × ${rect.height} ${surface.units}); capture a larger area.`);\n\t}\n\tconst maxEdge = typeof args.maxEdge === 'number' ? args.maxEdge : (options.defaultMaxEdge ?? 1024);\n\tconst size = captureOutputSize(rect, maxEdge, surface.maxScale ?? 2);\n\treturn {\n\t\tregion,\n\t\trect,\n\t\t...size,\n\t\tformat: args.format === 'jpeg' ? 'jpeg' : 'png',\n\t\tquality: typeof args.quality === 'number' ? args.quality : 0.85,\n\t\tincludeOverlays: !!surface.overlays && args.includeOverlays === true,\n\t\t...(ids ? { ids } : {})\n\t};\n}\n\n/**\n * The `capture_view` agent tool for a surface: renders a region as an image\n * the model can look at. The result has the image and a text block, and\n * `structuredContent` with the captured `rect` (surface units), the pixel\n * size and `scale`, so a point in the image maps back with\n * `x = rect.x + px / scale`.\n */\nexport function createCaptureTool(surface: CaptureSurface, options: CaptureToolOptions = {}): AgentTool {\n\tconst title = options.title ?? 'Capture a screenshot';\n\tconst subject = options.subject ?? 'the view';\n\treturn {\n\t\tname: options.name ?? 'capture_view',\n\t\ttitle,\n\t\tdescription:\n\t\t\t`Takes a screenshot of ${subject} so you can check how it looks, without changing anything. ` +\n\t\t\t`Captures the ${regionsOf(surface).join(', ')} region and returns the image plus the captured rect (in ${surface.units}) and the pixel scale, ` +\n\t\t\t'so a point (px, py) in the image is at (rect.x + px / scale, rect.y + py / scale).' +\n\t\t\t(surface.overlays ? ` Transient overlays (${surface.overlays}) are left out unless includeOverlays is true.` : ''),\n\t\tinputSchema: captureInputSchema(surface, options),\n\t\tannotations: { title, readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },\n\t\thandler: async (args, context): Promise<McpToolResult> => {\n\t\t\tconst { ids, ...request } = resolveCaptureRequest(surface, args, options);\n\t\t\tconst mimeType = request.format === 'jpeg' ? 'image/jpeg' : 'image/png';\n\t\t\tconst image = toCapturedImageData(await surface.render({ ...request, signal: context.signal }), mimeType);\n\t\t\tconst rect = roundRect(request.rect);\n\t\t\tconst meta = {\n\t\t\t\tregion: request.region,\n\t\t\t\trect,\n\t\t\t\tunits: surface.units,\n\t\t\t\twidth: request.width,\n\t\t\t\theight: request.height,\n\t\t\t\tscale: round(request.scale),\n\t\t\t\tmimeType: image.mimeType,\n\t\t\t\t...(ids ? { ids } : {})\n\t\t\t};\n\t\t\treturn {\n\t\t\t\tcontent: [\n\t\t\t\t\t{ type: 'image', data: image.data, mimeType: image.mimeType },\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'text',\n\t\t\t\t\t\ttext: `Captured ${request.region} at ${request.width}×${request.height} px: x ${rect.x}, y ${rect.y}, ${rect.width}×${rect.height} ${surface.units} (${meta.scale} px per unit).`\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\tstructuredContent: meta\n\t\t\t};\n\t\t}\n\t};\n}\n\n/** A provider with just the `capture_view` tool for a surface. */\nexport function createCaptureToolProvider(surface: CaptureSurface, options: CaptureToolProviderOptions = {}): AgentToolProvider {\n\treturn { id: options.id ?? 'capture', namespace: options.namespace, tools: [createCaptureTool(surface, options)] };\n}\n"],"mappings":";AA8FO,SAAS,kBAAkB,OAAwE;AACzG,MAAI,OAAO;AACX,MAAI,OAAO;AACX,MAAI,OAAO;AACX,MAAI,OAAO;AACX,aAAW,KAAK,OAAO;AACtB,QAAI,CAAC,EAAG;AACR,WAAO,KAAK,IAAI,MAAM,EAAE,CAAC;AACzB,WAAO,KAAK,IAAI,MAAM,EAAE,CAAC;AACzB,WAAO,KAAK,IAAI,MAAM,EAAE,IAAI,EAAE,KAAK;AACnC,WAAO,KAAK,IAAI,MAAM,EAAE,IAAI,EAAE,MAAM;AAAA,EACrC;AACA,SAAO,SAAS,WAAW,OAAO,EAAE,GAAG,MAAM,GAAG,MAAM,OAAO,OAAO,MAAM,QAAQ,OAAO,KAAK;AAC/F;AAMO,SAAS,kBAAkB,MAAmB,SAAiB,WAAW,GAAqD;AACrI,QAAM,UAAU,KAAK,IAAI,KAAK,OAAO,KAAK,MAAM;AAChD,QAAM,QAAQ,KAAK,IAAI,UAAU,UAAU,OAAO;AAClD,SAAO;AAAA,IACN,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,QAAQ,KAAK,CAAC;AAAA,IACjD,QAAQ,KAAK,IAAI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