im_wower
·
2026-03-21
T-009-firefox-pause.md
1---
2task_id: T-009
3title: Firefox 插件 Pause 与 Resume 协议
4status: done
5branch: feat/T-009-firefox-pause
6repo: /Users/george/code/baa-conductor
7base_ref: main@56e9a4f
8depends_on:
9 - T-001
10write_scope:
11 - docs/firefox/**
12updated_at: 2026-03-21
13---
14
15# T-009 Firefox 插件 Pause 与 Resume 协议
16
17## 目标
18
19先在本仓库中明确 Firefox 插件与 conductor control API 之间的协议,方便后续在插件仓库同步实现。
20
21## 统一开工要求
22
23- 必须从 `main@56e9a4f` 切出该分支
24- 新 worktree 进入后先执行 `npx --yes pnpm install`
25- 不允许从其他任务分支切分支
26
27## 本任务包含
28
29- 定义浏览器按钮行为
30- 定义状态读取字段
31- 定义 `pause`、`resume`、`drain` 的请求格式
32- 定义可见 `control` 与隐藏 `dispatch` 的职责边界
33
34## 本任务不包含
35
36- 直接修改 Firefox 插件仓库代码
37- 完整 UI 实现
38
39## 建议起始文件
40
41- `DESIGN.md` 第 22、23 节
42- `docs/firefox/README.md`
43
44## 交付物
45
46- 一份清晰的浏览器协议说明文档
47
48## 验收
49
50- 能明确告诉插件仓库该怎么接 control API
51- 能明确区分 control 与 dispatch
52
53## files_changed
54
55- `coordination/tasks/T-009-firefox-pause.md`
56- `docs/firefox/README.md`
57
58## commands_run
59
60- `git worktree add /Users/george/code/baa-conductor-T009 -b feat/T-009-firefox-pause main`
61- `npx --yes pnpm install`
62- `rg -n "Firefox|pause|resume|dispatch|control" DESIGN.md docs/firefox/README.md`
63- `git diff --stat`
64
65## result
66
67- 已在 `docs/firefox/README.md` 定义 Firefox 插件与 control API 的协议,包括状态读取字段、`pause/resume/drain` 请求体、按钮启用规则、成功/失败响应,以及 `control` 与 `dispatch` 的职责边界。
68- 已把任务卡基线修正为本次实际要求的 `main@56e9a4f`。
69
70## risks
71
72- `docs/firefox/README.md` 当前定义的是协议契约,仍需要后续 `T-003` / `baa-firefox` 实现方按该契约落地接口与 UI。
73- `coordination/SECOND_WAVE_START.md` 在当前仓库树中不存在;本任务实际依据 `DESIGN.md`、`TASK_OVERVIEW.md`、`WORKFLOW.md` 与任务卡执行。
74
75## next_handoff
76
77- `baa-firefox` 仓库按 `docs/firefox/README.md` 接入 control API,并与 `T-003` 对齐返回字段和错误码。
78
79## notes
80
81- `2026-03-21`: 创建任务卡