Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 15 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,8 @@ actions, screenshots, semantic Snapshots, logs, run reports, and timeline
views. The goal is to make a UI bug report readable by humans, CI, and AI
coding agents without relying on vague manual reproduction notes.

Flutter Pilot builds above `mcp_flutter`, which provides the Flutter runtime
bridge for interaction and inspection. Thanks to the `mcp_flutter` project for
making Flutter UI state and runtime operations available through a toolable
interface.
Flutter Pilot drives debug Runtime Targets through `pilot_runtime`, the
Flutter Pilot-owned runtime package for app-side interaction and inspection.

## What It Does

Expand Down Expand Up @@ -102,28 +100,28 @@ Install the Flutter Pilot CLI:
dart pub global activate flutter_pilot
```

Flutter Pilot drives a Flutter app through `mcp_flutter`. The target app must
expose the MCP Toolkit runtime extension before `flutter_pilot test` can
interact with it.
Flutter Pilot drives a Flutter app through `pilot_runtime`. The target app must
initialize the Pilot Runtime binding before `flutter_pilot test` can interact
with it.

From the Target App Package, initialize the safe app-side setup:

```bash
flutter_pilot init
```

`init` installs the MCP Toolkit runtime dependency when it is missing. It does
not edit `lib/main.dart`; when `bootstrapFlutter` is missing, it prints the
import and `runApp` wrapper to add manually:
`init` installs the `pilot_runtime` dependency when it is missing. It does not
edit `lib/main.dart`; when `PilotRuntimeBinding.ensureInitialized()` is
missing, it prints the import and binding call to add manually:

```dart
import 'package:flutter/material.dart';
import 'package:mcp_toolkit/mcp_toolkit.dart';
import 'package:pilot_runtime/pilot_runtime.dart';

Future<void> main() async {
await MCPToolkitBinding.instance.bootstrapFlutter(
runApp: () => runApp(const MyApp()),
);
void main() {
WidgetsFlutterBinding.ensureInitialized();
PilotRuntimeBinding.ensureInitialized();
runApp(const MyApp());
}
```

Expand Down Expand Up @@ -288,6 +286,5 @@ consistent.

## Scope

Flutter Pilot focuses on reproducible Flutter UI debugging artifacts. It does
not replace `mcp_flutter`, and it is not trying to become a broad visual
regression platform in the first version.
Flutter Pilot focuses on reproducible Flutter UI debugging artifacts. It is not
trying to become a broad visual regression platform in the first version.
31 changes: 15 additions & 16 deletions README_zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ Flutter UI 操作路径描述成可提交、可分享、可重复执行的 YAML
调试所需的上下文整理成适合开发者、CI 和 AI 编码代理阅读的产物。

> 项目状态:Flutter Pilot 仍在开发中。当前实现重点是 Dart CLI、Scenario
> YAML 解析与校验、报告生成和命令外壳;通过 `mcp_flutter` 实际驱动 Flutter
> UI 的执行能力还在建设中
> YAML 解析与校验、报告生成和命令外壳;通过 `pilot_runtime` 驱动 Flutter
> UI 的执行能力正在建设中

Flutter Pilot 构建在 `mcp_flutter` 之上。`mcp_flutter` 负责提供 Flutter
运行时交互和检查能力,Flutter Pilot 则在其上增加 Scenario DSL、调试产物收集、
运行报告和后续 diff 能力。
Flutter Pilot 通过 `pilot_runtime` 驱动 Flutter debug Runtime Target。
`pilot_runtime` 是 Flutter Pilot 自有的运行时包,负责应用侧交互和检查能力。

## 它能做什么

Expand Down Expand Up @@ -95,26 +94,27 @@ HTML timeline report 会把同一次 UI 旅程转换成可视化审查界面。
dart pub global activate flutter_pilot
```

Flutter Pilot 通过 `mcp_flutter` 驱动 Flutter 应用。目标应用需要先暴露 MCP
Toolkit 运行时扩展,`flutter_pilot test` 才能和它交互。
Flutter Pilot 通过 `pilot_runtime` 驱动 Flutter 应用。目标应用需要先初始化
Pilot Runtime binding,`flutter_pilot test` 才能和它交互。

在 Target App Package 中初始化安全的应用侧配置:

```bash
flutter_pilot init
```

`init` 会在缺少 MCP Toolkit 运行时依赖时安装它。它不会修改 `lib/main.dart`;
如果缺少 `bootstrapFlutter`,它会打印需要手动添加的 import 和 `runApp` 包裹代码:
`init` 会在缺少 `pilot_runtime` 依赖时安装它。它不会修改 `lib/main.dart`;
如果缺少 `PilotRuntimeBinding.ensureInitialized()`,它会打印需要手动添加的
import 和 binding 调用:

```dart
import 'package:flutter/material.dart';
import 'package:mcp_toolkit/mcp_toolkit.dart';
import 'package:pilot_runtime/pilot_runtime.dart';

Future<void> main() async {
await MCPToolkitBinding.instance.bootstrapFlutter(
runApp: () => runApp(const MyApp()),
);
void main() {
WidgetsFlutterBinding.ensureInitialized();
PilotRuntimeBinding.ensureInitialized();
runApp(const MyApp());
}
```

Expand Down Expand Up @@ -268,5 +268,4 @@ dart test

## 范围

Flutter Pilot 聚焦可复现的 Flutter UI 调试产物。它不会替代 `mcp_flutter`,
第一版也不会扩展成通用的视觉回归平台。
Flutter Pilot 聚焦可复现的 Flutter UI 调试产物。第一版不会扩展成通用的视觉回归平台。
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Use Dart CLI with YAML Scenario DSL for Flutter Pilot

Flutter Pilot will start as a Dart CLI package with a YAML Scenario DSL, rather than a Flutter app, an `integration_test` wrapper, or a standalone MCP server. A CLI gives humans, CI, and AI agents a stable command surface for validating scenarios, replaying UI paths, and collecting artifacts, while the YAML Scenario format keeps reproductions portable across machines and Runtime Targets. This keeps Flutter Pilot focused on reproducible debugging artifacts above `mcp_flutter`, instead of coupling the first version to a specific UI shell or Flutter test harness.
Flutter Pilot will start as a Dart CLI package with a YAML Scenario DSL, rather than a Flutter app, an `integration_test` wrapper, or a standalone MCP server. A CLI gives humans, CI, and AI agents a stable command surface for validating scenarios, replaying UI paths, and collecting artifacts, while the YAML Scenario format keeps reproductions portable across machines and Runtime Targets. This keeps Flutter Pilot focused on reproducible debugging artifacts through `pilot_runtime`, instead of coupling the first version to a specific UI shell or Flutter test harness.
Loading
Loading