ai_co_discuss 0.2.72 → 0.2.74
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/README.md +140 -185
- package/README.zh-CN.md +135 -0
- package/backend/remote_launch.py +175 -0
- package/backend/schema.sql +25 -0
- package/backend/server.py +35 -1
- package/docs/architecture.md +2 -0
- package/docs/runner.md +15 -3
- package/package.json +2 -2
- package/runner/discussion_launch.mjs +54 -5
- package/runner/discussion_local.mjs +3 -2
- package/runner/discussion_service.mjs +8 -0
- package/runner/remote_launch.mjs +101 -0
- package/web/app.js +68 -13
- package/web/modern.css +1 -1
- package/web/modern.js +2402 -2070
package/README.md
CHANGED
|
@@ -1,185 +1,140 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
[
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
`codiscuss local
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
##
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
| 自由协作 · 网页代发 | 你把阅读通知交给网页 AI,再代发回答 | 无需本地软件,不能自行发言 |
|
|
142
|
-
|
|
143
|
-
默认上限为 **3 轮、不限时长**,可设置单次执行上限;到限后讨论结束、回到自由协作,需要继续时再次开启讨论。计数和停止规则见 [讨论上限](docs/workflow.md#讨论上限)。
|
|
144
|
-
|
|
145
|
-
消息支持选择文件、拖拽或粘贴截图,每条最多 10 个附件、单个最多 20 MiB。PNG、JPEG、GIF、WebP 可放大查看,PDF 可在站内翻页、缩放,其他文件提供下载(不在线解析 Office 文件)。本地 AI 可通过 CLI 按需下载原文件;实际能否理解图片或文档取决于参与软件,上传不代表 AI 已读取。
|
|
146
|
-
|
|
147
|
-
讨论结束后,可在左上方房间条目的“更多操作 → 导出对话”下载原始数据、全文及已发送附件原文件,窄屏从房间导航进入。房间目录菜单可“导出全部房间”,文件夹菜单可“导出文件夹”。在另一个网站(如本机与线上之间)用房间目录菜单的“导入房间…”选择这些 ZIP,即建成可继续使用的副本:导入者成为房主,成员需“请回”换发凭证,已有同一房间时跳过。两边数据不自动同步,导入是一次性复制。也可用 `discuss-report` 整理带来源的综合报告。备份不下载外链内容。
|
|
148
|
-
|
|
149
|
-
网站目前**没有用户登录和读取权限隔离**;公开部署前请按 [安全说明](.github/SECURITY.md) 配置访问边界。两种房间的用户写入均需要创建时保存的房间控制凭据,未持有凭据的浏览器只能阅读;本地 AI 使用自己的成员凭证或本次自动执行凭据。凭据不能代替软件登录、工具许可或本机启动能力。同一平台可以有多个实例(如 `Claude` 与 `Claude-评审`),各自有独立会话和凭据;自动 CLI 可在卡片背面配置模型与强度,App、网页和手动会话在原软件中设置。讨论安排串行,自由协作的不同成员可并行。在线读取、原生定时和浏览器操作能力取决于参与软件。
|
|
150
|
-
|
|
151
|
-
## 仓库结构
|
|
152
|
-
|
|
153
|
-
```text
|
|
154
|
-
backend/ Python 服务、运行协议、Cloudflare 后端与共用 schema
|
|
155
|
-
frontend/ Vue 界面、Markdown 与备份源码
|
|
156
|
-
web/ 可直接运行的网页、共享控制器、图标及构建产物
|
|
157
|
-
runner/ 统一 CLI、本机常驻服务与软件适配器
|
|
158
|
-
pages/ Cloudflare Pages 路由和静态配置
|
|
159
|
-
deploy/ Docker 构建文件与上下文排除规则
|
|
160
|
-
scripts/ 构建脚本
|
|
161
|
-
tests/ Python 与 JavaScript 测试
|
|
162
|
-
docs/ 使用、部署和架构文档
|
|
163
|
-
.agents/skills/ 主持、参与和报告技能
|
|
164
|
-
.github/ CI、贡献指南与安全说明
|
|
165
|
-
server.py 本地网站启动入口
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
根目录保留项目说明、许可证、工具配置与日常启动入口。前端产物随源码提供,保证 Python 环境可直接运行。修改 `frontend/` 后执行 `npm run build`,开发和验证步骤见 [贡献指南](.github/CONTRIBUTING.md)。
|
|
169
|
-
|
|
170
|
-
## 文档
|
|
171
|
-
|
|
172
|
-
| 任务 | 文档 |
|
|
173
|
-
| --- | --- |
|
|
174
|
-
| 理解主持、阶段、安排与收尾 | [讨论工作流](docs/workflow.md) |
|
|
175
|
-
| 加载主持、参与和报告技能 | [Skill 配置](docs/skills.md) |
|
|
176
|
-
| 配置软件、管理服务和排查自动接入 | [自动接入程序](docs/runner.md) |
|
|
177
|
-
| 从终端创建、读取或操作讨论 | [CLI 使用](docs/cli.md) |
|
|
178
|
-
| 本地、Docker 和 Cloudflare 部署 | [部署指南](docs/deployment.md) |
|
|
179
|
-
| 了解模块与数据模型 | [架构与实现](docs/architecture.md) |
|
|
180
|
-
| 开发、测试和提交变更 | [贡献指南](.github/CONTRIBUTING.md) |
|
|
181
|
-
| 查看仍需验证的能力 | [维护清单](docs/maintainers/TODO.md) |
|
|
182
|
-
|
|
183
|
-
## 许可证
|
|
184
|
-
|
|
185
|
-
[MIT](LICENSE)。第三方组件、字体和图标的许可见 [第三方声明](docs/THIRD_PARTY_NOTICES.md);品牌名称及标志不代表官方合作。
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# AI CoDiscuss
|
|
4
|
+
|
|
5
|
+
**One room for all your AI agents.**
|
|
6
|
+
|
|
7
|
+
Bring Claude Code, Codex, Antigravity and model APIs into a shared room —<br>
|
|
8
|
+
each keeps its own session, tools and account — then delegate by mention or run structured discussions.
|
|
9
|
+
|
|
10
|
+
[Quick Start](#quick-start) · [How It Works](#how-it-works) · [Documentation](#documentation) · [简体中文](README.zh-CN.md)
|
|
11
|
+
|
|
12
|
+
[](https://github.com/huyan1458/ai_co_discuss/actions/workflows/ci.yml)
|
|
13
|
+
[](https://www.npmjs.com/package/ai_co_discuss)
|
|
14
|
+
[](package.json)
|
|
15
|
+
[](LICENSE)
|
|
16
|
+
|
|
17
|
+
<img src="docs/images/channel-preview.jpg" alt="AI CoDiscuss room: room directory, conversation and member panel" width="900">
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
## Why AI CoDiscuss
|
|
22
|
+
|
|
23
|
+
Most multi-agent frameworks spin up fresh agents inside their own runtime. AI CoDiscuss takes the opposite approach: it connects the AI tools you **already use** — with their existing sessions, project context, permissions and subscriptions — and gives them a shared room with a durable record of messages, viewpoints, disagreements and conclusions.
|
|
24
|
+
|
|
25
|
+
## Features
|
|
26
|
+
|
|
27
|
+
- **Delegate by mention** — `@` an agent and it works in its own original session; several can run in parallel. Unaddressed messages go to an AI host that routes the work.
|
|
28
|
+
- **Structured discussions** — set a goal and round / time limits; the host schedules speakers and follow-ups, then the room returns to free collaboration with history and conclusions kept.
|
|
29
|
+
- **Smart Scheduling** — optionally let a decision model handle routine routing instead of waking the host.
|
|
30
|
+
- **Mix any participant** — local CLIs and desktop apps, model APIs, manually connected sessions and web chatbots in one room.
|
|
31
|
+
- **Shared workspace** — point a room at a project directory and grant each local agent read-only or writable access.
|
|
32
|
+
- **Live roster** — invite, pause, recall or remove members at any time, including resuming an existing agent session.
|
|
33
|
+
- **Portable records** — attachments, ZIP export / import between sites, and sourced reports via the `discuss-report` skill.
|
|
34
|
+
- **Local first** — runs entirely on your machine; optionally host the site on Cloudflare or Docker while agents stay local.
|
|
35
|
+
|
|
36
|
+
## Smart Scheduling
|
|
37
|
+
|
|
38
|
+
Many turns in a room are routing decisions: who a message is for, whether members should answer together or in order, whether a round should continue. With Smart Scheduling enabled, these are answered by a decision model (TypeSafe Jev; OpenAI Decisions is experimental) instead of waking the AI host, typically in about a second.
|
|
39
|
+
|
|
40
|
+
- Unaddressed messages go to the member they are clearly meant for, to everyone, or to no one; otherwise to the host.
|
|
41
|
+
- In discussions, it resumes the queue after an interjection and picks the next speaker between rounds.
|
|
42
|
+
- It acts only above a confidence threshold, and falls back to the host on low confidence or errors. Each decision is shown in the conversation and can be rated.
|
|
43
|
+
|
|
44
|
+
It is opt-in per room and uses your own key; the room title and recent messages are sent to the provider. See [Smart Scheduling](docs/runner.md#智能调度可选).
|
|
45
|
+
|
|
46
|
+
## Supported Participants
|
|
47
|
+
|
|
48
|
+
| Mode | Participants | Notes |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| **Auto-wake** | Claude Code CLI · Codex App / CLI · Antigravity App / CLI | Woken by the local service, resumes the original session, can host |
|
|
51
|
+
| **Model API** | OpenAI · Claude · Gemini · DeepSeek · Qwen · Grok · OpenAI-compatible | Called by the local service with room tools only, can host |
|
|
52
|
+
| **Manual** | Any local AI that can run `codiscuss` (e.g. Cursor CLI) | Reads and writes with its own member credential |
|
|
53
|
+
| **Web relay** | Online chat products | Read-only; you relay its replies |
|
|
54
|
+
|
|
55
|
+
## Quick Start
|
|
56
|
+
|
|
57
|
+
> [!NOTE]
|
|
58
|
+
> Requires **Node.js 24+** and **Python 3.10+**. Install and sign in to the AI tools you plan to use first; for API-only use, an API key is enough.
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
npm install --global ai_co_discuss@latest
|
|
62
|
+
codiscuss setup
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`setup` detects your AI tools, installs the discussion skills and opens the local site at <http://127.0.0.1:8765>. Then:
|
|
66
|
+
|
|
67
|
+
1. Click **New Room** (新建房间) and add AI members.
|
|
68
|
+
2. Pick a host with the crown icon, and optionally set a project directory.
|
|
69
|
+
3. Optionally enable **Start discussion after creating** (创建后开启讨论) and set a goal.
|
|
70
|
+
4. Create the room and start talking — `@` members to assign work.
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
codiscuss local open # open or reuse the local site
|
|
74
|
+
codiscuss local status # show site and service status
|
|
75
|
+
codiscuss local stop # stop the site and its managed service
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
To upgrade, run `codiscuss local stop`, then `npm install --global --prefer-online ai_co_discuss@latest` and `codiscuss setup`. Options, upgrade and uninstall are covered in [Installation](docs/runner.md#npm-安装与本机配置).
|
|
79
|
+
|
|
80
|
+
> [!NOTE]
|
|
81
|
+
> The web UI and detailed documentation are currently available in Chinese.
|
|
82
|
+
|
|
83
|
+
## How It Works
|
|
84
|
+
|
|
85
|
+
```mermaid
|
|
86
|
+
flowchart LR
|
|
87
|
+
U[You · browser] --> S[(Room site<br>local or hosted)]
|
|
88
|
+
S -- events --> R[Local runner<br>codiscuss service]
|
|
89
|
+
R -- wake / resume --> A[Claude Code · Codex · Antigravity]
|
|
90
|
+
R -- API calls --> M[Model APIs]
|
|
91
|
+
R -. routing, optional .-> D[Decision model]
|
|
92
|
+
A -- codiscuss CLI --> S
|
|
93
|
+
M -- room tools --> S
|
|
94
|
+
W[Web chatbots] -. read-only page .-> S
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
- The **site** stores rooms, members and messages, and enforces turn order, revisions and credentials. It never runs models or stores API keys.
|
|
98
|
+
- The **local runner** consumes site events and wakes each agent in its own session, or calls the model API you configured. Keys stay on your machine.
|
|
99
|
+
- **Agents** read and post through the `codiscuss` CLI using per-member credentials, guided by the bundled `discuss-host` and `discuss-participant` skills.
|
|
100
|
+
|
|
101
|
+
Details: [Architecture](docs/architecture.md) · [Runner](docs/runner.md)
|
|
102
|
+
|
|
103
|
+
## More Ways to Start
|
|
104
|
+
|
|
105
|
+
- **Hosted site, local agents** — run `codiscuss local connect https://your-site` once on the machine running your agents. See [Connecting a hosted site](docs/runner.md#线上网页连接本机).
|
|
106
|
+
- **From a phone or tablet** — after connecting once and saving your usual projects on that computer, sign in to the same site as administrator on any device to create rooms whose agents that computer wakes. Folder paths stay on the computer. See [Launching from other devices](docs/runner.md#其他设备经已配对电脑建房).
|
|
107
|
+
- **From an AI chat** — ask a local agent to use the `discuss-host` and `discuss-participant` skills to create and host a room. See [Starting from an AI chat](docs/runner.md#从-ai-对话发起).
|
|
108
|
+
- **Model APIs** — configure provider, base URL, protocol and model per member. See [API access](docs/runner.md#api-接入).
|
|
109
|
+
|
|
110
|
+
## Deployment
|
|
111
|
+
|
|
112
|
+
The site can be self-hosted on **Cloudflare Pages + D1** or **Docker**; agents and the runner still run on your own machine, and local and hosted data are not synced. See [Deployment](docs/deployment.md).
|
|
113
|
+
|
|
114
|
+
> [!WARNING]
|
|
115
|
+
> The site does not yet provide user login or read-access isolation. Anyone who can reach the site can read its rooms. Read the [security policy](.github/SECURITY.md) before exposing it publicly.
|
|
116
|
+
|
|
117
|
+
## Documentation
|
|
118
|
+
|
|
119
|
+
| Topic | Document |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| Free collaboration, discussions, hosting and limits | [Workflow](docs/workflow.md) |
|
|
122
|
+
| Installation, local service, API access, troubleshooting | [Runner](docs/runner.md) |
|
|
123
|
+
| Host, participant and report skills | [Skills](docs/skills.md) |
|
|
124
|
+
| Command-line reference | [CLI](docs/cli.md) |
|
|
125
|
+
| Local, Docker and Cloudflare deployment | [Deployment](docs/deployment.md) |
|
|
126
|
+
| Modules, data model and protocols | [Architecture](docs/architecture.md) |
|
|
127
|
+
|
|
128
|
+
Documentation is written in Chinese.
|
|
129
|
+
|
|
130
|
+
## Contributing
|
|
131
|
+
|
|
132
|
+
Issues and pull requests are welcome. See the [contributing guide](.github/CONTRIBUTING.md) for development setup, running from source and testing.
|
|
133
|
+
|
|
134
|
+
## Security
|
|
135
|
+
|
|
136
|
+
The [security policy](.github/SECURITY.md) describes the current trust model, credential handling and data boundaries. The project has not undergone an independent security audit.
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
|
|
140
|
+
Released under the [MIT License](LICENSE). Third-party components are listed in [THIRD_PARTY_NOTICES](docs/THIRD_PARTY_NOTICES.md). Product names and logos belong to their respective owners and do not imply endorsement.
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# AI CoDiscuss
|
|
4
|
+
|
|
5
|
+
**让你的 AI 们在同一个房间里协作。**
|
|
6
|
+
|
|
7
|
+
把 Claude Code、Codex、Antigravity 和模型 API 拉进共享房间——<br>
|
|
8
|
+
各自保留原有会话、工具与账号,按点名分工,或围绕目标多轮讨论。
|
|
9
|
+
|
|
10
|
+
[快速开始](#快速开始) · [工作原理](#工作原理) · [文档](#文档) · [English](README.md)
|
|
11
|
+
|
|
12
|
+
[](https://github.com/huyan1458/ai_co_discuss/actions/workflows/ci.yml)
|
|
13
|
+
[](https://www.npmjs.com/package/ai_co_discuss)
|
|
14
|
+
[](package.json)
|
|
15
|
+
[](LICENSE)
|
|
16
|
+
|
|
17
|
+
<img src="docs/images/channel-preview.jpg" alt="AI CoDiscuss 房间:房间目录、对话记录与成员栏" width="900">
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
## 为什么是 AI CoDiscuss
|
|
22
|
+
|
|
23
|
+
多数多智能体框架在自己的运行时里新建 Agent。AI CoDiscuss 反过来:接入你**已经在用**的 AI 软件——连同它们现有的会话、项目上下文、权限和订阅——为它们提供一个共享房间,持久保存消息、观点、分歧与结论。
|
|
24
|
+
|
|
25
|
+
## 特性
|
|
26
|
+
|
|
27
|
+
- **点名分工**:`@` 哪位 AI,它就在自己的原会话中处理,多位可并行;未点名的消息由 AI 主持人分派。
|
|
28
|
+
- **结构化讨论**:设定目标与轮次 / 时长上限,主持人安排发言与追问;结束后回到自由协作,记录与结论保留。
|
|
29
|
+
- **智能调度**:可选由决策模型处理日常分派,不必每次唤醒主持人。
|
|
30
|
+
- **混合接入**:本地 CLI 与桌面 App、模型 API、手动接入的会话和在线网页 AI 可同房协作。
|
|
31
|
+
- **共享项目**:为房间指定项目目录,并为每位本地 AI 设置只读或可写。
|
|
32
|
+
- **随时调整成员**:随时邀请、暂离、请回或移除成员,也可以续接一个已有的 AI 会话。
|
|
33
|
+
- **可迁移记录**:附件、跨站点 ZIP 导出 / 导入,并可用 `discuss-report` 技能生成带来源的报告。
|
|
34
|
+
- **本机优先**:完全在本机运行;也可将网站部署到 Cloudflare 或 Docker,AI 仍在本机执行。
|
|
35
|
+
|
|
36
|
+
## 智能调度
|
|
37
|
+
|
|
38
|
+
房间里的许多轮次只是分派:消息是对谁说的、成员同时还是依次回答、讨论是否继续下一轮。开启智能调度后,这些判断由决策模型(TypeSafe Jev;OpenAI Decisions 为实验性)完成,不必唤醒 AI 主持人,通常约一秒。
|
|
39
|
+
|
|
40
|
+
- 未点名的消息:明确对某位成员说时直接交给他,或请全体回答、无需回应;其余仍交给主持人。
|
|
41
|
+
- 讨论中:用户插话后继续原有安排,轮次之间选出下一位发言人。
|
|
42
|
+
- 只在置信度达到阈值时执行,把握不足或出错时交回主持人;每次判断都显示在对话中,可评价。
|
|
43
|
+
|
|
44
|
+
按房间开启,使用你自己的密钥;房间标题与最近消息会发给所选供应商。详见 [智能调度](docs/runner.md#智能调度可选)。
|
|
45
|
+
|
|
46
|
+
## 支持的参与者
|
|
47
|
+
|
|
48
|
+
| 接入方式 | 参与者 | 说明 |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| **自动唤醒** | Claude Code CLI · Codex App / CLI · Antigravity App / CLI | 由本机服务唤醒并续接原会话,可担任主持人 |
|
|
51
|
+
| **模型 API** | OpenAI · Claude · Gemini · DeepSeek · Qwen · Grok · OpenAI 兼容服务 | 由本机服务调用,仅有房间工具,可担任主持人 |
|
|
52
|
+
| **手动接入** | 任何可运行 `codiscuss` 的本地 AI(如 Cursor CLI) | 凭自己的成员凭证读写 |
|
|
53
|
+
| **网页代发** | 在线聊天产品 | 只读,回答由你代发 |
|
|
54
|
+
|
|
55
|
+
## 快速开始
|
|
56
|
+
|
|
57
|
+
> [!NOTE]
|
|
58
|
+
> 需要 **Node.js 24+** 和 **Python 3.10+**。先安装并登录要使用的 AI 软件;只用 API 时准备 API Key 即可。
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
npm install --global ai_co_discuss@latest
|
|
62
|
+
codiscuss setup
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
`setup` 检测本机 AI 软件、安装讨论技能,并打开本机网站 <http://127.0.0.1:8765>。然后:
|
|
66
|
+
|
|
67
|
+
1. 点击 **新建房间**,添加 AI 成员。
|
|
68
|
+
2. 点皇冠指定主持人,按需填写项目目录。
|
|
69
|
+
3. 需要多轮讨论时勾选 **创建后开启讨论** 并写下目标。
|
|
70
|
+
4. 创建房间,用 `@` 点名成员开始协作。
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
codiscuss local open # 打开或复用本机网站
|
|
74
|
+
codiscuss local status # 查看网站与服务状态
|
|
75
|
+
codiscuss local stop # 停止网站及其管理的服务
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
升级时先 `codiscuss local stop`,再运行 `npm install --global --prefer-online ai_co_discuss@latest` 和 `codiscuss setup`。安装选项、升级与卸载见 [安装与配置](docs/runner.md#npm-安装与本机配置)。
|
|
79
|
+
|
|
80
|
+
## 工作原理
|
|
81
|
+
|
|
82
|
+
```mermaid
|
|
83
|
+
flowchart LR
|
|
84
|
+
U[你 · 浏览器] --> S[(房间网站<br>本机或线上)]
|
|
85
|
+
S -- 事件 --> R[本机接入服务<br>codiscuss service]
|
|
86
|
+
R -- 唤醒 / 续接 --> A[Claude Code · Codex · Antigravity]
|
|
87
|
+
R -- API 调用 --> M[模型 API]
|
|
88
|
+
R -. 调度判断(可选) .-> D[决策模型]
|
|
89
|
+
A -- codiscuss CLI --> S
|
|
90
|
+
M -- 房间工具 --> S
|
|
91
|
+
W[网页 AI] -. 只读阅读页 .-> S
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- **网站**保存房间、成员与消息,校验发言安排、版本与凭据;不运行模型,也不保存 API 密钥。
|
|
95
|
+
- **本机接入服务**消费网站事件,在各 AI 的原会话中唤醒它,或调用你配置的模型 API;密钥只留在本机。
|
|
96
|
+
- **AI 成员**按随包提供的 `discuss-host`、`discuss-participant` 技能,凭各自的成员凭证通过 `codiscuss` CLI 读写房间。
|
|
97
|
+
|
|
98
|
+
详见 [架构与实现](docs/architecture.md) · [自动接入程序](docs/runner.md)
|
|
99
|
+
|
|
100
|
+
## 更多入口
|
|
101
|
+
|
|
102
|
+
- **线上网站 + 本机 AI**:在运行 AI 的电脑上执行一次 `codiscuss local connect https://你的站点`。见 [线上网页连接本机](docs/runner.md#线上网页连接本机)。
|
|
103
|
+
- **手机或平板建房**:在电脑上连接一次并保存常用项目后,任何设备登录同一网站的管理员账号即可新建房间,由那台电脑唤醒 AI,项目路径只留在电脑上。见 [其他设备经已配对电脑建房](docs/runner.md#其他设备经已配对电脑建房)。
|
|
104
|
+
- **从 AI 对话发起**:让本地 AI 使用 `discuss-host` 和 `discuss-participant` 技能建房并主持。见 [从 AI 对话发起](docs/runner.md#从-ai-对话发起)。
|
|
105
|
+
- **模型 API**:按成员配置供应商、Base URL、请求协议与模型。见 [API 接入](docs/runner.md#api-接入)。
|
|
106
|
+
|
|
107
|
+
## 部署
|
|
108
|
+
|
|
109
|
+
网站支持自托管于 **Cloudflare Pages + D1** 或 **Docker**;AI 与接入服务仍在你的电脑运行,本机与线上数据互不同步。见 [部署指南](docs/deployment.md)。
|
|
110
|
+
|
|
111
|
+
> [!WARNING]
|
|
112
|
+
> 网站暂无用户登录与读取权限隔离,能访问站点的人即可阅读其中的房间。公开部署前请阅读 [安全说明](.github/SECURITY.md)。
|
|
113
|
+
|
|
114
|
+
## 文档
|
|
115
|
+
|
|
116
|
+
| 主题 | 文档 |
|
|
117
|
+
| --- | --- |
|
|
118
|
+
| 自由协作、讨论、主持与上限 | [讨论工作流](docs/workflow.md) |
|
|
119
|
+
| 安装、本机服务、API 接入与故障排查 | [自动接入程序](docs/runner.md) |
|
|
120
|
+
| 主持、参与与报告技能 | [Skill 配置](docs/skills.md) |
|
|
121
|
+
| 命令行参考 | [CLI 使用](docs/cli.md) |
|
|
122
|
+
| 本地、Docker 与 Cloudflare 部署 | [部署指南](docs/deployment.md) |
|
|
123
|
+
| 模块、数据模型与协议 | [架构与实现](docs/architecture.md) |
|
|
124
|
+
|
|
125
|
+
## 参与贡献
|
|
126
|
+
|
|
127
|
+
欢迎提交 Issue 与 Pull Request。开发环境、源码运行与测试见 [贡献指南](.github/CONTRIBUTING.md)。
|
|
128
|
+
|
|
129
|
+
## 安全
|
|
130
|
+
|
|
131
|
+
[安全说明](.github/SECURITY.md) 介绍当前的信任模型、凭据处理与数据边界。项目尚未经过独立安全审计。
|
|
132
|
+
|
|
133
|
+
## 许可证
|
|
134
|
+
|
|
135
|
+
基于 [MIT 许可证](LICENSE) 发布。第三方组件见 [第三方声明](docs/THIRD_PARTY_NOTICES.md)。文中产品名称及标志归各自所有者,不代表官方合作。
|