-
Notifications
You must be signed in to change notification settings - Fork 11
feat(container): add first-party Android MCP module #437
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
1113f27
19fdc19
c315741
66ed517
8ef4167
3cd6aa8
5e1e25b
a93d231
a80a75c
85c40cb
b221cd1
000bb52
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| "@prover-coder-ai/docker-git": minor | ||
| --- | ||
|
|
||
| Add Android MCP integration alongside the existing Playwright MCP support (issue #436). | ||
|
|
||
| Projects can now opt into a nested Android emulator sidecar driven by the | ||
| first-party Rust `android-connection` MCP server, mirroring how Playwright MCP works. Enable it | ||
| with the new `--mcp-android` / `--no-mcp-android` create flags, the `mcp-android` | ||
| subcommand, the interactive create-flow prompt, or the `enableMcpAndroid` field | ||
| on the web/API create-project request. When enabled, the generated | ||
| `docker-compose.yml` adds a gated `docker-android` emulator service (KVM, | ||
| ADB port forwarding, headless CI mode) and the agent MCP config writers register | ||
| the Android server so it coexists with Playwright. | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,6 +71,7 @@ bun run docker-git clone https://github.com/ProverCoderAI/docker-git/issues/122 | |
|
|
||
| - `--force` пересоздаёт окружение и удаляет volumes проекта. | ||
| - `--mcp-playwright` включает Playwright MCP и Chromium sidecar для браузерной автоматизации. | ||
| - `--mcp-android` включает first-party Android MCP (`android-connection`) и вложенный sidecar с Android-эмулятором (`docker-android`) для мобильной автоматизации. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value Упростите формулировку для параллельности со строкой Текущая формулировка: содержит больше деталей реализации, чем описание Playwright выше (line 73). Для лучшей параллельности и читаемости рекомендуется: Либо, если детали важны, добавьте аналогичную детализацию для Playwright: 🤖 Prompt for AI AgentsSource: Path instructions |
||
|
|
||
| Автоматический запуск агента: | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| import { Either } from "effect" | ||
|
|
||
| import { type McpAndroidUpCommand, type ParseError } from "../frontend-lib/core/domain.js" | ||
|
|
||
| import { parseProjectDirWithOptions } from "./parser-shared.js" | ||
|
|
||
| // CHANGE: parse "mcp-android" command for existing docker-git projects | ||
| // WHY: allow enabling Android MCP in an already created container/project dir | ||
| // QUOTE(ТЗ): "Подключить mcp-android так же как работает MCP PLAYRIGHT" | ||
| // REF: issue-436 | ||
| // SOURCE: n/a | ||
| // FORMAT THEOREM: forall argv: parseMcpAndroid(argv) = cmd -> deterministic(cmd) | ||
| // PURITY: CORE | ||
| // EFFECT: Effect<McpAndroidUpCommand, ParseError, never> | ||
| // INVARIANT: projectDir is never empty | ||
| // COMPLEXITY: O(n) where n = |argv| | ||
| export const parseMcpAndroid = ( | ||
| args: ReadonlyArray<string> | ||
| ): Either.Either<McpAndroidUpCommand, ParseError> => | ||
| Either.map(parseProjectDirWithOptions(args), ({ projectDir, raw }) => ({ | ||
| _tag: "McpAndroidUp", | ||
| projectDir, | ||
| runUp: raw.up ?? true | ||
| })) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,6 +23,10 @@ export const renderCreateStepLabel = (step: CreateStep, defaults: CreateInputs): | |
| renderExplicitBooleanChoice(defaults.enableMcpPlaywright) | ||
| }]` | ||
| ), | ||
| Match.when( | ||
| "mcpAndroid", | ||
| () => `Enable Android MCP (nested Android emulator)? [${renderExplicitBooleanChoice(defaults.enableMcpAndroid)}]` | ||
| ), | ||
|
Comment on lines
+26
to
+29
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value Функциональная корректность подтверждена. Логика соответствует паттерну других boolean-шагов wizard (mcpPlaywright). Использование Опциональное улучшение терминологии: В Also applies to: 64-69 🤖 Prompt for AI Agents |
||
| Match.when( | ||
| "force", | ||
| () => `Force recreate (overwrite files + wipe volumes)? [${renderExplicitBooleanChoice(defaults.force)}]` | ||
|
|
@@ -57,6 +61,12 @@ export const renderCreateStepLabelWithBufferPreview = ( | |
| ? renderCreateStepLabel(step, defaults) | ||
| : `Enable Playwright MCP (nested Chromium browser)? [${renderExplicitBooleanChoice(enableMcpPlaywright)}]` | ||
| }), | ||
| Match.when("mcpAndroid", () => { | ||
| const enableMcpAndroid = parseExplicitBooleanChoice(buffer) | ||
| return enableMcpAndroid === null | ||
| ? renderCreateStepLabel(step, defaults) | ||
| : `Enable Android MCP (nested Android emulator)? [${renderExplicitBooleanChoice(enableMcpAndroid)}]` | ||
| }), | ||
| Match.when("force", () => { | ||
| const force = parseExplicitBooleanChoice(buffer) | ||
| return force === null | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Уточните упоминание "first-party" и версионирование android-connection.
Строка 8 упоминает "first-party Rust
android-connectionMCP server", но в changeset не указывается:crates/android-connection)Рекомендуется добавить уточнение в скобках: "новый Rust крейт
android-connection" или аналогично для ясности, что это не существующий компонент.🤖 Prompt for AI Agents