ai_co_discuss 0.4.78 → 0.4.79
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/free_room.py +12 -1
- package/backend/message_queue.py +15 -5
- package/backend/server.py +20 -3
- package/docs/deployment.md +1 -1
- package/docs/en/deployment.md +1 -1
- package/docs/en/runner.md +2 -0
- package/docs/runner.md +3 -1
- 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/discussion.json +3 -2
- package/frontend/locales/en/room.json +10 -0
- package/frontend/locales/en/settings.json +3 -1
- package/package.json +1 -1
- 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 +14 -1
- 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 +2 -2
- package/runner/execution_progress.mjs +7 -3
- package/runner/expert_prompts.mjs +8 -5
- package/runner/free_runner.mjs +1 -1
- package/runner/i18n_en.mjs +10 -6
- 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 +61 -15
- 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 +12 -0
- package/web/markdown.css +1 -1
- package/web/modern.css +1 -1
- package/web/modern.js +68 -63
- 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 步) |
|
package/backend/free_room.py
CHANGED
|
@@ -794,6 +794,13 @@ def step_count(connection, execution_id):
|
|
|
794
794
|
AND phase IN ('command','tool','editing')""", (execution_id,)).fetchone()[0]
|
|
795
795
|
|
|
796
796
|
|
|
797
|
+
def tool_counts(connection, execution_id):
|
|
798
|
+
"""How many times an execution called each tool, in the order it first used them."""
|
|
799
|
+
rows = connection.execute("""SELECT tool,phase,COUNT(*) AS count FROM execution_segments WHERE source='free' AND execution_id=?
|
|
800
|
+
AND phase IN ('command','tool','editing') GROUP BY tool,phase ORDER BY MIN(seq)""", (execution_id,))
|
|
801
|
+
return [dict(row) for row in rows]
|
|
802
|
+
|
|
803
|
+
|
|
797
804
|
def execution_notes(connection, room_id, execution_id, token=""):
|
|
798
805
|
"""Read one execution's progress notes in order, with the same access as the room view."""
|
|
799
806
|
execution = connection.execute("SELECT member_id FROM member_executions WHERE room_id=? AND id=?", (room_id, execution_id)).fetchone()
|
|
@@ -968,6 +975,9 @@ def recent_executions(connection, room_id, span=None):
|
|
|
968
975
|
EXISTS(SELECT 1 FROM retried_requests WHERE execution_id=e.id) AS retried,
|
|
969
976
|
(SELECT MIN({LAYOUT_AT_SQL}) FROM member_requests r WHERE r.execution_id=e.id) AS layout_at,
|
|
970
977
|
(SELECT COUNT(*) FROM execution_notes WHERE execution_id=e.id) AS note_count,
|
|
978
|
+
(SELECT COUNT(*) FROM execution_segments WHERE source='free' AND execution_id=e.id
|
|
979
|
+
AND phase IN ('command','tool','editing')) AS step_count,
|
|
980
|
+
(SELECT COUNT(*) FROM execution_segments WHERE source='free' AND execution_id=e.id AND phase='command') AS command_count,
|
|
971
981
|
(SELECT denials FROM execution_denials WHERE execution_id=e.id) AS denials,{CAPABILITY_COLUMNS},
|
|
972
982
|
(SELECT failure_class FROM execution_failures WHERE execution_id=e.id) AS failure_class,
|
|
973
983
|
(SELECT json_object('created_at',created_at) FROM late_answers WHERE execution_id=e.id) AS late_answer,
|
|
@@ -989,7 +999,7 @@ def recent_executions(connection, room_id, span=None):
|
|
|
989
999
|
"edited": json.loads(row["edited"]) if row["edited"] else None, "diff_stats": diff_stats(row["diffs"]),
|
|
990
1000
|
"answer_id": row["answer_id"], "request_message_id": row["request_message_id"],
|
|
991
1001
|
"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 "",
|
|
1002
|
+
"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
1003
|
"capabilities": reported_capabilities(row), "stop_result": row["stop_result"] or "",
|
|
994
1004
|
"late_answer": json.loads(row["late_answer"]) if row["late_answer"] else None, "background": bool(row["background"]),
|
|
995
1005
|
"retried": bool(row["retried"]),
|
|
@@ -1096,6 +1106,7 @@ def free_view(connection, room_id):
|
|
|
1096
1106
|
member["execution"]["stale"] = latest["lease_until"] <= now
|
|
1097
1107
|
member["execution"]["notes"] = note_count(connection, latest["id"])
|
|
1098
1108
|
member["execution"]["steps"] = step_count(connection, latest["id"])
|
|
1109
|
+
member["execution"]["tools"] = tool_counts(connection, latest["id"])
|
|
1099
1110
|
member["execution"]["retry"] = execution_retry(connection, latest["id"])
|
|
1100
1111
|
member["pending"] = connection.execute("SELECT COUNT(*) FROM member_requests WHERE member_id=? AND status='pending'",
|
|
1101
1112
|
(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/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
|
|
@@ -1810,6 +1810,9 @@ def answers_direct_question(payload):
|
|
|
1810
1810
|
|
|
1811
1811
|
# The header `launch host-control` adds: the acting host's own member credential, beside the owner's it writes with.
|
|
1812
1812
|
ACTING_MEMBER_HEADER = "X-Acting-Member-Token"
|
|
1813
|
+
READ_ONLY_HEADER = "X-Discussion-Read-Only"
|
|
1814
|
+
# Reads that change the room: the runner's inbox fires timers and expiries, the external list ends expired members.
|
|
1815
|
+
READ_ONLY_CLOSED = (["inbox"], ["external-members"])
|
|
1813
1816
|
|
|
1814
1817
|
# How much of a summary a receipt keeps; the full summary stays one `message view` away.
|
|
1815
1818
|
RECEIPT_SUMMARY_CHARS = 200
|
|
@@ -3029,6 +3032,15 @@ class DiscussionHandler(BaseHTTPRequestHandler):
|
|
|
3029
3032
|
if row and row[0]:
|
|
3030
3033
|
self.headers["X-Discussion-Token"] = owner_proxy_token(row[0])
|
|
3031
3034
|
|
|
3035
|
+
def read_only_request(self):
|
|
3036
|
+
"""Whether a task of another room is reading this one: it may read, and nothing it does may change the room."""
|
|
3037
|
+
return bool(self.headers.get(READ_ONLY_HEADER))
|
|
3038
|
+
|
|
3039
|
+
def refuse_read_only(self, parts, method):
|
|
3040
|
+
"""Keep a cross-room reader to plain reads: no writes, no reads that change state, no private chats."""
|
|
3041
|
+
if self.read_only_request() and (method != "GET" or parts[3:4] in READ_ONLY_CLOSED or parts[5:6] == ["chat"]):
|
|
3042
|
+
raise PermissionError(Text('需要本房间的控制凭据'))
|
|
3043
|
+
|
|
3032
3044
|
def handle_admin_api(self, connection, parts, method):
|
|
3033
3045
|
"""Serve administrator registration, login sessions and profile."""
|
|
3034
3046
|
token = self.admin_token()
|
|
@@ -3173,6 +3185,7 @@ class DiscussionHandler(BaseHTTPRequestHandler):
|
|
|
3173
3185
|
room_id = parts[2]
|
|
3174
3186
|
if parts[3:] == ["progress"] and method == "GET":
|
|
3175
3187
|
return self.respond(room_progress(connection, room_id))
|
|
3188
|
+
self.refuse_read_only(parts, method)
|
|
3176
3189
|
self.admin_as_owner(connection, room_id)
|
|
3177
3190
|
token = self.headers.get("X-Discussion-Token", "")
|
|
3178
3191
|
if self.headers.get("X-Discussion-Session"):
|
|
@@ -3245,7 +3258,10 @@ class DiscussionHandler(BaseHTTPRequestHandler):
|
|
|
3245
3258
|
if parts[3:4] == ["questions"]:
|
|
3246
3259
|
return self.handle_questions(connection, parts, params, method, token)
|
|
3247
3260
|
if parts[3:] == ["events"] and method == "GET":
|
|
3248
|
-
|
|
3261
|
+
log = room_event_log(connection, room_id, token, params.get("after", 0), params.get("before", 0))
|
|
3262
|
+
if self.read_only_request():
|
|
3263
|
+
log["events"] = [host_event(event) for event in log["events"] if not host_hidden_event(event)]
|
|
3264
|
+
return self.respond(log)
|
|
3249
3265
|
if parts[3:] == ["register"] and method == "POST":
|
|
3250
3266
|
result = register_member(connection, room_id, token, utc_now())
|
|
3251
3267
|
connection.commit()
|
|
@@ -3622,7 +3638,8 @@ class DiscussionHandler(BaseHTTPRequestHandler):
|
|
|
3622
3638
|
result = set_host_checkin(connection, room_id, token, self.read_payload())
|
|
3623
3639
|
else:
|
|
3624
3640
|
raise LookupError(Text('地址不存在'))
|
|
3625
|
-
|
|
3641
|
+
if not self.read_only_request():
|
|
3642
|
+
drain_room_queue(connection, room_id)
|
|
3626
3643
|
connection.commit()
|
|
3627
3644
|
return self.respond(result)
|
|
3628
3645
|
|
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.
|
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 密钥、从技能库勾选技能、修改它的系统提示词、启动或停止、重设密码。
|
|
@@ -181,7 +183,7 @@ API 成员可以担任专家或主持人。房间指定了项目目录时,只
|
|
|
181
183
|
|
|
182
184
|
## 朗读与语音输入(可选)
|
|
183
185
|
|
|
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
|
|
186
|
+
朗读可在网页“设置”的“语音”里切换服务:火山引擎(豆包语音合成 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
187
|
|
|
186
188
|
- 朗读:每条消息的工具栏有“朗读”(手机上在“…”菜单里),在消息里选中文字后点“听当前”从选中处开始;读完这条会接着读后面的消息直到最新,点输入框右下角的播报按钮开启语音播报:之后的新回复会自动朗读回答摘要(没写摘要的短回答读全文,长回答读第一段),主持人的发言会报“主持人”;讨论中还会提示新一轮的发言顺序和轮到谁,执行失败、操作待你允许和讨论结束也会播一句。同时到达的回复依次播报,积压较多时只播最新 3 条。锁屏或切到其他 App 时继续播放,锁屏界面和耳机按键可以暂停、继续、跳到下一条;读过的段落会缓存在电脑上,重听不再计费。正在读的句子会高亮,点一下高亮的句子暂停,再点继续;代码块跳过。朗读时消息区底部有“跟随”和“退出”:页面默认不随朗读滚动,点“跟随”后才把正在读的句子保持在视野内,手动滚动一下就取消跟随。
|
|
187
189
|
- 朗读文件:在“文件”里打开 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.",
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
"查询新版本失败(HTTP {value1})": "Failed to check for updates (HTTP {value1})",
|
|
32
32
|
"{value1} {value2} 失败(退出码 {value3}):{value4}": "{value1} {value2} failed (exit code {value3}): {value4}",
|
|
33
33
|
"正在更新,请稍候": "Updating; please wait",
|
|
34
|
-
"
|
|
34
|
+
"入口没有重新启动,在“概览 → 登录入口 → 托管账号入口”点“启动”看原因": "The entry did not restart. Click Start under Overview → Sign-in entry → Hosted account entry to see why.",
|
|
35
35
|
"{value1} 的服务目录里有指向别处的链接({value2}),已停止操作": "A link to another location was found in the service folder for {value1} ({value2}); operation stopped",
|
|
36
36
|
"账号不存在:{value1}": "Account not found: {value1}",
|
|
37
37
|
"这个账号开启了入口保护,但入口读不到它的密钥": "This account has entry protection enabled, but the entry cannot read its key",
|
|
38
38
|
"实例没有按入口保护启动起来(启动失败,或密钥对不上)": "Instance did not start with entry protection (startup failed or the key does not match)",
|
|
39
39
|
"实例没有启动起来": "Instance did not start",
|
|
40
|
-
"还没有安装隔离账号的程序副本,请先在“概览 →
|
|
40
|
+
"还没有安装隔离账号的程序副本,请先在“概览 → 登录入口 → 托管账号入口”中同步": "Program copies for isolated accounts are not installed yet. Sync them under Overview → Sign-in entry → Hosted account entry first.",
|
|
41
41
|
"技能库里没有 {value1}": "Skill library does not contain {value1}",
|
|
42
42
|
"未知操作:{value1}": "Unknown action: {value1}",
|
|
43
43
|
"未知程序:{value1}": "Unknown app: {value1}",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"入口保护目前只支持 Windows": "Entry protection currently supports Windows only",
|
|
46
46
|
"无法确认实例是否在运行(端口没有回应),入口保护没有改动": "Cannot confirm whether the instance is running (port did not respond); entry protection was not changed",
|
|
47
47
|
"实例没有停下来,入口保护没有改动": "The instance did not stop; entry protection was not changed",
|
|
48
|
-
"外网访问已开启,{value1}
|
|
48
|
+
"外网访问已开启,{value1} 未隔离(以你的身份运行),不能启动:请先隔离该账号,或关闭登录入口的线上网站和自有域名": "Remote access is enabled, but {value1} is not isolated (runs as you) and cannot start. Isolate it first, or turn off the sign-in entry's online site and own domain.",
|
|
49
49
|
"密钥编号无效": "Invalid key ID",
|
|
50
50
|
"技能太大(上限 40 MB)": "Skill too large (40 MB limit)",
|
|
51
51
|
"请求过大": "Request too large",
|
|
@@ -61,8 +61,9 @@
|
|
|
61
61
|
"页面尚未构建,请运行 npm run build": "Page not built yet. Run npm run build.",
|
|
62
62
|
"这台电脑还没有接入线上站点:先用接入码接入": "This computer has not connected to an online site. Connect with an access code first.",
|
|
63
63
|
"还没有设好 Cloudflare 隧道:先点“设置”填写你的域名": "Cloudflare Tunnel is not configured yet. Click Configure and enter your domain first.",
|
|
64
|
-
"未隔离的账号正在运行({value1}
|
|
64
|
+
"未隔离的账号正在运行({value1}),它们以你的身份运行,开启线上网站或自有域名前请先停止或隔离": "Accounts without isolation are running ({value1}). They run as you; stop or isolate them before turning on the online site or your own domain.",
|
|
65
65
|
"未知的访问方式:{value1}": "Unknown access method: {value1}",
|
|
66
|
+
"v{value1} 刚发布,npm 还在准备安装包,请过几分钟再更新;当前版本和服务没有受影响": "v{value1} was just published and npm is still preparing its package. Try updating again in a few minutes; the current version and services were not affected.",
|
|
66
67
|
"找不到线上站点的部署配置:填写源码仓库里 .wrangler\\deploy\\wrangler.jsonc 的完整路径": "Online site deployment config not found. Enter the full path to .wrangler\\deploy\\wrangler.jsonc in the source repository.",
|
|
67
68
|
"站点地址格式不对,例如 https://xxx.pages.dev": "Invalid site address, e.g. https://xxx.pages.dev",
|
|
68
69
|
"接入码不对:应是部署线上站点的电脑上生成的一整串,形如 https://xxx.pages.dev/#codiscuss-bind=…": "Invalid access code. Use the full string generated on the online site's deployment computer, such as https://xxx.pages.dev/#codiscuss-bind=…",
|
|
@@ -78,5 +79,8 @@
|
|
|
78
79
|
"实例启动失败(退出码 {code})": "Instance failed to start (exit code {code})",
|
|
79
80
|
"实例停止失败(退出码 {code})": "Instance failed to stop (exit code {code})",
|
|
80
81
|
"没有生成绑定令牌": "No binding token generated",
|
|
81
|
-
"绑定失败(退出码 {value1})": "Binding failed (exit code {value1})"
|
|
82
|
+
"绑定失败(退出码 {value1})": "Binding failed (exit code {value1})",
|
|
83
|
+
"这台电脑已绑定 {value1},请先解绑": "This computer is already bound to {value1}. Unbind it first",
|
|
84
|
+
"这个地址不是共议线上站点:{value1}": "This address is not a CoDiscuss online site: {value1}",
|
|
85
|
+
"托管账号入口的线上网站还开着,请先关闭它": "The hosted accounts' online site is still on. Turn it off first"
|
|
82
86
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"安全策略拒绝,请核对请求内容与服务许可要求,不要原样重试。": "Blocked by a safety policy. Review the request and service access requirements; do not retry it unchanged.",
|
|
12
12
|
"{value1} 是手动启动,轮到它时需到其 AI 会话触发;不接入可在进度看板点「跳过」本次发言": "{value1} is manually started. Trigger its turn in its AI session, or click Skip on the progress board.",
|
|
13
13
|
"新消息会在 {value1} 回复后交给主持人;可在进度看板点「跳过」本次发言": "New messages go to the host after {value1} replies. Click Skip on the progress board to skip this turn.",
|
|
14
|
-
"
|
|
14
|
+
"工具调用次数": "Tool call counts",
|
|
15
15
|
"正在运行命令": "Running a command",
|
|
16
16
|
"正在调用工具": "Calling a tool",
|
|
17
17
|
"正在修改文件": "Editing files",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"未采纳的回答读取失败:{value1}": "Failed to read the unaccepted reply: {value1}",
|
|
24
24
|
"过程说明读取失败": "Failed to read progress notes",
|
|
25
25
|
"命令已运行 {value1}": "Command running for {value1}",
|
|
26
|
-
"
|
|
26
|
+
"正在执行,已 {value1}无中间输出": "Running; no intermediate output for {value1}",
|
|
27
27
|
"已 {value1}无输出,可能卡住": "No output for {value1}; may be stuck",
|
|
28
28
|
"依次发给 {value1},前一位结束后下一位开始": "Send in order to {value1}; each starts after the previous member finishes",
|
|
29
29
|
"发给 {value1}": "Send to {value1}",
|
|
@@ -143,6 +143,7 @@
|
|
|
143
143
|
"手动启动{value1}": "Manual start{value1}",
|
|
144
144
|
"已用 {value1}": "Elapsed {value1}",
|
|
145
145
|
" · 已执行 {value1} 步": " · {value1} steps completed",
|
|
146
|
+
"已执行 {value1} 步": "{value1} steps completed",
|
|
146
147
|
" · 第 {value1}/{value2} 次重试": " · Retry {value1}/{value2}",
|
|
147
148
|
"私聊:查看它正在做什么": "Private chat: see what it is doing",
|
|
148
149
|
"私聊 {value1}:查看本次执行过程": "Private chat with {value1}: inspect this run",
|
|
@@ -206,6 +206,9 @@
|
|
|
206
206
|
"已实测:原窗口开着时消息实时送入;关闭后在后台续接同一会话。": "Verified: messages reach the original window live while it is open; when closed, the same session resumes in the background.",
|
|
207
207
|
"编辑 {value1} 的卡片": "Edit {value1}'s card",
|
|
208
208
|
"配置 {value1} 的启动方式": "Configure how {value1} starts",
|
|
209
|
+
"未配置,点击配置": "Not configured. Click to set up",
|
|
210
|
+
"填写 API Key 后即可添加。": "Enter an API key to add it.",
|
|
211
|
+
"也可以在这台电脑安装 {value1} 后运行 codiscuss setup。": "You can also install {value1} on this computer and run codiscuss setup.",
|
|
209
212
|
"补齐上方连接后,可在这里选择模型与思考强度。": "Complete the connection above to choose a model and effort here.",
|
|
210
213
|
"模型与思考强度在 App 原聊天中选择,本页不覆盖 App 设置。": "Choose the model and effort in the original App chat. This page does not override App settings.",
|
|
211
214
|
"先选择软件入口。支持启动参数的 CLI 可在这里设置模型与强度。": "Choose an entry point first. For CLIs that accept launch options, you can set the model and effort here.",
|
|
@@ -761,6 +764,11 @@
|
|
|
761
764
|
"保存(Enter)": "Save (Enter)",
|
|
762
765
|
"已重试,新的执行接在下方": "Retried; the new run follows below",
|
|
763
766
|
"已修改 {count} 个文件": "Edited {count} files",
|
|
767
|
+
"可能由命令或脚本修改 {count} 个文件": "{count} files possibly changed by commands or scripts",
|
|
768
|
+
"这次执行运行过命令,这些文件在执行期间有变化,但无法确认是它改的,也可能来自其他窗口或成员。": "This run used commands and these files changed meanwhile, but it can't be confirmed that it changed them. They may come from another window or member.",
|
|
769
|
+
"打开文件 {value1}": "Open file {value1}",
|
|
770
|
+
"调整文件预览宽度": "Resize file preview",
|
|
771
|
+
"拖动调整文件预览宽度,也可使用左右方向键": "Drag to resize the file preview, or use the left and right arrow keys",
|
|
764
772
|
"二进制文件": "Binary file",
|
|
765
773
|
"未记录差异": "No line diff",
|
|
766
774
|
"关闭预览": "Close preview",
|
|
@@ -768,6 +776,8 @@
|
|
|
768
776
|
"正在读取改动…": "Reading changes…",
|
|
769
777
|
"读取改动失败:{value1}": "Could not read changes: {value1}",
|
|
770
778
|
"改动较长,只显示前面一部分": "Long change; only the first part is shown",
|
|
779
|
+
"改动太长,无法显示差异": "This change is too long to show",
|
|
780
|
+
"没有逐行内容变化": "No line-by-line changes",
|
|
771
781
|
"正在上传附件 {value1}/{value2}…": "Uploading attachments {value1}/{value2}…",
|
|
772
782
|
"正在上传附件 {percent}%…": "Uploading attachment {percent}%…",
|
|
773
783
|
"正在上传附件 {current}/{total} · {percent}%…": "Uploading attachment {current}/{total} · {percent}%…",
|
|
@@ -385,7 +385,9 @@
|
|
|
385
385
|
"显示方式": "View",
|
|
386
386
|
"文件操作": "File actions",
|
|
387
387
|
"字号、朗读、显示方式": "Font size, read aloud and view",
|
|
388
|
-
"
|
|
388
|
+
"收起到屏幕边缘(手机上也可下拉收起)": "Minimize to the screen edge (on mobile, swipe down to minimize)",
|
|
389
|
+
"切换为悬浮窗口": "Switch to floating window",
|
|
390
|
+
"切换为右侧分屏": "Switch to split view",
|
|
389
391
|
"收起预览": "Minimize preview",
|
|
390
392
|
"关闭预览": "Close preview",
|
|
391
393
|
"文件位置": "File location",
|
package/package.json
CHANGED
|
@@ -251,6 +251,11 @@ const events = {
|
|
|
251
251
|
const block = event.type === 'assistant' ? event.message?.content?.at(-1) : null;
|
|
252
252
|
return block?.type === 'tool_use' ? String(block.name || '') : '';
|
|
253
253
|
},
|
|
254
|
+
/** The id of the tool call an event starts, so calls of one tool made together are counted one by one. */
|
|
255
|
+
call(event) {
|
|
256
|
+
const block = event.type === 'assistant' ? event.message?.content?.at(-1) : null;
|
|
257
|
+
return block?.type === 'tool_use' ? String(block.id || '') : '';
|
|
258
|
+
},
|
|
254
259
|
note(event) {
|
|
255
260
|
if (event.type !== 'assistant') return '';
|
|
256
261
|
return (event.message?.content || []).filter(block => block.type === 'text').map(block => block.text).join('\n').trim();
|
|
@@ -548,7 +553,7 @@ export function watch_window_turn({ file, offset, pid, marker, session_id = '',
|
|
|
548
553
|
...(entry.toolUseResult?.isAsync ? { background: true } : {}) })}\n`);
|
|
549
554
|
// Only entries of the turn that took the message reach here, so this is the window's own work, never "not started yet".
|
|
550
555
|
const phase = events.phase(entry);
|
|
551
|
-
if (phase) task.on_activity?.(phase, events.tool(entry));
|
|
556
|
+
if (phase) task.on_activity?.(phase, events.tool(entry), events.call(entry));
|
|
552
557
|
const note = events.note(entry);
|
|
553
558
|
if (note) task.on_note?.(note);
|
|
554
559
|
}
|
package/runner/adapters/cli.mjs
CHANGED
|
@@ -68,7 +68,7 @@ function monitor_cli(adapter, child, binding, task, restart) {
|
|
|
68
68
|
catch { state.diagnostic = 'CLI 输出中存在无效 JSON,详情见本机日志'; return; }
|
|
69
69
|
trace_cli_event(event, task);
|
|
70
70
|
const phase = adapter.events.phase(event);
|
|
71
|
-
if (phase) task.on_activity?.(phase, adapter.events.tool(event));
|
|
71
|
+
if (phase) task.on_activity?.(phase, adapter.events.tool(event), adapter.events.call?.(event));
|
|
72
72
|
const note = adapter.events.note(event, state.responses);
|
|
73
73
|
if (note) task.on_note?.(note);
|
|
74
74
|
report_edits(adapter, event, task);
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
* its event handling while the owner can interject mid-turn (`turn/steer`), which `codex exec` cannot take.
|
|
4
4
|
*
|
|
5
5
|
* usage: node codex_bridge.mjs <codex executable> [codex app-server options...]
|
|
6
|
-
* stdin: first line `{prompt, thread_id?, cwd, model?, effort?, full?, images?}` (`images`: local
|
|
7
|
-
* the prompt); every later line `{steer: text}`.
|
|
6
|
+
* stdin: first line `{prompt, thread_id?, cwd, model?, effort?, full?, images?, developer_instructions?}` (`images`: local
|
|
7
|
+
* image paths sent with the prompt; `developer_instructions`: system-level rules of a new thread); every later line `{steer: text}`.
|
|
8
8
|
* stdout: `thread.started`, `turn.started`, `item.started|completed`, `turn.completed|failed`, `error` events in the
|
|
9
9
|
* shape `codex exec --json` prints. The process exits when the turn ends; exit 1 with the reason on stderr otherwise.
|
|
10
10
|
* One process per execution: an app-server keeps the thread it loaded as its writer until it exits.
|
|
@@ -121,8 +121,9 @@ async function start(task) {
|
|
|
121
121
|
server.stdin.write(`${JSON.stringify({ jsonrpc: '2.0', method: 'initialized', params: {} })}\n`);
|
|
122
122
|
// 全放开 has no permission profile; the thread itself runs without sandbox or approval.
|
|
123
123
|
const access = task.full ? { sandbox: 'danger-full-access', approvalPolicy: 'never' } : {};
|
|
124
|
+
// Codex keeps a thread's developer instructions from its start: a resumed thread ignores new ones (tested 0.169.1).
|
|
124
125
|
const opened = task.thread_id ? await request('thread/resume', { threadId: task.thread_id, cwd: task.cwd, ...access })
|
|
125
|
-
: await request('thread/start', { cwd: task.cwd, ...access });
|
|
126
|
+
: await request('thread/start', { cwd: task.cwd, ...access, ...(task.developer_instructions ? { developerInstructions: task.developer_instructions } : {}) });
|
|
126
127
|
thread_id = opened.thread.id;
|
|
127
128
|
emit({ type: 'thread.started', thread_id });
|
|
128
129
|
// The task's images go in as `localImage` inputs after the text, as a screenshot attached in Codex itself does.
|