@coda-console/plugin-check 0.8.5 → 0.8.7
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/README.md +9 -3
- package/check/agent.mjs +3 -3
- package/check/coda/adapters/admission-api.mjs +10 -1
- package/check/coda/builtin.json +7 -7
- package/check/coda/components/plugins/plugin-rules.mjs +1 -1
- package/check/coda/components/plugins/plugin-source-rules.mjs +1 -1
- package/check/coda/contract.json +7 -7
- package/check/schema.mjs +2 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -63,7 +63,7 @@ Coda 插件页的「商店」列出 Coda 自带的插件,以及 npm 上 `@coda
|
|
|
63
63
|
| `codex` | `@agentclientprotocol/codex-acp` 1.12.0、`@openai/codex` 0.165.0;`overrides` 让 codex-acp 用同一个 `@openai/codex` | — |
|
|
64
64
|
| `claude` | `@agentclientprotocol/sdk` 1.4.0、`@anthropic-ai/claude-agent-sdk` 0.3.312(平台二进制是 SDK 自己的可选依赖) | — |
|
|
65
65
|
| `codex-accounts` | `proper-lockfile` 4.1.2;用依赖插件 `codex` 的 Codex CLI | 无;依赖 `codex` 插件 |
|
|
66
|
-
| `kimi` | 无 | Kimi CLI 2.1.1
|
|
66
|
+
| `kimi` | 无 | Kimi CLI 2.1.1 及以上(缺失或更旧时设置动作装入口核对过的 2.1.1,更新的不动;资源页上可从 Coda 安装、登录) |
|
|
67
67
|
| `grok` | 无 | Grok CLI 1.0.52 及以上(设置动作安装或升级;资源页上可从 Coda 安装、登录) |
|
|
68
68
|
| `opencode` | `jsonc-parser` 3.3.1 | 已登录的 OpenCode CLI 2.1.4 及以上(设置动作安装或升级,OpenCode 1 升到 2) |
|
|
69
69
|
|
|
@@ -97,7 +97,8 @@ Edit、MultiEdit 与 Write 的输入生成标准 `diff` 预览;成功结果用
|
|
|
97
97
|
计划工具归 `think`,Task/Agent 子 Agent、MCP 与未知工具归 `other`,子 Agent 的活动卡片沿用原有报告。
|
|
98
98
|
进行中的工具保留到结果到达;为处理重复结果,已完成调用仅缓存最近 128 条,且估算字符串存储不超过 4 MiB。超限 diff 正常发送但不缓存,淘汰后忽略重复结果,不覆盖客户端已有的 diff。
|
|
99
99
|
|
|
100
|
-
Claude 的额度耗尽按[执行失败](https://github.com/coda-console/coda-protocol/blob/main/docs/agent-protocol.md#额度不足)报 `quota_exhausted
|
|
100
|
+
Claude 的额度耗尽按[执行失败](https://github.com/coda-console/coda-protocol/blob/main/docs/agent-protocol.md#额度不足)报 `quota_exhausted`;
|
|
101
|
+
本轮窗口为 `rejected` 且有有效的 Unix 秒 `resetsAt` 时,同时写 `failure.resetAt`(UTC ISO 8601),并保持正文的 `<t:…>` 改写。没有确切时间就不写。
|
|
101
102
|
只认明确的额度原因,或本轮 `rate_limit` 错误配合订阅窗口的 `rejected`,不把普通 429、登录失败或额度预警算进去。
|
|
102
103
|
SDK 作为 `assistant` 消息发来的 API 错误不当成回复正文;由本轮 `result` 报告失败。
|
|
103
104
|
后台结果或定时唤醒后的自主轮次没有 `session/prompt` 可回复,失败时以自己的活动卡片报 `failed` 和原因,额度耗尽的卡片标题为「额度不足」;
|
|
@@ -364,7 +365,12 @@ Codex 的原生失败统一以 ACP 错误结束,包括只有 `turn/completed.f
|
|
|
364
365
|
插件将服务端内部错误、5xx、响应流中断、模型容量不足,以及已知的 `model '…' is not enabled in rustponsesapi` 报成
|
|
365
366
|
`error.data._meta.coda.failure: {kind: "service_unavailable", input: "accepted"}`。新轮请求明确被拒绝、只给
|
|
366
367
|
`Internal error` 时按临时故障报告 `input: "not_accepted"`;这表示允许有限重试,不表示已确定历史故障根因。
|
|
367
|
-
|
|
368
|
+
额度耗尽 `usageLimitExceeded` 单独报 `failure.kind: "quota_exhausted"`;认证、上下文限制、参数、配置或沙箱错误不带此标记。
|
|
369
|
+
Codex 仅从本次错误的 `additionalDetails`、`message` 或外层错误正文提取重置时间:JSON 的 `error.resets_at`(有效 Unix 秒),
|
|
370
|
+
或 `try again at` / `resets at` / `resets` 后明确带 `Z` 的 ISO 8601 时间;取到就写 UTC `failure.resetAt`,可读正文中的这些 ISO 时间改写为 `<t:…>`。
|
|
371
|
+
未给时间、只有相对时间或没有时区时不写。`account/rateLimits/read` 是账号级快照,可能含多个模型额度池,
|
|
372
|
+
失败未指出阻断本轮的额度池,因此不从该快照推断重置时间,也不另开连接查询。
|
|
373
|
+
Coda 对接时,`backend/test/codex-errors.test.mjs` 中 `usageLimitExceeded` 原先预期的 `unknown` 应改为 `quota_exhausted`;没有时间仍属额度不足。
|
|
368
374
|
插件不做退避或重新发送;Coda 按通用协议统一退避,客户端只支持 ACP 时仍能读到完整错误。
|
|
369
375
|
|
|
370
376
|
Kimi 2.1.1 会把五小时额度耗尽(`403 You've reached your 5-hour usage limit.`)误报为 ACP `auth_required`。
|
package/check/agent.mjs
CHANGED
|
@@ -127,7 +127,7 @@ class Session {
|
|
|
127
127
|
const parsed = schemas.zSessionNotification.safeParse(params);
|
|
128
128
|
if (!parsed.success) {
|
|
129
129
|
this.malformed++;
|
|
130
|
-
this.at.fail('update.schema', `session/update 不合 ACP schema(SDK
|
|
130
|
+
this.at.fail('update.schema', `session/update 不合 ACP schema(SDK 2.6.0):${explain(parsed.error, params)}`);
|
|
131
131
|
return;
|
|
132
132
|
}
|
|
133
133
|
const update = params.update, kind = update.sessionUpdate;
|
|
@@ -220,7 +220,7 @@ class Session {
|
|
|
220
220
|
if (problem) say.fail('handshake.initialize', problem);
|
|
221
221
|
this.init = reply.result;
|
|
222
222
|
if (reply.result.protocolVersion !== ACP_PROTOCOL_VERSION) {
|
|
223
|
-
say.fail('handshake.protocol', `protocolVersion 是 ${reply.result.protocolVersion}:Coda 用的 ACP(SDK
|
|
223
|
+
say.fail('handshake.protocol', `protocolVersion 是 ${reply.result.protocolVersion}:Coda 用的 ACP(SDK 2.6.0)是版本 ${ACP_PROTOCOL_VERSION}(Coda 自己不核对这一项,按它说的协议说话)`);
|
|
224
224
|
return 'failed';
|
|
225
225
|
}
|
|
226
226
|
const caps = reply.result.agentCapabilities ?? {}, waits = !!caps._meta?.coda?.waits && typeof caps._meta.coda.waits === 'object';
|
|
@@ -449,7 +449,7 @@ async function live(session, { prompt, word }, limits, say) {
|
|
|
449
449
|
await session.settle(limits.settle, { cancel: true });
|
|
450
450
|
}
|
|
451
451
|
const kinds = [...session.kinds].map(([kind, n]) => `${kind} ×${n}`).join(',');
|
|
452
|
-
if (!session.malformed) say.pass('live.updates', `session/update 都合 ACP schema(SDK
|
|
452
|
+
if (!session.malformed) say.pass('live.updates', `session/update 都合 ACP schema(SDK 2.6.0)与 Coda 扩展 schema:${kinds || '无'}`);
|
|
453
453
|
}
|
|
454
454
|
|
|
455
455
|
// Checks one declared agent of the plugin as the manifest level read it (`checked`, manifest.mjs checkManifest), started as
|
|
@@ -1,8 +1,17 @@
|
|
|
1
1
|
import { admissionFeatures } from '../domain/resource-admission.mjs';
|
|
2
2
|
|
|
3
3
|
// The module's local ledger API, exported unchanged to plugin-check.
|
|
4
|
-
export function admissionAPI(call) {
|
|
4
|
+
export function admissionAPI(call, handlers = new Map()) {
|
|
5
5
|
return {
|
|
6
|
+
handle(operation, fn) {
|
|
7
|
+
if (!['lend', 'return'].includes(operation) || typeof fn !== 'function') throw new TypeError('resources.handle(lend|return, fn)');
|
|
8
|
+
if (handlers.has(operation)) throw new TypeError(`资源钩子已登记:${operation}`);
|
|
9
|
+
handlers.set(operation, fn);
|
|
10
|
+
return { dispose: () => handlers.delete(operation) };
|
|
11
|
+
},
|
|
12
|
+
declareEntities: entities => call('declareEntities', [entities]),
|
|
13
|
+
declareLinks: links => call('declareLinks', [links]),
|
|
14
|
+
links: entity => call('links', [entity]),
|
|
6
15
|
features: admissionFeatures,
|
|
7
16
|
declareGroups: groups => call('declareGroups', [groups]),
|
|
8
17
|
groupOwner: name => call('groupOwner', [name]),
|
package/check/coda/builtin.json
CHANGED
|
@@ -1317,7 +1317,7 @@
|
|
|
1317
1317
|
"id": "composer",
|
|
1318
1318
|
"displayName": "输入框模式",
|
|
1319
1319
|
"description": "交接、子会话、! 命令、Ultra 与循环",
|
|
1320
|
-
"version": "5.1.
|
|
1320
|
+
"version": "5.1.1",
|
|
1321
1321
|
"category": "工作流程",
|
|
1322
1322
|
"icon": {
|
|
1323
1323
|
"symbol": "character.cursor.ibeam",
|
|
@@ -1328,8 +1328,8 @@
|
|
|
1328
1328
|
"kind": "builtin",
|
|
1329
1329
|
"package": "@coda-console/composer",
|
|
1330
1330
|
"tag": "latest",
|
|
1331
|
-
"version": "5.1.
|
|
1332
|
-
"integrity": "sha512-
|
|
1331
|
+
"version": "5.1.1",
|
|
1332
|
+
"integrity": "sha512-mNqhja3Lw5nrBX7i+r+iU+i0wShOUs7OtEOedstqnMkY6WQPiimOATz43AYR7mKblbfLDB9zh+rrx8BUeb90HA==",
|
|
1333
1333
|
"repo": "https://github.com/coda-console/coda-plugins.git",
|
|
1334
1334
|
"path": "plugins/composer"
|
|
1335
1335
|
},
|
|
@@ -1377,7 +1377,7 @@
|
|
|
1377
1377
|
],
|
|
1378
1378
|
"services": [],
|
|
1379
1379
|
"agents": [],
|
|
1380
|
-
"instructions": "要把改动合进默认分支时,先用 workflow_run 发起 kickoff(给 title、goal、建议的 way
|
|
1380
|
+
"instructions": "要把改动合进默认分支时,先用 workflow_run 发起 kickoff(给 title、goal、建议的 way、要不要设备验收;开在别的目录或要指定分支时给 branch),用户在开工卡上选定后,流程会把下一步交给你;不要先改完再补开开发流程。",
|
|
1381
1381
|
"commands": [],
|
|
1382
1382
|
"capabilities": [],
|
|
1383
1383
|
"groups": [],
|
|
@@ -1907,7 +1907,7 @@
|
|
|
1907
1907
|
"id": "review",
|
|
1908
1908
|
"displayName": "PR 生命流程",
|
|
1909
1909
|
"description": "PR 从检查、评审到批准合并;简易开发",
|
|
1910
|
-
"version": "2.
|
|
1910
|
+
"version": "2.15.0",
|
|
1911
1911
|
"category": "工作流程",
|
|
1912
1912
|
"icon": {
|
|
1913
1913
|
"symbol": "checkmark.bubble.fill",
|
|
@@ -1918,8 +1918,8 @@
|
|
|
1918
1918
|
"kind": "builtin",
|
|
1919
1919
|
"package": "@coda-console/review",
|
|
1920
1920
|
"tag": "latest",
|
|
1921
|
-
"version": "2.
|
|
1922
|
-
"integrity": "sha512-
|
|
1921
|
+
"version": "2.15.0",
|
|
1922
|
+
"integrity": "sha512-YSVt911nBNnBQo3oePfQxnXNeKfFg+QvJd8YkPqKBWXP5OYyO8NrDg48PNnwav8SztVDT6OO42iOw4UsQwebLg==",
|
|
1923
1923
|
"repo": "https://github.com/coda-console/coda-plugins.git",
|
|
1924
1924
|
"path": "plugins/review"
|
|
1925
1925
|
},
|
|
@@ -139,7 +139,7 @@ export function readPlugin(dir, source, points = CONTRIBUTION_POINTS) {
|
|
|
139
139
|
// The entry as one path in its directory (`./view/a.html`, `view//a.html` are `view/a.html`): the clients load it by that.
|
|
140
140
|
views: (contributes.views ?? []).map(v => ({ id: v.id, title: v.title, entry: posix.normalize(v.entry), ...(v.in?.length ? { in: [...v.in] } : {}),
|
|
141
141
|
...(v.icon ? { icon: v.icon } : {}), ...(v.handles?.length ? { handles: [...v.handles] } : {}), ...(v.readout ? { readout: v.readout } : {}),
|
|
142
|
-
...(v.checkout ? { checkout: v.checkout } : {}), ...(v.frame ? { frame: v.frame } : {}) })),
|
|
142
|
+
...(v.checkout ? { checkout: v.checkout } : {}), ...(v.frame ? { frame: v.frame } : {}), ...(v.provides?.length ? { provides: [...v.provides] } : {}) })),
|
|
143
143
|
...(contributes.protocols?.length ? { protocols: structuredClone(contributes.protocols) } : {}),
|
|
144
144
|
...(contributes.protocolImplementations?.length ? { protocolImplementations: [...contributes.protocolImplementations] } : {}),
|
|
145
145
|
...(Object.keys(offers).length ? { offers } : {}),
|
|
@@ -331,7 +331,7 @@ export function contributions(plugin, catalog = new Map()) {
|
|
|
331
331
|
// The pages it opens in the clients, by name, with where they stay and their icon there: they run in the client's
|
|
332
332
|
// sandbox, not as commands here.
|
|
333
333
|
...(plugin.views?.length ? { views: plugin.views.map(v => ({ id: v.id, title: v.title, ...(v.in ? { in: v.in } : {}), ...(v.icon ? { icon: v.icon } : {}), ...(v.handles ? { handles: v.handles } : {}), ...(v.readout ? { readout: v.readout } : {}),
|
|
334
|
-
...(v.checkout ? { checkout: v.checkout } : {}) })) } : {}),
|
|
334
|
+
...(v.checkout ? { checkout: v.checkout } : {}), ...(v.provides ? { provides: v.provides } : {}) })) } : {}),
|
|
335
335
|
...Object.assign({}, ...[...CONTRIBUTION_POINTS.values()].map(point => point.confirm?.(plugin))),
|
|
336
336
|
extensions: plugin.extensions.map(e => ({ plugin: e.plugin, point: e.point, command: e.command })),
|
|
337
337
|
// What it writes for points under keys of `contributes` (the resources plugin's panels): by point, how many and the
|
package/check/coda/contract.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
2
|
+
"commit": "8cb0da14acae31719a5021e1d5e04aa705f63175",
|
|
3
3
|
"packages": {
|
|
4
4
|
"@0dep/piso": "5.2.0",
|
|
5
|
-
"@agentclientprotocol/sdk": "
|
|
6
|
-
"@coda-console/protocol": "5.
|
|
5
|
+
"@agentclientprotocol/sdk": "2.6.0",
|
|
6
|
+
"@coda-console/protocol": "5.10.0",
|
|
7
7
|
"ajv": "8.20.0",
|
|
8
8
|
"yaml": "2.9.1"
|
|
9
9
|
},
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"check/coda/components/protocols/creation.mjs": "2b4a400d3064af4b5106077dc783c567910fef3c47b2d52af3f0d838c5accf19",
|
|
13
13
|
"check/coda/components/protocols/types.mjs": "6876689142866bd45fc085951f6ea9e1fc303334e3657e97cc9cf5e277311248",
|
|
14
14
|
"check/coda/adapters/provider-api.mjs": "e8f622cc4d70dc641399b8a26d678d566006edd506893773b18a58f21fa8ed7b",
|
|
15
|
-
"check/coda/adapters/admission-api.mjs": "
|
|
15
|
+
"check/coda/adapters/admission-api.mjs": "f19706eb66e598fceb1a72ac81c51e48f4dc0179a18a73edaccb4d68ca629f56",
|
|
16
16
|
"check/coda/components/composers/contributions.mjs": "43d3e15fb1f63b7b5c20716030d9537613809ed5cc2fb466a3678bfa308f9f92",
|
|
17
17
|
"check/coda/components/composers/schemas.mjs": "6d497f58147756e789f9a566b2366f2fe36c0c72310421fb02508bf24a04f2c0",
|
|
18
18
|
"check/coda/components/plugins/contribution-points.mjs": "2dade9fe4f3fa2b4e89f49a1ac4378ab2621e5ac542eb175967091f04568b45c",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"check/coda/components/plugins/model-contributions.mjs": "018a7157954b2326887ba1a780b37d3beb33338e41a28936b313562c2939d563",
|
|
21
21
|
"check/coda/components/plugins/plugin-extensions.mjs": "4d7963185195ba6d21a4e49a66987613d5892210b1eb1dc02cffb7b816407776",
|
|
22
22
|
"check/coda/components/plugins/plugin-icons.mjs": "ec29cadce4948ecacabfe911a2ceb45414b96e28971358acbc4e952bedc78e1a",
|
|
23
|
-
"check/coda/components/plugins/plugin-rules.mjs": "
|
|
24
|
-
"check/coda/components/plugins/plugin-source-rules.mjs": "
|
|
23
|
+
"check/coda/components/plugins/plugin-rules.mjs": "54e063391e1091e403364cc2dc1f34630ccba065996462a81e4b437f39ce0bef",
|
|
24
|
+
"check/coda/components/plugins/plugin-source-rules.mjs": "3e0e3267d43546c131255d7c13dea80959efad95be698fe1a4a0f6a211419364",
|
|
25
25
|
"check/coda/components/plugins/skill-document.mjs": "153ad3c096c7c9b7774bcf7dcc0ba603c962ee1ac8697c8a71e3f2c9ba9c92e6",
|
|
26
26
|
"check/coda/components/prompt-recovery/prompt-recovery.mjs": "f43f21d24c19a58113d3304f9248225b12080ab00ed15eab74bf7b94642732de",
|
|
27
27
|
"check/coda/components/session-config/commands.mjs": "7ce6b7872b3bf4dbc73b2af9a53cca4b5356ad32656903218757f449bb5abed4",
|
|
@@ -39,6 +39,6 @@
|
|
|
39
39
|
"check/coda/resources/plugins/resources/panels/panels.mjs": "452860c6b1b39dd9a67a8dadf4dac8f7773741b3608274494a8ac518a01f5b33",
|
|
40
40
|
"check/coda/resources/plugins/resources/panels/rules.mjs": "80da2709985c3866fff1698ea4d1c1afdf59cac2cc955605d3ec6c35f181eec6",
|
|
41
41
|
"check/coda/resources/plugins/resources/panels/sign-in.mjs": "1271a24e33b1b882a1fb9bee03b8e240db8b9bee1b5208f0e1c84499cfb1be7e",
|
|
42
|
-
"check/coda/builtin.json": "
|
|
42
|
+
"check/coda/builtin.json": "b2f7cb8f69bf270b84bbe4c49bfe27440482fba729eb53287cd4b5e2955943bd"
|
|
43
43
|
}
|
|
44
44
|
}
|
package/check/schema.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// ACP's own parsers, from the SDK version Coda pins (package.json). They are its generated zod schemas, which the SDK does
|
|
2
|
-
// not export by name: read from the file
|
|
2
|
+
// not export by name: read from the stable v1 file relative to its entry point.
|
|
3
3
|
const sdk = import.meta.resolve('@agentclientprotocol/sdk');
|
|
4
|
-
export const schemas = await import(new URL('
|
|
4
|
+
export const schemas = await import(new URL('../schema/zod.gen.js', sdk));
|
|
5
5
|
|
|
6
6
|
// One line on why a value does not parse. A union (a session update is one of many kinds) names the branch it meant: the
|
|
7
7
|
// one whose `sessionUpdate` matched.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coda-console/plugin-check",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.7",
|
|
4
4
|
"description": "Coda 插件的契约检查:扮演 Coda 读清单、启动 Agent 讲 ACP 与 _coda/wait、读资源类型(与旧的面板)。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@0dep/piso": "5.2.0",
|
|
26
|
-
"@agentclientprotocol/sdk": "
|
|
27
|
-
"@coda-console/protocol": "5.
|
|
26
|
+
"@agentclientprotocol/sdk": "2.6.0",
|
|
27
|
+
"@coda-console/protocol": "5.10.0",
|
|
28
28
|
"ajv": "8.20.0",
|
|
29
29
|
"yaml": "2.9.1"
|
|
30
30
|
},
|