ai_co_discuss 0.6.6 → 0.6.7

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 (72) hide show
  1. package/.agents/skills/discuss-host/references/room.md +2 -0
  2. package/.agents/skills/discuss-observer/SKILL.md +15 -0
  3. package/.agents/skills/workflow-creator/SKILL.md +3 -0
  4. package/README.md +4 -0
  5. package/README.zh-CN.md +4 -0
  6. package/backend/free_room.py +242 -41
  7. package/backend/identity.py +1 -1
  8. package/backend/message_queue.py +1 -1
  9. package/backend/moss_delegation.py +84 -5
  10. package/backend/moss_window_messages.py +145 -1
  11. package/backend/observer.py +216 -0
  12. package/backend/schema.sql +50 -0
  13. package/backend/server.py +483 -50
  14. package/backend/session_room.py +6 -1
  15. package/docs/en/guide/cli.md +8 -0
  16. package/docs/en/guide/first-run.md +2 -0
  17. package/docs/en/guide/members.md +41 -0
  18. package/docs/en/guide/rooms.md +1 -1
  19. package/docs/en/guide/steward.md +15 -5
  20. package/docs/en/guide/workflows.md +10 -5
  21. package/docs/en/guide/working.md +1 -1
  22. package/docs/guide/cli.md +8 -0
  23. package/docs/guide/first-run.md +2 -0
  24. package/docs/guide/members.md +41 -0
  25. package/docs/guide/rooms.md +1 -1
  26. package/docs/guide/steward.md +13 -5
  27. package/docs/guide/workflows.md +10 -5
  28. package/docs/guide/working.md +1 -1
  29. package/frontend/locales/en/analytics.json +2 -0
  30. package/frontend/locales/en/app.json +7 -3
  31. package/frontend/locales/en/backend.json +50 -0
  32. package/frontend/locales/en/room.json +43 -1
  33. package/frontend/locales/en/settings.json +3 -1
  34. package/package.json +2 -1
  35. package/runner/adapters/api.mjs +59 -21
  36. package/runner/adapters/codebuddy.mjs +387 -0
  37. package/runner/adapters/codebuddy_edit_hook.mjs +53 -0
  38. package/runner/adapters/deepseek_harness.mjs +104 -0
  39. package/runner/adapters/grok_cli.mjs +290 -0
  40. package/runner/adapters/index.mjs +14 -3
  41. package/runner/adapters/profiles.mjs +65 -0
  42. package/runner/channel_bot.mjs +1 -1
  43. package/runner/channel_onebot.mjs +108 -11
  44. package/runner/channels.mjs +120 -19
  45. package/runner/codiscuss.mjs +18 -8
  46. package/runner/discuss.py +62 -12
  47. package/runner/discussion_launch.mjs +152 -42
  48. package/runner/discussion_runner.mjs +3 -1
  49. package/runner/discussion_service.mjs +4 -2
  50. package/runner/discussion_setup.mjs +48 -33
  51. package/runner/discussion_skills.mjs +1 -1
  52. package/runner/expert_prompts.mjs +9 -1
  53. package/runner/experts.mjs +14 -2
  54. package/runner/free_runner.mjs +195 -47
  55. package/runner/host_permissions.mjs +3 -0
  56. package/runner/i18n_en.mjs +86 -2
  57. package/runner/moss_windows.mjs +376 -95
  58. package/runner/pinyin.mjs +49 -0
  59. package/runner/project_files.mjs +1 -48
  60. package/runner/qq_faces.mjs +5 -0
  61. package/runner/scheduler.mjs +21 -4
  62. package/runner/steward.mjs +9 -5
  63. package/runner/workflows.mjs +25 -9
  64. package/web/app.js +51 -18
  65. package/web/backup.js +1 -1
  66. package/web/i18n.js +4 -3
  67. package/web/icons/codebuddy.svg +5 -0
  68. package/web/modern.css +1 -1
  69. package/web/modern.js +611 -208
  70. package/workflows/decision-council/SKILL.md +1 -0
  71. package/workflows/story-serial/SKILL.md +1 -0
  72. package/workflows/trpg-classic/SKILL.md +1 -0
@@ -26,6 +26,8 @@
26
26
 
27
27
  ## 派活
28
28
 
29
+ 如果 `room_roster` 有 `observer: true`,高风险方案在派实现前先点名咨询旁观席,不把它当实现或正式评审成员。高风险信号包括新增持久状态、改协议或权限、跨模块改动,或在已有入口之外另起一条实现路径。看到旁观意见,在下一次回答里说明采纳、后置或驳回及理由。
30
+
29
31
  默认做法:在回答里用 `--to` 点名、写清分工,其余参数按需加;完整写法查 `message post --help-host`(普通 `--help` 只列成员能用的)。
30
32
 
31
33
  - 需要他人时加 `--to 显示名`(可重复,不能点名自己),写明各自负责的文件或模块;不需要他人时不加,本次即结束。派活正文要能独立看懂:直接写要做的事、材料编号与完成标准,不写“同上”“见前文”。不写策略档位名、流程代号和内部卡号,这些只有你看得懂,成员和用户看不懂。
@@ -0,0 +1,15 @@
1
+ ---
2
+ name: discuss-observer
3
+ description: 在 AI CoDiscuss 旁观席收到 observe 请求时,按只读权限核对方案或批次改动,仅交有证据的风险意见或显式结束自动旁观。普通评审和实现任务不用本技能。
4
+ ---
5
+
6
+ # 旁观席
7
+
8
+ 同时遵守 [discuss-participant](../discuss-participant/SKILL.md) 的身份、读取和提交规则。本次只判断有没有值得报告的风险,不接实现、不派活、不读私聊。
9
+
10
+ - **被点名**:读本次请求绑定的原消息及必要的用户决定。只回答被咨询的问题。
11
+ - **自动旁观**:按任务 `requests[].observation_sources` 的交回消息编号读本批交付,用执行编号核对执行详情和报告的文件改动。按需看文件或差异,不对报告以外的改动做全量评审。共享目录里不能确定改动是谁的,标“归属不足”,不归咎成员。
12
+
13
+ 发现值得报告的风险时,只提交一条旁观意见,最多两项。每项写清 **证据位置 → 违背的用户目标或已确认决定 → 后果 → 最小替代**。最小替代只针对已证实的问题,不另提优化建议或新抽象。已经提过且主持人已回应的风险,只有相关代码或决定发生实质变化时才再提。
14
+
15
+ 本次执行只包含自动请求(`created_by: "system"`)且没有值得报告的发现时,用 `codiscuss message post --no-finding` 结束,不发正文。只要有用户或主持人点名的请求,就必须用普通回答交回,没发现或证据不足时一句即可。两种方式都绑定本次执行,不靠最后一段文字自动收录。
@@ -168,6 +168,7 @@ project_access: write
168
168
 
169
169
  - **工作流 ID**(文件夹名 = SKILL.md 的 `name`):小写英文和数字,可用单个连字符连接(不在首尾),1—40 位。`metadata` 下的 `label`(显示名)最多 32 字;早期写在顶层的 `label` 仍可读取,保存时移到 `metadata` 下。
170
170
  - **展示元数据**(均可选,不换行,只给人看和分享,**不会发给主持人**):`metadata.author`(作者,最多 64 字)、`metadata.source`(出处,最多 200 字)。不要把作者、出处等背景信息塞进 `description`。
171
+ - **分类**:只在主工作流 `SKILL.md` 的 `metadata` 下写可选的 `category`。新建或改类时用 `entertainment`(娱乐)、`office`(办公)、`business`(商业)、`design-2d`(二维设计)、`design-3d`(三维设计)、`video`(剪辑)、`writing`(创作)或 `other`(其他)。缺失或未知的旧值显示为“其他”,不改类时保留原值。
171
172
  - **`description`** 最多 500 字:写清做什么、什么时候用。主持人只凭它判断一条请求该不该按这个工作流做,写含糊了,该用时会不用、不该用时会套用。
172
173
  - **卡片**:最多 30 张。`name` 是卡片 ID,等于文件名,只用小写英文、数字和下划线,最多 16 位。`platform` 是平台 ID:`Claude`、`Codex`、`Antigravity`、`DeepSeek`、`Qwen`、`Grok`、`OpenAI`、`Custom`(网页显示的 Gemini 写 `Antigravity`,自定义 API 写 `Custom`),须是本机已配置的软件,或已配置的模型 API(官方平台可按已保存的 API Key 加入;Custom 须先保存完整的本机 API 配置)。成员名由程序拼成 `平台-卡片ID`。
173
174
  - **卡片可选字段**:`label`、`description`、`project_access`(read / write / auto / full)、`model`、`effort`。生图不是卡片字段:房间添加了生图卡片后所有成员都能画,卡片提示词写清谁负责出图即可。不用的字段直接省略;模型和强度省略即用本机默认值。接入方式、可执行文件、密钥不写进卡片,由各自电脑的配置决定。各角色挑哪个平台和模型,见 [给卡片挑平台和模型](references/model-selection.md)。
@@ -186,6 +187,8 @@ project_access: write
186
187
 
187
188
  在房间外,`workflow-check`、`workflow-save`、`expert-export` 和 `expert-import` 支持 `--scope project|global` 与 `--project <项目目录>`。检查、读取修订号和保存应选同一归属;项目写入要求目录可写。
188
189
 
190
+ 从命令行改分类时,编辑主 `SKILL.md` 的 `metadata.category`,用 `workflow-check --dir` 预检,再用 `workflow-save --dir --revision <修订号>` 保存。不改分类时不替换已有分类值。
191
+
189
192
  不要直接写入全局或项目的 `workflows/`:那样会跳过校验和写入锁,格式错的文件会让启用它的房间读不到工作流。命令失败时按报错修正,不要绕过。
190
193
 
191
194
  ### 草稿格式
package/README.md CHANGED
@@ -87,6 +87,8 @@ The [User Guide](docs/en/guide/README.md) covers each of these in full.
87
87
 
88
88
  ### Working together
89
89
 
90
+ - **Observer seat** — Assign a read-only member to flag evidence-backed risks in plans and completed batches with file changes. [Observer seat](docs/en/guide/members.md#observer-seat)
91
+
90
92
  - **Delegate by mention** — `@` a participating member to start a side task. Automatically connected members can work alongside the main task when idle and queue requests when busy. Manual members check for requests themselves. The host normally handles unaddressed messages; smart scheduling can route some directly. [Working in a room](docs/en/guide/working.md)
91
93
  - **Questions for you**: when a member needs your decision it asks in the room, and an answer card appears above the input box. [Working in a room](docs/en/guide/working.md)
92
94
  - **Structured discussions** — Set a goal and limits on rounds or time. Members cannot read each other’s opening answers during the independent round. The host can schedule follow-up questions if time and rounds remain. [Discussions](docs/en/guide/discussion.md)
@@ -120,6 +122,8 @@ The [User Guide](docs/en/guide/README.md) covers each of these in full.
120
122
  | --- | --- | --- |
121
123
  | **Auto-wake** | Claude Code CLI · Codex App / CLI · Antigravity (Gemini) App / CLI | Can serve as host and resume supported sessions. Delivery to an open window depends on the tool. |
122
124
  | **Model API** | OpenAI · Claude · Gemini · DeepSeek · Qwen · Grok · OpenAI-compatible | [Pi](https://github.com/earendil-works/pi) runs on the connected computer and sends requests to the selected provider. Configuration and permissions determine its tools: web search requires setup, and unrestricted access allows general commands. Each member has its own session and can host. |
125
+ | **CLI preview** | Grok Build CLI 2.x | [Grok Build CLI](docs/en/guide/members.md#grok-build-cli-preview) uses the software's own sign-in. Native headless operation was tested with version 2.0.9 on Windows. |
126
+ | **CLI** | DeepSeek Harness | [DeepSeek Harness](docs/en/guide/members.md#deepseek-harness) uses the native headless CLI with full access and its own model credentials. Delivery, stop, and resume were tested with a live model on Windows 0.2.2-rc.3. |
123
127
  | **Manual** | Any local AI that can run `codiscuss` (e.g. Cursor CLI) | Reads and writes with its own member credential; see [Manual connection](docs/en/guide/members.md#manual-connection) |
124
128
 
125
129
  Web chat products such as ChatGPT, Claude or Gemini on the web cannot join as members.
package/README.zh-CN.md CHANGED
@@ -87,6 +87,8 @@ codiscuss setup
87
87
 
88
88
  ### 一起干活
89
89
 
90
+ - **旁观席**:房主可指定一位只读成员,在方案咨询和有文件改动的批次交回时报告有证据的风险。[旁观席](docs/guide/members.md#旁观席)
91
+
90
92
  - **点名分工**:直接 `@` 在场成员即可开支线。自动接入的成员空闲时可以和主线并行,忙时排队;手动成员需查收请求。未点名的消息默认交给主持人,智能调度可直接分派部分请求。 [在房间里干活](docs/guide/working.md)
91
93
  - **向你提问**:需要你拍板时,成员在房间里提问,输入框上方出现答题卡。[在房间里干活](docs/guide/working.md)
92
94
  - **结构化讨论**:设定目标和轮次或时长上限。程序限制成员读取彼此的首轮回答;有剩余轮次和时间时,主持人可安排相互质询。 [讨论](docs/guide/discussion.md)
@@ -120,6 +122,8 @@ codiscuss setup
120
122
  | --- | --- | --- |
121
123
  | **自动唤醒** | Claude Code CLI · Codex App / CLI · Antigravity(Gemini)App / CLI | 可担任主持人;支持的已有会话可续接,原窗口行为因软件而异 |
122
124
  | **模型 API** | OpenAI · Claude · Gemini · DeepSeek · Qwen · Grok · OpenAI 兼容服务 | [Pi](https://github.com/earendil-works/pi) 在接入电脑上运行,请求发给所选服务商。可用工具由配置和权限决定;配置后可搜索网页,全放开档可运行通用命令。成员有独立会话,可担任主持人。 |
125
+ | **CLI 预览** | Grok Build CLI 2.x | [Grok Build CLI](docs/guide/members.md#grok-build-cli-预览) 使用原软件登录,原生无头运行已用 Windows 2.0.9 实测。 |
126
+ | **CLI** | DeepSeek Harness | [DeepSeek Harness](docs/guide/members.md#deepseek-harness) 通过原生无头 CLI 接入,使用全放开及 Harness 自己的模型凭据。Windows 0.2.2-rc.3 已用真实模型验证投递、停止和续接。 |
123
127
  | **手动接入** | 任何可运行 `codiscuss` 的本地 AI(如 Cursor CLI) | 凭自己的成员凭证读写,见[手动接入](docs/guide/members.md#手动接入) |
124
128
 
125
129
  网页版 ChatGPT、Claude、Gemini 不能作为成员接入。