@hanjianchun/turms 0.1.0
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 +175 -0
- package/dist/channel-plugin.js +16454 -0
- package/dist/channel-plugin.js.map +7 -0
- package/dist/index.js +16629 -0
- package/dist/index.js.map +7 -0
- package/dist/openclaw.plugin.json +130 -0
- package/dist/package.json +65 -0
- package/dist/runtime.js +14 -0
- package/dist/runtime.js.map +7 -0
- package/openclaw.plugin.json +130 -0
- package/package.json +65 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "turms",
|
|
3
|
+
"channels": ["turms"],
|
|
4
|
+
"configSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"properties": {}
|
|
8
|
+
},
|
|
9
|
+
"channelConfigs": {
|
|
10
|
+
"turms": {
|
|
11
|
+
"label": "Turms IM",
|
|
12
|
+
"description": "Turms 即时通讯通道,支持私聊和群聊",
|
|
13
|
+
"schema": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"properties": {
|
|
17
|
+
"name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Optional display name for this Turms channel."
|
|
20
|
+
},
|
|
21
|
+
"enabled": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"default": true,
|
|
24
|
+
"description": "Enable or disable this Turms channel."
|
|
25
|
+
},
|
|
26
|
+
"host": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"default": "enn-turms-gateway-ws.fat.ennew.com",
|
|
29
|
+
"description": "Turms Gateway WebSocket host address (WSS)."
|
|
30
|
+
},
|
|
31
|
+
"userId": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"description": "Turms user ID for authentication."
|
|
34
|
+
},
|
|
35
|
+
"password": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Turms user password for authentication."
|
|
38
|
+
},
|
|
39
|
+
"deviceType": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"default": 1,
|
|
42
|
+
"description": "Device type: 1=Android, 2=iOS, 3=PC, 4=Web."
|
|
43
|
+
},
|
|
44
|
+
"connectTimeout": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"default": 30000,
|
|
47
|
+
"description": "Connection timeout in milliseconds."
|
|
48
|
+
},
|
|
49
|
+
"requestTimeout": {
|
|
50
|
+
"type": "integer",
|
|
51
|
+
"default": 60000,
|
|
52
|
+
"description": "Request timeout in milliseconds."
|
|
53
|
+
},
|
|
54
|
+
"heartbeatInterval": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"default": 30000,
|
|
57
|
+
"description": "Heartbeat interval in milliseconds."
|
|
58
|
+
},
|
|
59
|
+
"autoReconnect": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"default": true,
|
|
62
|
+
"description": "Enable automatic reconnection."
|
|
63
|
+
},
|
|
64
|
+
"maxReconnectAttempts": {
|
|
65
|
+
"type": "integer",
|
|
66
|
+
"default": 10,
|
|
67
|
+
"description": "Maximum reconnection attempts."
|
|
68
|
+
},
|
|
69
|
+
"reconnectDelay": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"default": 5000,
|
|
72
|
+
"description": "Reconnection delay in milliseconds."
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": ["userId", "password"]
|
|
76
|
+
},
|
|
77
|
+
"uiHints": {
|
|
78
|
+
"name": {
|
|
79
|
+
"label": "Display Name",
|
|
80
|
+
"help": "Optional display name for this Turms channel."
|
|
81
|
+
},
|
|
82
|
+
"enabled": {
|
|
83
|
+
"label": "Enabled",
|
|
84
|
+
"help": "Turn the Turms channel on or off."
|
|
85
|
+
},
|
|
86
|
+
"host": {
|
|
87
|
+
"label": "Gateway Host",
|
|
88
|
+
"help": "Turms Gateway WebSocket host address (WSS). Use -ws domain, not -im (e.g., enn-turms-gateway-ws.fat.ennew.com)."
|
|
89
|
+
},
|
|
90
|
+
"userId": {
|
|
91
|
+
"label": "User ID",
|
|
92
|
+
"help": "Turms user ID for authentication."
|
|
93
|
+
},
|
|
94
|
+
"password": {
|
|
95
|
+
"label": "Password",
|
|
96
|
+
"help": "Turms user password for authentication.",
|
|
97
|
+
"sensitive": true
|
|
98
|
+
},
|
|
99
|
+
"deviceType": {
|
|
100
|
+
"label": "Device Type",
|
|
101
|
+
"help": "Device type: 1=Android, 2=iOS, 3=PC, 4=Web."
|
|
102
|
+
},
|
|
103
|
+
"connectTimeout": {
|
|
104
|
+
"label": "Connect Timeout (ms)",
|
|
105
|
+
"help": "Connection timeout in milliseconds."
|
|
106
|
+
},
|
|
107
|
+
"requestTimeout": {
|
|
108
|
+
"label": "Request Timeout (ms)",
|
|
109
|
+
"help": "Request timeout in milliseconds."
|
|
110
|
+
},
|
|
111
|
+
"heartbeatInterval": {
|
|
112
|
+
"label": "Heartbeat Interval (ms)",
|
|
113
|
+
"help": "Heartbeat interval in milliseconds."
|
|
114
|
+
},
|
|
115
|
+
"autoReconnect": {
|
|
116
|
+
"label": "Auto Reconnect",
|
|
117
|
+
"help": "Enable automatic reconnection on disconnect."
|
|
118
|
+
},
|
|
119
|
+
"maxReconnectAttempts": {
|
|
120
|
+
"label": "Max Reconnect Attempts",
|
|
121
|
+
"help": "Maximum number of reconnection attempts."
|
|
122
|
+
},
|
|
123
|
+
"reconnectDelay": {
|
|
124
|
+
"label": "Reconnect Delay (ms)",
|
|
125
|
+
"help": "Delay between reconnection attempts in milliseconds."
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hanjianchun/turms",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Turms IM channel plugin for OpenClaw",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js",
|
|
10
|
+
"./channel-plugin": "./dist/channel-plugin.js",
|
|
11
|
+
"./runtime": "./dist/runtime.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md",
|
|
16
|
+
"openclaw.plugin.json"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "node build.js",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"esbuild": "^0.25.12"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"openclaw": ">=0.1.0"
|
|
27
|
+
},
|
|
28
|
+
"openclaw": {
|
|
29
|
+
"extensions": [
|
|
30
|
+
"./index.js"
|
|
31
|
+
],
|
|
32
|
+
"channel": {
|
|
33
|
+
"id": "turms",
|
|
34
|
+
"label": "Turms",
|
|
35
|
+
"selectionLabel": "Turms IM",
|
|
36
|
+
"docsPath": "https://github.com/turms-im/turms",
|
|
37
|
+
"blurb": "Turms 即时通讯通道,支持私聊和群聊消息",
|
|
38
|
+
"configuredState": {
|
|
39
|
+
"specifier": "./src/config",
|
|
40
|
+
"exportName": "isTurmsConfigured"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"openclaw",
|
|
46
|
+
"turms",
|
|
47
|
+
"im",
|
|
48
|
+
"chat",
|
|
49
|
+
"channel",
|
|
50
|
+
"plugin"
|
|
51
|
+
],
|
|
52
|
+
"author": "",
|
|
53
|
+
"license": "Apache-2.0",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "https://github.com/turms-im/turms.git",
|
|
57
|
+
"directory": "turms-openclaw-channel"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"long": "^5.3.2",
|
|
61
|
+
"protobufjs": "^8.3.0",
|
|
62
|
+
"ws": "^8.20.1",
|
|
63
|
+
"zod": "^4.4.3"
|
|
64
|
+
}
|
|
65
|
+
}
|
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// src/runtime.ts
|
|
2
|
+
import { createPluginRuntimeStore } from "openclaw/plugin-sdk/runtime-store";
|
|
3
|
+
var runtimeStore = createPluginRuntimeStore("Turms runtime not initialized");
|
|
4
|
+
function setTurmsRuntime(next) {
|
|
5
|
+
runtimeStore.setRuntime(next);
|
|
6
|
+
}
|
|
7
|
+
function getTurmsRuntime() {
|
|
8
|
+
return runtimeStore.getRuntime();
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
getTurmsRuntime,
|
|
12
|
+
setTurmsRuntime
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/runtime.ts"],
|
|
4
|
+
"sourcesContent": ["import type { PluginRuntime } from \"openclaw/plugin-sdk/core\";\nimport { createPluginRuntimeStore } from \"openclaw/plugin-sdk/runtime-store\";\n\nconst runtimeStore = createPluginRuntimeStore<PluginRuntime>(\"Turms runtime not initialized\");\n\nexport function setTurmsRuntime(next: PluginRuntime): void {\n runtimeStore.setRuntime(next);\n}\n\nexport function getTurmsRuntime(): PluginRuntime {\n return runtimeStore.getRuntime();\n}\n"],
|
|
5
|
+
"mappings": ";AACA,SAAS,gCAAgC;AAEzC,IAAM,eAAe,yBAAwC,+BAA+B;AAErF,SAAS,gBAAgB,MAA2B;AACzD,eAAa,WAAW,IAAI;AAC9B;AAEO,SAAS,kBAAiC;AAC/C,SAAO,aAAa,WAAW;AACjC;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "turms",
|
|
3
|
+
"channels": ["turms"],
|
|
4
|
+
"configSchema": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"properties": {}
|
|
8
|
+
},
|
|
9
|
+
"channelConfigs": {
|
|
10
|
+
"turms": {
|
|
11
|
+
"label": "Turms IM",
|
|
12
|
+
"description": "Turms 即时通讯通道,支持私聊和群聊",
|
|
13
|
+
"schema": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"additionalProperties": false,
|
|
16
|
+
"properties": {
|
|
17
|
+
"name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Optional display name for this Turms channel."
|
|
20
|
+
},
|
|
21
|
+
"enabled": {
|
|
22
|
+
"type": "boolean",
|
|
23
|
+
"default": true,
|
|
24
|
+
"description": "Enable or disable this Turms channel."
|
|
25
|
+
},
|
|
26
|
+
"host": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"default": "enn-turms-gateway-ws.fat.ennew.com",
|
|
29
|
+
"description": "Turms Gateway WebSocket host address (WSS)."
|
|
30
|
+
},
|
|
31
|
+
"userId": {
|
|
32
|
+
"type": "integer",
|
|
33
|
+
"description": "Turms user ID for authentication."
|
|
34
|
+
},
|
|
35
|
+
"password": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"description": "Turms user password for authentication."
|
|
38
|
+
},
|
|
39
|
+
"deviceType": {
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"default": 1,
|
|
42
|
+
"description": "Device type: 1=Android, 2=iOS, 3=PC, 4=Web."
|
|
43
|
+
},
|
|
44
|
+
"connectTimeout": {
|
|
45
|
+
"type": "integer",
|
|
46
|
+
"default": 30000,
|
|
47
|
+
"description": "Connection timeout in milliseconds."
|
|
48
|
+
},
|
|
49
|
+
"requestTimeout": {
|
|
50
|
+
"type": "integer",
|
|
51
|
+
"default": 60000,
|
|
52
|
+
"description": "Request timeout in milliseconds."
|
|
53
|
+
},
|
|
54
|
+
"heartbeatInterval": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"default": 30000,
|
|
57
|
+
"description": "Heartbeat interval in milliseconds."
|
|
58
|
+
},
|
|
59
|
+
"autoReconnect": {
|
|
60
|
+
"type": "boolean",
|
|
61
|
+
"default": true,
|
|
62
|
+
"description": "Enable automatic reconnection."
|
|
63
|
+
},
|
|
64
|
+
"maxReconnectAttempts": {
|
|
65
|
+
"type": "integer",
|
|
66
|
+
"default": 10,
|
|
67
|
+
"description": "Maximum reconnection attempts."
|
|
68
|
+
},
|
|
69
|
+
"reconnectDelay": {
|
|
70
|
+
"type": "integer",
|
|
71
|
+
"default": 5000,
|
|
72
|
+
"description": "Reconnection delay in milliseconds."
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"required": ["userId", "password"]
|
|
76
|
+
},
|
|
77
|
+
"uiHints": {
|
|
78
|
+
"name": {
|
|
79
|
+
"label": "Display Name",
|
|
80
|
+
"help": "Optional display name for this Turms channel."
|
|
81
|
+
},
|
|
82
|
+
"enabled": {
|
|
83
|
+
"label": "Enabled",
|
|
84
|
+
"help": "Turn the Turms channel on or off."
|
|
85
|
+
},
|
|
86
|
+
"host": {
|
|
87
|
+
"label": "Gateway Host",
|
|
88
|
+
"help": "Turms Gateway WebSocket host address (WSS). Use -ws domain, not -im (e.g., enn-turms-gateway-ws.fat.ennew.com)."
|
|
89
|
+
},
|
|
90
|
+
"userId": {
|
|
91
|
+
"label": "User ID",
|
|
92
|
+
"help": "Turms user ID for authentication."
|
|
93
|
+
},
|
|
94
|
+
"password": {
|
|
95
|
+
"label": "Password",
|
|
96
|
+
"help": "Turms user password for authentication.",
|
|
97
|
+
"sensitive": true
|
|
98
|
+
},
|
|
99
|
+
"deviceType": {
|
|
100
|
+
"label": "Device Type",
|
|
101
|
+
"help": "Device type: 1=Android, 2=iOS, 3=PC, 4=Web."
|
|
102
|
+
},
|
|
103
|
+
"connectTimeout": {
|
|
104
|
+
"label": "Connect Timeout (ms)",
|
|
105
|
+
"help": "Connection timeout in milliseconds."
|
|
106
|
+
},
|
|
107
|
+
"requestTimeout": {
|
|
108
|
+
"label": "Request Timeout (ms)",
|
|
109
|
+
"help": "Request timeout in milliseconds."
|
|
110
|
+
},
|
|
111
|
+
"heartbeatInterval": {
|
|
112
|
+
"label": "Heartbeat Interval (ms)",
|
|
113
|
+
"help": "Heartbeat interval in milliseconds."
|
|
114
|
+
},
|
|
115
|
+
"autoReconnect": {
|
|
116
|
+
"label": "Auto Reconnect",
|
|
117
|
+
"help": "Enable automatic reconnection on disconnect."
|
|
118
|
+
},
|
|
119
|
+
"maxReconnectAttempts": {
|
|
120
|
+
"label": "Max Reconnect Attempts",
|
|
121
|
+
"help": "Maximum number of reconnection attempts."
|
|
122
|
+
},
|
|
123
|
+
"reconnectDelay": {
|
|
124
|
+
"label": "Reconnect Delay (ms)",
|
|
125
|
+
"help": "Delay between reconnection attempts in milliseconds."
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hanjianchun/turms",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Turms IM channel plugin for OpenClaw",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": "./dist/index.js",
|
|
10
|
+
"./channel-plugin": "./dist/channel-plugin.js",
|
|
11
|
+
"./runtime": "./dist/runtime.js"
|
|
12
|
+
},
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md",
|
|
16
|
+
"openclaw.plugin.json"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "node build.js",
|
|
20
|
+
"prepublishOnly": "npm run build"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
"esbuild": "^0.25.12"
|
|
24
|
+
},
|
|
25
|
+
"peerDependencies": {
|
|
26
|
+
"openclaw": ">=0.1.0"
|
|
27
|
+
},
|
|
28
|
+
"openclaw": {
|
|
29
|
+
"extensions": [
|
|
30
|
+
"./index.js"
|
|
31
|
+
],
|
|
32
|
+
"channel": {
|
|
33
|
+
"id": "turms",
|
|
34
|
+
"label": "Turms",
|
|
35
|
+
"selectionLabel": "Turms IM",
|
|
36
|
+
"docsPath": "https://github.com/turms-im/turms",
|
|
37
|
+
"blurb": "Turms 即时通讯通道,支持私聊和群聊消息",
|
|
38
|
+
"configuredState": {
|
|
39
|
+
"specifier": "./src/config",
|
|
40
|
+
"exportName": "isTurmsConfigured"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"keywords": [
|
|
45
|
+
"openclaw",
|
|
46
|
+
"turms",
|
|
47
|
+
"im",
|
|
48
|
+
"chat",
|
|
49
|
+
"channel",
|
|
50
|
+
"plugin"
|
|
51
|
+
],
|
|
52
|
+
"author": "",
|
|
53
|
+
"license": "Apache-2.0",
|
|
54
|
+
"repository": {
|
|
55
|
+
"type": "git",
|
|
56
|
+
"url": "https://github.com/turms-im/turms.git",
|
|
57
|
+
"directory": "turms-openclaw-channel"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"long": "^5.3.2",
|
|
61
|
+
"protobufjs": "^8.3.0",
|
|
62
|
+
"ws": "^8.20.1",
|
|
63
|
+
"zod": "^4.4.3"
|
|
64
|
+
}
|
|
65
|
+
}
|