ai_co_discuss 0.2.22 → 0.2.24

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.
@@ -21,7 +21,7 @@ description: "AI CoDiscuss 的通用参与技能,所有参与者(包括主
21
21
 
22
22
  网站读写优先用 `codiscuss room …`、`codiscuss message …` 等统一命令;任务或用户显式指定 CLI 路径时沿用指定入口。未安装统一命令时,用已核实的 `python 路径/runner/discuss.py …`。统一入口需 Node.js 24+,网站读写需 Python 3.10+。裸 `codiscuss` 会启动服务;查询用法使用 `codiscuss --help` / `codiscuss schema …`,下文命令均省略入口前缀。
23
23
 
24
- 从实际任务或用户指定值核实站点、房间和身份,不从当前网页或最近聊天猜测。站点用 `--site` 或当前进程 `DISCUSS_URL`,房间始终显式指定,业务写入显式 `--as`。手动首次接入读一次 `room protocol`;自动任务不读,需要字段时只查 `schema 具体命令`,不列全部命令。
24
+ 从实际任务或用户指定值核实站点、房间和身份,不从当前网页或最近聊天猜测。站点用 `--site`、当前进程 `DISCUSS_URL` 或 `--access-file` 中绑定的站点(自动任务只带凭据文件即可),房间始终显式指定,业务写入显式 `--as`。手动首次接入读一次 `room protocol`;自动任务不读,需要字段时只查 `schema 具体命令`,不列全部命令。
25
25
 
26
26
  项目与 cwd 可缺省,有值时用于本次获准资料;CLI 路径只定位工具,不把 CLI 仓库当作讨论项目或扩大文件权限。
27
27
 
@@ -151,6 +151,7 @@ Python 在一个只读事务快照中查询;D1 使用同一个 batch 事务读
151
151
  | `TopicPanel.vue`、`WorkspaceDialogs.vue` | 话题资料、主持操作、接入步骤及编辑对话框 |
152
152
  | `CreateDiscussion.vue`、`LimitPicker.vue`、`LaunchSettings.vue` | 新建讨论表单及本机启动配置;推进方式与参与专家分组,单选方式使用强调色卡片,参与者通过“邀请 AI”加入并独立移出;轮次和时长独立配置,以“不限”按钮切换各自上限,按需展开滚轮,选择即时生效,并预览到限条件;鼠标滚轮逐格切换且不产生惯性,鼠标及触摸拖动松手后保留惯性,先阻尼滑行再吸附预计停点,轻点中间数字精确输入;键盘聚焦和直接输入时仅高亮中间选中行,输入与显示共用行高,避免整列描边与原生输入框叠加;时长分小时/分钟两列,收起与摘要共用时长格式;支持键盘,减少动态效果时保留拖动惯性并去掉三维翻转 |
153
153
  | `ProgressBoard.vue`、`ProgressPanel.vue` | 共享进度看板及抽屉容器;Codex 参与者菜单内直接打开 App / CLI 切换弹窗,显式暂停后复用本场配置的读取与保存,不跳转接入页或自动重启 |
154
+ | `FreeBoard.vue` | 自由协作房间的右侧看板,版式与讨论进度看板一致:房间状态与请求/执行计数、当前任务、成员(主持人居首,显示接入方式、模型与状态)、邀请、发起头脑风暴和每次执行用时 |
154
155
  | `use-discussion.js` | 将 `web/app.js` 的共享控制器状态接入 Vue |
155
156
  | `theme.css`、`channel.css` | 组件主题、深浅配色与响应式布局 |
156
157
  | `markdown.mjs`、`markdown.css`、`backup.mjs` | 三个主题共用的内容渲染与本地导出 |
package/docs/cli.md CHANGED
@@ -31,7 +31,7 @@ $env:DISCUSS_URL = 'http://127.0.0.1:8765'
31
31
  codiscuss room list
32
32
  ```
33
33
 
34
- Bash 对应 `export DISCUSS_URL=http://127.0.0.1:8765`,CMD 对应 `set DISCUSS_URL=http://127.0.0.1:8765`。`--site` 优先于环境变量;没有任何配置则报错,不默认写入线上。站点须为根地址,不带路径、查询、用户名或密码。客户端使用标准代理设置、校验证书且不跟随重定向。
34
+ Bash 对应 `export DISCUSS_URL=http://127.0.0.1:8765`,CMD 对应 `set DISCUSS_URL=http://127.0.0.1:8765`。`--site` 优先于环境变量;两者都没有时,使用 `--access-file` 凭据文件中绑定的站点(凭据只会发回该站点),因此自动任务只带凭据文件即可;没有任何配置则报错,不默认写入线上。站点须为根地址,不带路径、查询、用户名或密码。客户端使用标准代理设置、校验证书且不跟随重定向。
35
35
 
36
36
  建房与更新资料支持 `--user-request` / `--user-request-file`,将用户原文与 `--background` 分开保存,各限 4000 字。`room brief` 返回两者,概要和通知不自动展开原文。
37
37
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai_co_discuss",
3
- "version": "0.2.22",
3
+ "version": "0.2.24",
4
4
  "bin": {
5
5
  "codiscuss": "runner/codiscuss.mjs"
6
6
  },
@@ -34,7 +34,7 @@ const HELP = `AI CoDiscuss CLI
34
34
  codiscuss room --help
35
35
  codiscuss health --site http://127.0.0.1:8765
36
36
 
37
- 网站操作使用 --site 或 DISCUSS_URL,并需要 Python 3.10+。
37
+ 网站操作使用 --site、DISCUSS_URL 或 --access-file 中的站点,并需要 Python 3.10+。
38
38
  原有 start、status、stop、add 等服务命令继续兼容。
39
39
  `;
40
40
  const SERVICE_HELP = `AI CoDiscuss 讨论服务
package/runner/discuss.py CHANGED
@@ -140,7 +140,7 @@ def attachment_id(value):
140
140
  def add_common(parser):
141
141
  """Allow common flags before or after subcommands without shared state."""
142
142
  options = {"default": argparse.SUPPRESS}
143
- parser.add_argument("--site", help="HTTP 服务地址;未指定时读 DISCUSS_URL", **options)
143
+ parser.add_argument("--site", help="HTTP 服务地址;未指定时读 DISCUSS_URL,再读 --access-file 中的 site", **options)
144
144
  parser.add_argument("--as", dest="actor", type=participant,
145
145
  help="业务写入的声明操作者;不是登录认证;api 使用原始请求体", **options)
146
146
  parser.add_argument("-o", "--output", choices=("json", "text"),
@@ -317,7 +317,7 @@ def execution_commands(subcommands, registry):
317
317
  def build_parser(prog="discuss"):
318
318
  """Build help and schema from the same command definitions."""
319
319
  parser = Parser(prog=prog, description="AI CoDiscuss CLI:通过 HTTP 操作现有讨论网站。",
320
- allow_abbrev=False, epilog="站点用 --site 或 DISCUSS_URL;不保存当前房间,不自动重试写入。")
320
+ allow_abbrev=False, epilog="站点用 --site、DISCUSS_URL 或凭据文件中的 site;不保存当前房间,不自动重试写入。")
321
321
  add_common(parser)
322
322
  parser.add_argument("--version", action="version", version=f"{prog} {VERSION}")
323
323
  subcommands = parser.add_subparsers(dest="resource", required=True)
@@ -616,12 +616,15 @@ def build_plan(args):
616
616
 
617
617
 
618
618
  def resolve_site(args):
619
- """Resolve an explicit flag or environment URL without implicit production writes."""
619
+ """Resolve the flag, then the environment, then the site the access file is bound to; never a built-in default."""
620
620
  site = getattr(args, "site", None) or os.getenv("DISCUSS_URL", "")
621
+ if not site and getattr(args, "access_file", None):
622
+ # The file's own credential is only ever sent back to this same site.
623
+ site = str(read_object(args.access_file).get("site", ""))
621
624
  parsed = urlsplit(site)
622
625
  if (parsed.scheme not in ("http", "https") or not parsed.hostname or parsed.username
623
626
  or parsed.password or parsed.query or parsed.fragment or parsed.path not in ("", "/")):
624
- raise CliError("请用 --site 或 DISCUSS_URL 指定 http(s)://主机[:端口],不带路径、凭据或查询")
627
+ raise CliError("请用 --site、DISCUSS_URL 或凭据文件指定 http(s)://主机[:端口],不带路径、凭据或查询")
625
628
  try:
626
629
  parsed.port
627
630
  except ValueError as error:
@@ -746,7 +749,7 @@ def command_schema(args, registry):
746
749
  name = " ".join(args.command)
747
750
  if not name:
748
751
  return {"version": VERSION, "commands": {key: item.description for key, item in registry.items()},
749
- "exit_codes": EXIT_CODES, "site": "--site > DISCUSS_URL;无内置默认站点",
752
+ "exit_codes": EXIT_CODES, "site": "--site > DISCUSS_URL > --access-file 中的 site;无内置默认站点",
750
753
  "output": "默认 JSON;成功 stdout,错误 stderr;无交互提示、无自动重试"}
751
754
  if name not in registry:
752
755
  raise CliError(f"未知命令 {name};运行 discuss schema 查看可用命令")
package/web/app.js CHANGED
@@ -1568,6 +1568,14 @@ async function load_launch_settings() {
1568
1568
  finally { refresh_launch_recoveries(); render_launch_settings(); publish_view(); }
1569
1569
  }
1570
1570
 
1571
+ /** Re-check the local connection and explain when nothing has been connected yet. */
1572
+ async function retry_launch_connection() {
1573
+ await load_launch_settings();
1574
+ if (state.launch.available || state.launch.error) return;
1575
+ state.launch.error = "尚未检测到本机连接,请先在运行 AI 的电脑上执行上方命令并完成网页授权。";
1576
+ publish_view();
1577
+ }
1578
+
1571
1579
  /** Read saved choices for the active room without using drafts or delaying discussion refreshes. */
1572
1580
  async function load_room_models() {
1573
1581
  const room = state.room;
@@ -2960,7 +2968,7 @@ async function execute_view_action(name, value) {
2960
2968
  take_floor: () => change_floor("take"), return_floor: () => change_floor("return"),
2961
2969
  copy_online: () => copy_context(), copy_cli: () => copy_context("cli"), copy_background,
2962
2970
  choose_runtime, export_runtime, download_member_access, copy_member_join, pause_runtime, check_limits, pause_discussion, restart_discussion, force_close, conclude_discussion,
2963
- save_launch_defaults, launch_current_room, resume_launch, discard_launch, retry_launch_connection: load_launch_settings,
2971
+ save_launch_defaults, launch_current_room, resume_launch, discard_launch, retry_launch_connection, check_launch_connection: load_launch_settings,
2964
2972
  load_room_configuration, save_room_configuration, interrupt_member, change_member, invite_member, interrupt_free, set_proxy, copy_online_notice,
2965
2973
  prepare_brainstorm, return_conclusion, convert_suggestion,
2966
2974
  copy_reading: () => copy_text(`${location.origin}/r/${state.room.id}`), copy: copy_text };