mandala-computer-mcp 0.6.0 → 0.7.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 (62) hide show
  1. package/README.md +165 -16
  2. package/dist/api.d.ts +26 -1
  3. package/dist/api.d.ts.map +1 -1
  4. package/dist/api.js +23 -0
  5. package/dist/api.js.map +1 -1
  6. package/dist/errors.d.ts +90 -3
  7. package/dist/errors.d.ts.map +1 -1
  8. package/dist/errors.js +211 -3
  9. package/dist/errors.js.map +1 -1
  10. package/dist/format.d.ts +65 -0
  11. package/dist/format.d.ts.map +1 -1
  12. package/dist/format.js +71 -0
  13. package/dist/format.js.map +1 -1
  14. package/dist/http.d.ts.map +1 -1
  15. package/dist/http.js +15 -5
  16. package/dist/http.js.map +1 -1
  17. package/dist/paths.d.ts +64 -1
  18. package/dist/paths.d.ts.map +1 -1
  19. package/dist/paths.js +74 -5
  20. package/dist/paths.js.map +1 -1
  21. package/dist/server.d.ts +1 -1
  22. package/dist/server.d.ts.map +1 -1
  23. package/dist/server.js +3 -1
  24. package/dist/server.js.map +1 -1
  25. package/dist/tool-filters.d.ts +4 -4
  26. package/dist/tool-filters.d.ts.map +1 -1
  27. package/dist/tool-filters.js +13 -1
  28. package/dist/tool-filters.js.map +1 -1
  29. package/dist/tools/account.d.ts +14 -0
  30. package/dist/tools/account.d.ts.map +1 -1
  31. package/dist/tools/account.js +118 -0
  32. package/dist/tools/account.js.map +1 -1
  33. package/dist/tools/agent.d.ts.map +1 -1
  34. package/dist/tools/agent.js +7 -2
  35. package/dist/tools/agent.js.map +1 -1
  36. package/dist/tools/computers.d.ts.map +1 -1
  37. package/dist/tools/computers.js +267 -48
  38. package/dist/tools/computers.js.map +1 -1
  39. package/dist/tools/guest.d.ts.map +1 -1
  40. package/dist/tools/guest.js +6 -2
  41. package/dist/tools/guest.js.map +1 -1
  42. package/dist/tools/input.d.ts +9 -0
  43. package/dist/tools/input.d.ts.map +1 -1
  44. package/dist/tools/input.js +247 -16
  45. package/dist/tools/input.js.map +1 -1
  46. package/dist/tools/operations.d.ts +44 -0
  47. package/dist/tools/operations.d.ts.map +1 -0
  48. package/dist/tools/operations.js +232 -0
  49. package/dist/tools/operations.js.map +1 -0
  50. package/dist/tools/secrets.d.ts +10 -1
  51. package/dist/tools/secrets.d.ts.map +1 -1
  52. package/dist/tools/secrets.js +59 -12
  53. package/dist/tools/secrets.js.map +1 -1
  54. package/dist/tools/snapshots.d.ts.map +1 -1
  55. package/dist/tools/snapshots.js +35 -12
  56. package/dist/tools/snapshots.js.map +1 -1
  57. package/dist/tools/ssh.d.ts.map +1 -1
  58. package/dist/tools/ssh.js +19 -2
  59. package/dist/tools/ssh.js.map +1 -1
  60. package/dist/tools/templates.js +1 -1
  61. package/dist/tools/templates.js.map +1 -1
  62. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
- import { ConflictError } from '../errors.js';
3
- import { failed, guarded, INLINE_IMAGE_TYPES, image, isInlineImage, json, MAX_INLINE_IMAGE_BYTES, refused, said, } from '../format.js';
2
+ import { ConflictError, reasonKind } from '../errors.js';
3
+ import { apiErrorMessage, failed, guarded, INLINE_IMAGE_TYPES, image, isInlineImage, json, MAX_INLINE_IMAGE_BYTES, refused, said, } from '../format.js';
4
4
  import * as P from '../paths.js';
5
5
  const idArg = {
6
6
  computer_id: z
@@ -55,19 +55,160 @@ const point = {
55
55
  * look is a 400 rather than a picture. So the retry is named as the first thing
56
56
  * to try, and the caller is told what it is not.
57
57
  */
58
- const cachedFrameOffered = (err) => {
58
+ const cachedFrameOffered = (err, shaped = []) => {
59
59
  const sentence = failed(err)
60
60
  .content.map((c) => ('text' in c ? c.text : ''))
61
61
  .join('\n');
62
+ // A shaped request has one more condition on the fallback: the saved frame
63
+ // of a suspended computer is a single JPEG that cannot be cropped, scaled,
64
+ // re-encoded as PNG or given a quality, and the platform refuses those on
65
+ // it too. Said here, or fresh: false is advice that meets the same wall.
66
+ //
67
+ // But only where the refusal can BE a suspended computer's. A word that
68
+ // clears by itself (contention, starting) usually comes from a computer that
69
+ // is up, and on one of those fresh: false is served from the frame cache and
70
+ // shaped like any other capture — so telling that caller to drop a crop
71
+ // costs them the crop for nothing. Usually, not always: a suspended
72
+ // computer's saved desktop is read under its lifecycle lock, and a busy lock
73
+ // is contention too ("this computer's saved desktop is being updated"). So a
74
+ // clearing word keeps the sentence where the platform's own sentence speaks
75
+ // of the saved desktop, or of a suspend. The same busy lock is also a resume
76
+ // under way, which ends in a computer that can shape a frame, and the two
77
+ // read alike; hence "while it stays suspended", and the retry named first.
78
+ //
79
+ // "suspend" is there in case the wording moves, not because a screenshot
80
+ // meets it today: a computer part way INTO a suspend has no saved desktop
81
+ // yet, so its screenshot takes the running path and is refused as a busy
82
+ // screen ("this computer's screen is busy with another operation"), which
83
+ // names neither. That one gets no caveat, on purpose: the same sentence is
84
+ // every running computer's busy screen, where the caveat would cost the crop
85
+ // for nothing. It fails safe, as does any rewording: the retry named first
86
+ // reaches the suspended computer and is refused with the caveat, and a
87
+ // shaped fresh: false is refused with shapeRefused's full advice.
88
+ //
89
+ // And conditional even then: `unavailable` is also a computer that is
90
+ // merely stopped, and an unclassified 409 could be anything, so the
91
+ // platform's sentence is what says which it is.
92
+ const suspendedWords = /suspend|saved desktop/i.test(apiErrorMessage(err));
93
+ const without = shaped.length && (reasonKind(err.reason) !== 'clears' || suspendedWords)
94
+ ? ` If the sentence above says the computer is suspended or being suspended, or speaks of its saved ` +
95
+ `desktop, its saved frame cannot be shaped while it stays suspended, so fresh: false has to go ` +
96
+ `without ${shaped.join(', ')} as well, or it is refused for that instead.`
97
+ : '';
62
98
  return refused(`${sentence}\n\nThat was a request for a NEW capture. Read the sentence above before anything else: where ` +
63
99
  `it says this is worth another attempt, sending the same call again in a moment is the first thing to ` +
64
100
  `try — it is not a promise that the capture then works, since a computer that turns out not to be ` +
65
101
  `running needs starting rather than another look. The other option is fresh: false, which asks for the ` +
66
102
  `last frame the platform saved rather than a new one and so needs nothing captured; it is refused in ` +
67
- `the same way when there is no saved frame to serve, so it is a fallback and not a guarantee either. ` +
103
+ `the same way when there is no saved frame to serve, so it is a fallback and not a guarantee either.` +
104
+ `${without} ` +
68
105
  `Whatever comes back is the screen as it was when that frame was taken and not the screen now: it ` +
69
106
  `cannot show the result of anything sent since.`);
70
107
  };
108
+ const unshapeable = (s) => [
109
+ s.region && 'region',
110
+ s.scale !== undefined && 'scale',
111
+ s.format === 'png' && 'format: png',
112
+ s.quality !== undefined && 'quality',
113
+ ].filter((v) => typeof v === 'string');
114
+ /**
115
+ * A refused request for the saved picture that also asked for a shape.
116
+ *
117
+ * Reached on a 409 `unavailable` to a call with fresh off and a shape, and
118
+ * that is three different computers which this cannot tell apart: a suspended
119
+ * one that has its saved JPEG and refuses to shape it, a suspended one with no
120
+ * saved picture at all (the platform names that before it looks at the shape),
121
+ * and one that is simply not running, which has neither. Dropping the shape is
122
+ * a way out of the first only — offered as such, the second and third would be
123
+ * sent round to a retry that is refused again. So the platform's sentence
124
+ * first, as everywhere, since it is the half that says which of the three this
125
+ * is; then start_computer, which answers all three; then the unshaped retry,
126
+ * under the one condition that makes it worth sending.
127
+ */
128
+ const shapeRefused = (err, asked) => {
129
+ const sentence = failed(err)
130
+ .content.map((c) => ('text' in c ? c.text : ''))
131
+ .join('\n');
132
+ return refused(`${sentence}\n\nThis call asked for ${asked.join(', ')}, which only a running computer's screen can ` +
133
+ `answer: a suspended computer keeps at most one JPEG of its desktop, saved when it suspended, and that ` +
134
+ `cannot be cropped, scaled, re-encoded as PNG or given a quality. start_computer is the way to a screen ` +
135
+ `that can be shaped. Only where the sentence above says the computer has its saved desktop picture is ` +
136
+ `there one to fall back on: ask again with fresh: false and without ${asked.join(', ')} for it, which is the screen ` +
137
+ `as it was when the computer suspended and not the screen now. Where it says there is no saved desktop, ` +
138
+ `or that the computer is not running, dropping them is refused the same way and only a start helps.`);
139
+ };
140
+ /**
141
+ * What the coordinates in a shaped picture mean, as the one sentence a model
142
+ * needs before it clicks on anything in it.
143
+ *
144
+ * A crop or a scale puts the picture in its OWN pixel space, and click, drag
145
+ * and scroll take SCREEN pixels. The mapping is arithmetic the model can do,
146
+ * but only if it is told the numbers, so they are stated rather than implied.
147
+ * A width is turned into its factor here the way the platform turns it: at
148
+ * least 64 pixels, never wider than what is being shrunk.
149
+ */
150
+ const shapeNote = (width, s) => {
151
+ const r = s.region;
152
+ const source = r?.width;
153
+ let factor = s.scale;
154
+ if (width !== undefined) {
155
+ factor = source === undefined ? undefined : Math.min(Math.max(width, 64), source) / source;
156
+ }
157
+ if (!r) {
158
+ if (width !== undefined)
159
+ return `(scaled to ${width}px wide — click using full-size coordinates)`;
160
+ if (factor === undefined || factor === 1)
161
+ return undefined;
162
+ return `(scaled by ${factor}: to click on something in this picture, divide its position by ${factor})`;
163
+ }
164
+ const at = `${r.x},${r.y},${r.width},${r.height}`;
165
+ if (factor === undefined || factor === 1) {
166
+ return `(the region ${at} of the screen: to click on something in this picture, add ${r.x} to its x and ${r.y} to its y)`;
167
+ }
168
+ const f = Number(factor.toPrecision(6));
169
+ return `(the region ${at} of the screen, scaled by ${f}: to click on something in this picture, divide its position by ${f}, then add ${r.x} to x and ${r.y} to y)`;
170
+ };
171
+ /**
172
+ * The pixel size a JPEG declares in its start-of-frame header, or undefined
173
+ * when none can be read. Walks the marker segments rather than trusting a
174
+ * fixed offset, since EXIF and JFIF headers vary in length.
175
+ */
176
+ export function jpegSize(bytes) {
177
+ if (bytes.length < 4 || bytes[0] !== 0xff || bytes[1] !== 0xd8)
178
+ return undefined;
179
+ let i = 2;
180
+ while (i + 4 <= bytes.length) {
181
+ if (bytes[i] !== 0xff)
182
+ return undefined;
183
+ const marker = bytes[i + 1];
184
+ // Fill bytes before a marker.
185
+ if (marker === 0xff) {
186
+ i++;
187
+ continue;
188
+ }
189
+ // Markers with no length: TEM and RSTn.
190
+ if (marker === 0x01 || (marker >= 0xd0 && marker <= 0xd7)) {
191
+ i += 2;
192
+ continue;
193
+ }
194
+ const length = (bytes[i + 2] << 8) | bytes[i + 3];
195
+ if (length < 2)
196
+ return undefined;
197
+ // SOF0-SOF15, less DHT (C4), JPG (C8) and DAC (CC).
198
+ if (marker >= 0xc0 && marker <= 0xcf && marker !== 0xc4 && marker !== 0xc8 && marker !== 0xcc) {
199
+ if (i + 9 > bytes.length)
200
+ return undefined;
201
+ const height = (bytes[i + 5] << 8) | bytes[i + 6];
202
+ const width = (bytes[i + 7] << 8) | bytes[i + 8];
203
+ return width && height ? { width, height } : undefined;
204
+ }
205
+ // Start of scan: the frame header comes before it or not at all.
206
+ if (marker === 0xda)
207
+ return undefined;
208
+ i += 2 + length;
209
+ }
210
+ return undefined;
211
+ }
71
212
  /** The longest text one `type` takes, in characters. */
72
213
  export const TYPE_TEXT_MAX_CHARS = 400;
73
214
  /** The platform's words for how a `type` went, as the clause each means. */
@@ -82,7 +223,7 @@ export const registerInput = (server, session) => {
82
223
  .send('POST', P.computerAction(session.resolve(computerId), 'input'), { body });
83
224
  server.registerTool('screenshot', {
84
225
  title: 'Screenshot the desktop',
85
- description: 'A picture of what is on the screen right now, returned as an image. Coordinates in this picture are the ones click, drag and scroll take.',
226
+ description: 'A picture of what is on the screen right now, returned as an image. Coordinates in this picture are the ones click, drag and scroll take — except a saved frame of a suspended computer (served with fresh: false), which is labelled as one: a downscaled picture of the screen as it was, not in click coordinates.',
86
227
  inputSchema: {
87
228
  ...idArg,
88
229
  width: z
@@ -96,14 +237,58 @@ export const registerInput = (server, session) => {
96
237
  .boolean()
97
238
  .default(true)
98
239
  .describe('Skip the platform\'s frame cache, which serves any capture under 1.5s old — up to 30s old while the computer is busy with another operation. True by default: after a click, a cached frame can predate the action entirely, and a model reading it concludes the click missed and clicks again. A capture needs a computer that is awake, so on a suspended one this is refused rather than answered — pass false to ask for the last saved frame instead, which is refused in turn when there is no saved frame to serve. A saved frame answers "what was on the screen" and cannot answer "did my click land".'),
240
+ region: z
241
+ .object({
242
+ x: z.number().int().min(0),
243
+ y: z.number().int().min(0),
244
+ width: z.number().int().min(1),
245
+ height: z.number().int().min(1),
246
+ })
247
+ .optional()
248
+ .describe('Crop to this rectangle of the screen. x, y, width and height are SCREEN pixels, the ones click takes, measured before any scaling. It has to lie inside the screen: one that reaches past an edge is refused with the screen size rather than clipped. The picture that comes back starts at (0, 0), so add x and y to a position in it before clicking there.'),
249
+ scale: z
250
+ .number()
251
+ .gt(0)
252
+ .max(1)
253
+ .optional()
254
+ .describe('Shrink the picture by this factor, greater than 0 and at most 1: 0.5 halves both sides, a quarter of the pixels. Not with width. Divide a position in the smaller picture by this before clicking there.'),
255
+ format: z
256
+ .enum(['png', 'jpeg'])
257
+ .optional()
258
+ .describe('png (the default) or jpeg (the default with width). A JPEG is much smaller for the same picture.'),
259
+ quality: z
260
+ .number()
261
+ .int()
262
+ .min(1)
263
+ .max(100)
264
+ .optional()
265
+ .describe('JPEG quality, 1 to 100 (72 when not given). A JPEG only: pass format: jpeg with it.'),
99
266
  },
100
267
  annotations: { readOnlyHint: true },
101
- }, ({ computer_id, width, fresh }, extra) => guarded(async () => {
268
+ }, ({ computer_id, width, fresh, region, scale, format, quality }, extra) => guarded(async () => {
269
+ const shape = { region, scale, format, quality };
270
+ // The two refusals the platform would make that are knowable from the
271
+ // arguments alone, made here so the answer names this tool's own
272
+ // parameters and costs no round trip. Everything else about a shape —
273
+ // chiefly whether a region fits the screen — is the platform's to say.
274
+ if (width !== undefined && scale !== undefined) {
275
+ return refused('Give width or scale, not both: each sets the size of the picture. Nothing was sent.');
276
+ }
277
+ if (quality !== undefined && (format ?? (width === undefined ? 'png' : 'jpeg')) === 'png') {
278
+ return refused('quality applies to a JPEG only, and this picture would be a PNG. Add format: jpeg (or drop quality). Nothing was sent.');
279
+ }
102
280
  const id = session.resolve(computer_id);
103
281
  let shot;
104
282
  try {
105
283
  shot = await session.api.with(extra.signal).bytes('GET', P.computerAction(id, 'screenshot'), {
106
- query: { w: width, fresh: fresh ? 1 : undefined },
284
+ query: {
285
+ w: width,
286
+ fresh: fresh ? 1 : undefined,
287
+ region: region && `${region.x},${region.y},${region.width},${region.height}`,
288
+ scale,
289
+ format,
290
+ quality,
291
+ },
107
292
  }, MAX_INLINE_IMAGE_BYTES);
108
293
  }
109
294
  catch (err) {
@@ -116,6 +301,18 @@ export const registerInput = (server, session) => {
116
301
  // refusal can be about asking for one. A model that meets a bare 409
117
302
  // here has nothing to try, and the thing it does instead is ask again
118
303
  // — a loop over a computer that cannot answer it.
304
+ //
305
+ // And a shaped picture: a suspended computer refuses a crop, a scale,
306
+ // a PNG or a quality even with fresh off, so offering fresh: false
307
+ // alone would send the caller into the same wall. Checked first, and
308
+ // for fresh too, since the platform names the capture before the
309
+ // shape and the shape would be the next refusal.
310
+ const asked = unshapeable(shape);
311
+ if (err instanceof ConflictError &&
312
+ asked.length > 0 &&
313
+ (fresh || err.reason === 'unavailable')) {
314
+ return fresh ? cachedFrameOffered(err, asked) : shapeRefused(err, asked);
315
+ }
119
316
  if (fresh && err instanceof ConflictError)
120
317
  return cachedFrameOffered(err);
121
318
  throw err;
@@ -126,7 +323,13 @@ export const registerInput = (server, session) => {
126
323
  // in a context that then has room for nothing else.
127
324
  if (shot.truncated) {
128
325
  const size = shot.totalBytes === undefined ? `more than ${shot.bytes.length}` : shot.totalBytes;
129
- return refused(`That screenshot is ${size} bytes, over the ${MAX_INLINE_IMAGE_BYTES}-byte inline limit. An image cannot be truncated, so nothing was returned. Ask again with a width — e.g. width: 1280 — and click using full-size coordinates.`);
326
+ // Every argument that makes the picture smaller, not only the
327
+ // oldest: a crop is often the better answer (the part of the screen
328
+ // in question, at full detail), and a JPEG shrinks a dense screen
329
+ // several times over at the same size. The note on the picture that
330
+ // comes back says how its positions map to the screen, so this does
331
+ // not have to.
332
+ return refused(`That screenshot is ${size} bytes, over the ${MAX_INLINE_IMAGE_BYTES}-byte inline limit. An image cannot be truncated, so nothing was returned. Ask again for a smaller picture: a width (e.g. width: 1280) or a scale (e.g. scale: 0.5), format: jpeg, or a region of the screen — any of them, or a region with one of the others. The note on the picture that comes back says how its positions map to the screen click takes.`);
130
333
  }
131
334
  if (shot.bytes.length === 0) {
132
335
  return refused(`That screenshot came back empty (${shot.contentType}). Nothing was returned rather than passing zero bytes off as a picture.`);
@@ -147,9 +350,17 @@ export const registerInput = (server, session) => {
147
350
  if (!isInlineImage(shot.contentType)) {
148
351
  return refused(`That screenshot came back as ${shot.contentType}, not one of the image types this can hand over (${[...INLINE_IMAGE_TYPES].join(', ')}) — ${shot.bytes.length} bytes. Something between here and the guest answered in place of the capture; nothing was returned rather than passing it off as a picture.`);
149
352
  }
150
- const scaled = width
151
- ? ` (scaled to ${width}px wide — click using full-size coordinates)`
152
- : '';
353
+ // A suspended computer answers fresh: false with the JPEG it saved
354
+ // when it suspended (OPL-5323), labelled X-GC-Frame: suspended. It is
355
+ // downscaled and old, so neither the screen size nor a shape note
356
+ // describes it, and saying "Screen is WxH" beside it invites a click
357
+ // at coordinates that mean nothing.
358
+ if (shot.frame === 'suspended') {
359
+ const size = jpegSize(shot.bytes);
360
+ return image(shot.bytes, shot.contentType, `A SAVED FRAME of suspended computer ${id}${size ? `, ${size.width}x${size.height} pixels` : ''}: the screen as it was when it suspended, not the live screen, and not in the coordinates click takes. start_computer resumes it; screenshot again after that before pointing at anything.`);
361
+ }
362
+ const shaped = shapeNote(width, shape);
363
+ const scaled = shaped ? ` ${shaped}` : '';
153
364
  // Only for the bound computer. session.screen is definitionally the
154
365
  // bound machine's geometry — noteResolution refuses to update it for
155
366
  // any other id — so printing it beside a screenshot of a computer named
@@ -185,7 +396,7 @@ export const registerInput = (server, session) => {
185
396
  }));
186
397
  server.registerTool('type_text', {
187
398
  title: 'Type text',
188
- description: 'Type a string into whatever has keyboard focus: literal text, 1 to 400 characters. For Enter, Tab or a shortcut, use press_key. Plain ASCII is typed as US-layout key events, about 12 ms a character, so 400 characters take about five seconds. Text containing any other character — accents, CJK, emoji — is typed WHOLE and in order by one guest helper: its ASCII as the same key presses and the rest by GTK Unicode composition. That works in Chromium (GTK3) and Xfce Terminal on a Linux X11 desktop; Firefox, GTK4 apps, native Wayland apps and Windows are unsupported for non-ASCII text, and such text is checked and refused before any key is pressed. Tab and newline are sent as keys and CRLF as one Return; a bare CR and other control characters are refused. The answer says which way it was typed. It confirms the keys were sent, not that the application accepted them: check with a screenshot before relying on it.',
399
+ description: 'Type a string into whatever has keyboard focus: literal text, 1 to 400 characters. For Enter, Tab or a shortcut, use press_key. Plain ASCII is typed as US-layout key events, about 12 ms a character, so 400 characters take about five seconds. Text containing any other character — accents, CJK, emoji — is typed WHOLE and in order by one guest helper: its ASCII as the same key presses and the rest by GTK Unicode composition. That works in Chromium (GTK3) and Xfce Terminal on a Linux X11 desktop; Firefox, GTK4 apps, native Wayland apps and Windows are unsupported for non-ASCII text, and such text is checked and refused before any key is pressed. Tab and newline are sent as keys and CRLF as one Return; a bare CR and other control characters are refused. The answer says which way it was typed. It confirms the keys were sent, not that the application accepted them: check with a screenshot before relying on it. For longer text, or non-ASCII text in an application this cannot type into, paste_text puts it on the clipboard and pastes it in one step.',
189
400
  inputSchema: {
190
401
  ...idArg,
191
402
  text: z
@@ -217,6 +428,24 @@ export const registerInput = (server, session) => {
217
428
  : '';
218
429
  return said(`Typed ${typed} character(s)${how}. That confirms the keys were sent, not that the application accepted the text: check with a screenshot before relying on it.`);
219
430
  }));
431
+ server.registerTool('paste_text', {
432
+ title: 'Paste text',
433
+ description: `Put text on the desktop clipboard and press the paste shortcut, as one step: the fast way to insert up to ${P.MAX_PASTE_BYTES} bytes of UTF-8, including accents, CJK and emoji, into whatever has focus. Linux desktops only; Windows and a guest without working clipboard support are refused. The paste REPLACES the clipboard and leaves the text there — after pasting a secret, clear it with write_clipboard and text "". A success means the clipboard write and the shortcut were delivered, not that the application inserted the text (a paste-disabled field ignores it): check with a screenshot. An interrupted call may already have pasted, so look before sending it again, and do not fall back to type_text without looking.`,
434
+ inputSchema: {
435
+ ...idArg,
436
+ text: z
437
+ .string()
438
+ .min(1, 'text must not be empty')
439
+ .describe(`The text to paste: 1 to ${P.MAX_PASTE_BYTES} bytes of UTF-8, no NUL.`),
440
+ shortcut: z
441
+ .enum(P.PASTE_SHORTCUTS)
442
+ .optional()
443
+ .describe('"ctrl+v" (the default) or "ctrl+shift+v", which terminals need. Shift+Insert is not offered: it can paste the separate primary selection instead.'),
444
+ },
445
+ }, ({ computer_id, text, shortcut }, extra) => guarded(async () => {
446
+ await post(computer_id, P.pasteBody(text, shortcut), extra.signal);
447
+ return said(`Pasted ${[...text].length} character(s) with ${shortcut ?? 'ctrl+v'}. The text is still on the clipboard. That confirms the paste was sent, not that the application accepted it: check with a screenshot before relying on it.`);
448
+ }));
220
449
  server.registerTool('press_key', {
221
450
  title: 'Press a key or a chord',
222
451
  description: 'Press named keys — "Return", "Tab", "Escape", "Page_Down", or a chord like ["ctrl","c"]. X keysym names, so "Return" rather than "Enter".',
@@ -255,7 +484,7 @@ export const registerInput = (server, session) => {
255
484
  }));
256
485
  server.registerTool('drag', {
257
486
  title: 'Drag',
258
- description: 'Press, move and release as one gesture — for selecting text, moving a file, or dragging a slider. Not the same as two clicks.',
487
+ description: 'Press, move and release as one gesture — for selecting text, moving a file, or dragging a slider. Not the same as two clicks. modifiers holds keys down for the whole gesture, e.g. ["shift"] to extend a selection.',
259
488
  inputSchema: {
260
489
  ...idArg,
261
490
  to_x: z.number().int(),
@@ -266,11 +495,13 @@ export const registerInput = (server, session) => {
266
495
  .optional()
267
496
  .describe('Where to start. Both from_x and from_y, or neither — half of an origin is refused rather than ignored.'),
268
497
  from_y: z.number().int().optional(),
498
+ modifiers,
269
499
  },
270
- }, ({ computer_id, to_x, to_y, from_x, from_y }, extra) => guarded(async () => {
271
- await post(computer_id, P.dragBody(to_x, to_y, from_x, from_y), extra.signal);
500
+ }, ({ computer_id, to_x, to_y, from_x, from_y, modifiers: mods }, extra) => guarded(async () => {
501
+ await post(computer_id, P.dragBody(to_x, to_y, from_x, from_y, mods ?? []), extra.signal);
272
502
  const from = from_x === undefined ? 'the pointer' : `${from_x},${from_y}`;
273
- return said(`Dragged from ${from} to ${to_x},${to_y}.`);
503
+ const held = mods?.length ? ` holding ${mods.join('+')}` : '';
504
+ return said(`Dragged from ${from} to ${to_x},${to_y}${held}.`);
274
505
  }));
275
506
  server.registerTool('move_mouse', {
276
507
  title: 'Move the pointer',
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","sourceRoot":"","sources":["../../src/tools/input.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EACL,MAAM,EACN,OAAO,EACP,kBAAkB,EAClB,KAAK,EACL,aAAa,EACb,IAAI,EACJ,sBAAsB,EACtB,OAAO,EACP,IAAI,GACL,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAGjC,MAAM,KAAK,GAAG;IACZ,WAAW,EAAE,CAAC;SACX,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,iEAAiE,CAAC;CAC/E,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC;KAChB,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;KAC/D,QAAQ,EAAE;KACV,QAAQ,CAAC,gDAAgD,CAAC,CAAC;AAE9D;;;;;;;GAOG;AACH,MAAM,KAAK,GAAG;IACZ,CAAC,EAAE,CAAC;SACD,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,CACP,0IAA0I,CAC3I;IACH,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;CAC/B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,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AAC;IACxC,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC;AACvD,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
2
+ import { z } from 'zod';
3
+ import type { Registrar } from './types.js';
4
+ /**
5
+ * The key on a step a read of the computer shows: start, stop, suspend,
6
+ * delete, move, update_computer (not restart: see
7
+ * {@link restartIdempotencyKeyArg}). See {@link resendAfterSpentKey}.
8
+ */
9
+ export declare const idempotencyKeyArg: z.ZodOptional<z.ZodString>;
10
+ /**
11
+ * The key on restart_computer, whose step no read of the computer shows: it
12
+ * reads running before and after a reset. So the route never conditions a
13
+ * resend on get_computer; see {@link resendAfterSpentKey}.
14
+ */
15
+ export declare const restartIdempotencyKeyArg: z.ZodOptional<z.ZodString>;
16
+ /**
17
+ * The key on a call that makes a new computer or overwrites a disk: create,
18
+ * clone, clone_snapshot, restore_snapshot. A resend after a spent key waits for
19
+ * the operation to be final. See {@link resendAfterSpentKey}.
20
+ */
21
+ export declare const buildIdempotencyKeyArg: z.ZodOptional<z.ZodString>;
22
+ /**
23
+ * The answer to a lifecycle tool call that failed, with what its key means.
24
+ *
25
+ * The platform's own `idempotency_*` refusals get their sentence instead of the
26
+ * generic `reason` advice. A failure whose outcome is unknown ENDS with the
27
+ * retry that cannot do the step twice, and which one depends on who answered:
28
+ *
29
+ * - The answer never arrived, the keyed call is still running, or a proxy in
30
+ * front of the platform answered: the same tool, with the same key.
31
+ * - The platform itself answered a `5xx`: it has settled that key as lost
32
+ * (OPL-5304), so the same key can only be answered
33
+ * `idempotency_outcome_unknown`. The next step is a read, then a resend
34
+ * with a new key or none if the step did not happen. Which read depends on
35
+ * the tool (see {@link resendAfterSpentKey}): a create, clone or restore
36
+ * waits for its operation to be final, since a read of the computer made
37
+ * at once cannot see one still landing; a restart, which no read of the
38
+ * computer shows, is read off its operation and otherwise left to the user;
39
+ * every other step is read off the computer, since its operation stays
40
+ * `pending` for an hour regardless.
41
+ */
42
+ export declare function keyedFailure(err: unknown, tool: string, what: string, key: string): CallToolResult;
43
+ export declare const registerOperations: Registrar;
44
+ //# sourceMappingURL=operations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operations.d.ts","sourceRoot":"","sources":["../../src/tools/operations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AA8C5C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,4BAE7B,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,4BAEpC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,4BAElC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,GACV,cAAc,CAiBhB;AAuBD,eAAO,MAAM,kBAAkB,EAAE,SAmJhC,CAAC"}