ai_co_discuss 0.5.23 → 0.5.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/backend/free_room.py +6 -18
- package/backend/room_trace.py +2 -3
- package/backend/server.py +48 -2
- package/docs/en/guide/remote.md +2 -0
- package/docs/en/guide/rooms.md +2 -2
- package/docs/en/guide/workflows.md +4 -2
- package/docs/guide/remote.md +2 -0
- package/docs/guide/rooms.md +2 -2
- package/docs/guide/workflows.md +4 -2
- package/frontend/locales/en/room.json +1 -1
- package/package.json +1 -1
- package/runner/discussion_launch.mjs +5 -2
- package/web/i18n.js +1 -1
- package/web/modern.css +1 -1
- package/web/modern.js +60 -60
- package/workflows/decision-council/flow.json +16 -16
- package/workflows/task-dispatch/SKILL.md +119 -0
- package/workflows/task-dispatch/agents/executor.md +25 -0
- package/workflows/task-dispatch/agents/verifier.md +27 -0
- package/workflows/task-dispatch/flow.json +309 -0
- package/workflows/task-dispatch/scripts/init_task_node.py +71 -0
- package/workflows/task-dispatch/templates/PLAN.md +3 -0
- package/workflows/task-dispatch/templates/README.md +75 -0
- package/workflows/task-dispatch/templates/TODO.md +16 -0
- package/workflows/task-dispatch/workflows/central-verify/SKILL.md +22 -0
- package/workflows/task-dispatch/workflows/central-verify/agents/verify_runner.md +15 -0
- package/workflows/task-dispatch/workflows/central-verify/flow.json +47 -0
- package/workflows/tri-model-dev/flow.json +5 -5
- package/workflows/trpg-classic/flow.json +13 -13
package/backend/free_room.py
CHANGED
|
@@ -52,8 +52,8 @@ TIMELINE_EXECUTIONS = 100
|
|
|
52
52
|
# The event log page reads at most this many room events per call, newest first when paging back.
|
|
53
53
|
ROOM_EVENT_PAGE = 500
|
|
54
54
|
# Where the cards of a request (aliased `r`) sit: the room's latest message when it was made (`request_layout`). The
|
|
55
|
-
# notice telling the host its own execution failed (`host_failed:<execution>`)
|
|
56
|
-
#
|
|
55
|
+
# notice telling the host its own execution failed (`host_failed:<execution>`) stays under the same anchor message as
|
|
56
|
+
# the failed execution, while ordering chronologically below it by its own start time.
|
|
57
57
|
HOST_FAILED_SQL = """(SELECT CAST(substr(w.key,13) AS INTEGER) FROM free_host_wakes w WHERE r.purpose='notice'
|
|
58
58
|
AND w.room_id=r.room_id AND w.message_id=r.message_id AND w.key LIKE 'host_failed:%' LIMIT 1)"""
|
|
59
59
|
LAYOUT_AFTER_SQL = f"""COALESCE((SELECT MAX(l.after_message_id) FROM member_requests f JOIN request_layout l ON l.request_id=f.id
|
|
@@ -61,20 +61,9 @@ LAYOUT_AFTER_SQL = f"""COALESCE((SELECT MAX(l.after_message_id) FROM member_requ
|
|
|
61
61
|
(SELECT after_message_id FROM request_layout WHERE request_id=r.id),r.message_id)"""
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
Only the first execution on a `host_failed:<id>` wake-up takes over the failed host execution's start time; a retry
|
|
68
|
-
of that wake-up starts at its own `created_at` so the new card follows the failed card chronologically.
|
|
69
|
-
"""
|
|
70
|
-
return f"""COALESCE(
|
|
71
|
-
CASE WHEN NOT EXISTS(SELECT 1 FROM retried_requests rr WHERE rr.request_id=r.id AND rr.execution_id<{execution_id_sql})
|
|
72
|
-
THEN (SELECT created_at FROM member_executions WHERE id={HOST_FAILED_SQL}) END,
|
|
73
|
-
(SELECT created_at FROM member_executions WHERE id={execution_id_sql}))"""
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
# When the work behind a request (aliased `r`) started, ordering cards under the same message: its execution's start.
|
|
77
|
-
LAYOUT_AT_SQL = layout_at_sql("r.execution_id")
|
|
64
|
+
# When the work behind a request (aliased `r`) started, ordering cards under the same message: its execution's own start
|
|
65
|
+
# time (including `host_failed:<id>` wake-ups, so the failed card stays visible and the wake-up follows below it).
|
|
66
|
+
LAYOUT_AT_SQL = "(SELECT created_at FROM member_executions WHERE id=r.execution_id)"
|
|
78
67
|
# Rounds used and the owner's additions in the room's recent chains, for "第 2/3 轮"; parameter: the room.
|
|
79
68
|
# A round is a host dispatch (a batch) or a continue the host asked for (`free_host_wakes` with a `continue:` key); a
|
|
80
69
|
# relay's later steps in the same pass (`free_relay_steps`) ride on its first, so a whole pass is one round.
|
|
@@ -1045,8 +1034,7 @@ def recent_executions(connection, room_id, span=None):
|
|
|
1045
1034
|
AND w.message_id IN (SELECT message_id FROM member_requests WHERE execution_id=e.id
|
|
1046
1035
|
UNION SELECT r.message_id FROM retried_requests rr JOIN member_requests r ON r.id=rr.request_id WHERE rr.execution_id=e.id)
|
|
1047
1036
|
LIMIT 1) AS replaces_execution_id,
|
|
1048
|
-
|
|
1049
|
-
OR r.id IN (SELECT request_id FROM retried_requests WHERE execution_id=e.id)) AS layout_at,
|
|
1037
|
+
e.created_at AS layout_at,
|
|
1050
1038
|
(SELECT COUNT(*) FROM execution_notes WHERE execution_id=e.id) AS note_count,
|
|
1051
1039
|
(SELECT COUNT(*) FROM execution_segments WHERE source='free' AND execution_id=e.id
|
|
1052
1040
|
AND phase IN ('command','tool','editing')) AS step_count,
|
package/backend/room_trace.py
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import json
|
|
4
4
|
from collections import defaultdict
|
|
5
5
|
|
|
6
|
-
from .free_room import LAYOUT_AFTER_SQL,
|
|
6
|
+
from .free_room import LAYOUT_AFTER_SQL, member_events, require_member, require_owner_or_host
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
TRACE_PAGE = 50
|
|
@@ -138,8 +138,7 @@ def trace_executions(connection, room_id, reader, execution_ids, messages):
|
|
|
138
138
|
row = connection.execute(f"""SELECT e.id AS execution_id,e.member_id,e.status,e.created_at,
|
|
139
139
|
(SELECT MAX({LAYOUT_AFTER_SQL}) FROM member_requests r WHERE r.execution_id=e.id
|
|
140
140
|
OR r.id IN (SELECT request_id FROM retried_requests WHERE execution_id=e.id)) AS layout_after,
|
|
141
|
-
|
|
142
|
-
OR r.id IN (SELECT request_id FROM retried_requests WHERE execution_id=e.id)) AS layout_at,
|
|
141
|
+
e.created_at AS layout_at,
|
|
143
142
|
t.attempt,t.retry_at,t.stopped,f.failure_class
|
|
144
143
|
FROM member_executions e LEFT JOIN execution_retries t ON t.execution_id=e.id
|
|
145
144
|
LEFT JOIN execution_failures f ON f.execution_id=e.id
|
package/backend/server.py
CHANGED
|
@@ -14,6 +14,7 @@ import re
|
|
|
14
14
|
import secrets
|
|
15
15
|
import socket
|
|
16
16
|
import sqlite3
|
|
17
|
+
import stat
|
|
17
18
|
import struct
|
|
18
19
|
import subprocess
|
|
19
20
|
import threading
|
|
@@ -77,6 +78,8 @@ MAX_IMPORT_BYTES = 32 * 1024 * 1024
|
|
|
77
78
|
MAX_ATTACHMENT_BYTES = 20 * 1024 * 1024
|
|
78
79
|
# Files uploaded while the message is still being written are dropped if never sent within this time.
|
|
79
80
|
UNSENT_ATTACHMENT_TTL = timedelta(hours=24)
|
|
81
|
+
ATTACHMENT_SWEEP_SECONDS = 6 * 60 * 60
|
|
82
|
+
ORPHAN_ATTACHMENT_GRACE_SECONDS = 60 * 60
|
|
80
83
|
MAX_MESSAGE_ATTACHMENTS = 10
|
|
81
84
|
MAX_FILENAME_LENGTH = 255
|
|
82
85
|
# A revision check names at most this many rooms; a runner or page asks only for the rooms it follows.
|
|
@@ -1809,6 +1812,7 @@ def finish_destruction_files(database, room_id):
|
|
|
1809
1812
|
{**files, "ids": left, "state": "failed" if left else "deleted"},
|
|
1810
1813
|
{"kind": "database", "state": "failed" if busy else "deleted"}]
|
|
1811
1814
|
update_destruction(connection, room_id, updates)
|
|
1815
|
+
sweep_attachments(database)
|
|
1812
1816
|
|
|
1813
1817
|
|
|
1814
1818
|
def destroy_from(connection, room, directory):
|
|
@@ -1866,7 +1870,11 @@ def destroy_expired_rooms(server):
|
|
|
1866
1870
|
|
|
1867
1871
|
def watch_expired_rooms(server):
|
|
1868
1872
|
"""Check for rooms to destroy automatically every few minutes, for as long as the website runs."""
|
|
1873
|
+
next_sweep = 0
|
|
1869
1874
|
while True:
|
|
1875
|
+
if time.monotonic() >= next_sweep:
|
|
1876
|
+
sweep_attachments(server.database)
|
|
1877
|
+
next_sweep = time.monotonic() + ATTACHMENT_SWEEP_SECONDS
|
|
1870
1878
|
try:
|
|
1871
1879
|
destroy_expired_rooms(server)
|
|
1872
1880
|
except Exception:
|
|
@@ -2436,9 +2444,47 @@ def remove_attachment_files(connection, database, rows):
|
|
|
2436
2444
|
|
|
2437
2445
|
def prune_unsent_attachments(connection, database, room_id):
|
|
2438
2446
|
"""Drop files uploaded ahead of sending but never sent, once they are older than a draft could still be waiting."""
|
|
2447
|
+
remove_attachment_files(connection, database, expired_unsent_attachments(connection, room_id))
|
|
2448
|
+
|
|
2449
|
+
|
|
2450
|
+
def expired_unsent_attachments(connection, room_id):
|
|
2451
|
+
"""Select expired uploads with no sent or queued message in the room."""
|
|
2439
2452
|
cutoff = datetime.now(timezone.utc) - UNSENT_ATTACHMENT_TTL
|
|
2440
|
-
|
|
2441
|
-
|
|
2453
|
+
return [row for row in unsent_attachment_rows(connection, room_id) if datetime.fromisoformat(row["created_at"]) < cutoff]
|
|
2454
|
+
|
|
2455
|
+
|
|
2456
|
+
def sweep_attachments(database):
|
|
2457
|
+
"""Expire unsent records, then remove their files and aged unregistered files in this database's attachment directory."""
|
|
2458
|
+
expired = set()
|
|
2459
|
+
try:
|
|
2460
|
+
with closing(connect_db(database)) as connection:
|
|
2461
|
+
with connection:
|
|
2462
|
+
begin_write(connection)
|
|
2463
|
+
rooms = connection.execute("SELECT DISTINCT room_id FROM attachments WHERE message_id IS NULL").fetchall()
|
|
2464
|
+
for room in rooms:
|
|
2465
|
+
expired.update(row["id"] for row in expired_unsent_attachments(connection, room[0]))
|
|
2466
|
+
connection.executemany("DELETE FROM attachments WHERE id=? AND message_id IS NULL", ((key,) for key in expired))
|
|
2467
|
+
root = attachment_path(database, {"id": ""})
|
|
2468
|
+
if not root.exists() or root.resolve() != root:
|
|
2469
|
+
return
|
|
2470
|
+
# Uploads acquire this same write lock before creating their file. Hold it from the ID snapshot through unlink.
|
|
2471
|
+
with connection:
|
|
2472
|
+
begin_write(connection)
|
|
2473
|
+
registered = {os.path.normcase(row[0]) for row in connection.execute("SELECT id FROM attachments")}
|
|
2474
|
+
cutoff = time.time() - ORPHAN_ATTACHMENT_GRACE_SECONDS
|
|
2475
|
+
for path in root.iterdir():
|
|
2476
|
+
if os.path.normcase(path.name) in registered:
|
|
2477
|
+
continue
|
|
2478
|
+
try:
|
|
2479
|
+
info = path.lstat()
|
|
2480
|
+
if stat.S_ISREG(info.st_mode) and (path.name in expired or info.st_mtime < cutoff):
|
|
2481
|
+
path.unlink()
|
|
2482
|
+
except FileNotFoundError:
|
|
2483
|
+
pass
|
|
2484
|
+
except OSError:
|
|
2485
|
+
logging.warning("Could not remove attachment %s", path.name, exc_info=True)
|
|
2486
|
+
except (OSError, sqlite3.Error, ValueError):
|
|
2487
|
+
logging.exception("Attachment sweep failed for %s", database)
|
|
2442
2488
|
|
|
2443
2489
|
|
|
2444
2490
|
def discard_attachment(connection, database, room_id, identifier, token):
|
package/docs/en/guide/remote.md
CHANGED
|
@@ -51,6 +51,8 @@ While your computer is on and its local service is running, paired phones and ta
|
|
|
51
51
|
|
|
52
52
|
## Things to keep in mind
|
|
53
53
|
|
|
54
|
+
Phones support portrait layout only. Tablets support both portrait and landscape.
|
|
55
|
+
|
|
54
56
|
- **Rooms are unavailable when the computer is offline:** If the computer is off, asleep, or its local service is stopped, the room list shows **Rooms (computer offline)** or **Rooms (computer not connected)**. It reconnects when the computer comes back online.
|
|
55
57
|
- **Timed-out requests are not resent automatically:** If the computer does not respond in time, the page says “Result unconfirmed.”. Check the room to see whether the action took effect before trying again.
|
|
56
58
|
- **Some changes require the computer:** Changing software executable paths, browsing outside Saved projects, and adding a new device must be done at the computer.
|
package/docs/en/guide/rooms.md
CHANGED
|
@@ -30,7 +30,7 @@ Rooms created by a host inherit its folder. Select the arrow to the left of the
|
|
|
30
30
|
|
|
31
31
|
- **Sort rooms.** Open the directory options in the top-right corner. Choose “Manual order” (drag items or use the arrow keys) or “Recent activity”.
|
|
32
32
|
- **Folders.** Select “New folder” to group rooms by project. A folder can have a default project directory, which is used for new rooms created inside it. Its menu offers “Edit”, “Move up”, “Move down”, “Archive folder”, and “Remove folder”. You can remove just the folder or delete its rooms as well.
|
|
33
|
-
- **Room actions.** Open a room’s menu to “Rename”, “Edit topic”, “Move to folder”, “Copy reading link”, “Refresh messages”, “Archive room”, or “Destroy room”. “Edit topic” and “Refresh messages” apply to the currently open room. On desktop, double-click a room name in the sidebar to open “Rename”. Use the panel icon at the right of the header to open or close the room panel.
|
|
33
|
+
- **Room actions.** Open a room’s menu to “Rename”, “Edit topic”, “Move to folder”, “Copy reading link”, “Refresh messages”, “Archive room”, or “Destroy room”. “Edit topic” and “Refresh messages” apply to the currently open room. On a phone, selecting “Archive room” closes the menu and keeps the sidebar open. Continue organizing rooms or tap “Undo” in the notification. On desktop, double-click a room name in the sidebar to open “Rename”. Use the panel icon at the right of the header to open or close the room panel.
|
|
34
34
|
- Video attachments use the current theme’s background while loading. The preview appears as soon as the first frame is ready.
|
|
35
35
|
- When you return to a recent room, the speaking order shows the last known model and reasoning effort immediately. These update when the roster or executions change.
|
|
36
36
|
- In an existing room’s collaboration settings, the smart scheduling row keeps its height when toggled. After enabling it, select “Settings” to configure the decision model.
|
|
@@ -50,7 +50,7 @@ Rooms created by a host inherit its folder. Select the arrow to the left of the
|
|
|
50
50
|
|
|
51
51
|
### 4. Send and view attachments
|
|
52
52
|
|
|
53
|
-
- **Attach files.** Paste or drag files into the composer, or use the paperclip button at the bottom-left. Each message can contain up to 10 files, 20 MiB each. Thumbnails appear above the composer. A placeholder such as `[Image #1]` or `[File #2]` is inserted at the cursor. Removing the thumbnail or deleting its placeholder with Backspace removes both. After sending, images first referenced in a paragraph or list item appear right below it in a two-column half-width grid (full width for a single image on phones, two columns for multiple, with `#n` badges when a message carries more than one image) and are not listed again below; other attachments stay listed under the message.
|
|
53
|
+
- **Attach files.** Paste or drag files into the composer, or use the paperclip button at the bottom-left. Each message can contain up to 10 files, 20 MiB each. Thumbnails appear above the composer. A placeholder such as `[Image #1]` or `[File #2]` is inserted at the cursor. Removing the thumbnail or deleting its placeholder with Backspace removes both. After sending, images first referenced in a paragraph or list item appear right below it in a two-column half-width grid (full width for a single image on phones, two columns for multiple, with `#n` badges when a message carries more than one image) and are not listed again below; other attachments stay listed under the message. The site automatically clears uploads left unsent for more than 24 hours. Attachments in sent or queued messages are kept.
|
|
54
54
|
- **View attachments.** After sending a message, select its placeholder or attachment card. Images can be enlarged full-screen, zoomed, rotated, and saved. Audio and video play in the message. Documents and code open in the file preview.
|
|
55
55
|
- **Interactive visualizations.** A member can place a small web page you can operate (drag a slider, press a button, watch the result change) inside the answer text. It appears at that point in the answer, follows the room theme and light or dark mode, and also appears in place on a phone. It starts running when you scroll near it. The row below lets you “Collapse” it (your choice is remembered), view the “Source”, “Open larger preview” in the file preview, open it in a “New tab”, or “Download” it as an `.html` file. Read-only share pages, read-aloud, and collapsed message previews show a single “Interactive visualization” line instead, so rely on the member's written conclusion. `.html` attachments do not run inside messages; select the file card to open them in the preview or a new tab. Some visualizations are question panels: after you rank, allocate, or adjust and press the panel's submit button, the result is added above the message box as a quote rather than sent. You can edit or remove it, and it counts as your reply only when you send it. Submitting the same panel again replaces its earlier result.
|
|
56
56
|
- **Member access to attachments.** For supported automatic runs, the local service downloads the file and passes its information to the receiving member. Claude Code and Codex CLI can view images directly. For API members, enable “Images” on the member card to view images. UTF-8 text attachments can be read on request. Members will say when they cannot read a format such as PDF.
|
|
@@ -34,12 +34,14 @@ You can create or import a ZIP file or folder with the “+” on the Workflows
|
|
|
34
34
|
|
|
35
35
|
- **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.
|
|
36
36
|
- **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.
|
|
37
|
-
- **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. In the sidebar, “Workflows” lists workflows under “Current project” before “Global”.
|
|
38
|
-
- **Choose where to save.** Open “+” and select the new or import action for the destination, such as “New global workflow” or “New in project ‘name’”.
|
|
37
|
+
- **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. In the sidebar, “Workflows” lists workflows under “Current project” before “Global”. On desktop, open a workflow to see its project name at the top of the editor. A room without a project shows global workflows only.
|
|
38
|
+
- **Choose where to save.** Open “+” and select the new or import action for the destination, such as “New global workflow” or “New in project ‘name’”. On desktop, the editor header shows “Global” or “Project · name”, with a “Read-only” badge where applicable. You can open workflows from read-only projects and copy them to the global library.
|
|
39
39
|
- **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.
|
|
40
40
|
|
|
41
41
|
### 4. The canvas and SKILL.md
|
|
42
42
|
|
|
43
|
+
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.
|
|
44
|
+
|
|
43
45
|
Edit the “Short description” directly above the workflow text. It wraps to the panel width so you can read the full description.
|
|
44
46
|
|
|
45
47
|
Select a workflow on the Workflows page. The canvas opens in the center, and its SKILL.md appears on the right. Click “Edit,” then “Save” or press Ctrl+S to save changes. 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.”
|
package/docs/guide/remote.md
CHANGED
|
@@ -52,6 +52,8 @@ npm 安装默认提供本机站点,没有随包可直接使用的公共线上
|
|
|
52
52
|
|
|
53
53
|
## 要注意什么
|
|
54
54
|
|
|
55
|
+
手机端仅支持竖屏布局。平板可横屏或竖屏使用。
|
|
56
|
+
|
|
55
57
|
- **电脑离线时看不到房间**:电脑关机、休眠或本机服务未运行时,手机目录标题会显示“协作房间(电脑离线)”或“协作房间(电脑未连接)”;电脑恢复在线后页面自动重连。
|
|
56
58
|
- **超时不自动重发**:电脑没及时答复时,页面会提示“结果待确认”,不会自动重发;先看房间确认是否已生效。
|
|
57
59
|
- **只能在电脑上改的项**:软件可执行路径、常用项目范围之外的目录、以及添加新设备,都只能在电脑前操作。
|
package/docs/guide/rooms.md
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
- **排序**:点目录右上角选项,在“手动排序”(拖动或用上下方向键调序)和“最近发言”之间切换。
|
|
30
30
|
- **文件夹**:点“新建文件夹”按项目归集房间,可为文件夹设置默认项目目录,之后在该文件夹里建房会自动带入。点文件夹菜单可“编辑”、“上移”、“下移”、“存档文件夹”或“移除文件夹”(可选择仅移除文件夹,或连同其中房间一并删除)。
|
|
31
31
|
- **子房间**:主持人建的房间继承当前文件夹。点父房间标题左侧的箭头展开或收起,点标题进入父房间。打开子房间、子房间开始执行或新建子房间时自动展开;手动收起后,本次页面会话保留选择。子房间移到其他文件夹,或父房间存档、销毁后,子房间在所在文件夹独立显示。
|
|
32
|
-
-
|
|
32
|
+
- **房间操作**:点房间右侧菜单,可以“重命名”、“编辑议题”、“移至文件夹”、“复制阅读入口”、“刷新消息”、“存档房间”或“销毁房间”。“编辑议题”和“刷新消息”用于当前打开的房间。在手机上点“存档房间”后,菜单收起,左栏保持打开,可继续整理房间,也可点提示里的“撤销”。在电脑左栏双击房间名称,也能直接打开“重命名”。点顶栏最右侧的面板图标可展开或收起房间面板。
|
|
33
33
|
- 消息里的视频正在读取首帧时,预览区使用当前主题的底色,画面就绪后自动显示。
|
|
34
34
|
- 切回最近打开的房间时,右栏“发言顺序”先显示上次读到的模型和思考强度。成员或执行变化后会自动更新。
|
|
35
35
|
- 在已有房间的“协作设置”中,切换“智能调度”时该行保持固定高度。开启后,点“设置”展开决策模型配置。
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
### 4. 发送与查看附件
|
|
51
51
|
|
|
52
|
-
- **添加附件**:在输入框粘贴、拖入文件,或点左下角回形针按钮选择文件(每条消息最多 10 个,单个最多 20 MiB)。添加后输入框上方出现缩略图,正文光标处插入 `[图片 #1]`、`[文件 #2]` 等房间内连续编号的占位标签;删掉缩略图或按退格删掉占位,两边同步移除。发出后,正文里首次写到 `[图片 #n]` 的图片会紧跟在所在段落或列表项下方以半宽两列排布显示(手机上单张占满整宽、多张两列并排,多图消息附带 `#n` 角标),附件列表不再重复列出;其他附件仍列在消息下方。
|
|
52
|
+
- **添加附件**:在输入框粘贴、拖入文件,或点左下角回形针按钮选择文件(每条消息最多 10 个,单个最多 20 MiB)。添加后输入框上方出现缩略图,正文光标处插入 `[图片 #1]`、`[文件 #2]` 等房间内连续编号的占位标签;删掉缩略图或按退格删掉占位,两边同步移除。发出后,正文里首次写到 `[图片 #n]` 的图片会紧跟在所在段落或列表项下方以半宽两列排布显示(手机上单张占满整宽、多张两列并排,多图消息附带 `#n` 角标),附件列表不再重复列出;其他附件仍列在消息下方。 已上传但一直未发送的附件超过 24 小时后会自动清理;已发送或仍在排队消息里的附件会保留。
|
|
53
53
|
- **查看附件**:消息发出后点正文占位或附件卡片即可打开;图片支持全屏缩放、旋转与保存,音视频直接在消息里播放,文档与代码在文件预览窗口打开。
|
|
54
54
|
- **交互式可视化**:成员可以在回答正文里放一段可以操作的网页(拖动滑块、点按钮看结果变化),它显示在正文中的原位置,跟随房间主题和深浅色,手机上同样直接显示。滚到它附近才开始运行。下方一行可“收起”(会记住选择)、看“源码”、“放大”到文件预览窗口、在“新标签页”打开或“下载”为 `.html` 文件。只读分享页、朗读和消息折叠时的预览只显示“交互式可视化”一行,结论以成员写在正文里的文字为准。`.html` 附件不在消息内显示,点文件卡片在预览窗口或新标签页打开。有的可视化是提问面板:你在里面排序、分配或调整后点它的提交按钮,结果会作为引用放到输入框上方,不会直接发出;你可以删改,点发送才算回答。同一面板再次提交会替换上一次的结果。
|
|
55
55
|
- **成员读取附件**:本机服务为支持附件的自动执行下载文件,并把文件信息交给接收任务的成员。Claude Code 和 Codex CLI 可直接看图;API 成员需在卡片设置中打开“看图”才能看图,UTF-8 文本附件可按需读取,PDF 等其他文件读不到时会如实说明。
|
package/docs/guide/workflows.md
CHANGED
|
@@ -34,12 +34,14 @@
|
|
|
34
34
|
|
|
35
35
|
- **在房间里让主持人建**:打开“主持人完整权限”后,直接对主持人说你要什么分工(或说“把这个房间的做法存成工作流”),也可以在输入框打 `/` 选平台技能里的“新建 / 修改工作流”。主持人会调用 `workflow-creator` 生成 `SKILL.md`、角色卡片与画布,校验通过后保存并启用。房间有主项目时默认保存到主项目,否则保存到全局。需要跨项目使用时,可以明确请主持人保存到全局。
|
|
36
36
|
- **在外部 AI 对话里建**:在任意已装好共议技能的 Claude Code / Codex 窗口,请它按 `workflow-creator` 技能为你新建或修改工作流。它先用 `codiscuss launch workflow-check --dir <目录>` 校验,待你确认后用 `codiscuss launch workflow-save --dir <目录>` 保存。库里已有同 ID 的工作流时,须明确选择覆盖(`--overwrite`)或带上读取时的修订号(`--revision`),否则不会保存。校验与保存项目工作流时,都加上 `--scope project --project <项目目录>`。
|
|
37
|
-
- **存在哪里**。全局工作流可跨项目使用,位于 `~/.codiscuss/workflows/<ID>/`。项目工作流位于 `<项目根目录>/.codiscuss/workflows/<ID
|
|
38
|
-
-
|
|
37
|
+
- **存在哪里**。全局工作流可跨项目使用,位于 `~/.codiscuss/workflows/<ID>/`。项目工作流位于 `<项目根目录>/.codiscuss/workflows/<ID>/`,可在使用该目录的房间里选用。左栏“工作流”先显示“当前项目”下的工作流,再显示“全局”。桌面布局可在编辑器顶部查看所属项目。没有项目的房间只显示全局工作流。
|
|
38
|
+
- **选择保存位置**。点“+”后按目标位置选择新建或导入项,例如“新建全局工作流”或“新建到项目「项目名」”。桌面布局的编辑器顶部显示“全局”或“项目 · 项目名”,只读项目另标“只读”。只读项目的工作流可以打开查看或复制到全局。
|
|
39
39
|
- **移动、复制与导出**。打开项目工作流的“…”菜单,选择“移至全局”或“复制到全局”。移动要求源项目可写,成功后当前房间的绑定也随之更新。若全局已有同 ID,移动会被拒绝。复制会保留原件。全局工作流可用“复制到本项目”复制到唯一的可写项目。有多个可写项目时,点对应的“复制到项目「项目名」”。点“导出”下载工作流压缩包,导出提示会列出因格式或大小跳过的文件。
|
|
40
40
|
|
|
41
41
|
### 4. 画布与 `SKILL.md` 的分工
|
|
42
42
|
|
|
43
|
+
在手机等已配对设备上打开画布时,模板、脚本等配套文件留在电脑上。编辑并保存画布会保留这些文件。
|
|
44
|
+
|
|
43
45
|
在正文上方可直接编辑“一句话描述”。描述会按面板宽度换行,完整显示。
|
|
44
46
|
|
|
45
47
|
在左栏“工作流”列表点一项,中间打开流程画布,右侧显示它的 `SKILL.md`(点“编辑”可修改,点“保存”或 `Ctrl+S` 保存。工作流在你打开之后被别处改过时,保存会被拒绝,页面提示“工作流已被修改,请重新载入”,点“重新载入”读取新版,未保存的修改会先询问是否放弃;导入的工作流和库里已有的同 ID 时,要点“覆盖保存”才会整份替换):
|
|
@@ -849,6 +849,7 @@
|
|
|
849
849
|
"额度已用尽,预计 {value1} 恢复;给它发新消息会立即再试": "Out of quota, expected back at {value1}; a new message to it is tried at once",
|
|
850
850
|
"保存(Enter)": "Save (Enter)",
|
|
851
851
|
"已重试,新的执行接在下方": "Retried; the new run follows below",
|
|
852
|
+
"已自动唤醒处理,新的执行接在下方": "Host woken automatically; the new run follows below",
|
|
852
853
|
"已修改 {count} 个文件": "Edited {count} files",
|
|
853
854
|
"其他改动 {count} 个文件": "{count} other changed files",
|
|
854
855
|
"这次执行运行过命令,这些文件在执行期间有变化,但无法确认是它改的,也可能来自其他窗口或成员。": "This run used commands and these files changed meanwhile, but it can't be confirmed that it changed them. They may come from another window or member.",
|
|
@@ -914,7 +915,6 @@
|
|
|
914
915
|
"确认后将记录在这台电脑的信任清单中;若工作流内容发生变更,会再次要求确认。": "Once confirmed, this computer remembers your trust choice. You will be asked again if the workflow changes.",
|
|
915
916
|
"信任并继续": "Trust and continue",
|
|
916
917
|
"信任并启用": "Trust and enable",
|
|
917
|
-
"当前项目 · {name}": "Current project · {name}",
|
|
918
918
|
"当前项目": "Current project",
|
|
919
919
|
"只读目录": "Read-only folder",
|
|
920
920
|
"暂无项目工作流": "No project workflows yet",
|
package/package.json
CHANGED
|
@@ -2163,8 +2163,11 @@ export function workflows_command(home, input = {}, restricted = false) {
|
|
|
2163
2163
|
if (root?.readonly && !['get', 'export', 'preview', 'skills', 'export-expert', 'trust', 'copy'].includes(action)) throw new Error('项目目录只读');
|
|
2164
2164
|
const fields = scope_fields(root);
|
|
2165
2165
|
const present = workflow => {
|
|
2166
|
-
|
|
2167
|
-
|
|
2166
|
+
const result = { ...workflow, ...fields };
|
|
2167
|
+
// Saved canvas edits keep resources on disk. Their contents travel only on import or export.
|
|
2168
|
+
if (restricted) delete result.resources;
|
|
2169
|
+
if (root && restricted) delete result.directory;
|
|
2170
|
+
return result;
|
|
2168
2171
|
};
|
|
2169
2172
|
if (['move', 'copy'].includes(action)) {
|
|
2170
2173
|
if (!['project', 'global'].includes(input.target_scope)) throw new Error('请选择目标作用域');
|