@zhin.js/adapter-onebot12 1.1.25 → 1.1.26
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 +10 -0
- package/lib/console-spec.js +64 -6
- package/package.json +9 -9
- package/src/console-spec.ts +64 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @zhin.js/adapter-onebot12
|
|
2
2
|
|
|
3
|
+
## 1.1.26
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 0d76a7c: Overhaul Console interactive workbenches, platform-specific adapter account onboarding/login flows, DeclarativePageView visual/interactive capabilities, and official utility plugin Console pages.
|
|
8
|
+
- Updated dependencies [0d76a7c]
|
|
9
|
+
- @zhin.js/adapter@1.1.32
|
|
10
|
+
- @zhin.js/adapter-onebot-events@0.0.5
|
|
11
|
+
- @zhin.js/core@1.1.60
|
|
12
|
+
|
|
3
13
|
## 1.1.25
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/lib/console-spec.js
CHANGED
|
@@ -2,12 +2,70 @@ export const onebot12ConsoleSpec = {
|
|
|
2
2
|
adapterKey: 'onebot12',
|
|
3
3
|
adapterDisplayName: 'OneBot 12',
|
|
4
4
|
fields: [
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
{
|
|
6
|
+
key: 'platform',
|
|
7
|
+
required: true,
|
|
8
|
+
label: '所属平台 (Platform)',
|
|
9
|
+
labelI18n: { en: 'Platform' },
|
|
10
|
+
group: '连接模式',
|
|
11
|
+
groupI18n: { en: 'Connection Mode' },
|
|
12
|
+
placeholder: 'qq / wechat / telegram',
|
|
13
|
+
description: 'OneBot 12 机器人所属平台标识',
|
|
14
|
+
descriptionI18n: { en: 'Selected OneBot12 bot platform' },
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
key: 'userId',
|
|
18
|
+
required: true,
|
|
19
|
+
label: '机器人用户 ID (user_id)',
|
|
20
|
+
labelI18n: { en: 'Bot User ID' },
|
|
21
|
+
group: '连接模式',
|
|
22
|
+
groupI18n: { en: 'Connection Mode' },
|
|
23
|
+
placeholder: '123456789',
|
|
24
|
+
description: 'OneBot 12 机器人在对应平台的用户 ID',
|
|
25
|
+
descriptionI18n: { en: 'Selected OneBot12 bot user ID' },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: 'url',
|
|
29
|
+
label: '正向 WebSocket 地址',
|
|
30
|
+
labelI18n: { en: 'Forward WebSocket URL' },
|
|
31
|
+
group: '连接模式',
|
|
32
|
+
groupI18n: { en: 'Connection Mode' },
|
|
33
|
+
placeholder: 'ws://127.0.0.1:6700',
|
|
34
|
+
description: 'OneBot 实现 WebSocket URL(connection: ws 必填)',
|
|
35
|
+
descriptionI18n: { en: 'OneBot WebSocket URL (required for connection: ws)' },
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
key: 'path',
|
|
39
|
+
label: 'Webhook / 反向 WS 路径',
|
|
40
|
+
labelI18n: { en: 'Webhook / Reverse WS Path' },
|
|
41
|
+
group: '连接模式',
|
|
42
|
+
groupI18n: { en: 'Connection Mode' },
|
|
43
|
+
placeholder: '/onebot/v12/ws',
|
|
44
|
+
description: 'HTTP/WS 路径(webhook / reverse-wss)',
|
|
45
|
+
descriptionI18n: { en: 'HTTP/WS path (webhook / reverse-wss)' },
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: 'api_url',
|
|
49
|
+
label: 'HTTP Action 地址',
|
|
50
|
+
labelI18n: { en: 'HTTP Action URL' },
|
|
51
|
+
group: '连接模式',
|
|
52
|
+
groupI18n: { en: 'Connection Mode' },
|
|
53
|
+
placeholder: 'http://127.0.0.1:5700',
|
|
54
|
+
description: 'HTTP action 端点(connection: webhook 出站必填)',
|
|
55
|
+
descriptionI18n: { en: 'HTTP action endpoint (required for outbound connection: webhook)' },
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
key: 'access_token',
|
|
59
|
+
env: true,
|
|
60
|
+
label: 'Access Token (访问令牌)',
|
|
61
|
+
labelI18n: { en: 'Access Token' },
|
|
62
|
+
group: '安全认证',
|
|
63
|
+
groupI18n: { en: 'Authentication' },
|
|
64
|
+
placeholder: '与 OneBot 12 实现一致的 Token',
|
|
65
|
+
placeholderI18n: { en: 'Token matching OneBot 12 server config' },
|
|
66
|
+
description: 'OneBot 12 接口鉴权令牌(Access Token)',
|
|
67
|
+
descriptionI18n: { en: 'OneBot access token' },
|
|
68
|
+
},
|
|
11
69
|
],
|
|
12
70
|
docsUrl: 'https://zhin.js.org/adapters/onebot12',
|
|
13
71
|
readPermission: 'onebot12:read',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/adapter-onebot12",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.26",
|
|
4
4
|
"description": "Zhin.js OneBot 12 adapter for Plugin Runtime (WebSocket client)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -42,16 +42,16 @@
|
|
|
42
42
|
"@imhelper/onebot-v12": "1.0.7",
|
|
43
43
|
"imhelper": "1.0.7",
|
|
44
44
|
"ws": "^8.21.1",
|
|
45
|
-
"@zhin.js/adapter-onebot-events": "0.0.
|
|
46
|
-
"@zhin.js/
|
|
45
|
+
"@zhin.js/adapter-onebot-events": "0.0.5",
|
|
46
|
+
"@zhin.js/core": "1.1.60",
|
|
47
47
|
"@zhin.js/console-contract": "1.1.5",
|
|
48
|
-
"@zhin.js/core": "1.1.59",
|
|
49
48
|
"@zhin.js/feature-kit": "1.1.15",
|
|
50
49
|
"@zhin.js/host-http": "1.1.17",
|
|
51
50
|
"@zhin.js/im-contract": "1.1.13",
|
|
52
51
|
"@zhin.js/logger": "1.1.2",
|
|
53
52
|
"@zhin.js/page": "1.1.17",
|
|
54
|
-
"@zhin.js/skill": "1.1.16"
|
|
53
|
+
"@zhin.js/skill": "1.1.16",
|
|
54
|
+
"@zhin.js/adapter": "1.1.32"
|
|
55
55
|
},
|
|
56
56
|
"devDependencies": {
|
|
57
57
|
"@types/node": "^26.1.2",
|
|
@@ -59,13 +59,13 @@
|
|
|
59
59
|
"typescript": "^6.0.3",
|
|
60
60
|
"vitest": "^4.1.10",
|
|
61
61
|
"@zhin.js/host-http": "1.1.17",
|
|
62
|
-
"zhin.js": "1.1.
|
|
62
|
+
"zhin.js": "1.1.25"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@zhin.js/adapter": "^1.1.
|
|
65
|
+
"@zhin.js/adapter": "^1.1.32",
|
|
66
|
+
"@zhin.js/core": "^1.1.60",
|
|
66
67
|
"@zhin.js/command": "^1.1.17",
|
|
67
|
-
"
|
|
68
|
-
"zhin.js": "^1.1.24"
|
|
68
|
+
"zhin.js": "^1.1.25"
|
|
69
69
|
},
|
|
70
70
|
"peerDependenciesMeta": {
|
|
71
71
|
"@zhin.js/command": {
|
package/src/console-spec.ts
CHANGED
|
@@ -7,12 +7,70 @@ export const onebot12ConsoleSpec = {
|
|
|
7
7
|
adapterKey: 'onebot12',
|
|
8
8
|
adapterDisplayName: 'OneBot 12',
|
|
9
9
|
fields: [
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
{
|
|
11
|
+
key: 'platform',
|
|
12
|
+
required: true,
|
|
13
|
+
label: '所属平台 (Platform)',
|
|
14
|
+
labelI18n: { en: 'Platform' },
|
|
15
|
+
group: '连接模式',
|
|
16
|
+
groupI18n: { en: 'Connection Mode' },
|
|
17
|
+
placeholder: 'qq / wechat / telegram',
|
|
18
|
+
description: 'OneBot 12 机器人所属平台标识',
|
|
19
|
+
descriptionI18n: { en: 'Selected OneBot12 bot platform' },
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
key: 'userId',
|
|
23
|
+
required: true,
|
|
24
|
+
label: '机器人用户 ID (user_id)',
|
|
25
|
+
labelI18n: { en: 'Bot User ID' },
|
|
26
|
+
group: '连接模式',
|
|
27
|
+
groupI18n: { en: 'Connection Mode' },
|
|
28
|
+
placeholder: '123456789',
|
|
29
|
+
description: 'OneBot 12 机器人在对应平台的用户 ID',
|
|
30
|
+
descriptionI18n: { en: 'Selected OneBot12 bot user ID' },
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: 'url',
|
|
34
|
+
label: '正向 WebSocket 地址',
|
|
35
|
+
labelI18n: { en: 'Forward WebSocket URL' },
|
|
36
|
+
group: '连接模式',
|
|
37
|
+
groupI18n: { en: 'Connection Mode' },
|
|
38
|
+
placeholder: 'ws://127.0.0.1:6700',
|
|
39
|
+
description: 'OneBot 实现 WebSocket URL(connection: ws 必填)',
|
|
40
|
+
descriptionI18n: { en: 'OneBot WebSocket URL (required for connection: ws)' },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: 'path',
|
|
44
|
+
label: 'Webhook / 反向 WS 路径',
|
|
45
|
+
labelI18n: { en: 'Webhook / Reverse WS Path' },
|
|
46
|
+
group: '连接模式',
|
|
47
|
+
groupI18n: { en: 'Connection Mode' },
|
|
48
|
+
placeholder: '/onebot/v12/ws',
|
|
49
|
+
description: 'HTTP/WS 路径(webhook / reverse-wss)',
|
|
50
|
+
descriptionI18n: { en: 'HTTP/WS path (webhook / reverse-wss)' },
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: 'api_url',
|
|
54
|
+
label: 'HTTP Action 地址',
|
|
55
|
+
labelI18n: { en: 'HTTP Action URL' },
|
|
56
|
+
group: '连接模式',
|
|
57
|
+
groupI18n: { en: 'Connection Mode' },
|
|
58
|
+
placeholder: 'http://127.0.0.1:5700',
|
|
59
|
+
description: 'HTTP action 端点(connection: webhook 出站必填)',
|
|
60
|
+
descriptionI18n: { en: 'HTTP action endpoint (required for outbound connection: webhook)' },
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
key: 'access_token',
|
|
64
|
+
env: true,
|
|
65
|
+
label: 'Access Token (访问令牌)',
|
|
66
|
+
labelI18n: { en: 'Access Token' },
|
|
67
|
+
group: '安全认证',
|
|
68
|
+
groupI18n: { en: 'Authentication' },
|
|
69
|
+
placeholder: '与 OneBot 12 实现一致的 Token',
|
|
70
|
+
placeholderI18n: { en: 'Token matching OneBot 12 server config' },
|
|
71
|
+
description: 'OneBot 12 接口鉴权令牌(Access Token)',
|
|
72
|
+
descriptionI18n: { en: 'OneBot access token' },
|
|
73
|
+
},
|
|
16
74
|
] as readonly AdapterConsoleField[],
|
|
17
75
|
docsUrl: 'https://zhin.js.org/adapters/onebot12',
|
|
18
76
|
readPermission: 'onebot12:read',
|