@solarisdk/mcp 0.4.4 → 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 CHANGED
@@ -188,6 +188,7 @@ cookie count and origins it stored, so they can see what was persisted.
188
188
  | `solari_get_preview_url` | Public preview URL for an in-guest port |
189
189
  | `solari_screenshot` | Capture the desktop as a PNG (image content) |
190
190
  | `solari_click` / `solari_type` / `solari_key` | Desktop mouse/keyboard (`solari_click` takes optional `doubleClick` + `button: left\|right\|middle`) |
191
+ | `solari_drag` / `solari_mouse_down` / `solari_mouse_move` / `solari_mouse_up` | Drag-and-drop: one-shot drag, or press-hold → move → release for stepwise drags |
191
192
  | `solari_open_app` | Launch an app on the desktop |
192
193
 
193
194
  (The desktop GUI tools require a `solari_desktop_create` session; they error on
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)
@@ -275,6 +280,62 @@ export function makeToolset(client, reg) {
275
280
  return text({ ok: true });
276
281
  },
277
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.",
301
+ inputSchema: { sessionId: z.string(), x: z.number(), y: z.number() },
302
+ handler: async (a) => {
303
+ const e = await desktop(a.sessionId);
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");
336
+ return text({ ok: true });
337
+ },
338
+ },
278
339
  solari_type: {
279
340
  description: "Type text into the focused desktop element.",
280
341
  inputSchema: { sessionId: z.string(), text: z.string() },
@@ -112358,7 +112358,7 @@ var SolariClient = class {
112358
112358
  };
112359
112359
 
112360
112360
  // src/version.ts
112361
- var VERSION = "0.4.4";
112361
+ var VERSION = "0.4.5";
112362
112362
 
112363
112363
  // ../../../pinetree-desktop/sdk/mcp/node_modules/puppeteer-core/lib/esm/puppeteer/index.js
112364
112364
  init_index_browser();
@@ -114597,6 +114597,63 @@ function makeToolset(client, reg) {
114597
114597
  return text2({ ok: true });
114598
114598
  }
114599
114599
  },
114600
+ solari_mouse_down: {
114601
+ description: "Press and HOLD a mouse button at (x, y) \u2014 the start of a drag (e.g. grab a window title bar). Follow with solari_mouse_move to drag while held, then solari_mouse_up to release. For a simple one-shot drag prefer solari_drag.",
114602
+ inputSchema: {
114603
+ sessionId: external_exports.string(),
114604
+ x: external_exports.number(),
114605
+ y: external_exports.number(),
114606
+ button: external_exports.enum(["left", "right", "middle"]).optional()
114607
+ },
114608
+ handler: async (a2) => {
114609
+ const e = await desktop(a2.sessionId);
114610
+ await e.handle.mouse.down(a2.x, a2.y, a2.button ?? "left");
114611
+ return text2({ ok: true });
114612
+ }
114613
+ },
114614
+ solari_mouse_move: {
114615
+ description: "Move the pointer to (x, y). While a button is held (solari_mouse_down) this drags.",
114616
+ inputSchema: { sessionId: external_exports.string(), x: external_exports.number(), y: external_exports.number() },
114617
+ handler: async (a2) => {
114618
+ const e = await desktop(a2.sessionId);
114619
+ await e.handle.mouse.move(a2.x, a2.y);
114620
+ return text2({ ok: true });
114621
+ }
114622
+ },
114623
+ solari_mouse_up: {
114624
+ description: "Release the held mouse button at (x, y) \u2014 the end of a drag started with solari_mouse_down.",
114625
+ inputSchema: {
114626
+ sessionId: external_exports.string(),
114627
+ x: external_exports.number(),
114628
+ y: external_exports.number(),
114629
+ button: external_exports.enum(["left", "right", "middle"]).optional()
114630
+ },
114631
+ handler: async (a2) => {
114632
+ const e = await desktop(a2.sessionId);
114633
+ await e.handle.mouse.up(a2.x, a2.y, a2.button ?? "left");
114634
+ return text2({ ok: true });
114635
+ }
114636
+ },
114637
+ solari_drag: {
114638
+ description: "Drag in one call: press at (fromX, fromY), move to (toX, toY), release. Good for moving windows, sliders, and drag-and-drop.",
114639
+ inputSchema: {
114640
+ sessionId: external_exports.string(),
114641
+ fromX: external_exports.number(),
114642
+ fromY: external_exports.number(),
114643
+ toX: external_exports.number(),
114644
+ toY: external_exports.number(),
114645
+ button: external_exports.enum(["left", "right", "middle"]).optional()
114646
+ },
114647
+ handler: async (a2) => {
114648
+ const e = await desktop(a2.sessionId);
114649
+ await e.handle.mouse.drag(
114650
+ { x: a2.fromX, y: a2.fromY },
114651
+ { x: a2.toX, y: a2.toY },
114652
+ a2.button ?? "left"
114653
+ );
114654
+ return text2({ ok: true });
114655
+ }
114656
+ },
114600
114657
  solari_type: {
114601
114658
  description: "Type text into the focused desktop element.",
114602
114659
  inputSchema: { sessionId: external_exports.string(), text: external_exports.string() },
@@ -111027,7 +111027,7 @@ var SolariClient = class {
111027
111027
  };
111028
111028
 
111029
111029
  // src/version.ts
111030
- var VERSION = "0.4.4";
111030
+ var VERSION = "0.4.5";
111031
111031
 
111032
111032
  // ../../../pinetree-desktop/sdk/mcp/node_modules/puppeteer-core/lib/esm/puppeteer/index.js
111033
111033
  init_index_browser();
@@ -113266,6 +113266,63 @@ function makeToolset(client, reg) {
113266
113266
  return text2({ ok: true });
113267
113267
  }
113268
113268
  },
113269
+ solari_mouse_down: {
113270
+ description: "Press and HOLD a mouse button at (x, y) \u2014 the start of a drag (e.g. grab a window title bar). Follow with solari_mouse_move to drag while held, then solari_mouse_up to release. For a simple one-shot drag prefer solari_drag.",
113271
+ inputSchema: {
113272
+ sessionId: external_exports.string(),
113273
+ x: external_exports.number(),
113274
+ y: external_exports.number(),
113275
+ button: external_exports.enum(["left", "right", "middle"]).optional()
113276
+ },
113277
+ handler: async (a2) => {
113278
+ const e = await desktop(a2.sessionId);
113279
+ await e.handle.mouse.down(a2.x, a2.y, a2.button ?? "left");
113280
+ return text2({ ok: true });
113281
+ }
113282
+ },
113283
+ solari_mouse_move: {
113284
+ description: "Move the pointer to (x, y). While a button is held (solari_mouse_down) this drags.",
113285
+ inputSchema: { sessionId: external_exports.string(), x: external_exports.number(), y: external_exports.number() },
113286
+ handler: async (a2) => {
113287
+ const e = await desktop(a2.sessionId);
113288
+ await e.handle.mouse.move(a2.x, a2.y);
113289
+ return text2({ ok: true });
113290
+ }
113291
+ },
113292
+ solari_mouse_up: {
113293
+ description: "Release the held mouse button at (x, y) \u2014 the end of a drag started with solari_mouse_down.",
113294
+ inputSchema: {
113295
+ sessionId: external_exports.string(),
113296
+ x: external_exports.number(),
113297
+ y: external_exports.number(),
113298
+ button: external_exports.enum(["left", "right", "middle"]).optional()
113299
+ },
113300
+ handler: async (a2) => {
113301
+ const e = await desktop(a2.sessionId);
113302
+ await e.handle.mouse.up(a2.x, a2.y, a2.button ?? "left");
113303
+ return text2({ ok: true });
113304
+ }
113305
+ },
113306
+ solari_drag: {
113307
+ description: "Drag in one call: press at (fromX, fromY), move to (toX, toY), release. Good for moving windows, sliders, and drag-and-drop.",
113308
+ inputSchema: {
113309
+ sessionId: external_exports.string(),
113310
+ fromX: external_exports.number(),
113311
+ fromY: external_exports.number(),
113312
+ toX: external_exports.number(),
113313
+ toY: external_exports.number(),
113314
+ button: external_exports.enum(["left", "right", "middle"]).optional()
113315
+ },
113316
+ handler: async (a2) => {
113317
+ const e = await desktop(a2.sessionId);
113318
+ await e.handle.mouse.drag(
113319
+ { x: a2.fromX, y: a2.fromY },
113320
+ { x: a2.toX, y: a2.toY },
113321
+ a2.button ?? "left"
113322
+ );
113323
+ return text2({ ok: true });
113324
+ }
113325
+ },
113269
113326
  solari_type: {
113270
113327
  description: "Type text into the focused desktop element.",
113271
113328
  inputSchema: { sessionId: external_exports.string(), text: external_exports.string() },
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.4.4";
1
+ export declare const VERSION = "0.4.5";
package/dist/version.js CHANGED
@@ -8,4 +8,4 @@
8
8
  // `test/version.test.mjs` FAILS the build if it ever drifts from package.json.
9
9
  //
10
10
  // KEEP IN SYNC WITH sdk/mcp/package.json "version".
11
- export const VERSION = "0.4.4";
11
+ export const VERSION = "0.4.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@solarisdk/mcp",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Model Context Protocol server for the Solari cloud browser, sandboxes + desktops \u2014 drive them from Claude Desktop/Cowork, Claude Code, Cursor, etc.",
5
5
  "type": "module",
6
6
  "bin": {