@zhin.js/adapter-kook 7.0.10 → 7.0.12

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,25 @@
1
1
  # @zhin.js/adapter-kook
2
2
 
3
+ ## 7.0.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 3556601: Declare Stable Feature packages referenced by `zhin.features` as optional `peerDependencies` on official plugins/adapters (`@zhin.js/runtime` ≥1.0.12 requires features to be declared in deps/peers). Keeps authoring via `zhin.js` facades without installing Feature implementation packages into `dependencies`, and removes the need for consumer postinstall peer-patch scripts. `zhin new` scaffolds the same peer shape.
8
+ - @zhin.js/agent@1.1.12
9
+ - @zhin.js/core@1.5.10
10
+ - zhin.js@6.0.10
11
+
12
+ ## 7.0.11
13
+
14
+ ### Patch Changes
15
+
16
+ - eb84b77: fix: 更新文档,建立正确的依赖关系
17
+ - Updated dependencies [d3920e9]
18
+ - @zhin.js/core@1.5.10
19
+ - zhin.js@6.0.10
20
+ - @zhin.js/adapter@1.1.10
21
+ - @zhin.js/agent@1.1.11
22
+
3
23
  ## 7.0.10
4
24
 
5
25
  ### Patch Changes
package/README.md CHANGED
@@ -21,7 +21,7 @@ pnpm add @zhin.js/adapter-kook
21
21
  - `@zhin.js/adapter` — 约定式 `adapters/kook.ts`(`defineAdapter`)
22
22
  - `@zhin.js/core` — `messageGatewayToken` 入站/出站
23
23
  - `@zhin.js/host-http` — Webhook 模式 POST 路由(WebSocket 不需要)
24
- - `@zhin.js/plugin-runtime` — `plugin.ts`(`definePlugin`)
24
+ - `zhin.js` — `plugin.ts`(`definePlugin`)
25
25
  - 配置经插件 `schema.json` 落到 `plugins.<instanceKey>`
26
26
  - **WebSocket 路径无需** `@zhin.js/host-http` / `@zhin.js/host-router`
27
27
 
package/adapters/kook.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * Convention entry: discover `adapters/kook.ts` → defineAdapter.
4
4
  * Implementation lives under `src/` (endpoint / webhook / ws / protocol).
5
5
  */
6
- import { defineAdapter } from '@zhin.js/adapter';
6
+ import { defineAdapter } from 'zhin.js/adapter';
7
7
  import { messageGatewayToken } from '@zhin.js/core/runtime';
8
8
  import { httpHostToken } from '@zhin.js/host-http';
9
9
  import { KookWebhookEndpoint, KookWebsocketEndpoint, } from "../lib/endpoint.js";
package/adapters/kook.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Convention entry: discover `adapters/kook.ts` → defineAdapter.
3
3
  * Implementation lives under `src/` (endpoint / webhook / ws / protocol).
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 {
package/lib/endpoint.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { EndpointInstance, EndpointManagement, EndpointSendRequest } from '@zhin.js/adapter';
1
+ import type { 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
- import type { CapabilityId } from '@zhin.js/plugin-runtime';
4
+ import type { CapabilityId } from 'zhin.js';
5
5
  import { type KookInboundMessage, type ResolvedKookWebhookConfig, type ResolvedKookWebsocketConfig } from './protocol.js';
6
6
  import { type CreateKookClient, type KookClientTransport } from './ws.js';
7
7
  export interface KookEndpointOptions {
@@ -2,8 +2,8 @@
2
2
  * `kook.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 { kookRuntimeStateToken } from './kook-runtime-state.js';
8
8
  export const kookEndpointCommands = createEndpointCommands({
9
9
  adapterKey: 'kook',
@@ -1 +1 @@
1
- export declare const kookRuntimeStateToken: import("@zhin.js/plugin-runtime").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
1
+ export declare const kookRuntimeStateToken: import("zhin.js").Token<import("@zhin.js/adapter").EndpointRuntimeState>;
@@ -2,5 +2,5 @@
2
2
  * KOOK 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `kook.endpoint` 命令共享(同一 owner generation)。
4
4
  */
5
- import { defineEndpointRuntimeStateToken } from '@zhin.js/adapter';
5
+ import { defineEndpointRuntimeStateToken } from 'zhin.js/adapter';
6
6
  export const kookRuntimeStateToken = defineEndpointRuntimeStateToken('kook');
package/lib/protocol.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { createDecipheriv, timingSafeEqual } from 'node:crypto';
6
6
  import { inflateSync } from 'node:zlib';
7
- import { pickCredential } from '@zhin.js/adapter';
7
+ import { pickCredential } from 'zhin.js/adapter';
8
8
  import { isMediaRef } from '@zhin.js/core';
9
9
  import { formatCompact, getLogger } from '@zhin.js/logger';
10
10
  const logger = getLogger('kook');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-kook",
3
- "version": "7.0.10",
3
+ "version": "7.0.12",
4
4
  "description": "Zhin.js KOOK adapter for Plugin Runtime (WebSocket gateway or Webhook)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -34,28 +34,29 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "kook-client": "^1.0.4",
37
- "@zhin.js/adapter": "1.1.9",
38
- "@zhin.js/command": "1.0.13",
39
- "@zhin.js/core": "1.5.9",
37
+ "@zhin.js/adapter": "1.1.10",
38
+ "@zhin.js/core": "1.5.10",
40
39
  "@zhin.js/host-http": "1.0.10",
41
40
  "@zhin.js/im-contract": "1.0.3",
42
41
  "@zhin.js/logger": "1.0.76",
43
- "@zhin.js/permission": "1.0.2",
44
- "@zhin.js/plugin-runtime": "1.1.6"
42
+ "@zhin.js/permission": "1.0.2"
45
43
  },
46
44
  "peerDependencies": {
47
45
  "zod": "^4.0.0",
48
- "@zhin.js/adapter": "1.1.9",
49
- "@zhin.js/agent": "1.1.10",
50
- "@zhin.js/core": "1.5.9",
51
- "@zhin.js/plugin-runtime": "1.1.6",
52
- "zhin.js": "6.0.9"
46
+ "@zhin.js/adapter": "1.1.10",
47
+ "@zhin.js/agent": "1.1.12",
48
+ "@zhin.js/command": "1.0.14",
49
+ "@zhin.js/core": "1.5.10",
50
+ "zhin.js": "6.0.10"
53
51
  },
54
52
  "peerDependenciesMeta": {
55
- "zhin.js": {
53
+ "@zhin.js/agent": {
56
54
  "optional": true
57
55
  },
58
- "@zhin.js/agent": {
56
+ "@zhin.js/command": {
57
+ "optional": true
58
+ },
59
+ "zhin.js": {
59
60
  "optional": true
60
61
  },
61
62
  "zod": {
@@ -67,9 +68,9 @@
67
68
  "typescript": "^6.0.3",
68
69
  "vitest": "^4.1.10",
69
70
  "zod": "^4.4.3",
70
- "@zhin.js/agent": "1.1.10",
71
+ "@zhin.js/agent": "1.1.12",
71
72
  "@zhin.js/host-http": "1.0.10",
72
- "zhin.js": "6.0.9"
73
+ "zhin.js": "6.0.10"
73
74
  },
74
75
  "files": [
75
76
  "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 { checkKookPlatformPermit } from "./lib/platform-permit.js";
6
6
  import { kookRuntimeStateToken } from "./lib/kook-runtime-state.js";
package/src/endpoint.ts CHANGED
@@ -8,11 +8,11 @@ import type {
8
8
  EndpointInstance,
9
9
  EndpointManagement,
10
10
  EndpointSendRequest,
11
- } from '@zhin.js/adapter';
11
+ } from 'zhin.js/adapter';
12
12
  import type { MessageGateway } from '@zhin.js/core/runtime';
13
13
  import type { HttpHost, HttpRouteRegistration } from '@zhin.js/host-http';
14
14
  import { formatCompact, getAdapterLogger } from '@zhin.js/logger';
15
- import type { CapabilityId } from '@zhin.js/plugin-runtime';
15
+ import type { CapabilityId } from 'zhin.js';
16
16
  import { registerKookAgentEndpoint } from './kook-agent-deps.js';
17
17
  import {
18
18
  formatInboundContent,
@@ -2,8 +2,8 @@
2
2
  * `kook.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 { kookRuntimeStateToken } from './kook-runtime-state.js';
8
8
 
9
9
  export const kookEndpointCommands = createEndpointCommands({
@@ -2,6 +2,6 @@
2
2
  * KOOK 插件实例的运行时状态:adapter create() 注册的 endpoint 列表。
3
3
  * 由 plugin.ts setup() provide,adapter create 与 `kook.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 kookRuntimeStateToken = defineEndpointRuntimeStateToken('kook');
package/src/protocol.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  import { createDecipheriv, timingSafeEqual } from 'node:crypto';
7
7
  import { inflateSync } from 'node:zlib';
8
8
  import type { IncomingMessage } from 'node:http';
9
- import { pickCredential } from '@zhin.js/adapter';
9
+ import { pickCredential } from 'zhin.js/adapter';
10
10
  import { isMediaRef } from '@zhin.js/core';
11
11
  import type { ConversationRef } from '@zhin.js/im-contract';
12
12
  import { formatCompact, getLogger } from '@zhin.js/logger';