@zhin.js/adapter-kook 1.1.18 → 1.1.19

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,44 @@
1
1
  # @zhin.js/adapter-kook
2
2
 
3
+ ## 1.1.19
4
+
5
+ ### Patch Changes
6
+
7
+ - 2c3610a: Move account lifecycle ownership into the generic Adapter base and let native Endpoints retain their SDK Client inheritance. Infer platform-specific operation Sessions from a single adapter registry while preserving command parameter, option, configuration and factory inference.
8
+
9
+ Bind message replies, management ports, login challenges and Agent cancellation to the captured account incarnation. Persist runtime account intent with encrypted, revision-checked Host storage; keep account management independent of Root process restarts. Require explicit operator confirmation before importing existing accounts, and give replacement accounts a new identity without inheriting previous Sessions.
10
+
11
+ Expose account save, start, stop, update and replacement through the existing adapter Console, with exact account ownership, truthful pending/unknown outcomes and no startup configuration or environment-file rewrites.
12
+
13
+ Complete the target migration across every adapter, the public authoring API, generators, examples and Console. This intentionally removes the old create factory, inheritable Endpoint/ClientEndpoint classes, Client descriptors and file-rewrite account management; plugin authors must use createAdapter, native Client inheritance and the single AdapterRegistry. Satori and OneBot12 require explicit platform/userId selection, and WeCom requires a separate agentId.
14
+
15
+ Verify opaque credential changes before the same configuration snapshot is committed. Drain admitted native callbacks across close/rollback, cancel target work on stop, and keep raw transport parsing, platform ACK timing and SDK native methods under their existing owners. Account metadata conceals credentials carried in URLs.
16
+
17
+ - a9f4e48: PATCH COMPATIBILITY CUTOVER: this batch intentionally changes plugin APIs. The maintainer explicitly chose patch releases with declared version boundaries. Upgrade the complete tested dependency set; patch numbering does not promise compatibility with the removed interfaces.
18
+
19
+ The first planned floors are zhin.js 1.1.19, Core 1.1.54, Adapter 1.1.26, FeatureKit 1.1.10, Plugin Runtime 1.1.18, Runtime/Isolate 1.1.16 and Agent 1.1.45. Keep old-interface plugins with the earlier locked stack until they are migrated. Adapter's independent Feature API changes from 1.0.0 to 2.0.0; official consumers declare ^2.0.0. Existing Feature API admission rejects explicitly incompatible ranges; omitted API metadata keeps its existing behavior and does not certify compatibility. Runtime engine and patch-only release gates remain unchanged.
20
+
21
+ Use the native-Client Adapter target contract, canonical FeatureKit AdapterRegistry augmentation and named Endpoint control/management requests. Route message controls from canonical message/conversation refs; retain exact source authority and propagate caller/account/explicit-Root-stop cancellation. Replace removed Agent activity feedback exports with source-bound feedback. HMR pause/resume belongs to concrete plugin instances; plugins choose accepted-work policy without changing Controller commit/rollback authority. Cooperative worker/process control cancellation does not kill an isolate or reopen retired business admission.
22
+
23
+ Provide authenticated historical-data preview, exact selected binding, transactional application, authoritative inspection and explicit resumption, including active games. Preserve before-images and journals; never replay an unconfirmed effect, infer an account from an alias, or reuse historical permission grants. Owner V2 approvals remain inactive legacy data, while new writes use V3. Rollback requires matching software, lockfile and verified data; installing old code alone cannot read a new V3 approval file. Conflicting after-images are never overwritten.
24
+
25
+ See docs/plans/adapter-operation-version-boundaries.md and the Chinese/English upgrade guide for the complete version inventory, custom-plugin changes, acceptance and recovery sequence. These code and metadata changes do not authorize merging, publication, deployment, login, production migration or removal of installed workspace patches.
26
+
27
+ - Updated dependencies [2c3610a]
28
+ - Updated dependencies [a9f4e48]
29
+ - Updated dependencies [f8505b0]
30
+ - Updated dependencies [2c3610a]
31
+ - @zhin.js/adapter@1.1.26
32
+ - @zhin.js/feature-kit@1.1.10
33
+ - @zhin.js/core@1.1.54
34
+ - @zhin.js/host-http@1.1.12
35
+ - @zhin.js/client@1.1.22
36
+ - @zhin.js/page@1.1.11
37
+ - @zhin.js/agent-feature@1.1.11
38
+ - @zhin.js/skill@1.1.11
39
+ - @zhin.js/tool@1.1.13
40
+ - @zhin.js/permission@1.1.10
41
+
3
42
  ## 1.1.18
4
43
 
5
44
  ### Patch Changes
package/README.md CHANGED
@@ -20,13 +20,14 @@ pnpm add @zhin.js/adapter-kook
20
20
  ## Plugin Runtime
21
21
 
22
22
  - `@zhin.js/adapter` — 约定式 `adapters/kook/index.ts`(`defineAdapter`)
23
- - `@zhin.js/core` — `Endpoint.emit(...)` 入站、`outboundMessageToken` 出站
23
+ - `@zhin.js/core` — `endpoint[endpointSpec].events` 入站、`outboundMessageToken` 出站
24
24
  - `@zhin.js/host-http` — Webhook 模式 POST 路由(WebSocket 不需要)
25
25
  - `zhin.js` — `plugin.ts`(`definePlugin`)
26
26
  - 配置经插件 `schema.json` 落到顶层 `<instanceKey>`
27
27
  - **WebSocket 路径无需** `@zhin.js/host-http` / `@zhin.js/host-router`
28
28
 
29
- 入站:`gateway.receive({ conversation, message, content, sender, metadata })`(ConversationRef:`channel` 频道消息带 guild `parent`,`private` 私聊)
29
+ 入站:`endpoint[endpointSpec].events.emit('message.receive', { conversation, message, content, sender, metadata })`(ConversationRef:`channel` 频道消息带 guild `parent`,`private` 私聊)
30
+
30
31
  出站:`send({ conversation, payload })` → `sendChannelMsg` / `sendPrivateMsg`
31
32
 
32
33
  ## 前置条件
@@ -83,7 +84,7 @@ kook:
83
84
  # encrypt_key: ${KOOK_ENCRYPT_KEY} # 启用消息加密时必填
84
85
  ```
85
86
 
86
- Host 需注入 `httpHostToken`。Challenge(`type: 255`)会校验 `verify_token` 并回显 `challenge`;普通事件经 `gateway.receive` 入站,出站仍走 KOOK HTTP API。
87
+ Host 需注入 `httpHostToken`。Challenge(`type: 255`)会校验 `verify_token` 并回显 `challenge`;普通事件经 `endpoint[endpointSpec].events.emit` 入站,出站仍走 KOOK HTTP API。
87
88
 
88
89
  ## AI 工具(Skill)
89
90
 
@@ -110,11 +111,17 @@ canonical `share` 映射为含标题、描述/正文与“打开链接”按钮
110
111
  启动后打开 Console 的「KOOK」页(地址 `/kook`),可以:
111
112
 
112
113
  - 查看运行中的连接、点「测试连接」做连通性诊断;
113
- - 增删 `plugins.kook.endpoints`(凭据写入 `.env`,配置里只保留 `${ENV}` 引用);
114
+ - 在账号库保存、修改、启动、停止、替换或删除该 Adapter 的账号;新增仅保存,不创建 SDK Client,需手动启动;
114
115
  - 如果适配器要求登录,页面会显示 LoginAssist 的扫码 / 滑块 / 设备确认待办;
115
116
 
116
117
  读取需要 `kook:read`,写操作需要 `kook:write`;管理员 full token 不受限。页面里的「添加 endpoint」等价于原来的 `kook endpoint add`。
117
118
 
119
+ 首次修改启动配置里的既有账号前,管理员必须核对清单并确认一次迁移。原 canonical 身份与历史保留,完整账号配置加密进入 Host 数据库;此后账号管理只写数据库,不修改启动文件或 `.env`,不重启进程。没有持久化账号端口的环境可使用静态配置连接,动态写操作明确不可用。
120
+
121
+ 启停意图在进程重启后恢复。停止或删除会取消并关闭目标账号的在途操作,其他账号继续运行;删除保留历史。已启动账号的连接配置更新先关闭旧 incarnation,再仅重连该账号;平台身份变化按替换处理,分配新内部身份、保留旧历史,新账号不继承旧 Session、个人设置或启动意图。提交结果未知时先刷新核实,不自动重复 CAS 或平台操作。
122
+
123
+ KOOK 的 token 更新通过 SDK 只读 GET `/v3/user/me` 核验真实用户 ID;核验只创建不连网关的 API Client,不做网关连接或缓存预载。verify_token / encrypt_key 无法据此证明身份,变更须使用显式账号替换。
124
+
118
125
  ## 故障排查
119
126
 
120
127
  | 现象 | 排查 |
@@ -4,10 +4,8 @@
4
4
  * Implementation lives under `src/` (endpoint / webhook / ws / protocol).
5
5
  */
6
6
  import { defineAdapter } from 'zhin.js/adapter';
7
- import { httpHostToken } from '@zhin.js/host-http';
8
- import { KookWebhookEndpoint, KookWebsocketEndpoint, } from "../../lib/endpoint.js";
9
- import { resolveKookConfig, } from "../../lib/protocol.js";
10
- import { kookRuntimeStateToken } from "../../lib/kook-runtime-state.js";
7
+ import { KookAdapter } from "../../lib/adapter.js";
8
+ import {} from "../../lib/protocol.js";
11
9
  export { KookWebhookEndpoint, KookWebsocketEndpoint, } from "../../lib/endpoint.js";
12
10
  export default defineAdapter({
13
11
  capabilities: ['inbound', 'outbound'],
@@ -19,23 +17,5 @@ export default defineAdapter({
19
17
  interactive: 'native',
20
18
  markdown: 'native',
21
19
  },
22
- create(context) {
23
- const config = resolveKookConfig(context.config);
24
- // 注册到插件运行时状态(kook endpoint list 的"运行中"数据源)
25
- context.use(kookRuntimeStateToken).endpoints.set(config.id, {
26
- id: config.id,
27
- mode: config.connection,
28
- });
29
- if (config.connection === 'webhook') {
30
- return new KookWebhookEndpoint({
31
- id: context.id,
32
- http: context.use(httpHostToken),
33
- config,
34
- });
35
- }
36
- return new KookWebsocketEndpoint({
37
- id: context.id,
38
- config,
39
- });
40
- },
20
+ createAdapter: context => new KookAdapter(context),
41
21
  });
@@ -3,16 +3,10 @@
3
3
  * Implementation lives under `src/` (endpoint / webhook / ws / protocol).
4
4
  */
5
5
  import { defineAdapter } from 'zhin.js/adapter';
6
- import { httpHostToken } from '@zhin.js/host-http';
6
+ import { KookAdapter } from '../../src/adapter.js';
7
7
  import {
8
- KookWebhookEndpoint,
9
- KookWebsocketEndpoint,
10
- } from '../../src/endpoint.js';
11
- import {
12
- resolveKookConfig,
13
8
  type KookEndpointConfig,
14
9
  } from '../../src/protocol.js';
15
- import { kookRuntimeStateToken } from '../../src/kook-runtime-state.js';
16
10
 
17
11
  export {
18
12
  KookWebhookEndpoint,
@@ -22,7 +16,7 @@ export type {
22
16
  KookEndpointOptions,
23
17
  KookWebhookEndpointOptions,
24
18
  } from '../../src/endpoint.js';
25
- export type { CreateKookClient, KookClientTransport } from '../../src/ws.js';
19
+ export type { KookClientTransport } from '../../src/ws.js';
26
20
 
27
21
  export default defineAdapter<KookEndpointConfig>({
28
22
  capabilities: ['inbound', 'outbound'],
@@ -34,23 +28,5 @@ export default defineAdapter<KookEndpointConfig>({
34
28
  interactive: 'native',
35
29
  markdown: 'native',
36
30
  },
37
- create(context) {
38
- const config = resolveKookConfig(context.config);
39
- // 注册到插件运行时状态(kook endpoint list 的"运行中"数据源)
40
- context.use(kookRuntimeStateToken).endpoints.set(config.id, {
41
- id: config.id,
42
- mode: config.connection,
43
- });
44
- if (config.connection === 'webhook') {
45
- return new KookWebhookEndpoint({
46
- id: context.id,
47
- http: context.use(httpHostToken),
48
- config,
49
- });
50
- }
51
- return new KookWebsocketEndpoint({
52
- id: context.id,
53
- config,
54
- });
55
- },
31
+ createAdapter: context => new KookAdapter(context),
56
32
  });
@@ -5,7 +5,6 @@
5
5
  */
6
6
  import { createEndpointCommands } from 'zhin.js/adapter';
7
7
  import { defineCommand } from 'zhin.js/command';
8
- import { kookRuntimeStateToken } from "../../../lib/kook-runtime-state.js";
9
8
  export const kookEndpointCommands = createEndpointCommands({
10
9
  adapterKey: 'kook',
11
10
  adapterDisplayName: 'KOOK',
@@ -14,6 +13,5 @@ export const kookEndpointCommands = createEndpointCommands({
14
13
  { key: 'encrypt_key', env: true, description: 'webhook 加密密钥(connection: webhook)', descriptionI18n: { en: "Webhook encryption secret (connection: webhook)" } },
15
14
  { key: 'verify_token', env: true, description: 'webhook 验证 token(connection: webhook)', descriptionI18n: { en: "Webhook verification token (connection: webhook)" } },
16
15
  ],
17
- running: (use) => use(kookRuntimeStateToken).endpoints.values(),
18
16
  describeEntry: (entry) => `token: ${String(entry.token)}`,
19
17
  }, defineCommand);
@@ -4,7 +4,6 @@
4
4
  */
5
5
  import { createEndpointCommands } from 'zhin.js/adapter';
6
6
  import { defineCommand } from 'zhin.js/command';
7
- import { kookRuntimeStateToken } from '../../../src/kook-runtime-state.js';
8
7
 
9
8
  export const kookEndpointCommands = createEndpointCommands({
10
9
  adapterKey: 'kook',
@@ -14,6 +13,5 @@ export const kookEndpointCommands = createEndpointCommands({
14
13
  { key: 'encrypt_key', env: true, description: 'webhook 加密密钥(connection: webhook)', descriptionI18n: { en: "Webhook encryption secret (connection: webhook)" } },
15
14
  { key: 'verify_token', env: true, description: 'webhook 验证 token(connection: webhook)', descriptionI18n: { en: "Webhook verification token (connection: webhook)" } },
16
15
  ],
17
- running: (use) => use(kookRuntimeStateToken).endpoints.values(),
18
16
  describeEntry: (entry) => `token: ${String(entry.token)}`,
19
17
  }, defineCommand);
@@ -0,0 +1,14 @@
1
+ import { Adapter, type AdapterContext, type EndpointCreationContext } from 'zhin.js/adapter';
2
+ import { KookWebhookEndpoint, KookWebsocketEndpoint } from './endpoint.js';
3
+ import { type KookEndpointConfig } from './protocol.js';
4
+ import type { KookClientEventMap } from './client.js';
5
+ export declare class KookAdapter extends Adapter<KookWebhookEndpoint | KookWebsocketEndpoint, KookEndpointConfig, KookClientEventMap> {
6
+ private readonly context;
7
+ constructor(context: AdapterContext<KookEndpointConfig>);
8
+ get configurationIdentityFields(): readonly string[];
9
+ get configurationIdentityProbeFields(): readonly string[];
10
+ get configurationUpdateFields(): readonly string[];
11
+ protected validateConfiguration(input: KookEndpointConfig): void;
12
+ protected identifyConfiguration(input: KookEndpointConfig, signal: AbortSignal, changedFields: readonly string[]): Promise<string | undefined>;
13
+ protected createEndpoint(input: KookEndpointConfig, execution: EndpointCreationContext): KookWebhookEndpoint | KookWebsocketEndpoint;
14
+ }
package/lib/adapter.js ADDED
@@ -0,0 +1,44 @@
1
+ import { Adapter } from 'zhin.js/adapter';
2
+ import { httpHostToken } from '@zhin.js/host-http';
3
+ import { KookWebhookEndpoint, KookWebsocketEndpoint } from './endpoint.js';
4
+ import { RuntimeKookClient, kookWebhookClientOptions, kookWebsocketClientOptions } from './ws.js';
5
+ import { resolveKookConfig } from './protocol.js';
6
+ export class KookAdapter extends Adapter {
7
+ context;
8
+ constructor(context) {
9
+ super();
10
+ this.context = context;
11
+ }
12
+ get configurationIdentityFields() { return ['id']; }
13
+ get configurationIdentityProbeFields() { return ['token', 'verify_token', 'encrypt_key']; }
14
+ get configurationUpdateFields() {
15
+ return ['token', 'verify_token', 'encrypt_key', 'connection',
16
+ 'webhookPath', 'data_dir', 'timeout', 'max_retry', 'ignore', 'logLevel', 'apiProxy', 'apiProxy.port',
17
+ 'streamProxy', 'streamProxy.port', 'streamProxy.serverName'];
18
+ }
19
+ validateConfiguration(input) { resolveKookConfig(input); }
20
+ async identifyConfiguration(input, signal, changedFields) {
21
+ if (changedFields.some(field => field !== 'token'))
22
+ return undefined;
23
+ const config = resolveKookConfig(input);
24
+ const options = config.connection === 'websocket' ? kookWebsocketClientOptions(config) : kookWebhookClientOptions(config);
25
+ // Webhook receiver construction has no gateway socket or login; only GET /v3/user/me is issued.
26
+ const client = new RuntimeKookClient({ ...options, mode: 'webhook' }, undefined, config.apiProxy);
27
+ client.request.interceptors.request.use(request => { request.signal = signal; return request; });
28
+ try {
29
+ const me = await client.getSelfInfo();
30
+ if (typeof me?.id !== 'string' || !me.id.trim())
31
+ throw new Error('KOOK identity response is incomplete');
32
+ return JSON.stringify(['kook', me.id]);
33
+ }
34
+ finally {
35
+ await client.disconnect();
36
+ }
37
+ }
38
+ createEndpoint(input, execution) {
39
+ const config = resolveKookConfig(input);
40
+ return config.connection === 'webhook'
41
+ ? new KookWebhookEndpoint({ id: execution.canonicalId, config, http: this.context.use(httpHostToken) })
42
+ : new KookWebsocketEndpoint({ id: execution.canonicalId, config });
43
+ }
44
+ }
package/lib/client.d.ts CHANGED
@@ -1,11 +1,10 @@
1
- import type { KookClientTransport } from './ws.js';
2
- export type KookClientEventMap = Record<string, unknown>;
1
+ import type { EventMap } from 'kook-client';
2
+ import type { KookAdapter } from './adapter.js';
3
+ export type KookClientEventMap = {
4
+ readonly [K in keyof EventMap]: EventMap[K] extends (event: infer E, ...args: never[]) => unknown ? E : never;
5
+ };
3
6
  declare module '@zhin.js/feature-kit' {
4
- interface AdapterClientRegistry {
5
- readonly kook: {
6
- readonly client: KookClientTransport;
7
- readonly events: KookClientEventMap;
8
- };
7
+ interface AdapterRegistry {
8
+ readonly kook: KookAdapter;
9
9
  }
10
10
  }
11
- export declare const kookClient: import("@zhin.js/adapter").EndpointClientToken<KookClientTransport, KookClientEventMap>;
package/lib/client.js CHANGED
@@ -1,2 +1 @@
1
- import { defineEndpointClient } from 'zhin.js/adapter';
2
- export const kookClient = defineEndpointClient('kook');
1
+ export {};
@@ -5,6 +5,16 @@ export const kookConsoleSpec = {
5
5
  { key: 'token', required: true, env: true, description: 'KOOK bot token' },
6
6
  { key: 'encrypt_key', env: true, description: 'webhook 加密密钥(connection: webhook)', descriptionI18n: { en: 'Webhook encryption secret' } },
7
7
  { key: 'verify_token', env: true, description: 'webhook 验证 token(connection: webhook)', descriptionI18n: { en: 'Webhook verification token' } },
8
+ { key: 'connection', description: 'websocket or webhook' },
9
+ { key: 'webhookPath', description: 'Local webhook route' },
10
+ { key: 'data_dir', description: 'SDK data directory' },
11
+ { key: 'timeout', type: 'number', description: 'SDK request timeout' },
12
+ { key: 'max_retry', type: 'number', description: 'SDK configured retry count' },
13
+ { key: 'ignore', description: 'SDK inbound ignore setting: bot or self' },
14
+ { key: 'logLevel', description: 'SDK log level' },
15
+ { key: 'apiProxy.port', type: 'number', description: 'Configured API loopback proxy port' },
16
+ { key: 'streamProxy.port', type: 'number', description: 'Configured Gateway loopback proxy port' },
17
+ { key: 'streamProxy.serverName', description: 'Expected Gateway TLS hostname' },
8
18
  ],
9
19
  docsUrl: 'https://zhin.js.org/adapters/kook',
10
20
  readPermission: 'kook:read',
package/lib/console.d.ts CHANGED
@@ -1,8 +1,2 @@
1
- /**
2
- * KOOK Console RPC:运行状态 + endpoint 增删(原 `kook endpoint` 聊天命令)。
3
- *
4
- * 页面绑定 `pages/index`,读取 / 写入分别要求 `<adapter>:read` / `<adapter>:write`。
5
- */
6
- import { type AdapterConsoleResources } from 'zhin.js/adapter';
7
1
  import type { PluginConsoleRpc } from 'zhin.js';
8
- export declare function createKookConsoleRpc(resources: AdapterConsoleResources, getConfig: () => unknown): PluginConsoleRpc;
2
+ export declare function createKookConsoleRpc(getConfig: () => unknown): PluginConsoleRpc;
package/lib/console.js CHANGED
@@ -4,13 +4,10 @@
4
4
  * 页面绑定 `pages/index`,读取 / 写入分别要求 `<adapter>:read` / `<adapter>:write`。
5
5
  */
6
6
  import { createAdapterConsoleRpc } from 'zhin.js/adapter';
7
- import { kookRuntimeStateToken } from './kook-runtime-state.js';
8
7
  import { kookConsoleSpec } from './console-spec.js';
9
- export function createKookConsoleRpc(resources, getConfig) {
10
- const state = resources.use(kookRuntimeStateToken);
8
+ export function createKookConsoleRpc(getConfig) {
11
9
  return createAdapterConsoleRpc({
12
10
  ...kookConsoleSpec,
13
- running: () => state.endpoints.values(),
14
11
  getConfig,
15
- }, resources);
12
+ });
16
13
  }
package/lib/endpoint.d.ts CHANGED
@@ -1,26 +1,20 @@
1
1
  import { type ConversationRef } from '@zhin.js/im-contract';
2
- import { Endpoint, type EndpointControl, type EndpointManagement, type EndpointSendRequest, type EndpointTransportState } from 'zhin.js/adapter';
2
+ /**
3
+ * KookEndpoint — lifecycle, outbound, admit, OpenAPI helpers for agent tools.
4
+ */
5
+ import { endpointSpec, type Endpoint, type EndpointSpecification, type EndpointManagement } from 'zhin.js/adapter';
3
6
  import type { HttpHost } from '@zhin.js/host-http';
4
7
  import type { CapabilityId } from 'zhin.js';
5
8
  import { type KookInboundMessage, type KookWebhookEventData, type ResolvedKookWebhookConfig, type ResolvedKookWebsocketConfig } from './protocol.js';
6
- import { type CreateKookClient, type KookClientTransport } from './ws.js';
9
+ import { RuntimeKookClient, type KookClientTransport } from './ws.js';
7
10
  export interface KookEndpointOptions {
8
11
  readonly id: CapabilityId;
9
12
  readonly config: ResolvedKookWebsocketConfig;
10
- readonly createClient?: CreateKookClient;
11
13
  }
12
- export declare class KookWebsocketEndpoint extends Endpoint<KookClientTransport> {
14
+ export declare class KookWebsocketEndpoint extends RuntimeKookClient implements Endpoint {
13
15
  #private;
14
- readonly management: EndpointManagement;
15
- readonly control: EndpointControl;
16
+ readonly [endpointSpec]: EndpointSpecification;
16
17
  constructor(options: KookEndpointOptions);
17
- get client(): KookClientTransport;
18
- get transportState(): EndpointTransportState | undefined;
19
- start(): Promise<void>;
20
- open(): void;
21
- close(): void;
22
- stop(): Promise<void>;
23
- send(request: EndpointSendRequest): Promise<string>;
24
18
  /** Test / internal: admit a normalized message when open. */
25
19
  admit(msg: KookInboundMessage): void;
26
20
  recallMessage(messageId: string, conversation?: ConversationRef): Promise<void>;
@@ -30,23 +24,15 @@ export interface KookWebhookEndpointOptions {
30
24
  readonly id: CapabilityId;
31
25
  readonly http: HttpHost;
32
26
  readonly config: ResolvedKookWebhookConfig;
33
- readonly createClient?: CreateKookClient;
34
27
  }
35
- export declare class KookWebhookEndpoint extends Endpoint<KookClientTransport> {
28
+ export declare class KookWebhookEndpoint extends RuntimeKookClient implements Endpoint {
36
29
  #private;
37
- readonly management: EndpointManagement;
38
- readonly control: EndpointControl;
30
+ readonly [endpointSpec]: EndpointSpecification;
39
31
  constructor(options: KookWebhookEndpointOptions);
40
- get client(): KookClientTransport;
41
32
  /** Used by webhook handler. */
42
33
  get isOpen(): boolean;
43
- get config(): ResolvedKookWebhookConfig;
34
+ get endpointConfig(): ResolvedKookWebhookConfig;
44
35
  get selfId(): string | undefined;
45
- start(): Promise<void>;
46
- open(): void;
47
- close(): void;
48
- stop(): Promise<void>;
49
- send(request: EndpointSendRequest): Promise<string>;
50
36
  admitEvent(event: KookWebhookEventData): Promise<void>;
51
37
  /** Test / internal: admit a message when open. */
52
38
  admit(msg: KookInboundMessage): void;