ai_co_discuss 0.6.7 → 0.6.8

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 (43) hide show
  1. package/.agents/skills/workflow-creator/SKILL.md +1 -1
  2. package/README.md +1 -1
  3. package/README.zh-CN.md +1 -1
  4. package/backend/analytics.py +10 -3
  5. package/backend/analytics_rooms.py +134 -0
  6. package/backend/free_room.py +11 -6
  7. package/backend/moss_window_messages.py +9 -0
  8. package/backend/schema.sql +2 -1
  9. package/backend/server.py +35 -0
  10. package/docs/en/guide/analytics.md +4 -0
  11. package/docs/en/guide/scheduling.md +1 -0
  12. package/docs/en/guide/steward.md +3 -3
  13. package/docs/en/guide/workflows.md +2 -2
  14. package/docs/guide/analytics.md +4 -0
  15. package/docs/guide/scheduling.md +1 -0
  16. package/docs/guide/steward.md +3 -3
  17. package/docs/guide/workflows.md +2 -2
  18. package/frontend/locales/en/analytics.json +23 -0
  19. package/frontend/locales/en/backend.json +1 -0
  20. package/frontend/locales/en/discussion.json +14 -1
  21. package/frontend/locales/en/room.json +4 -0
  22. package/frontend/locales/en/steward.json +2 -0
  23. package/package.json +1 -1
  24. package/runner/adapters/antigravity_cli.mjs +2 -1
  25. package/runner/adapters/api.mjs +2 -1
  26. package/runner/adapters/claude.mjs +26 -7
  27. package/runner/adapters/codebuddy.mjs +3 -1
  28. package/runner/adapters/codebuddy_edit_hook.mjs +10 -5
  29. package/runner/adapters/codex_cli.mjs +33 -3
  30. package/runner/adapters/index.mjs +40 -2
  31. package/runner/adapters/profiles.mjs +10 -0
  32. package/runner/analytics.mjs +10 -0
  33. package/runner/discussion_launch.mjs +21 -9
  34. package/runner/discussion_service.mjs +22 -6
  35. package/runner/free_runner.mjs +109 -30
  36. package/runner/i18n_en.mjs +5 -0
  37. package/runner/moss_windows.mjs +14 -4
  38. package/web/admin.js +1 -1
  39. package/web/app.js +8 -2
  40. package/web/guest.js +1 -1
  41. package/web/i18n.js +3 -3
  42. package/web/modern.css +1 -1
  43. package/web/modern.js +87 -87
@@ -168,7 +168,7 @@ project_access: write
168
168
 
169
169
  - **工作流 ID**(文件夹名 = SKILL.md 的 `name`):小写英文和数字,可用单个连字符连接(不在首尾),1—40 位。`metadata` 下的 `label`(显示名)最多 32 字;早期写在顶层的 `label` 仍可读取,保存时移到 `metadata` 下。
170
170
  - **展示元数据**(均可选,不换行,只给人看和分享,**不会发给主持人**):`metadata.author`(作者,最多 64 字)、`metadata.source`(出处,最多 200 字)。不要把作者、出处等背景信息塞进 `description`。
171
- - **分类**:只在主工作流 `SKILL.md` 的 `metadata` 下写可选的 `category`。新建或改类时用 `entertainment`(娱乐)、`office`(办公)、`business`(商业)、`design-2d`(二维设计)、`design-3d`(三维设计)、`video`(剪辑)、`writing`(创作)或 `other`(其他)。缺失或未知的旧值显示为“其他”,不改类时保留原值。
171
+ - **分类**:只在主工作流 `SKILL.md` 的 `metadata` 下写可选的 `category`。新建或改类时用 `development`(开发)、`entertainment`(娱乐)、`office`(办公)、`business`(商业)、`design-2d`(二维设计)、`design-3d`(三维设计)、`video`(剪辑)、`writing`(创作)或 `other`(其他)。缺失或未知的旧值显示为“其他”,不改类时保留原值。
172
172
  - **`description`** 最多 500 字:写清做什么、什么时候用。主持人只凭它判断一条请求该不该按这个工作流做,写含糊了,该用时会不用、不该用时会套用。
173
173
  - **卡片**:最多 30 张。`name` 是卡片 ID,等于文件名,只用小写英文、数字和下划线,最多 16 位。`platform` 是平台 ID:`Claude`、`Codex`、`Antigravity`、`DeepSeek`、`Qwen`、`Grok`、`OpenAI`、`Custom`(网页显示的 Gemini 写 `Antigravity`,自定义 API 写 `Custom`),须是本机已配置的软件,或已配置的模型 API(官方平台可按已保存的 API Key 加入;Custom 须先保存完整的本机 API 配置)。成员名由程序拼成 `平台-卡片ID`。
174
174
  - **卡片可选字段**:`label`、`description`、`project_access`(read / write / auto / full)、`model`、`effort`。生图不是卡片字段:房间添加了生图卡片后所有成员都能画,卡片提示词写清谁负责出图即可。不用的字段直接省略;模型和强度省略即用本机默认值。接入方式、可执行文件、密钥不写进卡片,由各自电脑的配置决定。各角色挑哪个平台和模型,见 [给卡片挑平台和模型](references/model-selection.md)。
package/README.md CHANGED
@@ -111,7 +111,7 @@ The [User Guide](docs/en/guide/README.md) covers each of these in full.
111
111
 
112
112
  - **Projects and records** — Browse project files, keep attachments, branch a room, or export and import it across sites. Destroying a room clears local room records and sessions created exclusively for it. Existing and shared sessions are retained, and provider-side records follow the provider’s policy. Eligible idle rooms can be set to expire. [Rooms](docs/en/guide/rooms.md)
113
113
  - **Context and usage limits** — See the most recent available context reading and the usage windows or balance your account reports. Common windows are five hours and seven days, and the usage table can refresh supported CLI accounts on demand. [Members](docs/en/guide/members.md#see-context-and-usage-limits)
114
- - **Cross-room analytics**: one sentence on how much your AI team did, a list of issues that need you with links to the exact runs, and a share image generated locally. [Analytics](docs/en/guide/analytics.md)
114
+ - **Cross-room analytics**: compare model usage and delivery outcomes within each room, open runs that need attention, and generate a share image locally. [Analytics](docs/en/guide/analytics.md)
115
115
  - **Deploy as website**: publish a page or built folder a member made to a public address for 7 days, renewable, after you confirm what goes out. [Working in a room](docs/en/guide/working.md#8-deploy-a-page-as-a-website)
116
116
  - **MOSS (formerly Platform steward)**: check which rooms need you, get help with CoDiscuss, or request platform tasks in a dedicated conversation. [MOSS](docs/en/guide/steward.md)
117
117
  - **Hosted accounts** — A Windows administrator can create an isolated account in the admin panel. Configure a remote entry point to let its user sign in from a browser outside your network. [Admin panel and hosted accounts](docs/en/guide/admin.md)
package/README.zh-CN.md CHANGED
@@ -111,7 +111,7 @@ codiscuss setup
111
111
 
112
112
  - **房间记录与项目**:浏览项目文件,保存附件,分支或跨站点导入导出。销毁会清理本机记录及该房间新建的专用会话,原有和共用会话保留;服务商端记录按其政策处理。符合条件的空闲房间可设置自动销毁。 [房间目录与建房](docs/guide/rooms.md)
113
113
  - **上下文与额度**:查看最近读到的上下文用量,以及账号提供的额度窗口或余额;常见窗口为 5 小时和 7 天,支持的 CLI 账号可从额度表按需刷新。 [查看上下文与额度](docs/guide/members.md#查看上下文与额度)
114
- - **全房间统计**:一句话看清 AI 替你干了多少活,列出需要你处理的问题并能点到具体运行;本地导出分享图。[统计](docs/guide/analytics.md)
114
+ - **全房间统计**:按房间查看各模型的用量与交付表现,点开需要处理的运行,在本机导出分享图。[统计](docs/guide/analytics.md)
115
115
  - **部署为网站**:把成员做出的网页或构建好的目录发布到公网地址,确认上传内容后上线,有效 7 天、可续期。[在房间里干活](docs/guide/working.md#8-把网页部署成网站)
116
116
  - **MOSS(原“平台主理人”)**:在专用对话里查看哪些房间等你处理、询问共议用法,或办理平台事务。[MOSS](docs/guide/steward.md)
117
117
  - **托管账号**:Windows 管理员可通过管理面板创建隔离账号。配置托管外网入口后,对方可从外部浏览器登录使用。 [管理面板与托管账号](docs/guide/admin.md)
@@ -11,6 +11,7 @@ from time import monotonic
11
11
  from zoneinfo import ZoneInfo, ZoneInfoNotFoundError
12
12
 
13
13
  from .analytics_dispatch import dispatch_quality
14
+ from .analytics_rooms import TOKEN_WEIGHTS, room_performance
14
15
  from .analytics_live import live_snapshot
15
16
  from .analytics_scheduler import scheduler_quality
16
17
  from .moss_results import DELEGATED_SENDS
@@ -157,7 +158,9 @@ SELECT r.id,r.room_id,r.message_id,r.chain_id,r.created_at,r.status,mbr.name,mbr
157
158
  (m.author='用户' AND NOT EXISTS(SELECT 1 FROM message_relays l WHERE l.message_id=m.id)
158
159
  AND NOT EXISTS(SELECT 1 FROM internal_task_messages i WHERE i.message_id=m.id)) AS initiated,
159
160
  CAST(strftime('%s',m.created_at) AS INTEGER) AS sent,CAST(strftime('%s',a.created_at) AS INTEGER) AS answered,
160
- coalesce(w.kind,aw.kind) AS withdrawal,e.result,c.reason,coalesce(prior.dispatched,e.created_at) AS dispatched
161
+ r.execution_id, prior.request_id IS NOT NULL AS had_retry,
162
+ coalesce(e.model,(SELECT old.model FROM retried_requests rr JOIN member_executions old ON old.id=rr.execution_id
163
+ WHERE rr.request_id=r.id ORDER BY rr.execution_id LIMIT 1),'') AS delivery_model, coalesce(w.kind,aw.kind) AS withdrawal,e.result,c.reason,coalesce(prior.dispatched,e.created_at) AS dispatched
161
164
  FROM member_requests r LEFT JOIN prior ON prior.request_id=r.id JOIN messages m ON m.id=r.message_id
162
165
  JOIN room_directory d ON d.room_id=r.room_id AND d.system_kind=''
163
166
  JOIN room_members mbr ON mbr.id=r.member_id LEFT JOIN member_labels l ON l.room_id=r.room_id AND l.name=mbr.name
@@ -717,12 +720,14 @@ def snapshot(connection, params, cache, now):
717
720
  if params.get("range") == "all" and "from" not in params and "to" not in params:
718
721
  first = connection.execute("""SELECT MIN(r.created_at) FROM member_requests r
719
722
  JOIN room_directory d ON d.room_id=r.room_id AND d.system_kind=''""").fetchone()[0]
723
+ first_run = connection.execute("""SELECT min(e.created_at) FROM member_executions e
724
+ JOIN room_directory d ON d.room_id=e.room_id AND d.system_kind=''""").fetchone()[0]
720
725
  first_wait = connection.execute("""SELECT MIN(w.created_at) FROM room_waits w
721
726
  JOIN room_directory d ON d.room_id=w.room_id AND d.system_kind=''""").fetchone()[0]
722
727
  sealed_first = connection.execute("SELECT MIN(day) FROM analytics_sealed_days").fetchone()[0]
723
728
  first_decision = connection.execute("""SELECT MIN(unixepoch(s.created_at)) FROM scheduler_decisions s
724
729
  JOIN room_directory d ON d.room_id=s.room_id AND d.system_kind=''""").fetchone()[0]
725
- candidates = [int(stamp) for stamp in (first, first_wait, first_decision, first_share_activity(connection)) if stamp]
730
+ candidates = [int(stamp) for stamp in (first, first_run, first_wait, first_decision, first_share_activity(connection)) if stamp]
726
731
  if sealed_first:
727
732
  candidates.append(int(datetime.combine(date.fromisoformat(sealed_first), time.min, timezone.utc).timestamp()))
728
733
  earliest = min(candidates) if candidates else None
@@ -762,13 +767,15 @@ def snapshot(connection, params, cache, now):
762
767
  scope = {"mode": mode, "rooms": len(rooms), "sealed_rooms": retained, "included_rooms": len(rooms) + retained,
763
768
  "includes_archived": True, "sealed_day_tz": "UTC", "sealed_counts": SEALED_COUNTS,
764
769
  "sealed_distributions": SEALED_DISTRIBUTIONS,
765
- "current_only": ["active_seconds", "folders", "rooms", "peak", "concurrency", "issues", "queue", "affected_requests", "members", "models", "workflows", "insights", "scheduler", "share_totals"]}
770
+ "current_only": ["active_seconds", "folders", "rooms", "room_performance", "peak", "concurrency", "issues", "queue", "affected_requests", "members", "models", "workflows", "insights", "scheduler", "share_totals"]}
766
771
  scheduler = scheduler_quality(connection, start, end, distribution)
767
772
  result = dict(range=dates, scope=scope,
768
773
  share_totals=share_totals(connection, attempts, start, end),
769
774
  overview=overview(facts, start, end, sealed), previous=overview(facts, previous, start, prior),
770
775
  time={**time_stats(connection, requests, executions, (start, end), now, sealed), **activity},
771
776
  members=members, models=models, workflows=workflow_stats(connection, attempts),
777
+ token_weights=TOKEN_WEIGHTS,
778
+ room_performance=room_performance(connection, requests, (earlier_attempts, attempts), (previous, start, end)),
772
779
  scheduler=scheduler,
773
780
  issues=attention_issues(connection, attempts, earlier_attempts, revived, (previous, start, end, now), scheduler["summary"]),
774
781
  insights=[] if compact else insights(connection, members, start, end))
@@ -0,0 +1,134 @@
1
+ """Per-room model usage and delivery metrics for the current and comparison periods."""
2
+ from bisect import bisect_right
3
+ from collections import Counter, defaultdict
4
+
5
+ from .free_room import OWNER_INTERRUPT_RESULT, OWNER_STOP_RESULT
6
+
7
+ TOKEN_WEIGHTS = {"input": 1, "cache_read": 0.1, "cache_write": 1.25, "output": 5}
8
+ STOP_RESULTS = {OWNER_INTERRUPT_RESULT, OWNER_STOP_RESULT}
9
+
10
+
11
+ def _bucket():
12
+ return dict(runs=0, covered=0, seconds=0, tokens=0, waste=0, stopped=0, ended=0,
13
+ first=0, user_stop_requests=0, raw=Counter(), failures=Counter(), deliveries=[])
14
+
15
+
16
+ def _ratio(part, total):
17
+ return part / total if total else None
18
+
19
+
20
+ def _run(bucket, run, raw):
21
+ seconds = max(0, run["finished_at"] - run["created_at"])
22
+ tokens = sum(raw[key] * weight for key, weight in TOKEN_WEIGHTS.items()) if raw else 0
23
+ bucket["runs"] += 1
24
+ bucket["covered"] += raw is not None
25
+ bucket["seconds"] += seconds
26
+ bucket["tokens"] += tokens
27
+ if raw:
28
+ bucket["raw"].update({key: raw[key] for key in TOKEN_WEIGHTS})
29
+ stopped = run["status"] == "cancelled" and run["result"] in STOP_RESULTS
30
+ if run["status"] in ("failed", "cancelled"):
31
+ bucket["waste"] += tokens
32
+ if run["status"] == "failed":
33
+ bucket["failures"][run["failure_class"] or "unknown"] += 1
34
+ if stopped:
35
+ bucket["stopped"] += 1
36
+
37
+
38
+ def _request(bucket, row):
39
+ bucket["ended"] += 1
40
+ bucket["user_stop_requests"] += row["reason"] == "user_stop"
41
+ if row["status"] == "completed" and row["answered"] and not row["withdrawal"]:
42
+ bucket["first"] += not row["had_retry"]
43
+ if row["answered"] >= row["created_at"]:
44
+ bucket["deliveries"].append(row["answered"] - row["created_at"])
45
+
46
+
47
+ def _finish(bucket):
48
+ ordered = sorted(bucket.pop("deliveries"))
49
+ for name, fraction in (("p50", .5), ("p90", .9)):
50
+ bucket[name] = ordered[round((len(ordered) - 1) * fraction)] if ordered else None
51
+ bucket.update(coverage=_ratio(bucket["covered"], bucket["runs"]),
52
+ first_rate=_ratio(bucket["first"], bucket["ended"]),
53
+ intervention=_ratio(bucket["stopped"], bucket["runs"]),
54
+ waste_rate=_ratio(bucket["waste"], bucket["tokens"]))
55
+ return bucket
56
+
57
+
58
+ def _period_groups(requests, runs, usage):
59
+ groups = defaultdict(lambda: defaultdict(_bucket))
60
+ for run in runs:
61
+ room = groups[run["room_id"]]
62
+ for bucket in (room[None], room[run["model"]]):
63
+ _run(bucket, run, usage.get(run["id"]))
64
+ for row in requests:
65
+ if row["status"] not in ("completed", "failed", "cancelled"):
66
+ continue
67
+ if not row["execution_id"] and not row["had_retry"]:
68
+ continue
69
+ room = groups[row["room_id"]]
70
+ for bucket in (room[None], room[row["delivery_model"]]):
71
+ _request(bucket, row)
72
+ return groups
73
+
74
+
75
+ def _host_usage(connection, runs, usage):
76
+ """Attribute runs by their creation second, including runs without a request anchor."""
77
+ current = dict(connection.execute("SELECT room_id,name FROM room_members WHERE role='host'"))
78
+ times, names = defaultdict(list), defaultdict(list)
79
+ changes = connection.execute("""SELECT e.room_id,e.at,m.name,json_extract(e.data,'$.role')='host' AS took
80
+ FROM room_events e JOIN room_members m ON m.id=json_extract(e.data,'$.member_id')
81
+ WHERE e.kind IN ('member.joined','member.changed') AND json_valid(e.data)
82
+ AND (json_extract(e.data,'$.role')='host') <> (json_extract(e.data,'$.from_role') IS 'host')
83
+ ORDER BY e.room_id,e.at,e.id""")
84
+ for room, stamp, name, took in changes:
85
+ if not names[room]:
86
+ # A first recorded departure identifies the host before the event log began.
87
+ names[room].append(name if not took else None)
88
+ if not took and names[room][-1] != name:
89
+ continue
90
+ times[room].append(stamp)
91
+ names[room].append(name if took else None)
92
+ totals = defaultdict(_bucket)
93
+ for run in runs:
94
+ room = run["room_id"]
95
+ host = current.get(room)
96
+ if room in names:
97
+ index = bisect_right(times[room], run["created_at"] * 1000 + 999)
98
+ host = names[room][index]
99
+ if host == run["name"]:
100
+ _run(totals[room], run, usage.get(run["id"]))
101
+ return totals
102
+
103
+
104
+ def room_performance(connection, requests, periods, bounds):
105
+ """Return existing active rooms, using creation time for each execution and request cohort."""
106
+ previous, start, end = bounds
107
+ usage = {r["execution_id"]: r for r in connection.execute("""SELECT u.* FROM execution_usage u
108
+ JOIN member_executions e ON e.id=u.execution_id WHERE e.created_at>=? AND e.created_at<?""", (previous, end))}
109
+ before, current = [_period_groups((r for r in requests if left <= r["created_at"] < right), runs, usage)
110
+ for runs, left, right in zip(periods, bounds, bounds[1:])]
111
+ hosts = _host_usage(connection, periods[1], usage)
112
+ rows = []
113
+ for room, title, folder in connection.execute("""SELECT r.id,r.title,f.name FROM rooms r
114
+ LEFT JOIN room_folder_assignments a ON a.room_id=r.id LEFT JOIN topic_folders f ON f.id=a.folder_id"""):
115
+ if room not in current:
116
+ continue
117
+ models = current[room]
118
+ total = _finish(models.pop(None))
119
+ total.update(room_id=room, title=title, folder=folder, models=[])
120
+ old = _finish(before[room][None]) if room in before else {}
121
+ total["previous"] = {key: old.get(key) for key in ("first_rate", "intervention", "waste_rate")}
122
+ for model, bucket in models.items():
123
+ item = _finish(bucket)
124
+ token_share = _ratio(item["tokens"], total["tokens"])
125
+ waste_share = _ratio(item["waste"], total["waste"])
126
+ item.update(model=model, token_share=token_share, time_share=_ratio(item["seconds"], total["seconds"]),
127
+ waste_skew=_ratio(waste_share, token_share) if waste_share is not None else None)
128
+ total["models"].append(item)
129
+ total["models"].sort(key=lambda model: (-model["tokens"], model["model"]))
130
+ host = hosts[room]
131
+ total["host"] = dict(runs=host["runs"], token_share=_ratio(host["tokens"], total["tokens"]),
132
+ time_share=_ratio(host["seconds"], total["seconds"]))
133
+ rows.append(total)
134
+ return sorted(rows, key=lambda row: (-row["tokens"], row["room_id"]))
@@ -245,7 +245,7 @@ LATER_COLUMNS = {"room_members": {"access": "TEXT NOT NULL DEFAULT 'runner'", "s
245
245
  "free_sequences": {"gates": "TEXT NOT NULL DEFAULT '[]'"},
246
246
  "room_rewinds": {"restore_files": "INTEGER NOT NULL DEFAULT 0 CHECK(restore_files IN (0,1))",
247
247
  "restore_executions": "TEXT NOT NULL DEFAULT '[]'", "restore_result": "TEXT"},
248
- "execution_capabilities": {"steer": "INTEGER", "resume": "INTEGER"},
248
+ "execution_capabilities": {"steer": "INTEGER", "resume": "INTEGER", "group_owner_context": "INTEGER NOT NULL DEFAULT 0"},
249
249
  "member_capabilities": {"image_model": "TEXT NOT NULL DEFAULT ''"},
250
250
  "execution_failures": {"reset_at": "INTEGER NOT NULL DEFAULT 0"},
251
251
  "free_host_checkins": {"idle_notice": "INTEGER NOT NULL DEFAULT 0"},
@@ -2331,8 +2331,8 @@ def keep_working(connection, room_id, host, message_id, chain_id, execution_id):
2331
2331
  next_id = connection.execute("""INSERT INTO member_executions (room_id,member_id,client_id,session_id,lease_until,created_at,cwd,model,effort)
2332
2332
  VALUES (?,?,?,?,?,?,?,?,?)""", (room_id, host["id"], f"keep-working-{execution_id}", previous["session_id"],
2333
2333
  now + LEASE_SECONDS, now, previous["cwd"], previous["model"], previous["effort"])).lastrowid
2334
- connection.execute("""INSERT INTO execution_capabilities (execution_id,room_id,stoppable,progress,steer,resume)
2335
- SELECT ?,room_id,stoppable,progress,steer,resume FROM execution_capabilities WHERE execution_id=?""", (next_id, execution_id))
2334
+ connection.execute("""INSERT INTO execution_capabilities (execution_id,room_id,stoppable,progress,steer,resume,group_owner_context)
2335
+ SELECT ?,room_id,stoppable,progress,steer,resume,group_owner_context FROM execution_capabilities WHERE execution_id=?""", (next_id, execution_id))
2336
2336
  insert_request(connection, room_id, host["id"], message_id, chain_id, "keep_working", "host")
2337
2337
  connection.execute("UPDATE member_requests SET status='delivering',execution_id=? WHERE message_id=? AND member_id=?",
2338
2338
  (next_id, message_id, host["id"]))
@@ -4710,8 +4710,11 @@ def execution_detail(connection, row):
4710
4710
  if detail.get("restricted_group_report") or any(external_relay_root(root) for root in roots):
4711
4711
  detail["restricted_origin"] = True
4712
4712
  if kind and kind["system_kind"] == "steward_group":
4713
+ from .moss_delegation import execution_roots, owner_execution
4713
4714
  from .moss_window_messages import tag_waking_messages
4714
4715
  tag_waking_messages(connection, row["room_id"], row["id"], requests)
4716
+ roots = execution_roots(connection, row["room_id"], row["member_id"], row["id"])
4717
+ detail["group_owner_only"] = owner_execution(connection, row["room_id"], row["member_id"], row["id"], roots)
4715
4718
  detail["interjections"] = execution_interjections(connection, row["id"], row["status"])
4716
4719
  detail["background_supplement"] = bool(message_queue.background_requests(connection, row["room_id"], row["id"]))
4717
4720
  proposal = proposal_summaries(connection, [row["id"]]).get(row["id"])
@@ -5404,10 +5407,12 @@ def execution_action(connection, room_id, execution_id, token, payload, member=N
5404
5407
  # Older runners report no `steer` or `resume`; their deliveries take no interjection and no pause.
5405
5408
  if type(payload.get("steer", False)) is not bool or type(payload.get("resume", False)) is not bool:
5406
5409
  raise ValueError(Text("delivery 的 steer 与 resume 须为布尔值"))
5407
- connection.execute("""INSERT INTO execution_capabilities (execution_id,room_id,stoppable,progress,steer,resume) VALUES (?,?,?,?,?,?)
5410
+ connection.execute("""INSERT INTO execution_capabilities (execution_id,room_id,stoppable,progress,steer,resume,group_owner_context) VALUES (?,?,?,?,?,?,?)
5408
5411
  ON CONFLICT(execution_id) DO UPDATE SET stoppable=excluded.stoppable,progress=excluded.progress,steer=excluded.steer,
5409
- resume=excluded.resume""", (execution_id, room_id, int(payload["stoppable"]), int(payload["progress"]),
5410
- int(payload.get("steer", False)), int(payload.get("resume", False))))
5412
+ resume=excluded.resume,group_owner_context=MAX(group_owner_context,excluded.group_owner_context)""",
5413
+ (execution_id, room_id, int(payload["stoppable"]), int(payload["progress"]),
5414
+ int(payload.get("steer", False)), int(payload.get("resume", False)),
5415
+ int(payload.get("group_owner_context") is True)))
5411
5416
  elif action == "background_tasks":
5412
5417
  # The latest list replaces the earlier one; it may arrive just after the execution ended, with the final states.
5413
5418
  tasks = checked_background_tasks(payload)
@@ -144,6 +144,9 @@ def save_interjection_pack(connection, room_id, execution, ids, submission):
144
144
  initiator = group_task_initiator(connection, room_id, execution["id"])
145
145
  rows = packed_messages(connection, room_id, ids)
146
146
  guest_ids = [row["id"] for row in rows if not row["owner"]]
147
+ if guest_ids and group_owner_context(connection, execution["id"]):
148
+ raise group_interjection_conflict("group_owner_context",
149
+ Text("群友消息留待独立执行"), message_ids=guest_ids)
147
150
  if guest_ids and execution_guest_packs(connection, execution["id"]) >= MAX_GUEST_PACKS_PER_EXECUTION:
148
151
  raise group_interjection_conflict("group_guest_execution_limit",
149
152
  Text("本次执行已达到群友插话上限 {limit},余下消息留待下一轮", limit=MAX_GUEST_PACKS_PER_EXECUTION),
@@ -161,6 +164,12 @@ def save_interjection_pack(connection, room_id, execution, ids, submission):
161
164
  return {**item, "message_ids": selected}
162
165
 
163
166
 
167
+ def group_owner_context(connection, execution_id):
168
+ """Whether a started group process has the owner's workspace and session."""
169
+ return connection.execute("""SELECT 1 FROM execution_capabilities
170
+ WHERE execution_id=? AND group_owner_context=1""", (execution_id,)).fetchone() is not None
171
+
172
+
164
173
  def execution_guest_packs(connection, execution_id):
165
174
  """Reserve remaining execution slots for verified owner messages."""
166
175
  return connection.execute("""SELECT COUNT(*) FROM execution_interjections i WHERE i.execution_id=? AND EXISTS (
@@ -773,7 +773,8 @@ CREATE TABLE IF NOT EXISTS execution_capabilities (
773
773
  stop_result TEXT NOT NULL DEFAULT '' CHECK(stop_result IN ('','stopped','unstoppable','unconfirmed')),
774
774
  steer INTEGER CHECK(steer IN (0,1)),
775
775
  -- The runner can stop the software's turn and continue the same session, so a pause keeps the execution.
776
- resume INTEGER CHECK(resume IN (0,1))
776
+ resume INTEGER CHECK(resume IN (0,1)),
777
+ group_owner_context INTEGER NOT NULL DEFAULT 0
777
778
  );
778
779
  -- What the owner said into one running execution without ending it (an interjection from the private-chat page), and
779
780
  -- whether the runner got it into the member's software: pending until the runner reports delivered or failed. A retry
package/backend/server.py CHANGED
@@ -6564,6 +6564,37 @@ def scheduler_decision_view(connection, room_id, decision_id, token):
6564
6564
  return result
6565
6565
 
6566
6566
 
6567
+ DECISION_PAGE_SIZE = 50
6568
+ DECISION_EXCERPT_CHARS = 120
6569
+
6570
+
6571
+ def scheduler_decision_page(connection, room_id, token, before=None, limit=DECISION_PAGE_SIZE):
6572
+ """List the room's smart-scheduling decisions newest first, a page at a time, each with the message it judged.
6573
+
6574
+ `before` is the smallest decision id already shown; `has_more` says whether older ones remain.
6575
+ """
6576
+ if session_read_boundary(connection, room_id, token) is not None:
6577
+ raise PermissionError(Text('独立观点阶段不能读取智能调度判断'))
6578
+ limit = max(1, min(int(limit), DECISION_PAGE_SIZE))
6579
+ rows = connection.execute(f"{DECISION_SELECT} WHERE d.room_id=? AND d.id<? ORDER BY d.id DESC LIMIT ?",
6580
+ (room_id, before or MAX_MESSAGE_ID, limit + 1)).fetchall()
6581
+ decisions = [dict(row) for row in rows[:limit]]
6582
+ ids = json.dumps([item["id"] for item in decisions])
6583
+ details = {row[0]: json.loads(row[1]) for row in connection.execute(
6584
+ "SELECT decision_id,detail FROM scheduler_decision_details WHERE decision_id IN (SELECT value FROM json_each(?))", (ids,))}
6585
+ messages = {row[0]: row for row in connection.execute(
6586
+ """SELECT m.id,m.author,m.text,EXISTS(SELECT 1 FROM message_withdrawals w WHERE w.message_id=m.id) FROM messages m
6587
+ WHERE m.room_id=? AND m.id IN (SELECT value FROM json_each(?))""",
6588
+ (room_id, json.dumps(sorted({item["after_message_id"] for item in decisions}))))}
6589
+ for decision in decisions:
6590
+ decision["detail"] = details.get(decision["id"])
6591
+ decision["texts"] = load_texts(connection, "decision", decision["id"])
6592
+ message = messages.get(decision["after_message_id"])
6593
+ decision["message"] = {"author": message[1], "withdrawn": bool(message[3]),
6594
+ "excerpt": "" if message[3] else message[2][:DECISION_EXCERPT_CHARS]} if message else None
6595
+ return {"decisions": decisions, "has_more": len(rows) > limit}
6596
+
6597
+
6567
6598
  def search_scope(connection, room_id, token, cutoff):
6568
6599
  """Share the transcript and execution reading boundary between both search entry points."""
6569
6600
  reader = None
@@ -10603,6 +10634,10 @@ class DiscussionHandler(BaseHTTPRequestHandler):
10603
10634
  token = self.headers.get("X-Discussion-Token", "")
10604
10635
  if parts[3:] == ["scheduler-decisions"] and method == "POST":
10605
10636
  result = record_scheduler_decision(connection, room_id, token, self.read_payload())
10637
+ elif parts[3:] == ["scheduler-decisions"] and method == "GET":
10638
+ query = parse_qs(urlsplit(self.path).query)
10639
+ before = query.get("before", [""])[0]
10640
+ result = scheduler_decision_page(connection, room_id, token, int(before) if before.isdigit() else None)
10606
10641
  elif len(parts) == 5 and parts[3] == "scheduler-decisions" and method == "GET":
10607
10642
  result = scheduler_decision_view(connection, room_id, int(parts[4]), token)
10608
10643
  elif parts[3:] == ["scheduler-routing"] and method == "POST":
@@ -59,3 +59,7 @@ Exports may contain room, folder and member names, as well as message excerpts.
59
59
  - **Approximate values**: durations that include deleted rooms can only be estimated from ranges and are marked with "≈".
60
60
  - **Small samples**: any ratio with a denominator under 10 shows counts only, not a percentage.
61
61
  - **No model calls**: statistics and insights are computed by fixed rules on the site backend. Your conversations are never sent to a model for analysis.
62
+
63
+ ## Room performance
64
+
65
+ Expand Room performance under Details. The selected period includes active existing rooms, including archived rooms. Sort by a column, open a room by its name, or expand its row for model usage, median and 90th-percentile delivery time, failure types and estimated host overhead by tenure. Switch the model mix between weighted tokens and cumulative runtime. Token-based figures are muted when the room is below 80% usage coverage; when the room is covered, each model row also checks its own coverage. First-pass delivery counts retained answers without retries among ended requests that reached execution. Intervention counts runs interrupted or stopped by the user. Waste is the share of weighted tokens spent on failed and cancelled runs, including user interrupts and stops, matching wasted tokens in host dispatch. Waste skew above 2 means the model accounts for more than twice its token share in waste. Models with fewer than ten runs show numbers without highlighting.
@@ -37,6 +37,7 @@ Adding clear role descriptions for members can improve routing. Open the member
37
37
  ### 2. Review decisions and give feedback
38
38
 
39
39
  - **Decision cards:** Each judgment appears in the transcript. Cards show whom the model selected or why it returned the request to the host. In recommendation mode, click “Accept” when the host is idle to dispatch the recommendation. If the host is busy, first choose how to handle its current work. “Cancel acceptance” closes the pending choice. It cannot withdraw a request that has already been sent.
40
+ - **All decisions in one place:** The “Scheduling” tab after “Private chat” at the top of the room lists every decision in the room, newest first: the message it judged (click to jump back to it), what it chose and its confidence. Filter by “All”, “Applied”, “Not applied” or “Poor decision”; expanding, “Model input” and rating work as on the transcript cards. Smart scheduling writes no reasoning: it gives each option of a few fixed questions a probability, and the program applies the result only above a threshold. Share pages don't include these records.
40
41
  - **Inspect the input:** Click “Model input” on a decision card to review the prompt, context, and candidate options the model saw. Confidence appears beside the decision title.
41
42
  - **Rate the result:** Room owners can click 👍 (“Good decision”) or 👎 (“Poor decision”). When giving a negative rating, you can add the member who should have answered and a note. This feedback is used to improve how scheduling decides. The 👎 form also has “Save and send to developers”: it saves as usual, then sends the decision (question, options, choice and the context at the time) with your note, the version, system and names of the software you set up to the official service. Click “See what will be sent” to read it first. If sending fails you are told, and your rating stays saved here.
42
43
 
@@ -66,7 +66,7 @@ To stop MOSS, turn off the group in its website settings, or @mention MOSS from
66
66
 
67
67
  If a configured scheduler request fails, MOSS still handles direct mentions and messages from the owner. Existing limits and permissions apply, and MOSS decides whether to reply. Other messages are recorded without waking MOSS. The group settings show the latest failure.
68
68
 
69
- On this group window's “Room” page you can change how many times a day it may be called, how many rooms a day it may delegate (in the “Host permissions” row), the model and effort, the description, and the speaking style. You can add read-only folders and choose which skills are available. To stop it replying in this group, turn off “Let MOSS reply in this group” on the same page; the history and settings are kept. No project folder is attached by default. Group windows use standard read-only access and support Codex CLI, Claude Code CLI, Antigravity CLI, and model APIs. They can also look up public web pages. Read-only does not necessarily limit what the software can read. Codex CLI can still read other local files. Check the member card on the “Room” page for the selected software’s limits. Group members cannot grant more access or ask MOSS to read private chats. MOSS asks the owner ordinary questions in the group and takes sensitive matters to a direct message. Open the group window on the MOSS page to read messages and see their senders, including messages MOSS did not answer, or send an “Owner instruction” directly to that group’s MOSS (handled in the window by default and not posted to the group unless you explicitly ask it to post in the group).
69
+ On this group window's “Room” page you can change how many times a day it may be called, how many rooms a day it may delegate (in the “Host permissions” row), the model and effort, the description, and the speaking style. You can add read-only folders and choose which skills are available. To stop it replying in this group, turn off “Let MOSS reply in this group” on the same page; the history and settings are kept. No project folder is attached by default. In “Project access,” the owner can choose any level the software supports. The default is “Write,” falling back to “Read-only” if necessary. Only runs whose sources are all verified owner requests use the selected level. Runs containing other group members’ requests can write only to the group workspace and have no attached project folders. If the owner selected “Read-only,” those runs are read-only too. With “Auto” or “Full access,” files from other group members enter the higher-permission process when you ask MOSS to read them. Group members cannot authorize speaking for the owner, Full access delegation, or changes to group memory. Group windows support Codex CLI, Claude Code CLI, Antigravity CLI, and model APIs. They can also look up public web pages. Read-only does not necessarily limit what the software can read. Codex CLI can still read other local files. Check the member card on the “Room” page for the selected software’s limits. Group members cannot grant more access or ask MOSS to read private chats. MOSS asks the owner ordinary questions in the group and takes sensitive matters to a direct message. Open the group window on the MOSS page to read messages and see their senders, including messages MOSS did not answer, or send an “Owner instruction” directly to that group’s MOSS (handled in the window by default and not posted to the group unless you explicitly ask it to post in the group).
70
70
 
71
71
  When MOSS is waiting for your answer in a group, quote its question or @mention MOSS. With smart routing enabled, a plain message also counts if the decision model recognizes it as your reply. Only the linked owner account can answer. To dismiss the question, open “Settings” → “Chat windows,” expand the group, and select “Clear.” Clearing ends the wait without granting approval.
72
72
 
@@ -76,7 +76,7 @@ If a group cannot handle a matter or needs a private decision from you, its MOSS
76
76
 
77
77
  ### Have the Steward or Direct messages pass a message to a group
78
78
 
79
- Group MOSS can look up its own messages and attachments even if it did not reply at the time or you later used “Clear conversation”. It only sees messages recorded after the group was enabled. It does not import earlier QQ history. When messages with attachments wake MOSS, it receives up to five local read-only copies per run, with a 50 MiB limit per file. It can look up other saved attachments on demand. The Steward and Direct messages can read group message text but must ask group MOSS to inspect an image or file and report back. A delegated room that needs the source group’s records must use “Write” access. “Full access” cannot read the group’s messages or attachments.
79
+ Group MOSS can look up its own messages and attachments even if it did not reply at the time or you later used “Clear conversation”. It only sees messages recorded after the group was enabled. It does not import earlier QQ history. When a message or the same sender’s immediately preceding group message has attachments, MOSS receives up to five local read-only copies per run, with a 50 MiB limit per file. It can look up other saved attachments on demand. The Steward and Direct messages can read group message text but must ask group MOSS to inspect an image or file and report back. A delegated room that needs the source group’s records must use “Write” access. “Full access” cannot read the group’s messages or attachments.
80
80
 
81
81
  Tell the Steward or Direct messages something like “see what people are talking about in the group” or “summarize today's discussion in the group,” and it passes the request to that group's MOSS. By default it only does the work and says nothing in the group: the group's MOSS handles it under its own access and group description, and reports only to the window that asked. To have it speak in the group, say so explicitly (“say … in the group”), and only work you started yourself can do that; work started by a scheduled duty, a proactive report, or a child room's report cannot make MOSS speak in the group. Treat anything passed to a group as possibly public. A group that is not enabled refuses the message.
82
82
 
@@ -107,7 +107,7 @@ Manage the Steward, Direct messages, and group windows separately. Open the wind
107
107
  - **Clear the conversation**: choose “Clear conversation” at the bottom of MOSS’s member card on the “Rooms” tab, or at the bottom of the “Software and model” dialog opened from the right sidebar, and confirm twice. The first dialog lists what is cleared and kept, reminds you to update `MEMORY.md` first, and offers “View or edit memory” to jump straight to this window’s memory editor. After you choose “Confirm clear” in the second step, the current conversation moves to “Past conversations” and the window opens a blank conversation with a new AI session. Settings, folders, and memory are kept. Use “Past conversations” to read the archived history or confirm permanent deletion.
108
108
  - **Memory**: in the “Memory” row of “Collaboration settings” on the “Rooms” tab, choose “Settings” to read or edit this window's `MEMORY.md`. The limit is 20 KB. It is separate from the AI session, and MOSS reads it as needed. Clearing the conversation, changing software, or starting a “New conversation” does not clear memory. In a group, MOSS saves only what the linked owner account explicitly asks it to remember. It does not automatically save the owner's other messages. Other members can still ask questions, but cannot save instructions to this file for MOSS to read in later tasks.
109
109
  - **Folders**: add or remove them under “project folder” at the top of the “Rooms” tab, as in ordinary rooms. The Steward and Direct messages windows follow their own project access settings. Folders added to a group are always read-only. When you change the Steward’s working folder, its memory moves with it. If the new folder already has a `MEMORY.md`, both files stay where they are.
110
- - **Software, model, effort, and speed**: right-click the MOSS software row in the right sidebar or select “⋯”. The menu lets you change “Model”, “Effort”, “Speed”, and “Project access”. Each window offers the same access levels as “Members and settings”. Choose “Software and model” from the menu or from MOSS’s member card on the “Rooms” tab. Choose the software, model, and effort in the dialog. Where supported, set “Speed” to “Default” (follow the app), “Standard,” Fast, or Ultrafast. The Steward, Direct messages, and each group save their speed separately. “New conversation” keeps that window’s speed unless you change it. Then pick one of two actions. “Switch” carries on the current conversation: with the same software it keeps the session and applies the new settings from the next turn; with other software, the new software starts a session that picks up from this window’s recent conversation, though work in the old session that never reached the conversation does not carry over. “New conversation” starts a fresh session on the chosen software and model and clears the current session’s context; you can also use it without changing anything. To clear the window’s messages as well, use “Clear conversation” at the bottom of the dialog. Groups offer only software the runner can start with read-only access, not desktop apps. Both actions affect only the current window and keep the conversation history, duties, settings and memory. A divider appears when the session actually changes. You can also change the model with the pencil on the member card, which works like “Switch”. For project access, select the level directly (Direct messages allows only read-only or Auto, groups are always read-only).
110
+ - **Software, model, effort, and speed**: right-click the MOSS software row in the right sidebar or select “⋯”. The menu lets you change “Model”, “Effort”, “Speed”, and “Project access”. Each window offers the same access levels as “Members and settings”. Choose “Software and model” from the menu or from MOSS’s member card on the “Rooms” tab. Choose the software, model, and effort in the dialog. Where supported, set “Speed” to “Default” (follow the app), “Standard,” Fast, or Ultrafast. The Steward, Direct messages, and each group save their speed separately. “New conversation” keeps that window’s speed unless you change it. Then pick one of two actions. “Switch” carries on the current conversation: with the same software it keeps the session and applies the new settings from the next turn; with other software, the new software starts a session that picks up from this window’s recent conversation, though work in the old session that never reached the conversation does not carry over. “New conversation” starts a fresh session on the chosen software and model and clears the current session’s context; you can also use it without changing anything. To clear the window’s messages as well, use “Clear conversation” at the bottom of the dialog. Groups offer only software the runner can start with read-only access, not desktop apps. Both actions affect only the current window and keep the conversation history, duties, settings and memory. A divider appears when the session actually changes. You can also change the model with the pencil on the member card, which works like “Switch”. For project access, select the level directly (Direct messages allows only read-only or Auto, and groups apply the source rules above).
111
111
 
112
112
  ## Things to know
113
113
 
@@ -40,7 +40,7 @@ Select “Workflows” at the top of the sidebar to open its own page. Use “Ne
40
40
 
41
41
  - **Ask the host in a room:** Enable “Full host control,” then describe the division of work you want. You can also type / and choose “Create / edit workflow” under platform skills. The host uses the skill to create SKILL.md, role cards, and a canvas, validates them, saves, and enables the workflow. By default, it saves to the room’s main project when there is one, or to the global library otherwise. Ask the host to save it globally if you plan to reuse it across projects.
42
42
  - **Ask an AI in an external session:** In a Claude Code or Codex session with the CoDiscuss skills installed, ask it to create or edit a workflow with workflow-creator. It validates a folder with codiscuss launch workflow-check --dir <directory>. After you approve, it saves the workflow with codiscuss launch workflow-save --dir <directory>. If the library already has that ID, the save is refused unless it explicitly overwrites (--overwrite) or names the revision it read (--revision). For a project workflow, pass `--scope project --project <folder>` when validating and saving.
43
- - **Where workflows are stored.** Global workflows are available across projects and live in `~/.codiscuss/workflows/<id>/`. A project workflow lives in `<project-root>/.codiscuss/workflows/<id>/` and is available in rooms that use that project folder. The Workflows page has filters at the top: “All”, “Global”, and each saved project that has workflows. The list is grouped by category (Entertainment, Office, Business, 2D design, 3D design, Video editing, Writing, Other; categories without workflows are not shown). Each card shows a thumbnail of the canvas, the name, description, avatars for the software its experts use, sub-workflows, status, and where it belongs (“Global” or the project name). Hover over the avatars for the total expert count, including sub-workflows. Use the card menu to rename, disable, delete, export, move, or copy the workflow where applicable. The button left of “New” switches between card view and list view; list view shows one row per workflow without thumbnails, and the browser remembers your choice.
43
+ - **Where workflows are stored.** Global workflows are available across projects and live in `~/.codiscuss/workflows/<id>/`. A project workflow lives in `<project-root>/.codiscuss/workflows/<id>/` and is available in rooms that use that project folder. The Workflows page has filters at the top: “All”, “Global”, and each saved project that has workflows. The list is grouped by category (default order: Development, Entertainment, Office, Business, 2D design, 3D design, Video editing, Writing, Other; categories without workflows are not shown). The “Category order” button at the top right moves categories up or down; the order is saved on this computer and used on the Workflows page and wherever you pick a workflow in a room, which opens on the first category that has workflows. Each card shows a thumbnail of the canvas, the name, description, avatars for the software its experts use, sub-workflows, status, and where it belongs (“Global” or the project name). Hover over the avatars for the total expert count, including sub-workflows. Use the card menu to rename, disable, delete, export, move, or copy the workflow where applicable. The button left of “New” switches between card view and list view; list view shows one row per workflow without thumbnails, and the browser remembers your choice.
44
44
  - **Choose where to save.** Select “New” or “Import,” then choose the global library or a project. On desktop, a scope button at the right of the editor’s top bar shows “Global” or “Project · name”: open it to change where an unsaved workflow is saved; once saved it stays greyed, and a read-only project shows a lock icon. You can open workflows from read-only projects and copy them to the global library.
45
45
  - **Move, copy, or export.** Open the project workflow’s “…” menu and choose “Move to global” or “Copy to global”. Moving requires a writable source, updates the current room’s binding, and is refused if the global library already has the same ID. Copying keeps the original. Use “Copy to current project” to copy a global workflow when there is one writable project. If several are writable, choose the matching “Copy to project ‘name’” action. Choose “Export” to download a ZIP. The export notice lists files skipped because they were too large or were not text.
46
46
 
@@ -48,7 +48,7 @@ Select “Workflows” at the top of the sidebar to open its own page. Use “Ne
48
48
 
49
49
  When you open a canvas on a paired device, templates, scripts, and other supporting files stay on the computer. Saving canvas edits preserves those files.
50
50
 
51
- Edit the “Short description” directly above the workflow text. It wraps to the panel width so you can read the full description. The “Category” menu below it decides which group the workflow appears in on the list and wherever you pick a workflow, and is written when you save. A workflow with no category, or one this version does not recognize, shows as “Other,” and its original value is kept until you choose a category yourself. From the command line, write the category ID in `metadata.category` of the main `SKILL.md` (`entertainment`, `office`, `business`, `design-2d`, `design-3d`, `video`, `writing`, `other`).
51
+ Edit the “Short description” directly above the workflow text. It wraps to the panel width so you can read the full description. The “Category” menu below it decides which group the workflow appears in on the list and wherever you pick a workflow, and is written when you save. A workflow with no category, or one this version does not recognize, shows as “Other,” and its original value is kept until you choose a category yourself. From the command line, write the category ID in `metadata.category` of the main `SKILL.md` (`development`, `entertainment`, `office`, `business`, `design-2d`, `design-3d`, `video`, `writing`, `other`).
52
52
 
53
53
  Select a card on the Workflows page. The canvas opens in the center, and its SKILL.md appears on the right. Select “Back to workflows” in the top left to return to the list. Click “Edit,” then “Save” or press Ctrl+S to save changes. On a desktop layout the SKILL.md panel always stays open (drag its left edge to resize), and “Save” sits at the right of the top bar, beside a scope button showing “Global” or “Project · name” that changes where an unsaved workflow is saved and is greyed once saved; on a phone or an upright tablet both stay in the canvas toolbar. If the workflow was changed elsewhere after you opened it, saving is refused and the page says “The workflow was changed elsewhere; reload it”; “Reload” reads the new version and first asks before discarding unsaved edits. An imported workflow whose ID is already in the library is saved only after you choose “Save and replace.”
54
54
 
@@ -59,3 +59,7 @@
59
59
  - **近似值**:包含已删除房间的耗时只能按区间估算,数字前会标“≈”。
60
60
  - **小样本保护**:任意比例的分母少于 10 时,页面只显示次数,不显示百分比。
61
61
  - **不调用模型**:统计和洞察全部按固定规则在站点后端汇总,你的对话内容不会发给任何模型分析。
62
+
63
+ ## 每个房间跑得怎样
64
+
65
+ 在“明细”中展开此项。跟随报告时间段,只列有活动的现存房间,含归档。点列头排序,点房间名进入房间,点箭头查看各模型的用量、交付耗时中位数与 90 分位、失败类型,以及按主持人任期估算的开销。切换构成条可比较折算 token 和累计运行时长。房间覆盖率低于 80% 时,依赖 token 的指标置灰;房间覆盖足够时,模型行再看自身覆盖率。一次交付率的分母只含产生过执行的已结束请求,分子要求有有效回答且未经重试。用户介入率按被用户打断或停止的运行计。浪费占比是失败和被取消运行消耗的折算 token 占比,含用户打断与停止,与“主持人调度得怎样”的浪费 token 一致。浪费偏离超过 2 表示该模型的浪费份额超过用量份额的两倍,运行不足 10 次时只显示数值。
@@ -37,6 +37,7 @@
37
37
  ### 2. 查看判断结果与给出反馈
38
38
 
39
39
  - **在房间里看到什么**:每次调度都会在对话流中留下一张决策卡,显示决策模型选了谁或为什么交回主持人。当模式为推荐时,卡片上还会出现“采纳”按钮,主持人空闲时点一下即可派发;主持人正忙时,先选怎样处理当前工作。“取消采纳”关闭这次选择,不能撤销已派出的请求。
40
+ - **集中查看全部判断**:房间顶部“私聊”后面的“调度”标签按时间倒序列出这个房间的每一次判断:针对哪条消息(点击跳回原消息)、选了什么、置信度,可按“全部”“已采用”“未采用”“判断得不好”筛选,展开、“模型输入”和评价与对话流里的决策卡相同。智能调度不写理由,它对几道固定的选择题给出各选项的概率,程序按门槛决定是否采用。分享页不包含这些记录。
40
41
  - **查看完整输入**:点决策卡上的“模型输入”,可展开核对决策模型当时看到的题干、上下文、候选项;判断结果的置信度显示在卡片标题旁。
41
42
  - **点赞或点踩反馈**:房主可以点决策卡上的 👍(“判断得好”)或 👎(“判断得不好”)保存评价(点踩时可补充应答成员与备注),用于改进调度的判断。点踩后的表单里还有“保存并发给开发者”:先照常保存,再把这次决策(题干、选项、选择结果和当时的上下文)连同备注、版本、系统和已配置的软件名称发到官方服务;点“查看将发送的内容”可先看原文。发送失败只提示,本机评价照常保留。
42
43
 
@@ -64,7 +64,7 @@ MOSS 忙时,新消息通常排队。软件支持实时插话时,私信窗口
64
64
 
65
65
  如果已配置的智能调度请求失败,@ MOSS 的消息和房主本人的消息仍按原有限额和权限交给 MOSS,由它决定是否回复。其他消息只记录。失败原因可在群设置的最近失败中查看。
66
66
 
67
- 开启后,在这个群窗口的“房间”页调整:每天最多叫它几次、每天最多委托几个房间(在“主持人权限”一行)、模型与强度、群说明和说话方式,也可添加只读目录并选择可用的技能。要让它不再回应这个群,关掉同一页的“让 MOSS 在这个群里回应”,记录和设置都会保留。没有选目录时不挂项目。群窗口固定使用普通“只读”,支持 Codex CLI、Claude Code CLI、Antigravity CLI 和模型 API,也可查公开网页。只读不等于限制读取范围。Codex CLI 仍可能读到本机其他文件,具体边界可看“房间”页成员卡片的说明。群友不能给 MOSS 扩权或让它读私聊。需要房主决定时,普通问题在原群问房主,敏感事项改发私信。从 MOSS 页打开群窗口可查看记录和发言人,也可直接给本群 MOSS 发“房主指令”(默认只在本窗口处理与答复、不发到群里;明确要求发群时由 MOSS 经两步发送发往群里)。没有回复的消息也可能被记录。
67
+ 开启后,在这个群窗口的“房间”页调整:每天最多叫它几次、每天最多委托几个房间(在“主持人权限”一行)、模型与强度、群说明和说话方式,也可添加只读目录并选择可用的技能。要让它不再回应这个群,关掉同一页的“让 MOSS 在这个群里回应”,记录和设置都会保留。没有选目录时不挂项目。房主在“项目权限”中可选当前软件支持的档位,默认使用“可写”(若软件不支持则用“只读”)。仅含认证房主请求的批次使用所选档位。含群友请求的批次最多可写本群工作区,不挂项目目录,房主选“只读”时也只读。选“自动”或“全放开”后,如果你让 MOSS 读取群友发来的文件,文件内容会进入该较高权限的进程。项目档位只管工具权限,群友身份不能授权代表房主发言、全放开委托或写群记忆。群窗口支持 Codex CLI、Claude Code CLI、Antigravity CLI 和模型 API,也可查公开网页。只读不等于限制读取范围。Codex CLI 仍可能读到本机其他文件,具体边界可看“房间”页成员卡片的说明。群友不能给 MOSS 扩权或让它读私聊。需要房主决定时,普通问题在原群问房主,敏感事项改发私信。从 MOSS 页打开群窗口可查看记录和发言人,也可直接给本群 MOSS 发“房主指令”(默认只在本窗口处理与答复、不发到群里;明确要求发群时由 MOSS 经两步发送发往群里)。没有回复的消息也可能被记录。
68
68
 
69
69
  MOSS 在群里等你答复时,你可以引用那条提问或 @ MOSS。有智能调度时,MOSS 也能接住被判为答复的普通消息。只有绑定的房主账号可以作答。如果不想答,在“设置” → “聊天窗口”展开这个群,点“清除”。清除只结束等待,不视为同意。
70
70
 
@@ -74,7 +74,7 @@ MOSS 在群里等你答复时,你可以引用那条提问或 @ MOSS。有智
74
74
 
75
75
  ### 让主理人或私信给群里带话
76
76
 
77
- 群里的 MOSS 可以按需查自己的消息和附件,即使当时没有回复,或之后用了“清空对话”。仅能查开启记录后保存下来的消息,不会导入 QQ 以前的历史。唤醒它的消息含附件时,每次自动提供最多 5 个本机只读副本,单个最多 50 MiB。其余已保存的附件可以按需读取。需要委托房间查来源群时请用“可写”档,“全放开”档读不到群记录和附件。
77
+ 群里的 MOSS 可以按需查自己的消息和附件,即使当时没有回复,或之后用了“清空对话”。仅能查开启记录后保存下来的消息,不会导入 QQ 以前的历史。唤醒消息本身有附件,或同一发言人的上一条群消息有附件时,每次自动提供最多 5 个本机只读副本,单个最多 50 MiB。其余已保存的附件可以按需读取。需要委托房间查来源群时请用“可写”档,“全放开”档读不到群记录和附件。
78
78
 
79
79
  在主理人或私信里说“去群里看看大家在聊什么”“在群里总结一下今天的讨论”,它会把话传给这个群的 MOSS。默认只办事、不在群里说话:群里的 MOSS 按自己的权限和群说明处理,结果只回报给发起的窗口。要它在群里开口,须明确说“在群里说……”,而且只有你本人发起的事才行;定时职责、主动汇报或子房间回报引起的工作不能让 MOSS 在群里发言。传给群的内容都可能被公开,不要写不宜让群友看到的信息。群没开启时传话会被拒绝。
80
80
 
@@ -105,7 +105,7 @@ MOSS 在群里等你答复时,你可以引用那条提问或 @ MOSS。有智
105
105
  - **清空对话**:在“房间”标签 MOSS 成员卡片底部,或右栏点开的“软件与模型”弹窗底部点“清空对话”,经过两步弹窗确认后执行。第一步会列出清空与保留范围,并提醒先更新记忆文档(`MEMORY.md`),可直接点“查看或编辑记忆”跳到本窗口记忆区补充;第二步点“确认清空”后,当前对话移入“旧对话”存档,窗口打开一段新对话,MOSS 也开始新的 AI 会话。设置、目录和记忆保留。旧记录可在“旧对话”查看,或确认后永久删除。
106
106
  - **记忆**:在“房间”标签“协作设置”的“记忆”一行点“设置”,查看或编辑当前窗口的 `MEMORY.md`,上限 20 KB。它与会话上下文分开,MOSS 按需读取。清空对话、换软件或“新开对话”都不会清掉记忆。在群里,MOSS 只把绑定的房主本人明确要求记住的内容写进群记忆,不会自动记下房主的其他发言。群友仍可正常提问,但不能把自己的话留成 MOSS 在后续任务中会读到的长期指令。
107
107
  - **目录**:在“房间”标签顶部的“项目目录”一节增删,和普通房间相同。主理人和私信按各自的项目权限读写,群中添加的目录一律只读。更换主理人的工作目录时,记忆一并搬迁。新目录已有 `MEMORY.md` 时不覆盖,原文件留在旧目录。
108
- - **软件、模型、强度和速度**:右键右栏的 MOSS 软件行或点“⋯”,可从菜单改“模型”“思考强度”“速度”和“项目权限”。各窗口可选的权限档位与“成员与设置”一致。在菜单或“房间”标签的 MOSS 成员卡片上点“软件与模型”,在弹窗里选软件、模型和强度,支持时可在“速度”选“默认”(跟随软件)、“标准”、Fast 或 Ultrafast。主理人、私信和每个群各自保存速度,“新开对话”会沿用该窗口的速度,除非同时改选。然后二选一:“切换”接着当前对话聊,同一软件保留原会话,从下一轮起用新设置;换软件则由新软件开一个会话,接着这个窗口最近的对话往下聊,原会话里没写进对话的过程带不过去。“新开对话”用所选的软件和模型开始新会话,清掉当前会话的上下文,什么都不改也可以直接新开;要连同本窗口的消息一起清空,点弹窗底部的“清空对话”。群只能选能由程序按“只读”启动的软件,不支持桌面 App。两种操作都只影响当前窗口,对话记录、职责、配置和记忆都保留;会话实际切换时,对话里会出现分隔线。模型也可以在成员卡片上点铅笔改,效果与“切换”相同。项目权限直接点档位(私信只能只读或自动,群固定只读)。
108
+ - **软件、模型、强度和速度**:右键右栏的 MOSS 软件行或点“⋯”,可从菜单改“模型”“思考强度”“速度”和“项目权限”。各窗口可选的权限档位与“成员与设置”一致。在菜单或“房间”标签的 MOSS 成员卡片上点“软件与模型”,在弹窗里选软件、模型和强度,支持时可在“速度”选“默认”(跟随软件)、“标准”、Fast 或 Ultrafast。主理人、私信和每个群各自保存速度,“新开对话”会沿用该窗口的速度,除非同时改选。然后二选一:“切换”接着当前对话聊,同一软件保留原会话,从下一轮起用新设置;换软件则由新软件开一个会话,接着这个窗口最近的对话往下聊,原会话里没写进对话的过程带不过去。“新开对话”用所选的软件和模型开始新会话,清掉当前会话的上下文,什么都不改也可以直接新开;要连同本窗口的消息一起清空,点弹窗底部的“清空对话”。群只能选能由程序按“只读”启动的软件,不支持桌面 App。两种操作都只影响当前窗口,对话记录、职责、配置和记忆都保留;会话实际切换时,对话里会出现分隔线。模型也可以在成员卡片上点铅笔改,效果与“切换”相同。项目权限直接点档位(私信只能只读或自动,群按上述来源规则执行)。
109
109
 
110
110
  ## 要注意什么
111
111
 
@@ -40,7 +40,7 @@
40
40
 
41
41
  - **在房间里让主持人建**:打开“主持人完整权限”后,直接对主持人说你要什么分工(或说“把这个房间的做法存成工作流”),也可以在输入框打 `/` 选平台技能里的“新建 / 修改工作流”。主持人会调用 `workflow-creator` 生成 `SKILL.md`、角色卡片与画布,校验通过后保存并启用。房间有主项目时默认保存到主项目,否则保存到全局。需要跨项目使用时,可以明确请主持人保存到全局。
42
42
  - **在外部 AI 对话里建**:在任意已装好共议技能的 Claude Code / Codex 窗口,请它按 `workflow-creator` 技能为你新建或修改工作流。它先用 `codiscuss launch workflow-check --dir <目录>` 校验,待你确认后用 `codiscuss launch workflow-save --dir <目录>` 保存。库里已有同 ID 的工作流时,须明确选择覆盖(`--overwrite`)或带上读取时的修订号(`--revision`),否则不会保存。校验与保存项目工作流时,都加上 `--scope project --project <项目目录>`。
43
- - **存在哪里**。全局工作流可跨项目使用,位于 `~/.codiscuss/workflows/<ID>/`。项目工作流位于 `<项目根目录>/.codiscuss/workflows/<ID>/`,可在使用该目录的房间里选用。“工作流”页面顶部有一排筛选:“全部”“全局”和每个有工作流的已保存项目。列表按分类分组显示(娱乐、办公、商业、二维设计、三维设计、剪辑、创作、其他,没有工作流的分类不显示)。卡片显示画布缩略图、名称、说明、专家所用软件的头像、子工作流、状态和归属(“全局”或项目名)。把鼠标移到头像上可看专家总数(含子工作流)。卡片菜单提供改名、停用、删除、导出及适用的移动或复制操作。“新建”左边的按钮在卡片视图与列表视图之间切换,列表视图每个工作流占一行、不显示缩略图,浏览器会记住你的选择。
43
+ - **存在哪里**。全局工作流可跨项目使用,位于 `~/.codiscuss/workflows/<ID>/`。项目工作流位于 `<项目根目录>/.codiscuss/workflows/<ID>/`,可在使用该目录的房间里选用。“工作流”页面顶部有一排筛选:“全部”“全局”和每个有工作流的已保存项目。列表按分类分组显示(默认顺序:开发、娱乐、办公、商业、二维设计、三维设计、剪辑、创作、其他,没有工作流的分类不显示)。右上角的“分组顺序”按钮可上下调整分类顺序,保存在这台电脑上,工作流页和房间里选择工作流时都按此顺序排列,房间里默认显示排在最前且有工作流的分类。卡片显示画布缩略图、名称、说明、专家所用软件的头像、子工作流、状态和归属(“全局”或项目名)。把鼠标移到头像上可看专家总数(含子工作流)。卡片菜单提供改名、停用、删除、导出及适用的移动或复制操作。“新建”左边的按钮在卡片视图与列表视图之间切换,列表视图每个工作流占一行、不显示缩略图,浏览器会记住你的选择。
44
44
  - **选择保存位置**。点“新建”或“导入”后选择保存到全局或项目。桌面布局的编辑器顶栏右侧有归属按钮,显示“全局”或“项目 · 项目名”:未保存的新工作流可以点开改保存位置,已保存的置灰显示;只读项目显示锁形图标。只读项目的工作流可以打开查看或复制到全局。
45
45
  - **移动、复制与导出**。打开项目工作流的“…”菜单,选择“移至全局”或“复制到全局”。移动要求源项目可写,成功后当前房间的绑定也随之更新。若全局已有同 ID,移动会被拒绝。复制会保留原件。全局工作流可用“复制到本项目”复制到唯一的可写项目。有多个可写项目时,点对应的“复制到项目「项目名」”。点“导出”下载工作流压缩包,导出提示会列出因格式或大小跳过的文件。
46
46
 
@@ -48,7 +48,7 @@
48
48
 
49
49
  在手机等已配对设备上打开画布时,模板、脚本等配套文件留在电脑上。编辑并保存画布会保留这些文件。
50
50
 
51
- 在正文上方可直接编辑“一句话描述”。描述会按面板宽度换行,完整显示。描述下方的“分类”下拉决定工作流在列表和各处选择工作流时归在哪一组,随“保存”写入;没写分类或写了不认识的分类显示为“其他”,原来的值在你重新选择分类之前保持不变。命令行里在主 `SKILL.md` 的 `metadata.category` 写分类标识(`entertainment`、`office`、`business`、`design-2d`、`design-3d`、`video`、`writing`、`other`)。
51
+ 在正文上方可直接编辑“一句话描述”。描述会按面板宽度换行,完整显示。描述下方的“分类”下拉决定工作流在列表和各处选择工作流时归在哪一组,随“保存”写入;没写分类或写了不认识的分类显示为“其他”,原来的值在你重新选择分类之前保持不变。命令行里在主 `SKILL.md` 的 `metadata.category` 写分类标识(`development`、`entertainment`、`office`、`business`、`design-2d`、`design-3d`、`video`、`writing`、`other`)。
52
52
 
53
53
  在“工作流”页面点一张卡片,中间打开流程画布,右侧显示它的 `SKILL.md`。点左上角“返回工作流”回到列表。点“编辑”可修改,点“保存”或 `Ctrl+S` 保存;桌面布局的“保存”在顶栏右侧,右侧的 `SKILL.md` 面板始终展开、可拖动左边缘调宽度,手机和竖放的平板在画布工具栏里。工作流在你打开之后被别处改过时,保存会被拒绝,页面提示“工作流已被修改,请重新载入”,点“重新载入”读取新版,未保存的修改会先询问是否放弃。导入的工作流和库里已有的同 ID 时,要点“覆盖保存”才会整份替换。
54
54
 
@@ -1,4 +1,27 @@
1
1
  {
2
+ "折算 token · 覆盖率": "Weighted tokens · coverage",
3
+ "未分类": "Unclassified",
4
+ "下列覆盖率低的模型没有上报部分运行的用量。": "Models with low coverage did not report usage for some runs.",
5
+ "每个房间跑得怎样": "Room performance",
6
+ "模型构成": "Model mix",
7
+ "折算 token": "Weighted tokens",
8
+ "运行时长": "Runtime",
9
+ "一次交付率": "First-pass delivery",
10
+ "用户介入率": "User intervention",
11
+ "浪费占比": "Waste share",
12
+ "未知厂商": "Unknown vendor",
13
+ "输入 {input} · 缓存读 {read} · 缓存写 {write} · 输出 {output}": "Input {input} · cache read {read} · cache write {write} · output {output}",
14
+ "仅含现存房间。折算权重:输入 ×{input}、缓存读 ×{cache_read}、缓存写 ×{cache_write}、输出 ×{output}。": "Existing rooms only. Weights: input ×{input}, cache read ×{cache_read}, cache write ×{cache_write}, output ×{output}.",
15
+ "本期没有房间运行记录": "No room activity in this period",
16
+ "展开房间明细": "Toggle room details",
17
+ "用量覆盖低于 80%,缺记录的运行多在 0.5.43 之前。": "Usage coverage is below 80%. Most missing records predate version 0.5.43.",
18
+ "用量覆盖率": "Usage coverage",
19
+ "token 份额": "Token share",
20
+ "时长份额": "Time share",
21
+ "交付耗时 P50 / P90": "Delivery P50 / P90",
22
+ "浪费偏离": "Waste skew",
23
+ "主持人开销": "Host overhead",
24
+ "运行次数": "Runs",
2
25
  "导出数据": "Export data",
3
26
  "统计正在加载,暂不能导出": "The report is still loading",
4
27
  "没有可导出的统计数据": "No report data to export",
@@ -125,6 +125,7 @@
125
125
  "群附件下载到执行的只读缓存,不支持 --dest": "Group attachments download to the execution's read-only cache, without --dest.",
126
126
  "只有群窗口可以按外部消息插话": "Only group windows can deliver external messages as live interjections.",
127
127
  "群插话须提供 execution_id、submission_id 和 1–{limit} 个不同的消息编号": "A group interjection requires execution_id, submission_id, and 1–{limit} distinct message IDs.",
128
+ "群友消息留待独立执行": "Messages from other group members will wait for a separate run.",
128
129
  "本次执行已达到群友插话上限 {limit},余下消息留待下一轮": "This run reached the limit of {limit} guest interjections. Remaining messages will wait for the next run.",
129
130
  "软件尚未收到插话": "The interjection was not handed to the software.",
130
131
  "群消息已有请求或已进入另一条插话": "A group message already has a request or is in another interjection.",