@coda-console/plugin-check 0.5.12 → 0.5.13
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 +1 -1
- package/check/manifest.mjs +3 -4
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -400,7 +400,7 @@ gh workflow run publish.yml --repo coda-console/coda-plugins --ref main
|
|
|
400
400
|
## 契约检查
|
|
401
401
|
|
|
402
402
|
扮演 Coda 去读一个插件目录:清单对 Coda 的类型 schema 校验,Agent 照 Coda 的样子启动、说 Coda 说的话,面板由 Coda 的资源插件模块读一次。
|
|
403
|
-
|
|
403
|
+
插件写的合乎它用到的类型就对:清单的写法只在协议包 `@coda-console/protocol`([coda-console/coda-protocol](https://github.com/coda-console/coda-protocol))的 schema 里,由 Coda 自己用的同一个校验器判,
|
|
404
404
|
检查包不另写规则,Coda 加字段只是改 schema。`check/coda/` 是 Coda 文件的原样副本(见[契约副本](#契约副本)),检查包手写的只有怎样扮演 Coda、怎样判。
|
|
405
405
|
只在装到一台机器上才知道的(仓库里扫不扫得到、npm 锁文件、和那台已装插件冲突)是那台 Coda 安装时说的,不是插件类型的问题,检查不跑。
|
|
406
406
|
|
package/check/manifest.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// The manifest level: whether the plugin is of the types it names (Coda's docs/plugins.md「插件的内容」, #1917). Its
|
|
2
|
-
// package.json is checked against the schemas of Coda's types (
|
|
3
|
-
//
|
|
4
|
-
// ID, and its settings named under it. What Coda says only where it installs one — the repository it comes from, its npm
|
|
2
|
+
// package.json is checked against the schemas of Coda's types (the protocol, @coda-console/protocol) by the checker Coda runs
|
|
3
|
+
// itself, and then read as Coda reads it: its ID, and its settings named under it. What Coda says only where it installs one — the repository it comes from, its npm
|
|
5
4
|
// lock, the plugins of that machine beside it — is that machine's to say, not a question of the plugin's types: the checker
|
|
6
5
|
// does not run it. The plugins Coda ships (check/coda/builtin.json) and those beside this one in its directory's parent
|
|
7
6
|
// stand in for what it depends on, for the levels after this one.
|
|
@@ -9,7 +8,7 @@ import { existsSync, readFileSync, realpathSync } from 'node:fs';
|
|
|
9
8
|
import { dirname, join } from 'node:path';
|
|
10
9
|
import { inflateSync } from 'node:zlib';
|
|
11
10
|
import shipped from './coda/builtin.json' with { type: 'json' };
|
|
12
|
-
import { manifestProblem } from '
|
|
11
|
+
import { manifestProblem } from '@coda-console/protocol/validate';
|
|
13
12
|
import { offerProblem } from './coda/components/plugins/plugin-extensions.mjs';
|
|
14
13
|
import { choosesModelProviders, pluginEnv, readPlugin, resolveSettings } from './coda/components/plugins/plugin-rules.mjs';
|
|
15
14
|
import { panelEntries } from './coda/resources/plugins/resources/panels/rules.mjs';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coda-console/plugin-check",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.13",
|
|
4
4
|
"description": "Coda 插件的契约检查:扮演 Coda 读清单、启动 Agent 讲 ACP 与 _coda/wait、读面板。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@0dep/piso": "5.2.0",
|
|
26
26
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
27
|
+
"@coda-console/protocol": "1.0.0",
|
|
27
28
|
"ajv": "8.20.0",
|
|
28
29
|
"yaml": "2.9.1"
|
|
29
30
|
},
|