@zhin.js/adapter-telegram 1.1.21 → 1.1.22

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 CHANGED
@@ -1,5 +1,38 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - 41ff1a5: ADR 0044 C5: every official adapter now declares a capability `profile` (its `segments` moved into `profile.default.messaging.segments`). icqq declares the complete profile (per conversation kind: scene, all 14 actions with real limits, events, feedback, delivery) and implements the seven new management ports (`pokeUser`, `unmuteGroupMember`, `muteAllGroupMembers`, `setGroupCard`, `setGroupTitle`, `setGroupEssence`, `inviteGroupMember`) with fresh bot-role reads. qq official declares its passive reply windows; undeclared capabilities stay unsupported.
8
+ - cbd3f14: ADR 0044 integration and C6 guard. `delivery.spool` now reproduces the pre-0044 media rule (icqq `false`, every other official adapter `true`). icqq narrows `actions.recall.others` unless the Bot is admin or owner, and declares recall for groups. Endpoint kind capabilities merge the Endpoint's `operations` (Discord reactions keep working; Discord declares reaction feedback). Adapters in the `@zhin.js/` scope are trusted: their custom prompt text is not labelled `external_content`. Core no longer keeps a telegram/discord interactive-policy table (adapters declare `segments.interactive`). New `pnpm check:no-platform-branches` blocks platform-name branches in runtime code.
9
+ - 4fe49b5: 支持配置按需生效:分离保存与有效版本,独立变更先应用,账号资料更新保留连接,模型按回合使用确定版本;Console 返回结构化应用结果。监听改为仅显式 --watch 启用,开发模板显式选择源码和配置监听。
10
+
11
+ 自变更消费配置应用回执,避免已处理配置被二次重载;持久化本次写入修订和应用结果,未知结果或修订冲突时停止自动续作并保留现场,恢复不会覆盖未经本次变更确认的配置。
12
+
13
+ - Updated dependencies [b249e5e]
14
+ - Updated dependencies [57661f6]
15
+ - Updated dependencies [cbd3f14]
16
+ - Updated dependencies [299863a]
17
+ - Updated dependencies [aaa93d7]
18
+ - Updated dependencies [bd524d1]
19
+ - Updated dependencies [126ae99]
20
+ - Updated dependencies [4fe49b5]
21
+ - Updated dependencies [cce07db]
22
+ - Updated dependencies [b652db3]
23
+ - Updated dependencies [0315ba0]
24
+ - Updated dependencies [00be764]
25
+ - @zhin.js/core@1.1.56
26
+ - @zhin.js/adapter@1.1.28
27
+ - @zhin.js/im-contract@1.1.11
28
+ - @zhin.js/tool@1.1.15
29
+ - @zhin.js/skill@1.1.13
30
+ - @zhin.js/host-http@1.1.14
31
+ - @zhin.js/feature-kit@1.1.12
32
+ - @zhin.js/client@1.1.24
33
+ - @zhin.js/page@1.1.14
34
+ - @zhin.js/agent-feature@1.1.13
35
+
3
36
  ## 1.1.21
4
37
 
5
38
  ### Patch Changes
@@ -8,13 +8,28 @@ import {} from "../../lib/protocol.js";
8
8
  export { TelegramEndpoint } from "../../lib/endpoint.js";
9
9
  export default defineAdapter({
10
10
  capabilities: ['inbound', 'outbound'],
11
- operations: ['recall'],
12
11
  // 媒体 url / file_id 直发,base64 / 本地路径经 multipart attach:// 上传物化;
13
12
  // inline keyboard 原生按钮承载交互段。
14
- segments: {
15
- outboundMedia: ['url', 'upload'],
16
- interactive: 'native',
17
- markdown: 'native',
13
+ profile: {
14
+ default: {
15
+ messaging: {
16
+ segments: {
17
+ outboundMedia: ['url', 'upload'],
18
+ interactive: 'native',
19
+ markdown: 'native',
20
+ },
21
+ quote: true,
22
+ recall: { timeLimitSeconds: 172800 },
23
+ },
24
+ actions: {
25
+ recall: {
26
+ scopes: ['private', 'group', 'channel'],
27
+ params: { timeLimitSeconds: 172800 },
28
+ },
29
+ quoteReply: { scopes: ['private', 'group', 'channel'] },
30
+ },
31
+ delivery: { send: true, proactive: true, spool: true },
32
+ },
18
33
  },
19
34
  createAdapter: context => new TelegramAdapter(context),
20
35
  });
@@ -12,13 +12,28 @@ export type { TelegramEndpointOptions, TelegramFetch } from '../../src/endpoint.
12
12
 
13
13
  export default defineAdapter<TelegramEndpointConfig>({
14
14
  capabilities: ['inbound', 'outbound'],
15
- operations: ['recall'],
16
15
  // 媒体 url / file_id 直发,base64 / 本地路径经 multipart attach:// 上传物化;
17
16
  // inline keyboard 原生按钮承载交互段。
18
- segments: {
19
- outboundMedia: ['url', 'upload'],
20
- interactive: 'native',
21
- markdown: 'native',
17
+ profile: {
18
+ default: {
19
+ messaging: {
20
+ segments: {
21
+ outboundMedia: ['url', 'upload'],
22
+ interactive: 'native',
23
+ markdown: 'native',
24
+ },
25
+ quote: true,
26
+ recall: { timeLimitSeconds: 172800 },
27
+ },
28
+ actions: {
29
+ recall: {
30
+ scopes: ['private', 'group', 'channel'],
31
+ params: { timeLimitSeconds: 172800 },
32
+ },
33
+ quoteReply: { scopes: ['private', 'group', 'channel'] },
34
+ },
35
+ delivery: { send: true, proactive: true, spool: true },
36
+ },
22
37
  },
23
38
  createAdapter: context => new TelegramAdapter(context),
24
39
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-telegram",
3
- "version": "1.1.21",
3
+ "version": "1.1.22",
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,26 +31,26 @@
31
31
  "directory": "plugins/adapters/telegram"
32
32
  },
33
33
  "dependencies": {
34
- "@zhin.js/adapter": "1.1.27",
35
- "@zhin.js/agent-feature": "1.1.12",
36
- "@zhin.js/client": "1.1.23",
34
+ "@zhin.js/adapter": "1.1.28",
35
+ "@zhin.js/agent-feature": "1.1.13",
36
+ "@zhin.js/client": "1.1.24",
37
37
  "@zhin.js/console-contract": "1.1.3",
38
- "@zhin.js/core": "1.1.55",
39
- "@zhin.js/feature-kit": "1.1.11",
40
- "@zhin.js/host-http": "1.1.13",
41
- "@zhin.js/im-contract": "1.1.10",
38
+ "@zhin.js/core": "1.1.56",
39
+ "@zhin.js/feature-kit": "1.1.12",
40
+ "@zhin.js/host-http": "1.1.14",
41
+ "@zhin.js/im-contract": "1.1.11",
42
42
  "@zhin.js/logger": "1.1.2",
43
- "@zhin.js/page": "1.1.13",
44
- "@zhin.js/skill": "1.1.12",
45
- "@zhin.js/tool": "1.1.14"
43
+ "@zhin.js/page": "1.1.14",
44
+ "@zhin.js/skill": "1.1.13",
45
+ "@zhin.js/tool": "1.1.15"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "zod": "^4.0.0",
49
- "@zhin.js/adapter": "^1.1.27",
50
- "@zhin.js/command": "^1.1.13",
51
- "@zhin.js/core": "^1.1.55",
52
- "@zhin.js/permission": "^1.1.11",
53
- "zhin.js": "^1.1.20"
49
+ "@zhin.js/adapter": "^1.1.28",
50
+ "@zhin.js/command": "^1.1.14",
51
+ "@zhin.js/core": "^1.1.56",
52
+ "@zhin.js/permission": "^1.1.12",
53
+ "zhin.js": "^1.1.21"
54
54
  },
55
55
  "peerDependenciesMeta": {
56
56
  "@zhin.js/command": {
@@ -69,9 +69,9 @@
69
69
  "typescript": "^6.0.3",
70
70
  "vitest": "^4.1.10",
71
71
  "zod": "^4.4.3",
72
- "@zhin.js/host-http": "1.1.13",
73
- "@zhin.js/pagemanager": "1.1.20",
74
- "zhin.js": "1.1.20"
72
+ "@zhin.js/host-http": "1.1.14",
73
+ "@zhin.js/pagemanager": "1.1.21",
74
+ "zhin.js": "1.1.21"
75
75
  },
76
76
  "files": [
77
77
  "adapters",
package/plugin.js CHANGED
@@ -5,6 +5,7 @@ import { checkTelegramPlatformPermit } from "./lib/platform-permit.js";
5
5
  import { createTelegramConsoleRpc } from "./lib/console.js";
6
6
  export default definePlugin({
7
7
  name: 'telegram',
8
+ configUpdate: { featurePaths: [['nickname'], ['profile'], ['endpoints']] },
8
9
  metadata: {
9
10
  displayName: 'Telegram Bot API Adapter',
10
11
  },