@solarisdk/mcp 0.4.2 → 0.4.4

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/server.js CHANGED
@@ -256,11 +256,22 @@ export function makeToolset(client, reg) {
256
256
  },
257
257
  },
258
258
  solari_click: {
259
- description: "Click the desktop at (x, y).",
260
- inputSchema: { sessionId: z.string(), x: z.number(), y: z.number() },
259
+ description: "Click the desktop at (x, y). Set doubleClick: true for a double click " +
260
+ "(e.g. opening icons/files); button selects left (default), right, or middle.",
261
+ inputSchema: {
262
+ sessionId: z.string(),
263
+ x: z.number(),
264
+ y: z.number(),
265
+ button: z.enum(["left", "right", "middle"]).optional(),
266
+ doubleClick: z.boolean().optional(),
267
+ },
261
268
  handler: async (a) => {
262
269
  const e = await desktop(a.sessionId);
263
- await e.handle.mouse.click(a.x, a.y);
270
+ const opts = a.button ? { button: a.button } : {};
271
+ if (a.doubleClick)
272
+ await e.handle.mouse.doubleClick(a.x, a.y, opts);
273
+ else
274
+ await e.handle.mouse.click(a.x, a.y, opts);
264
275
  return text({ ok: true });
265
276
  },
266
277
  },