Skip to content

Commit 6deda7e

Browse files
author
largezhou
committed
适配openclaw2026.3.22以上版本
1 parent 16c0fcb commit 6deda7e

10 files changed

Lines changed: 621 additions & 1461 deletions

File tree

index.ts

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,14 @@
1-
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
2-
import { emptyPluginConfigSchema } from "openclaw/plugin-sdk";
1+
import { defineChannelPluginEntry } from "openclaw/plugin-sdk/core";
32
import { dingtalkPlugin } from "./src/channel.js";
43
import { setDingTalkRuntime } from "./src/runtime.js";
5-
import { PLUGIN_ID } from "./src/constants.js";
64

7-
const plugin: {
8-
id: string;
9-
name: string;
10-
description: string;
11-
configSchema: ReturnType<typeof emptyPluginConfigSchema>;
12-
register: (api: OpenClawPluginApi) => void;
13-
} = {
14-
id: PLUGIN_ID,
5+
export { dingtalkPlugin } from "./src/channel.js";
6+
export { setDingTalkRuntime } from "./src/runtime.js";
7+
8+
export default defineChannelPluginEntry({
9+
id: "ddingtalk",
1510
name: "DingTalk",
1611
description: "DingTalk (钉钉) enterprise robot channel plugin",
17-
configSchema: emptyPluginConfigSchema(),
18-
register(api: OpenClawPluginApi) {
19-
setDingTalkRuntime(api.runtime);
20-
api.registerChannel({ plugin: dingtalkPlugin });
21-
},
22-
};
23-
24-
export default plugin;
12+
plugin: dingtalkPlugin,
13+
setRuntime: setDingTalkRuntime,
14+
});

package.json

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@largezhou/ddingtalk",
3-
"version": "1.4.3",
3+
"version": "2.0.0",
44
"description": "OpenClaw DingTalk (钉钉) channel plugin",
55
"main": "index.ts",
66
"type": "module",
@@ -30,18 +30,16 @@
3030
"license": "MIT",
3131
"dependencies": {
3232
"dingtalk-stream": "^2.1.4",
33-
"zod": "^4.0.0"
33+
"zod": "^4.0.0",
34+
"openclaw": ">=2026.3.22"
3435
},
3536
"devDependencies": {
36-
"@types/node": "^20.10.0",
37+
"@types/node": "^22.0.0",
3738
"dotenv": "^17.3.1",
38-
"openclaw": "<=2026.3.13",
3939
"tsx": "^4.6.0",
4040
"typescript": "^5.3.0"
4141
},
42-
"peerDependencies": {
43-
"openclaw": "<=2026.3.13"
44-
},
42+
"peerDependencies": {},
4543
"openclaw": {
4644
"extensions": [
4745
"./index.ts"

0 commit comments

Comments
 (0)