claude-in-mobile 2.1.2 → 2.2.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 (39) hide show
  1. package/desktop-companion/build/install/desktop-companion/bin/desktop-companion +248 -0
  2. package/desktop-companion/build/install/desktop-companion/bin/desktop-companion.bat +92 -0
  3. package/desktop-companion/build/install/desktop-companion/lib/annotations-23.0.0.jar +0 -0
  4. package/desktop-companion/build/install/desktop-companion/lib/desktop-companion-1.0.0.jar +0 -0
  5. package/desktop-companion/build/install/desktop-companion/lib/jna-5.14.0.jar +0 -0
  6. package/desktop-companion/build/install/desktop-companion/lib/jna-platform-5.14.0.jar +0 -0
  7. package/desktop-companion/build/install/desktop-companion/lib/kotlin-stdlib-1.9.22.jar +0 -0
  8. package/desktop-companion/build/install/desktop-companion/lib/kotlin-stdlib-jdk7-1.8.20.jar +0 -0
  9. package/desktop-companion/build/install/desktop-companion/lib/kotlin-stdlib-jdk8-1.8.20.jar +0 -0
  10. package/desktop-companion/build/install/desktop-companion/lib/kotlinx-coroutines-core-jvm-1.7.3.jar +0 -0
  11. package/desktop-companion/build/install/desktop-companion/lib/kotlinx-serialization-core-jvm-1.6.2.jar +0 -0
  12. package/desktop-companion/build/install/desktop-companion/lib/kotlinx-serialization-json-jvm-1.6.2.jar +0 -0
  13. package/dist/desktop/client.d.ts +162 -0
  14. package/dist/desktop/client.d.ts.map +1 -0
  15. package/dist/desktop/client.js +485 -0
  16. package/dist/desktop/client.js.map +1 -0
  17. package/dist/desktop/gradle.d.ts +45 -0
  18. package/dist/desktop/gradle.d.ts.map +1 -0
  19. package/dist/desktop/gradle.js +228 -0
  20. package/dist/desktop/gradle.js.map +1 -0
  21. package/dist/desktop/index.d.ts +7 -0
  22. package/dist/desktop/index.d.ts.map +1 -0
  23. package/dist/desktop/index.js +7 -0
  24. package/dist/desktop/index.js.map +1 -0
  25. package/dist/desktop/types.d.ts +131 -0
  26. package/dist/desktop/types.d.ts.map +1 -0
  27. package/dist/desktop/types.js +5 -0
  28. package/dist/desktop/types.js.map +1 -0
  29. package/dist/device-manager.d.ts +41 -10
  30. package/dist/device-manager.d.ts.map +1 -1
  31. package/dist/device-manager.js +226 -39
  32. package/dist/device-manager.js.map +1 -1
  33. package/dist/index.js +237 -18
  34. package/dist/index.js.map +1 -1
  35. package/dist/utils/image.d.ts +2 -0
  36. package/dist/utils/image.d.ts.map +1 -1
  37. package/dist/utils/image.js +25 -2
  38. package/dist/utils/image.js.map +1 -1
  39. package/package.json +7 -2
@@ -0,0 +1,485 @@
1
+ /**
2
+ * Desktop Client - communicates with Kotlin companion app via JSON-RPC
3
+ */
4
+ import { spawn, execSync } from "child_process";
5
+ import { EventEmitter } from "events";
6
+ import * as readline from "readline";
7
+ import * as path from "path";
8
+ import * as fs from "fs";
9
+ import { fileURLToPath } from "url";
10
+ import { GradleLauncher } from "./gradle.js";
11
+ const MAX_RESTARTS = 3;
12
+ const REQUEST_TIMEOUT = 30000; // 30 seconds
13
+ // Get the directory of this module
14
+ const __filename = fileURLToPath(import.meta.url);
15
+ const __dirname = path.dirname(__filename);
16
+ /**
17
+ * Find the companion app path
18
+ */
19
+ function findCompanionAppPath() {
20
+ // Look for companion app relative to this module
21
+ // The installed distribution is at desktop-companion/build/install/desktop-companion/bin/desktop-companion
22
+ const possiblePaths = [
23
+ // From dist/desktop/client.js
24
+ path.join(__dirname, "..", "..", "desktop-companion", "build", "install", "desktop-companion", "bin", "desktop-companion"),
25
+ // From src/desktop/client.ts (when running directly)
26
+ path.join(__dirname, "..", "..", "..", "desktop-companion", "build", "install", "desktop-companion", "bin", "desktop-companion"),
27
+ ];
28
+ for (const p of possiblePaths) {
29
+ if (fs.existsSync(p)) {
30
+ return p;
31
+ }
32
+ }
33
+ throw new Error("Desktop companion app not found. Please build it first: cd desktop-companion && ./gradlew installDist");
34
+ }
35
+ export class DesktopClient extends EventEmitter {
36
+ process = null;
37
+ gradleLauncher;
38
+ requestId = 0;
39
+ pendingRequests = new Map();
40
+ logs = [];
41
+ maxLogs = 10000;
42
+ state = {
43
+ status: "stopped",
44
+ crashCount: 0,
45
+ };
46
+ lastLaunchOptions = null;
47
+ readline = null;
48
+ constructor() {
49
+ super();
50
+ this.gradleLauncher = new GradleLauncher();
51
+ }
52
+ /**
53
+ * Get current state
54
+ */
55
+ getState() {
56
+ return { ...this.state };
57
+ }
58
+ /**
59
+ * Check if running
60
+ */
61
+ isRunning() {
62
+ return this.state.status === "running" && this.process !== null && !this.process.killed;
63
+ }
64
+ /**
65
+ * Launch desktop automation (starts companion app, optionally launches user's app via Gradle)
66
+ */
67
+ async launch(options) {
68
+ if (this.isRunning()) {
69
+ throw new Error("Desktop companion is already running. Stop it first.");
70
+ }
71
+ this.lastLaunchOptions = options;
72
+ this.state = {
73
+ status: "starting",
74
+ projectPath: options.projectPath,
75
+ crashCount: this.state.crashCount,
76
+ };
77
+ try {
78
+ // Find and start the companion app
79
+ const companionPath = findCompanionAppPath();
80
+ this.addLog("stdout", `Starting companion app: ${companionPath}`);
81
+ this.process = spawn(companionPath, [], {
82
+ stdio: ["pipe", "pipe", "pipe"],
83
+ env: {
84
+ ...process.env,
85
+ JAVA_HOME: process.env.JAVA_HOME || execSync("/usr/libexec/java_home -v 21 2>/dev/null || /usr/libexec/java_home 2>/dev/null || echo ''").toString().trim(),
86
+ },
87
+ });
88
+ this.state.pid = this.process.pid;
89
+ // If projectPath is provided, also launch the user's app via Gradle (in background)
90
+ if (options.projectPath) {
91
+ this.addLog("stdout", `Launching user app from: ${options.projectPath}`);
92
+ // Launch in background - don't wait for it
93
+ const userAppProcess = this.gradleLauncher.launch(options);
94
+ userAppProcess.stdout?.on("data", (data) => {
95
+ this.addLog("stdout", `[UserApp] ${data.toString()}`);
96
+ });
97
+ userAppProcess.stderr?.on("data", (data) => {
98
+ this.addLog("stderr", `[UserApp] ${data.toString()}`);
99
+ });
100
+ }
101
+ // Set up stdout for JSON-RPC responses
102
+ if (this.process.stdout) {
103
+ this.readline = readline.createInterface({
104
+ input: this.process.stdout,
105
+ crlfDelay: Infinity,
106
+ });
107
+ this.readline.on("line", (line) => {
108
+ this.handleLine(line);
109
+ });
110
+ }
111
+ // Capture stderr for logs
112
+ if (this.process.stderr) {
113
+ this.process.stderr.on("data", (data) => {
114
+ const message = data.toString();
115
+ this.addLog("stderr", message);
116
+ // Check for "ready" signal or specific patterns
117
+ if (message.includes("Desktop companion ready") ||
118
+ message.includes("JsonRpcServer started")) {
119
+ this.state.status = "running";
120
+ this.emit("ready");
121
+ }
122
+ });
123
+ }
124
+ // Handle process exit
125
+ this.process.on("exit", (code, signal) => {
126
+ this.handleExit(code, signal);
127
+ });
128
+ this.process.on("error", (error) => {
129
+ this.addLog("crash", `Process error: ${error.message}`);
130
+ this.handleCrash(error);
131
+ });
132
+ // Wait for ready signal or timeout
133
+ await this.waitForReady(10000);
134
+ }
135
+ catch (error) {
136
+ this.state.status = "stopped";
137
+ this.state.lastError = error.message;
138
+ throw error;
139
+ }
140
+ }
141
+ /**
142
+ * Wait for the companion app to be ready
143
+ */
144
+ waitForReady(timeoutMs) {
145
+ return new Promise((resolve, reject) => {
146
+ const timeout = setTimeout(() => {
147
+ // Consider ready even without explicit signal after timeout
148
+ // The app might not send a ready signal
149
+ if (this.process && !this.process.killed) {
150
+ this.state.status = "running";
151
+ resolve();
152
+ }
153
+ else {
154
+ reject(new Error("Desktop app failed to start"));
155
+ }
156
+ }, timeoutMs);
157
+ this.once("ready", () => {
158
+ clearTimeout(timeout);
159
+ resolve();
160
+ });
161
+ this.process?.once("exit", () => {
162
+ clearTimeout(timeout);
163
+ reject(new Error("Desktop app exited before becoming ready"));
164
+ });
165
+ });
166
+ }
167
+ /**
168
+ * Stop desktop app
169
+ */
170
+ async stop() {
171
+ if (!this.process) {
172
+ return;
173
+ }
174
+ // Clean up readline
175
+ if (this.readline) {
176
+ this.readline.close();
177
+ this.readline = null;
178
+ }
179
+ // Reject all pending requests
180
+ for (const [id, pending] of this.pendingRequests) {
181
+ clearTimeout(pending.timeout);
182
+ pending.reject(new Error("Desktop app stopped"));
183
+ }
184
+ this.pendingRequests.clear();
185
+ // Stop process
186
+ this.gradleLauncher.stop(this.process);
187
+ this.process = null;
188
+ this.state = {
189
+ status: "stopped",
190
+ crashCount: 0,
191
+ };
192
+ }
193
+ /**
194
+ * Handle incoming line from stdout
195
+ */
196
+ handleLine(line) {
197
+ const trimmed = line.trim();
198
+ if (!trimmed)
199
+ return;
200
+ // Try to parse as JSON-RPC response
201
+ if (trimmed.startsWith("{")) {
202
+ try {
203
+ const response = JSON.parse(trimmed);
204
+ this.handleResponse(response);
205
+ return;
206
+ }
207
+ catch {
208
+ // Not JSON, treat as log
209
+ }
210
+ }
211
+ // Regular log output
212
+ this.addLog("stdout", trimmed);
213
+ }
214
+ /**
215
+ * Handle JSON-RPC response
216
+ */
217
+ handleResponse(response) {
218
+ const pending = this.pendingRequests.get(response.id);
219
+ if (!pending) {
220
+ return; // Unknown response
221
+ }
222
+ this.pendingRequests.delete(response.id);
223
+ clearTimeout(pending.timeout);
224
+ if (response.error) {
225
+ pending.reject(new Error(`${response.error.message} (code: ${response.error.code})`));
226
+ }
227
+ else {
228
+ pending.resolve(response.result);
229
+ }
230
+ }
231
+ /**
232
+ * Handle process exit
233
+ */
234
+ handleExit(code, signal) {
235
+ const wasRunning = this.state.status === "running";
236
+ if (code !== 0 && wasRunning) {
237
+ this.addLog("crash", `Process exited with code ${code}, signal ${signal}`);
238
+ this.handleCrash(new Error(`Exit code: ${code}`));
239
+ }
240
+ else {
241
+ this.state.status = "stopped";
242
+ }
243
+ this.process = null;
244
+ }
245
+ /**
246
+ * Handle crash with auto-restart
247
+ */
248
+ async handleCrash(error) {
249
+ this.state.status = "crashed";
250
+ this.state.crashCount++;
251
+ this.state.lastError = error.message;
252
+ // Reject all pending requests
253
+ for (const [id, pending] of this.pendingRequests) {
254
+ clearTimeout(pending.timeout);
255
+ pending.reject(new Error("Desktop app crashed"));
256
+ }
257
+ this.pendingRequests.clear();
258
+ // Auto-restart if under limit
259
+ if (this.state.crashCount <= MAX_RESTARTS && this.lastLaunchOptions) {
260
+ console.error(`Desktop app crashed, restarting (${this.state.crashCount}/${MAX_RESTARTS})...`);
261
+ try {
262
+ await new Promise((resolve) => setTimeout(resolve, 1000)); // Wait before restart
263
+ await this.launch(this.lastLaunchOptions);
264
+ }
265
+ catch (restartError) {
266
+ console.error(`Failed to restart: ${restartError.message}`);
267
+ }
268
+ }
269
+ else {
270
+ this.emit("crash", error);
271
+ }
272
+ }
273
+ /**
274
+ * Send JSON-RPC request
275
+ */
276
+ async sendRequest(method, params) {
277
+ if (!this.isRunning() || !this.process?.stdin) {
278
+ throw new Error("Desktop app is not running");
279
+ }
280
+ const id = ++this.requestId;
281
+ const request = {
282
+ jsonrpc: "2.0",
283
+ id,
284
+ method,
285
+ params,
286
+ };
287
+ return new Promise((resolve, reject) => {
288
+ const timeout = setTimeout(() => {
289
+ this.pendingRequests.delete(id);
290
+ reject(new Error(`Request timeout: ${method}`));
291
+ }, REQUEST_TIMEOUT);
292
+ this.pendingRequests.set(id, {
293
+ resolve: resolve,
294
+ reject,
295
+ timeout,
296
+ });
297
+ const json = JSON.stringify(request);
298
+ this.process.stdin.write(json + "\n");
299
+ });
300
+ }
301
+ /**
302
+ * Add log entry
303
+ */
304
+ addLog(type, message) {
305
+ this.logs.push({
306
+ timestamp: Date.now(),
307
+ type,
308
+ message,
309
+ });
310
+ if (this.logs.length > this.maxLogs) {
311
+ this.logs.shift();
312
+ }
313
+ }
314
+ // ============ Public API Methods ============
315
+ /**
316
+ * Take screenshot
317
+ */
318
+ async screenshotRaw(options) {
319
+ const result = await this.sendRequest("screenshot", options);
320
+ return Buffer.from(result.base64, "base64");
321
+ }
322
+ /**
323
+ * Take screenshot and return base64
324
+ */
325
+ async screenshot(options) {
326
+ const result = await this.sendRequest("screenshot", options);
327
+ return result.base64;
328
+ }
329
+ /**
330
+ * Get screenshot with metadata
331
+ */
332
+ async screenshotWithMeta(options) {
333
+ return this.sendRequest("screenshot", options);
334
+ }
335
+ /**
336
+ * Tap at coordinates
337
+ */
338
+ async tap(x, y) {
339
+ await this.sendRequest("tap", { x, y });
340
+ }
341
+ /**
342
+ * Long press at coordinates
343
+ */
344
+ async longPress(x, y, durationMs = 1000) {
345
+ await this.sendRequest("long_press", { x, y, durationMs });
346
+ }
347
+ /**
348
+ * Swipe gesture
349
+ */
350
+ async swipe(x1, y1, x2, y2, durationMs = 300) {
351
+ await this.sendRequest("swipe", { x1, y1, x2, y2, durationMs });
352
+ }
353
+ /**
354
+ * Swipe in direction
355
+ */
356
+ async swipeDirection(direction, distance) {
357
+ await this.sendRequest("swipe_direction", { direction, distance });
358
+ }
359
+ /**
360
+ * Input text
361
+ */
362
+ async inputText(text) {
363
+ await this.sendRequest("input_text", { text });
364
+ }
365
+ /**
366
+ * Press key
367
+ */
368
+ async pressKey(key, modifiers) {
369
+ await this.sendRequest("key_event", { key, modifiers });
370
+ }
371
+ /**
372
+ * Get UI hierarchy
373
+ */
374
+ async getUiHierarchy(windowId) {
375
+ return this.sendRequest("get_ui_hierarchy", { windowId });
376
+ }
377
+ /**
378
+ * Get UI hierarchy as XML string (for compatibility)
379
+ */
380
+ getUiHierarchyXml() {
381
+ // Not supported - desktop uses accessibility tree
382
+ throw new Error("XML hierarchy not supported for desktop. Use getUiHierarchy() instead.");
383
+ }
384
+ /**
385
+ * Get window information
386
+ */
387
+ async getWindowInfo() {
388
+ return this.sendRequest("get_window_info");
389
+ }
390
+ /**
391
+ * Focus a window
392
+ */
393
+ async focusWindow(windowId) {
394
+ await this.sendRequest("focus_window", { windowId });
395
+ }
396
+ /**
397
+ * Resize a window
398
+ */
399
+ async resizeWindow(width, height, windowId) {
400
+ await this.sendRequest("resize_window", { windowId, width, height });
401
+ }
402
+ /**
403
+ * Get clipboard content
404
+ */
405
+ async getClipboard() {
406
+ const result = await this.sendRequest("get_clipboard");
407
+ return result.text ?? "";
408
+ }
409
+ /**
410
+ * Set clipboard content
411
+ */
412
+ async setClipboard(text) {
413
+ await this.sendRequest("set_clipboard", { text });
414
+ }
415
+ /**
416
+ * Check accessibility permissions
417
+ */
418
+ async checkPermissions() {
419
+ return this.sendRequest("check_permissions");
420
+ }
421
+ /**
422
+ * Get logs
423
+ */
424
+ getLogs(options) {
425
+ let result = [...this.logs];
426
+ if (options?.type) {
427
+ result = result.filter((log) => log.type === options.type);
428
+ }
429
+ if (options?.since) {
430
+ result = result.filter((log) => log.timestamp >= options.since);
431
+ }
432
+ if (options?.limit) {
433
+ result = result.slice(-options.limit);
434
+ }
435
+ return result;
436
+ }
437
+ /**
438
+ * Clear logs
439
+ */
440
+ clearLogs() {
441
+ this.logs = [];
442
+ }
443
+ /**
444
+ * Get performance metrics
445
+ */
446
+ async getPerformanceMetrics() {
447
+ return this.sendRequest("get_performance_metrics");
448
+ }
449
+ /**
450
+ * Get screen size
451
+ */
452
+ async getScreenSize() {
453
+ const info = await this.getWindowInfo();
454
+ if (info.windows.length > 0) {
455
+ const focused = info.windows.find((w) => w.focused) ?? info.windows[0];
456
+ return {
457
+ width: focused.bounds.width,
458
+ height: focused.bounds.height,
459
+ };
460
+ }
461
+ return { width: 1920, height: 1080 }; // Default
462
+ }
463
+ /**
464
+ * Launch app (for compatibility with mobile interface)
465
+ */
466
+ launchApp(packageName) {
467
+ // Desktop doesn't have package-based launch
468
+ return `Desktop platform doesn't support package launch. Use launch_desktop_app to start a Compose Desktop project.`;
469
+ }
470
+ /**
471
+ * Stop app (for compatibility)
472
+ */
473
+ stopApp(packageName) {
474
+ // No-op for desktop
475
+ }
476
+ /**
477
+ * Shell command (not supported)
478
+ */
479
+ shell(command) {
480
+ throw new Error("Shell commands not supported for desktop. Use native APIs.");
481
+ }
482
+ }
483
+ // Export singleton instance
484
+ export const desktopClient = new DesktopClient();
485
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/desktop/client.ts"],"names":[],"mappings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K,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK;gBAC3B,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC,MAAM;aAC9B,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,UAAU;IAClD,CAAC;IAED;;OAEG;IACH,SAAS,CAAC,WAAmB;QAC3B,4CAA4C;QAC5C,OAAO,6GAA6G,CAAC;IACvH,CAAC;IAED;;OAEG;IACH,OAAO,CAAC,WAAmB;QACzB,oBAAoB;IACtB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,OAAe;QACnB,MAAM,IAAI,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAChF,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,aAAa,EAAE,CAAC"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Gradle task detection and launcher for Compose Desktop projects
3
+ */
4
+ import { ChildProcess } from "child_process";
5
+ import type { GradleProject, LaunchOptions } from "./types.js";
6
+ export declare class GradleLauncher {
7
+ /**
8
+ * Check if Gradle wrapper exists in project
9
+ */
10
+ hasGradleWrapper(projectPath: string): boolean;
11
+ /**
12
+ * Get Gradle executable (wrapper or system gradle)
13
+ */
14
+ private getGradleExecutable;
15
+ /**
16
+ * Detect available desktop run tasks in the project
17
+ */
18
+ detectDesktopTasks(projectPath: string): Promise<string[]>;
19
+ /**
20
+ * Analyze Gradle project and return info
21
+ */
22
+ analyzeProject(projectPath: string): Promise<GradleProject>;
23
+ /**
24
+ * Launch desktop app via Gradle
25
+ * Returns the spawned process
26
+ */
27
+ launch(options: LaunchOptions): ChildProcess;
28
+ /**
29
+ * Synchronous version of detectDesktopTasks (for launch)
30
+ */
31
+ private detectDesktopTasksSync;
32
+ /**
33
+ * Stop a running Gradle process
34
+ */
35
+ stop(process: ChildProcess): void;
36
+ /**
37
+ * Check if Gradle daemon is running
38
+ */
39
+ isGradleDaemonRunning(projectPath: string): boolean;
40
+ /**
41
+ * Stop Gradle daemon
42
+ */
43
+ stopGradleDaemon(projectPath: string): void;
44
+ }
45
+ //# sourceMappingURL=gradle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradle.d.ts","sourceRoot":"","sources":["../../src/desktop/gradle.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAmB,YAAY,EAAE,MAAM,eAAe,CAAC;AAG9D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAY/D,qBAAa,cAAc;IACzB;;OAEG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAM9C;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;OAEG;IACG,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAwDhE;;OAEG;IACG,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC;IAuBjE;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,YAAY;IAuD5C;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAsB9B;;OAEG;IACH,IAAI,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;IAcjC;;OAEG;IACH,qBAAqB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO;IAcnD;;OAEG;IACH,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;CAY5C"}