ai_co_discuss 0.4.73 → 0.4.75

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 (35) hide show
  1. package/.agents/skills/discuss-host/references/relay.md +2 -2
  2. package/.agents/skills/discuss-host/references/room.md +2 -2
  3. package/.agents/skills/discuss-participant/references/room.md +1 -1
  4. package/.agents/skills/discuss-session/references/host.md +1 -1
  5. package/.agents/skills/local-stt-setup/SKILL.md +2 -2
  6. package/.agents/skills/local-tts-setup/SKILL.md +1 -1
  7. package/.agents/skills/workflow-creator/SKILL.md +1 -1
  8. package/.agents/skills/workflow-creator/references/model-selection.md +1 -1
  9. package/backend/free_room.py +16 -5
  10. package/backend/server.py +1 -1
  11. package/docs/en/runner.md +1 -1
  12. package/docs/en/workflow.md +2 -0
  13. package/docs/runner.md +3 -3
  14. package/docs/workflow.md +2 -0
  15. package/frontend/locales/en/backend.json +3 -2
  16. package/frontend/locales/en/core.json +4 -3
  17. package/frontend/locales/en/discussion.json +7 -1
  18. package/frontend/locales/en/room.json +1 -6
  19. package/package.json +1 -1
  20. package/runner/adapters/antigravity_cli.mjs +12 -1
  21. package/runner/adapters/api.mjs +19 -10
  22. package/runner/adapters/api_files.mjs +45 -3
  23. package/runner/adapters/api_pi.mjs +26 -8
  24. package/runner/adapters/api_pi_extension.mjs +2 -1
  25. package/runner/adapters/claude.mjs +1 -11
  26. package/runner/adapters/common.mjs +11 -1
  27. package/runner/adapters/profiles.mjs +2 -2
  28. package/runner/discuss.py +1 -3
  29. package/runner/local_speech_service.mjs +3 -2
  30. package/runner/tts_providers.mjs +3 -3
  31. package/web/app.js +7 -0
  32. package/web/backup.js +1 -1
  33. package/web/i18n.js +2 -2
  34. package/web/modern.css +1 -1
  35. package/web/modern.js +57 -57
@@ -9,7 +9,7 @@
9
9
  | 中途由你把关一稿,或只让中间一段循环 | `--checkpoint 成员` / `--repeat 成员=起点成员` |
10
10
  | 用户作为一棒亲自参与或拍板 | `--wait-user 成员` 或 `成员=起点成员` |
11
11
  | 一棒里有几位互不依赖、可同时做 | 第一位 `--to`,其余紧跟 `--with` |
12
- | 某位同时开工、但不必等它 | `--detach 成员` |
12
+ | 某位在后台做、不必等它(如记账、归档) | `--detach 成员`,可单独用,也可随派活 |
13
13
  | 派活后你自己还要接着做、不等成员 | `--keep-working` |
14
14
 
15
15
  `sequence view ROOM ID` 可读本圈各棒原文。
@@ -20,7 +20,7 @@
20
20
 
21
21
  **同一棒几位**(如 `--to 写手 --to 评审甲 --with 评审乙 --sequential --loop`):这一棒的成员同时开工,全部结束才交下一棒,下一棒能读到每一份回答;组里有人失败,接力停下交回你,用户重试失败的那位后接着走。程序不保证同一棒的成员彼此看不到(后交的人可能读到先交的);需要各自独立判断时,在正文里要求先写完再读别人的,并分清各自管什么。
22
22
 
23
- **后台成员** `--detach 成员`(可重复,不能与 `--to` 重名):它和这次派活一起开工,交回你或交下一棒都不等它;做完不交回你,结果在房间里可读,失败时程序通知你。用在依次接力上时只随第一棒开工一次;撤回这次派活会一并撤回它。
23
+ **后台成员** `--detach 成员`(可重复,不能与 `--to` 重名):后台派活的唯一写法。它不占住房间(用户发消息不排队),交回你或交下一棒都不等它;做完不交回你,结果在房间里可读,失败时程序通知你。可单独用(不带 `--to`,不算一轮),也可随一次派活同时开工;用在依次接力上时只随第一棒开工一次;撤回这次派活会一并撤回它。
24
24
 
25
25
  **自己接着做** `--keep-working`(API 不提供):这条回答收为派活卡,本轮不要结束,直接接着工作,房间为后续工作另起一张卡;做完照常用本次凭据 `message post` 回答(可再派活)。派出的工作结束时以一条通知交回你,在你这次回答之后送达。不要先回答“我接着做”再结束本轮(后面的工作在房间里就看不到了)。不能与 `--continue`、`--sequential`、`--next-review` 同用。
26
26
 
@@ -28,8 +28,8 @@
28
28
  默认做法:在回答里用 `--to` 点名、写清分工,其余参数按需加;完整写法查 `message post --help-host`(普通 `--help` 只列成员能用的)。
29
29
 
30
30
  - 需要他人时加 `--to 显示名`(可重复,不能点名自己),写明各自负责的文件或模块;不需要他人时不加,本次即结束。派活正文要能独立看懂:直接写要做的事、材料编号与完成标准,不写“同上”“见前文”。
31
- - 派出的工作无论点名几位,全部结束(含失败)后都交回你。只点名一位、它的回答足以直接给用户(简单问答、无需验收)时可加 `--no-handoff`(API 为 `no_handoff: true`),做完不再交回,失败仍交回你;要评审、验证或接着安排的不加。
32
- - 本次执行不便接着做、但还要继续时(等成员的结果之外还要复查、分几步推进),加 `--continue 继续做什么`(API 为 `continue`):房间没有其他进行中的工作时,程序再唤醒你一次。你下次回答不带它、或用户发了新消息就取消,仍需要就重新带上。不要用它等用户回复(需要用户决定时见参与技能 [回答房间请求](../../discuss-participant/references/room.md)“需要用户决定时”);Goal 进行中由 Goal 负责空闲续跑,不必加。
31
+ - 派出的工作无论点名几位,全部结束(含失败)后都交回你。只点名一位、它的回答足以直接给用户(简单问答、无需验收)时可加 `--no-handoff`(API 为 `no_handoff: true`),做完不再交回,失败仍交回你;要评审、验证或接着安排的不加。它仍占住房间(用户发消息要排队),不是后台;要后台做、不等它,用 `--detach`(见 [接力](relay.md)“后台成员”)。
32
+ - 本次执行不便接着做、但还要继续时(等成员的结果之外还要复查、分几步推进),加 `--continue 继续做什么`(API 为 `continue`):房间没有其他进行中的工作时,程序再唤醒你一次;“进行中的工作”包括不交回你的成员(`--no-handoff`、`--detach` 派出的),它们做完之前不会唤醒你。派活后要自己马上接着做、不等它们,用 `--keep-working`(见 [接力](relay.md))。你下次回答不带它、或用户发了新消息就取消,仍需要就重新带上。不要用它等用户回复(需要用户决定时见参与技能 [回答房间请求](../../discuss-participant/references/room.md)“需要用户决定时”);Goal 进行中由 Goal 负责空闲续跑,不必加。
33
33
 
34
34
  ### 轮数上限
35
35
 
@@ -5,7 +5,7 @@
5
5
  - 新消息从任务的已读起点之后读起(`message list ROOM --after ID`),后面的消息可以修正前面的,以用户最新的要求为准。`request_messages` 可能指向已读起点之前的原回答,需要时 `message view ROOM ID` 补读。
6
6
  - 完成后用 `message post --body-file 草稿.md` 提交一次回答。手动接入的成员没有执行编号:从 `room view` 的 `free.requests` 找到自己的待处理请求,用 `--request 请求编号` 关闭。
7
7
  - 工作中收到“又有请求 #N 在排队等你”时,`execution view` 的 `queued_requests` 列出它们;这次回答能一并交付的,提交时加 `--also-request N`(API 填 `also_request_ids`)一起关闭,其余答完会再交给你。
8
- - 你在工作中途写的简短文字说明,本机接入程序会显示在网页的处理中卡片上,让用户知道进展;它不代替最终回答。
8
+ - 多步的工作,在关键转折处用请求者的语言写一两句进展:这些中途文字会显示在网页的处理中卡片上,用户靠它知道你在做什么。不复述工具输出或操作步骤,不代替最终回答。
9
9
  - 请求带 `sequence`、`question` 或 `question_needed`,任务有 `image`,或用户在你自己的窗口里要你发言时,另读 [按需场景](situations.md)。
10
10
 
11
11
  ## 需要用户决定时
@@ -53,7 +53,7 @@
53
53
  - 安排须带本次读取的 `revision`;整轮计划还须包含 `waiting` 中的每位专家。`unregistered` 中尚未注册的手动专家不能排入,它注册后会自动加入本轮队列。名单变化后 `revision` 失效需重取,缺人或未带 `revision` 都会被拒绝;本轮不需要某人时先让其暂离。
54
54
  - 计划只覆盖当前一轮,跨轮追问要看本轮回答后再定;只有各轮问题不依赖回答的固定流程(如依次报数)才可排满多轮。后一位的问题取决于前一位回答时也不必等前一位答完:把问题写成“先读取最新回答,再按……回应”,由专家自己读取。
55
55
  - 网站在专家间自动接力,末位答完才交回主持。用户留言或打断时服务端会自动把控制权交回主持。
56
- - `members` 中 `adapter` 为 `api` 的专家没有命令行:有项目目录时能用文件工具读写(按用户给的权限),没有时读不到本地文件。议题涉及本地文件时,开场说明写明相关路径和要点让它自己读;它读不到或索要信息时,由能读文件的专家补充。测试、构建或 git 交给 CLI 专家。
56
+ - `members` 中 `adapter` 为 `api` 的专家:项目只读时只有文件工具、没有命令行;可写时和 CLI 专家一样能运行命令;没有项目目录时读不到本地文件。议题涉及本地文件时,开场说明写明相关路径和要点让它自己读;它读不到或索要信息时,由能读文件的专家补充。只读的 API 专家要跑测试、构建时交给能运行命令的专家。
57
57
 
58
58
  ## 推进判断
59
59
 
@@ -9,7 +9,7 @@ description: "为 AI CoDiscuss 安装本机语音识别:下载 CrispASR 与 Qw
9
9
 
10
10
  - `SERVICE_HOME/crispasr/cli/`:CrispASR 程序(`crispasr.exe` 及其 DLL);`SERVICE_HOME/crispasr/models/qwen3-asr-0.6b-q8_0.gguf`:识别模型(约 1 GB)。`SERVICE_HOME` 见“前提”第 2 条。
11
11
  - 访问令牌存在 CoDiscuss 的本机私有密钥里(地址 `http://127.0.0.1/crispasr`,只用来标识本机识别服务,不含端口),不写进其他文件或命令行。
12
- - 语音输入切到“本机”。CrispASR 由 CoDiscuss 本机程序在识别时自动启动,只监听本机地址,优先用端口 37642,被占用时自动换一个空闲端口;1 分钟没有识别请求自动结束并释放显存(CoDiscuss 崩溃也一样),不需要开机自启。
12
+ - 语音输入切到“本机”。CrispASR 由 CoDiscuss 本机程序在识别时自动启动,只监听本机地址,优先用端口 37642,被占用时自动换一个空闲端口;5 分钟没有识别请求自动结束并释放显存(CoDiscuss 崩溃也一样),不需要开机自启。
13
13
 
14
14
  全程只在用户电脑上操作:不改 CoDiscuss 源码,不把令牌写进回复、日志或命令行参数;下载与安装前把预计占用(下文“前提”)告诉用户。
15
15
 
@@ -31,7 +31,7 @@ description: "为 AI CoDiscuss 安装本机语音识别:下载 CrispASR 与 Qw
31
31
  | Linux x64 | NVIDIA / 其他独显 / 无 | `crispasr-linux-x86_64-cuda13.tar.gz`(或 `-cuda`)/ `-vulkan.tar.gz` / `crispasr-linux-x86_64.tar.gz` |
32
32
 
33
33
  只能用 CPU 时先告诉用户:识别速度约等于录音时长(一段 1 分钟的话要等约 1 分钟),用户同意再装。
34
- 4. **显存与磁盘**:识别服务运行时约占 2.5 GB 显存;与本机朗读(约 3 GB)同时运行时,8 GB 显卡余量很紧,两者都是用完 1 分钟后自动退出。磁盘约 1.7 GB(Windows CUDA 13 程序约 0.7 GB + 模型约 1 GB)。
34
+ 4. **显存与磁盘**:识别服务运行时约占 2.5 GB 显存;与本机朗读(约 3 GB)同时运行时,8 GB 显卡余量很紧,两者都是闲置 5 分钟后自动退出。磁盘约 1.7 GB(Windows CUDA 13 程序约 0.7 GB + 模型约 1 GB)。
35
35
 
36
36
  ## 安装
37
37
 
@@ -9,7 +9,7 @@ description: "为 AI CoDiscuss 安装本机朗读语音:下载 yovoice CLI、
9
9
 
10
10
  - `SERVICE_HOME/yovoice/cli/`:yovoice CLI(含 `tools/` 下的音频转换器);`SERVICE_HOME/yovoice/data/`:推理引擎与模型,只给 CoDiscuss 用,不与 yovoice 桌面应用共用(`SERVICE_HOME` 见“前提”第 2 条)。
11
11
  - 访问令牌存在 CoDiscuss 的本机私有密钥里(地址 `http://127.0.0.1/yovoice`,只用来标识本机朗读服务,不含端口),不写进其他文件。
12
- - 朗读设置切到“本机”。yovoice 服务由 CoDiscuss 本机程序在朗读时自动启动,只监听本机地址,优先用端口 37641,被占用时自动换一个空闲端口;用户点停止朗读后 5 秒内、或 1 分钟没有朗读请求时自动结束并释放显存(CoDiscuss 崩溃也一样),不需要开机自启。
12
+ - 朗读设置切到“本机”。yovoice 服务由 CoDiscuss 本机程序在朗读时自动启动,只监听本机地址,优先用端口 37641,被占用时自动换一个空闲端口;5 分钟没有朗读请求时自动结束并释放显存(CoDiscuss 崩溃也一样),不需要开机自启。
13
13
 
14
14
  全程只在用户电脑上操作:不改 CoDiscuss 源码,不把令牌写进回复、日志或命令行参数;下载与安装前把预计占用(下文“前提”)告诉用户。
15
15
 
@@ -74,7 +74,7 @@ description: AI CoDiscuss 工作流的创建与修改技能。用户要把房间
74
74
 
75
75
  ### 登记命令(给模型 API 成员)
76
76
 
77
- 以 API 方式加入的成员没有命令行。某个角色需要自己跑检查脚本之类的命令时,在文件夹根目录放 `commands.json` 登记,脚本本身也放进文件夹(如 `tools/`),这样随工作流一起分享:
77
+ 以 API 方式加入的只读成员没有命令行(可写成员直接用命令行,登记的命令对它不生效)。某个角色需要自己跑检查脚本之类的命令时,在文件夹根目录放 `commands.json` 登记,脚本本身也放进文件夹(如 `tools/`),这样随工作流一起分享:
78
78
 
79
79
  ```json
80
80
  { "commands": [
@@ -19,6 +19,6 @@
19
19
  写卡片时:
20
20
 
21
21
  - 只写本机已配置的平台;不确定时 `model`、`effort` 省略,用本机默认值。
22
- - 纯 API 平台(`OpenAI`、`DeepSeek`、`Qwen`、`Grok`、`Custom`)的成员不读 `effort`,没有命令行,只能用文件工具和 `commands.json` 登记的命令;需要跑脚本的角色,要么登记命令,要么用 `Claude`、`Codex`、`Antigravity` 这类本机软件。
22
+ - 纯 API 平台(`OpenAI`、`DeepSeek`、`Qwen`、`Grok`、`Custom`)的成员不读 `effort`;项目只读时没有命令行,只能用文件工具和 `commands.json` 登记的命令,可写时能直接运行命令;只读又要跑脚本的角色,要么登记命令,要么用 `Claude`、`Codex`、`Antigravity` 这类本机软件。
23
23
  - 要出图、改图的角色(插画、封面、配图)任选平台,在提示词里写明由它负责出图;房间添加了“生图”卡片(图片模型在卡片里配置)后才能画。出图角色优先用能看图的本机软件(如 `Claude`),它能下载附件自查;API 成员看不到自己画的图,用它出图时另配一张本机软件的审图卡片。
24
24
  - 同一件事要两个视角审时,两张卡片用不同平台,避免同一家模型的盲点重叠。
@@ -1344,6 +1344,8 @@ def after_proactive(connection, room_id, message_id, member, payload):
1344
1344
  elif payload.get("to"):
1345
1345
  dispatch(connection, room_id, member, message_id, payload["to"], message_id, payload.get("handoff") is True,
1346
1346
  payload.get("no_handoff") is True, {"need": need_plan(payload)}, payload.get("detach"))
1347
+ elif payload.get("detach"):
1348
+ send_detached(connection, room_id, member, message_id, message_id, payload["detach"])
1347
1349
  remember_continue(connection, room_id, member, message_id, message_id, payload)
1348
1350
  settle_batches(connection, room_id)
1349
1351
 
@@ -1863,8 +1865,7 @@ def dispatch(connection, room_id, host, message_id, names, chain_id, handoff=Fal
1863
1865
  return
1864
1866
  for member_id in member_ids:
1865
1867
  insert_request(connection, room_id, member_id, message_id, chain_id, "ask", "host", batch_id=message_id)
1866
- for member_id in named_members(active_members(connection, room_id), detach or [], exclude=host["name"]):
1867
- insert_request(connection, room_id, member_id, message_id, chain_id, "ask", "host")
1868
+ send_detached(connection, room_id, host, message_id, chain_id, detach)
1868
1869
  connection.execute("INSERT INTO free_batches (room_id,batch_id,chain_id,host_id) VALUES (?,?,?,?)",
1869
1870
  (room_id, message_id, chain_id, host["id"]))
1870
1871
  if plan.get("relay"):
@@ -1877,6 +1878,14 @@ def dispatch(connection, room_id, host, message_id, names, chain_id, handoff=Fal
1877
1878
  connection.execute("INSERT INTO free_direct_batches (room_id,batch_id) VALUES (?,?)", (room_id, message_id))
1878
1879
 
1879
1880
 
1881
+ def send_detached(connection, room_id, host, message_id, chain_id, detach):
1882
+ """Start background members (`detach`): outside any batch, so nothing waits for them, the room does not count them as
1883
+ busy and their answer stays in the room; a failure reaches the host like any request outside a batch. Sent alone
1884
+ (without `to`) they use no round: they never hand back, so they cannot carry the chain on."""
1885
+ for member_id in named_members(active_members(connection, room_id), detach or [], exclude=host["name"]):
1886
+ insert_request(connection, room_id, member_id, message_id, chain_id, "ask", "host")
1887
+
1888
+
1880
1889
  def settle_batches(connection, room_id):
1881
1890
  """Hand each finished batch back to its host once, a failed one included; a batch that was only stopped halts its chain.
1882
1891
 
@@ -2019,7 +2028,7 @@ def checked_sequence(actor, payload):
2019
2028
 
2020
2029
 
2021
2030
  def checked_detach(actor, payload):
2022
- """`detach`: members the host sends along with a dispatch without waiting for them; they are not among those in `to`."""
2031
+ """`detach`: members the host sends to work in the background, alone or along with a dispatch; never among those in `to`."""
2023
2032
  detach = payload.get("detach")
2024
2033
  if detach is None:
2025
2034
  return
@@ -2029,8 +2038,8 @@ def checked_detach(actor, payload):
2029
2038
  if (not isinstance(detach, list) or not detach or any(not isinstance(name, str) for name in detach)
2030
2039
  or len(set(detach)) != len(detach)):
2031
2040
  raise ValueError(Text("detach 须为不重复的成员名列表"))
2032
- if not names or set(detach) & set(names):
2033
- raise ValueError(Text("detach 须与 to 同用,且不包含 to 中的成员"))
2041
+ if set(detach) & set(names):
2042
+ raise ValueError(Text("detach 不能包含 to 中的成员"))
2034
2043
 
2035
2044
 
2036
2045
  def relay_order(names, parallel):
@@ -2582,6 +2591,8 @@ def after_free_message(connection, room_id, message_id, actor, payload):
2582
2591
  elif actor["role"] == "host" and payload.get("to"):
2583
2592
  dispatch(connection, room_id, actor, message_id, payload["to"], chain_id, payload.get("handoff") is True or bool(payload.get("next_review")),
2584
2593
  payload.get("no_handoff") is True, {"need": need_plan(payload)}, payload.get("detach"))
2594
+ elif actor["role"] == "host" and payload.get("detach"):
2595
+ send_detached(connection, room_id, actor, message_id, chain_id, payload["detach"])
2585
2596
  if payload.get("keep_working") is True:
2586
2597
  keep_working(connection, room_id, actor, message_id, chain_id, payload["execution_id"])
2587
2598
  if actor["role"] == "host":
package/backend/server.py CHANGED
@@ -2400,7 +2400,7 @@ def protocol_text(room, language="zh"):
2400
2400
  Text("用户管理和讨论开关使用房主凭据;本地成员使用本人的 --access-file,不借用其他身份。凭据私下交付,不公开 token。API 参与者遵循相同请求与执行约束,source=api;本地 CLI 使用 source=cli。"),
2401
2401
  Text("runner 成员等待本机接入程序交付任务,用 execution view 核对本次执行和请求,再以 message post --as 本人 --kind chat --execution 本次编号 --access-file FILE 回答。执行失效后保留草稿,不能去掉编号改作普通发言;认领、续租与后续投递由接入程序处理。"),
2402
2402
  Text("manual 本地成员首次用 member register 注册,会话 ID 由 CLI 自动取得;回答用 --request 请求编号,不编造执行编号。讨论不使用原生定时;原会话不能托管时由用户触发。"),
2403
- Text("房间里的 host 可用 --to 点名成员,route 表示未点名的用户请求,handoff 表示派出任务已结束;链上 AI 派活受房间预算限制。--to 多位并加 --sequential 时按点名顺序依次接力,每棒一轮,最后交回主持人;--with 成员与紧挨在前的 --to 同一棒同时做,这一组全部结束才交下一棒;--detach 成员与这次派活同时开工但不等它(失败时通知主持人);--keep-working 派活后自己不结束这一轮、接着工作:这条回答收为派活卡,后续工作另起一张卡,做完照常回答(同一执行凭据即可),派出的工作结束时以通知交回;不能与 --continue、--sequential、--next-review 同用;再加 --loop 则交回为检查点,用 sequence continue --request 交接请求编号开始下一圈,不继续即直接验收。普通成员的 --to 或正文 @ 只保存回应建议,不直接唤醒;不点名自己、不扩大授权。"),
2403
+ Text("房间里的 host 可用 --to 点名成员,route 表示未点名的用户请求,handoff 表示派出任务已结束;链上 AI 派活受房间预算限制。--to 多位并加 --sequential 时按点名顺序依次接力,每棒一轮,最后交回主持人;--with 成员与紧挨在前的 --to 同一棒同时做,这一组全部结束才交下一棒;--detach 成员在后台工作:不等它、不交回、也不占住房间,可单独用或随派活同时开工(失败时通知主持人);--keep-working 派活后自己不结束这一轮、接着工作:这条回答收为派活卡,后续工作另起一张卡,做完照常回答(同一执行凭据即可),派出的工作结束时以通知交回;不能与 --continue、--sequential、--next-review 同用;再加 --loop 则交回为检查点,用 sequence continue --request 交接请求编号开始下一圈,不继续即直接验收。普通成员的 --to 或正文 @ 只保存回应建议,不直接唤醒;不点名自己、不扩大授权。"),
2404
2404
  Text("讨论中的用户 @ 直接提问独立排队,不计讨论轮次、不与讨论发言合并。initial 阶段先独立判断;服务端按讨论请求的 read_until 限制读取。直接提问和主持任务不继承该阅读限制。"),
2405
2405
  Text("主持安排前先 turn roster 读取在场专家、waiting、unregistered 和 revision,再 turn create --roster revision;单项和多项都要带凭据,多项计划须覆盖本轮 waiting。继续排队同样先读 roster,再 turn continue --roster revision。状态或新消息变化后旧凭据被拒绝,重新读取再判断;每个回答保存后由程序推进下一项。"),
2406
2406
  Text("局部追问先 turn roster 读取 host_requests 的请求与原消息编号,再 turn ask --request ID --expert NAME --roster revision --submission-id UUID;普通提问不计轮次、不改讨论队列,可问已发言者和主持人,只结束指定请求。"),
package/docs/en/runner.md CHANGED
@@ -122,7 +122,7 @@ Choose **OpenAI** in the member picker, flip its card, enter your official OpenA
122
122
 
123
123
  Choose **自定义 API** (Custom API) for another service, then enter its base URL, API key and full model ID. It defaults to Chat Completions and also supports Responses, Anthropic Messages and Gemini generateContent. Use the name and description button on the card's back to set a display name; add the slot again to configure multiple independent members. Official presets for Anthropic, Google Gemini, DeepSeek, Alibaba Cloud Model Studio (Qwen) and xAI (Grok) remain available.
124
124
 
125
- API members can act as experts or hosts. When the room has a project folder, they can read and search its files through file tools the runner provides; with writable project access they can also create and edit files, but they have no command line and cannot run tests or builds. Secret files such as `.env` and private keys, the `.git` folder and the local service folder are never available, and whatever they read is sent to the model provider you configured. Keys stay on your machine, and calls are billed to your account. To let an API member see images, turn on image input in its card's API settings (only when the model supports it, otherwise requests fail); without it the member cannot see image content. API members can always read UTF-8 text attachments on demand; PDFs and other files are not readable for them, and their answers say so.
125
+ API members can act as experts or hosts. When the room has a project folder, read-only members read and search its files through file tools the runner provides (secret files such as `.env` and private keys, the `.git` folder and the local service folder are not available); with writable project access they work like Claude Code and Codex, with Pi's own read, edit, write and command line, so they can run tests, builds and git, and can also reach any file your account can on this computer. Whatever they read is sent to the model provider you configured. Keys stay on your machine, and calls are billed to your account. To let an API member see images, turn on image input in its card's API settings (only when the model supports it, otherwise requests fail); without it the member cannot see image content. API members can always read UTF-8 text attachments on demand; PDFs and other files are not readable for them, and their answers say so.
126
126
 
127
127
  ## Smart Scheduling
128
128
 
@@ -4,6 +4,8 @@ English | [简体中文](../workflow.md)
4
4
 
5
5
  How collaboration works inside a room. For installation, see [Setup](runner.md).
6
6
 
7
+ Message cards show each recipient's waiting, delivery, processing, answer or cancellation status. When a recipient is busy, the card says it is waiting for the current run to finish. Answer links locate the reply, including replies that answer several requests together. Queued messages remain in the queue area.
8
+
7
9
  > The web UI is currently in Chinese; UI labels are given in parentheses.
8
10
 
9
11
  ## Concepts
package/docs/runner.md CHANGED
@@ -153,7 +153,7 @@ API 成员在房间里的工作由 [Pi](https://github.com/earendil-works/pi)
153
153
 
154
154
  选择 **自定义 API** 可接入其他服务:翻开卡片填写 Base URL、API Key 和完整模型 ID,默认使用 Chat Completions,也可选择 Responses、Anthropic Messages 或 Gemini generateContent。卡片背面的“名称与描述”按钮可修改显示名称;重复点击添加可配置多个不同的 API 成员。Anthropic、Google Gemini、DeepSeek、阿里云百炼(Qwen)、xAI(Grok)也保留官方地址预设。
155
155
 
156
- API 成员可以担任专家或主持人。房间指定了项目目录时,它可以用接入程序提供的文件工具读取、搜索项目文件;项目权限设为可写时还能新建和编辑文件,但没有命令行,不能运行测试或构建。`.env`、私钥等密钥文件、`.git` 目录和本机服务目录始终不开放,读到的内容会发给你配置的模型服务商。密钥只保存在本机,调用费用按你的账号计费。
156
+ API 成员可以担任专家或主持人。房间指定了项目目录时,只读时它用接入程序提供的文件工具读取、搜索项目文件(`.env`、私钥等密钥文件、`.git` 目录和本机服务目录不开放);项目权限设为可写时,它和 Claude Code、Codex 一样用 Pi 自带的读写、编辑和命令行工作,能运行测试、构建和 git,也能读到这台电脑上你的账号能访问的文件。读到的内容会发给你配置的模型服务商。密钥只保存在本机,调用费用按你的账号计费。
157
157
 
158
158
  **给成员发截图或文件**:在输入框粘贴、拖入或用回形针添加附件后,输入框上方出现缩略图,正文光标处插入 `[图片 #1]`、`[文件 #2]` 这样的占位,用来说明哪段话对应哪个文件。编号在整个房间里连续、不重复(像 Claude Code 里贴的图那样),翻聊天记录时按编号就能找到那张图。占位像 @成员一样高亮成小标签,按一次退格或 Delete 就整段删掉;删掉缩略图或删掉占位,两边同步移除。消息发出后,正文里的占位可点开对应附件。被点名的成员收到任务时,附件已下载到这台电脑,任务里按占位列出位置;Claude Code 和 Codex CLI 会像在自己窗口里贴图一样直接看到图片,其他软件按位置自行打开。API 成员要看图,在它卡片的 API 设置里打开“看图”(只在模型本身支持看图时打开,否则请求会出错);没打开时它看不到图片内容。UTF-8 文本附件 API 成员都能按需读取原文;PDF 等其他文件它读不到,回答里会说明没有读取。执行中插话和私聊只能发文字。
159
159
 
@@ -176,12 +176,12 @@ API 成员可以担任专家或主持人。房间指定了项目目录时,它
176
176
  - **主持人完整权限的其他控制**:同一个开关打开后,主持人会自己处理房间里的问题、持续推进:成员跑偏时插话、卡住时打断或重试(它自己的执行失败时程序会提醒它一次,它可以重试自己、补交结果,或给自己换模型)、模型不可用时换模型、无法恢复时换人;你也可以直接说“停下写手”“全部停下”“下一个让批评家先说”“请一位 Codex 进来只读评审”“把记录员请出去”“开个 Goal 把剩下几集写完”“暂停讨论”。邀请只用本机已配置的软件,项目权限默认只读、最高可写,邀请暂离中的成员会把它按原名请回;它自己开的 Goal 用你的默认预算(不限时为 8 次续跑、90 分钟)。成员连续 10 分钟没有新输出时,系统会提醒主持人检查;主持人派出长任务时还可以给自己设定时检查(每 5–120 分钟一次;房间空闲时再提醒它最后一次,确认做完了还是还有下一步,之后结束)。它也能撤回自己派出的活,正在循环的接力会立即停下。以下仍由你决定:对主持人自己的其他操作(打断、改项目权限、暂离、移除)或更换主持人、批准超出上限的轮数、高于可写的权限或放行工具、改项目目录、撤回你的消息、私聊。API 主持人没有命令行,不能这样做。
177
177
  - **分享**:工作流存在本机服务目录的 `workflows` 文件夹,一个工作流一个文件夹;编辑页可复制路径,把整个文件夹(或打成 zip)发给对方即可分享。导入时会列出每张卡片的提示词和项目权限;要求写文件的卡片默认按只读导入,逐张勾选后才放开。
178
178
  - **子工作流**:主线之外按需用的一套做法(比如检查成稿的 AI 率、请几位专家代入主角试演一场戏)可以做成子工作流:它有自己的 SKILL.md、成员卡片和画布,放在工作流文件夹的 `workflows/<子工作流ID>/` 下。在工作流页画布左上角工具条下方的“主线与子工作流”列表里切换、新建或删除,切过去后画布和右侧(手机上为“子工作流”页签)显示它自己的内容,和主线一起保存;手机上这个列表默认收起,显示当前在看哪一个。工作流进行中,在输入框打 `/` 会多出“工作流「名称」的子工作流”一组,选一项就写好请求交给主持人;主持人也会在合适的时候自己用。用到它的成员时,主持人把这些成员请进来,用完设为离开,会话保留,下次接着用。整个工作流文件夹仍是标准的技能格式,拷到别的 AI 软件里也能当技能读。
179
- - **给 API 成员登记命令**:以 API 方式加入的成员没有命令行。工作流文件夹里放一个 `commands.json`(写法见 `workflow-creator` 技能),登记它们能运行的命令(例如检查脚本,脚本也放在工作流文件夹里),随工作流一起分享;启用后 API 成员只能按名字运行这些命令,改不了命令行,只读成员只能运行标为只读的命令。命令以你的身份在本机运行,所以导入别人的工作流时,编辑页会列出每条完整命令,勾选“允许这些命令在本机运行”才会带上;主持人起草或修改工作流时不能增删命令。
179
+ - **给 API 成员登记命令**:只读的 API 成员没有命令行(可写的直接用 Pi 自带的命令行,不需要登记)。工作流文件夹里放一个 `commands.json`(写法见 `workflow-creator` 技能),登记它们能运行的命令(例如检查脚本,脚本也放在工作流文件夹里),随工作流一起分享;启用后 API 成员只能按名字运行这些命令,改不了命令行,只读成员只能运行标为只读的命令。命令以你的身份在本机运行,所以导入别人的工作流时,编辑页会列出每条完整命令,勾选“允许这些命令在本机运行”才会带上;主持人起草或修改工作流时不能增删命令。
180
180
  - **修改与结束**:修改工作流会作用于所有启用它的房间,成员下一次执行就按新内容;新增的卡片不会自动进入房间,主持人用到时会自己补上,也可以在右栏工作流一行点刷新图标立即补齐(删掉的卡片,其成员留作普通成员;与库一致时不显示该图标);工作流卡片的提示词只读,在工作流页的画布上修改。工作流进行中时,主持人只在请求和它的用途相符(或你说按工作流做)时才用,其他请求照常处理。用完在“成员与设置 → 协作设置”的工作流一行点请离成员图标(或逐个让成员离开):工作流带来的成员离开(主持人保留),正在进行的工作随之停止,工作流结束,右栏这一块消失;成员会话保留,下次在输入框打 `/` 选它就把原成员请回来,接着原来的上下文。换工作流时直接选另一个,原来的成员留作普通成员。
181
181
 
182
182
  ## 朗读与语音输入(可选)
183
183
 
184
- 朗读可在网页“设置”的“语音”里切换服务:火山引擎(豆包语音合成 2.0)、阿里云百炼(CosyVoice)、Azure(神经语音,另填语音资源所在区域)、OpenAI(gpt-4o-mini-tts,已为模型 API 成员保存过 OpenAI Key 时直接沿用;音色偏英语口音,OpenAI 定于 2027-01-06 停用该接口),或“本机”(在这台电脑的显卡上运行 Qwen3-TTS,不需要密钥、不计费;让你的本地 AI 按 `local-tts-setup` 技能安装,约占 3.5 GB 磁盘、建议 4 GB 以上显存,不支持调语速;朗读时自动启动,停止朗读或 1 分钟没有朗读时自动退出、释放显存)。在所选服务的控制台获取 API Key 填进去;每个服务的 Key 与音色分开保存,切回时仍在。语音输入可另选服务:火山引擎「录音文件识别2.0」或 OpenAI(gpt-transcribe,OpenAI 定于 2027-02-26 停用;两者在朗读用其他服务时各需对应的 Key,OpenAI 已保存过时直接沿用),或“本机”(在这台电脑上运行 Qwen3-ASR,不需要密钥、不计费;让你的本地 AI 按 `local-stt-setup` 技能安装,约占 1.7 GB 磁盘、运行时约 2.5 GB 显存,用时自动启动、闲置 1 分钟退出)。“朗读”和“语音输入”下各有一行“本机进程”,显示本机服务是否在运行(进程名与 PID);运行中时右侧的电源按钮可强行结束它(连同子进程),用于程序异常退出后服务残留、占着显存的情况。朗读可设一个通用音色,并按 AI 平台(Claude、Codex、Gemini 等)分别配音色,朗读项目文件也可单独配一个音色,没配的平台、你自己的消息、程序消息和文件用通用音色;还可选语速;火山引擎、OpenAI 与本机还可改语气提示,各自分开保存(火山引擎默认“像给朋友讲故事一样”的自然语气,本机默认平静克制)。密钥只保存在本机,费用按你的账号计费。
184
+ 朗读可在网页“设置”的“语音”里切换服务:火山引擎(豆包语音合成 2.0)、阿里云百炼(CosyVoice)、Azure(神经语音,另填语音资源所在区域)、OpenAI(gpt-4o-mini-tts,已为模型 API 成员保存过 OpenAI Key 时直接沿用;音色偏英语口音,OpenAI 定于 2027-01-06 停用该接口),或“本机”(在这台电脑的显卡上运行 Qwen3-TTS,不需要密钥、不计费;让你的本地 AI 按 `local-tts-setup` 技能安装,约占 3.5 GB 磁盘、建议 4 GB 以上显存,不支持调语速;朗读时自动启动,5 分钟没有朗读时自动退出、释放显存)。在所选服务的控制台获取 API Key 填进去;每个服务的 Key 与音色分开保存,切回时仍在。语音输入可另选服务:火山引擎「录音文件识别2.0」或 OpenAI(gpt-transcribe,OpenAI 定于 2027-02-26 停用;两者在朗读用其他服务时各需对应的 Key,OpenAI 已保存过时直接沿用),或“本机”(在这台电脑上运行 Qwen3-ASR,不需要密钥、不计费;让你的本地 AI 按 `local-stt-setup` 技能安装,约占 1.7 GB 磁盘、运行时约 2.5 GB 显存,用时自动启动、闲置 5 分钟退出)。“朗读”和“语音输入”下各有一行“本机进程”,显示本机服务是否在运行(进程名与 PID);运行中时右侧的电源按钮可强行结束它(连同子进程),用于程序异常退出后服务残留、占着显存的情况。朗读可设一个通用音色,并按 AI 平台(Claude、Codex、Gemini 等)分别配音色,朗读项目文件也可单独配一个音色,没配的平台、你自己的消息、程序消息和文件用通用音色;还可选语速;火山引擎、OpenAI 与本机还可改语气提示,各自分开保存(火山引擎默认“像给朋友讲故事一样”的自然语气,本机默认平静克制)。密钥只保存在本机,费用按你的账号计费。
185
185
 
186
186
  - 朗读:每条消息的工具栏有“朗读”(手机上在“…”菜单里),在消息里选中文字后点“听当前”从选中处开始;读完这条会接着读后面的消息直到最新,点输入框右下角的播报按钮开启语音播报:之后的新回复会自动朗读回答摘要(没写摘要的短回答读全文,长回答读第一段),主持人的发言会报“主持人”;讨论中还会提示新一轮的发言顺序和轮到谁,执行失败、操作待你允许和讨论结束也会播一句。同时到达的回复依次播报,积压较多时只播最新 3 条。锁屏或切到其他 App 时继续播放,锁屏界面和耳机按键可以暂停、继续、跳到下一条;读过的段落会缓存在电脑上,重听不再计费。正在读的句子会高亮,点一下高亮的句子暂停,再点继续;代码块跳过。朗读时消息区底部有“跟随”和“退出”:页面默认不随朗读滚动,点“跟随”后才把正在读的句子保持在视野内,手动滚动一下就取消跟随。
187
187
  - 朗读文件:在“文件”里打开 Markdown 文件,预览模式下标题栏有“朗读”,从正文开头读到文件末尾(文件头的 `---` 元数据不读);选中文字后可从选中处开始。暂停、跟随、退出与消息朗读相同;收起为悬浮窗时继续朗读,切到源码、换文件或关闭预览(含悬浮窗上的关闭)即停止。
package/docs/workflow.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  本文介绍房间里的协作方式。安装与接入见 [安装与接入](runner.md)。
6
6
 
7
+ 消息卡片按接收成员显示等待、投递、处理、回答或取消状态;等待忙碌成员时注明等当前执行结束,回答链接可定位对应消息,一并回答也会注明。排队消息仍在队列区显示。
8
+
7
9
  ## 核心概念
8
10
 
9
11
  | 概念 | 说明 |
@@ -218,7 +218,7 @@
218
218
  "delivery 须带布尔值 stoppable 与 progress": "delivery requires boolean stoppable and progress values",
219
219
  "denials 须为 1–{max_denials} 条 {open_brace}tool, detail, rule{close_brace}": "denials must contain 1–{max_denials} entries with {open_brace}tool, detail, rule{close_brace}",
220
220
  "descriptions 须为 {open_brace}成员名: 描述{close_brace},最多 {max_room_agents} 位,每段最多 {max_member_description} 字": "descriptions must be {open_brace}member name: description{close_brace}, with up to {max_room_agents} members and {max_member_description} characters per description",
221
- "detach 须与 to 同用,且不包含 to 中的成员": "detach requires to and must not include any members listed in to",
221
+ "detach 不能包含 to 中的成员": "detach must not include any members listed in to",
222
222
  "detach 须为不重复的成员名列表": "detach must be a list of unique member names",
223
223
  "edited 须为最多 {max_changed_files} 个相对路径": "edited must contain at most {max_changed_files} relative paths",
224
224
  "execution_id 与 request_id 不能同时使用": "execution_id and request_id cannot be used together",
@@ -559,6 +559,7 @@
559
559
  "{name} 的登录已失效,处理 {messages} 的执行失败(执行 #{execution_id}):{reason}。需要用户在本机重新登录该软件后才能再用它;程序不自动重试,请主持人改派其他成员或告知用户。": "{name} is signed out; its execution for {messages} failed (execution #{execution_id}): {reason}. It can work again only after the user signs that software in again on this computer; it is not retried automatically. Host: reassign the work to another member or tell the user.",
560
560
  "这次执行因登录失效失败;用户在本机重新登录该软件之前,重试仍会失败。": "This execution failed because the member is signed out; retrying will keep failing until the user signs that software in again on this computer.",
561
561
  "模型输出在 {tokens} 个 token 处达到输出上限后结束,未提交结果{reply}": "The model's output stopped at its output limit after {tokens} tokens, without submitting a result{reply}",
562
+ "回复在 {tokens} 个 token 处达到输出上限被截断,已提醒模型直接提交(第 {count} 次)": "Reply cut off at the output limit of {tokens} tokens; asked the model to submit directly (attempt {count})",
562
563
  "模型结束了本次执行,没有提交结果(最后一次回复输出 {tokens} 个 token,结束原因 {stop}){reply}": "The model ended this execution without submitting a result (its last reply output {tokens} tokens, stop reason {stop}){reply}",
563
564
  "模型结束了本次执行,没有调用房间工具保存结果(最后一次回复输出 {tokens} 个 token,结束原因 {stop}){reply}": "The model ended this execution without calling a room tool to save a result (its last reply output {tokens} tokens, stop reason {stop}){reply}",
564
565
  "讨论 {session_id} 已到轮数上限并结束。请主持人决定:总结结论、告知用户,或请用户批准后再开一次讨论。": "Discussion {session_id} reached its round limit and ended. The host should decide: summarize the conclusions, tell the user, or ask the user to approve another discussion.",
@@ -681,7 +682,7 @@
681
682
  "用户管理和讨论开关使用房主凭据;本地成员使用本人的 --access-file,不借用其他身份。凭据私下交付,不公开 token。API 参与者遵循相同请求与执行约束,source=api;本地 CLI 使用 source=cli。": "Use the owner credential for room management and discussion controls. Local members use their own --access-file and never borrow another identity. Deliver credentials privately; do not expose tokens. API participants follow the same request and execution rules with source=api; local CLI participants use source=cli.",
682
683
  "runner 成员等待本机接入程序交付任务,用 execution view 核对本次执行和请求,再以 message post --as 本人 --kind chat --execution 本次编号 --access-file FILE 回答。执行失效后保留草稿,不能去掉编号改作普通发言;认领、续租与后续投递由接入程序处理。": "Runner members wait for the local service to deliver tasks, verify the execution and request with execution view, then answer with message post --as YOUR_NAME --kind chat --execution ID --access-file FILE. Keep a draft if an execution becomes invalid; do not remove its ID to post an ordinary message. The local service handles claiming, lease renewal, and delivery.",
683
684
  "manual 本地成员首次用 member register 注册,会话 ID 由 CLI 自动取得;回答用 --request 请求编号,不编造执行编号。讨论不使用原生定时;原会话不能托管时由用户触发。": "A manual local member registers once with member register; the CLI supplies its session ID. Answer with --request REQUEST_ID and do not invent an execution ID. Discussions do not use native scheduling; the user triggers work when the original session cannot be hosted.",
684
- "房间里的 host 可用 --to 点名成员,route 表示未点名的用户请求,handoff 表示派出任务已结束;链上 AI 派活受房间预算限制。--to 多位并加 --sequential 时按点名顺序依次接力,每棒一轮,最后交回主持人;--with 成员与紧挨在前的 --to 同一棒同时做,这一组全部结束才交下一棒;--detach 成员与这次派活同时开工但不等它(失败时通知主持人);--keep-working 派活后自己不结束这一轮、接着工作:这条回答收为派活卡,后续工作另起一张卡,做完照常回答(同一执行凭据即可),派出的工作结束时以通知交回;不能与 --continue、--sequential、--next-review 同用;再加 --loop 则交回为检查点,用 sequence continue --request 交接请求编号开始下一圈,不继续即直接验收。普通成员的 --to 或正文 @ 只保存回应建议,不直接唤醒;不点名自己、不扩大授权。": "A room host can address members with --to. route means an unaddressed user request; handoff means dispatched work has ended. Chained AI assignments are limited by the room budget. With multiple --to members and --sequential, members work in the named order, one round per step, then return to the host. Members named by --with work alongside the immediately preceding --to in the same step; the next step waits for all of them. Members named by --detach start with the assignment but are not awaited; failures notify the host. With --keep-working, the host continues its current turn after dispatch: its answer becomes the dispatch card, later work gets a new card, and the host answers normally when done using the same execution credential. A notice returns the dispatched work when it ends. This option cannot be combined with --continue, --sequential, or --next-review. Adding --loop returns a checkpoint; use sequence continue --request HANDOFF_REQUEST_ID to start another cycle, or accept the result without continuing. An ordinary member's --to or @ mention only records a suggestion and does not wake anyone. Do not address yourself or expand permissions.",
685
+ "房间里的 host 可用 --to 点名成员,route 表示未点名的用户请求,handoff 表示派出任务已结束;链上 AI 派活受房间预算限制。--to 多位并加 --sequential 时按点名顺序依次接力,每棒一轮,最后交回主持人;--with 成员与紧挨在前的 --to 同一棒同时做,这一组全部结束才交下一棒;--detach 成员在后台工作:不等它、不交回、也不占住房间,可单独用或随派活同时开工(失败时通知主持人);--keep-working 派活后自己不结束这一轮、接着工作:这条回答收为派活卡,后续工作另起一张卡,做完照常回答(同一执行凭据即可),派出的工作结束时以通知交回;不能与 --continue、--sequential、--next-review 同用;再加 --loop 则交回为检查点,用 sequence continue --request 交接请求编号开始下一圈,不继续即直接验收。普通成员的 --to 或正文 @ 只保存回应建议,不直接唤醒;不点名自己、不扩大授权。": "A room host can address members with --to. route means an unaddressed user request; handoff means dispatched work has ended. Chained AI assignments are limited by the room budget. With multiple --to members and --sequential, members work in the named order, one round per step, then return to the host. Members named by --with work alongside the immediately preceding --to in the same step; the next step waits for all of them. Members named by --detach work in the background: not awaited, not handed back and not holding the room; usable alone or alongside an assignment; failures notify the host. With --keep-working, the host continues its current turn after dispatch: its answer becomes the dispatch card, later work gets a new card, and the host answers normally when done using the same execution credential. A notice returns the dispatched work when it ends. This option cannot be combined with --continue, --sequential, or --next-review. Adding --loop returns a checkpoint; use sequence continue --request HANDOFF_REQUEST_ID to start another cycle, or accept the result without continuing. An ordinary member's --to or @ mention only records a suggestion and does not wake anyone. Do not address yourself or expand permissions.",
685
686
  "讨论中的用户 @ 直接提问独立排队,不计讨论轮次、不与讨论发言合并。initial 阶段先独立判断;服务端按讨论请求的 read_until 限制读取。直接提问和主持任务不继承该阅读限制。": "A user's @ question during a discussion is queued separately; it does not count as a discussion round or merge with a discussion turn. During the initial phase, experts first form independent opinions. The server enforces each discussion request's read_until boundary. Direct questions and host tasks do not inherit that boundary.",
686
687
  "主持安排前先 turn roster 读取在场专家、waiting、unregistered 和 revision,再 turn create --roster revision;单项和多项都要带凭据,多项计划须覆盖本轮 waiting。继续排队同样先读 roster,再 turn continue --roster revision。状态或新消息变化后旧凭据被拒绝,重新读取再判断;每个回答保存后由程序推进下一项。": "Before scheduling, read turn roster for present experts, waiting, unregistered, and revision; then call turn create --roster REVISION. Include the credential for single and multi-turn plans; a multi-turn plan must cover everyone waiting this round. Before continuing the queue, read the roster again and call turn continue --roster REVISION. Stale credentials are rejected after state or message changes; reread before deciding. The program advances after each answer is saved.",
687
688
  "局部追问先 turn roster 读取 host_requests 的请求与原消息编号,再 turn ask --request ID --expert NAME --roster revision --submission-id UUID;普通提问不计轮次、不改讨论队列,可问已发言者和主持人,只结束指定请求。": "For a follow-up, first read turn roster for the host_requests and source message IDs, then call turn ask --request ID --expert NAME --roster REVISION --submission-id UUID. A direct question does not count as a round or change the discussion queue. It may go to a previous speaker or the host and closes only the specified request.",
@@ -301,7 +301,6 @@
301
301
  "清除搜索": "Clear search",
302
302
  "搜索": "Search",
303
303
  "筛选消息与卡片": "Filter messages and cards",
304
- "未完成的创建或启动请求": "Unfinished create or start requests",
305
304
  "查看原房间": "Open room",
306
305
  "移除待办": "Dismiss",
307
306
  "主持简报": "Host brief",
@@ -330,13 +329,15 @@
330
329
  "启动结果尚未确认;原请求已保存在此浏览器中。": "The start result isn't confirmed yet; the original request is saved in this browser.",
331
330
  "展开房间栏": "Expand room panel",
332
331
  "收起房间栏": "Collapse room panel",
333
- "继续创建房间": "Continue creating room",
334
332
  "继续本次启动": "Continue this start",
335
333
  "展开主持简报": "Expand host brief",
336
334
  "收起主持简报": "Collapse host brief",
337
335
  "已启用它的房间会显示“工作流不可用”,成员改用房间里的设置。": "Rooms using it will show “Workflow unavailable”, and members fall back to the room's settings.",
338
336
  "房间成员、消息记录和项目文件不受影响。": "Room members, messages and project files are not affected.",
339
- "继续未完成的请求": "Continue unfinished requests",
337
+ "查看房间": "Open room",
338
+ "删除记录": "Delete record",
339
+ "结果未确认,点击重试或删除记录": "Result not confirmed; click to retry or delete the record",
340
+ "未确认": "Unconfirmed",
340
341
  "移除待办不会删除房间或停止讨论。": "Dismissing doesn't delete the room or stop the discussion.",
341
342
  "当前未设置项目目录": "No project folder set",
342
343
  "主持人整理的结论、共识与分歧,用 #消息编号 保留依据;讨论结束时保存进下方记录。": "Conclusions, consensus and disagreements gathered by the host, citing #message numbers; saved into the record below when a discussion ends.",
@@ -1,4 +1,9 @@
1
1
  {
2
+ "已跳过": "Skipped",
3
+ "等待中": "Waiting",
4
+ "等待中:等当前执行结束": "Waiting for the current run to finish",
5
+ "在 #{id} 一并回答": "Answered together in #{id}",
6
+ "查看回答 #{id}": "View answer #{id}",
2
7
  "额度已用尽,请等待重置或改派其他成员。": "Usage limit reached. Wait for it to reset or assign another member.",
3
8
  "登录已失效,请在本机重新登录后再试。": "Sign-in has expired. Sign in again on this computer before retrying.",
4
9
  "输出达到上限,请缩短要求的输出或拆分任务。": "Output limit reached. Request a shorter answer or split the task.",
@@ -295,5 +300,6 @@
295
300
  "发送 · Enter": "Send · Enter",
296
301
  "换行": "new line",
297
302
  "接力在等你回答上方的问题卡;这条消息只发给主持人 {value1}": "The relay is waiting for your answer on the question card above; this message goes only to the host {value1}",
298
- "接力在等你回答问题卡…": "The relay is waiting for your answer on the question card…"
303
+ "接力在等你回答问题卡…": "The relay is waiting for your answer on the question card…",
304
+ "修改注释 {value1} · {value2}": "Editing note {value1} · {value2}"
299
305
  }
@@ -553,6 +553,7 @@
553
553
  "关闭排队": "Disable queue",
554
554
  "开启排队": "Enable queue",
555
555
  "排队消息": "Queued messages",
556
+ "{count} 条消息在排队,房间空闲后依次发出": "{count} queued, sent one by one once the room is free",
556
557
  "已暂停排队:你停止了运行": "Queue paused: you stopped the run",
557
558
  "拖动调整顺序(手机上长按)": "Drag to reorder (long-press on mobile)",
558
559
  "图片附件": "Image attachment",
@@ -760,14 +761,8 @@
760
761
  "正在读取改动…": "Reading changes…",
761
762
  "读取改动失败:{value1}": "Could not read changes: {value1}",
762
763
  "改动较长,只显示前面一部分": "Long change; only the first part is shown",
763
- "其他来源 {count} 个文件": "{count} files from other sources",
764
- "同一时间被改动、但不是这位成员的编辑工具写的文件,可能来自其他窗口、成员或构建": "Files changed at the same time but not written by this member's edit tools; they may come from another window, member or a build",
765
764
  "正在上传附件 {value1}/{value2}…": "Uploading attachments {value1}/{value2}…",
766
765
  "正在上传": "Uploading",
767
- "{value1} 已停止": "{value1} stopped",
768
- "{name} 的发言已跳过": "{name}'s turn was skipped",
769
- "{name} {state}:{reason}": "{name} {state}: {reason}",
770
- "未回答": "no answer",
771
766
  "安排 #{value1}": "Arrangement #{value1}",
772
767
  "执行 #{value1}": "Run #{value1}"
773
768
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai_co_discuss",
3
- "version": "0.4.73",
3
+ "version": "0.4.75",
4
4
  "bin": {
5
5
  "codiscuss": "runner/codiscuss.mjs"
6
6
  },
@@ -12,7 +12,7 @@ import { DatabaseSync } from 'node:sqlite';
12
12
  import { atomic_json } from '../files.mjs';
13
13
  import { cli_delivery } from './cli.mjs';
14
14
  import { DENIAL_FIELD, EDIT_TOOLS, json_line, launch_directory, MAX_DENIALS, model_entry, MODEL_PATTERN, not_sent, page_sessions, project_directory,
15
- prompt_title, query_catalog, read_json, same_path, TASK_SUBCOMMANDS, trim_preview } from './common.mjs';
15
+ prompt_title, query_catalog, read_json, same_path, shell_written_paths, TASK_SUBCOMMANDS, trim_preview } from './common.mjs';
16
16
 
17
17
  // agy stores its generation settings as protobuf; field 28 (tag bytes 0xe2 0x01) holds the model actually used.
18
18
  const AGY_MODEL_TAG = [0xe2, 0x01];
@@ -356,6 +356,17 @@ const events = {
356
356
  responses.delete(step.step_index);
357
357
  return text;
358
358
  },
359
+ // A finished file tool names its file (agy 1.5.x: write_file / edit_file with `Path`); a command that writes claims the
360
+ // paths it names, as for Claude. Without this the card could not tell agy's own edits from others' (user 2026-11-17).
361
+ edits(event) {
362
+ const step = event.step_update;
363
+ if (step?.step_type !== 'tool' || step.state !== 'DONE') return [];
364
+ const parameters = step.tool_info?.parameters || {};
365
+ if (step.tool_name === 'run_command') return shell_written_paths(parameters.CommandLine);
366
+ if (!EDIT_TOOLS.test(step.tool_name || '')) return [];
367
+ const path = parameters.Path ?? parameters.AbsolutePath ?? parameters.TargetFile;
368
+ return typeof path === 'string' && path ? [path] : [];
369
+ },
359
370
  detail: agy_detail,
360
371
  };
361
372
 
@@ -87,12 +87,13 @@ function role_tools(context) {
87
87
  tool('read_attachment', `按附件 ID 读取:返回名称、大小、类型与所属消息;UTF-8 文本附件同时返回正文,长的用 offset(从第几个字符起)与 limit(默认 ${ATTACHMENT_CHARS},最多 ${MAX_ATTACHMENT_CHARS})续读;${context.image_input ? '图片随结果附上,可以直接看;' : ''}其余读不到内容的(${context.image_input ? '' : '图片、'}PDF、音视频等)返回 readable: false 与原因`,
88
88
  { id: TEXT, offset: { type: 'integer', minimum: 0 }, limit: { type: 'integer', minimum: 1, maximum: MAX_ATTACHMENT_CHARS } }, ['id']),
89
89
  tool('read_goal', '读取 Goal 的目标、状态、续跑次数、用时与是否空闲'),
90
- ...repo_tools(context), ...file_tools(context.project), ...command_tools(context.commands, context.project), ...image_tools(context.image)];
90
+ // With Pi's own tools (a writable member) its read/edit/write/bash replace our file tools and registered commands.
91
+ ...repo_tools(context), ...(context.native_shell ? [] : [...file_tools(context.project), ...command_tools(context.commands, context.project)]), ...image_tools(context.image)];
91
92
  const answer = { text: { ...TEXT, maxLength: 32000 }, summary: { ...TEXT, maxLength: 1000 }, reply_to: NUMBER,
92
93
  also_request_ids: { type: 'array', items: NUMBER, maxItems: 20, description: '执行中又排队给你、这条回答已一并交付的普通请求编号(read_execution 的 queued_requests),同时关闭;不相关的不要填' },
93
94
  ...(context.image ? { attachments: { type: 'array', maxItems: MAX_MESSAGE_ATTACHMENTS, items: TEXT,
94
95
  description: `要随回答发出的图片附件 ID,按顺序:本次生成的,或 task.unsent_images 里之前生成未发出的;不填则发出本次生成的全部图片(最多 ${MAX_MESSAGE_ATTACHMENTS} 张)` } } : {}) };
95
- const submit = tool('submit_chat', '保存本次执行的完整回答并结束;summary 仅在回答较长时填写;只有主持人可用 to 点名成员,派出的工作做完或失败都会交回你(只点名一位、回答已足以直接给用户时可加 no_handoff: true,失败仍交回);to 点名多位并加 sequential: true 时按点名顺序依次接力、最后交回你,依次接力走完一圈算一轮,再加 loop: true 则交回为检查点;parallel 列出要同一棒同时做的几组成员(每组至少两位、在 to 中相邻),这一组全部结束才交下一棒,组里有人失败则接力停下交回你;gates 在接力中途设检查点(每项 {after: 成员, repeat_from?: 成员, user?: true}):after 所在那一棒结束后交回你,带 repeat_from 时为循环检查点、可从 repeat_from 所在那一棒再来一圈,repeat_from 不能早于前一个检查点;带 user: true 时改为等用户回答问题、不交回你:after 那一棒用 ask_question(handoff)交候选并出题,用户回答后接着往下一棒走(带 repeat_from 则再来一圈),普通聊天不推进,最后一棒之后须带 repeat_from;detach 列出与这次派活同时开工、但不等待的成员(不计入交回或下一棒),它失败时程序通知你;主持人要在房间空闲后接着推进时填 continue(写明继续做什么),算本链一轮;派活时可用 need_rounds(本任务从这次派活起还需要的轮数)加 rounds_reason 向用户申请轮数,超过本链剩余时任务链立即停下等用户批准',
96
+ const submit = tool('submit_chat', '保存本次执行的完整回答并结束;summary 仅在回答较长时填写;只有主持人可用 to 点名成员,派出的工作做完或失败都会交回你(只点名一位、回答已足以直接给用户时可加 no_handoff: true,失败仍交回);to 点名多位并加 sequential: true 时按点名顺序依次接力、最后交回你,依次接力走完一圈算一轮,再加 loop: true 则交回为检查点;parallel 列出要同一棒同时做的几组成员(每组至少两位、在 to 中相邻),这一组全部结束才交下一棒,组里有人失败则接力停下交回你;gates 在接力中途设检查点(每项 {after: 成员, repeat_from?: 成员, user?: true}):after 所在那一棒结束后交回你,带 repeat_from 时为循环检查点、可从 repeat_from 所在那一棒再来一圈,repeat_from 不能早于前一个检查点;带 user: true 时改为等用户回答问题、不交回你:after 那一棒用 ask_question(handoff)交候选并出题,用户回答后接着往下一棒走(带 repeat_from 则再来一圈),普通聊天不推进,最后一棒之后须带 repeat_from;detach 列出在后台工作、不等待的成员(不交回、不占住房间、不计入交回或下一棒;可单独用,也可随 to 同时开工),它失败时程序通知你;主持人要在房间空闲后接着推进时填 continue(写明继续做什么),算本链一轮;派活时可用 need_rounds(本任务从这次派活起还需要的轮数)加 rounds_reason 向用户申请轮数,超过本链剩余时任务链立即停下等用户批准',
96
97
  { ...answer, ...(context.role === 'host' ? { to: { type: 'array', items: TEXT }, sequential: { type: 'boolean' }, loop: { type: 'boolean' }, parallel: { type: 'array', items: { type: 'array', items: TEXT } },
97
98
  gates: { type: 'array', items: { type: 'object', properties: { after: TEXT, repeat_from: TEXT, user: { type: 'boolean' } }, required: ['after'] } }, detach: { type: 'array', items: TEXT }, no_handoff: { type: 'boolean' }, continue: { ...TEXT, maxLength: 300 },
98
99
  need_rounds: { type: 'integer', minimum: 1, maximum: 100 }, rounds_reason: { ...TEXT, maxLength: 300 },
@@ -536,17 +537,22 @@ function skill_text(name, file = 'SKILL.md') {
536
537
  }
537
538
 
538
539
  /** What this member can do with project files, in its environment notes. */
539
- function project_text(project, commands, image_input = false) {
540
+ function project_text(project, commands, image_input = false, native_shell = false) {
540
541
  // A model the owner marked as reading images gets the woken messages' images with the task, as task.attachments lists.
541
542
  const seen = image_input ? '唤醒你的消息里的图片(task.attachments 中的 [图片 #n])已随任务附上,可以直接看;其余' : '';
542
543
  const attachments = `${seen}消息附件用 read_attachment 按 ID 读取:UTF-8 文本能读到正文${image_input ? ',图片随结果附上' : ''},返回 readable: false 时内容读不到`;
543
544
  if (!project) return `- 本地文件你读不到;${attachments}。读不到的以其他成员贴出的为准,不凭文件名猜测;回答涉及时说明你没有读取,缺信息就写明缺什么。`;
544
- const tools = project.writable ? 'read、glob、grep、write、edit' : 'read、glob、grep';
545
+ if (native_shell) {
546
+ const others = project.roots.slice(1).map(item => item.root).join('、');
547
+ return `- 你在项目目录 ${project.root} 中工作,可用 read、bash、edit、write 工具读写文件、运行命令(测试、构建、git 等),和本地 CLI 成员一样;修改已有文件前先 read,局部修改优先用 edit。${others ? `本房间另有项目目录:${others}。` : ''}技能里的草稿文件与 --body-file 不适用:回答正文直接放进 submit_chat,不要写草稿文件。
548
+ - ${attachments};读不到的以其他成员贴出的为准,不凭文件名猜测;回答涉及时说明你没有读取,缺信息就写明缺什么。`;
549
+ }
550
+ const tools = project.writable ? 'read、glob、grep、git、write、edit' : 'read、glob、grep、git';
545
551
  const extras = project.roots.slice(1).map(item => `${item.root}(${item.writable ? '可读写' : '只读'})`).join('、');
546
552
  const runnable = command_tools(commands, project).length > 0;
547
553
  const no_shell = runnable ? '没有通用命令行,只能用 run_command 运行工作流登记的命令(工具说明里列出),其他测试或构建不能运行,需要验证时在回答里说明,交给能运行命令的成员。'
548
554
  : '没有命令行,不能运行测试或构建,需要验证时在回答里说明,交给能运行命令的成员。';
549
- return `- 可用 ${tools} 工具${project.writable ? '读写' : '只读'}本房间的项目目录,路径相对项目目录,不能越出;密钥文件、版本库元数据和接入程序的私有文件会被拒绝。${project.writable
555
+ return `- 可用 ${tools} 工具${project.writable ? '读写' : '只读'}本房间的项目目录,路径相对项目目录,不能越出;密钥文件、版本库元数据和接入程序的私有文件会被拒绝;git 只能运行 diff、log、show、status 查看改动与历史。${project.writable
550
556
  ? `修改已有文件前先 read,局部修改优先用 edit;${no_shell}技能里的草稿文件与 --body-file 不适用:回答正文直接放进 submit_chat,不要用 write 写草稿。`
551
557
  : `项目只读,不能修改文件。${runnable ? '可用 run_command 运行工作流登记的只读命令(工具说明里列出)。' : ''}`}${extras ? `
552
558
  - 本房间另有项目目录,用绝对路径访问:${extras}。` : ''}
@@ -577,10 +583,10 @@ export function system_prompt(context) {
577
583
  const discussion = Boolean(context.discussion_request);
578
584
  const environment = `你是 AI CoDiscuss 房间中的 ${context.participant},职责为 ${context.role}(${discussion ? '房间开启的讨论中的执行' : '房间请求'})。使用中文。
579
585
  下文是本项目的参与技能${host ? '与主持技能' : ''},与本地软件参与者使用同一份。你经本机接入程序以 API 参与,环境差异如下,与技能冲突时以本段为准:
580
- - 只能使用提供的${context.project ? '房间工具和项目文件工具' : '房间工具'},没有${command_tools(context.commands, context.project).length ? '通用' : ''}命令行、浏览器或其他软件。接入程序负责执行认领、续租和凭据管理;你的房间写入工具都绑定本次执行。submit_chat 结果不明(outcome: unknown)时用完全相同的内容再调用一次:提交编号不变,不会产生第二条;其他结果不明的写入不要重试。
586
+ - ${context.native_shell ? '房间操作只用提供的房间工具:bash 里没有本次执行的凭据,不要运行 codiscuss 或 python runner/discuss.py 读写房间。' : `只能使用提供的${context.project ? '房间工具和项目文件工具' : '房间工具'},没有${command_tools(context.commands, context.project).length ? '通用' : ''}命令行、浏览器或其他软件。`}接入程序负责执行认领、续租和凭据管理;你的房间写入工具都绑定本次执行。submit_chat 结果不明(outcome: unknown)时用完全相同的内容再调用一次:提交编号不变,不会产生第二条;其他结果不明的写入不要重试。
581
587
  - 命令与工具对应:room view → read_room;message list / view → read_messages / read_message;execution view → read_execution;attachment view / download → read_attachment;goal view → read_goal;room events → read_events;message post --kind chat → submit_chat。${host ? 'state decision → read_decision(按任务的决策编号读取完整判断);message post --proactive → submit_chat 的 proactive。' : ''}${discussion && host
582
588
  ? '主持讨论工具还包括 state set → save_state;room update → update_topic;turn create --plan-file → arrange_turns;turn continue → continue_plan;turn roster → read_roster,读后 turn ask → ask_interjection;取消安排 → cancel_turn;room limits --done → finish_discussion / declare_done。' : ''}${host ? ' 派活用 to,派出的工作结束后都会交回你;房间空闲后要接着推进时填 continue;message post --sequential / --loop / --with / --checkpoint / --repeat / --detach → submit_chat 的 sequential / loop / parallel / gates / detach;sequence view → read_sequence;sequence continue → continue_sequence。' : ''}${goal_host(context) ? ' goal start → start_goal;goal done / block → finish_goal;goal state → set_goal_state。' : ''}
583
- ${project_text(context.project, context.commands, context.image_input)}${context.external_access ? `
589
+ ${project_text(context.project, context.commands, context.image_input, context.native_shell)}${context.external_access ? `
584
590
  - 你是经另一台电脑加入的外部成员:只有 read_room、read_messages、read_message、submit_chat 与 repo 工具,读不到附件、事件记录,也不能提问。本房间的项目在邀请你的那台电脑上:用 repo_list / repo_read / repo_grep 只读查看对方开放的目录(对应 codiscuss repo ls / read / grep),先用不带参数的 repo_list 取得目录序号 root。` : ''}${context.image ? `
585
591
  - 可用 generate_image 按文字生成图片(含 GIF 动图、SVG 矢量图),edit_image 按消息里的图片附件 ID${context.project ? '或项目内图片' : ''}修改、合成图片,图片模型为 ${context.image.model}。生成的图片存为本次执行的附件,submit_chat 时自动随回答发出(每条最多 ${MAX_MESSAGE_ATTACHMENTS} 张,可用 attachments 选择);task.unsent_images 列出你之前的执行生成后没能发出的图片(那次执行失败了),与本次任务相关时用 attachments 附上,不必重画。${context.project?.writable ? '图片要插进项目文档(如 Markdown)时,用 save_path 存进项目,文档里按相对路径引用。' : ''}你看不到图片内容:回答里说明画了什么、用了哪些参数,不描述没看到的细节,需要人看图确认时请用户或能看图的成员确认。每次调用都计费,不为试探反复生成;被拒或报错时按返回原因调整后再试。` : ''}
586
592
  - ${max_requests(context) ? `本次执行最多 ${max_requests(context)} 次模型请求,每轮都计入;` : ''}互不依赖的读取或修改(如同一文件的多处 edit)在同一轮一次调用多个工具,减少模型请求次数。
@@ -694,6 +700,7 @@ export async function api_delivery(profile, binding, task, spawn_process) {
694
700
  project: open_project(task.api_context, [task.api_context.home, task.directory]) };
695
701
  if (context.image) context.unsent_images = unsent_images(context);
696
702
  context.image_input = takes_images(profile);
703
+ context.native_shell = Boolean(context.project?.writable);
697
704
  prompt = await task_prompt(context);
698
705
  images = (task.images || []).filter(image => image.size <= MAX_INLINE_IMAGE_BYTES)
699
706
  .map(image => ({ type: 'image', data: readFileSync(image.path).toString('base64'), mimeType: image.content_type }));
@@ -702,7 +709,7 @@ export async function api_delivery(profile, binding, task, spawn_process) {
702
709
  throw not_sent(new Error(key ? message.replaceAll(key, '[已隐藏]') : message));
703
710
  }
704
711
  const setup = { ...task.api_context, participant: task.participant, directory: task.directory, task_id: task.id,
705
- expert_prompt: context.expert_prompt, base_url: api_base_url(profile.base_url),
712
+ native_shell: context.native_shell, expert_prompt: context.expert_prompt, base_url: api_base_url(profile.base_url),
706
713
  profile: Object.fromEntries(PROFILE_FIELDS.filter(field => profile[field] !== undefined).map(field => [field, profile[field]])) };
707
714
  const context_file = join(task.directory, `${task.id}-pi-context.json`);
708
715
  const system_file = join(task.directory, `${task.id}-pi-system.md`);
@@ -710,9 +717,11 @@ export async function api_delivery(profile, binding, task, spawn_process) {
710
717
  writeFileSync(system_file, system_prompt(context), { mode: 0o600 });
711
718
  // Without a command line, every file it writes goes through the write tools, so its edit list is complete; a registered
712
719
  // command that changes files writes without telling, so then the list is left untracked.
713
- if (context.project && !runs_write_commands(context.commands, context.project)) task.on_edits?.([]);
720
+ // Pi's own tools (a writable member) are tracked as Claude's are: its write/edit by path and bash by the paths a writing
721
+ // command names.
722
+ if (context.project && (context.native_shell || !runs_write_commands(context.commands, context.project))) task.on_edits?.([]);
714
723
  return pi_delivery({ cli, profile, key, binding, task, context_file, system_file, prompt, images, max_requests: max_requests(context),
715
- project_root: context.project?.root || '', service_home: task.api_context.home, ...(spawn_process ? { spawn_process } : {}) });
724
+ project_root: context.project?.root || '', native_shell: context.native_shell, service_home: task.api_context.home, ...(spawn_process ? { spawn_process } : {}) });
716
725
  }
717
726
 
718
727
  // The call is the runner's own, so it can be aborted and its tool steps are seen.