u-foo 3.1.6 → 4.0.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 (193) hide show
  1. package/README.md +172 -13
  2. package/README.zh-CN.md +108 -13
  3. package/SKILLS/ufoo/SKILL.md +15 -3
  4. package/SKILLS/ufoo-bus/SKILL.md +21 -1
  5. package/bin/uclaude.js +4 -0
  6. package/bin/ucodex.js +4 -0
  7. package/bin/ufoo.js +3 -1
  8. package/dist/tui/darwin-arm64/ufoo-tui +0 -0
  9. package/dist/tui/darwin-x64/ufoo-tui +0 -0
  10. package/dist/tui/linux-arm64/ufoo-tui +0 -0
  11. package/dist/tui/linux-x64/ufoo-tui +0 -0
  12. package/package.json +10 -3
  13. package/scripts/postinstall-skills.js +53 -0
  14. package/scripts/postinstall.js +11 -16
  15. package/scripts/smoke-native-messages.js +214 -0
  16. package/src/agents/activity/activityStateWriter.js +37 -38
  17. package/src/agents/capabilities/agentManagement/index.js +4 -0
  18. package/src/agents/capabilities/agentManagement/service.js +113 -0
  19. package/src/agents/capabilities/agentRouting/index.js +4 -0
  20. package/src/agents/capabilities/coding/index.js +32 -0
  21. package/src/agents/capabilities/coordination/index.js +37 -0
  22. package/src/agents/capabilities/globalRouting/index.js +5 -0
  23. package/src/agents/capabilities/groups/index.js +3 -0
  24. package/src/agents/capabilities/index.js +25 -0
  25. package/src/agents/capabilities/planning/index.js +123 -0
  26. package/src/agents/capabilities/planning/main.js +28 -0
  27. package/src/agents/capabilities/projectDiscovery/index.js +3 -0
  28. package/src/agents/capabilities/scheduling/index.js +3 -0
  29. package/src/agents/capabilities/sharedMemory/index.js +4 -0
  30. package/src/agents/capabilities/skills/index.js +12 -0
  31. package/src/agents/capabilities/taskExecution/index.js +3 -0
  32. package/src/agents/capabilities/taskReports/index.js +6 -0
  33. package/src/agents/controller/controllerToolExecutor.js +6 -4
  34. package/src/agents/controller/loopRuntime.js +85 -221
  35. package/src/agents/controller/ufooAgent.js +1 -0
  36. package/src/agents/internal/internalRunner.js +103 -32
  37. package/src/agents/launch/launcher.js +88 -6
  38. package/src/agents/launch/nativeCapabilities.js +40 -0
  39. package/src/agents/launch/nativeMessages.js +362 -0
  40. package/src/agents/launch/notifier.js +13 -18
  41. package/src/agents/launch/readyDetector.js +26 -12
  42. package/src/agents/profiles/coding.js +6 -0
  43. package/src/agents/profiles/globalRouter.js +2 -0
  44. package/src/agents/profiles/main.js +5 -0
  45. package/src/agents/prompts/groupBootstrap.js +10 -0
  46. package/src/agents/prompts/mainAgent.js +39 -0
  47. package/src/agents/prompts/native/tasks.js +2 -2
  48. package/src/agents/prompts/native/ufoo.js +3 -0
  49. package/src/agents/providers/claudeEventTranslator.js +6 -1
  50. package/src/agents/providers/claudeThreadProvider.js +44 -2
  51. package/src/agents/providers/codexEventTranslator.js +47 -7
  52. package/src/agents/providers/codexThreadProvider.js +3 -2
  53. package/src/agents/providers/controllerJsonTransport.js +28 -0
  54. package/src/agents/providers/credentials/claude.js +10 -3
  55. package/src/agents/providers/nativeTransport.js +1135 -0
  56. package/src/agents/providers/runtimeConfig.js +186 -0
  57. package/src/agents/providers/thinkingLevels.js +132 -0
  58. package/src/agents/providers/transports/anthropicMessagesTransport.js +121 -0
  59. package/src/agents/providers/transports/index.js +10 -0
  60. package/src/agents/providers/transports/openaiChatTransport.js +117 -0
  61. package/src/agents/providers/transports/openaiResponsesTransport.js +120 -0
  62. package/src/agents/providers/transports/responsesProtocol.js +499 -0
  63. package/src/agents/providers/transports/systemBlocks.js +16 -0
  64. package/src/agents/providers/transports/transportContract.js +50 -0
  65. package/src/agents/providers/transports/visionBlocks.js +151 -0
  66. package/src/agents/providers/upstreamTransport.js +13 -4
  67. package/src/agents/runtime/composeCapabilities.js +89 -0
  68. package/src/agents/runtime/context/commandStore.js +43 -0
  69. package/src/agents/runtime/context/contextWindow.js +119 -0
  70. package/src/agents/runtime/context/fileLock.js +36 -0
  71. package/src/agents/runtime/context/runtimeStore.js +126 -0
  72. package/src/agents/runtime/context/sessionJournal.js +360 -0
  73. package/src/agents/runtime/context/sessionStore.js +57 -0
  74. package/src/agents/runtime/core/agentLoop.js +270 -0
  75. package/src/agents/runtime/core/stableJson.js +29 -0
  76. package/src/agents/runtime/core/toolLoopGuard.js +55 -0
  77. package/src/agents/runtime/createAgentRuntime.js +247 -0
  78. package/src/agents/runtime/index.js +14 -0
  79. package/src/agents/runtime/protocol/faultHarness.js +90 -0
  80. package/src/agents/runtime/protocol/materialize.js +107 -0
  81. package/src/agents/runtime/protocol/toolCallLedger.js +221 -0
  82. package/src/agents/runtime/tasks/resourceLease.js +66 -0
  83. package/src/agents/runtime/tasks/scheduler.js +73 -0
  84. package/src/agents/runtime/tools/registry.js +57 -0
  85. package/src/app/chat/ChatController.js +14 -3
  86. package/src/app/chat/agentDirectory.js +8 -2
  87. package/src/app/chat/commandExecutor.js +36 -46
  88. package/src/app/chat/commands.js +14 -7
  89. package/src/app/chat/daemonConnection.js +58 -5
  90. package/src/app/chat/daemonMessageRouter.js +61 -3
  91. package/src/app/chat/inputSubmitHandler.js +14 -2
  92. package/src/app/chat/launchRequestContext.js +42 -0
  93. package/src/app/chat/multiWindow/paneManager.js +85 -165
  94. package/src/app/chat/streamState.js +3 -3
  95. package/src/app/chat/transport.js +1 -1
  96. package/src/app/cli/busCoreCommands.js +9 -0
  97. package/src/app/cli/features/doctor.js +33 -0
  98. package/src/app/cli/features/skills.js +16 -4
  99. package/src/app/cli/reportCoreCommands.js +37 -0
  100. package/src/app/cli/run.js +40 -39
  101. package/src/code/agent.js +16 -4
  102. package/src/code/context/artifacts.js +12 -11
  103. package/src/code/context/assembler.js +2 -1
  104. package/src/code/context/promptLayers.js +1 -13
  105. package/src/code/context/stableJson.js +2 -27
  106. package/src/code/contextWindow.js +2 -117
  107. package/src/code/conversation/sessionJournal.js +3 -349
  108. package/src/code/internalThread.js +100 -0
  109. package/src/code/nativeRunner.js +36 -2668
  110. package/src/code/protocol/faultHarness.js +2 -88
  111. package/src/code/protocol/materialize.js +2 -105
  112. package/src/code/protocol/toolCallLedger.js +5 -215
  113. package/src/code/providers/anthropicMessagesTransport.js +2 -118
  114. package/src/code/providers/openaiChatTransport.js +2 -114
  115. package/src/code/providers/openaiResponsesTransport.js +2 -117
  116. package/src/code/providers/responsesProtocol.js +2 -497
  117. package/src/code/providers/transportContract.js +2 -48
  118. package/src/code/providers/visionBlocks.js +2 -149
  119. package/src/code/sessionStore.js +24 -96
  120. package/src/code/thinkingLevels.js +1 -130
  121. package/src/code/toolLoopGuard.js +3 -49
  122. package/src/code/tools/artifactRead.js +1 -1
  123. package/src/code/tools/executor.js +373 -0
  124. package/src/code/tools/specs.js +312 -0
  125. package/src/config.js +81 -67
  126. package/src/coordination/bus/deliveryQueue.js +16 -2
  127. package/src/coordination/bus/index.js +2 -6
  128. package/src/coordination/bus/inject.js +13 -5
  129. package/src/coordination/bus/nativeReceipts.js +100 -0
  130. package/src/coordination/bus/queue.js +1 -3
  131. package/src/coordination/bus/utils.js +7 -3
  132. package/src/coordination/history/agentSurface.js +142 -0
  133. package/src/coordination/history/controllerSummary.js +23 -0
  134. package/src/coordination/memory/index.js +5 -21
  135. package/src/coordination/report/store.js +103 -83
  136. package/src/coordination/state/agentsStore.js +57 -3
  137. package/src/coordination/state/fileLock.js +2 -0
  138. package/src/coordination/state/workspaceAccess.js +36 -0
  139. package/src/runtime/contracts/agentMode.js +17 -0
  140. package/src/runtime/contracts/eventContract.js +3 -0
  141. package/src/runtime/contracts/uiProtocol.js +4 -0
  142. package/src/runtime/daemon/agentHost.js +375 -0
  143. package/src/runtime/daemon/busBridge.js +396 -0
  144. package/src/runtime/daemon/claudeChannel.js +159 -0
  145. package/src/runtime/daemon/controlPlaneService.js +27 -17
  146. package/src/runtime/daemon/cronOps.js +25 -17
  147. package/src/runtime/daemon/deliveryScheduler.js +32 -5
  148. package/src/runtime/daemon/executionPaths.js +30 -0
  149. package/src/runtime/daemon/globalDaemon.js +28 -1
  150. package/src/runtime/daemon/groupOrchestrator.js +1 -0
  151. package/src/runtime/daemon/index.js +114 -344
  152. package/src/runtime/daemon/ipcServer.js +32 -10
  153. package/src/runtime/daemon/mcpConfigure.js +113 -20
  154. package/src/runtime/daemon/mcpHttpServer.js +27 -5
  155. package/src/runtime/daemon/mcpServer.js +7 -4
  156. package/src/runtime/daemon/mcpStdioProxy.js +127 -10
  157. package/src/runtime/daemon/ops.js +22 -17
  158. package/src/runtime/daemon/promptRequest.js +23 -4
  159. package/src/runtime/daemon/providerSessions.js +67 -33
  160. package/src/runtime/daemon/reportControlBus.js +59 -25
  161. package/src/runtime/daemon/status.js +4 -0
  162. package/src/runtime/privacy/redactor.js +2 -2
  163. package/src/runtime/projects/identity.js +2 -1
  164. package/src/runtime/projects/registry.js +98 -38
  165. package/src/tools/controllerSchemas.js +24 -0
  166. package/src/tools/handlers/dispatchMessage.js +5 -2
  167. package/src/tools/handlers/listAgents.js +3 -1
  168. package/src/tools/handlers/readBusSummary.js +3 -1
  169. package/src/tools/handlers/readProjectRegistry.js +29 -2
  170. package/src/tools/handlers/routeAgent.js +35 -0
  171. package/src/tools/index.js +1 -0
  172. package/src/tools/registry.js +2 -0
  173. package/src/tools/schemaFixtures.js +16 -3
  174. package/src/tools/tier1/routeAgent.js +2 -2
  175. package/src/tools/tier2/runtimeCoordination.js +38 -0
  176. package/src/tools/types.js +2 -0
  177. package/src/ui/agentPresentation.js +109 -0
  178. package/src/ui/agentSurface.js +270 -0
  179. package/src/ui/format/banner.js +8 -11
  180. package/src/ui/format/startupBanner.js +50 -0
  181. package/src/ui/multiPaneBusMirror.js +29 -3
  182. package/src/ui/rustChatHost.js +170 -438
  183. package/src/ui/rustMultiSession.js +225 -51
  184. package/src/ui/rustUcodeHost.js +20 -87
  185. package/src/ui/settingsBridge.js +7 -4
  186. package/src/app/chat/agentEnter.js +0 -70
  187. package/src/app/chat/multiWindow/index.js +0 -310
  188. package/src/app/chat/multiWindow/paneLayout.js +0 -84
  189. package/src/app/chat/multiWindow/renderer.js +0 -420
  190. package/src/app/chat/multiWindow/virtualTerminal.js +0 -327
  191. package/src/app/chat/multiWindow/vtFrame.js +0 -93
  192. package/src/ui/multiWindowHandoff.js +0 -232
  193. package/src/ui/ptyHandoff.js +0 -23
package/README.md CHANGED
@@ -2,10 +2,11 @@
2
2
 
3
3
  [中文](README.zh-CN.md)
4
4
 
5
- ufoo is a project-scoped multi-agent workspace runtime. It wraps Claude Code,
6
- OpenAI Codex, Antigravity, Grok Build, Kimi Code, and ufoo's native `ucode`
7
- agent with a shared chat dashboard, daemon, event bus, memory, reports, group
8
- orchestration, and terminal launch modes.
5
+ ufoo is a project-scoped multi-agent workspace runtime with two ways to work.
6
+ Keep using Claude Code, OpenAI Codex, and other supported CLIs through wrappers
7
+ and MCP for messages and shared context. Or open the ufoo dashboard to work with
8
+ a main agent and internal Codex, Claude, and `ucode` agents in one terminal.
9
+ Both share a daemon, event bus, memory, reports, and group orchestration.
9
10
 
10
11
  Package: [u-foo on npm](https://www.npmjs.com/package/u-foo)
11
12
 
@@ -17,14 +18,16 @@ Package: [u-foo on npm](https://www.npmjs.com/package/u-foo)
17
18
 
18
19
  ## Highlights
19
20
 
20
- - One TUI dashboard for launching, watching, messaging, and resuming agents.
21
+ - One TUI dashboard for a main agent and internal child agents, with shared input,
22
+ live output, status, and three layouts.
21
23
  - One user-scoped daemon over `~/.ufoo/run/ufoo.sock`, hosting isolated project
22
24
  runtimes for launch/resume, reports, groups, cron, and controller routing.
23
25
  - Project-local event bus for agent-to-agent messages, wakeups, queue checks,
24
26
  and activation.
25
27
  - Shared context primitives: decisions, durable memory, prompt history, reports,
26
28
  and agent registry state.
27
- - Launch modes for internal, tmux, host, Terminal.app, and iTerm2 workflows.
29
+ - Wrappers and MCP keep external CLI workflows connected; dashboard child agents
30
+ run internally without opening external terminals.
28
31
  - Built-in group templates for launching and orchestrating multi-agent workflows.
29
32
  - `ucode`, a native ufoo coding-agent runtime.
30
33
  - One loopback Streamable HTTP MCP server inside the home-scoped global
@@ -32,7 +35,7 @@ Package: [u-foo on npm](https://www.npmjs.com/package/u-foo)
32
35
 
33
36
  ## Requirements
34
37
 
35
- - Node.js 18 or newer.
38
+ - Node.js 18.17 or newer.
36
39
  - macOS for Terminal.app/iTerm2 integration.
37
40
  - Claude Code, Codex CLI, Antigravity CLI, Grok Build, or Kimi Code installed
38
41
  when using the matching wrappers: `uclaude`, `ucodex`, `uagy`, `ugrok`, or
@@ -52,6 +55,7 @@ Or link this repository for local development:
52
55
  git clone https://github.com/Icyoung/ufoo.git
53
56
  cd ufoo
54
57
  npm install
58
+ npm run pack:tui
55
59
  npm link
56
60
  ```
57
61
 
@@ -124,7 +128,9 @@ ufoo mcp configure codex
124
128
  ```
125
129
 
126
130
  The configuration points all three Codex surfaces at the same authenticated
127
- loopback endpoint. Restart the Codex surface after configuring it.
131
+ loopback endpoint. Existing ufoo authentication fields and headers are retained.
132
+ Use `ufoo mcp configure codex --dry-run` to preview the change with credentials
133
+ redacted. Restart the Codex surface after configuring it.
128
134
 
129
135
  For a host that has not been verified with direct HTTP, keep the compatible
130
136
  stdio configuration:
@@ -173,6 +179,10 @@ inherited `UFOO_SUBSCRIBER_ID` before any helper terminal is started:
173
179
  activity and injection endpoint, so bus messages can be injected directly.
174
180
  These Agents reuse the environment identity and do not register through MCP
175
181
  or run a resident bus poll.
182
+ Current wrappers also provide `UFOO_AGENT_HANDLE` so the Agent can use the
183
+ shared MCP `dispatch_message`, `ack_bus`, and `report_agent_status` tools.
184
+ The CLI remains available when MCP is not configured. Receive, activity,
185
+ and shutdown stay with the wrapper.
176
186
  - Externally hosted Agents have no wrapper-provided subscriber environment.
177
187
  They register themselves once through MCP `register_agent`, retain the
178
188
  returned subscriber plus opaque `agent_handle`, and select the host App's
@@ -191,6 +201,72 @@ Chat is a UI client. The daemon owns project runtime state. Agents communicate
191
201
  through bus queues, prompt injection, shared memory, reports, and tool handlers
192
202
  instead of importing chat UI code.
193
203
 
204
+ MCP sends confirm durable queue persistence, not delivery or task completion.
205
+ The result reports `delivery_status: "queued"`, `queued: <target count>`, and
206
+ `delivered: 0`. Registry reads return up to 100 existing project paths per page;
207
+ follow `next_offset` for more, or set `include_missing: true` for diagnostics.
208
+ To archive abandoned records for deleted workspaces, preview with
209
+ `ufoo project prune`, then run `ufoo project prune --apply`. Original JSON
210
+ records remain recoverable under `~/.ufoo/projects/archive/`.
211
+
212
+ The stdio proxy reconnects after listener restarts and preserves the Agent's
213
+ registration. It automatically replays reads; an uncertain write returns
214
+ `UFOO_MCP_OUTCOME_UNKNOWN` so its persisted result can be checked before retrying.
215
+ Run `ufoo doctor` to detect outdated Codex MCP configuration, and
216
+ `ufoo mcp configure codex` to refresh it with a backup.
217
+
218
+ Codex and Claude Code wrappers use native incoming-message transports by
219
+ default for interactive launches on macOS/Linux:
220
+
221
+ ```bash
222
+ ucodex
223
+ uclaude
224
+ ```
225
+
226
+ Codex connects its TUI to a private local app-server. ufoo observes the TUI's
227
+ exact thread response, preserves its requests and approvals, and sends bus
228
+ work through `thread/queue/add`. Claude uses a launch-local stdio MCP channel
229
+ and retains Claude's development-channel confirmation. Its startup probe must
230
+ arrive through the native channel before any bus work is sent. Channels are a
231
+ [Claude research preview](https://code.claude.com/docs/en/channels); account and
232
+ organization availability rules still apply. Existing MCP configuration and
233
+ credentials remain intact; these launches do not write global host settings.
234
+
235
+ Native receivers admit work while busy. A queue receipt confirms transport
236
+ acceptance, not task completion. Stable delivery IDs and project-local native
237
+ receipts prevent duplicate retries; uncertain writes retain the bus event for
238
+ inspection rather than falling back to keyboard injection. The wrapper still
239
+ owns terminal rendering, identity, activity, and shutdown. Use
240
+ `--no-native-messages` or `UFOO_NATIVE_MESSAGES=0` to select the existing delivery
241
+ path; `--native-messages` explicitly overrides that environment setting.
242
+ Headless commands such as `ucodex exec` and `uclaude --print`, help/version,
243
+ internal agents, and other providers keep their existing launch behavior.
244
+ Launchers check CLI versions against the tested baselines (Codex 0.160.1 and
245
+ Claude Code 2.1.204), and check Codex remote support. Older CLIs use legacy
246
+ delivery with a diagnostic; explicit `--native-messages` requires compatibility.
247
+ `ufoo doctor` shows versions, receiver readiness, and uncertain receipts.
248
+
249
+ Inspect or explicitly resolve an uncertain receipt:
250
+
251
+ ```bash
252
+ ufoo bus deliveries <subscriber>
253
+ ufoo bus deliveries <subscriber> <receipt-id> accepted
254
+ ufoo bus deliveries <subscriber> <receipt-id> retry
255
+ ```
256
+
257
+ Use `accepted` after verifying the receiving session got the work. `retry`
258
+ allows another submission and can duplicate work if the first submission
259
+ succeeded. A live in-flight submission cannot be resolved.
260
+
261
+ Codex resume pickers and `resume --last` bind the exact session returned by the
262
+ TUI after selection.
263
+
264
+ The integration tests use real Unix sockets, WebSockets, and stdio MCP. Optional
265
+ vendor CLI smoke tests use isolated homes and a fake local model endpoint:
266
+ `node scripts/smoke-native-messages.js codex` and
267
+ `node scripts/smoke-native-messages.js claude`. Verified locally with Codex
268
+ 0.160.1 and Claude Code 2.1.204.
269
+
194
270
  ## Daily Usage
195
271
 
196
272
  The normal workflow is to enter chat first, then launch agents and run project
@@ -205,6 +281,20 @@ ufoo -g
205
281
  between registered projects. The global daemon starts once and project runtimes
206
282
  activate lazily.
207
283
 
284
+ The project main agent shares a composable runtime with `ucode`. It can read and
285
+ edit code, run validation, delegate to internal agents, or start independent
286
+ tasks. The global profile selects projects before coding begins. Long tasks run
287
+ in the daemon; disconnecting chat does not cancel them, and reconnecting replays
288
+ runtime events.
289
+
290
+ Existing controller conversations retain their executor. Use `/session new` to
291
+ start a main conversation with current settings; existing provider/model bindings
292
+ stay pinned. A crash during an active round marks it interrupted: inspect actual
293
+ effects before resubmitting. Writes, shell commands, launches, and uncertain
294
+ deliveries are not automatically replayed. Managed writers share directory
295
+ leases; verified git worktrees can run independently. These checks are not an OS
296
+ sandbox for shell commands. See the [runtime implementation record](AGENT_RUNTIME_REFACTOR.md).
297
+
208
298
  ### Chat Commands
209
299
 
210
300
  ```text
@@ -215,14 +305,56 @@ activate lazily.
215
305
  @reviewer inspect the current diff and list release risks
216
306
 
217
307
  /status
308
+ /task list
309
+ /task inspect <run-id>
310
+ /task cancel <run-id>
311
+ /answer <interaction-id> <reply>
312
+ /session show
313
+ /session new
218
314
  /settings
219
315
  /multi
316
+ /multi on
317
+ /multi off
318
+ /multi @reviewer
220
319
  /resume list
221
320
  /project list
222
321
  /project switch 2
223
322
  /open /path/to/project
224
323
  ```
225
324
 
325
+ The dashboard keeps three layouts: main agent only, main plus one selected
326
+ internal agent, and main plus all internal agents. Wrapper and MCP agents stay
327
+ outside the dashboard. Dashboard child launches use internal mode and never
328
+ open an external terminal. A project with no chat or input history shows the
329
+ existing compact ufoo banner as its welcome screen.
330
+ `/multi` or `Ctrl+T` toggles the all-agent layout; from a single-agent layout it
331
+ expands to all agents. `/multi @reviewer` opens just that internal agent.
332
+ `Ctrl+M` opens the all-agent layout and leaves it open when pressed again.
333
+ It requires a terminal that reports modified keys separately from Enter; the
334
+ dashboard requests the enhanced keyboard protocol automatically. In legacy
335
+ terminals where Ctrl+M and Enter share the same encoding, Enter keeps submitting
336
+ input and `/multi` or `Ctrl+T` remains available.
337
+ In either split layout, `Esc` first returns child focus to the main agent;
338
+ when the main agent has focus, `Esc` closes the split. Drafts and running tasks
339
+ are preserved. `Ctrl+Q` or `/multi off` closes either split directly.
340
+ At the main-only root, `Esc` never exits the application; use `Ctrl+C`.
341
+ `Tab` cycles keyboard focus through the main agent and the visible child panes;
342
+ all agents share one bottom input, which follows the selected agent while
343
+ preserving each draft. Each agent's live status sits in its pane's bottom border;
344
+ the main agent's input is labelled `main`, and its status stays independent of
345
+ child selection, focus changes and child activity.
346
+ The selected pane's body uses the terminal's default foreground. In the main-only
347
+ layout, `Tab` selects the first agent in the bottom bar, then advances through
348
+ the agents and wraps to the first. `Esc` returns to
349
+ the main input. Command completion keeps its existing `Tab` behavior in the
350
+ main-only layout.
351
+ Layout commands also work from an internal child's input. Switching layouts
352
+ keeps unsent child drafts and does not stop running agents.
353
+ With a child active, `Down` from an empty input or a footer click opens the Agents
354
+ selector. `Down` then opens provider settings and cron controls; `Esc` returns to
355
+ the same agent's input. In the selector, `Enter` opens the selected internal
356
+ agent. The provider caption in the footer also opens its settings directly.
357
+
226
358
  Direct wrapper commands such as `uclaude`, `ucodex`, `uagy`, `ugrok`, `ukimi`, and
227
359
  `ucode` are still available, but the normal ufoo workflow is to work from chat.
228
360
 
@@ -312,7 +444,11 @@ remains available through the controller/CLI rename path.
312
444
  Both paths keep idle queue checks outside the LLM. A background PTY alone is
313
445
  not a wake mechanism in Codex App.
314
446
 
315
- The poll skill is not installed by postinstall or `skills install all`.
447
+ The poll skill is opt-in. Postinstall refreshes only verified ufoo-owned links;
448
+ user directories, files, and foreign links are preserved. `skills install all`
449
+ refreshes an already-installed optional skill with a backup, but does not
450
+ install it for a new host. Explicit skill installs retain previous contents in
451
+ a sibling `.backup-*` path.
316
452
  Wrapper-managed Agents skip MCP registration and external waiting when
317
453
  `UFOO_SUBSCRIBER_ID` was present in the Agent's inherited launch environment.
318
454
  A value exported later inside a Cursor listener terminal does not rerun this
@@ -378,6 +514,17 @@ ufoo online inbox builder --unread
378
514
  The default public service URL is `https://online.ufoo.dev`. Local development
379
515
  can run its own relay with `ufoo online server`.
380
516
 
517
+ Internal Codex, Claude Code and ucode panes share the standalone ucode TUI's
518
+ transcript renderer and one bottom multiline input. Submitting immediately shows
519
+ loading; waiting, thinking, generating, tool execution, user interaction, errors,
520
+ elapsed time, context usage and plans follow the selected agent's actual events.
521
+ Provider-specific retry, compaction and background task events use the same status
522
+ surface. Text, thinking and tool
523
+ results update from provider events; Ctrl+O expands the newest thinking/tool
524
+ block in the focused pane. Display observations are separate from agent inboxes,
525
+ so peer-routed tasks remain visible without waking the main agent. Output and
526
+ drafts survive switching between main-only, focused-child and all-child layouts.
527
+
381
528
  ### Native ucode Runtime
382
529
 
383
530
  ```bash
@@ -410,7 +557,7 @@ Common project settings:
410
557
  "routerProvider": "",
411
558
  "routerModel": "",
412
559
  "agentModel": "",
413
- "autoResume": true
560
+ "autoResume": false
414
561
  }
415
562
  ```
416
563
 
@@ -418,6 +565,10 @@ Supported `launchMode` values: `auto`, `internal`, `tmux`, `terminal`, and
418
565
  `host`. `controllerMode` accepts `main`, `shadow`, `loop`, and legacy
419
566
  compatibility values.
420
567
 
568
+ Ordinary provider sessions authenticate through their provider-owned adapters;
569
+ MCP `agent_handle` is never model authentication. Select `agentProvider=ucode`
570
+ to use the ucode gateway settings below.
571
+
421
572
  Global `ucode` settings:
422
573
 
423
574
  ```json
@@ -440,8 +591,8 @@ src/
440
591
  runtime/ daemon, projects, terminal adapters, contracts, privacy, process helpers
441
592
  coordination/ bus, context, memory, history, reports, state, status
442
593
  orchestration/ router/controller logic, groups, solo roles
443
- agents/ launchers, providers, prompts, internal runner, activity, controller
444
- code/ native ucode runtime, launcher, skills, file/shell tools
594
+ agents/ shared runtime, capabilities, profiles, providers, launchers, prompts
595
+ code/ native ucode host, launcher, skills, file/shell tools
445
596
  tools/ shared controller/worker tool registry and handlers
446
597
  online/ relay client/server/runner/token helpers
447
598
  ```
@@ -449,10 +600,18 @@ src/
449
600
  See [PROJECT.md](PROJECT.md) for the maintainer-facing map and detailed package
450
601
  ownership.
451
602
 
603
+ Reports share one task ID across lifecycle phases. Pass `--task <id>` to
604
+ `ufoo report`, or `task_id` to MCP `report_agent_status`. Without an explicit ID,
605
+ CLI progress/done/error attach to the agent's single active task; multiple
606
+ active tasks require an ID. Reports are acknowledged after persistence, and
607
+ ordinary bus replies do not imply task completion. `autoResume` defaults to
608
+ `false` consistently before and after partial configuration updates.
609
+
452
610
  ## Development
453
611
 
454
612
  ```bash
455
613
  npm install
614
+ npm run pack:tui
456
615
  npm link
457
616
  node bin/ufoo.js --help
458
617
  npm test
@@ -465,7 +624,7 @@ npm run test:watch
465
624
  npm run test:coverage
466
625
  ```
467
626
 
468
- The repository is CommonJS, targets Node.js 18+, and ships a Rust TTY UI
627
+ The repository is CommonJS, targets Node.js 18.17+, and ships a Rust TTY UI
469
628
  (`crates/ufoo-tui`) as platform binaries under `dist/tui/`.
470
629
 
471
630
  ## Release
package/README.zh-CN.md CHANGED
@@ -2,9 +2,11 @@
2
2
 
3
3
  [English](README.md)
4
4
 
5
- ufoo 是一个按项目隔离的多 Agent 工作区运行时。它把 Claude Code、
6
- OpenAI Codex、Antigravity 和 ufoo 原生 `ucode` Agent 接入同一个 chat
7
- 仪表盘、daemon、事件总线、memory、report、group 编排和终端启动层。
5
+ ufoo 是一个按项目隔离的多 Agent 工作区运行时,提供两种用法。
6
+ 你可以继续使用 Claude Code、OpenAI Codex 等原有 CLI,通过包装器和 MCP
7
+ 互联、收发消息并共享上下文;也可以打开 ufoo 面板,在当前终端与主 agent
8
+ 和 internal Codex、Claude、`ucode` 子 agent 协作。
9
+ 两种用法共享 daemon、事件总线、memory、report 和 group 编排。
8
10
 
9
11
  npm 包:[u-foo](https://www.npmjs.com/package/u-foo)
10
12
 
@@ -16,13 +18,15 @@ npm 包:[u-foo](https://www.npmjs.com/package/u-foo)
16
18
 
17
19
  ## 亮点
18
20
 
19
- - 一个 TUI 仪表盘,用来启动、观察、消息通知和恢复多个 Agent。
21
+ - 一个 TUI 面板,承载主 agent 和 internal 子 agent,提供共享输入框、
22
+ 实时输出、状态和三种布局。
20
23
  - 唯一的用户级 daemon 通过 `~/.ufoo/run/ufoo.sock` 托管隔离的项目
21
24
  runtime,管理启动/恢复、report、group、cron 和 controller 路由。
22
25
  - 项目内事件总线支持 Agent 间消息、唤醒、队列检查和终端激活。
23
26
  - 共享上下文能力:decision、durable memory、prompt history、report 和
24
27
  agent registry state。
25
- - 支持 internal、tmux、host、Terminal.app、iTerm2 等启动模式。
28
+ - 包装器和 MCP 连接外部 CLI 工作流;面板子 agent 使用 internal 模式,
29
+ 在当前终端内交互。
26
30
  - 内置 group 模板,用于启动和编排多 Agent 工作流。
27
31
  - 提供原生 ufoo coding-agent 运行时 `ucode`。
28
32
  - home 级 global controller daemon 内提供唯一的本机 Streamable HTTP MCP
@@ -30,7 +34,7 @@ npm 包:[u-foo](https://www.npmjs.com/package/u-foo)
30
34
 
31
35
  ## 环境要求
32
36
 
33
- - Node.js 18 或更新版本。
37
+ - Node.js 18.17 或更新版本。
34
38
  - macOS,用于 Terminal.app/iTerm2 集成。
35
39
  - 使用对应包装器时,需要安装 Claude Code、Codex CLI 或 Antigravity CLI:
36
40
  `uclaude`、`ucodex`、`uagy`。
@@ -49,6 +53,7 @@ npm install -g u-foo
49
53
  git clone https://github.com/Icyoung/ufoo.git
50
54
  cd ufoo
51
55
  npm install
56
+ npm run pack:tui
52
57
  npm link
53
58
  ```
54
59
 
@@ -63,6 +68,33 @@ npm link
63
68
  | `ukimi` | Kimi Code 包装器,注入 ufoo bootstrap 和 bus 身份。 |
64
69
  | `ucode` | 原生 ufoo coding-agent CLI/TUI。 |
65
70
 
71
+ 交互式 `ucodex` 和 `uclaude` 在 macOS/Linux 默认使用原生消息通道。
72
+ Codex 的 TUI 连接本次启动的私有 app-server,Claude 使用本次启动的 MCP
73
+ channel;不会修改宿主全局配置或认证信息。Claude 保留原有开发通道确认,
74
+ 账号及组织策略限制仍然适用。接收器确认就绪后才投递消息。
75
+
76
+ 启动器检查已验证的版本基线(Codex 0.160.1、Claude Code 2.1.204)及
77
+ Codex remote 支持;旧版本会提示并使用原有投递方式。
78
+ `--native-messages` 强制要求兼容,`--no-native-messages` 或
79
+ `UFOO_NATIVE_MESSAGES=0` 关闭原生通道。`ufoo doctor` 展示版本和接收器状态。
80
+
81
+ 投递回执仅表示通道接收,不表示任务完成。响应丢失会保留消息和不确定
82
+ 回执,不自动重发。可使用以下命令检查并明确处理:
83
+
84
+ ```bash
85
+ ufoo bus deliveries <subscriber>
86
+ ufoo bus deliveries <subscriber> <receipt-id> accepted
87
+ ufoo bus deliveries <subscriber> <receipt-id> retry
88
+ ```
89
+
90
+ 确认接收会话已收到任务后用 `accepted`;`retry` 允许再投递一次,如果
91
+ 第一次实际成功可能产生重复。正在投递且所属进程存活的回执不能解锁。
92
+
93
+ 任务报告的各个阶段应复用同一个 `--task <id>` / MCP `task_id`。省略 ID
94
+ 时,CLI 的 progress/done/error 只关联唯一活跃任务;并行任务必须显式指定。
95
+ 报告持久化成功后才确认消费,普通 bus 回复不会把任务标为完成。
96
+ `autoResume` 默认关闭,局部保存配置不会改变其默认值。
97
+
66
98
  ## 快速开始
67
99
 
68
100
  初始化项目并打开 chat 仪表盘:
@@ -172,6 +204,17 @@ ufoo -g
172
204
  `ufoo` 打开当前项目 chat。`ufoo -g` 打开全局 chat,用于在已注册项目之间
173
205
  切换。全局 daemon 只启动一次,各项目 runtime 按需激活。
174
206
 
207
+ 默认项目主 Agent 与 `ucode` 共用可组合的 runtime,可直接读取、修改代码并执行验证,
208
+ 也可委派外部 Agent 或创建独立任务。全局入口只负责选择项目;进入项目后才获得
209
+ 编码能力。长任务在后台运行,断开 chat 不会取消任务,重连会补发运行事件。
210
+
211
+ 旧 controller 会话保留原执行路径。用 `/session new` 开始新主会话;旧会话的
212
+ provider/model 绑定不会随设置变更而切换。副作用执行期间进程崩溃后,任务会标为
213
+ interrupted,需检查实际结果后决定是否重新提交;不会自动重复文件修改、shell、
214
+ 启动或投递。相同目录的托管写操作共用锁,独立且经过验证的 git worktree 可并行。
215
+ 这些约束不构成 shell 的操作系统沙箱。实现与恢复契约见
216
+ [Agent Runtime 改造记录](AGENT_RUNTIME_REFACTOR.md)。
217
+
175
218
  ### Chat 内命令
176
219
 
177
220
  ```text
@@ -181,14 +224,50 @@ ufoo -g
181
224
  @reviewer inspect the current diff and list release risks
182
225
 
183
226
  /status
227
+ /task list
228
+ /task inspect <run-id>
229
+ /task cancel <run-id>
230
+ /answer <interaction-id> <reply>
231
+ /session show
232
+ /session new
184
233
  /settings
185
234
  /multi
235
+ /multi on
236
+ /multi off
237
+ /multi @reviewer
186
238
  /resume list
187
239
  /project list
188
240
  /project switch 2
189
241
  /open /path/to/project
190
242
  ```
191
243
 
244
+ 面板保留三种布局:仅主 agent、主 agent 加一个选中的 internal 子 agent、
245
+ 主 agent 加全部 internal 子 agent。包装器与 MCP agent 不进入面板;面板
246
+ 启动的子 agent 只使用 internal 模式,不会打开外部终端。当前文件夹没有
247
+ 聊天或输入历史时,欢迎页复用已有的紧凑 ufoo banner。
248
+ `/multi` 或 `Ctrl+T` 切换全部子 agent 布局,在单子 agent 布局中使用会展开全部。
249
+ `Ctrl+M` 打开全部子 agent 布局,再按一次仍保持打开。面板会自动请求增强键盘
250
+ 协议,需要终端能区分 Ctrl+M 与回车;传统终端中两者编码相同,回车仍用于提交,
251
+ 可继续使用 `/multi` 或 `Ctrl+T`。
252
+ `/multi @reviewer` 只打开指定 internal 子 agent。两种分屏布局中,子 agent
253
+ 获得焦点时按 `Esc` 先回到主 agent 输入栏,再按一次退出分屏;焦点已在
254
+ 主 agent 时,按 `Esc` 直接退出分屏。草稿和运行中的任务都会保留。
255
+ `Ctrl+Q` 或 `/multi off` 仍可直接退出分屏。
256
+ 回到仅主 agent 后,再按 `Esc` 不会退出应用;退出请使用 `Ctrl+C`。
257
+ `Tab` 在主 agent 和当前显示的子 agent 窗格之间循环切换输入焦点;单子 agent
258
+ 布局在这两个 agent 之间切换。所有 agent 共用底部一个输入框,随当前选中的 agent
259
+ 切换,每个 agent 的草稿独立保留。各 agent 的实时状态嵌在各自窗格底边,选中窗格
260
+ 的正文使用终端默认前景色。
261
+ 主 agent 的输入框标题使用 `main`;选择子 agent、切换焦点及子 agent 的工作状态
262
+ 不会覆盖主 agent 自己的状态。
263
+ 仅主 agent 时,`Tab` 先选中底部第一个 agent,之后依次选择下一个,末尾回到第一个;
264
+ `Esc` 返回主输入栏。仅主 agent 布局
265
+ 下,命令补全仍沿用 `Tab`。布局命令在选中 internal 子 agent 的共享输入框中
266
+ 也可以使用;切换布局会保留未发送的子 agent 输入,不会停止运行中的任务。
267
+ 子 agent 激活时,在空输入框按 `↓` 或点击底栏可进入 Agents 选择;再按 `↓`
268
+ 进入 provider 设置和 cron 控制。`Esc` 返回原 agent 的输入框,选择 agent 后按
269
+ `Enter` 打开它。也可以直接点击底栏的 provider 名称进入设置。
270
+
192
271
  `uclaude`、`ucodex`、`uagy`、`ukimi`、`ucode` 这些直接包装器仍然可用,但 ufoo 的
193
272
  主要工作流是在 chat 里完成。
194
273
 
@@ -243,9 +322,10 @@ unregister 都带上该 handle;它是所有权凭证,不应发送给其他 A
243
322
  写进 report。
244
323
 
245
324
  - **Codex App:**前台调用 MCP `wait_for_message`,传入注册所得 subscriber
246
- 和 handle,首次使用 `after_seq: 0`、`timeout_seconds: 600`。工具调用在
247
- ufoo 内保持 pending;有消息立即返回并唤醒当前任务,不依赖 shell stdout。
248
- 超时后用相同游标续挂;处理消息后,用同一 handle 和返回的 `last_seq`
325
+ 和 handle,首次使用 `after_seq: 0`、`timeout_seconds: 0`。工具调用在
326
+ 独立的 `ufoo_wait` MCP 连接中持续等待消息或调用方取消,空闲时不会周期性
327
+ 唤醒模型;有消息立即返回并唤醒当前任务,不依赖 shell stdout。
328
+ 处理消息后,用同一 handle,并以返回的 `last_seq` 作为 `through_seq`
249
329
  调用 MCP `ack_bus`,Agent 再次空闲时以该 `last_seq` 续挂。
250
330
  - **Cursor:**在 monitored background shell 中绑定 MCP subscriber,再运行
251
331
  `export UFOO_SUBSCRIBER_ID="<subscriber-id>"; exec ufoo bus poll
@@ -255,7 +335,10 @@ unregister 都带上该 handle;它是所有权凭证,不应发送给其他 A
255
335
 
256
336
  两条路径都把空闲检查留在 LLM 之外。仅有后台 PTY 输出并不能唤醒 Codex App。
257
337
 
258
- poll skill 不会由 postinstall 或 `skills install all` 安装。如果
338
+ poll skill 不会由 postinstall 或 `skills install all` 首次安装。postinstall
339
+ 只更新确认归 ufoo 管理的符号链接,保留用户目录、文件和外部链接;手动安装
340
+ 会把原内容保存在旁边的 `.backup-*` 路径。`skills install all` 可更新已安装
341
+ 的可选技能。如果
259
342
  `UFOO_SUBSCRIBER_ID` 在 Agent 启动时的继承环境中已经存在,包装器托管的
260
343
  Agent 就跳过 MCP 注册和外部等待;之后在 Cursor 监听 terminal 中导出的值
261
344
  不会重新触发这次分类。接收链路由宿主 App 的能力决定,与外部 Agent 叫
@@ -318,6 +401,14 @@ ufoo online inbox builder --unread
318
401
  默认公开服务地址是 `https://online.ufoo.dev`。本地开发可以用
319
402
  `ufoo online server` 启动自己的 relay。
320
403
 
404
+ Internal Codex、Claude Code 和 ucode 窗格复用独立 ucode TUI 的内容渲染,共用底部一个多行输入框。
405
+ 提交后立即显示 loading;等待、思考、生成、工具执行、等待用户、失败、运行计时、
406
+ 上下文用量和计划进度随当前 agent 的真实事件变化。provider 提供的重试、上下文压缩
407
+ 和后台任务事件也接入同一状态层。
408
+ 文本、思考和工具结果随 provider 事件刷新;在选中的窗格按 Ctrl+O 可展开最近的思考或工具块。
409
+ 显示事件独立于 agent 收件箱,agent 之间派发的任务也能显示,且不会唤醒主 agent。
410
+ 切换单主窗格、激活子窗格和全部子窗格时,保留输出与输入草稿。
411
+
321
412
  ### 原生 ucode 运行时
322
413
 
323
414
  ```bash
@@ -350,13 +441,16 @@ ufoo ucode build
350
441
  "routerProvider": "",
351
442
  "routerModel": "",
352
443
  "agentModel": "",
353
- "autoResume": true
444
+ "autoResume": false
354
445
  }
355
446
  ```
356
447
 
357
448
  `launchMode` 支持 `auto`、`internal`、`tmux`、`terminal`、`host`。
358
449
  `controllerMode` 支持 `main`、`shadow`、`loop` 和 legacy 兼容值。
359
450
 
451
+ 普通 provider 会话通过各自的凭据适配器认证;MCP `agent_handle` 不用于模型请求。
452
+ 只有选择 `agentProvider=ucode` 才使用下列 ucode 网关设置。
453
+
360
454
  全局 `ucode` 配置:
361
455
 
362
456
  ```json
@@ -379,8 +473,8 @@ src/
379
473
  runtime/ daemon、projects、terminal adapters、contracts、privacy、process helpers
380
474
  coordination/ bus、context、memory、history、reports、state、status
381
475
  orchestration/ router/controller logic、groups、solo roles
382
- agents/ launchers、providers、prompts、internal runner、activity、controller
383
- code/ 原生 ucode runtime、launcher、skills、file/shell tools
476
+ agents/ shared runtime、capabilities、profiles、providers、launchers、prompts
477
+ code/ 原生 ucode host、launcher、skills、file/shell tools
384
478
  tools/ shared controller/worker tool registry 和 handlers
385
479
  online/ relay client/server/runner/token helpers
386
480
  ```
@@ -392,6 +486,7 @@ src/
392
486
 
393
487
  ```bash
394
488
  npm install
489
+ npm run pack:tui
395
490
  npm link
396
491
  node bin/ufoo.js --help
397
492
  npm test
@@ -37,7 +37,13 @@ capabilities from the Agent type or subscriber prefix.
37
37
 
38
38
  In the sections below, `<subscriber-id>` means the wrapper-provided
39
39
  `UFOO_SUBSCRIBER_ID` or the subscriber returned by MCP. `<agent-handle>` means
40
- the opaque capability returned with an external MCP registration.
40
+ the opaque capability returned with an external MCP registration or supplied
41
+ as `UFOO_AGENT_HANDLE` by a current wrapper. When MCP and a handle are available,
42
+ both launch modes prefer `dispatch_message`, `ack_bus`, and
43
+ `report_agent_status` with their existing identity. The CLI examples below are
44
+ the compatibility fallback. Never expose the handle in messages or reports.
45
+ Managed identities must not call MCP `wait_for_message`,
46
+ `publish_activity_state`, or `unregister_agent`; the wrapper owns those duties.
41
47
 
42
48
  ## Synchronize workspace state
43
49
 
@@ -77,11 +83,17 @@ For each received bus task:
77
83
  uses:
78
84
 
79
85
  ```bash
80
- ufoo report done "<summary>" --agent "<subscriber-id>"
86
+ ufoo report done "<summary>" --task "<delegated-task-id>" --agent "<subscriber-id>"
81
87
  ```
82
88
 
83
89
  An external Agent calls MCP `report_agent_status` with the same subscriber
84
- and handle.
90
+ and handle, plus the exact delegated `task_id`. Reuse that task ID for
91
+ start/progress/done/error; do not invent another ID or infer it from the
92
+ newest conversation. `done` reports execution completion; the parent
93
+ separately validates and accepts the result. Retain the delegation’s
94
+ requested scope and controller: private controller work uses
95
+ `--scope private --controller ufoo-agent`, or the corresponding MCP fields.
96
+
85
97
  After sending or broadcasting, continue the current task. Do not start an
86
98
  ad-hoc check or poll, sleep, or wait for a reply. A wrapper-managed Agent
87
99
  receives follow-ups by direct injection; an external Agent leaves its existing
@@ -43,6 +43,15 @@ signal. Evaluate it before creating or mutating helper terminals:
43
43
  Never choose a delivery mode from an Agent type such as `codex`, `cursor`, or
44
44
  `claude-code`. Agents do not self-register with bare `ufoo bus join`.
45
45
 
46
+ Both launch modes share the MCP cooperation tools. When a wrapper supplies
47
+ `UFOO_AGENT_HANDLE` and MCP is available, prefer `dispatch_message`, `ack_bus`,
48
+ and `report_agent_status` with the project root, inherited subscriber, and
49
+ handle. Keep the handle private and out of messages, reports, and environment
50
+ dumps. The CLI examples below are the fallback for older wrappers or hosts
51
+ without those MCP tools. The wrapper retains receive, activity, and shutdown
52
+ ownership: never call `wait_for_message`, `publish_activity_state`, or
53
+ `unregister_agent` for a wrapper-managed identity.
54
+
46
55
  ## Handle pending messages
47
56
 
48
57
  If a wrapper-managed Agent was explicitly asked for a manual inbox check, run:
@@ -103,6 +112,10 @@ creating a CLI-side identity.
103
112
 
104
113
  Target resolution order is exact ID, nickname, agent type, then `*`.
105
114
 
115
+ A successful send confirms that the message is durably queued. It does not
116
+ confirm delivery or processing; `delivery_status` is `queued` and `delivered`
117
+ is zero until a later delivery step has independent evidence.
118
+
106
119
  After sending or broadcasting, continue the current task. Do not run
107
120
  `ufoo bus check`, start another poll, sleep, or wait for a reply.
108
121
  Wrapper-managed Agents receive follow-ups by direct injection; external Agents
@@ -135,7 +148,14 @@ ufoo report done "<summary>" --task <id> --agent "<subscriber-id>"
135
148
  ufoo report error "<reason>" --task <id> --agent "<subscriber-id>"
136
149
  ```
137
150
 
138
- Use `--scope private` only for helper-internal reports.
151
+ Use `--scope private` for helper-internal reports and when a controller
152
+ delegation requests private scope; retain its `--controller` / `controller_id`.
139
153
 
140
154
  An external Agent calls MCP `report_agent_status` with `project_root`,
141
155
  `subscriber`, `agent_handle`, the task id, phase, and summary.
156
+
157
+ A delegation contains a controller-assigned task ID. Reuse that exact ID in all
158
+ reports; it binds the worker result to its parent task. Ordinary replies and
159
+ queued/delivered receipts do not complete or accept the task. The parent checks
160
+ validation evidence before accepting a reported result. Worker reports cannot
161
+ change project roots or grant controller permissions.
package/bin/uclaude.js CHANGED
@@ -14,6 +14,10 @@ function extractUfooParamsFromArgs(args = []) {
14
14
  let role = "";
15
15
  for (let i = 0; i < args.length; i += 1) {
16
16
  const arg = String(args[i] || "");
17
+ if (arg === "--native-messages" || arg === "--no-native-messages") {
18
+ process.env.UFOO_NATIVE_MESSAGES = arg === "--native-messages" ? "1" : "0";
19
+ continue;
20
+ }
17
21
  if (arg === "--nickname") {
18
22
  if (i + 1 < args.length) {
19
23
  nickname = String(args[i + 1]).trim();
package/bin/ucodex.js CHANGED
@@ -14,6 +14,10 @@ function extractUfooParamsFromArgs(args = []) {
14
14
  let role = "";
15
15
  for (let i = 0; i < args.length; i += 1) {
16
16
  const arg = String(args[i] || "");
17
+ if (arg === "--native-messages" || arg === "--no-native-messages") {
18
+ process.env.UFOO_NATIVE_MESSAGES = arg === "--native-messages" ? "1" : "0";
19
+ continue;
20
+ }
17
21
  if (arg === "--nickname") {
18
22
  if (i + 1 < args.length) {
19
23
  nickname = String(args[i + 1]).trim();
package/bin/ufoo.js CHANGED
@@ -14,7 +14,7 @@ function hasGlobalModeFlag(args = []) {
14
14
  }
15
15
 
16
16
  function printMcpHelp() {
17
- console.log("Usage: ufoo mcp [status|restart|configure codex] [options]");
17
+ console.log("Usage: ufoo mcp [status|restart|configure codex|channel] [options]");
18
18
  console.log("");
19
19
  console.log("Run the stdio compatibility proxy or control the global MCP listener.");
20
20
  console.log("");
@@ -59,6 +59,8 @@ async function main() {
59
59
  } else if (operation === "configure") {
60
60
  const { runMcpConfigureCli } = require("../src/runtime/daemon/mcpConfigure");
61
61
  runMcpConfigureCli(argv[2], { dryRun: argv.includes("--dry-run") });
62
+ } else if (operation === "channel") {
63
+ await require("../src/runtime/daemon/claudeChannel").runClaudeChannel();
62
64
  } else {
63
65
  await runMcpServer({
64
66
  autoStart: !argv.includes("--no-auto-start"),
Binary file
Binary file
Binary file