ai_co_discuss 0.5.20 → 0.5.21
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/.agents/skills/workflow-creator/SKILL.md +3 -0
- package/docs/en/guide/workflows.md +2 -0
- package/docs/en/guide/working.md +1 -1
- package/docs/guide/workflows.md +2 -0
- package/docs/guide/working.md +1 -1
- package/frontend/locales/en/settings.json +5 -0
- package/package.json +1 -1
- package/runner/workflows.mjs +26 -8
- package/web/i18n.js +1 -1
- package/web/modern.css +1 -1
- package/web/modern.js +58 -58
- package/workflows/decision-council/SKILL.md +2 -1
- package/workflows/decision-council/flow.json +15 -15
- package/workflows/story-serial/agents/writer.md +1 -1
- package/workflows/story-serial/flow.json +456 -123
- package/workflows/story-serial/workflows/aigc-reduce/flow.json +134 -13
- package/workflows/story-serial/workflows/character-play/flow.json +212 -25
- package/workflows/story-serial/workflows/jack-sparrow/flow.json +67 -23
- package/workflows/story-serial/workflows/luke-nichols/flow.json +67 -23
- package/workflows/story-serial/workflows/revise-episodes/flow.json +184 -23
- package/workflows/story-serial/workflows/tidy-docs/flow.json +256 -19
- package/workflows/tri-model-dev/SKILL.md +72 -0
- package/workflows/tri-model-dev/agents/advisor.md +22 -0
- package/workflows/tri-model-dev/agents/backend.md +25 -0
- package/workflows/tri-model-dev/agents/reviewer.md +38 -0
- package/workflows/tri-model-dev/flow.json +397 -0
- package/workflows/tri-model-dev/workflows/browser-verify/SKILL.md +22 -0
- package/workflows/tri-model-dev/workflows/browser-verify/agents/browser_ops.md +18 -0
- package/workflows/tri-model-dev/workflows/browser-verify/flow.json +136 -0
- package/workflows/trpg-classic/flow.json +17 -17
|
@@ -142,6 +142,8 @@ name: novel-serial
|
|
|
142
142
|
description: 做什么、什么时候用,一句话,不换行
|
|
143
143
|
metadata:
|
|
144
144
|
label: 连载小说
|
|
145
|
+
author: 原作者或整理者(可选)
|
|
146
|
+
source: 来源文章、链接或实践出处(可选)
|
|
145
147
|
---
|
|
146
148
|
(正文,最多 20,000 字)
|
|
147
149
|
```
|
|
@@ -160,6 +162,7 @@ project_access: write
|
|
|
160
162
|
```
|
|
161
163
|
|
|
162
164
|
- **工作流 ID**(文件夹名 = SKILL.md 的 `name`):小写英文和数字,可用单个连字符连接(不在首尾),1—40 位。`metadata` 下的 `label`(显示名)最多 32 字;早期写在顶层的 `label` 仍可读取,保存时移到 `metadata` 下。
|
|
165
|
+
- **展示元数据**(均可选,不换行,只给人看和分享,**不会发给主持人**):`metadata.author`(作者,最多 64 字)、`metadata.source`(出处,最多 200 字)。不要把作者、出处等背景信息塞进 `description`。
|
|
163
166
|
- **`description`** 最多 500 字:写清做什么、什么时候用。主持人只凭它判断一条请求该不该按这个工作流做,写含糊了,该用时会不用、不该用时会套用。
|
|
164
167
|
- **卡片**:最多 30 张。`name` 是卡片 ID,等于文件名,只用小写英文、数字和下划线,最多 16 位。`platform` 是平台 ID:`Claude`、`Codex`、`Antigravity`、`DeepSeek`、`Qwen`、`Grok`、`OpenAI`、`Custom`(网页显示的 Gemini 写 `Antigravity`,自定义 API 写 `Custom`),须是本机已配置的软件,或已配置的模型 API(官方平台可按已保存的 API Key 加入;Custom 须先保存完整的本机 API 配置)。成员名由程序拼成 `平台-卡片ID`。
|
|
165
168
|
- **卡片可选字段**:`label`、`description`、`project_access`(read / write / auto / full)、`model`、`effort`。生图不是卡片字段:房间添加了生图卡片后所有成员都能画,卡片提示词写清谁负责出图即可。不用的字段直接省略;模型和强度省略即用本机默认值。接入方式、可执行文件、密钥不写进卡片,由各自电脑的配置决定。各角色挑哪个平台和模型,见 [给卡片挑平台和模型](references/model-selection.md)。
|
|
@@ -38,6 +38,8 @@ You can create or import a ZIP file or folder with the “+” on the Workflows
|
|
|
38
38
|
|
|
39
39
|
### 4. The canvas and SKILL.md
|
|
40
40
|
|
|
41
|
+
Edit the “Short description” directly above the workflow text. It wraps to the panel width so you can read the full description.
|
|
42
|
+
|
|
41
43
|
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.”
|
|
42
44
|
|
|
43
45
|
- **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.
|
package/docs/en/guide/working.md
CHANGED
|
@@ -28,7 +28,7 @@ Room work can run on several lines in parallel. Labels at the top of a card show
|
|
|
28
28
|
- A directly mentioned member starts immediately when idle. If busy, its request waits in the queue until it is free. If one message mentions both idle and busy members, idle members start at once while the busy members’ work waits.
|
|
29
29
|
- When a main-line member’s turn arrives, it waits for that member to finish its active branch work.
|
|
30
30
|
- Your unmentioned messages, `@all`, and `@all-seq` wait until the room is idle, then go out in order. Background work assigned by the host does not hold up your new messages.
|
|
31
|
-
- **Where things sit on a card.** Every member card has, from top to bottom: the header, the body, what it delivers (answer summary, attachments, delivered files) and the run’s record (progress notes with step count, file changes, refused operations). File changes list only files the member was recorded writing during that run. The left of the header says who: the name, labels, and the model and effort this run used. The right says how this one went: status, time, number and duration, with the duration always last. A coloured status only means something went wrong (red for failed; amber for stopped, voided or skipped), and nothing is shown when all is well; on your own messages, the right shows how each member is handling it. On a phone, the buttons for retracting, editing, private chat and the like sit at the top right of the card, level with the name; the model, status, time, number and duration run from the left under the name. Stop and retry sit at the right end of the line they act on.
|
|
31
|
+
- **Where things sit on a card.** Every member card has, from top to bottom: the header, the body, what it delivers (answer summary, attachments, delivered files) and the run’s record (progress notes with step count, file changes, refused operations). File changes list only files the member was recorded writing during that run. The left of the header says who: the name, labels, and the model and effort this run used. The right says how this one went: status, time, number and duration, with the duration always last. A coloured status only means something went wrong (red for failed; amber for stopped, voided or skipped), and nothing is shown when all is well; on your own messages, the right shows how each member is handling it. On a phone, the buttons for retracting, editing, private chat and the like sit at the top right of the card, level with the name; the model, status, time, number and duration run from the left under the name. Stop and retry sit at the right end of the line they act on. When an answer first appears, pending project files reserve their card space. You can open them once verified.
|
|
32
32
|
- **Card labels.** Where the card came from comes first, then where the work goes next. The usual channels (own message, CLI, API) are no longer labelled; only rare sources such as sent on someone’s behalf, proactive messages and auto-captured answers are.
|
|
33
33
|
- “Host” identifies a message from the current host, host notes included.
|
|
34
34
|
- “Main line · step {n}” is a host-arranged order. “Main line · #{n} in turn” is `@all-seq`.
|
package/docs/guide/workflows.md
CHANGED
|
@@ -38,6 +38,8 @@
|
|
|
38
38
|
|
|
39
39
|
### 4. 画布与 `SKILL.md` 的分工
|
|
40
40
|
|
|
41
|
+
在正文上方可直接编辑“一句话描述”。描述会按面板宽度换行,完整显示。
|
|
42
|
+
|
|
41
43
|
在左栏“工作流”列表点一项,中间打开流程画布,右侧显示它的 `SKILL.md`(点“编辑”可修改,点“保存”或 `Ctrl+S` 保存。工作流在你打开之后被别处改过时,保存会被拒绝,页面提示“工作流已被修改,请重新载入”,点“重新载入”读取新版,未保存的修改会先询问是否放弃;导入的工作流和库里已有的同 ID 时,要点“覆盖保存”才会整份替换):
|
|
42
44
|
|
|
43
45
|
- **画布只帮你看懂**:你可以拖动卡片、添加主持人节点、用户节点(示意需要你介入、确认或发言的位置)和条件分支节点(按条件分成多条执行分支,每个分支各有独立的右侧连线圆点,选中后可增删和重命名分支)、从节点右侧圆点拖线表示先后、并行多路或循环(金色虚线表示循环)、写连线说明,或点“自动整理”。连线和说明要先单击选中才能编辑;选中金色循环线后,按住它上下拖动可调整高度。没选中时,在连线或说明上拖动只会平移画布。**程序不执行画布连线,主持人也看不到画布。**
|
package/docs/guide/working.md
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
- 被你直接 `@` 的成员空闲就立即开始,正忙就进入排队区,一空闲立刻收到。如果一条消息同时 `@` 了空闲成员和忙碌成员,空闲的立刻开工,忙碌的那份留在排队区等它空闲。
|
|
29
29
|
- 主线轮到某位成员时,会等它做完手头支线再继续。
|
|
30
30
|
- 你发出的未点名消息、`@全体成员`、`@全体依次` 等整个房间空闲后再按顺序发出(主持人派出的后台任务不会阻塞你的新消息)。
|
|
31
|
-
-
|
|
31
|
+
- **卡片的固定位置**:每张成员卡从上到下依次是卡头、正文、交付(回答摘要、附件、交付文件)、过程记录(过程说明与步数、文件改动、被拒操作)。文件改动只列出能确认由该成员在本次执行中写过的文件。卡头左边说“是谁”:名字、标签和这次用的模型与强度;右边说“这一次怎么样”:状态、时间、编号、耗时,耗时总在最右。带颜色的状态只表示出了问题(红色失败,琥珀色停止、作废、跳过),正常时不标;你发的消息上,右边是各成员的处理状态。手机上撤回、编辑、私聊等按钮在卡片右上角,和名字同一行;模型、状态、时间、编号、耗时在名字下方从左排起。停止、重试按钮在它作用的那一行右端。首次显示回答时,待核实的项目文件会先以同尺寸卡片占位,确认后即可打开。
|
|
32
32
|
- **卡片头部标签**:先写这张卡从哪来,再写接下来去哪。常见的发言渠道(本人发言、CLI、API)不再标出,只标代发、主动发言、自动收录这类少见来源。
|
|
33
33
|
- “主持”:当前主持人的发言,主持说明卡也用它。
|
|
34
34
|
- “主线 · 第 n 棒”(主持人安排的顺序)或“主线 · 第 n 位”(`@全体依次`)。
|
|
@@ -685,6 +685,11 @@
|
|
|
685
685
|
"主持人凭它判断何时使用": "Helps the host decide when to use it",
|
|
686
686
|
"做什么、什么时候用(必填)": "What it does and when to use it (required)",
|
|
687
687
|
"做什么、什么时候用": "What it does and when to use it",
|
|
688
|
+
"作者": "Author",
|
|
689
|
+
"原作者或整理者(可选)": "Original author or curator (optional)",
|
|
690
|
+
"出处": "Source",
|
|
691
|
+
"来源文章、链接或实践(可选)": "Source article, link or practice (optional)",
|
|
692
|
+
"作者与出处仅用于展示,不发给主持人": "Author and source are for display only and not sent to the host",
|
|
688
693
|
"SKILL.md 正文": "SKILL.md contents",
|
|
689
694
|
"写下主持人怎么组织这个{value1}": "Describe how the host organizes this {value1}",
|
|
690
695
|
"API 成员可运行的命令({value1})": "Commands API members can run ({value1})",
|
package/package.json
CHANGED
package/runner/workflows.mjs
CHANGED
|
@@ -20,6 +20,8 @@ export const MAX_WORKFLOW_SKILL = 20000;
|
|
|
20
20
|
export const MAX_WORKFLOW_CARDS = 30;
|
|
21
21
|
const MAX_WORKFLOW_LABEL = 32;
|
|
22
22
|
const MAX_WORKFLOW_DESCRIPTION = 500;
|
|
23
|
+
const MAX_WORKFLOW_AUTHOR = 64;
|
|
24
|
+
const MAX_WORKFLOW_SOURCE = 200;
|
|
23
25
|
const MAX_DRAFT_PARTS = 20;
|
|
24
26
|
const WORKFLOW_LOCK_WAIT_MS = 5000;
|
|
25
27
|
const BACKUP_DIRECTORY = /^\.old-([a-z0-9_-]{1,40})-[0-9a-f-]{36}$/;
|
|
@@ -177,9 +179,19 @@ function skill_label(fields) {
|
|
|
177
179
|
return (fields.metadata && typeof fields.metadata === 'object' ? fields.metadata.label : '') || (typeof fields.label === 'string' ? fields.label : '');
|
|
178
180
|
}
|
|
179
181
|
|
|
180
|
-
/**
|
|
181
|
-
function
|
|
182
|
-
|
|
182
|
+
/** Human-facing display metadata under `metadata:` (`author`, `source`), never sent to the host. */
|
|
183
|
+
function skill_meta(fields) {
|
|
184
|
+
const meta = fields.metadata && typeof fields.metadata === 'object' ? fields.metadata : {};
|
|
185
|
+
const pick = key => (typeof meta[key] === 'string' ? meta[key].trim() : '');
|
|
186
|
+
const author = pick('author'), source = pick('source');
|
|
187
|
+
return { ...(author ? { author } : {}), ...(source ? { source } : {}) };
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
/** SKILL.md frontmatter as the Agent Skills format writes it: display fields (and a sub-workflow's `attach`) go under `metadata`. */
|
|
191
|
+
function skill_fields(id, label, description, attach = [], meta = {}) {
|
|
192
|
+
const { author, source } = meta;
|
|
193
|
+
return { name: id, description, metadata: { label, ...(author ? { author } : {}), ...(source ? { source } : {}),
|
|
194
|
+
...(attach?.length ? { attach: attach.join(', ') } : {}) } };
|
|
183
195
|
}
|
|
184
196
|
|
|
185
197
|
/** A sub-workflow's `metadata.attach`: the main flow's stage IDs it attaches to, written comma-separated. */
|
|
@@ -285,7 +297,7 @@ function workflow_from_files(skill_text, cards, resources = {}, ignored = []) {
|
|
|
285
297
|
const { [FLOW_FILE]: flow_text, ...others } = resources;
|
|
286
298
|
const flow = typeof flow_text === 'string' ? parse_flow_text(flow_text, FLOW_FILE) : undefined;
|
|
287
299
|
const { sub_workflows, rest } = split_sub_workflows(others, ignored);
|
|
288
|
-
return { id: fields.name || '', label: skill_label(fields), description: fields.description || '', skill: body,
|
|
300
|
+
return { id: fields.name || '', label: skill_label(fields), description: fields.description || '', ...skill_meta(fields), skill: body,
|
|
289
301
|
agents: cards_from_files(cards, 'agents/', ignored), resources: rest, sub_workflows, ...(flow ? { flow } : {}) };
|
|
290
302
|
}
|
|
291
303
|
|
|
@@ -549,8 +561,11 @@ export function validate_workflow(input, validate_card) {
|
|
|
549
561
|
// Checked only when saving: a workflow saved earlier under one of these names can still be read and deleted.
|
|
550
562
|
if (RESERVED_WORKFLOW_IDS.includes(id)) throw new Error(`工作流 ID 不能用 ${id}:它是内置模式 /${id} 的命令`);
|
|
551
563
|
const label = String(input.label || '').trim(), description = String(input.description || '').trim(), skill = String(input.skill || '').trim();
|
|
564
|
+
const author = String(input.author || '').trim(), source = String(input.source || '').trim();
|
|
552
565
|
if (label.length > MAX_WORKFLOW_LABEL) throw new Error(`工作流显示名最多 ${MAX_WORKFLOW_LABEL} 字`);
|
|
553
566
|
if (description.length > MAX_WORKFLOW_DESCRIPTION || /\n/.test(description)) throw new Error(`工作流描述最多 ${MAX_WORKFLOW_DESCRIPTION} 字,且不能换行`);
|
|
567
|
+
if (author.length > MAX_WORKFLOW_AUTHOR || /\n/.test(author)) throw new Error(`工作流作者最多 ${MAX_WORKFLOW_AUTHOR} 字,且不能换行`);
|
|
568
|
+
if (source.length > MAX_WORKFLOW_SOURCE || /\n/.test(source)) throw new Error(`工作流出处最多 ${MAX_WORKFLOW_SOURCE} 字,且不能换行`);
|
|
554
569
|
if (!skill) throw new Error('SKILL.md 正文不能为空');
|
|
555
570
|
if (skill.length > MAX_WORKFLOW_SKILL) throw new Error(`SKILL.md 正文最多 ${MAX_WORKFLOW_SKILL} 字`);
|
|
556
571
|
const agents = input.agents || [];
|
|
@@ -563,7 +578,7 @@ export function validate_workflow(input, validate_card) {
|
|
|
563
578
|
const sub_workflows = input.sub_workflows === undefined ? undefined : validate_sub_workflows(input.sub_workflows, validate_card, main_cards);
|
|
564
579
|
workflow_cards({ agents: normalized, sub_workflows });
|
|
565
580
|
const flow = validate_flow(input.flow, main_cards, sub_workflows?.map(sub => sub.id));
|
|
566
|
-
return { id, label, description, skill, agents: normalized,
|
|
581
|
+
return { id, label, description, ...(author ? { author } : {}), ...(source ? { source } : {}), skill, agents: normalized,
|
|
567
582
|
...(resources === undefined ? {} : { resources }),
|
|
568
583
|
...(sub_workflows === undefined ? {} : { sub_workflows }),
|
|
569
584
|
...(flow === undefined ? {} : { flow }) };
|
|
@@ -658,7 +673,10 @@ export function list_workflows(home, card_ready = null) {
|
|
|
658
673
|
const unavailable = card_ready ? workflow_cards(workflow).filter(agent => !card_ready(agent.name)).map(agent => ({
|
|
659
674
|
card: agent.card, label: agent.label || agent.card, platform: agent.name.slice(0, agent.name.length - agent.card.length - 1),
|
|
660
675
|
...(agent.sub_workflow ? { sub_workflow: agent.sub_workflow } : {}) })) : [];
|
|
661
|
-
return { id, label: workflow.label || id, description: workflow.description,
|
|
676
|
+
return { id, label: workflow.label || id, description: workflow.description,
|
|
677
|
+
...(workflow.author ? { author: workflow.author } : {}),
|
|
678
|
+
...(workflow.source ? { source: workflow.source } : {}),
|
|
679
|
+
cards: workflow.agents.length, directory: workflow.directory,
|
|
662
680
|
...(unavailable.length ? { unavailable } : {}), ...flag };
|
|
663
681
|
} catch (error) { return { id, label: id, description: '', cards: 0, error: error.message, ...flag }; }
|
|
664
682
|
});
|
|
@@ -703,7 +721,7 @@ export function rename_workflow(home, id, label) {
|
|
|
703
721
|
if (text.length > MAX_WORKFLOW_LABEL) throw new Error(`工作流显示名最多 ${MAX_WORKFLOW_LABEL} 字`);
|
|
704
722
|
return with_workflow_lock(home, () => {
|
|
705
723
|
const workflow = read_saved_workflow(home, id);
|
|
706
|
-
writeFileSync(join(workflow.directory, 'SKILL.md'), serialize_markdown(skill_fields(id, text, workflow.description), workflow.skill));
|
|
724
|
+
writeFileSync(join(workflow.directory, 'SKILL.md'), serialize_markdown(skill_fields(id, text, workflow.description, [], workflow), workflow.skill));
|
|
707
725
|
return { id, label: text };
|
|
708
726
|
});
|
|
709
727
|
}
|
|
@@ -801,7 +819,7 @@ export function save_workflow(home, input, validate_card, base = {}) {
|
|
|
801
819
|
const carry = { folders: card_folders(directory), replace: base.overwrite === true || !existsSync(directory),
|
|
802
820
|
backup: (card, folder) => backups.push(backup_card(home, workflow.id, card, folder)) };
|
|
803
821
|
mkdirSync(join(staging, 'agents'), { recursive: true });
|
|
804
|
-
writeFileSync(join(staging, 'SKILL.md'), serialize_markdown(skill_fields(workflow.id, workflow.label, workflow.description), workflow.skill));
|
|
822
|
+
writeFileSync(join(staging, 'SKILL.md'), serialize_markdown(skill_fields(workflow.id, workflow.label, workflow.description, [], workflow), workflow.skill));
|
|
805
823
|
write_cards(join(staging, 'agents'), workflow.agents, carry);
|
|
806
824
|
if (workflow.resources) write_resources(staging, workflow.resources);
|
|
807
825
|
else if (existsSync(directory)) keep_resources(directory, staging);
|