Skip to content

Commit 3b43ed8

Browse files
Add skeleton for dev_mcp_host DevTools extension (#53)
Note for reviewers: the `build/` directory is generated code and does not need to be reviewed. This is the built assets of the dev_mcp_host flutter web app (pre requisite for loading the DevTools extension in a real DevTools-hosted environment)
1 parent 066fe16 commit 3b43ed8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+127964
-0
lines changed

.vscode/launch.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "dev_mcp_host + simulated environment",
9+
"cwd": "pkgs/dev_mcp_host",
10+
"request": "launch",
11+
"type": "dart",
12+
"args": [
13+
"--dart-define=use_simulated_environment=true"
14+
],
15+
},
16+
{
17+
"name": "counter_app",
18+
"cwd": "pkgs/dart_tooling_mcp_server/test_fixtures/counter_app",
19+
"request": "launch",
20+
"type": "dart"
21+
},
22+
{
23+
"name": "counter_app (profile mode)",
24+
"cwd": "pkgs/dart_tooling_mcp_server/test_fixtures/counter_app",
25+
"request": "launch",
26+
"type": "dart",
27+
"flutterMode": "profile"
28+
},
29+
{
30+
"name": "counter_app (release mode)",
31+
"cwd": "pkgs/dart_tooling_mcp_server/test_fixtures/counter_app",
32+
"request": "launch",
33+
"type": "dart",
34+
"flutterMode": "release"
35+
}
36+
]
37+
}

pkgs/dev_mcp_host/.gitignore

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Miscellaneous
2+
*.class
3+
*.log
4+
*.pyc
5+
*.swp
6+
.DS_Store
7+
.atom/
8+
.build/
9+
.buildlog/
10+
.history
11+
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
14+
15+
# IntelliJ related
16+
*.iml
17+
*.ipr
18+
*.iws
19+
.idea/
20+
21+
# The .vscode folder contains launch configuration and tasks you configure in
22+
# VS Code which you may wish to be included in version control, so this line
23+
# is commented out by default.
24+
#.vscode/
25+
26+
# Flutter/Dart/Pub related
27+
**/doc/api/
28+
**/ios/Flutter/.last_build_id
29+
.dart_tool/
30+
.flutter-plugins
31+
.flutter-plugins-dependencies
32+
.pub-cache/
33+
.pub/
34+
/build/
35+
36+
# Symbolication related
37+
app.*.symbols
38+
39+
# Obfuscation related
40+
app.*.map.json
41+
42+
# Android Studio will place build artifacts here
43+
/android/app/debug
44+
/android/app/profile
45+
/android/app/release

pkgs/dev_mcp_host/.metadata

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This file tracks properties of this Flutter project.
2+
# Used by Flutter tool to assess capabilities and perform upgrades etc.
3+
#
4+
# This file should be version controlled and should not be manually edited.
5+
6+
version:
7+
revision: "ceec33f16beaccf5e7a86099f0544ea52a327b28"
8+
channel: "[user-branch]"
9+
10+
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: ceec33f16beaccf5e7a86099f0544ea52a327b28
17+
base_revision: ceec33f16beaccf5e7a86099f0544ea52a327b28
18+
- platform: web
19+
create_revision: ceec33f16beaccf5e7a86099f0544ea52a327b28
20+
base_revision: ceec33f16beaccf5e7a86099f0544ea52a327b28
21+
22+
# User provided section
23+
24+
# List of Local paths (relative to this file) that should be
25+
# ignored by the migrate tool.
26+
#
27+
# Files that are not part of the templates will be ignored by default.
28+
unmanaged_files:
29+
- 'lib/main.dart'
30+
- 'ios/Runner.xcodeproj/project.pbxproj'

pkgs/dev_mcp_host/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# dev_mcp_host
2+
3+
A DevTools extension that acts as an MCP Host & Client for development purposes.
4+
5+
## Using this extension to develop the Dart Tooling MCP Server
6+
7+
### From VS code
8+
9+
These instructions will also apply to VS code based IDEs, like Cursor, where the
10+
Dart-Code extension is installed.
11+
12+
1. Open the `ai/` folder in your IDE.
13+
2. Navigate to the Flutter sidebar to see the `dev_mcp_host` DevTools extension.
14+
3. Open the `dev_mcp_host` extension. The extension will automatically be
15+
connected to the DTD instance managed by the IDE.
16+
17+
### From IntelliJ / Android Studio
18+
19+
1. Open the `ai/` folder in your IDE.
20+
2. Navigate to the DevTools Extensions tool window.
21+
3. Open the `dev_mcp_host` DevTools tab. The extension will automatically be
22+
connected to the DTD instance managed by the IDE.
23+
24+
## Developing the extension
25+
26+
Launch the extension web app in the simulated environment by using the provided
27+
VS Code launch configuration, or run this command from `dev_mcp_host`:
28+
29+
```shell
30+
flutter run -d chrome --dart-define=use_simulated_environment=true
31+
```
32+
33+
## Building the extension
34+
35+
To build your extension so that it can be served from a real instance of
36+
DevTools, run the build command:
37+
38+
```shell
39+
cd dev_mcp_host;
40+
flutter pub get;
41+
dart run devtools_extensions build_and_copy --source=. --dest=./extension/devtools
42+
```
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://dart.dev/guides/language/analysis-options
2+
3+
include: package:flutter_lints/flutter.yaml
4+
5+
linter:
6+
rules:
7+
- prefer_final_locals
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
description: This file stores settings for Dart & Flutter DevTools.
2+
documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
3+
extensions:
4+
- dev_mcp_host: true
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
68ea93ac2feaa771332bb5732a58c425

pkgs/dev_mcp_host/extension/devtools/build/assets/AssetManifest.bin

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2packages/cupertino_icons/assets/CupertinoIcons.ttf asset2packages/cupertino_icons/assets/CupertinoIcons.ttf:packages/devtools_app_shared/fonts/Roboto/Roboto-Black.ttf asset:packages/devtools_app_shared/fonts/Roboto/Roboto-Black.ttf9packages/devtools_app_shared/fonts/Roboto/Roboto-Bold.ttf asset9packages/devtools_app_shared/fonts/Roboto/Roboto-Bold.ttf:packages/devtools_app_shared/fonts/Roboto/Roboto-Light.ttf asset:packages/devtools_app_shared/fonts/Roboto/Roboto-Light.ttf;packages/devtools_app_shared/fonts/Roboto/Roboto-Medium.ttf asset;packages/devtools_app_shared/fonts/Roboto/Roboto-Medium.ttf<packages/devtools_app_shared/fonts/Roboto/Roboto-Regular.ttf asset<packages/devtools_app_shared/fonts/Roboto/Roboto-Regular.ttf9packages/devtools_app_shared/fonts/Roboto/Roboto-Thin.ttf asset9packages/devtools_app_shared/fonts/Roboto/Roboto-Thin.ttfBpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Bold.ttf assetBpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Bold.ttfCpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Light.ttf assetCpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Light.ttfDpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Medium.ttf assetDpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Medium.ttfEpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Regular.ttf assetEpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Regular.ttfBpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Thin.ttf assetBpackages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Thin.ttf
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"DQwHMnBhY2thZ2VzL2N1cGVydGlub19pY29ucy9hc3NldHMvQ3VwZXJ0aW5vSWNvbnMudHRmDAENAQcFYXNzZXQHMnBhY2thZ2VzL2N1cGVydGlub19pY29ucy9hc3NldHMvQ3VwZXJ0a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dGYHQnBhY2thZ2VzL2RldnRvb2xzX2FwcF9zaGFyZWQvZm9udHMvUm9ib3RvX01vbm8vUm9ib3RvTW9uby1Cb2xkLnR0ZgwBDQEHBWFzc2V0B0JwYWNrYWdlcy9kZXZ0b29sc19hcHBfc2hhcmVkL2ZvbnRzL1JvYm90b19Nb25vL1JvYm90b01vbm8tQm9sZC50dGYHQ3BhY2thZ2VzL2RldnRvb2xzX2FwcF9zaGFyZWQvZm9udHMvUm9ib3RvX01vbm8vUm9ib3RvTW9uby1MaWdodC50dGYMAQ0BBwVhc3NldAdDcGFja2FnZXMvZGV2dG9vbHNfYXBwX3NoYXJlZC9mb250cy9Sb2JvdG9fTW9uby9Sb2JvdG9Nb25vLUxpZ2h0LnR0ZgdEcGFja2FnZXMvZGV2dG9vbHNfYXBwX3NoYXJlZC9mb250cy9Sb2JvdG9fTW9uby9Sb2JvdG9Nb25vLU1lZGl1bS50dGYMAQ0BBwVhc3NldAdEcGFja2FnZXMvZGV2dG9vbHNfYXBwX3NoYXJlZC9mb250cy9Sb2JvdG9fTW9uby9Sb2JvdG9Nb25vLU1lZGl1bS50dGYHRXBhY2thZ2VzL2RldnRvb2xzX2FwcF9zaGFyZWQvZm9udHMvUm9ib3RvX01vbm8vUm9ib3RvTW9uby1SZWd1bGFyLnR0ZgwBDQEHBWFzc2V0B0VwYWNrYWdlcy9kZXZ0b29sc19hcHBfc2hhcmVkL2ZvbnRzL1JvYm90b19Nb25vL1JvYm90b01vbm8tUmVndWxhci50dGYHQnBhY2thZ2VzL2RldnRvb2xzX2FwcF9zaGFyZWQvZm9udHMvUm9ib3RvX01vbm8vUm9ib3RvTW9uby1UaGluLnR0ZgwBDQEHBWFzc2V0B0JwYWNrYWdlcy9kZXZ0b29sc19hcHBfc2hhcmVkL2ZvbnRzL1JvYm90b19Nb25vL1JvYm90b01vbm8tVGhpbi50dGY="
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"packages/cupertino_icons/assets/CupertinoIcons.ttf":["packages/cupertino_icons/assets/CupertinoIcons.ttf"],"packages/devtools_app_shared/fonts/Roboto/Roboto-Black.ttf":["packages/devtools_app_shared/fonts/Roboto/Roboto-Black.ttf"],"packages/devtools_app_shared/fonts/Roboto/Roboto-Bold.ttf":["packages/devtools_app_shared/fonts/Roboto/Roboto-Bold.ttf"],"packages/devtools_app_shared/fonts/Roboto/Roboto-Light.ttf":["packages/devtools_app_shared/fonts/Roboto/Roboto-Light.ttf"],"packages/devtools_app_shared/fonts/Roboto/Roboto-Medium.ttf":["packages/devtools_app_shared/fonts/Roboto/Roboto-Medium.ttf"],"packages/devtools_app_shared/fonts/Roboto/Roboto-Regular.ttf":["packages/devtools_app_shared/fonts/Roboto/Roboto-Regular.ttf"],"packages/devtools_app_shared/fonts/Roboto/Roboto-Thin.ttf":["packages/devtools_app_shared/fonts/Roboto/Roboto-Thin.ttf"],"packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Bold.ttf":["packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Bold.ttf"],"packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Light.ttf":["packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Light.ttf"],"packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Medium.ttf":["packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Medium.ttf"],"packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Regular.ttf":["packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Regular.ttf"],"packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Thin.ttf":["packages/devtools_app_shared/fonts/Roboto_Mono/RobotoMono-Thin.ttf"]}

0 commit comments

Comments
 (0)