@coda-console/protocol 3.0.0 → 3.2.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  按 semver。协议自己的大版本写在协议名里(如 `coda/run@1`),与 npm 包版本、插件清单的 v2 独立;更早的版本见 git 历史。
4
4
 
5
+ ## 3.2.0 — 2026-11-09
6
+
7
+ - 人工任务的 `coda:wake`:`false` 时派出不叫醒 Agent,任务随会话的下一条输入告诉它(如用户在会话里开启的开发流程,Agent 下次说话时才读到);只写在交给 Agent 的任务上,默认 `true`。
8
+ - `coda:assignee` 的说明跟上 Coda 的处理人规则:先交给 Agent,它处理不了才逐层往上(Coda #2303)。
9
+
10
+ ## 3.1.0 — 2026-11-08
11
+
12
+ - 流程种类 `prebuild`(预编):开发流程推出执行者的提交后,在审查的同时调用一次、不等它的结果,为随后验收要装的客户端先编好;任何提交都能跑,不算部署类。设置选项的 `workflowKind` 也接受它。
13
+
5
14
  ## 3.0.0 — 2026-11-05
6
15
 
7
16
  不兼容变更:
package/README.md CHANGED
@@ -80,7 +80,7 @@ fieldsProblem(JSON.parse(fieldsJSON), 'ask');
80
80
 
81
81
  ## 项目中的多选选项
82
82
 
83
- 设置的 `items.anyOf` 选项可附带 `workflowKind`(`check`、`premerge`、`deploy`、`preview`、`release`)。全局设置显示全部选项;项目设置只显示该项目有的流程类别,未写此字段的选项始终显示。宿主负责按项目提供可选项,流程执行时仍需按运行的提交判断可用操作。
83
+ 设置的 `items.anyOf` 选项可附带 `workflowKind`(`check`、`premerge`、`prebuild`、`deploy`、`preview`、`release`)。全局设置显示全部选项;项目设置只显示该项目有的流程类别,未写此字段的选项始终显示。宿主负责按项目提供可选项,流程执行时仍需按运行的提交判断可用操作。
84
84
 
85
85
  ## 输入框模式
86
86
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coda-console/protocol",
3
- "version": "3.0.0",
3
+ "version": "3.2.0",
4
4
  "description": "Coda 的协议:插件清单的类型(JSON Schema)、通用校验器、协议定义与调用信封、流程方言与 Agent 接入协议",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -168,7 +168,7 @@
168
168
  "const": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},
169
169
  "title": {"type": "string", "maxLength": 400},
170
170
  "description": {"type": "string", "maxLength": 400},
171
- "workflowKind": {"description": "在项目设置里只在该项目有这一类流程时显示;全局设置列出全部选项", "enum": ["check", "premerge", "deploy", "preview", "release"]}
171
+ "workflowKind": {"description": "在项目设置里只在该项目有这一类流程时显示;全局设置列出全部选项", "enum": ["check", "premerge", "prebuild", "deploy", "preview", "release"]}
172
172
  },
173
173
  "required": ["const"],
174
174
  "additionalProperties": false
@@ -5,7 +5,8 @@
5
5
  "preview": "发布预览版客户端;只跑合并进默认分支的提交",
6
6
  "release": "发布正式版客户端;只跑合并进默认分支的提交",
7
7
  "check": "检查一个提交,PR 的流程在评审前调用;任何提交都能跑",
8
- "premerge": "合并前检查:批准合并后,在要合并的提交上只跑一次;任何提交都能跑"
8
+ "premerge": "合并前检查:批准合并后,在要合并的提交上只跑一次;任何提交都能跑",
9
+ "prebuild": "预编:开发流程推出执行者的提交后,在审查的同时调用一次、不等它的结果,为随后验收要装的客户端先编好;任何提交都能跑"
9
10
  },
10
11
  "deploying": ["deploy", "preview", "release"],
11
12
  "events": {
@@ -108,9 +108,10 @@
108
108
  "name": "UserTaskProperties",
109
109
  "isAbstract": true,
110
110
  "extends": ["bpmn:UserTask"],
111
- "description": "人工任务的:assignee 交给谁,三个按钮的名字",
111
+ "description": "人工任务的:assignee 交给谁,wake 派出时叫不叫醒 Agent,三个按钮的名字",
112
112
  "properties": [
113
113
  {"name": "assignee", "isAttr": true, "type": "String"},
114
+ {"name": "wake", "isAttr": true, "type": "String"},
114
115
  {"name": "completeLabel", "isAttr": true, "type": "String"},
115
116
  {"name": "rejectLabel", "isAttr": true, "type": "String"},
116
117
  {"name": "noteLabel", "isAttr": true, "type": "String"}
@@ -474,6 +474,34 @@
474
474
  }
475
475
  }
476
476
  },
477
+ {
478
+ "description": "coda:wake=\"false\" 只写在交给 Agent 的任务上:交给用户的(coda:assignee=\"user\"、有输入字段的)本来就不叫醒 Agent",
479
+ "schema": {
480
+ "properties": {
481
+ "assignee": {
482
+ "not": {
483
+ "const": "user"
484
+ }
485
+ },
486
+ "hasInputFields": {
487
+ "const": false
488
+ }
489
+ }
490
+ },
491
+ "on": [
492
+ "bpmn:UserTask"
493
+ ],
494
+ "when": {
495
+ "required": [
496
+ "wake"
497
+ ],
498
+ "properties": {
499
+ "wake": {
500
+ "const": "false"
501
+ }
502
+ }
503
+ }
504
+ },
477
505
  {
478
506
  "description": "不支持标准循环(standardLoopCharacteristics):重复做一件事写成连回去的连线加网关,按集合或次数做多份写多实例",
479
507
  "schema": {
@@ -10,7 +10,7 @@
10
10
  "concurrency": {"type": "string", "minLength": 1, "maxLength": 200, "description": "coda:concurrency 须为 1–200 个字符"},
11
11
  "key": {"type": "string", "pattern": "\\S", "maxLength": 4000, "x-feel": {"names": ["inputs", "github", "vars"]}, "description": "coda:key 须为 1–4000 个字符"},
12
12
  "title": {"type": "string", "pattern": "\\S", "maxLength": 200, "x-feel": true, "description": "coda:title 须为 1–200 个字符"},
13
- "kind": {"enum": ["deploy", "preview", "release", "check", "premerge"], "description": "coda:kind 只能是 deploy、preview、release、check、premerge"},
13
+ "kind": {"enum": ["deploy", "preview", "release", "check", "premerge", "prebuild"], "description": "coda:kind 只能是 deploy、preview、release、check、premerge、prebuild"},
14
14
  "agents": {"type": "string", "pattern": "^[\\s,]*[a-z][a-z0-9-]{0,39}(?:[\\s,]+[a-z][a-z0-9-]{0,39})*[\\s,]*$",
15
15
  "description": "coda:agents 写 Agent 的 ID,用逗号或空格分隔(小写字母、数字和「-」,以字母开头,至多 40 个字符),不能为空"}
16
16
  }
@@ -81,7 +81,8 @@
81
81
  "UserTaskProperties": {
82
82
  "type": "object",
83
83
  "properties": {
84
- "assignee": {"enum": ["agent", "user"], "description": "coda:assignee 只能是 agent(先给运行所属会话的 Agent 一轮,没答就逐层往上,最上面是用户;有输入字段的直接到用户)或 user(直接交给用户)"}
84
+ "assignee": {"enum": ["agent", "user"], "description": "coda:assignee 只能是 agent(先交给运行所属会话的 Agent,它处理不了才逐层往上,最上面是用户;有输入字段的直接到用户)或 user(直接交给用户)"},
85
+ "wake": {"enum": ["true", "false"], "description": "coda:wake 只能是 true(默认,派出就叫醒 Agent)或 false(不叫醒,任务随会话的下一条输入告诉 Agent)"}
85
86
  }
86
87
  },
87
88
  "Input": {