@zhin.js/adapter-discord 7.0.10 → 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,16 @@
1
1
  # @zhin.js/adapter-discord
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
+
3
14
  ## 7.0.10
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -21,7 +21,7 @@ pnpm add @zhin.js/adapter-discord discord.js
21
21
 
22
22
  - `@zhin.js/adapter` — 约定式 `adapters/discord.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` / `@zhin.js/host-router`(Gateway 路径)
27
27
 
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Convention entry: discover `adapters/discord.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 { DiscordGatewayEndpoint, DiscordInteractionsEndpoint, } from "../lib/endpoint.js";
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Convention entry: discover `adapters/discord.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 {
@@ -4,8 +4,8 @@
4
4
  * 注:applicationId / publicKey 为顶层共享字段(slash commands / interactions 用),
5
5
  * endpoints[i] 仅需 name + token(见 schema.json),故 add 只录入 token。
6
6
  */
7
- import { createEndpointCommands } from '@zhin.js/adapter';
8
- import { defineCommand } from '@zhin.js/command';
7
+ import { createEndpointCommands } from 'zhin.js/adapter';
8
+ import { defineCommand } from 'zhin.js/command';
9
9
  import { discordRuntimeStateToken } from './discord-runtime-state.js';
10
10
  export const discordEndpointCommands = createEndpointCommands({
11
11
  adapterKey: 'discord',
@@ -1 +1 @@
1
- export declare const discordRuntimeStateToken: import("@zhin.js/plugin-runtime").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
1
+ export declare const discordRuntimeStateToken: import("zhin.js").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
@@ -2,5 +2,5 @@
2
2
  * Discord 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `discord.endpoint` 命令共享(同一 owner generation)。
4
4
  */
5
- import { defineEndpointRuntimeStateToken } from '@zhin.js/adapter';
5
+ import { defineEndpointRuntimeStateToken } from 'zhin.js/adapter';
6
6
  export const discordRuntimeStateToken = defineEndpointRuntimeStateToken('discord');
package/lib/endpoint.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type { EndpointControl, EndpointInstance, EndpointManagement, EndpointSendRequest } from '@zhin.js/adapter';
1
+ import type { EndpointControl, EndpointInstance, EndpointManagement, 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 CreateDiscordClient, type DiscordClientTransport } from './gateway.js';
7
7
  import { type DiscordButtonInbound, type DiscordInboundMessage, type ResolvedDiscordGatewayConfig, type ResolvedDiscordInteractionsConfig } from './protocol.js';
8
8
  export type { CreateDiscordClient, DiscordClientTransport, } from './gateway.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-discord",
3
- "version": "7.0.10",
3
+ "version": "7.0.11",
4
4
  "description": "Zhin.js Discord adapter for Plugin Runtime (Gateway WebSocket)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -33,22 +33,19 @@
33
33
  },
34
34
  "dependencies": {
35
35
  "discord.js": "^14.27.0",
36
- "@zhin.js/adapter": "1.1.9",
37
- "@zhin.js/command": "1.0.13",
38
- "@zhin.js/core": "1.5.9",
36
+ "@zhin.js/adapter": "1.1.10",
37
+ "@zhin.js/core": "1.5.10",
39
38
  "@zhin.js/host-http": "1.0.10",
40
39
  "@zhin.js/im-contract": "1.0.3",
41
40
  "@zhin.js/logger": "1.0.76",
42
- "@zhin.js/permission": "1.0.2",
43
- "@zhin.js/plugin-runtime": "1.1.6"
41
+ "@zhin.js/permission": "1.0.2"
44
42
  },
45
43
  "peerDependencies": {
46
44
  "zod": "^4.0.0",
47
- "@zhin.js/adapter": "1.1.9",
48
- "@zhin.js/agent": "1.1.10",
49
- "@zhin.js/core": "1.5.9",
50
- "@zhin.js/plugin-runtime": "1.1.6",
51
- "zhin.js": "6.0.9"
45
+ "@zhin.js/adapter": "1.1.10",
46
+ "@zhin.js/agent": "1.1.11",
47
+ "@zhin.js/core": "1.5.10",
48
+ "zhin.js": "6.0.10"
52
49
  },
53
50
  "peerDependenciesMeta": {
54
51
  "zhin.js": {
@@ -66,9 +63,9 @@
66
63
  "typescript": "^6.0.3",
67
64
  "vitest": "^4.1.10",
68
65
  "zod": "^4.4.3",
69
- "@zhin.js/agent": "1.1.10",
66
+ "@zhin.js/agent": "1.1.11",
70
67
  "@zhin.js/host-http": "1.0.10",
71
- "zhin.js": "6.0.9"
68
+ "zhin.js": "6.0.10"
72
69
  },
73
70
  "files": [
74
71
  "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 { checkDiscordPlatformPermit } from "./lib/platform-permit.js";
6
6
  import { discordRuntimeStateToken } from "./lib/discord-runtime-state.js";
@@ -4,8 +4,8 @@
4
4
  * 注:applicationId / publicKey 为顶层共享字段(slash commands / interactions 用),
5
5
  * endpoints[i] 仅需 name + token(见 schema.json),故 add 只录入 token。
6
6
  */
7
- import { createEndpointCommands } from '@zhin.js/adapter';
8
- import { defineCommand } from '@zhin.js/command';
7
+ import { createEndpointCommands } from 'zhin.js/adapter';
8
+ import { defineCommand } from 'zhin.js/command';
9
9
  import { discordRuntimeStateToken } from './discord-runtime-state.js';
10
10
 
11
11
  export const discordEndpointCommands = createEndpointCommands({
@@ -2,6 +2,6 @@
2
2
  * Discord 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `discord.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 discordRuntimeStateToken = defineEndpointRuntimeStateToken('discord');
package/src/endpoint.ts CHANGED
@@ -9,14 +9,14 @@ import type {
9
9
  EndpointInstance,
10
10
  EndpointManagement,
11
11
  EndpointSendRequest,
12
- } from '@zhin.js/adapter';
12
+ } from 'zhin.js/adapter';
13
13
  import type { MessageGateway } from '@zhin.js/core/runtime';
14
14
  import type { HttpHost, HttpRouteRegistration } from '@zhin.js/host-http';
15
15
  import {
16
16
  type MessageRef,
17
17
  } from '@zhin.js/im-contract';
18
18
  import { formatCompact, getAdapterLogger } from '@zhin.js/logger';
19
- import type { CapabilityId } from '@zhin.js/plugin-runtime';
19
+ import type { CapabilityId } from 'zhin.js';
20
20
  import { registerDiscordAgentEndpoint } from './discord-agent-deps.js';
21
21
  import {
22
22
  connectDiscordGatewayClient,