ai_co_discuss 0.5.3 → 0.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.agents/skills/discuss-participant/references/interactive-html.md +59 -23
  2. package/backend/free_room.py +25 -4
  3. package/backend/schema.sql +6 -0
  4. package/backend/server.py +58 -1
  5. package/docs/en/guide/admin.md +4 -3
  6. package/docs/en/guide/faq.md +6 -5
  7. package/docs/en/guide/rooms.md +6 -4
  8. package/docs/en/guide/working.md +4 -4
  9. package/docs/guide/admin.md +4 -3
  10. package/docs/guide/faq.md +6 -5
  11. package/docs/guide/rooms.md +6 -4
  12. package/docs/guide/working.md +4 -4
  13. package/frontend/locales/en/admin.json +33 -2
  14. package/frontend/locales/en/app.json +72 -16
  15. package/frontend/locales/en/backend.json +4 -1
  16. package/frontend/locales/en/core.json +6 -2
  17. package/frontend/locales/en/discussion.json +6 -1
  18. package/frontend/locales/en/settings.json +5 -0
  19. package/gateway/gateway.mjs +11 -0
  20. package/package.json +1 -1
  21. package/runner/adapters/profiles.mjs +4 -0
  22. package/runner/admin_cli.mjs +21 -5
  23. package/runner/admin_panel.mjs +64 -19
  24. package/runner/discussion_local.mjs +2 -1
  25. package/runner/discussion_service.mjs +15 -7
  26. package/runner/discussion_skills.mjs +8 -0
  27. package/runner/files.mjs +17 -2
  28. package/runner/i18n_en.mjs +37 -1
  29. package/runner/instance_recovery.mjs +78 -0
  30. package/runner/os_users.mjs +6 -1
  31. package/runner/relay_channel.mjs +121 -30
  32. package/runner/relay_health.mjs +100 -0
  33. package/runner/relay_health_text.mjs +44 -0
  34. package/runner/remote_launch.mjs +24 -14
  35. package/web/admin.css +1 -1
  36. package/web/admin.js +3 -3
  37. package/web/app.js +349 -82
  38. package/web/backup.js +1 -1
  39. package/web/i18n.js +3 -3
  40. package/web/modern.css +1 -1
  41. package/web/modern.js +73 -58
@@ -1,25 +1,54 @@
1
1
  # 交付可操作的演示(HTML)
2
2
 
3
- 只在你判断回答需要用户亲手操作(拖动参数看变化、点开分步讲解、可点的界面原型)时读本页。怎么设计页面由你决定;本页只写房间网页能怎样打开它、有哪些限制。
3
+ 只在你判断回答需要用户亲手操作(拖动参数看变化、点开分步讲解、可点的界面原型)时读本页。怎么设计页面由你决定;本页只写房间网页怎样显示它、给了页面什么、有哪些限制。
4
4
 
5
- ## 两种交付方式
5
+ ## 三种交付方式
6
6
 
7
- | 方式 | 适用 | 用户怎么打开 |
7
+ | 方式 | 适用 | 用户看到什么 |
8
8
  |---|---|---|
9
- | 附件 | 一次性演示、讲解 | 你回答下方的文件卡片,点开后在预览窗口运行,可切换源码或在新标签页打开 |
9
+ | 正文引用的附件 | 回答里的一张图:一个量变了,图跟着变 | 在正文写 `[文件 #n]` 的位置直接显示,没有边框和底色,高度随内容;下方一行小字可收起、放大、看源码、下载 |
10
+ | 未引用的附件 | 篇幅大、不必打断阅读的页面 | 回答下方的文件卡片,点“在消息内展开”或点开预览窗口才运行 |
10
11
  | 项目文件 | 要随项目保留、反复修改的页面 | 用户在“项目文件”里打开;按相对路径引用的样式、脚本、图片由电脑内联后一起显示 |
11
12
 
12
13
  附件:`attachment upload ROOM --file 页面.html` 后 `message post --attachment ID`,见主技能“回答”。项目文件:写在任务 `cwd` 的项目里,正文写明路径,项目只读时改用附件。
13
14
 
14
- ## 限制
15
+ `[文件 #n]` 的 n 从 1 起,按本条消息 `--attachment` 的先后顺序数;提交后程序换成房间内的统一编号。
15
16
 
16
- - **大小**:附件只有不超过 2 MiB 的才会运行,超过只显示截断的源码;项目文件连同内联的引用不超过 8 MiB。
17
- - **附件必须自包含**:附件没有所在目录,相对路径引用的样式、脚本、图片不会载入。CSS、JS、数据都写进文件;图片用 data URL 或内联 SVG。
18
- - **外部资源**:页面可以从 CDN 加载库,但能否加载取决于用户设备的网络;没有外部库也要能用时,宁可手写。
19
- - **沙箱**:页面在没有同源权限的沙箱 iframe 里运行,读不到房间、网站接口和 Cookie,`localStorage` 可能不可用(读写放进 `try`)。页面不能写回房间,也不能唤醒成员。
20
- - **外观**:页面不继承房间主题,深浅色自己用 `prefers-color-scheme` 适配;加 `<meta name="viewport">`,手机端以全屏打开。
21
- - **结论写在正文**:只读分享页不带附件,语音播报只读摘要或正文。页面只承载可操作的部分,结论、关键数字、默认参数下看到的结果写在回答正文里,正文用 `[文件 #n]` 指向附件。
22
- - **自查**:交付前在本机读一遍源码,确认没有引用本机路径、没有写入密钥;能打开浏览器的可先自己打开试一次。
17
+ 直接显示的条件:文件名以 `.html` 结尾,不超过 2 MiB,引用写在正文里(不在代码或链接里)。同一附件只在第一次引用处显示。手机窄屏不直接显示,点引用后全屏打开。
18
+
19
+ ## 房间给页面的东西
20
+
21
+ 直接显示和“在消息内展开”时,房间往页面里注入一份基础样式和下面的变量。变量在页面载入后送到,用户切换深浅色时再送一次。
22
+
23
+ | 变量 | 含义 |
24
+ |---|---|
25
+ | `--codiscuss-text` | 正文色 |
26
+ | `--codiscuss-text-muted` | 次要文字 |
27
+ | `--codiscuss-text-hint` | 提示文字、刻度 |
28
+ | `--codiscuss-border` | 边框、分隔线、坐标轴 |
29
+ | `--codiscuss-accent` | 强调色 |
30
+ | `--codiscuss-card` | 卡片底色(控件底、需要与背景区分的色块) |
31
+ | `--codiscuss-font-family`、`--codiscuss-font-size` | 房间正文的字体与字号 |
32
+ | `--codiscuss-radius` | 圆角 |
33
+ | `--codiscuss-color-scheme` | `light` 或 `dark` |
34
+
35
+ 已由房间设好、页面改不了的:`html` 和 `body` 透明底、外边距为 0;`body` 的文字颜色、字体、字号;深浅色。
36
+
37
+ 已有默认外观、可以覆盖的:`button`、`select`、文本类 `input` 有边框、圆角、底色和内边距;滑块、复选框、单选框用强调色;键盘焦点有描边。
38
+
39
+ ## 约束
40
+
41
+ - **不设页面底色,不设 `body` 字体和颜色**:设了也不生效。需要色块时用 `--codiscuss-card`。
42
+ - **颜色只用变量,并写兜底值**:如 `var(--codiscuss-accent, #2563eb)`。放大的预览窗口、手机全屏和新标签页也注入房间主题,兜底值用于变量到达前或在房间之外直接打开文件时。不写 `prefers-color-scheme`,深浅色由房间决定。
43
+ - **颜色写在 CSS 里**(SVG 用 `fill`、`stroke` 引用变量),不在脚本里读一次存起来:变量晚于页面脚本到达,切换主题时还会变。
44
+ - **不写固定高度**:房间测量 `body` 的实际高度来定显示高度,上限是视口的 80%,超出时在框内滚动。不用 `100vh` 撑满:框的高度就是上次量到的内容高度,撑满后不会再缩回去。
45
+ - **不写固定宽度**:显示宽度等于正文栏,随窗口变化;预览窗口更宽。内容设宽度上限并居中,窄到 320px 时仍能用。字号用 `em`,跟随房间字号。
46
+ - **直接显示时没有网络**:外部脚本、样式、字体、图片和 `fetch` 都被拦截,CDN 上的库载不进来。CSS、JS、数据都写进文件;图片用 data URL 或内联 SVG。
47
+ - **直接显示时只能运行脚本**:`alert`、`confirm`、打开新窗口、提交表单都不可用。页面读不到房间、网站接口和 Cookie,`localStorage` 不可用(读写放进 `try`)。页面不能写回房间,也不能唤醒成员。
48
+ - **滚出视口后页面会卸载**,滚回来重新运行,用户调过的参数回到初始值。默认参数要能说明问题。
49
+ - **大小**:附件超过 2 MiB 不运行,只显示截断的源码;项目文件连同内联的引用不超过 8 MiB。
50
+ - **结论写在正文**:只读分享页不带附件,语音播报只读摘要或正文。页面只承载可操作的部分,结论、关键数字、默认参数下看到的结果写在回答正文里。
51
+ - **自查**:交付前读一遍源码,确认没有引用本机路径、没有写入密钥;能打开浏览器的先自己打开试一次。
23
52
 
24
53
  ## 最小示例
25
54
 
@@ -31,23 +60,30 @@
31
60
  <meta name="viewport" content="width=device-width, initial-scale=1">
32
61
  <title>复利演示</title>
33
62
  <style>
34
- :root{--bg:#fff;--fg:#1f1e1d;--muted:#6b6a66}
35
- @media (prefers-color-scheme:dark){:root{--bg:#1f1e1d;--fg:#ecebe6;--muted:#a3a19a}}
36
- body{margin:0;padding:16px;background:var(--bg);color:var(--fg);font-family:system-ui,sans-serif}
37
- .row{display:flex;gap:12px;align-items:center}
38
- input[type=range]{flex:1}
63
+ .wrap { max-width: 560px; margin: 0 auto; }
64
+ .muted { color: var(--codiscuss-text-muted, #6b7280); }
65
+ .result { font-size: 1.8em; font-weight: 600; font-variant-numeric: tabular-nums; margin: 0; }
66
+ .bar { height: 6px; margin: .8em 0; border-radius: 3px; background: var(--codiscuss-border, #d4d4d8); }
67
+ .bar i { display: block; height: 100%; border-radius: 3px; background: var(--codiscuss-accent, #2563eb); }
68
+ .row { display: flex; gap: 1em; align-items: center; }
69
+ .row input { flex: 1; }
39
70
  </style>
40
71
  </head>
41
72
  <body>
42
- <div class="row"><label for="years">年数</label><input id="years" type="range" min="1" max="40" value="20"><span id="out"></span></div>
43
- <p style="color:var(--muted)">本金 1000,年化 7%</p>
44
- <p id="result" style="font-size:24px"></p>
73
+ <div class="wrap">
74
+ <p class="result" id="result"></p>
75
+ <p class="muted">本金 1000,年化 7%</p>
76
+ <div class="bar"><i id="fill"></i></div>
77
+ <label class="row"><span>年数</span><input id="years" type="range" min="1" max="40" value="20"><output id="out" class="muted"></output></label>
78
+ </div>
45
79
  <script>
80
+ const PRINCIPAL = 1000, RATE = 0.07, MAX_YEARS = 40;
46
81
  const years = document.getElementById('years');
47
82
  function render() {
48
- const n = Number(years.value);
49
- document.getElementById('out').textContent = n + ' 年';
50
- document.getElementById('result').textContent = Math.round(1000 * 1.07 ** n).toLocaleString();
83
+ const count = Number(years.value), value = PRINCIPAL * (1 + RATE) ** count;
84
+ document.getElementById('out').textContent = count + ' 年';
85
+ document.getElementById('result').textContent = Math.round(value).toLocaleString();
86
+ document.getElementById('fill').style.width = 100 * value / (PRINCIPAL * (1 + RATE) ** MAX_YEARS) + '%';
51
87
  }
52
88
  years.oninput = render;
53
89
  render();
@@ -998,7 +998,7 @@ def recent_executions(connection, room_id, span=None):
998
998
  for row in rows:
999
999
  requests = []
1000
1000
  line = None
1001
- for request in connection.execute("SELECT id,room_id,member_id,message_id,batch_id,purpose,created_by,status,answer_id FROM member_requests WHERE execution_id=? ORDER BY id", (row["id"],)):
1001
+ for request in connection.execute("SELECT id,room_id,member_id,message_id,batch_id,purpose,created_by,created_at,status,answer_id FROM member_requests WHERE execution_id=? ORDER BY id", (row["id"],)):
1002
1002
  line = line or line_of(connection, request, positions)
1003
1003
  request_data = {key: request[key] for key in ("id", "message_id", "purpose", "status", "answer_id")}
1004
1004
  requests.append({**request_data, **session_request_source(connection, request["id"], request["message_id"])})
@@ -2627,14 +2627,35 @@ def line_of(connection, request, positions=None):
2627
2627
  return {"kind": "main", "step": order.index(request["member_id"]) + 1, "by": "user"}
2628
2628
  if connection.execute("SELECT 1 FROM session_requests WHERE member_request_id=?", (request["id"],)).fetchone():
2629
2629
  return None
2630
- # The host asked directly is a side question, not a branch. A member named directly works beside whatever the host
2631
- # and the others do, relay or not (user 2026-11-21, #6512); only a room of a single member has nothing to branch off.
2630
+ # The host asked directly is a side question, not a branch. A member named directly is a branch when it works beside
2631
+ # what the host or the others were doing then, relay or not (user 2026-11-21, #6512); named while nothing else was
2632
+ # under way it is simply the room's work and carries no mark (user 2026-11-21, #6884).
2632
2633
  if connection.execute("SELECT 1 FROM room_members WHERE id=? AND role='host'", (request["member_id"],)).fetchone() or \
2633
- connection.execute("SELECT COUNT(*) FROM room_members WHERE room_id=? AND status<>'removed'", (request["room_id"],)).fetchone()[0] < 2:
2634
+ not beside_other_work(connection, request):
2634
2635
  return None
2635
2636
  return {"kind": "branch", "by": request["created_by"]}
2636
2637
 
2637
2638
 
2639
+ # How many of the room's requests before a named one are checked for work that was under way when it was named.
2640
+ BRANCH_LOOKBACK = 50
2641
+
2642
+
2643
+ def beside_other_work(connection, request):
2644
+ """Whether another member had work open when this request was made: still open now, answered by a later message,
2645
+ or ended without an answer after it.
2646
+
2647
+ The members named with it are left out, and a request answered by the very message that made this one is not later
2648
+ than it, so a host's dispatch does not count as running beside the host's own turn that sent it."""
2649
+ return connection.execute("""SELECT 1 FROM (SELECT * FROM member_requests WHERE room_id=?1 AND id<?2 ORDER BY id DESC LIMIT ?3) o
2650
+ LEFT JOIN member_executions e ON e.id=o.execution_id
2651
+ WHERE o.member_id<>?4 AND o.message_id<>?5 AND o.purpose<>'group'
2652
+ AND (o.status IN ('pending','delivering') OR o.answer_id>?5 OR (o.answer_id IS NULL AND e.finished_at>?6))
2653
+ UNION ALL SELECT 1 FROM member_requests o WHERE o.room_id=?1 AND o.status IN ('pending','delivering') AND o.id<?2
2654
+ AND o.member_id<>?4 AND o.message_id<>?5 AND o.purpose<>'group' LIMIT 1""",
2655
+ (request["room_id"], request["id"], BRANCH_LOOKBACK, request["member_id"], request["message_id"],
2656
+ request["created_at"])).fetchone() is not None
2657
+
2658
+
2638
2659
  def dispatch_modes(connection, room_id, message_ids):
2639
2660
  """What becomes of each host dispatch once its members end (user 2026-11-20): `relay` (step by step, the last hands
2640
2661
  back), `handoff` (back to the host, the default), `direct` (`no_handoff`: straight to the owner, a failure still back)
@@ -20,6 +20,12 @@ END;
20
20
  CREATE TABLE IF NOT EXISTS topic_folders (
21
21
  id TEXT PRIMARY KEY, name TEXT NOT NULL, position INTEGER NOT NULL DEFAULT 0, directories TEXT NOT NULL DEFAULT '[]'
22
22
  );
23
+ -- A room's published share link on the official share site; the manage token lets the owner renew or revoke it from any
24
+ -- device. Never part of a room backup.
25
+ CREATE TABLE IF NOT EXISTS room_share_links (
26
+ room_id TEXT PRIMARY KEY REFERENCES rooms(id) ON DELETE CASCADE,
27
+ share_id TEXT NOT NULL, url TEXT NOT NULL, manage_token TEXT NOT NULL, expires_at TEXT NOT NULL, updated_at TEXT NOT NULL
28
+ );
23
29
  -- Site-wide preferences of the person managing the site; `last_room` is the room they last opened on any device.
24
30
  CREATE TABLE IF NOT EXISTS site_preferences (
25
31
  key TEXT PRIMARY KEY,
package/backend/server.py CHANGED
@@ -924,12 +924,57 @@ def list_rooms(connection, params=None):
924
924
  GROUP BY rooms.id ORDER BY rooms.created_at, rooms.id""", (int(time.time()), *((identifier,) if identifier else ())))
925
925
  directory = {row["room_id"]: dict(row) for row in connection.execute("SELECT * FROM room_directory")}
926
926
  assignments = {row["room_id"]: row["folder_id"] for row in connection.execute("SELECT room_id,folder_id FROM room_folder_assignments")}
927
+ # Only the public part of a live share link; the manage token stays behind the owner-only share-link read.
928
+ links = {row["room_id"]: {"url": row["url"], "expires_at": row["expires_at"]} for row in connection.execute(
929
+ "SELECT room_id,url,expires_at FROM room_share_links WHERE expires_at>?", (utc_iso_now(),))}
927
930
  rooms = [{**dict(row), "archived": bool(directory[row["id"]]["archived"]), "running": bool(row["running"]),
928
- "folder_id": assignments[row["id"]], "texts": room_display_texts(connection, dict(row))} for row in rows]
931
+ "folder_id": assignments[row["id"]], "texts": room_display_texts(connection, dict(row)),
932
+ "share_link": links.get(row["id"])} for row in rows]
929
933
  return {"rooms": sorted(rooms, key=lambda room: directory[room["id"]]["position"]),
930
934
  **folder_directory(connection)}
931
935
 
932
936
 
937
+ SHARE_ID = re.compile(r"[A-Za-z0-9_-]{22}")
938
+ SHARE_TOKEN = re.compile(r"[A-Za-z0-9_-]{20,200}")
939
+ SHARE_URL_MAX = 300
940
+ # The official share site (web/app.js SHARE_SITE); a link kept with a room must point there.
941
+ SHARE_SITE_HOST = "share.codiscuss.com"
942
+
943
+
944
+ def utc_iso_now():
945
+ """Now as the share site writes times: ISO 8601 in UTC with milliseconds, so strings compare in time order."""
946
+ return datetime.now(timezone.utc).isoformat(timespec="milliseconds").replace("+00:00", "Z")
947
+
948
+
949
+ def share_link_record(connection, room_id):
950
+ """The room's live share link with its manage token, or None when it has none or it expired."""
951
+ require_room(connection, room_id)
952
+ row = connection.execute("SELECT share_id,url,manage_token,expires_at,updated_at FROM room_share_links "
953
+ "WHERE room_id=? AND expires_at>?", (room_id, utc_iso_now())).fetchone()
954
+ return {"link": dict(row) if row else None}
955
+
956
+
957
+ def save_share_link(connection, room_id, payload):
958
+ """Keep the room's share link as the share site gave it, or forget it when `link` is null (revoked or gone)."""
959
+ require_room(connection, room_id)
960
+ link = payload.get("link")
961
+ if link is None:
962
+ connection.execute("DELETE FROM room_share_links WHERE room_id=?", (room_id,))
963
+ return {"link": None}
964
+ if not isinstance(link, dict):
965
+ raise ValueError(Text('分享链接格式不正确'))
966
+ share_id, url, token, expires = (link.get(key) for key in ("share_id", "url", "manage_token", "expires_at"))
967
+ valid = (isinstance(share_id, str) and SHARE_ID.fullmatch(share_id) and isinstance(token, str) and SHARE_TOKEN.fullmatch(token)
968
+ and isinstance(url, str) and len(url) <= SHARE_URL_MAX and url == f"https://{SHARE_SITE_HOST}/s/{share_id}"
969
+ and isinstance(expires, str) and re.fullmatch(r"\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?Z", expires))
970
+ if not valid:
971
+ raise ValueError(Text('分享链接格式不正确'))
972
+ connection.execute("""INSERT INTO room_share_links (room_id,share_id,url,manage_token,expires_at,updated_at) VALUES (?,?,?,?,?,?)
973
+ ON CONFLICT(room_id) DO UPDATE SET share_id=excluded.share_id,url=excluded.url,manage_token=excluded.manage_token,
974
+ expires_at=excluded.expires_at,updated_at=excluded.updated_at""", (room_id, share_id, url, token, expires, utc_iso_now()))
975
+ return share_link_record(connection, room_id)
976
+
977
+
933
978
  def last_room(connection):
934
979
  """The room last opened by the site's manager on any device, or '' when none or it no longer exists."""
935
980
  row = connection.execute("""SELECT p.value FROM site_preferences p JOIN rooms r ON r.id=p.value
@@ -3357,6 +3402,18 @@ class DiscussionHandler(BaseHTTPRequestHandler):
3357
3402
  return self.handle_attachments(connection, parts, params, method)
3358
3403
  if parts[3:4] in (["scheduler-decisions"], ["scheduler-routing"]):
3359
3404
  return self.handle_scheduler_api(connection, parts, method)
3405
+ if parts[3:] == ["share-link"] and method in ("GET", "POST"):
3406
+ # The manage token can renew, revoke or replace a public page: owner only. A request carrying a credential must
3407
+ # carry the owner's, so a member AI using its own command line cannot read or rewrite it even on a local site.
3408
+ if token:
3409
+ require_owner(connection, room_id, token)
3410
+ else:
3411
+ self.require_entry_owner(connection, room_id, token)
3412
+ if method == "GET":
3413
+ return self.respond(share_link_record(connection, room_id))
3414
+ result = save_share_link(connection, room_id, self.read_payload())
3415
+ connection.commit()
3416
+ return self.respond(result)
3360
3417
  free_actor = None
3361
3418
  if method == "POST" and len(parts) == 4 and (parts[3] in DIRECTORY_OPERATIONS
3362
3419
  or parts[3] in ADMIN_OPERATIONS and self.admin_session(connection)):
@@ -8,11 +8,12 @@ Use the local management panel or the corresponding codiscuss admin commands to
8
8
  - **Overview:**
9
9
  - **This computer:** Check the CoDiscuss service status, start, restart, stop, or select **Open site**. When hosting is enabled, this page also shows **Program copies** used by isolated accounts.
10
10
  - **Administrator entry / Online site:** View the local and linked online site addresses. Select **Bind**, **Unbind**, or **Generate access code**.
11
+ **Online site** and `codiscuss admin status` show **Relay connected** after a heartbeat reply on the current connection, explain disconnects, retries or consecutive HTTP failures, and show **Status unknown** if the service is stopped or its observations are stale. After 3 minutes without heartbeat confirmation, the service rebuilds that site’s connection. Select **Reconnect now** or run `codiscuss admin site reconnect` to request it immediately.
11
12
  - **Hosted account entry** (shown when hosting is enabled): Start or stop the **Sign-in entry**, enable **Through the online site**, or configure your **Own domain** using Cloudflare Tunnel.
12
13
  - **Settings:** View the installed version, select **Check for updates** or **Update and restart** (which also updates room skills and isolated accounts), enable **Start when signing in to Windows**, and change the panel language.
13
14
  - **Account:**
14
15
  - **Local account** is listed by default. When hosting is enabled, the page also lists **Hosted accounts** and a **New account** button.
15
- - Select the administrator or a hosted account to manage its **CLI sign-ins** (Claude Code, Codex, and Gemini status, sign-in method, or sign-out; Setup Token is recommended for Claude Code), **API keys**, **Skills** (select from **Skill library** or import a ZIP/folder), **bundled workflows**, and **system prompt**.
16
+ - Select the administrator or a hosted account to manage its **CLI sign-ins** (Claude Code, Codex, and Gemini status, sign-in method, or sign-out; Setup Token is recommended for Claude Code), **API keys**, **Skills** (select from **Skill library** or import a ZIP/folder), **bundled workflows**, and **system prompt**. Updating the program leaves installed workflows unchanged; the workflows section always shows **Check** and **Sync to latest**. **Check** compares the library with the bundled versions and lists missing workflows and those that differ; **Sync to latest** installs the missing ones and replaces those that differ (each replaced copy is first backed up to `backups/workflows` in that account's service folder, and changes made there are replaced too). It is greyed out when everything matches.
16
17
 
17
18
  ## Hosted accounts for other people
18
19
 
@@ -27,7 +28,7 @@ On Windows, open the panel from the tray. On macOS and Linux, use the command-li
27
28
  3. **Configure remote access** using either or both options:
28
29
  - **Through the online site, without your own domain:** Follow the [deployment guide](../deployment.md#entry-for-hosted-accounts-optional) to deploy the entry Worker. On the deployment computer, generate an access code under **Overview** → **This computer** → **Online site**. On this computer, bind the online site and turn on **Through the online site** under **Hosted account entry**. You can also run codiscuss admin entry join <access-code>.
29
30
  - **Own domain:** Under **Hosted account entry** → **Own domain**, authorize a Cloudflare tunnel and connect a domain hosted on Cloudflare. The CLI equivalent is codiscuss admin entry tunnel <domain>.
30
- 4. **Manage the account:** Start or stop its instance, enable, disable or remove the account, reset its password, and provide API keys. Users see **Provided by admin** for administrator-provided keys and cannot view or change them. To invite external experts, the account needs an online relay.
31
+ 4. **Manage the account:** Start or stop its instance, enable, disable or remove the account, reset its password, and provide API keys. Users see **Provided by admin** for administrator-provided keys and cannot view or change them. To invite external experts, the account needs an online relay. The panel checks instances requested to run every minute and restarts them if their port refuses connections, up to 3 times in 10 minutes. After repeated failures, the account row shows the last error. Check `codiscuss admin status` for the latest attempt and start the instance manually after fixing the cause to resume recovery.
31
32
 
32
33
  ### macOS and Linux
33
34
 
@@ -44,7 +45,7 @@ Every command in the table is prefixed by codiscuss admin and returns JSON. Thes
44
45
  | Link/unlink online site and create access code | `site status`, `site connect <access-code\|site>`, `site disconnect`, `entry code` |
45
46
  | Manage sign-in entry and tunnel | `entry start\|stop`, `entry join <access-code>`, `entry open\|close relay\|tunnel`, `entry tunnel <domain>` |
46
47
  | Manage hosted account lifecycle | `account list`, `account add <name>`, `account start\|stop\|disable\|enable\|remove\|password <name>`, `account isolate\|protect <name>` |
47
- | Manage sign-ins, keys, skills, workflows, and prompts | `login status <target>`, `key add <target> --base-url … --key …`, `skill install <target> <skill>`, `workflow install <target>`, `prompt set <target> --file …` |
48
+ | Manage sign-ins, keys, skills, workflows, and prompts | `login status <target>`, `key add <target> --base-url … --key …`, `skill install <target> <skill>`, `workflow install <target>`, `workflow update <target>`, `prompt set <target> --file …` |
48
49
 
49
50
  Use owner as <target> for the administrator, or use a hosted account name. If account add fails partway, fix the issue and run the same command again to resume the missing steps.
50
51
 
@@ -68,11 +68,12 @@ Shutdown and sleep interrupt local execution. During an internet outage, the loc
68
68
  | Account | Display name, Change avatar, Site sessions, Change password | Manage the administrator account on a self-hosted Python site. At `127.0.0.1` you have administrator access automatically. |
69
69
  | Account → Paired devices | Add device, Temporary device (1 day of access), Allow access without a passkey, Pair this device, Activity, Unpair | [Pair a phone or tablet](remote.md#2-pair-your-phone-or-tablet-while-at-the-computer) |
70
70
  | Appearance | Channel, Channel · Light | Choose a theme. Changes take effect immediately. |
71
- | Language · 语言 | 简体中文, English | Choose the display language. Changes take effect immediately. |
72
- | Conversation width | Narrow, Default, Wide | Set the width of the conversation for reading. |
73
- | Card text size | Small, Medium, Large | Text size inside message cards. Medium is the default; the choice applies to this device only. |
74
- | Visual effects | Full, Compact | Compact turns off background blur and layered shadows for smoother scrolling on slower devices. |
75
- | Folding long answers | Relaxed, Standard, Eager | How long an answer must be before it folds, and how much stays visible, measured against the screen height. Relaxed is the default; the choice applies to this device only. |
71
+ | Appearance → Language · 语言 | 简体中文, English | Choose the display language. Changes take effect immediately. |
72
+ | Appearance → Visual effects | Full, Compact | Compact turns off background blur and layered shadows for smoother scrolling on slower devices. |
73
+ | Reading → Conversation width | Narrow, Default, Wide | Set the width of the conversation for reading. |
74
+ | Reading → Card text size | Small, Medium, Large | Text size inside message cards. Medium is the default; the choice applies to this device only. |
75
+ | Reading → Folding long answers | Relaxed, Standard, Eager | How long an answer must be before it folds, measured against the screen height. Relaxed is the default; the choice applies to this device only. |
76
+ | Reading → Lines shown when folded | Fewer, Medium, More | A folded answer keeps about 0.15, 0.3 or 0.5 of the screen, converted to lines from the screen height, so phones, tablets and computers each differ. Medium is the default; the choice applies to this device only. |
76
77
  | Room preferences → Host's project access | Read-only, Can write, Automatic, Full access | The project access the first member added to a new room (the host by default) starts with; Read-only by default. If its software doesn't support the chosen level, it stays read-only. Saved in the local service, kept across updates; needs the local service connected. |
77
78
  | Speech | Text-to-speech service, General voice, voices by platform and for files, Speed, Tone, Voice input, Local process | [Local and cloud speech](voice.md#read-aloud-and-voice-input-local-and-cloud-options) |
78
79
  | WeChat notifications | Scan to link, Send test, Unlink | [WeChat notifications](voice.md#wechat-notifications) |
@@ -44,7 +44,7 @@ You can also send a message from the blank home page to create a room and send i
44
44
 
45
45
  - **Attach files.** Paste or drag files into the composer, or use the paperclip button at the bottom-left. Each message can contain up to 10 files, 20 MiB each. Thumbnails appear above the composer. A placeholder such as `[Image #1]` or `[File #2]` is inserted at the cursor. Removing the thumbnail or deleting its placeholder with Backspace removes both.
46
46
  - **View attachments.** After sending a message, select its placeholder or attachment card. Images can be enlarged full-screen, zoomed, rotated, and saved. Audio and video play in the message. Documents and code open in the file preview.
47
- - **Expand HTML in a message.** On desktop, select “Expand in message” next to a member's `.html` attachment to use the self-contained page below the card. One page can be expanded at a time. For files over 2 MiB, open the file preview to view their source. On a phone, select the attachment card to open the full-screen preview.
47
+ - **Use HTML in an answer.** On desktop, a self-contained `.html` attachment that a member references with a file placeholder appears at that point in the answer and follows the room theme. It runs when you scroll to it. “Collapse” saves your choice. The row below also lets you open a larger preview, view the source, or download the file. The larger preview, mobile full-screen preview, and “Open in new tab” also use the room theme. Unreferenced HTML attachments still have an “Expand in message” button. For files over 2 MiB or files that fail to load, use the file preview. On a phone, select the attachment card for a full-screen preview.
48
48
  - **Member access to attachments.** For supported automatic runs, the local service downloads the file and passes its information to the receiving member. Claude Code and Codex CLI can view images directly. For API members, enable “Images” on the member card to view images. UTF-8 text attachments can be read on request. Members will say when they cannot read a format such as PDF.
49
49
 
50
50
  ### 5. Export, import, and branch rooms
@@ -52,16 +52,18 @@ You can also send a message from the blank home page to create a room and send i
52
52
  - **Export a backup.** A room’s “Export conversation” menu item creates a ZIP containing the room’s messages, discussion history, and attachments. Use a folder menu to “Export folder”, or directory options to “Export all rooms”. Export on the computer running the local service. The archive includes member software settings and session identifiers. The original software’s session history must still be present on that computer to resume a session.
53
53
  - **Share as a web page.** In a room’s menu, select “Share as web page…”. The room is read and cleaned first; the confirmation lists what is included and left out, and anything that looks like a key, a folder on this computer or contact details, with its message number and nearby text. After checking, choose one:
54
54
  - “Download web page” gives you a single `.html` file that opens in any browser. Once sent, it cannot expire or be taken back.
55
- - “Publish link” uploads it to the official share site and copies the link. Choose whether it expires in 1, 3 or 7 days; it is deleted when it expires. The room’s menu then offers “Copy share link” and “Revoke share link”, and “Share as web page…” again offers “Update link”, which also restarts the lifetime. Only the browser that published the link can update or revoke it. Rooms over 5 MB after cleaning need the web page file instead.
55
+ - “Publish link” uploads it to the official share site and copies the link. Choose whether it expires in 1, 3 or 7 days; it is deleted when it expires. “Shared” then appears below the room list, listing every live share link with its time left, to copy, open, renew (same content, a new lifetime from now) or revoke. The room’s menu also offers “Copy share link” and “Revoke share link”, and “Share as web page…” again offers “Update link” to show the latest content. Links are kept with the room on the computer, so paired phones and tablets can manage them too. Rooms over 5 MB after cleaning need the web page file instead.
56
56
 
57
- Either way, readers see the room’s **Messages** and **Runs** views from the beginning, as they look here: cards, run details and the run replay open, but nothing can be sent or changed, and the page shows the room as it was when it was made. Private chats, the event log, scheduling decisions, refused actions, queued messages, attachments, paths on this computer, session IDs and credentials are left out, as are retracted or rewound messages; failure reasons read only “Run failed”, and the room’s project folders are rewritten in message text as paths inside the project. The rest of the message text is shared as written, so check it before sending.
57
+ Either way, readers see the room’s **Messages** and **Runs** views from the beginning, as they look here: cards, run details and the run replay open, but nothing can be sent or changed, and the page shows the room as it was when it was made. Private chats, the event log, scheduling decisions, refused actions, queued messages, paths on this computer, session IDs and credentials are left out, as are retracted or rewound messages; failure reasons read only “Run failed”, and the room’s project folders are rewritten in message text as paths inside the project. The rest of the message text is shared as written, so check it before sending.
58
+
59
+ Attachments are left out by default, and attachment tags in messages read “not included in the share”. When the room has attachments, the confirmation offers “Include attachments”: ticked, every attachment (images, videos, web pages, documents and so on) goes into the page as it is, for readers to view and download. Text attachments are checked for keys and local folders too; the contents of images, videos and other files cannot be checked, so look through them yourself. Attachments count toward the 5 MB limit for share links; above it, untick them or use the web page file.
58
60
  - **Import rooms.** In directory options or a folder menu, select “Import rooms…” and choose a ZIP. Review the preview and confirm the rooms to import. A room marked “Already exists; skipped” is left as is. On the same computer, invite members back to resume their sessions. Claude Code members switch to manual connection on import. Re-register them from their original window to avoid splitting the session. Imported discussion history is kept, but discussions are not restarted and members are not woken automatically.
59
61
  - **Branch from a message.** In an AI message menu, select “Branch from here” to create a room containing the history through that message. Connections that support session branching resume from the branched session in the new room. The original room is kept.
60
62
  - **Let the host create rooms.** With “Create rooms” ticked in “Host permissions”, the host can move part of the work into a new room. Members use only software configured on this computer, with read-only project access by default and at most write. The project folder must be the original room’s folder or a folder inside it. Unless you name another host, the new room is hosted by the same expert as the original host. Each room gets a “Linked room” card; select “Open room” to go to the other one. The new room takes your default host permissions, except that it cannot create rooms. A room can create a limited number of rooms (3 by default, adjustable in “Host permissions”). The hosts of two linked rooms can speak in each other’s room; those messages are labelled “From host … of room "…"” and wake the other room like your own messages. There is no limit by default. To cap it, set “Linked-room message limit” under “Advanced settings” in the new-room form (it applies to every linked room on this computer); counting from your last message in either room, messages beyond it are refused until you send a message.
61
63
 
62
64
  ## Notes
63
65
 
64
- - **Notice when a room goes idle.** When all work in any room ends (it changes from "Running" to idle), the page shows "\"Room name\" is now idle" in the lower-right corner. The page must be open.
66
+ - **Notice when a room's work ends.** When all work in another room ends (it changes from "Running" to idle) and stays ended for a few seconds, the page shows "Work in room \"Room name\" has ended" in the lower-right corner. The room you are viewing is not announced, and neither is work that stops and resumes at once, as with an interjection or a retry. The page must be open.
65
67
  - **Shared directories are not locked.** If members edit the same project file at once, the page shows a conflict notification while the room is open. It is not added to the message history and does not wake the host.
66
68
  - **Preview and transfer limits.** Text previews show at most the first 128 KB. When another device accesses media and documents through the computer, each file is limited to 64 MB. The web app first attempts to compress videos larger than 3 MiB. Links pointing outside a project directory appear disabled and are rejected.
67
69
  - **A branch does not copy project files.** Branched and original rooms share the same project directory. Branching requires a connection to the local service.
@@ -22,12 +22,12 @@ Room work can run on several lines in parallel. Labels at the top of a card show
22
22
  - With message queuing enabled, a directly mentioned member starts immediately when idle. If busy, its request waits in the queue until it is free. If one message mentions both idle and busy members, idle members start at once while the busy members’ work waits.
23
23
  - When a main-line member’s turn arrives, it waits for that member to finish its active branch work.
24
24
  - With message queuing enabled, your unmentioned messages, `@all`, and `@all-seq` wait until the room is idle, then go out in order. Background work assigned by the host does not hold up your new messages.
25
- - **Where things sit on a card.** Every member card has, from top to bottom: the header, the body, what it delivers (answer summary, attachments, delivered files) and the run’s record (progress notes with step count, file changes, refused operations). In the header, the name and labels are on the left, and a coloured label only means something went wrong (red for failed; amber for stopped, voided or skipped); the time and number sit below the name; the model, effort and duration sit at the right end. Stop and retry sit at the right end of the line they act on.
25
+ - **Where things sit on a card.** Every member card has, from top to bottom: the header, the body, what it delivers (answer summary, attachments, delivered files) and the run’s record (progress notes with step count, file changes, refused operations). The left of the header says who: the name, labels, and the model and effort this run used. The right says how this one went: status, time, number and duration, with the duration always last. A coloured status only means something went wrong (red for failed; amber for stopped, voided or skipped), and nothing is shown when all is well; on your own messages, the right shows how each member is handling it. On a phone, the second line has the model at the left and the status and time at the right. Stop and retry sit at the right end of the line they act on.
26
26
  - **Card labels.** Where the card came from comes first, then where the work goes next. The usual channels (own message, CLI, API) are no longer labelled; only rare sources such as sent on someone’s behalf, proactive messages and auto-captured answers are.
27
27
  - “Host” identifies a message from the current host, host notes included.
28
28
  - “Main line · step {n}” is a host-arranged order. “Main line · #{n} in turn” is `@all-seq`.
29
- - “Branch” marks a directly mentioned member’s work running alongside the main line. Failed and stopped cards keep these labels.
30
- - **Model and reasoning effort**: a member’s answer card, working card, failed card and stopped card show the model and effort that run actually used (for example `gpt-6.2-sol · medium`) before its duration, and so does a run’s detail on the Runs page. It records what was used at the time, so changing the member’s model later does not change older cards; when it cannot be read (an external member, for example) nothing is shown. On a phone, when space runs short only the start of the model ID is cut, keeping its end and the effort.
29
+ - “Branch” marks a directly mentioned member’s work that started while another member was working. Mentioning a member in an idle room is not marked. Failed and stopped cards keep these labels.
30
+ - **Model and reasoning effort**: a member’s answer card, working card, failed card and stopped card show the model and effort that run actually used (for example `gpt-6.2-sol · medium`) after the name and labels, and so does a run’s detail on the Runs page. It records what was used at the time, so changing the member’s model later does not change older cards; when it cannot be read (an external member, for example) nothing is shown. On a phone, when space runs short only the start of the model ID is cut, keeping its end and the effort.
31
31
  - **Labels on the host’s work assignments.**
32
32
  - “Back to the host when done”: wake the host when all assigned members finish, including failures, so the host can decide what to do next.
33
33
  - “Straight to you when done”: give you the member’s answers without returning to the host. Failures still go back to the host.
@@ -50,7 +50,7 @@ With queuing enabled, new messages wait above the composer while the intended me
50
50
 
51
51
  - **Stop a run.** Select “Stop” on an in-progress card, or select “Stop” from a member’s menu in the right sidebar, to stop that member’s current run. Select “Stop all” in the sidebar to stop all members and cancel requests not yet delivered. When the local service confirms process exit, the card shows “Stopped”. If it cannot confirm, it shows “Stop unconfirmed”. If an app or manual session cannot be stopped, it shows “The previous run is invalidated but may still be generating”. A late answer does not enter the conversation. The room owner can expand “Unaccepted reply” on the canceled card to inspect it.
52
52
  - **Retry or resend.** During the delivery-failure countdown, select “Retry now” or “Stop” on the delivery card. On a run-failure card, select “Resend” to put the original user message back in the composer for confirmation and sending. If an operation failed because permission was denied, expand the card’s run report to see whether “Allow and resend” is available.
53
- - **Withdraw a message.** If no member has started work on it, “Withdraw” returns the original text to the composer. You can also withdraw the latest message after work has started. This stops that work and rewinds the conversation to the previous message. If the composer is empty, press `Esc` twice to withdraw the most recent message.
53
+ - **Withdraw a message.** If no member has started work on it, “Withdraw” returns the original text, files and reply to the composer. You can also withdraw the latest message after work has started. This stops that work and rewinds the conversation to the previous message. If the composer is empty, press `Esc` twice to withdraw the most recent message.
54
54
  - **Edit and rewind.** Select “Edit” on a processed user message, change it, and send again. The message and everything after it are folded under “Rolled back”, so the AI no longer sees them. Before confirming, review how each member session will be handled. Project files already changed by a member remain as they are.
55
55
 
56
56
  ### 5. Private chat and interruptions during a run
@@ -8,11 +8,12 @@
8
8
  - **“概览”页**:
9
9
  - **本机**:查看“共议服务”运行状态,点启动、重启、停止或“打开网站”;开启托管管理后还显示供隔离账号使用的“程序副本”。
10
10
  - **管理员入口 / 线上网站**:查看本地网页和已绑定的线上网站地址,可“绑定”、“解绑”或“生成接入码”。
11
+ “线上网站”和 `codiscuss admin status` 均在收到本次连接的心跳回应后显示“中转已连接”,遇到断线、重连或连续 HTTP 请求失败会说明原因,服务停止或记录过期时显示“状态未知”。中转连续 3 分钟未获心跳确认时,服务会重建该网站的连接。也可以点“立即重连”或运行 `codiscuss admin site reconnect`。
11
12
  - **托管账号入口**(开启托管管理后显示):启停“登录入口”,开关“经线上网站中转”或配置“自有域名”(Cloudflare Tunnel)。
12
13
  - **设置**:查看当前版本、“检查更新”与“更新并重启”(同步更新房间技能和隔离账号)、开关“登录 Windows 时自动启动”,以及切换管理面板语言。
13
14
  - **“账号”页**:
14
15
  - 左侧默认有“管理员(本机账号)”,开启托管管理后下方列出所有“托管账号”和“新建账号”按钮。
15
- - 选中“管理员”或某个托管账号,可统一管理它的**命令行登录**(Claude Code / Codex / Gemini 登录状态、切换登录方式或退出,Claude Code 推荐 Setup Token)、**API 密钥**、**技能**(从“技能库”勾选安装或拖入 `.zip`/文件夹导入)、**随包工作流**与**系统提示词**。
16
+ - 选中“管理员”或某个托管账号,可统一管理它的**命令行登录**(Claude Code / Codex / Gemini 登录状态、切换登录方式或退出,Claude Code 推荐 Setup Token)、**API 密钥**、**技能**(从“技能库”勾选安装或拖入 `.zip`/文件夹导入)、**随包工作流**与**系统提示词**。程序更新不会改动已装的工作流;工作流区右上角常驻“检查”和“同步到最新版”:“检查”对比随包版本,列出缺少的和与最新版不同的;“同步到最新版”补装缺少的、用最新版替换不同的(被替换的旧版先备份到该账号服务目录的 `backups/workflows`,在这里做过的修改也会被替换),都一致时按钮变灰。
16
17
 
17
18
  ## 托管账号:给别人开账号用这台电脑上的 AI
18
19
 
@@ -29,7 +30,7 @@ Windows 可以从托盘打开面板。macOS 和 Linux 的命令行入口见下
29
30
  3. **配置外网入口(二选一或同时开启)**:
30
31
  - **经线上网站中转(无需自有域名)**:先按[部署指南](../deployment.md#托管账号的入口可选)部署好入口 Worker;在部署电脑的“概览 → 本机 → 线上网站”生成接入码后,在这台电脑的管理面板“概览 → 线上网站”绑定并打开“托管账号入口”里的“经线上网站中转”(命令行一步完成:`codiscuss admin entry join <接入码>`)。
31
32
  - **自有域名**:在“托管账号入口 → 自有域名”点配置,按提示授权 Cloudflare 隧道并绑定托管在 Cloudflare 上的域名(命令行 `codiscuss admin entry tunnel <域名>`)。
32
- 4. **管理账号**:在托管账号页面可以启动/停止实例、停用/启用账号、重设密码、删除账号、配置由管理员提供的 API 密钥(对方界面只显示“管理员提供”,无法查看或更换),并复制登录地址与账号发给对方。邀请外部专家需要该实例具备可用的线上中转入口。
33
+ 4. **管理账号**:在托管账号页面可以启动/停止实例、停用/启用账号、重设密码、删除账号、配置由管理员提供的 API 密钥(对方界面只显示“管理员提供”,无法查看或更换),并复制登录地址与账号发给对方。邀请外部专家需要该实例具备可用的线上中转入口。面板每分钟检查已要求运行的实例,端口拒绝连接时自动重启,10 分钟内最多 3 次。达到上限仍失败时,账号行显示最后原因,`codiscuss admin status` 可查最近一次尝试。修好原因后手动启动可恢复巡检。
33
34
 
34
35
  ### macOS 和 Linux 能不能用?
35
36
 
@@ -46,7 +47,7 @@ Windows 可以从托盘打开面板。macOS 和 Linux 的命令行入口见下
46
47
  | 绑定/解绑线上网站、生成接入码 | `codiscuss admin site status`、`site connect <接入码\|站点>`、`site disconnect`、`entry code` |
47
48
  | 托管入口与隧道 | `codiscuss admin entry start\|stop`、`entry join <接入码>`、`entry open\|close relay\|tunnel`、`entry tunnel <域名>` |
48
49
  | 托管账号生命周期 | `codiscuss admin account list`、`account add <名>`、`account start\|stop\|disable\|enable\|remove\|password <名>`、`account isolate\|protect <名>` |
49
- | 登录、密钥、技能与提示词 | `codiscuss admin login status <对象>`、`key add <对象> --base-url … --key …`、`skill install <对象> <技能>`、`workflow install <对象>`、`prompt set <对象> --file …` |
50
+ | 登录、密钥、技能与提示词 | `codiscuss admin login status <对象>`、`key add <对象> --base-url … --key …`、`skill install <对象> <技能>`、`workflow install <对象>`、`workflow update <对象>`、`prompt set <对象> --file …` |
50
51
 
51
52
  注:`<对象>` 填 `owner` 代表管理员自己,填托管账号名代表对应托管账号。`account add` 中途失败时,解决问题后重跑同一命令会自动从缺少的步骤续做。
52
53
 
package/docs/guide/faq.md CHANGED
@@ -60,11 +60,12 @@
60
60
  | **账号** | “显示名称” / “更换头像” / “网站登录” / “更改密码” | 自托管 Python 站点的管理员账号管理(本机 `127.0.0.1` 自动为管理员,无需登录) |
61
61
  | **账号 → 已配对的设备** | “添加设备” / “临时设备” / “允许不用通行密钥” / “配对这台设备” / “使用记录” / “解绑” | [手机与外出](remote.md#2-在电脑前配对手机或平板) |
62
62
  | **外观** | “协作频道” / “协作频道 · 浅色” | 网页界面外观,点击即生效 |
63
- | **语言 · Language** | 界面显示语言(简体中文 / English) | 网页界面语言,切换即生效 |
64
- | **对话宽度** | “窄” / “默认” / “宽” | 网页阅读排版,点击即生效 |
65
- | **卡片文字大小** | “小” / “中” / “大” | 消息卡片里正文的字号;默认“中”,只对当前设备生效 |
66
- | **视觉效果** | “完整” / “精简”(关闭毛玻璃模糊与多层阴影) | 低配设备或追求流畅滚动时切到精简模式 |
67
- | **长回答折叠** | “宽松” / “标准” / “紧凑” | 回答多长才收起、收起后留多少,按屏幕高度计算;默认“宽松”,只对当前设备生效 |
63
+ | **外观 → 语言 · Language** | 界面显示语言(简体中文 / English) | 网页界面语言,切换即生效 |
64
+ | **外观 → 视觉效果** | “完整” / “精简”(关闭毛玻璃模糊与多层阴影) | 低配设备或追求流畅滚动时切到精简模式 |
65
+ | **阅读 → 对话宽度** | “窄” / “默认” / “宽” | 网页阅读排版,点击即生效 |
66
+ | **阅读 → 卡片文字大小** | “小” / “中” / “大” | 消息卡片里正文的字号;默认“中”,只对当前设备生效 |
67
+ | **阅读 → 长回答折叠** | “宽松” / “标准” / “紧凑” | 回答多长才收起,按屏幕高度计算;默认“宽松”,只对当前设备生效 |
68
+ | **阅读 → 折叠后显示** | “少” / “中” / “多” | 收起后保留开头约 0.15 / 0.3 / 0.5 屏,按屏幕高度换算成行数,手机、平板、电脑各不相同;默认“中”,只对当前设备生效 |
68
69
  | **房间偏好 → 主持人项目权限** | “只读” / “可写” / “自动” / “全放开” | 新建房间时第一位加入的成员(默认主持人)的项目权限,默认“只读”;该软件不支持所选档位时仍为只读。保存在本机服务里,升级不丢,需连接本机服务 |
69
70
  | **语音** | 朗读服务 / 音色(通用、各平台、文件)/ 语速 / 语气 / 语音输入服务 / “本机进程” | [语音与通知](voice.md#朗读与语音输入本机与云端的区别) |
70
71
  | **微信通知** | “扫码绑定” / “发送测试” / “解除绑定” | [语音与通知](voice.md#微信通知) |
@@ -44,7 +44,7 @@
44
44
 
45
45
  - **添加附件**:在输入框粘贴、拖入文件,或点左下角回形针按钮选择文件(每条消息最多 10 个,单个最多 20 MiB)。添加后输入框上方出现缩略图,正文光标处插入 `[图片 #1]`、`[文件 #2]` 等房间内连续编号的占位标签;删掉缩略图或按退格删掉占位,两边同步移除。
46
46
  - **查看附件**:消息发出后点正文占位或附件卡片即可打开;图片支持全屏缩放、旋转与保存,音视频直接在消息里播放,文档与代码在文件预览窗口打开。
47
- - **在消息内展开 HTML**:桌面上点成员回答的 `.html` 附件旁的“在消息内展开”,可在卡片下方操作自包含的 HTML 页面。同一时间只展开一个,超过 2 MiB 可到文件预览窗口查看源码。手机上点原有附件卡片全屏预览。
47
+ - **在回答里操作 HTML**:在桌面上,成员正文用 `[文件 #n]` 引用的自包含 `.html` 附件,会在引用位置显示并随房间主题切换。滚到演示时才运行,点下方的“收起”会记住选择。下方也能放大、查看源码或下载。放大的预览窗口、手机全屏预览和“在新标签页打开”也使用房间主题。未引用的 HTML 仍可从附件卡片点“在消息内展开”;超过 2 MiB 或读取失败时改用文件预览窗口。手机上点原有附件卡片全屏预览。
48
48
  - **成员读取附件**:本机服务为支持附件的自动执行下载文件,并把文件信息交给接收任务的成员。Claude Code 和 Codex CLI 可直接看图;API 成员需在卡片设置中打开“看图”才能看图,UTF-8 文本附件可按需读取,PDF 等其他文件读不到时会如实说明。
49
49
 
50
50
  ### 5. 导出、导入与分支房间
@@ -52,16 +52,18 @@
52
52
  - **导出备份**:房间菜单 → “导出对话”将当前房间的消息、历次讨论与附件打包为 ZIP;文件夹菜单 → “导出文件夹”;目录选项 → “导出全部房间”。在运行本机服务的电脑上导出,备份会附带成员的软件配置与会话标识。要续接会话,原软件的会话记录仍须保存在电脑上。
53
53
  - **分享为网页**:房间菜单 → “分享为网页…”。程序先读取并整理房间,确认框里列出包含与不包含的内容,以及找到的疑似密钥、本机目录或联系方式(标出消息编号和前后文),核对后选一种方式:
54
54
  - “下载网页文件”:得到一个单独的 `.html` 文件,用浏览器直接打开即可,发出去后无法过期或撤回。
55
- - “发布链接”:上传到官方分享站,得到一个链接并自动复制,选 1、3 或 7 天后过期,到期自动删除。之后房间菜单里有“复制分享链接”“撤销分享链接”,再次“分享为网页…”可“更新链接”并重新计算有效期。只有发布时用的这个浏览器能更新或撤销;整理后超过 5 MB 的房间请改用网页文件。
55
+ - “发布链接”:上传到官方分享站,得到一个链接并自动复制,选 1、3 或 7 天后过期,到期自动删除。之后左侧房间列表下方出现“已分享”,列出所有有效的分享链接和剩余时间,可以复制、打开、续期(内容不变,有效期从现在重新计算)或撤销;房间菜单里也有“复制分享链接”“撤销分享链接”,再次“分享为网页…”可“更新链接”换成最新内容。链接跟着房间保存在电脑上,已配对的手机和平板也能管理;整理后超过 5 MB 的房间请改用网页文件。
56
56
 
57
- 两种方式看到的都是这个房间的“消息”和“执行”两页,从头阅读,外观与本机一致,卡片、执行详情和执行回放都能点开,但不能发消息或做任何操作;内容停在生成那一刻。私聊、事件记录、调度决策、被拒操作、排队消息、附件、本机路径、会话编号与凭据不会写进去,已撤回或回退的消息也不带;失败原因只写“执行失败”,房间项目目录在正文里改写成项目内的相对路径。消息正文其余部分原样公开,发出前请核对。
57
+ 两种方式看到的都是这个房间的“消息”和“执行”两页,从头阅读,外观与本机一致,卡片、执行详情和执行回放都能点开,但不能发消息或做任何操作;内容停在生成那一刻。私聊、事件记录、调度决策、被拒操作、排队消息、本机路径、会话编号与凭据不会写进去,已撤回或回退的消息也不带;失败原因只写“执行失败”,房间项目目录在正文里改写成项目内的相对路径。消息正文其余部分原样公开,发出前请核对。
58
+
59
+ 附件默认不带,消息里的附件标记显示为“未包含在分享中”。房间有附件时,确认框里有“包含附件”,勾选后所有附件(图片、视频、网页、文档等)原样放进分享页,读者可以查看和下载。文本类附件会一并检查疑似密钥和本机目录;图片、视频等文件的内容程序查不了,请自己核对。附件计入发布链接 5 MB 的上限,超过时取消勾选或改用网页文件。
58
60
  - **导入房间**:目录选项或文件夹菜单 → “导入房间…”,选择 ZIP 文件,在预览中确认要导入的房间;标为“已存在,跳过”的房间会保留原样。在同一台电脑导入后,请回成员会续接原会话(Claude Code 成员会改为手动接入,请回后在原窗口重新注册,避免会话分叉)。导入保留历史讨论记录,不会自动继续原讨论或重新唤醒成员。
59
61
  - **从某条消息分支**:AI 发言菜单 → “从这里分支”,新建一个保留截至该条发言记录的房间。支持会话分叉的接入方式会在新房间续接分叉后的会话;原房间保留。
60
62
  - **让主持人新建房间**:在“主持人权限”里勾选“新建房间”后,主持人可以把一部分工作拆到新房间:成员只用本机已配置的软件,项目权限默认只读、最高可写,项目目录只能是原房间的目录或其子目录;你没指定时由与原主持人同款的专家主持。两个房间各留一张“关联房间”卡片,点“打开房间”互相跳转。新房间的主持人权限按你的默认设置,但不能再新建房间;一个房间可新建的数量有上限(默认 3 个,可在“主持人权限”里调整)。两个关联房间的主持人可以互相发言,这些消息标注“来自房间「…」的主持人 …”,按你的消息唤醒对方房间;默认不限条数;担心两边来回不停,可在新建房间面板“高级设置”里设“关联房间互传上限”(对本机所有关联房间生效),从你上次在任一房间发言算起超过这个条数会被拒绝,你发一条消息即可让它们继续。
61
63
 
62
64
  ## 要注意什么
63
65
 
64
- - **房间转为空闲时提示**:任一房间的工作全部结束(从“正在执行”变为空闲)时,网页右下角提示“「房间名」已空闲”;需要开着网页。
66
+ - **房间工作结束时提示**:别的房间的工作全部结束(从“正在执行”变为空闲)并保持几秒后,网页右下角提示“房间「房间名」的工作已结束”;正在看的房间不提示,插话、重试这类停下又马上继续的情况也不提示。需要开着网页。
65
67
  - **共享目录不加锁**:多位成员同时改动同一项目文件时,网页右下角会弹出冲突提示(仅在开着房间时触发,不写进消息记录,也不唤醒主持人)。
66
68
  - **预览与传输限额**:文本文件最多预览前 128 KB;其他设备经电脑查看媒体与文档时单个文件最多 64 MB,发送 3 MiB 以上视频时网页会先尝试压缩。指向项目目录外的链接会灰显并被拒绝。
67
69
  - **分支不分叉文件**:分支出的新房间与原房间共用同一项目目录,文件系统不会复制;“从这里分支”需要连接本机服务。
@@ -22,12 +22,12 @@
22
22
  - 开启消息排队后,被你直接 `@` 的成员空闲就立即开始,正忙就进入排队区,一空闲立刻收到。如果一条消息同时 `@` 了空闲成员和忙碌成员,空闲的立刻开工,忙碌的那份留在排队区等它空闲。
23
23
  - 主线轮到某位成员时,会等它做完手头支线再继续。
24
24
  - 开启消息排队后,你发出的未点名消息、`@全体成员`、`@全体依次` 等整个房间空闲后再按顺序发出(主持人派出的后台任务不会阻塞你的新消息)。
25
- - **卡片的固定位置**:每张成员卡从上到下依次是卡头、正文、交付(回答摘要、附件、交付文件)、过程记录(过程说明与步数、文件改动、被拒操作)。卡头左侧是名字和标签,带颜色的标签只表示出了问题(红色失败,琥珀色停止、作废、跳过);名字下方是时间和编号;右端是模型、强度与耗时。停止、重试按钮在它作用的那一行右端。
25
+ - **卡片的固定位置**:每张成员卡从上到下依次是卡头、正文、交付(回答摘要、附件、交付文件)、过程记录(过程说明与步数、文件改动、被拒操作)。卡头左边说“是谁”:名字、标签和这次用的模型与强度;右边说“这一次怎么样”:状态、时间、编号、耗时,耗时总在最右。带颜色的状态只表示出了问题(红色失败,琥珀色停止、作废、跳过),正常时不标;你发的消息上,右边是各成员的处理状态。手机上第二行左边是模型,右边是状态和时间。停止、重试按钮在它作用的那一行右端。
26
26
  - **卡片头部标签**:先写这张卡从哪来,再写接下来去哪。常见的发言渠道(本人发言、CLI、API)不再标出,只标代发、主动发言、自动收录这类少见来源。
27
27
  - “主持”:当前主持人的发言,主持说明卡也用它。
28
28
  - “主线 · 第 n 棒”(主持人安排的顺序)或“主线 · 第 n 位”(`@全体依次`)。
29
- - “支线”:直接点名、与主线并行的任务。失败卡、停止卡同样保留这些标签。
30
- - **模型与思考强度**:成员的回答卡、处理中卡片、失败卡和停止卡在耗时前显示这次执行实际所用的模型与强度(如 `gpt-6.2-sol · medium`),执行页点开某次执行的详情也会显示。它记录的是当时所用,之后改成员模型不会改变旧卡片;读不到(如外部成员)时不显示。手机上放不下时只截掉型号开头,保留末尾和强度。
29
+ - “支线”:直接点名、且点名时房间里另有成员在工作的任务。房间空闲时点名一位成员不标。失败卡、停止卡同样保留这些标签。
30
+ - **模型与思考强度**:成员的回答卡、处理中卡片、失败卡和停止卡在名字与标签之后显示这次执行实际所用的模型与强度(如 `gpt-6.2-sol · medium`),执行页点开某次执行的详情也会显示。它记录的是当时所用,之后改成员模型不会改变旧卡片;读不到(如外部成员)时不显示。手机上放不下时只截掉型号开头,保留末尾和强度。
31
31
  - **主持人派活消息上的标签**:
32
32
  - “做完交回主持”:派出的成员全部结束(含失败)后唤醒主持人决定下一步。
33
33
  - “做完直接给你”:成员的回答直接给你,不再交回主持人;失败时仍交回主持人。
@@ -50,7 +50,7 @@
50
50
 
51
51
  - **停止执行**:点处理中卡片的“停止”(或右栏 → 成员菜单 → “停止”)停掉该成员这一次;在右栏点“全部停止”停掉全部成员并取消尚未送达的请求。本机确认进程退出后显示“已停止”,无法确认时显示“停止未确认”,App 或手动窗口停不了时显示“已作废,可能仍在生成”。迟到的回答不进入主记录,房主可在作废卡展开“未采纳的回答”查看。
52
52
  - **重试与重发**:投递失败卡倒计时期间可点“立即重试”或“停止”;执行失败卡点“重发”把原用户消息填回输入框确认后再发。如果是某项操作被权限拦截导致失败,展开对应卡片的执行报告,查看是否可以“允许并重发”。
53
- - **撤回消息**:还没有成员开始处理的消息,点“撤回”把原文退回输入框;最新一条消息即使已开始处理也可撤回(同时停止处理并回退到它之前)。输入框为空时连按两下 `Esc` 也可撤回最近一条。
53
+ - **撤回消息**:还没有成员开始处理的消息,点“撤回”把原文连同附件和引用退回输入框;最新一条消息即使已开始处理也可撤回(同时停止处理并回退到它之前)。输入框为空时连按两下 `Esc` 也可撤回最近一条。
54
54
  - **编辑并回退**:已被处理的用户消息点“编辑”,改写后重新发送。这条消息及之后的记录会折叠为“已回退”,AI 不再读到它们;确认前查看回退预览,逐个核对成员会话将如何处理。成员已改动的项目文件会保留。
55
55
 
56
56
  ### 5. 私聊与执行中插话
@@ -1,4 +1,31 @@
1
1
  {
2
+ "自动重启失败:{reason}": "Automatic restart failed: {reason}",
3
+ "实例端口拒绝连接": "The instance port refused the connection",
4
+ "立即重连": "Reconnect now",
5
+ "已请求重连中转": "Relay reconnection requested",
6
+ "暂时无法读取管理面板的最新状态。": "The latest management panel status could not be retrieved.",
7
+ "与 {host} 的中转连接失败({reason}),已重试 {retries} 次,HTTP 请求也已连续失败 {count} 次({http_reason})。": "The relay connection to {host} failed ({reason}). Retry count: {retries}. Also, {count} consecutive HTTP requests failed ({http_reason}).",
8
+ "正在等待 {host} 确认中转,HTTP 请求已连续失败 {count} 次({reason})。": "Waiting for relay confirmation from {host}. There have been {count} consecutive HTTP failures ({reason}).",
9
+ "状态未知": "Status unknown",
10
+ "共议服务未运行,无法确认中转状态。": "The CoDiscuss service is stopped. Relay status is unknown.",
11
+ "没有当前服务的近期中转记录。": "No recent relay status is available from the current service.",
12
+ "中转异常": "Relay failed",
13
+ "中转重连中": "Relay reconnecting",
14
+ "与 {host} 的中转连接失败({reason}),已重试 {retries} 次。": "The relay connection to {host} failed ({reason}). Retry count: {retries}.",
15
+ "网站请求异常": "Website requests failing",
16
+ "中转心跳正常,但向 {host} 发出的 HTTP 请求已连续失败 {count} 次({reason})。": "The relay heartbeat is healthy, but {count} consecutive HTTP requests to {host} failed ({reason}).",
17
+ "中转已连接": "Relay connected",
18
+ "中转连接中": "Relay connecting",
19
+ "正在等待 {host} 确认连接,上次失败原因是{reason},已重试 {retries} 次。": "Waiting for confirmation from {host}. Last failure: {reason}. Retry count: {retries}.",
20
+ "连接已打开,正在等待网站回应心跳。": "The connection is open. Waiting for the website to acknowledge the heartbeat.",
21
+ "正在连接 {host}。": "Connecting to {host}.",
22
+ "心跳超过 {seconds} 秒未回应": "no heartbeat response for {seconds} seconds",
23
+ "连接已断开,关闭代码 {code}": "connection closed with code {code}",
24
+ "连接被重置,请检查本机网络或代理": "connection reset; check this computer’s network or proxy",
25
+ "连接超时,请检查本机网络或代理": "connection timed out; check this computer’s network or proxy",
26
+ "无法解析网站域名": "website hostname could not be resolved",
27
+ "连接被拒绝": "connection refused",
28
+ "无法连接网站,请检查本机网络或代理": "website unreachable; check this computer’s network or proxy",
2
29
  "{value1} 的新密码": "New password for {value1}",
3
30
  "创建 Windows 用户": "Create Windows user",
4
31
  "创建": "Create",
@@ -129,14 +156,18 @@
129
156
  "更多操作": "More actions",
130
157
  "暂无托管账号。创建后,对方可通过登录入口使用本机的 AI。": "No hosted accounts yet. Create one to let someone use this computer's AI through the sign-in entry.",
131
158
  "新建账号": "New account",
132
- "随包工作流已补齐": "Missing bundled workflows installed",
133
159
  "工作流": "Workflows",
134
160
  "房间中可启用的多人分工流程;编辑、停用在共议网站侧栏的“工作流”中进行": "Multi-member workflows for rooms. Edit or disable them under Workflows in the CoDiscuss sidebar.",
135
161
  "暂无工作流。": "No workflows yet.",
136
162
  "{value1} 个角色": "{value1} roles",
137
163
  "无法读取": "Unreadable",
138
164
  "缺少随包工作流:{value1}": "Missing bundled workflows: {value1}",
139
- "补齐": "Install missing",
165
+ "与随包最新版不同:{value1}": "Differs from the latest bundled version: {value1}",
166
+ "检查": "Check",
167
+ "同步到最新版": "Sync to latest",
168
+ "已是随包最新版": "Up to date with the bundled versions",
169
+ "工作流已同步到随包最新版,被替换的旧版已备份": "Workflows synced to the latest bundled versions; replaced copies were backed up",
170
+ "补装缺少的随包工作流,并用最新版替换不同的;被替换的旧版先备份到该账号服务目录的 backups/workflows,在这里做过的修改也会被替换": "Installs the missing bundled workflows and replaces those that differ with the latest version; each replaced copy is first backed up to backups/workflows in the account's service folder, and changes made here are replaced too",
140
171
  "概览": "Overview",
141
172
  "已刷新": "Refreshed",
142
173
  "共议": "CoDiscuss",