@zhin.js/adapter-telegram 7.0.9 → 7.0.11

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,29 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.0.11
4
+
5
+ ### Patch Changes
6
+
7
+ - eb84b77: fix: 更新文档,建立正确的依赖关系
8
+ - Updated dependencies [d3920e9]
9
+ - @zhin.js/core@1.5.10
10
+ - zhin.js@6.0.10
11
+ - @zhin.js/adapter@1.1.10
12
+ - @zhin.js/agent@1.1.11
13
+
14
+ ## 7.0.10
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies [e4757a8]
19
+ - Updated dependencies [c3c0ebf]
20
+ - @zhin.js/command@1.0.13
21
+ - @zhin.js/host-http@1.0.10
22
+ - @zhin.js/agent@1.1.10
23
+ - @zhin.js/core@1.5.9
24
+ - @zhin.js/adapter@1.1.9
25
+ - zhin.js@6.0.9
26
+
3
27
  ## 7.0.9
4
28
 
5
29
  ### Patch Changes
package/README.md CHANGED
@@ -21,7 +21,7 @@ pnpm add @zhin.js/adapter-telegram
21
21
 
22
22
  - `@zhin.js/adapter` — 约定式 `adapters/telegram.ts`(`defineAdapter`)
23
23
  - `@zhin.js/core` — `messageGatewayToken` 入站/出站
24
- - `@zhin.js/plugin-runtime` — `plugin.ts`(`definePlugin`)
24
+ - `zhin.js` — `plugin.ts`(`definePlugin`)
25
25
  - 配置经插件 `schema.json` 落到 `plugins.<instanceKey>`
26
26
  - **无需** `@zhin.js/host-http`(polling 路径)
27
27
 
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Convention entry: discover `adapters/telegram.ts` → defineAdapter.
4
4
  */
5
- import { defineAdapter } from '@zhin.js/adapter';
5
+ import { defineAdapter } from 'zhin.js/adapter';
6
6
  import { messageGatewayToken } from '@zhin.js/core/runtime';
7
7
  import { httpHostToken } from '@zhin.js/host-http';
8
8
  import { TelegramEndpoint } from "../lib/endpoint.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Convention entry: discover `adapters/telegram.ts` → defineAdapter.
3
3
  */
4
- import { defineAdapter } from '@zhin.js/adapter';
4
+ import { defineAdapter } from 'zhin.js/adapter';
5
5
  import { messageGatewayToken } from '@zhin.js/core/runtime';
6
6
  import { httpHostToken } from '@zhin.js/host-http';
7
7
  import { TelegramEndpoint } from '../src/endpoint.js';
package/lib/endpoint.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type { EndpointControl, EndpointInstance, EndpointSendRequest } from '@zhin.js/adapter';
1
+ import type { EndpointControl, EndpointInstance, EndpointSendRequest } from 'zhin.js/adapter';
2
2
  import type { MessageGateway } from '@zhin.js/core/runtime';
3
3
  import type { HttpHost } from '@zhin.js/host-http';
4
4
  import { type MessageRef } from '@zhin.js/im-contract';
5
- import type { CapabilityId } from '@zhin.js/plugin-runtime';
5
+ import type { CapabilityId } from 'zhin.js';
6
6
  import { type ResolvedTelegramConfig, type TelegramCallbackQuery, type TelegramChatMember, type TelegramMessage, type TelegramUpdate } from './protocol.js';
7
7
  export type TelegramFetch = (url: string, init?: {
8
8
  readonly method?: string;
@@ -2,8 +2,8 @@
2
2
  * `telegram.endpoint` 命令族:由 @zhin.js/adapter 的 createEndpointCommands 套件生成。
3
3
  * commands/endpoint/ 下的 list / add / remove 直接默认导出这三项。
4
4
  */
5
- import { createEndpointCommands } from '@zhin.js/adapter';
6
- import { defineCommand } from '@zhin.js/command';
5
+ import { createEndpointCommands } from 'zhin.js/adapter';
6
+ import { defineCommand } from 'zhin.js/command';
7
7
  import { telegramRuntimeStateToken } from './telegram-runtime-state.js';
8
8
  export const telegramEndpointCommands = createEndpointCommands({
9
9
  adapterKey: 'telegram',
@@ -1 +1 @@
1
- export declare const telegramRuntimeStateToken: import("@zhin.js/plugin-runtime").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
1
+ export declare const telegramRuntimeStateToken: import("zhin.js").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
@@ -2,5 +2,5 @@
2
2
  * Telegram 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `telegram.endpoint` 命令共享(同一 owner generation)。
4
4
  */
5
- import { defineEndpointRuntimeStateToken } from '@zhin.js/adapter';
5
+ import { defineEndpointRuntimeStateToken } from 'zhin.js/adapter';
6
6
  export const telegramRuntimeStateToken = defineEndpointRuntimeStateToken('telegram');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-telegram",
3
- "version": "7.0.9",
3
+ "version": "7.0.11",
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",
@@ -32,22 +32,19 @@
32
32
  "directory": "plugins/adapters/telegram"
33
33
  },
34
34
  "dependencies": {
35
- "@zhin.js/adapter": "1.1.8",
36
- "@zhin.js/command": "1.0.12",
37
- "@zhin.js/core": "1.5.8",
38
- "@zhin.js/host-http": "1.0.9",
35
+ "@zhin.js/adapter": "1.1.10",
36
+ "@zhin.js/core": "1.5.10",
37
+ "@zhin.js/host-http": "1.0.10",
39
38
  "@zhin.js/im-contract": "1.0.3",
40
- "@zhin.js/logger": "1.0.76",
41
- "@zhin.js/plugin-runtime": "1.1.6"
39
+ "@zhin.js/logger": "1.0.76"
42
40
  },
43
41
  "peerDependencies": {
44
42
  "zod": "^4.0.0",
45
- "@zhin.js/adapter": "1.1.8",
46
- "@zhin.js/agent": "1.1.9",
47
- "@zhin.js/core": "1.5.8",
43
+ "@zhin.js/adapter": "1.1.10",
44
+ "@zhin.js/agent": "1.1.11",
45
+ "@zhin.js/core": "1.5.10",
48
46
  "@zhin.js/permission": "1.0.2",
49
- "@zhin.js/plugin-runtime": "1.1.6",
50
- "zhin.js": "6.0.8"
47
+ "zhin.js": "6.0.10"
51
48
  },
52
49
  "peerDependenciesMeta": {
53
50
  "zhin.js": {
@@ -65,9 +62,9 @@
65
62
  "typescript": "^6.0.3",
66
63
  "vitest": "^4.1.10",
67
64
  "zod": "^4.4.3",
68
- "@zhin.js/agent": "1.1.9",
69
- "@zhin.js/host-http": "1.0.9",
70
- "zhin.js": "6.0.8"
65
+ "@zhin.js/agent": "1.1.11",
66
+ "@zhin.js/host-http": "1.0.10",
67
+ "zhin.js": "6.0.10"
71
68
  },
72
69
  "files": [
73
70
  "adapters",
package/plugin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // Generated by build-plugin-runtime-entries.mjs. Do not edit.
2
- import { createEndpointRuntimeState } from '@zhin.js/adapter';
3
- import { definePlugin } from '@zhin.js/plugin-runtime';
2
+ import { createEndpointRuntimeState } from 'zhin.js/adapter';
3
+ import { definePlugin } from 'zhin.js';
4
4
  import { permissionHostToken } from '@zhin.js/permission';
5
5
  import { checkTelegramPlatformPermit } from "./lib/platform-permit.js";
6
6
  import { telegramRuntimeStateToken } from "./lib/telegram-runtime-state.js";
package/src/endpoint.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * TelegramEndpoint — lifecycle, outbound, admit, Bot API helpers for agent tools.
3
3
  */
4
4
  import { readFile } from 'node:fs/promises';
5
- import type { EndpointControl, EndpointInstance, EndpointSendRequest } from '@zhin.js/adapter';
5
+ import type { EndpointControl, EndpointInstance, EndpointSendRequest } from 'zhin.js/adapter';
6
6
  import type { MessageGateway } from '@zhin.js/core/runtime';
7
7
  import type { HttpHost, HttpRouteRegistration } from '@zhin.js/host-http';
8
8
  import {
@@ -10,7 +10,7 @@ import {
10
10
  type MessageRef,
11
11
  } from '@zhin.js/im-contract';
12
12
  import { formatCompact, getAdapterLogger } from '@zhin.js/logger';
13
- import type { CapabilityId } from '@zhin.js/plugin-runtime';
13
+ import type { CapabilityId } from 'zhin.js';
14
14
  import { runTelegramPollLoop } from './polling.js';
15
15
  import { normalizeTelegramChatMember } from './platform-permit.js';
16
16
  import {
@@ -2,8 +2,8 @@
2
2
  * `telegram.endpoint` 命令族:由 @zhin.js/adapter 的 createEndpointCommands 套件生成。
3
3
  * commands/endpoint/ 下的 list / add / remove 直接默认导出这三项。
4
4
  */
5
- import { createEndpointCommands } from '@zhin.js/adapter';
6
- import { defineCommand } from '@zhin.js/command';
5
+ import { createEndpointCommands } from 'zhin.js/adapter';
6
+ import { defineCommand } from 'zhin.js/command';
7
7
  import { telegramRuntimeStateToken } from './telegram-runtime-state.js';
8
8
 
9
9
  export const telegramEndpointCommands = createEndpointCommands({
@@ -2,6 +2,6 @@
2
2
  * Telegram 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `telegram.endpoint` 命令共享(同一 owner generation)。
4
4
  */
5
- import { defineEndpointRuntimeStateToken } from '@zhin.js/adapter';
5
+ import { defineEndpointRuntimeStateToken } from 'zhin.js/adapter';
6
6
 
7
7
  export const telegramRuntimeStateToken = defineEndpointRuntimeStateToken('telegram');