ai_co_discuss 0.4.91 → 0.4.93

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.
@@ -190,7 +190,7 @@ def reported_capabilities(row):
190
190
  LATER_COLUMNS = {"room_members": {"access": "TEXT NOT NULL DEFAULT 'runner'", "session_mode": "TEXT NOT NULL DEFAULT 'new'"},
191
191
  "external_members": {"platform": "TEXT NOT NULL DEFAULT ''", "model": "TEXT NOT NULL DEFAULT ''"},
192
192
  "member_executions": {"changes": "TEXT NOT NULL DEFAULT ''", "edited": "TEXT NOT NULL DEFAULT ''", "cwd": "TEXT NOT NULL DEFAULT ''",
193
- "diffs": "TEXT NOT NULL DEFAULT ''",
193
+ "diffs": "TEXT NOT NULL DEFAULT ''", "changes_provisional": "INTEGER NOT NULL DEFAULT 0",
194
194
  "activity": "TEXT NOT NULL DEFAULT ''", "activity_at": "INTEGER NOT NULL DEFAULT 0",
195
195
  "paused_at": "INTEGER NOT NULL DEFAULT 0"},
196
196
  "member_requests": {"chain_id": "INTEGER NOT NULL DEFAULT 0", "batch_id": "INTEGER NOT NULL DEFAULT 0",
@@ -979,6 +979,7 @@ def recent_executions(connection, room_id, span=None):
979
979
  (SELECT COUNT(*) FROM execution_segments WHERE source='free' AND execution_id=e.id
980
980
  AND phase IN ('command','tool','editing')) AS step_count,
981
981
  (SELECT COUNT(*) FROM execution_segments WHERE source='free' AND execution_id=e.id AND phase='command') AS command_count,
982
+ (SELECT COUNT(*) FROM execution_segments WHERE source='free' AND execution_id=e.id AND phase='editing') AS edit_count,
982
983
  (SELECT denials FROM execution_denials WHERE execution_id=e.id) AS denials,{CAPABILITY_COLUMNS},
983
984
  (SELECT failure_class FROM execution_failures WHERE execution_id=e.id) AS failure_class,
984
985
  (SELECT json_object('created_at',created_at) FROM late_answers WHERE execution_id=e.id) AS late_answer,
@@ -1000,7 +1001,7 @@ def recent_executions(connection, room_id, span=None):
1000
1001
  "edited": json.loads(row["edited"]) if row["edited"] else None, "diff_stats": diff_stats(row["diffs"]),
1001
1002
  "answer_id": row["answer_id"], "request_message_id": row["request_message_id"],
1002
1003
  "layout_after": row["layout_after"], "layout_at": row["layout_at"] or row["created_at"], "requests": requests,
1003
- "notes": row["note_count"], "steps": row["step_count"], "commands": row["command_count"], "denials": json.loads(row["denials"] or "[]"), "failure_class": row["failure_class"] or "",
1004
+ "notes": row["note_count"], "steps": row["step_count"], "commands": row["command_count"], "edits": row["edit_count"], "denials": json.loads(row["denials"] or "[]"), "failure_class": row["failure_class"] or "",
1004
1005
  "capabilities": reported_capabilities(row), "stop_result": row["stop_result"] or "",
1005
1006
  "late_answer": json.loads(row["late_answer"]) if row["late_answer"] else None, "background": bool(row["background"]),
1006
1007
  "retried": bool(row["retried"]),
@@ -3487,12 +3488,14 @@ def execution_action(connection, room_id, execution_id, token, payload, member=N
3487
3488
  raise PermissionError(Text("只能报告自己执行的失败") if action == "fail" else Text("执行编号不属于本成员"))
3488
3489
  now = int(time.time())
3489
3490
  if action == "report":
3490
- # Observed after the process ends, so the execution may already be complete; recorded once.
3491
- if row["changes"]:
3491
+ # Observed after the process ends, so the execution may already be complete; recorded once. A provisional report
3492
+ # (what had changed when the answer arrived, the software still closing its turn) is replaced by that final one.
3493
+ provisional = payload.get("provisional") is True
3494
+ if row["changes"] and (provisional or not row["changes_provisional"]):
3492
3495
  raise FileExistsError(Text("本次执行的改动已记录"))
3493
3496
  changes = changed_files(payload)
3494
- connection.execute("UPDATE member_executions SET changes=?,edited=?,diffs=? WHERE id=?",
3495
- (json.dumps(changes, ensure_ascii=False), edited_files(payload, changes), file_diffs(payload, changes), execution_id))
3497
+ connection.execute("UPDATE member_executions SET changes=?,edited=?,diffs=?,changes_provisional=? WHERE id=?",
3498
+ (json.dumps(changes, ensure_ascii=False), edited_files(payload, changes), file_diffs(payload, changes), int(provisional), execution_id))
3496
3499
  elif action == "denials":
3497
3500
  # Like file changes, read from the software's output once its process ends; recorded once.
3498
3501
  saved = connection.execute("INSERT OR IGNORE INTO execution_denials (execution_id,room_id,denials) VALUES (?,?,?)",
@@ -297,6 +297,8 @@ CREATE TABLE IF NOT EXISTS member_executions (
297
297
  finished_at INTEGER NOT NULL DEFAULT 0,
298
298
  result TEXT NOT NULL DEFAULT '',
299
299
  changes TEXT NOT NULL DEFAULT '',
300
+ -- 1 while `changes` is what had changed when the answer arrived; the report after the software exits replaces it.
301
+ changes_provisional INTEGER NOT NULL DEFAULT 0,
300
302
  -- The changed files the member's own edit tools wrote; '' when its software could not tell (see possible_conflicts).
301
303
  edited TEXT NOT NULL DEFAULT '',
302
304
  cwd TEXT NOT NULL DEFAULT '',
@@ -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
- 接入一台托管电脑:在你(部署线上站点的电脑)的管理面板“概览 → 本机 → 线上网站”点“生成接入码”,填部署配置路径与站点地址后生成(需已登录 wrangler;一次性,再生成会让未用过的作废);把接入码发给托管电脑,在它的“本机 → 线上网站”点“绑定”粘贴,再到“登录入口 → 托管账号入口”打开“经线上网站中转”的开关,它会取得入口地址并启动所需服务(已开启的自有域名不受影响,两者可同时使用;命令行 `codiscuss admin entry join 接入码` 一步完成这些)。托管账号要邀请外部专家时,在“账号”页打开“允许邀请外部专家”,面板自动替该账号绑定,不需要接入码。面板给出的链接带电脑编号(`?m=…`),发给使用者即可。使用者的请求经入口 Worker 和中转到达这台电脑的登录入口,登录、会话与入口保护都在电脑上;Cloudflare 能看到这些往来内容(与自有域名隧道相同),每个页面的请求都计入 Workers 免费额度。
178
+ 接入一台托管电脑:在你(部署线上站点的电脑)的管理面板“概览 → 本机 → 线上网站”点“生成接入码”,填部署配置路径与站点地址后生成(需已登录 wrangler;一次性,再生成会让未用过的作废);把接入码发给托管电脑,在它的“本机 → 线上网站”点“绑定”粘贴,再到“登录入口 → 托管账号入口”打开“经线上网站中转”的开关,它会取得入口地址并启动所需服务(已开启的自有域名不受影响,两者可同时使用;命令行 `codiscuss admin entry join 接入码` 一步完成这些)。托管账号默认就能邀请外部专家:开着自有域名时经你的域名直连,否则由面板自动替账号绑定线上网站,都不需要接入码。面板给出的链接带电脑编号(`?m=…`),发给使用者即可。使用者的请求经入口 Worker 和中转到达这台电脑的登录入口,登录、会话与入口保护都在电脑上;Cloudflare 能看到这些往来内容(与自有域名隧道相同),每个页面的请求都计入 Workers 免费额度。
179
179
 
180
180
  ## 常见问题
181
181
 
@@ -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 → This computer → Online site**, choose **Generate access 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 it to the hosted computer, paste it under **This computer → Online site → Bind** there, then turn on **Through the online site** under **Sign-in entry → Hosted account entry**; it fetches the entry address and starts what it needs (an enabled own domain is unaffected and both can be on; `codiscuss admin entry join <code>` does all of this in one step). For a hosted account to invite external experts, turn on **Allow inviting external experts** for it on the Accounts page; the panel binds it for you, with no access code. 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.
176
+ To connect a hosted computer: in the admin panel of your computer (the one that deployed the online site), go to **Overview → This computer → Online site**, choose **Generate access 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 it to the hosted computer, paste it under **This computer → Online site → Bind** there, then turn on **Through the online site** under **Sign-in entry → Hosted account entry**; it fetches the entry address and starts what it needs (an enabled own domain is unaffected and both can be on; `codiscuss admin entry join <code>` does all of this in one step). Hosted accounts can invite external experts by default: through your own domain when it is on, otherwise the panel binds each account to the online site for you; no access code is needed. 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
@@ -71,7 +71,7 @@ If you deploy the site yourself, run this once on the machine running your agent
71
71
  codiscuss local connect https://your-site
72
72
  ```
73
73
 
74
- It binds this computer to the site with a one-time token: generated automatically on the machine that deployed the site (after `wrangler login`); otherwise run `codiscuss token` there first and add `--setup-key TOKEN`. Each token works once. Without the command line: in this computer's management panel, choose Bind under This computer → Online site and paste the access code generated on the deploying computer (Generate access code in the same place there, or `codiscuss admin entry code`). Inviting external experts also needs this binding. For a hosted account to invite external experts, turn on Allow inviting external experts for it on the Accounts page: with your own domain on, the other computer reaches the account directly through your domain, not the online site; otherwise the panel binds it to the online site for you. Neither needs an access code. The hosted site has no accounts or passwords and keeps no rooms: every device pairs with this computer first, then reads and writes its rooms through the relay, which must be deployed first (see "Relay" in the [deployment guide](deployment.md)). Revoke with `codiscuss local disconnect https://your-site`.
74
+ It binds this computer to the site with a one-time token: generated automatically on the machine that deployed the site (after `wrangler login`); otherwise run `codiscuss token` there first and add `--setup-key TOKEN`. Each token works once. Without the command line: in this computer's management panel, choose Bind under This computer → Online site and paste the access code generated on the deploying computer (Generate access code in the same place there, or `codiscuss admin entry code`). Inviting external experts also needs this binding. Hosted accounts can invite external experts by default, with nothing to set: with your own domain on, the other computer reaches the account directly through your domain, not the online site; otherwise, once this computer is bound to an online site, the panel binds the account for you. Neither needs an access code. The hosted site has no accounts or passwords and keeps no rooms: every device pairs with this computer first, then reads and writes its rooms through the relay, which must be deployed first (see "Relay" in the [deployment guide](deployment.md)). Revoke with `codiscuss local disconnect https://your-site`.
75
75
 
76
76
  ### From Other Devices
77
77
 
package/docs/runner.md CHANGED
@@ -85,7 +85,7 @@ Windows 上在终端运行 `codiscuss setup` 时,“安装配置”一步有
85
85
  codiscuss local connect https://你的站点
86
86
  ```
87
87
 
88
- 它用一次性绑定令牌把这台电脑绑定到网站:在部署网站的电脑上(已 `wrangler login`)自动生成,否则先在部署网站的电脑上运行 `codiscuss token`,再加 `--setup-key 令牌`。每个令牌只能用一次。也可以不用命令行:在这台电脑的管理面板“本机 → 线上网站”点“绑定”,粘贴部署网站的电脑生成的接入码(它的同一处“生成接入码”,或 `codiscuss admin entry code`),一步完成。邀请外部专家也需要先绑定。托管账号要邀请外部专家时,在“账号”页打开该账号的“允许邀请外部专家”:开着自有域名时,对方经你的域名直接连到这个账号,不经线上网站;否则面板自动替它绑定线上网站。两种都不需要接入码。线上网站没有账号和密码,也不保存房间;任何设备都要先与这台电脑配对,再经中转读写电脑上的房间,需先部署中转(见[部署指南](deployment.md)“中转”)。撤销使用 `codiscuss local disconnect https://你的站点`。
88
+ 它用一次性绑定令牌把这台电脑绑定到网站:在部署网站的电脑上(已 `wrangler login`)自动生成,否则先在部署网站的电脑上运行 `codiscuss token`,再加 `--setup-key 令牌`。每个令牌只能用一次。也可以不用命令行:在这台电脑的管理面板“本机 → 线上网站”点“绑定”,粘贴部署网站的电脑生成的接入码(它的同一处“生成接入码”,或 `codiscuss admin entry code`),一步完成。邀请外部专家也需要先绑定。托管账号默认就能邀请外部专家,不用设置:开着自有域名时,对方经你的域名直接连到这个账号,不经线上网站;否则在这台电脑绑定了线上网站时,面板自动替账号绑定。两种都不需要接入码。线上网站没有账号和密码,也不保存房间;任何设备都要先与这台电脑配对,再经中转读写电脑上的房间,需先部署中转(见[部署指南](deployment.md)“中转”)。撤销使用 `codiscuss local disconnect https://你的站点`。
89
89
 
90
90
  ### 在其他设备上远程控制
91
91
 
@@ -373,9 +373,6 @@
373
373
  "{value1} 有新版本": "New version of {value1}",
374
374
  "托管账号从这份副本运行。更新共议时会自动同步;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.",
375
375
  "登录入口未运行,使用者暂时无法登录": "The sign-in entry is not running, so users cannot sign in for now",
376
- "已允许该账号邀请外部专家": "This account can now invite external experts",
377
- "已停止该账号邀请外部专家": "This account can no longer invite external experts",
378
- "允许邀请外部专家": "Allow inviting external experts",
379
376
  "扫码配对过的设备可以在外面使用这台电脑": "Devices paired by QR code can use this computer from elsewhere",
380
377
  "需先在“本机 → 线上网站”绑定": "Bind under This computer → Online site first",
381
378
  "经线上网站中转": "Through the online site",
@@ -388,6 +385,5 @@
388
385
  "在部署线上网站的电脑上生成(它的管理面板“本机 → 线上网站 → 生成接入码”,或运行 codiscuss admin entry code),只能用一次。就在那台电脑上绑定时,只填站点地址即可。": "Generate it on the computer that deployed the online site (its management panel: This computer → Online site → Generate access code, or run codiscuss admin entry code); each code works once. On that computer itself, the site address alone is enough.",
389
386
  "发给要绑定的电脑,在它的管理面板“本机 → 线上网站 → 绑定”里粘贴。只能用一次;再生成一个会让之前没用过的作废。": "Send it to the computer to bind and paste it in its management panel under This computer → Online site → Bind. It works once; generating another voids any unused earlier one.",
390
387
  "不需要域名:经共议线上网站中转到这台电脑,手机和外地的电脑都能打开。": "No domain needed: relayed through the CoDiscuss online site to this computer, so phones and computers elsewhere can open it.",
391
- "打开后,这个账号就能在房间里邀请另一台电脑上的 AI;关闭再打开后,之前加入的外部专家需要重新邀请": "Turned on, this account can invite AI on other computers into its rooms; after turning it off and on again, external experts who joined must be invited again",
392
- "需要先开启托管账号入口的自有域名,或在“概览 → 本机 → 线上网站”绑定线上网站": "Turn on your own domain for the hosted account entry, or bind an online site under Overview → This computer → Online site, first"
388
+ "密码仅在重设时显示一次": "The password is shown only when it is reset"
393
389
  }
@@ -817,13 +817,11 @@
817
817
  "配额 {key} 须为 1–{limit} 的整数": "Quota {key} must be an integer from 1 to {limit}",
818
818
  "需要本房间外部成员的凭证": "This room's external member credential is required",
819
819
  "diffs 须为最多 {max_changed_files} 项的列表": "diffs must be a list of at most {max_changed_files} items",
820
- "还有托管账号开着“允许邀请外部专家”,请先在“账号”页关闭": "Some hosted accounts still allow inviting external experts; turn that off on the Accounts page first",
821
820
  "这台电脑未绑定线上网站,请在管理面板“本机 → 线上网站”处绑定": "This computer is not bound to an online site. Bind it under This computer → Online site in the management panel.",
822
821
  "{value1} 的线上网站版本过旧,请部署方更新线上网站后再试": "The online site at {value1} is too old; ask whoever deploys it to update it, then try again",
823
822
  "线上网站没有签发绑定令牌:{value1}": "The online site did not issue a binding token: {value1}",
824
823
  "绑定令牌已过期,请重试": "The binding token expired; try again",
825
824
  "线上网站没有释放这个账号:{value1}": "The online site did not release this account: {value1}",
826
825
  "请先关闭该账号的“允许邀请外部专家”,再更改隔离": "Turn off Allow inviting external experts for this account before changing its isolation",
827
- "没有建立直连身份": "The direct identity was not created",
828
- "还有托管账号经自有域名邀请外部专家,请先在“账号”页关闭它们的“允许邀请外部专家”": "Some hosted accounts invite external experts through your own domain; turn off Allow inviting external experts for them on the Accounts page first"
826
+ "没有建立直连身份": "The direct identity was not created"
829
827
  }
@@ -216,6 +216,7 @@
216
216
  "主持人答完后再请 {value1}": "Ask {value1} after the host replies",
217
217
  "取消采纳": "Cancel acceptance",
218
218
  "执行报告 #{value1}": "Run report #{value1}",
219
+ "正在统计文件改动…": "Counting file changes…",
219
220
  "执行 #{value1} · {value2}": "Run #{value1} · {value2}",
220
221
  "文件变化:{value1}": "File changes: {value1}",
221
222
  "重发": "Resend",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai_co_discuss",
3
- "version": "0.4.91",
3
+ "version": "0.4.93",
4
4
  "bin": {
5
5
  "codiscuss": "runner/codiscuss.mjs"
6
6
  },
@@ -67,7 +67,6 @@ export const HELP = t(`用法:codiscuss admin <命令> [参数](与管理面
67
67
  中途失败时解决后重新执行同一命令,从缺少的步骤接着做
68
68
  account start|stop|disable|enable|remove|password <名>
69
69
  account isolate|unisolate|protect|unprotect <名>
70
- account external|unexternal <名> 允许或停止该账号邀请外部专家(自动替它绑定这台电脑绑定的线上网站)
71
70
 
72
71
  命令行登录(目标 owner 为管理员自己,否则为托管账号名)
73
72
  login status <目标> 各程序的登录状态,以及每个程序可用的登录方式
@@ -152,7 +151,6 @@ async function account_command(call, [action, name], values) {
152
151
  need(name, t('account {value1} <名>', { value1: action }));
153
152
  if (action === 'add') return add_account(call, name, { isolate: !values['no-isolate'], start: !values['no-start'] });
154
153
  if (action === 'protect' || action === 'unprotect') return call(`accounts/${name}/protect`, { on: action === 'protect' });
155
- if (action === 'external' || action === 'unexternal') return call(`accounts/${name}/external`, { on: action === 'external' });
156
154
  if (!ACCOUNT_ACTIONS[action]) throw new Error(HELP);
157
155
  return call(`accounts/${name}/${ACCOUNT_ACTIONS[action]}`, {});
158
156
  }
@@ -656,13 +656,15 @@ export function create_panel({ data, key, port, ops = {}, sessions = new Set() }
656
656
  const op = { list_accounts, add_account, reset_password, set_account_disabled, remove_account, run_instance, create_os_user, remove_os_user,
657
657
  login_status, apply_login, logout, start_login, login_progress, submit_login, cancel_login, install_runtime, prepare_account, account_env, account_skills, account_workflows, owner_env, owner_skills, owner_prompts, save_owner_prompt, shared_cli_state,
658
658
  save_api_key, list_keys, remove_key, use_shared_programs, service_overview, run_owner_service, latest_version, check_package, begin_update,
659
- set_account_external, autostart_enabled, set_autostart, entry_overview, start_entry, stop_entry, keep_tunnel, start_tunnel_setup, set_entry_way, set_relay_url, connect_site, make_access_code, join_relay, protect_account, start_verified, hand_over: () => {}, ...ops };
659
+ set_account_external, reconcile_external, autostart_enabled, set_autostart, entry_overview, start_entry, stop_entry, keep_tunnel, start_tunnel_setup, set_entry_way, set_relay_url, connect_site, make_access_code, join_relay, protect_account, start_verified, hand_over: () => {}, ...ops };
660
660
  const hosts = new Set([`127.0.0.1:${port}`, `localhost:${port}`]);
661
661
 
662
662
  async function api(method, path, body) {
663
663
  const parts = path.split('/').filter(Boolean).slice(1);
664
664
  const [section, name, action, extra] = parts;
665
665
  const account = () => { if (!read_accounts(data)[name]) throw panel_error('账号不存在:{value1}', { value1: name }); return name; };
666
+ // Accounts follow the way external members can reach them, in the background (#5660).
667
+ const after_change = () => { op.reconcile_external(data).catch(() => {}); };
666
668
  const hosting = hosting_enabled(data);
667
669
  if (method === 'GET' && section === 'state') {
668
670
  const windows = process.platform === 'win32';
@@ -728,8 +730,8 @@ export function create_panel({ data, key, port, ops = {}, sessions = new Set() }
728
730
  if (method === 'POST' && action === 'remove') { remove_library_skill(data, name); return { ok: true }; }
729
731
  }
730
732
  // The owner's own online site: bound, checked and left here whether or not this computer hosts accounts.
731
- if (method === 'POST' && section === 'site' && name === 'connect') return bind_online_site(data, body, op.connect_site);
732
- if (method === 'POST' && section === 'site' && name === 'disconnect') return disconnect_site(data);
733
+ if (method === 'POST' && section === 'site' && name === 'connect') { const bound = await bind_online_site(data, body, op.connect_site); after_change(); return bound; }
734
+ if (method === 'POST' && section === 'site' && name === 'disconnect') { const left = await disconnect_site(data); after_change(); return left; }
733
735
  // Hosting: only once the owner turned it on in setup.
734
736
  if (!hosting) throw panel_error('托管管理未打开:运行 codiscuss setup 勾选“托管管理(管理面板)”');
735
737
  if (method === 'POST' && section === 'clis' && name === 'install') return op.install_runtime(data);
@@ -743,8 +745,9 @@ export function create_panel({ data, key, port, ops = {}, sessions = new Set() }
743
745
  }
744
746
  // How people outside reach the entry, the relay's entry address, and binding this computer to an online site.
745
747
  if (method === 'POST' && section === 'entry' && name === 'way') {
746
- if (body.way === 'tunnel' && body.enabled !== true) keep_direct_domain(data);
747
- return op.set_entry_way(data, String(body.way || ''), body.enabled === true);
748
+ const overview = await op.set_entry_way(data, String(body.way || ''), body.enabled === true);
749
+ after_change();
750
+ return overview;
748
751
  }
749
752
  if (method === 'POST' && section === 'entry' && name === 'relay') return op.set_relay_url(data, body.url);
750
753
  // The access code: made on the computer that deployed the online site, pasted on a hosting computer.
@@ -754,8 +757,6 @@ export function create_panel({ data, key, port, ops = {}, sessions = new Set() }
754
757
  // The outside address: a Cloudflare tunnel set up by a job of its own (it waits for the owner in the browser).
755
758
  if (section === 'tunnel' && name === 'setup') {
756
759
  if (method === 'GET') return tunnel_setup_state(data);
757
- // Another domain would leave the accounts reached through this one with invites to the old address.
758
- if (method === 'POST' && String(body.host || '').toLowerCase() !== String(entry_settings(data).tunnel?.host || '').toLowerCase()) keep_direct_domain(data);
759
760
  if (method === 'POST') return op.start_tunnel_setup(data, body.host, body.name);
760
761
  }
761
762
  if (method === 'POST' && section === 'entry' && name === 'settings') { save_entry_settings(data, { public_url: body.public_url }); return op.entry_overview(data); }
@@ -765,7 +766,7 @@ export function create_panel({ data, key, port, ops = {}, sessions = new Set() }
765
766
  if (method === 'POST') { save_hosted_prompt(data, body.text); return { ok: true }; }
766
767
  }
767
768
  if (section !== 'accounts') throw panel_error('接口不存在');
768
- if (method === 'POST' && !name) return op.add_account(data, String(body.name || '').trim());
769
+ if (method === 'POST' && !name) { const added = await op.add_account(data, String(body.name || '').trim()); after_change(); return added; }
769
770
  account();
770
771
  if (method === 'POST' && action === 'password') return { password: op.reset_password(data, name) };
771
772
  if (method === 'POST' && action === 'protect') return op.protect_account(data, name, body.on !== false);
@@ -774,20 +775,22 @@ export function create_panel({ data, key, port, ops = {}, sessions = new Set() }
774
775
  if (method === 'POST' && action === 'remove') {
775
776
  await op.run_instance(data, name, 'stop');
776
777
  // Its online-site binding goes first, or the owner could never unbind the computer afterwards.
777
- await op.set_account_external(data, name, false, undefined, { removing: true }).catch(() => {});
778
+ await change_external(data, name, false, { removing: true }).catch(() => {});
778
779
  op.remove_account(data, name);
779
780
  return { removed: name, kept: account_home(data, name) };
780
781
  }
781
- if (method === 'POST' && action === 'external') return op.set_account_external(data, name, body.on !== false);
782
782
  // A start is reported only once the instance serves as the account is set (protected or not).
783
783
  if (method === 'POST' && action === 'start') { await op.start_verified(data, name); return { ok: true }; }
784
784
  if (method === 'POST' && action === 'stop') { await op.run_instance(data, name, action); return { ok: true }; }
785
- // Its binding file is sealed for whichever Windows user wrote it: changing that user would leave it unreadable.
786
- if (method === 'POST' && action === 'os-user' && read_account_sites(data)[name]) throw panel_error('请先关闭该账号的“允许邀请外部专家”,再更改隔离');
787
- if (method === 'POST' && action === 'os-user' && extra === 'remove') { op.remove_os_user(data, name); return { ok: true }; }
785
+ // Its identity file is sealed for whichever Windows user wrote it: it goes before that user changes, and is made
786
+ // again for the new one by the next reconcile (#5660).
787
+ // Taken down first and for real: a failure stops the change, or the new user could never open what is left (#5666).
788
+ if (method === 'POST' && action === 'os-user') await change_external(data, name, false);
789
+ if (method === 'POST' && action === 'os-user' && extra === 'remove') { op.remove_os_user(data, name); after_change(); return { ok: true }; }
788
790
  if (method === 'POST' && action === 'os-user') {
789
791
  const result = op.create_os_user(data, name, account_home(data, name));
790
792
  op.use_shared_programs(data, name);
793
+ after_change();
791
794
  return result;
792
795
  }
793
796
  // Its AI environment: set up (safe to repeat), what is installed, chosen library skills, its system prompt.
@@ -841,6 +844,11 @@ export function create_panel({ data, key, port, ops = {}, sessions = new Set() }
841
844
  const file = join(WEB, name);
842
845
  if (!existsSync(file)) return send_json(response, 404, error_body(panel_error('页面尚未构建,请运行 npm run build')));
843
846
  response.writeHead(200, { 'Content-Type': TYPES[extname(file)] || 'application/octet-stream', 'Cache-Control': 'no-store' });
847
+ // The page names its own version and asks for its scripts by version, so a page left open across an update
848
+ // can tell it is old and nothing cached is taken for the new one (user 2026-11-19, #5679).
849
+ if (name === 'admin.html') return response.end(readFileSync(file, 'utf8').replace('<head>', `<head>
850
+ <meta name="codiscuss-version" content="${VERSION}">`)
851
+ .replace(/(href|src)="\/(admin\.css|i18n\.js|admin\.js)"/g, `$1="/$2?v=${VERSION}"`));
844
852
  response.end(readFileSync(file));
845
853
  } catch (error) {
846
854
  if (response.headersSent) response.destroy();
@@ -1045,12 +1053,13 @@ async function bind_online_site(data, { site, setup_key }, connect) {
1045
1053
  }
1046
1054
 
1047
1055
  /** Leave the online site: its paired devices can no longer reach this computer. The hosted accounts' address depends on it. */
1048
- function disconnect_site(data) {
1056
+ async function disconnect_site(data) {
1049
1057
  const bound = bound_site(data);
1050
1058
  if (!bound) return { disconnected: '' };
1051
1059
  if (entry_settings(data).relay_enabled) throw panel_error('托管账号入口的线上网站还开着,请先关闭它');
1052
- // Accounts reached on the owner's domain do not use the online site; only the ones bound to it hold it (#5617).
1053
- if (Object.values(read_account_sites(data)).some(record => !record.direct)) throw panel_error('还有托管账号开着“允许邀请外部专家”,请先在“账号”页关闭');
1060
+ // The accounts bound under this computer are released first (a failure stops here, to be retried); those reached on
1061
+ // the owner's domain do not use the online site (#5617, #5660).
1062
+ for (const [name, record] of Object.entries(read_account_sites(data))) if (!record.direct) await change_external(data, name, false);
1054
1063
  save_site_connection(data, bound.site);
1055
1064
  return { disconnected: bound.site };
1056
1065
  }
@@ -1130,10 +1139,48 @@ async function set_account_external(data, name, on, bind = bind_account_site, {
1130
1139
  return { external: true, site: bound.site };
1131
1140
  }
1132
1141
 
1133
- /** Refuse a change to the owner's domain while accounts are reached through it: their members would be cut off (#5617). */
1134
- function keep_direct_domain(data) {
1135
- if (Object.values(read_account_sites(data)).some(record => record.direct)) {
1136
- throw panel_error('还有托管账号经自有域名邀请外部专家,请先在“账号”页关闭它们的“允许邀请外部专家”');
1142
+ /**
1143
+ * Every hosted account can invite external experts, with no switch (user 2026-11-19, #5660): reached on the owner's
1144
+ * domain while it is on, else bound under this computer's online site while that is bound, else neither. Run every
1145
+ * minute and after changes that affect the way: an account whose record no longer fits (the domain changed or went off,
1146
+ * the account is gone) is taken down, and accounts without one get one. A failure is retried after a pause.
1147
+ */
1148
+ const reconcile_failures = new Map();
1149
+ const RECONCILE_RETRY_MS = 10 * 60 * 1000;
1150
+ // Every change to an account's way runs in one queue, so a reconcile and a direct call (removal, isolation, leaving the
1151
+ // online site) never read and write account-sites.json across each other's waits (#5666).
1152
+ let external_queue = Promise.resolve(), reconcile_queued = false;
1153
+ function serial(task) {
1154
+ const run = external_queue.then(task, task);
1155
+ external_queue = run.catch(() => {});
1156
+ return run;
1157
+ }
1158
+ /** Take an account's way down or set it up, in the queue. */
1159
+ export function change_external(data, name, on, options) {
1160
+ return serial(() => set_account_external(data, name, on, undefined, options));
1161
+ }
1162
+ export function reconcile_external(data, options = {}) {
1163
+ if (reconcile_queued) return external_queue;
1164
+ reconcile_queued = true;
1165
+ return serial(() => { reconcile_queued = false; return reconcile_now(data, options); });
1166
+ }
1167
+ async function reconcile_now(data, { now = Date.now, log = message => process.stderr.write(`${message}\n`) } = {}) {
1168
+ if (!hosting_enabled(data)) return;
1169
+ const accounts = read_accounts(data), settings = entry_settings(data), bound = bound_site(data);
1170
+ const direct_site = settings.tunnel_enabled && settings.tunnel?.host ? `https://${settings.tunnel.host}` : '';
1171
+ for (const [name, record] of Object.entries(read_account_sites(data))) {
1172
+ const fits = accounts[name] && (record.direct ? record.site === direct_site : !direct_site && bound?.site === record.site);
1173
+ if (fits) continue;
1174
+ // Only a removed account lets go of its record whatever happens; an existing one keeps it until its own side is
1175
+ // really taken down, so no identity is left behind that invites would still use (#5666).
1176
+ try { await set_account_external(data, name, false, undefined, { removing: !accounts[name] }); }
1177
+ catch (error) { log(t('外部专家入口没有拆除({value1}):{value2}', { value1: name, value2: error.message })); }
1178
+ }
1179
+ if (!direct_site && !bound) return;
1180
+ for (const name of Object.keys(accounts)) {
1181
+ if (read_account_sites(data)[name] || now() - (reconcile_failures.get(name) || 0) < RECONCILE_RETRY_MS) continue;
1182
+ try { await set_account_external(data, name, true); reconcile_failures.delete(name); }
1183
+ catch (error) { reconcile_failures.set(name, now()); log(t('外部专家入口没有建立({value1}):{value2}', { value1: name, value2: error.message })); }
1137
1184
  }
1138
1185
  }
1139
1186
 
@@ -1414,7 +1461,7 @@ function run_panel(data, port) {
1414
1461
  // The entry's outside address runs on its own; the panel keeps it as set now and every minute (restarted if it stopped
1415
1462
  // or its settings changed, stopped when the entry is off).
1416
1463
  const keep = () => keep_tunnel(data).catch(error => process.stderr.write(t(`隧道:{value1}
1417
- `, { value1: error.message })));
1464
+ `, { value1: error.message }))).then(() => reconcile_external(data)).catch(() => {});
1418
1465
  keep();
1419
1466
  const keeper = setInterval(keep, TUNNEL_CHECK_MS);
1420
1467
  // Hosted accounts' failures reach the owner's Weixin; one pass at a time.
@@ -1575,11 +1575,18 @@ export class FreeRoomRunner {
1575
1575
  return false;
1576
1576
  }
1577
1577
  }
1578
- /** Report observed file changes once an execution has ended and its member's processes have exited. */
1578
+ /**
1579
+ * Report observed file changes once an execution has ended. Its software is often still closing its turn then (the
1580
+ * answer is posted from inside it), so what has changed so far is reported at once as provisional, for the answer's
1581
+ * card to list without the wait (user 2026-11-19, #5669); the report after its processes have exited replaces it.
1582
+ */
1579
1583
  async report_finished(active) {
1580
1584
  for (const [execution_id, snapshot] of this.snapshots) {
1581
- if (active.has(execution_id) || this.execution_processes.get(execution_id)?.size) continue;
1582
- this.snapshots.delete(execution_id);
1585
+ if (active.has(execution_id)) continue;
1586
+ const running = this.execution_processes.get(execution_id)?.size > 0;
1587
+ if (running && snapshot.reported_early) continue;
1588
+ if (running) snapshot.reported_early = true;
1589
+ else this.snapshots.delete(execution_id);
1583
1590
  const after = snapshot.before ? workspace_snapshot(snapshot.directory) : null;
1584
1591
  if (!after && !snapshot.extras?.length) continue;
1585
1592
  const extra = (snapshot.extras || []).flatMap(item => {
@@ -1593,7 +1600,7 @@ export class FreeRoomRunner {
1593
1600
  // Line counts and patches of the files in the member's own working tree, for the card's "edited N files".
1594
1601
  let diffs = [];
1595
1602
  try { diffs = file_diffs(snapshot.directory, own.slice(0, 200), snapshot.base); } catch { /* The card then lists names only. */ }
1596
- try { await api(this.config, `/executions/${execution_id}`, { action: 'report', changes, ...edited, ...(diffs.length ? { diffs } : {}) }); }
1603
+ try { await api(this.config, `/executions/${execution_id}`, { action: 'report', ...(running ? { provisional: true } : {}), changes, ...edited, ...(diffs.length ? { diffs } : {}) }); }
1597
1604
  catch (error) { if (!/HTTP (404|409)/.test(error.message)) throw error; }
1598
1605
  }
1599
1606
  }
@@ -5,7 +5,7 @@
5
5
  * check that the entry answers here and outside. Safe to run again: what is already done is kept.
6
6
  */
7
7
  import { spawnSync } from 'node:child_process';
8
- import { existsSync, readFileSync } from 'node:fs';
8
+ import { existsSync } from 'node:fs';
9
9
  import { homedir } from 'node:os';
10
10
  import { dirname, join } from 'node:path';
11
11
  import { fileURLToPath } from 'node:url';
@@ -81,11 +81,6 @@ export async function configure_hosting(home, options, { interactive = Boolean(p
81
81
  if (options['public-host']) {
82
82
  try {
83
83
  const host = tunnel_host(options['public-host']);
84
- // As the panel refuses (#5625): accounts reached on the current domain would keep inviting to the old address.
85
- const current = String(entry_settings(home).tunnel?.host || '').toLowerCase();
86
- let direct = false;
87
- try { direct = Object.values(JSON.parse(readFileSync(join(home, 'account-sites.json'), 'utf8'))).some(record => record?.direct); } catch { direct = false; }
88
- if (direct && current && current !== host.toLowerCase()) throw new Error(t('还有托管账号经自有域名邀请外部专家,请先在“账号”页关闭它们的“允许邀请外部专家”'));
89
84
  const tunnel = await prepare_tunnel({ host, name: options['tunnel-name'], interactive, say });
90
85
  Object.assign(changes, { public_url: `https://${host}`, tunnel, tunnel_enabled: true });
91
86
  lines.push(t('外网地址 https://{value1},经 Cloudflare 隧道 {value2} 转到登录入口;隧道独立运行,由管理面板按设置维持', { value1: host, value2: tunnel.name }));
@@ -25,7 +25,7 @@ export default {
25
25
  "已打开:{value1}": "Opened: {value1}",
26
26
  "AI CoDiscuss 讨论服务\n服务目录:{value1}\n已登记 {value2} 个房间\nCtrl+C 停止服务\n": "AI CoDiscuss discussion service\nService folder: {value1}\n{value2} rooms registered\nCtrl+C to stop the service\n",
27
27
  "尚未登记房间;可在另一终端运行 codiscuss service add --config FILE。\n": "No rooms registered yet. Run codiscuss service add --config FILE in another terminal.\n",
28
- "用法:codiscuss admin <命令> [参数](与管理面板的操作一一对应;除启动与退出外,需管理面板正在运行)\n需要管理员权限的步骤(建或删 Windows 用户),在管理员终端或管理员的 SSH 会话里直接执行;否则在电脑桌面上弹出确认。\n\n启动与退出(不需要面板在运行)\n start 启动共议:服务、管理面板与任务栏图标、登录入口与隧道(在桌面会话里启动)\n stop 彻底退出:管理面板与图标、登录入口、隧道、共议服务;托管账号的实例照常运行\n restart stop 后 start\n update [check] 检查更新;不带 check 时安装最新版(面板未运行时先启动)并等待每一步结果\n\n本机\n status [--full] 概览:服务、版本、开机自启、登录入口、托管账号;--full 输出面板的完整状态\n service start|stop|restart 只启停共议服务(网站与讨论服务)\n autostart on|off 登录 Windows 时自动启动\n\n管理员入口\n site status 本地网页与线上网站的地址\n site connect <接入码|站点> [绑定令牌] 绑定线上网站(管理员外出、邀请外部专家用);在部署该网站的电脑上只填站点即可\n site disconnect 解绑线上网站,已配对的设备不能再连到这台电脑\n\n登录入口与访问方式(需打开托管管理)\n entry start|stop 启动或停止登录入口\n entry open|close relay|tunnel 开启或关闭访问方式:线上网站 | 自有域名,两种可同时开启\n entry join <接入码> 用接入码接入线上站点并开启线上网站\n entry code [--config <wrangler.jsonc>] [--site <地址>] 在部署线上站点的电脑上生成接入码(不填用上次的)\n entry tunnel <域名> [隧道名] 设置自有域名(Cloudflare 隧道),输出授权链接;域名须已托管在 Cloudflare\n entry tunnel status 查看自有域名设置的进度\n runtime sync 同步隔离账号的程序副本\n\n托管账号\n account list\n account add <名> [--no-isolate] [--no-start] 创建、隔离、初始化 AI 环境、开启入口保护、启动;输出一次性密码。\n 中途失败时解决后重新执行同一命令,从缺少的步骤接着做\n account start|stop|disable|enable|remove|password <名>\n account isolate|unisolate|protect|unprotect <名>\n account external|unexternal <名> 允许或停止该账号邀请外部专家(自动替它绑定这台电脑绑定的线上网站)\n\n命令行登录(目标 owner 为管理员自己,否则为托管账号名)\n login status <目标> 各程序的登录状态,以及每个程序可用的登录方式\n login set <目标> <claude|codex> <方式> --set 字段=值 ... 如 login set alice claude setup_token --set token=sk-ant-oat01-…\n login start <目标> <程序> <方式> 浏览器登录:输出链接,之后用 login submit 提交授权码或回调地址\n login submit <作业> <文本> / login progress <作业> / login cancel <作业>\n logout <目标> <程序>\n\nAPI 密钥、技能、工作流、系统提示词(目标同上)\n key list <目标> / key add <目标> --base-url <地址> --key <密钥> / key remove <目标> <编号>\n skill library / skill import <文件夹或.zip> / skill delete <名>\n skill list <目标> / skill install <目标> <名>... / skill remove <目标> <名>...\n workflow list <目标> / workflow install <目标>\n prompt get <目标> / prompt set <目标> --file <文件> [--group <键>] 管理员的提示词按组保存(见 prompt get)\n prompt default get / prompt default set --file <文件> 新托管账号的默认系统提示词\n\n结果以 JSON 输出。--data 指定管理员服务目录(默认 ~/.codiscuss)。\n": "Usage: codiscuss admin <command> [arguments] (matches admin panel actions; the panel must be running except for start and stop)\nSteps requiring administrator rights (creating or deleting Windows users) run directly in an administrator terminal or administrator SSH session. Otherwise, approve the prompt on the computer's desktop.\n\nStart and exit (panel need not be running)\n start Start CoDiscuss: service, panel and tray icon, sign-in entry and tunnel (in the desktop session)\n stop Exit panel and tray icon, sign-in entry, tunnel and service; hosted instances keep running\n restart Run stop, then start\n update [check] Check for updates; omit check to install the latest version and wait for results (starts the panel if needed)\n\nLocal\n status [--full] Show service, version, startup, sign-in entry and hosted accounts; --full returns full panel state\n service start|stop|restart Start or stop only the CoDiscuss service (site and discussion service)\n autostart on|off Start automatically at Windows sign-in\n\nAdministrator entry\n site status Addresses of the local page and the online site\n site connect <access code|site> [token] Bind an online site (for using it away from this computer and inviting external experts); on the computer that deployed it, the site alone is enough\n site disconnect Unbind the online site; paired devices can no longer reach this computer\n\nSign-in entry and access methods (hosting must be enabled)\n entry start|stop Start or stop the sign-in entry\n entry open|close relay|tunnel Turn an access method on or off: online site | own domain; both can be on\n entry join <code> Connect to an online site with an access code and turn on the online site\n entry code [--config <wrangler.jsonc>] [--site <address>] Generate an access code on the deployment computer (defaults to last settings)\n entry tunnel <domain> [tunnel-name] Configure a Cloudflare Tunnel and show the authorization link; domain must be hosted on Cloudflare\n entry tunnel status Show domain setup progress\n runtime sync Sync program copies for isolated accounts\n\nHosted accounts\n account list\n account add <name> [--no-isolate] [--no-start] Create, isolate, initialize AI environment, protect and start; show password once\n On failure, fix the cause and rerun the same command to resume missing steps\n account start|stop|disable|enable|remove|password <name>\n account isolate|unisolate|protect|unprotect <name>\n account external|unexternal <name> Allow or stop the account inviting external experts (binds it to this computer's online site for it)\n\nCLI sign-ins (target owner is the admin; otherwise use a hosted account name)\n login status <target> Show each app's sign-in status and available methods\n login set <target> <claude|codex> <method> --set field=value ... e.g. login set alice claude setup_token --set token=sk-ant-oat01-…\n login start <target> <app> <method> Browser sign-in: show a link; use login submit for the authorization code or callback URL\n login submit <job> <text> / login progress <job> / login cancel <job>\n logout <target> <app>\n\nAPI keys, skills, workflows and system prompts (same target convention)\n key list <target> / key add <target> --base-url <address> --key <key> / key remove <target> <id>\n skill library / skill import <folder-or.zip> / skill delete <name>\n skill list <target> / skill install <target> <name>... / skill remove <target> <name>...\n workflow list <target> / workflow install <target>\n prompt get <target> / prompt set <target> --file <file> [--group <key>] Admin prompts are saved by group (see prompt get)\n prompt default get / prompt default set --file <file> Default system prompt for new hosted accounts\n\nResults are JSON. --data sets the admin service folder (default ~/.codiscuss).\n",
28
+ "用法:codiscuss admin <命令> [参数](与管理面板的操作一一对应;除启动与退出外,需管理面板正在运行)\n需要管理员权限的步骤(建或删 Windows 用户),在管理员终端或管理员的 SSH 会话里直接执行;否则在电脑桌面上弹出确认。\n\n启动与退出(不需要面板在运行)\n start 启动共议:服务、管理面板与任务栏图标、登录入口与隧道(在桌面会话里启动)\n stop 彻底退出:管理面板与图标、登录入口、隧道、共议服务;托管账号的实例照常运行\n restart stop 后 start\n update [check] 检查更新;不带 check 时安装最新版(面板未运行时先启动)并等待每一步结果\n\n本机\n status [--full] 概览:服务、版本、开机自启、登录入口、托管账号;--full 输出面板的完整状态\n service start|stop|restart 只启停共议服务(网站与讨论服务)\n autostart on|off 登录 Windows 时自动启动\n\n管理员入口\n site status 本地网页与线上网站的地址\n site connect <接入码|站点> [绑定令牌] 绑定线上网站(管理员外出、邀请外部专家用);在部署该网站的电脑上只填站点即可\n site disconnect 解绑线上网站,已配对的设备不能再连到这台电脑\n\n登录入口与访问方式(需打开托管管理)\n entry start|stop 启动或停止登录入口\n entry open|close relay|tunnel 开启或关闭访问方式:线上网站 | 自有域名,两种可同时开启\n entry join <接入码> 用接入码接入线上站点并开启线上网站\n entry code [--config <wrangler.jsonc>] [--site <地址>] 在部署线上站点的电脑上生成接入码(不填用上次的)\n entry tunnel <域名> [隧道名] 设置自有域名(Cloudflare 隧道),输出授权链接;域名须已托管在 Cloudflare\n entry tunnel status 查看自有域名设置的进度\n runtime sync 同步隔离账号的程序副本\n\n托管账号\n account list\n account add <名> [--no-isolate] [--no-start] 创建、隔离、初始化 AI 环境、开启入口保护、启动;输出一次性密码。\n 中途失败时解决后重新执行同一命令,从缺少的步骤接着做\n account start|stop|disable|enable|remove|password <名>\n account isolate|unisolate|protect|unprotect <名>\n\n命令行登录(目标 owner 为管理员自己,否则为托管账号名)\n login status <目标> 各程序的登录状态,以及每个程序可用的登录方式\n login set <目标> <claude|codex> <方式> --set 字段=值 ... 如 login set alice claude setup_token --set token=sk-ant-oat01-…\n login start <目标> <程序> <方式> 浏览器登录:输出链接,之后用 login submit 提交授权码或回调地址\n login submit <作业> <文本> / login progress <作业> / login cancel <作业>\n logout <目标> <程序>\n\nAPI 密钥、技能、工作流、系统提示词(目标同上)\n key list <目标> / key add <目标> --base-url <地址> --key <密钥> / key remove <目标> <编号>\n skill library / skill import <文件夹或.zip> / skill delete <名>\n skill list <目标> / skill install <目标> <名>... / skill remove <目标> <名>...\n workflow list <目标> / workflow install <目标>\n prompt get <目标> / prompt set <目标> --file <文件> [--group <键>] 管理员的提示词按组保存(见 prompt get)\n prompt default get / prompt default set --file <文件> 新托管账号的默认系统提示词\n\n结果以 JSON 输出。--data 指定管理员服务目录(默认 ~/.codiscuss)。\n": "Usage: codiscuss admin <command> [arguments] (matches admin panel actions; the panel must be running except for start and stop)\nSteps requiring administrator rights (creating or deleting Windows users) run directly in an administrator terminal or administrator SSH session. Otherwise, approve the prompt on the computer's desktop.\n\nStart and exit (panel need not be running)\n start Start CoDiscuss: service, panel and tray icon, sign-in entry and tunnel (in the desktop session)\n stop Exit panel and tray icon, sign-in entry, tunnel and service; hosted instances keep running\n restart Run stop, then start\n update [check] Check for updates; omit check to install the latest version and wait for results (starts the panel if needed)\n\nLocal\n status [--full] Show service, version, startup, sign-in entry and hosted accounts; --full returns full panel state\n service start|stop|restart Start or stop only the CoDiscuss service (site and discussion service)\n autostart on|off Start automatically at Windows sign-in\n\nAdministrator entry\n site status Addresses of the local page and the online site\n site connect <access code|site> [token] Bind an online site (for using it away from this computer and inviting external experts); on the computer that deployed it, the site alone is enough\n site disconnect Unbind the online site; paired devices can no longer reach this computer\n\nSign-in entry and access methods (hosting must be enabled)\n entry start|stop Start or stop the sign-in entry\n entry open|close relay|tunnel Turn an access method on or off: online site | own domain; both can be on\n entry join <code> Connect to an online site with an access code and turn on the online site\n entry code [--config <wrangler.jsonc>] [--site <address>] Generate an access code on the deployment computer (defaults to last settings)\n entry tunnel <domain> [tunnel-name] Configure a Cloudflare Tunnel and show the authorization link; domain must be hosted on Cloudflare\n entry tunnel status Show domain setup progress\n runtime sync Sync program copies for isolated accounts\n\nHosted accounts\n account list\n account add <name> [--no-isolate] [--no-start] Create, isolate, initialize AI environment, protect and start; show password once\n On failure, fix the cause and rerun the same command to resume missing steps\n account start|stop|disable|enable|remove|password <name>\n account isolate|unisolate|protect|unprotect <name>\n\nCLI sign-ins (target owner is the admin; otherwise use a hosted account name)\n login status <target> Show each app's sign-in status and available methods\n login set <target> <claude|codex> <method> --set field=value ... e.g. login set alice claude setup_token --set token=sk-ant-oat01-…\n login start <target> <app> <method> Browser sign-in: show a link; use login submit for the authorization code or callback URL\n login submit <job> <text> / login progress <job> / login cancel <job>\n logout <target> <app>\n\nAPI keys, skills, workflows and system prompts (same target convention)\n key list <target> / key add <target> --base-url <address> --key <key> / key remove <target> <id>\n skill library / skill import <folder-or.zip> / skill delete <name>\n skill list <target> / skill install <target> <name>... / skill remove <target> <name>...\n workflow list <target> / workflow install <target>\n prompt get <target> / prompt set <target> --file <file> [--group <key>] Admin prompts are saved by group (see prompt get)\n prompt default get / prompt default set --file <file> Default system prompt for new hosted accounts\n\nResults are JSON. --data sets the admin service folder (default ~/.codiscuss).\n",
29
29
  "管理面板没有在运行:在这台电脑的桌面上运行 codiscuss panel open,或从任务栏图标打开": "The admin panel is not running. Run codiscuss panel open on this computer's desktop, or open it from the tray icon.",
30
30
  "管理面板没有响应:在这台电脑的桌面上运行 codiscuss panel open": "The admin panel did not respond. Run codiscuss panel open on this computer's desktop.",
31
31
  "管理面板拒绝了钥匙(面板可能刚重启):稍后重试": "The admin panel rejected the key (it may have just restarted). Try again shortly.",
@@ -507,9 +507,9 @@ export default {
507
507
  "这位外部成员未登记或已移除": "This external member is not registered or has been removed",
508
508
  "这台电脑绑定了多个线上网站,请指定邀请使用的网站": "This computer is connected to several online sites. Choose the site for the invite",
509
509
  "这台电脑未绑定线上网站,请在管理面板“本机 → 线上网站”处绑定": "This computer is not bound to an online site. Bind it under This computer → Online site in the management panel.",
510
- "还有托管账号开着“允许邀请外部专家”,请先在“账号”页关闭": "Some hosted accounts still allow inviting external experts; turn that off on the Accounts page first",
511
510
  "{value1} 的线上网站版本过旧,请部署方更新线上网站后再试": "The online site at {value1} is too old; ask whoever deploys it to update it, then try again",
512
- "还有托管账号经自有域名邀请外部专家,请先在“账号”页关闭它们的“允许邀请外部专家”": "Some hosted accounts invite external experts through your own domain; turn off Allow inviting external experts for them on the Accounts page first",
511
+ "外部专家入口没有拆除({value1}):{value2}": "The external expert entry was not removed ({value1}): {value2}",
512
+ "外部专家入口没有建立({value1}):{value2}": "The external expert entry was not set up ({value1}): {value2}",
513
513
  "没有建立直连身份": "The direct identity was not created",
514
514
  "绑定令牌已过期,请重试": "The binding token expired; try again",
515
515
  "线上网站没有释放这个账号:{value1}": "The online site did not release this account: {value1}",