u-foo 3.0.17 → 3.0.18
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/OPTIONAL_SKILLS/ufoo-bus-poll/SKILL.md +16 -7
- package/README.md +17 -13
- package/README.zh-CN.md +15 -12
- package/SKILLS/ufoo/SKILL.md +8 -4
- package/SKILLS/ufoo-bus/SKILL.md +14 -9
- package/package.json +1 -1
- package/src/agents/prompts/groupBootstrap.js +1 -1
- package/src/agents/prompts/native/ufoo.js +1 -1
- package/src/code/UCODE_PROMPT.md +1 -1
|
@@ -26,13 +26,14 @@ the host's maximum pending-call window ends.
|
|
|
26
26
|
|
|
27
27
|
## Attach the subscriber
|
|
28
28
|
|
|
29
|
-
1. Inspect
|
|
29
|
+
1. Inspect the host Agent's inherited `UFOO_SUBSCRIBER_ID` before starting or
|
|
30
|
+
mutating any helper terminal. If it is nonempty, stop this workflow: the
|
|
30
31
|
ufoo wrapper already registered the Agent and direct injection is its receive
|
|
31
32
|
path. Do not call MCP `register_agent` or arm a poll.
|
|
32
33
|
2. When the variable is absent, reuse the exact subscriber already returned to
|
|
33
34
|
this session by MCP `register_agent`, or call `register_agent` once. Do not
|
|
34
|
-
call bare `ufoo bus join
|
|
35
|
-
|
|
35
|
+
call bare `ufoo bus join` or borrow another subscriber. Keep the returned
|
|
36
|
+
value as the external Agent's identity.
|
|
36
37
|
3. Select the receive mechanism from the host App's actual wake capability,
|
|
37
38
|
never from Agent type:
|
|
38
39
|
|
|
@@ -44,8 +45,9 @@ the host's maximum pending-call window ends.
|
|
|
44
45
|
|
|
45
46
|
Agent type and subscriber prefix are not capability signals. An externally
|
|
46
47
|
hosted MCP subscriber named `codex:*`, `claude-code:*`, or any other type is
|
|
47
|
-
eligible because the
|
|
48
|
-
delivery mode.
|
|
48
|
+
eligible because the Agent's inherited environment—not its name—selected this
|
|
49
|
+
delivery mode. A variable exported later inside a dedicated helper terminal
|
|
50
|
+
does not reclassify the host Agent as wrapper-managed.
|
|
49
51
|
|
|
50
52
|
## Use Codex App pending MCP wait
|
|
51
53
|
|
|
@@ -80,14 +82,21 @@ Never run two pending waits for the same subscriber.
|
|
|
80
82
|
1. Check for an existing `ufoo bus poll ... --follow` process for the literal
|
|
81
83
|
MCP subscriber. Keep one healthy process; the CLI rejects a duplicate
|
|
82
84
|
receive lease.
|
|
83
|
-
2. Start this command through Cursor's monitored background shell
|
|
85
|
+
2. Start this command through Cursor's monitored background shell. Bind the
|
|
86
|
+
MCP-returned subscriber inside that dedicated terminal, then launch the
|
|
87
|
+
resident poll:
|
|
84
88
|
|
|
85
89
|
```bash
|
|
86
|
-
|
|
90
|
+
export UFOO_SUBSCRIBER_ID="<mcp-subscriber-id>"
|
|
91
|
+
exec ufoo bus poll "$UFOO_SUBSCRIBER_ID" --follow --interval 30
|
|
87
92
|
```
|
|
88
93
|
|
|
89
94
|
Use `30` seconds by default; accept `15`–`120` when the user requests a
|
|
90
95
|
different latency. Do not use `nohup`, shell `&`, or an OS-detached daemon.
|
|
96
|
+
This terminal-local export gives its CLI commands a stable sender/subscriber
|
|
97
|
+
identity. It must happen only after the host Agent was classified as
|
|
98
|
+
external and registered through MCP; it is not evidence of wrapper launch
|
|
99
|
+
or direct-injection support.
|
|
91
100
|
3. Start the monitored task with
|
|
92
101
|
`block_until_ms: 0`.
|
|
93
102
|
4. Configure `notify_on_output` with:
|
package/README.md
CHANGED
|
@@ -130,8 +130,8 @@ ufoo mcp
|
|
|
130
130
|
|
|
131
131
|
### Agent Delivery Modes
|
|
132
132
|
|
|
133
|
-
ufoo supports two Agent delivery modes, selected only
|
|
134
|
-
`UFOO_SUBSCRIBER_ID
|
|
133
|
+
ufoo supports two Agent delivery modes, selected only from the host Agent's
|
|
134
|
+
inherited `UFOO_SUBSCRIBER_ID` before any helper terminal is started:
|
|
135
135
|
|
|
136
136
|
- Wrapper-managed Agents start through `ucodex`, `uclaude`, `uagy`, `ukimi`, or
|
|
137
137
|
`ucode`. The wrapper provides `UFOO_SUBSCRIBER_ID`; ufoo monitors the shell
|
|
@@ -145,9 +145,11 @@ ufoo supports two Agent delivery modes, selected only by the presence of
|
|
|
145
145
|
`ufoo bus poll --follow` background output with `notify_on_output`.
|
|
146
146
|
|
|
147
147
|
Agent type names and subscriber prefixes are routing metadata, not capability
|
|
148
|
-
signals.
|
|
149
|
-
|
|
150
|
-
|
|
148
|
+
signals. After an external Cursor Agent registers through MCP, its dedicated
|
|
149
|
+
listener terminal may export the returned subscriber as
|
|
150
|
+
`UFOO_SUBSCRIBER_ID` so CLI operations share one identity. That child-shell
|
|
151
|
+
binding does not alter the host Agent's already selected external mode and is
|
|
152
|
+
not evidence of wrapper injection.
|
|
151
153
|
|
|
152
154
|
Chat is a UI client. The daemon owns project runtime state. Agents communicate
|
|
153
155
|
through bus queues, prompt injection, shared memory, reports, and tool handlers
|
|
@@ -235,8 +237,7 @@ ufoo skills list --optional
|
|
|
235
237
|
ufoo skills install ufoo-bus-poll --target /path/to/that/agent/skills
|
|
236
238
|
```
|
|
237
239
|
|
|
238
|
-
Register once through MCP `register_agent
|
|
239
|
-
do not export it as `UFOO_SUBSCRIBER_ID`.
|
|
240
|
+
Register once through MCP `register_agent` and retain its returned subscriber.
|
|
240
241
|
|
|
241
242
|
- **Codex App:** call MCP `wait_for_message` in the foreground with
|
|
242
243
|
`after_seq: 0` and `timeout_seconds: 600`. The tool call stays pending inside
|
|
@@ -244,8 +245,9 @@ do not export it as `UFOO_SUBSCRIBER_ID`.
|
|
|
244
245
|
On timeout, re-arm with the same cursor. After handling a message response,
|
|
245
246
|
call MCP `ack_bus` with its `last_seq` as `through_seq`, then re-arm with that
|
|
246
247
|
`last_seq` when the Agent is idle again.
|
|
247
|
-
- **Cursor:** run
|
|
248
|
-
`
|
|
248
|
+
- **Cursor:** bind the MCP subscriber and run
|
|
249
|
+
`export UFOO_SUBSCRIBER_ID="<subscriber-id>"; exec ufoo bus poll
|
|
250
|
+
"$UFOO_SUBSCRIBER_ID" --follow --interval 30` through the monitored
|
|
249
251
|
background shell with `block_until_ms: 0`, and configure
|
|
250
252
|
`notify_on_output` to match `\[ufoo\]`. Startup and empty intervals are
|
|
251
253
|
silent; only ufoo-delivered messages wake the model.
|
|
@@ -254,10 +256,12 @@ Both paths keep idle queue checks outside the LLM. A background PTY alone is
|
|
|
254
256
|
not a wake mechanism in Codex App.
|
|
255
257
|
|
|
256
258
|
The poll skill is not installed by postinstall or `skills install all`.
|
|
257
|
-
Wrapper-managed Agents skip MCP registration and external waiting
|
|
258
|
-
`UFOO_SUBSCRIBER_ID`
|
|
259
|
-
|
|
260
|
-
|
|
259
|
+
Wrapper-managed Agents skip MCP registration and external waiting when
|
|
260
|
+
`UFOO_SUBSCRIBER_ID` was present in the Agent's inherited launch environment.
|
|
261
|
+
A value exported later inside a Cursor listener terminal does not rerun this
|
|
262
|
+
classification. Receive-path selection depends on host App capabilities, never
|
|
263
|
+
on whether the external Agent calls itself Codex, Claude, Cursor, or another
|
|
264
|
+
type.
|
|
261
265
|
|
|
262
266
|
### Context, Memory, History, Reports
|
|
263
267
|
|
package/README.zh-CN.md
CHANGED
|
@@ -127,7 +127,8 @@ ufoo mcp
|
|
|
127
127
|
|
|
128
128
|
### Agent 消息投递模式
|
|
129
129
|
|
|
130
|
-
ufoo 支持两种 Agent
|
|
130
|
+
ufoo 支持两种 Agent 投递模式,只根据启动辅助 terminal 之前,宿主 Agent
|
|
131
|
+
继承的 `UFOO_SUBSCRIBER_ID` 是否存在来选择:
|
|
131
132
|
|
|
132
133
|
- 包装器托管的 Agent 通过 `ucodex`、`uclaude`、`uagy`、`ukimi` 或 `ucode`
|
|
133
134
|
启动。包装器会提供 `UFOO_SUBSCRIBER_ID`;ufoo 能监控其 shell 活动并定位
|
|
@@ -138,9 +139,10 @@ ufoo 支持两种 Agent 投递模式,只根据 `UFOO_SUBSCRIBER_ID` 是否存
|
|
|
138
139
|
无 token 等待方式:Codex App 挂起 MCP `wait_for_message`,Cursor 则用
|
|
139
140
|
`notify_on_output` 监控 `ufoo bus poll --follow` 的后台输出。
|
|
140
141
|
|
|
141
|
-
Agent 类型名和 subscriber 前缀只是路由元数据,不是能力判断条件。外部
|
|
142
|
-
|
|
143
|
-
|
|
142
|
+
Agent 类型名和 subscriber 前缀只是路由元数据,不是能力判断条件。外部
|
|
143
|
+
Cursor Agent 通过 MCP 注册后,可以在专用监听 terminal 内把返回的
|
|
144
|
+
subscriber 导出为 `UFOO_SUBSCRIBER_ID`,让 CLI 操作复用同一身份。这个
|
|
145
|
+
子 shell 绑定不会改变宿主 Agent 已选择的外部模式,也不代表支持包装器注入。
|
|
144
146
|
|
|
145
147
|
Chat 是 UI client。daemon 拥有项目运行态。Agent 通过 bus queue、prompt
|
|
146
148
|
injection、shared memory、report 和 tool handler 协作,而不是直接依赖
|
|
@@ -223,25 +225,26 @@ ufoo skills list --optional
|
|
|
223
225
|
ufoo skills install ufoo-bus-poll --target /path/to/that/agent/skills
|
|
224
226
|
```
|
|
225
227
|
|
|
226
|
-
先通过 MCP `register_agent` 注册一次并保留返回的 subscriber
|
|
227
|
-
导出成 `UFOO_SUBSCRIBER_ID`。
|
|
228
|
+
先通过 MCP `register_agent` 注册一次并保留返回的 subscriber。
|
|
228
229
|
|
|
229
230
|
- **Codex App:**前台调用 MCP `wait_for_message`,首次使用
|
|
230
231
|
`after_seq: 0`、`timeout_seconds: 600`。工具调用在 ufoo 内保持 pending;
|
|
231
232
|
有消息立即返回并唤醒当前任务,不依赖 shell stdout。超时后用相同游标续挂;
|
|
232
233
|
处理消息后,用返回的 `last_seq` 作为 MCP `ack_bus.through_seq`,Agent
|
|
233
234
|
再次空闲时以该 `last_seq` 续挂。
|
|
234
|
-
- **Cursor
|
|
235
|
-
`
|
|
235
|
+
- **Cursor:**在 monitored background shell 中绑定 MCP subscriber,再运行
|
|
236
|
+
`export UFOO_SUBSCRIBER_ID="<subscriber-id>"; exec ufoo bus poll
|
|
237
|
+
"$UFOO_SUBSCRIBER_ID" --follow --interval 30`,设置
|
|
236
238
|
`block_until_ms: 0`,并让 `notify_on_output` 匹配 `\[ufoo\]`。启动和
|
|
237
239
|
空轮询保持静默,只有 ufoo 投递消息会唤醒模型。
|
|
238
240
|
|
|
239
241
|
两条路径都把空闲检查留在 LLM 之外。仅有后台 PTY 输出并不能唤醒 Codex App。
|
|
240
242
|
|
|
241
|
-
poll skill 不会由 postinstall 或 `skills install all`
|
|
242
|
-
`UFOO_SUBSCRIBER_ID
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
poll skill 不会由 postinstall 或 `skills install all` 安装。如果
|
|
244
|
+
`UFOO_SUBSCRIBER_ID` 在 Agent 启动时的继承环境中已经存在,包装器托管的
|
|
245
|
+
Agent 就跳过 MCP 注册和外部等待;之后在 Cursor 监听 terminal 中导出的值
|
|
246
|
+
不会重新触发这次分类。接收链路由宿主 App 的能力决定,与外部 Agent 叫
|
|
247
|
+
Codex、Claude、Cursor 或其他类型无关。
|
|
245
248
|
|
|
246
249
|
### Context、Memory、History、Report
|
|
247
250
|
|
package/SKILLS/ufoo/SKILL.md
CHANGED
|
@@ -14,7 +14,8 @@ Apply the unified workspace protocol. Use `$ufoo-bus`, `$ufoo-context`, or
|
|
|
14
14
|
|
|
15
15
|
## Resolve the bus delivery mode
|
|
16
16
|
|
|
17
|
-
Use the
|
|
17
|
+
Use the host Agent's inherited launch environment as the only delivery-mode
|
|
18
|
+
signal. Evaluate it before creating or mutating helper terminals. Do not infer
|
|
18
19
|
capabilities from the Agent type or subscriber prefix.
|
|
19
20
|
|
|
20
21
|
- If `UFOO_SUBSCRIBER_ID` is nonempty, the Agent was started by a ufoo wrapper
|
|
@@ -24,9 +25,12 @@ capabilities from the Agent type or subscriber prefix.
|
|
|
24
25
|
- If `UFOO_SUBSCRIBER_ID` is absent, the Agent is externally hosted. Reuse the
|
|
25
26
|
subscriber already returned to this session by MCP `register_agent`, or call
|
|
26
27
|
`register_agent` once if none exists. Keep that returned subscriber as the
|
|
27
|
-
session identity
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
session identity and invoke `$ufoo-bus-poll` to establish the receive path
|
|
29
|
+
using this host App's own no-token wait and self-wake primitive. A
|
|
30
|
+
Cursor-style dedicated listener terminal may export the returned value as
|
|
31
|
+
`UFOO_SUBSCRIBER_ID` after registration so its CLI commands share the
|
|
32
|
+
identity. That helper-local export does not change the already selected
|
|
33
|
+
external delivery mode and must not be treated as wrapper evidence.
|
|
30
34
|
|
|
31
35
|
In the sections below, `<subscriber-id>` means the wrapper-provided
|
|
32
36
|
`UFOO_SUBSCRIBER_ID` or the subscriber returned by MCP, according to this
|
package/SKILLS/ufoo-bus/SKILL.md
CHANGED
|
@@ -21,7 +21,8 @@ Verify `.ufoo/bus/` exists. If it does not, initialize it:
|
|
|
21
21
|
ufoo init --targets bus --project "$(pwd)"
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
Use `UFOO_SUBSCRIBER_ID` as the only delivery-mode
|
|
24
|
+
Use the host Agent's inherited `UFOO_SUBSCRIBER_ID` as the only delivery-mode
|
|
25
|
+
signal. Evaluate it before creating or mutating helper terminals:
|
|
25
26
|
|
|
26
27
|
- Nonempty: this is a wrapper-managed Agent. The wrapper already registered
|
|
27
28
|
the subscriber and the daemon can inject into its monitored shell. Reuse the
|
|
@@ -29,9 +30,12 @@ Use `UFOO_SUBSCRIBER_ID` as the only delivery-mode signal:
|
|
|
29
30
|
polling.
|
|
30
31
|
- Absent: this is an externally hosted Agent. Reuse this session's
|
|
31
32
|
MCP-registered subscriber or call MCP `register_agent` exactly once. Keep the
|
|
32
|
-
returned value as `<subscriber-id>` for later MCP and CLI operations
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
returned value as `<subscriber-id>` for later MCP and CLI operations. Invoke
|
|
34
|
+
`$ufoo-bus-poll` once at session start to select the receive path supported
|
|
35
|
+
by the host App. That skill may bind the subscriber as
|
|
36
|
+
`UFOO_SUBSCRIBER_ID` inside a dedicated Cursor listener terminal after MCP
|
|
37
|
+
registration. Never use that helper-local value to reclassify the host as
|
|
38
|
+
wrapper-managed.
|
|
35
39
|
|
|
36
40
|
Never choose a delivery mode from an Agent type such as `codex`, `cursor`, or
|
|
37
41
|
`claude-code`. Agents do not self-register with bare `ufoo bus join`.
|
|
@@ -101,11 +105,12 @@ keep their App-specific receive wait armed when idle.
|
|
|
101
105
|
|
|
102
106
|
## Delegate resident watching
|
|
103
107
|
|
|
104
|
-
For an externally hosted Agent
|
|
105
|
-
`$ufoo-bus-poll` at session start and follow it
|
|
106
|
-
receive path, not an Agent-type fallback. That
|
|
107
|
-
`wait_for_message` for Codex App or monitored
|
|
108
|
-
Never invoke it when the
|
|
108
|
+
For an externally hosted Agent whose inherited launch environment had no
|
|
109
|
+
`UFOO_SUBSCRIBER_ID`, invoke `$ufoo-bus-poll` at session start and follow it
|
|
110
|
+
end-to-end. This is its normal receive path, not an Agent-type fallback. That
|
|
111
|
+
skill selects pending MCP `wait_for_message` for Codex App or monitored
|
|
112
|
+
background stdout for Cursor. Never invoke it when the variable was already
|
|
113
|
+
present before helper-terminal setup.
|
|
109
114
|
|
|
110
115
|
Do not implement a timer, tick, sleep/check loop, or second resident mechanism
|
|
111
116
|
in this skill. Do not arm resident watching merely because a message was sent
|
package/package.json
CHANGED
|
@@ -38,7 +38,7 @@ const SHARED_UFOO_PROTOCOL = [
|
|
|
38
38
|
"coordination — never for greetings, acknowledgments, or emoji alone.",
|
|
39
39
|
"Those create reply loops between agents.",
|
|
40
40
|
"",
|
|
41
|
-
"A nonempty `UFOO_SUBSCRIBER_ID` means the ufoo wrapper/daemon already",
|
|
41
|
+
"A nonempty `UFOO_SUBSCRIBER_ID` in this Agent's inherited launch environment means the ufoo wrapper/daemon already",
|
|
42
42
|
"registered this Agent and can inject into its monitored session. Reuse that",
|
|
43
43
|
"identity; never call MCP `register_agent`, run bare `ufoo bus join`, or",
|
|
44
44
|
"start resident `ufoo bus poll`.",
|
|
@@ -9,7 +9,7 @@ Participate in multi-agent coordination through the ufoo bus/context system:
|
|
|
9
9
|
- Use shared memory for durable project facts. Read existing memory before writing new memory; do not use it for transient task state.
|
|
10
10
|
- Support launch/close/resume/inject flows managed by ufoo daemon.
|
|
11
11
|
- Prefer canonical ufoo commands (\`ufoo ctx\`, \`ufoo bus\`, \`ufoo memory\`, \`ufoo report\`) for coordination and status sync.
|
|
12
|
-
- A nonempty \`UFOO_SUBSCRIBER_ID\` means the ufoo wrapper/daemon already registered this Agent and can inject directly into its monitored session. Reuse that identity; never call MCP \`register_agent\`, run bare \`ufoo bus join\`, or start resident \`ufoo bus poll\`.
|
|
12
|
+
- A nonempty \`UFOO_SUBSCRIBER_ID\` in this Agent's inherited launch environment means the ufoo wrapper/daemon already registered this Agent and can inject directly into its monitored session. Reuse that identity; never call MCP \`register_agent\`, run bare \`ufoo bus join\`, or start resident \`ufoo bus poll\`.
|
|
13
13
|
- After sending a bus message, do not poll \`ufoo bus check\`, invoke \`/ubus\`, sleep, or wait for a reply. Continue the current task; any follow-up message will be automatically injected into your prompt/session.
|
|
14
14
|
|
|
15
15
|
Execution protocol:
|
package/src/code/UCODE_PROMPT.md
CHANGED
|
@@ -17,7 +17,7 @@ ufoo integration requirements:
|
|
|
17
17
|
- Use shared memory for durable project facts. Read existing memory before writing new memory; do not use it for transient task state.
|
|
18
18
|
- Support launch/close/resume/inject flows managed by ufoo daemon.
|
|
19
19
|
- Prefer canonical ufoo commands (`ufoo ctx`, `ufoo bus`, `ufoo memory`, `ufoo report`) for coordination and status sync.
|
|
20
|
-
- A nonempty `UFOO_SUBSCRIBER_ID` means the ufoo wrapper/daemon already registered this Agent and can inject directly into its monitored session. Reuse that identity; never call MCP `register_agent`, run bare `ufoo bus join`, or start resident `ufoo bus poll`.
|
|
20
|
+
- A nonempty `UFOO_SUBSCRIBER_ID` in this Agent's inherited launch environment means the ufoo wrapper/daemon already registered this Agent and can inject directly into its monitored session. Reuse that identity; never call MCP `register_agent`, run bare `ufoo bus join`, or start resident `ufoo bus poll`.
|
|
21
21
|
- After sending a bus message, do not poll `ufoo bus check`, invoke `/ubus`, sleep, or wait for a reply. Continue the current task; any follow-up message will be automatically injected into your prompt/session.
|
|
22
22
|
|
|
23
23
|
Execution protocol:
|