ai_co_discuss 0.5.44 → 0.5.45

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.
@@ -4745,7 +4745,7 @@ def interrupt_member(connection, room_id, member_id, token, by_host=""):
4745
4745
  return free_view(connection, room_id)
4746
4746
 
4747
4747
 
4748
- def interrupt_for_message(connection, room_id, message_id):
4748
+ def interrupt_for_message(connection, room_id, message_id, member_id=None):
4749
4749
  """The owner's "send now" of a queued message to members still at work (user 2026-11-23, #7819): a member whose
4750
4750
  software takes an interjection hears of it in its running turn, which then also answers it; any other is
4751
4751
  interrupted and takes it, with the interrupted work, next.
@@ -4762,7 +4762,8 @@ def interrupt_for_message(connection, room_id, message_id):
4762
4762
  JOIN room_members m ON m.id=r.member_id
4763
4763
  JOIN member_executions e ON e.member_id=r.member_id AND e.status IN ('dispatched','started')
4764
4764
  LEFT JOIN execution_capabilities c ON c.execution_id=e.id
4765
- WHERE r.room_id=? AND r.message_id=? AND r.status='pending'""", (room_id, message_id)).fetchall()
4765
+ WHERE r.room_id=? AND r.message_id=? AND r.status='pending' AND (? IS NULL OR r.member_id=?)""",
4766
+ (room_id, message_id, member_id, member_id)).fetchall()
4766
4767
  steerable = [row for row in busy if (row["steer"] or row["resume"]) and row["interjections"] < MAX_INTERJECTIONS]
4767
4768
  stopped = [row for row in busy if row not in steerable]
4768
4769
  blocked = [row["name"] for row in stopped if row["stoppable"] == 0]
@@ -4785,6 +4786,30 @@ def interrupt_for_message(connection, room_id, message_id):
4785
4786
  return bool(busy)
4786
4787
 
4787
4788
 
4789
+ def queue_request_action(connection, room_id, token, payload):
4790
+ """The owner acts on a request waiting in the queue tray for a member still at work (user 2026-11-28, #15670):
4791
+ `request_send` hands it to the running execution now (an interjection, or a stop when the software takes none),
4792
+ `request_cancel` cancels that one request; the member's other work and the rest of its batch go on.
4793
+
4794
+ Raises:
4795
+ LookupError: the request has started, finished or been cancelled meanwhile.
4796
+ FileExistsError: the member can neither take an interjection nor be stopped; the request keeps waiting.
4797
+ """
4798
+ require_owner(connection, room_id, token)
4799
+ begin_write(connection)
4800
+ request = connection.execute("""SELECT id,message_id,member_id FROM member_requests
4801
+ WHERE id=? AND room_id=? AND status='pending' AND execution_id IS NULL""", (payload.get("request_id"), room_id)).fetchone()
4802
+ if not request:
4803
+ raise LookupError(Text("这条排队请求已开始、已完成或已取消"))
4804
+ if payload.get("action") == "request_send":
4805
+ interrupt_for_message(connection, room_id, request["message_id"], request["member_id"])
4806
+ else:
4807
+ record_cancel_reasons(connection, "id=?", (request["id"],), "user_stop")
4808
+ connection.execute("UPDATE member_requests SET status='cancelled' WHERE id=?", (request["id"],))
4809
+ settle_batches(connection, room_id)
4810
+ return queue_view(connection, room_id)
4811
+
4812
+
4788
4813
  def withdrawals(connection, room_id):
4789
4814
  """The room's taken-back messages by id, so the page keeps them in place while AI readers skip them."""
4790
4815
  return [{key: value for key, value in dict(row).items() if value is not None} for row in connection.execute(
@@ -25,6 +25,9 @@ QUEUED_FIELDS = ("author", "text", "reply_to", "kind", "submitted_by", "to", "se
25
25
  # Queueing is always on (user 2026-11-21, #7060): the old site switch only left messages waiting on a busy member with
26
26
  # nothing left to edit, and once off it could not be found again; `composer_settings.queueing` is no longer read.
27
27
  QUEUE_ACTIONS = ("send", "edit", "delete", "reorder", "resume")
28
+ # The member requests listed in the tray: their purposes, and how much of the message each row previews.
29
+ WAITING_PURPOSES = ("ask", "route", "group", "all")
30
+ WAITING_PREVIEW_CHARS = 2000
28
31
  QUEUE_ERRORS = (ValueError, TypeError, LookupError, PermissionError, FileExistsError)
29
32
 
30
33
 
@@ -72,12 +75,36 @@ def queue_view(connection, room_id):
72
75
  item["send_mode"] = send_mode(connection, room_id, payload)
73
76
  items.append(item)
74
77
  paused = connection.execute("SELECT 1 FROM queued_message_pauses WHERE room_id=?", (room_id,)).fetchone() is not None
75
- busy_members = [row["name"] for row in connection.execute("SELECT id,name FROM room_members WHERE room_id=? AND status='active'", (room_id,))
78
+ waiting = waiting_requests(connection, room_id)
79
+ busy_members =[row["name"] for row in connection.execute("SELECT id,name FROM room_members WHERE room_id=? AND status='active'", (room_id,))
76
80
  if member_busy(connection, row["id"])]
77
- return {"items": items, "paused": paused and bool(items), "busy": room_busy(connection, room_id),
81
+ return {"items": items, "waiting_requests": waiting, "paused": paused and bool(items), "busy": room_busy(connection, room_id),
78
82
  "host_busy": host_busy(connection, room_id), "busy_members": busy_members}
79
83
 
80
84
 
85
+ def waiting_requests(connection, room_id):
86
+ """Requests already made of members still at work, shown in the queue tray beside the owner's messages (user
87
+ 2026-11-28, #15670): the message is posted, the member takes it once its current execution ends.
88
+
89
+ Each carries its `send_mode` (`steer`, `interrupt` or `wait`, as for a queued message) for the owner's "send now",
90
+ and a preview of the message it answers. Discussion turns and manual members are left out: they do not wait on a
91
+ running execution of the runner."""
92
+ rows = connection.execute(f"""SELECT r.id,r.message_id,r.created_by,m.name AS member,msg.author,substr(msg.text,1,?) AS text,
93
+ c.stoppable,c.steer,c.resume FROM member_requests r
94
+ JOIN room_members m ON m.id=r.member_id
95
+ JOIN messages msg ON msg.id=r.message_id
96
+ JOIN member_executions e ON e.member_id=r.member_id AND e.status IN ('dispatched','started')
97
+ LEFT JOIN execution_capabilities c ON c.execution_id=e.id
98
+ WHERE r.room_id=? AND r.status='pending' AND r.execution_id IS NULL AND r.purpose IN ({",".join("?" * len(WAITING_PURPOSES))})
99
+ AND m.status='active' AND m.access='runner'
100
+ AND NOT EXISTS(SELECT 1 FROM session_requests s WHERE s.member_request_id=r.id)
101
+ ORDER BY r.id""", (WAITING_PREVIEW_CHARS, room_id, *WAITING_PURPOSES)).fetchall()
102
+ return [{"request_id": row["id"], "message_id": row["message_id"], "member": row["member"], "author": row["author"],
103
+ "created_by": row["created_by"], "text": row["text"],
104
+ "send_mode": "steer" if row["steer"] or row["resume"] else "wait" if row["stoppable"] == 0 else "interrupt"}
105
+ for row in rows]
106
+
107
+
81
108
  def send_mode(connection, room_id, payload):
82
109
  """What "send now" would do with a queued message, so its button says so before it is clicked (user 2026-11-23):
83
110
  `send` (its recipients are free), `steer` (every busy recipient takes an interjection), `interrupt` (a busy one is
package/backend/server.py CHANGED
@@ -41,7 +41,7 @@ from .remote_launch import (COMMAND_WAIT_MAX, claim_machine_commands, finish_mac
41
41
  machine_launch_action, machine_sync, pair_machine, remote_launch_status, submit_machine_command,
42
42
  submit_remote_launch)
43
43
  from .free_room import (active_members, add_member, after_free_message, after_proactive, authorize_free_write, check_answer, execution_action, free_view,
44
- inbox, interrupt_for_message, interrupt_member, member_action, member_capability, member_values, migrate_free_tables, reserve_execution,
44
+ inbox, interrupt_for_message, interrupt_member, queue_request_action, member_action, member_capability, member_values, migrate_free_tables, reserve_execution,
45
45
  room_failure_wakes, room_quiet_checkins, save_room_access, view_execution, recent_executions, MAX_MESSAGE_ID)
46
46
  from .free_room import ROOM_ATTENTION_SQL, ROOM_WAITING_SINCE_SQL, STEWARD_SESSION_TEMPLATE, convert_suggestion, message_suggestions, replace_steward_member, save_suggestions, sync_participants
47
47
  from .free_room import account_quotas, report_quota
@@ -6336,7 +6336,12 @@ class DiscussionHandler(BaseHTTPRequestHandler):
6336
6336
  connection.commit()
6337
6337
  return self.respond(result)
6338
6338
  if parts[3:] == ["queue"] and method == "POST":
6339
- result = queue_action(connection, room_id, token, self.read_payload(), post_queued, check_queued, interrupt_for_message)
6339
+ payload = self.read_payload()
6340
+ if payload.get("action") in ("request_send", "request_cancel"):
6341
+ result = queue_request_action(connection, room_id, token, payload)
6342
+ connection.commit()
6343
+ return self.respond(result)
6344
+ result = queue_action(connection, room_id, token, payload, post_queued, check_queued, interrupt_for_message)
6340
6345
  connection.commit()
6341
6346
  return self.respond(result)
6342
6347
  if parts[3:] == ["executions", "changes"] and method == "GET":
@@ -4,7 +4,7 @@ See how your work is going across all rooms: how many tasks needed no further in
4
4
 
5
5
  ## How to open it
6
6
 
7
- - **Desktop**: click "Analytics" at the bottom of the left sidebar, below "Workflows". The page fills the middle area.
7
+ - **Desktop**: click "Analytics" at the top of the sidebar. The page fills the middle area.
8
8
  - **Phone and narrow windows**: open the sidebar drawer with the top-left navigation button, then tap "Analytics".
9
9
  - **Command line**: run `codiscuss analytics [--range today|7d|30d|all] [--from YYYY-MM-DD --to YYYY-MM-DD] [--scope all|current] [--json]` on the computer for a text summary or the full JSON.
10
10
 
@@ -46,8 +46,8 @@ Use “History” to bring context from an existing local AI conversation into a
46
46
 
47
47
  ## See context and usage limits
48
48
 
49
- - **Context.** After each run, the room records how much of the member's current session context is in use, shown as a small ring with a percentage. Normally it appears on the “Context” row at the end of each member card on **Members and settings**, and under the private chat's input box. Only from 80% does the ring also appear beside the member's name and on the working card, as a hint to consider a fresh session. In the right sidebar's speaking order, the end of each member's status line always shows its context and each of its account's windows, such as “148K · 5h 44% · 7d 33%”. An account with a 7-day window but no 5-hour limit shows “5h no limit”. Click it to see the tokens used against the window size, and each usage-limit window of the account with when it resets. When the window size is unknown, there is no ring and only the tokens used are shown.
50
- - **Token usage.** At the end of an answer card, the grey line after the model and effort gives the tokens that turn took and its cache hit rate. Click it for the uncached input, cache reads, cache writes and output.
49
+ - **Context.** After each run, the room records how much of the member's current session context is in use, shown as a small ring with a percentage. Normally it appears on the “Context” row at the end of each member card on **Members and settings**, and under the private chat's input box. Only from 80% does the ring also appear beside the member's name and on the working card, as a hint to consider a fresh session. In the right sidebar's speaking order, the end of each member's status line always shows its context and each of its account's windows, such as “148K · 5h 44% · 7d 33%”. An account with a 7-day window but no 5-hour limit shows “5h no limit”. Click it to see the tokens used against the window size, and each usage-limit window of the account with when it resets. When the window size is unknown, the ring is hollow and the tokens used are shown beside it.
50
+ - **Token usage.** At the bottom right of an answer card, grey text gives the tokens that turn took and its cache hit rate. Click it for the uncached input, cache reads, cache writes and output.
51
51
  - **Account usage limits.** How much of the 5-hour, 7-day or other windows is used and when each resets; a prepaid model API shows its balance instead. Limits belong to an account rather than a member, so the top of **Members and settings** lists each account once, shared by all members of that software. When creating a room or inviting a member, the front of the member card has a “Usage limits” row to help choose the software. Once the context or any window reaches 80% the reading turns to the warning color, and at 100% to the error color, since the next task would fail. When an account window reaches 80%, the most used one appears beside the names of the members on that account, such as “7d 99%”, since work handed to them may fail. Antigravity counts limits per group of models, so only the group of the member’s current model is shown.
52
52
  - **Where the readings come from.** Claude Code brings its limits back while it runs, so after a quiet spell the reading is older; point at it to see when it was read. This computer asks Codex every 10 minutes and Antigravity CLI every 30 minutes (after a failed read, not again for 6 hours, because agy may open a sign-in page when the network drops). Claude Code does not report its context window (except for models marked 1M), so only the tokens used are shown. Among model APIs, only DeepSeek's official address reports a balance; other APIs and app connections show no limits. The host can read the same values in the room state and use them when handing out work.
53
53
 
@@ -4,7 +4,7 @@ MOSS (formerly Platform steward) is a local AI that handles platform tasks, answ
4
4
 
5
5
  ## How to use it
6
6
 
7
- 1. The top of the sidebar lists “New room,” “MOSS,” “Workflows,” and “Analytics.” Select “MOSS,” pick one AI app under “Choose MOSS software,” and select “Start conversation.” When the conversation is first created, MOSS uses “Room overview,” if allowed, to summarize your project rooms, what needs your attention, and any setup gaps it can verify.
7
+ 1. The top of the sidebar lists “New room,” “MOSS,” “Workflows,” and “Analytics.” Select “MOSS,” pick an AI app, and select “Start conversation.” When the conversation is first created, MOSS uses “Room overview,” if allowed, to summarize your project rooms, what needs your attention, and any setup gaps it can verify.
8
8
  2. Type a request such as “Which rooms need me?” or “Why did this run fail?” The room overview includes room links and references. Troubleshooting reads the guide, event records, execution details, and relevant logs. For a room-specific task, include the room link or ID. You can also start a request from the relevant page.
9
9
  - **Review dispatches.** In Analytics, select “AI analysis” in the dispatch review section. The button appears only when the `dispatch-analysis` skill is available and allowed. The review runs on request only and reports its findings separately from the measured statistics.
10
10
  - **Make a room share card.** In the target room’s menu, choose “Share → Make a share card with AI.” The request includes the target room so the steward knows where to find the source material.
@@ -30,12 +30,12 @@ Rerunning setup replaces selected bundled workflows with the package versions. B
30
30
 
31
31
  ### 3. Create or edit workflows with workflow-creator
32
32
 
33
- You can create or import a ZIP file or folder with the “+” on the Workflows page. You can also ask an AI with the bundled workflow-creator skill to draft and validate a workflow:
33
+ Select “Workflows” at the top of the sidebar to open its own page. Use “New” or “Import” in the top right to create a workflow or import a ZIP file or folder. You can also ask an AI with the bundled workflow-creator skill to draft and validate a workflow:
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, or whose project has no workflows yet, 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.
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. The Workflows page groups cards under “Global” and each saved project. Each card shows the name, description, avatars for the software its experts use, sub-workflows, and status. 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.
38
+ - **Choose where to save.** Select “New” or “Import,” then choose the global library or a project. 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
@@ -44,7 +44,7 @@ When you open a canvas on a paired device, templates, scripts, and other support
44
44
 
45
45
  Edit the “Short description” directly above the workflow text. It wraps to the panel width so you can read the full description.
46
46
 
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.”
47
+ 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. 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.”
48
48
 
49
49
  - **The canvas is a diagram:** You can move cards, add host nodes, user nodes (to show where you step in, confirm, or speak), and conditional branch nodes (splitting into multiple named branches, each with its own output dot on the right; select to add, rename, or remove branches), connect nodes to show order, parallel branches, or loops, add notes to connections, or choose “Auto arrange.” Click a connection or its note to select it before editing; once a gold loop is selected, drag it up or down to change its height. Dragging an unselected connection or note just pans the canvas. The program does not execute canvas connections, and the host cannot see the canvas.
50
50
  - **Other files in a workflow:** Like a skill, a workflow folder can hold `references/`, templates, scripts and other files beside `SKILL.md`, which the host reads as needed. The right panel has a path bar like the “Files” tab and shows `SKILL.md` first; click “Files” in the path bar to list the folder (role cards, the canvas and sub-workflows are not listed; they are on the canvas) and open any file to read and edit it. Each file is saved on its own (“Save” or `Ctrl+S`), without the Workflows page’s “Save”; a file changed elsewhere since you opened it is refused with a reload prompt. “New file” at the top right of a folder adds a file, and a row’s delete button deletes it on the second click. An unsaved workflow, a workflow in a read-only project and `commands.json` are view-only. An expert’s “Skills” in “Experts” uses the same control.
@@ -16,7 +16,7 @@ Message a member or host, understand main and branch work and assignment labels,
16
16
  - When you send an image, the page keeps its local preview. The message receipt and member status updates preserve your reading position after sending.
17
17
  - **Send several messages in a row.** You can send the next message while the previous one still shows “Sending…”. If the room is busy and a message is expected to queue, it appears immediately above the composer. The confirmed queue entry takes its place. The browser submits messages in order and continues if one fails. The failed card keeps the original text and attachments so you can resend or discard it. Sending and network retries continue if you switch rooms. Return to the original room to find its failed cards. Refreshing or closing the page clears unsent messages held by that page.
18
18
 
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.
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, the request takes no card in the message stream; it is listed in the queue above the composer (see “Manage queued messages” below). The working card appears in place when the member starts. If smart scheduling needs to choose the recipient, the page shows scheduling progress.
20
20
 
21
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” onto the messages or the composer to insert `[member Name]` at the cursor (or where you drop it, when you drop it in the composer itself) (without `@`, so it is not woken), for mentioning a member in a message without addressing it.
22
22
 
@@ -45,7 +45,7 @@ Room work can run on several lines in parallel. Labels at the top of a card show
45
45
 
46
46
  ### 3. Manage queued messages
47
47
 
48
- New messages wait above the composer while the intended member or room is busy. They are sent when the recipient or room becomes available. Your answers on an answer card work the same way: while the member who asked is still busy, the answer is recorded, but the share for that member waits in the queue, marked “#N is posted; it goes to … once free”.
48
+ New messages wait above the composer while the intended member or room is busy. They are sent when the recipient or room becomes available. Your answers on an answer card work the same way: while the member who asked is still busy, the answer is recorded, but the share for that member waits in the queue, marked “#N is posted; it goes to … once free”. Messages that the host or you sent to a busy member are listed there too, marked “who → who” and “#N sent; … takes it after finishing the current task”. Click the send button to have the member handle it now (interjection or interruption), or delete it to cancel that request. These rows cannot be edited or reordered.
49
49
 
50
50
  - **Not waiting.** Select the send button on a queued item (on desktop it shows “Send now”, “Steer”, or “Interrupt and send”; on phones it shows the arrow icon alone); hover over it to see what it will do:
51
51
  - The recipient is free: it goes at once.
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## 怎么打开
6
6
 
7
- - **电脑**:点击左栏最下方、“工作流”下面的“统计”,中间区整页打开统计视图。
7
+ - **电脑**:点侧栏顶部的“统计”,中间区整页打开统计视图。
8
8
  - **手机与窄屏**:点左上角导航按钮打开左栏抽屉,再点“统计”。
9
9
  - **命令行**:在电脑上运行 `codiscuss analytics [--range today|7d|30d|all] [--from YYYY-MM-DD --to YYYY-MM-DD] [--scope all|current] [--json]` 查看文字摘要或完整 JSON。
10
10
 
@@ -46,8 +46,8 @@
46
46
 
47
47
  ## 查看上下文与额度
48
48
 
49
- - **上下文**:成员每做完一次,房间记下它当前会话的上下文已用多少,用一个小圆环加百分比表示。平时显示在“成员与设置”每张成员卡末尾的“上下文”一行,以及私聊页输入框下方。用到 80% 以上时,圆环才会出现在成员名旁和正在工作的卡片上,提醒你考虑让它新开会话。右栏发言顺序里,每位成员状态行的右端常显上下文和账号的各个额度窗口(如“148K · 5h 44% · 7d 33%”)。账号只有 7 天窗口、没有 5 小时限制时写“5h 不限”。点一下圆环,可以看到已用 / 窗口大小的 token 数,以及该账号各个额度窗口的用量和重置时间。读不到窗口大小时没有圆环,只显示已用的 token 数。
50
- - **Token 用量**:回答卡末尾的灰字里,模型和强度后面是这一轮用了多少 token 和缓存命中率。点开可以看未缓存输入、缓存读取、缓存写入和输出的明细。
49
+ - **上下文**:成员每做完一次,房间记下它当前会话的上下文已用多少,用一个小圆环加百分比表示。平时显示在“成员与设置”每张成员卡末尾的“上下文”一行,以及私聊页输入框下方。用到 80% 以上时,圆环才会出现在成员名旁和正在工作的卡片上,提醒你考虑让它新开会话。右栏发言顺序里,每位成员状态行的右端常显上下文和账号的各个额度窗口(如“148K · 5h 44% · 7d 33%”)。账号只有 7 天窗口、没有 5 小时限制时写“5h 不限”。点一下圆环,可以看到已用 / 窗口大小的 token 数,以及该账号各个额度窗口的用量和重置时间。读不到窗口大小时画空心圆环,旁边写已用的 token 数。
50
+ - **Token 用量**:回答卡右下角的灰字是这一轮用了多少 token 和缓存命中率。点开可以看未缓存输入、缓存读取、缓存写入和输出的明细。
51
51
  - **账号额度**:5 小时、7 天等时间窗已经用了多少、什么时候重置;预付费的模型 API 显示余额。额度属于账号而不是某位成员,所以“成员与设置”顶部按账号各列一行,同一软件的几位成员共用这一行。新建房间和邀请成员时,成员卡正面有“额度”一行,方便选软件。上下文或任一额度窗口用到 80% 时显示警示色,用完(100%)时显示错误色,因为再派活必然失败。某个账号的额度窗口达到 80% 时,用这个账号的成员名旁会直接写出用得最多的窗口,例如“7d 99%”,因为接下来派给它的活可能失败。Antigravity 按模型分组计额度,只显示成员当前模型所在的那一组。
52
52
  - **数据从哪来**:Claude Code 的额度在它执行时顺带带回,一段时间没用就是旧数据,鼠标指向能看到读取时间。Codex 由本机每 10 分钟主动查一次,Antigravity CLI 每 30 分钟查一次(查询失败后 6 小时内不再查,因为 agy 在网络中断时可能弹出登录页)。Claude Code 的上下文窗口大小读不到(模型带 1M 标记的除外),所以只显示已用的 token 数。模型 API 目前只有 DeepSeek 官方地址能查余额;其他 API 和 App 接入的成员不显示额度。主持人在房间状态里也能读到这些数据,可以据此派活。
53
53
 
@@ -4,7 +4,7 @@ MOSS(原“平台主理人”)是处理平台事务的本机 AI。它能回
4
4
 
5
5
  ## 怎么操作
6
6
 
7
- 1. 侧栏顶部依次是“新建房间”“MOSS”“工作流”“统计”。点“MOSS”,首次使用时在“选择 MOSS 软件”中选一个 AI 软件,再点“开始对话”。首次创建对话后,如果允许“房间总览”技能,MOSS 会先概述项目房间、需要你处理的事项和可核实的配置缺项。
7
+ 1. 侧栏顶部依次是“新建房间”“MOSS”“工作流”“统计”。点“MOSS”,首次使用时选一个 AI 软件,再点“开始对话”。首次创建对话后,如果允许“房间总览”技能,MOSS 会先概述项目房间、需要你处理的事项和可核实的配置缺项。
8
8
  2. 在对话里直接打字。你可以问“哪些房间等我处理”或“这个执行为什么失败”。房间概览附房间链接和对应编号,排障只读取手册、事件记录、执行详情和相关日志。要处理某个房间的事务,可以写明房间链接或编号,也可以从对应页面发起请求。
9
9
  - **分析派活**:在“统计”的“主持人调度得怎样”一节点“AI 分析”。只有 `dispatch-analysis` 技能可用且获准使用时才显示。分析仅手动触发,结果单独呈现,不会改写统计数字。
10
10
  - **制作房间分享卡**:在目标房间的菜单选择“分享 → AI 制作分享卡”。请求会附上目标房间,供主理人取材。
@@ -26,16 +26,16 @@
26
26
  - **成员卡片与角色对应**:主工作流里的每张卡片对应一个角色(含分工描述、专属提示词、软件、模型、强度和项目权限),启用时主持人按卡片加入缺少的成员,已绑定且在场的成员沿用原身份,已离开的请回。子工作流的角色在用到时加入。工作流卡片的提示词在房间里只读,需要改时在左栏“工作流”页修改。
27
27
  3. **补齐新增角色**:如果后来在工作流里加了新卡片,已启用它的房间不会自动加人;主持人用到时会自己补上,你也可以在右栏工作流一行点刷新图标立即补齐。
28
28
  4. **使用子工作流**:工作流运行中,在输入框打 `/` 会多出“工作流「名称」的子工作流”分组,选一项发给主持人即按子流程处理;用完相关成员会被设为离开,会话保留。
29
- 5. **停用与请离**:在顶部“房间”页 → “成员与设置” → “协作设置”的工作流一行点请离成员图标,工作流带来的成员会离开(主持人保留),进行中的工作随之停止,工作流结束。成员会话仍保留,下次再选该工作流会把原成员请回。若要在库里全局停用某个工作流,点左栏“工作流”列表项右侧“…” → “停用”。
29
+ 5. **停用与请离**:在顶部“房间”页 → “成员与设置” → “协作设置”的工作流一行点请离成员图标,工作流带来的成员会离开(主持人保留),进行中的工作随之停止,工作流结束。成员会话仍保留,下次再选该工作流会把原成员请回。若要在库里停用某个工作流,打开侧栏顶部的“工作流”页面,在该工作流卡片的菜单里点“停用”。
30
30
 
31
31
  ### 3. 用 `workflow-creator` 新建或修改工作流
32
32
 
33
- 你既可以在左栏“工作流”点“+”手动新建或导入 `.zip`/文件夹,也可以直接让 AI 用随包安装的 `workflow-creator` 技能帮你起草和校验:
33
+ 点侧栏顶部的“工作流”打开独立页面。用页面右上角的“新建”或“导入”手动创建或导入 `.zip` 或文件夹,也可以让 AI 用随包安装的 `workflow-creator` 技能帮你起草和校验:
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` 的分工
@@ -44,7 +44,7 @@
44
44
 
45
45
  在正文上方可直接编辑“一句话描述”。描述会按面板宽度换行,完整显示。
46
46
 
47
- 在左栏“工作流”列表点一项,中间打开流程画布,右侧显示它的 `SKILL.md`(点“编辑”可修改,点“保存”或 `Ctrl+S` 保存。工作流在你打开之后被别处改过时,保存会被拒绝,页面提示“工作流已被修改,请重新载入”,点“重新载入”读取新版,未保存的修改会先询问是否放弃;导入的工作流和库里已有的同 ID 时,要点“覆盖保存”才会整份替换):
47
+ 在“工作流”页面点一张卡片,中间打开流程画布,右侧显示它的 `SKILL.md`。点左上角“返回工作流”回到列表。点“编辑”可修改,点“保存”或 `Ctrl+S` 保存。工作流在你打开之后被别处改过时,保存会被拒绝,页面提示“工作流已被修改,请重新载入”,点“重新载入”读取新版,未保存的修改会先询问是否放弃。导入的工作流和库里已有的同 ID 时,要点“覆盖保存”才会整份替换。
48
48
 
49
49
  - **画布只帮你看懂**:你可以拖动卡片、添加主持人节点、用户节点(示意需要你介入、确认或发言的位置)和条件分支节点(按条件分成多条执行分支,每个分支各有独立的右侧连线圆点,选中后可增删和重命名分支)、从节点右侧圆点拖线表示先后、并行多路或循环(金色虚线表示循环)、写连线说明,或点“自动整理”。连线和说明要先单击选中才能编辑;选中金色循环线后,按住它上下拖动可调整高度。没选中时,在连线或说明上拖动只会平移画布。**程序不执行画布连线,主持人也看不到画布。**
50
50
  - **工作流的其他文件**:和技能一样,工作流文件夹里除了 `SKILL.md` 还可以有 `references/`、模板、脚本等资料,主持人按需读取。右侧面板顶部有一条和“文件”页相同的路径栏,默认显示 `SKILL.md`;点路径栏的“文件”列出文件夹里的文件(角色卡片、画布和子工作流不在其中,它们在画布上),点开即可阅读和修改。资料文件逐个直接保存(“保存”或 `Ctrl+S`),不需要点工作流页的“保存”;文件在你打开之后被别处改过时会拒绝保存并提示重新载入。文件夹右上角的“新建文件”可以添加文件,行尾的删除钮点两次删除。未保存的工作流、只读项目里的工作流和 `commands.json` 只能查看。专家配置的“技能”用的是同一个控件。
@@ -16,7 +16,7 @@
16
16
  - 发送图片时,当前页面沿用本机预览。消息回执和成员执行状态出现时,页面保留刚发送时的阅读位置。
17
17
  - **连续发送与失败重试**:上一条仍显示“发送中…”时可以发送下一条。房间正忙、消息预计需要排队时,每条先显示在输入框上方的排队列表里,网站确认后在原位成为正式排队项。浏览器按点击顺序提交,单条失败后继续发送后续消息。失败卡保留原文和附件,可点“重新发送”或“放弃”。切到其他房间后,发送和网络重试会继续;回到原房间还能找到失败卡。刷新或关闭页面会清除本页未发出的消息。
18
18
 
19
- 网站返回消息编号后,已确定的接收成员会显示在消息下方。自动接入的成员正忙并需等当前工作结束时,这里会显示带时钟图标的一行排队提示,列出成员名和等完要处理的消息编号。把鼠标移到提示上可看已等时长。成员开工后,执行卡会在原位置出现。需要智能调度决定接收者时,页面显示调度进度。
19
+ 网站返回消息编号后,已确定的接收成员会显示在消息下方。自动接入的成员正忙并需等当前工作结束时,这份请求不在消息流里占卡,而是列在输入框上方的排队区(见下文“管理排队消息”)。成员开工后,执行卡会在原位置出现。需要智能调度决定接收者时,页面显示调度进度。
20
20
 
21
21
  消息区左侧的快速导航只列出用户和成员的发言。悬停刻度可预览,点击可跳到对应卡片。在右栏“发言顺序”的成员行上点“…”或右键选“定位最新发言”(手机、平板上点一下成员行即弹出这份菜单;电脑上悬停成员行弹出的成员卡片里也有同名按钮),可直接跳到该成员的最新一条发言或正在进行中的执行卡片。在电脑上把右栏“发言顺序”里的成员行拖到消息区或输入框,会在光标处(直接落在输入框里时为落点)插入 `[成员 名称]`(不带 `@`,不会唤醒它),用于在消息里提到某位成员而不点名。
22
22
 
@@ -45,7 +45,7 @@
45
45
 
46
46
  ### 3. 管理排队消息
47
47
 
48
- 成员正忙时,你发送的新消息会自动停留在输入框上方的排队区,等对应成员或房间空闲后自动发出。你在答题卡上的回答也一样:提问的成员还在忙时,回答已经记下,但交给它的那份留在排队区,写着“#N 已发出,等某某空闲后交给它”。
48
+ 成员正忙时,你发送的新消息会自动停留在输入框上方的排队区,等对应成员或房间空闲后自动发出。你在答题卡上的回答也一样:提问的成员还在忙时,回答已经记下,但交给它的那份留在排队区,写着“#N 已发出,等某某空闲后交给它”。主持人或你发给正忙成员的消息也列在这里,写着“谁 → 谁”和“#N 已发出,等某某做完当前这件后接”,可以点发送按钮让它现在就处理(插话或打断),或点删除取消这份请求;这类排队项不能编辑或拖动顺序。
49
49
 
50
50
  - **不想等**:点排队项右侧的发送按钮(电脑上会显示“立即发送”“插话”或“打断并发送”,手机上仅显示箭头图标),悬停可看到点了之后会怎样:
51
51
  - 接收者空闲:马上发出。
@@ -1027,5 +1027,6 @@
1027
1027
  "不能把文件夹移到自身或子文件夹中": "A folder cannot be moved into itself or one of its subfolders",
1028
1028
  "部分云盘文件未能删除,请重试": "Some cloud drive files could not be deleted; try again",
1029
1029
  "云空间已用 {used} MiB,上限 {quota} MiB。可以清空回收站后重试。": "The cloud space has {used} MiB used of {quota} MiB. You can empty the recycle bin and try again.",
1030
- "该项目已开始彻底删除,无法还原": "This item is already being permanently deleted and cannot be restored"
1030
+ "该项目已开始彻底删除,无法还原": "This item is already being permanently deleted and cannot be restored",
1031
+ "这条排队请求已开始、已完成或已取消": "This queued request has already started, finished or been cancelled"
1031
1032
  }
@@ -7,9 +7,6 @@
7
7
  "共议": "CoDiscuss",
8
8
  "房间视图": "Room views",
9
9
  "工作流": "Workflows",
10
- "新建或导入工作流": "New or import workflow",
11
- "新建或导入": "New or import",
12
- "工作流列表": "Workflow list",
13
10
  "未命名工作流": "Untitled workflow",
14
11
  "未保存": "Unsaved",
15
12
  "新名称": "New name",
@@ -20,7 +17,6 @@
20
17
  "「{name}」的更多操作": "More actions for “{name}”",
21
18
  "更多操作": "More actions",
22
19
  "连接本机服务后管理工作流": "Connect the local service to manage workflows",
23
- "暂无工作流": "No workflows yet",
24
20
  "账号与设置:{name}": "Account and settings: {name}",
25
21
  ",": ", ",
26
22
  "网站已连接": "Online",
@@ -530,5 +526,14 @@
530
526
  "固定房间": "Pin room",
531
527
  "取消固定": "Unpin",
532
528
  "已固定": "Pinned",
533
- "已固定的房间不能存档": "Pinned rooms can't be archived"
529
+ "已固定的房间不能存档": "Pinned rooms can't be archived",
530
+ "有工作流需要处理": "A workflow needs attention",
531
+ "返回工作流": "Back to workflows",
532
+ "未命名项目": "Unnamed project",
533
+ "导入": "Import",
534
+ "还没有工作流。点右上角“新建”,或导入别人分享的工作流。": "No workflows yet. Choose “New” at the top right, or import one someone shared.",
535
+ "还没有说明": "No description yet",
536
+ "{count} 位专家": "{count} experts",
537
+ "{count} 个子工作流": "{count} sub-workflows",
538
+ "这个项目还没有工作流": "No workflows in this project yet"
534
539
  }
@@ -3,7 +3,6 @@
3
3
  "等待中": "Waiting",
4
4
  "等待中:等当前执行结束": "Waiting for the current run to finish",
5
5
  "排队中:等当前执行结束": "Queued: waiting for the current run to finish",
6
- "{member} 排队中:做完当前这件后接 #{message}": "{member} is queued to take #{message} after finishing the current task",
7
6
  "排队中:等上一轮结束": "Queued: waiting for the previous round to finish",
8
7
  "正在唤醒": "Waking up",
9
8
  "等待开始…": "Waiting to start…",
@@ -963,9 +963,7 @@
963
963
  "信任并启用": "Trust and enable",
964
964
  "当前项目": "Current project",
965
965
  "只读目录": "Read-only folder",
966
- "暂无项目工作流": "No project workflows yet",
967
966
  "全局": "Global",
968
- "暂无全局工作流": "No global workflows yet",
969
967
  "导入到当前项目({name})": "Import to current project ({name})",
970
968
  "导入到全局": "Import to global",
971
969
  "导出「{value1}」(项目)": "Export “{value1}” (Project)",
@@ -1074,5 +1072,9 @@
1074
1072
  "已用 {value1}": "{value1} used",
1075
1073
  "上下文": "Context",
1076
1074
  "账号额度": "Account usage limits",
1077
- "{name} 不限": "{name} no limit"
1075
+ "{name} 不限": "{name} no limit",
1076
+ "{author} → {member}": "{author} → {member}",
1077
+ "#{message} 已发出,等 {member} 做完当前这件后接": "#{message} sent; {member} takes it after finishing the current task",
1078
+ "取消这条请求,{member} 不再处理它": "Cancel this request; {member} will not handle it",
1079
+ "取消排队请求": "Cancel queued request"
1078
1080
  }
@@ -44,28 +44,23 @@
44
44
  "问我各房间现在怎么样、有什么等你处理;平台的安装、部署和配置也可以交给我。": "Ask me how your rooms are doing or what is waiting for you. I can also take care of installing, deploying and configuring the platform.",
45
45
  "给 MOSS 发消息": "Message MOSS",
46
46
  "允许 MOSS 新建房间": "Allow MOSS to create rooms",
47
- "关闭后 MOSS 不能新建房间,也不能给其他房间的主持人传话。": "When off, MOSS cannot create rooms or pass messages to other rooms' hosts.",
48
47
  "MOSS 正在工作,换软件会在它空闲后生效": "MOSS is working. The software change takes effect once it is idle.",
49
48
  "由 MOSS 新建": "Created by MOSS",
50
49
  "MOSS 建房时的成员": "Members of rooms MOSS creates",
51
50
  "设 {name} 为主持人": "Make {name} the host",
52
51
  "移出 {name}": "Remove {name}",
53
- "新房间的成员用本机保存的默认模型与强度;项目权限沿用你保存的新建房间项目权限,最高为可写,未设置时只读。": "Members of new rooms use this computer's saved default model and effort. Project access follows your saved new-room setting, at most write access, read-only if none.",
54
52
  "已记下,同类提醒不再告诉你": "Noted. MOSS won't tell you about this kind of thing again.",
55
53
  "为什么不用告诉你?一句话即可": "Why don't you need this? One sentence is enough",
56
54
  "不用告诉你的原因": "Why you don't need this",
57
55
  "这条不用告诉我": "Don't tell me about this",
58
56
  "主动汇报": "Proactive reports",
59
57
  "让 MOSS 主动汇报": "Let MOSS report proactively",
60
- "默认关闭。开启后,房间等你回答时 MOSS 立即告诉你,其他事攒到简报时间一起说;只在活跃时段内汇报,会消耗 MOSS 所用软件的额度。": "Off by default. When on, MOSS tells you right away when a room is waiting for your answer and saves everything else for the digest. It reports only during active hours and uses the quota of MOSS's software.",
61
58
  "活跃时段": "Active hours",
62
59
  "活跃时段开始": "Active hours start",
63
60
  "活跃时段结束": "Active hours end",
64
61
  "简报时间": "Digest time",
65
62
  "交代给 MOSS 的职责": "Duties given to MOSS",
66
63
  "删除职责:{text}": "Delete duty: {text}",
67
- "还没有职责,MOSS 不会主动汇报。在对话里交代一句即可,例如“有房间等我回答时提醒我”,它会记下。": "No duties yet, so MOSS won't report. Tell it in the conversation, for example “Remind me when a room is waiting for my answer”, and it will note it.",
68
- "在对话里交代一句即可,例如“有房间等我回答时提醒我”,它会记下。": "Tell MOSS in the conversation, for example “Remind me when a room is waiting for my answer”, and it will note it.",
69
64
  "已屏蔽的提醒": "Muted reminders",
70
65
  "原因:{reason}": "Reason: {reason}",
71
66
  "恢复提醒:{text}": "Unmute: {text}",
@@ -93,7 +88,6 @@
93
88
  "未指定,将使用第一位本机已配置的 AI": "Not set; the first AI configured on this computer will be used",
94
89
  "先给 MOSS 选一个软件": "Choose software for MOSS first",
95
90
  "MOSS 用你选的 AI 软件工作。选好后点“开始对话”,它会先说说现在各房间的情况。": "MOSS works through the AI software you choose. Pick one and select “Start conversation”; it will begin by telling you how your rooms are doing.",
96
- "MOSS 能做什么": "What MOSS can do",
97
91
  "告诉你各房间现在怎么样、哪里在等你。": "Tell you how each room is doing and where you're needed.",
98
92
  "直接办平台的事:安装、部署、配置、排障。": "Handle platform tasks itself: installing, deploying, configuring and troubleshooting.",
99
93
  "项目上的事,开房间交给其他 AI,做完回来向你汇报。": "Hand project work to other AIs in a room of its own, and report back when it's done.",
@@ -118,5 +112,18 @@
118
112
  "存档后房间移入已存档列表,记录保留,可随时恢复。": "The room moves to the archived list. Its history is kept and it can be restored at any time.",
119
113
  "MOSS 已改回只读": "MOSS is read-only again",
120
114
  "改回只读": "Make read-only",
121
- "MOSS 将只能读取,不能运行命令或改本机文件;之后安装、部署、占用盘点时会先问你是否调高。": "MOSS will only read: it can't run commands or change files on this computer. Installing, deploying or a storage inventory will ask you to raise it first."
115
+ "MOSS 将只能读取,不能运行命令或改本机文件;之后安装、部署、占用盘点时会先问你是否调高。": "MOSS will only read: it can't run commands or change files on this computer. Installing, deploying or a storage inventory will ask you to raise it first.",
116
+ "软件默认强度": "Software default effort",
117
+ "高级": "Advanced",
118
+ "先选一个软件": "Choose a software first",
119
+ "上下文 {percent}% · {used} / {window}": "Context {percent}% · {used} / {window}",
120
+ "更多": "More",
121
+ "默认只读;要运行命令时会先问你是否调高。": "Read-only by default; MOSS asks you before raising it to run commands.",
122
+ "关闭后 MOSS 不能建房,也不能给其他房间传话。": "When off, MOSS can't create rooms or pass messages to other rooms.",
123
+ "新房间用本机保存的默认模型与强度,项目权限最高为可写。": "New rooms use this computer's saved default model and effort, with project access up to write.",
124
+ "等你回答时立即告诉你,其他事攒到简报时间;会消耗 MOSS 所用软件的额度。": "Tells you at once when you're needed and saves the rest for the digest; uses the quota of MOSS's software.",
125
+ "还没有职责,MOSS 不会主动汇报。在对话里交代一句,它会记下。": "No duties yet, so MOSS won't report. Tell it one in the conversation and it will note it.",
126
+ "在对话里交代一句,MOSS 会记下。": "Tell MOSS a duty in the conversation and it will note it.",
127
+ "全部工作流": "All workflows",
128
+ "在房间里用输入框的“/”或右栏启用。": "Turn one on in a room with “/” in the message box or from the side panel."
122
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai_co_discuss",
3
- "version": "0.5.44",
3
+ "version": "0.5.45",
4
4
  "bin": {
5
5
  "codiscuss": "runner/codiscuss.mjs"
6
6
  },
@@ -22,6 +22,7 @@ const INBOX_CHECK_MS = 90_000;
22
22
  // Claude Code 2.1.332 omits the context window. Only its explicit [1m] model variant tells it (one million tokens); a plain
23
23
  // ID is left unknown, as `claude-opus-5-5` was seen holding 257K tokens (2026-11-27, runner log claude-free-9343).
24
24
  const CLAUDE_EXTENDED_WINDOW = 1_000_000;
25
+ const CLAUDE_STANDARD_WINDOW = 200_000;
25
26
  // How often an open window's session log is read for the end of the turn that took a task.
26
27
  const WINDOW_POLL_MS = 3_000;
27
28
  // How much of a schedule's prompt marks the turn its fire starts (see `listen_schedules`).
@@ -1377,8 +1378,9 @@ function claude_usage(id, { env, home, log_path, profile } = {}) {
1377
1378
  const usage = message?.usage;
1378
1379
  // The API returns the plain model ID; only the member's own setting says it asked for the 1M variant.
1379
1380
  const extended = [message?.model, profile?.model].some(model => String(model || '').includes('[1m]'));
1380
- const context = usage && { used: usage.input_tokens + (usage.cache_read_input_tokens || 0) + (usage.cache_creation_input_tokens || 0),
1381
- window: extended ? CLAUDE_EXTENDED_WINDOW : 0 };
1381
+ const used = usage ? usage.input_tokens + (usage.cache_read_input_tokens || 0) + (usage.cache_creation_input_tokens || 0) : 0;
1382
+ // Claude's windows are 200K or 1M: a context past 200K can only be in the 1M one (seen 733K on a plain ID, #15675).
1383
+ const context = usage && { used, window: extended || used > CLAUDE_STANDARD_WINDOW ? CLAUDE_EXTENDED_WINDOW : 0 };
1382
1384
  const turn = entries.length ? claude_turn(entries) : null;
1383
1385
  return context || windows.length || turn ? { context, account: { windows }, turn } : null;
1384
1386
  }
@@ -2394,6 +2394,18 @@ function library_projects(home, input, restricted = false) {
2394
2394
  });
2395
2395
  }
2396
2396
 
2397
+ /** List saved projects independently of the active room, using the same IDs as project-scoped operations. */
2398
+ function saved_workflow_projects(home, restricted) {
2399
+ const grant = restricted ? { roots: remote_roots(granted_projects(home)), home } : null;
2400
+ const roots = new Map();
2401
+ for (const { kind, id, name, path } of account_roots(home)) {
2402
+ if (kind !== 'project' || roots.has(id) || !statSync(path, { throwIfNoEntry: false })?.isDirectory()
2403
+ || (grant && !remote_allows(path, grant))) continue;
2404
+ roots.set(id, { id, name, path, readonly: false, primary: false });
2405
+ }
2406
+ return [...roots.values()];
2407
+ }
2408
+
2397
2409
  function project_store(home, root) {
2398
2410
  return { service_home: home, project_dir: root.path, project_id: root.id, root };
2399
2411
  }
@@ -2431,7 +2443,8 @@ export function workflows_command(home, input = {}, restricted = false) {
2431
2443
  if (action === 'trust') input = { ...input, scope: 'project' };
2432
2444
  if (restricted && input.folder) throw new Error('其他设备请选择 zip 或文件夹导入工作流');
2433
2445
  if (input.scope && !['global', 'project'].includes(input.scope)) throw new Error('工作流作用域无效');
2434
- const roots = ['list', 'copy', 'move', 'save-preset'].includes(action) || input.scope === 'project' ? library_projects(home, input, restricted) : [];
2446
+ const roots = action === 'list' && input.all_projects === true ? saved_workflow_projects(home, restricted)
2447
+ : (['list', 'copy', 'move', 'save-preset'].includes(action) || input.scope === 'project' ? library_projects(home, input, restricted) : []);
2435
2448
  if (action === 'list') {
2436
2449
  const global = workflow_library(home);
2437
2450
  const project_workflows = roots.flatMap(root => list_workflows(project_store(home, root), name => card_platform_ready(home, name))
@@ -449,7 +449,7 @@ function write_sub_workflows(staging, list, carry) {
449
449
  */
450
450
  function write_cards(directory, agents, carry = { folders: new Map(), replace: true }) {
451
451
  for (const { card, system_prompt, name, skills, knowledge, ...fields } of agents) {
452
- const platform = name.slice(0, name.length - card.length - 1);
452
+ const platform = card_platform({ name, card });
453
453
  const text = serialize_markdown({ name: card, platform, ...Object.fromEntries(CARD_FIELDS.slice(1).map(key => [key, fields[key]])) }, system_prompt);
454
454
  const saved = carry.folders.get(card);
455
455
  if (!saved && skills === undefined && knowledge === undefined) { writeFileSync(join(directory, `${card}.md`), text); continue; }
@@ -690,6 +690,11 @@ export function read_workflow_files(files) {
690
690
  return { workflow, ignored: [...new Set(ignored)].sort() };
691
691
  }
692
692
 
693
+ /** Recover the platform key by removing the normalized card ID suffix. */
694
+ function card_platform({ name, card }) {
695
+ return name.slice(0, name.length - card.length - 1);
696
+ }
697
+
693
698
  /** Summaries for the library list; a broken folder is listed with its error instead of hiding it. */
694
699
  export function list_workflows(home, card_ready = null) {
695
700
  return with_workflow_lock(home, () => {
@@ -700,15 +705,18 @@ export function list_workflows(home, card_ready = null) {
700
705
  try {
701
706
  const workflow = read_saved_workflow(home, id);
702
707
  // Cards whose software this computer has not set up: the workflow cannot bring them until they change platform.
703
- const unavailable = card_ready ? workflow_cards(workflow).filter(agent => !card_ready(agent.name)).map(agent => ({
704
- card: agent.card, label: agent.label || agent.card, platform: agent.name.slice(0, agent.name.length - agent.card.length - 1),
708
+ const all_cards = workflow_cards(workflow);
709
+ const unavailable = card_ready ? all_cards.filter(agent => !card_ready(agent.name)).map(agent => ({
710
+ card: agent.card, label: agent.label || agent.card, platform: card_platform(agent),
705
711
  ...(agent.sub_workflow ? { sub_workflow: agent.sub_workflow } : {}) })) : [];
706
712
  return { id, label: workflow.label || id, description: workflow.description,
707
713
  ...(workflow.author ? { author: workflow.author } : {}),
708
714
  ...(workflow.source ? { source: workflow.source } : {}),
709
- cards: workflow.agents.length, directory: workflow.directory, ...project_trust(home, workflow),
715
+ cards: workflow.agents.length, total_cards: all_cards.length, sub_workflow_count: workflow.sub_workflows.length,
716
+ card_platforms: all_cards.map(card_platform),
717
+ directory: workflow.directory, ...project_trust(home, workflow),
710
718
  ...(unavailable.length ? { unavailable } : {}), ...flag };
711
- } catch (error) { return { id, label: id, description: '', cards: 0, error: error.message, ...flag }; }
719
+ } catch (error) { return { id, label: id, description: '', cards: 0, total_cards: 0, sub_workflow_count: 0, card_platforms: [], error: error.message, ...flag }; }
712
720
  });
713
721
  });
714
722
  }