@ckanner/flywheel 0.30.2 → 0.31.1
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/CHANGELOG.md +58 -3
- package/CONTRIBUTING.md +19 -0
- package/LICENSE +21 -0
- package/README.en.md +4 -169
- package/README.md +152 -267
- package/README.zh-CN.md +116 -0
- package/bin/flywheel-claude-code-pro-worker.js +1 -1
- package/bin/flywheel-codex-pro-worker.js +1 -1
- package/bin/flywheel-dsh-worker.js +1 -1
- package/bin/flywheel.js +1 -1
- package/bin/runtime.js +1 -1
- package/docs/README.md +84 -0
- package/docs/README.zh-CN.md +64 -0
- package/docs/archive/README.md +13 -0
- package/docs/archive/codex-pro-adapter-handoff.md +197 -0
- package/docs/archive/design-v0.24.md +540 -0
- package/docs/design.md +681 -0
- package/docs/en/claude-code-pro.md +25 -16
- package/docs/en/configuration.md +306 -139
- package/docs/en/contributing.md +303 -0
- package/docs/en/flow-console.md +75 -13
- package/docs/en/getting-started.md +232 -126
- package/docs/en/investigation.md +219 -0
- package/docs/en/jev-shadow.md +67 -0
- package/docs/en/model-policy.md +147 -62
- package/docs/en/releasing.md +207 -0
- package/docs/en/session-evaluation.md +4 -2
- package/docs/en/session-recovery.md +49 -4
- package/docs/en/workflow.md +223 -113
- package/docs/evaluation/README.md +12 -0
- package/docs/evaluation/jev-historical-provisional.json +138 -0
- package/docs/evaluation/jev-historical-result-2026-11-10.json +174 -0
- package/docs/plans/2026-11-01-dsh-integration.md +67 -0
- package/docs/plans/2026-11-01-model-profiles-preflight.md +29 -0
- package/docs/plans/2026-11-01-npm-installation.md +19 -0
- package/docs/plans/2026-11-03-codex-pro-default.md +28 -0
- package/docs/plans/2026-11-06-adaptive-workflow.md +365 -0
- package/docs/plans/2026-11-07-session-lifecycle.en.md +424 -0
- package/docs/plans/2026-11-07-session-lifecycle.md +337 -0
- package/docs/plans/2026-11-08-flow-console.md +271 -0
- package/docs/plans/2026-11-10-jev-shadow.md +32 -0
- package/docs/plans/2026-11-10-task-discovery.md +17 -0
- package/docs/plans/2026-11-10-workbench-redesign.md +19 -0
- package/docs/plans/2026-11-12-feedback-driven-workflows.md +739 -0
- package/docs/plans/README.md +22 -0
- package/docs/reviews/2026-08-24-v0.18-review-fixplan.md +265 -0
- package/docs/reviews/2026-09-12-pr4-pr5-review.md +70 -0
- package/docs/reviews/README.md +12 -0
- package/docs/validation/2026-11-01-npm-installation.md +105 -0
- package/docs/validation/2026-11-01-profiles-preflight.md +67 -0
- package/docs/validation/2026-11-01-results.md +114 -0
- package/docs/validation/2026-11-03-codex-pro-default.md +90 -0
- package/docs/validation/2026-11-04-dsh-native-view.md +85 -0
- package/docs/validation/2026-11-04-release-0.28.1.md +33 -0
- package/docs/validation/2026-11-04-release-0.28.2.md +35 -0
- package/docs/validation/2026-11-05-dsh-0.2.2-compatibility.md +26 -0
- package/docs/validation/2026-11-05-registry-smoke-recovery.md +26 -0
- package/docs/validation/2026-11-05-release-0.28.3.md +32 -0
- package/docs/validation/2026-11-05-subscription-model-access.md +60 -0
- package/docs/validation/2026-11-05-view-order.md +14 -0
- package/docs/validation/2026-11-07-adaptive-workflow.md +79 -0
- package/docs/validation/2026-11-07-claude-code-pro.md +144 -0
- package/docs/validation/2026-11-07-session-lifecycle.md +136 -0
- package/docs/validation/2026-11-08-session-p3-p4.md +99 -0
- package/docs/validation/2026-11-09-flow-console.md +81 -0
- package/docs/validation/2026-11-10-jev-shadow.md +50 -0
- package/docs/validation/2026-11-10-task-discovery.md +45 -0
- package/docs/validation/2026-11-10-workbench-redesign.md +54 -0
- package/docs/validation/2026-11-11-release-0.30.2.md +65 -0
- package/docs/validation/2026-11-11-release-0.31.0.md +46 -0
- package/docs/validation/2026-11-12-dsh-0.2.2-rc.2.md +58 -0
- package/docs/validation/2026-11-12-feedback-driven-workflows.md +187 -0
- package/docs/validation/README.md +41 -0
- package/docs/validation/evidence/2026-11-08-session-p3-p4.json +5430 -0
- package/docs/validation/evidence/claude-node-bridges.txt +118 -0
- package/docs/validation/evidence/claude-npm-build.txt +15 -0
- package/docs/validation/evidence/claude-npm-candidate.json +54 -0
- package/docs/validation/evidence/claude-npm-install.txt +21 -0
- package/docs/validation/evidence/claude-npm-tests.txt +145 -0
- package/docs/validation/evidence/claude-plugin-tests.txt +205 -0
- package/docs/validation/evidence/claude-quality-gate.txt +29 -0
- package/docs/validation/evidence/claude-race.txt +7 -0
- package/docs/validation/evidence/codex-pro-070-probes.txt +4 -0
- package/docs/validation/evidence/dsh-bridge.txt +4 -0
- package/docs/validation/evidence/dsh-native-view-bridge-tests.txt +1 -0
- package/docs/validation/evidence/dsh-native-view-build.txt +15 -0
- package/docs/validation/evidence/dsh-native-view-candidate.json +54 -0
- package/docs/validation/evidence/dsh-native-view-inspect.txt +27 -0
- package/docs/validation/evidence/dsh-native-view-install-tests.txt +19 -0
- package/docs/validation/evidence/dsh-native-view-npm-tests.txt +143 -0
- package/docs/validation/evidence/dsh-native-view-plugin-tests.txt +99 -0
- package/docs/validation/evidence/dsh-native-view-quality-gate.txt +29 -0
- package/docs/validation/evidence/dsh-plugin-tests.txt +48 -0
- package/docs/validation/evidence/function-coverage.txt +378 -0
- package/docs/validation/evidence/npm-build.txt +13 -0
- package/docs/validation/evidence/npm-contract-tests.txt +65 -0
- package/docs/validation/evidence/npm-dsh-bridge.txt +18 -0
- package/docs/validation/evidence/npm-dsh-plugin-tests.txt +62 -0
- package/docs/validation/evidence/npm-function-coverage.txt +420 -0
- package/docs/validation/evidence/npm-install-tests.txt +20 -0
- package/docs/validation/evidence/npm-quality-gate.txt +29 -0
- package/docs/validation/evidence/npm-race.txt +7 -0
- package/docs/validation/evidence/pr-dsh-bridge.txt +4 -0
- package/docs/validation/evidence/pr-dsh-plugin-tests.txt +48 -0
- package/docs/validation/evidence/pr-function-coverage.txt +379 -0
- package/docs/validation/evidence/pr-quality-gate.txt +28 -0
- package/docs/validation/evidence/pr-race.txt +6 -0
- package/docs/validation/evidence/profiles-control-smoke.json +1 -0
- package/docs/validation/evidence/profiles-dsh-bridge.txt +18 -0
- package/docs/validation/evidence/profiles-dsh-plugin-tests.txt +59 -0
- package/docs/validation/evidence/profiles-function-coverage.txt +411 -0
- package/docs/validation/evidence/profiles-quality-gate.txt +29 -0
- package/docs/validation/evidence/profiles-race.txt +7 -0
- package/docs/validation/evidence/quality-gate.txt +28 -0
- package/docs/validation/evidence/race.txt +6 -0
- package/docs/validation/evidence/watchdog-startup-after.txt +2 -0
- package/docs/validation/evidence/watchdog-startup-before.txt +6 -0
- package/docs/validation/evidence/watchdog-startup-quality-gate.txt +29 -0
- package/docs/validation/evidence/watchdog-startup-race.txt +7 -0
- package/docs/{claude-code-pro.md → zh-CN/claude-code-pro.md} +23 -17
- package/docs/{configuration.md → zh-CN/configuration.md} +323 -137
- package/docs/zh-CN/contributing.md +240 -0
- package/docs/{flow-console.md → zh-CN/flow-console.md} +63 -12
- package/docs/zh-CN/getting-started.md +352 -0
- package/docs/zh-CN/investigation.md +182 -0
- package/docs/zh-CN/jev-shadow.md +79 -0
- package/docs/zh-CN/model-policy.md +123 -0
- package/docs/zh-CN/releasing.md +120 -0
- package/docs/{session-evaluation.md → zh-CN/session-evaluation.md} +4 -2
- package/docs/{session-recovery.md → zh-CN/session-recovery.md} +46 -10
- package/docs/zh-CN/workflow.md +270 -0
- package/npm/install.js +1 -1
- package/package.json +12 -25
- package/docs/getting-started.md +0 -418
- package/docs/model-policy.md +0 -65
- package/docs/workflow.md +0 -312
package/README.md
CHANGED
|
@@ -1,295 +1,180 @@
|
|
|
1
|
-
# Flywheel
|
|
2
|
-
|
|
3
|
-
[
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
[
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
# Flywheel
|
|
2
|
+
|
|
3
|
+
English · [简体中文](README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
**Turn a defined coding task into a verified software change.**
|
|
6
|
+
|
|
7
|
+
Flywheel is a deterministic Go orchestrator for coding agents. Models plan,
|
|
8
|
+
implement, and review; the engine manages task contracts, verification,
|
|
9
|
+
retries, budgets, workspaces, and delivery. Use it from the DeepSeek Harness
|
|
10
|
+
(DSH) desktop or the command line.
|
|
11
|
+
|
|
12
|
+
[Getting started](docs/en/getting-started.md) ·
|
|
13
|
+
[Documentation](docs/README.md) ·
|
|
14
|
+
[Contributing](CONTRIBUTING.md) ·
|
|
15
|
+
[MIT license](LICENSE)
|
|
16
|
+
|
|
17
|
+
## What Flywheel does
|
|
18
|
+
|
|
19
|
+
- **Chooses a workflow for the task.** Auto selects Quick for an eligible,
|
|
20
|
+
well-defined task and Full when planning or broader verification is needed.
|
|
21
|
+
- **Verifies the actual candidate.** Deterministic checks precede independent
|
|
22
|
+
review. Completion requires evidence for the same code that is committed
|
|
23
|
+
and integrated.
|
|
24
|
+
- **Keeps roles separate.** Planning, execution, and review use separate
|
|
25
|
+
contexts. Eligible repairs can resume the same role's session without
|
|
26
|
+
discarding task history.
|
|
27
|
+
- **Coordinates bounded parallel execution.** Packets with explicit
|
|
28
|
+
dependencies and non-overlapping write scopes can execute concurrently;
|
|
29
|
+
review and integration remain coordinated by the engine.
|
|
30
|
+
- **Provides a desktop workbench.** Inspect task progress, evidence, sessions,
|
|
31
|
+
run history, and configuration from DSH's native Flywheel view.
|
|
32
|
+
- **Makes failures visible.** Unknown execution, usage, or cleanup stays
|
|
33
|
+
unknown. The engine preserves work and stops when it cannot safely proceed.
|
|
34
|
+
|
|
35
|
+
## Install
|
|
36
|
+
|
|
37
|
+
For the desktop path, install Node.js **22.18.0 or later**, npm, Git, and a
|
|
38
|
+
supported DSH desktop with its `dsh` command available. The plugin currently
|
|
39
|
+
declares support for DSH **0.2.1-rc.5**, **0.2.2-rc.1**, and **0.2.2-rc.2**. Prepare the accounts
|
|
40
|
+
and CLI tools required by the model routes you choose. DSH itself may require
|
|
41
|
+
a newer Node version; the supported 0.2.2-rc.1 SDK requires Node 24.9 or later.
|
|
30
42
|
|
|
31
43
|
```sh
|
|
32
44
|
npx -y @ckanner/flywheel@latest install
|
|
33
45
|
```
|
|
34
46
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
47
|
+
The installer sets up matching CLI, native binary, workers, embedded skills,
|
|
48
|
+
and the DSH plugin. Native packages cover macOS and Linux on arm64 and x64;
|
|
49
|
+
installing from npm does not require Go. Account login and provider setup
|
|
50
|
+
remain separate steps. Existing configuration and modified skills are
|
|
51
|
+
preserved.
|
|
38
52
|
|
|
39
|
-
|
|
53
|
+
If a user-owned npm prefix is needed:
|
|
40
54
|
|
|
41
55
|
```sh
|
|
42
56
|
npx -y @ckanner/flywheel@latest install --prefix "$HOME/.local"
|
|
43
57
|
```
|
|
44
58
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
## 2. DSH 入口与独立 worker
|
|
50
|
-
|
|
51
|
-
本实现覆盖已核对接口的 **DSH Mac 桌面 0.2.1-rc.5 与 0.2.2-rc.1**;0.28.4 的声明只允许这两个版本。先核对 About、`dsh --version` 和命令实际来源。它不要求 alpha、OAR、Forge、Teams 或一直存活的桌面父智能体。
|
|
52
|
-
|
|
53
|
-
上一节的安装器使用**桌面安装的 `dsh` 命令**执行正式插件管理接口:`dsh plugin --profile desktop add --save-exact --ignore-scripts @ckanner/dsh-plugin-flywheel@<本次版本>`,然后通过 `plugin list` 核对版本。普通 npm DSH CLI 不能管理保留的 `desktop` profile;命令不在 PATH 时用 `--dsh-bin` 指定已核对的桌面命令入口。安装后按宿主提示重新载入。不要猜测 `.app` 内部可执行文件路径。
|
|
54
|
-
|
|
55
|
-
原生 worker 使用独立的 SDK profile。标准 SDK 已包含 `deepseek-account` provider 和账号服务;标准桌面与 SDK 使用同一 `DSH_HOME` 时默认共用账号授权,无需为账号路径额外配置 API Key 或复制 token。`deepseek-official` 是单独的 API-key provider,仅作为显式选择保留。第三方 provider 则须核对 SDK 实际加载与授权,例如 GPT 原生路由使用本轮核对的 ChatGPT adapter:
|
|
56
|
-
|
|
57
|
-
```sh
|
|
58
|
-
dsh plugin --profile sdk add dsh-plugin-chatgpt@0.1.17
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
这是已核对的 adapter 版本示例;采用其他版本前按其文档检查兼容性。按 provider 自身的正常流程完成授权,保持所选 `DSH_HOME` 与配置来源一致。安装 adapter 不会复制凭证,也不证明账号可以调用默认表里的所有模型。DSH 桌面能在登录后选择账号默认模型,但该选择不控制独立 SDK 会话;Flywheel 显式请求 `deepseek-account`/`deepseek-flash`,详见[账号与 API 的区别](docs/configuration.md#deepseek-账号与-api-key-是两个-provider)。`subagent_codex_pro` 是外部 agent 工具,不是这个 SDK 入口的 LLM provider。Flywheel 的 `hard` 路由通过独立 worker 直接导入 `dsh-subagent-codex-pro@0.9.0` 的公开 `./machine` 入口,复用插件运行时;该精确源码候选随插件 bundle,来源与摘要见 [vendor 记录](plugins/dsh/vendor/README.md)。它不创建 DSH 父模型再次委派。插件内部仍运行 Codex app-server,并使用用户已有的 Codex 登录。
|
|
62
|
-
|
|
63
|
-
### worker 入口配置
|
|
64
|
-
|
|
65
|
-
| 环境变量 | 默认值与作用 |
|
|
66
|
-
|---|---|
|
|
67
|
-
| `FLYWHEEL_DSH_WORKER` | npm 启动器自动解析同版本依赖中的 worker 绝对路径;显式环境变量优先。直接运行 Go 二进制时默认从 PATH 查找 `flywheel-dsh-worker` |
|
|
68
|
-
| `FLYWHEEL_DSH_BIN` | PATH 中的 `dsh`;建议固定为已核对的官方命令入口 |
|
|
69
|
-
| `FLYWHEEL_DSH_PROFILE` | `sdk`;必须是 SDK profile,不能是 `desktop` |
|
|
70
|
-
| `DSH_HOME` | 交给 DSH 的自定义配置根;不设置时沿用 DSH 自己的默认行为 |
|
|
71
|
-
| `FLYWHEEL_KIMI_BIN` | PATH 中的 `kimi`;可指定 Kimi CLI 的绝对路径 |
|
|
72
|
-
| `FLYWHEEL_CODEX_PRO_WORKER` | npm 启动器解析同版本包的 Codex Pro worker;独立 Go 二进制默认查找 `flywheel-codex-pro-worker` |
|
|
73
|
-
| `FLYWHEEL_CODEX_BIN` | 插件内部使用的 Codex 可执行路径;默认 `codex` |
|
|
74
|
-
| `CODEX_HOME` | 可选的 Codex 配置/登录目录,交给插件使用;不复制账号凭证 |
|
|
75
|
-
|
|
76
|
-
旧 `harness: "codex"` 仍是显式兼容路径,使用 PATH 中的 `codex exec`;新默认不会自动退回它。所有选定 CLI、Node 与账户配置必须对**启动 Go 引擎的进程环境**可见。
|
|
77
|
-
|
|
78
|
-
安装器自动生成 `~/.config/flywheel/npm-launcher` 和 `installation.json`:记录绝对 Node/CLI 路径、已核对的 DSH 入口及安装时可见的工具 PATH。桌面插件未显式配置 `flywheelBinary` 时,读取这份安装记录,校验 launcher 是普通可执行文件且 SHA-256 匹配后使用。**无需手写 GUI 启动脚本或修改 profile 配置。**
|
|
79
|
-
|
|
80
|
-
用户原有的显式 `flywheelBinary` 优先,安装器不会替用户覆盖它。安装记录不存在时保留 PATH 查找兼容行为;记录或 launcher 已损坏/被修改时明确失败,不悄悄使用另一份引擎。升级 Node、移动全局 prefix 或新增 CLI 后,可在工具均可见的终端运行 `flywheel setup --no-global` 更新安装记录;先保存自己对 launcher 的修改,冲突不会被覆盖。终端里的 `export` 本身不会改变已运行的桌面进程,仍需在面板内复验。
|
|
81
|
-
|
|
82
|
-
### 不调用模型的检查
|
|
83
|
-
|
|
84
|
-
在实际目标仓库目录、使用与引擎 worker 相同的环境变量执行:
|
|
85
|
-
|
|
86
|
-
```sh
|
|
87
|
-
flywheel config inspect --cwd "$PWD" --json
|
|
88
|
-
flywheel doctor --cwd "$PWD" --json
|
|
89
|
-
flywheel doctor --cwd "$PWD" --probe --json
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
`config inspect` 只读展开有效配置;`doctor` 检查目录、配置、所需命令与声明的环境变量。加 `--task-dir docs/my-task` 会校验 Spec/packet,并把工具检查缩小到任务所需阶段与路由;不指定任务时检查全部配置绑定。没有 packet 时按规划前状态检查默认路由,不会擅自生成契约。
|
|
93
|
-
|
|
94
|
-
`--probe` 进一步启动本地 DSH SDK、创建会话、核对 cwd/权限并关闭,**不发送推理 prompt、不运行验收命令**;provider 初始化可能查询模型目录。输出保留 pass/fail/warn/unknown/skipped,阻断项使退出码为 1;没有阻断项也不能证明账号授权、订阅额度或真实模型推理可用。相同账号/模型/目录/effort/权限的 SDK 检查去重,检查预算 40 秒,进程各收尾阶段有 5 秒宽限,保守预留另 15 秒清理。不会物化全局配置、写任务状态或创建 worktree。
|
|
95
|
-
|
|
96
|
-
完整安装、权限、生命周期说明见 [DSH 插件 README](plugins/dsh/README.md),线协议见 [PROTOCOL.md](plugins/dsh/PROTOCOL.md)。
|
|
97
|
-
|
|
98
|
-
## 3. 当前默认路由
|
|
99
|
-
|
|
100
|
-
默认内联模板是 [templates/flywheel.config.example.json](templates/flywheel.config.example.json),可复用配置见 [profiles 示例](templates/flywheel.profiles.example.json) 与[配置指南](docs/configuration.md)。`harness` 指执行后端,`provider` 是 DSH SDK 实际注册的 LLM adapter ID,`channel` 是本配置的账号/计量渠道名;`model` 与 `thinking` 逐调用传入。旧配置未写 provider 时继续把 DSH channel 解释为 provider ID。
|
|
101
|
-
|
|
102
|
-
| 阶段或执行路由 | Harness | Provider/渠道 | 模型 | Thinking |
|
|
103
|
-
|---|---|---|---|---|
|
|
104
|
-
| Plan | Kimi CLI | `kimi-subscription` | `kimi-code/k3.1-pro` | `high`,匹配身份后可恢复会话 |
|
|
105
|
-
| Execute `default` | DSH SDK | `deepseek-account` | `deepseek-flash` | `high` |
|
|
106
|
-
| Execute `frontend` | Kimi CLI | `kimi-subscription` | `kimi-code/k3.1-pro` | `high` |
|
|
107
|
-
| Execute `hard` | Codex Pro machine API | `chatgpt-subscription` | `gpt-6.1-sol` | `high` |
|
|
108
|
-
| Review | DSH SDK | `chatgpt` | `gpt-6.1-sol` | `high` |
|
|
109
|
-
| Judge | DSH SDK | `chatgpt` | `gpt-6-astra` | `high`,里程碑终验 |
|
|
110
|
-
| Intake | DSH SDK | `deepseek-account` | `deepseek-flash` | `low` |
|
|
111
|
-
| Garden | Kimi CLI | `kimi-subscription` | `kimi-code/k3.1-pro` | `high` |
|
|
112
|
-
|
|
113
|
-
这些是可编辑的初始绑定,并非模型排名或性能承诺。DeepSeek 只用 Flash;当前 Mac rc.5 的合法 effort 为 `off/low/high/max`,没有 `medium`。双 judge 默认关闭,也不默认跨渠道付费降级。`multimodal` 暂无默认绑定:当前 bridge 只有文本契约,模型名称或目录里的 vision 标记不能证明附件已正确传递。
|
|
114
|
-
|
|
115
|
-
七个 high 与 Intake low 是工程基线,尚未做本项目的 high/xhigh/max 对照评估。GPT 支持 xhigh/max,Kimi K3.1 Pro 原生支持 low/high/max;hard 与高影响 Judge 可优先比较 xhigh,不把所有后端的档位名当作同一尺度。官方依据、适配器限制和建议见[推理等级说明](docs/model-policy.md)。0.28.2 默认仍使用 DeepSeek API;采用上表账号默认须升级至 0.28.3 或以后版本,并[显式迁移配置](docs/configuration.md#将旧配置切换到已有的三种资源)。
|
|
116
|
-
|
|
117
|
-
Kimi 使用原生 CLI print/stream-json,不使用 ACP;恢复的是会话历史,不是常驻后台进程。该模式不提供本适配器可宣称的 OS 级只读/工作区沙箱,worktree 只是代码隔离。新模板及显式 subscriptions 迁移使用 `permissions.mode:full-access`,DSH/Codex 全阶段 danger-full-access+never,Kimi print 为 auto;已有文件未声明时保持 role-based 的 workspace-write/read-only。Codex Pro 在运行前核对模型、目录和沙箱模式,Flywheel 在结果返回后检查完整策略;在受限模式,工作区写入允许 Codex 标准临时目录,额外工作区外 roots 或启用网络的策略不能通过交付资格检查;明确 full-access 则核对完全权限回执,不声称 OS 隔离。这是事后校验,不能阻止自定义 Codex 配置已允许的访问;要求运行前完整策略阻止的环境需等待上游公开 guard。具体账号的可用模型、额度和使用授权需要由所选服务确认。
|
|
118
|
-
|
|
119
|
-
usage 或美元成本未上报时保留 unknown,不能把订阅调用记成免费。默认 soft token budget 会报告未知量;hard budget 无法证明未知用量未超额时停止。汇总数字是已知量下限。
|
|
120
|
-
|
|
121
|
-
### 迁移已有配置
|
|
122
|
-
|
|
123
|
-
配置按**第一个存在的完整文件**选择,不逐字段合并:任务目录 → 项目根 → 全局 `~/.config/flywheel/flywheel.config.json` → 二进制内嵌模板;`FLYWHEEL_CONFIG` 可指定全局配置路径。已有文件不会因升级自动改写。
|
|
124
|
-
|
|
125
|
-
从 0.27.x 升级要采用插件路径时,在实际生效配置中将 `routes.hard.harness` 从 `codex` 改为 `codex-pro`;具名 profile 则修改对应定义。保留 `model`、`thinking` 和 `channel`,不要把 `subagent_codex_pro` 填入 provider。安装依赖不自动迁移已有配置,也不会默默替换旧后端。
|
|
126
|
-
|
|
127
|
-
可用新二进制查看模板,再审阅并迁移自己的配置:
|
|
128
|
-
|
|
129
|
-
```sh
|
|
130
|
-
flywheel template flywheel.config.example.json
|
|
131
|
-
flywheel template flywheel.profiles.example.json
|
|
132
|
-
flywheel config inspect --cwd /repo --task-dir /repo/docs/my-task --json
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
`drivers` 选择 `real/mock`,不是模型或 provider 名称。模型在 `loops` 和 `routes` 配置,可直接写字段,也可引用 `profiles` 后按需覆盖。未知 profile、拼错字段、模型字段的 null 和 provider 冲突会拒绝加载;允许 `_note` 注释,原有 `env-key:null`、`judge-panel:null` 仍合法。渠道别名不会自动切换 DSH 账号,授权仍由选定 SDK profile/provider 管理。修改运行配置后重启引擎;Plan 不允许悄悄改模型、权限或其他运行配置。
|
|
136
|
-
|
|
137
|
-
## 4. 创建、运行和观察任务
|
|
138
|
-
|
|
139
|
-
在 DSH 对话中描述需求即可准备并启动,通常无需手工填写目录:
|
|
140
|
-
|
|
141
|
-
```text
|
|
142
|
-
/flywheel-task 修复已定位的列表空状态问题,补齐回归测试并完成交付。mode=auto
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
| 选择 | 何时使用 | 实际行为 |
|
|
146
|
-
|---|---|---|
|
|
147
|
-
| Auto | 让引擎根据已研究的契约事实选择 | 资格充分时 Quick,否则 Full |
|
|
148
|
-
| Quick | 一个里程碑、一个 packet、范围明确且验证充分 | 全部必需验证后作一次独立最终 Review;新风险或验收缺口升级 Full |
|
|
149
|
-
| Full | 多工作单元、设计未定、影响较大或明确要求完整流程 | Plan → Execute/Review → 集成验证/Judge |
|
|
59
|
+
Add that prefix's `bin` directory to your shell PATH to use `flywheel`
|
|
60
|
+
directly. The [installation guide](docs/en/getting-started.md) covers desktop
|
|
61
|
+
registration, SDK providers, diagnostics, upgrades, and a complete first task.
|
|
150
62
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
63
|
+
This README describes the current source. Check the published version with
|
|
64
|
+
`npm view @ckanner/flywheel version`; merging source does not update an
|
|
65
|
+
existing installation. Version changes are recorded in the [changelog](CHANGELOG.md).
|
|
154
66
|
|
|
155
|
-
|
|
67
|
+
## Run your first task
|
|
156
68
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
`flywheel-task` 使用当前对话研究代码,在任务 worktree 准备 `docs/<slug>/` 的 Spec、packet、验收与工作流事实,再调用 Go `control launch`。DSH 通过 `flywheel_launch` 把该具体任务关联到当前会话的视图。只想先看方案时用 `/flywheel-new`;启动或恢复已有任务用 `/flywheel-run`。Kimi 对应使用 `/skill:flywheel-task`、`/skill:flywheel-new` 和 `/skill:flywheel-run`。宿主准备与 Go 调度的分工、授权和目录规则见[工作流](docs/workflow.md)。
|
|
160
|
-
|
|
161
|
-
从 `0.28.1` 开始,桌面控制面接入顶部原生 **Flywheel** 会话视图(从 0.28.5 起排在内置“统计”之后),保留 DSH 输入区、模型选择器和右侧栏。`0.28.0` 仍是旧底部弹层,需把 CLI 与桌面插件同版升级。“任务资料目录”选择已准备的 `docs/<slug>/`;“项目目录”是任务所在项目/集成 worktree,可留空。从 0.28.3 开始通过 DSH `workingDirectory.get(session)` 读取会话实际目录,跟随目录切换;0.28.2 仍取最初的 header 目录,切换 worktree 后需显式填写项目路径。查看配置或检查接入可不填任务目录;启动、刷新和停止必须选择已有任务。视图展示最近刷新的结果、完整 packet 列表与未知用量,模型配置和诊断按需查看,原始 JSON 默认折叠。也可使用人工命令:
|
|
69
|
+
Open the target repository in DSH, then describe a bounded change:
|
|
162
70
|
|
|
163
71
|
```text
|
|
164
|
-
/flywheel
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
面板、人工命令、`flywheel_control` 与 `flywheel_launch` 模型工具复用同一组 Go 接口:
|
|
168
|
-
|
|
169
|
-
```sh
|
|
170
|
-
flywheel control launch --task-dir /repo/docs/my-task --cwd /repo --mode auto
|
|
171
|
-
flywheel control start --task-dir /repo/docs/my-task --cwd /repo
|
|
172
|
-
flywheel control status --task-dir /repo/docs/my-task --cwd /repo
|
|
173
|
-
flywheel control stop --task-dir /repo/docs/my-task --cwd /repo
|
|
174
|
-
flywheel control config --cwd /repo
|
|
175
|
-
flywheel control doctor --task-dir /repo/docs/my-task --cwd /repo --probe
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
`launch` 对准备好的契约默认请求 Auto;`start`/前台 `run` 未提供 `--mode` 时沿用契约与持久化策略,旧任务保持 Full。三者可显式请求 `auto|quick|full`,资格和升级仍由 Go 决定。CLI 消费契约,不自行调用模型生成任务或创建外层任务分支。
|
|
179
|
-
|
|
180
|
-
`launch`/`start` 派生独立后台引擎,日志进入任务目录的 `orchestrator.log`;关闭面板或桌面不等于停止任务。`status` 只读。`stop` 向本次运行提交带随机 token 的停止请求,等待本次引擎退出受管调用栈、释放任务 lease 后才保存停止状态;不按文件里的 PID 盲目发送信号。引擎只管理本次拥有的进程组;已观测的 `CleanupError` 仍保留在证据和指标中、阻止交付,需要按错误记录处理,`stopped` 不代表任意逃逸进程已清理。停止等待最长 45 秒,桌面入口预留 60 秒。
|
|
181
|
-
|
|
182
|
-
控制接口始终返回一个 protocol 1 JSON;`ok` 表示控制操作成功,任务是否完成应看 `state.status`。`config` 返回 `configuration`,`doctor` 返回 `diagnostic`;诊断有阻断项时保留完整报告并返回退出码 1,不能当成空白传输错误。若启动就绪超时,后台引擎可能仍在加载:先刷新状态和查看日志,不要另起重复任务。
|
|
183
|
-
|
|
184
|
-
DSH 工具的 launch/start 将明确的任务路径关联到发起会话;视图展示请求模式、生效策略、原因、阶段适用性与升级记录。它不扫描目录猜任务,也不轮询终端另行启动的任务;手动打开仍可用。启动/停止结果未确认时,先刷新原任务再恢复操作,迟到响应不能覆盖另一个会话或新绑定。原生轨迹保留父会话已有记录,独立 worker 历史不会自动合并。关联的恢复范围见[桌面视图与运行边界](plugins/dsh/README.md)。
|
|
185
|
-
|
|
186
|
-
原有前台/单步 CLI 仍可使用;这些命令应在目标仓库根目录运行:
|
|
187
|
-
|
|
188
|
-
```sh
|
|
189
|
-
flywheel run docs/my-task
|
|
190
|
-
flywheel run docs/my-task --mode full
|
|
191
|
-
flywheel run docs/my-task --pause-before review
|
|
192
|
-
flywheel run docs/my-task --only execute --packet M01-T01
|
|
193
|
-
flywheel run docs/my-task --only verify --packet M01-T01
|
|
194
|
-
flywheel status docs/my-task
|
|
195
|
-
flywheel stop docs/my-task
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
`--only` 与 `--pause-before` 不能同时使用,`--only execute` 不等于 Quick 或完整交付。前台 `run` 的退出码为 0 成功、1 用法/运行错误、3 升级/预算/单步失败、143 中断;控制命令的操作失败返回 1。
|
|
199
|
-
|
|
200
|
-
### 已安装的 skills
|
|
201
|
-
|
|
202
|
-
```sh
|
|
203
|
-
flywheel install-skills
|
|
204
|
-
flywheel install-skills --project /path/to/project
|
|
205
|
-
flywheel skills list
|
|
206
|
-
flywheel skills read flywheel-task
|
|
72
|
+
/flywheel-task Fix the list's empty state, add regression tests, and complete the change. mode=auto
|
|
207
73
|
```
|
|
208
74
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
## 5. 什么才算完成
|
|
216
|
-
|
|
217
|
-
执行者可以一起修改实现、单测和回归测试;冻结验收通过 packet 的 `boundaries.must-not-touch` 或配置的 `protected-test-patterns` 显式保护。100% 覆盖率仍是本项目的门禁,断言是否有效由验收和独立评审共同检查。
|
|
218
|
-
|
|
219
|
-
L1 在命令前后检查候选身份。验收过程中代码或契约变了,即使命令 exit 0 也不能继续交付。Quick 在实际候选上先收齐适用 L2/L3,再作覆盖所有需求的独立最终 Review;Full 仍在集成 checkout 运行里程碑 L2/L3 与 Judge。工作流策略也进入证据身份,模式变化不能复用旧绿灯。正常完成需要代码实际提交、合并到本地目标 checkout,并确认提交后的 Git tree 与已验证候选一致;commit hook 修改 index 或文件也不能绕过这一步。任务最终完成前再次检查持久化状态,重启不会把上次验收留下的未提交副作用当成交付。
|
|
220
|
-
|
|
221
|
-
Plan 只能直接修改任务目录内的 Spec 和 packet。它若修改外部验收、实现或运行配置,引擎保留现场并停止,不自动提交或丢弃。修订后的契约 fingerprint 会跨重启保存:旧 completed 单元的契约或验证策略改变时重新打开,早先已关闭的里程碑也会被重新调度。同一 run 对一个里程碑最多访问 3 次,再反复重开就升级给人。最终要求所有当前契约单元完成、里程碑关闭。
|
|
75
|
+
The skill studies the repository and prepares a task contract under
|
|
76
|
+
`docs/<task>/`. Go validates the contract and owns execution from that point.
|
|
77
|
+
Use `/flywheel-new` to prepare a task without starting it, or
|
|
78
|
+
`/flywheel-run` to start or resume an existing task. In Kimi, use the
|
|
79
|
+
`/skill:flywheel-task` form of the command.
|
|
222
80
|
|
|
223
|
-
|
|
81
|
+
Open the **Flywheel** conversation view to select the task and inspect its
|
|
82
|
+
canvas, run history, or configuration. Task locations come from the session
|
|
83
|
+
and recorded runs; the view does not require manually entered paths.
|
|
224
84
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
## 6. 验证与当前边界
|
|
85
|
+
For a prepared task, the equivalent CLI entry is:
|
|
228
86
|
|
|
229
87
|
```sh
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
make quality-gate
|
|
233
|
-
npm --prefix plugins/dsh ci --ignore-scripts
|
|
234
|
-
npm --prefix plugins/dsh run check
|
|
235
|
-
npm test
|
|
236
|
-
npm run build:npm
|
|
237
|
-
FLYWHEEL_NPM_PACKAGES_DIR=dist-npm npm run test:install
|
|
88
|
+
flywheel control launch --cwd /path/to/repo --task-dir /path/to/repo/docs/my-task --mode auto
|
|
89
|
+
flywheel control status --cwd /path/to/repo --task-dir /path/to/repo/docs/my-task
|
|
238
90
|
```
|
|
239
91
|
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
DSH 检查包括离线 worker 生命周期、事件与 usage 折叠、控制入口一致性、真实 React DOM 交互、Go → Node → SDK 协议桩,以及前轮官方 npm rc.5 的真实 Host 注册和 SDK 初始化/关闭。npm 检查覆盖安装与取消、同版包解析、GUI 安装记录及发行门禁;`test:install` 使用构建出的六个真实 npm 包和隔离环境验证安装,DSH 命令由协议桩替代,不使用用户 profile 或模型账号。
|
|
243
|
-
|
|
244
|
-
React DOM 与安装协议桩不代替 Mac 桌面验证。当前 Linux 环境没有可用的完整原生沙箱,SDK probe 在 prompt 前正确拒绝;这项结果证明拒绝路径,不能冒充 Mac Seatbelt 成功。
|
|
245
|
-
|
|
246
|
-
**尚需在用户 Mac 验证**:桌面安装与 UI 渲染、Seatbelt 探针、GUI 环境中的 CLI/凭证可见性、真实 Flash/GPT/Kimi/Codex 响应,以及真实机器重启后的恢复。当前不支持 DSH worker resume、附件传输或自动多 agent Teams 调度。Codex Pro 已通过公开 API 接入,完整策略的事后检查边界见配置指南。
|
|
247
|
-
|
|
248
|
-
## 7. 开发与备用构建
|
|
249
|
-
|
|
250
|
-
普通用户使用上面的 npm 安装流程。开发者需要 Go 1.27 或更高、Node.js 22.18.0 或更高及 Git,在仓库根构建:
|
|
92
|
+
Run these read-only configuration checks from the target repository:
|
|
251
93
|
|
|
252
94
|
```sh
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
npm --prefix plugins/dsh run check
|
|
256
|
-
npm run build:npm
|
|
95
|
+
flywheel config inspect --cwd "$PWD" --json
|
|
96
|
+
flywheel doctor --cwd "$PWD" --json
|
|
257
97
|
```
|
|
258
98
|
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
##
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
|
268
|
-
|
|
269
|
-
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
DSH
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
99
|
+
Doctor checks local setup; it does not establish live model access. See the
|
|
100
|
+
[workbench guide](docs/en/flow-console.md) for stage operations, takeover,
|
|
101
|
+
run comparisons, and explicit GitHub delivery actions.
|
|
102
|
+
|
|
103
|
+
## Choose a workflow
|
|
104
|
+
|
|
105
|
+
| Mode | Use it for | Execution |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| **Auto** | A prepared task whose scope and checks are known | Go selects Quick when the contract meets the eligibility checks; otherwise Full. |
|
|
108
|
+
| **Quick** | One milestone and one bounded packet with sufficient verification | Execute → required checks → independent final Review → local delivery. New risks can upgrade it to Full. |
|
|
109
|
+
| **Full** | Multiple packets, design work, or a broader change | Plan → packet execution, checks, review, and local delivery → integration checks and Judge. |
|
|
110
|
+
|
|
111
|
+
Quick retains required repository checks and delivery checks. Its first-pass
|
|
112
|
+
success path has two stage-agent calls, excluding preparation, retries, and
|
|
113
|
+
the agent's internal tool calls. Existing tasks without workflow metadata
|
|
114
|
+
continue as Full. See [workflow and delivery](docs/en/workflow.md).
|
|
115
|
+
|
|
116
|
+
When the cause is still unknown, Task can first run a [bounded investigation](docs/en/investigation.md).
|
|
117
|
+
Report-only goals stop at an evidence report; authorized repairs retain the original
|
|
118
|
+
scope before entering Auto. New → review → Run and direct stage controls remain available.
|
|
119
|
+
|
|
120
|
+
## Models and configuration
|
|
121
|
+
|
|
122
|
+
The shipped template uses the following editable bindings. These are
|
|
123
|
+
defaults, not model rankings or promises of account availability.
|
|
124
|
+
|
|
125
|
+
| Stage or route | Backend | Model | Reasoning |
|
|
126
|
+
| --- | --- | --- | --- |
|
|
127
|
+
| Plan; frontend execution; Garden | Kimi CLI | `kimi-code/k3.1-pro` | `high` |
|
|
128
|
+
| Default execution | DSH / `deepseek-account` | `deepseek-flash` | `high` |
|
|
129
|
+
| Hard execution | Codex Pro public machine API | `gpt-6.1-sol` | `high` |
|
|
130
|
+
| Review | DSH / `chatgpt` | `gpt-6.1-sol` | `high` |
|
|
131
|
+
| Judge | DSH / `chatgpt` | `gpt-6-astra` | `high` |
|
|
132
|
+
| Intake | DSH / `deepseek-account` | `deepseek-flash` | `low` |
|
|
133
|
+
|
|
134
|
+
[Claude Code Pro](docs/en/claude-code-pro.md) is an optional backend with no
|
|
135
|
+
default stage assignment. Profiles let you reuse or override bindings by
|
|
136
|
+
stage and route. The [configuration guide](docs/en/configuration.md) explains
|
|
137
|
+
file precedence, providers, permissions, budgets, and migration; the
|
|
138
|
+
[model policy](docs/en/model-policy.md) explains reasoning choices and limits.
|
|
139
|
+
|
|
140
|
+
The new inline default configuration selects scoped sessions, full-access permissions, automatic
|
|
141
|
+
worktree management, and parallel scheduling with a maximum of two packets.
|
|
142
|
+
Parallel eligibility still requires explicit dependencies and write scopes.
|
|
143
|
+
Existing complete configurations keep their compatibility defaults when
|
|
144
|
+
fields are absent; upgrades do not silently rewrite them.
|
|
145
|
+
|
|
146
|
+
## Workspaces and recovery
|
|
147
|
+
|
|
148
|
+
The **project workspace** is the repository a session belongs to. The
|
|
149
|
+
**execution directory** is where a task or packet changes and verifies code.
|
|
150
|
+
They may differ. Automatic worktree management and scheduling are independent
|
|
151
|
+
settings; disabling worktrees does not itself disable parallelism. Shared
|
|
152
|
+
directory batches require checks against the final common candidate.
|
|
153
|
+
|
|
154
|
+
Session reuse is separate from call recovery. Unknown dispatch, result, or
|
|
155
|
+
cleanup blocks continuation even if a fresh session is requested. Backend
|
|
156
|
+
capabilities differ; [recovery and context quality](docs/en/session-recovery.md)
|
|
157
|
+
documents those boundaries. Offline evaluations establish protocol behavior,
|
|
158
|
+
not live model quality, cache savings, or performance.
|
|
159
|
+
|
|
160
|
+
## Documentation and development
|
|
161
|
+
|
|
162
|
+
Start with the [documentation index](docs/README.md) for paired English and
|
|
163
|
+
Chinese guides, the architecture specification, and historical records.
|
|
164
|
+
|
|
165
|
+
- [Configuration reference](docs/en/configuration.md)
|
|
166
|
+
- [DSH plugin](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/README.md) and [worker protocol](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/PROTOCOL.md)
|
|
167
|
+
- [Architecture specification](docs/design.md) — maintained in Chinese
|
|
168
|
+
- [Contribution guide](CONTRIBUTING.md) and [release runbook](docs/en/releasing.md)
|
|
169
|
+
|
|
170
|
+
Developers need Go **1.27 or later** and the Node/npm toolchain described in
|
|
171
|
+
the contribution guide. The Go quality gate includes formatting, vet, and
|
|
172
|
+
100% statement coverage for every measured function. Package and adapter
|
|
173
|
+
changes also have dedicated build, bridge, and installation checks.
|
|
174
|
+
|
|
175
|
+
## License
|
|
176
|
+
|
|
177
|
+
Flywheel is licensed under the [MIT License](LICENSE).
|
|
178
|
+
Third-party code retains its own notices; see the
|
|
179
|
+
[DSH plugin notices](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/THIRD_PARTY_NOTICES.md) and
|
|
180
|
+
[bundled adapter provenance](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md).
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Flywheel(飞轮)
|
|
2
|
+
|
|
3
|
+
[English](README.md) · 简体中文
|
|
4
|
+
|
|
5
|
+
**把明确的编码任务变为经过验证的软件变更。**
|
|
6
|
+
|
|
7
|
+
Flywheel 是面向 coding agent 的确定性 Go 编排器。模型负责规划、实现和评审;引擎负责任务契约、验收、重试、预算、工作区和交付。既可从 DeepSeek Harness(DSH)桌面使用,也可通过命令行运行。
|
|
8
|
+
|
|
9
|
+
[快速开始](docs/zh-CN/getting-started.md) · [文档](docs/README.zh-CN.md) · [参与贡献](docs/zh-CN/contributing.md) · [MIT 许可证](LICENSE)
|
|
10
|
+
|
|
11
|
+
## Flywheel 能做什么
|
|
12
|
+
|
|
13
|
+
- **根据任务选择流程。** Auto 为满足条件、边界明确的任务选择 Quick,需要规划或更广泛验收时选择 Full。
|
|
14
|
+
- **验证实际候选代码。** 确定性检查先于独立评审,完成证据必须对应最终提交和集成的同一份代码。
|
|
15
|
+
- **隔离不同角色。** 规划、执行和评审使用独立上下文;满足条件的返修可续用同角色会话,保留任务历史。
|
|
16
|
+
- **协调有界并行执行。** 显式声明依赖且写入范围不重叠的 packet 可以并发执行,评审和集成仍由引擎统一协调。
|
|
17
|
+
- **提供桌面工作台。** 在 DSH 原生 Flywheel 视图中查看任务进度、证据、会话、运行记录和配置。
|
|
18
|
+
- **明确呈现失败。** 未知执行结果、用量或清理状态保持未知;无法安全继续时保留成果并停止。
|
|
19
|
+
|
|
20
|
+
## 安装
|
|
21
|
+
|
|
22
|
+
使用桌面入口前,请准备 **Node.js 22.18.0 或更高版本**、npm、Git,以及带可用 `dsh` 命令的受支持 DSH 桌面。目前插件声明兼容 **DSH 0.2.1-rc.5、0.2.2-rc.1 和 0.2.2-rc.2**。还需准备所选模型路由使用的账号和 CLI 工具。DSH 自身可能要求更高版本的 Node;受支持的 0.2.2-rc.1 SDK 要求 Node 24.9 或更高。
|
|
23
|
+
|
|
24
|
+
```sh
|
|
25
|
+
npx -y @ckanner/flywheel@latest install
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
安装器配置同版本 CLI、原生二进制、worker、内嵌技能和 DSH 插件。原生包覆盖 macOS/Linux 的 arm64 和 x64,通过 npm 安装不需要 Go。账号登录与 provider 配置是独立步骤;已有配置和用户修改过的技能会保留。
|
|
29
|
+
|
|
30
|
+
需要安装到用户可写的 npm prefix 时:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
npx -y @ckanner/flywheel@latest install --prefix "$HOME/.local"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
将该 prefix 的 `bin` 加入 shell PATH 后即可直接使用 `flywheel`。[安装指南](docs/zh-CN/getting-started.md)包含桌面注册、SDK provider、诊断、升级和首个任务的完整步骤。
|
|
37
|
+
|
|
38
|
+
本 README 描述当前源码。通过 `npm view @ckanner/flywheel version` 查看实际发布版本;源码合并不会更新已有安装。版本变化集中记录在 [CHANGELOG](CHANGELOG.md)。
|
|
39
|
+
|
|
40
|
+
## 运行第一个任务
|
|
41
|
+
|
|
42
|
+
在 DSH 中打开目标仓库,描述一个范围明确的变更:
|
|
43
|
+
|
|
44
|
+
```text
|
|
45
|
+
/flywheel-task 修复列表空状态,补齐回归测试并完成变更。mode=auto
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
技能先研究仓库,在 `docs/<task>/` 准备任务契约,再由 Go 校验并接管执行。只准备任务而不启动时使用 `/flywheel-new`;启动或恢复已有任务使用 `/flywheel-run`。在 Kimi 中,对应命令形式为 `/skill:flywheel-task`。
|
|
49
|
+
|
|
50
|
+
打开原生会话中的 **Flywheel** 视图,选择任务后即可查看画布、运行记录和配置。任务位置来自会话与运行索引,无需手工输入路径。
|
|
51
|
+
|
|
52
|
+
已有任务可以通过 CLI 启动和查看:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
flywheel control launch --cwd /path/to/repo --task-dir /path/to/repo/docs/my-task --mode auto
|
|
56
|
+
flywheel control status --cwd /path/to/repo --task-dir /path/to/repo/docs/my-task
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
在目标仓库中运行以下只读配置检查:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
flywheel config inspect --cwd "$PWD" --json
|
|
63
|
+
flywheel doctor --cwd "$PWD" --json
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Doctor 检查本地接入条件,不代表真实模型调用已经可用。单阶段操作、人工接管、运行对比和明确授权的 GitHub 交付入口见[工作台指南](docs/zh-CN/flow-console.md)。
|
|
67
|
+
|
|
68
|
+
## 选择工作流
|
|
69
|
+
|
|
70
|
+
| 模式 | 适用场景 | 执行方式 |
|
|
71
|
+
| --- | --- | --- |
|
|
72
|
+
| **Auto** | 已准备好范围和验收条件的任务 | Go 根据契约判断,满足 Quick 条件时选择 Quick,否则使用 Full。 |
|
|
73
|
+
| **Quick** | 一个里程碑、一个有明确边界且验收充分的 packet | Execute → 必需检查 → 独立最终 Review → 本地交付;发现新风险可升级为 Full。 |
|
|
74
|
+
| **Full** | 多个 packet、设计工作或影响较广的变更 | Plan → packet 执行、检查、评审与本地交付 → 集成验证和 Judge。 |
|
|
75
|
+
|
|
76
|
+
Quick 保留仓库必需检查和交付检查。首次成功路径有两次阶段 agent 调用,不含宿主准备、重试和 agent 内部工具调用。没有工作流元数据的旧任务继续使用 Full。详见[工作流与交付](docs/zh-CN/workflow.md)。
|
|
77
|
+
|
|
78
|
+
根因尚不明确时,Task 可以先执行[有界调查](docs/zh-CN/investigation.md)。只调查的目标以证据报告结束;已授权的修复保留原范围,再进入 Auto。New → 审阅 → Run 和单阶段直接入口继续保留。
|
|
79
|
+
|
|
80
|
+
## 模型与配置
|
|
81
|
+
|
|
82
|
+
内嵌模板提供以下可编辑绑定。这些是初始配置,不是模型排名,也不承诺具体账号可用。
|
|
83
|
+
|
|
84
|
+
| 阶段或路由 | 后端 | 模型 | 推理等级 |
|
|
85
|
+
| --- | --- | --- | --- |
|
|
86
|
+
| Plan、前端执行、Garden | Kimi CLI | `kimi-code/k3.1-pro` | `high` |
|
|
87
|
+
| 默认执行 | DSH / `deepseek-account` | `deepseek-flash` | `high` |
|
|
88
|
+
| 高难度执行 | Codex Pro 公开 machine API | `gpt-6.1-sol` | `high` |
|
|
89
|
+
| Review | DSH / `chatgpt` | `gpt-6.1-sol` | `high` |
|
|
90
|
+
| Judge | DSH / `chatgpt` | `gpt-6-astra` | `high` |
|
|
91
|
+
| Intake | DSH / `deepseek-account` | `deepseek-flash` | `low` |
|
|
92
|
+
|
|
93
|
+
[Claude Code Pro](docs/zh-CN/claude-code-pro.md) 是可选后端,目前没有默认分配阶段。Profiles 支持在各阶段和路由间复用或覆盖绑定。[配置指南](docs/zh-CN/configuration.md)说明文件优先级、provider、权限、预算和迁移;[模型策略](docs/zh-CN/model-policy.md)说明推理等级的选择依据与限制。
|
|
94
|
+
|
|
95
|
+
新的内嵌默认配置选择 scoped 会话、full-access 权限、自动管理 worktree,以及最大并发数为 2 的并行调度。并行资格仍要求显式声明依赖和写入范围。已有完整配置缺少字段时保留兼容默认值,升级不会自动改写配置。
|
|
96
|
+
|
|
97
|
+
## 工作区与恢复
|
|
98
|
+
|
|
99
|
+
**项目工作区**是会话所属的仓库,**执行目录**是任务或 packet 修改、验证代码的位置,两者可以不同。自动管理 worktree 与调度方式独立;关闭自动管理不会自动关闭并行。共享目录批次必须基于最终共同候选进行验收。
|
|
100
|
+
|
|
101
|
+
会话历史复用和调用恢复是不同机制。派发、结果或清理未知时,即使请求新建会话也不能继续执行。各后端能力不同,具体边界见[中断恢复与上下文质量](docs/zh-CN/session-recovery.md)。离线评估可以验证协议行为,不能证明真实模型质量、缓存节省或性能收益。
|
|
102
|
+
|
|
103
|
+
## 文档与开发
|
|
104
|
+
|
|
105
|
+
[文档索引](docs/README.zh-CN.md)提供中英文指南、架构规范和历史记录入口。
|
|
106
|
+
|
|
107
|
+
- [配置参考](docs/zh-CN/configuration.md)
|
|
108
|
+
- [DSH 插件](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/README.zh-CN.md)与 [worker 协议](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/PROTOCOL.md)
|
|
109
|
+
- [架构规范](docs/design.md)——以中文维护
|
|
110
|
+
- [贡献指南](docs/zh-CN/contributing.md)与[发行手册](docs/zh-CN/releasing.md)
|
|
111
|
+
|
|
112
|
+
开发需要 **Go 1.27 或更高版本**以及贡献指南指定的 Node/npm 工具链。Go 质量门禁包含格式、vet,以及每个被测函数 100% statement coverage;包与适配器变更另有构建、跨进程和安装检查。
|
|
113
|
+
|
|
114
|
+
## 许可证
|
|
115
|
+
|
|
116
|
+
Flywheel 使用 [MIT License](LICENSE)。第三方代码保留各自声明,详见 [DSH 插件第三方声明](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/THIRD_PARTY_NOTICES.md)和[内置适配器来源](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md)。
|