u-foo 3.0.15 → 3.0.16

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.
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: ufoo-bus-poll
3
+ description: >-
4
+ Stream pending ufoo bus messages through a resident background task for an
5
+ MCP-registered or externally provisioned agent whose host cannot receive
6
+ automatic ufoo prompt injection. Use only with a host that forwards streaming
7
+ background-task output into the agent session; do not use for Codex CLI,
8
+ Claude Code CLI, Agy, Kimi, or native ucode.
9
+ ---
10
+
11
+ # ufoo bus poll
12
+
13
+ Attach one provisioned external subscriber to a host-managed background stream.
14
+ Keep the stream queue-read-only so the agent controls acknowledgement.
15
+
16
+ ## Attach the registered subscriber
17
+
18
+ 1. Reuse the exact subscriber returned by MCP `register_agent` or supplied by
19
+ the host. Never create a second identity for the stream, call bare
20
+ `ufoo bus join`, guess an agent type, or borrow another workspace subscriber.
21
+ 2. Start exactly one streaming background task for that subscriber:
22
+
23
+ ```bash
24
+ ufoo bus poll "<subscriber-id>" --follow --interval 2
25
+ ```
26
+
27
+ 3. Keep the command owned by the host's streaming background-task facility.
28
+ Do not use `nohup`, shell `&`, or an OS-detached daemon; those routes can
29
+ write output somewhere the agent never receives.
30
+
31
+ The command rejects a second resident poll for the same subscriber. It emits
32
+ the current pending batch, waits for that batch to be acknowledged, then emits
33
+ the next batch. It never acknowledges, claims, injects, or clears messages.
34
+
35
+ ## Handle stream batches
36
+
37
+ For every `[ufoo]<from:...>` event:
38
+
39
+ 1. Read `Content.message` and execute actionable work.
40
+ 2. After handling the emitted batch, run the exact acknowledgement command
41
+ printed by the stream:
42
+
43
+ ```bash
44
+ ufoo bus ack "<subscriber-id>" --through <seq>
45
+ ```
46
+
47
+ Preserve `--through`; it keeps later messages pending.
48
+ 3. Reply only with a requested result, answer, blocker, or fact the sender
49
+ needs:
50
+
51
+ ```bash
52
+ ufoo bus send "<sender-id>" "<substantive result>"
53
+ ```
54
+
55
+ Do not reply to greetings, thanks, or acknowledgement-only messages. After
56
+ sending, continue the current task; do not start another poll, sleep, or wait.
57
+ The resident stream delivers follow-up output.
58
+
59
+ If the host cannot forward incremental output from a still-running task, stop
60
+ this workflow and use an explicitly invoked `$ufoo-bus` inbox check instead.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "ufoo bus poll"
3
+ short_description: "Stream ufoo bus messages for non-injectable agents"
4
+ default_prompt: "Use $ufoo-bus-poll to attach this MCP-registered agent to its resident ufoo bus stream."
package/README.md CHANGED
@@ -209,11 +209,12 @@ queue-read-only bus stream:
209
209
 
210
210
  ```bash
211
211
  ufoo skills list --optional
212
- ufoo skills install ubus-poll --target /path/to/that/agent/skills
213
- ufoo bus poll "$UFOO_SUBSCRIBER_ID" --follow --interval 2
212
+ ufoo skills install ufoo-bus-poll --target /path/to/that/agent/skills
213
+ ufoo bus poll "<subscriber-id>" --follow --interval 2
214
214
  ```
215
215
 
216
- Run the final command through that host's streaming background-task facility.
216
+ Use the subscriber returned by MCP `register_agent` or provisioned by the host,
217
+ then run the final command through that host's streaming background-task facility.
217
218
  It prints newly observed pending events but never claims or acknowledges them;
218
219
  the agent runs the printed `ufoo bus ack --through <seq>` command only after
219
220
  handling the emitted batch, preserving later arrivals. The fallback is not
package/README.zh-CN.md CHANGED
@@ -202,11 +202,12 @@ bus 消息流:
202
202
 
203
203
  ```bash
204
204
  ufoo skills list --optional
205
- ufoo skills install ubus-poll --target /path/to/that/agent/skills
206
- ufoo bus poll "$UFOO_SUBSCRIBER_ID" --follow --interval 2
205
+ ufoo skills install ufoo-bus-poll --target /path/to/that/agent/skills
206
+ ufoo bus poll "<subscriber-id>" --follow --interval 2
207
207
  ```
208
208
 
209
- 最后一条命令必须由该 host 的流式后台任务能力托管。它只输出新观察到的
209
+ 使用 MCP `register_agent` 返回或由 host 预配的 subscriber,并由该 host 的
210
+ 流式后台任务能力托管最后一条命令。它只输出新观察到的
210
211
  pending event,不 claim、不 ack;Agent 处理完输出批次后,再执行输出中
211
212
  给出的 `ufoo bus ack --through <seq>`,以保留稍后到达的消息。
212
213
  这个 fallback 不会被 postinstall 或 `skills install all` 安装,而且
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "u-foo",
3
- "version": "3.0.15",
3
+ "version": "3.0.16",
4
4
  "description": "Multi-Agent Workspace Protocol. Just add u. claude → uclaude, codex → ucodex.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://ufoo.dev",
@@ -1,76 +0,0 @@
1
- ---
2
- name: ubus-poll
3
- description: |
4
- Explicitly start a resident ufoo bus stream in an agent host that has been
5
- configured to deliver streaming background-task output. Install by name only.
6
- ---
7
-
8
- # /ubus-poll - Resident Bus Stream
9
-
10
- This is an opt-in session-start skill. Run it only in a host where a human has
11
- configured this fallback. Do not install or invoke it for Codex CLI, Claude
12
- Code CLI, Agy, Kimi, or native ucode; those runtimes already have their own
13
- ufoo delivery path.
14
-
15
- ## Start once per agent session
16
-
17
- Reuse the provisioned subscriber identity. Never create a second identity just
18
- for the poll process.
19
-
20
- ```bash
21
- SUBSCRIBER="${UFOO_SUBSCRIBER_ID:-}"
22
- test -n "$SUBSCRIBER" || {
23
- echo "ubus-poll requires a provisioned UFOO_SUBSCRIBER_ID"
24
- exit 1
25
- }
26
- ```
27
-
28
- Identity provisioning is a host/human setup step. Do not guess an agent type,
29
- call bare `ufoo bus join`, or borrow the workspace's current subscriber.
30
-
31
- Use the agent host's **streaming background-task** facility to start:
32
-
33
- ```bash
34
- ufoo bus poll "$SUBSCRIBER" --follow --interval 2
35
- ```
36
-
37
- The command must remain owned by that facility. Do not use `nohup`, shell `&`,
38
- or an OS-detached daemon: those routes can put output in a log that never
39
- reaches the agent. The command rejects a second resident poll for the same
40
- subscriber.
41
-
42
- The poll is deliberately queue-read-only. It emits current pending events at
43
- startup, waits for that batch to be acknowledged, then emits the next pending
44
- batch. It does not ack, claim, inject, or clear messages itself.
45
-
46
- ## When background output arrives
47
-
48
- For every `[ufoo]<from:...>` event:
49
-
50
- 1. Read `Content.message` and execute actionable work.
51
- 2. After handling the emitted batch, run the exact `ack --through <seq>`
52
- command printed by the poll stream. For example:
53
-
54
- ```bash
55
- ufoo bus ack "$SUBSCRIBER" --through 42
56
- ```
57
-
58
- `--through` preserves any later message that was not in the displayed batch.
59
-
60
- 3. Reply to the sender only for a requested result, an answer, or information
61
- they need to continue:
62
-
63
- ```bash
64
- ufoo bus send "<sender-id>" "<substantive result>"
65
- ```
66
-
67
- Ack-only messages, greetings, and thanks need no reply.
68
-
69
- After sending, do not poll, sleep, or wait for a reply. Keep working; this
70
- resident stream will emit any follow-up.
71
-
72
- ## Host requirement
73
-
74
- This flow works only when the agent host forwards incremental output from a
75
- still-running background task into the agent session. If it only returns output
76
- after process exit, use an explicitly invoked `/ubus` instead.