@coda-console/protocol 6.2.0 → 6.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 +9 -0
- package/README.md +4 -4
- package/docs/agent-protocol.md +1 -1
- package/docs/protocol.md +9 -71
- package/package.json +1 -1
- package/schemas/protocol/v1/executor.json +2 -137
- package/workflow/moddle.json +2 -11
- package/workflow/structure.json +3 -17
- package/workflow/values.json +1 -14
- package/schemas/protocol/v1/remote-caller.json +0 -336
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
版本规矩见 README 的[「版本」一节](README.md#版本)。协议自己的大版本写在协议名里(如 `coda/run@1`),与 npm 包版本、插件清单的 v2 独立;更早的版本见 git 历史。
|
|
4
4
|
|
|
5
|
+
## 6.3.0 — 2026-11-15
|
|
6
|
+
|
|
7
|
+
- 这是在 6.2.0 之上的次版本(6.2.0 见下)。
|
|
8
|
+
- 不兼容:删去 Coda A3-3-0(coda#2641)已经删掉的能力的声明。依据 README「版本」一节:协议定义与流程方言是内部面,删改升次版本(6.2.0 是 failure.json 加 `auth_required`,见 #58)。
|
|
9
|
+
- 流程方言删去 `coda:reportTo`、`coda:reportOn`(moddle、取值校验与「reportOn 必须配 reportTo」、结构校验里的分支)和 `coda:placement`(`PlacementProperties`);写了它们的流程读时按认不出的属性拒绝。定时开始事件的 `coda:scope` 及其只写在定时开始事件上的约束不变。
|
|
10
|
+
- `coda/executor@1` 删去操作 `execute`(连同它的 `$defs`:源码快照 `git/snapshot@1`、`source` 输入等),现在没有操作;spec、status、`EXECUTOR_PROTOCOL` 与 `CORE_PROTOCOLS` 里的登记不变。
|
|
11
|
+
- 删去 `schemas/protocol/v1/remote-caller.json`(记录的远端入口,含 `file_ticket`)与 `docs/protocol.md` 里的对应正文。
|
|
12
|
+
- `coda/session@1` 的 `post`、`draft`,以及 `coda:runsOn`、`coda:source`、`group`、`hold-group`、`coda/run@1` 都保留;`coda:runsOn` 的说明改成:对本机执行环境的要求,不符合就一开始失败,不会把步骤交给别台。
|
|
13
|
+
|
|
5
14
|
## 6.2.0 — 2026-11-14
|
|
6
15
|
|
|
7
16
|
- Agent 的执行失败类别(`schemas/agent/failure.json`)加 `kind: auth_required`:Agent 的登录凭据失效(OAuth 令牌过期或被撤销),须用户重新登录才能继续;可带可选的 `login`(1 到 200 字,指出要重新登录的账号或登录方式),不带 `input`、`retryAfterMs`、`resetAt`,带了也不检查。`docs/agent-protocol.md` 的「执行失败」写清三类的用途:`service_unavailable` 会自己好,Coda 退避后在同一会话续;`quota_exhausted` 到恢复时间再续;`auth_required` 提醒用户重新登录,登录后续;额度不足与要重新登录两类本轮内不即时重试、也不进入服务故障重试,之后的续跑由 Coda 在同一会话里决定;并写明什么时候该报它、什么时候不该报(API key 配错、权限不足仍是普通错误)。握手阶段回 -32000 的「未登录」不变。新增类别与可选字段,旧插件不受影响(Coda #2642)。
|
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ Coda 与插件之间的约定,Coda 和插件都引用它,独立演进:
|
|
|
22
22
|
|
|
23
23
|
输入字段有 `text`、`secret` 与多选 `choices`。`choices` 的 `options` 是选项表,每项 `{ id, label, detail?, disabled? }`(`id` 一行、1–64 个字、前后不带空白、表中不重复,`label` 一行、1–80 个字、前后不带空白,`detail` 一行不超过 200 字,`disabled` 为 true 的列出但不能勾),1–32 项,至少一项能勾;`default` 是初始勾上的选项 id,每个须是 options 里能勾的一项,不写就是都不勾;两者都可写表达式在任务打开时读,读出(或直接写下)的是 JSON 数组或它的文字。`required`(默认 true)要求至少勾一项。答复是勾中项的 id 组成的数组,按 options 的顺序,在答复的 `values.<id>` 里(其余输入是文字,它是数组),流程读 `=<任务>.values.<id>`,是 FEEL 列表;它不认识机器或别的什么,选项的意思由给出它的步骤定(如 `check-setting` 的 `machines`)。
|
|
24
24
|
|
|
25
|
-
脚本步骤的 **工作副本** 由 `coda:source` 声明:这一步在哪个工作副本目录里跑,写本机上的绝对路径,可以写 FEEL 表达式。它只用于 `coda:checkout="false"`
|
|
25
|
+
脚本步骤的 **工作副本** 由 `coda:source` 声明:这一步在哪个工作副本目录里跑,写本机上的绝对路径,可以写 FEEL 表达式。它只用于 `coda:checkout="false"` 的步骤:在那个目录里就地跑,不检出提交。
|
|
26
26
|
|
|
27
27
|
定义和运行时共用这一份 schema。`x-deferred` 包住一个 schema:读定义时,文字先检查 FEEL,表达式或含 `{{ … }}` 的模板留到打开任务后查;运行时只按包住的 schema 严格检查,不再把结果当表达式。只有内容属性使用它,`type`、`id`、布尔值、枚举和 `maxLength` 不放宽。另有 `x-length`(沿用 Coda 的 UTF-16 长度,可用 `{ "property": "maxLength" }` 读取同一对象的上限)、`x-json`(解析 JSON 文字或检查 JSON 值,按序列化后的 UTF-8 字节数限制大小)、`x-among`(`{ property, key, match? }`:数组的每一项是同一对象里 `property`(数组或它的 JSON 文字)某一项的 `key`,且那一项合乎 `match`;`property` 还是定义里的表达式时不查);`absolute-path`、`https-url`、`link-url` 三个 format 按本机路径与 URL 解析器检查;`link-url` 接受 https 网址或 `action=download-manifest` 且 `url` 解码后为 https 网址的 `itms-services:` 安装链接。已有的 `x-ref` 增加 `key`(按数组元素的属性引用)和 `split`(逐个检查分隔后的名字)。这些操作都不改写输入。
|
|
28
28
|
|
|
@@ -61,7 +61,7 @@ protocolShortName('coda/run@1'); // 'coda-1run-21'
|
|
|
61
61
|
definitionProblem(RUN_PROTOCOL); // null,或说明
|
|
62
62
|
ownedProtocolsProblem(manifest); // contributes.protocols 只能在自己的命名空间下
|
|
63
63
|
runStatusProblem({ state: 'completed', result: null }, { state: 'working' }); // 终态不能再变
|
|
64
|
-
invocationRequestProblem({ record: { kind: 'coda/
|
|
64
|
+
invocationRequestProblem({ record: { kind: 'coda/session@1', id: 'chat-1' }, operation: 'post', input: { text: 'hi' },
|
|
65
65
|
requestId: 'r1', parent: { kind: 'coda/run@1', id: 'caller-run' }, awaited: true });
|
|
66
66
|
invocationResponseProblem({ run: { kind: 'coda/run@1', id: 'run-1' } });
|
|
67
67
|
```
|
|
@@ -131,7 +131,7 @@ agentValueProblem('review.json', review, '工具的审核');
|
|
|
131
131
|
命名空间 `coda` 保留给核心协议。
|
|
132
132
|
|
|
133
133
|
- **`coda/run@1`**:被调用方自己的运行记录。spec 记录调用的记录、操作、输入、请求 ID、父引用和是否被等待;status 是 `working`、`input-required`、`completed`、`failed`、`canceled`,后三个是终态。`completed`/`failed` 必带 `result`,`failed` 的 `result` 约定为 `{ code, message }`(`code: "unknown"` 表示结局不明),`canceled` 可带取消前的话和留下的东西;另有可选的 `progress` 和等输入时的 `awaiting`。操作是 `cancel`。
|
|
134
|
-
- **`coda/executor@1
|
|
134
|
+
- **`coda/executor@1`**:执行器,一台机器上的执行环境。spec 是配置意图,status 是持有端观察到的事实;没有操作。
|
|
135
135
|
- **`coda/agent@1`**:Agent 资源,复数名 `agents`;spec 照 Coda 的 Agent 资源(`agent`、`title`、`plugin?`、`defaultModel`、`models`、`modes` 等),`plugin` 是提供 Agent 程序的插件、不是记录的 provider;status 为空对象;操作 `spawn`(`run: true`)开一个子会话。
|
|
136
136
|
- **`coda/session@1`**:插件提供的外部会话。spec 是标题、容器和可选的环境引用;status 是 `head` 游标、参与者(可带头像 `avatar`)与 `post` 收不收语音(`accepts`);操作 `read`(`safe`)与 `draft`(`idempotent`)是立即结果,`post` 开运行;撤回、编辑、表情是用 `about` 指向旧消息的新消息。
|
|
137
137
|
- **`coda/environment@1`**:插件提供的只读外部环境。spec 带 `actions`;操作 `list` 列目录、`read` 读文件(一次至多 1 MiB)。
|
|
@@ -164,7 +164,7 @@ Coda 与检查包都钉一个确切版本。对第三方的兼容承诺只覆盖
|
|
|
164
164
|
|
|
165
165
|
协议自己的大版本写在协议名里(`coda/run@1`);同一大版本只加可选字段和新操作,改含义或删东西升大版本,新旧可并存。
|
|
166
166
|
|
|
167
|
-
3.0.0 删除了 `executor` 与 `execution
|
|
167
|
+
3.0.0 删除了 `executor` 与 `execution`;这是不兼容变更,旧代码须改用 `@coda-console/protocol/protocol` 与 `coda/run@1`。
|
|
168
168
|
|
|
169
169
|
改协议就在这里开 PR,说明写清动了哪个类型、旧插件受不受影响;发布后 Coda 与检查包各自升依赖。
|
|
170
170
|
|
package/docs/agent-protocol.md
CHANGED
|
@@ -444,7 +444,7 @@ Coda 封装的 Agent 会自己长出新能力:上游 Agent 升级、服务端
|
|
|
444
444
|
|
|
445
445
|
## 远端入口
|
|
446
446
|
|
|
447
|
-
本节是 Agent 会话的旧入口,随所有机器上的 grok-bot 0.4.0
|
|
447
|
+
本节是 Agent 会话的旧入口,随所有机器上的 grok-bot 0.4.0 卸载一起退役。
|
|
448
448
|
|
|
449
449
|
绑定码与转交请求的形状分别见 [remote-code.json](../schemas/agent/remote-code.json)、[remote.json](../schemas/agent/remote.json)。
|
|
450
450
|
|
package/docs/protocol.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
- 六个核心协议:`coda/run@1`、`coda/executor@1`、`coda/agent@1`、`coda/session@1`、`coda/environment@1`、`coda/card@1`;
|
|
10
10
|
- 插件清单里的 `contributes.protocols` 与 `contributes.protocolImplementations`。
|
|
11
11
|
|
|
12
|
-
`executor` 与 `execution` 两个旧对象协议和 `@coda-console/protocol/executor` 在 3.0.0
|
|
12
|
+
`executor` 与 `execution` 两个旧对象协议和 `@coda-console/protocol/executor` 在 3.0.0 删除。
|
|
13
13
|
|
|
14
14
|
## 名字
|
|
15
15
|
|
|
@@ -133,15 +133,15 @@ definitionProblem(definition, { namespace: 'my-plugin' }); // 同时核对命名
|
|
|
133
133
|
|
|
134
134
|
## 调用信封
|
|
135
135
|
|
|
136
|
-
记录引用 `{ kind, id }` 的 `kind` 是协议名,如 `coda/run@1`、`coda/
|
|
136
|
+
记录引用 `{ kind, id }` 的 `kind` 是协议名,如 `coda/run@1`、`coda/session@1`、`git/source@1`;`id` 是记录的不透明 ID。Coda 自己还没定义成协议的东西(会话、流程运行等)暂用它现有的资源种类名,如 `threads`、`workflow-runs`,等后续定义成协议再改用协议名。
|
|
137
137
|
|
|
138
138
|
一次调用是:
|
|
139
139
|
|
|
140
140
|
```json
|
|
141
141
|
{
|
|
142
|
-
"record": {"kind": "coda/
|
|
143
|
-
"operation": "
|
|
144
|
-
"input": {"
|
|
142
|
+
"record": {"kind": "coda/session@1", "id": "chat-1"},
|
|
143
|
+
"operation": "post",
|
|
144
|
+
"input": {"text": "构建通过了"},
|
|
145
145
|
"requestId": "request-1",
|
|
146
146
|
"parent": {"kind": "coda/run@1", "id": "caller-run"},
|
|
147
147
|
"awaited": true
|
|
@@ -232,9 +232,9 @@ status:
|
|
|
232
232
|
```json
|
|
233
233
|
{
|
|
234
234
|
"spec": {
|
|
235
|
-
"record": {"kind": "coda/
|
|
236
|
-
"operation": "
|
|
237
|
-
"input": {"
|
|
235
|
+
"record": {"kind": "coda/session@1", "id": "chat-1"},
|
|
236
|
+
"operation": "post",
|
|
237
|
+
"input": {"text": "构建通过了"},
|
|
238
238
|
"requestId": "request-1",
|
|
239
239
|
"parent": {"kind": "coda/run@1", "id": "parent-run"},
|
|
240
240
|
"awaited": true
|
|
@@ -247,7 +247,7 @@ status:
|
|
|
247
247
|
|
|
248
248
|
一台机器上的执行环境。记录格式取自 3.0.0 之前的 `executor`,版本改由协议名表达,spec 不再写 `protocolVersion`:spec 是 `enabled`、`capacity`、`labels` 和可选的 `title`;status 是探测到的标签、能力、容量与占用、`accepting`、观察时间和 `executionFeatures`。空 status `{}` 表示尚未观察到。
|
|
249
249
|
|
|
250
|
-
|
|
250
|
+
本协议没有操作:执行环境由持有它的机器自己维护,调用方不能经协议把一份工作交给它。脚本步骤的 `coda:runsOn` 只是对本机执行环境的要求,不符合就一开始失败,不会把步骤交给别台。
|
|
251
251
|
|
|
252
252
|
```json
|
|
253
253
|
{
|
|
@@ -451,68 +451,6 @@ status:
|
|
|
451
451
|
}
|
|
452
452
|
```
|
|
453
453
|
|
|
454
|
-
### 记录的远端入口
|
|
455
|
-
|
|
456
|
-
外部会话里的一位参与者(如跑在别处的 Grok Bot)以这条 `coda/session@1` 记录的身份调 Coda。令牌只通往这条记录,不是设备凭据,不能进入其他接口。
|
|
457
|
-
Coda 直接处理请求,不经 Agent 进程;调用信封的 `parent` 是 `{ kind: "coda/session@1", id: <记录 ID> }`,见[调用信封](#调用信封)。请求不能另指定调用方。
|
|
458
|
-
形状见 [remote-caller.json](../schemas/protocol/v1/remote-caller.json):顶层校验调用正文,`$defs` 给出绑定、各方法结果及错误;`date-parse` 格式同旧入口,按 `Date.parse` 能否读出时间校验。
|
|
459
|
-
|
|
460
|
-
#### 绑定
|
|
461
|
-
|
|
462
|
-
Provider 为自己 provide 的记录向 Coda 申请一次性绑定码,只能为自己的记录申请,且须实现 `coda/session@1`。插件侧的 API 由 Coda 定义。
|
|
463
|
-
回 `{ code, expiresAt, addresses }`:码 10 分钟有效,`expiresAt` 是到期时间;`addresses` 同旧入口,是这台后端在 tailnet 里的入口(`http://<节点地址>:8080`),不在 tailnet 时为空。
|
|
464
|
-
远端以 `POST /v1/remote-caller/bind`、正文 `{ code }` 换得 `{ token, record }`,`record` 是记录 ID。无需凭据,每分钟最多 30 次,码成功兑换后失效。
|
|
465
|
-
同一条记录再绑定,新令牌取代旧的;幂等请求归记录,不随令牌更换重置。
|
|
466
|
-
|
|
467
|
-
#### 调用
|
|
468
|
-
|
|
469
|
-
`POST /v1/remote-caller`,头 `Authorization: Bearer <token>`,正文 `{ method, params }`,成功回 `{ result }`。调用正文至多 256 KiB;绑定正文同旧入口至多 4 KiB,`code` 为 1 到 128 个字符。
|
|
470
|
-
`params` 是对象;只有 `hello` 可省略,等同 `{}`。
|
|
471
|
-
|
|
472
|
-
| method | params | result |
|
|
473
|
-
| --- | --- | --- |
|
|
474
|
-
| `hello` | `{}` | `{ record, machine, tools, workflows }`:记录 ID、所在机器 ID、可用的只读工具名数组、工单白名单 |
|
|
475
|
-
| `tool` | `{ name, arguments }` | 同名 MCP 工具的回答,原样放进 `result` |
|
|
476
|
-
| `file_ticket` | `{ workflow, project?, inputs, requestId }` | `{ run, reused? }`;`run` 为 `{ kind: "workflow-runs", id }`,按运行主键复用时带 `reused: true` |
|
|
477
|
-
|
|
478
|
-
`tool.name` 只收 `machines`、`machine_diagnostics`、`read_thread`、`read_tool_call`、`workflow_list`、`workflow_status`;`arguments` 是参数对象。
|
|
479
|
-
参数与回答照 Coda 的同名 MCP 工具,见[搜索与 Agent 工具](https://github.com/coda-console/coda/blob/main/docs/peers.md#搜索与-agent-工具)和[流程文档](https://github.com/coda-console/coda/blob/main/docs/workflows.md),这里不复制它们的 schema。
|
|
480
|
-
`hello.tools` 只列本机可用的上述工具。查工单用 `workflow_status`,不另设方法。
|
|
481
|
-
|
|
482
|
-
工单白名单是 `{ project, workflow }` 的列表,存在 Coda 侧、由用户给定;怎么配置由 Coda 定义,`hello.workflows` 返回这份列表,没有就返回 `[]`。
|
|
483
|
-
`project` 是这台机器上登记的目录 ID,`workflow` 是流程名。`file_ticket` 省略 `project` 时,按 `workflow` 在白名单里找唯一一项;没有匹配就拒绝,多项匹配就要求填写 `project`。
|
|
484
|
-
写了 `project` 时须与白名单的目录 ID 精确匹配。`inputs` 是流程输入对象,按流程自己的输入契约校验。
|
|
485
|
-
Coda 以记录为 `parent`、`awaited: true` 发起流程;入口不额外出批准卡片,需要批准由流程决定。
|
|
486
|
-
|
|
487
|
-
`requestId` 是 1 到 200 个字符的不透明字符串,按调用方记录区分。同一记录、同一 `requestId`、同一内容重发,返回首次受理的同一结果,不重复开运行;换内容则报冲突。
|
|
488
|
-
内容按受理时确定的 `project`、`workflow` 和 `inputs` 比较;省略项目的重试沿用首次受理的项目。重试仍须通过记录有效性和当前白名单检查。
|
|
489
|
-
不同 `requestId` 报同一问题,由流程的[运行主键](https://github.com/coda-console/coda/blob/main/docs/workflows.md#运行主键)复用未结束的运行,回原运行和 `reused: true`;不改原运行的调用方,不接管它的结果通知。
|
|
490
|
-
|
|
491
|
-
#### 结果交付
|
|
492
|
-
|
|
493
|
-
运行结束(成功或失败)时,照流程的[通知规则](https://github.com/coda-console/coda/blob/main/docs/workflows.md#通知)把结论交给调用方;取消不通知,第一版不推中途状态。
|
|
494
|
-
调用方是 Coda 会话时,给它追加一条叫醒的消息;调用方是 `coda/session@1` 记录时,对这条记录调一次 `post`。这是同一条规则在两种会话上的交付。
|
|
495
|
-
发送者照 `post` 的规定是 `self`,不冒充 Bot;输入的 `text` 是运行的结论:成功用结束事件的输出,没有声明输出时沿用流程通知的步骤输出;失败写失败的步骤和原因。
|
|
496
|
-
`post` 信封的 `requestId` 由运行 ID 与轮次派生,同一运行每轮只发一次,交付重试使用同一个值;不按每次提工单的 `requestId` 各发一条。
|
|
497
|
-
|
|
498
|
-
#### 拒绝
|
|
499
|
-
|
|
500
|
-
HTTP 错误正文是 `{ error: { code, message } }`,`message` 是给人看的原因,`code` 用下划线命名:
|
|
501
|
-
|
|
502
|
-
| HTTP | code | 原因 |
|
|
503
|
-
| --- | --- | --- |
|
|
504
|
-
| 400 | `invalid_input` | JSON、方法或参数不合契约;项目有歧义;流程输入不合法 |
|
|
505
|
-
| 401 | `unauthorized` | 调用令牌缺失、无效或已被新令牌取代 |
|
|
506
|
-
| 401 | `unauthorized` | 绑定码不存在、过期或已用过 |
|
|
507
|
-
| 403 | `forbidden` | 工具不在六个允许的名字中,或流程不在记录的白名单中 |
|
|
508
|
-
| 409 | `invalid_state` | 记录不存在、已删除,或它的 Provider 已不实现 `coda/session@1`;兑换绑定码时也检查 |
|
|
509
|
-
| 409 | `request_conflict` | 同一记录的 `requestId` 用了不同内容 |
|
|
510
|
-
| 413 | `invalid_input` | 正文超过对应入口的上限 |
|
|
511
|
-
| 429 | `rate_limited` | 绑定超过每分钟 30 次 |
|
|
512
|
-
| 503 | `unavailable` | 允许的工具暂不可用,或流程尚未受理就暂时无法发起 |
|
|
513
|
-
|
|
514
|
-
不在允许列表的工具名回 403,其他正文校验错误回 400。工具自身的业务错误仍按 MCP 工具回答放在 `result` 里;已受理运行的失败经运行状态和结果交付报告,不改成 HTTP 错误。
|
|
515
|
-
|
|
516
454
|
## coda/environment@1
|
|
517
455
|
|
|
518
456
|
插件提供的外部环境,比如别家 Agent 自带的云主机。本版本只读。
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "coda/executor@1",
|
|
3
3
|
"title": "执行器",
|
|
4
|
-
"description": "
|
|
4
|
+
"description": "一台机器上执行脚本步骤的环境:记录它的配置意图(spec)与持有端观察到的事实(status);没有操作。",
|
|
5
5
|
"spec": {
|
|
6
6
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
7
7
|
"type": "object",
|
|
@@ -140,140 +140,5 @@
|
|
|
140
140
|
],
|
|
141
141
|
"description": "空对象表示未知;非空为持有端最近观察到的事实,不是在线或预留保证"
|
|
142
142
|
},
|
|
143
|
-
"operations": {
|
|
144
|
-
"execute": {
|
|
145
|
-
"description": "接下一份执行工作,返回执行器自己开出的运行引用。",
|
|
146
|
-
"input": {
|
|
147
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
148
|
-
"type": "object",
|
|
149
|
-
"$defs": {
|
|
150
|
-
"opaqueId": {"type": "string", "minLength": 1, "maxLength": 2048},
|
|
151
|
-
"resourceRef": {
|
|
152
|
-
"type": "object",
|
|
153
|
-
"properties": {"kind": {"type": "string", "minLength": 1, "maxLength": 128}, "id": {"$ref": "#/$defs/opaqueId"}},
|
|
154
|
-
"required": ["kind", "id"],
|
|
155
|
-
"additionalProperties": false
|
|
156
|
-
},
|
|
157
|
-
"snapshotRef": {
|
|
158
|
-
"type": "object",
|
|
159
|
-
"properties": {"kind": {"const": "git/snapshot@1"}, "id": {"$ref": "#/$defs/opaqueId"}},
|
|
160
|
-
"required": ["kind", "id"],
|
|
161
|
-
"additionalProperties": false
|
|
162
|
-
},
|
|
163
|
-
"repositoryRef": {
|
|
164
|
-
"type": "object",
|
|
165
|
-
"properties": {"kind": {"const": "git/source@1"}, "id": {"$ref": "#/$defs/opaqueId"}},
|
|
166
|
-
"required": ["kind", "id"],
|
|
167
|
-
"additionalProperties": false
|
|
168
|
-
},
|
|
169
|
-
"labels": {
|
|
170
|
-
"type": "array",
|
|
171
|
-
"items": {"type": "string", "minLength": 1, "maxLength": 40, "pattern": "^[a-z0-9][a-z0-9._-]*$(?![\\s\\S])"},
|
|
172
|
-
"maxItems": 64,
|
|
173
|
-
"uniqueItems": true
|
|
174
|
-
},
|
|
175
|
-
"resourceName": {
|
|
176
|
-
"type": "string",
|
|
177
|
-
"pattern": "^(?:slots|group:(?!host$(?![\\s\\S]))[^\\s\\u0000-\\u001f\\u007f]{1,100})$(?![\\s\\S])"
|
|
178
|
-
},
|
|
179
|
-
"workingDirectory": {
|
|
180
|
-
"type": "string",
|
|
181
|
-
"minLength": 1,
|
|
182
|
-
"maxLength": 4096,
|
|
183
|
-
"pattern": "^(?!/)(?![A-Za-z]:)(?!.*\\\\)(?!.*[\\u0000-\\u001f\\u007f])(?!.*(?:^|/)\\.\\.(?:/|$)).+$",
|
|
184
|
-
"description": "工作根下的相对路径;拒绝绝对路径、反斜线和 .. 段,真实落点与符号链接仍须执行方检查"
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
"properties": {
|
|
188
|
-
"source": {
|
|
189
|
-
"oneOf": [
|
|
190
|
-
{"type": "null"},
|
|
191
|
-
{"type": "object", "properties": {"snapshot": {"$ref": "#/$defs/snapshotRef"}}, "required": ["snapshot"], "additionalProperties": false},
|
|
192
|
-
{
|
|
193
|
-
"type": "object",
|
|
194
|
-
"properties": {
|
|
195
|
-
"repository": {"$ref": "#/$defs/repositoryRef"},
|
|
196
|
-
"commit": {"type": "string", "minLength": 1, "maxLength": 64, "pattern": "^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})$(?![\\s\\S])"}
|
|
197
|
-
},
|
|
198
|
-
"required": ["repository", "commit"],
|
|
199
|
-
"additionalProperties": false
|
|
200
|
-
}
|
|
201
|
-
]
|
|
202
|
-
},
|
|
203
|
-
"requirements": {
|
|
204
|
-
"type": "object",
|
|
205
|
-
"properties": {"labels": {"$ref": "#/$defs/labels"}},
|
|
206
|
-
"required": ["labels"],
|
|
207
|
-
"additionalProperties": false
|
|
208
|
-
},
|
|
209
|
-
"resources": {
|
|
210
|
-
"type": "object",
|
|
211
|
-
"propertyNames": {"$ref": "#/$defs/resourceName"},
|
|
212
|
-
"maxProperties": 1,
|
|
213
|
-
"additionalProperties": {"const": 1},
|
|
214
|
-
"description": "空对象表示不占资源;否则只申请一个资源的一单位"
|
|
215
|
-
},
|
|
216
|
-
"exclusiveResources": {
|
|
217
|
-
"type": "array",
|
|
218
|
-
"items": {"$ref": "#/$defs/resourceName"},
|
|
219
|
-
"maxItems": 1,
|
|
220
|
-
"uniqueItems": true,
|
|
221
|
-
"default": [],
|
|
222
|
-
"description": "空数组或独占申请的那一个资源,须与 resources 的键一致"
|
|
223
|
-
},
|
|
224
|
-
"context": {
|
|
225
|
-
"type": "object",
|
|
226
|
-
"properties": {
|
|
227
|
-
"workflow": {
|
|
228
|
-
"type": "object",
|
|
229
|
-
"properties": {
|
|
230
|
-
"name": {"type": "string", "minLength": 1, "maxLength": 256},
|
|
231
|
-
"job": {"type": "string", "minLength": 1, "maxLength": 256},
|
|
232
|
-
"runId": {"$ref": "#/$defs/opaqueId"},
|
|
233
|
-
"runAttempt": {"type": "integer", "minimum": 1, "maximum": 9007199254740991},
|
|
234
|
-
"sha": {"type": "string", "pattern": "^(?:[0-9a-fA-F]{40}|[0-9a-fA-F]{64})?$(?![\\s\\S])"},
|
|
235
|
-
"ref": {"type": "string", "maxLength": 1024},
|
|
236
|
-
"repository": {"type": "string", "maxLength": 2048}
|
|
237
|
-
},
|
|
238
|
-
"required": ["name", "job", "runId", "runAttempt", "sha", "ref", "repository"],
|
|
239
|
-
"additionalProperties": false
|
|
240
|
-
},
|
|
241
|
-
"plugin": {
|
|
242
|
-
"type": "object",
|
|
243
|
-
"properties": {"id": {"type": "string", "pattern": "^[a-z][a-z0-9-]{0,39}$(?![\\s\\S])"}, "version": {"type": "string", "minLength": 1, "maxLength": 128}},
|
|
244
|
-
"required": ["id", "version"],
|
|
245
|
-
"additionalProperties": false
|
|
246
|
-
},
|
|
247
|
-
"audience": {"const": "user"},
|
|
248
|
-
"outputNames": {"type": "array", "maxItems": 64, "uniqueItems": true, "items": {"type": "string", "minLength": 1, "maxLength": 128}}
|
|
249
|
-
},
|
|
250
|
-
"additionalProperties": false,
|
|
251
|
-
"description": "可信生产者给出的运行上下文与输出声明;不是环境快照或授权凭证"
|
|
252
|
-
},
|
|
253
|
-
"task": {
|
|
254
|
-
"oneOf": [
|
|
255
|
-
{"type": "object", "properties": {"script": {"type": "string", "minLength": 1, "maxLength": 65536}, "shell": {"type": "string", "minLength": 1, "maxLength": 4096}}, "required": ["script", "shell"], "additionalProperties": false},
|
|
256
|
-
{"type": "object", "properties": {"command": {"type": "string", "minLength": 1, "maxLength": 4096}, "args": {"type": "array", "items": {"type": "string", "minLength": 0, "maxLength": 16384}, "maxItems": 256}}, "required": ["command", "args"], "additionalProperties": false}
|
|
257
|
-
]
|
|
258
|
-
},
|
|
259
|
-
"workingDirectory": {"$ref": "#/$defs/workingDirectory", "default": "."},
|
|
260
|
-
"env": {
|
|
261
|
-
"type": "object",
|
|
262
|
-
"propertyNames": {"pattern": "^[A-Za-z_][A-Za-z0-9_]{0,127}$(?![\\s\\S])"},
|
|
263
|
-
"maxProperties": 128,
|
|
264
|
-
"additionalProperties": {"type": "string", "minLength": 0, "maxLength": 16384}
|
|
265
|
-
},
|
|
266
|
-
"timeoutMs": {"type": "integer", "minimum": 1, "maximum": 9007199254740991},
|
|
267
|
-
"cancelGraceMs": {"type": "integer", "minimum": 0, "maximum": 9007199254740991}
|
|
268
|
-
},
|
|
269
|
-
"required": ["source", "requirements", "resources", "task", "env"],
|
|
270
|
-
"additionalProperties": false,
|
|
271
|
-
"allOf": [
|
|
272
|
-
{"if": {"properties": {"resources": {"maxProperties": 0}}}, "then": {"properties": {"exclusiveResources": {"maxItems": 0}}}}
|
|
273
|
-
],
|
|
274
|
-
"description": "一次执行工作的输入;取消走 coda/run@1 的 cancel 操作,不写在输入里"
|
|
275
|
-
},
|
|
276
|
-
"run": true
|
|
277
|
-
}
|
|
278
|
-
}
|
|
143
|
+
"operations": {}
|
|
279
144
|
}
|
package/workflow/moddle.json
CHANGED
|
@@ -47,18 +47,11 @@
|
|
|
47
47
|
{"name": "action", "isAttr": true, "type": "String"}
|
|
48
48
|
]
|
|
49
49
|
},
|
|
50
|
-
{
|
|
51
|
-
"name": "PlacementProperties",
|
|
52
|
-
"isAbstract": true,
|
|
53
|
-
"extends": ["bpmn:Process", "bpmn:ScriptTask", "bpmn:SubProcess"],
|
|
54
|
-
"description": "local 将脚本限制在发起端;any 允许符合要求的执行器。上层 local 不可被子节点放宽;显式执行器绑定仍须满足此约束",
|
|
55
|
-
"properties": [{"name": "placement", "isAttr": true, "type": "String"}]
|
|
56
|
-
},
|
|
57
50
|
{
|
|
58
51
|
"name": "RunsOnProperties",
|
|
59
52
|
"isAbstract": true,
|
|
60
53
|
"extends": ["bpmn:ScriptTask", "bpmn:SubProcess"],
|
|
61
|
-
"description": "脚本步骤要在哪里跑(同 GitHub 的 runs-on):标签如 linux,x64
|
|
54
|
+
"description": "脚本步骤要在哪里跑(同 GitHub 的 runs-on):标签如 linux,x64,是对本机执行环境的要求,不符合就一开始失败,不会把步骤交给别台;写在子流程上对其中每个脚本步骤生效",
|
|
62
55
|
"properties": [
|
|
63
56
|
{"name": "runsOn", "isAttr": true, "type": "String"}
|
|
64
57
|
]
|
|
@@ -88,10 +81,8 @@
|
|
|
88
81
|
"name": "StartEventProperties",
|
|
89
82
|
"isAbstract": true,
|
|
90
83
|
"extends": ["bpmn:StartEvent"],
|
|
91
|
-
"description": "计时器开始事件的:
|
|
84
|
+
"description": "计时器开始事件的:scope 是 project(默认,每个有它的项目各跑)或 machine(整台机器一次)",
|
|
92
85
|
"properties": [
|
|
93
|
-
{"name": "reportTo", "isAttr": true, "type": "String"},
|
|
94
|
-
{"name": "reportOn", "isAttr": true, "type": "String"},
|
|
95
86
|
{"name": "scope", "isAttr": true, "type": "String"}
|
|
96
87
|
]
|
|
97
88
|
},
|
package/workflow/structure.json
CHANGED
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
{
|
|
206
|
-
"description": "coda:
|
|
206
|
+
"description": "coda:scope 只写在定时开始事件上",
|
|
207
207
|
"schema": {
|
|
208
208
|
"properties": {
|
|
209
209
|
"position": {
|
|
@@ -215,22 +215,8 @@
|
|
|
215
215
|
}
|
|
216
216
|
},
|
|
217
217
|
"when": {
|
|
218
|
-
"
|
|
219
|
-
|
|
220
|
-
"required": [
|
|
221
|
-
"reportTo"
|
|
222
|
-
]
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"required": [
|
|
226
|
-
"reportOn"
|
|
227
|
-
]
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
"required": [
|
|
231
|
-
"scope"
|
|
232
|
-
]
|
|
233
|
-
}
|
|
218
|
+
"required": [
|
|
219
|
+
"scope"
|
|
234
220
|
]
|
|
235
221
|
}
|
|
236
222
|
},
|
package/workflow/values.json
CHANGED
|
@@ -30,12 +30,6 @@
|
|
|
30
30
|
"retry": {"type": "string", "pattern": "^[1-5]$", "description": "coda:retry 是失败后最多再试几次,须为 1 到 5 的整数"}
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
"PlacementProperties": {
|
|
34
|
-
"type": "object",
|
|
35
|
-
"properties": {
|
|
36
|
-
"placement": {"enum": ["local", "any"], "description": "coda:placement 只能是 local 或 any;local 限制为发起端,不能隐式回退或被子节点放宽"}
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
33
|
"RunsOnProperties": {
|
|
40
34
|
"type": "object",
|
|
41
35
|
"properties": {
|
|
@@ -66,15 +60,8 @@
|
|
|
66
60
|
"StartEventProperties": {
|
|
67
61
|
"type": "object",
|
|
68
62
|
"properties": {
|
|
69
|
-
"reportTo": {"type": "string",
|
|
70
|
-
"anyOf": [{"pattern": "^\\s*=\\s*vars(?:\\.[A-Za-z0-9_-]+)+\\s*$"},
|
|
71
|
-
{"pattern": "^\\s*(?:coda://threads/|coda\\+space://[^/#]+/threads/)?[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}(?:#(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}|command:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}))?\\s*$"}],
|
|
72
|
-
"description": "coda:reportTo 写会话引用(coda://threads/<会话 UUID>),或只读插件设置的表达式,如 =vars.maintenance.reportTo"},
|
|
73
|
-
"reportOn": {"enum": ["failure", "always"], "description": "coda:reportOn 只能是 failure、always"},
|
|
74
63
|
"scope": {"enum": ["project", "machine"], "description": "coda:scope 只能是 project、machine"}
|
|
75
|
-
}
|
|
76
|
-
"if": {"required": ["reportOn"]},
|
|
77
|
-
"then": {"required": ["reportTo"], "description": "写了 coda:reportOn 就要写 coda:reportTo(结果交给谁)"}
|
|
64
|
+
}
|
|
78
65
|
},
|
|
79
66
|
"EndEventProperties": {
|
|
80
67
|
"type": "object",
|
|
@@ -1,336 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/protocol/v1/remote-caller.json",
|
|
4
|
-
"title": "记录的远端入口",
|
|
5
|
-
"description": "POST /v1/remote-caller 的正文;绑定、回答与错误见 $defs。记录归属、参与者、白名单、幂等与 HTTP 状态由 Coda 检查,见 docs/protocol.md「记录的远端入口」。",
|
|
6
|
-
"$defs": {
|
|
7
|
-
"id": {
|
|
8
|
-
"type": "string",
|
|
9
|
-
"minLength": 1,
|
|
10
|
-
"maxLength": 2048
|
|
11
|
-
},
|
|
12
|
-
"codeResult": {
|
|
13
|
-
"type": "object",
|
|
14
|
-
"properties": {
|
|
15
|
-
"code": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"minLength": 1,
|
|
18
|
-
"maxLength": 128
|
|
19
|
-
},
|
|
20
|
-
"expiresAt": {
|
|
21
|
-
"type": "string",
|
|
22
|
-
"format": "date-parse",
|
|
23
|
-
"description": "绑定码到期时间,申请后 10 分钟"
|
|
24
|
-
},
|
|
25
|
-
"addresses": {
|
|
26
|
-
"type": "array",
|
|
27
|
-
"items": {
|
|
28
|
-
"type": "string"
|
|
29
|
-
},
|
|
30
|
-
"description": "后端的 tailnet 入口;不在 tailnet 时为空"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
"required": [
|
|
34
|
-
"code",
|
|
35
|
-
"expiresAt",
|
|
36
|
-
"addresses"
|
|
37
|
-
],
|
|
38
|
-
"additionalProperties": false
|
|
39
|
-
},
|
|
40
|
-
"bindRequest": {
|
|
41
|
-
"type": "object",
|
|
42
|
-
"properties": {
|
|
43
|
-
"code": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"minLength": 1,
|
|
46
|
-
"maxLength": 128
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
"required": [
|
|
50
|
-
"code"
|
|
51
|
-
],
|
|
52
|
-
"additionalProperties": false
|
|
53
|
-
},
|
|
54
|
-
"bindResult": {
|
|
55
|
-
"type": "object",
|
|
56
|
-
"properties": {
|
|
57
|
-
"token": {
|
|
58
|
-
"type": "string",
|
|
59
|
-
"minLength": 1
|
|
60
|
-
},
|
|
61
|
-
"record": {
|
|
62
|
-
"$ref": "#/$defs/id"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
"required": [
|
|
66
|
-
"token",
|
|
67
|
-
"record"
|
|
68
|
-
],
|
|
69
|
-
"additionalProperties": false
|
|
70
|
-
},
|
|
71
|
-
"workflow": {
|
|
72
|
-
"type": "object",
|
|
73
|
-
"properties": {
|
|
74
|
-
"project": {
|
|
75
|
-
"$ref": "#/$defs/id"
|
|
76
|
-
},
|
|
77
|
-
"workflow": {
|
|
78
|
-
"type": "string",
|
|
79
|
-
"minLength": 1,
|
|
80
|
-
"maxLength": 200
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"required": [
|
|
84
|
-
"project",
|
|
85
|
-
"workflow"
|
|
86
|
-
],
|
|
87
|
-
"additionalProperties": false
|
|
88
|
-
},
|
|
89
|
-
"helloResult": {
|
|
90
|
-
"type": "object",
|
|
91
|
-
"properties": {
|
|
92
|
-
"record": {
|
|
93
|
-
"$ref": "#/$defs/id"
|
|
94
|
-
},
|
|
95
|
-
"machine": {
|
|
96
|
-
"$ref": "#/$defs/id"
|
|
97
|
-
},
|
|
98
|
-
"tools": {
|
|
99
|
-
"type": "array",
|
|
100
|
-
"items": {
|
|
101
|
-
"enum": [
|
|
102
|
-
"machines",
|
|
103
|
-
"machine_diagnostics",
|
|
104
|
-
"read_thread",
|
|
105
|
-
"read_tool_call",
|
|
106
|
-
"workflow_list",
|
|
107
|
-
"workflow_status"
|
|
108
|
-
]
|
|
109
|
-
},
|
|
110
|
-
"uniqueItems": true
|
|
111
|
-
},
|
|
112
|
-
"workflows": {
|
|
113
|
-
"type": "array",
|
|
114
|
-
"items": {
|
|
115
|
-
"$ref": "#/$defs/workflow"
|
|
116
|
-
},
|
|
117
|
-
"uniqueItems": true
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
"required": [
|
|
121
|
-
"record",
|
|
122
|
-
"machine",
|
|
123
|
-
"tools",
|
|
124
|
-
"workflows"
|
|
125
|
-
],
|
|
126
|
-
"additionalProperties": false
|
|
127
|
-
},
|
|
128
|
-
"helloRequest": {
|
|
129
|
-
"type": "object",
|
|
130
|
-
"properties": {
|
|
131
|
-
"method": {
|
|
132
|
-
"const": "hello"
|
|
133
|
-
},
|
|
134
|
-
"params": {
|
|
135
|
-
"type": "object",
|
|
136
|
-
"properties": {},
|
|
137
|
-
"required": [],
|
|
138
|
-
"additionalProperties": false
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
"required": [
|
|
142
|
-
"method"
|
|
143
|
-
],
|
|
144
|
-
"additionalProperties": false
|
|
145
|
-
},
|
|
146
|
-
"toolRequest": {
|
|
147
|
-
"type": "object",
|
|
148
|
-
"properties": {
|
|
149
|
-
"method": {
|
|
150
|
-
"const": "tool"
|
|
151
|
-
},
|
|
152
|
-
"params": {
|
|
153
|
-
"type": "object",
|
|
154
|
-
"properties": {
|
|
155
|
-
"name": {
|
|
156
|
-
"enum": [
|
|
157
|
-
"machines",
|
|
158
|
-
"machine_diagnostics",
|
|
159
|
-
"read_thread",
|
|
160
|
-
"read_tool_call",
|
|
161
|
-
"workflow_list",
|
|
162
|
-
"workflow_status"
|
|
163
|
-
]
|
|
164
|
-
},
|
|
165
|
-
"arguments": {
|
|
166
|
-
"type": "object",
|
|
167
|
-
"description": "参数同 Coda 的同名 MCP 工具"
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
"required": [
|
|
171
|
-
"name",
|
|
172
|
-
"arguments"
|
|
173
|
-
],
|
|
174
|
-
"additionalProperties": false
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
"required": [
|
|
178
|
-
"method",
|
|
179
|
-
"params"
|
|
180
|
-
],
|
|
181
|
-
"additionalProperties": false
|
|
182
|
-
},
|
|
183
|
-
"ticketRequest": {
|
|
184
|
-
"type": "object",
|
|
185
|
-
"properties": {
|
|
186
|
-
"method": {
|
|
187
|
-
"const": "file_ticket"
|
|
188
|
-
},
|
|
189
|
-
"params": {
|
|
190
|
-
"type": "object",
|
|
191
|
-
"properties": {
|
|
192
|
-
"workflow": {
|
|
193
|
-
"type": "string",
|
|
194
|
-
"minLength": 1,
|
|
195
|
-
"maxLength": 200
|
|
196
|
-
},
|
|
197
|
-
"project": {
|
|
198
|
-
"$ref": "#/$defs/id"
|
|
199
|
-
},
|
|
200
|
-
"inputs": {
|
|
201
|
-
"type": "object"
|
|
202
|
-
},
|
|
203
|
-
"requestId": {
|
|
204
|
-
"type": "string",
|
|
205
|
-
"minLength": 1,
|
|
206
|
-
"maxLength": 200
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
"required": [
|
|
210
|
-
"workflow",
|
|
211
|
-
"inputs",
|
|
212
|
-
"requestId"
|
|
213
|
-
],
|
|
214
|
-
"additionalProperties": false
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
"required": [
|
|
218
|
-
"method",
|
|
219
|
-
"params"
|
|
220
|
-
],
|
|
221
|
-
"additionalProperties": false
|
|
222
|
-
},
|
|
223
|
-
"ticketResult": {
|
|
224
|
-
"type": "object",
|
|
225
|
-
"properties": {
|
|
226
|
-
"run": {
|
|
227
|
-
"type": "object",
|
|
228
|
-
"properties": {
|
|
229
|
-
"kind": {
|
|
230
|
-
"const": "workflow-runs"
|
|
231
|
-
},
|
|
232
|
-
"id": {
|
|
233
|
-
"$ref": "#/$defs/id"
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
"required": [
|
|
237
|
-
"kind",
|
|
238
|
-
"id"
|
|
239
|
-
],
|
|
240
|
-
"additionalProperties": false
|
|
241
|
-
},
|
|
242
|
-
"reused": {
|
|
243
|
-
"const": true
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
"required": [
|
|
247
|
-
"run"
|
|
248
|
-
],
|
|
249
|
-
"additionalProperties": false
|
|
250
|
-
},
|
|
251
|
-
"toolResult": {
|
|
252
|
-
"description": "Coda 同名 MCP 工具的回答,不在本协议复制 schema"
|
|
253
|
-
},
|
|
254
|
-
"helloResponse": {
|
|
255
|
-
"type": "object",
|
|
256
|
-
"properties": {
|
|
257
|
-
"result": {
|
|
258
|
-
"$ref": "#/$defs/helloResult"
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
"required": [
|
|
262
|
-
"result"
|
|
263
|
-
],
|
|
264
|
-
"additionalProperties": false
|
|
265
|
-
},
|
|
266
|
-
"toolResponse": {
|
|
267
|
-
"type": "object",
|
|
268
|
-
"properties": {
|
|
269
|
-
"result": {
|
|
270
|
-
"$ref": "#/$defs/toolResult"
|
|
271
|
-
}
|
|
272
|
-
},
|
|
273
|
-
"required": [
|
|
274
|
-
"result"
|
|
275
|
-
],
|
|
276
|
-
"additionalProperties": false
|
|
277
|
-
},
|
|
278
|
-
"ticketResponse": {
|
|
279
|
-
"type": "object",
|
|
280
|
-
"properties": {
|
|
281
|
-
"result": {
|
|
282
|
-
"$ref": "#/$defs/ticketResult"
|
|
283
|
-
}
|
|
284
|
-
},
|
|
285
|
-
"required": [
|
|
286
|
-
"result"
|
|
287
|
-
],
|
|
288
|
-
"additionalProperties": false
|
|
289
|
-
},
|
|
290
|
-
"error": {
|
|
291
|
-
"type": "object",
|
|
292
|
-
"properties": {
|
|
293
|
-
"error": {
|
|
294
|
-
"type": "object",
|
|
295
|
-
"properties": {
|
|
296
|
-
"code": {
|
|
297
|
-
"enum": [
|
|
298
|
-
"invalid_input",
|
|
299
|
-
"unauthorized",
|
|
300
|
-
"forbidden",
|
|
301
|
-
"invalid_state",
|
|
302
|
-
"request_conflict",
|
|
303
|
-
"rate_limited",
|
|
304
|
-
"unavailable"
|
|
305
|
-
]
|
|
306
|
-
},
|
|
307
|
-
"message": {
|
|
308
|
-
"type": "string",
|
|
309
|
-
"minLength": 1
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
"required": [
|
|
313
|
-
"code",
|
|
314
|
-
"message"
|
|
315
|
-
],
|
|
316
|
-
"additionalProperties": false
|
|
317
|
-
}
|
|
318
|
-
},
|
|
319
|
-
"required": [
|
|
320
|
-
"error"
|
|
321
|
-
],
|
|
322
|
-
"additionalProperties": false
|
|
323
|
-
}
|
|
324
|
-
},
|
|
325
|
-
"oneOf": [
|
|
326
|
-
{
|
|
327
|
-
"$ref": "#/$defs/helloRequest"
|
|
328
|
-
},
|
|
329
|
-
{
|
|
330
|
-
"$ref": "#/$defs/toolRequest"
|
|
331
|
-
},
|
|
332
|
-
{
|
|
333
|
-
"$ref": "#/$defs/ticketRequest"
|
|
334
|
-
}
|
|
335
|
-
]
|
|
336
|
-
}
|