@coda-console/protocol 3.2.0 → 3.3.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,10 @@
2
2
 
3
3
  按 semver。协议自己的大版本写在协议名里(如 `coda/run@1`),与 npm 包版本、插件清单的 v2 独立;更早的版本见 git 历史。
4
4
 
5
+ ## 3.3.0 — 2026-11-09
6
+
7
+ - `coda:choice` 的 `note`:`required` 时选它必须附言(写说明或附上文件),默认 `optional`(Coda #2303 第 3 步:卡片在输入框里填写)。
8
+
5
9
  ## 3.2.0 — 2026-11-09
6
10
 
7
11
  - 人工任务的 `coda:wake`:`false` 时派出不叫醒 Agent,任务随会话的下一条输入告诉它(如用户在会话里开启的开发流程,Agent 下次说话时才读到);只写在交给 Agent 的任务上,默认 `true`。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coda-console/protocol",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "Coda 的协议:插件清单的类型(JSON Schema)、通用校验器、协议定义与调用信封、流程方言与 Agent 接入协议",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -171,12 +171,13 @@
171
171
  {
172
172
  "name": "Choice",
173
173
  "superClass": ["Element"],
174
- "description": "人工任务给的一个答复:id 是任务输出里的 choice;可以套着更多答复,按住时给出;fields 是它检查并发送的输入(不写是全部,空串是没有)",
174
+ "description": "人工任务给的一个答复:id 是任务输出里的 choice;可以套着更多答复,按住时给出;fields 是它检查并发送的输入(不写是全部,空串是没有);note 是选它时要不要附言",
175
175
  "properties": [
176
176
  {"name": "id", "isAttr": true, "type": "String"},
177
177
  {"name": "name", "isAttr": true, "type": "String"},
178
178
  {"name": "detail", "isAttr": true, "type": "String"},
179
179
  {"name": "primary", "isAttr": true, "type": "Boolean"},
180
+ {"name": "note", "isAttr": true, "type": "String"},
180
181
  {"name": "fields", "isAttr": true, "type": "String"},
181
182
  {"name": "choices", "type": "Choice", "isMany": true},
182
183
  {"name": "options", "type": "Option", "isMany": true}
@@ -144,6 +144,7 @@
144
144
  "id": {"type": "string", "pattern": "^[A-Za-z_][A-Za-z0-9_-]{0,63}$", "description": "id 须为字母开头的字母、数字、「_」「-」"},
145
145
  "name": {"type": "string", "pattern": "\\S", "maxLength": 40, "description": "name 须为 1–40 个字"},
146
146
  "detail": {"type": "string", "maxLength": 200, "x-feel": true, "description": "detail 不超过 200 字"},
147
+ "note": {"enum": ["required", "optional"], "description": "note 只能是 required(选它必须附言:写说明或附上文件)或 optional(默认)"},
147
148
  "choices": {"type": "array", "maxItems": 6, "description": "最多 6 个按住出现的选项"},
148
149
  "options": {"type": "array", "maxItems": 12, "x-unique-by": ["id"], "description": "最多 12 个勾选项"}
149
150
  },