@kaeawc/auto-mobile 0.0.11 → 0.0.13

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
@@ -1,5 +1,20 @@
1
1
  # AutoMobile
2
2
 
3
+ [![Pull Request](https://github.com/kaeawc/auto-mobile/actions/workflows/pull_request.yml/badge.svg)](https://github.com/kaeawc/auto-mobile/actions/workflows/pull_request.yml)
4
+ [![On Merge](https://github.com/kaeawc/auto-mobile/actions/workflows/merge.yml/badge.svg)](https://github.com/kaeawc/auto-mobile/actions/workflows/merge.yml)
5
+ [![Nightly](https://github.com/kaeawc/auto-mobile/actions/workflows/nightly.yml/badge.svg)](https://github.com/kaeawc/auto-mobile/actions/workflows/nightly.yml)
6
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
7
+
8
+ ![Platform: macOS](https://img.shields.io/badge/platform-macOS-lightgrey)
9
+ ![Platform: Linux](https://img.shields.io/badge/platform-Linux-lightgrey)
10
+
11
+ ![TypeScript tests: 2,715](https://img.shields.io/badge/TypeScript_tests-2%2C715-3178C6)
12
+ ![Kotlin tests: 572](https://img.shields.io/badge/Kotlin_tests-572-7F52FF)
13
+ ![Swift tests: 79](https://img.shields.io/badge/Swift_tests-79-F05138)
14
+ ![TS coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/ts-coverage-badge.json)
15
+ ![Kotlin coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/kotlin-coverage-badge.json)
16
+ ![Swift coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/swift-coverage-badge.json)
17
+
3
18
  ![AutoMobile sticker](https://github.com/kaeawc/auto-mobile/raw/main/docs/img/auto_mobile_sticker_splash.png)
4
19
 
5
20
  **AutoMobile lets AI agents control your mobile devices using natural language.** Tell an AI what you want to do, and it interacts with your Android or iOS app.
@@ -36,7 +51,7 @@ It can do all this by being an MCP server that uses standard platform tools like
36
51
  You can use our interactive installer to step through all host platform requirements and configuration options. It checks host dependencies, optionally downloads Android or iOS developer tools, and configured the MCP daemon.
37
52
 
38
53
  ``` bash title="One-line install (click to copy)"
39
- curl -fsSL https://raw.githubusercontent.com/kaeawc/auto-mobile/main/scripts/install/interactive.sh | bash
54
+ curl -fsSL https://raw.githubusercontent.com/kaeawc/auto-mobile/refs/heads/main/scripts/install.sh | bash
40
55
  ```
41
56
 
42
57
  or you can read and follow the [step-by-step manual guide](https://github.com/kaeawc/auto-mobile/blob/main/docs/install.md).
package/README.md.backup CHANGED
@@ -1,5 +1,20 @@
1
1
  # AutoMobile
2
2
 
3
+ [![Pull Request](https://github.com/kaeawc/auto-mobile/actions/workflows/pull_request.yml/badge.svg)](https://github.com/kaeawc/auto-mobile/actions/workflows/pull_request.yml)
4
+ [![On Merge](https://github.com/kaeawc/auto-mobile/actions/workflows/merge.yml/badge.svg)](https://github.com/kaeawc/auto-mobile/actions/workflows/merge.yml)
5
+ [![Nightly](https://github.com/kaeawc/auto-mobile/actions/workflows/nightly.yml/badge.svg)](https://github.com/kaeawc/auto-mobile/actions/workflows/nightly.yml)
6
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
7
+
8
+ ![Platform: macOS](https://img.shields.io/badge/platform-macOS-lightgrey)
9
+ ![Platform: Linux](https://img.shields.io/badge/platform-Linux-lightgrey)
10
+
11
+ ![TypeScript tests: 2,715](https://img.shields.io/badge/TypeScript_tests-2%2C715-3178C6)
12
+ ![Kotlin tests: 572](https://img.shields.io/badge/Kotlin_tests-572-7F52FF)
13
+ ![Swift tests: 79](https://img.shields.io/badge/Swift_tests-79-F05138)
14
+ ![TS coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/ts-coverage-badge.json)
15
+ ![Kotlin coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/kotlin-coverage-badge.json)
16
+ ![Swift coverage](https://img.shields.io/endpoint?url=https://kaeawc.github.io/auto-mobile/swift-coverage-badge.json)
17
+
3
18
  ![AutoMobile sticker](docs/img/auto_mobile_sticker_splash.png)
4
19
 
5
20
  **AutoMobile lets AI agents control your mobile devices using natural language.** Tell an AI what you want to do, and it interacts with your Android or iOS app.
@@ -36,7 +51,7 @@ It can do all this by being an MCP server that uses standard platform tools like
36
51
  You can use our interactive installer to step through all host platform requirements and configuration options. It checks host dependencies, optionally downloads Android or iOS developer tools, and configured the MCP daemon.
37
52
 
38
53
  ``` bash title="One-line install (click to copy)"
39
- curl -fsSL https://raw.githubusercontent.com/kaeawc/auto-mobile/main/scripts/install/interactive.sh | bash
54
+ curl -fsSL https://raw.githubusercontent.com/kaeawc/auto-mobile/refs/heads/main/scripts/install.sh | bash
40
55
  ```
41
56
 
42
57
  or you can read and follow the [step-by-step manual guide](docs/install.md).
@@ -1,30 +1,43 @@
1
1
  import type { Kysely } from "kysely";
2
+ import { sql } from "kysely";
2
3
 
3
- export async function up(db: Kysely<unknown>): Promise<void> {
4
- // Add new columns to performance_audit_results table for live metrics
5
- await db.schema
6
- .alterTable("performance_audit_results")
7
- .addColumn("time_to_first_frame_ms", "real")
8
- .execute();
9
-
10
- await db.schema
11
- .alterTable("performance_audit_results")
12
- .addColumn("time_to_interactive_ms", "real")
13
- .execute();
4
+ async function columnExists(
5
+ db: Kysely<unknown>,
6
+ tableName: string,
7
+ columnName: string
8
+ ): Promise<boolean> {
9
+ const result = await sql<{ name: string }>`
10
+ SELECT name FROM pragma_table_info(${tableName}) WHERE name = ${columnName}
11
+ `.execute(db);
12
+ return result.rows.length > 0;
13
+ }
14
14
 
15
+ async function addColumnIfNotExists(
16
+ db: Kysely<unknown>,
17
+ tableName: string,
18
+ columnName: string,
19
+ columnType: string
20
+ ): Promise<void> {
21
+ if (await columnExists(db, tableName, columnName)) {
22
+ return;
23
+ }
15
24
  await db.schema
16
- .alterTable("performance_audit_results")
17
- .addColumn("frame_rate_fps", "real")
25
+ .alterTable(tableName)
26
+ .addColumn(columnName, columnType)
18
27
  .execute();
28
+ }
19
29
 
20
- await db.schema
21
- .alterTable("performance_audit_results")
22
- .addColumn("node_id", "integer")
23
- .execute();
30
+ export async function up(db: Kysely<unknown>): Promise<void> {
31
+ // Add new columns to performance_audit_results table for live metrics
32
+ await addColumnIfNotExists(db, "performance_audit_results", "time_to_first_frame_ms", "real");
33
+ await addColumnIfNotExists(db, "performance_audit_results", "time_to_interactive_ms", "real");
34
+ await addColumnIfNotExists(db, "performance_audit_results", "frame_rate_fps", "real");
35
+ await addColumnIfNotExists(db, "performance_audit_results", "node_id", "integer");
24
36
 
25
37
  // Create index on node_id for navigation node lookups
26
38
  await db.schema
27
39
  .createIndex("idx_performance_audit_results_node_id")
40
+ .ifNotExists()
28
41
  .on("performance_audit_results")
29
42
  .column("node_id")
30
43
  .execute();
@@ -32,6 +45,7 @@ export async function up(db: Kysely<unknown>): Promise<void> {
32
45
  // Create composite index on (package_name, timestamp) for efficient pruning
33
46
  await db.schema
34
47
  .createIndex("idx_performance_audit_results_package_timestamp")
48
+ .ifNotExists()
35
49
  .on("performance_audit_results")
36
50
  .columns(["package_name", "timestamp"])
37
51
  .execute();