@pixerate/editor 0.235.0 → 0.236.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.
- package/dist/agent/index.cjs +286 -27
- package/dist/agent/index.d.cts +1 -0
- package/dist/agent/index.d.ts +1 -0
- package/dist/agent/index.js +261 -2
- package/dist/agent/reviewTools.d.cts +16 -0
- package/dist/agent/reviewTools.d.ts +16 -0
- package/dist/{chunk-PI2UYMZY.js → chunk-FSLKBQU7.js} +269 -15
- package/dist/{chunk-3MO3ZS7E.js → chunk-PHYOZK3B.js} +59 -311
- package/dist/{chunk-CZBRY4SW.cjs → chunk-WPWHT4Z6.cjs} +122 -374
- package/dist/{chunk-O7QXVGMP.cjs → chunk-WV5WTOC6.cjs} +295 -41
- package/dist/extensions/index.cjs +6 -6
- package/dist/extensions/index.js +10 -10
- package/dist/index.cjs +11 -11
- package/dist/index.js +10 -10
- package/package.json +1 -1
- package/skills/pixerate-rich-text/SKILL.md +28 -1
- package/skills/pixerate-rich-text-revise/SKILL.md +8 -1
package/dist/agent/index.cjs
CHANGED
|
@@ -126,7 +126,8 @@ var _chunkN2FGYZ4Qcjs = require('../chunk-N2FGYZ4Q.cjs');
|
|
|
126
126
|
|
|
127
127
|
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
|
|
130
|
+
var _chunkWV5WTOC6cjs = require('../chunk-WV5WTOC6.cjs');
|
|
130
131
|
|
|
131
132
|
|
|
132
133
|
var _chunk5DQPDXOMcjs = require('../chunk-5DQPDXOM.cjs');
|
|
@@ -142,7 +143,11 @@ require('../chunk-VU6WQSMB.cjs');
|
|
|
142
143
|
|
|
143
144
|
var _chunkG43MNQ4Ccjs = require('../chunk-G43MNQ4C.cjs');
|
|
144
145
|
require('../chunk-JG5VGCKP.cjs');
|
|
145
|
-
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
var _chunk34RQAGWIcjs = require('../chunk-34RQAGWI.cjs');
|
|
146
151
|
|
|
147
152
|
|
|
148
153
|
|
|
@@ -678,7 +683,7 @@ function describe(chart, includeSpec) {
|
|
|
678
683
|
function sparklines(doc) {
|
|
679
684
|
const found = [];
|
|
680
685
|
doc.descendants((node, pos) => {
|
|
681
|
-
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label:
|
|
686
|
+
if (node.type.name === "sparkline") found.push({ pos, kind: node.attrs.kind, values: node.attrs.values, label: _chunkWV5WTOC6cjs.sparklineLabel.call(void 0, node) });
|
|
682
687
|
});
|
|
683
688
|
return found;
|
|
684
689
|
}
|
|
@@ -689,7 +694,7 @@ function checkPosition(editor, at) {
|
|
|
689
694
|
function createDocumentChartTools(editor) {
|
|
690
695
|
const chartType = () => editor().schema.nodes.chart;
|
|
691
696
|
const findChart = (args) => {
|
|
692
|
-
const charts =
|
|
697
|
+
const charts = _chunkWV5WTOC6cjs.getDocumentCharts.call(void 0, editor().state.doc);
|
|
693
698
|
const list = charts.map((c) => `"${c.id}" at ${c.pos}`).join(", ") || "none; add one with insert_chart";
|
|
694
699
|
if (args.chartId !== void 0) {
|
|
695
700
|
const chart = charts.find((c) => c.id === args.chartId);
|
|
@@ -716,7 +721,7 @@ function createDocumentChartTools(editor) {
|
|
|
716
721
|
annotations: { title: "List charts in the document", ...READ },
|
|
717
722
|
handler: ({ includeSpec = false }) => {
|
|
718
723
|
const doc = editor().state.doc;
|
|
719
|
-
return { charts:
|
|
724
|
+
return { charts: _chunkWV5WTOC6cjs.getDocumentCharts.call(void 0, doc).map((c) => describe(c, includeSpec)), sparklines: editor().schema.nodes.sparkline ? sparklines(doc) : [] };
|
|
720
725
|
}
|
|
721
726
|
};
|
|
722
727
|
const insertChart = {
|
|
@@ -743,7 +748,7 @@ function createDocumentChartTools(editor) {
|
|
|
743
748
|
const node = { type: "chart", attrs: { id, spec, width, ...height !== void 0 ? { height } : {} } };
|
|
744
749
|
const chain = ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
|
|
745
750
|
const ok = (at !== void 0 ? chain.insertContentAt(at, node) : chain.insertContent(node)).run();
|
|
746
|
-
const chart =
|
|
751
|
+
const chart = _chunkWV5WTOC6cjs.getDocumentCharts.call(void 0, ed.state.doc).find((c) => c.id === id);
|
|
747
752
|
if (!ok || !chart) throw new Error(`A chart cannot go at ${_nullishCoalesce(at, () => ( ed.state.selection.from))}; pass a position between blocks or inside a paragraph.`);
|
|
748
753
|
return { id: chart.id, pos: chart.pos, spec: chart.spec, width: chart.node.attrs.width, height: chart.node.attrs.height };
|
|
749
754
|
}
|
|
@@ -790,8 +795,8 @@ function createDocumentChartTools(editor) {
|
|
|
790
795
|
inputSchema: {
|
|
791
796
|
type: "object",
|
|
792
797
|
properties: {
|
|
793
|
-
values: { type: "array", items: _chunkSOSBOS5Tcjs.VALUE, minItems: 1, maxItems:
|
|
794
|
-
kind: { type: "string", enum: [...
|
|
798
|
+
values: { type: "array", items: _chunkSOSBOS5Tcjs.VALUE, minItems: 1, maxItems: _chunkWV5WTOC6cjs.MAX_SPARKLINE_VALUES, description: "Values in order (null for a gap)." },
|
|
799
|
+
kind: { type: "string", enum: [..._chunkWV5WTOC6cjs.SPARKLINE_KINDS], description: "line (default), column, or win-loss (sign only)." },
|
|
795
800
|
at: { type: "integer", minimum: 0, description: "Document position inside a paragraph (default: the selection)." },
|
|
796
801
|
width: { type: "number", minimum: 4, maximum: 1e3, description: "Width in pixels (default 80)." },
|
|
797
802
|
height: { type: "number", minimum: 4, maximum: 200, description: "Height in pixels (default 18)." },
|
|
@@ -810,7 +815,7 @@ function createDocumentChartTools(editor) {
|
|
|
810
815
|
if (bad >= 0) throw new Error(`values[${bad}] ("${String(values[bad])}") is not a number; pass numbers, numeric text or null. Nothing was inserted.`);
|
|
811
816
|
const pos = _nullishCoalesce(at, () => ( ed.state.selection.from));
|
|
812
817
|
if (!ed.state.doc.resolve(pos).parent.inlineContent) throw new Error(`Position ${pos} is between blocks; a sparkline goes inside a paragraph (use a position from get_text {blocks: true}).`);
|
|
813
|
-
const stored =
|
|
818
|
+
const stored = _chunkWV5WTOC6cjs.normalizeSparklineValues.call(void 0, parsed);
|
|
814
819
|
ed.chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true)).insertContentAt(pos, { type: "sparkline", attrs: { values: stored, kind, width, height, color, label } }).run();
|
|
815
820
|
return { pos, kind, values: stored };
|
|
816
821
|
}
|
|
@@ -1148,8 +1153,8 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1148
1153
|
const config = option === false ? null : option === true || option === void 0 ? {} : option;
|
|
1149
1154
|
const caret = {
|
|
1150
1155
|
id: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _43 => _43.id]), () => ( providerId)),
|
|
1151
|
-
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => (
|
|
1152
|
-
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => (
|
|
1156
|
+
name: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _44 => _44.name]), () => ( _chunkWV5WTOC6cjs.DEFAULT_AGENT_CARET_NAME)),
|
|
1157
|
+
color: _nullishCoalesce(_optionalChain([config, 'optionalAccess', _45 => _45.color]), () => ( _chunkWV5WTOC6cjs.DEFAULT_AGENT_CARET_COLOR))
|
|
1153
1158
|
};
|
|
1154
1159
|
const typing = !_optionalChain([config, 'optionalAccess', _46 => _46.typing]) ? null : config.typing === true ? {} : config.typing;
|
|
1155
1160
|
const idleMs = _nullishCoalesce(_optionalChain([config, 'optionalAccess', _47 => _47.idleMs]), () => ( 12e3));
|
|
@@ -1162,19 +1167,19 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1162
1167
|
};
|
|
1163
1168
|
const touch = () => {
|
|
1164
1169
|
clearTimeout(idleTimer);
|
|
1165
|
-
if (idleMs > 0) idleTimer = setTimeout(() => live() &&
|
|
1170
|
+
if (idleMs > 0) idleTimer = setTimeout(() => live() && _chunkWV5WTOC6cjs.clearAgentCaret.call(void 0, live(), caret.id), idleMs);
|
|
1166
1171
|
};
|
|
1167
1172
|
const tint = (ed, ranges) => {
|
|
1168
1173
|
clearTimeout(tintTimer);
|
|
1169
|
-
|
|
1170
|
-
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() &&
|
|
1174
|
+
_chunkWV5WTOC6cjs.markAgentChanges.call(void 0, ed, caret.id, ranges);
|
|
1175
|
+
if (changedMs > 0 && ranges.length) tintTimer = setTimeout(() => live() && _chunkWV5WTOC6cjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1171
1176
|
};
|
|
1172
1177
|
return {
|
|
1173
1178
|
/** Puts the caret at `head`, selecting from `anchor`. */
|
|
1174
1179
|
show(anchor, head = anchor) {
|
|
1175
1180
|
const ed = live();
|
|
1176
1181
|
if (!ed) return;
|
|
1177
|
-
|
|
1182
|
+
_chunkWV5WTOC6cjs.setAgentCaret.call(void 0, ed, { ...caret, from: anchor, to: head });
|
|
1178
1183
|
touch();
|
|
1179
1184
|
},
|
|
1180
1185
|
/** Shows the caret after ranges just changed by a tool, tinting them. */
|
|
@@ -1182,7 +1187,7 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1182
1187
|
const ed = live();
|
|
1183
1188
|
if (!ed || !ranges.length) return;
|
|
1184
1189
|
const last = ranges[ranges.length - 1];
|
|
1185
|
-
|
|
1190
|
+
_chunkWV5WTOC6cjs.setAgentCaret.call(void 0, ed, { ...caret, from: last.to });
|
|
1186
1191
|
tint(ed, ranges);
|
|
1187
1192
|
touch();
|
|
1188
1193
|
},
|
|
@@ -1190,12 +1195,12 @@ function createTextPresence(editor, providerId, option) {
|
|
|
1190
1195
|
async write(ed, from, to, text, signal) {
|
|
1191
1196
|
if (live() && typing) {
|
|
1192
1197
|
clearTimeout(tintTimer);
|
|
1193
|
-
const range2 = await
|
|
1194
|
-
if (changedMs > 0) tintTimer = setTimeout(() => live() &&
|
|
1198
|
+
const range2 = await _chunkWV5WTOC6cjs.typeAgentText.call(void 0, ed, { ...typing, from, to, text, caret, signal });
|
|
1199
|
+
if (changedMs > 0) tintTimer = setTimeout(() => live() && _chunkWV5WTOC6cjs.markAgentChanges.call(void 0, live(), caret.id, []), changedMs);
|
|
1195
1200
|
touch();
|
|
1196
1201
|
return range2;
|
|
1197
1202
|
}
|
|
1198
|
-
const tr = _history.closeHistory.call(void 0,
|
|
1203
|
+
const tr = _history.closeHistory.call(void 0, _chunkWV5WTOC6cjs.replaceWithTextTransaction.call(void 0, ed.state, from, to, text));
|
|
1199
1204
|
const end = tr.mapping.map(to, 1);
|
|
1200
1205
|
const range = { from: Math.min(tr.mapping.map(from, -1), end), to: end };
|
|
1201
1206
|
ed.view.dispatch(tr.scrollIntoView());
|
|
@@ -1224,7 +1229,7 @@ function findMatches(editor, query, args, replacement) {
|
|
|
1224
1229
|
wholeWord: !!args.wholeWord,
|
|
1225
1230
|
...args.regex ? { regex: true } : { literal: true }
|
|
1226
1231
|
};
|
|
1227
|
-
const result =
|
|
1232
|
+
const result = _chunkWV5WTOC6cjs.searchDocument.call(void 0, editor.state.doc, query, options, replacement !== void 0 ? { replacement } : {});
|
|
1228
1233
|
if (result.error) throw new Error(`Invalid search pattern: ${result.error.message}`);
|
|
1229
1234
|
return { matches: result.matches, truncated: result.truncated };
|
|
1230
1235
|
}
|
|
@@ -1386,7 +1391,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1386
1391
|
replacement: String(replace).replace(/\r\n?|\n/g, "\r")
|
|
1387
1392
|
}));
|
|
1388
1393
|
const tr = _history.closeHistory.call(void 0, ed.state.tr);
|
|
1389
|
-
const ends =
|
|
1394
|
+
const ends = _chunkWV5WTOC6cjs.applyReplacements.call(void 0, tr, chosen);
|
|
1390
1395
|
ed.view.dispatch(tr.scrollIntoView());
|
|
1391
1396
|
const ranges = chosen.map((m, i) => ({ from: tr.mapping.map(m.from, -1), to: ends[i] }));
|
|
1392
1397
|
presence.changed(ranges.filter((r) => r.from < r.to));
|
|
@@ -1487,7 +1492,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1487
1492
|
inputSchema: {
|
|
1488
1493
|
type: "object",
|
|
1489
1494
|
properties: {
|
|
1490
|
-
operation: { type: "string", enum:
|
|
1495
|
+
operation: { type: "string", enum: _chunkWV5WTOC6cjs.TABLE_ACTIONS.map((a) => a.action), description: "Table operation." },
|
|
1491
1496
|
at: { type: "integer", minimum: 0, description: "Document position to place the cursor first (e.g. inside a cell)." },
|
|
1492
1497
|
rows: { type: "integer", minimum: 1, maximum: 100, description: "insertTable: rows (default 3)." },
|
|
1493
1498
|
cols: { type: "integer", minimum: 1, maximum: 50, description: "insertTable: columns (default 3)." },
|
|
@@ -1517,10 +1522,10 @@ function createRichTextToolProvider(target, options) {
|
|
|
1517
1522
|
ed.view.dispatch(ed.state.tr.setSelection(_state.TextSelection.near(ed.state.doc.resolve(at))));
|
|
1518
1523
|
}
|
|
1519
1524
|
const action = operation;
|
|
1520
|
-
const state =
|
|
1525
|
+
const state = _chunkWV5WTOC6cjs.getTableActionState.call(void 0, ed, action, params);
|
|
1521
1526
|
if (state !== true) throw new Error(state);
|
|
1522
|
-
|
|
1523
|
-
const table =
|
|
1527
|
+
_chunkWV5WTOC6cjs.runTableAction.call(void 0, ed, action, params);
|
|
1528
|
+
const table = _chunkWV5WTOC6cjs.getTableState.call(void 0, ed);
|
|
1524
1529
|
return {
|
|
1525
1530
|
operation,
|
|
1526
1531
|
table: table.inTable ? { rows: table.rows, columns: table.columns, row: table.row, column: table.column } : null,
|
|
@@ -1539,7 +1544,7 @@ function createRichTextToolProvider(target, options) {
|
|
|
1539
1544
|
if (!ed || ed.isDestroyed) return [];
|
|
1540
1545
|
if (!ed.isEditable) return [getText, findText, ...charts.read()];
|
|
1541
1546
|
const tools = [getText, findText, insertText, replaceText, replaceRange, replaceSelection, setSelection, ...formatting.tools(ed)];
|
|
1542
|
-
return [...tools, ...
|
|
1547
|
+
return [...tools, ..._chunkWV5WTOC6cjs.isTableEnabled.call(void 0, ed) ? [editTable] : [], ...charts.read(), ...charts.write().map(withCaret)];
|
|
1543
1548
|
},
|
|
1544
1549
|
subscribe: (notify) => {
|
|
1545
1550
|
const ed = editor();
|
|
@@ -2177,6 +2182,260 @@ function createCanvasComponentToolProvider(controller, options = { id: "canvas-c
|
|
|
2177
2182
|
};
|
|
2178
2183
|
}
|
|
2179
2184
|
|
|
2185
|
+
// src/agent/reviewTools.ts
|
|
2186
|
+
|
|
2187
|
+
|
|
2188
|
+
var READ3 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
2189
|
+
var WRITE3 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
|
|
2190
|
+
var WRITE_IDEMPOTENT3 = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
2191
|
+
var DESTRUCTIVE2 = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false };
|
|
2192
|
+
var CHANGE_TYPES = ["insertion", "deletion", "format", "block", "move"];
|
|
2193
|
+
var toEditor2 = (target) => "commands" in target ? target : target.editor;
|
|
2194
|
+
function describeThread(thread) {
|
|
2195
|
+
return {
|
|
2196
|
+
id: thread.id,
|
|
2197
|
+
from: _nullishCoalesce(_optionalChain([thread, 'access', _55 => _55.anchor, 'optionalAccess', _56 => _56.from]), () => ( null)),
|
|
2198
|
+
to: _nullishCoalesce(_optionalChain([thread, 'access', _57 => _57.anchor, 'optionalAccess', _58 => _58.to]), () => ( null)),
|
|
2199
|
+
quote: _nullishCoalesce(_nullishCoalesce(_optionalChain([thread, 'access', _59 => _59.anchor, 'optionalAccess', _60 => _60.quote]), () => ( thread.lastQuote)), () => ( "")),
|
|
2200
|
+
author: thread.author.name,
|
|
2201
|
+
body: thread.body,
|
|
2202
|
+
replies: thread.replies.map((r) => ({ id: r.id, author: r.author.name, body: r.body })),
|
|
2203
|
+
resolved: thread.resolved,
|
|
2204
|
+
orphaned: thread.orphaned
|
|
2205
|
+
};
|
|
2206
|
+
}
|
|
2207
|
+
function describeChange(change) {
|
|
2208
|
+
return {
|
|
2209
|
+
id: change.id,
|
|
2210
|
+
type: change.type,
|
|
2211
|
+
author: change.author.name,
|
|
2212
|
+
from: change.from,
|
|
2213
|
+
to: change.to,
|
|
2214
|
+
text: change.text,
|
|
2215
|
+
description: change.description,
|
|
2216
|
+
...change.move ? { movedFrom: change.move.fromText, movedTo: change.move.toText } : {}
|
|
2217
|
+
};
|
|
2218
|
+
}
|
|
2219
|
+
function createReviewToolProvider(target, options) {
|
|
2220
|
+
const editor = () => toEditor2(target);
|
|
2221
|
+
const author = _nullishCoalesce(options.author, () => ( { id: "agent", name: "Agent" }));
|
|
2222
|
+
const store = () => {
|
|
2223
|
+
const s = _chunkWV5WTOC6cjs.getCommentStore.call(void 0, editor());
|
|
2224
|
+
if (!s) throw new Error("This editor has no Comments extension.");
|
|
2225
|
+
return s;
|
|
2226
|
+
};
|
|
2227
|
+
const findThread = (id) => {
|
|
2228
|
+
const thread = store().getThread(id);
|
|
2229
|
+
if (!thread) {
|
|
2230
|
+
const ids = store().getSnapshot().threads.map((t) => `"${t.id}"`).join(", ") || "none; add one with add_comment";
|
|
2231
|
+
throw new Error(`There is no comment "${id}". Comments: ${ids}. Call list_comments for current ids.`);
|
|
2232
|
+
}
|
|
2233
|
+
return thread;
|
|
2234
|
+
};
|
|
2235
|
+
const findChange = (id) => {
|
|
2236
|
+
const changes = _chunk34RQAGWIcjs.getTrackedChanges.call(void 0, editor().state.doc);
|
|
2237
|
+
const change = changes.find((c) => c.id === id);
|
|
2238
|
+
if (!change) {
|
|
2239
|
+
const ids = changes.map((c) => `"${c.id}"`).join(", ") || "none";
|
|
2240
|
+
throw new Error(`There is no tracked change "${id}". Changes: ${ids}. Call list_changes for current ids; accepting or rejecting one removes it.`);
|
|
2241
|
+
}
|
|
2242
|
+
return change;
|
|
2243
|
+
};
|
|
2244
|
+
const commentId = { type: "string", description: "Comment thread id from list_comments." };
|
|
2245
|
+
const changeId = { type: "string", description: "Tracked change id from list_changes." };
|
|
2246
|
+
const body = (what) => ({ type: "string", minLength: 1, description: `${what} (plain text, not empty).` });
|
|
2247
|
+
const listComments = {
|
|
2248
|
+
name: "list_comments",
|
|
2249
|
+
title: "List comments",
|
|
2250
|
+
description: "Lists comment threads in document order: id, the commented range {from, to} and its quoted text, author, body, replies (id, author, body), and whether each is resolved or orphaned (its text was deleted; from / to are null). Pass an id to reply_to_comment, resolve_comment or delete_comment.",
|
|
2251
|
+
inputSchema: {
|
|
2252
|
+
type: "object",
|
|
2253
|
+
properties: { includeResolved: { type: "boolean", description: "Also list resolved threads (default true)." } },
|
|
2254
|
+
additionalProperties: false
|
|
2255
|
+
},
|
|
2256
|
+
annotations: { title: "List comments", ...READ3 },
|
|
2257
|
+
handler: ({ includeResolved = true }) => {
|
|
2258
|
+
const threads = store().getSnapshot().threads.filter((t) => includeResolved || !t.resolved);
|
|
2259
|
+
return { count: threads.length, comments: threads.map(describeThread) };
|
|
2260
|
+
}
|
|
2261
|
+
};
|
|
2262
|
+
const addComment = {
|
|
2263
|
+
name: "add_comment",
|
|
2264
|
+
title: "Add a comment",
|
|
2265
|
+
description: "Comments on the text between from and to (document positions, e.g. from find_text), as one undo step. Returns the new thread (id, range, quoted text, body). The user's selection moves to the commented text.",
|
|
2266
|
+
inputSchema: {
|
|
2267
|
+
type: "object",
|
|
2268
|
+
properties: {
|
|
2269
|
+
from: { type: "integer", minimum: 0, description: "Start of the commented text (document position)." },
|
|
2270
|
+
to: { type: "integer", minimum: 0, description: "End of the commented text (document position, after from)." },
|
|
2271
|
+
body: body("The comment")
|
|
2272
|
+
},
|
|
2273
|
+
required: ["from", "to", "body"],
|
|
2274
|
+
additionalProperties: false
|
|
2275
|
+
},
|
|
2276
|
+
annotations: { title: "Add a comment", ...WRITE3 },
|
|
2277
|
+
handler: ({ from, to, body: text }) => {
|
|
2278
|
+
const ed = editor();
|
|
2279
|
+
const size = ed.state.doc.content.size;
|
|
2280
|
+
if (from >= to) throw new Error(`"from" (${from}) must be before "to" (${to}); a comment needs some text.`);
|
|
2281
|
+
if (to > size) throw new Error(`Position ${to} is outside the document (size ${size}).`);
|
|
2282
|
+
if (!ed.state.doc.textBetween(from, to, " ", " ").trim()) throw new Error(`There is no text between ${from} and ${to}; use find_text to get the positions of a phrase.`);
|
|
2283
|
+
const before = new Set(store().getSnapshot().threads.map((t) => t.id));
|
|
2284
|
+
const ok = ed.chain().command(({ tr }) => {
|
|
2285
|
+
_history.closeHistory.call(void 0, tr);
|
|
2286
|
+
tr.setSelection(_state.TextSelection.create(tr.doc, from, to));
|
|
2287
|
+
return true;
|
|
2288
|
+
}).addComment({ body: text, author }).run();
|
|
2289
|
+
const thread = store().getSnapshot().threads.find((t) => !before.has(t.id));
|
|
2290
|
+
if (!ok || !thread) throw new Error(`A comment cannot go on ${from}..${to}; pick a range of text from find_text.`);
|
|
2291
|
+
return describeThread(thread);
|
|
2292
|
+
}
|
|
2293
|
+
};
|
|
2294
|
+
const replyToComment = {
|
|
2295
|
+
name: "reply_to_comment",
|
|
2296
|
+
title: "Reply to a comment",
|
|
2297
|
+
description: "Adds a reply to a comment thread. Replying to a resolved thread re-opens it. Returns the reply id and the thread.",
|
|
2298
|
+
inputSchema: {
|
|
2299
|
+
type: "object",
|
|
2300
|
+
properties: { commentId, body: body("The reply") },
|
|
2301
|
+
required: ["commentId", "body"],
|
|
2302
|
+
additionalProperties: false
|
|
2303
|
+
},
|
|
2304
|
+
annotations: { title: "Reply to a comment", ...WRITE3 },
|
|
2305
|
+
handler: ({ commentId: id, body: text }) => {
|
|
2306
|
+
findThread(id);
|
|
2307
|
+
const reply = store().addReply(id, { body: text, author });
|
|
2308
|
+
return { replyId: reply.id, comment: describeThread(findThread(id)) };
|
|
2309
|
+
}
|
|
2310
|
+
};
|
|
2311
|
+
const resolveComment = {
|
|
2312
|
+
name: "resolve_comment",
|
|
2313
|
+
title: "Resolve a comment",
|
|
2314
|
+
description: "Marks a comment thread resolved (or re-opens it with resolved: false). The thread and its text stay; resolved threads are hidden from the highlights. Returns the thread.",
|
|
2315
|
+
inputSchema: {
|
|
2316
|
+
type: "object",
|
|
2317
|
+
properties: { commentId, resolved: { type: "boolean", description: "true resolves, false re-opens (default true)." } },
|
|
2318
|
+
required: ["commentId"],
|
|
2319
|
+
additionalProperties: false
|
|
2320
|
+
},
|
|
2321
|
+
annotations: { title: "Resolve a comment", ...WRITE_IDEMPOTENT3 },
|
|
2322
|
+
handler: ({ commentId: id, resolved = true }) => {
|
|
2323
|
+
findThread(id);
|
|
2324
|
+
store().resolveThread(id, resolved, author);
|
|
2325
|
+
return describeThread(findThread(id));
|
|
2326
|
+
}
|
|
2327
|
+
};
|
|
2328
|
+
const deleteComment = {
|
|
2329
|
+
name: "delete_comment",
|
|
2330
|
+
title: "Delete a comment",
|
|
2331
|
+
description: "Deletes a comment thread and its replies, and removes its highlight from the text (one undo step). Prefer resolve_comment when the point was addressed. Returns the deleted id and how many comments remain.",
|
|
2332
|
+
inputSchema: { type: "object", properties: { commentId }, required: ["commentId"], additionalProperties: false },
|
|
2333
|
+
annotations: { title: "Delete a comment", ...DESTRUCTIVE2 },
|
|
2334
|
+
handler: ({ commentId: id }) => {
|
|
2335
|
+
findThread(id);
|
|
2336
|
+
editor().chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true)).deleteComment(id).run();
|
|
2337
|
+
return { deleted: id, remaining: store().getSnapshot().threads.length };
|
|
2338
|
+
}
|
|
2339
|
+
};
|
|
2340
|
+
const listChanges = {
|
|
2341
|
+
name: "list_changes",
|
|
2342
|
+
title: "List tracked changes",
|
|
2343
|
+
description: "Lists tracked changes (suggestions) in document order: id, type (insertion, deletion, format, block, move), author, range {from, to}, the changed text and a plain-language description; moves add movedFrom / movedTo. Also says whether tracking is on. Pass an id to accept_change or reject_change.",
|
|
2344
|
+
inputSchema: {
|
|
2345
|
+
type: "object",
|
|
2346
|
+
properties: { type: { type: "string", enum: CHANGE_TYPES, description: "Only list changes of this type (default: all)." } },
|
|
2347
|
+
additionalProperties: false
|
|
2348
|
+
},
|
|
2349
|
+
annotations: { title: "List tracked changes", ...READ3 },
|
|
2350
|
+
handler: ({ type }) => {
|
|
2351
|
+
const changes = _chunk34RQAGWIcjs.getTrackedChanges.call(void 0, editor().state.doc).filter((c) => !type || c.type === type);
|
|
2352
|
+
return { trackingEnabled: _chunk34RQAGWIcjs.isTrackChangesEnabled.call(void 0, editor()), count: changes.length, changes: changes.map(describeChange) };
|
|
2353
|
+
}
|
|
2354
|
+
};
|
|
2355
|
+
const decide = (decision) => {
|
|
2356
|
+
const verb = decision === "accept" ? "Accept" : "Reject";
|
|
2357
|
+
return {
|
|
2358
|
+
name: `${decision}_change`,
|
|
2359
|
+
title: `${verb} a tracked change`,
|
|
2360
|
+
description: decision === "accept" ? "Accepts one tracked change as one undo step: inserted text stays, deleted text goes, new formatting or block type is kept, a move keeps its destination. Returns the change and how many remain." : "Rejects one tracked change as one undo step: inserted text goes, deleted text comes back, formatting or block type reverts, a move goes back to its source. Returns the change and how many remain.",
|
|
2361
|
+
inputSchema: { type: "object", properties: { changeId }, required: ["changeId"], additionalProperties: false },
|
|
2362
|
+
annotations: { title: `${verb} a tracked change`, ...WRITE3 },
|
|
2363
|
+
handler: ({ changeId: id }) => {
|
|
2364
|
+
const change = findChange(id);
|
|
2365
|
+
const chain = editor().chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
|
|
2366
|
+
const ok = (decision === "accept" ? chain.acceptChange(id) : chain.rejectChange(id)).run();
|
|
2367
|
+
if (!ok) throw new Error(`Tracked change "${id}" could not be ${decision}ed.`);
|
|
2368
|
+
return { [`${decision}ed`]: describeChange(change), remaining: _chunk34RQAGWIcjs.getTrackedChanges.call(void 0, editor().state.doc).length };
|
|
2369
|
+
}
|
|
2370
|
+
};
|
|
2371
|
+
};
|
|
2372
|
+
const decideAll = (decision) => {
|
|
2373
|
+
const verb = decision === "accept" ? "Accept" : "Reject";
|
|
2374
|
+
return {
|
|
2375
|
+
name: `${decision}_all_changes`,
|
|
2376
|
+
title: `${verb} all tracked changes`,
|
|
2377
|
+
description: `${verb}s every tracked change in the document as one undo step. Review them with list_changes first; prefer ${decision}_change for one at a time. Returns how many were ${decision}ed.`,
|
|
2378
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
2379
|
+
annotations: { title: `${verb} all tracked changes`, ...DESTRUCTIVE2 },
|
|
2380
|
+
handler: () => {
|
|
2381
|
+
const count = _chunk34RQAGWIcjs.getTrackedChanges.call(void 0, editor().state.doc).length;
|
|
2382
|
+
if (count === 0) return { [`${decision}ed`]: 0 };
|
|
2383
|
+
const chain = editor().chain().command(({ tr }) => (_history.closeHistory.call(void 0, tr), true));
|
|
2384
|
+
(decision === "accept" ? chain.acceptAllChanges() : chain.rejectAllChanges()).run();
|
|
2385
|
+
return { [`${decision}ed`]: count, remaining: _chunk34RQAGWIcjs.getTrackedChanges.call(void 0, editor().state.doc).length };
|
|
2386
|
+
}
|
|
2387
|
+
};
|
|
2388
|
+
};
|
|
2389
|
+
const setTrackChanges = {
|
|
2390
|
+
name: "set_track_changes",
|
|
2391
|
+
title: "Turn tracking on or off",
|
|
2392
|
+
description: "Turns change tracking (suggestion mode) on or off. While on, every edit, the agent's included, is recorded as a tracked change the user can accept or reject. Returns whether tracking is now on.",
|
|
2393
|
+
inputSchema: {
|
|
2394
|
+
type: "object",
|
|
2395
|
+
properties: { enabled: { type: "boolean", description: "true records edits as tracked changes; false edits directly." } },
|
|
2396
|
+
required: ["enabled"],
|
|
2397
|
+
additionalProperties: false
|
|
2398
|
+
},
|
|
2399
|
+
annotations: { title: "Turn tracking on or off", ...WRITE_IDEMPOTENT3 },
|
|
2400
|
+
handler: ({ enabled }) => {
|
|
2401
|
+
editor().commands.setTrackChanges(enabled);
|
|
2402
|
+
return { trackingEnabled: _chunk34RQAGWIcjs.isTrackChangesEnabled.call(void 0, editor()) };
|
|
2403
|
+
}
|
|
2404
|
+
};
|
|
2405
|
+
const acceptChange = decide("accept");
|
|
2406
|
+
const rejectChange = decide("reject");
|
|
2407
|
+
const acceptAll = decideAll("accept");
|
|
2408
|
+
const rejectAll = decideAll("reject");
|
|
2409
|
+
return {
|
|
2410
|
+
id: options.id,
|
|
2411
|
+
namespace: options.namespace,
|
|
2412
|
+
title: "Review",
|
|
2413
|
+
description: "Comments and tracked changes (suggestions) in a rich text document: list, add, reply to and resolve comments; list, accept and reject changes.",
|
|
2414
|
+
skill: "pixerate-rich-text",
|
|
2415
|
+
tools: () => {
|
|
2416
|
+
const ed = editor();
|
|
2417
|
+
if (!ed || ed.isDestroyed) return [];
|
|
2418
|
+
const comments = !!_chunkWV5WTOC6cjs.getCommentStore.call(void 0, ed);
|
|
2419
|
+
const changes = !!_chunk34RQAGWIcjs.getTrackChangesStore.call(void 0, ed);
|
|
2420
|
+
const tools = [...comments ? [listComments] : [], ...changes ? [listChanges] : []];
|
|
2421
|
+
if (!ed.isEditable) return tools;
|
|
2422
|
+
if (comments) tools.push(addComment, replyToComment, resolveComment, deleteComment);
|
|
2423
|
+
if (changes) tools.push(acceptChange, rejectChange, acceptAll, rejectAll, setTrackChanges);
|
|
2424
|
+
return tools;
|
|
2425
|
+
},
|
|
2426
|
+
subscribe: (notify) => {
|
|
2427
|
+
const ed = editor();
|
|
2428
|
+
ed.on("update", notify);
|
|
2429
|
+
ed.on("destroy", notify);
|
|
2430
|
+
return () => {
|
|
2431
|
+
ed.off("update", notify);
|
|
2432
|
+
ed.off("destroy", notify);
|
|
2433
|
+
};
|
|
2434
|
+
}
|
|
2435
|
+
};
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
|
|
2180
2439
|
|
|
2181
2440
|
|
|
2182
2441
|
|
|
@@ -2281,4 +2540,4 @@ function createCanvasComponentToolProvider(controller, options = { id: "canvas-c
|
|
|
2281
2540
|
|
|
2282
2541
|
|
|
2283
2542
|
|
|
2284
|
-
exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.EDITOR_CANVAS_TOOLS = _chunkSVFEVKLFcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkSVFEVKLFcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkSVFEVKLFcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkSVFEVKLFcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkSVFEVKLFcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkRTPBM46Fcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkRTPBM46Fcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkSVFEVKLFcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkSVFEVKLFcjs.MCP_TOOL_VIEW_EDITOR; exports.PRESENCE_COLORS = _chunkK7ENM55Pcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkK7ENM55Pcjs.PerformanceQueue; exports.PresenceStore = _chunkK7ENM55Pcjs.PresenceStore; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkRTPBM46Fcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkRTPBM46Fcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkRTPBM46Fcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkRTPBM46Fcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkRTPBM46Fcjs.ToolRegistry; exports.ToolRegistryError = _chunkRTPBM46Fcjs.ToolRegistryError; exports.ToolRegistryView = _chunkRTPBM46Fcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkRTPBM46Fcjs.baseToolName; exports.callEvalTool = _chunk4I76OCVDcjs.callEvalTool; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkRTPBM46Fcjs.connectToolBridge; exports.createAgentPlayback = _chunk3SLBXKAWcjs.createAgentPlayback; exports.createCanvasComponentToolProvider = createCanvasComponentToolProvider; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createDocumentChartTools = createDocumentChartTools; exports.createEditorMcpToolProvider = createEditorMcpToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkK7ENM55Pcjs.createInstantPresenceClock; exports.createMcpServer = _chunkRTPBM46Fcjs.createMcpServer; exports.createPlaybackToolProvider = _chunk3SLBXKAWcjs.createPlaybackToolProvider; exports.createRichTextToolProvider = createRichTextToolProvider; exports.createSpreadsheetToolProvider = createSpreadsheetToolProvider; exports.createStyleResolver = _chunk4I76OCVDcjs.createStyleResolver; exports.createStyleToolProvider = _chunk4I76OCVDcjs.createStyleToolProvider; exports.createToolRegistry = _chunkRTPBM46Fcjs.createToolRegistry; exports.derivePlaybackSteps = _chunk3SLBXKAWcjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkRTPBM46Fcjs.errorResult; exports.failedEvalChecks = _chunk4I76OCVDcjs.failedEvalChecks; exports.imageEvalFixturePixels = _chunk4I76OCVDcjs.imageEvalFixturePixels; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkillEvals = _chunk4I76OCVDcjs.listSkillEvals; exports.listSkills = _chunkRTPBM46Fcjs.listSkills; exports.locatePlaybackChrome = _chunk3SLBXKAWcjs.locatePlaybackChrome; exports.matchesEvalExpectation = _chunk4I76OCVDcjs.matchesEvalExpectation; exports.memoryStyleStore = _chunk4I76OCVDcjs.memoryStyleStore; exports.normalizeSide = normalizeSide; exports.parseSkillFrontmatter = _chunkRTPBM46Fcjs.parseSkillFrontmatter; exports.parseStyleDomains = _chunk4I76OCVDcjs.parseStyleDomains; exports.planAgentCommand = planAgentCommand; exports.planCanvasPlaybackSteps = planCanvasPlaybackSteps; exports.planCanvasToolPlayback = planCanvasToolPlayback; exports.planToolCall = planToolCall; exports.playbackRectFromClient = _chunk3SLBXKAWcjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunk3SLBXKAWcjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunk3SLBXKAWcjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkRTPBM46Fcjs.readSkillFile; exports.readingTime = _chunk3SLBXKAWcjs.readingTime; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.renderStyle = _chunk4I76OCVDcjs.renderStyle; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.runStyleChecks = _chunk4I76OCVDcjs.runStyleChecks; exports.runToolScript = _chunk4I76OCVDcjs.runToolScript; exports.searchTokens = _chunkRTPBM46Fcjs.searchTokens; exports.searchTools = _chunkRTPBM46Fcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkRTPBM46Fcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkRTPBM46Fcjs.toToolResult; exports.toolCallToAgentCommand = toolCallToAgentCommand; exports.toolResultError = _chunk4I76OCVDcjs.toolResultError; exports.toolResultValue = _chunk4I76OCVDcjs.toolResultValue; exports.toolsetInstructions = _chunkRTPBM46Fcjs.toolsetInstructions; exports.toolsetName = _chunkRTPBM46Fcjs.toolsetName; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunk3SLBXKAWcjs.unionRects; exports.unknownToolMessage = _chunkRTPBM46Fcjs.unknownToolMessage; exports.validateAgentCommand = validateAgentCommand; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
|
|
2543
|
+
exports.AgentPlayback = _chunk3SLBXKAWcjs.AgentPlayback; exports.CAPTURE_EXCLUDE_SELECTOR = _chunkSVFEVKLFcjs.CAPTURE_EXCLUDE_SELECTOR; exports.CAPTURE_OVERLAY_SELECTORS = _chunkSVFEVKLFcjs.CAPTURE_OVERLAY_SELECTORS; exports.EDITOR_CANVAS_TOOLS = _chunkSVFEVKLFcjs.EDITOR_CANVAS_TOOLS; exports.EDITOR_MCP_TOOLS = _chunkSVFEVKLFcjs.EDITOR_MCP_TOOLS; exports.EDITOR_PROMPT_TOOLS = _chunkSVFEVKLFcjs.EDITOR_PROMPT_TOOLS; exports.EDIT_OPERATION_REQUIRED_ARGUMENTS = _chunkSVFEVKLFcjs.EDIT_OPERATION_REQUIRED_ARGUMENTS; exports.EXPORT_EXCLUDED_SELECTORS = _chunkSVFEVKLFcjs.EXPORT_EXCLUDED_SELECTORS; exports.JSON_RPC_ERRORS = _chunkRTPBM46Fcjs.JSON_RPC_ERRORS; exports.MCP_PROTOCOL_VERSIONS = _chunkRTPBM46Fcjs.MCP_PROTOCOL_VERSIONS; exports.MCP_TOOL_CANVAS_ADD_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_ADD_NODE; exports.MCP_TOOL_CANVAS_CONNECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_CONNECT; exports.MCP_TOOL_CANVAS_HIGHLIGHT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_HIGHLIGHT; exports.MCP_TOOL_CANVAS_LAYOUT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_LAYOUT; exports.MCP_TOOL_CANVAS_REMOVE_NODES = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_REMOVE_NODES; exports.MCP_TOOL_CANVAS_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_SELECT; exports.MCP_TOOL_CANVAS_UPDATE_NODE = _chunkSVFEVKLFcjs.MCP_TOOL_CANVAS_UPDATE_NODE; exports.MCP_TOOL_EDIT_CANVAS = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_CANVAS; exports.MCP_TOOL_EDIT_PROMPT = _chunkSVFEVKLFcjs.MCP_TOOL_EDIT_PROMPT; exports.MCP_TOOL_GET_EDITOR_STATE = _chunkSVFEVKLFcjs.MCP_TOOL_GET_EDITOR_STATE; exports.MCP_TOOL_PROMPT_INSERT_TEXT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_INSERT_TEXT; exports.MCP_TOOL_PROMPT_REPLACE_RANGE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_REPLACE_RANGE; exports.MCP_TOOL_PROMPT_SELECT = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SELECT; exports.MCP_TOOL_PROMPT_SET_VARIABLE = _chunkSVFEVKLFcjs.MCP_TOOL_PROMPT_SET_VARIABLE; exports.MCP_TOOL_VIEW_EDITOR = _chunkSVFEVKLFcjs.MCP_TOOL_VIEW_EDITOR; exports.PRESENCE_COLORS = _chunkK7ENM55Pcjs.PRESENCE_COLORS; exports.PerformanceQueue = _chunkK7ENM55Pcjs.PerformanceQueue; exports.PresenceStore = _chunkK7ENM55Pcjs.PresenceStore; exports.TOOL_BRIDGE_DEFAULT_PORT = _chunkRTPBM46Fcjs.TOOL_BRIDGE_DEFAULT_PORT; exports.TOOL_BRIDGE_PROTOCOL = _chunkRTPBM46Fcjs.TOOL_BRIDGE_PROTOCOL; exports.TOOL_DISCOVERY_TOOLS = _chunkRTPBM46Fcjs.TOOL_DISCOVERY_TOOLS; exports.TOOL_NAMESPACE_SEPARATOR = _chunkRTPBM46Fcjs.TOOL_NAMESPACE_SEPARATOR; exports.ToolRegistry = _chunkRTPBM46Fcjs.ToolRegistry; exports.ToolRegistryError = _chunkRTPBM46Fcjs.ToolRegistryError; exports.ToolRegistryView = _chunkRTPBM46Fcjs.ToolRegistryView; exports.UNSAFE_JSON_KEYS = _chunk2BSBFBOAcjs.UNSAFE_JSON_KEYS; exports.baseToolName = _chunkRTPBM46Fcjs.baseToolName; exports.callEvalTool = _chunk4I76OCVDcjs.callEvalTool; exports.captureInputSchema = _chunkN2FGYZ4Qcjs.captureInputSchema; exports.captureOutputSize = _chunkN2FGYZ4Qcjs.captureOutputSize; exports.cloneElementWithStyles = _chunkSVFEVKLFcjs.cloneElementWithStyles; exports.connectToolBridge = _chunkRTPBM46Fcjs.connectToolBridge; exports.createAgentPlayback = _chunk3SLBXKAWcjs.createAgentPlayback; exports.createCanvasComponentToolProvider = createCanvasComponentToolProvider; exports.createCaptureTool = _chunkN2FGYZ4Qcjs.createCaptureTool; exports.createCaptureToolProvider = _chunkN2FGYZ4Qcjs.createCaptureToolProvider; exports.createDocumentChartTools = createDocumentChartTools; exports.createEditorMcpToolProvider = createEditorMcpToolProvider; exports.createElementCaptureSurface = _chunkSVFEVKLFcjs.createElementCaptureSurface; exports.createInstantPresenceClock = _chunkK7ENM55Pcjs.createInstantPresenceClock; exports.createMcpServer = _chunkRTPBM46Fcjs.createMcpServer; exports.createPlaybackToolProvider = _chunk3SLBXKAWcjs.createPlaybackToolProvider; exports.createReviewToolProvider = createReviewToolProvider; exports.createRichTextToolProvider = createRichTextToolProvider; exports.createSpreadsheetToolProvider = createSpreadsheetToolProvider; exports.createStyleResolver = _chunk4I76OCVDcjs.createStyleResolver; exports.createStyleToolProvider = _chunk4I76OCVDcjs.createStyleToolProvider; exports.createToolRegistry = _chunkRTPBM46Fcjs.createToolRegistry; exports.derivePlaybackSteps = _chunk3SLBXKAWcjs.derivePlaybackSteps; exports.elementToSvg = _chunkSVFEVKLFcjs.elementToSvg; exports.errorResult = _chunkRTPBM46Fcjs.errorResult; exports.failedEvalChecks = _chunk4I76OCVDcjs.failedEvalChecks; exports.imageEvalFixturePixels = _chunk4I76OCVDcjs.imageEvalFixturePixels; exports.isUnsafeJsonKey = _chunk2BSBFBOAcjs.isUnsafeJsonKey; exports.listSkillEvals = _chunk4I76OCVDcjs.listSkillEvals; exports.listSkills = _chunkRTPBM46Fcjs.listSkills; exports.locatePlaybackChrome = _chunk3SLBXKAWcjs.locatePlaybackChrome; exports.matchesEvalExpectation = _chunk4I76OCVDcjs.matchesEvalExpectation; exports.memoryStyleStore = _chunk4I76OCVDcjs.memoryStyleStore; exports.normalizeSide = normalizeSide; exports.parseSkillFrontmatter = _chunkRTPBM46Fcjs.parseSkillFrontmatter; exports.parseStyleDomains = _chunk4I76OCVDcjs.parseStyleDomains; exports.planAgentCommand = planAgentCommand; exports.planCanvasPlaybackSteps = planCanvasPlaybackSteps; exports.planCanvasToolPlayback = planCanvasToolPlayback; exports.planToolCall = planToolCall; exports.playbackRectFromClient = _chunk3SLBXKAWcjs.playbackRectFromClient; exports.playbackRefsFromArgs = _chunk3SLBXKAWcjs.playbackRefsFromArgs; exports.playbackRefsFromResult = _chunk3SLBXKAWcjs.playbackRefsFromResult; exports.rasterizeElement = _chunkSVFEVKLFcjs.rasterizeElement; exports.readSkillFile = _chunkRTPBM46Fcjs.readSkillFile; exports.readingTime = _chunk3SLBXKAWcjs.readingTime; exports.realPresenceClock = _chunkK7ENM55Pcjs.realPresenceClock; exports.renderStyle = _chunk4I76OCVDcjs.renderStyle; exports.resolveCaptureRequest = _chunkN2FGYZ4Qcjs.resolveCaptureRequest; exports.runStyleChecks = _chunk4I76OCVDcjs.runStyleChecks; exports.runToolScript = _chunk4I76OCVDcjs.runToolScript; exports.searchTokens = _chunkRTPBM46Fcjs.searchTokens; exports.searchTools = _chunkRTPBM46Fcjs.searchTools; exports.stripPrototypeKeys = _chunk2BSBFBOAcjs.stripPrototypeKeys; exports.summarize = _chunkRTPBM46Fcjs.summarize; exports.toCapturedImageData = _chunkN2FGYZ4Qcjs.toCapturedImageData; exports.toToolResult = _chunkRTPBM46Fcjs.toToolResult; exports.toolCallToAgentCommand = toolCallToAgentCommand; exports.toolResultError = _chunk4I76OCVDcjs.toolResultError; exports.toolResultValue = _chunk4I76OCVDcjs.toolResultValue; exports.toolsetInstructions = _chunkRTPBM46Fcjs.toolsetInstructions; exports.toolsetName = _chunkRTPBM46Fcjs.toolsetName; exports.trackPresenceDrag = _chunkK7ENM55Pcjs.trackPresenceDrag; exports.tweenPresenceCursor = _chunkK7ENM55Pcjs.tweenPresenceCursor; exports.unionCaptureRects = _chunkN2FGYZ4Qcjs.unionCaptureRects; exports.unionRects = _chunk3SLBXKAWcjs.unionRects; exports.unknownToolMessage = _chunkRTPBM46Fcjs.unknownToolMessage; exports.validateAgentCommand = validateAgentCommand; exports.validateJsonSchema = _chunkWOFXZ3XUcjs.validateJsonSchema;
|
package/dist/agent/index.d.cts
CHANGED
package/dist/agent/index.d.ts
CHANGED