ai_co_discuss 0.4.84 → 0.4.86
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/.agents/skills/discuss-host/SKILL.md +1 -1
- package/.agents/skills/discuss-host/references/members.md +53 -0
- package/.agents/skills/discuss-host/references/workflow.md +2 -2
- package/.agents/skills/discuss-participant/SKILL.md +1 -1
- package/README.md +1 -1
- package/README.zh-CN.md +1 -1
- package/backend/external_members.py +37 -4
- package/backend/free_room.py +18 -10
- package/docs/en/runner.md +12 -13
- package/docs/en/workflow.md +1 -1
- package/docs/runner.md +12 -13
- package/docs/workflow.md +1 -1
- package/frontend/locales/en/app.json +3 -1
- package/frontend/locales/en/backend.json +1 -1
- package/frontend/locales/en/discussion.json +1 -1
- package/frontend/locales/en/external.json +31 -38
- package/frontend/locales/en/room.json +1 -0
- package/package.json +2 -2
- package/runner/adapters/antigravity_app.mjs +42 -3
- package/runner/adapters/antigravity_cli.mjs +48 -4
- package/runner/adapters/api.mjs +1 -1
- package/runner/adapters/claude.mjs +56 -12
- package/runner/adapters/cli.mjs +1 -1
- package/runner/adapters/codex_app.mjs +45 -3
- package/runner/adapters/index.mjs +3 -1
- package/runner/adapters/profiles.mjs +8 -5
- package/runner/discussion_launch.mjs +4 -2
- package/runner/discussion_runner.mjs +2 -1
- package/runner/external_client.mjs +60 -47
- package/runner/external_gateway.mjs +7 -1
- package/runner/free_runner.mjs +108 -24
- package/runner/i18n_en.mjs +8 -6
- package/runner/remote_policy.mjs +0 -6
- package/runner/slash_names.mjs +19 -0
- package/web/app.js +28 -4
- package/web/backup.js +1 -1
- package/web/i18n.js +3 -3
- package/web/join.html +2 -2
- package/web/modern.css +1 -1
- package/web/modern.js +65 -64
|
@@ -31,6 +31,6 @@ description: "AI CoDiscuss 的主持技能,仅主持人调用,且须同时
|
|
|
31
31
|
|
|
32
32
|
怎么规划由你判断;只在会改变方向的关键歧义处向用户确认。派活写清谁做什么、做到什么程度,怎么拆、按什么步骤做交给成员——他们背后的软件自己会规划。执行性工作(读长文、写汇总、核对证据、跑测试)派给成员,你做判断、裁定与汇总,上下文与额度留给整个房间的推进。用户的倾向、成员意见一致都不等于已验证事实。
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
用户没指定人选、要你自己挑人或挑模型时(分派、换模型或强度、邀请成员、组织讨论),参考 `room view` 的 `descriptions`(用户写的各成员擅长与分工,优先)和 [成员分工参考](references/members.md)(用户偏好与各家模型的长短)。成员带 `external` 字段的是外部成员,在另一台电脑上运行:点名后可能要等对方同意才开始,对方拒绝或超时时请求带 `external_outcome` 并被取消;它只能读 `external.directories` 里的目录、提交自己的回答,不能派活。出图、改图优先派给能看图的本机软件成员,它能下载附件自查效果;没有 `image` 字段时请用户在“协作设置”添加生图卡片。
|
|
35
35
|
|
|
36
36
|
任务带 `scheduler_suggestions` 时,那是智能调度说明某条消息或交接为何交给你(附置信度),不是用户指令,也未核实:按其中的 `request_id`、`message_id` 先读原文再决定是否采纳,需要依据时 `state decision ROOM DECISION_ID`。`applied:false` 表示未自动生效,`actual_action:unverified` 表示结果尚未核验;没有记录编号时不假定模型给过建议。
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# 成员分工参考
|
|
2
|
+
|
|
3
|
+
> 更新:2026-11-19。社区口碑与公开跑分整理,只作参考。
|
|
4
|
+
|
|
5
|
+
**何时用**:用户没指定谁做什么、要你自己挑人或挑模型时(派活、换模型或强度、邀请成员、组织讨论)。大多数时候照用户的安排做。
|
|
6
|
+
|
|
7
|
+
**谁说了算**:用户这次的要求 > “协作设置”里的成员说明(`descriptions`)> 成员在本房间的实际表现 > 本页。
|
|
8
|
+
|
|
9
|
+
## 挑人前先看
|
|
10
|
+
|
|
11
|
+
- **项目权限**:要改文件或跑命令的活,先在 `room view` 核对成员权限,只读成员只派审阅和核对。只读的 Antigravity 跑网站命令以外的命令会直接结束本轮。
|
|
12
|
+
- **软件不同,表现不同**:成员是“软件 + 模型 + 强度”的组合。API 成员强度只有 low / medium / high,能读网页和项目文件、可写时能跑命令,做不了主活的也可派搜集、核对、整理,不要晾着。
|
|
13
|
+
- **贵模型不默认派**:Claude Fable 这类最贵的模型,同样的活额度消耗是常用模型的数倍,用户要求或别的确实解决不了时再用。
|
|
14
|
+
- **讨论选人**:主持人之外每家厂商各派一位代表,不让同一家的两位同场:同一家的看法往往相近。
|
|
15
|
+
|
|
16
|
+
## 各家一览
|
|
17
|
+
|
|
18
|
+
| 厂商(软件) | 模型 ID(强 → 快) | 适合 | 注意 |
|
|
19
|
+
|---|---|---|---|
|
|
20
|
+
| Claude(Claude Code) | `claude-fable-5-2`、`claude-opus-5-5`、`claude-sonnet-5-5`、`claude-haiku-5-5` | Opus 主刀长任务、前端设计与审美;Fable 审计、诊断、卡住的难题;Sonnet 常规代码初审 | Fable 额度消耗约为 Opus 的 3–4 倍 |
|
|
21
|
+
| GPT(Codex) | `gpt-6.2-astra`、`gpt-6.2-sol`、`gpt-6.1-terra`、`gpt-6-luna` | 推理、审查挑错、复杂排障;Astra 做前端版式与 3D;小修用 Sol | 易思考过度,强度从中档起步;中文常带防御腔,面向用户的中文让别家润色 |
|
|
22
|
+
| Gemini(Antigravity) | `gemini-4-carbon`、`gemini-4-neon`、`gemini-4-argon`、`gemini-4-hydrogen` | 写小说、长篇中文用 Argon 或 Carbon;其他日常活用 Neon;Hydrogen 便宜跑量;幻觉低、超长文本强 | 执行慢,显示掉登录或额度耗尽多半是假的,多重试;输出排版差;`/swarm` 很费额度 |
|
|
23
|
+
| DeepSeek | `deepseek-flash` | 便宜快速,多步执行稳,适合量大的简单活 | 复杂长链条任务容易原地打转;强度用 high 即可;`deepseek-v4-pro` 停在 8 月版本、比 Flash 旧,现阶段不用 |
|
|
24
|
+
| Kimi | — | 规划、前端还原、多步工具调用 | 慢、贵、常限流;跑分有人称有水分 |
|
|
25
|
+
| GLM | — | 后端逻辑少出错,中文古风文笔好 | 慢 |
|
|
26
|
+
| Qwen | `qwen4-max`、`qwen3.7-plus`、`qwen3.8-flash` | 本地部署首选 | 容易过度思考 |
|
|
27
|
+
| MiniMax | — | 便宜 | 写代码弱;工具调用要配好专用框架(有人称) |
|
|
28
|
+
| Grok | `grok-4.7` | 上下文长、单价低于 Opus | 4.7 口碑偏弱、修 bug 慢、烧 token;优先派简单活 |
|
|
29
|
+
|
|
30
|
+
## 纸面能力(截至 2026-11-19)
|
|
31
|
+
|
|
32
|
+
分差在各榜误差内算持平;榜上多是最高强度的成绩,日常中档会低一些。
|
|
33
|
+
|
|
34
|
+
| 维度(榜单) | 第一梯队(彼此持平) | 其余 / 备注 |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| 命令行端到端(Terminal-Bench 4.x,CLI 软件 + 模型;API 成员无成绩) | Claude Code + Opus 5.5 / Fable 5.2 / Sonnet 5.5,Antigravity + Carbon,Codex + 6.2 Astra / Sol(62–66%,误差约 ±3) | Grok Build + Grok 4.7 仅 38.8% |
|
|
37
|
+
| 代码能否被合并(FrontierCode 2.0) | Fable 5.2(49%) | Opus 5.5、6.2 Astra、6.2 Sol 在 44–46% |
|
|
38
|
+
| 综合(AA 智能指数,转述) | Fable 5.2、6.2 Astra、Neon、Carbon、Opus 5.5(59–65) | 6.2 Sol 57,Hydrogen 54 |
|
|
39
|
+
| 专项 | 行业推理:Fable 5.2、Neon、Sonnet 5.5;超长文本:Neon;3D 建模:6.2 Astra | 幻觉率:Hydrogen 8%,Sonnet 5.5 43% |
|
|
40
|
+
|
|
41
|
+
## 生图模型
|
|
42
|
+
|
|
43
|
+
房间生图卡片目前只接 OpenAI,其他家的模型要靠能调用它们的成员自己出图。两家都是连续多轮编辑会越改越偏,重要的图尽量一两轮内定稿。
|
|
44
|
+
|
|
45
|
+
| 模型 | 适合 | 注意 |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `gpt-image-2.6-sunburst` | 求画质,文生图榜第一,改图细节稳;支持 GIF、SVG、圈图修改 | 有人称图常带噪点 |
|
|
48
|
+
| `gpt-image-2.6-flare` | 求快,人像与文字排版好 | 同上 |
|
|
49
|
+
| `gemini-nano-banana-2.1` | 又快又省,1K–4K,最多 14 张参考图,角色一致,排版准;出图干净,电商改图常用 | 画质要求更高用 `gemini-3-pro-image` |
|
|
50
|
+
|
|
51
|
+
## 决策模型
|
|
52
|
+
|
|
53
|
+
只做是非、选择、打分并给出概率,用于批量判断与分流。AA 决策指数:Drex Max v1.1、GLiDE v1.2 并列 73 分,Drex Max 成本最低;Jev 1.14、Gemini Decision 1 都是 66 分,Jev 更便宜,Gemini Decision 1 能处理音频和视频;OpenAI、微软的决策模型低于 66 分。
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
- `workflow.missing` 是启用后才新增、还没有成员的卡片,要用时运行 `<cli> launch workflow-join --card 卡片ID …`(API 主持人请用户在右栏点工作流的“刷新”)。
|
|
11
11
|
- 离开或被移除的角色不要自行请回或另找人代替,在回答里说明缺谁。
|
|
12
12
|
|
|
13
|
-
`workflow.sub_workflows` 是主线之外按需使用的子工作流(如检查、试演),各有 SKILL.md 和成员卡片:请求与它的 `description`
|
|
13
|
+
`workflow.sub_workflows` 是主线之外按需使用的子工作流(如检查、试演),各有 SKILL.md 和成员卡片:请求与它的 `description` 相符、用户点名(任务的 `named_workflows.sub_workflows` 列出它)或主线写明此处用它时才用,读法同上。它的角色只在用时加入:开工前 `<cli> launch workflow-join --sub 子工作流ID …`,用完 `<cli> launch workflow-leave --sub 子工作流ID …` 设为离开(会话保留);`workflow.members` 里带 `sub_workflow` 的成员就是它的角色。参数见 `<cli> launch workflow-join --help`。API 主持人没有命令行,请不进这些角色,在回答里说明缺谁。
|
|
14
14
|
|
|
15
15
|
## 保存与启用
|
|
16
16
|
|
|
17
17
|
用户请你把本房间的做法存成工作流(或要你按某种分工新建一套流程),或消息里写了 `$workflow-creator` 时,按 [workflow-creator](../../workflow-creator/SKILL.md) 技能做;是新建还是修改已有工作流,按用户写的内容判断。任务有 `host_workflows: true` 时,房主已允许你自行保存并启用,不必等用户导入。
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
用户请你启用工作流库里已有的工作流(任务的 `named_workflows.workflows` 列出它,或用户用文字说明)时:任务有 `host_workflows: true` 就运行 `<cli> launch workflow-adopt --id <工作流 ID> …`,程序启用它、邀请缺少的卡片成员,返回 `members` 和 `skill_path`;本次要接着按它做时读 `skill_path`,下一次执行起任务里有 `workflow` 字段。用户只说了启用时,回答说明已启用和带来了谁即可。没有该字段或你是 API 主持人时不能启用,请用户在“成员与设置 → 协作设置”打开“主持人完整权限”。
|
|
@@ -9,7 +9,7 @@ description: "AI CoDiscuss 的通用参与技能,所有参与者(包括主
|
|
|
9
9
|
|
|
10
10
|
## 场景
|
|
11
11
|
|
|
12
|
-
房间是所有工作的底座,讨论和 Goal 是在房间里临时开启的模式;任务里的 `mode: "free"` 指房间本身。任务已列出 `skills`
|
|
12
|
+
房间是所有工作的底座,讨论和 Goal 是在房间里临时开启的模式;任务里的 `mode: "free"` 指房间本身。任务已列出 `skills` 时直接读它们(主持人同样适用)。用户点名你时写的 `/名称` 或 `$名称` 是你本机的技能,表示请你调用它。
|
|
13
13
|
|
|
14
14
|
| 场景 | 读 |
|
|
15
15
|
|---|---|
|
package/README.md
CHANGED
|
@@ -110,7 +110,7 @@ Details: [Architecture](docs/en/architecture.md) · [Setup](docs/en/runner.md)
|
|
|
110
110
|
- **From a phone or tablet** — after connecting once and saving your usual projects on that computer, pair a phone or tablet with it once by scanning a QR code at the computer, then use the same site to create rooms whose agents that computer wakes. Folder paths stay on the computer. See [From other devices](docs/en/runner.md#from-other-devices).
|
|
111
111
|
- **From an AI chat** — ask a local agent to use the `discuss-host` and `discuss-participant` skills to create and host a room. See [From an AI chat](docs/en/runner.md#from-an-ai-chat).
|
|
112
112
|
- **Model APIs** — configure provider, base URL, protocol and model per member. See [API access](docs/en/runner.md#api-access).
|
|
113
|
-
- **Borrow an AI from another computer** — invite an agent running on someone else's computer (or another of yours) into your room as an external member: it reads only the project folders you open, answers in the room, and you can see every file it read and revoke it at any time. Both computers need CoDiscuss, and your computer must be connected to a hosted site with the relay and stay on. What it reads reaches that computer's model provider. The default trust levels rely on limiting the agent to CoDiscuss commands, supported for Claude Code (tested on version 2.1.325) and model APIs (backed by unit tests); Codex and Antigravity do not support it. See [External members](docs/en/runner.md#external-members-borrowing-an-ai-from-another-computer).
|
|
113
|
+
- **Borrow an AI from another computer** — invite an agent running on someone else's computer (or another of yours) into your room as an external member: it reads only the project folders you open, answers in the room, and you can see every file it read and revoke it at any time. Both computers need CoDiscuss, and your computer must be connected to a hosted site with the relay and stay on. What it reads reaches that computer's model provider. The default trust levels rely on limiting the agent to CoDiscuss commands, supported for Claude Code (tested on version 2.1.325), the Antigravity CLI (tested on version 1.5.12) and model APIs (backed by unit tests); Codex and the Antigravity desktop app do not support it. See [External members](docs/en/runner.md#external-members-borrowing-an-ai-from-another-computer).
|
|
114
114
|
|
|
115
115
|
## Deployment
|
|
116
116
|
|
package/README.zh-CN.md
CHANGED
|
@@ -104,7 +104,7 @@ flowchart LR
|
|
|
104
104
|
- **手机或平板建房**:在电脑上连接一次并保存常用项目后,在电脑前扫码配对一次手机或平板,之后用同一网站即可新建房间,由那台电脑唤醒 AI,项目路径只留在电脑上。见 [其他设备经已配对电脑建房](docs/runner.md#其他设备经已配对电脑建房)。
|
|
105
105
|
- **从 AI 对话发起**:让本地 AI 使用 `discuss-host` 和 `discuss-participant` 技能建房并主持。见 [从 AI 对话发起](docs/runner.md#从-ai-对话发起)。
|
|
106
106
|
- **模型 API**:按成员配置供应商、Base URL、请求协议与模型。见 [API 接入](docs/runner.md#api-接入)。
|
|
107
|
-
- **借用另一台电脑上的 AI**:邀请别人电脑(或你自己另一台电脑)上的 AI 作为外部成员进入你的房间,它只读你开放的项目目录、在房间里回答,你能看到它读过的每个文件并随时撤销。两台电脑都要安装共议,你的电脑须连接带中转的线上网站并保持开机;它读到的内容会发送给对方的模型服务商。默认的信任等级依赖把对方 AI 限制为只用共议命令,目前支持 Claude Code(已在 2.1.325 版实测)与模型 API(以单元测试为据),Codex 与 Antigravity
|
|
107
|
+
- **借用另一台电脑上的 AI**:邀请别人电脑(或你自己另一台电脑)上的 AI 作为外部成员进入你的房间,它只读你开放的项目目录、在房间里回答,你能看到它读过的每个文件并随时撤销。两台电脑都要安装共议,你的电脑须连接带中转的线上网站并保持开机;它读到的内容会发送给对方的模型服务商。默认的信任等级依赖把对方 AI 限制为只用共议命令,目前支持 Claude Code(已在 2.1.325 版实测)、Antigravity CLI(已在 1.5.12 版实测)与模型 API(以单元测试为据),Codex 与 Antigravity 桌面版不支持。见 [外部成员](docs/runner.md#外部成员借用另一台电脑上的-ai)。
|
|
108
108
|
|
|
109
109
|
## 部署
|
|
110
110
|
|
|
@@ -22,6 +22,8 @@ EXTERNAL_HEADER = "X-CoDiscuss-External"
|
|
|
22
22
|
BRIDGE_HEADER = "X-CoDiscuss-Bridge"
|
|
23
23
|
EXTERNAL_PREFIX = ["api", "external", "rooms"]
|
|
24
24
|
SCOPES = ("discuss", "read")
|
|
25
|
+
# How many ended external members the roster still lists.
|
|
26
|
+
MAX_ENDED_SHOWN = 10
|
|
25
27
|
QUOTA_KEYS = ("hourly_bytes", "total_bytes", "hourly_reads")
|
|
26
28
|
DEFAULT_QUOTA = {"hourly_bytes": 4 * 1024 * 1024, "total_bytes": 64 * 1024 * 1024, "hourly_reads": 600}
|
|
27
29
|
MAX_QUOTA = {"hourly_bytes": 1024 ** 3, "total_bytes": 100 * 1024 ** 3, "hourly_reads": 100000}
|
|
@@ -121,14 +123,24 @@ def owner_view(connection, row):
|
|
|
121
123
|
|
|
122
124
|
def room_view_field(connection, member_id):
|
|
123
125
|
"""The `external` field of a member in the room view, or None for a local member; no local paths."""
|
|
124
|
-
row = connection.execute("SELECT scope,expires_at,machine_label,platform,model,directories,claimed_at,invite_version
|
|
125
|
-
|
|
126
|
+
row = connection.execute("""SELECT scope,expires_at,machine_label,platform,model,directories,claimed_at,invite_version,ended_at,end_reason
|
|
127
|
+
FROM external_members WHERE member_id=?""", (member_id,)).fetchone()
|
|
126
128
|
if not row:
|
|
127
129
|
return None
|
|
128
130
|
return {"scope": row["scope"], "expires_at": row["expires_at"], "machine_label": row["machine_label"],
|
|
129
131
|
"platform": row["platform"], "model": row["model"],
|
|
130
132
|
"directories": directory_names(json.loads(row["directories"])), "claimed_at": row["claimed_at"],
|
|
131
|
-
"invite_version": row["invite_version"]}
|
|
133
|
+
"invite_version": row["invite_version"], "ended_at": row["ended_at"], "end_reason": row["end_reason"]}
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
def ended_view(connection, room_id):
|
|
137
|
+
"""External members that checked in and have since ended (expired, left or revoked), newest first, so the roster
|
|
138
|
+
can still show who was here and why they went; they take no requests."""
|
|
139
|
+
rows = connection.execute("""SELECT m.id,m.name,m.adapter,m.role,m.status,m.access,m.session_mode,m.read_until
|
|
140
|
+
FROM room_members m JOIN external_members x ON x.member_id=m.id
|
|
141
|
+
WHERE m.room_id=? AND m.status='removed' AND x.claimed_at>0 AND x.ended_at>0 ORDER BY x.ended_at DESC LIMIT ?""",
|
|
142
|
+
(room_id, MAX_ENDED_SHOWN)).fetchall()
|
|
143
|
+
return [{**dict(row), "external": room_view_field(connection, row["id"])} for row in rows]
|
|
132
144
|
|
|
133
145
|
|
|
134
146
|
def external_row(connection, room_id, member_id):
|
|
@@ -311,12 +323,14 @@ def update_external(connection, room_id, member_id, token, payload, now):
|
|
|
311
323
|
action = payload.get("action")
|
|
312
324
|
if action in ("invite", "bind", "activate"):
|
|
313
325
|
return seat_action(connection, row, payload, now)
|
|
326
|
+
if action == "reopen":
|
|
327
|
+
return reopen_member(connection, row, now)
|
|
314
328
|
if action == "revoke":
|
|
315
329
|
if row["status"] == "active":
|
|
316
330
|
end_member(connection, row, "revoked")
|
|
317
331
|
return owner_view(connection, external_row(connection, room_id, member_id))
|
|
318
332
|
if action != "update":
|
|
319
|
-
raise ValueError(Text("action 须为 update 或
|
|
333
|
+
raise ValueError(Text("action 须为 update、revoke 或 reopen"))
|
|
320
334
|
if row["status"] != "active":
|
|
321
335
|
raise classified(FileExistsError, Text("外部成员已结束,不能再调整;需要时重新邀请"), "external_ended", reason=row["end_reason"])
|
|
322
336
|
scope = payload.get("scope", row["scope"])
|
|
@@ -331,6 +345,25 @@ def update_external(connection, room_id, member_id, token, payload, now):
|
|
|
331
345
|
return owner_view(connection, external_row(connection, room_id, member_id))
|
|
332
346
|
|
|
333
347
|
|
|
348
|
+
def reopen_member(connection, row, now):
|
|
349
|
+
"""Turn an ended external member back into a seat awaiting check-in, so a new link brings the same member back: its
|
|
350
|
+
name, label and history in the room stay. The old credential and binding are cleared; a seat already waiting is left."""
|
|
351
|
+
if row["status"] == "active":
|
|
352
|
+
return owner_view(connection, row)
|
|
353
|
+
if not row["ended_at"]:
|
|
354
|
+
raise FileExistsError(Text("外部成员不存在"))
|
|
355
|
+
if connection.execute("SELECT 1 FROM room_members WHERE room_id=? AND name=? AND status<>'removed' AND id<>?",
|
|
356
|
+
(row["room_id"], row["name"], row["id"])).fetchone():
|
|
357
|
+
raise FileExistsError(Text("{name} 已是本房间成员", name=row["name"]))
|
|
358
|
+
if connection.execute("SELECT COUNT(*) FROM room_members WHERE room_id=? AND status<>'removed'", (row["room_id"],)).fetchone()[0] >= MAX_ROOM_AGENTS:
|
|
359
|
+
raise FileExistsError(Text("房间成员已满"))
|
|
360
|
+
connection.execute("UPDATE room_members SET status='active',role='member',token_hash='' WHERE id=?", (row["id"],))
|
|
361
|
+
connection.execute("""UPDATE external_members SET ended_at=0,end_reason='',claimed_at=0,machine='',token_hash='',
|
|
362
|
+
expires_at=?,created_at=?,updated_at=? WHERE member_id=?""", (now + PENDING_SEAT_SECONDS, now, now, row["id"]))
|
|
363
|
+
free_room.sync_participants(connection, row["room_id"])
|
|
364
|
+
return owner_view(connection, external_row(connection, row["room_id"], row["id"]))
|
|
365
|
+
|
|
366
|
+
|
|
334
367
|
def seat_action(connection, row, payload, now):
|
|
335
368
|
"""Version an invitation or bind and activate its fixed seat under the owner transaction."""
|
|
336
369
|
if row["status"] != "active":
|
package/backend/free_room.py
CHANGED
|
@@ -1144,7 +1144,8 @@ def free_view(connection, room_id):
|
|
|
1144
1144
|
WHERE w.room_id=? AND w.key LIKE 'checkin:%' AND NOT EXISTS (SELECT 1 FROM member_requests d WHERE d.message_id=r.answer_id)
|
|
1145
1145
|
ORDER BY w.message_id DESC LIMIT ?""", (room_id, RECENT_EXECUTIONS))]
|
|
1146
1146
|
return {"failure_wakes": failure_wakes, "quiet_checkins": quiet_checkins, "host_checkin": {"minutes": checkin["interval_seconds"] // 60, "due_at": checkin["due_at"]} if checkin else None,
|
|
1147
|
-
"members": members, "
|
|
1147
|
+
"members": members, "ended_externals": external_members.ended_view(connection, room_id),
|
|
1148
|
+
"requests": requests[::-1], "executions": recent_executions(connection, room_id),
|
|
1148
1149
|
"conflicts": possible_conflicts(connection, room_id, names), "halted_chains": chains, "max_rounds": max_rounds,
|
|
1149
1150
|
"chain_rounds": progress, "recommendations": recent_recommendations(connection, room_id, now)[::-1],
|
|
1150
1151
|
"queued_messages": queue_view(connection, room_id), "questions": questions.room_questions_view(connection, room_id)}
|
|
@@ -1411,8 +1412,9 @@ def check_answer(connection, room_id, member, payload):
|
|
|
1411
1412
|
raise PermissionError(Text("执行编号不属于本成员"))
|
|
1412
1413
|
if row["status"] == "completed":
|
|
1413
1414
|
# The host dispatched with keep_working and went on in the same turn: its answer belongs to where that turn went.
|
|
1414
|
-
|
|
1415
|
-
|
|
1415
|
+
# A continuation stopped or failed since takes the answer as that one's late answer, which ends its hold.
|
|
1416
|
+
row = continuation_end(connection, row)
|
|
1417
|
+
execution_id = payload["execution_id"] = row["id"]
|
|
1416
1418
|
revived = revive_failed(connection, room_id, row) if row["status"] == "failed" else None
|
|
1417
1419
|
if revived:
|
|
1418
1420
|
row = revived
|
|
@@ -1450,12 +1452,15 @@ def check_keep_working(member, payload):
|
|
|
1450
1452
|
raise ValueError(Text("keep_working 只能由本机接入的主持人在派活(to)时使用,值为 true,不能与 continue、sequential 或 next_review 同用"))
|
|
1451
1453
|
|
|
1452
1454
|
|
|
1453
|
-
def
|
|
1454
|
-
"""The
|
|
1455
|
-
|
|
1455
|
+
def continuation_end(connection, row):
|
|
1456
|
+
"""The last execution a host's `keep_working` moved this answered execution's turn onto, in whatever state it is now;
|
|
1457
|
+
the row itself when its turn did not move."""
|
|
1458
|
+
while row["status"] == "completed":
|
|
1456
1459
|
link = connection.execute("SELECT next_id FROM execution_continuations WHERE execution_id=?", (row["id"],)).fetchone()
|
|
1457
|
-
|
|
1458
|
-
|
|
1460
|
+
if not link:
|
|
1461
|
+
break
|
|
1462
|
+
row = connection.execute("SELECT * FROM member_executions WHERE id=?", (link[0],)).fetchone()
|
|
1463
|
+
return row
|
|
1459
1464
|
|
|
1460
1465
|
|
|
1461
1466
|
def keep_working(connection, room_id, host, message_id, chain_id, execution_id):
|
|
@@ -3373,12 +3378,15 @@ def late_answer(connection, room_id, execution_id, token):
|
|
|
3373
3378
|
|
|
3374
3379
|
|
|
3375
3380
|
def record_stop_result(connection, room_id, execution_id, result):
|
|
3376
|
-
"""Record a stop idempotently; an unconfirmed stop may later gain a confirmed outcome
|
|
3381
|
+
"""Record a stop idempotently; an unconfirmed stop may later gain a confirmed outcome, and an unstoppable one the
|
|
3382
|
+
runner kept following may later be seen to end (`stopped`), in its window or App or on its own."""
|
|
3377
3383
|
if result not in STOP_RESULTS:
|
|
3378
3384
|
raise ValueError(Text("result 须为 {value1}", value1='、'.join(STOP_RESULTS)))
|
|
3379
3385
|
saved = connection.execute("""INSERT INTO execution_capabilities (execution_id,room_id,stop_result) VALUES (?,?,?)
|
|
3380
3386
|
ON CONFLICT(execution_id) DO UPDATE SET stop_result=excluded.stop_result
|
|
3381
|
-
WHERE stop_result
|
|
3387
|
+
WHERE stop_result<>excluded.stop_result
|
|
3388
|
+
AND (stop_result IN ('','unconfirmed') OR (stop_result='unstoppable' AND excluded.stop_result='stopped'))""",
|
|
3389
|
+
(execution_id, room_id, result))
|
|
3382
3390
|
if saved.rowcount:
|
|
3383
3391
|
return False
|
|
3384
3392
|
previous = connection.execute("SELECT stop_result FROM execution_capabilities WHERE execution_id=?", (execution_id,)).fetchone()[0]
|
package/docs/en/runner.md
CHANGED
|
@@ -89,25 +89,24 @@ Invite an AI on another computer into your room: it reads only the project files
|
|
|
89
89
|
**Before you start**: both computers install CoDiscuss and run the local service; your computer is [connected to a hosted site](#from-a-hosted-site) with the relay deployed, and the other side reaches your room through that site's encrypted relay. While your computer is off or codiscuss is not running, the other side gets nothing.
|
|
90
90
|
|
|
91
91
|
**Invite (your computer)**:
|
|
92
|
-
1. In the new-room panel or Invite members, click "External expert +" on the External row (once per expert), then on the card's back select
|
|
92
|
+
1. In the new-room panel or Invite members, click "External expert +" on the External row (once per expert), then on the card's back select what they can see (Room messages / Messages and project) and the membership duration after check-in. "Messages and project" opens all of the room's project folders.
|
|
93
93
|
2. Choose Add a seat awaiting check-in (automatic when creating the room). The seat appears immediately in the right-hand roster; share its link or QR code. The link lasts 10 minutes and binds one member; regenerating it invalidates the previous link. Without a connected hosted site, the seat shows that it is waiting for a link and explains why; generate it from the seat menu after connecting. Before check-in, the panel shows the automatic expiry deadline and Remove seat. Usage, read logs and access adjustments appear after check-in.
|
|
94
94
|
3. Redemption completes check-in and starts the membership duration, with **no extra approval step**. Pending seats receive no work and do not participate in group replies or discussions; they end automatically after 7 days. An expired link leaves the seat intact.
|
|
95
|
-
4. `@` it in the room; its answers appear in the conversation as usual. "Read log and access" in the member menu lists every file it read (recorded by your computer) and lets you extend,
|
|
95
|
+
4. `@` it in the room; its answers appear in the conversation as usual. "Read log and access" in the member menu lists every file it read (recorded by your computer) and lets you extend, switch to messages only, or revoke; revoking takes effect immediately. Once a member has ended (expired, left or revoked) it stays dimmed below the roster with the reason; Invite back makes a new link that brings the same member back, keeping its name and history in the room. If the other side still keeps its invited-room record, that record and its settings carry on; if it was deleted, a new one starts.
|
|
96
96
|
5. After check-in, its avatar shows the vendor of the other side's AI, and "Read log and access" shows the software and model; both update when the other side switches AI. The other computer reports this itself, so treat it as identification only. A custom endpoint shows the external expert icon.
|
|
97
97
|
|
|
98
98
|
**Join (the other computer)**:
|
|
99
99
|
1. Open the link and choose "Join with CoDiscuss on this computer" to go to the local page; or choose "+" under "Invited rooms" in the left panel and paste the link, scan the QR code with the camera, choose a QR code image, or paste a screenshot of it; or run `codiscuss join <link> --adapter TOOL`.
|
|
100
|
-
2. Pick the AI, model and effort,
|
|
100
|
+
2. Pick the AI, model and effort, then two settings (Answer at once · Room only by default, with no further confirmation after joining):
|
|
101
101
|
|
|
102
|
-
|
|
|
103
|
-
| --- | --- |
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
| Trusted computer | Woken directly, no limits; later invites from that computer are accepted at this level | Unrestricted: local files and network tools available |
|
|
102
|
+
| Setting | Options |
|
|
103
|
+
| --- | --- |
|
|
104
|
+
| When named | Answer at once: no wake count or time limit · Ask me: woken only after you approve in the right panel each time; declining, or 15 minutes without an answer, shows "Not accepted by the other side" |
|
|
105
|
+
| On this computer | Room only: limited to CoDiscuss commands, running in an empty temporary folder · Unrestricted: can read local files and use the network |
|
|
107
106
|
|
|
108
|
-
|
|
107
|
+
Both are kept per room; you can change them later in the invited room's right panel, or pause or leave. Once the room has ended, you can delete its record from this computer. `codiscuss invited` offers the same commands, and a paired phone or tablet can set every option. The local service does the waking, so keep codiscuss running.
|
|
109
108
|
|
|
110
|
-
**Supported tools**:
|
|
109
|
+
**Supported tools**: Room only needs a tool that can be limited to CoDiscuss commands. Claude Code (background runs) supports it, tested on version 2.1.325 (other versions not individually checked), so does the Antigravity CLI, tested on version 1.5.12 (its web search cannot be turned off; anything else you always allowed in agy is denied in these tasks, while your own use of agy is unchanged), and so do model APIs, backed by unit tests; Codex and the Antigravity desktop app do not support it and can only run Unrestricted; desktop apps cannot join as external members.
|
|
111
110
|
|
|
112
111
|
**What it can read**: files Git tracks in the opened folders (including uncommitted changes, skipping files in `.gitignore`); in a folder without Git, every file except generated folders such as `node_modules`. `.env`-style files, private keys and certificates, credential files, `.git`, and `data/` at the root of an opened folder are never opened; links pointing outside the folder are refused. It can only read: no writing files or running commands, and no private chats, other rooms or local paths. Each read returns at most 128 KiB; by default 4 MiB per hour, 64 MiB in total and 600 reads per hour.
|
|
113
112
|
|
|
@@ -132,15 +131,15 @@ Choose a provider and enter a key under **Smart Scheduling** (智能调度) when
|
|
|
132
131
|
|
|
133
132
|
## Workflows (Optional)
|
|
134
133
|
|
|
135
|
-
A workflow saves one way of working together so other rooms can reuse it: a SKILL.md for the host to read, plus a set of agent cards (each card is one expert preset). Workflows are managed in the **Workflows** list below **Channel tools** in the left sidebar; click one to open it in the middle of the page, with or without a room open. To use one in a room, ask the host to start it (typing `/` in the input box and picking a workflow writes
|
|
134
|
+
A workflow saves one way of working together so other rooms can reuse it: a SKILL.md for the host to read, plus a set of agent cards (each card is one expert preset). Workflows are managed in the **Workflows** list below **Channel tools** in the left sidebar; click one to open it in the middle of the page, with or without a room open. To use one in a room, ask the host to start it (typing `/` in the input box and picking a workflow writes `/<workflow-id>` for you; see the permission below). The host then organises the work as the SKILL.md says. A workflow only brings a method and members; when no flow is drawn it does not guarantee the order of steps, and the host decides the details. You can @ any member at any time.
|
|
136
135
|
|
|
137
136
|
- **Bundled workflows**: the package ships three. "Serial fiction" (`story-serial`: a screenwriter, a writer, two critics and a recorder take turns episode by episode, with a reader who reads the text on request; it comes with project templates and a state-check script that needs Python's PyYAML). "Decision council" (`decision-council`: a contrarian, an outsider, an alternatives role and an executor each answer on their own, then argue over the real disagreements, and the host sums up a recommendation). "Classic tabletop RPG" (`trpg-classic`: a dungeon master and three AI players, with an optional seat for you; it comes with a rules summary, an original adventure and a dice script that needs Python). None is installed by default. When you run `codiscuss setup` in a terminal, an **Install settings** step follows the tool selection: it opens with an overview, → expands a group, Space ticks the workflows to install, and Enter continues; nothing ticked means nothing installed. You can also add `--workflows` to install all of them (`install` accepts it too, and non-interactive runs only honour this option). An existing workflow with the same name is replaced by the packaged version, and the old copy is first backed up to `backups/workflows/` in the service folder. The choice applies to this run only and is not remembered.
|
|
138
137
|
- **Saving**: click **+** to the right of the **Workflows** heading in the left sidebar (on a phone, open the sidebar from the top-left corner first) and choose **New**, or import a zip or folder someone shared. Imported content is previewed on the canvas and is written only when you click **Save**. Copying the folder path and deleting are under **…** on each list item. The edit page can import cards from the current room's members, keeping their prompts as written. To have the host draft one, turn on **Full host control** (below).
|
|
139
138
|
- **Flow canvas**: clicking a workflow shows its canvas in the middle and its SKILL.md on the right; on phones and upright tablets, switch between the two at the top. Each member is an expert card: drag its title bar to move it, click it to flip and edit, × to delete. **Members** at the top left adds cards and **Host** adds a host node; you can also drag from the dot on a card's right side to empty space to add a member already connected. Lines show who hands over to whom: a line back to an earlier card is drawn as a gold dashed loop, and a host node means the work returns to the host. Select a line or a host node to add a short note. Save with the **Save** button or Ctrl+S; undo and redo with Ctrl+Z and Ctrl+Shift+Z. **…** on a list item renames, disables, copies the folder path or deletes; a disabled workflow stays in the library but rooms cannot enable it. The lines only help you read the workflow: the program does not execute them and the host does not see them. The host assigns work by the SKILL.md, so order, parallel steps, hand-backs and rework all belong there.
|
|
140
|
-
- **Letting the host build one**: tick **Full host control** when creating a room or under **Members and settings → Collaboration settings**, then tell the host what division of work you want (or "save how this room works as a workflow"). It saves the workflow, enables it in the room, invites its members and starts assigning work; you do not need to import anything or add members. With the switch on, typing `/` and picking a saved workflow writes the
|
|
139
|
+
- **Letting the host build one**: tick **Full host control** when creating a room or under **Members and settings → Collaboration settings**, then tell the host what division of work you want (or "save how this room works as a workflow"). It saves the workflow, enables it in the room, invites its members and starts assigning work; you do not need to import anything or add members. With the switch on, typing `/` and picking a saved workflow writes `/<workflow-id>`, which asks the host to enable it; add what you want done and send it. Members the host brings in get at most writable project access. Only a host running in a local tool can do this; an API host cannot.
|
|
141
140
|
- **What else Full host control covers**: the host handles problems in the room and keeps the work moving on its own: it interjects when a member drifts, interrupts or retries a stuck member (including its own failed run), switches models, and replaces members that cannot recover. You can also just say "stop the writer", "stop everything", "let the critic speak next", "invite a read-only Codex reviewer", "start a Goal to finish the remaining episodes" or "pause the discussion". It only invites tools configured on this computer, read-only by default and writable at most. When a member produces no new output for 10 minutes, the system reminds the host to check; the host can also set itself a recurring check every 5–120 minutes during long tasks. These stay with you: other actions on the host itself (interrupting it, changing its project access, setting it away, removing it) or replacing the host, approving rounds beyond the limit, access above writable or allowing tools, changing the project folder, withdrawing your messages, and private chats.
|
|
142
141
|
- **Sharing**: workflows live in the `workflows` folder of the local service folder, one folder per workflow. Copy the path from the edit page and send the whole folder (or a zip of it). An import lists each card's prompt and project access; cards that ask to write files are imported as read-only until you tick them one by one.
|
|
143
|
-
- **Sub-workflows**: a method used only when needed, outside the main line, can be a sub-workflow with its own SKILL.md, cards and canvas, stored under `workflows/<sub-workflow ID>/` inside the workflow folder. Switch, create or delete them in the **Main workflow and sub-workflows** list at the top left of the canvas; they are saved together with the main workflow. While a workflow is running, typing `/` also lists its sub-workflows, and the host may use them on its own. The host invites the members a sub-workflow needs and sets them away afterwards; their sessions are kept for next time. The whole folder is still a standard skill, so other AI tools can read it as one.
|
|
142
|
+
- **Sub-workflows**: a method used only when needed, outside the main line, can be a sub-workflow with its own SKILL.md, cards and canvas, stored under `workflows/<sub-workflow ID>/` inside the workflow folder. Switch, create or delete them in the **Main workflow and sub-workflows** list at the top left of the canvas; they are saved together with the main workflow. While a workflow is running, typing `/` also lists its sub-workflows (picking one writes `/<sub-workflow-id>` for the host), and the host may use them on its own. The host invites the members a sub-workflow needs and sets them away afterwards; their sessions are kept for next time. The whole folder is still a standard skill, so other AI tools can read it as one.
|
|
144
143
|
- **Commands for API members**: read-only API members have no command line (writable ones use Pi's own). Put a `commands.json` in the workflow folder (see the `workflow-creator` skill) to register commands they may run, such as a check script kept in the same folder. Once enabled, API members can only run these commands by name and cannot change the command line; read-only members can only run commands marked read-only. Commands run on this computer as you, so when you import someone else's workflow the edit page lists every full command and brings them along only if you tick **Allow these commands to run on this computer**. The host cannot add or remove commands when drafting or changing a workflow.
|
|
145
144
|
- **Changing and ending**: changes to a workflow apply to every room that has it enabled, from each member's next run. New cards do not enter a room automatically; the host adds them when needed, or click the refresh icon on the workflow row in the right column. Card prompts are read-only in the room and are edited on the workflow's canvas. While a workflow is running, the host uses it only for requests that match its purpose (or when you say to follow the workflow) and handles other requests as usual. To end it, click the dismiss-members icon on the workflow row under **Members and settings → Collaboration settings**: the members it brought leave (the host stays), their work in progress stops and the workflow ends. Their sessions are kept, so picking the workflow again with `/` brings the same members back with their earlier context. To switch workflows, just pick another one; the previous members stay as ordinary members.
|
|
146
145
|
|
package/docs/en/workflow.md
CHANGED
|
@@ -92,7 +92,7 @@ From the member panel you can:
|
|
|
92
92
|
|
|
93
93
|
- **Invite** members. A member card offers three ways to start:
|
|
94
94
|
- **Automatic start**: this computer starts a new, empty session.
|
|
95
|
-
- **History** (Claude Code, Codex, Antigravity CLI): opens a window listing that software's past sessions by time, like `claude -r` or Codex's `/resume`. Search it, show this project's sessions or all of them, and preview the latest messages of the selected one.
|
|
95
|
+
- **History** (Claude Code, Codex, Antigravity CLI): opens a window listing that software's past sessions by time, like `claude -r` or Codex's `/resume`. Search it, show this project's sessions or all of them, and preview the latest messages of the selected one. On its first wake-up the program copies the picked session into a new one and resumes that copy in the background, so the member joins with the context it already has. The original stays unchanged, even with its window still open, but opening it later in the original software (for example with `claude -r`) will not show the room's turns. Through the Codex App nothing is copied: tasks go straight into that session in the App. An Antigravity CLI session keeps its own project and agy permissions; the room's project access does not apply to it.
|
|
96
96
|
- **Manual start**: run the start instruction in a conversation you already have open; room tasks are then delivered into that window where possible.
|
|
97
97
|
|
|
98
98
|
Experts invited during a discussion join the end of the current round.
|
package/docs/runner.md
CHANGED
|
@@ -120,25 +120,24 @@ codiscuss local connect https://你的站点
|
|
|
120
120
|
**前提**:两台电脑都安装共议并运行本机服务;你的电脑已[连接线上网站](#线上网页连接本机)并部署了中转,对方经这个网站的加密中转访问你的房间。你的电脑关机或 codiscuss 未运行时,对方什么也拿不到。
|
|
121
121
|
|
|
122
122
|
**邀请(你的电脑)**:
|
|
123
|
-
1. 建房面板或右栏“邀请成员”里点“外部”一行的“外部专家
|
|
123
|
+
1. 建房面板或右栏“邀请成员”里点“外部”一行的“外部专家 +”(可加多位),翻到卡片背面设置“对方能看到”(房间消息 / 消息和项目)和签到后的有效期。选“消息和项目”时开放本房间的全部项目目录。
|
|
124
124
|
2. 点“添加待签到席位”(建房时自动添加),右栏名单立即显示待签到成员;把席位的链接或二维码发给对方。链接 10 分钟有效,只能绑定一位成员;重新生成会立即作废旧链接。未绑定线上站点时显示“待生成链接”及原因,绑定站点后从席位菜单生成。待签到面板显示自动结束期限,可“移除席位”;签到后才显示用量、读取记录和授权调整。
|
|
125
125
|
3. 对方兑换即完成签到,成员有效期从兑换时开始,**没有额外批准步骤**。未签到不收任务、不参与全体回应或讨论,7 天后自动结束;链接过期不会删除席位。
|
|
126
|
-
4. 在房间里 `@`
|
|
126
|
+
4. 在房间里 `@` 它,回答照常出现在对话中。成员菜单的“读取记录与权限”列出它读过的每个文件(由你的电脑记录),可延长、改为只看消息或撤销授权,撤销立即生效。成员结束后(到期、对方退出或撤销)仍灰显在名单下方并写明原因,点“重新邀请”可生成新链接把原成员请回:名字和房间里的历史不变;对方若还保留那条被邀请记录,记录与设置也接着用,删了则新建。
|
|
127
127
|
5. 签到后头像显示对方 AI 的厂家,“读取记录与权限”里可看到软件和模型;对方换 AI 后自动更新。这些信息由对方电脑自报,仅供辨认。自定义接口显示外部专家图标。
|
|
128
128
|
|
|
129
129
|
**加入(对方电脑)**:
|
|
130
130
|
1. 打开链接,点“用本机共议加入”跳到本机网页;或在左栏“被邀请的房间”点“+”粘贴链接,也可以用相机扫码、选择二维码图片或粘贴二维码截图;命令行为 `codiscuss join <链接> --adapter 软件`。
|
|
131
|
-
2. 选派哪个 AI
|
|
131
|
+
2. 选派哪个 AI、模型与强度,再选两项(默认“直接回答 · 只在房间里发言”,加入后无需再确认):
|
|
132
132
|
|
|
133
|
-
|
|
|
134
|
-
| --- | --- |
|
|
135
|
-
|
|
|
136
|
-
|
|
|
137
|
-
| 信任设备 | 直接唤醒,不设上限;之后这台电脑发来的邀请按此等级直接接受 | 不受限,可用本机文件与联网工具 |
|
|
133
|
+
| 设置 | 选项 |
|
|
134
|
+
| --- | --- |
|
|
135
|
+
| 被点名时 | 直接回答:不设次数与期限上限 · 先问我:每次在右栏同意才唤醒,拒绝或 15 分钟未处理,对方看到“对方未同意” |
|
|
136
|
+
| 在这台电脑上 | 只在房间里发言:只能用共议命令,在空的临时目录运行 · 不受限:可读本机文件、联网 |
|
|
138
137
|
|
|
139
|
-
|
|
138
|
+
两项都按房间分别保存,之后可在被邀请房间的右栏调整,也可暂停或退出,房间结束后可删除这台电脑上的记录;`codiscuss invited` 有同样的命令,已配对的手机或平板也能设置全部选项。唤醒由本机服务完成,请保持 codiscuss 运行。
|
|
140
139
|
|
|
141
|
-
|
|
140
|
+
**支持的软件**:“只在房间里发言”要求软件能限制为只用共议命令,目前支持 Claude Code(后台运行,已在 2.1.325 版实测,其他版本未逐一验证)、Antigravity CLI(已在 1.5.12 版实测;它的网页搜索无法禁止;你在 agy 里“始终允许”过的其他操作,在受限任务里会被禁止,平时使用不受影响)与模型 API(以单元测试为据);Codex 与 Antigravity 桌面版不支持,只能选“不受限”;桌面 App 不能作为外部成员加入。
|
|
142
141
|
|
|
143
142
|
**能读到什么**:开放目录中 Git 管理的文件(含未提交的改动,忽略 `.gitignore` 里的文件),非 Git 目录则是除 `node_modules` 等生成目录外的文件。`.env` 一类文件、私钥与证书、凭据文件、`.git`、开放目录根下的 `data/` 永不开放;指向目录外的链接被拒绝。它只能读,不能写文件或执行命令,也看不到私聊、其他房间和本机路径。每次最多读 128 KiB,默认每小时 4 MiB、总量 64 MiB、每小时 600 次。
|
|
144
143
|
|
|
@@ -169,15 +168,15 @@ API 成员可以担任专家或主持人。房间指定了项目目录时,只
|
|
|
169
168
|
|
|
170
169
|
## 工作流(可选)
|
|
171
170
|
|
|
172
|
-
工作流把一种多人协作的做法存下来,供别的房间复用:一份给主持人读的 SKILL.md,加一组 Agent 卡片(每张就是一个专家预设)。工作流在左侧栏“频道工具”下方的“工作流”列表里管理,点一项就在中间打开它(没打开房间时也能用):查看 SKILL.md、成员卡片和示意图,新建、导入、编辑、删除都在这里。要在房间里用时,在输入框要求主持人启动(打 `/`
|
|
171
|
+
工作流把一种多人协作的做法存下来,供别的房间复用:一份给主持人读的 SKILL.md,加一组 Agent 卡片(每张就是一个专家预设)。工作流在左侧栏“频道工具”下方的“工作流”列表里管理,点一项就在中间打开它(没打开房间时也能用):查看 SKILL.md、成员卡片和示意图,新建、导入、编辑、删除都在这里。要在房间里用时,在输入框要求主持人启动(打 `/` 选工作流会写好 `/工作流ID`,权限见下文);主持人此后按说明组织工作。它只带来做法和成员;没画流程时不保证工序,具体怎么做由主持人判断。你随时可以 @ 任何成员。
|
|
173
172
|
|
|
174
173
|
- **内置工作流**:安装包自带三套。“小说剧本连载”(`story-serial`:编剧、写手、两位批评家与记录员逐集接力,另有一位读者按需读正文,附项目模板与状态检查脚本,脚本需要 Python 的 PyYAML);“决策会审”(`decision-council`:反方、局外人、另辟选项、执行者四个角色先各自独立作答,再围绕分歧交锋,由主持人综合出建议);“经典跑团”(`trpg-classic`:一位地下城主加三位 AI 玩家,用户可选亲自上场,附规则速查、一个原创冒险和掷骰脚本,脚本需要 Python)。默认不安装。在终端里运行 `codiscuss setup` 时,选完软件后有一步“安装配置”:先显示概览,按 → 展开,用空格勾选要装的工作流,回车继续;不勾就不装。也可以直接加 `--workflows` 安装全部(`install` 同样适用,非交互运行只认这个选项)。装的时候,已有同名的会覆盖为包里的最新版,原来那份先备份到服务目录的 `backups/workflows/`。选择只对这一次有效,不会记住,不选就不动工作流库。
|
|
175
174
|
- **保存**:点左侧栏“工作流”标题右侧的“+”(手机上先点左上角打开侧栏),选“新建”,或导入别人分享的 zip 或文件夹(手机、平板上同样可用)。导入的内容先放上画布预览,点“保存”才写入。复制文件夹路径和删除工作流在列表项的“…”里。编辑页可以“从当前房间成员导入”卡片,提示词保持原文。想让主持人起草,打开下面的“主持人完整权限”。
|
|
176
175
|
- **流程画布**:在左侧栏“工作流”列表里点一项,中间换成它的画布,右边是它的 SKILL.md;点任一房间或频道工具回到房间。手机和竖着拿的平板上,顶部在“画布”和“工作流”(即 SKILL.md)之间切换。每位成员就是一张专家卡片,拖卡片上方的标题栏移动,点卡片翻面设置,× 删除。左上“成员”添加卡片(平台、预设,或当前房间的成员),“主持人”添加主持人节点;也可以从卡片右侧的圆点拖线到空白处,就地选要加的成员并自动连上。名称在页面顶部标题处直接改,左上按钮组最后的“保存”或 Ctrl+S 保存,右上角是放大、缩小和适配;列表里每项右边的“…”可以重命名、停用、复制文件夹路径或删除(停用的工作流留在库里,但房间里不能再启用,已启用它的房间改用房间里的设置,随时可以再启用);左上有撤销、重做(Ctrl+Z、Ctrl+Shift+Z),双击空白处或鼠标中键双击复位视图。连线用来示意谁接谁:从「开始」右侧的圆点拖线连到卡片,连回前面的卡片画成金色虚线表示循环,主持人节点表示交回主持人判断。选中一条连线或一个主持人节点,可以写一句说明,如“同时审”“返工”“不等交回”“验收”。同一角色出场两次时,在“成员”菜单底部“已有成员再放一次”里点它。打开时按看得清卡片的大小从“开始”那端显示,双击空白处看全图。用 `workflow-creator` 新建或修改工作流时,AI 会照 SKILL.md 一起画好这张图。连线只帮你看懂工作流,程序不执行它,主持人也看不到;主持人派活按的是 SKILL.md(就在画布右侧,默认显示排好版的内容,点“编辑”修改;面板可以拖宽或收起),顺序、同时做、什么时候交回、要不要返工都写在那里。
|
|
177
|
-
- **让主持人自己建**:建房时(第 3 节“协作方式”)或在“成员与设置 → 协作设置”勾选“主持人完整权限”后,直接对主持人说要什么分工(或“把这个房间的做法存成工作流”),它会自己保存、在本房间启用,并邀请工作流里的成员,接着就按流程派活,不需要你导入或添加成员。之后让它改流程,改动从成员下一次执行起生效。打开这个开关后,也可以在输入框输入 `/`
|
|
176
|
+
- **让主持人自己建**:建房时(第 3 节“协作方式”)或在“成员与设置 → 协作设置”勾选“主持人完整权限”后,直接对主持人说要什么分工(或“把这个房间的做法存成工作流”),它会自己保存、在本房间启用,并邀请工作流里的成员,接着就按流程派活,不需要你导入或添加成员。之后让它改流程,改动从成员下一次执行起生效。打开这个开关后,也可以在输入框输入 `/` 选一个已保存的工作流,输入框里会写好 `/工作流ID`,补上要做的事发给主持人,它就启用这个工作流并带来成员(没打开时该项灰显)。主持人带来的成员项目权限最高为可写;只有本地软件担任的主持人能这样做,API 主持人不行。
|
|
178
177
|
- **主持人完整权限的其他控制**:同一个开关打开后,主持人会自己处理房间里的问题、持续推进:成员跑偏时插话、卡住时打断或重试(它自己的执行失败时程序会提醒它一次,它可以重试自己、补交结果,或给自己换模型)、模型不可用时换模型、无法恢复时换人;你也可以直接说“停下写手”“全部停下”“下一个让批评家先说”“请一位 Codex 进来只读评审”“把记录员请出去”“开个 Goal 把剩下几集写完”“暂停讨论”。邀请只用本机已配置的软件,项目权限默认只读、最高可写,邀请暂离中的成员会把它按原名请回;它自己开的 Goal 用你的默认预算(不限时为 8 次续跑、90 分钟)。成员连续 10 分钟没有新输出时,系统会提醒主持人检查;主持人派出长任务时还可以给自己设定时检查(每 5–120 分钟一次;房间空闲时再提醒它最后一次,确认做完了还是还有下一步,之后结束)。它也能撤回自己派出的活,正在循环的接力会立即停下。以下仍由你决定:对主持人自己的其他操作(打断、改项目权限、暂离、移除)或更换主持人、批准超出上限的轮数、高于可写的权限或放行工具、改项目目录、撤回你的消息、私聊。API 主持人没有命令行,不能这样做。
|
|
179
178
|
- **分享**:工作流存在本机服务目录的 `workflows` 文件夹,一个工作流一个文件夹;编辑页可复制路径,把整个文件夹(或打成 zip)发给对方即可分享。导入时会列出每张卡片的提示词和项目权限;要求写文件的卡片默认按只读导入,逐张勾选后才放开。
|
|
180
|
-
- **子工作流**:主线之外按需用的一套做法(比如检查成稿的 AI 率、请几位专家代入主角试演一场戏)可以做成子工作流:它有自己的 SKILL.md、成员卡片和画布,放在工作流文件夹的 `workflows/<子工作流ID>/` 下。在工作流页画布左上角工具条下方的“主线与子工作流”列表里切换、新建或删除,切过去后画布和右侧(手机上为“子工作流”页签)显示它自己的内容,和主线一起保存;手机上这个列表默认收起,显示当前在看哪一个。工作流进行中,在输入框打 `/`
|
|
179
|
+
- **子工作流**:主线之外按需用的一套做法(比如检查成稿的 AI 率、请几位专家代入主角试演一场戏)可以做成子工作流:它有自己的 SKILL.md、成员卡片和画布,放在工作流文件夹的 `workflows/<子工作流ID>/` 下。在工作流页画布左上角工具条下方的“主线与子工作流”列表里切换、新建或删除,切过去后画布和右侧(手机上为“子工作流”页签)显示它自己的内容,和主线一起保存;手机上这个列表默认收起,显示当前在看哪一个。工作流进行中,在输入框打 `/` 会多出“工作流「名称」的子工作流”一组,选一项就写好 `/子工作流ID`,发给主持人即按它做;主持人也会在合适的时候自己用。用到它的成员时,主持人把这些成员请进来,用完设为离开,会话保留,下次接着用。整个工作流文件夹仍是标准的技能格式,拷到别的 AI 软件里也能当技能读。
|
|
181
180
|
- **给 API 成员登记命令**:只读的 API 成员没有命令行(可写的直接用 Pi 自带的命令行,不需要登记)。工作流文件夹里放一个 `commands.json`(写法见 `workflow-creator` 技能),登记它们能运行的命令(例如检查脚本,脚本也放在工作流文件夹里),随工作流一起分享;启用后 API 成员只能按名字运行这些命令,改不了命令行,只读成员只能运行标为只读的命令。命令以你的身份在本机运行,所以导入别人的工作流时,编辑页会列出每条完整命令,勾选“允许这些命令在本机运行”才会带上;主持人起草或修改工作流时不能增删命令。
|
|
182
181
|
- **修改与结束**:修改工作流会作用于所有启用它的房间,成员下一次执行就按新内容;新增的卡片不会自动进入房间,主持人用到时会自己补上,也可以在右栏工作流一行点刷新图标立即补齐(删掉的卡片,其成员留作普通成员;与库一致时不显示该图标);工作流卡片的提示词只读,在工作流页的画布上修改。工作流进行中时,主持人只在请求和它的用途相符(或你说按工作流做)时才用,其他请求照常处理。用完在“成员与设置 → 协作设置”的工作流一行点请离成员图标(或逐个让成员离开):工作流带来的成员离开(主持人保留),正在进行的工作随之停止,工作流结束,右栏这一块消失;成员会话保留,下次在输入框打 `/` 选它就把原成员请回来,接着原来的上下文。换工作流时直接选另一个,原来的成员留作普通成员。
|
|
183
182
|
|
package/docs/workflow.md
CHANGED
|
@@ -94,7 +94,7 @@ Goal 不扩大权限:主持人仍受成员项目权限和连续派活轮数限
|
|
|
94
94
|
|
|
95
95
|
- **邀请**成员。成员卡上有三种启动方式:
|
|
96
96
|
- **程序启动**:由本机新建一个空白会话。
|
|
97
|
-
- **历史会话**(Claude Code、Codex、Antigravity CLI):弹出该软件的历史会话窗口,像 `claude -r`、Codex 的 `/resume`
|
|
97
|
+
- **历史会话**(Claude Code、Codex、Antigravity CLI):弹出该软件的历史会话窗口,像 `claude -r`、Codex 的 `/resume` 那样按时间列出会话,可搜索、只看本项目或全部,右侧预览选中会话最近的对话;选定后,程序在第一次唤醒时把它复制成一个新会话并在后台续接,成员带着已有上下文加入。原会话保持不变,原窗口开着也不受影响;但之后在原软件里打开原会话(如 `claude -r`),看不到房间里的记录。经 Codex App 接入时不复制,任务直接送进 App 里的这个会话。Antigravity CLI 的会话沿用它原来的项目与 agy 权限,房间的项目权限对它不生效。
|
|
98
98
|
- **手动启动**:在你已打开的对话里执行启动指令注册,之后房间的任务会尽量送进那个窗口。
|
|
99
99
|
|
|
100
100
|
讨论中新邀请的专家排在本轮队尾。
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"{value1} 已请回,续接原会话。": "{value1} brought back, resuming the original session.",
|
|
98
98
|
"发言顺序刚有变化,已更新为最新顺序,请重新调整": "The speaking order changed and has been refreshed; please reorder again",
|
|
99
99
|
"{value1} 已接入原会话;它工作时请不要在原窗口继续操作。": "{value1} connected to the original session. Avoid using its original window while it works.",
|
|
100
|
+
"{value1} 已加入,在原会话的分叉上工作;原会话里看不到房间里的后续记录。": "{value1} joined and works in a fork of the original session; the original will not show what happens in the room.",
|
|
100
101
|
"{value1} 已加入,之后点名它即会由本机服务唤醒。": "{value1} joined. Mention it to have the local service wake it.",
|
|
101
102
|
"留言已保存 · #{value1}": "Message saved · #{value1}",
|
|
102
103
|
"留言已保存,但页面刷新失败:{value1}": "Message saved, but page refresh failed: {value1}",
|
|
@@ -213,6 +214,7 @@
|
|
|
213
214
|
"续接你已有的 App 会话:任务直接送进 App 里的这个会话,可在其中查看": "Resume your existing App session. Tasks go directly to that session and can be viewed there.",
|
|
214
215
|
"续接你自己的会话:原窗口开着时任务直接送进该窗口;窗口关闭时改在后台续接,期间不要重新打开该会话": "Resume your own session. Tasks go to the original window while it is open, or resume in the background when closed. Avoid reopening it during background work.",
|
|
215
216
|
"续接你已有的会话;它工作时请不要在原窗口继续操作": "Resume your existing session. Avoid using its original window while it works.",
|
|
217
|
+
"从你已有的会话分叉而来;原会话里看不到房间里的后续记录": "Forked from your existing session; the original will not show what happens in the room.",
|
|
216
218
|
"手动启动": "Manual start",
|
|
217
219
|
"来自 Codex CLI 模型列表": "From the Codex CLI model list",
|
|
218
220
|
"来自 Claude CLI 模型列表": "From the Claude CLI model list",
|
|
@@ -307,7 +309,7 @@
|
|
|
307
309
|
"已作废": "Invalidated",
|
|
308
310
|
"正在停止": "Stopping",
|
|
309
311
|
"正在停止 {value1}": "Stopping {value1}",
|
|
310
|
-
"{value1} 在自己的窗口或 App
|
|
312
|
+
"{value1} 在自己的窗口或 App 里,本机停不了,仍会继续生成;要立即中断,请到它的窗口或 App 里手动停止": "{value1} runs in its own window or App and cannot be stopped from here; it keeps generating. To interrupt it now, stop it by hand in that window or App.",
|
|
311
313
|
"{value1} 的本次工作已作废": "{value1}'s current work was invalidated",
|
|
312
314
|
"已撤回;{value1}": "Withdrawn. {value1}",
|
|
313
315
|
";{value1} 的会话未回退,仍记得这条消息": ". The sessions of {value1} were not rolled back and still remember this message",
|
|
@@ -779,7 +779,7 @@
|
|
|
779
779
|
"answers 的 selected 须为选项列表": "selected in answers must be a list of options",
|
|
780
780
|
"第 {item} 题不接受自由回答": "Question {item} does not take a free answer",
|
|
781
781
|
"第 {item} 题是单选:选一个选项,或填写自由回答": "Question {item} takes one choice: choose an option or write a free answer",
|
|
782
|
-
"action 须为 update 或
|
|
782
|
+
"action 须为 update、revoke 或 reopen": "action must be update, revoke or reopen",
|
|
783
783
|
"bytes 须为 0–{limit} 的整数": "bytes must be an integer from 0 to {limit}",
|
|
784
784
|
"client_id 已被使用": "This client_id is already in use",
|
|
785
785
|
"directories 须为最多 {count} 个目录,每个不超过 {length} 字": "directories must list at most {count} directories of up to {length} characters each",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"引用文件:{value1}": "File references: {value1}",
|
|
36
36
|
"{value1} 之后仍交来了回答,未采纳:不进入记录,其他 AI 读不到。": "{value1} later submitted a reply, which was not accepted. It is excluded from the record and hidden from other AI members.",
|
|
37
37
|
"本机尚未确认进程结束,可能仍在生成;网站不再接受本次回答。": "The computer has not confirmed the process stopped; it may still be generating. Replies from this run are no longer accepted.",
|
|
38
|
-
"{value1} 在自己的窗口或 App
|
|
38
|
+
"{value1} 在自己的窗口或 App 里,本机停不了,可能仍在生成;要立即中断,请到它的窗口或 App 里手动停止。": "{value1} runs in its own window or App and cannot be stopped from here; it may still be generating. To interrupt it now, stop it by hand in that window or App.",
|
|
39
39
|
"正在停止": "Stopping",
|
|
40
40
|
"等待本机服务结束进程。": "Waiting for the local service to stop the process.",
|
|
41
41
|
"待投递": "Waiting to deliver",
|