ai_co_discuss 0.5.34 → 0.5.36
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/analytics.py +57 -5
- package/backend/server.py +46 -1
- package/backend/windows_thumbnail.py +88 -0
- package/docs/en/guide/admin.md +2 -2
- package/docs/en/guide/analytics.md +4 -3
- package/docs/en/guide/remote.md +1 -0
- package/docs/en/guide/rooms.md +3 -3
- package/docs/en/guide/workflows.md +1 -1
- package/docs/en/guide/working.md +1 -1
- package/docs/guide/admin.md +2 -2
- package/docs/guide/analytics.md +4 -3
- package/docs/guide/remote.md +1 -0
- package/docs/guide/rooms.md +3 -3
- package/docs/guide/workflows.md +1 -1
- package/docs/guide/working.md +1 -1
- package/frontend/locales/en/admin.json +16 -0
- package/frontend/locales/en/analytics.json +18 -1
- package/frontend/locales/en/room.json +2 -1
- package/package.json +2 -1
- package/runner/adapters/claude.mjs +12 -2
- package/runner/adapters/index.mjs +1 -0
- package/runner/admin_cli.mjs +3 -1
- package/runner/admin_maintenance.mjs +95 -0
- package/runner/admin_panel.mjs +4 -3
- package/runner/discussion_service.mjs +107 -21
- package/runner/free_runner.mjs +10 -1
- package/runner/i18n_en.mjs +2 -1
- package/runner/storage_guard.mjs +16 -2
- package/runner/tts.mjs +3 -3
- package/web/admin.css +1 -1
- package/web/admin.js +8 -8
- package/web/app.js +384 -50
- package/web/i18n.js +3 -3
- package/web/modern.css +1 -1
- package/web/modern.js +64 -64
package/backend/analytics.py
CHANGED
|
@@ -275,6 +275,53 @@ def member_stats(rows, requests, revived, by_model=False):
|
|
|
275
275
|
return list(groups.values())
|
|
276
276
|
|
|
277
277
|
|
|
278
|
+
def workflow_stats(connection, rows):
|
|
279
|
+
"""Executions run under a room workflow, grouped by workflow ID (current rooms only).
|
|
280
|
+
|
|
281
|
+
The runner reports each delivery's workflow binding into the execution's diagnostics; an execution that reported
|
|
282
|
+
several keeps its last one. Card and sub-workflow counts say which parts of the workflow actually ran.
|
|
283
|
+
"""
|
|
284
|
+
ids = [r["id"] for r in rows]
|
|
285
|
+
bound = {}
|
|
286
|
+
for offset in range(0, len(ids), 500):
|
|
287
|
+
chunk = ids[offset:offset + 500]
|
|
288
|
+
marks = ",".join("?" * len(chunk))
|
|
289
|
+
for execution_id, details in connection.execute(
|
|
290
|
+
f"SELECT execution_id,details FROM execution_diagnostics WHERE execution_id IN ({marks})", chunk):
|
|
291
|
+
try:
|
|
292
|
+
bindings = [item for item in json.loads(details).get("workflow_bindings") or [] if item]
|
|
293
|
+
except (TypeError, ValueError, AttributeError):
|
|
294
|
+
continue
|
|
295
|
+
if bindings:
|
|
296
|
+
bound[execution_id] = bindings[-1]
|
|
297
|
+
groups = {}
|
|
298
|
+
for r in rows:
|
|
299
|
+
binding = bound.get(r["id"])
|
|
300
|
+
if not binding:
|
|
301
|
+
continue
|
|
302
|
+
item = groups.setdefault(binding["id"], dict(id=binding["id"], executions=0, completed=0, failed=0, cancelled=0,
|
|
303
|
+
interrupted=0, rooms=set(), cards=Counter(), sub_workflows=Counter(),
|
|
304
|
+
durations=[]))
|
|
305
|
+
item["executions"] += 1
|
|
306
|
+
if r["status"] in ("completed", "failed", "cancelled"):
|
|
307
|
+
item[r["status"]] += 1
|
|
308
|
+
item["interrupted"] += r["status"] == "cancelled" and r["result"] in ("用户打断", "用户停止全部")
|
|
309
|
+
item["rooms"].add(r["room_id"])
|
|
310
|
+
if binding.get("card"):
|
|
311
|
+
item["cards"][binding["card"]] += 1
|
|
312
|
+
if binding.get("sub_workflow"):
|
|
313
|
+
item["sub_workflows"][binding["sub_workflow"]] += 1
|
|
314
|
+
if r["finished_at"] >= r["created_at"] and r["finished_at"]:
|
|
315
|
+
item["durations"].append(r["finished_at"] - r["created_at"])
|
|
316
|
+
result = []
|
|
317
|
+
for item in groups.values():
|
|
318
|
+
item["rooms"] = len(item["rooms"])
|
|
319
|
+
item["cards"], item["sub_workflows"] = dict(item["cards"]), dict(item["sub_workflows"])
|
|
320
|
+
item["duration"] = distribution(item.pop("durations"))
|
|
321
|
+
result.append(item)
|
|
322
|
+
return sorted(result, key=lambda item: (-item["executions"], item["id"]))
|
|
323
|
+
|
|
324
|
+
|
|
278
325
|
def insights(connection, members, start, end):
|
|
279
326
|
"""Return observed counts with denominators and drill-down keys."""
|
|
280
327
|
result = []
|
|
@@ -298,15 +345,17 @@ def time_stats(connection, requests, executions, bounds, now, sealed):
|
|
|
298
345
|
"""Summarize folder activity, observed waiting and the current message queue."""
|
|
299
346
|
start, end = bounds
|
|
300
347
|
counts, histograms = sealed
|
|
301
|
-
folders, room_folder = {}, {}
|
|
302
|
-
for room, folder, name in connection.execute("""SELECT r.id,f.id,f.name FROM rooms r
|
|
348
|
+
folders, room_folder, room_rows = {}, {}, {}
|
|
349
|
+
for room, title, folder, name in connection.execute("""SELECT r.id,r.title,f.id,f.name FROM rooms r
|
|
303
350
|
LEFT JOIN room_folder_assignments a ON a.room_id=r.id LEFT JOIN topic_folders f ON f.id=a.folder_id"""):
|
|
304
351
|
room_folder[room] = folder
|
|
305
352
|
folders.setdefault(folder, dict(folder_id=folder, name=name, initiated=0, execution_seconds=0))
|
|
353
|
+
room_rows[room] = dict(room_id=room, title=title, folder_id=folder, initiated=0, execution_seconds=0)
|
|
306
354
|
seen, waits = set(), []
|
|
307
355
|
for r in requests:
|
|
308
356
|
if r["initiated"] and start <= r["sent"] < end and r["message_id"] not in seen:
|
|
309
357
|
folders[room_folder[r["room_id"]]]["initiated"] += 1
|
|
358
|
+
room_rows[r["room_id"]]["initiated"] += 1
|
|
310
359
|
seen.add(r["message_id"])
|
|
311
360
|
if start <= r["created_at"] < end and r["dispatched"] is not None and r["dispatched"] >= r["created_at"]:
|
|
312
361
|
waits.append(r["dispatched"] - r["created_at"])
|
|
@@ -318,6 +367,7 @@ def time_stats(connection, requests, executions, bounds, now, sealed):
|
|
|
318
367
|
spans[r["room_id"]].append((left, right))
|
|
319
368
|
member_spans[(r["room_id"], r["name"])].append((left, right))
|
|
320
369
|
folders[room_folder[r["room_id"]]]["execution_seconds"] += right-left
|
|
370
|
+
room_rows[r["room_id"]]["execution_seconds"] += right-left
|
|
321
371
|
if start <= r["created_at"] and r["finished_at"] >= r["created_at"] and r["finished_at"]:
|
|
322
372
|
duration = r["finished_at"] - r["created_at"]
|
|
323
373
|
elapsed.append(duration)
|
|
@@ -327,7 +377,8 @@ def time_stats(connection, requests, executions, bounds, now, sealed):
|
|
|
327
377
|
rooms, rooms_at = peak_concurrent(spans)
|
|
328
378
|
members, members_at = peak_concurrent(member_spans)
|
|
329
379
|
peak = {"rooms": rooms, "at": rooms_at, "members": members, "members_at": members_at}
|
|
330
|
-
|
|
380
|
+
active_rooms = [room for room in room_rows.values() if room["initiated"] or room["execution_seconds"]]
|
|
381
|
+
return {"folders": list(folders.values()), "rooms": active_rooms, "peak": peak, "sealed_execution_seconds": counts["execution_seconds"],
|
|
331
382
|
"execution_seconds": sum(f["execution_seconds"] for f in folders.values()) + counts["execution_seconds"],
|
|
332
383
|
"waiting": distribution(waits, histograms["waiting"]),
|
|
333
384
|
"execution": distribution(elapsed, histograms["execution"]), "rework": distribution(rework, histograms["rework"]),
|
|
@@ -520,11 +571,12 @@ def snapshot(connection, params, cache, now):
|
|
|
520
571
|
scope = {"mode": mode, "rooms": len(rooms), "sealed_rooms": retained, "included_rooms": len(rooms) + retained,
|
|
521
572
|
"includes_archived": True, "sealed_day_tz": "UTC", "sealed_counts": SEALED_COUNTS,
|
|
522
573
|
"sealed_distributions": SEALED_DISTRIBUTIONS,
|
|
523
|
-
"current_only": ["folders", "peak", "queue", "affected_requests", "members", "models", "insights"]}
|
|
574
|
+
"current_only": ["folders", "rooms", "peak", "queue", "affected_requests", "members", "models", "workflows", "insights"]}
|
|
524
575
|
result = dict(range=dates, scope=scope,
|
|
525
576
|
overview=overview(facts, start, end, sealed), previous=overview(facts, previous, start, prior),
|
|
526
577
|
time={**time_stats(connection, requests, executions, (start, end), now, sealed), **activity},
|
|
527
|
-
members=members, models=models,
|
|
578
|
+
members=members, models=models, workflows=workflow_stats(connection, attempts),
|
|
579
|
+
insights=insights(connection, members, start, end))
|
|
528
580
|
result["overview"]["daily"] = daily_overview(dates, facts, executions, sealed_days, now)
|
|
529
581
|
if len(cache) >= CACHE_ENTRIES:
|
|
530
582
|
cache.clear()
|
package/backend/server.py
CHANGED
|
@@ -52,6 +52,7 @@ from .room_trace import message_trace
|
|
|
52
52
|
from .free_room import review_capability, review_roster, checked_review_plan, save_review_plan, check_review_retry
|
|
53
53
|
from .free_room import review_ready, advance_review, late_answer, execution_changes, execution_changes_batch, execution_diffs
|
|
54
54
|
from .free_room import checked_sequence, continue_sequence, sequence_view
|
|
55
|
+
from .windows_thumbnail import encode_preview
|
|
55
56
|
from . import questions
|
|
56
57
|
from .visual_fences import fold_message_visuals
|
|
57
58
|
from .identity import MAX_ROOM_AGENTS, PARTICIPANTS, default_label_text, is_ai, is_participant
|
|
@@ -2485,7 +2486,7 @@ def thumbnail_path(database, attachment):
|
|
|
2485
2486
|
def store_attachment_thumbnail(connection, database, room_id, identifier, token, data):
|
|
2486
2487
|
"""Keep the smaller copy of an image attachment a room participant's page made; the first one stored stays.
|
|
2487
2488
|
|
|
2488
|
-
|
|
2489
|
+
Validate a client-supplied preview using its headers: a WebP or JPEG no larger than
|
|
2489
2490
|
MAX_THUMBNAIL_SIDE pixels, smaller than the original, with the original's shape.
|
|
2490
2491
|
|
|
2491
2492
|
Returns:
|
|
@@ -2514,6 +2515,45 @@ def store_attachment_thumbnail(connection, database, room_id, identifier, token,
|
|
|
2514
2515
|
return {"attachment": get_attachment(connection, room_id, identifier), "duplicate": False}
|
|
2515
2516
|
|
|
2516
2517
|
|
|
2518
|
+
def generate_attachment_thumbnail(connection, database, attachment):
|
|
2519
|
+
"""Keep a smaller PNG attachment preview, if the local codec and original are available."""
|
|
2520
|
+
if (os.name != "nt" or attachment["content_type"] != "image/png"
|
|
2521
|
+
or attachment.get("thumbnail_type")):
|
|
2522
|
+
return False
|
|
2523
|
+
path = attachment_path(database, attachment)
|
|
2524
|
+
try:
|
|
2525
|
+
with path.open("rb") as source:
|
|
2526
|
+
width, height = image_size(source)
|
|
2527
|
+
data = encode_preview(path, width, height)
|
|
2528
|
+
if data and data.startswith(b"\x89PNG") and len(data) > MAX_THUMBNAIL_BYTES:
|
|
2529
|
+
data = encode_preview(path, width, height, max_width=360)
|
|
2530
|
+
if not data or len(data) > MAX_THUMBNAIL_BYTES or len(data) * 2 >= attachment["size"]:
|
|
2531
|
+
return False
|
|
2532
|
+
with connection:
|
|
2533
|
+
begin_write(connection)
|
|
2534
|
+
updated = connection.execute("UPDATE attachments SET thumbnail_type=? "
|
|
2535
|
+
"WHERE id=? AND thumbnail_type IS NULL", (attachment_content_type(data), attachment["id"]))
|
|
2536
|
+
if not updated.rowcount:
|
|
2537
|
+
return False
|
|
2538
|
+
thumbnail_path(database, attachment).write_bytes(data)
|
|
2539
|
+
return True
|
|
2540
|
+
except (OSError, ValueError, sqlite3.Error):
|
|
2541
|
+
logging.debug("Preview unavailable for %s", attachment["id"], exc_info=True)
|
|
2542
|
+
return False
|
|
2543
|
+
|
|
2544
|
+
|
|
2545
|
+
def backfill_thumbnails(database, room_id):
|
|
2546
|
+
"""Generate missing previews in one room, one file at a time outside the write lock."""
|
|
2547
|
+
with closing(connect_db(database)) as connection:
|
|
2548
|
+
require_room(connection, room_id)
|
|
2549
|
+
rows = connection.execute("SELECT id,content_type,size,thumbnail_type FROM attachments "
|
|
2550
|
+
"WHERE room_id=? AND content_type='image/png' AND thumbnail_type IS NULL "
|
|
2551
|
+
"AND message_id IS NOT NULL",
|
|
2552
|
+
(room_id,)).fetchall()
|
|
2553
|
+
generated = sum(generate_attachment_thumbnail(connection, database, dict(row)) for row in rows)
|
|
2554
|
+
logging.info("Generated %d of %d missing PNG previews", generated, len(rows))
|
|
2555
|
+
|
|
2556
|
+
|
|
2517
2557
|
def store_attachment(connection, database, room_id, metadata, data):
|
|
2518
2558
|
"""Persist one immutable upload; exact retries return the original file."""
|
|
2519
2559
|
begin_write(connection)
|
|
@@ -2542,6 +2582,7 @@ def store_attachment(connection, database, room_id, metadata, data):
|
|
|
2542
2582
|
except Exception:
|
|
2543
2583
|
path.unlink(missing_ok=True)
|
|
2544
2584
|
raise
|
|
2585
|
+
generate_attachment_thumbnail(connection, database, record)
|
|
2545
2586
|
return {"attachment": get_attachment(connection, room_id, record["id"]), "duplicate": False}
|
|
2546
2587
|
|
|
2547
2588
|
|
|
@@ -5151,8 +5192,12 @@ def main():
|
|
|
5151
5192
|
parser.add_argument("--no-demo", action="store_true", help="Do not seed sample data in a new database")
|
|
5152
5193
|
parser.add_argument("--local-launch", action="store_true", help="Enable local AI launch and configuration (127.0.0.1 only)")
|
|
5153
5194
|
parser.add_argument("--reset-admin", action="store_true", help="Delete the administrator account and sessions, then exit")
|
|
5195
|
+
parser.add_argument("--backfill-thumbnails", metavar="ROOM", help="Generate missing PNG previews / 补齐房间 PNG 预览图")
|
|
5154
5196
|
args = parser.parse_args()
|
|
5155
5197
|
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(message)s")
|
|
5198
|
+
if args.backfill_thumbnails:
|
|
5199
|
+
backfill_thumbnails(args.database, args.backfill_thumbnails)
|
|
5200
|
+
return
|
|
5156
5201
|
init_database(args.database, seed=not args.no_demo)
|
|
5157
5202
|
retry_destruction(args.database)
|
|
5158
5203
|
if args.reset_admin:
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"""Generate PNG or JPEG previews with the Windows system GDI+ codec."""
|
|
2
|
+
import ctypes
|
|
3
|
+
from contextlib import ExitStack
|
|
4
|
+
from functools import lru_cache
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
from tempfile import TemporaryDirectory
|
|
7
|
+
from uuid import UUID
|
|
8
|
+
|
|
9
|
+
from ctypes import byref, c_int, c_uint, c_void_p, c_size_t, Structure
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class StartupInput(Structure):
|
|
13
|
+
_fields_ = [("version", c_uint), ("callback", c_void_p), ("no_thread", c_int), ("no_codec", c_int)]
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class BitmapData(Structure):
|
|
17
|
+
_fields_ = [("width", c_uint), ("height", c_uint), ("stride", c_int), ("format", c_int),
|
|
18
|
+
("pixels", c_void_p), ("reserved", c_size_t)]
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
ARGB32 = 0x26200A
|
|
22
|
+
PNG_ENCODER = UUID("557cf406-1a04-11d3-9a73-0000f81ef32e").bytes_le
|
|
23
|
+
JPEG_ENCODER = UUID("557cf401-1a04-11d3-9a73-0000f81ef32e").bytes_le
|
|
24
|
+
MAX_SOURCE_PIXELS = 24_000_000
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def checked(status):
|
|
28
|
+
"""Raise when the native image operation fails."""
|
|
29
|
+
if status:
|
|
30
|
+
raise ValueError(f"GDI+ status {status}")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
@lru_cache(maxsize=1)
|
|
34
|
+
def graphics_library():
|
|
35
|
+
"""Initialize the system codec for the process lifetime."""
|
|
36
|
+
library = ctypes.WinDLL("gdiplus", winmode=0x800)
|
|
37
|
+
token = c_size_t()
|
|
38
|
+
checked(library.GdiplusStartup(byref(token), byref(StartupInput(1)), None))
|
|
39
|
+
return library
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def encode_preview(path, width, height, max_width=720):
|
|
43
|
+
"""Resize a bounded image, preserving transparency."""
|
|
44
|
+
if not width or not height or width * height > MAX_SOURCE_PIXELS:
|
|
45
|
+
return None
|
|
46
|
+
library = graphics_library()
|
|
47
|
+
scale = min(1, max_width / width, 1600 / height)
|
|
48
|
+
width, height = max(1, round(width * scale)), max(1, round(height * scale))
|
|
49
|
+
with ExitStack() as cleanup:
|
|
50
|
+
source, bitmap, graphics = c_void_p(), c_void_p(), c_void_p()
|
|
51
|
+
checked(library.GdipLoadImageFromFile(str(path), byref(source)))
|
|
52
|
+
cleanup.callback(library.GdipDisposeImage, source)
|
|
53
|
+
checked(library.GdipCreateBitmapFromScan0(width, height, 0, ARGB32, None, byref(bitmap)))
|
|
54
|
+
cleanup.callback(library.GdipDisposeImage, bitmap)
|
|
55
|
+
checked(library.GdipGetImageGraphicsContext(bitmap, byref(graphics)))
|
|
56
|
+
cleanup.callback(library.GdipDeleteGraphics, graphics)
|
|
57
|
+
checked(library.GdipSetInterpolationMode(graphics, 7))
|
|
58
|
+
# TileFlipXY extends the edge pixels during bicubic filtering.
|
|
59
|
+
attributes = c_void_p()
|
|
60
|
+
checked(library.GdipCreateImageAttributes(byref(attributes)))
|
|
61
|
+
cleanup.callback(library.GdipDisposeImageAttributes, attributes)
|
|
62
|
+
checked(library.GdipSetImageAttributesWrapMode(attributes, 3, 0, 0))
|
|
63
|
+
source_width, source_height = c_uint(), c_uint()
|
|
64
|
+
checked(library.GdipGetImageWidth(source, byref(source_width)))
|
|
65
|
+
checked(library.GdipGetImageHeight(source, byref(source_height)))
|
|
66
|
+
if source_width.value * source_height.value > MAX_SOURCE_PIXELS:
|
|
67
|
+
return None
|
|
68
|
+
checked(library.GdipDrawImageRectRectI(graphics, source, 0, 0, width, height, 0, 0,
|
|
69
|
+
source_width, source_height, 2, attributes, None, None))
|
|
70
|
+
encoder = preview_encoder(library, bitmap, width, height)
|
|
71
|
+
with TemporaryDirectory() as directory:
|
|
72
|
+
output = Path(directory) / "preview"
|
|
73
|
+
checked(library.GdipSaveImageToFile(bitmap, str(output), encoder, None))
|
|
74
|
+
return output.read_bytes()
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def preview_encoder(library, bitmap, width, height):
|
|
78
|
+
"""Keep transparency in PNG, otherwise use the system JPEG encoder."""
|
|
79
|
+
pixels = BitmapData()
|
|
80
|
+
checked(library.GdipBitmapLockBits(bitmap, None, 1, ARGB32, byref(pixels)))
|
|
81
|
+
try:
|
|
82
|
+
if pixels.stride == width * 4:
|
|
83
|
+
alpha = ctypes.string_at(pixels.pixels, pixels.stride * height)[3::4]
|
|
84
|
+
if alpha.count(255) == len(alpha):
|
|
85
|
+
return JPEG_ENCODER
|
|
86
|
+
return PNG_ENCODER
|
|
87
|
+
finally:
|
|
88
|
+
library.GdipBitmapUnlockBits(bitmap, byref(pixels))
|
package/docs/en/guide/admin.md
CHANGED
|
@@ -13,7 +13,7 @@ Use the local management panel or the corresponding codiscuss admin commands to
|
|
|
13
13
|
- **Settings:** View the installed version, select **Check for updates** or **Update and restart** (which also updates room skills and isolated accounts), enable **Start when signing in to Windows**, and change the panel language.
|
|
14
14
|
- **Storage:**
|
|
15
15
|
- View local `.codiscuss` data usage against the 10 GiB limit (excluding speech models), total drafts against 3 GiB (1 GiB per room), **Room records & attachments (`local/`)**, disk free space and safety reserve, per-room and per-member breakdowns, and any unreadable entries. Local TTS and STT models are listed separately and excluded from the 10 GiB cap (covering both legacy and custom model paths, including when the service home itself is a symlink or junction).
|
|
16
|
-
- When `.codiscuss` data reaches the 8 GiB warning threshold, the **Storage** tab shows a warning dot and displays a notice; exceeding a limit or dropping below the disk safety reserve pauses new runs.
|
|
16
|
+
- When `.codiscuss` data reaches the 8 GiB warning threshold, the **Storage** tab shows a warning dot and displays a notice; exceeding a limit or dropping below the disk safety reserve pauses new runs. The total is split into five named directories and Other. **Safe cleanup** removes registered failed scratch, speech cache entries, empty orphan directories, stale launches containing only setup records, and local execution files more than 24 hours after completion. After clearing the speech cache, replaying old content with cloud speech synthesizes it again and incurs a new charge. **Deep repair** estimates space before you select and confirm deletion of finished logs, including the last day.
|
|
17
17
|
- **Recovery and limits:** While a room is blocked, its host cannot run either—to clean older drafts, run `$codiscuss-draft-cleanup` in an **AI chat outside the room** (it audits first and deletes rebuildable copies only after your confirmation). Room records and attachments in `local/` are never deleted automatically; export a backup and destroy old rooms to reclaim that space. Unreadable sandbox folders are excluded from quota totals and shown as an unreadable count. Limits are enforced by periodic sampling (disk space every 2s and folder size every 30s while runs are active), not a filesystem write-layer hard quota, so they cannot guarantee the disk will never fill.
|
|
18
18
|
During active runs, the service checks free space on its own volume every two seconds. While part of the 10 GiB budget remains, a drop in free space as large as that remainder triggers an early scan. When a run ends, the service updates that member’s draft usage. A manual retry after cleanup rechecks the limit that blocked the run. If a machine-wide limit was exceeded, the service measures machine-wide usage again. If another program writes to the volume, runs continue when measured usage is within limits and the unreadable count is stable. If an early scan finds more unreadable entries, dispatch pauses and the service requests stops for stoppable runs. Dispatch resumes when a later scan finds a stable count, usage within limits and enough free disk space. The low-disk reserve applies independently. At 80% of the room draft limit, new runs without confirmed stop support are paused. Writes can continue between and during scans, and ongoing unstoppable runs can keep writing. Project files, system temporary files and third-party AI data outside the service directory are excluded. Follow the cleanup instructions on the failed run’s card, then select “Retry” on that card from the computer or a paired device.
|
|
19
19
|
- **Account:**
|
|
@@ -59,7 +59,7 @@ Every command in the table is prefixed by codiscuss admin and returns JSON. Thes
|
|
|
59
59
|
| --- | --- |
|
|
60
60
|
| Start, exit, restart, or update (panel need not be running) | `codiscuss admin start`, `stop`, `restart`, `update [check]` |
|
|
61
61
|
| Check status, control service, configure sign-in startup | `status [--full]`, `service start\|stop\|restart`, `autostart on\|off` |
|
|
62
|
-
| Inspect storage usage and clear temporary run files | `storage`, `storage clean` |
|
|
62
|
+
| Inspect storage usage and clear temporary run files | `storage`, `storage clean`, `storage repair` (preview), `storage repair logs --confirm` |
|
|
63
63
|
| Link/unlink online site and create access code | `site status`, `site connect <access-code\|site>`, `site disconnect`, `entry code` |
|
|
64
64
|
| Manage sign-in entry and tunnel | `entry start\|stop`, `entry join <access-code>`, `entry open\|close relay\|tunnel`, `entry tunnel <domain>` |
|
|
65
65
|
| Manage hosted account lifecycle | `account list`, `account add <name>`, `account start\|stop\|disable\|enable\|remove\|password <name>`, `account isolate\|protect <name>` |
|
|
@@ -19,9 +19,10 @@ At the top, switch between "Today", "Last 7 days", "Last 30 days" and "All time"
|
|
|
19
19
|
- **Peak concurrency**: the most rooms and experts running at the same moment, and when the expert peak happened. For rooms, several members running in one room count as one room; for experts, every running member counts.
|
|
20
20
|
- **Total AI execution time**: execution time summed across members, so it exceeds the time that passed when several run at once.
|
|
21
21
|
2. **Worth a look**: anomalies picked by fixed rules (repeated failures, permission blocks, late answers after a failure, negative smart-scheduling feedback), listed only when they happen at least 3 times in at least 10 runs. Click an item to open its room.
|
|
22
|
-
3. **Where time went**: share of execution time, total time and started count per room's current folder. Up to 6 folders are listed individually and the rest are combined into "other".
|
|
23
|
-
4. **Member scorecard**:
|
|
24
|
-
5. **
|
|
22
|
+
3. **Where time went**: share of execution time, total time and started count per room's current folder. Up to 6 folders are listed individually and the rest are combined into "other". Click a folder to expand its rooms with each room's share of the folder, time and started count; the first 8 show, and "N more rooms" lists the rest. Click a room name to open it.
|
|
23
|
+
4. **Member scorecard**: at the top, "Share of runs by model" draws each model (across software and effort) as a segment of one bar by number of runs; the 6 largest get their own colour and the rest are combined into "other". Below, the table totals all rooms per software, model and effort: runs, share of all runs, completion rate, duration ("usually" means half of the runs finish within it, "slower" nine in ten), stops and retries, and failure types. Rows are ordered by runs, not ranked, and file changes are not counted. The first 8 groups show by default; expand to see all. Click the ⓘ next to each heading to see how it is counted (tap it on phones and tablets).
|
|
24
|
+
5. **Workflows**: how many runs happened inside a workflow (as a share of all runs), and for each workflow its runs, rooms, completion rate, duration, stops, and how often each card and sub-workflow was called. With no workflow runs, a single line says so.
|
|
25
|
+
6. **Time and friction** (collapsed by default; click to expand):
|
|
25
26
|
- Delivery time (from sending to all answers received), waiting for pickup, member work and the rework subset, each with "usually / slower" and a count. On each bar the dot marks "usually" and the band extends to "slower".
|
|
26
27
|
- The three corrections (stops and interruptions, retracted messages, rollbacks with affected requests) are listed separately from follow-up interjections, which do not count as intervention.
|
|
27
28
|
- Messages queued right now and the oldest wait.
|
package/docs/en/guide/remote.md
CHANGED
|
@@ -56,4 +56,5 @@ Phones support portrait layout only. Tablets support both portrait and landscape
|
|
|
56
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.
|
|
57
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.
|
|
58
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.
|
|
59
|
+
- **Attachment cache:** Pictures and files viewed through the relay are cached in this device’s browser and cleared when you unpair on this device.
|
|
59
60
|
- **Clearing browser data requires pairing again:** Clearing browser data removes the device key. The handoff command also expires after 10 minutes, so keep the phone's clock reasonably accurate.
|
package/docs/en/guide/rooms.md
CHANGED
|
@@ -53,8 +53,8 @@ Rooms created by a host inherit its folder. Select the arrow to the left of the
|
|
|
53
53
|
|
|
54
54
|
### 4. Send and view attachments
|
|
55
55
|
|
|
56
|
-
- **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.
|
|
57
|
-
- **View attachments.** After sending a message, select its placeholder or attachment card. Images can be enlarged full-screen, zoomed, rotated, and saved; when the room has several images, the side buttons
|
|
56
|
+
- **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. Windows sites automatically generate smaller previews for eligible PNG uploads. Open the image to view the original. The site automatically clears uploads left unsent for more than 24 hours. Attachments in sent or queued messages are kept.
|
|
57
|
+
- **View attachments.** After sending a message, select its placeholder or attachment card. Images can be enlarged full-screen, zoomed, rotated, and saved; when the room has several images, the side buttons, the left and right arrow keys, or a sideways swipe on a phone step between them (the side buttons hide when idle and return when you move the mouse or tap the image). Audio and video play in the message. Documents and code open in the file preview.
|
|
58
58
|
- **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.
|
|
59
59
|
- **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.
|
|
60
60
|
|
|
@@ -78,7 +78,7 @@ Rooms created by a host inherit its folder. Select the arrow to the left of the
|
|
|
78
78
|
|
|
79
79
|
### 6. Contact another room’s host
|
|
80
80
|
|
|
81
|
-
Give your host the target room’s title, ID or link and describe the work. On a computer, drag a room from the left sidebar onto the messages or the message box to insert
|
|
81
|
+
Give your host the target room’s title, ID or link and describe the work. On a computer, drag a room from the left sidebar onto the messages or the message box to insert `[room Title #ID]` at the cursor, so the host can find it by its ID. Like an attachment placeholder, it is highlighted in the message box and one Backspace removes all of it; a member dragged from the right sidebar into the message box inserts `[member Name]`, which behaves the same way. The other host answers with the reply command in its task. Sending or queuing the reply completes the request and keeps its full text on the sending card. If the other host delegates, it sends the final result back manually. A notification needs no reply.
|
|
82
82
|
|
|
83
83
|
A message from another room goes to this room's current host: an idle host takes it at once even while other members work; it queues only while the host is busy. The outgoing message shows whether it is queued, delivered or answered. Open it to read the original. Only a parent can interrupt a child. Set the linked-room message limit under Settings → Room preferences (0 means unlimited). The count resets when you speak in either room. The Parent and child rooms section shows these relationships even after a room is detached in the directory.
|
|
84
84
|
|
|
@@ -34,7 +34,7 @@ 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”. 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.
|
|
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, or whose project has no workflows yet, shows global workflows only.
|
|
38
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
|
|
package/docs/en/guide/working.md
CHANGED
|
@@ -18,7 +18,7 @@ Message a member or host, understand main and branch work and assignment labels,
|
|
|
18
18
|
|
|
19
19
|
Once the site returns a message number, known recipients appear below the message. If an automatically connected member is busy and the request must wait for its current task to finish, a one-line notice with a clock shows the member’s name and the queued message number. Hover over the notice to see how long the request has waited. The working card takes its place when the member starts. If smart scheduling needs to choose the recipient, the page shows scheduling progress.
|
|
20
20
|
|
|
21
|
-
Quick navigation on the left lists messages from users and members. Hover over a mark to preview the message or click to jump to its card. In the right sidebar's “Speaking order”, open a member row's “…” menu or right-click it and choose “Jump to latest message” (on a phone or tablet, tapping the row opens this menu; on a computer, the member card that appears when you hover over the row has the same button) to jump straight to that member's latest message or ongoing work card.
|
|
21
|
+
Quick navigation on the left lists messages from users and members. Hover over a mark to preview the message or click to jump to its card. In the right sidebar's “Speaking order”, open a member row's “…” menu or right-click it and choose “Jump to latest message” (on a phone or tablet, tapping the row opens this menu; on a computer, the member card that appears when you hover over the row has the same button) to jump straight to that member's latest message or ongoing work card. On a computer, drag a member row from the right sidebar's “Speaking order” into the composer to insert `[member Name]` where you drop it (without `@`, so it is not woken), for mentioning a member in a message without addressing it.
|
|
22
22
|
|
|
23
23
|
### 2. Understand main lines, branches, and assignment labels
|
|
24
24
|
|
package/docs/guide/admin.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- **设置**:查看当前版本、“检查更新”与“更新并重启”(同步更新房间技能和隔离账号)、开关“登录 Windows 时自动启动”,以及切换管理面板语言。
|
|
14
14
|
- **“存储”页**:
|
|
15
15
|
- 查看本机 `.codiscuss` 数据总量(上限 10 GiB,不含语音模型)、全机草稿区占用(上限 3 GiB,单房间 1 GiB)、**房间记录与附件(`local/`)**占用、所在磁盘剩余空间与安全线,以及按房间与成员拆分的草稿占用和权限不可读条目计数;本机朗读与语音识别模型单独列出,不计入 10 GiB 上限(兼容旧目录与自定义模型目录,服务根目录为目录联接时也可正常计量)。
|
|
16
|
-
- 当 `.codiscuss` 数据达到 8 GiB
|
|
16
|
+
- 当 `.codiscuss` 数据达到 8 GiB 预警线时,“存储”标签显示提示圆点并弹出警告;超过上限或磁盘低于安全线时停止新的派活。总量分为五个具名目录和“其他”。“安全清理”回收已登记的失败执行临时目录、朗读缓存、无主空目录和仅剩登记文件的过期启动目录,以及本机站点已结束超过 24 小时的执行文件。清除朗读缓存后,用云端语音重听旧内容会重新合成并计费。“深度修理”先预估容量,勾选并确认后可删除含最近一天在内的已结束执行日志。
|
|
17
17
|
- **超限脱困与边界**:房间被拦截时主持人也无法运行,清理历史旧草稿需在**房间外的 AI 对话**(如本机 Claude Code / Codex / Antigravity)中调用 `$codiscuss-draft-cleanup`(默认只盘点,经你确认才删除可重建副本);若由 `local/` 房间记录与附件占满,请先导出备份再在网页销毁旧房间。沙箱创建的不可读目录不计入配额,页面会标出数量;所有限额均为定期采样检查(有执行时每 2 秒查磁盘余量、每 30 秒扫描占用),并非文件系统写入层硬拦截,不能保证磁盘绝不写满。
|
|
18
18
|
服务执行期间,每 2 秒检查服务目录所在卷的可用空间。10 GiB 预算还有余量时,卷上可用空间的下降量达到该余量就提前复扫。执行结束时更新相应成员的草稿占用。清理后手动重试会按原拦截原因复核;全机超限时重新统计全机用量。其他程序写盘时,若可测用量未超限且不可读项数量稳定,运行继续。提前复扫发现不可读项增多时暂停派活,并请求停止可停执行。后续扫描确认数量稳定且各项限额与磁盘余量正常时,恢复派活。低于磁盘安全线仍独立触发保护。房间草稿达到 80% 时,守卫提前暂停无法确认可停止的新执行。采样之间及扫描期间仍可写入,已运行的不可停成员可继续写入。项目目录、系统临时目录与第三方 AI 自身数据在服务目录外时不计入预算。按失败卡上的原因清理后,在卡片上点“重试”。本机和已配对设备都可手动重试。
|
|
19
19
|
- **“账号”页**:
|
|
@@ -61,7 +61,7 @@ Windows 可以从托盘打开面板。macOS 和 Linux 的命令行入口见下
|
|
|
61
61
|
| --- | --- |
|
|
62
62
|
| 启动、退出、重启、更新(**无需面板已运行**) | `codiscuss admin start` / `stop` / `restart` / `update [check]` |
|
|
63
63
|
| 查看状态、启停服务、开机自启 | `codiscuss admin status [--full]`、`service start\|stop\|restart`、`autostart on\|off` |
|
|
64
|
-
| 查看存储占用与清理临时文件 | `codiscuss admin storage`、`storage clean` |
|
|
64
|
+
| 查看存储占用与清理临时文件 | `codiscuss admin storage`、`storage clean`、`storage repair`(预览)、`storage repair logs --confirm` |
|
|
65
65
|
| 绑定/解绑线上网站、生成接入码 | `codiscuss admin site status`、`site connect <接入码\|站点>`、`site disconnect`、`entry code` |
|
|
66
66
|
| 托管入口与隧道 | `codiscuss admin entry start\|stop`、`entry join <接入码>`、`entry open\|close relay\|tunnel`、`entry tunnel <域名>` |
|
|
67
67
|
| 托管账号生命周期 | `codiscuss admin account list`、`account add <名>`、`account start\|stop\|disable\|enable\|remove\|password <名>`、`account isolate\|protect <名>` |
|
package/docs/guide/analytics.md
CHANGED
|
@@ -19,9 +19,10 @@
|
|
|
19
19
|
- **同时并行峰值**:同一时刻最多有几个房间、几位专家在运行,以及专家峰值出现的时间。房间数里,同一房间几位成员同时运行只算一个房间;专家数里,每位正在运行的成员各算一位。
|
|
20
20
|
- **AI 执行总时长**:各成员执行时长相加,几位成员同时运行时会超过实际经过的时间。
|
|
21
21
|
2. **值得留意**:按固定规则筛出的异常(失败集中、权限拦截、失败后迟到补交、智能调度负评),至少 10 次运行里出现 3 次以上才会列出,点击条目跳到对应房间。
|
|
22
|
-
3. **时间去哪了**:按房间当前所在的文件夹,显示执行时长的占比、时长和发起次数;最多单列 6
|
|
23
|
-
4.
|
|
24
|
-
5.
|
|
22
|
+
3. **时间去哪了**:按房间当前所在的文件夹,显示执行时长的占比、时长和发起次数;最多单列 6 个文件夹,其余合为“其他”。点文件夹可展开其中各房间在该文件夹里的占比、时长和发起次数,先列前 8 个,点“其余 N 个房间”看全部;点房间名进入该房间。
|
|
23
|
+
4. **成员成绩单**:顶部是“各模型调用占比”,按运行次数把各模型(不分软件和强度)画成一条分段条,前 6 个各占一色,其余合为“其他”。下方表格按软件、模型与强度汇总所有房间,列出运行次数、占全部运行的比例、完成率、耗时(“通常”是一半运行在此以内结束,“较慢”是九成在此以内)、打断与重试次数、失败类型。按运行次数排列,不评名次,不统计改动文件数;默认显示前 8 组,可展开全部。点各段标题旁的 ⓘ 可查看统计口径(手机和平板同样点按)。
|
|
24
|
+
5. **工作流**:这段时间有多少运行发生在工作流里(占全部运行的比例),以及每个工作流的运行次数、涉及房间数、完成率、耗时、打断次数,和各卡片、子工作流分别被调用了多少次。没有工作流运行时只显示一行提示。
|
|
25
|
+
6. **耗时与卡点**(默认收起,点击展开):
|
|
25
26
|
- 交付耗时(从发出到收齐回答)、等待接手、成员处理与“其中:返工”,各给出“通常 / 较慢”和次数;横条上圆点是“通常”,色段延伸到“较慢”。
|
|
26
27
|
- 停止与打断、撤回消息、回退对话(附受影响的请求数)这三类纠正操作,与不计入介入的追加插话分开列出。
|
|
27
28
|
- 当前正在排队的消息数和最久已等多久。
|
package/docs/guide/remote.md
CHANGED
|
@@ -57,4 +57,5 @@ npm 安装默认提供本机站点,没有随包可直接使用的公共线上
|
|
|
57
57
|
- **电脑离线时看不到房间**:电脑关机、休眠或本机服务未运行时,手机目录标题会显示“协作房间(电脑离线)”或“协作房间(电脑未连接)”;电脑恢复在线后页面自动重连。
|
|
58
58
|
- **超时不自动重发**:电脑没及时答复时,页面会提示“结果待确认”,不会自动重发;先看房间确认是否已生效。
|
|
59
59
|
- **只能在电脑上改的项**:软件可执行路径、常用项目范围之外的目录、以及添加新设备,都只能在电脑前操作。
|
|
60
|
+
- **附件缓存**:经中转看过的图片和文件会缓存在这台设备的浏览器里,在这台设备上解除配对时清除。
|
|
60
61
|
- **清除浏览器数据需重配**:手机清理浏览器数据会删掉设备密钥,需回到电脑前重新配对;另外转交命令 10 分钟后作废,请保持手机系统时间大致准确。
|
package/docs/guide/rooms.md
CHANGED
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
|
|
52
52
|
### 4. 发送与查看附件
|
|
53
53
|
|
|
54
|
-
- **添加附件**:在输入框粘贴、拖入文件,或点左下角回形针按钮选择文件(每条消息最多 10 个,单个最多 20 MiB)。添加后输入框上方出现缩略图,正文光标处插入 `[图片 #1]`、`[文件 #2]` 等房间内连续编号的占位标签;删掉缩略图或按退格删掉占位,两边同步移除。发出后,正文里首次写到 `[图片 #n]` 的图片会紧跟在所在段落或列表项下方以半宽两列排布显示(手机上单张占满整宽、多张两列并排,多图消息附带 `#n` 角标),附件列表不再重复列出;其他附件仍列在消息下方。 已上传但一直未发送的附件超过 24 小时后会自动清理;已发送或仍在排队消息里的附件会保留。
|
|
55
|
-
-
|
|
54
|
+
- **添加附件**:在输入框粘贴、拖入文件,或点左下角回形针按钮选择文件(每条消息最多 10 个,单个最多 20 MiB)。添加后输入框上方出现缩略图,正文光标处插入 `[图片 #1]`、`[文件 #2]` 等房间内连续编号的占位标签;删掉缩略图或按退格删掉占位,两边同步移除。发出后,正文里首次写到 `[图片 #n]` 的图片会紧跟在所在段落或列表项下方以半宽两列排布显示(手机上单张占满整宽、多张两列并排,多图消息附带 `#n` 角标),附件列表不再重复列出;其他附件仍列在消息下方。 Windows 站点会为上传的 PNG 自动生成较小的预览,点击图片可读原图。 已上传但一直未发送的附件超过 24 小时后会自动清理;已发送或仍在排队消息里的附件会保留。
|
|
55
|
+
- **查看附件**:消息发出后点正文占位或附件卡片即可打开;图片支持全屏缩放、旋转与保存,房间里有多张图片时可用两侧按钮、键盘左右方向键或手机上左右滑动切换(两侧按钮无操作时自动隐藏,移动鼠标或轻点图片即重新出现),音视频直接在消息里播放,文档与代码在文件预览窗口打开。
|
|
56
56
|
- **交互式可视化**:成员可以在回答正文里放一段可以操作的网页(拖动滑块、点按钮看结果变化),它显示在正文中的原位置,跟随房间主题和深浅色,手机上同样直接显示。滚到它附近才开始运行。下方一行可“收起”(会记住选择)、看“源码”、“放大”到文件预览窗口、在“新标签页”打开或“下载”为 `.html` 文件。只读分享页、朗读和消息折叠时的预览只显示“交互式可视化”一行,结论以成员写在正文里的文字为准。`.html` 附件不在消息内显示,点文件卡片在预览窗口或新标签页打开。有的可视化是提问面板:你在里面排序、分配或调整后点它的提交按钮,结果会作为引用放到输入框上方,不会直接发出;你可以删改,点发送才算回答。同一面板再次提交会替换上一次的结果。
|
|
57
57
|
- **成员读取附件**:本机服务为支持附件的自动执行下载文件,并把文件信息交给接收任务的成员。Claude Code 和 Codex CLI 可直接看图;API 成员需在卡片设置中打开“看图”才能看图,UTF-8 文本附件可按需读取,PDF 等其他文件读不到时会如实说明。
|
|
58
58
|
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
|
|
77
77
|
### 6. 联系其他房间的主持人
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
告诉本房主持人目标房间的标题、编号或链接,以及要对方处理的事。在电脑上,把左栏的房间拖到消息区或输入框,会在光标处插入 `[房间 标题 #编号]`,主持人凭编号就能找到它。它和附件占位一样在输入框里高亮显示,退格一次删掉整个;右栏成员拖进输入框插入的 `[成员 名称]` 也是这样。对方主持人用任务中的回传命令作答。发送或排队成功就完成该请求,发送卡片保留完整正文。若对方先派活,收尾时由主持人手动把结果发回。普通通知无需回传。
|
|
80
80
|
|
|
81
81
|
对方房间发来的消息默认交给本房当前主持人:主持人空闲就立即处理,其他成员在忙也不等;主持人正忙才排队。发送记录显示排队、送达或已回复。点开可读原文。只有父房间可以打断子房间。在“设置 → 房间偏好”中调整“关联房间互传上限”,0 表示不限;你在任一房间发言后重新计数。右栏“父子房间”可查看本房的父房间和子房间,即使已在左栏将房间设为独立也能查看。
|
|
82
82
|
|
package/docs/guide/workflows.md
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
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
|
|
37
|
+
- **存在哪里**。全局工作流可跨项目使用,位于 `~/.codiscuss/workflows/<ID>/`。项目工作流位于 `<项目根目录>/.codiscuss/workflows/<ID>/`,可在使用该目录的房间里选用。左栏“工作流”先显示“当前项目”下的工作流,再显示“全局”。桌面布局可在编辑器顶部查看所属项目。没有项目、或项目里还没有工作流的房间只显示全局工作流。
|
|
38
38
|
- **选择保存位置**。点“+”后按目标位置选择新建或导入项,例如“新建全局工作流”或“新建到项目「项目名」”。桌面布局的编辑器顶部显示“全局”或“项目 · 项目名”,只读项目另标“只读”。只读项目的工作流可以打开查看或复制到全局。
|
|
39
39
|
- **移动、复制与导出**。打开项目工作流的“…”菜单,选择“移至全局”或“复制到全局”。移动要求源项目可写,成功后当前房间的绑定也随之更新。若全局已有同 ID,移动会被拒绝。复制会保留原件。全局工作流可用“复制到本项目”复制到唯一的可写项目。有多个可写项目时,点对应的“复制到项目「项目名」”。点“导出”下载工作流压缩包,导出提示会列出因格式或大小跳过的文件。
|
|
40
40
|
|
package/docs/guide/working.md
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
网站返回消息编号后,已确定的接收成员会显示在消息下方。自动接入的成员正忙并需等当前工作结束时,这里会显示带时钟图标的一行排队提示,列出成员名和等完要处理的消息编号。把鼠标移到提示上可看已等时长。成员开工后,执行卡会在原位置出现。需要智能调度决定接收者时,页面显示调度进度。
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
消息区左侧的快速导航只列出用户和成员的发言。悬停刻度可预览,点击可跳到对应卡片。在右栏“发言顺序”的成员行上点“…”或右键选“定位最新发言”(手机、平板上点一下成员行即弹出这份菜单;电脑上悬停成员行弹出的成员卡片里也有同名按钮),可直接跳到该成员的最新一条发言或正在进行中的执行卡片。在电脑上把右栏“发言顺序”里的成员行拖到输入框,会在落点插入 `[成员 名称]`(不带 `@`,不会唤醒它),用于在消息里提到某位成员而不点名。
|
|
22
22
|
|
|
23
23
|
### 2. 看懂主线、支线与派活标签
|
|
24
24
|
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
+
"清除朗读缓存后,用云端语音重听旧内容会重新合成并计费。": "After clearing the speech cache, replaying old content with cloud speech synthesizes it again and incurs a new charge.",
|
|
3
|
+
"有 {count} 处目录或文件因权限无法读取(例如沙箱创建的目录),未计入配额。深度修理也会保留这些目录;如需删除,请以管理员身份手动操作。": "{count} entries could not be read and are excluded from the quota. Deep repair leaves these directories in place. To remove them, delete them manually as an administrator.",
|
|
4
|
+
"无法核实不可读目录的大小、内容和当前使用者,已保留。": "Unreadable directories are retained because their size, contents and active users cannot be verified.",
|
|
5
|
+
"窗口配置占 {size}。无法确认所有窗口进程已退出,已保留登录和窗口数据。": "The panel profile uses {size}. Login and window data are retained because the exit of all browser processes cannot be verified.",
|
|
6
|
+
"房间记录与附件": "Room records and attachments",
|
|
7
|
+
"成员草稿": "Member drafts",
|
|
8
|
+
"运行日志与任务文件": "Run logs and task files",
|
|
9
|
+
"管理面板窗口缓存": "Panel browser profile",
|
|
10
|
+
"模型 API 运行环境": "Model API runtime",
|
|
11
|
+
"其他": "Other",
|
|
12
|
+
"确认删除所选日志?此操作无法撤销。": "Permanently delete the selected logs?",
|
|
13
|
+
"已释放 {size},跳过 {count} 项": "Released {size}. Skipped {count} items.",
|
|
14
|
+
"安全清理": "Safe cleanup",
|
|
15
|
+
"深度修理": "Deep repair",
|
|
16
|
+
"确认深度修理": "Confirm deep repair",
|
|
17
|
+
"删除已结束执行的日志(含最近 24 小时),之后无法排查这些执行。预计释放 {size}。": "Delete finished run logs, including the last 24 hours. These logs will no longer be available for troubleshooting. Estimated space: {size}.",
|
|
2
18
|
"释放迁移备份": "Release migration backup",
|
|
3
19
|
"确认释放": "Confirm release",
|
|
4
20
|
"将停止实例,校验后删除备份 {path}({bytes} 字节)。": "Stop the instance, verify and delete the backup at {path} ({bytes} bytes).",
|
|
@@ -106,5 +106,22 @@
|
|
|
106
106
|
"耗时(通常 · 较慢)": "Duration (usually · slower)",
|
|
107
107
|
"每日发起的已结束任务": "Finished tasks by start day",
|
|
108
108
|
"{date}:当天发起的任务中已结束 {ended} 个,插手 {count} 个": "{date}: of the tasks started this day, {ended} finished, stepped into {count}",
|
|
109
|
-
"
|
|
109
|
+
"{count} 个房间": "{count} rooms",
|
|
110
|
+
"打开房间": "Open room",
|
|
111
|
+
"占 {share}": "{share} of folder",
|
|
112
|
+
"其余 {count} 个房间": "{count} more rooms",
|
|
113
|
+
"{software} · 未知模型": "{software} · unknown model",
|
|
114
|
+
"其他 {count} 个模型": "{count} other models",
|
|
115
|
+
"各模型调用占比": "Share of runs by model",
|
|
116
|
+
"按运行次数": "By runs",
|
|
117
|
+
"占比": "Share",
|
|
118
|
+
"工作流": "Workflows",
|
|
119
|
+
"按房间启用的工作流统计成员的运行;卡片是这次运行所扮演的角色,子工作流是被调用的分支流程。只含现存房间。": "Member runs grouped by the workflow enabled in the room. A card is the role the run played; a sub-workflow is a branch it called. Existing rooms only.",
|
|
120
|
+
"工作流中的运行占全部运行的 {share}": "{share} of all runs happened inside a workflow",
|
|
121
|
+
"{inside} / {runs} 次": "{inside} / {runs} runs",
|
|
122
|
+
"房间": "Rooms",
|
|
123
|
+
"打断": "Stopped",
|
|
124
|
+
"卡片与子工作流": "Cards and sub-workflows",
|
|
125
|
+
"这段时间没有按工作流进行的运行。": "No runs inside a workflow in this period.",
|
|
126
|
+
"并行峰值、文件夹、成员、工作流、洞察只含现存房间": "Peak concurrency, folders, members, workflows and insights cover existing rooms only"
|
|
110
127
|
}
|
|
@@ -24,7 +24,8 @@
|
|
|
24
24
|
"{host} · 空闲": "{host} · Idle",
|
|
25
25
|
"打开房间「{title}」": "Open the room “{title}”",
|
|
26
26
|
"松开以引用房间「{title}」": "Release to reference the room “{title}”",
|
|
27
|
-
"
|
|
27
|
+
"[房间 {title} #{id}]": "[room {title} #{id}]",
|
|
28
|
+
"[成员 {name}]": "[member {name}]",
|
|
28
29
|
"跨房发送": "Sent to another room",
|
|
29
30
|
"展开或收起发出的消息正文": "Show or hide the sent message",
|
|
30
31
|
"父房间": "parent room",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai_co_discuss",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.36",
|
|
4
4
|
"bin": {
|
|
5
5
|
"codiscuss": "runner/codiscuss.mjs"
|
|
6
6
|
},
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"@vue-flow/core": "1.48.2",
|
|
39
39
|
"@vue-flow/minimap": "1.5.4",
|
|
40
40
|
"docx-preview": "0.4.1",
|
|
41
|
+
"fake-indexeddb": "6.2.8",
|
|
41
42
|
"fflate": "0.8.3",
|
|
42
43
|
"jsqr": "1.4.0",
|
|
43
44
|
"katex": "0.18.10",
|
|
@@ -871,7 +871,14 @@ function listen_schedules(file, pid, setup) {
|
|
|
871
871
|
let offset = statSync(file).size, pending = Buffer.alloc(0), asking = false, held = [];
|
|
872
872
|
const timer = setInterval(tick, setup.interval || WINDOW_POLL_MS);
|
|
873
873
|
timer.unref();
|
|
874
|
-
|
|
874
|
+
setup.task.on_schedule_listener?.(true);
|
|
875
|
+
const listener = { crons, add: (id, cron) => crons.set(id, cron), adopt(next) {
|
|
876
|
+
if (setup.task.on_schedule_listener !== next.task.on_schedule_listener) {
|
|
877
|
+
next.task.on_schedule_listener?.(true);
|
|
878
|
+
setup.task.on_schedule_listener?.(false);
|
|
879
|
+
}
|
|
880
|
+
Object.assign(setup, next);
|
|
881
|
+
}, end };
|
|
875
882
|
schedule_listeners.set(file, listener);
|
|
876
883
|
return listener;
|
|
877
884
|
function tick() {
|
|
@@ -940,7 +947,10 @@ function listen_schedules(file, pid, setup) {
|
|
|
940
947
|
function end() {
|
|
941
948
|
clearInterval(timer);
|
|
942
949
|
crons.clear();
|
|
943
|
-
if (schedule_listeners.get(file) === listener)
|
|
950
|
+
if (schedule_listeners.get(file) === listener) {
|
|
951
|
+
schedule_listeners.delete(file);
|
|
952
|
+
setup.task.on_schedule_listener?.(false);
|
|
953
|
+
}
|
|
944
954
|
}
|
|
945
955
|
}
|
|
946
956
|
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
* as a writer of the member's session and stops it, waiting for `close`, before anything resumes that session. An
|
|
25
25
|
* adapter that does neither does not support follow-ups, and such reports are lost. Schedules: where a schedule the
|
|
26
26
|
* member set in its own software is seen to fire (profile `schedule_reports`), the adapter calls
|
|
27
|
+
* `task.on_schedule_listener(active)` retains the original task files while an idle schedule listener holds them.
|
|
27
28
|
* `task.on_schedule({id, schedule, prompt, set_at}, handle)` (`set_at`: when the schedule was set, ms) with the latest
|
|
28
29
|
* room task's callbacks and follows that turn only on `true` (the runner opened a scheduled execution for a host);
|
|
29
30
|
* `'drop'` forgets that schedule (set before the owner's last stop), `'stop'` ends its listening, anything else
|