@53ai/53ai-openclaw 1.0.3 → 1.0.4
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/CHANGELOG.md +15 -0
- package/README.md +14 -14
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/src/interface.d.ts +6 -6
- package/dist/src/message-parser.d.ts +3 -3
- package/openclaw.plugin.json +10 -6
- package/package.json +1 -21
package/dist/src/interface.d.ts
CHANGED
|
@@ -37,9 +37,9 @@ export interface OpenAIChatCompletionChunk {
|
|
|
37
37
|
error?: ResponseError;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
|
-
*
|
|
40
|
+
* 53AIHub 消息数据类型
|
|
41
41
|
*/
|
|
42
|
-
export interface
|
|
42
|
+
export interface Hub53AIMessageData {
|
|
43
43
|
toChatId?: string;
|
|
44
44
|
text?: string;
|
|
45
45
|
imageUrls?: string[];
|
|
@@ -68,11 +68,11 @@ export interface AgentHubMessageData {
|
|
|
68
68
|
/**
|
|
69
69
|
* WebSocket 请求/响应消息基础格式
|
|
70
70
|
*/
|
|
71
|
-
export interface
|
|
71
|
+
export interface Hub53AIWsMessage {
|
|
72
72
|
req_id: string;
|
|
73
73
|
action: "chat" | "message" | "ping" | "pong";
|
|
74
74
|
status: "streaming" | "done" | "error" | "final" | "thinking";
|
|
75
|
-
data: OpenAIChatRequest | OpenAIChatCompletionChunk |
|
|
75
|
+
data: OpenAIChatRequest | OpenAIChatCompletionChunk | Hub53AIMessageData | null;
|
|
76
76
|
}
|
|
77
77
|
/**
|
|
78
78
|
* 图片消息内容
|
|
@@ -110,7 +110,7 @@ export interface MessageContentItem {
|
|
|
110
110
|
/**
|
|
111
111
|
* 来自 Go 后端的消息
|
|
112
112
|
*/
|
|
113
|
-
export interface
|
|
113
|
+
export interface Hub53AIIncomingMessage {
|
|
114
114
|
type: string;
|
|
115
115
|
msgId: string;
|
|
116
116
|
chatId: string;
|
|
@@ -128,7 +128,7 @@ export interface AgentHubIncomingMessage {
|
|
|
128
128
|
/**
|
|
129
129
|
* 发送给 Go 后端的消息
|
|
130
130
|
*/
|
|
131
|
-
export interface
|
|
131
|
+
export interface Hub53AIOutgoingMessage {
|
|
132
132
|
type: "reply" | "message";
|
|
133
133
|
msgId?: string;
|
|
134
134
|
chatId: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Hub53AIIncomingMessage, MessageContentItem } from "./interface.js";
|
|
2
2
|
export interface ParsedMessageContent {
|
|
3
3
|
textParts: string[];
|
|
4
4
|
imageUrls: string[];
|
|
5
5
|
fileUrls: string[];
|
|
6
6
|
contentItems: MessageContentItem[];
|
|
7
7
|
}
|
|
8
|
-
export declare function parseIncomingMessage(rawJson: string):
|
|
9
|
-
export declare function parseMessageContent(msg:
|
|
8
|
+
export declare function parseIncomingMessage(rawJson: string): Hub53AIIncomingMessage | null;
|
|
9
|
+
export declare function parseMessageContent(msg: Hub53AIIncomingMessage): ParsedMessageContent;
|
package/openclaw.plugin.json
CHANGED
|
@@ -9,23 +9,27 @@
|
|
|
9
9
|
"properties": {
|
|
10
10
|
"botId": {
|
|
11
11
|
"type": "string",
|
|
12
|
-
"description": "
|
|
12
|
+
"description": "53AIHub 智能体 ID (HashID)"
|
|
13
13
|
},
|
|
14
14
|
"secret": {
|
|
15
15
|
"type": "string",
|
|
16
|
-
"description": "
|
|
16
|
+
"description": "53AIHub App Secret / Token"
|
|
17
17
|
},
|
|
18
18
|
"token": {
|
|
19
19
|
"type": "string",
|
|
20
|
-
"description": "
|
|
20
|
+
"description": "53AIHub App Secret / Token (Alias)"
|
|
21
21
|
},
|
|
22
22
|
"websocketUrl": {
|
|
23
23
|
"type": "string",
|
|
24
|
-
"description": "
|
|
24
|
+
"description": "53AIHub WebSocket 连接地址"
|
|
25
25
|
},
|
|
26
26
|
"accessPolicy": {
|
|
27
27
|
"type": "string",
|
|
28
|
-
"enum": [
|
|
28
|
+
"enum": [
|
|
29
|
+
"open",
|
|
30
|
+
"allowlist",
|
|
31
|
+
"pairing"
|
|
32
|
+
],
|
|
29
33
|
"default": "open",
|
|
30
34
|
"description": "访问策略: open=开放所有用户, allowlist=仅白名单用户, pairing=首次使用需审批"
|
|
31
35
|
},
|
|
@@ -38,4 +42,4 @@
|
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
}
|
|
41
|
-
}
|
|
45
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@53ai/53ai-openclaw",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -42,26 +42,6 @@
|
|
|
42
42
|
"url": "https://github.com/53AI/53ai-openclaw/issues"
|
|
43
43
|
},
|
|
44
44
|
"homepage": "https://github.com/53AI/53ai-openclaw#readme",
|
|
45
|
-
"openclaw": {
|
|
46
|
-
"extensions": [
|
|
47
|
-
"./dist/index.esm.js"
|
|
48
|
-
],
|
|
49
|
-
"channel": {
|
|
50
|
-
"id": "53aihub",
|
|
51
|
-
"paclabel": "53AIHub",
|
|
52
|
-
"selectionLabel": "53AIHub (AgentHub)",
|
|
53
|
-
"docsPath": "/channels/53aihub",
|
|
54
|
-
"docsLabel": "53ai-openclaw",
|
|
55
|
-
"blurb": "53AIHub 智能机器人接入插件",
|
|
56
|
-
"order": 90,
|
|
57
|
-
"quickstartAllowFrom": true
|
|
58
|
-
},
|
|
59
|
-
"install": {
|
|
60
|
-
"npmSpec": "@53ai/53ai-openclaw",
|
|
61
|
-
"localPath": "extensions/53ai-openclaw",
|
|
62
|
-
"defaultChoice": "npm"
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
45
|
"dependencies": {
|
|
66
46
|
"ws": "^8.16.0"
|
|
67
47
|
},
|