@ckanner/flywheel 0.30.1 → 0.31.0
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 +23 -0
- package/README.en.md +4 -0
- package/README.md +4 -0
- package/docs/configuration.md +4 -2
- package/docs/en/configuration.md +4 -2
- package/docs/en/flow-console.md +20 -6
- package/docs/en/session-recovery.md +2 -0
- package/docs/en/workflow.md +4 -2
- package/docs/flow-console.md +20 -6
- package/docs/session-recovery.md +2 -0
- package/docs/workflow.md +8 -6
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.31.0 — 项目归属与执行目录分离(发行候选)
|
|
4
|
+
|
|
5
|
+
- Session 归属原仓库,执行、验收与交付仍绑定实际任务目录;提示词和界面分别展示两层位置。
|
|
6
|
+
- DSH SDK Session 使用稳定项目 header 和公开目录切换;桌面 Host 通过 Workspace 注册表补齐归属,探测会话使用临时持久化目录。
|
|
7
|
+
- 自动管理 Worktree 默认开启,与并行策略解耦;新默认允许并行,最大并发 2,仍核对任务依赖及写入范围。
|
|
8
|
+
- 共享目录并发采用批次验收:所有执行结束后验证完整共同候选,返修导致旧证据失效时重验,全部通过后统一提交并原子完成整组;保留未知调用和清理阻断。
|
|
9
|
+
- 关闭自动管理后允许并发,也支持执行者在实现前提交结构化目录提案;核对同仓库、基线、分支、干净状态和独占归属后登记,后续执行/Review/交付跟随该目录,外部 Worktree 保留。
|
|
10
|
+
- 旧回执先按原身份核对;同项目的旧会话可继续使用,不重写历史头部。无法分离 workspace-write 沙箱根的后端明确拒绝该权限组合,不静默扩大权限。
|
|
11
|
+
- 插件测试按文件串行运行,避免并发启动的测试进程挤占用于故障注入的真实截止时间;未放宽断言或 timeout。
|
|
12
|
+
|
|
13
|
+
当前为本地候选,尚未提交、发布或安装;0.30.2 正式发行不包含本轮修复。
|
|
14
|
+
|
|
15
|
+
## 0.30.2 — 画布优先的流程工作台
|
|
16
|
+
|
|
17
|
+
- 大画布、原生专注视图、任务子图、跨分页定位与窄窗口列表;节点详情按进展/会话/本次配置组织。
|
|
18
|
+
- 配置自动读取、中文阶段与推理选项、分钟/秒换算、相邻保存按钮;保护未保存草稿,恢复缓存时重新核对文件 revision。
|
|
19
|
+
- 重试与运行确认绑定原 revision,待交付依赖不可绕过;受管会话续接命令使用原会话工作目录。
|
|
20
|
+
- Quick 验证同时核对 L1 与终验结果;关闭的 PR 不冒充合并,旧远端快照在状态变更后失效。
|
|
21
|
+
- 运行记录以列表与详情呈现,对照对象不改变指标查询目标;费用缺失不显示为零。
|
|
22
|
+
- 保持 Go 控制边界和默认配置语义;JEV 继续默认关闭、只提供可选影子建议。
|
|
23
|
+
|
|
24
|
+
本条描述发行内容;六包 registry 完整性、latest 与真实桌面安装分别验收。
|
|
25
|
+
|
|
3
26
|
## 0.30.1 — 任务发现与可选影子评估
|
|
4
27
|
|
|
5
28
|
- 画布以任务选择为入口:按 DSH 会话 ID 找回 CLI 运行,旧记录一键选择;删除路径输入框,有实际位置时自动显示只读信息。
|
package/README.en.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Flywheel
|
|
2
2
|
|
|
3
|
+
Project workspaces and execution directories are separate: sessions belong to the original repository, while tasks may execute in independent Worktrees. Automatic Worktree management is enabled by default and is independent from parallel scheduling. Caller-selected execution directories are validated and registered by the engine. See the [flow console guide](docs/en/flow-console.md).
|
|
4
|
+
|
|
3
5
|
English | [简体中文](README.md)
|
|
4
6
|
|
|
5
7
|
Flywheel turns reviewed software requirements into bounded coding tasks with explicit acceptance criteria. A deterministic Go engine runs Plan, Execute, Review, and verification loops. Models propose plans, implement changes, and review candidates; the engine owns state, retries, budgets, workspaces, verification, local Git delivery, and stopping.
|
|
@@ -168,4 +170,6 @@ The package currently declares **`UNLICENSED`**. An open-source license has not
|
|
|
168
170
|
|
|
169
171
|
The DSH view adds a horizontal task canvas, stage run/retry, per-stage configuration, controlled Provider-session interaction, declared parallel execution with serial integration, observed run metrics and PR/Merge receipts. See the [console guide](docs/en/flow-console.md). Source implementation does not imply npm publication or a local upgrade.
|
|
170
172
|
|
|
173
|
+
The workbench prioritizes a large task overview, on-demand node details and separate task subgraphs. Configuration loads automatically into focused sections; adjacent save actions appear only after edits. Saved defaults apply to subsequent starts.
|
|
174
|
+
|
|
171
175
|
Optional, default-off JEV shadow evaluation is included in the 0.30.1 source; see the [guide](docs/en/jev-shadow.md). Advice cannot change workflows, and observer failures do not block tasks.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Flywheel(飞轮)
|
|
2
2
|
|
|
3
|
+
项目工作区与任务执行目录分开:Session 归属原仓库,任务可以在独立 Worktree 执行。配置页提供默认开启的“自动管理任务 Worktree”,与并行调度独立;自行选择目录须由引擎核对登记。详见[流程控制台](docs/flow-console.md)。
|
|
4
|
+
|
|
3
5
|
[English](README.en.md) · 简体中文
|
|
4
6
|
|
|
5
7
|
Flywheel 用确定性 Go 引擎驱动 Plan、Execute、Review 和分层验收,把已经明确的需求变成有边界、可验证、可持久化的软件交付。模型负责规划、实现和评审;引擎负责状态、重试、预算、工作区、验收、提交与停止。
|
|
@@ -290,4 +292,6 @@ npm run build:npm
|
|
|
290
292
|
|
|
291
293
|
DSH 会话视图提供从左到右的任务画布、节点运行/重跑、按阶段配置、受管 Session 交互、声明式并行与串行集成、运行指标和 PR/Merge 回执。完整操作与当前能力边界见[控制台指南](docs/flow-console.md)。源码状态不等于 npm 已发布或本机已升级。
|
|
292
294
|
|
|
295
|
+
工作台默认以大画布展示任务总览,节点详情按需打开,任务步骤在独立子图中展开。“配置”自动读取并分组编辑,修改后才出现相邻的保存操作;新配置只影响后续启动。
|
|
296
|
+
|
|
293
297
|
可选、默认关闭的 JEV 影子评估源码实现见[使用说明](docs/jev-shadow.md)。开启仅记录建议,故障不阻断原流程;需要同版本 CLI/插件。
|
package/docs/configuration.md
CHANGED
|
@@ -418,7 +418,9 @@ DSH 的「全局 / 项目配置」先读取显式作用域和文件 revision,
|
|
|
418
418
|
|
|
419
419
|
`permissions.bindings` 在全局 `permissions.mode` 上按 `loops.<role>`、`routes.<route>`、`judge-panel` 覆盖实际宿主权限,值为 `read-only`、`workspace-write` 或 `danger-full-access`。语法以 `permission-policy.schema.json` 为准;后端仍须证明支持该权限,不会把 Claude 原生审批模式伪装成只读沙箱。
|
|
420
420
|
|
|
421
|
-
`scheduler` 的字段以 `scheduler-policy.schema.json`
|
|
421
|
+
`scheduler` 的字段以 `scheduler-policy.schema.json` 为准。新默认允许 parallel(最大并发 2),已有显式 serial 保留;parallel 只并发满足冻结 `schedule.after/writes` 的独立单元,`max-parallel` 控制任务并发,`providers` 按实际账号渠道限流。hard 预算在确认计费前只允许一个模型调用。声明缺失或写入冲突不会被解释为独立。
|
|
422
|
+
|
|
423
|
+
`worktree.enabled` 默认 true,只控制引擎自动创建/管理 Worktree;关闭不禁止并行,也不禁止用户或模型自行创建。项目归属与实际执行目录分别记录,外部目录登记协议见[流程控制台](flow-console.md)。当前原生后端不能把 `workspace-write` 沙箱根和项目目录独立设置,不支持的分离组合会在派发前失败;不会扩大权限来掩盖问题。
|
|
422
424
|
|
|
423
425
|
例如把 Review 固定为只读,并允许两个已声明独立的任务并行:
|
|
424
426
|
|
|
@@ -426,7 +428,7 @@ DSH 的「全局 / 项目配置」先读取显式作用域和文件 revision,
|
|
|
426
428
|
{
|
|
427
429
|
"permissions": {
|
|
428
430
|
"mode": "full-access",
|
|
429
|
-
"bindings": {"loops.review":"read-only"
|
|
431
|
+
"bindings": {"loops.review":"read-only"}
|
|
430
432
|
},
|
|
431
433
|
"scheduler": {"mode":"parallel","max-parallel":2,"providers":{"deepseek-account":1}}
|
|
432
434
|
}
|
package/docs/en/configuration.md
CHANGED
|
@@ -363,7 +363,7 @@ Advanced callers send JSON on stdin to `flywheel control config-edit --cwd /abso
|
|
|
363
363
|
|
|
364
364
|
`permissions.bindings` overrides the global mode by `loops.<role>`, `routes.<route>` or `judge-panel`, using read-only, workspace-write or danger-full-access. Read `permission-policy.schema.json` for the contract. Adapters must still prove the requested capability; native Claude approval modes are not advertised as an OS read-only sandbox.
|
|
365
365
|
|
|
366
|
-
`scheduler` is defined by `scheduler-policy.schema.json`.
|
|
366
|
+
`scheduler` is defined by `scheduler-policy.schema.json`. The new default permits parallel execution with a limit of two; existing explicit serial settings remain unchanged. Parallel only dispatches independent units declared by frozen schedule.after/writes; max-parallel limits units and providers limits actual account channels. Hard budgets admit one model call until its accounting is durable. Missing declarations and overlapping write scopes are not independence.
|
|
367
367
|
|
|
368
368
|
For example:
|
|
369
369
|
|
|
@@ -371,7 +371,7 @@ For example:
|
|
|
371
371
|
{
|
|
372
372
|
"permissions": {
|
|
373
373
|
"mode": "full-access",
|
|
374
|
-
"bindings": {"loops.review":"read-only"
|
|
374
|
+
"bindings": {"loops.review":"read-only"}
|
|
375
375
|
},
|
|
376
376
|
"scheduler": {"mode":"parallel","max-parallel":2,"providers":{"deepseek-account":1}}
|
|
377
377
|
}
|
|
@@ -382,3 +382,5 @@ This is a field excerpt, not a complete configuration replacement. The console r
|
|
|
382
382
|
## Optional JEV shadow evaluation
|
|
383
383
|
|
|
384
384
|
`jev-shadow.enabled` defaults to false, including older configurations that omit it. The global/project editor exposes the switch. Enabling only observes new tasks; failures never block workflows or change Quick/Full. See the [JEV guide](jev-shadow.md) for endpoint, version pin, key variable and timeout. This feature requires the 0.30.1 CLI/plugin.
|
|
385
|
+
|
|
386
|
+
Automatic Worktree management (`worktree.enabled`, default true) is independent from scheduling. Off neither prohibits parallel dispatch nor prevents callers from creating Worktrees. Project membership and execution directories are separate; see the [console guide](flow-console.md) for directory registration. Native backends without a separate `workspace-write` sandbox root reject unsupported split-directory requests before dispatch, without expanding permissions.
|
package/docs/en/flow-console.md
CHANGED
|
@@ -8,7 +8,9 @@ The canvas starts with task selection. One registered task belonging to the curr
|
|
|
8
8
|
|
|
9
9
|
Older records without a host ID remain selectable under Recent tasks on this computer. Selection performs a read-only status query and associates the task with the conversation. Refreshing the list does not start, retry or replace a manually selected task. Read failures retain the existing canvas; unresolved operations still require reconciliation against their original task.
|
|
10
10
|
|
|
11
|
-
There are no editable task/project path fields. The
|
|
11
|
+
There are no editable task/project path fields. The project workspace remains the original repository; the execution directory may be a task checkout or independent Worktree. These locations are displayed separately when known. The task folder contains the specification, acceptance checks and progress. A prepared task can be associated using read-only status and then selected from the list.
|
|
12
|
+
|
|
13
|
+
DSH keeps the original repository in the Session header and switches the current execution directory through its public API. The desktop Host periodically attaches Flywheel SDK sessions to matching existing projects; task status also ensures the original project is registered. It does not create a desktop workspace for every packet Worktree or rewrite old Session headers. Probes use temporary persistence, leaving no new user sessions. Native Providers start sessions in the project; task prompts name the actual execution directory for every shell/file operation. Backends unable to separate a `workspace-write` sandbox root reject that combination before dispatch instead of widening permissions. Full access and supported read-only modes retain their actual semantics.
|
|
12
14
|
|
|
13
15
|
Loading a skill does not start the engine. flywheel-task prepares and calls flywheel_launch; a research/proposal-only response must explicitly say the engine was not started. Single-stage skills query flywheel_control status afterward to associate their canvas, or disclose the exact path when that tool is absent rather than claiming association.
|
|
14
16
|
|
|
@@ -22,7 +24,9 @@ Continue workflow is behind an explicit disclosure. A passed stage does not star
|
|
|
22
24
|
|
|
23
25
|
In an existing DSH conversation view, Flywheel remains after Statistics; the blank new-session landing page does not yet show these conversation views. Its pages are Workflow canvas, Global/project configuration, and Runs and comparison. Global settings require no task directory. Project settings target the selected Git root. Discovery still selects one complete file in task → project → global → embedded order; it does not deep-merge files.
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
Opening Configuration automatically reads the selected scope. Workflow policy, model assignments, budget/retries and JEV shadow advice have separate sections. Save and Discard appear beside the form only after edits. Ordinary saving takes one click; first enabling JEV confirms the task-summary transfer boundary. Serial mode omits concurrency controls. Minutes and seconds are converted precisely to engine millisecond fields.
|
|
28
|
+
|
|
29
|
+
More configuration actions provides reload and installed-default restoration. Scope changes or reloads first disclose unsaved drafts; restoring defaults loads a pending full replacement before saving. Failures retain the draft and an uncertain save requires reconciliation. Go checks file identity, backs up the original and publishes atomically. A running engine retains its snapshot. The displayed source is file-level: task → project → global → installed defaults selects one file, not a per-field overlay. New files start from the installed template.
|
|
26
30
|
|
|
27
31
|
Resources include ChatGPT through DSH or Codex Pro, Kimi Code, DeepSeek Account (Flash by default), and optional Claude Code Pro. Defaults come from the embedded template. Use config inspect and doctor for actual backend capabilities. An absent peer or unsupported permission fails explicitly. Provider sign-in stays with its normal account flow.
|
|
28
32
|
|
|
@@ -30,9 +34,13 @@ Resources include ChatGPT through DSH or Codex Pro, Kimi Code, DeepSeek Account
|
|
|
30
34
|
|
|
31
35
|
## Canvas and operations
|
|
32
36
|
|
|
33
|
-
The left-to-right
|
|
37
|
+
The left-to-right overview groups Plan/decomposition, scheduling, task branches, integration/final checks and PR/Merge. Selecting a node opens view-local Progress, Sessions and Run configuration details. Open task workflow drills into Execute, L1, Review and Git delivery; integration and remote delivery groups also expand. Colors have text labels. Identity, project/worktree, branch, HEAD, run ID, bindings and evidence come from actual receipts.
|
|
38
|
+
|
|
39
|
+
The canvas uses the available plugin width, with two-axis panning, zoom, fit width, current-step location, paging and a list alternative. New snapshots preserve the viewport and selection; location can switch to the running packet's page. Large tasks use bounded excerpts. Read full node evidence loads one packet with a matching fresh revision; it never changes the ledger.
|
|
40
|
+
|
|
41
|
+
Focus canvas expands the view in a plugin-owned native dialog. Exit or Escape returns without starting or stopping the task. It does not change the DSH global layout or composer. Unknown operation outcomes exit focus mode so the original-invocation reconciliation action remains visible.
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
Node operation confirmation freezes the observed revision; a changed snapshot invalidates it. Retry once requires a reason, while reopening a completed packet explains evidence invalidation. Review cannot run with a red current L1. Unqueried remote state, closed PR and merged PR remain distinct.
|
|
36
44
|
|
|
37
45
|
- Run stage submits the observed revision for lease-bound admission.
|
|
38
46
|
- Continue once records a reason and adds one Execute/L1 attempt without resetting failures or billing.
|
|
@@ -62,7 +70,11 @@ schedule:
|
|
|
62
70
|
|
|
63
71
|
Dependencies reference earlier known packet IDs. Writes are normalized relative paths or directory prefixes, without globs or escapes. Include ordinary tests/configuration and account for shared test resources. Undeclared independence, overlapping scopes and live-credential units remain serial.
|
|
64
72
|
|
|
65
|
-
|
|
73
|
+
Configuration → Workflow policy → Automatically manage task Worktrees is on by default (`worktree.enabled`). It controls automatic directory creation/management independently from parallel scheduling. New defaults allow parallel execution with a limit of two; existing explicit serial settings remain unchanged. With automatic management off, tasks may run concurrently in the task checkout or choose their own Worktrees. Shared directories do not provide file isolation: write-scope conflicts, candidate drift and failed acceptance still stop progress.
|
|
74
|
+
|
|
75
|
+
To select another execution Worktree, the executor first prepares a clean checkout of the same repository and task baseline, unclaimed by another unit in this workflow and with a branch not shared by multiple Worktrees, then returns only `{"flywheelExecutionDirectory":{"cwd":"/absolute/worktree","branch":"actual-branch"}}` before implementation. Go validates and records it; the next invocation, tests, Review and delivery follow that directory. Registration is not task completion and its model usage is still billed. External Worktrees are retained. A prompt-only directory claim or edited state file cannot replace this registration.
|
|
76
|
+
|
|
77
|
+
Independent Worktrees permit concurrent Execute/L1. Shared checkouts run Execute concurrently, then verify and review serially after all workers finish. One Go coordinator serializes CAS writes and accounting. Hard budgets admit only one model call at a time, retaining its slot through durable accounting. Other modes enforce total and channel concurrency. Cancellation awaits every started worker.
|
|
66
78
|
|
|
67
79
|
Review, integration and milestone gates remain serial. A combined candidate is revalidated after incorporating earlier work. Bounded execution failures retain their escalation policy. Integration conflicts and failed gates preserve the worktree and evidence. Write scopes are orchestration/acceptance contracts; full access is not an OS sandbox.
|
|
68
80
|
|
|
@@ -87,7 +99,7 @@ Ledger storage v2 is accepted by the new engine alongside legacy v1. Older engin
|
|
|
87
99
|
|
|
88
100
|
CLI and desktop starts register run IDs. A conversation retains multiple confirmed task associations. The index lives in runs/ beside the global configuration, optionally overridden by absolute FLYWHEEL_RUNS_DIR. It shows the latest 100 registrations and never scans the disk. Query Go again for liveness.
|
|
89
101
|
|
|
90
|
-
|
|
102
|
+
Run history uses a selection list with adjacent details for operation kind, branch, HEAD, contract/configuration conditions, elapsed time and newly observed attempts, failures and deliveries. Selecting a record does not launch it; opening its canvas refreshes current Go state. Metrics scope chooses the selected run or all calls for its task, including legacy observations. The reference compares conditions without changing the metrics target. Invocation/receipt reconciliation precedes aggregation; late receipts keep their original attribution and are not double-billed. A group with entirely missing cost shows Not reported, not $0.
|
|
91
103
|
|
|
92
104
|
Usage, cost and duration are known amounts, with missing/partial observations retained. Costs may include estimates from configured prices. Call failure rate is not code quality. Different conditions permit descriptive comparison only; quality conclusions require acceptance evidence and an independent oracle.
|
|
93
105
|
|
|
@@ -102,3 +114,5 @@ Merge rechecks the PR, head, base and checks, using `--match-head-commit`. It ne
|
|
|
102
114
|
Retries reconcile existing PR/merge results before mutations. Missing receipts remain unknown. Remote state is separate from local engine completion. Publication must bind the actual merge commit and artifacts for its own validation; Merge does not automatically publish npm packages or deploy.
|
|
103
115
|
|
|
104
116
|
The configuration panel also exposes default-off **JEV shadow evaluation (optional)**. See the [JEV guide](jev-shadow.md) for the switch, transmitted data and nonblocking failures. This requires the 0.30.1 CLI/plugin.
|
|
117
|
+
|
|
118
|
+
When a batch shares one checkout, all executor calls finish before L1 and independent Review validate the complete combined candidate. Changes are projected onto declared scopes; undeclared and forbidden paths still fail. This does not attribute filesystem writes to individual processes. Repairs invalidate earlier proofs. Only after every peer passes can code be committed and all completions published in one state CAS; failed publication never optimistically completes a subset. Mixed batches deliver the shared checkout first, then revalidate and integrate external Worktrees. Manual integration/final checks cannot bypass the batch barrier; resume the complete workflow. The canvas shows the cohort and previous error.
|
|
@@ -79,3 +79,5 @@ The offline native fixture exercises the real Go engine, worker v3, and public p
|
|
|
79
79
|
Recovery journals have private permissions, exclusive creation, identity/digest checks, and atomic persistence. Existing directories never authorize redispatch. They are task audit data and may contain model output and diagnostics; keep their access and backups with the task. Do not copy credentials or delete uncertain evidence during upgrades.
|
|
80
80
|
|
|
81
81
|
There is currently no automatic journal-retention timer. Archive evidence through the project's task lifecycle after completion or explicit resolution of an unknown result. Deleting a journal is not a recovery procedure. `control status` and doctor are observation surfaces; models and skills never write `state.json`. Resume through the normal Go entry point from the original task directory so the engine can reconcile before making a new call.
|
|
82
|
+
|
|
83
|
+
For shared-checkout execution, an Execute receipt fingerprints its declared write scope and binds that scope into the session identity. Independent peer changes do not discard a known invocation; changes within its own scope still reject stale receipts. L1, independent Review and collective delivery validate the entire combined candidate. Scoped receipts neither prove batch completion nor bypass unknown dispatch, outcome or cleanup.
|
package/docs/en/workflow.md
CHANGED
|
@@ -44,7 +44,9 @@ DeepSeek uses the existing signed-in, funded DSH account. `deepseek-official` AP
|
|
|
44
44
|
|
|
45
45
|
Use the preparation model to identify risks and improve the contract. Increasing effort cannot repair missing requirements, an invalid test oracle, or an incorrectly chosen working directory. Later execution routes and the independent Review/Judge stages remain explicit configuration; see [Configuration](configuration.md).
|
|
46
46
|
|
|
47
|
-
## 2.
|
|
47
|
+
## 2. Choose the task execution directory
|
|
48
|
+
|
|
49
|
+
First inspect the effective `worktree.enabled` setting. The default enabled mode follows the independent Worktree flow below. With automatic management off, use the selected task checkout; callers may still choose a Worktree and parallel scheduling remains independent. Session project membership is recorded separately from execution location. See the [console guide](flow-console.md).
|
|
48
50
|
|
|
49
51
|
For an existing repository, create or deliberately reuse a task branch in its own worktree before invoking `flywheel-new`. The host or user performs this step. Choose unused names and substitute the repository's actual base branch:
|
|
50
52
|
|
|
@@ -147,7 +149,7 @@ Preflight does not infer with a model or execute acceptance commands. Its unknow
|
|
|
147
149
|
|
|
148
150
|
For the new unified entry, use `control launch ... --mode auto` in place of `start`. It consumes prepared contracts and defaults to Auto. `start` and foreground `run` accept optional `--mode auto|quick|full`; omission retains the contract or persisted choice. Existing legacy state remains Full. Restarting or requesting Auto does not reclassify or downgrade an established Full task.
|
|
149
151
|
|
|
150
|
-
DSH's `flywheel_launch` and `flywheel_control` start associate the supplied `taskDir` and `cwd` with the initiating session.
|
|
152
|
+
DSH's `flywheel_launch` and `flywheel_control` start explicitly associate the supplied `taskDir` and `cwd` with the initiating session. CLI registrations can retain DSH's host session ID; independent terminal runs without that identity can be selected from Recent tasks and freshly queried. The UI has no editable task/project path fields: known locations appear read-only. The host directory comes from public `workingDirectory.get(session)`; a shell `cd` alone does not change it. The plugin does not scan or guess tasks.
|
|
151
153
|
|
|
152
154
|
### Working directory by stage
|
|
153
155
|
|
package/docs/flow-console.md
CHANGED
|
@@ -8,7 +8,9 @@
|
|
|
8
8
|
|
|
9
9
|
旧版本记录没有会话 ID 时,从“本机最近任务”选择即可;选择会发送只读状态查询,并保存到当前会话关联。刷新任务列表不会启动、重试或切换你手动选中的任务。读取失败保留已打开画布;未确认的操作仍先核对原任务。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
界面不再提供任务路径/项目路径输入框。助手与引擎提供实际位置;有值后显示为只读信息。项目工作区是原仓库的稳定归属,实际执行目录可以是任务集成目录或独立 Worktree,两者分开显示。任务文件夹保存说明、验收清单和进度。准备但尚未运行的任务由助手通过只读 status 关联,随后也能在列表中选择。
|
|
12
|
+
|
|
13
|
+
DSH Session 的原始项目目录保留为原仓库,运行时通过公开接口切换当前执行目录。桌面 Host 定期把 Flywheel SDK 会话登记到已有的匹配项目;读取实际任务状态时也会确保原项目已登记。不会把每个 packet Worktree 创建成新的桌面工作区,不修改旧 Session 的历史头部;旧会话只能按其真实目录归属。探测会话写入临时存储,退出后清理,不再污染用户会话列表。原生 Provider 在项目目录开会话,任务提示词明确列出实际执行目录;每次 shell/文件操作必须显式使用它。当前后端不能分离 `workspace-write` 沙箱根时,在派发前明确拒绝该组合,不自动扩大权限;完全权限及支持的只读模式保持其真实含义。
|
|
12
14
|
|
|
13
15
|
Skill 已加载不代表引擎已经启动。`flywheel-task` 准备并通过 `flywheel_launch` 启动后才产生运行;只要求调研或方案时,助手应明确说明尚未启动。单阶段技能执行后通过 `flywheel_control status` 关联当前画布;没有该工具时明确给出路径,不能声称已关联。
|
|
14
16
|
|
|
@@ -22,7 +24,9 @@ Skill 已加载不代表引擎已经启动。`flywheel-task` 准备并通过 `fl
|
|
|
22
24
|
|
|
23
25
|
在已进入对话视图的 DSH 会话中,Flywheel 排在“统计”之后;新会话的空白首页尚未显示这排会话视图。内部有“运行画布”“全局/项目配置”“运行与对比”。全局配置可在没有任务目录时编辑;项目配置写入所选 Git 项目根。任务配置仍具有最高优先级,取首个完整文件,不做字段深度合并。
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
打开“配置”后自动读取所选范围,不必先点击读取按钮。按“工作方式/模型分配/预算与重试/JEV 影子建议”编辑;有修改才出现相邻的“保存修改/放弃修改”。普通保存一次点击,首次开启 JEV 先确认任务摘要发送边界。串行模式不显示并发数量;超时以分钟或秒编辑,并精确换算成引擎毫秒字段。
|
|
28
|
+
|
|
29
|
+
“更多配置操作”提供重新读取和恢复安装版本默认配置。切换范围或重新读取会先提示未保存草稿;重置先载入待保存修改,保存时才替换文件。保存失败保留草稿,结果未知时先重新读取核对。Go 核对文件 revision、备份旧文件并原子写入。正在运行的引擎保留原快照,新配置在后续启动时加载。配置页显示真实文件与来源:文件按任务 → 项目 → 全局 → 安装默认选择,不逐字段叠加;尚未存在的配置文件以安装模板创建。
|
|
26
30
|
|
|
27
31
|
支持的资源入口包括 ChatGPT · DSH、ChatGPT · Codex Pro、Kimi Code、DeepSeek Account(默认 Flash)及可选 Claude Code Pro。模型初值来自本版本模板,真实能力以 `config inspect`/`doctor` 为准。Claude 的可选适配器必须匹配公开 machine API;缺失或权限不支持会拒绝调用,不自动换后端。账号登录仍由各 Provider 自己完成。
|
|
28
32
|
|
|
@@ -30,9 +34,13 @@ Skill 已加载不代表引擎已经启动。`flywheel-task` 准备并通过 `fl
|
|
|
30
34
|
|
|
31
35
|
## 横向画布与节点操作
|
|
32
36
|
|
|
33
|
-
主线从左到右展示 Plan
|
|
37
|
+
主线从左到右展示 Plan/拆分、调度、任务分支、汇总与终验、PR 与 Merge。点击节点打开视图内详情,按“进展/会话/本次配置”查看,不挤到画布下方。点击“展开任务画布”进入 Execute、L1、Review、Git 交付子图;汇总和远端交付也可展开阶段。状态配合颜色和文字,运行与节点详情使用真实项目/worktree、分支、HEAD、run ID、调用绑定和失败证据。
|
|
38
|
+
|
|
39
|
+
画布占满插件可用宽度,支持双向拖动、缩放、适合宽度、定位当前步骤、分页与列表切换。新快照保留视角与选择;定位可跳到当前执行任务所在分页。大任务使用有界诊断摘要;“读取完整节点证据”按需加载选中节点,revision 与同一时刻的画布状态一起刷新。摘要不会改写原始账本。
|
|
40
|
+
|
|
41
|
+
“专注画布”在插件拥有的原生对话框中扩大画布,退出或按 Escape 回到原视图,不启动或停止任务。它不修改 DSH 的全局布局或宿主输入区;操作结果未知时退出专注视图,显示原调用的核对入口。
|
|
34
42
|
|
|
35
|
-
|
|
43
|
+
运行节点前显示作用范围,确认绑定已观察的状态版本;状态变化后旧确认不可提交。失败任务的“重试一次”需要填写原因,已完成任务显示“重新执行”并说明证据失效范围。独立 Review 在当前 L1 未通过时不可运行。PR 尚未查询、已关闭、已合并分别显示,不把关闭的 PR 当作合并成功。
|
|
36
44
|
|
|
37
45
|
| 操作 | 含义 |
|
|
38
46
|
|---|---|
|
|
@@ -66,7 +74,11 @@ schedule:
|
|
|
66
74
|
|
|
67
75
|
依赖必须指向较早编号的已知 packet;写入范围是规范相对路径/目录前缀,不支持通配符或越出项目的路径。声明要覆盖实现、普通测试和必要配置,并考虑共享测试服务等真实依赖。未声明独立性、写入范围冲突或需要 live 凭证的单元保留串行。
|
|
68
76
|
|
|
69
|
-
|
|
77
|
+
“配置 → 工作方式 → 自动管理任务 Worktree”默认开启,对应 `worktree.enabled`。它只控制引擎自动创建/管理目录,不是“允许使用 Worktree”开关,也不控制能否并行。新默认 `scheduler.mode=parallel`、最大并发 2;已有显式串行配置仍保留。关闭自动管理后,可以在任务 checkout 并行,也可以由模型或用户自行选择 Worktree。共享目录没有文件隔离保证,写入范围冲突、候选变化和验收失败仍如实停止,不能把并发操作当作隔离证据。
|
|
78
|
+
|
|
79
|
+
自行选择其他 Worktree 时,执行者先创建或选好同仓库、相同任务基线、干净且未被本流程其他任务单元登记的目录(分支也不能被多个 Worktree 共享),在实现前仅返回 `{"flywheelExecutionDirectory":{"cwd":"/absolute/worktree","branch":"actual-branch"}}`。Go 校验后登记到本任务,下一次执行、测试、Review、提交均使用该目录;登记本身不算完成任务,费用仍计入预算。外部 Worktree 不自动删除。不能只在 prompt 中声明目录、修改状态文件,或在未登记的目录实现后让引擎猜测位置。
|
|
80
|
+
|
|
81
|
+
独立 Worktree 中 Execute/L1 可以并发;共享目录只并发 Execute,随后统一、串行验收与评审。一个 Go 协调器串行 CAS 保存状态和用量。hard 预算只允许一个模型调用在飞,并在下一调用前确认前一笔计费。其他模式按最大并发与渠道限制接纳。停止会等待整批已启动工作收尾。
|
|
70
82
|
|
|
71
83
|
Review、集成与里程碑 gate 保持串行。后续分支吸收已完成成果后,在合成候选上重新验收。执行重试耗尽仍走原有升级策略;集成冲突或门禁失败保留 worktree 和失败证据。`writes` 是调度/验收契约,完全权限本身不提供 OS 沙箱。
|
|
72
84
|
|
|
@@ -91,7 +103,7 @@ flywheel session '/absolute/task-worktree/docs/task-slug' --key 'execute/M01-T01
|
|
|
91
103
|
|
|
92
104
|
CLI 和桌面启动自动登记 run ID;会话投影保留多个已确认任务。登记位于全局配置旁的 `runs/`,可用绝对 `FLYWHEEL_RUNS_DIR` 覆盖。列表只读取明确登记,显示最近 100 项,不扫描整个磁盘;当前存活状态始终重新查询 Go。
|
|
93
105
|
|
|
94
|
-
|
|
106
|
+
“运行记录”以列表选择运行,在相邻详情中查看操作种类、分支、HEAD、契约/配置条件、运行时长、新增尝试、失败尝试和交付。选择记录不启动任务,打开画布会重新读取当前状态。指标范围可选“仅此运行”或当前任务全部调用(包括早期记录);对照运行仅用于比较条件,不会悄悄改变指标查询目标。指标先按 invocation/receipt 对账再汇总,迟到回执归属原调用,不重复计费。整组费用均缺失时显示“未报告”,不显示 $0。
|
|
95
107
|
|
|
96
108
|
用量、费用和时延只表示已知量,缺失/部分数据单列,费用也可能来自配置单价估算。调用失败率不等于代码质量;条件不同的运行只并列展示,不伪称配对收益。完整的质量结论需要任务验收和独立 oracle。
|
|
97
109
|
|
|
@@ -106,3 +118,5 @@ CLI 和桌面启动自动登记 run ID;会话投影保留多个已确认任务
|
|
|
106
118
|
已确认的创建/合并操作重跑时先核对已有结果。命令失败或回执丢失保留 unknown,不猜测远端成功。PR/Merge 状态与引擎的本地完成分开;发布应绑定实际 merge commit 和发布产物重新验收,不因点击 Merge 自动发布 npm 或部署。
|
|
107
119
|
|
|
108
120
|
配置面板另提供默认关闭的 **JEV 影子评估(可选)**;开关、数据发送边界与失败回退见 [JEV 指南](jev-shadow.md)。此项需要 0.30.1 CLI/插件。
|
|
121
|
+
|
|
122
|
+
关闭自动 Worktree 管理而直接共享同一 checkout 的批次,会先等所有执行调用收尾,再对完整共同候选运行各任务的 L1 和独立 Review。变更按声明范围投影,批次范围外与禁止路径仍拒绝;这不证明具体进程的文件归属。任一返修改变共同候选,旧证据须重验。全部通过后统一提交,并在一次状态 CAS 中完成整组;保存失败不乐观报告部分完成。混合批次先交付共享目录,再重新验证并集成外部 Worktree。手动集成/终验不能绕过批次屏障,需“继续完整流程”。画布显示批次成员和上次错误。
|
package/docs/session-recovery.md
CHANGED
|
@@ -79,3 +79,5 @@ Go 将事件与原调用身份核对后,先原子保存并 `fsync` 检查点
|
|
|
79
79
|
上游恢复目录与文件使用私有权限、独占创建、身份/摘要检查和原子持久化;已存在目录不会触发二次执行。它们属于任务审计证据,可能含模型输出与诊断。按任务一起保存、备份和控制访问,不复制凭证,也不因安装升级而删除未知调用的证据。
|
|
80
80
|
|
|
81
81
|
当前没有自动删除这些恢复证据的保留计时器。确认任务完成或由人解决未知结果之后,才能按项目的任务归档流程处理;删除 journal 不是解除阻断的恢复方法。`control status`/doctor 是查看入口,模型与 skills 不修改 `state.json`。需要恢复时仍从原任务目录使用正常 Go 启动入口,由引擎核对并决定下一步。
|
|
82
|
+
|
|
83
|
+
共享目录并行的 Execute 回执使用已声明写入范围的候选指纹,并把该范围绑定到会话身份;其他任务的独立变更不会导致本调用无故丢失归属。自己的范围变化仍拒绝旧回执。L1、独立 Review 与批次提交始终核对完整共同候选;范围回执不能证明整组完成,也不能绕过未知派发、结果或清理。
|
package/docs/workflow.md
CHANGED
|
@@ -71,7 +71,9 @@ Quick 不按文件数量判断风险。范围与实现模式必须明确、全
|
|
|
71
71
|
默认的运行期 Plan 仍为 Kimi CLI `kimi-code/k3.1-pro / high`,详见
|
|
72
72
|
[默认配置](../templates/flywheel.config.example.json);Kimi 别名也须在本机可用。
|
|
73
73
|
|
|
74
|
-
## 2.
|
|
74
|
+
## 2. 选择任务执行目录
|
|
75
|
+
|
|
76
|
+
先核对有效配置的 `worktree.enabled`。默认开启时采用下面的独立任务 Worktree 流程;关闭时不自动创建,使用已明确选择的任务 checkout,仍可由用户或模型主动选择 Worktree。Session 的项目归属始终与执行目录分开记录;并行设置独立,详见[控制台指南](flow-console.md)。
|
|
75
77
|
|
|
76
78
|
假设当前位于业务仓库根目录,远端为 `origin`、目标分支为 `main`。
|
|
77
79
|
将示例任务名与目录名替换为本次需求;不同任务使用不同名称。
|
|
@@ -191,10 +193,10 @@ flywheel control status --cwd "$PWD" --task-dir "$PWD/docs/my-feature"
|
|
|
191
193
|
|
|
192
194
|
预检不发送模型推理,不能证明账号额度或真实模型调用已经通过。启动会实际调用
|
|
193
195
|
所选模型。DSH `flywheel_launch` 与 `flywheel_control` start 将明确的 `taskDir`
|
|
194
|
-
和 `cwd`
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
`workingDirectory.get(session)`
|
|
196
|
+
和 `cwd` 明确关联到发起会话的 Flywheel 视图。CLI 登记可带 DSH 提供的会话 ID;
|
|
197
|
+
没有归属的独立终端运行可从“本机最近任务”选择,再查询真实状态。
|
|
198
|
+
界面不提供任务/项目路径输入框,已知位置只读展示。插件通过公开
|
|
199
|
+
`workingDirectory.get(session)` 读取宿主目录;不扫描或猜测。仅在 shell 中 `cd`
|
|
198
200
|
不会改变 DSH 的会话目录,不要混用原 checkout 的账本和新 worktree。
|
|
199
201
|
|
|
200
202
|
Full 的每个 packet 经实现、L1 与独立 Review 通过后,引擎提交并快进合入任务分支,
|
|
@@ -212,7 +214,7 @@ Full 的每个 packet 经实现、L1 与独立 Review 通过后,引擎提交
|
|
|
212
214
|
### 5.1 Skills 入口与各 Loop 的工作目录
|
|
213
215
|
|
|
214
216
|
内置 skills 将任务 worktree 约定作为准备、启动、恢复和单环入口的检查步骤。
|
|
215
|
-
`flywheel-task`/`flywheel-new`
|
|
217
|
+
`flywheel-task`/`flywheel-new` 在生成契约前按自动管理设置和用户选择确定任务 checkout;`flywheel-run` 以及单环
|
|
216
218
|
skills 从实际任务目录解析同一 worktree 根,再调用 CLI。默认不从 `main`、
|
|
217
219
|
`master` 或 detached HEAD 启动开发;已有明确工作区选择与授权不重复询问。
|
|
218
220
|
恢复复用原任务路径及引擎保存的 packet 状态,不为恢复另建一份任务或复制 state。
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckanner/flywheel",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "A deterministic Go orchestrator for coding-agent loops, with task contracts, verification gates, Git worktrees, and DSH desktop integration.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"flywheel": "bin/flywheel.js",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"docs/en/session-evaluation.md"
|
|
50
50
|
],
|
|
51
51
|
"optionalDependencies": {
|
|
52
|
-
"@ckanner/flywheel-darwin-arm64": "0.
|
|
53
|
-
"@ckanner/flywheel-darwin-amd64": "0.
|
|
54
|
-
"@ckanner/flywheel-linux-arm64": "0.
|
|
55
|
-
"@ckanner/flywheel-linux-amd64": "0.
|
|
52
|
+
"@ckanner/flywheel-darwin-arm64": "0.31.0",
|
|
53
|
+
"@ckanner/flywheel-darwin-amd64": "0.31.0",
|
|
54
|
+
"@ckanner/flywheel-linux-arm64": "0.31.0",
|
|
55
|
+
"@ckanner/flywheel-linux-amd64": "0.31.0"
|
|
56
56
|
},
|
|
57
57
|
"scripts": {
|
|
58
58
|
"release:check": "node scripts/release-preflight.js",
|
|
@@ -60,10 +60,10 @@
|
|
|
60
60
|
"test": "node --test npm/test/*.test.js",
|
|
61
61
|
"test:install": "node --test npm/test/install.integration.js",
|
|
62
62
|
"test:registry": "node npm/test/registry-smoke.js",
|
|
63
|
-
"build:npm": "bash scripts/build-npm.sh 0.
|
|
63
|
+
"build:npm": "bash scripts/build-npm.sh 0.31.0 dist-npm",
|
|
64
64
|
"test:sessions": "node scripts/test-session-evaluation.js"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@ckanner/dsh-plugin-flywheel": "0.
|
|
67
|
+
"@ckanner/dsh-plugin-flywheel": "0.31.0"
|
|
68
68
|
}
|
|
69
69
|
}
|