@solarisdk/mcp 0.4.3 → 0.4.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/browser-tools/auth.d.ts +2 -0
- package/dist/browser-tools/auth.js +403 -0
- package/dist/browser-tools/capture.d.ts +2 -0
- package/dist/browser-tools/capture.js +67 -0
- package/dist/browser-tools/context.d.ts +79 -0
- package/dist/browser-tools/context.js +74 -0
- package/dist/browser-tools/interaction.d.ts +2 -0
- package/dist/browser-tools/interaction.js +91 -0
- package/dist/browser-tools/navigation.d.ts +2 -0
- package/dist/browser-tools/navigation.js +30 -0
- package/dist/browser-tools/session.d.ts +2 -0
- package/dist/browser-tools/session.js +182 -0
- package/dist/browser.d.ts +4 -49
- package/dist/browser.js +21 -809
- package/dist/server.js +74 -2
- package/dist/solari-mcp-http.bundle.cjs +1504 -1396
- package/dist/solari-mcp.bundle.cjs +1501 -1393
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
package/dist/server.js
CHANGED
|
@@ -36,6 +36,11 @@ export function makeToolset(client, reg) {
|
|
|
36
36
|
};
|
|
37
37
|
// A paused session refuses the /control upgrade with 409, so resume it and
|
|
38
38
|
// retry rather than surfacing an opaque websocket error.
|
|
39
|
+
//
|
|
40
|
+
// A PARKED session needs nothing here: park keeps the slot, the host and the
|
|
41
|
+
// routing, and the gateway unparks on the /control upgrade itself (wake-on-
|
|
42
|
+
// touch). The connect below just works, a few hundred milliseconds slower.
|
|
43
|
+
// Do not add an unpark call -- it would be a redundant round trip.
|
|
39
44
|
const live = async (id) => {
|
|
40
45
|
const e = need(id);
|
|
41
46
|
if (e.handle.connected)
|
|
@@ -256,11 +261,78 @@ export function makeToolset(client, reg) {
|
|
|
256
261
|
},
|
|
257
262
|
},
|
|
258
263
|
solari_click: {
|
|
259
|
-
description: "Click the desktop at (x, y)."
|
|
264
|
+
description: "Click the desktop at (x, y). Set doubleClick: true for a double click " +
|
|
265
|
+
"(e.g. opening icons/files); button selects left (default), right, or middle.",
|
|
266
|
+
inputSchema: {
|
|
267
|
+
sessionId: z.string(),
|
|
268
|
+
x: z.number(),
|
|
269
|
+
y: z.number(),
|
|
270
|
+
button: z.enum(["left", "right", "middle"]).optional(),
|
|
271
|
+
doubleClick: z.boolean().optional(),
|
|
272
|
+
},
|
|
273
|
+
handler: async (a) => {
|
|
274
|
+
const e = await desktop(a.sessionId);
|
|
275
|
+
const opts = a.button ? { button: a.button } : {};
|
|
276
|
+
if (a.doubleClick)
|
|
277
|
+
await e.handle.mouse.doubleClick(a.x, a.y, opts);
|
|
278
|
+
else
|
|
279
|
+
await e.handle.mouse.click(a.x, a.y, opts);
|
|
280
|
+
return text({ ok: true });
|
|
281
|
+
},
|
|
282
|
+
},
|
|
283
|
+
solari_mouse_down: {
|
|
284
|
+
description: "Press and HOLD a mouse button at (x, y) — the start of a drag (e.g. grab a window " +
|
|
285
|
+
"title bar). Follow with solari_mouse_move to drag while held, then solari_mouse_up " +
|
|
286
|
+
"to release. For a simple one-shot drag prefer solari_drag.",
|
|
287
|
+
inputSchema: {
|
|
288
|
+
sessionId: z.string(),
|
|
289
|
+
x: z.number(),
|
|
290
|
+
y: z.number(),
|
|
291
|
+
button: z.enum(["left", "right", "middle"]).optional(),
|
|
292
|
+
},
|
|
293
|
+
handler: async (a) => {
|
|
294
|
+
const e = await desktop(a.sessionId);
|
|
295
|
+
await e.handle.mouse.down(a.x, a.y, a.button ?? "left");
|
|
296
|
+
return text({ ok: true });
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
solari_mouse_move: {
|
|
300
|
+
description: "Move the pointer to (x, y). While a button is held (solari_mouse_down) this drags.",
|
|
260
301
|
inputSchema: { sessionId: z.string(), x: z.number(), y: z.number() },
|
|
261
302
|
handler: async (a) => {
|
|
262
303
|
const e = await desktop(a.sessionId);
|
|
263
|
-
await e.handle.mouse.
|
|
304
|
+
await e.handle.mouse.move(a.x, a.y);
|
|
305
|
+
return text({ ok: true });
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
solari_mouse_up: {
|
|
309
|
+
description: "Release the held mouse button at (x, y) — the end of a drag started with solari_mouse_down.",
|
|
310
|
+
inputSchema: {
|
|
311
|
+
sessionId: z.string(),
|
|
312
|
+
x: z.number(),
|
|
313
|
+
y: z.number(),
|
|
314
|
+
button: z.enum(["left", "right", "middle"]).optional(),
|
|
315
|
+
},
|
|
316
|
+
handler: async (a) => {
|
|
317
|
+
const e = await desktop(a.sessionId);
|
|
318
|
+
await e.handle.mouse.up(a.x, a.y, a.button ?? "left");
|
|
319
|
+
return text({ ok: true });
|
|
320
|
+
},
|
|
321
|
+
},
|
|
322
|
+
solari_drag: {
|
|
323
|
+
description: "Drag in one call: press at (fromX, fromY), move to (toX, toY), release. " +
|
|
324
|
+
"Good for moving windows, sliders, and drag-and-drop.",
|
|
325
|
+
inputSchema: {
|
|
326
|
+
sessionId: z.string(),
|
|
327
|
+
fromX: z.number(),
|
|
328
|
+
fromY: z.number(),
|
|
329
|
+
toX: z.number(),
|
|
330
|
+
toY: z.number(),
|
|
331
|
+
button: z.enum(["left", "right", "middle"]).optional(),
|
|
332
|
+
},
|
|
333
|
+
handler: async (a) => {
|
|
334
|
+
const e = await desktop(a.sessionId);
|
|
335
|
+
await e.handle.mouse.drag({ x: a.fromX, y: a.fromY }, { x: a.toX, y: a.toY }, a.button ?? "left");
|
|
264
336
|
return text({ ok: true });
|
|
265
337
|
},
|
|
266
338
|
},
|