@kaeawc/auto-mobile 0.0.6 → 0.0.7
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 +8 -15
- package/README.md.backup +11 -18
- package/dist/schemas/test-plan.schema.json +647 -0
- package/dist/schemas/tool-definitions.json +3532 -0
- package/dist/src/db/migrations/2025_12_28_000_initial_schema.ts +28 -0
- package/dist/src/db/migrations/2025_12_30_000_performance_thresholds.ts +83 -0
- package/dist/src/db/migrations/2025_12_30_001_navigation_graph.ts +200 -0
- package/dist/src/db/migrations/2025_12_31_000_accessibility_baselines.ts +33 -0
- package/dist/src/db/migrations/2025_12_31_001_memory_audit.ts +118 -0
- package/dist/src/db/migrations/2026_01_01_000_recomposition_metrics.ts +41 -0
- package/dist/src/db/migrations/2026_01_02_000_prediction_history.ts +84 -0
- package/dist/src/db/migrations/2026_01_03_000_feature_flags.ts +18 -0
- package/dist/src/db/migrations/2026_01_03_000_test_executions.ts +44 -0
- package/dist/src/db/migrations/2026_01_05_000_tool_calls.ts +30 -0
- package/dist/src/db/migrations/2026_01_08_000_test_coverage.ts +106 -0
- package/dist/src/db/migrations/2026_01_09_000_video_recordings.ts +62 -0
- package/dist/src/db/migrations/2026_01_10_000_device_snapshots.ts +51 -0
- package/dist/src/index.js +129163 -104043
- package/dist/src/index.js.map +628 -463
- package/package.json +23 -3
- package/schemas/test-plan.schema.json +733 -0
- package/schemas/tool-definitions.json +3967 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
await db.schema
|
|
5
|
+
.createTable("tool_calls")
|
|
6
|
+
.addColumn("id", "integer", col => col.primaryKey().autoIncrement())
|
|
7
|
+
.addColumn("tool_name", "text", col => col.notNull())
|
|
8
|
+
.addColumn("timestamp", "text", col => col.notNull())
|
|
9
|
+
.addColumn("session_uuid", "text")
|
|
10
|
+
.addColumn("created_at", "text", col =>
|
|
11
|
+
col.notNull().defaultTo("datetime('now')")
|
|
12
|
+
)
|
|
13
|
+
.execute();
|
|
14
|
+
|
|
15
|
+
await db.schema
|
|
16
|
+
.createIndex("idx_tool_calls_timestamp")
|
|
17
|
+
.on("tool_calls")
|
|
18
|
+
.column("timestamp")
|
|
19
|
+
.execute();
|
|
20
|
+
|
|
21
|
+
await db.schema
|
|
22
|
+
.createIndex("idx_tool_calls_session_uuid")
|
|
23
|
+
.on("tool_calls")
|
|
24
|
+
.column("session_uuid")
|
|
25
|
+
.execute();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
29
|
+
await db.schema.dropTable("tool_calls").execute();
|
|
30
|
+
}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
// Create test_coverage_sessions table to track test run sessions
|
|
5
|
+
await db.schema
|
|
6
|
+
.createTable("test_coverage_sessions")
|
|
7
|
+
.addColumn("id", "integer", col => col.primaryKey().autoIncrement())
|
|
8
|
+
.addColumn("session_uuid", "text", col => col.notNull().unique())
|
|
9
|
+
.addColumn("app_id", "text", col =>
|
|
10
|
+
col.notNull().references("navigation_apps.app_id").onDelete("cascade")
|
|
11
|
+
)
|
|
12
|
+
.addColumn("start_time", "integer", col => col.notNull())
|
|
13
|
+
.addColumn("end_time", "integer")
|
|
14
|
+
.addColumn("total_nodes_visited", "integer", col => col.notNull().defaultTo(0))
|
|
15
|
+
.addColumn("total_edges_traversed", "integer", col => col.notNull().defaultTo(0))
|
|
16
|
+
.addColumn("created_at", "text", col =>
|
|
17
|
+
col.notNull().defaultTo("datetime('now')")
|
|
18
|
+
)
|
|
19
|
+
.execute();
|
|
20
|
+
|
|
21
|
+
// Create index on session_uuid for fast lookups
|
|
22
|
+
await db.schema
|
|
23
|
+
.createIndex("idx_test_coverage_sessions_uuid")
|
|
24
|
+
.on("test_coverage_sessions")
|
|
25
|
+
.column("session_uuid")
|
|
26
|
+
.execute();
|
|
27
|
+
|
|
28
|
+
// Create index on app_id for filtering by app
|
|
29
|
+
await db.schema
|
|
30
|
+
.createIndex("idx_test_coverage_sessions_app")
|
|
31
|
+
.on("test_coverage_sessions")
|
|
32
|
+
.column("app_id")
|
|
33
|
+
.execute();
|
|
34
|
+
|
|
35
|
+
// Create test_node_coverage table to track which nodes were visited during tests
|
|
36
|
+
await db.schema
|
|
37
|
+
.createTable("test_node_coverage")
|
|
38
|
+
.addColumn("id", "integer", col => col.primaryKey().autoIncrement())
|
|
39
|
+
.addColumn("session_id", "integer", col =>
|
|
40
|
+
col.notNull().references("test_coverage_sessions.id").onDelete("cascade")
|
|
41
|
+
)
|
|
42
|
+
.addColumn("node_id", "integer", col =>
|
|
43
|
+
col.notNull().references("navigation_nodes.id").onDelete("cascade")
|
|
44
|
+
)
|
|
45
|
+
.addColumn("visit_count", "integer", col => col.notNull().defaultTo(1))
|
|
46
|
+
.addColumn("first_visit_time", "integer", col => col.notNull())
|
|
47
|
+
.addColumn("last_visit_time", "integer", col => col.notNull())
|
|
48
|
+
.addColumn("created_at", "text", col =>
|
|
49
|
+
col.notNull().defaultTo("datetime('now')")
|
|
50
|
+
)
|
|
51
|
+
.execute();
|
|
52
|
+
|
|
53
|
+
// Create unique constraint on (session_id, node_id)
|
|
54
|
+
await db.schema
|
|
55
|
+
.createIndex("idx_test_node_coverage_session_node")
|
|
56
|
+
.on("test_node_coverage")
|
|
57
|
+
.columns(["session_id", "node_id"])
|
|
58
|
+
.unique()
|
|
59
|
+
.execute();
|
|
60
|
+
|
|
61
|
+
// Create index on session_id for efficient queries
|
|
62
|
+
await db.schema
|
|
63
|
+
.createIndex("idx_test_node_coverage_session")
|
|
64
|
+
.on("test_node_coverage")
|
|
65
|
+
.column("session_id")
|
|
66
|
+
.execute();
|
|
67
|
+
|
|
68
|
+
// Create test_edge_coverage table to track which edges were traversed during tests
|
|
69
|
+
await db.schema
|
|
70
|
+
.createTable("test_edge_coverage")
|
|
71
|
+
.addColumn("id", "integer", col => col.primaryKey().autoIncrement())
|
|
72
|
+
.addColumn("session_id", "integer", col =>
|
|
73
|
+
col.notNull().references("test_coverage_sessions.id").onDelete("cascade")
|
|
74
|
+
)
|
|
75
|
+
.addColumn("edge_id", "integer", col =>
|
|
76
|
+
col.notNull().references("navigation_edges.id").onDelete("cascade")
|
|
77
|
+
)
|
|
78
|
+
.addColumn("traversal_count", "integer", col => col.notNull().defaultTo(1))
|
|
79
|
+
.addColumn("first_traversal_time", "integer", col => col.notNull())
|
|
80
|
+
.addColumn("last_traversal_time", "integer", col => col.notNull())
|
|
81
|
+
.addColumn("created_at", "text", col =>
|
|
82
|
+
col.notNull().defaultTo("datetime('now')")
|
|
83
|
+
)
|
|
84
|
+
.execute();
|
|
85
|
+
|
|
86
|
+
// Create unique constraint on (session_id, edge_id)
|
|
87
|
+
await db.schema
|
|
88
|
+
.createIndex("idx_test_edge_coverage_session_edge")
|
|
89
|
+
.on("test_edge_coverage")
|
|
90
|
+
.columns(["session_id", "edge_id"])
|
|
91
|
+
.unique()
|
|
92
|
+
.execute();
|
|
93
|
+
|
|
94
|
+
// Create index on session_id for efficient queries
|
|
95
|
+
await db.schema
|
|
96
|
+
.createIndex("idx_test_edge_coverage_session")
|
|
97
|
+
.on("test_edge_coverage")
|
|
98
|
+
.column("session_id")
|
|
99
|
+
.execute();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
103
|
+
await db.schema.dropTable("test_edge_coverage").execute();
|
|
104
|
+
await db.schema.dropTable("test_node_coverage").execute();
|
|
105
|
+
await db.schema.dropTable("test_coverage_sessions").execute();
|
|
106
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
await db.schema
|
|
5
|
+
.createTable("video_recordings")
|
|
6
|
+
.addColumn("recording_id", "text", col => col.primaryKey())
|
|
7
|
+
.addColumn("device_id", "text", col => col.notNull())
|
|
8
|
+
.addColumn("platform", "text", col => col.notNull())
|
|
9
|
+
.addColumn("status", "text", col => col.notNull())
|
|
10
|
+
.addColumn("output_name", "text")
|
|
11
|
+
.addColumn("file_name", "text", col => col.notNull())
|
|
12
|
+
.addColumn("file_path", "text", col => col.notNull())
|
|
13
|
+
.addColumn("format", "text", col => col.notNull())
|
|
14
|
+
.addColumn("size_bytes", "integer", col => col.notNull().defaultTo(0))
|
|
15
|
+
.addColumn("duration_ms", "integer")
|
|
16
|
+
.addColumn("codec", "text")
|
|
17
|
+
.addColumn("created_at", "text", col => col.notNull())
|
|
18
|
+
.addColumn("started_at", "text", col => col.notNull())
|
|
19
|
+
.addColumn("ended_at", "text")
|
|
20
|
+
.addColumn("last_accessed_at", "text", col => col.notNull())
|
|
21
|
+
.addColumn("config_json", "text", col => col.notNull())
|
|
22
|
+
.execute();
|
|
23
|
+
|
|
24
|
+
await db.schema
|
|
25
|
+
.createIndex("idx_video_recordings_status")
|
|
26
|
+
.on("video_recordings")
|
|
27
|
+
.column("status")
|
|
28
|
+
.execute();
|
|
29
|
+
|
|
30
|
+
await db.schema
|
|
31
|
+
.createIndex("idx_video_recordings_device_status")
|
|
32
|
+
.on("video_recordings")
|
|
33
|
+
.columns(["device_id", "status"])
|
|
34
|
+
.execute();
|
|
35
|
+
|
|
36
|
+
await db.schema
|
|
37
|
+
.createIndex("idx_video_recordings_last_accessed_at")
|
|
38
|
+
.on("video_recordings")
|
|
39
|
+
.column("last_accessed_at")
|
|
40
|
+
.execute();
|
|
41
|
+
|
|
42
|
+
await db.schema
|
|
43
|
+
.createIndex("idx_video_recordings_created_at")
|
|
44
|
+
.on("video_recordings")
|
|
45
|
+
.column("created_at")
|
|
46
|
+
.execute();
|
|
47
|
+
|
|
48
|
+
await db.schema
|
|
49
|
+
.createTable("video_recording_configs")
|
|
50
|
+
.addColumn("key", "text", col => col.primaryKey())
|
|
51
|
+
.addColumn("config_json", "text", col => col.notNull())
|
|
52
|
+
.addColumn("updated_at", "text", col => col.notNull())
|
|
53
|
+
.addColumn("created_at", "text", col =>
|
|
54
|
+
col.notNull().defaultTo("datetime('now')")
|
|
55
|
+
)
|
|
56
|
+
.execute();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
60
|
+
await db.schema.dropTable("video_recordings").execute();
|
|
61
|
+
await db.schema.dropTable("video_recording_configs").execute();
|
|
62
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import type { Kysely } from "kysely";
|
|
2
|
+
|
|
3
|
+
export async function up(db: Kysely<unknown>): Promise<void> {
|
|
4
|
+
await db.schema
|
|
5
|
+
.createTable("device_snapshots")
|
|
6
|
+
.addColumn("snapshot_name", "text", col => col.primaryKey())
|
|
7
|
+
.addColumn("device_id", "text", col => col.notNull())
|
|
8
|
+
.addColumn("device_name", "text", col => col.notNull())
|
|
9
|
+
.addColumn("platform", "text", col => col.notNull())
|
|
10
|
+
.addColumn("snapshot_type", "text", col => col.notNull())
|
|
11
|
+
.addColumn("include_app_data", "integer", col => col.notNull())
|
|
12
|
+
.addColumn("include_settings", "integer", col => col.notNull())
|
|
13
|
+
.addColumn("created_at", "text", col => col.notNull())
|
|
14
|
+
.addColumn("last_accessed_at", "text", col => col.notNull())
|
|
15
|
+
.addColumn("size_bytes", "integer", col => col.notNull().defaultTo(0))
|
|
16
|
+
.addColumn("manifest_json", "text", col => col.notNull())
|
|
17
|
+
.execute();
|
|
18
|
+
|
|
19
|
+
await db.schema
|
|
20
|
+
.createIndex("idx_device_snapshots_device_id")
|
|
21
|
+
.on("device_snapshots")
|
|
22
|
+
.column("device_id")
|
|
23
|
+
.execute();
|
|
24
|
+
|
|
25
|
+
await db.schema
|
|
26
|
+
.createIndex("idx_device_snapshots_last_accessed_at")
|
|
27
|
+
.on("device_snapshots")
|
|
28
|
+
.column("last_accessed_at")
|
|
29
|
+
.execute();
|
|
30
|
+
|
|
31
|
+
await db.schema
|
|
32
|
+
.createIndex("idx_device_snapshots_created_at")
|
|
33
|
+
.on("device_snapshots")
|
|
34
|
+
.column("created_at")
|
|
35
|
+
.execute();
|
|
36
|
+
|
|
37
|
+
await db.schema
|
|
38
|
+
.createTable("device_snapshot_configs")
|
|
39
|
+
.addColumn("key", "text", col => col.primaryKey())
|
|
40
|
+
.addColumn("config_json", "text", col => col.notNull())
|
|
41
|
+
.addColumn("updated_at", "text", col => col.notNull())
|
|
42
|
+
.addColumn("created_at", "text", col =>
|
|
43
|
+
col.notNull().defaultTo("datetime('now')")
|
|
44
|
+
)
|
|
45
|
+
.execute();
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export async function down(db: Kysely<unknown>): Promise<void> {
|
|
49
|
+
await db.schema.dropTable("device_snapshots").execute();
|
|
50
|
+
await db.schema.dropTable("device_snapshot_configs").execute();
|
|
51
|
+
}
|