@coda-console/plugin-check 0.5.7 → 0.5.8
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
CHANGED
|
@@ -11,6 +11,7 @@ plugins/codex/ Codex:入口在同一进程里运行锁定版本的 c
|
|
|
11
11
|
plugins/claude/ Claude SDK:基于 Claude Agent SDK 的 ACP 入口(npm 依赖),面板「Claude」
|
|
12
12
|
plugins/kimi/ Kimi Code:在运行机的 kimi acp 与 Coda 之间转发,面板「Kimi」
|
|
13
13
|
plugins/grok/ Grok:转发运行机上 Grok CLI 的 ACP,并适配审批模式,面板「Grok」
|
|
14
|
+
plugins/grok-bot/ Grok Bot:把 xAI 云端 Bot 接成长期会话,Webhook 消息、定时巡检与用户审批;依赖 Coda 远端 Agent 入口
|
|
14
15
|
plugins/opencode/ OpenCode:在运行机的 opencode acp 与 Coda 之间转发,送入会话指令与所选模型服务,模型按来源分组
|
|
15
16
|
plugins/codex-accounts/ Codex 多账号:管理登录、自动续期与账号选择,接管 Codex 额度面板
|
|
16
17
|
plugins/cursor/ Cursor:在运行机的 cursor-agent acp 与 Coda 之间转发,送入会话指令
|
|
@@ -19,6 +20,7 @@ plugins/magpie/ Magpie:把本机的 Magpie 网关作为模型服务
|
|
|
19
20
|
plugins/network-log/ 网络记录:只记录不拦截,每秒读连接表记下建连卡住的连接(进程、对端、网卡、mihomo 有没有收到),每分钟分段探测常用服务
|
|
20
21
|
plugins/review/ PR 生命流程:会话开的 PR 先跑项目的检查、再交叉评审,你批准后合并、部署与发布;也是写 PR 流程的样例
|
|
21
22
|
plugins/testbed/ 测试机:长插在 Mac 上的 iPhone、iPad 只经 use-testbed 使用,排到后装 App、交给会话操作、用完切黑屏;依赖宿主资源
|
|
23
|
+
plugins/ultra/ Ultra:输入框的 Ultra 模式,主 Agent 主动把能并行的活按名单派给子会话,汇总后验证;名单与模板在模式参数和设置里
|
|
22
24
|
templates/agent/ 最小的 Agent 插件:手写 ACP 的回声 Agent,演示会话指令、插话、Agent 活动与自主轮次
|
|
23
25
|
templates/panel/ 最小的面板插件:一张卡片、一条进度条、一个按钮
|
|
24
26
|
bin/、check/ 契约检查(仓库根的 package.json 就是它,@coda-console/plugin-check);check/coda/ 是 Coda 同步来的规则副本,不要手改
|
package/check/coda/builtin.json
CHANGED
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"id": "composer",
|
|
130
130
|
"displayName": "输入框模式",
|
|
131
131
|
"description": "输入框的三种模式:交接到新会话、新建子会话,以及打 ! 执行命令。停用后输入框里没有这几种模式。",
|
|
132
|
-
"version": "1.
|
|
132
|
+
"version": "1.1.0",
|
|
133
133
|
"category": "工作流程",
|
|
134
134
|
"source": {
|
|
135
135
|
"kind": "builtin"
|
|
@@ -154,7 +154,10 @@
|
|
|
154
154
|
"hint": "新会话承接这里的上下文,共享当前工作目录及其中的文件;这个会话保留,仍可继续使用。",
|
|
155
155
|
"placeholder": "接下来要完成什么?",
|
|
156
156
|
"sendLabel": "交接",
|
|
157
|
-
"agent": "own"
|
|
157
|
+
"agent": "own",
|
|
158
|
+
"in": [
|
|
159
|
+
"session"
|
|
160
|
+
]
|
|
158
161
|
},
|
|
159
162
|
{
|
|
160
163
|
"id": "subagent",
|
|
@@ -164,6 +167,9 @@
|
|
|
164
167
|
"placeholder": "描述交给子会话的任务…",
|
|
165
168
|
"sendLabel": "启动子会话",
|
|
166
169
|
"agent": "own",
|
|
170
|
+
"in": [
|
|
171
|
+
"session"
|
|
172
|
+
],
|
|
167
173
|
"parameters": {
|
|
168
174
|
"properties": {
|
|
169
175
|
"replyTo": {
|
|
@@ -217,7 +223,11 @@
|
|
|
217
223
|
"placeholder": "输入要执行的命令…",
|
|
218
224
|
"sendLabel": "执行",
|
|
219
225
|
"agent": "off",
|
|
220
|
-
"trigger": "!"
|
|
226
|
+
"trigger": "!",
|
|
227
|
+
"in": [
|
|
228
|
+
"session",
|
|
229
|
+
"new"
|
|
230
|
+
]
|
|
221
231
|
}
|
|
222
232
|
],
|
|
223
233
|
"agents": [],
|
|
@@ -225,6 +235,45 @@
|
|
|
225
235
|
"extensionPoints": {},
|
|
226
236
|
"extensions": []
|
|
227
237
|
},
|
|
238
|
+
{
|
|
239
|
+
"id": "diagnostics",
|
|
240
|
+
"displayName": "机器诊断",
|
|
241
|
+
"description": "给巡检会话提供只读工具,查看空间各台机器的健康状态、网络诊断与客户端性能。需要时安装,再按目录启用或用 Tag 限定。",
|
|
242
|
+
"version": "1.0.0",
|
|
243
|
+
"category": "机器与资源",
|
|
244
|
+
"source": {
|
|
245
|
+
"kind": "builtin"
|
|
246
|
+
},
|
|
247
|
+
"dir": "src/resources/plugins/diagnostics",
|
|
248
|
+
"title": "机器诊断",
|
|
249
|
+
"properties": {},
|
|
250
|
+
"workflows": [],
|
|
251
|
+
"capabilities": [],
|
|
252
|
+
"services": [],
|
|
253
|
+
"groups": [],
|
|
254
|
+
"commands": [],
|
|
255
|
+
"gitCredentials": [],
|
|
256
|
+
"endpoints": [],
|
|
257
|
+
"views": [],
|
|
258
|
+
"agents": [],
|
|
259
|
+
"dependencies": [
|
|
260
|
+
"space"
|
|
261
|
+
],
|
|
262
|
+
"extensionPoints": {},
|
|
263
|
+
"extensions": [],
|
|
264
|
+
"mcpServers": [
|
|
265
|
+
{
|
|
266
|
+
"name": "diagnostics",
|
|
267
|
+
"command": "${CODA_NODE}",
|
|
268
|
+
"args": [
|
|
269
|
+
"${CODA_PLUGIN_PATH}/mcp.mjs",
|
|
270
|
+
"--state",
|
|
271
|
+
"${CODA_PLUGIN_STATE}"
|
|
272
|
+
],
|
|
273
|
+
"env": []
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
},
|
|
228
277
|
{
|
|
229
278
|
"id": "github",
|
|
230
279
|
"displayName": "GitHub",
|
|
@@ -205,8 +205,16 @@ function modelFields(fields, where) {
|
|
|
205
205
|
// what sending does, its placeholder and send button —, whom what is sent is for (`agent`: the session's agent, `own` one
|
|
206
206
|
// chosen for it, which a new session runs, `off` none shown), and its parameters, written as settings are. One entered by a
|
|
207
207
|
// character typed first (`trigger`, as `!`) is the text's: it has no parameters, and what is sent in it is the session's.
|
|
208
|
+
// Which composers offer it (`in`) is its own to say: a session's (`session`), and the one of a session not started yet
|
|
209
|
+
// (`new`, the new task's), where what is sent starts that session in it; one whose messages a new session takes is sent
|
|
210
|
+
// from a session, so only a session's.
|
|
208
211
|
export const MODE_AGENTS = ['session', 'own', 'off'];
|
|
209
|
-
|
|
212
|
+
// What a plugin tells a session's agent at once (docs/session-contracts.md「顺带告诉」): a text, at most this long.
|
|
213
|
+
const TELL_LIMIT = 4000;
|
|
214
|
+
export const checkTold = text => check(typeof text === 'string' && text.trim() && text.length <= TELL_LIMIT && !text.includes('\0'), 'invalid_input',
|
|
215
|
+
`要告诉的话须为不超过 ${TELL_LIMIT} 字的文字`);
|
|
216
|
+
export const MODE_PLACES = ['session', 'new'];
|
|
217
|
+
const MODE_KEYS = ['id', 'title', 'icon', 'hint', 'placeholder', 'sendLabel', 'agent', 'trigger', 'in', 'parameters'];
|
|
210
218
|
const oneLine = (text, most) => typeof text === 'string' && !!text.trim() && [...text].length <= most && !/[\0\r\n]/.test(text);
|
|
211
219
|
function composerModeDeclarations(value) {
|
|
212
220
|
const modes = value ?? [];
|
|
@@ -225,8 +233,12 @@ function composerModeDeclarations(value) {
|
|
|
225
233
|
check(m.trigger === undefined || (typeof m.trigger === 'string' && /^[!#$%&*+:;=?^|~]$/.test(m.trigger)), 'invalid_plugin',
|
|
226
234
|
`${where}.trigger 是一个标点:!#$%&*+:;=?^|~ 之一`);
|
|
227
235
|
check(m.trigger === undefined || (m.parameters === undefined && m.agent !== 'own'), 'invalid_plugin', `${where}:打字进入的模式(trigger)没有参数,也不另选 Agent`);
|
|
236
|
+
check(m.in === undefined || (Array.isArray(m.in) && m.in.length && m.in.every(place => MODE_PLACES.includes(place)) && new Set(m.in).size === m.in.length),
|
|
237
|
+
'invalid_plugin', `${where}.in 是它出现的输入框,取 ${MODE_PLACES.join('、')},不重复`);
|
|
238
|
+
check(m.agent !== 'own' || !m.in?.includes('new'), 'invalid_plugin', `${where}:开新会话的模式(agent: own)要从会话里发出,不能在 new 里`);
|
|
228
239
|
return { id: m.id, title: m.title.trim(), icon: m.icon, ...(m.hint ? { hint: m.hint.trim() } : {}), ...(m.placeholder ? { placeholder: m.placeholder.trim() } : {}),
|
|
229
240
|
...(m.sendLabel ? { sendLabel: m.sendLabel.trim() } : {}), agent: m.agent ?? 'session', ...(m.trigger ? { trigger: m.trigger } : {}),
|
|
241
|
+
in: m.in ? MODE_PLACES.filter(place => m.in.includes(place)) : ['session'],
|
|
230
242
|
// As read, which the clients show; as written (JSON Schema), which its hooks are given (components/composer-modes).
|
|
231
243
|
...(m.parameters !== undefined ? { parameters: modeParameters(m.parameters, `${where}.parameters`), schema: structuredClone(m.parameters) } : {}) };
|
|
232
244
|
});
|
package/check/coda/contract.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
2
|
+
"commit": "04fd85113f83823020febc7ffc647f10d15a2ddc",
|
|
3
3
|
"packages": {
|
|
4
4
|
"@0dep/piso": "5.2.0",
|
|
5
5
|
"@agentclientprotocol/sdk": "1.4.0",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"check/coda/components/plugins/agent-plugins.mjs": "23016dd0f7350a10f71565a2c44e2c1179299a93e8c859529071099f2ce862d1",
|
|
10
10
|
"check/coda/components/plugins/model-protocols.mjs": "762244c01266cf61384377bdfbb84bef5ab157b1783f9254ddc1ae3d576a73c5",
|
|
11
11
|
"check/coda/components/plugins/plugin-extensions.mjs": "e527800a109ec9849975357f841b0c05ecfa50c9d9c34e26d828aef3cb7d3cb3",
|
|
12
|
-
"check/coda/components/plugins/plugin-rules.mjs": "
|
|
12
|
+
"check/coda/components/plugins/plugin-rules.mjs": "8cd1058fc96365f7f35451a4a75bd1c6434e0e036bb4b18f7c7fc37709e66c3e",
|
|
13
13
|
"check/coda/components/plugins/plugin-source-rules.mjs": "e03606bf3056061ee3a78494d34dae9dfbe35d6fb2f139880fab5891663cbedc",
|
|
14
14
|
"check/coda/components/plugins/skill-document.mjs": "c5b5e815c42cd836572f7b60e22a46af6ac607fd9df0170fa36f955825636ce6",
|
|
15
15
|
"check/coda/components/prompt-recovery/prompt-recovery.mjs": "f43f21d24c19a58113d3304f9248225b12080ab00ed15eab74bf7b94642732de",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"check/coda/resources/plugins/resources/panels/panels.mjs": "aee040febb37fd6eebaf1a1da5b3299d2b6a9dfc982e649d9a628291af298179",
|
|
25
25
|
"check/coda/resources/plugins/resources/panels/rules.mjs": "c024c5ede7c1516877128aa6d6796fbe5fd0e14642741b0745481bb1c5ca41d3",
|
|
26
26
|
"check/coda/resources/plugins/resources/panels/sign-in.mjs": "1271a24e33b1b882a1fb9bee03b8e240db8b9bee1b5208f0e1c84499cfb1be7e",
|
|
27
|
-
"check/coda/builtin.json": "
|
|
27
|
+
"check/coda/builtin.json": "add6de7df1f74456223275750a76919c983fd3eba2f4c0750077f7b998d9d3fc",
|
|
28
28
|
"docs/agent-protocol.md": "2a40fac029e93bc512d0405105c9d74fa3e5a59e92788b6951dba182775875c1"
|
|
29
29
|
}
|
|
30
30
|
}
|