@coda-console/plugin-check 0.5.13 → 0.5.15
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 +7 -7
- package/check/coda/builtin.json +109 -1
- package/check/coda/components/plugins/agent-plugins.mjs +1 -1
- package/check/coda/components/plugins/plugin-extensions.mjs +13 -6
- package/check/coda/components/plugins/plugin-rules.mjs +8 -6
- package/check/coda/components/session-config/commands.mjs +1 -1
- package/check/coda/contract.json +10 -37
- package/check/coda/domain/agent-protocol.mjs +1 -1
- package/check/coda/resources/plugins/resources/panels/panels.mjs +4 -8
- package/check/coda/resources/plugins/resources/panels/rules.mjs +11 -78
- package/check/manifest.mjs +4 -9
- package/package.json +2 -2
- package/check/coda/components/plugins/plugin-schema.mjs +0 -177
- package/check/coda/components/plugins/schemas/agents.json +0 -50
- package/check/coda/components/plugins/schemas/capabilities.json +0 -16
- package/check/coda/components/plugins/schemas/commands.json +0 -21
- package/check/coda/components/plugins/schemas/common.json +0 -25
- package/check/coda/components/plugins/schemas/composer-modes.json +0 -79
- package/check/coda/components/plugins/schemas/configuration.json +0 -23
- package/check/coda/components/plugins/schemas/endpoints.json +0 -19
- package/check/coda/components/plugins/schemas/environment.json +0 -22
- package/check/coda/components/plugins/schemas/events.json +0 -23
- package/check/coda/components/plugins/schemas/executors.json +0 -26
- package/check/coda/components/plugins/schemas/extension-points.json +0 -57
- package/check/coda/components/plugins/schemas/extensions.json +0 -13
- package/check/coda/components/plugins/schemas/git-credentials.json +0 -17
- package/check/coda/components/plugins/schemas/groups.json +0 -21
- package/check/coda/components/plugins/schemas/instructions.json +0 -9
- package/check/coda/components/plugins/schemas/mcp-servers.json +0 -29
- package/check/coda/components/plugins/schemas/model-providers.json +0 -39
- package/check/coda/components/plugins/schemas/path.json +0 -16
- package/check/coda/components/plugins/schemas/plugin.json +0 -46
- package/check/coda/components/plugins/schemas/repositories.json +0 -7
- package/check/coda/components/plugins/schemas/services.json +0 -9
- package/check/coda/components/plugins/schemas/setting.json +0 -242
- package/check/coda/components/plugins/schemas/setup.json +0 -7
- package/check/coda/components/plugins/schemas/skills.json +0 -15
- package/check/coda/components/plugins/schemas/views.json +0 -30
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/mcp-servers.json",
|
|
4
|
-
"title": "contributes.mcpServers:给 Agent 的 MCP 服务器",
|
|
5
|
-
"description": "服务器名 → { command, args, env },照 Claude Code 的 .mcp.json:Agent 在本机启动、经标准输入输出说话的程序(stdio),不经 shell。command 与 args 里可以写 ${CODA_PLUGIN_PATH}、${CODA_PLUGIN_STATE}、${CODA_NODE};设置经 env 交给它(写法同 contributes.environment)。",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"maxProperties": 20,
|
|
8
|
-
"propertyNames": {"description": "服务器名只用小写字母、数字和「-」,以字母开头,至多 40 个字符,不能是 Coda 自己的 coda", "$ref": "common.json#/$defs/id", "not": {"const": "coda"}},
|
|
9
|
-
"additionalProperties": {
|
|
10
|
-
"type": "object",
|
|
11
|
-
"properties": {
|
|
12
|
-
"type": {"description": "现在只支持由 Agent 在本机启动的服务器(stdio)", "const": "stdio"},
|
|
13
|
-
"command": {"$ref": "#/$defs/word"},
|
|
14
|
-
"args": {"description": "不超过 100 项", "type": "array", "maxItems": 100, "items": {"$ref": "#/$defs/word"}},
|
|
15
|
-
"env": {"$ref": "environment.json"}
|
|
16
|
-
},
|
|
17
|
-
"required": ["command"],
|
|
18
|
-
"additionalProperties": false
|
|
19
|
-
},
|
|
20
|
-
"$defs": {
|
|
21
|
-
"word": {
|
|
22
|
-
"description": "一行不超过 4096 字的文字;${…} 只能是 CODA_PLUGIN_PATH、CODA_PLUGIN_STATE 或 CODA_NODE,设置经 env 交给它",
|
|
23
|
-
"type": "string",
|
|
24
|
-
"maxLength": 4096,
|
|
25
|
-
"pattern": "^[^\\u0000\\r\\n]+$",
|
|
26
|
-
"x-placeholders": {"names": ["CODA_PLUGIN_PATH", "CODA_PLUGIN_STATE", "CODA_NODE"]}
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/model-providers.json",
|
|
4
|
-
"title": "contributes.modelProviders:插件提供的模型服务",
|
|
5
|
-
"description": "别的插件用 coda-model-provider 的设置按「插件/id」选它:叫什么、讲哪种接口、在哪(地址里可以写本插件的单值设置 ${config:…})、Key 是本插件的哪个密文。",
|
|
6
|
-
"type": "array",
|
|
7
|
-
"maxItems": 10,
|
|
8
|
-
"items": {
|
|
9
|
-
"type": "object",
|
|
10
|
-
"properties": {
|
|
11
|
-
"id": {"$ref": "common.json#/$defs/id"},
|
|
12
|
-
"title": {"$ref": "common.json#/$defs/line40"},
|
|
13
|
-
"api": {
|
|
14
|
-
"description": "接口:openai-completions、openai-responses、anthropic-messages",
|
|
15
|
-
"enum": ["openai-completions", "openai-responses", "anthropic-messages"]
|
|
16
|
-
},
|
|
17
|
-
"url": {
|
|
18
|
-
"description": "一行地址,只能引用本插件的单值设置(${config:<设置名>},不能是密文)",
|
|
19
|
-
"type": "string",
|
|
20
|
-
"maxLength": 4096,
|
|
21
|
-
"pattern": "^[^\\u0000\\r\\n]+$",
|
|
22
|
-
"x-placeholders": {"config": {"properties": {"type": {"enum": ["string", "number", "integer"]}, "writeOnly": {"const": false}}, "required": ["type"]}}
|
|
23
|
-
},
|
|
24
|
-
"key": {
|
|
25
|
-
"description": "key 是 ${config:<本插件的密文设置>}",
|
|
26
|
-
"type": "string",
|
|
27
|
-
"pattern": "^\\$\\{config:[^}]+\\}$",
|
|
28
|
-
"x-ref": {
|
|
29
|
-
"pointer": "/contributes/configuration/properties",
|
|
30
|
-
"part": "^\\$\\{config:([^}]+)\\}$",
|
|
31
|
-
"match": {"properties": {"writeOnly": {"const": true}}, "required": ["writeOnly"]}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"required": ["id", "title", "api", "url"],
|
|
36
|
-
"additionalProperties": false
|
|
37
|
-
},
|
|
38
|
-
"x-unique-by": ["id"]
|
|
39
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/path.json",
|
|
4
|
-
"title": "contributes.path:放上 PATH 的目录",
|
|
5
|
-
"description": "插件目录里的目录(相对路径),或它在后端的状态目录 ${CODA_PLUGIN_STATE} 下的目录(setup 可以建它)。",
|
|
6
|
-
"type": "array",
|
|
7
|
-
"maxItems": 20,
|
|
8
|
-
"items": {
|
|
9
|
-
"type": "string",
|
|
10
|
-
"minLength": 1,
|
|
11
|
-
"pattern": "^[^\\u0000:\\n]*$",
|
|
12
|
-
"if": {"pattern": "^\\$\\{CODA_PLUGIN_STATE\\}"},
|
|
13
|
-
"then": {"description": "${CODA_PLUGIN_STATE} 下的目录:不离开它", "pattern": "^\\$\\{CODA_PLUGIN_STATE\\}(/(?!(.*/)?\\.\\.(/|$))[^$]*)?$"},
|
|
14
|
-
"else": {"description": "插件目录里的目录(相对路径,不离开插件目录)", "pattern": "^(?!/)(?!(.*/)?\\.\\.(/|$))(?!\\.?/*$)[^$]*$", "x-file": {"type": "directory"}}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/plugin.json",
|
|
4
|
-
"title": "插件清单(插件目录的 package.json)",
|
|
5
|
-
"description": "照 VS Code 扩展的 package.json 写;Coda 读的是下面这些键,其余是 npm 的,不管。contributes 的每个键是一种类型,各有自己的 schema;不是 Coda 的键,是写给别的插件的扩展点的(它们声明的类型),由那个扩展点的 schema 校验。",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"id": {"$ref": "common.json#/$defs/id", "description": "插件 ID:小写字母、数字和「-」,以字母开头,至多 40 个字符;不写就用 name"},
|
|
9
|
-
"name": {"type": "string"},
|
|
10
|
-
"categories": {"description": "分类:文本的数组,第一个是插件页里归的类", "type": "array", "items": {"type": "string"}},
|
|
11
|
-
"main": {"description": "插件宿主运行的模块:插件目录里的 .js 或 .mjs 文件", "type": "string", "pattern": "\\.m?js$", "x-file": {"type": "file"}},
|
|
12
|
-
"activationEvents": {"description": "宿主什么时候加载 main:onStartupFinished(后端一启动),不重复", "type": "array", "items": {"enum": ["onStartupFinished"]}, "uniqueItems": true},
|
|
13
|
-
"extensionDependencies": {"description": "需要先装的插件的 ID,不重复", "type": "array", "items": {"$ref": "common.json#/$defs/id"}, "uniqueItems": true},
|
|
14
|
-
"contributes": {
|
|
15
|
-
"description": "插件带来的东西:每个键一种类型",
|
|
16
|
-
"type": "object",
|
|
17
|
-
"properties": {
|
|
18
|
-
"configuration": {"$ref": "configuration.json"},
|
|
19
|
-
"capabilities": {"$ref": "capabilities.json"},
|
|
20
|
-
"instructions": {"$ref": "instructions.json"},
|
|
21
|
-
"agents": {"$ref": "agents.json"},
|
|
22
|
-
"extensionPoints": {"$ref": "extension-points.json"},
|
|
23
|
-
"extensions": {"$ref": "extensions.json"},
|
|
24
|
-
"groups": {"$ref": "groups.json"},
|
|
25
|
-
"events": {"$ref": "events.json"},
|
|
26
|
-
"commands": {"$ref": "commands.json"},
|
|
27
|
-
"gitCredentials": {"$ref": "git-credentials.json"},
|
|
28
|
-
"repositories": {"$ref": "repositories.json"},
|
|
29
|
-
"services": {"$ref": "services.json"},
|
|
30
|
-
"setup": {"$ref": "setup.json"},
|
|
31
|
-
"skills": {"$ref": "skills.json"},
|
|
32
|
-
"environment": {"$ref": "environment.json"},
|
|
33
|
-
"path": {"$ref": "path.json"},
|
|
34
|
-
"endpoints": {"$ref": "endpoints.json"},
|
|
35
|
-
"mcpServers": {"$ref": "mcp-servers.json"},
|
|
36
|
-
"views": {"$ref": "views.json"},
|
|
37
|
-
"modelProviders": {"$ref": "model-providers.json"},
|
|
38
|
-
"executors": {"$ref": "executors.json"},
|
|
39
|
-
"composerModes": {"$ref": "composer-modes.json"}
|
|
40
|
-
},
|
|
41
|
-
"propertyNames": {"description": "contributes 的键:字母和数字,以小写字母开头", "pattern": "^[a-z][A-Za-z0-9]{0,39}$"}
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
"if": {"properties": {"activationEvents": {"minItems": 1}}, "required": ["activationEvents"]},
|
|
45
|
-
"then": {"required": ["main"], "description": "写了 activationEvents 的插件须有 main"}
|
|
46
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/repositories.json",
|
|
4
|
-
"title": "contributes.repositories:列出这台能访问的仓库",
|
|
5
|
-
"description": "一行命令,打印仓库供客户端选。只有 Coda 自带的插件装得上(安装时的规则)。",
|
|
6
|
-
"$ref": "common.json#/$defs/commandHolder"
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/services.json",
|
|
4
|
-
"title": "contributes.services:开启随包服务",
|
|
5
|
-
"description": "随后端包的独立服务的 ID;没有已安装插件开启的服务不运行。",
|
|
6
|
-
"type": "array",
|
|
7
|
-
"uniqueItems": true,
|
|
8
|
-
"items": {"$ref": "common.json#/$defs/name"}
|
|
9
|
-
}
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/setting.json",
|
|
4
|
-
"title": "一项设置的声明",
|
|
5
|
-
"description": "插件用 JSON Schema 声明设置,Coda 读的是其中一部分:单个值;多选(items.anyOf 的常量);多个模型服务;一列行;表格(additionalProperties 是每一项)。表格的每一项是单个值、Agent 组合或几列;一列是单个值或 Agent 组合。格式只认 coda-agent(新会话用什么启动)、coda-agent-match(表格的行名:哪些会话)、duration(ISO 8601 时长)、coda-repo、coda-directory、coda-model-provider(别的插件提供的模型服务)、coda-model-url(模型服务的地址,Key 与接口写在同组的 modelKey、modelApi)。writeOnly 是密文:只写不读,放在数据库旁的文件里。",
|
|
6
|
-
"$ref": "#/$defs/setting",
|
|
7
|
-
"$defs": {
|
|
8
|
-
"base": {
|
|
9
|
-
"type": "object",
|
|
10
|
-
"properties": {
|
|
11
|
-
"type": {"description": "type 取 boolean、integer、number、string、object、array", "enum": ["boolean", "integer", "number", "string", "object", "array"]},
|
|
12
|
-
"title": {"type": "string"},
|
|
13
|
-
"description": {"type": "string"},
|
|
14
|
-
"markdownDescription": {"type": "string"},
|
|
15
|
-
"order": {"type": "number"},
|
|
16
|
-
"default": true,
|
|
17
|
-
"enum": {"description": "enum 是非空的数组", "type": "array", "minItems": 1},
|
|
18
|
-
"enumDescriptions": {"type": "array"},
|
|
19
|
-
"enumItemLabels": {"description": "enumItemLabels 是每个选项显示的文字,各不超过 100 字", "type": "array", "items": {"type": "string", "maxLength": 100}},
|
|
20
|
-
"minimum": {"type": "number"},
|
|
21
|
-
"maximum": {"type": "number"},
|
|
22
|
-
"format": {
|
|
23
|
-
"description": "format 只认 coda-agent、coda-agent-match、duration、coda-repo、coda-directory、coda-model-provider、coda-model-url",
|
|
24
|
-
"enum": ["coda-agent", "coda-agent-match", "duration", "coda-repo", "coda-directory", "coda-model-provider", "coda-model-url"]
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
"required": ["type"],
|
|
28
|
-
"allOf": [
|
|
29
|
-
{
|
|
30
|
-
"if": {"properties": {"format": {"const": "coda-agent"}}, "required": ["format"]},
|
|
31
|
-
"then": {"description": "coda-agent 是对象", "properties": {"type": {"const": "object"}}}
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"if": {
|
|
35
|
-
"properties": {"format": {"enum": ["duration", "coda-repo", "coda-directory", "coda-model-provider", "coda-model-url"]}},
|
|
36
|
-
"required": ["format"]
|
|
37
|
-
},
|
|
38
|
-
"then": {"description": "duration、coda-repo、coda-directory、coda-model-provider、coda-model-url 是文本", "properties": {"type": {"const": "string"}}}
|
|
39
|
-
},
|
|
40
|
-
{"if": {"required": ["enum"]}, "then": {"description": "enum 只用于文本与数字", "properties": {"type": {"enum": ["string", "integer", "number"]}}}},
|
|
41
|
-
{"if": {"required": ["enumItemLabels"]}, "then": {"description": "enumItemLabels 跟着 enum 写", "required": ["enum"]}},
|
|
42
|
-
{
|
|
43
|
-
"if": {"anyOf": [{"required": ["modelKey"]}, {"required": ["modelApi"]}]},
|
|
44
|
-
"then": {
|
|
45
|
-
"description": "modelKey 与 modelApi 只写在 coda-model-url 的地址上",
|
|
46
|
-
"properties": {"format": {"const": "coda-model-url"}},
|
|
47
|
-
"required": ["format"]
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
]
|
|
51
|
-
},
|
|
52
|
-
"secret": {"description": "writeOnly 是开或关", "type": "boolean"},
|
|
53
|
-
"modelKey": {
|
|
54
|
-
"description": "modelKey 是同组的一个密文的名字",
|
|
55
|
-
"type": "string",
|
|
56
|
-
"x-ref": {"pointer": "2", "match": {"properties": {"writeOnly": {"const": true}}, "required": ["writeOnly"]}}
|
|
57
|
-
},
|
|
58
|
-
"modelApi": {
|
|
59
|
-
"description": "modelApi 是同组的一个文本(不是密文)的名字",
|
|
60
|
-
"type": "string",
|
|
61
|
-
"x-ref": {"pointer": "2", "match": {"properties": {"type": {"const": "string"}, "writeOnly": {"const": false}}, "required": ["type"]}}
|
|
62
|
-
},
|
|
63
|
-
"setting": {
|
|
64
|
-
"description": "插件的一项设置",
|
|
65
|
-
"$ref": "#/$defs/base",
|
|
66
|
-
"properties": {
|
|
67
|
-
"writeOnly": {"$ref": "#/$defs/secret"},
|
|
68
|
-
"modelKey": {"$ref": "#/$defs/modelKey"},
|
|
69
|
-
"modelApi": {"$ref": "#/$defs/modelApi"},
|
|
70
|
-
"items": true,
|
|
71
|
-
"uniqueItems": {"description": "uniqueItems 只能是 true(每项至多一次)", "const": true},
|
|
72
|
-
"additionalProperties": true,
|
|
73
|
-
"propertyNames": true
|
|
74
|
-
},
|
|
75
|
-
"unevaluatedProperties": false,
|
|
76
|
-
"allOf": [
|
|
77
|
-
{
|
|
78
|
-
"if": {"properties": {"writeOnly": {"const": true}}, "required": ["writeOnly"]},
|
|
79
|
-
"then": {
|
|
80
|
-
"description": "密文设置(writeOnly)只能是没有 format、enum 与默认值的文本",
|
|
81
|
-
"properties": {"type": {"const": "string"}},
|
|
82
|
-
"not": {"anyOf": [{"required": ["format"]}, {"required": ["enum"]}, {"required": ["default"]}]}
|
|
83
|
-
}
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"if": {"properties": {"type": {"const": "array"}}, "required": ["type"]},
|
|
87
|
-
"then": {"$ref": "#/$defs/array"},
|
|
88
|
-
"else": {
|
|
89
|
-
"description": "只有多选、多个模型服务与一列行(type: array)才写 items 与 uniqueItems",
|
|
90
|
-
"not": {"anyOf": [{"required": ["items"]}, {"required": ["uniqueItems"]}]}
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
{
|
|
94
|
-
"if": {
|
|
95
|
-
"properties": {"type": {"const": "object"}},
|
|
96
|
-
"required": ["type"],
|
|
97
|
-
"not": {"properties": {"format": {"const": "coda-agent"}}, "required": ["format"]}
|
|
98
|
-
},
|
|
99
|
-
"then": {
|
|
100
|
-
"description": "表格写 additionalProperties(每一项是什么);propertyNames 只能是 { format: coda-agent-match }",
|
|
101
|
-
"required": ["additionalProperties"],
|
|
102
|
-
"properties": {
|
|
103
|
-
"additionalProperties": {"$ref": "#/$defs/entry"},
|
|
104
|
-
"propertyNames": {
|
|
105
|
-
"description": "propertyNames 只支持 format: coda-agent-match",
|
|
106
|
-
"type": "object",
|
|
107
|
-
"properties": {"format": {"const": "coda-agent-match"}},
|
|
108
|
-
"required": ["format"],
|
|
109
|
-
"additionalProperties": false
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
]
|
|
115
|
-
},
|
|
116
|
-
"array": {
|
|
117
|
-
"description": "多选、多个模型服务与一列行写 items,不写 format、minimum 与 maximum",
|
|
118
|
-
"required": ["items"],
|
|
119
|
-
"not": {"anyOf": [{"required": ["format"]}, {"required": ["minimum"]}, {"required": ["maximum"]}]},
|
|
120
|
-
"if": {"properties": {"items": {"properties": {"format": {"const": "coda-model-provider"}}, "required": ["format"]}}},
|
|
121
|
-
"then": {"properties": {"items": {"$ref": "#/$defs/modelProviders"}}},
|
|
122
|
-
"else": {
|
|
123
|
-
"if": {"properties": {"items": {"properties": {"type": {"const": "object"}}, "required": ["type"]}}},
|
|
124
|
-
"then": {"description": "一列行不写 uniqueItems", "not": {"required": ["uniqueItems"]}, "properties": {"items": {"$ref": "#/$defs/rows"}}},
|
|
125
|
-
"else": {"properties": {"items": {"$ref": "#/$defs/options"}}}
|
|
126
|
-
}
|
|
127
|
-
},
|
|
128
|
-
"modelProviders": {
|
|
129
|
-
"description": "多个模型服务写 items: { type: string, format: coda-model-provider, modelApis }",
|
|
130
|
-
"type": "object",
|
|
131
|
-
"properties": {
|
|
132
|
-
"type": {"const": "string"},
|
|
133
|
-
"format": {"const": "coda-model-provider"},
|
|
134
|
-
"modelApis": {
|
|
135
|
-
"description": "modelApis 是 1–10 个接口名,取 openai-completions、openai-responses、anthropic-messages",
|
|
136
|
-
"type": "array",
|
|
137
|
-
"minItems": 1,
|
|
138
|
-
"maxItems": 10,
|
|
139
|
-
"items": {"enum": ["openai-completions", "openai-responses", "anthropic-messages"]}
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
"required": ["type", "format"],
|
|
143
|
-
"additionalProperties": false
|
|
144
|
-
},
|
|
145
|
-
"rows": {
|
|
146
|
-
"description": "一列行写 items: { type: object, properties, required }",
|
|
147
|
-
"$ref": "#/$defs/entry",
|
|
148
|
-
"required": ["properties"],
|
|
149
|
-
"not": {"required": ["format"]},
|
|
150
|
-
"properties": {
|
|
151
|
-
"properties": {
|
|
152
|
-
"additionalProperties": {"description": "一列行的列不能是密文,要密文用表格", "not": {"properties": {"writeOnly": {"const": true}}, "required": ["writeOnly"]}}
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
"options": {
|
|
157
|
-
"description": "多选写 items: { anyOf: [{ const, title, description }] },1–50 项",
|
|
158
|
-
"type": "object",
|
|
159
|
-
"properties": {
|
|
160
|
-
"anyOf": {
|
|
161
|
-
"type": "array",
|
|
162
|
-
"minItems": 1,
|
|
163
|
-
"maxItems": 50,
|
|
164
|
-
"items": {
|
|
165
|
-
"description": "多选的一项是 { const, title, description }:const 只用字母、数字和「._-」,title 与 description 不超过 400 字",
|
|
166
|
-
"type": "object",
|
|
167
|
-
"properties": {
|
|
168
|
-
"const": {"type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$"},
|
|
169
|
-
"title": {"type": "string", "maxLength": 400},
|
|
170
|
-
"description": {"type": "string", "maxLength": 400}
|
|
171
|
-
},
|
|
172
|
-
"required": ["const"],
|
|
173
|
-
"additionalProperties": false
|
|
174
|
-
},
|
|
175
|
-
"x-unique-by": ["const"]
|
|
176
|
-
}
|
|
177
|
-
},
|
|
178
|
-
"required": ["anyOf"],
|
|
179
|
-
"additionalProperties": false
|
|
180
|
-
},
|
|
181
|
-
"entry": {
|
|
182
|
-
"description": "表格的一项:单个值、Agent 组合,或 properties 写明的 1–20 列",
|
|
183
|
-
"$ref": "#/$defs/base",
|
|
184
|
-
"properties": {"properties": true, "required": true},
|
|
185
|
-
"unevaluatedProperties": false,
|
|
186
|
-
"allOf": [
|
|
187
|
-
{"if": {"properties": {"type": {"const": "array"}}, "required": ["type"]}, "then": {"description": "多选与一列行只能是插件的一项设置,不能放进表格", "not": {}}},
|
|
188
|
-
{
|
|
189
|
-
"if": {"properties": {"type": {"const": "object"}}, "required": ["type"]},
|
|
190
|
-
"then": {
|
|
191
|
-
"description": "表格的每一项只能是单个值、Agent 组合,或 properties 写明的 1–20 列",
|
|
192
|
-
"anyOf": [{"properties": {"format": {"const": "coda-agent"}}, "required": ["format"]}, {"required": ["properties"]}]
|
|
193
|
-
}
|
|
194
|
-
},
|
|
195
|
-
{
|
|
196
|
-
"if": {"anyOf": [{"required": ["properties"]}, {"required": ["required"]}]},
|
|
197
|
-
"then": {"description": "只有一行几列时才写 properties 与 required", "properties": {"type": {"const": "object"}}, "not": {"required": ["format"]}}
|
|
198
|
-
},
|
|
199
|
-
{"if": {"required": ["properties"]}, "then": {"$ref": "#/$defs/row"}}
|
|
200
|
-
]
|
|
201
|
-
},
|
|
202
|
-
"row": {
|
|
203
|
-
"properties": {
|
|
204
|
-
"properties": {
|
|
205
|
-
"description": "一行写 1–20 列;一行是一组,至多一个模型地址(coda-model-url):检查可用模型按组找它",
|
|
206
|
-
"type": "object",
|
|
207
|
-
"minProperties": 1,
|
|
208
|
-
"maxProperties": 20,
|
|
209
|
-
"propertyNames": {"description": "列名只用字母和数字,以小写字母开头", "pattern": "^[a-z][A-Za-z0-9]{0,39}$"},
|
|
210
|
-
"additionalProperties": {"$ref": "#/$defs/column"},
|
|
211
|
-
"x-max-contains": {"match": {"properties": {"format": {"const": "coda-model-url"}}, "required": ["format"]}, "max": 1}
|
|
212
|
-
},
|
|
213
|
-
"required": {
|
|
214
|
-
"description": "required 是本行的列名,不重复",
|
|
215
|
-
"type": "array",
|
|
216
|
-
"uniqueItems": true,
|
|
217
|
-
"items": {"description": "required 是本行的列名,不重复", "type": "string", "x-ref": {"pointer": "2/properties"}}
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
"column": {
|
|
222
|
-
"description": "一列:单个值或 Agent 组合",
|
|
223
|
-
"$ref": "#/$defs/base",
|
|
224
|
-
"properties": {"writeOnly": {"$ref": "#/$defs/secret"}, "modelKey": {"$ref": "#/$defs/modelKey"}, "modelApi": {"$ref": "#/$defs/modelApi"}},
|
|
225
|
-
"unevaluatedProperties": false,
|
|
226
|
-
"allOf": [
|
|
227
|
-
{
|
|
228
|
-
"if": {"properties": {"writeOnly": {"const": true}}, "required": ["writeOnly"]},
|
|
229
|
-
"then": {
|
|
230
|
-
"description": "密文设置(writeOnly)只能是没有 format、enum 与默认值的文本",
|
|
231
|
-
"properties": {"type": {"const": "string"}},
|
|
232
|
-
"not": {"anyOf": [{"required": ["format"]}, {"required": ["enum"]}, {"required": ["default"]}]}
|
|
233
|
-
}
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"if": {"properties": {"type": {"enum": ["object", "array"]}}, "required": ["type"]},
|
|
237
|
-
"then": {"description": "一列只能是单个值或 Agent 组合", "properties": {"format": {"const": "coda-agent"}}, "required": ["format"]}
|
|
238
|
-
}
|
|
239
|
-
]
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/skills.json",
|
|
4
|
-
"title": "contributes.skills:插件带来的 Agent Skill",
|
|
5
|
-
"description": "插件目录里的目录,每个有自己的 SKILL.md;Agent 按目录名找到它,所以目录名不重复。",
|
|
6
|
-
"type": "array",
|
|
7
|
-
"maxItems": 100,
|
|
8
|
-
"items": {
|
|
9
|
-
"description": "插件目录里的相对路径,目录名只用字母、数字、「.」「_」「-」,里面有 SKILL.md",
|
|
10
|
-
"type": "string",
|
|
11
|
-
"pattern": "^(?!/)(?!(.*/)?\\.\\.(/|$))(?!\\.?/*$)(.*/)?[A-Za-z0-9][A-Za-z0-9._-]{0,63}/*$",
|
|
12
|
-
"x-file": {"type": "directory", "contains": "SKILL.md"}
|
|
13
|
-
},
|
|
14
|
-
"x-unique-by": [{"part": "([^/]+)/*$"}]
|
|
15
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://coda.pub/schemas/plugin/v1/views.json",
|
|
4
|
-
"title": "contributes.views:客户端为插件打开的页面",
|
|
5
|
-
"description": "插件目录里的 HTML,客户端在沙箱里开:在哪常驻(side 会话旁、page 一页),图标,接管打开的引用种类(handles,像 VS Code 的自定义编辑器),读数(readout)与只给哪种工作位置的会话(checkout)。",
|
|
6
|
-
"type": "array",
|
|
7
|
-
"maxItems": 10,
|
|
8
|
-
"items": {
|
|
9
|
-
"type": "object",
|
|
10
|
-
"properties": {
|
|
11
|
-
"id": {"$ref": "common.json#/$defs/id"},
|
|
12
|
-
"title": {"$ref": "common.json#/$defs/line40"},
|
|
13
|
-
"entry": {"description": "插件目录里的 .html 文件", "type": "string", "pattern": "^(?!/)(?!(.*/)?\\.\\.(/|$)).*\\.html$", "x-file": {"type": "file"}},
|
|
14
|
-
"in": {"description": "它常驻的位置:side、page,不重复", "type": "array", "uniqueItems": true, "items": {"enum": ["side", "page"]}},
|
|
15
|
-
"icon": {"$ref": "common.json#/$defs/symbol"},
|
|
16
|
-
"handles": {
|
|
17
|
-
"description": "它接管打开的引用种类(如 workflow-runs),至多 8 个,不重复",
|
|
18
|
-
"type": "array",
|
|
19
|
-
"maxItems": 8,
|
|
20
|
-
"uniqueItems": true,
|
|
21
|
-
"items": {"$ref": "common.json#/$defs/id"}
|
|
22
|
-
},
|
|
23
|
-
"readout": {"description": "读数:workflow-runs、machines、changes", "enum": ["workflow-runs", "machines", "changes"]},
|
|
24
|
-
"checkout": {"description": "只给哪种工作位置的会话:worktree", "enum": ["worktree"]}
|
|
25
|
-
},
|
|
26
|
-
"required": ["id", "title", "entry"],
|
|
27
|
-
"additionalProperties": false
|
|
28
|
-
},
|
|
29
|
-
"x-unique-by": ["id"]
|
|
30
|
-
}
|