@ckanner/flywheel 0.32.0 → 0.33.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 +17 -1
- package/README.md +11 -2
- package/README.zh-CN.md +6 -1
- package/THIRD_PARTY_NOTICES.md +42 -0
- package/bin/runtime.js +25 -31
- package/cordis.patch.yml +5 -0
- package/dist/bridge.mjs +421 -0
- package/dist/claude-code-pro-bridge.mjs +82 -0
- package/dist/claude-code-pro-worker.mjs +5 -0
- package/dist/client.js +4078 -0
- package/dist/codex-pro-bridge.mjs +75 -0
- package/dist/codex-pro-worker.mjs +5 -0
- package/dist/console-read.mjs +51 -0
- package/dist/control.mjs +218 -0
- package/dist/index.mjs +185 -0
- package/dist/installation.mjs +56 -0
- package/dist/machine-worker.mjs +241 -0
- package/dist/policy.mjs +91 -0
- package/dist/prewarm.mjs +136 -0
- package/dist/protocol.mjs +260 -0
- package/dist/task-association.mjs +127 -0
- package/dist/worker.mjs +52 -0
- package/dist/workspaces.mjs +42 -0
- package/docs/README.md +1 -1
- package/docs/README.zh-CN.md +1 -1
- package/docs/design.md +8 -5
- package/docs/en/configuration.md +1 -1
- package/docs/en/contributing.md +5 -6
- package/docs/en/flow-console.md +1 -1
- package/docs/en/getting-started.md +13 -3
- package/docs/en/releasing.md +132 -174
- package/docs/validation/2026-11-13-release-0.32.0.md +78 -0
- package/docs/validation/2026-11-13-release-0.32.1.md +83 -0
- package/docs/validation/2026-11-14-single-package.md +60 -0
- package/docs/validation/README.md +3 -0
- package/docs/zh-CN/configuration.md +1 -1
- package/docs/zh-CN/contributing.md +4 -5
- package/docs/zh-CN/flow-console.md +1 -1
- package/docs/zh-CN/getting-started.md +10 -4
- package/docs/zh-CN/releasing.md +97 -81
- package/native/darwin-amd64/flywheel +0 -0
- package/native/darwin-arm64/flywheel +0 -0
- package/native/linux-amd64/flywheel +0 -0
- package/native/linux-arm64/flywheel +0 -0
- package/native/manifest.json +22 -0
- package/node_modules/dsh-subagent-codex-pro/CHANGELOG.md +403 -0
- package/node_modules/dsh-subagent-codex-pro/LICENSE +21 -0
- package/node_modules/dsh-subagent-codex-pro/README.md +557 -0
- package/node_modules/dsh-subagent-codex-pro/cordis.patch.yml +30 -0
- package/node_modules/dsh-subagent-codex-pro/docs/README.zh.md +355 -0
- package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle-validation.md +65 -0
- package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle.md +144 -0
- package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle.zh.md +98 -0
- package/node_modules/dsh-subagent-codex-pro/docs/machine.md +194 -0
- package/node_modules/dsh-subagent-codex-pro/docs/orchestration.zh.md +86 -0
- package/node_modules/dsh-subagent-codex-pro/lib/codex-exec.js +68 -0
- package/node_modules/dsh-subagent-codex-pro/lib/codex-exec.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/dsh-types.js +15 -0
- package/node_modules/dsh-subagent-codex-pro/lib/dsh-types.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/index.js +830 -0
- package/node_modules/dsh-subagent-codex-pro/lib/index.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/jobs.js +35 -0
- package/node_modules/dsh-subagent-codex-pro/lib/jobs.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/jsonrpc.js +229 -0
- package/node_modules/dsh-subagent-codex-pro/lib/jsonrpc.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-cli.js +101 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-cli.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-local.js +122 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-local.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-recovery.js +167 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-recovery.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-supervision.js +141 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-supervision.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-supervisor.js +128 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine-supervisor.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine.js +104 -0
- package/node_modules/dsh-subagent-codex-pro/lib/machine.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/process-guardian.js +156 -0
- package/node_modules/dsh-subagent-codex-pro/lib/process-guardian.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/run.js +842 -0
- package/node_modules/dsh-subagent-codex-pro/lib/run.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/structured.js +329 -0
- package/node_modules/dsh-subagent-codex-pro/lib/structured.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/tool.js +295 -0
- package/node_modules/dsh-subagent-codex-pro/lib/tool.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/codex-exec.d.ts +88 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/codex-exec.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/dsh-types.d.ts +179 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/dsh-types.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/index.d.ts +266 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/index.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/jobs.d.ts +34 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/jobs.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/jsonrpc.d.ts +113 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/jsonrpc.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-cli.d.ts +3 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-cli.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-local.d.ts +4 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-local.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-recovery.d.ts +53 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-recovery.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervision.d.ts +8 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervision.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervisor.d.ts +2 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervisor.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine.d.ts +70 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/machine.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/process-guardian.d.ts +22 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/process-guardian.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/run.d.ts +386 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/run.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/structured.d.ts +35 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/structured.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/tool.d.ts +107 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/tool.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/usage.d.ts +131 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/usage.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/wire.d.ts +321 -0
- package/node_modules/dsh-subagent-codex-pro/lib/types/wire.d.ts.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/usage.js +356 -0
- package/node_modules/dsh-subagent-codex-pro/lib/usage.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/lib/wire.js +986 -0
- package/node_modules/dsh-subagent-codex-pro/lib/wire.js.map +1 -0
- package/node_modules/dsh-subagent-codex-pro/package.json +76 -0
- package/npm/install.js +59 -6
- package/package.json +74 -12
- package/plugins/dsh/LICENSE +21 -0
- package/plugins/dsh/PROTOCOL.md +607 -0
- package/plugins/dsh/README.en.md +4 -0
- package/plugins/dsh/README.md +342 -0
- package/plugins/dsh/README.zh-CN.md +279 -0
- package/plugins/dsh/THIRD_PARTY_NOTICES.md +42 -0
- package/plugins/dsh/vendor/README.md +17 -0
- package/plugins/dsh/vendor/codex-pro.json +16 -0
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# Flywheel for DSH
|
|
2
|
+
|
|
3
|
+
English · [简体中文](README.zh-CN.md) · [Project overview](https://github.com/ckanner/flywheel/blob/main/README.md) · [Documentation](https://github.com/ckanner/flywheel/blob/main/docs/README.md)
|
|
4
|
+
|
|
5
|
+
`@ckanner/flywheel` connects DeepSeek Harness (DSH) to Flywheel's
|
|
6
|
+
Go orchestration engine. It adds a native workflow view, command and model-tool
|
|
7
|
+
controls, and the workers used by selected backends. The engine owns task state,
|
|
8
|
+
verification, budgets, process lifecycles, and Git delivery.
|
|
9
|
+
|
|
10
|
+
Use the complete Flywheel installer for normal setup. Installing this package
|
|
11
|
+
alone provides the plugin and workers, not the Go engine and skills.
|
|
12
|
+
|
|
13
|
+
## Install
|
|
14
|
+
|
|
15
|
+
Requirements are **Node.js 22.18.0 or later**, npm, and a compatible DSH desktop
|
|
16
|
+
with its desktop-supplied `dsh` command. This package declares DSH
|
|
17
|
+
**`>=0.2.1-rc.5 <0.3.0-0`** and the corresponding Cordis 4.0/4.1 interfaces.
|
|
18
|
+
DSH includes prereleases when checking this range: later 0.2 rc/patch releases do
|
|
19
|
+
not need an exact-version exemption or a new Flywheel release. The next minor,
|
|
20
|
+
including 0.3 alpha/beta/rc releases, remains outside this contract.
|
|
21
|
+
The selected host may have a higher Node requirement; use its supported runtime.
|
|
22
|
+
|
|
23
|
+
The range is an API compatibility policy, not evidence that every future host
|
|
24
|
+
has been tested. Locked integration fixtures cover the legacy 0.2.1-rc.5 host
|
|
25
|
+
and the current 0.2.2-rc.3 host/SDK. Required services, session identity,
|
|
26
|
+
permission receipts and process cleanup remain checked at runtime. A missing
|
|
27
|
+
service or invalid receipt still fails visibly before unconfirmed work is accepted.
|
|
28
|
+
DSH peers stay optional and are supplied by the host; their npm ranges also
|
|
29
|
+
include the two existing prerelease lines, without pinning individual rc releases.
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx -y @ckanner/flywheel@latest install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The installer installs one matching version of the CLI, platform binary,
|
|
36
|
+
workers, embedded skills, and desktop plugin. It registers the plugin through
|
|
37
|
+
the desktop's plugin management interface and creates a managed launcher.
|
|
38
|
+
Reload or restart DSH when requested by the host. Go packages support macOS and
|
|
39
|
+
Linux on arm64 and x64; Linux package availability does not establish Mac
|
|
40
|
+
desktop or Seatbelt behavior.
|
|
41
|
+
|
|
42
|
+
| Option or command | Use |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `--dsh-bin /absolute/path/to/dsh` | Use the desktop CLI when it is not on PATH |
|
|
45
|
+
| `--prefix "$HOME/.local"` | Select a writable npm prefix; add its `bin` directory to PATH |
|
|
46
|
+
| `--no-dsh` | Explicitly skip desktop registration |
|
|
47
|
+
| `flywheel setup --no-global` | Finish or refresh setup for an existing persistent installation |
|
|
48
|
+
| `--json` | Return the installation report for automation |
|
|
49
|
+
|
|
50
|
+
The standalone npm DSH CLI cannot manage the reserved `desktop` profile.
|
|
51
|
+
Plain `npm install --global @ckanner/flywheel` installs package files only;
|
|
52
|
+
there is no postinstall hook that changes a profile, skills, or credentials.
|
|
53
|
+
In an installation report, `ok: true` means installation succeeded;
|
|
54
|
+
`ready: false` can still identify missing native CLIs or local prerequisites.
|
|
55
|
+
See [Getting started](https://github.com/ckanner/flywheel/blob/main/docs/en/getting-started.md) for setup and removal.
|
|
56
|
+
|
|
57
|
+
## Prepare the selected backends
|
|
58
|
+
|
|
59
|
+
The DSH worker uses an independent `sdk` profile by default. Standard desktop
|
|
60
|
+
and SDK profiles under the same `DSH_HOME` can reuse the DeepSeek account
|
|
61
|
+
credential store. A custom profile must load the selected account service,
|
|
62
|
+
provider, and tools. The reserved `desktop` profile cannot be used as a worker.
|
|
63
|
+
|
|
64
|
+
| Backend | Setup and execution path |
|
|
65
|
+
|---|---|
|
|
66
|
+
| DeepSeek Flash | DSH `deepseek-account` and explicit `deepseek-flash`; no additional API key is required for the standard shared account store |
|
|
67
|
+
| DSH ChatGPT | Install and authorize the selected ChatGPT adapter in the SDK profile; changing the desktop chat model does not configure a worker |
|
|
68
|
+
| Codex Pro | The worker imports `dsh-subagent-codex-pro/machine` from the pinned 0.9.0 package and uses the installed Codex CLI/login |
|
|
69
|
+
| Kimi | Go invokes the native Kimi CLI with its own login; no ACP or parent-model delegation |
|
|
70
|
+
| Claude Code Pro | Optional 0.4.0 peer and installed Claude CLI/login; no default loop selects it; follow the [adapter guide](https://github.com/ckanner/flywheel/blob/main/docs/en/claude-code-pro.md) |
|
|
71
|
+
|
|
72
|
+
One documented ChatGPT adapter compatibility example is:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
dsh plugin --profile sdk add dsh-plugin-chatgpt@0.1.17
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
That versioned example does not establish current account entitlements.
|
|
79
|
+
Authentication and live model availability must be checked through each
|
|
80
|
+
backend's supported flow. Flywheel does not install native model CLIs, copy
|
|
81
|
+
credentials, or provide subscription access.
|
|
82
|
+
|
|
83
|
+
The default Flash route does not fall back to `deepseek-official` after an
|
|
84
|
+
account failure. That API-key provider is an explicit alternative. The default
|
|
85
|
+
hard route uses `codex-pro`, not a DSH provider called `subagent_codex_pro`, and
|
|
86
|
+
does not silently fall back to `codex exec`. See
|
|
87
|
+
[Configuration](https://github.com/ckanner/flywheel/blob/main/docs/en/configuration.md) and
|
|
88
|
+
[Models and reasoning effort](https://github.com/ckanner/flywheel/blob/main/docs/en/model-policy.md).
|
|
89
|
+
|
|
90
|
+
### Executable and environment overrides
|
|
91
|
+
|
|
92
|
+
| Variable | Meaning |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `FLYWHEEL_DSH_BIN` | DSH executable used by the worker |
|
|
95
|
+
| `FLYWHEEL_DSH_PROFILE` | Independent SDK profile; default `sdk` |
|
|
96
|
+
| `DSH_HOME` | DSH configuration, account, and session root |
|
|
97
|
+
| `FLYWHEEL_DSH_WORKER` | Explicit DSH worker override |
|
|
98
|
+
| `FLYWHEEL_CODEX_PRO_WORKER` | Explicit Codex Pro worker override |
|
|
99
|
+
| `FLYWHEEL_CLAUDE_CODE_PRO_WORKER` | Explicit optional Claude worker override |
|
|
100
|
+
| `FLYWHEEL_CODEX_BIN` / `CODEX_HOME` | Native Codex executable and existing configuration/login root |
|
|
101
|
+
| `FLYWHEEL_CLAUDE_BIN` / `CLAUDE_CONFIG_DIR` | Native Claude executable and existing configuration/login root |
|
|
102
|
+
| `FLYWHEEL_KIMI_BIN` | Native Kimi executable; default `kimi` |
|
|
103
|
+
|
|
104
|
+
The npm launcher normally resolves workers from its own installed package.
|
|
105
|
+
Executables and environment settings must be visible to the process that starts
|
|
106
|
+
the engine; a shell export does not update an already running desktop.
|
|
107
|
+
|
|
108
|
+
## Start a task and use the workbench
|
|
109
|
+
|
|
110
|
+
In DSH's composer, enter `/flywheel-task <goal>`. The host assistant prepares
|
|
111
|
+
and checks the task contracts, then calls `flywheel_launch`. Preparation uses
|
|
112
|
+
the conversation model; execution stages use Flywheel's configured bindings.
|
|
113
|
+
Use `/flywheel-new` to prepare a proposal without starting, and `/flywheel-run`
|
|
114
|
+
to continue an existing task. An explicit request to review a proposal first
|
|
115
|
+
remains part of the task's authorization.
|
|
116
|
+
|
|
117
|
+
Open **Flywheel** alongside the built-in conversation views, or in their overflow
|
|
118
|
+
menu. The workbench has three pages:
|
|
119
|
+
|
|
120
|
+
| Page | What it provides |
|
|
121
|
+
|---|---|
|
|
122
|
+
| Workflow canvas | Current session task, current stage, evidence, stage run/retry, role-session history, and managed intervention |
|
|
123
|
+
| Run history | Registered runs, known usage/cost, missing metrics, and comparisons with their conditions |
|
|
124
|
+
| Configuration | Automatically loaded global/project settings, grouped editing, source display, and protected unsaved drafts |
|
|
125
|
+
|
|
126
|
+
The view automatically follows the current conversation's explicit task association,
|
|
127
|
+
then its latest registered host-session run. There is no task selector or path form;
|
|
128
|
+
foreign and ownerless runs stay out of this view. Use `flywheel_control status` in the
|
|
129
|
+
intended conversation to associate a prepared task. Locations and action groups are
|
|
130
|
+
shown directly. A successful single-stage Review is not whole-task completion.
|
|
131
|
+
|
|
132
|
+
Automatic refresh and other reads use a session-scoped read-only Remote and do not
|
|
133
|
+
append JSON command records to chat. Explicit mutations and unknown-result recovery
|
|
134
|
+
keep durable command receipts. Settings has fixed navigation and save controls, inline role-session overrides and an optional usage budget. Environment checks live in Advanced and diagnostics; raw diagnostic responses do not fill the normal workflow view.
|
|
135
|
+
|
|
136
|
+
Preparation-only tasks display a bounded investigation panel with observations,
|
|
137
|
+
budgets, original-receipt reconciliation, Stop, and the evidence report. Approved
|
|
138
|
+
diagnostic commands and HTTP queries show exit/status codes, cancellation and copy
|
|
139
|
+
cleanup. Commands use explicitly granted host-process authority in copied inputs;
|
|
140
|
+
the copy is not an OS sandbox. A report does not imply code delivery. See the
|
|
141
|
+
[investigation guide](https://github.com/ckanner/flywheel/blob/main/docs/en/investigation.md).
|
|
142
|
+
|
|
143
|
+
Under **Settings → JEV**, **Enable JEV** is the only JEV switch and is off by
|
|
144
|
+
default. Choose the global or project scope, turn it on to reveal the connection
|
|
145
|
+
fields, and fill or confirm the System One endpoint, pinned model and API-key
|
|
146
|
+
environment variable name. Select **Save changes** to apply the setting. The switch
|
|
147
|
+
edits a draft; editing and saving do not test service connectivity. When disabled,
|
|
148
|
+
existing execution paths run without JEV requests or shadow capture. New
|
|
149
|
+
investigations prepared through Task or New inherit the policy automatically;
|
|
150
|
+
Run continues that frozen policy. Enabled JEV can choose the next approved evidence action, defer
|
|
151
|
+
redundant actions on cited evidence, or end evidence collection early for a report.
|
|
152
|
+
During implementation it can choose a legal next step after confirmed failure:
|
|
153
|
+
local repair, an approved feedback check, bounded replanning or an allowed execution
|
|
154
|
+
binding. Investigation and implementation share the task's call allowance. A
|
|
155
|
+
feedback check never removes complete final acceptance.
|
|
156
|
+
|
|
157
|
+
Turning JEV off also blocks subsequent JEV calls and adoption in an existing
|
|
158
|
+
task, while retaining its receipts and budget. Turning it on does not
|
|
159
|
+
rewrite a preparation created while disabled. The panel distinguishes configured
|
|
160
|
+
JEV settings from the investigation's recorded status, calls, adopted actions and
|
|
161
|
+
evidence-backed effects. Task and node details distinguish applied control decisions,
|
|
162
|
+
settled feedback, unresolved actions and the original baseline. They show actual
|
|
163
|
+
feedback results and before/after model bindings with the switch reason; applying a
|
|
164
|
+
configuration does not claim a new session has already run or final acceptance passed.
|
|
165
|
+
Advanced request limits, confidence thresholds and data categories share the same
|
|
166
|
+
switch; there is no separate shadow or adoption toggle.
|
|
167
|
+
Legacy shadow configuration does not automatically opt into live decisions. See
|
|
168
|
+
[JEV decisions](https://github.com/ckanner/flywheel/blob/main/docs/en/jev.md).
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
Visible canvases refresh task discovery; running tasks refresh status. Opening
|
|
172
|
+
the view starts no task or diagnostic probe. Failed reads retain the previous
|
|
173
|
+
confirmed snapshot and its timestamp. A missing or timed-out launch/start/stop
|
|
174
|
+
reply is **unconfirmed**, so further mutations stay blocked until status for
|
|
175
|
+
that same task reconciles it. The view never automatically retries a mutation.
|
|
176
|
+
Hiding the view, closing DSH, or removing the plugin does not stop the independent
|
|
177
|
+
Go task; request Stop and await engine confirmation.
|
|
178
|
+
|
|
179
|
+
### Commands and model tools
|
|
180
|
+
|
|
181
|
+
| Entry | Scope |
|
|
182
|
+
|---|---|
|
|
183
|
+
| `/flywheel` | Human command accepting a JSON control request |
|
|
184
|
+
| `flywheel_launch` | Model tool to launch a prepared task, Auto by default |
|
|
185
|
+
| `flywheel_control` | Model tool for launch/start/status/stop/investigate/config/doctor |
|
|
186
|
+
| Workbench controls | Additional revision-bound stages, configuration editing, managed handoff, and explicit delivery operations |
|
|
187
|
+
|
|
188
|
+
A manual launch example is:
|
|
189
|
+
|
|
190
|
+
```text
|
|
191
|
+
/flywheel {"action":"launch","taskDir":"/repo/docs/my-task","cwd":"/repo","mode":"auto"}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Equivalent CLI operations are:
|
|
195
|
+
|
|
196
|
+
```sh
|
|
197
|
+
flywheel control launch --cwd /repo --task-dir /repo/docs/my-task --mode auto
|
|
198
|
+
flywheel control status --cwd /repo --task-dir /repo/docs/my-task
|
|
199
|
+
flywheel control stop --cwd /repo --task-dir /repo/docs/my-task
|
|
200
|
+
flywheel control start --cwd /repo --task-dir /repo/docs/my-task
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Paths above are explicit command arguments, not UI fields. An omitted `cwd`
|
|
204
|
+
uses the session's public current-directory service. Launch/start/stop require
|
|
205
|
+
an explicit absolute `cwd` if the session has no recorded project directory.
|
|
206
|
+
Input is validated and passed as argv, not interpolated into a shell command.
|
|
207
|
+
`ok: true` reports the control operation; completion comes from task state.
|
|
208
|
+
|
|
209
|
+
The host prepares the outer task worktree. The engine independently manages
|
|
210
|
+
packet scheduling and execution directories. New templates enable declared
|
|
211
|
+
parallel scheduling and automatic worktree management; existing configurations
|
|
212
|
+
that omit the scheduler retain serial behavior. Ordinary run performs local
|
|
213
|
+
Git delivery. Remote PR creation and merge require explicit delivery operations
|
|
214
|
+
and their candidate/authorization checks. See the
|
|
215
|
+
[workflow guide](https://github.com/ckanner/flywheel/blob/main/docs/en/workflow.md) and
|
|
216
|
+
[console guide](https://github.com/ckanner/flywheel/blob/main/docs/en/flow-console.md) for these operations.
|
|
217
|
+
|
|
218
|
+
## Diagnose without model inference
|
|
219
|
+
|
|
220
|
+
```sh
|
|
221
|
+
flywheel config inspect --cwd /repo --json
|
|
222
|
+
flywheel doctor --cwd /repo --json
|
|
223
|
+
flywheel doctor --cwd /repo --probe --json
|
|
224
|
+
flywheel-codex-pro-worker --doctor
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
Add `--task-dir /repo/docs/my-task` to inspect one prepared task's configuration.
|
|
228
|
+
Ordinary doctor checks local configuration and prerequisites. `--probe`
|
|
229
|
+
initializes a temporary DSH SDK session, verifies directory and permission
|
|
230
|
+
behavior, then closes it. It uses temporary persistence for the probe; it sends
|
|
231
|
+
no inference prompt and runs no task acceptance commands. Provider
|
|
232
|
+
initialization can still query a model catalog.
|
|
233
|
+
|
|
234
|
+
Successful diagnostics do not prove live account authorization, quota, or model
|
|
235
|
+
responses. Preserve `warn`, `unknown`, and `skipped` as separate outcomes.
|
|
236
|
+
Diagnostics and installation do not write task state or start worktrees.
|
|
237
|
+
|
|
238
|
+
## Runtime boundaries
|
|
239
|
+
|
|
240
|
+
### Project membership and history
|
|
241
|
+
|
|
242
|
+
The stable project workspace identifies the repository. Task integration and
|
|
243
|
+
packet worktree directories identify where work actually happens. DSH creates a
|
|
244
|
+
session under the project and switches its execution directory through the
|
|
245
|
+
public working-directory service. Only the desktop host registers workspace
|
|
246
|
+
membership; independent SDK workers do not concurrently rewrite desktop
|
|
247
|
+
storage. Existing session headers and unresolved receipts retain their original
|
|
248
|
+
identities. Unsupported combinations of project, execution directory, and
|
|
249
|
+
restricted sandbox fail before dispatch; permissions are not silently widened.
|
|
250
|
+
|
|
251
|
+
Scoped history can continue within the same task, role, and scope. Executor,
|
|
252
|
+
Reviewer, Judge, and second-opinion histories stay separate. A Reviewer must
|
|
253
|
+
inspect the complete current candidate even when reusing its own history.
|
|
254
|
+
New templates explicitly select scoped mode; old configurations that omit it
|
|
255
|
+
retain fresh behavior. The explicit Plan `resident-session:false` opt-out
|
|
256
|
+
continues to apply.
|
|
257
|
+
|
|
258
|
+
Both modes retain invocation safety records. Unknown dispatch, outcome, or
|
|
259
|
+
cleanup blocks new execution. Codex/Claude public APIs add durable Go ACKs,
|
|
260
|
+
supervisor journals, and exact read-only receipt recovery; DSH/Kimi retain their
|
|
261
|
+
own supported paths. Quality rebuild thresholds default to disabled. See
|
|
262
|
+
[Recovery](https://github.com/ckanner/flywheel/blob/main/docs/en/session-recovery.md) and
|
|
263
|
+
[Paired evaluation](https://github.com/ckanner/flywheel/blob/main/docs/en/session-evaluation.md).
|
|
264
|
+
|
|
265
|
+
### Permissions and worker lifecycle
|
|
266
|
+
|
|
267
|
+
Optional `scheduler.prewarm:true` uses the DSH worker's two-phase `--prewarm`
|
|
268
|
+
protocol to initialize one SDK during verification, without creating a Session
|
|
269
|
+
or sending a prompt until the formal invocation is admitted. It defaults to
|
|
270
|
+
false; other backends retain their existing startup paths. The same bounded
|
|
271
|
+
shutdown and process-group proof apply to unused workers. See the
|
|
272
|
+
[worker protocol](PROTOCOL.md#dsh-sdk-一次性预热) for expiry, cancellation and recovery.
|
|
273
|
+
|
|
274
|
+
The DSH worker supports read-only, workspace-write, and explicit full access,
|
|
275
|
+
with approvals set to never. New subscription presets request full access;
|
|
276
|
+
existing files without a permission setting retain role-based behavior.
|
|
277
|
+
Actual policy is checked before prompting. Full access does not establish an
|
|
278
|
+
OS sandbox or remove host static denials, account restrictions, or OS permissions.
|
|
279
|
+
A Git worktree is also not a security sandbox.
|
|
280
|
+
|
|
281
|
+
The temporary SDK overlay applies only to the independent worker. It disables
|
|
282
|
+
recursive delegation, workflow drivers, automatic titles/compaction, scheduled
|
|
283
|
+
input, and the entire web-tool package, including search and fetch. Full access
|
|
284
|
+
does not restore these auxiliary-model/tool capabilities. Restoring them needs
|
|
285
|
+
separate accounting, cancellation, and directory-ownership support. The overlay
|
|
286
|
+
does not remove desktop tools or edit reminder storage.
|
|
287
|
+
|
|
288
|
+
Main-task Codex calls check the complete actual sandbox policy at `thread-ready`
|
|
289
|
+
before Go acknowledges dispatch, then check the terminal receipt again.
|
|
290
|
+
Legacy/advisory paths retain their terminal checks. Claude's native init arrives
|
|
291
|
+
after its prompt and cannot provide the same pre-dispatch observation. Kimi
|
|
292
|
+
print mode does not provide an OS sandbox that this adapter can promise.
|
|
293
|
+
|
|
294
|
+
A successful result requires a trustworthy terminal receipt and confirmed
|
|
295
|
+
process cleanup. An outer worker exit does not prove SDK or guardian cleanup.
|
|
296
|
+
Graceful SDK shutdown allows two seconds for persistence/disposal before bounded
|
|
297
|
+
TERM/KILL cleanup. Lost outcomes preserve evidence and block automatic replay.
|
|
298
|
+
Missing usage and subscription dollar cost remain unknown, not zero. Complete
|
|
299
|
+
worker histories are not automatically merged into the parent's DSH trajectory;
|
|
300
|
+
images and attachments are not supported by these worker inputs.
|
|
301
|
+
|
|
302
|
+
## Maintain and develop
|
|
303
|
+
|
|
304
|
+
The explicit plugin setting `flywheelBinary` takes precedence over the managed
|
|
305
|
+
installation record. Without it, the plugin uses the validated launcher recorded
|
|
306
|
+
under `~/.config/flywheel/`. Without a record, the installed package uses its own
|
|
307
|
+
`bin/flywheel.js`; only the private source harness retains the legacy PATH fallback.
|
|
308
|
+
A damaged record or changed launcher fails visibly. `controlTimeoutMs` defaults
|
|
309
|
+
to 60,000 and controls the desktop control request, not the task's total budget.
|
|
310
|
+
|
|
311
|
+
An existing managed launcher must match the installed package version. After updating
|
|
312
|
+
only the DSH copy, run setup for that version to refresh the managed installation;
|
|
313
|
+
a stale record is reported instead of mixing a newer view with an older engine.
|
|
314
|
+
|
|
315
|
+
After upgrading, moving the npm prefix, changing Node, or adding native CLIs,
|
|
316
|
+
run `flywheel setup --no-global` with the intended prefix and desktop CLI
|
|
317
|
+
options, then reload DSH as needed. Existing configuration and modified skills
|
|
318
|
+
are preserved. Adopt changed defaults through the explicit configuration
|
|
319
|
+
migration, not by deleting ownership records.
|
|
320
|
+
|
|
321
|
+
For a source checkout:
|
|
322
|
+
|
|
323
|
+
```sh
|
|
324
|
+
npm --prefix plugins/dsh ci --ignore-scripts
|
|
325
|
+
npm --prefix plugins/dsh run check
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
See [Contributing](https://github.com/ckanner/flywheel/blob/main/docs/en/contributing.md) for bridge and release checks.
|
|
329
|
+
Offline renderer/SDK tests establish the exercised contracts, not physical Mac
|
|
330
|
+
window geometry, real-account inference, or measured quality gains.
|
|
331
|
+
|
|
332
|
+
| Reference | Purpose |
|
|
333
|
+
|---|---|
|
|
334
|
+
| [Worker protocol](PROTOCOL.md) | Detailed wire, permission, lifecycle, and error contracts (Chinese) |
|
|
335
|
+
| [Vendored package provenance](vendor/README.md) | Codex source identity, tarball hashes, and optional Claude source evidence |
|
|
336
|
+
| [JEV decisions](https://github.com/ckanner/flywheel/blob/main/docs/en/jev.md) | One master switch for actual bounded decisions, with offline replay and explicit evaluation |
|
|
337
|
+
| [Release guide](https://github.com/ckanner/flywheel/blob/main/docs/en/releasing.md) | Build, install, and publish the same checked artifacts |
|
|
338
|
+
|
|
339
|
+
## License
|
|
340
|
+
|
|
341
|
+
[MIT](LICENSE). Adapted DeepSeek UI portions and bundled dependencies retain
|
|
342
|
+
their own notices; see [Third-party notices](THIRD_PARTY_NOTICES.md).
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# Flywheel DSH 插件
|
|
2
|
+
|
|
3
|
+
[English](README.md) · 简体中文 · [项目介绍](https://github.com/ckanner/flywheel/blob/main/README.zh-CN.md) · [文档目录](https://github.com/ckanner/flywheel/blob/main/docs/README.zh-CN.md)
|
|
4
|
+
|
|
5
|
+
`@ckanner/flywheel` 将 DeepSeek Harness(DSH)连接到 Flywheel 的
|
|
6
|
+
Go 编排引擎,提供原生工作流视图、命令与模型工具入口,以及所选后端需要的 worker。
|
|
7
|
+
任务状态、验收、预算、进程生命周期和 Git 交付由引擎管理。
|
|
8
|
+
|
|
9
|
+
日常使用应通过完整 Flywheel 安装器安装。单独安装本插件只能得到插件和 worker,
|
|
10
|
+
不包含 Go 引擎和 skills。
|
|
11
|
+
|
|
12
|
+
## 安装
|
|
13
|
+
|
|
14
|
+
需要 **Node.js 22.18.0 或更高版本**、npm,以及兼容的 DSH 桌面和桌面提供的
|
|
15
|
+
`dsh` 命令。此包声明支持 **`>=0.2.1-rc.5 <0.3.0-0`** 及相应 Cordis 4.0/4.1 接口。
|
|
16
|
+
DSH 的范围判断包含预发布版本:0.2 系列内后续 rc/补丁升级无需精确版本豁免或
|
|
17
|
+
重新发布 Flywheel;0.3 系列及其 alpha/beta/rc 仍在边界之外。宿主可能有更高的
|
|
18
|
+
Node 要求,请使用其支持的运行时。
|
|
19
|
+
|
|
20
|
+
范围是公开 API 兼容策略,不代表所有未来宿主均已实测。锁定的集成夹具覆盖旧版
|
|
21
|
+
0.2.1-rc.5 Host 和当前 0.2.2-rc.3 Host/SDK;运行时继续检查必需服务、会话身份、
|
|
22
|
+
权限回执与进程清理,服务缺失或回执无效仍明确失败。DSH peer 依赖由宿主提供且
|
|
23
|
+
保持 optional,npm 范围覆盖两个既有预发布系列,不再逐个锁定 rc 版本。
|
|
24
|
+
|
|
25
|
+
```sh
|
|
26
|
+
npx -y @ckanner/flywheel@latest install
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
安装器安装同一版本的 CLI、平台二进制、worker、内嵌 skills 和桌面插件,通过
|
|
30
|
+
桌面插件管理接口完成注册并创建受管启动器。根据宿主提示重新加载或重启 DSH。
|
|
31
|
+
Go 包提供 macOS/Linux 的 arm64 与 x64 版本;Linux 包可用不代表已经验证
|
|
32
|
+
Mac 桌面或 Seatbelt 行为。
|
|
33
|
+
|
|
34
|
+
| 选项或命令 | 用途 |
|
|
35
|
+
|---|---|
|
|
36
|
+
| `--dsh-bin /absolute/path/to/dsh` | 桌面 CLI 不在 PATH 时明确指定 |
|
|
37
|
+
| `--prefix "$HOME/.local"` | 选择可写 npm 前缀,并将其 `bin` 加入 PATH |
|
|
38
|
+
| `--no-dsh` | 明确跳过桌面插件注册 |
|
|
39
|
+
| `flywheel setup --no-global` | 为已有持久安装补全或刷新配置 |
|
|
40
|
+
| `--json` | 返回可供自动化处理的安装报告 |
|
|
41
|
+
|
|
42
|
+
独立 npm DSH CLI 不能管理保留的 `desktop` profile。普通
|
|
43
|
+
`npm install --global @ckanner/flywheel` 只放置包文件,没有修改 profile、skills
|
|
44
|
+
或凭证的 postinstall。安装报告中 `ok: true` 只表示安装成功,`ready: false`
|
|
45
|
+
仍可能报告缺少原生 CLI 等本地前置条件。完整安装与卸载说明见[快速开始](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/getting-started.md)。
|
|
46
|
+
|
|
47
|
+
## 准备所选后端
|
|
48
|
+
|
|
49
|
+
DSH worker 默认使用独立 `sdk` profile。标准桌面与 SDK 在同一 `DSH_HOME` 下
|
|
50
|
+
可以复用 DeepSeek 账号授权存储;自定义 profile 需要加载所选账号服务、provider
|
|
51
|
+
和工具。保留的 `desktop` profile 不能作为 worker profile。
|
|
52
|
+
|
|
53
|
+
| 后端 | 准备与执行方式 |
|
|
54
|
+
|---|---|
|
|
55
|
+
| DeepSeek Flash | DSH `deepseek-account`,明确指定 `deepseek-flash`;标准共享账号存储不需要额外 API key |
|
|
56
|
+
| DSH ChatGPT | 在 SDK profile 安装并授权所选 ChatGPT 适配器;桌面对话模型不决定 worker 配置 |
|
|
57
|
+
| Codex Pro | worker 导入固定 0.9.0 包的 `dsh-subagent-codex-pro/machine`,使用已安装 Codex CLI 和登录 |
|
|
58
|
+
| Kimi | Go 调用原生 Kimi CLI 及其登录;不使用 ACP 或父模型二次委派 |
|
|
59
|
+
| Claude Code Pro | 可选 0.4.0 peer 和已安装 Claude CLI/登录;默认无阶段选它,详见[接入指南](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/claude-code-pro.md) |
|
|
60
|
+
|
|
61
|
+
一个已经记录的 ChatGPT 适配器兼容示例:
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
dsh plugin --profile sdk add dsh-plugin-chatgpt@0.1.17
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
此固定版本示例不代表当前账号拥有某模型权限。认证和真实模型可用性需要通过
|
|
68
|
+
各后端支持的流程检查。Flywheel 不安装原生模型 CLI、不复制凭证,也不提供订阅额度。
|
|
69
|
+
|
|
70
|
+
默认 Flash 路由不会在账号失败后回退到 `deepseek-official`;后者是需要明确选择
|
|
71
|
+
的 API-key provider。默认 hard 使用 `codex-pro`,不是名为 `subagent_codex_pro`
|
|
72
|
+
的 DSH provider,也不静默回退到 `codex exec`。详细说明见
|
|
73
|
+
[配置指南](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/configuration.md)和[模型与推理等级](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/model-policy.md)。
|
|
74
|
+
|
|
75
|
+
### 可执行文件与环境变量
|
|
76
|
+
|
|
77
|
+
| 环境变量 | 含义 |
|
|
78
|
+
|---|---|
|
|
79
|
+
| `FLYWHEEL_DSH_BIN` | worker 使用的 DSH 可执行文件 |
|
|
80
|
+
| `FLYWHEEL_DSH_PROFILE` | 独立 SDK profile,默认 `sdk` |
|
|
81
|
+
| `DSH_HOME` | DSH 配置、账号与会话根目录 |
|
|
82
|
+
| `FLYWHEEL_DSH_WORKER` | 显式覆盖 DSH worker |
|
|
83
|
+
| `FLYWHEEL_CODEX_PRO_WORKER` | 显式覆盖 Codex Pro worker |
|
|
84
|
+
| `FLYWHEEL_CLAUDE_CODE_PRO_WORKER` | 显式覆盖可选 Claude worker |
|
|
85
|
+
| `FLYWHEEL_CODEX_BIN` / `CODEX_HOME` | 原生 Codex 可执行文件及已有配置/登录根目录 |
|
|
86
|
+
| `FLYWHEEL_CLAUDE_BIN` / `CLAUDE_CONFIG_DIR` | 原生 Claude 可执行文件及已有配置/登录根目录 |
|
|
87
|
+
| `FLYWHEEL_KIMI_BIN` | 原生 Kimi 可执行文件,默认 `kimi` |
|
|
88
|
+
|
|
89
|
+
npm 启动器直接解析当前完整包内的 worker。启动引擎的进程必须能看到相关
|
|
90
|
+
可执行文件与环境设置;终端 export 不会更新已经启动的桌面进程。
|
|
91
|
+
|
|
92
|
+
## 启动任务与使用工作台
|
|
93
|
+
|
|
94
|
+
在 DSH 输入框输入 `/flywheel-task <目标>`。宿主助手先准备并检查任务契约,
|
|
95
|
+
再调用 `flywheel_launch`。准备阶段使用当前对话模型,执行阶段使用 Flywheel
|
|
96
|
+
配置中的绑定。`/flywheel-new` 只准备方案,`/flywheel-run` 继续已有任务。
|
|
97
|
+
用户明确要求先审阅方案时,这仍是任务授权的一部分。
|
|
98
|
+
|
|
99
|
+
在内置会话视图旁或其溢出菜单中打开 **Flywheel**。工作台分为三个页面:
|
|
100
|
+
|
|
101
|
+
| 页面 | 内容 |
|
|
102
|
+
|---|---|
|
|
103
|
+
| 流程画布 | 当前会话任务、当前阶段、证据、阶段执行/重试、角色历史与受管人工介入 |
|
|
104
|
+
| 运行记录 | 已登记运行、已知用量/费用、缺失指标及带条件的运行比较 |
|
|
105
|
+
| 配置 | 自动读取全局/项目配置,分组编辑、显示来源并保护未保存草稿 |
|
|
106
|
+
|
|
107
|
+
视图自动跟随当前会话的显式任务关联;没有投影时读取精确匹配会话 ID 的最新运行。
|
|
108
|
+
没有任务选择器或路径输入框,其他会话与无归属记录不可见。准备任务使用当前会话的
|
|
109
|
+
`flywheel_control status` 显式关联。位置和操作分组直接显示;单阶段 Review 成功不代表整个任务完成。
|
|
110
|
+
|
|
111
|
+
自动刷新和其他读取使用会话作用域的只读 Remote,不向对话追加 JSON 命令记录。
|
|
112
|
+
显式修改与未知结果核对仍保留持久命令回执。设置使用固定导航与保存区,直接展示角色会话覆盖和可选用量预算;环境检查归入高级与诊断,原始诊断回执
|
|
113
|
+
不占用日常流程画布。
|
|
114
|
+
|
|
115
|
+
只有准备记录的任务显示有界调查面板,包含观察、预算、原回执核对、停止与证据报告。
|
|
116
|
+
批准的诊断命令和 HTTP 查询显示实际退出码/状态码、取消与副本收尾。命令需要明确
|
|
117
|
+
host-process 授权,在批准输入的副本运行;副本不是操作系统沙箱。调查报告不代表
|
|
118
|
+
代码交付。详见[调查指南](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/investigation.md)。
|
|
119
|
+
|
|
120
|
+
在**设置 → JEV**中,**启用 JEV** 是唯一总开关,默认关闭。选择全局或项目范围,
|
|
121
|
+
打开开关以显示连接字段,填写或确认 System One 地址、固定模型版本与密钥环境
|
|
122
|
+
变量名,再点击**保存修改**。开关先修改草稿,保存后才应用;编辑和保存都不测试
|
|
123
|
+
服务连通性。关闭时沿用原路径,不请求 JEV,也不采集影子快照。
|
|
124
|
+
Task、New 创建的新调查自动继承策略,Run 继续该冻结策略。开启后,JEV 可以选择
|
|
125
|
+
下一项已批准的取证动作、依据已引用的证据跳过
|
|
126
|
+
冗余动作,或提前结束取证进入报告。实施阶段在确认失败后,可以选择合法的局部
|
|
127
|
+
修复、反馈检查、受限重规划或批准的执行绑定。调查与实施共享任务调用额度;反馈
|
|
128
|
+
检查不能代替完整最终验收。
|
|
129
|
+
|
|
130
|
+
关闭也会禁止已有任务的后续 JEV 调用与采用,同时保留回执和预算;重新开启不会
|
|
131
|
+
改写此前关闭时创建的准备记录。面板分别展示配置状态、本次调查记录的状态、请求、
|
|
132
|
+
已采用动作与有证据依据的效果。任务与节点详情区分已应用的控制决策、已收尾反馈、
|
|
133
|
+
未确认动作和原有基线,保留实际反馈结果、模型绑定前后值和切换原因;配置应用不等于
|
|
134
|
+
新会话已经运行或最终验收通过。高级调用上限、概率阈值与数据类别共用这个总开关,
|
|
135
|
+
没有独立的影子或采用开关。旧影子配置不会自动开启在线决策。
|
|
136
|
+
详见[JEV 决策](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/jev.md)。
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
可见画布会刷新任务发现,运行中的任务会刷新状态。打开视图不启动任务或诊断。
|
|
140
|
+
读取失败时保留最后确认的快照及时间。launch/start/stop 回复丢失或超时表示
|
|
141
|
+
**结果未确认**;同一任务状态完成核对前,后续修改操作保持阻断,界面不会自动重试。
|
|
142
|
+
隐藏视图、关闭 DSH 或移除插件都不会停止独立 Go 任务;应明确停止并等待引擎确认。
|
|
143
|
+
|
|
144
|
+
### 命令与模型工具
|
|
145
|
+
|
|
146
|
+
| 入口 | 范围 |
|
|
147
|
+
|---|---|
|
|
148
|
+
| `/flywheel` | 接收 JSON 控制请求的人工命令 |
|
|
149
|
+
| `flywheel_launch` | 启动已准备任务的模型工具,默认 Auto |
|
|
150
|
+
| `flywheel_control` | launch/start/status/stop/investigate/config/doctor 模型工具 |
|
|
151
|
+
| 工作台控件 | 另外提供绑定 revision 的单阶段操作、配置编辑、受管接管及显式交付操作 |
|
|
152
|
+
|
|
153
|
+
人工启动示例:
|
|
154
|
+
|
|
155
|
+
```text
|
|
156
|
+
/flywheel {"action":"launch","taskDir":"/repo/docs/my-task","cwd":"/repo","mode":"auto"}
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
对应 CLI 操作:
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
flywheel control launch --cwd /repo --task-dir /repo/docs/my-task --mode auto
|
|
163
|
+
flywheel control status --cwd /repo --task-dir /repo/docs/my-task
|
|
164
|
+
flywheel control stop --cwd /repo --task-dir /repo/docs/my-task
|
|
165
|
+
flywheel control start --cwd /repo --task-dir /repo/docs/my-task
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
上述路径是明确的命令参数,不是界面输入框。省略 `cwd` 时使用会话公开的当前目录
|
|
169
|
+
服务;若会话没有记录项目目录,launch/start/stop 必须明确提供绝对 `cwd`。
|
|
170
|
+
输入经过校验后作为 argv 传递,不拼接成 shell 字符串。`ok: true` 表示控制操作
|
|
171
|
+
成功,任务是否完成以状态为准。
|
|
172
|
+
|
|
173
|
+
宿主准备外层任务 worktree,引擎独立管理 packet 调度和执行目录。新模板开启
|
|
174
|
+
基于声明的并行调度及自动 worktree 管理;已有完整配置省略 scheduler 时仍串行。
|
|
175
|
+
普通 run 负责本地 Git 交付;远端创建和合并 PR 需要显式交付操作,以及候选和授权
|
|
176
|
+
检查。完整说明见[工作流指南](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/workflow.md)和
|
|
177
|
+
[控制台指南](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/flow-console.md)。
|
|
178
|
+
|
|
179
|
+
## 无模型推理的诊断
|
|
180
|
+
|
|
181
|
+
```sh
|
|
182
|
+
flywheel config inspect --cwd /repo --json
|
|
183
|
+
flywheel doctor --cwd /repo --json
|
|
184
|
+
flywheel doctor --cwd /repo --probe --json
|
|
185
|
+
flywheel-codex-pro-worker --doctor
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
加上 `--task-dir /repo/docs/my-task` 可检查具体任务的配置。普通 doctor 检查本地
|
|
189
|
+
配置和前置条件;`--probe` 初始化临时 DSH SDK 会话,核对目录与权限后关闭。
|
|
190
|
+
探测使用临时持久化目录,不发送推理 prompt,也不运行任务验收命令;provider
|
|
191
|
+
初始化仍可能查询模型目录。
|
|
192
|
+
|
|
193
|
+
诊断成功不证明真实账号授权、额度或模型响应。`warn`、`unknown`、`skipped`
|
|
194
|
+
应分别保留,不能视为 pass。诊断和安装不写任务状态,也不创建任务 worktree。
|
|
195
|
+
|
|
196
|
+
## 运行边界
|
|
197
|
+
|
|
198
|
+
### 项目归属与历史
|
|
199
|
+
|
|
200
|
+
稳定的项目工作区用于标识仓库;任务集成目录与 packet worktree 用于实际执行。
|
|
201
|
+
DSH 在项目下建立 Session,再通过公开工作目录服务切换执行目录。只有桌面 Host
|
|
202
|
+
登记工作区归属;独立 SDK worker 不并发改写桌面存储。已有 Session header 与
|
|
203
|
+
未解决回执保留原身份。项目、执行目录和受限沙箱的组合不受支持时,派发前明确
|
|
204
|
+
失败,不静默扩大权限。
|
|
205
|
+
|
|
206
|
+
scoped 历史可以在同任务、同角色、同范围内续用。Executor、Reviewer、Judge
|
|
207
|
+
与第二意见的历史保持隔离;Reviewer 即使续用自己历史,也必须检查完整当前候选。
|
|
208
|
+
新模板明确选择 scoped,旧配置省略时保留 fresh;Plan 显式
|
|
209
|
+
`resident-session:false` 继续禁止该角色续用。
|
|
210
|
+
|
|
211
|
+
两种模式都保存调用安全记录。派发、结果或清理未知时阻断新执行。
|
|
212
|
+
Codex/Claude 的公开接口另外提供 Go 持久化 ACK、supervisor journal 和精确
|
|
213
|
+
只读回执恢复;DSH/Kimi 保留自身支持的路径。质量重建阈值默认关闭。
|
|
214
|
+
详见[恢复指南](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/session-recovery.md)及
|
|
215
|
+
[配对评估](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/session-evaluation.md)。
|
|
216
|
+
|
|
217
|
+
### 权限与 worker 生命周期
|
|
218
|
+
|
|
219
|
+
可选 `scheduler.prewarm:true` 使用 DSH worker 的两阶段 `--prewarm` 协议,在验证期间
|
|
220
|
+
初始化一个 SDK;正式调用获准前不创建 Session、不发送 prompt。默认关闭,其他后端
|
|
221
|
+
沿用原启动路径。未使用的 worker 同样必须有界关闭并证明进程组已清理;过期、取消和
|
|
222
|
+
恢复规则见[worker 协议](PROTOCOL.md#dsh-sdk-一次性预热)。
|
|
223
|
+
|
|
224
|
+
DSH worker 支持 read-only、workspace-write 和显式完全权限,审批设为 never。
|
|
225
|
+
新订阅预设请求完全权限;已有文件缺少权限设置时保留按角色权限。实际策略在
|
|
226
|
+
prompt 前检查。完全权限不代表 OS 沙箱,也不取消宿主静态拒绝、账号限制或
|
|
227
|
+
操作系统权限;Git worktree 同样不是安全沙箱。
|
|
228
|
+
|
|
229
|
+
临时 SDK overlay 只作用于独立 worker,关闭递归委派、workflow 驱动、自动标题/
|
|
230
|
+
压缩、定时输入及整个 web-tool 包(搜索和抓取)。完全权限不会恢复这些额外模型/
|
|
231
|
+
工具能力;恢复它们需要另外支持计量、取消和目录归属。overlay 不移除桌面工具,
|
|
232
|
+
也不改写提醒存储。
|
|
233
|
+
|
|
234
|
+
主任务 Codex 调用在 `thread-ready` 时核对完整实际沙箱策略,Go 确认后才继续
|
|
235
|
+
派发;终态回执再次检查。旧版/建议调用保留终态检查。Claude 的原生 init 在
|
|
236
|
+
prompt 之后,不能提供相同的预派发观察;Kimi print 模式也没有本适配器可承诺
|
|
237
|
+
的 OS 沙箱。
|
|
238
|
+
|
|
239
|
+
成功结果需要可信终态回执和清理确认。外层 worker 退出不能证明 SDK 或 guardian
|
|
240
|
+
已清理。SDK 正常关闭保留两秒用于历史落盘和释放,再进入有界 TERM/KILL 收尾。
|
|
241
|
+
结果丢失时保留证据并阻断自动重放。缺失用量与订阅美元成本保持 unknown,不填零。
|
|
242
|
+
完整 worker 历史不会自动并入父会话轨迹;这些 worker 输入不支持图片和附件。
|
|
243
|
+
|
|
244
|
+
## 维护与开发
|
|
245
|
+
|
|
246
|
+
插件显式 `flywheelBinary` 优先于受管安装记录。未设置时,使用
|
|
247
|
+
`~/.config/flywheel/` 中经过验证的启动器;记录不存在时使用本包 `bin/flywheel.js`,
|
|
248
|
+
仅 private 源码测试区保留旧 PATH 后备。
|
|
249
|
+
记录损坏或启动器改变会明确失败。`controlTimeoutMs` 默认 60,000,限制的是桌面
|
|
250
|
+
控制请求,不是整个任务预算。
|
|
251
|
+
|
|
252
|
+
已有受管启动记录必须与当前包同版。单独更新 DSH 副本后,应运行该版本的 setup
|
|
253
|
+
刷新受管安装;旧记录会明确报错,不把新版界面与旧引擎混用。
|
|
254
|
+
|
|
255
|
+
升级、移动 npm 前缀、更换 Node 或补充原生 CLI 后,携带所需前缀和桌面 CLI
|
|
256
|
+
选项运行 `flywheel setup --no-global`,再按需重载 DSH。已有配置与修改过的
|
|
257
|
+
skills 会保留。采用新默认值应走显式配置迁移,不通过删除归属记录强行覆盖。
|
|
258
|
+
|
|
259
|
+
在源码 checkout 中:
|
|
260
|
+
|
|
261
|
+
```sh
|
|
262
|
+
npm --prefix plugins/dsh ci --ignore-scripts
|
|
263
|
+
npm --prefix plugins/dsh run check
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
跨进程与发布检查见[贡献指南](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/contributing.md)。离线 renderer/SDK
|
|
267
|
+
测试证明被测协议,不证明真实 Mac 窗口几何、账号推理或模型质量收益。
|
|
268
|
+
|
|
269
|
+
| 参考资料 | 用途 |
|
|
270
|
+
|---|---|
|
|
271
|
+
| [Worker 协议](PROTOCOL.md) | 详细通信、权限、生命周期与错误契约 |
|
|
272
|
+
| [依赖来源](vendor/README.md) | Codex 源码身份、tarball 摘要及可选 Claude 的源码依据 |
|
|
273
|
+
| [JEV 决策](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/jev.md) | 一个总开关控制实际有界决策,保留离线回放与显式评估 |
|
|
274
|
+
| [发布指南](https://github.com/ckanner/flywheel/blob/main/docs/zh-CN/releasing.md) | 构建、安装和发布同一批已验证产物 |
|
|
275
|
+
|
|
276
|
+
## 许可证
|
|
277
|
+
|
|
278
|
+
[MIT](LICENSE)。借鉴的 DeepSeek UI 部分及打包依赖保留原声明,见
|
|
279
|
+
[第三方声明](THIRD_PARTY_NOTICES.md)。
|