@bdayadev/flutter-ultra-mcp 0.0.0 → 1.0.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.
- package/.claude-plugin/marketplace.json +23 -0
- package/.claude-plugin/plugin.json +14 -14
- package/.mcp.json +67 -67
- package/CODE_OF_CONDUCT.md +83 -83
- package/CONTRIBUTING.md +108 -108
- package/LICENSE +201 -201
- package/README.md +77 -77
- package/SECURITY.md +19 -19
- package/dart/ultra_flutter/CHANGELOG.md +34 -34
- package/dart/ultra_flutter/EXTENSIONS.md +61 -61
- package/dart/ultra_flutter/README.md +109 -109
- package/dart/ultra_flutter/pubspec.yaml +37 -37
- package/dart/ultra_flutter_devtools/README.md +7 -7
- package/dart/ultra_flutter_devtools/pubspec.yaml +27 -27
- package/docs/UPSTREAM-PATROL-PRS.md +5 -5
- package/docs/UPSTREAM-SENTRY-PR.md +62 -62
- package/docs/discovery-empirics.md +435 -435
- package/examples/counter-app/README.md +24 -24
- package/examples/counter-app/pubspec.yaml +23 -23
- package/examples/oidc-app/README.md +48 -48
- package/examples/oidc-app/pubspec.yaml +24 -24
- package/package.json +82 -82
- package/packages/flutter-ultra-browser/README.md +29 -29
- package/packages/flutter-ultra-browser/package.json +39 -39
- package/packages/flutter-ultra-build/README.md +60 -60
- package/packages/flutter-ultra-build/package.json +38 -38
- package/packages/flutter-ultra-devtools/README.md +7 -7
- package/packages/flutter-ultra-devtools/package.json +36 -36
- package/packages/flutter-ultra-gesture/README.md +51 -51
- package/packages/flutter-ultra-gesture/package.json +58 -58
- package/packages/flutter-ultra-native-desktop/README.md +131 -131
- package/packages/flutter-ultra-native-desktop/package.json +81 -81
- package/packages/flutter-ultra-native-mobile/README.md +103 -103
- package/packages/flutter-ultra-native-mobile/package.json +72 -72
- package/packages/flutter-ultra-patrol/README.md +40 -40
- package/packages/flutter-ultra-patrol/package.json +38 -38
- package/packages/flutter-ultra-runtime/README.md +63 -63
- package/packages/flutter-ultra-runtime/package.json +69 -69
- package/shared/contracts/package.json +31 -31
- package/shared/device-router/README.md +51 -51
- package/shared/device-router/package.json +62 -62
- package/shared/keyring/README.md +7 -7
- package/shared/keyring/package.json +24 -24
- package/shared/mcp-runtime/README.md +116 -116
- package/shared/mcp-runtime/package.json +58 -58
- package/shared/state-store/README.md +66 -66
- package/shared/state-store/package.json +60 -60
- package/shared/vm-service-client/README.md +135 -135
- package/shared/vm-service-client/package.json +62 -62
- package/skills/_internal-on-tool-failure/SKILL.md +13 -13
- package/skills/_internal-session-bootstrap/SKILL.md +18 -18
- package/skills/debug/SKILL.md +20 -20
- package/skills/devtools/SKILL.md +21 -21
- package/skills/drive/SKILL.md +20 -20
- package/skills/scaffold/SKILL.md +21 -21
- package/skills/setup/SKILL.md +26 -26
- package/skills/test/SKILL.md +19 -19
- package/skills/tour/SKILL.md +22 -22
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@flutter-ultra/flutter-ultra-native-mobile",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"private":
|
|
5
|
-
"description": "MCP server for native mobile overlays: Android UIAutomator via adb, iOS XCUITest via xcrun + go-ios. Solves Chrome Custom Tabs / SafariViewController OAuth via Playwright + deep-link intent dispatch.",
|
|
6
|
-
"license": "Apache-2.0",
|
|
7
|
-
"homepage": "https://github.com/Bdaya-Dev/flutter-ultra-mcp/tree/main/packages/flutter-ultra-native-mobile",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/Bdaya-Dev/flutter-ultra-mcp.git",
|
|
11
|
-
"directory": "packages/flutter-ultra-native-mobile"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/Bdaya-Dev/flutter-ultra-mcp/issues"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"mcp",
|
|
18
|
-
"flutter-ultra",
|
|
19
|
-
"android",
|
|
20
|
-
"ios",
|
|
21
|
-
"adb",
|
|
22
|
-
"uiautomator",
|
|
23
|
-
"xcuitest",
|
|
24
|
-
"go-ios",
|
|
25
|
-
"oauth",
|
|
26
|
-
"chrome-custom-tabs"
|
|
27
|
-
],
|
|
28
|
-
"type": "module",
|
|
29
|
-
"main": "dist/index.js",
|
|
30
|
-
"module": "dist/index.js",
|
|
31
|
-
"types": "dist/index.d.ts",
|
|
32
|
-
"bin": {
|
|
33
|
-
"flutter-ultra-native-mobile": "dist/bin.js"
|
|
34
|
-
},
|
|
35
|
-
"exports": {
|
|
36
|
-
".": {
|
|
37
|
-
"types": "./dist/index.d.ts",
|
|
38
|
-
"import": "./dist/index.js"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"sideEffects": false,
|
|
42
|
-
"files": [
|
|
43
|
-
"dist",
|
|
44
|
-
"README.md"
|
|
45
|
-
],
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build": "tsc -b",
|
|
48
|
-
"lint": "eslint src",
|
|
49
|
-
"test": "vitest run",
|
|
50
|
-
"typecheck": "tsc -b --noEmit",
|
|
51
|
-
"clean": "rimraf dist .turbo *.tsbuildinfo"
|
|
52
|
-
},
|
|
53
|
-
"dependencies": {
|
|
54
|
-
"@flutter-ultra/mcp-runtime": "^0.0.1",
|
|
55
|
-
"@flutter-ultra/state-store": "^0.0.1",
|
|
56
|
-
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
57
|
-
"fast-xml-parser": "^4.5.0",
|
|
58
|
-
"playwright-core": "^1.49.0",
|
|
59
|
-
"zod": "^3.23.8"
|
|
60
|
-
},
|
|
61
|
-
"devDependencies": {
|
|
62
|
-
"rimraf": "^6.0.0",
|
|
63
|
-
"typescript": "^5.6.0",
|
|
64
|
-
"vitest": "^2.1.0"
|
|
65
|
-
},
|
|
66
|
-
"engines": {
|
|
67
|
-
"node": ">=20"
|
|
68
|
-
},
|
|
69
|
-
"publishConfig": {
|
|
70
|
-
"access": "public"
|
|
71
|
-
}
|
|
72
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@flutter-ultra/flutter-ultra-native-mobile",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "MCP server for native mobile overlays: Android UIAutomator via adb, iOS XCUITest via xcrun + go-ios. Solves Chrome Custom Tabs / SafariViewController OAuth via Playwright + deep-link intent dispatch.",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"homepage": "https://github.com/Bdaya-Dev/flutter-ultra-mcp/tree/main/packages/flutter-ultra-native-mobile",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Bdaya-Dev/flutter-ultra-mcp.git",
|
|
11
|
+
"directory": "packages/flutter-ultra-native-mobile"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Bdaya-Dev/flutter-ultra-mcp/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"flutter-ultra",
|
|
19
|
+
"android",
|
|
20
|
+
"ios",
|
|
21
|
+
"adb",
|
|
22
|
+
"uiautomator",
|
|
23
|
+
"xcuitest",
|
|
24
|
+
"go-ios",
|
|
25
|
+
"oauth",
|
|
26
|
+
"chrome-custom-tabs"
|
|
27
|
+
],
|
|
28
|
+
"type": "module",
|
|
29
|
+
"main": "dist/index.js",
|
|
30
|
+
"module": "dist/index.js",
|
|
31
|
+
"types": "dist/index.d.ts",
|
|
32
|
+
"bin": {
|
|
33
|
+
"flutter-ultra-native-mobile": "dist/bin.js"
|
|
34
|
+
},
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"import": "./dist/index.js"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"sideEffects": false,
|
|
42
|
+
"files": [
|
|
43
|
+
"dist",
|
|
44
|
+
"README.md"
|
|
45
|
+
],
|
|
46
|
+
"scripts": {
|
|
47
|
+
"build": "tsc -b",
|
|
48
|
+
"lint": "eslint src",
|
|
49
|
+
"test": "vitest run",
|
|
50
|
+
"typecheck": "tsc -b --noEmit",
|
|
51
|
+
"clean": "rimraf dist .turbo *.tsbuildinfo"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@flutter-ultra/mcp-runtime": "^0.0.1",
|
|
55
|
+
"@flutter-ultra/state-store": "^0.0.1",
|
|
56
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
57
|
+
"fast-xml-parser": "^4.5.0",
|
|
58
|
+
"playwright-core": "^1.49.0",
|
|
59
|
+
"zod": "^3.23.8"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"rimraf": "^6.0.0",
|
|
63
|
+
"typescript": "^5.6.0",
|
|
64
|
+
"vitest": "^2.1.0"
|
|
65
|
+
},
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=20"
|
|
68
|
+
},
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
# @flutter-ultra/flutter-ultra-patrol
|
|
2
|
-
|
|
3
|
-
MCP server orchestrating **Patrol E2E tests** across web, Android, iOS, and desktop. Wraps `patrol_cli` and bundles the [Bdaya patrol fork](https://github.com/Bdaya-Dev/patrol) as a submodule at `vendor/patrol/` so external contributors get the fork automatically with `git clone --recurse-submodules`.
|
|
4
|
-
|
|
5
|
-
## Tool catalogue (13 tools per plan §17B.1)
|
|
6
|
-
|
|
7
|
-
| Tool | Purpose |
|
|
8
|
-
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
-
| `list_tests` | Walk `integration_test/` + `patrol_test/`, return `[{file, testNames[], tags[]}]`. |
|
|
10
|
-
| `start_patrol_test` | MARATHON: spawn `patrol test ...`, return taskId immediately. |
|
|
11
|
-
| `poll_patrol_job` | Non-blocking status + rolling log tail for any marathon job. |
|
|
12
|
-
| `get_patrol_result` | Final structured `{passed, failed, skipped, durations, failures[]}` for a completed test job. |
|
|
13
|
-
| `cancel_patrol_job` | SIGTERM + SIGKILL grace period. Idempotent. |
|
|
14
|
-
| `start_patrol_develop` | MARATHON: warm `patrol develop` session for repeat runs. |
|
|
15
|
-
| `patrol_develop_run` | Dispatch named test inside the warm session (much faster than a fresh `patrol test`). |
|
|
16
|
-
| `patrol_hot_reload` | `r` / `R` to the develop session's stdin. |
|
|
17
|
-
| `take_patrol_screenshot` | CDP screenshot via the develop session (Bdaya `f26306f6`). |
|
|
18
|
-
| `start_patrol_recording` | Bdaya CDP-based GIF/webm recorder. |
|
|
19
|
-
| `stop_patrol_recording` | Finalize the active recording. |
|
|
20
|
-
| `get_patrol_browser_errors` | CDP-captured browser console errors (Bdaya `b591a390`). Defaults to warm session, falls back to most recent test job, or pass `taskId`. |
|
|
21
|
-
| `get_patrol_web_debugger_port` | Surfaces the CDP port the Bdaya fork prints at web target startup so Playwright / DevTools can co-attach. |
|
|
22
|
-
|
|
23
|
-
## Environment contract (from plugin `.mcp.json`)
|
|
24
|
-
|
|
25
|
-
| Var | Used for |
|
|
26
|
-
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
27
|
-
| `FLUTTER_ULTRA_PATROL_FORK` | Absolute path to `vendor/patrol/`. |
|
|
28
|
-
| `FLUTTER_ULTRA_STATE_DIR` | Future on-disk job persistence (in-memory in v1.0). |
|
|
29
|
-
| `PATROL_WEB_BROWSER_ARGS` | Comma-separated Chromium flags merged into every `--web-browser-args`. Default: `--enable-unsafe-swiftshader,--disable-renderer-backgrounding,--disable-background-timer-throttling`. |
|
|
30
|
-
| `FLUTTER_ULTRA_LOG_LEVEL` | `debug`/`info`/`warn`/`error`. Default `info`. |
|
|
31
|
-
|
|
32
|
-
## Invocation strategy
|
|
33
|
-
|
|
34
|
-
For each call we pick (in order):
|
|
35
|
-
|
|
36
|
-
1. `useRawCli: true` → skip wrapper detection.
|
|
37
|
-
2. `./scripts/run_patrol_web.ps1` (Windows) or `./scripts/run_patrol_web.sh` (Unix) at the project root → use it. Some projects standardize on this wrapper to pre-apply env vars + flags.
|
|
38
|
-
3. Otherwise spawn `dart run patrol_cli` from the project root, which resolves through `pubspec_overrides.yaml` to `vendor/patrol/packages/patrol_cli`.
|
|
39
|
-
|
|
40
|
-
Web invocations always set `--web-init-timeout 180000` by default (vs upstream's 60000 hardcode — see Bdaya fork PR #9 in `docs/UPSTREAM-PATROL-PRS.md`).
|
|
1
|
+
# @flutter-ultra/flutter-ultra-patrol
|
|
2
|
+
|
|
3
|
+
MCP server orchestrating **Patrol E2E tests** across web, Android, iOS, and desktop. Wraps `patrol_cli` and bundles the [Bdaya patrol fork](https://github.com/Bdaya-Dev/patrol) as a submodule at `vendor/patrol/` so external contributors get the fork automatically with `git clone --recurse-submodules`.
|
|
4
|
+
|
|
5
|
+
## Tool catalogue (13 tools per plan §17B.1)
|
|
6
|
+
|
|
7
|
+
| Tool | Purpose |
|
|
8
|
+
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------- |
|
|
9
|
+
| `list_tests` | Walk `integration_test/` + `patrol_test/`, return `[{file, testNames[], tags[]}]`. |
|
|
10
|
+
| `start_patrol_test` | MARATHON: spawn `patrol test ...`, return taskId immediately. |
|
|
11
|
+
| `poll_patrol_job` | Non-blocking status + rolling log tail for any marathon job. |
|
|
12
|
+
| `get_patrol_result` | Final structured `{passed, failed, skipped, durations, failures[]}` for a completed test job. |
|
|
13
|
+
| `cancel_patrol_job` | SIGTERM + SIGKILL grace period. Idempotent. |
|
|
14
|
+
| `start_patrol_develop` | MARATHON: warm `patrol develop` session for repeat runs. |
|
|
15
|
+
| `patrol_develop_run` | Dispatch named test inside the warm session (much faster than a fresh `patrol test`). |
|
|
16
|
+
| `patrol_hot_reload` | `r` / `R` to the develop session's stdin. |
|
|
17
|
+
| `take_patrol_screenshot` | CDP screenshot via the develop session (Bdaya `f26306f6`). |
|
|
18
|
+
| `start_patrol_recording` | Bdaya CDP-based GIF/webm recorder. |
|
|
19
|
+
| `stop_patrol_recording` | Finalize the active recording. |
|
|
20
|
+
| `get_patrol_browser_errors` | CDP-captured browser console errors (Bdaya `b591a390`). Defaults to warm session, falls back to most recent test job, or pass `taskId`. |
|
|
21
|
+
| `get_patrol_web_debugger_port` | Surfaces the CDP port the Bdaya fork prints at web target startup so Playwright / DevTools can co-attach. |
|
|
22
|
+
|
|
23
|
+
## Environment contract (from plugin `.mcp.json`)
|
|
24
|
+
|
|
25
|
+
| Var | Used for |
|
|
26
|
+
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
27
|
+
| `FLUTTER_ULTRA_PATROL_FORK` | Absolute path to `vendor/patrol/`. |
|
|
28
|
+
| `FLUTTER_ULTRA_STATE_DIR` | Future on-disk job persistence (in-memory in v1.0). |
|
|
29
|
+
| `PATROL_WEB_BROWSER_ARGS` | Comma-separated Chromium flags merged into every `--web-browser-args`. Default: `--enable-unsafe-swiftshader,--disable-renderer-backgrounding,--disable-background-timer-throttling`. |
|
|
30
|
+
| `FLUTTER_ULTRA_LOG_LEVEL` | `debug`/`info`/`warn`/`error`. Default `info`. |
|
|
31
|
+
|
|
32
|
+
## Invocation strategy
|
|
33
|
+
|
|
34
|
+
For each call we pick (in order):
|
|
35
|
+
|
|
36
|
+
1. `useRawCli: true` → skip wrapper detection.
|
|
37
|
+
2. `./scripts/run_patrol_web.ps1` (Windows) or `./scripts/run_patrol_web.sh` (Unix) at the project root → use it. Some projects standardize on this wrapper to pre-apply env vars + flags.
|
|
38
|
+
3. Otherwise spawn `dart run patrol_cli` from the project root, which resolves through `pubspec_overrides.yaml` to `vendor/patrol/packages/patrol_cli`.
|
|
39
|
+
|
|
40
|
+
Web invocations always set `--web-init-timeout 180000` by default (vs upstream's 60000 hardcode — see Bdaya fork PR #9 in `docs/UPSTREAM-PATROL-PRS.md`).
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@flutter-ultra/flutter-ultra-patrol",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"description": "MCP server for orchestrating patrol_cli E2E tests (web + Android + iOS) using the bundled Bdaya patrol fork.",
|
|
6
|
-
"license": "Apache-2.0",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"bin": {
|
|
11
|
-
"flutter-ultra-patrol": "dist/bin.js"
|
|
12
|
-
},
|
|
13
|
-
"files": [
|
|
14
|
-
"dist",
|
|
15
|
-
"README.md"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"build": "tsc -b",
|
|
19
|
-
"lint": "eslint src",
|
|
20
|
-
"test": "vitest run",
|
|
21
|
-
"test:watch": "vitest",
|
|
22
|
-
"typecheck": "tsc -b --noEmit",
|
|
23
|
-
"clean": "rimraf dist .turbo *.tsbuildinfo"
|
|
24
|
-
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
27
|
-
"zod": "^3.23.8"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@types/node": "^22.0.0",
|
|
31
|
-
"rimraf": "^6.0.0",
|
|
32
|
-
"typescript": "^5.6.0",
|
|
33
|
-
"vitest": "^2.1.0"
|
|
34
|
-
},
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": ">=20"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@flutter-ultra/flutter-ultra-patrol",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "MCP server for orchestrating patrol_cli E2E tests (web + Android + iOS) using the bundled Bdaya patrol fork.",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"bin": {
|
|
11
|
+
"flutter-ultra-patrol": "dist/bin.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsc -b",
|
|
19
|
+
"lint": "eslint src",
|
|
20
|
+
"test": "vitest run",
|
|
21
|
+
"test:watch": "vitest",
|
|
22
|
+
"typecheck": "tsc -b --noEmit",
|
|
23
|
+
"clean": "rimraf dist .turbo *.tsbuildinfo"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
27
|
+
"zod": "^3.23.8"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^22.0.0",
|
|
31
|
+
"rimraf": "^6.0.0",
|
|
32
|
+
"typescript": "^5.6.0",
|
|
33
|
+
"vitest": "^2.1.0"
|
|
34
|
+
},
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=20"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
# @flutter-ultra/flutter-ultra-runtime
|
|
2
|
-
|
|
3
|
-
MCP server for Flutter **runtime control**: discover + attach to `flutter run`
|
|
4
|
-
debug sessions over DDS, introspect the widget tree (read-only), hot
|
|
5
|
-
reload/restart, evaluate Dart, capture HTTP/gRPC traffic, tail logs.
|
|
6
|
-
|
|
7
|
-
Part of the [flutter-ultra-mcp](https://github.com/Bdaya-Dev/flutter-ultra-mcp)
|
|
8
|
-
plugin. See plan §5.2 for the full catalogue.
|
|
9
|
-
|
|
10
|
-
## Tools (28)
|
|
11
|
-
|
|
12
|
-
| Group | Tools |
|
|
13
|
-
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
14
|
-
| Discovery + lifecycle | `discover_sessions`, `attach`, `detach`, `list_sessions`, `launch_app`, `poll_launch_app`, `stop_app`, `hot_reload`, `hot_restart` |
|
|
15
|
-
| Inspection (read-only) | `get_widget_tree`, `get_widget_details`, `get_selected_widget`, `set_selected_widget`, `widget_exists` (rev 23), `find_widget` (rev 23), `count_widget_tree_nodes`, `screenshot`, `dump_render_tree`, `dump_layer_tree`, `dump_semantics_tree`, `evaluate` |
|
|
16
|
-
| Toggles | `toggle_debug_paint`, `toggle_perf_overlay`, `set_time_dilation`, `set_platform_override` |
|
|
17
|
-
| Logs | `get_logs`, `start_tail_logs`, `poll_tail_logs`, `stop_tail_logs`, `get_runtime_errors`, `log_buffer_stats` |
|
|
18
|
-
| HTTP / gRPC capture | `start_http_capture`, `get_http_events`, `stop_http_capture`, `decode_grpc_message` |
|
|
19
|
-
|
|
20
|
-
All inspect tools are read-only side-effect-free; `widget_exists` / `find_widget`
|
|
21
|
-
walk `ext.flutter.inspector.getRootWidgetSummaryTree` per AC-R5.
|
|
22
|
-
|
|
23
|
-
## Session model
|
|
24
|
-
|
|
25
|
-
Sessions persist to `${CLAUDE_PLUGIN_DATA}/state/sessions.json` so the
|
|
26
|
-
gesture, devtools, and patrol servers can read the WS URI without IPC.
|
|
27
|
-
This server is the sole writer. Each session is a `VmServiceClient`
|
|
28
|
-
behind a reference-counted `SessionResource` — parallel tool calls share
|
|
29
|
-
one WebSocket per plan §17.10.
|
|
30
|
-
|
|
31
|
-
DDS multi-client coexistence with VS Code's Dart debugger is automatic;
|
|
32
|
-
our connection sets `setClientName('flutter-ultra/runtime/<pid>')` per
|
|
33
|
-
plan §7.2.
|
|
34
|
-
|
|
35
|
-
## Discovery ladder
|
|
36
|
-
|
|
37
|
-
Implemented per worker-P's empirical report
|
|
38
|
-
([`docs/discovery-empirics.md`](../../docs/discovery-empirics.md)):
|
|
39
|
-
|
|
40
|
-
1. Process scan for `dart` / `flutter` / `dartvm` / `chrome` with
|
|
41
|
-
`--enable-vm-service=<port>` in cmdline.
|
|
42
|
-
2. HTTP GET the raw VM port — the body redirects us to the DDS URI.
|
|
43
|
-
3. Convert `http://...` → `ws://.../ws`.
|
|
44
|
-
4. Probe `getVM` to confirm the URI is alive before returning.
|
|
45
|
-
|
|
46
|
-
## Acceptance criteria covered
|
|
47
|
-
|
|
48
|
-
- **AC-R1**: `hot_reload` completes < 5 s; `get_widget_tree` returns the
|
|
49
|
-
post-reload tree without re-attach.
|
|
50
|
-
- **AC-R2**: WS drop triggers exp-backoff reconnect inside
|
|
51
|
-
`@flutter-ultra/vm-service-client` (0.5/1/2/4/8/14.5 s).
|
|
52
|
-
- **AC-R3**: Per-session `SessionResource<VmServiceClient>` keeps two
|
|
53
|
-
attached sessions strictly isolated.
|
|
54
|
-
- **AC-R4**: `screenshot` returns a PNG ≥ 200 bytes.
|
|
55
|
-
- **AC-R5 (rev 23)**: `widget_exists({kind:'key', value:'X'})` returns
|
|
56
|
-
`{exists, count, bounds?}` in < 300 ms on a 500-node tree without
|
|
57
|
-
triggering setState / hot-reload / route navigation side effects
|
|
58
|
-
(verified via the summary tree extension which is explicitly
|
|
59
|
-
side-effect-free).
|
|
60
|
-
|
|
61
|
-
## License
|
|
62
|
-
|
|
63
|
-
Apache-2.0.
|
|
1
|
+
# @flutter-ultra/flutter-ultra-runtime
|
|
2
|
+
|
|
3
|
+
MCP server for Flutter **runtime control**: discover + attach to `flutter run`
|
|
4
|
+
debug sessions over DDS, introspect the widget tree (read-only), hot
|
|
5
|
+
reload/restart, evaluate Dart, capture HTTP/gRPC traffic, tail logs.
|
|
6
|
+
|
|
7
|
+
Part of the [flutter-ultra-mcp](https://github.com/Bdaya-Dev/flutter-ultra-mcp)
|
|
8
|
+
plugin. See plan §5.2 for the full catalogue.
|
|
9
|
+
|
|
10
|
+
## Tools (28)
|
|
11
|
+
|
|
12
|
+
| Group | Tools |
|
|
13
|
+
| ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
14
|
+
| Discovery + lifecycle | `discover_sessions`, `attach`, `detach`, `list_sessions`, `launch_app`, `poll_launch_app`, `stop_app`, `hot_reload`, `hot_restart` |
|
|
15
|
+
| Inspection (read-only) | `get_widget_tree`, `get_widget_details`, `get_selected_widget`, `set_selected_widget`, `widget_exists` (rev 23), `find_widget` (rev 23), `count_widget_tree_nodes`, `screenshot`, `dump_render_tree`, `dump_layer_tree`, `dump_semantics_tree`, `evaluate` |
|
|
16
|
+
| Toggles | `toggle_debug_paint`, `toggle_perf_overlay`, `set_time_dilation`, `set_platform_override` |
|
|
17
|
+
| Logs | `get_logs`, `start_tail_logs`, `poll_tail_logs`, `stop_tail_logs`, `get_runtime_errors`, `log_buffer_stats` |
|
|
18
|
+
| HTTP / gRPC capture | `start_http_capture`, `get_http_events`, `stop_http_capture`, `decode_grpc_message` |
|
|
19
|
+
|
|
20
|
+
All inspect tools are read-only side-effect-free; `widget_exists` / `find_widget`
|
|
21
|
+
walk `ext.flutter.inspector.getRootWidgetSummaryTree` per AC-R5.
|
|
22
|
+
|
|
23
|
+
## Session model
|
|
24
|
+
|
|
25
|
+
Sessions persist to `${CLAUDE_PLUGIN_DATA}/state/sessions.json` so the
|
|
26
|
+
gesture, devtools, and patrol servers can read the WS URI without IPC.
|
|
27
|
+
This server is the sole writer. Each session is a `VmServiceClient`
|
|
28
|
+
behind a reference-counted `SessionResource` — parallel tool calls share
|
|
29
|
+
one WebSocket per plan §17.10.
|
|
30
|
+
|
|
31
|
+
DDS multi-client coexistence with VS Code's Dart debugger is automatic;
|
|
32
|
+
our connection sets `setClientName('flutter-ultra/runtime/<pid>')` per
|
|
33
|
+
plan §7.2.
|
|
34
|
+
|
|
35
|
+
## Discovery ladder
|
|
36
|
+
|
|
37
|
+
Implemented per worker-P's empirical report
|
|
38
|
+
([`docs/discovery-empirics.md`](../../docs/discovery-empirics.md)):
|
|
39
|
+
|
|
40
|
+
1. Process scan for `dart` / `flutter` / `dartvm` / `chrome` with
|
|
41
|
+
`--enable-vm-service=<port>` in cmdline.
|
|
42
|
+
2. HTTP GET the raw VM port — the body redirects us to the DDS URI.
|
|
43
|
+
3. Convert `http://...` → `ws://.../ws`.
|
|
44
|
+
4. Probe `getVM` to confirm the URI is alive before returning.
|
|
45
|
+
|
|
46
|
+
## Acceptance criteria covered
|
|
47
|
+
|
|
48
|
+
- **AC-R1**: `hot_reload` completes < 5 s; `get_widget_tree` returns the
|
|
49
|
+
post-reload tree without re-attach.
|
|
50
|
+
- **AC-R2**: WS drop triggers exp-backoff reconnect inside
|
|
51
|
+
`@flutter-ultra/vm-service-client` (0.5/1/2/4/8/14.5 s).
|
|
52
|
+
- **AC-R3**: Per-session `SessionResource<VmServiceClient>` keeps two
|
|
53
|
+
attached sessions strictly isolated.
|
|
54
|
+
- **AC-R4**: `screenshot` returns a PNG ≥ 200 bytes.
|
|
55
|
+
- **AC-R5 (rev 23)**: `widget_exists({kind:'key', value:'X'})` returns
|
|
56
|
+
`{exists, count, bounds?}` in < 300 ms on a 500-node tree without
|
|
57
|
+
triggering setState / hot-reload / route navigation side effects
|
|
58
|
+
(verified via the summary tree extension which is explicitly
|
|
59
|
+
side-effect-free).
|
|
60
|
+
|
|
61
|
+
## License
|
|
62
|
+
|
|
63
|
+
Apache-2.0.
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@flutter-ultra/flutter-ultra-runtime",
|
|
3
|
-
"version": "0.0.1",
|
|
4
|
-
"private":
|
|
5
|
-
"description": "MCP server for Flutter runtime: discover + attach to flutter run sessions over DDS, introspect VM Service, hot reload, screenshots, HTTP/gRPC capture.",
|
|
6
|
-
"license": "Apache-2.0",
|
|
7
|
-
"homepage": "https://github.com/Bdaya-Dev/flutter-ultra-mcp/tree/main/packages/flutter-ultra-runtime",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "git+https://github.com/Bdaya-Dev/flutter-ultra-mcp.git",
|
|
11
|
-
"directory": "packages/flutter-ultra-runtime"
|
|
12
|
-
},
|
|
13
|
-
"bugs": {
|
|
14
|
-
"url": "https://github.com/Bdaya-Dev/flutter-ultra-mcp/issues"
|
|
15
|
-
},
|
|
16
|
-
"keywords": [
|
|
17
|
-
"mcp",
|
|
18
|
-
"flutter",
|
|
19
|
-
"dart",
|
|
20
|
-
"vm-service",
|
|
21
|
-
"dds",
|
|
22
|
-
"hot-reload"
|
|
23
|
-
],
|
|
24
|
-
"type": "module",
|
|
25
|
-
"main": "dist/index.js",
|
|
26
|
-
"module": "dist/index.js",
|
|
27
|
-
"types": "dist/index.d.ts",
|
|
28
|
-
"bin": {
|
|
29
|
-
"flutter-ultra-runtime": "dist/bin.js"
|
|
30
|
-
},
|
|
31
|
-
"exports": {
|
|
32
|
-
".": {
|
|
33
|
-
"types": "./dist/index.d.ts",
|
|
34
|
-
"import": "./dist/index.js"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"sideEffects": false,
|
|
38
|
-
"files": [
|
|
39
|
-
"dist",
|
|
40
|
-
"README.md"
|
|
41
|
-
],
|
|
42
|
-
"scripts": {
|
|
43
|
-
"build": "tsc -b",
|
|
44
|
-
"lint": "eslint src",
|
|
45
|
-
"test": "vitest run",
|
|
46
|
-
"typecheck": "tsc -b --noEmit",
|
|
47
|
-
"clean": "rimraf dist .turbo *.tsbuildinfo"
|
|
48
|
-
},
|
|
49
|
-
"dependencies": {
|
|
50
|
-
"@flutter-ultra/device-router": "^0.0.1",
|
|
51
|
-
"@flutter-ultra/mcp-runtime": "^0.0.1",
|
|
52
|
-
"@flutter-ultra/state-store": "^0.0.1",
|
|
53
|
-
"@flutter-ultra/vm-service-client": "^0.0.1",
|
|
54
|
-
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
55
|
-
"protobufjs": "^7.4.0",
|
|
56
|
-
"zod": "^3.23.8"
|
|
57
|
-
},
|
|
58
|
-
"devDependencies": {
|
|
59
|
-
"rimraf": "^6.0.0",
|
|
60
|
-
"typescript": "^5.6.0",
|
|
61
|
-
"vitest": "^2.1.0"
|
|
62
|
-
},
|
|
63
|
-
"engines": {
|
|
64
|
-
"node": ">=20"
|
|
65
|
-
},
|
|
66
|
-
"publishConfig": {
|
|
67
|
-
"access": "public"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@flutter-ultra/flutter-ultra-runtime",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "MCP server for Flutter runtime: discover + attach to flutter run sessions over DDS, introspect VM Service, hot reload, screenshots, HTTP/gRPC capture.",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"homepage": "https://github.com/Bdaya-Dev/flutter-ultra-mcp/tree/main/packages/flutter-ultra-runtime",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/Bdaya-Dev/flutter-ultra-mcp.git",
|
|
11
|
+
"directory": "packages/flutter-ultra-runtime"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/Bdaya-Dev/flutter-ultra-mcp/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"mcp",
|
|
18
|
+
"flutter",
|
|
19
|
+
"dart",
|
|
20
|
+
"vm-service",
|
|
21
|
+
"dds",
|
|
22
|
+
"hot-reload"
|
|
23
|
+
],
|
|
24
|
+
"type": "module",
|
|
25
|
+
"main": "dist/index.js",
|
|
26
|
+
"module": "dist/index.js",
|
|
27
|
+
"types": "dist/index.d.ts",
|
|
28
|
+
"bin": {
|
|
29
|
+
"flutter-ultra-runtime": "dist/bin.js"
|
|
30
|
+
},
|
|
31
|
+
"exports": {
|
|
32
|
+
".": {
|
|
33
|
+
"types": "./dist/index.d.ts",
|
|
34
|
+
"import": "./dist/index.js"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"sideEffects": false,
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"README.md"
|
|
41
|
+
],
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc -b",
|
|
44
|
+
"lint": "eslint src",
|
|
45
|
+
"test": "vitest run",
|
|
46
|
+
"typecheck": "tsc -b --noEmit",
|
|
47
|
+
"clean": "rimraf dist .turbo *.tsbuildinfo"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@flutter-ultra/device-router": "^0.0.1",
|
|
51
|
+
"@flutter-ultra/mcp-runtime": "^0.0.1",
|
|
52
|
+
"@flutter-ultra/state-store": "^0.0.1",
|
|
53
|
+
"@flutter-ultra/vm-service-client": "^0.0.1",
|
|
54
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
55
|
+
"protobufjs": "^7.4.0",
|
|
56
|
+
"zod": "^3.23.8"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"rimraf": "^6.0.0",
|
|
60
|
+
"typescript": "^5.6.0",
|
|
61
|
+
"vitest": "^2.1.0"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=20"
|
|
65
|
+
},
|
|
66
|
+
"publishConfig": {
|
|
67
|
+
"access": "public"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@flutter-ultra/contracts",
|
|
3
|
-
"version": "0.0.0",
|
|
4
|
-
"private": true,
|
|
5
|
-
"description": "JSON Schema contract definitions for ext.flutter.ultra.* wire format
|
|
6
|
-
"license": "Apache-2.0",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist",
|
|
12
|
-
"ext-flutter-ultra",
|
|
13
|
-
"README.md"
|
|
14
|
-
],
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsc -b",
|
|
17
|
-
"lint": "eslint src",
|
|
18
|
-
"test": "vitest run",
|
|
19
|
-
"test:contract": "vitest run",
|
|
20
|
-
"typecheck": "tsc -b --noEmit",
|
|
21
|
-
"clean": "rimraf dist .turbo *.tsbuildinfo"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"ajv": "^8.20.0",
|
|
25
|
-
"ajv-formats": "^3.0.1",
|
|
26
|
-
"zod": "^3.24.0"
|
|
27
|
-
},
|
|
28
|
-
"devDependencies": {
|
|
29
|
-
"vitest": "^3.2.4"
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@flutter-ultra/contracts",
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"description": "JSON Schema contract definitions for ext.flutter.ultra.* wire format \u00e2\u20ac\u201d single source of truth for TS\u00e2\u2020\u201dDart interop.",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist",
|
|
12
|
+
"ext-flutter-ultra",
|
|
13
|
+
"README.md"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc -b",
|
|
17
|
+
"lint": "eslint src",
|
|
18
|
+
"test": "vitest run",
|
|
19
|
+
"test:contract": "vitest run",
|
|
20
|
+
"typecheck": "tsc -b --noEmit",
|
|
21
|
+
"clean": "rimraf dist .turbo *.tsbuildinfo"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"ajv": "^8.20.0",
|
|
25
|
+
"ajv-formats": "^3.0.1",
|
|
26
|
+
"zod": "^3.24.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"vitest": "^3.2.4"
|
|
30
|
+
}
|
|
31
|
+
}
|