@dcrays/dcgchat-test 0.5.4 → 0.5.5
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/index.js +95 -95
- package/openclaw.plugin.json +25 -0
- package/package.json +3 -3
- package/schemas/gateway-cron-finished.payload.json +39 -39
package/openclaw.plugin.json
CHANGED
|
@@ -4,6 +4,31 @@
|
|
|
4
4
|
"dcgchat-test"
|
|
5
5
|
],
|
|
6
6
|
"description": "Gateway `event=cron` + `action=finished` 时:优先在 payload 中按 schemas/gateway-cron-finished.payload.json 提供 `attachments`;若缺省,插件在工作区规则下从 summary 回退提取路径并经 sendMedia 发送。",
|
|
7
|
+
"hooks": {
|
|
8
|
+
"allowConversationAccess": true
|
|
9
|
+
},
|
|
10
|
+
"channelConfigs": {
|
|
11
|
+
"dcgchat-test": {
|
|
12
|
+
"type": "object",
|
|
13
|
+
"additionalProperties": false,
|
|
14
|
+
"properties": {
|
|
15
|
+
"allowedPaths": {
|
|
16
|
+
"type": "array",
|
|
17
|
+
"items": {
|
|
18
|
+
"type": "string"
|
|
19
|
+
},
|
|
20
|
+
"description": "允许发送文件的额外路径列表"
|
|
21
|
+
},
|
|
22
|
+
"allowedAttachmentExtensions": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"items": {
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
"description": "额外允许的附件后缀,如 [\".go\", \".rs\"]"
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
7
32
|
"configSchema": {
|
|
8
33
|
"type": "object",
|
|
9
34
|
"additionalProperties": false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcrays/dcgchat-test",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenClaw channel plugin for 书灵墨宝 (WebSocket)",
|
|
6
6
|
"main": "index.js",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"npmSpec": "@dcrays/dcgchat-test",
|
|
42
42
|
"localPath": "extensions/dcgchat-test",
|
|
43
43
|
"defaultChoice": "npm",
|
|
44
|
-
"minHostVersion": ">=2026.4.
|
|
44
|
+
"minHostVersion": ">=2026.4.15"
|
|
45
45
|
},
|
|
46
46
|
"compat": {
|
|
47
|
-
"pluginApi": ">=2026.4.
|
|
47
|
+
"pluginApi": ">=2026.4.15"
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://dcgchat.local/schemas/gateway-cron-finished.payload.json",
|
|
4
|
-
"title": "Gateway WS event: cron finished (dcgchat contract)",
|
|
5
|
-
"description": "网关下行 `event: \"cron\"` 且 `payload.action === \"finished\"` 时,书灵通道插件读取的约定字段。`attachments` 为首选:须为 Gateway 进程可读的绝对路径,经通道 sendMedia 发送。若宿主未提供 `attachments`,插件会回退为仅在工作区/挂载规则下从 `summary` 提取路径(与 dcgchat_message 一致),直至宿主实现本字段。",
|
|
6
|
-
"type": "object",
|
|
7
|
-
"properties": {
|
|
8
|
-
"jobId": { "type": "string" },
|
|
9
|
-
"action": { "const": "finished" },
|
|
10
|
-
"status": { "type": "string" },
|
|
11
|
-
"summary": { "type": "string" },
|
|
12
|
-
"delivered": { "type": "boolean" },
|
|
13
|
-
"deliveryStatus": { "type": "string" },
|
|
14
|
-
"sessionId": { "type": "string" },
|
|
15
|
-
"sessionKey": { "type": "string" },
|
|
16
|
-
"attachments": {
|
|
17
|
-
"type": "array",
|
|
18
|
-
"description": "本轮定时任务产出的本地文件路径,按顺序经通道发送为附件",
|
|
19
|
-
"items": {
|
|
20
|
-
"oneOf": [
|
|
21
|
-
{
|
|
22
|
-
"type": "string",
|
|
23
|
-
"minLength": 1,
|
|
24
|
-
"description": "绝对路径"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"type": "object",
|
|
28
|
-
"additionalProperties": false,
|
|
29
|
-
"properties": {
|
|
30
|
-
"path": { "type": "string", "minLength": 1 },
|
|
31
|
-
"file": { "type": "string", "minLength": 1 }
|
|
32
|
-
},
|
|
33
|
-
"description": "对象形式:优先读取 `path`,否则 `file`"
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://dcgchat.local/schemas/gateway-cron-finished.payload.json",
|
|
4
|
+
"title": "Gateway WS event: cron finished (dcgchat contract)",
|
|
5
|
+
"description": "网关下行 `event: \"cron\"` 且 `payload.action === \"finished\"` 时,书灵通道插件读取的约定字段。`attachments` 为首选:须为 Gateway 进程可读的绝对路径,经通道 sendMedia 发送。若宿主未提供 `attachments`,插件会回退为仅在工作区/挂载规则下从 `summary` 提取路径(与 dcgchat_message 一致),直至宿主实现本字段。",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"jobId": { "type": "string" },
|
|
9
|
+
"action": { "const": "finished" },
|
|
10
|
+
"status": { "type": "string" },
|
|
11
|
+
"summary": { "type": "string" },
|
|
12
|
+
"delivered": { "type": "boolean" },
|
|
13
|
+
"deliveryStatus": { "type": "string" },
|
|
14
|
+
"sessionId": { "type": "string" },
|
|
15
|
+
"sessionKey": { "type": "string" },
|
|
16
|
+
"attachments": {
|
|
17
|
+
"type": "array",
|
|
18
|
+
"description": "本轮定时任务产出的本地文件路径,按顺序经通道发送为附件",
|
|
19
|
+
"items": {
|
|
20
|
+
"oneOf": [
|
|
21
|
+
{
|
|
22
|
+
"type": "string",
|
|
23
|
+
"minLength": 1,
|
|
24
|
+
"description": "绝对路径"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "object",
|
|
28
|
+
"additionalProperties": false,
|
|
29
|
+
"properties": {
|
|
30
|
+
"path": { "type": "string", "minLength": 1 },
|
|
31
|
+
"file": { "type": "string", "minLength": 1 }
|
|
32
|
+
},
|
|
33
|
+
"description": "对象形式:优先读取 `path`,否则 `file`"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|