@ckanner/flywheel 0.33.1 → 0.34.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.
Files changed (148) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +1 -0
  3. package/README.zh-CN.md +2 -0
  4. package/THIRD_PARTY_NOTICES.md +5 -1
  5. package/bin/flywheel-kimi-native-worker.js +5 -0
  6. package/bin/flywheel.js +8 -1
  7. package/bin/runtime.js +5 -1
  8. package/dist/bridge.mjs +89 -7
  9. package/dist/claude-code-pro-bridge.mjs +55 -6
  10. package/dist/client.js +40 -5
  11. package/dist/codex-pro-bridge.mjs +12 -5
  12. package/dist/control.mjs +1 -1
  13. package/dist/kimi-native-bridge.mjs +429 -0
  14. package/dist/kimi-native-runtime.mjs +233 -0
  15. package/dist/kimi-native-worker.mjs +77 -0
  16. package/dist/kimi-tower-candidate.mjs +227 -0
  17. package/dist/machine-worker.mjs +39 -5
  18. package/dist/managed-lcu.mjs +223 -0
  19. package/dist/native-doctor.mjs +36 -0
  20. package/dist/native-jobs.mjs +72 -0
  21. package/dist/native-policy.mjs +371 -0
  22. package/dist/native-resources.mjs +144 -0
  23. package/dist/native.mjs +251 -0
  24. package/dist/policy.mjs +13 -3
  25. package/dist/prewarm.mjs +4 -1
  26. package/dist/protocol.mjs +8 -1
  27. package/dist/worker.mjs +16 -9
  28. package/docs/README.md +9 -0
  29. package/docs/README.zh-CN.md +3 -0
  30. package/docs/design.md +33 -11
  31. package/docs/en/claude-code-pro.md +2 -2
  32. package/docs/en/configuration.md +17 -5
  33. package/docs/en/contributing.md +5 -3
  34. package/docs/en/getting-started.md +2 -2
  35. package/docs/en/model-policy.md +2 -2
  36. package/docs/en/native-capabilities.md +185 -0
  37. package/docs/en/releasing.md +2 -2
  38. package/docs/en/session-recovery.md +2 -2
  39. package/docs/plans/2026-11-13-native-harness-capabilities.en.md +258 -0
  40. package/docs/plans/2026-11-13-native-harness-capabilities.md +276 -0
  41. package/docs/plans/README.md +1 -0
  42. package/docs/validation/2026-11-14-desktop-native-configuration.md +128 -0
  43. package/docs/validation/2026-11-14-native-harness-implementation.md +215 -0
  44. package/docs/validation/2026-11-14-published-companions.md +15 -0
  45. package/docs/validation/2026-11-14-release-0.33.1.md +78 -0
  46. package/docs/validation/README.md +3 -0
  47. package/docs/validation/evidence/2026-11-14-native-harness-candidate.json +255 -0
  48. package/docs/validation/evidence/2026-11-14-native-harness-sessions.json +6009 -0
  49. package/docs/validation/evidence/2026-11-14-native-harness-tower-candidate.json +192 -0
  50. package/docs/zh-CN/claude-code-pro.md +2 -2
  51. package/docs/zh-CN/configuration.md +21 -8
  52. package/docs/zh-CN/contributing.md +5 -3
  53. package/docs/zh-CN/getting-started.md +2 -2
  54. package/docs/zh-CN/model-policy.md +2 -2
  55. package/docs/zh-CN/native-capabilities.md +184 -0
  56. package/docs/zh-CN/releasing.md +2 -2
  57. package/docs/zh-CN/session-recovery.md +1 -1
  58. package/native/darwin-amd64/flywheel +0 -0
  59. package/native/darwin-arm64/flywheel +0 -0
  60. package/native/linux-amd64/flywheel +0 -0
  61. package/native/linux-arm64/flywheel +0 -0
  62. package/native/manifest.json +9 -9
  63. package/node_modules/dsh-preset-generator/CHANGELOG.md +77 -0
  64. package/node_modules/dsh-preset-generator/LICENSE +21 -0
  65. package/node_modules/dsh-preset-generator/README.md +149 -0
  66. package/node_modules/dsh-preset-generator/docs/README.zh.md +95 -0
  67. package/node_modules/dsh-preset-generator/package.json +43 -0
  68. package/node_modules/dsh-preset-generator/src/composition.mjs +150 -0
  69. package/node_modules/dsh-preset-generator/src/gen-presets.mjs +367 -0
  70. package/node_modules/dsh-preset-generator/src/policy.mjs +17 -0
  71. package/node_modules/dsh-subagent-codex-pro/CHANGELOG.md +16 -1
  72. package/node_modules/dsh-subagent-codex-pro/README.md +57 -4
  73. package/node_modules/dsh-subagent-codex-pro/assets/native-client.js +118 -0
  74. package/node_modules/dsh-subagent-codex-pro/cordis.patch.yml +6 -0
  75. package/node_modules/dsh-subagent-codex-pro/docs/README.zh.md +49 -2
  76. package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle-validation.md +1 -1
  77. package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle.md +1 -1
  78. package/node_modules/dsh-subagent-codex-pro/docs/machine-lifecycle.zh.md +1 -1
  79. package/node_modules/dsh-subagent-codex-pro/docs/machine.md +2 -2
  80. package/node_modules/dsh-subagent-codex-pro/docs/native-capabilities.md +254 -0
  81. package/node_modules/dsh-subagent-codex-pro/docs/native-capabilities.zh.md +180 -0
  82. package/node_modules/dsh-subagent-codex-pro/lib/config.js +56 -0
  83. package/node_modules/dsh-subagent-codex-pro/lib/config.js.map +1 -0
  84. package/node_modules/dsh-subagent-codex-pro/lib/desktop-native.js +109 -0
  85. package/node_modules/dsh-subagent-codex-pro/lib/desktop-native.js.map +1 -0
  86. package/node_modules/dsh-subagent-codex-pro/lib/dsh-types.js +3 -4
  87. package/node_modules/dsh-subagent-codex-pro/lib/dsh-types.js.map +1 -1
  88. package/node_modules/dsh-subagent-codex-pro/lib/index.js +64 -15
  89. package/node_modules/dsh-subagent-codex-pro/lib/index.js.map +1 -1
  90. package/node_modules/dsh-subagent-codex-pro/lib/jobs.js +6 -2
  91. package/node_modules/dsh-subagent-codex-pro/lib/jobs.js.map +1 -1
  92. package/node_modules/dsh-subagent-codex-pro/lib/machine-cli.js +2 -2
  93. package/node_modules/dsh-subagent-codex-pro/lib/machine-cli.js.map +1 -1
  94. package/node_modules/dsh-subagent-codex-pro/lib/machine-local.js +5 -2
  95. package/node_modules/dsh-subagent-codex-pro/lib/machine-local.js.map +1 -1
  96. package/node_modules/dsh-subagent-codex-pro/lib/machine-supervision.js +11 -0
  97. package/node_modules/dsh-subagent-codex-pro/lib/machine-supervision.js.map +1 -1
  98. package/node_modules/dsh-subagent-codex-pro/lib/machine-supervisor.js +1 -0
  99. package/node_modules/dsh-subagent-codex-pro/lib/machine-supervisor.js.map +1 -1
  100. package/node_modules/dsh-subagent-codex-pro/lib/machine.js +20 -3
  101. package/node_modules/dsh-subagent-codex-pro/lib/machine.js.map +1 -1
  102. package/node_modules/dsh-subagent-codex-pro/lib/native.js +297 -0
  103. package/node_modules/dsh-subagent-codex-pro/lib/native.js.map +1 -0
  104. package/node_modules/dsh-subagent-codex-pro/lib/process-guardian.js +11 -1
  105. package/node_modules/dsh-subagent-codex-pro/lib/process-guardian.js.map +1 -1
  106. package/node_modules/dsh-subagent-codex-pro/lib/run.js +19 -1
  107. package/node_modules/dsh-subagent-codex-pro/lib/run.js.map +1 -1
  108. package/node_modules/dsh-subagent-codex-pro/lib/tool.js +123 -57
  109. package/node_modules/dsh-subagent-codex-pro/lib/tool.js.map +1 -1
  110. package/node_modules/dsh-subagent-codex-pro/lib/types/config.d.ts +31 -0
  111. package/node_modules/dsh-subagent-codex-pro/lib/types/config.d.ts.map +1 -0
  112. package/node_modules/dsh-subagent-codex-pro/lib/types/desktop-native.d.ts +30 -0
  113. package/node_modules/dsh-subagent-codex-pro/lib/types/desktop-native.d.ts.map +1 -0
  114. package/node_modules/dsh-subagent-codex-pro/lib/types/dsh-types.d.ts +7 -5
  115. package/node_modules/dsh-subagent-codex-pro/lib/types/dsh-types.d.ts.map +1 -1
  116. package/node_modules/dsh-subagent-codex-pro/lib/types/index.d.ts +31 -0
  117. package/node_modules/dsh-subagent-codex-pro/lib/types/index.d.ts.map +1 -1
  118. package/node_modules/dsh-subagent-codex-pro/lib/types/jobs.d.ts +2 -0
  119. package/node_modules/dsh-subagent-codex-pro/lib/types/jobs.d.ts.map +1 -1
  120. package/node_modules/dsh-subagent-codex-pro/lib/types/machine-local.d.ts.map +1 -1
  121. package/node_modules/dsh-subagent-codex-pro/lib/types/machine-supervision.d.ts.map +1 -1
  122. package/node_modules/dsh-subagent-codex-pro/lib/types/machine.d.ts +7 -0
  123. package/node_modules/dsh-subagent-codex-pro/lib/types/machine.d.ts.map +1 -1
  124. package/node_modules/dsh-subagent-codex-pro/lib/types/native.d.ts +120 -0
  125. package/node_modules/dsh-subagent-codex-pro/lib/types/native.d.ts.map +1 -0
  126. package/node_modules/dsh-subagent-codex-pro/lib/types/run.d.ts +11 -0
  127. package/node_modules/dsh-subagent-codex-pro/lib/types/run.d.ts.map +1 -1
  128. package/node_modules/dsh-subagent-codex-pro/lib/types/tool.d.ts +11 -0
  129. package/node_modules/dsh-subagent-codex-pro/lib/types/tool.d.ts.map +1 -1
  130. package/node_modules/dsh-subagent-codex-pro/lib/types/wire.d.ts +7 -1
  131. package/node_modules/dsh-subagent-codex-pro/lib/types/wire.d.ts.map +1 -1
  132. package/node_modules/dsh-subagent-codex-pro/lib/wire.js +34 -6
  133. package/node_modules/dsh-subagent-codex-pro/lib/wire.js.map +1 -1
  134. package/node_modules/dsh-subagent-codex-pro/package.json +28 -4
  135. package/npm/install.js +2 -2
  136. package/package.json +25 -10
  137. package/plugins/dsh/KIMI_NATIVE_PROTOCOL.en.md +76 -0
  138. package/plugins/dsh/KIMI_NATIVE_PROTOCOL.md +76 -0
  139. package/plugins/dsh/PROTOCOL.md +149 -17
  140. package/plugins/dsh/README.md +15 -12
  141. package/plugins/dsh/README.zh-CN.md +8 -8
  142. package/plugins/dsh/THIRD_PARTY_NOTICES.md +5 -1
  143. package/plugins/dsh/vendor/README.md +40 -11
  144. package/plugins/dsh/vendor/chatgpt.json +21 -0
  145. package/plugins/dsh/vendor/claude-code-pro.json +21 -0
  146. package/plugins/dsh/vendor/codex-pro.json +13 -8
  147. package/plugins/dsh/vendor/lcu.json +21 -0
  148. package/plugins/dsh/vendor/preset-generator.json +16 -0
@@ -71,6 +71,18 @@ After login, the desktop can choose the first account model when no provider API
71
71
 
72
72
  Explicit API-key configurations remain supported. Select `deepseek-official` consistently in the relevant binding and its channel, and configure credentials through DSH's API-provider flow. Renaming a channel does not override a conflicting explicit provider. Account access does not need an additional API key.
73
73
 
74
+ ## Native capability profiles
75
+
76
+ `native-profiles` defines versioned harness options; a binding selects one with
77
+ `native-profile`. Model profiles, loops, routes, judge-panel and allowed
78
+ execution-policy bindings support this reference. The harness must match.
79
+ Omission inherits model-profile settings; an explicit empty string disables an
80
+ inherited capability profile. Static profiles work with JEV off. The workbench
81
+ selects profiles for the current harness; edit definitions in advanced JSON.
82
+ Native options participate in history and frozen policy identity, and actual
83
+ admission/usage/cleanup remain runtime facts. See [Native capabilities](native-capabilities.md)
84
+ for complete examples, LCU, Tower, independent Review/Team commands and limits.
85
+
74
86
  ## Start from a complete template
75
87
 
76
88
  Inspect either bundled example:
@@ -319,7 +331,7 @@ not a guaranteed speed or token improvement. See the
319
331
 
320
332
  Both new-installation templates explicitly select `scoped`. An existing file without `sessions` normalizes to `fresh`, policy version 1; upgrades do not rewrite it. An explicit policy must contain both fields. Unknown modes, future versions, nulls, typos, and incomplete objects fail before a model starts. The [session policy schema](https://github.com/ckanner/flywheel/blob/main/templates/session-policy.schema.json) is the field contract.
321
333
 
322
- `sessions.mode` controls history reuse; it does not disable invocation safety records. Main-task Plan, Execute, Review, and Judge calls to Codex Pro, Claude Code Pro, DSH, and Kimi journal intent and trusted terminal receipts in both modes. `fresh` disables general role history reuse, retains each backend's native new-call behavior, and preserves existing Kimi Plan `resident-session` behavior. `scoped` can continue compatible history after a trusted normal terminal outcome. Other adapters and mock retain their existing invocation path. Intake and Garden are outside this role session policy.
334
+ `sessions.mode` controls history reuse; it does not disable invocation safety records. Main-task Plan, Execute, Review, and Judge calls to Codex Pro, Claude Code Pro, DSH, and Kimi journal intent and trusted terminal receipts in both modes. `fresh` disables general role history reuse and retains each backend's new-call behavior. It preserves Kimi Plan `resident-session` behavior only on the legacy CLI path without a `native-profile`. Native Agent/Swarm history uses the scoped role ledger; Tower always starts fresh. `scoped` can continue compatible history after a trusted normal terminal outcome. Other adapters and mock retain their existing invocation path. Intake and Garden are outside this role session policy.
323
335
 
324
336
  | Role | History scope and responsibility |
325
337
  |---|---|
@@ -330,7 +342,7 @@ Both new-installation templates explicitly select `scoped`. An existing file wit
330
342
 
331
343
  Quick final Review and Full packet Review have different completion requirements and cannot exchange old histories or verdicts. Quick's first-success path still has two stage-agent calls, Execute and final Review. Go owns all session selection, continuation, rebuilding, and accounting. Skills, models, and desktop controls do not scan backend history to guess a session.
332
344
 
333
- An explicit Plan `resident-session:false` still disables that role's history reuse under scoped mode; omission is different from an explicit opt-out. `resident-session:true` remains the legacy Kimi Plan option, not a cross-harness switch. Codex Pro still rejects it; select scoped Codex Pro history through `sessions`.
345
+ An explicit Plan `resident-session:false` still disables that role's history reuse under scoped mode; omission is different from an explicit opt-out. Without a `native-profile`, `resident-session:true` retains the legacy Kimi CLI Plan behavior. For native Agent/Swarm, that explicit resident intent under global `fresh` instead selects the scoped role ledger, unless `sessions.roles.plan:"fresh"` explicitly disables reuse. It never imports old CLI sessions. Tower always stays fresh. This option does not enable history reuse across harnesses; Codex Pro still rejects it, so select scoped Codex Pro history through `sessions`.
334
346
 
335
347
  Reuse identity includes the actual task and working directories, role and scope, harness, provider, channel, model, thinking, permissions, and backend runtime references. Backend home/profile, worker, and command references reflect the child configuration actually used; only the names of injected credentials are included, never their values. Renaming a profile without changing its resolved binding does not invalidate history. A changed backend, account channel, model, permission, or working directory selects a new history. Changes to the Spec goal, non-goals, requirement identity, or packet goal, body, boundaries, and requirement mapping also invalidate the previous task semantics. Milestone-scoped Plan, Judge, and second opinions also check the milestone title and the identities and goal fields of its constituent packets. Compatible acceptance revisions can retain already-consumed history, with the current contract and evidence supplied again.
336
348
 
@@ -342,7 +354,7 @@ Completed but unconsumed receipts have stricter rules: Review and Judge must mat
342
354
 
343
355
  The single-slot limit applies only to Flywheel's recovery receipt. Native thread and Session histories follow the backend's retention rules. Rebuilding a role history or shutting down its worker does not automatically delete earlier backend histories.
344
356
 
345
- An unknown dispatch, outcome, or cleanup state blocks further execution. Changing to fresh mode, changing adapters, or restarting cannot bypass it. Process exit alone does not establish a known model outcome. `resume-candidate` only permits an adapter to attempt normal continuation; it does not prove recovery after an arbitrary crash. Main-task calls through Codex Pro 0.9.0 and Claude Code Pro 0.4.0 use outer worker v3: public typed lifecycle events, ACKs that wait for Go's durable checkpoint, and a read-only recovery entry that never sends a new turn. Codex can gate dispatch after verified `thread-ready`; Claude's native init follows prompt dispatch and cannot provide equivalent pre-dispatch configuration evidence. Both retain uncertainty when evidence is insufficient. See [interrupted invocation reconciliation](session-recovery.md).
357
+ An unknown dispatch, outcome, or cleanup state blocks further execution. Changing to fresh mode, changing adapters, or restarting cannot bypass it. Process exit alone does not establish a known model outcome. `resume-candidate` only permits an adapter to attempt normal continuation; it does not prove recovery after an arbitrary crash. Main-task calls through Codex Pro 0.10.0 and Claude Code Pro 0.5.0 use outer worker v3: public typed lifecycle events, ACKs that wait for Go's durable checkpoint, and a read-only recovery entry that never sends a new turn. Codex can gate dispatch after verified `thread-ready`; Claude's native init follows prompt dispatch and cannot provide equivalent pre-dispatch configuration evidence. Both retain uncertainty when evidence is insufficient. See [interrupted invocation reconciliation](session-recovery.md).
346
358
 
347
359
  `status` and `control status` expose role, scope, generation, action/reason, latest status, dispatch/outcome/cleanup, history-reuse selection, and usage status. The compact projection does not read receipt contents or conversation history and never changes the ledger. Legacy tasks without session records are not assumed to have recovery eligibility.
348
360
 
@@ -528,7 +540,7 @@ The embedded hard route uses this binding. This is a **fragment**, not a complet
528
540
  }
529
541
  ```
530
542
 
531
- The complete profile template uses `profiles.codex-pro` and references it from `routes.hard`. The worker consumes the exact public `dsh-subagent-codex-pro@0.9.0` package and its `dsh-subagent-codex-pro/machine` entry. The dependency is pinned by the plugin package and lockfile; [vendor provenance](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md) records the reviewed source package used during lifecycle development. The plugin runs Codex app-server and uses the existing Codex login. Claude remains a separate exact `0.4.0` optional peer and is unnecessary when that backend is not selected.
543
+ The complete profile template uses `profiles.codex-pro` and references it from `routes.hard`. The worker consumes the exact public `dsh-subagent-codex-pro@0.10.0` package and its `dsh-subagent-codex-pro/machine` entry. The dependency is pinned by the plugin package and lockfile; [vendor provenance](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md) records the reviewed source package used during lifecycle development. The plugin runs Codex app-server and uses the existing Codex login. Claude remains a separate exact `0.5.0` optional peer and is unnecessary when that backend is not selected.
532
544
 
533
545
  The external tool name `subagent_codex_pro` is not a DSH provider. This route does not create a parent DSH model to make a second delegation. Missing dependencies or invalid receipts fail; they do not trigger an implicit fallback to the older CLI driver.
534
546
 
@@ -595,7 +607,7 @@ Local checks cover commands, versions, directories, configuration, and declared
595
607
 
596
608
  DSH's `ready.reasoningEffort` echoes the requested value after SDK configuration acceptance; it is not an independent server attestation of effective reasoning effort. A no-inference probe cannot demonstrate quality gains from a higher effort. GPT, Kimi, and Flash also have different native effort enums; see [Reasoning effort](model-policy.md).
597
609
 
598
- Codex Pro checks actually import the public API and verify exact version 0.9.0/protocol 1, typed lifecycle/recovery exports, Node compatibility, and the Codex executable. Binding fields `durableJournal`, `readOnlyRecovery`, and `threadReadyBeforeDispatch` describe pinned adapter capabilities; Claude's last field is false. `historyRecoveryTested` remains false. `--probe` sends no model task and does not turn a successful import into evidence of account access, effective permissions, or recovery of a particular saved history.
610
+ Codex Pro checks actually import the public API and verify exact version 0.10.0/protocol 1, typed lifecycle/recovery exports, Node compatibility, and the Codex executable. Binding fields `durableJournal`, `readOnlyRecovery`, and `threadReadyBeforeDispatch` describe pinned adapter capabilities; Claude's last field is false. `historyRecoveryTested` remains false. `--probe` sends no model task and does not turn a successful import into evidence of account access, effective permissions, or recovery of a particular saved history.
599
611
 
600
612
  | Status | Meaning |
601
613
  |---|---|
@@ -90,12 +90,14 @@ Run the applicable checks from the repository root:
90
90
  make quality-gate
91
91
  npm --prefix plugins/dsh ci --ignore-scripts
92
92
  npm --prefix plugins/dsh run check
93
- FLYWHEEL_TEST_NODE_BRIDGE=1 go test ./internal/drivers -run '^Test(DSH|CodexPro|ClaudeCodePro)NodeWorkerOfflineBridge$' -count=1
93
+ FLYWHEEL_TEST_NODE_BRIDGE=1 go test ./internal/drivers -run '^Test(DSH|CodexPro|ClaudeCodePro|KimiNative)NodeWorkerOfflineBridge$' -count=1
94
94
  npm test
95
95
  npm run build:npm
96
96
  FLYWHEEL_NPM_PACKAGES_DIR=dist-npm npm run test:install
97
97
  ```
98
98
 
99
+ `make test` and `make coverage` use a finite 15-minute Go package timeout (`FLYWHEEL_TEST_TIMEOUT`). The machine package includes hundreds of real Git and durable-state scenarios and needs this aggregate budget on macOS. This does not change production watchdogs, individual test guards, or the per-function 100% coverage gate.
100
+
99
101
  | Change | Required verification |
100
102
  |---|---|
101
103
  | Go engine | `make quality-gate`: vet, formatting, tests, and coverage |
@@ -103,10 +105,10 @@ FLYWHEEL_NPM_PACKAGES_DIR=dist-npm npm run test:install
103
105
  | npm installation or release | Root npm tests, a complete single-package candidate build, and installation of that tarball |
104
106
  | Documentation | Links, anchors, fences, runnable examples, translation consistency, and affected embedding/package contents |
105
107
 
106
- The Claude bridge needs the exact optional 0.4.0 machine API in the worker's
108
+ The Claude bridge needs the exact optional 0.5.0 machine API in the worker's
107
109
  dependency tree. An absent-peer skip does not verify that backend. Preserve the
108
110
  reviewed source/tarball identity when using a source candidate. Codex Pro's
109
- bundled 0.9.0 source package is likewise pinned by its actual integrity and
111
+ bundled 0.10.0 source package is likewise pinned by its actual integrity and
110
112
  [vendor record](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md).
111
113
 
112
114
  For lifecycle, state, or process changes, reproduce the Linux CI race check:
@@ -52,7 +52,7 @@ route and independent final Review; an upgrade to Full requires the additional s
52
52
  Unused execution routes do not become task runtime requirements.
53
53
 
54
54
  Claude is optional. Selecting `claude-code-pro` additionally requires the matching
55
- 0.4.0 companion package in the worker's dependency tree and an installed,
55
+ 0.5.0 companion package in the worker's dependency tree and an installed,
56
56
  authenticated Claude CLI. See [Claude Code Pro](claude-code-pro.md).
57
57
 
58
58
  ## 2. Install
@@ -140,7 +140,7 @@ This is a compatibility baseline, not a latest-version claim. Follow that adapte
140
140
  normal authorization flow; keep `DSH_HOME` consistent and credentials out of task
141
141
  files and Git.
142
142
 
143
- The hard route directly imports the pinned Codex Pro 0.9.0 public machine API.
143
+ The hard route directly imports the pinned Codex Pro 0.10.0 public machine API.
144
144
  It needs the local Codex command/login, not a parent model delegating through the
145
145
  `subagent_codex_pro` tool. Optional Claude has its own dependency and login.
146
146
 
@@ -61,7 +61,7 @@ catalog or an account-entitlement check.
61
61
 
62
62
  | Checked integration | Accepted request values | Notes |
63
63
  |---|---|---|
64
- | GPT-6.1 Sol / Codex Pro 0.9.0 | `low`, `medium`, `high`, `xhigh`, `max` | The machine API forwards the selected effort |
64
+ | GPT-6.1 Sol / Codex Pro 0.10.0 | `low`, `medium`, `high`, `xhigh`, `max` | The machine API forwards the selected effort |
65
65
  | Sol and Astra / DSH ChatGPT provider | `low`, `medium`, `high`, `xhigh`, `max` | The provider serializes `reasoning.effort` |
66
66
  | Kimi K3.1 Pro / native CLI | `low`, `high`, `max` | Thinking cannot be disabled; compatibility aliases `xhigh`, `max`, and `ultra` resolve to native `max` |
67
67
  | DeepSeek Flash / checked DSH adapter | `off`, `low`, `high`, `max` | This adapter rejects `medium` and `xhigh` |
@@ -150,6 +150,6 @@ Flywheel's `ready.reasoningEffort` echoes the request after initialization;
150
150
  it is not independent model-server attestation. Codex Pro separates
151
151
  `requestedEffort`, `accepted`, and an unknown `effectiveEffort:null`.
152
152
  See the [DSH SDK server](https://github.com/deepseek-ai/deepseek-harness/blob/b830ec950faba0a46dda564be3e2d854afed94f1/packages/sdk/server/src/server.ts)
153
- and [Codex Pro machine protocol](https://github.com/ckanner/dsh-subagent-codex-pro/blob/37da3d75de32b809c4fb1a631ccc15191f3d87f9/docs/machine.md).
153
+ and [Codex Pro machine protocol](https://github.com/ckanner/dsh-subagent-codex-pro/blob/9c7d724cb19dc29457a56f4a4269c24278595d2f/docs/machine.md).
154
154
  A no-inference doctor cannot prove account balance, live inference, or the
155
155
  benefit of a higher effort setting.
@@ -0,0 +1,185 @@
1
+ # Using native Agents, Teams, Swarm and LCU
2
+
3
+ [Documentation](../README.md) · English · [简体中文](../zh-CN/native-capabilities.md) · [Complete design](../plans/2026-11-13-native-harness-capabilities.en.md)
4
+
5
+ The Flywheel 0.34.0 implementation candidate can use each harness's native collaboration inside formal loops. Define `native-profiles`, then select a profile for the intended stage. Static profiles work with JEV disabled; existing bindings still determine model, account channel, permissions and role history.
6
+
7
+ This guide describes source candidates. [Vendor records](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md) identify the actual companion artifacts. Version numbers here do not imply registry publication or installation on the user's machine.
8
+
9
+ ## 1. Choose the actual harness
10
+
11
+ | Harness | Capabilities inside loops | Requirements |
12
+ | --- | --- | --- |
13
+ | `dsh` | PTC, subagents, Team, Workflow, explicit Web and LCU | Local DSH and an actual PTC probe; LCU additionally needs the 0.5.0 peer and full access |
14
+ | `kimi` | Server Agent / Swarm / Tower | Logged-in Kimi, the current Server API and explicit full access |
15
+ | `codex-pro` | Native agents and child threads | Bundled Codex Pro 0.10.0, logged-in Codex CLI and matching sandbox/approval receipts |
16
+ | `claude-code-pro` | Agent definitions, Workflow and Advisor | Optional Claude Code Pro 0.5.0, logged-in Claude CLI and explicit full access |
17
+
18
+ ChatGPT inside DSH still uses DSH's tool loop. It does not automatically acquire Codex app-server capabilities. The desktop `heavy` Agent Preset is not automatically inherited by an SDK worker; the worker uses the generator's shared PTC overlay policy and checks its actual runtime behavior.
19
+
20
+ ### Desktop plugin defaults and PTC calls
21
+
22
+ Codex Pro and Claude Code Pro provide their own native capability settings pages. Open the corresponding plugin's configuration in the plugin manager to set its `native` defaults. The DSH PTC tools `subagent_codex` and `subagent_claude_code` read those defaults at the start of each call. A running call keeps its captured configuration; later saves affect subsequent calls.
23
+
24
+ | Ordinary tool's `native` argument | Meaning |
25
+ | --- | --- |
26
+ | Omitted | Read the plugin's current default; if no default exists, preserve the CLI's existing behavior |
27
+ | Object | Replace the complete native default for this call, without a field-by-field merge |
28
+ | `null` | Explicitly disable native collaboration for this ordinary call, rather than fall back to implicit CLI enablement |
29
+
30
+ Codex settings cover Agent enablement, concurrent child threads, child model/effort defaults and an optional V2 backend. Claude settings cover Agent definitions, concurrency/depth, Workflow and Advisor; enabling Advisor requires its model. The tools expose corresponding per-call overrides. Native settings remain subject to the existing permission and model-selection policies.
31
+
32
+ Here, `native` describes capabilities inside Codex/Claude. DSH can still orchestrate these tools through PTC. Independent native Review and actual interactive Teams use dedicated operations; saving ordinary Agent defaults does not launch those jobs.
33
+
34
+ These desktop defaults belong to the desktop plugins. A direct Flywheel `codex-pro` / `claude-code-pro` worker uses the fixed selected `native-profile`, without reading another DSH profile's live settings. Independent `/machine` imports do not load desktop UI or DSH services. Normal daily/heavy preset regeneration preserves separately saved plugin settings.
35
+
36
+ ### Align independent worker dependencies
37
+
38
+ Desktop, global CLI workers and the selected SDK profile are separate Node resolution trees. Updating only the desktop does not update the others. Check the managed installation record (`~/.config/flywheel/installation.json`) for the actual Flywheel prefix; when using the optional Claude or LCU backend, install its exact peer in that same prefix:
39
+
40
+ ```sh
41
+ npm install --global --prefix /absolute/flywheel-node-prefix --ignore-scripts dsh-subagent-claude-code-pro@0.5.0 dsh-plugin-lcu@0.5.0
42
+ dsh plugin --profile sdk add --save-exact --ignore-scripts dsh-plugin-chatgpt@0.1.20
43
+ ```
44
+
45
+ Replace `sdk` with the chosen `FLYWHEEL_DSH_PROFILE` if customized. Keep it separate from `desktop`. These commands align software dependencies, not model credentials, permissions or native-profile enablement. Run `flywheel doctor --json` afterward; import availability does not prove live native admission or model vision.
46
+
47
+ ## 2. Define profiles and bind them
48
+
49
+ Use `flywheel config inspect --cwd /absolute/repo --json` to locate the effective complete file. Flywheel selects one file from task, project, global or defaults; it does not merge fields between them.
50
+
51
+ Incorporate this **fragment** into that complete file, choosing the definitions you need:
52
+
53
+ ```json
54
+ {
55
+ "native-profiles": {
56
+ "heavy-team": {
57
+ "harness": "dsh",
58
+ "options": {
59
+ "version": 1, "preset": "heavy",
60
+ "agents": {"enabled": true, "maxConcurrent": 4, "maxDepth": 2},
61
+ "team": {"enabled": true},
62
+ "workflows": {"enabled": true},
63
+ "web": {"search": true, "fetch": true}
64
+ }
65
+ },
66
+ "swarm": {
67
+ "harness": "kimi",
68
+ "options": {"version": 1, "mode": "swarm", "agents": {"enabled": true}}
69
+ },
70
+ "tower": {
71
+ "harness": "kimi",
72
+ "options": {"version": 1, "mode": "tower", "agents": {"enabled": true}}
73
+ },
74
+ "codex-team": {
75
+ "harness": "codex-pro",
76
+ "options": {"version": 1, "agents": {"enabled": true, "maxConcurrentThreads": 4, "backend": "v2"}}
77
+ },
78
+ "claude-flow": {
79
+ "harness": "claude-code-pro",
80
+ "options": {"version": 1, "agents": {"enabled": true}, "workflows": {"enabled": true}, "advisor": {"enabled": true, "model": "opus"}}
81
+ }
82
+ }
83
+ }
84
+ ```
85
+
86
+ Add a `native-profile` reference to the selected stage while keeping its other settings. For example, the default Execute route can retain DeepSeek account access through DSH:
87
+
88
+ ```json
89
+ {
90
+ "routes": {
91
+ "default": {
92
+ "harness": "dsh", "provider": "deepseek-account",
93
+ "channel": "deepseek-account-sdk", "model": "deepseek-flash", "thinking": "high",
94
+ "native-profile": "heavy-team"
95
+ }
96
+ }
97
+ }
98
+ ```
99
+
100
+ References work in model `profiles`, `loops`, `routes`, `judge-panel` and `execution-policy.bindings`. The harness must match. Omission inherits a model profile's field; explicit `"native-profile":""` disables inheritance. Changing effective native options prevents incompatible role-history reuse.
101
+
102
+ The desktop Models and sessions form includes a Native capabilities selector, showing profiles for the current harness. Edit definitions in advanced JSON. Saves use the current file revision and apply on the next engine start. Selecting a profile expresses intent; runtime receipts establish admission.
103
+
104
+ ## 3. Apply capabilities to a stage
105
+
106
+ Plan can use Team or Swarm to investigate, while its root produces formal Spec and packets. Execute can use agents, Workflow or Tower, with results subject to the existing verification and independent Review. Review and Judge use their own role histories and children, never Executor history. Intake/Garden can use the same capabilities for advice without writing state.
107
+
108
+ Native scheduling does not replace Go's decisions about retries, budgets, accepted candidates and delivery. A completed native task board is not a completed Flywheel task.
109
+
110
+ ## 4. LCU and screenshots
111
+
112
+ Add this field to a DSH profile's options and explicitly select full access for the affected role:
113
+
114
+ ```json
115
+ {
116
+ "lcu": {
117
+ "enabled": true,
118
+ "config": {"chrome": true, "audio": false}
119
+ }
120
+ }
121
+ ```
122
+
123
+ `config` also accepts the runtime's `app`, `command`, `allowedApps` and `allowedOrigins`. Use the actual local runtime and authorized targets. The peer must resolve from the SDK worker's real Node dependency tree; installing it in a separate desktop profile is not proof that an independent worker can import it.
124
+
125
+ The worker acquires a desktop lease before mounting LCU. Root and child GUI operations are serialized. The PTC tool name is `lcu_cua`; program objects still use `cua`. Handles belong to the current runtime epoch and must be reacquired after restart. Unknown cleanup is not automatically displaced by another invocation; inspect the original owner and actual runtime rather than deleting a lock to manufacture success.
126
+
127
+ Images and a manifest persist under `<taskDir>/reports/native/<invocationId>/`. Archive hashes identify actual final AttachmentStore bytes; capture hashes are separate. An archived image does not prove model delivery, which may remain `unverified`. ChatGPT provider 0.1.20 fixes real image projection into requests, but this work has not performed live visual acceptance on the user's account.
128
+
129
+ Public Pro machine APIs support explicit media and structured-output inputs. Formal Go loops do not automatically inject every archived image into the next turn or treat an external schema/native review text as their verdict contract.
130
+
131
+ ## 5. Tower candidate directories
132
+
133
+ Tower works in an independent Git copy including current dirty/untracked/binary/symlink/mode/deletion state. It is not an OS sandbox and currently requires full access. Exact execution-directory prefixes are mapped in the prompt with boundaries and recorded digests.
134
+
135
+ Only Execute attempts transfer after completion and cleanup. Transfer rechecks source HEAD, bytes/modes, external task contracts and binary patch applicability. Concurrent source or Spec/packet changes retain the candidate and return a conflict; other roles retain artifacts without applying them. Normal verification, Review and Git delivery still follow.
136
+
137
+ Native Kimi never reads or writes the legacy `plan-session` cache. Agent/Swarm
138
+ use role-ledger history; an explicit legacy `resident-session:true` can retain
139
+ its reuse intent unless `sessions.roles.plan:"fresh"` explicitly overrides it.
140
+ Tower always uses fresh history and does not resume an old Session. Kimi Server has no proven whole-tree `agents.maxConcurrent` hard cap; omit that field. An explicit request for it is rejected before dispatch. See the [Kimi native protocol](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/KIMI_NATIVE_PROTOCOL.en.md).
141
+
142
+ ## 6. Independent native Review and interactive Team
143
+
144
+ These operations return their own native job receipts rather than formal loop verdicts:
145
+
146
+ ```sh
147
+ flywheel native codex-review --request /absolute/codex-review.json
148
+ flywheel native claude-review --request /absolute/claude-review.json
149
+ flywheel native claude-team --request /absolute/claude-team.json
150
+ flywheel native claude-recover --request /absolute/recovery.json
151
+ flywheel native claude-control --request /absolute/control.json
152
+ ```
153
+
154
+ Requests use the pinned public package API plus a private absolute `recoveryDirectory`. Input must be a regular JSON file of at most 1 MiB. A minimal Codex example is:
155
+
156
+ ```json
157
+ {
158
+ "protocol": 1, "requestId": "review-001", "cwd": "/absolute/repo",
159
+ "model": "gpt-6.1-sol", "effort": "high",
160
+ "prompt": "Review the selected changes.", "permissionMode": "read-only", "threadMode": "ephemeral",
161
+ "native": {"version": 1, "review": {"target": {"type": "uncommittedChanges"}}},
162
+ "recoveryDirectory": "/absolute/private/native-review-001"
163
+ }
164
+ ```
165
+
166
+ A remote Claude Review request needs `protocol:1`, a unique requestId, absolute cwd, `consent:true` and recoveryDirectory. It runs `ultrareview --json --no-post`. Local timeout does not settle the remote job; use the original requestId, runId and recoveryDirectory to read the original local journal and retrieve its durable receipt. This neither queries cloud status nor resubmits Review.
167
+
168
+ Interactive Team accepts the public `runInteractiveTeam` prompt and permissionMode and requires tmux. `claude-control` supports capture/send/resize/cancel/attach with the original requestId/runId and recoveryDirectory. Full fields are in the [Claude native API](https://github.com/ckanner/dsh-subagent-claude-code-pro/blob/d14ff8d8334fefd039c3d48ee2a969747d1e88c8/docs/native-capabilities.md).
169
+
170
+ Claude `recoverNativeJob` only reads the local durable journal. It does not start a process or query the cloud. Receipts explicitly retain `jobId:null`, `querySupported:false` and `cancelSupported:false`. A local recovery status of terminal does not establish remote completion: unknown remote state or unconfirmed native cleanup still forbids replay or a claim of cloud cancellation.
171
+
172
+ ## 7. Inspect availability and failures
173
+
174
+ ```sh
175
+ flywheel doctor --cwd /absolute/repo --json
176
+ flywheel doctor --cwd /absolute/repo --probe --json
177
+ ```
178
+
179
+ Native diagnostics inspect local workers, exact public manifests and capability versions. They do not invoke a model, start a Team/cloud job or operate the GUI. A DSH native profile does not use a legacy SDK probe as native admission evidence. Formal worker admission must prove actual PTC, model and target behavior. `native.admission` remains unknown; `inferenceTested:false` and `admissionTested:false` do not mean a failed login attempt.
180
+
181
+ `native-receipt` retains intent, effective configuration, observations, children, usage, completion and cleanup. Native events are not durable lifecycle ACKs. Active children at root completion cannot become success merely because shutdown later cancels them. Unknown cleanup, damaged receipts and uncertain recovery continue to block progress.
182
+
183
+ Concurrency and budgets retain their actual scope: Flywheel scheduling limits root invocations; Claude limits are an observed guard with `hard:false`; Kimi lacks that whole-tree hard cap. Unattributable external-agent, Advisor, compaction or Tower usage remains unknown, and hard budgets do not count it as zero. See [validation](../validation/2026-11-14-native-harness-implementation.md) for tested and untested runtime boundaries.
184
+
185
+ See the [desktop configuration follow-up](../validation/2026-11-14-desktop-native-configuration.md) for plugin settings, typed PTC arguments and this candidate's package validation.
@@ -22,9 +22,9 @@ binary on first use or resolve an old platform/worker package. `plugins/dsh` is
22
22
  old platform packages and `@ckanner/dsh-plugin-flywheel` are historical releases;
23
23
  this flow neither uploads new versions of them nor unpublishes their existing bytes.
24
24
 
25
- Codex Pro 0.9.0 remains bundled from its [reviewed source candidate](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md).
25
+ Codex Pro 0.10.0 remains bundled from its [verified published package](https://github.com/ckanner/flywheel/blob/main/plugins/dsh/vendor/README.md).
26
26
  The root and source-harness locks retain that tarball's real integrity. Claude Code
27
- Pro 0.4.0 is an optional external peer. Provider CLIs and account credentials are
27
+ Pro 0.5.0 is an optional external peer. Provider CLIs and account credentials are
28
28
  not included. Ordinary npm installation only places files; `install`/`setup` owns
29
29
  user setup, with no profile or credential changes hidden in postinstall.
30
30
 
@@ -4,8 +4,8 @@
4
4
 
5
5
  Flywheel separates reuse of a role’s conversation history from recovery of an
6
6
  interrupted invocation. Fresh and scoped histories both retain invocation safety
7
- checks. Durable public-journal recovery requires **Codex Pro 0.9.0** or
8
- **Claude Code Pro 0.4.0**; DSH and Kimi retain their own supported recovery paths.
7
+ checks. Durable public-journal recovery requires **Codex Pro 0.10.0** or
8
+ **Claude Code Pro 0.5.0**; DSH and Kimi retain their own supported recovery paths.
9
9
 
10
10
  ## Resume an existing task
11
11