@zhin.js/adapter-telegram 1.1.24 → 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 +24 -0
- package/lib/console-spec.js +85 -8
- package/package.json +18 -18
- package/src/console-spec.ts +85 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# Changelog
|
|
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/core@1.1.60
|
|
11
|
+
|
|
12
|
+
## 1.1.25
|
|
13
|
+
|
|
14
|
+
### Patch Changes
|
|
15
|
+
|
|
16
|
+
- Updated dependencies [8adce16]
|
|
17
|
+
- @zhin.js/console-contract@1.1.5
|
|
18
|
+
- @zhin.js/host-http@1.1.17
|
|
19
|
+
- @zhin.js/core@1.1.59
|
|
20
|
+
- @zhin.js/page@1.1.17
|
|
21
|
+
- @zhin.js/adapter@1.1.31
|
|
22
|
+
- @zhin.js/agent-feature@1.1.16
|
|
23
|
+
- @zhin.js/feature-kit@1.1.15
|
|
24
|
+
- @zhin.js/skill@1.1.16
|
|
25
|
+
- @zhin.js/tool@1.1.18
|
|
26
|
+
|
|
3
27
|
## 1.1.24
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/lib/console-spec.js
CHANGED
|
@@ -2,14 +2,91 @@ export const telegramConsoleSpec = {
|
|
|
2
2
|
adapterKey: 'telegram',
|
|
3
3
|
adapterDisplayName: 'Telegram',
|
|
4
4
|
fields: [
|
|
5
|
-
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
{
|
|
6
|
+
key: 'token',
|
|
7
|
+
required: true,
|
|
8
|
+
env: true,
|
|
9
|
+
label: 'Bot Token (机器人令牌)',
|
|
10
|
+
labelI18n: { en: 'Bot Token' },
|
|
11
|
+
group: '基础认证',
|
|
12
|
+
groupI18n: { en: 'Basic Auth' },
|
|
13
|
+
placeholder: '123456789:AAH...',
|
|
14
|
+
description: '从 @BotFather 获取的 Telegram Bot Token',
|
|
15
|
+
descriptionI18n: { en: 'Telegram bot token from @BotFather' },
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
key: 'polling',
|
|
19
|
+
type: 'boolean',
|
|
20
|
+
label: '长轮询模式 (Polling)',
|
|
21
|
+
labelI18n: { en: 'Long Polling Mode' },
|
|
22
|
+
group: '连接与回调',
|
|
23
|
+
groupI18n: { en: 'Connection & Webhook' },
|
|
24
|
+
description: '开启后使用长轮询拉取消息;关闭则使用 Webhook 模式',
|
|
25
|
+
descriptionI18n: { en: 'Use long polling; false selects webhook mode' },
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
key: 'webhook.domain',
|
|
29
|
+
label: 'Webhook 公网域名',
|
|
30
|
+
labelI18n: { en: 'Webhook Public Domain' },
|
|
31
|
+
group: '连接与回调',
|
|
32
|
+
groupI18n: { en: 'Connection & Webhook' },
|
|
33
|
+
placeholder: 'https://bot.example.com',
|
|
34
|
+
description: 'Webhook 模式的公网访问域名(Origin)',
|
|
35
|
+
descriptionI18n: { en: 'Public webhook origin' },
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
key: 'webhook.path',
|
|
39
|
+
label: 'Webhook 本地路由',
|
|
40
|
+
labelI18n: { en: 'Webhook Local Path' },
|
|
41
|
+
group: '连接与回调',
|
|
42
|
+
groupI18n: { en: 'Connection & Webhook' },
|
|
43
|
+
placeholder: '/telegram/webhook',
|
|
44
|
+
description: '本地 HTTP 服务监听的 Webhook 路径',
|
|
45
|
+
descriptionI18n: { en: 'Local webhook route' },
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
key: 'webhook.secretToken',
|
|
49
|
+
env: true,
|
|
50
|
+
label: 'Webhook 签名密钥',
|
|
51
|
+
labelI18n: { en: 'Webhook Secret Token' },
|
|
52
|
+
group: '连接与回调',
|
|
53
|
+
groupI18n: { en: 'Connection & Webhook' },
|
|
54
|
+
placeholder: '自定义随机字符串(校验 X-Telegram-Bot-Api-Secret-Token)',
|
|
55
|
+
placeholderI18n: { en: 'Optional secret token for webhook header verification' },
|
|
56
|
+
description: 'Webhook 请求头校验密钥(可选)',
|
|
57
|
+
descriptionI18n: { en: 'Webhook secret token' },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: 'streaming',
|
|
61
|
+
type: 'boolean',
|
|
62
|
+
label: '流式草稿回复',
|
|
63
|
+
labelI18n: { en: 'Streaming Draft Reply' },
|
|
64
|
+
group: '流式体验与代理',
|
|
65
|
+
groupI18n: { en: 'Streaming & Proxy' },
|
|
66
|
+
description: '私聊生成回复时实时更新草稿内容(默认开启)',
|
|
67
|
+
descriptionI18n: { en: 'Show private-chat drafts while generating (default true)' },
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
key: 'streamingIntervalMs',
|
|
71
|
+
type: 'number',
|
|
72
|
+
label: '流式刷新间隔 (ms)',
|
|
73
|
+
labelI18n: { en: 'Streaming Interval (ms)' },
|
|
74
|
+
group: '流式体验与代理',
|
|
75
|
+
groupI18n: { en: 'Streaming & Proxy' },
|
|
76
|
+
placeholder: '500',
|
|
77
|
+
description: '流式消息每次编辑的最小间隔毫秒数(默认 500)',
|
|
78
|
+
descriptionI18n: { en: 'Delay between draft updates in milliseconds (default 500)' },
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
key: 'apiBaseUrl',
|
|
82
|
+
label: '自定义 Bot API 地址',
|
|
83
|
+
labelI18n: { en: 'Custom Bot API URL' },
|
|
84
|
+
group: '流式体验与代理',
|
|
85
|
+
groupI18n: { en: 'Streaming & Proxy' },
|
|
86
|
+
placeholder: 'https://api.telegram.org',
|
|
87
|
+
description: '自建 Telegram Bot API 反代或本地服务地址(可选)',
|
|
88
|
+
descriptionI18n: { en: 'Telegram Bot API URL' },
|
|
89
|
+
},
|
|
13
90
|
],
|
|
14
91
|
docsUrl: 'https://zhin.js.org/adapters/telegram',
|
|
15
92
|
readPermission: 'telegram:read',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhin.js/adapter-telegram",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.26",
|
|
4
4
|
"description": "Zhin.js Telegram Bot API adapter for Plugin Runtime (long-poll getUpdates)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -31,25 +31,25 @@
|
|
|
31
31
|
"directory": "plugins/adapters/telegram"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@zhin.js/adapter": "1.1.
|
|
35
|
-
"@zhin.js/agent-feature": "1.1.
|
|
36
|
-
"@zhin.js/console-contract": "1.1.
|
|
37
|
-
"@zhin.js/core": "1.1.
|
|
38
|
-
"@zhin.js/feature-kit": "1.1.
|
|
39
|
-
"@zhin.js/host-http": "1.1.
|
|
34
|
+
"@zhin.js/adapter": "1.1.32",
|
|
35
|
+
"@zhin.js/agent-feature": "1.1.16",
|
|
36
|
+
"@zhin.js/console-contract": "1.1.5",
|
|
37
|
+
"@zhin.js/core": "1.1.60",
|
|
38
|
+
"@zhin.js/feature-kit": "1.1.15",
|
|
39
|
+
"@zhin.js/host-http": "1.1.17",
|
|
40
40
|
"@zhin.js/im-contract": "1.1.13",
|
|
41
41
|
"@zhin.js/logger": "1.1.2",
|
|
42
|
-
"@zhin.js/page": "1.1.
|
|
43
|
-
"@zhin.js/skill": "1.1.
|
|
44
|
-
"@zhin.js/tool": "1.1.
|
|
42
|
+
"@zhin.js/page": "1.1.17",
|
|
43
|
+
"@zhin.js/skill": "1.1.16",
|
|
44
|
+
"@zhin.js/tool": "1.1.18"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"zod": "^4.0.0",
|
|
48
|
-
"@zhin.js/adapter": "^1.1.
|
|
49
|
-
"@zhin.js/command": "^1.1.
|
|
50
|
-
"@zhin.js/core": "^1.1.
|
|
51
|
-
"@zhin.js/permission": "^1.1.
|
|
52
|
-
"zhin.js": "^1.1.
|
|
48
|
+
"@zhin.js/adapter": "^1.1.32",
|
|
49
|
+
"@zhin.js/command": "^1.1.17",
|
|
50
|
+
"@zhin.js/core": "^1.1.60",
|
|
51
|
+
"@zhin.js/permission": "^1.1.15",
|
|
52
|
+
"zhin.js": "^1.1.25"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@zhin.js/command": {
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
"typescript": "^6.0.3",
|
|
69
69
|
"vitest": "^4.1.10",
|
|
70
70
|
"zod": "^4.4.3",
|
|
71
|
-
"@zhin.js/host-http": "1.1.
|
|
72
|
-
"@zhin.js/pagemanager": "1.1.
|
|
73
|
-
"zhin.js": "1.1.
|
|
71
|
+
"@zhin.js/host-http": "1.1.17",
|
|
72
|
+
"@zhin.js/pagemanager": "1.1.24",
|
|
73
|
+
"zhin.js": "1.1.25"
|
|
74
74
|
},
|
|
75
75
|
"files": [
|
|
76
76
|
"adapters",
|
package/src/console-spec.ts
CHANGED
|
@@ -7,14 +7,91 @@ export const telegramConsoleSpec = {
|
|
|
7
7
|
adapterKey: 'telegram',
|
|
8
8
|
adapterDisplayName: 'Telegram',
|
|
9
9
|
fields: [
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
10
|
+
{
|
|
11
|
+
key: 'token',
|
|
12
|
+
required: true,
|
|
13
|
+
env: true,
|
|
14
|
+
label: 'Bot Token (机器人令牌)',
|
|
15
|
+
labelI18n: { en: 'Bot Token' },
|
|
16
|
+
group: '基础认证',
|
|
17
|
+
groupI18n: { en: 'Basic Auth' },
|
|
18
|
+
placeholder: '123456789:AAH...',
|
|
19
|
+
description: '从 @BotFather 获取的 Telegram Bot Token',
|
|
20
|
+
descriptionI18n: { en: 'Telegram bot token from @BotFather' },
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
key: 'polling',
|
|
24
|
+
type: 'boolean',
|
|
25
|
+
label: '长轮询模式 (Polling)',
|
|
26
|
+
labelI18n: { en: 'Long Polling Mode' },
|
|
27
|
+
group: '连接与回调',
|
|
28
|
+
groupI18n: { en: 'Connection & Webhook' },
|
|
29
|
+
description: '开启后使用长轮询拉取消息;关闭则使用 Webhook 模式',
|
|
30
|
+
descriptionI18n: { en: 'Use long polling; false selects webhook mode' },
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
key: 'webhook.domain',
|
|
34
|
+
label: 'Webhook 公网域名',
|
|
35
|
+
labelI18n: { en: 'Webhook Public Domain' },
|
|
36
|
+
group: '连接与回调',
|
|
37
|
+
groupI18n: { en: 'Connection & Webhook' },
|
|
38
|
+
placeholder: 'https://bot.example.com',
|
|
39
|
+
description: 'Webhook 模式的公网访问域名(Origin)',
|
|
40
|
+
descriptionI18n: { en: 'Public webhook origin' },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
key: 'webhook.path',
|
|
44
|
+
label: 'Webhook 本地路由',
|
|
45
|
+
labelI18n: { en: 'Webhook Local Path' },
|
|
46
|
+
group: '连接与回调',
|
|
47
|
+
groupI18n: { en: 'Connection & Webhook' },
|
|
48
|
+
placeholder: '/telegram/webhook',
|
|
49
|
+
description: '本地 HTTP 服务监听的 Webhook 路径',
|
|
50
|
+
descriptionI18n: { en: 'Local webhook route' },
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
key: 'webhook.secretToken',
|
|
54
|
+
env: true,
|
|
55
|
+
label: 'Webhook 签名密钥',
|
|
56
|
+
labelI18n: { en: 'Webhook Secret Token' },
|
|
57
|
+
group: '连接与回调',
|
|
58
|
+
groupI18n: { en: 'Connection & Webhook' },
|
|
59
|
+
placeholder: '自定义随机字符串(校验 X-Telegram-Bot-Api-Secret-Token)',
|
|
60
|
+
placeholderI18n: { en: 'Optional secret token for webhook header verification' },
|
|
61
|
+
description: 'Webhook 请求头校验密钥(可选)',
|
|
62
|
+
descriptionI18n: { en: 'Webhook secret token' },
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: 'streaming',
|
|
66
|
+
type: 'boolean',
|
|
67
|
+
label: '流式草稿回复',
|
|
68
|
+
labelI18n: { en: 'Streaming Draft Reply' },
|
|
69
|
+
group: '流式体验与代理',
|
|
70
|
+
groupI18n: { en: 'Streaming & Proxy' },
|
|
71
|
+
description: '私聊生成回复时实时更新草稿内容(默认开启)',
|
|
72
|
+
descriptionI18n: { en: 'Show private-chat drafts while generating (default true)' },
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
key: 'streamingIntervalMs',
|
|
76
|
+
type: 'number',
|
|
77
|
+
label: '流式刷新间隔 (ms)',
|
|
78
|
+
labelI18n: { en: 'Streaming Interval (ms)' },
|
|
79
|
+
group: '流式体验与代理',
|
|
80
|
+
groupI18n: { en: 'Streaming & Proxy' },
|
|
81
|
+
placeholder: '500',
|
|
82
|
+
description: '流式消息每次编辑的最小间隔毫秒数(默认 500)',
|
|
83
|
+
descriptionI18n: { en: 'Delay between draft updates in milliseconds (default 500)' },
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
key: 'apiBaseUrl',
|
|
87
|
+
label: '自定义 Bot API 地址',
|
|
88
|
+
labelI18n: { en: 'Custom Bot API URL' },
|
|
89
|
+
group: '流式体验与代理',
|
|
90
|
+
groupI18n: { en: 'Streaming & Proxy' },
|
|
91
|
+
placeholder: 'https://api.telegram.org',
|
|
92
|
+
description: '自建 Telegram Bot API 反代或本地服务地址(可选)',
|
|
93
|
+
descriptionI18n: { en: 'Telegram Bot API URL' },
|
|
94
|
+
},
|
|
18
95
|
] as readonly AdapterConsoleField[],
|
|
19
96
|
docsUrl: 'https://zhin.js.org/adapters/telegram',
|
|
20
97
|
readPermission: 'telegram:read',
|