ai_co_discuss 0.4.78 → 0.4.80
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-participant/SKILL.md +1 -0
- package/.agents/skills/local-tts-setup/SKILL.md +3 -2
- package/backend/external_members.py +27 -8
- package/backend/free_room.py +13 -1
- package/backend/message_queue.py +15 -5
- package/backend/schema.sql +3 -0
- package/backend/server.py +24 -3
- package/docs/deployment.md +1 -1
- package/docs/en/deployment.md +1 -1
- package/docs/en/runner.md +5 -2
- package/docs/runner.md +6 -3
- package/frontend/locales/en/admin.json +38 -11
- package/frontend/locales/en/app.json +1 -0
- package/frontend/locales/en/backend_worker.json +9 -5
- package/frontend/locales/en/core.json +3 -6
- package/frontend/locales/en/discussion.json +3 -2
- package/frontend/locales/en/external.json +21 -8
- package/frontend/locales/en/room.json +13 -8
- package/frontend/locales/en/settings.json +12 -1
- package/package.json +1 -1
- package/runner/adapters/api.mjs +8 -5
- package/runner/adapters/api_web.mjs +42 -63
- package/runner/adapters/claude.mjs +6 -1
- package/runner/adapters/cli.mjs +1 -1
- package/runner/adapters/codex_bridge.mjs +4 -3
- package/runner/adapters/codex_cli.mjs +65 -4
- package/runner/adapters/common.mjs +1 -1
- package/runner/adapters/profiles.mjs +16 -3
- package/runner/admin_cli.mjs +21 -5
- package/runner/admin_panel.mjs +56 -13
- package/runner/discuss.py +15 -3
- package/runner/discussion_launch.mjs +3 -3
- package/runner/execution_progress.mjs +7 -3
- package/runner/expert_prompts.mjs +8 -5
- package/runner/external_client.mjs +115 -26
- package/runner/external_gateway.mjs +9 -5
- package/runner/free_runner.mjs +1 -1
- package/runner/i18n_en.mjs +13 -9
- package/runner/os_users.mjs +15 -3
- package/runner/project_files.mjs +6 -5
- package/runner/tts_providers.mjs +22 -2
- package/web/admin.css +1 -1
- package/web/admin.js +3 -3
- package/web/app.js +162 -27
- package/web/backup.js +1 -1
- package/web/i18n.js +4 -4
- package/web/icons/custom-api.svg +11 -0
- package/web/icons/external-expert.svg +11 -0
- package/web/markdown.css +1 -1
- package/web/modern.css +1 -1
- package/web/modern.js +70 -65
- package/web/office/docx.js +3 -3
|
@@ -43,6 +43,7 @@ description: "AI CoDiscuss 的通用参与技能,所有参与者(包括主
|
|
|
43
43
|
|
|
44
44
|
- `execution status`(省略编号即本次执行)回答“我现在该做什么、回答是否已落库”;主持人的累计判断存在 `state view`。
|
|
45
45
|
- 增量读取用实际已读编号 `message list ROOM --after ID`,`latest_id` 不等于已读;可按 `--author`、`--query`、`--kind` 筛选。
|
|
46
|
+
- 同一站点的其他房间可以只读查看:读取命令写上对方的房间编号即可(如 `room view 房间`、`message list 房间`、`room events 房间`);写入仍限本房间,对方的私聊不可读。
|
|
46
47
|
- 唤醒你的消息带附件时,任务提示末尾列出本机副本;其他附件用 `attachment download ROOM ID --dest 新文件路径` 取得。下载或看到文件名不等于读过,读不到就如实说明。
|
|
47
48
|
|
|
48
49
|
## 回答
|
|
@@ -38,11 +38,11 @@ description: "为 AI CoDiscuss 安装本机朗读语音:下载 yovoice CLI、
|
|
|
38
38
|
|
|
39
39
|
1. **下载 CLI**:读 `https://api.github.com/repos/leemysw/yovoice/releases/latest`,取资产 `yovoice-<版本>-cli-<windows-x64 | macos-arm64 | linux-x64>.zip` 与 `SHA256SUMS.txt`,下载到空目录 `SERVICE_HOME/yovoice/download/`,核对 SHA-256 一致后解压到 `SERVICE_HOME/yovoice/cli/`(Windows 用 `tar -xf`),保留 `tools/` 目录。已装过时先结束正在运行的 yovoice 进程再覆盖。用 `yovoice.exe --version` 确认。
|
|
40
40
|
2. **推理引擎**:`yovoice.exe setup --backend <后端> --data-dir SERVICE_HOME/yovoice/data`。
|
|
41
|
-
3. **模型**:`yovoice.exe models download qwen3-tts-customvoice-q8 --data-dir SERVICE_HOME/yovoice/data`(默认从 ModelScope 下载,失败时可加 `--source huggingface
|
|
41
|
+
3. **模型**:`yovoice.exe models download qwen3-tts-customvoice-q8 --data-dir SERVICE_HOME/yovoice/data`(默认从 ModelScope 下载,失败时可加 `--source huggingface`)。用户要用 4 个 VoxCPM2 音色(柔和女声、低声线女声、老年男声、中年男声)时,再下载 `voxcpm2-bf16`(约 4.5 GB 磁盘,运行时约 5 GB 显存,需要 8 GB 显存的显卡)。
|
|
42
42
|
4. **令牌**:生成 64 位十六进制随机串,写入临时文件 `{"base_url": "http://127.0.0.1/yovoice", "api_key": "<令牌>"}`,运行 `codiscuss launch api-key --file <临时文件>`,记下返回的 `api_key_ref`,随即删除临时文件。
|
|
43
43
|
5. **切换朗读服务**:把 `codiscuss launch tts-settings` 的输出存成临时文件,只改两处:`provider` 设为 `"local"`,`providers.local.api_key_ref` 设为上一步的引用;其余字段不动(读出的 `catalog` 等字段保存时会被忽略),用 `codiscuss launch tts-settings --file <临时文件>` 保存后删除临时文件。用户只要求安装、不想马上切换时,`provider` 保持原值,只写 `api_key_ref`。
|
|
44
44
|
6. **验证**:先结束正在运行的 yovoice 进程(推理子进程 `audiocpp_server` 会随之退出),否则旧令牌启动的服务会拒绝新令牌。临时文件写入 `{"text": "你好,这是本机朗读测试。"}`,运行 `codiscuss launch tts --file <临时文件>`:返回 `format` 为 `"m4a"`、`audio` 非空即成功,`SERVICE_HOME/yovoice/serve.log` 会出现一行 `"url":"http://127.0.0.1:<端口>"`,端口与 `SERVICE_HOME/yovoice/port` 中的一致,说明服务是由 CoDiscuss 拉起的。1 分钟内再换一段约 100 字的新文本请求一次,测服务已启动时的速度(同一文本会命中本机缓存,测不出速度)。参考:RTX 5060 8 GB + `cuda13`,短句含启动服务与加载模型约 4 秒;服务已启动时,100 字约 6–7 秒合成约 27 秒音频。
|
|
45
|
-
7. **清理与汇报**:删除 `SERVICE_HOME/yovoice/download/` 与所有临时文件。向用户报告后端、模型、实测耗时,并说明:网页“设置 → 语音”选“本机”,可选 9
|
|
45
|
+
7. **清理与汇报**:删除 `SERVICE_HOME/yovoice/download/` 与所有临时文件。向用户报告后端、模型、实测耗时,并说明:网页“设置 → 语音”选“本机”,可选 9 个 Qwen3-TTS 音色并分别试听,装了 `voxcpm2-bf16` 时另有 4 个 VoxCPM2 音色;本机服务不支持调语速,语气提示只对 Qwen3-TTS 音色生效;切回云端服务只需在同一处点选。网页经已在运行的 CoDiscuss 本机服务朗读;刚更新过 CoDiscuss 时,先运行 `codiscuss service restart` 再刷新网页,才会出现“本机”。
|
|
46
46
|
|
|
47
47
|
## 修复、升级与卸载
|
|
48
48
|
|
|
@@ -57,3 +57,4 @@ description: "为 AI CoDiscuss 安装本机朗读语音:下载 yovoice CLI、
|
|
|
57
57
|
| 服务启动超时 | 看 `serve.log`;端口被其他程序占用时请用户释放该端口 |
|
|
58
58
|
| 合成失败(HTTP 500) | 看 `data/logs/`:CUDA 报错时检查驱动,或换后端重做第 2 步;显存不足时关闭占显存的程序 |
|
|
59
59
|
| 转码失败 | `cli/tools/` 缺失或损坏:重做第 1 步 |
|
|
60
|
+
| 这个音色的模型尚未安装 | 选了 VoxCPM2 音色但没有模型:下载 `voxcpm2-bf16`(第 3 步) |
|
|
@@ -14,7 +14,7 @@ import time
|
|
|
14
14
|
from datetime import datetime, timezone
|
|
15
15
|
|
|
16
16
|
from . import free_room
|
|
17
|
-
from .identity import MAX_ROOM_AGENTS, is_ai
|
|
17
|
+
from .identity import AI_PLATFORMS, MAX_ROOM_AGENTS, is_ai
|
|
18
18
|
from .runtime import begin_write, require_owner, token_hash
|
|
19
19
|
from .texts import Text, text_payload
|
|
20
20
|
|
|
@@ -32,6 +32,7 @@ MAX_DIRECTORY_LENGTH = 500
|
|
|
32
32
|
MAX_MACHINE = 200
|
|
33
33
|
MAX_MACHINE_LABEL = 80
|
|
34
34
|
MAX_ADAPTER = 40
|
|
35
|
+
MAX_MODEL = 120
|
|
35
36
|
HOUR_SECONDS = 3600
|
|
36
37
|
READ_OPS = ("ls", "read", "grep")
|
|
37
38
|
READ_OUTCOMES = ("ok", "denied")
|
|
@@ -48,7 +49,7 @@ MESSAGE_PARAMS = ("after", "limit", "page", "q", "author", "mention", "execution
|
|
|
48
49
|
ANSWER_FIELDS = ("text", "text_text", "execution_id", "submission_id", "reply_to")
|
|
49
50
|
ENDED_TEXTS = {"revoked": Text("外部成员已被撤销"), "expired": Text("外部成员已到期"), "left": Text("外部成员已退出")}
|
|
50
51
|
EXTERNAL_SQL = """SELECT m.id,m.room_id,m.name,m.adapter,m.role,m.status,m.access,m.session_mode,m.read_until,m.token_hash,
|
|
51
|
-
x.machine,x.machine_label,x.scope,x.directories,x.expires_at,x.hourly_bytes,x.total_bytes,x.hourly_reads,
|
|
52
|
+
x.machine,x.machine_label,x.platform,x.model,x.scope,x.directories,x.expires_at,x.hourly_bytes,x.total_bytes,x.hourly_reads,
|
|
52
53
|
x.created_at,x.updated_at,x.ended_at,x.end_reason,x.claimed_at,x.invite_version,x.invite_duration,x.token_hash AS binding_hash
|
|
53
54
|
FROM external_members x JOIN room_members m ON m.id=x.member_id"""
|
|
54
55
|
|
|
@@ -111,8 +112,8 @@ def owner_view(connection, row):
|
|
|
111
112
|
"""Describe one external member for the owner, with full directory paths and current usage."""
|
|
112
113
|
labels = free_room.member_display_names(connection, row["room_id"])
|
|
113
114
|
return {"member_id": row["id"], "name": row["name"], "label": labels.get(row["name"], row["name"]), "adapter": row["adapter"],
|
|
114
|
-
"status": row["status"], "machine": row["machine"], "machine_label": row["machine_label"], "
|
|
115
|
-
"directories": json.loads(row["directories"]), "expires_at": row["expires_at"], "quota": quota_of(row),
|
|
115
|
+
"status": row["status"], "machine": row["machine"], "machine_label": row["machine_label"], "platform": row["platform"],
|
|
116
|
+
"model": row["model"], "scope": row["scope"], "directories": json.loads(row["directories"]), "expires_at": row["expires_at"], "quota": quota_of(row),
|
|
116
117
|
"usage": usage_of(connection, row["id"]), "created_at": row["created_at"], "updated_at": row["updated_at"],
|
|
117
118
|
"ended_at": row["ended_at"], "end_reason": row["end_reason"],
|
|
118
119
|
"claimed_at": row["claimed_at"], "invite_version": row["invite_version"], "duration": row["invite_duration"]}
|
|
@@ -120,11 +121,12 @@ def owner_view(connection, row):
|
|
|
120
121
|
|
|
121
122
|
def room_view_field(connection, member_id):
|
|
122
123
|
"""The `external` field of a member in the room view, or None for a local member; no local paths."""
|
|
123
|
-
row = connection.execute("SELECT scope,expires_at,machine_label,directories,claimed_at,invite_version FROM external_members WHERE member_id=?",
|
|
124
|
+
row = connection.execute("SELECT scope,expires_at,machine_label,platform,model,directories,claimed_at,invite_version FROM external_members WHERE member_id=?",
|
|
124
125
|
(member_id,)).fetchone()
|
|
125
126
|
if not row:
|
|
126
127
|
return None
|
|
127
128
|
return {"scope": row["scope"], "expires_at": row["expires_at"], "machine_label": row["machine_label"],
|
|
129
|
+
"platform": row["platform"], "model": row["model"],
|
|
128
130
|
"directories": directory_names(json.loads(row["directories"])), "claimed_at": row["claimed_at"],
|
|
129
131
|
"invite_version": row["invite_version"]}
|
|
130
132
|
|
|
@@ -213,6 +215,15 @@ def checked_text(value, limit, field, required=False):
|
|
|
213
215
|
return value
|
|
214
216
|
|
|
215
217
|
|
|
218
|
+
def save_ai(connection, member_id, payload, now):
|
|
219
|
+
"""Keep the AI the other computer reports, for display only; an unknown platform reads as none."""
|
|
220
|
+
adapter = checked_text(payload.get("adapter", ""), MAX_ADAPTER, "adapter")
|
|
221
|
+
model = " ".join(checked_text(payload.get("model", ""), MAX_MODEL, "model").split())
|
|
222
|
+
platform = payload.get("platform") if payload.get("platform") in AI_PLATFORMS else ""
|
|
223
|
+
connection.execute("UPDATE room_members SET adapter=? WHERE id=?", (adapter, member_id))
|
|
224
|
+
connection.execute("UPDATE external_members SET platform=?,model=?,updated_at=? WHERE member_id=?", (platform, model, now, member_id))
|
|
225
|
+
|
|
226
|
+
|
|
216
227
|
def list_external(connection, room_id, token):
|
|
217
228
|
"""The owner's read entry before adding an external member: every external member and the roster revision."""
|
|
218
229
|
require_owner(connection, room_id, token)
|
|
@@ -276,7 +287,7 @@ def create_external(connection, room_id, token, payload, now):
|
|
|
276
287
|
expires_at, quota["hourly_bytes"], quota["total_bytes"], quota["hourly_reads"], now, now, 0 if pending else now))
|
|
277
288
|
if pending:
|
|
278
289
|
duration = payload.get("duration", "1h")
|
|
279
|
-
if duration not in ("1h", "today", "3d"):
|
|
290
|
+
if duration not in ("1h", "today", "3d", "7d", "30d"):
|
|
280
291
|
raise ValueError(Text("外部成员不存在"))
|
|
281
292
|
connection.execute("UPDATE external_members SET claimed_at=0,invite_duration=? WHERE member_id=?", (duration, cursor.lastrowid))
|
|
282
293
|
suffix = name.removeprefix("Custom-ext") if name.startswith("Custom-ext") else f"-{cursor.lastrowid}"
|
|
@@ -344,8 +355,7 @@ def seat_action(connection, row, payload, now):
|
|
|
344
355
|
if action == "bind" and not row["machine"]:
|
|
345
356
|
expiry = checked_expiry(payload.get("expires_at"), now)
|
|
346
357
|
label = checked_text(payload.get("machine_label"), MAX_MACHINE_LABEL, "machine_label")
|
|
347
|
-
|
|
348
|
-
connection.execute("UPDATE room_members SET adapter=? WHERE id=?", (adapter, row["id"]))
|
|
358
|
+
save_ai(connection, row["id"], payload, now)
|
|
349
359
|
connection.execute("UPDATE external_members SET machine=?,machine_label=?,token_hash=?,expires_at=? WHERE member_id=?",
|
|
350
360
|
(machine, label, hashed, expiry, row["id"]))
|
|
351
361
|
elif action == "activate":
|
|
@@ -516,6 +526,13 @@ def answer_payload(member, payload):
|
|
|
516
526
|
return {**{key: payload[key] for key in ANSWER_FIELDS if key in payload}, "author": member["name"], "source": "cli"}
|
|
517
527
|
|
|
518
528
|
|
|
529
|
+
def report_ai(connection, member, payload):
|
|
530
|
+
"""The member's computer switched its AI: only what the room displays changes, never what the member may do."""
|
|
531
|
+
checked_text(payload.get("adapter"), MAX_ADAPTER, "adapter", required=True)
|
|
532
|
+
save_ai(connection, member["id"], payload, int(time.time()))
|
|
533
|
+
return {"reported": True}
|
|
534
|
+
|
|
535
|
+
|
|
519
536
|
def leave_room(connection, member):
|
|
520
537
|
"""The external member leaves on its own; its credential stops working at once."""
|
|
521
538
|
end_member(connection, member, "left")
|
|
@@ -558,6 +575,8 @@ def external_api(connection, parts, params, method, token, read_payload, hooks):
|
|
|
558
575
|
return free_room.execution_action(connection, room_id, int(route[1]), token, payload, member=member), 200
|
|
559
576
|
if route == ["answer"]:
|
|
560
577
|
return hooks["answer"](connection, room_id, answer_payload(member, payload), member), 201
|
|
578
|
+
if route == ["ai"]:
|
|
579
|
+
return report_ai(connection, member, payload), 200
|
|
561
580
|
if route == ["leave"]:
|
|
562
581
|
return leave_room(connection, member), 200
|
|
563
582
|
raise LookupError(Text("地址不存在"))
|
package/backend/free_room.py
CHANGED
|
@@ -188,6 +188,7 @@ def reported_capabilities(row):
|
|
|
188
188
|
"resume": bool(row["resume"])}
|
|
189
189
|
# Columns added after the first free-room tables; Python databases created by that build gain them here.
|
|
190
190
|
LATER_COLUMNS = {"room_members": {"access": "TEXT NOT NULL DEFAULT 'runner'", "session_mode": "TEXT NOT NULL DEFAULT 'new'"},
|
|
191
|
+
"external_members": {"platform": "TEXT NOT NULL DEFAULT ''", "model": "TEXT NOT NULL DEFAULT ''"},
|
|
191
192
|
"member_executions": {"changes": "TEXT NOT NULL DEFAULT ''", "edited": "TEXT NOT NULL DEFAULT ''", "cwd": "TEXT NOT NULL DEFAULT ''",
|
|
192
193
|
"diffs": "TEXT NOT NULL DEFAULT ''",
|
|
193
194
|
"activity": "TEXT NOT NULL DEFAULT ''", "activity_at": "INTEGER NOT NULL DEFAULT 0",
|
|
@@ -794,6 +795,13 @@ def step_count(connection, execution_id):
|
|
|
794
795
|
AND phase IN ('command','tool','editing')""", (execution_id,)).fetchone()[0]
|
|
795
796
|
|
|
796
797
|
|
|
798
|
+
def tool_counts(connection, execution_id):
|
|
799
|
+
"""How many times an execution called each tool, in the order it first used them."""
|
|
800
|
+
rows = connection.execute("""SELECT tool,phase,COUNT(*) AS count FROM execution_segments WHERE source='free' AND execution_id=?
|
|
801
|
+
AND phase IN ('command','tool','editing') GROUP BY tool,phase ORDER BY MIN(seq)""", (execution_id,))
|
|
802
|
+
return [dict(row) for row in rows]
|
|
803
|
+
|
|
804
|
+
|
|
797
805
|
def execution_notes(connection, room_id, execution_id, token=""):
|
|
798
806
|
"""Read one execution's progress notes in order, with the same access as the room view."""
|
|
799
807
|
execution = connection.execute("SELECT member_id FROM member_executions WHERE room_id=? AND id=?", (room_id, execution_id)).fetchone()
|
|
@@ -968,6 +976,9 @@ def recent_executions(connection, room_id, span=None):
|
|
|
968
976
|
EXISTS(SELECT 1 FROM retried_requests WHERE execution_id=e.id) AS retried,
|
|
969
977
|
(SELECT MIN({LAYOUT_AT_SQL}) FROM member_requests r WHERE r.execution_id=e.id) AS layout_at,
|
|
970
978
|
(SELECT COUNT(*) FROM execution_notes WHERE execution_id=e.id) AS note_count,
|
|
979
|
+
(SELECT COUNT(*) FROM execution_segments WHERE source='free' AND execution_id=e.id
|
|
980
|
+
AND phase IN ('command','tool','editing')) AS step_count,
|
|
981
|
+
(SELECT COUNT(*) FROM execution_segments WHERE source='free' AND execution_id=e.id AND phase='command') AS command_count,
|
|
971
982
|
(SELECT denials FROM execution_denials WHERE execution_id=e.id) AS denials,{CAPABILITY_COLUMNS},
|
|
972
983
|
(SELECT failure_class FROM execution_failures WHERE execution_id=e.id) AS failure_class,
|
|
973
984
|
(SELECT json_object('created_at',created_at) FROM late_answers WHERE execution_id=e.id) AS late_answer,
|
|
@@ -989,7 +1000,7 @@ def recent_executions(connection, room_id, span=None):
|
|
|
989
1000
|
"edited": json.loads(row["edited"]) if row["edited"] else None, "diff_stats": diff_stats(row["diffs"]),
|
|
990
1001
|
"answer_id": row["answer_id"], "request_message_id": row["request_message_id"],
|
|
991
1002
|
"layout_after": row["layout_after"], "layout_at": row["layout_at"] or row["created_at"], "requests": requests,
|
|
992
|
-
"notes": row["note_count"], "denials": json.loads(row["denials"] or "[]"), "failure_class": row["failure_class"] or "",
|
|
1003
|
+
"notes": row["note_count"], "steps": row["step_count"], "commands": row["command_count"], "denials": json.loads(row["denials"] or "[]"), "failure_class": row["failure_class"] or "",
|
|
993
1004
|
"capabilities": reported_capabilities(row), "stop_result": row["stop_result"] or "",
|
|
994
1005
|
"late_answer": json.loads(row["late_answer"]) if row["late_answer"] else None, "background": bool(row["background"]),
|
|
995
1006
|
"retried": bool(row["retried"]),
|
|
@@ -1096,6 +1107,7 @@ def free_view(connection, room_id):
|
|
|
1096
1107
|
member["execution"]["stale"] = latest["lease_until"] <= now
|
|
1097
1108
|
member["execution"]["notes"] = note_count(connection, latest["id"])
|
|
1098
1109
|
member["execution"]["steps"] = step_count(connection, latest["id"])
|
|
1110
|
+
member["execution"]["tools"] = tool_counts(connection, latest["id"])
|
|
1099
1111
|
member["execution"]["retry"] = execution_retry(connection, latest["id"])
|
|
1100
1112
|
member["pending"] = connection.execute("SELECT COUNT(*) FROM member_requests WHERE member_id=? AND status='pending'",
|
|
1101
1113
|
(row["id"],)).fetchone()[0]
|
package/backend/message_queue.py
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"""Owner messages queued while members work, posted one by one once the room is idle.
|
|
2
2
|
|
|
3
3
|
The owner's composer sends with `queue: true`; when the room is busy (or earlier messages still wait) the message is kept
|
|
4
|
-
here instead of being posted. A message naming only
|
|
5
|
-
|
|
4
|
+
here instead of being posted. A message naming only a host with no open request is not queued: it is a side question the host
|
|
5
|
+
answers beside members still at work, so the owner can ask how the work stands. A host that is itself busy could not answer any
|
|
6
|
+
sooner, so that message keeps its place in the queue. Each idle moment posts the head through the normal message path with its own submission_id,
|
|
6
7
|
so a repeated drain finds the posted message and only removes the row. A failed post keeps the row with its reason and holds
|
|
7
8
|
the queue; the owner's stop pauses it. The owner may send one at once, edit, delete, reorder or resume the queue.
|
|
8
9
|
"""
|
|
@@ -49,19 +50,21 @@ def queue_view(connection, room_id):
|
|
|
49
50
|
"created_at": row["created_at"]})
|
|
50
51
|
paused = connection.execute("SELECT 1 FROM queued_message_pauses WHERE room_id=?", (room_id,)).fetchone() is not None
|
|
51
52
|
return {"items": items, "paused": paused and bool(items), "busy": room_busy(connection, room_id),
|
|
52
|
-
"queueing": queueing_enabled(connection)}
|
|
53
|
+
"host_busy": host_busy(connection, room_id), "queueing": queueing_enabled(connection)}
|
|
53
54
|
|
|
54
55
|
|
|
55
56
|
def should_queue(connection, room_id, payload):
|
|
56
57
|
"""Queue an owner message that asked for it while the room is busy or earlier messages still wait."""
|
|
57
|
-
if payload.get("queue") is not True
|
|
58
|
+
if payload.get("queue") is not True:
|
|
59
|
+
return False
|
|
60
|
+
if names_only_host(connection, room_id, payload) and not host_busy(connection, room_id):
|
|
58
61
|
return False
|
|
59
62
|
return room_busy(connection, room_id) or connection.execute(
|
|
60
63
|
"SELECT 1 FROM queued_messages WHERE room_id=? LIMIT 1", (room_id,)).fetchone() is not None
|
|
61
64
|
|
|
62
65
|
|
|
63
66
|
def names_only_host(connection, room_id, payload):
|
|
64
|
-
"""The owner's message names the active host alone
|
|
67
|
+
"""The owner's message names the active host alone."""
|
|
65
68
|
named = payload.get("to")
|
|
66
69
|
if not isinstance(named, list) or len(set(named)) != 1:
|
|
67
70
|
return False
|
|
@@ -69,6 +72,13 @@ def names_only_host(connection, room_id, payload):
|
|
|
69
72
|
(room_id, named[0])).fetchone() is not None
|
|
70
73
|
|
|
71
74
|
|
|
75
|
+
def host_busy(connection, room_id):
|
|
76
|
+
"""The active host still has a request waiting or being worked on."""
|
|
77
|
+
return connection.execute("""SELECT 1 FROM member_requests r JOIN room_members m ON m.id=r.member_id
|
|
78
|
+
WHERE r.room_id=? AND r.status IN ('pending','delivering') AND m.role='host' AND m.status='active' LIMIT 1""",
|
|
79
|
+
(room_id,)).fetchone() is not None
|
|
80
|
+
|
|
81
|
+
|
|
72
82
|
def enqueue(connection, room_id, payload):
|
|
73
83
|
"""Keep a validated owner message at the end of the queue; a retry with the same submission_id returns the same row."""
|
|
74
84
|
stored = {key: payload[key] for key in QUEUED_FIELDS if key in payload}
|
package/backend/schema.sql
CHANGED
|
@@ -563,6 +563,9 @@ CREATE TABLE IF NOT EXISTS external_members (
|
|
|
563
563
|
invite_version INTEGER NOT NULL DEFAULT 0,
|
|
564
564
|
invite_duration TEXT NOT NULL DEFAULT '1h',
|
|
565
565
|
machine_label TEXT NOT NULL DEFAULT '',
|
|
566
|
+
-- What the other computer says it runs, for display only: an AI platform name and a model ID.
|
|
567
|
+
platform TEXT NOT NULL DEFAULT '',
|
|
568
|
+
model TEXT NOT NULL DEFAULT '',
|
|
566
569
|
scope TEXT NOT NULL CHECK(scope IN ('discuss','read')),
|
|
567
570
|
directories TEXT NOT NULL DEFAULT '[]',
|
|
568
571
|
expires_at INTEGER NOT NULL,
|
package/backend/server.py
CHANGED
|
@@ -43,7 +43,7 @@ from .private_chat import chat_action, member_chat
|
|
|
43
43
|
from .external_members import external_api, guard_route as guard_external_route, is_external_path, owner_api as external_owner_api
|
|
44
44
|
from .free_room import describe_members, execution_notes, label_members, set_host_checkin, withdraw_dispatch, member_descriptions, member_display_names, member_handles, member_labels, reorder_speakers, resolve_member_fields, set_chain_rounds, speaking_order, stop_room, stop_room_work
|
|
45
45
|
from .free_room import (ADAPTER_VALUE, LAYOUT_AFTER_SQL, LAYOUT_AT_SQL, continue_chain, execution_timeline, group_route_plan, retract_message, rewind_plan, rewind_room,
|
|
46
|
-
room_event_log, withdrawals)
|
|
46
|
+
host_event, host_hidden_event, room_event_log, withdrawals)
|
|
47
47
|
from .free_room import review_capability, review_roster, checked_review_plan, save_review_plan, check_review_retry
|
|
48
48
|
from .free_room import review_ready, advance_review, late_answer, execution_diffs
|
|
49
49
|
from .free_room import checked_sequence, continue_sequence, sequence_view
|
|
@@ -906,6 +906,10 @@ def list_rooms(connection, params=None):
|
|
|
906
906
|
rows = connection.execute(f"""SELECT rooms.*,
|
|
907
907
|
COALESCE(stats.message_count,0) AS message_count,COALESCE(stats.latest_id,0) AS latest_id,
|
|
908
908
|
(SELECT created_at FROM messages WHERE id=stats.latest_id) AS latest_at,
|
|
909
|
+
(SELECT m.created_at FROM messages m WHERE m.room_id=rooms.id AND m.source<>'system'
|
|
910
|
+
AND m.author NOT IN ('系统','系统任务')
|
|
911
|
+
AND NOT EXISTS (SELECT 1 FROM message_withdrawals w WHERE w.message_id=m.id)
|
|
912
|
+
ORDER BY m.id DESC LIMIT 1) AS latest_speech_at,
|
|
909
913
|
EXISTS (SELECT 1 FROM member_executions e WHERE e.room_id=rooms.id
|
|
910
914
|
AND e.status IN ('dispatched','started') AND e.lease_until>?) AS running
|
|
911
915
|
FROM rooms LEFT JOIN room_message_stats stats ON stats.room_id=rooms.id {where}
|
|
@@ -1810,6 +1814,9 @@ def answers_direct_question(payload):
|
|
|
1810
1814
|
|
|
1811
1815
|
# The header `launch host-control` adds: the acting host's own member credential, beside the owner's it writes with.
|
|
1812
1816
|
ACTING_MEMBER_HEADER = "X-Acting-Member-Token"
|
|
1817
|
+
READ_ONLY_HEADER = "X-Discussion-Read-Only"
|
|
1818
|
+
# Reads that change the room: the runner's inbox fires timers and expiries, the external list ends expired members.
|
|
1819
|
+
READ_ONLY_CLOSED = (["inbox"], ["external-members"])
|
|
1813
1820
|
|
|
1814
1821
|
# How much of a summary a receipt keeps; the full summary stays one `message view` away.
|
|
1815
1822
|
RECEIPT_SUMMARY_CHARS = 200
|
|
@@ -3029,6 +3036,15 @@ class DiscussionHandler(BaseHTTPRequestHandler):
|
|
|
3029
3036
|
if row and row[0]:
|
|
3030
3037
|
self.headers["X-Discussion-Token"] = owner_proxy_token(row[0])
|
|
3031
3038
|
|
|
3039
|
+
def read_only_request(self):
|
|
3040
|
+
"""Whether a task of another room is reading this one: it may read, and nothing it does may change the room."""
|
|
3041
|
+
return bool(self.headers.get(READ_ONLY_HEADER))
|
|
3042
|
+
|
|
3043
|
+
def refuse_read_only(self, parts, method):
|
|
3044
|
+
"""Keep a cross-room reader to plain reads: no writes, no reads that change state, no private chats."""
|
|
3045
|
+
if self.read_only_request() and (method != "GET" or parts[3:4] in READ_ONLY_CLOSED or parts[5:6] == ["chat"]):
|
|
3046
|
+
raise PermissionError(Text('需要本房间的控制凭据'))
|
|
3047
|
+
|
|
3032
3048
|
def handle_admin_api(self, connection, parts, method):
|
|
3033
3049
|
"""Serve administrator registration, login sessions and profile."""
|
|
3034
3050
|
token = self.admin_token()
|
|
@@ -3173,6 +3189,7 @@ class DiscussionHandler(BaseHTTPRequestHandler):
|
|
|
3173
3189
|
room_id = parts[2]
|
|
3174
3190
|
if parts[3:] == ["progress"] and method == "GET":
|
|
3175
3191
|
return self.respond(room_progress(connection, room_id))
|
|
3192
|
+
self.refuse_read_only(parts, method)
|
|
3176
3193
|
self.admin_as_owner(connection, room_id)
|
|
3177
3194
|
token = self.headers.get("X-Discussion-Token", "")
|
|
3178
3195
|
if self.headers.get("X-Discussion-Session"):
|
|
@@ -3245,7 +3262,10 @@ class DiscussionHandler(BaseHTTPRequestHandler):
|
|
|
3245
3262
|
if parts[3:4] == ["questions"]:
|
|
3246
3263
|
return self.handle_questions(connection, parts, params, method, token)
|
|
3247
3264
|
if parts[3:] == ["events"] and method == "GET":
|
|
3248
|
-
|
|
3265
|
+
log = room_event_log(connection, room_id, token, params.get("after", 0), params.get("before", 0))
|
|
3266
|
+
if self.read_only_request():
|
|
3267
|
+
log["events"] = [host_event(event) for event in log["events"] if not host_hidden_event(event)]
|
|
3268
|
+
return self.respond(log)
|
|
3249
3269
|
if parts[3:] == ["register"] and method == "POST":
|
|
3250
3270
|
result = register_member(connection, room_id, token, utc_now())
|
|
3251
3271
|
connection.commit()
|
|
@@ -3622,7 +3642,8 @@ class DiscussionHandler(BaseHTTPRequestHandler):
|
|
|
3622
3642
|
result = set_host_checkin(connection, room_id, token, self.read_payload())
|
|
3623
3643
|
else:
|
|
3624
3644
|
raise LookupError(Text('地址不存在'))
|
|
3625
|
-
|
|
3645
|
+
if not self.read_only_request():
|
|
3646
|
+
drain_room_queue(connection, room_id)
|
|
3626
3647
|
connection.commit()
|
|
3627
3648
|
return self.respond(result)
|
|
3628
3649
|
|
package/docs/deployment.md
CHANGED
|
@@ -175,7 +175,7 @@ npx wrangler deploy --config deploy/entry.wrangler.jsonc
|
|
|
175
175
|
"vars": { "ENTRY_URL": "https://codiscuss-entry.<账号子域>.workers.dev" }
|
|
176
176
|
```
|
|
177
177
|
|
|
178
|
-
接入一台托管电脑:在你(部署线上站点的电脑)的管理面板“概览 →
|
|
178
|
+
接入一台托管电脑:在你(部署线上站点的电脑)的管理面板“概览 → 登录入口 → 托管账号入口”选“线上网站”,展开“生成接入码”,填部署配置路径与站点地址后生成(需已登录 wrangler;一次性,再生成会让未用过的作废);把接入码发给托管电脑,粘贴到它的同一个窗口点“接入并开启”,它会绑定站点、取得入口地址、启动所需服务并开启线上网站(已开启的自有域名不受影响,两者可同时使用)。面板给出的链接带电脑编号(`?m=…`),发给使用者即可。使用者的请求经入口 Worker 和中转到达这台电脑的登录入口,登录、会话与入口保护都在电脑上;Cloudflare 能看到这些往来内容(与自有域名隧道相同),每个页面的请求都计入 Workers 免费额度。
|
|
179
179
|
|
|
180
180
|
## 常见问题
|
|
181
181
|
|
package/docs/en/deployment.md
CHANGED
|
@@ -173,7 +173,7 @@ It gets its own `workers.dev` address (such as `https://codiscuss-entry.<account
|
|
|
173
173
|
"vars": { "ENTRY_URL": "https://codiscuss-entry.<account-subdomain>.workers.dev" }
|
|
174
174
|
```
|
|
175
175
|
|
|
176
|
-
To connect a hosted computer: in the admin panel of your computer (the one that deployed the online site), go to **Overview →
|
|
176
|
+
To connect a hosted computer: in the admin panel of your computer (the one that deployed the online site), go to **Overview → Sign-in entry → Hosted account entry**, choose **Online site**, expand **Generate connect code**, fill in the deployment config path and site address, and generate it (wrangler must be signed in; the code is single-use, and generating a new one voids unused ones). Send the code to the hosted computer and paste it into the same window there, then click **Connect and turn on**: it binds the site, gets the entry address, starts the needed services and turns on the online site (your own domain, if on, stays on; both can be used together). The link the panel shows carries the computer's ID (`?m=…`); send it to the users. Their requests reach this computer's sign-in entry through the entry Worker and the relay, while sign-in, sessions and entry protection all stay on the computer. Cloudflare can see this traffic (as with a tunnel on your own domain), and every page request counts against the free Workers quota.
|
|
177
177
|
|
|
178
178
|
## Troubleshooting
|
|
179
179
|
|
package/docs/en/runner.md
CHANGED
|
@@ -43,6 +43,8 @@ On Windows, running `codiscuss setup` in a terminal offers **Desktop shortcut**
|
|
|
43
43
|
|
|
44
44
|
Everything in the admin panel can also be done from the command line with `codiscuss admin` (`codiscuss admin --help` lists all commands), which suits managing this computer over SSH. `start`, `stop` (a full exit: panel and icon, sign-in entry, tunnel and the CoDiscuss service; hosted accounts' instances keep running), `restart` and `update` work without the panel running; `start` launches in the signed-in desktop session, so the taskbar icon appears as usual. Other commands go through the running panel, with the same effect as clicking in it, and only this computer's administrators can use them. Creating or deleting the Windows user of an isolated account needs administrator rights: run it in an administrator terminal or an administrator's SSH session, otherwise a confirmation pops up on this computer's desktop. If `account add` fails partway, fix the cause and run the same command again; it continues from the missing steps.
|
|
45
45
|
|
|
46
|
+
**Administrator entry** on the panel's Overview lists your own two ways in: the local page, and the online site you open from paired devices once it is bound. You can also bind and unbind from the command line: `codiscuss admin site status`, `codiscuss admin site connect <site> [binding token]` and `codiscuss admin site disconnect`. People using hosted accounts sign in online only, through the online site or your own domain under **Hosted account entry**.
|
|
47
|
+
|
|
46
48
|
To let other people use the AI on this computer through their own accounts, check **Hosting** in setup's install options (or pass `--hosting`; `--no-hosting` turns it off; the choice is remembered). The panel then gains a **Hosted accounts** page:
|
|
47
49
|
- Click **New account**, enter a name, and keep the default **Isolated** (it gets its own Windows user; the computer asks once for administrator approval). The wizard installs the programs, room skills, system prompt and bundled workflows it needs, starts its site, and shows the password once.
|
|
48
50
|
- Click an account to open its page: sign in to its command-line tools, set API keys, pick skills from the skill library, edit its system prompt, start or stop it, and reset its password.
|
|
@@ -87,10 +89,11 @@ Invite an AI on another computer into your room: it reads only the project files
|
|
|
87
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.
|
|
88
90
|
|
|
89
91
|
**Invite (your computer)**:
|
|
90
|
-
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 the access
|
|
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 the access and membership duration after check-in. "Can read project" opens all of the room's project folders.
|
|
91
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, QR code or pairing 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.
|
|
92
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.
|
|
93
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, downgrade to discussion only, or revoke; revoking takes effect immediately.
|
|
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.
|
|
94
97
|
|
|
95
98
|
**Join (the other computer)**:
|
|
96
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 or pairing code; or run `codiscuss join <link or code> --adapter TOOL`. A pairing code also needs the inviting site's address.
|
|
@@ -122,7 +125,7 @@ Choose **OpenAI** in the member picker, flip its card, enter your official OpenA
|
|
|
122
125
|
|
|
123
126
|
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
127
|
|
|
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. At both access levels they can
|
|
128
|
+
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. At both access levels they can read public pages (local and private network addresses are refused). Web search uses DeepSeek's official search service. Turn it on by entering a DeepSeek API key under **Web search** in the new-room panel or the room's collaboration settings; all rooms share it. DeepSeek members use their own key, other API members use the saved one, and searches are billed to that key's DeepSeek account. Without a key they cannot search. 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
129
|
|
|
127
130
|
## Smart Scheduling
|
|
128
131
|
|
package/docs/runner.md
CHANGED
|
@@ -45,6 +45,8 @@ Windows 上在终端运行 `codiscuss setup` 时,“安装配置”一步有
|
|
|
45
45
|
|
|
46
46
|
管理面板的每项操作也能用命令行完成:`codiscuss admin`(`codiscuss admin --help` 列出全部命令),适合经 SSH 远程管理这台电脑。`start`、`stop`(彻底退出:面板与图标、登录入口、隧道、共议服务;托管账号的实例照常运行)、`restart`、`update` 不需要面板在运行;`start` 在已登录的桌面会话里启动,任务栏图标照常出现。其余命令经运行中的面板执行,与点击界面效果相同,只有这台电脑的管理员能用。建或删隔离账号的 Windows 用户需要管理员权限:在管理员终端或管理员的 SSH 会话里直接执行,否则在这台电脑的桌面上弹出确认。`account add` 中途失败时,解决后重新执行同一命令,会从缺少的步骤接着做。
|
|
47
47
|
|
|
48
|
+
管理面板“概览”的“管理员入口”列出你自己用的两个入口:本地网页,以及绑定后用已配对设备打开的线上网站。绑定、解绑也可以用命令行:`codiscuss admin site status`、`codiscuss admin site connect <站点> [绑定令牌]`、`codiscuss admin site disconnect`。托管账号使用者走“托管账号入口”里的线上网站或自有域名,只能在线上登录。
|
|
49
|
+
|
|
48
50
|
给别人开账号用这台电脑上的 AI 时,在 setup 的“安装配置”里勾选“托管管理”(或加 `--hosting`,`--no-hosting` 关闭;选择会记住),面板会多出“托管账号”页:
|
|
49
51
|
- 点“新建账号”,填账号名,默认“隔离”(给它一个独立的 Windows 用户,电脑会弹出一次管理员确认);向导会一次装好它要用的程序、房间技能、系统提示词和随包工作流,并启动它的网站,最后显示一次密码。
|
|
50
52
|
- 点某个账号进入它的页面:登录它的命令行、配置 API 密钥、从技能库勾选技能、修改它的系统提示词、启动或停止、重设密码。
|
|
@@ -118,10 +120,11 @@ codiscuss local connect https://你的站点
|
|
|
118
120
|
**前提**:两台电脑都安装共议并运行本机服务;你的电脑已[连接线上网站](#线上网页连接本机)并部署了中转,对方经这个网站的加密中转访问你的房间。你的电脑关机或 codiscuss 未运行时,对方什么也拿不到。
|
|
119
121
|
|
|
120
122
|
**邀请(你的电脑)**:
|
|
121
|
-
1. 建房面板或右栏“邀请成员”里点“外部”一行的“外部专家
|
|
123
|
+
1. 建房面板或右栏“邀请成员”里点“外部”一行的“外部专家 +”(可加多位),翻到卡片背面设置开放内容和签到后的有效期。选“可读项目”时开放本房间的全部项目目录。
|
|
122
124
|
2. 点“添加待签到席位”(建房时自动添加),右栏名单立即显示待签到成员;把席位的链接、二维码或配对码发给对方。链接 10 分钟有效,只能绑定一位成员;重新生成会立即作废旧链接。未绑定线上站点时显示“待生成链接”及原因,绑定站点后从席位菜单生成。待签到面板显示自动结束期限,可“移除席位”;签到后才显示用量、读取记录和授权调整。
|
|
123
125
|
3. 对方兑换即完成签到,成员有效期从兑换时开始,**没有额外批准步骤**。未签到不收任务、不参与全体回应或讨论,7 天后自动结束;链接过期不会删除席位。
|
|
124
126
|
4. 在房间里 `@` 它,回答照常出现在对话中。成员菜单的“读取记录与权限”列出它读过的每个文件(由你的电脑记录),可延长、降为只讨论或撤销授权,撤销立即生效。
|
|
127
|
+
5. 签到后头像显示对方 AI 的厂家,“读取记录与权限”里可看到软件和模型;对方换 AI 后自动更新。这些信息由对方电脑自报,仅供辨认。自定义接口显示外部专家图标。
|
|
125
128
|
|
|
126
129
|
**加入(对方电脑)**:
|
|
127
130
|
1. 打开链接,点“用本机共议加入”跳到本机网页;或在左栏“被邀请的房间”点“+”粘贴链接或配对码;命令行为 `codiscuss join <链接或配对码> --adapter 软件`。配对码另需填你的线上站点地址。
|
|
@@ -153,7 +156,7 @@ API 成员在房间里的工作由 [Pi](https://github.com/earendil-works/pi)
|
|
|
153
156
|
|
|
154
157
|
选择 **自定义 API** 可接入其他服务:翻开卡片填写 Base URL、API Key 和完整模型 ID,默认使用 Chat Completions,也可选择 Responses、Anthropic Messages 或 Gemini generateContent。卡片背面的“名称与描述”按钮可修改显示名称;重复点击添加可配置多个不同的 API 成员。Anthropic、Google Gemini、DeepSeek、阿里云百炼(Qwen)、xAI(Grok)也保留官方地址预设。
|
|
155
158
|
|
|
156
|
-
API 成员可以担任专家或主持人。房间指定了项目目录时,只读时它用接入程序提供的文件工具读取、搜索项目文件(`.env`、私钥等密钥文件、`.git` 目录和本机服务目录不开放);项目权限设为可写时,它和 Claude Code、Codex 一样用 Pi 自带的读写、编辑和命令行工作,能运行测试、构建和 git
|
|
159
|
+
API 成员可以担任专家或主持人。房间指定了项目目录时,只读时它用接入程序提供的文件工具读取、搜索项目文件(`.env`、私钥等密钥文件、`.git` 目录和本机服务目录不开放);项目权限设为可写时,它和 Claude Code、Codex 一样用 Pi 自带的读写、编辑和命令行工作,能运行测试、构建和 git,也能读到这台电脑上你的账号能访问的文件。两种权限都可以读取公开网页(本机和内网地址不开放);联网搜索使用 DeepSeek 官方搜索服务,在新建房间面板或房间“协作设置”的“联网搜索”里填写 DeepSeek API Key 即可开启,所有房间共用。DeepSeek 成员用自己的 Key,其他 API 成员用这里保存的 Key,费用计入该 Key 的 DeepSeek 账号,没有 Key 时不能搜索。读到的内容会发给你配置的模型服务商。密钥只保存在本机,调用费用按你的账号计费。
|
|
157
160
|
|
|
158
161
|
**给成员发截图或文件**:在输入框粘贴、拖入或用回形针添加附件后,输入框上方出现缩略图,正文光标处插入 `[图片 #1]`、`[文件 #2]` 这样的占位,用来说明哪段话对应哪个文件。编号在整个房间里连续、不重复(像 Claude Code 里贴的图那样),翻聊天记录时按编号就能找到那张图。占位像 @成员一样高亮成小标签,按一次退格或 Delete 就整段删掉;删掉缩略图或删掉占位,两边同步移除。消息发出后,正文里的占位可点开对应附件。被点名的成员收到任务时,附件已下载到这台电脑,任务里按占位列出位置;Claude Code 和 Codex CLI 会像在自己窗口里贴图一样直接看到图片,其他软件按位置自行打开。API 成员要看图,在它卡片的 API 设置里打开“看图”(只在模型本身支持看图时打开,否则请求会出错);没打开时它看不到图片内容。UTF-8 文本附件 API 成员都能按需读取原文;PDF 等其他文件它读不到,回答里会说明没有读取。执行中插话和私聊只能发文字。
|
|
159
162
|
|
|
@@ -181,7 +184,7 @@ API 成员可以担任专家或主持人。房间指定了项目目录时,只
|
|
|
181
184
|
|
|
182
185
|
## 朗读与语音输入(可选)
|
|
183
186
|
|
|
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
|
|
187
|
+
朗读可在网页“设置”的“语音”里切换服务:火山引擎(豆包语音合成 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 以上显存,不支持调语速;可另装 VoxCPM2 模型,多出两个女声、两个男声共 4 个适合听小说的平稳音色,再占约 4.5 GB 磁盘、运行时约 5 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
188
|
|
|
186
189
|
- 朗读:每条消息的工具栏有“朗读”(手机上在“…”菜单里),在消息里选中文字后点“听当前”从选中处开始;读完这条会接着读后面的消息直到最新,点输入框右下角的播报按钮开启语音播报:之后的新回复会自动朗读回答摘要(没写摘要的短回答读全文,长回答读第一段),主持人的发言会报“主持人”;讨论中还会提示新一轮的发言顺序和轮到谁,执行失败、操作待你允许和讨论结束也会播一句。同时到达的回复依次播报,积压较多时只播最新 3 条。锁屏或切到其他 App 时继续播放,锁屏界面和耳机按键可以暂停、继续、跳到下一条;读过的段落会缓存在电脑上,重听不再计费。正在读的句子会高亮,点一下高亮的句子暂停,再点继续;代码块跳过。朗读时消息区底部有“跟随”和“退出”:页面默认不随朗读滚动,点“跟随”后才把正在读的句子保持在视野内,手动滚动一下就取消跟随。
|
|
187
190
|
- 朗读文件:在“文件”里打开 Markdown 文件,预览模式下标题栏有“朗读”,从正文开头读到文件末尾(文件头的 `---` 元数据不读);选中文字后可从选中处开始。暂停、跟随、退出与消息朗读相同;收起为悬浮窗时继续朗读,切到源码、换文件或关闭预览(含悬浮窗上的关闭)即停止。
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"· 账号": "· Account",
|
|
45
45
|
"· 密码仅在重设时显示一次": "· Password shown only once when reset",
|
|
46
46
|
"登录入口未运行,使用者暂时无法登录,请到“概览”启动": "The sign-in entry is not running. Users cannot sign in until you start it under Overview.",
|
|
47
|
-
"
|
|
47
|
+
"登录入口没有开启线上网站或自有域名,其他设备打不开": "The sign-in entry has neither the online site nor your own domain turned on; other devices cannot open it",
|
|
48
48
|
"地址 {value1},账号 {value2}": "Address: {value1}, account: {value2}",
|
|
49
49
|
"复制": "Copy",
|
|
50
50
|
"重设密码": "Reset password",
|
|
@@ -145,8 +145,7 @@
|
|
|
145
145
|
"刷新全部:服务、登录状态、账号与版本": "Refresh all: services, sign-in status, accounts and versions",
|
|
146
146
|
"刷新全部": "Refresh all",
|
|
147
147
|
"请求失败({value1})": "Request failed ({value1})",
|
|
148
|
-
"
|
|
149
|
-
"线上中转": "Online relay",
|
|
148
|
+
"线上网站": "Online site",
|
|
150
149
|
"不需要域名:经共议线上站点中转到这台电脑,手机和外地的电脑都能打开。需要先用接入码接入线上站点。": "No domain needed: relay through a CoDiscuss online site to this computer, accessible from phones and remote computers. Connect to the online site with an access code first.",
|
|
151
150
|
"自有域名": "Own domain",
|
|
152
151
|
"用你托管在 Cloudflare 的域名,经 Cloudflare 隧道连到这台电脑。需要有自己的域名。": "Connect a domain you host on Cloudflare to this computer through a Cloudflare Tunnel. Requires your own domain.",
|
|
@@ -159,7 +158,7 @@
|
|
|
159
158
|
"暂时打不开": "Temporarily unavailable",
|
|
160
159
|
"可以访问": "Accessible",
|
|
161
160
|
"已接入 {value1},开启时取得入口地址": "Connected to {value1}; the entry address is obtained when you turn it on",
|
|
162
|
-
"
|
|
161
|
+
"已关闭线上网站": "Online site turned off",
|
|
163
162
|
"已开启自有域名": "Own domain turned on",
|
|
164
163
|
"已关闭自有域名": "Own domain turned off",
|
|
165
164
|
"没有找到 {value1}": "{value1} not found",
|
|
@@ -172,9 +171,7 @@
|
|
|
172
171
|
"登录入口已启动": "Sign-in entry started",
|
|
173
172
|
"登录入口已停止": "Sign-in entry stopped",
|
|
174
173
|
"访问方式": "Access method",
|
|
175
|
-
"
|
|
176
|
-
"这台电脑": "This computer",
|
|
177
|
-
"登录入口运行时,在这台电脑上总能打开,不需要开启。": "While the sign-in entry is running, it always opens on this computer; nothing needs turning on.",
|
|
174
|
+
"使用者从哪里打开登录入口。线上网站和自有域名可以同时开启;都开启时,默认发给使用者自有域名的地址。": "Where users open the sign-in entry. The online site and your own domain can both be on; when they are, users are given your own domain's address by default.",
|
|
178
175
|
"未配置": "Not configured",
|
|
179
176
|
"修改": "Change",
|
|
180
177
|
"配置": "Configure",
|
|
@@ -254,7 +251,7 @@
|
|
|
254
251
|
"账号已创建。请将入口地址、账号名与下方密码交给使用者(密码仅显示一次);随后在账号页{value1}配置 API 密钥。": "Account created. Give the user the entry address, account name and password below (shown only once), then {value1}configure API keys on the account page.",
|
|
255
252
|
"账号的登录密码如下,仅显示一次,请先复制保存。": "The account password is shown below, once only. Copy and save it now.",
|
|
256
253
|
"复制地址、账号和密码": "Copy address, account and password",
|
|
257
|
-
"
|
|
254
|
+
"登录入口没有开启线上网站或自有域名,还没有可以发给使用者的地址。请在“概览 → 登录入口 → 托管账号入口”里开启。": "The sign-in entry has neither the online site nor your own domain turned on, so there is no address to give users yet. Turn one on under Overview → Sign-in entry → Hosted account entry.",
|
|
258
255
|
"下一步:登录命令行": "Next: CLI sign-in",
|
|
259
256
|
"前往账号页": "Go to account page",
|
|
260
257
|
"从失败的一步重试": "Retry from the failed step",
|
|
@@ -303,7 +300,7 @@
|
|
|
303
300
|
"未创建": "Not created",
|
|
304
301
|
"保存后创建该文件": "This file will be created when saved",
|
|
305
302
|
"撤销修改": "Discard changes",
|
|
306
|
-
"
|
|
303
|
+
"已开启线上网站": "Online site turned on",
|
|
307
304
|
"托管账号的使用者经共议线上站点访问这台电脑,不需要自有域名": "Hosted account users access this computer through a CoDiscuss online site; no domain of your own needed",
|
|
308
305
|
"已接入 {value1}": "Connected to {value1}",
|
|
309
306
|
"· 入口 {value1}": "· Entry {value1}",
|
|
@@ -319,7 +316,7 @@
|
|
|
319
316
|
"生成": "Generate",
|
|
320
317
|
"复制接入码": "Copy access code",
|
|
321
318
|
"发给托管电脑的操作者,粘贴到它的这个窗口里。只能用一次;再生成一个会让之前没用过的作废。": "Send this to the operator of the hosting computer to paste into this dialog there. Single use only; generating another invalidates unused codes.",
|
|
322
|
-
"
|
|
319
|
+
"线上网站和自有域名隧道一样,Cloudflare 能看到托管账号的往来内容;登录、会话与入口保护仍由这台电脑负责。每个页面的请求都经过 Cloudflare Workers,免费额度适合少量使用者,人多时改用自有域名。": "As with a tunnel using your own domain, Cloudflare can see hosted accounts' traffic over the online site. This computer still handles sign-in, sessions and entry protection. Every page request goes through Cloudflare Workers; the free quota suits a small number of users. Use your own domain for more users.",
|
|
323
320
|
"已加入技能库:{value1}": "Added to skill library: {value1}",
|
|
324
321
|
"{value1} 不是文件夹或 .zip,已跳过": "{value1} is not a folder or .zip; skipped",
|
|
325
322
|
"已从技能库删除 {value1}": "Deleted {value1} from skill library",
|
|
@@ -360,5 +357,35 @@
|
|
|
360
357
|
",请稍候": "; please wait",
|
|
361
358
|
"外网地址 https://{value1} 已设好,隧道由这台电脑在后台运行。建议把 Cloudflare 授权文件 ~\\.cloudflared\\cert.pem 移出这台电脑保管:它能管理整个站点,隧道运行用不到它。": "Public address https://{value1} is ready. The tunnel runs in the background on this computer. Consider moving the Cloudflare authorization file ~\\.cloudflared\\cert.pem off this computer for safekeeping: it can manage the entire site and is not needed to run the tunnel.",
|
|
362
359
|
"返回修改": "Back to edit",
|
|
363
|
-
"进行中…": "In progress…"
|
|
360
|
+
"进行中…": "In progress…",
|
|
361
|
+
"托管账号入口": "Hosted account entry",
|
|
362
|
+
"账号 {value1},密码 {value2}": "Account {value1}, password {value2}",
|
|
363
|
+
"管理员入口": "Administrator entry",
|
|
364
|
+
"本地网页": "Local page",
|
|
365
|
+
"已绑定": "Bound",
|
|
366
|
+
"未绑定": "Not bound",
|
|
367
|
+
"打开": "Open",
|
|
368
|
+
"绑定": "Bind",
|
|
369
|
+
"解绑": "Unbind",
|
|
370
|
+
"共议服务未运行": "The CoDiscuss service is not running",
|
|
371
|
+
"绑定后,扫码配对过的设备可以在外面使用这台电脑": "Once bound, devices paired by QR code can use this computer from anywhere",
|
|
372
|
+
"共议服务未运行,线上网站暂时连不上这台电脑": "The CoDiscuss service is not running, so the online site cannot reach this computer for now",
|
|
373
|
+
"绑定线上网站": "Bind online site",
|
|
374
|
+
"你部署的共议线上网站,绑定后在本地网页的“设置”里给手机等设备配对": "The CoDiscuss online site you deployed. Once bound, pair phones and other devices under Settings on the local page",
|
|
375
|
+
"绑定令牌": "Binding token",
|
|
376
|
+
"在部署这个网站的电脑上运行 codiscuss token 获得,只能用一次;就在那台电脑上绑定时可以不填": "Run codiscuss token on the computer that deployed this site. It works once. Leave it empty when binding on that computer",
|
|
377
|
+
"已绑定线上网站": "Online site bound",
|
|
378
|
+
"已解绑线上网站": "Online site unbound",
|
|
379
|
+
"解绑线上网站": "Unbind online site",
|
|
380
|
+
"解绑后,已配对的设备不能再从 {value1} 连到这台电脑;之后重新绑定需要新的绑定令牌。": "Paired devices will no longer reach this computer from {value1}. Binding again needs a new binding token.",
|
|
381
|
+
"在这台电脑上打开,不需要账号。": "Open it on this computer. No account needed.",
|
|
382
|
+
"不支持": "Not supported",
|
|
383
|
+
"管理员权限最高,不开放到自有域名;在外面请用线上网站。": "The administrator has the highest rights, so this is not offered on your own domain. Use the online site when away.",
|
|
384
|
+
"托管账号只能从线上网站或自有域名登录。": "Hosted accounts sign in only through the online site or your own domain.",
|
|
385
|
+
"可用": "Available",
|
|
386
|
+
"已开启": "On",
|
|
387
|
+
"你自己使用这台电脑的入口。": "Your own ways into this computer.",
|
|
388
|
+
"{value1} 有新版本": "New version of {value1}",
|
|
389
|
+
"托管账号从这份副本运行。更新共议时会自动同步;Claude Code 等程序单独升级后,在这里同步一次。": "Hosted accounts run from this copy. Updating CoDiscuss syncs it automatically; sync here once after upgrading Claude Code or another program on its own.",
|
|
390
|
+
"登录入口未运行,使用者暂时无法登录": "The sign-in entry is not running, so users cannot sign in for now"
|
|
364
391
|
}
|
|
@@ -263,6 +263,7 @@
|
|
|
263
263
|
"自动": "Automatic",
|
|
264
264
|
"完全放开": "Full access",
|
|
265
265
|
"全放开": "Full access",
|
|
266
|
+
"托管账号的后台环境无法启用这个软件的沙箱,只能使用全放开": "This software's sandbox can't run in a hosted account's background environment, so only Full access is available",
|
|
266
267
|
"{value1} · 工作目录:{value2}({value3}) · 项目:{value4}": "{value1} · Working directory: {value2} ({value3}) · Project: {value4}",
|
|
267
268
|
"已保存本机软件配置,后续讨论可复用": "Local software settings saved for future discussions",
|
|
268
269
|
"此浏览器缺少房间凭据,请使用原浏览器或原接入配置": "This browser lacks room credentials. Use the original browser or connection settings.",
|