@zhin.js/adapter-onebot12 1.1.20 → 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,64 @@
1
1
  # @zhin.js/adapter-onebot12
2
2
 
3
+ ## 1.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - b249e5e: ADR 0044 C4:事件映射迁出 core。新增 `@zhin.js/adapter-onebot-events`,承载 OneBot v11 / NapCat / icqq 的原始通知与请求 → 标准事件映射(`receiveOneBotLikeSideEvent`、`mapNoticeParts`、`mapRequestParts`、`resolveSideEventDedupeKey` 及 OneBot 映射表,icqq 差异用覆盖表表达);KOOK、Slack 的映射迁入各自适配器;`@zhin.js/core` 只保留标准事件名、类型与 `buildNotice` / `buildRequest` / `buildSystem` / `senderFromId`,不再含任何平台名。core 不再导出上述映射函数与 `ONEBOT_/KOOK_/SLACK_NOTICE_PARTS_MAP`、`SideEventPlatform`、`OneBotLike*` 类型,适配器改从共享包导入。
8
+ - 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.
9
+ - 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.
10
+ - 4fe49b5: 支持配置按需生效:分离保存与有效版本,独立变更先应用,账号资料更新保留连接,模型按回合使用确定版本;Console 返回结构化应用结果。监听改为仅显式 --watch 启用,开发模板显式选择源码和配置监听。
11
+
12
+ 自变更消费配置应用回执,避免已处理配置被二次重载;持久化本次写入修订和应用结果,未知结果或修订冲突时停止自动续作并保留现场,恢复不会覆盖未经本次变更确认的配置。
13
+
14
+ - Updated dependencies [b249e5e]
15
+ - Updated dependencies [57661f6]
16
+ - Updated dependencies [cbd3f14]
17
+ - Updated dependencies [299863a]
18
+ - Updated dependencies [aaa93d7]
19
+ - Updated dependencies [bd524d1]
20
+ - Updated dependencies [126ae99]
21
+ - Updated dependencies [4fe49b5]
22
+ - Updated dependencies [cce07db]
23
+ - Updated dependencies [b652db3]
24
+ - Updated dependencies [0315ba0]
25
+ - @zhin.js/adapter-onebot-events@0.0.1
26
+ - @zhin.js/core@1.1.56
27
+ - @zhin.js/adapter@1.1.28
28
+ - @zhin.js/im-contract@1.1.11
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
+
35
+ ## 1.1.21
36
+
37
+ ### Patch Changes
38
+
39
+ - af8f803: Use the current Endpoint's platform profile for Agent account identity, with per-field configured fallbacks and scoped, identity-approved profile tools. Keep SOUL first-person and independent of account names. Profile ports preserve the source Client, cancellation, truthful update outcomes and private image authority.
40
+
41
+ Adapter Feature API 2.1 and Tool Feature API 1.1 describe the additive profile requirements; new Core, official adapters and generated plugins declare the corresponding floors. Existing compatible API-2.0/API-1.0 plugins remain accepted by the newer providers. npm releases remain patch.
42
+
43
+ Private IM assets now bind to the full canonical conversation and principal. Existing IM asset records that contain only the earlier lossy hash remain on disk until their original expiry, but cannot be safely rebound; recapture them. No automatic file deletion, platform profile mutation or workspace SOUL rewrite occurs during upgrade.
44
+
45
+ - Updated dependencies [b88e988]
46
+ - Updated dependencies [f78eb84]
47
+ - Updated dependencies [c15cef9]
48
+ - Updated dependencies [b0c02a2]
49
+ - Updated dependencies [af8f803]
50
+ - Updated dependencies [26fda97]
51
+ - Updated dependencies [976886c]
52
+ - Updated dependencies [032dc96]
53
+ - @zhin.js/adapter@1.1.27
54
+ - @zhin.js/client@1.1.23
55
+ - @zhin.js/im-contract@1.1.10
56
+ - @zhin.js/core@1.1.55
57
+ - @zhin.js/page@1.1.13
58
+ - @zhin.js/host-http@1.1.13
59
+ - @zhin.js/feature-kit@1.1.11
60
+ - @zhin.js/skill@1.1.12
61
+
3
62
  ## 1.1.20
4
63
 
5
64
  ### Patch Changes
@@ -10,12 +10,24 @@ export { OneBot12WsEndpoint } from "../../lib/ws-endpoint.js";
10
10
  export { OneBot12WssEndpoint } from "../../lib/wss-endpoint.js";
11
11
  export default defineAdapter({
12
12
  capabilities: ['inbound', 'outbound'],
13
- operations: ['recall'],
14
13
  // 媒体段经 upload_file 物化为 file_id(spec 正式投递);上传失败降级扩展字段透传。
15
14
  // 无卡片交互面,交互段降级纯文本。
16
- segments: {
17
- outboundMedia: ['url', 'path', 'base64', 'upload'],
18
- interactive: 'text',
15
+ profile: {
16
+ default: {
17
+ messaging: {
18
+ segments: {
19
+ outboundMedia: ['url', 'path', 'base64', 'upload'],
20
+ interactive: 'text',
21
+ },
22
+ quote: true,
23
+ recall: {},
24
+ },
25
+ actions: {
26
+ recall: { scopes: ['private', 'group'] },
27
+ quoteReply: { scopes: ['private', 'group'] },
28
+ },
29
+ delivery: { send: true, proactive: true, spool: true },
30
+ },
19
31
  },
20
32
  createAdapter: context => new Onebot12Adapter(context),
21
33
  });
@@ -17,12 +17,24 @@ export type { OneBot12WsSocket, OneBot12WsCreateOptions } from '../../src/ws-typ
17
17
 
18
18
  export default defineAdapter<OneBot12EndpointConfig>({
19
19
  capabilities: ['inbound', 'outbound'],
20
- operations: ['recall'],
21
20
  // 媒体段经 upload_file 物化为 file_id(spec 正式投递);上传失败降级扩展字段透传。
22
21
  // 无卡片交互面,交互段降级纯文本。
23
- segments: {
24
- outboundMedia: ['url', 'path', 'base64', 'upload'],
25
- interactive: 'text',
22
+ profile: {
23
+ default: {
24
+ messaging: {
25
+ segments: {
26
+ outboundMedia: ['url', 'path', 'base64', 'upload'],
27
+ interactive: 'text',
28
+ },
29
+ quote: true,
30
+ recall: {},
31
+ },
32
+ actions: {
33
+ recall: { scopes: ['private', 'group'] },
34
+ quoteReply: { scopes: ['private', 'group'] },
35
+ },
36
+ delivery: { send: true, proactive: true, spool: true },
37
+ },
26
38
  },
27
39
  createAdapter: context => new Onebot12Adapter(context),
28
40
  });
package/lib/protocol.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { EndpointProfileConfiguration } from 'zhin.js/adapter';
1
2
  /**
2
3
  * OneBot 12 protocol helpers (no legacy Adapter/Endpoint / segment-mapper).
3
4
  * Canonicalization is owned by gateway/core before endpoint.send.
@@ -5,7 +6,7 @@
5
6
  */
6
7
  import { type MediaRef, type ConversationRef } from '@zhin.js/im-contract';
7
8
  /** One endpoint config after AdapterIndex expands `plugins.<instanceKey>.endpoints`. */
8
- export interface OneBot12EndpointConfig {
9
+ export interface OneBot12EndpointConfig extends EndpointProfileConfiguration {
9
10
  readonly platform: string;
10
11
  readonly userId: string;
11
12
  readonly connection?: 'ws' | 'webhook' | 'wss';
@@ -0,0 +1,9 @@
1
+ import type { EndpointProfile, PendingRpcRequest } from 'zhin.js/adapter';
2
+ interface Onebot12SelfProfileOptions {
3
+ readonly call: (request: PendingRpcRequest) => Promise<unknown>;
4
+ readonly accountId: string;
5
+ readonly reportAccount: (id: string) => void;
6
+ }
7
+ /** The protocol caller already binds self={platform,user_id}; validate the returned account too. */
8
+ export declare function createOnebot12SelfProfile({ call, accountId, reportAccount }: Onebot12SelfProfileOptions): EndpointProfile;
9
+ export {};
@@ -0,0 +1,16 @@
1
+ /** The protocol caller already binds self={platform,user_id}; validate the returned account too. */
2
+ export function createOnebot12SelfProfile({ call, accountId, reportAccount }) {
3
+ return Object.freeze({
4
+ writableFields: Object.freeze([]),
5
+ async read({ signal }) {
6
+ const self = await call({ action: 'get_self_info', signal });
7
+ if (self?.user_id !== accountId)
8
+ throw new Error('OneBot12 returned another account profile');
9
+ const nickname = self.user_displayname || self.user_name;
10
+ if (typeof nickname !== 'string')
11
+ throw new Error('OneBot12 returned an incomplete self profile');
12
+ reportAccount(self.user_id);
13
+ return { nickname };
14
+ },
15
+ });
16
+ }
@@ -1,4 +1,4 @@
1
- import { receiveOneBotLikeSideEvent } from '@zhin.js/core';
1
+ import { receiveOneBotLikeSideEvent } from '@zhin.js/adapter-onebot-events';
2
2
  import { formatCompact } from '@zhin.js/logger';
3
3
  export function receiveOneBot12SideEvent(raw, context) {
4
4
  const { emit, endpointKey, caller, logger } = context;
package/lib/webhook.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { createOnebot12SelfProfile } from './self-profile.js';
1
2
  import { acceptHttpIngress } from 'imhelper';
2
3
  import { createEndpointSpecification, endpointSpec, createRecallEndpointControl, } from 'zhin.js/adapter';
3
4
  import { formatCompact, getLogger } from '@zhin.js/logger';
@@ -32,6 +33,7 @@ export class OneBot12WebhookEndpoint extends Onebot12Client {
32
33
  close: () => { this.#open = false; }, stop: () => this.#stop(),
33
34
  send: request => this.#send(request),
34
35
  management: this.#management, control: this.#control, content: this.#content,
36
+ profile: createOnebot12SelfProfile({ call: callApi, accountId: options.config.userId, reportAccount: id => this[endpointSpec].reportSelfUserId(id) }),
35
37
  });
36
38
  this.#releaseClientEvents = forwardOnebot12ClientEvents(this, (name, payload) => {
37
39
  void this[endpointSpec].events.run(() => {
@@ -1,3 +1,4 @@
1
+ import { createOnebot12SelfProfile } from './self-profile.js';
1
2
  /**
2
3
  * OneBot12 WS client endpoint — outbound connect to OneBot implementation.
3
4
  */
@@ -42,6 +43,7 @@ export class OneBot12WsEndpoint extends Onebot12Client {
42
43
  send: request => this.#send(request),
43
44
  get transportState() { return readTransportState(); },
44
45
  management: this.#management, control: this.#control, content: this.#content,
46
+ profile: createOnebot12SelfProfile({ call: callApi, accountId: options.config.userId, reportAccount: id => this[endpointSpec].reportSelfUserId(id) }),
45
47
  });
46
48
  this.#releaseClientEvents = forwardOnebot12ClientEvents(this, (name, payload) => {
47
49
  void this[endpointSpec].events.run(() => {
@@ -1,3 +1,4 @@
1
+ import { createOnebot12SelfProfile } from './self-profile.js';
1
2
  /**
2
3
  * OneBot12 reverse WSS endpoint — accepts inbound WebSocket from OneBot implementation.
3
4
  */
@@ -49,6 +50,7 @@ export class OneBot12WssEndpoint extends Onebot12Client {
49
50
  send: request => this.#send(request),
50
51
  get transportState() { return readTransportState(); },
51
52
  management: this.#management, control: this.#control, content: this.#content,
53
+ profile: createOnebot12SelfProfile({ call: callApi, accountId: options.config.userId, reportAccount: id => this[endpointSpec].reportSelfUserId(id) }),
52
54
  });
53
55
  this.#releaseClientEvents = forwardOnebot12ClientEvents(this, (name, payload) => {
54
56
  void this[endpointSpec].events.run(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-onebot12",
3
- "version": "1.1.20",
3
+ "version": "1.1.22",
4
4
  "description": "Zhin.js OneBot 12 adapter for Plugin Runtime (WebSocket client)",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -42,30 +42,31 @@
42
42
  "@imhelper/onebot-v12": "1.0.7",
43
43
  "imhelper": "1.0.7",
44
44
  "ws": "^8.21.1",
45
- "@zhin.js/adapter": "1.1.26",
46
- "@zhin.js/client": "1.1.22",
45
+ "@zhin.js/adapter-onebot-events": "0.0.1",
46
+ "@zhin.js/adapter": "1.1.28",
47
+ "@zhin.js/client": "1.1.24",
47
48
  "@zhin.js/console-contract": "1.1.3",
48
- "@zhin.js/core": "1.1.54",
49
- "@zhin.js/feature-kit": "1.1.10",
50
- "@zhin.js/host-http": "1.1.12",
51
- "@zhin.js/im-contract": "1.1.9",
49
+ "@zhin.js/core": "1.1.56",
50
+ "@zhin.js/feature-kit": "1.1.12",
51
+ "@zhin.js/host-http": "1.1.14",
52
+ "@zhin.js/im-contract": "1.1.11",
52
53
  "@zhin.js/logger": "1.1.2",
53
- "@zhin.js/page": "1.1.12",
54
- "@zhin.js/skill": "1.1.11"
54
+ "@zhin.js/page": "1.1.14",
55
+ "@zhin.js/skill": "1.1.13"
55
56
  },
56
57
  "devDependencies": {
57
58
  "@types/node": "^26.1.2",
58
59
  "@types/ws": "^8.18.1",
59
60
  "typescript": "^6.0.3",
60
61
  "vitest": "^4.1.10",
61
- "@zhin.js/host-http": "1.1.12",
62
- "zhin.js": "1.1.19"
62
+ "@zhin.js/host-http": "1.1.14",
63
+ "zhin.js": "1.1.21"
63
64
  },
64
65
  "peerDependencies": {
65
- "@zhin.js/adapter": "^1.1.26",
66
- "@zhin.js/command": "^1.1.12",
67
- "@zhin.js/core": "^1.1.54",
68
- "zhin.js": "^1.1.19"
66
+ "@zhin.js/adapter": "^1.1.28",
67
+ "@zhin.js/command": "^1.1.14",
68
+ "@zhin.js/core": "^1.1.56",
69
+ "zhin.js": "^1.1.21"
69
70
  },
70
71
  "peerDependenciesMeta": {
71
72
  "@zhin.js/command": {
@@ -96,7 +97,7 @@
96
97
  "features": [
97
98
  {
98
99
  "package": "@zhin.js/adapter",
99
- "api": "^2.0.0"
100
+ "api": "^2.1.0"
100
101
  },
101
102
  {
102
103
  "package": "@zhin.js/command",
package/plugin.js CHANGED
@@ -3,6 +3,7 @@ import { definePlugin, pluginConsoleRpcToken } from 'zhin.js';
3
3
  import { createOnebot12ConsoleRpc } from "./lib/console.js";
4
4
  export default definePlugin({
5
5
  name: 'onebot12',
6
+ configUpdate: { featurePaths: [['nickname'], ['profile'], ['endpoints']] },
6
7
  metadata: {
7
8
  displayName: 'OneBot 12 Adapter',
8
9
  },
package/schema.json CHANGED
@@ -131,6 +131,27 @@
131
131
  "type": "string",
132
132
  "minLength": 1,
133
133
  "description": "Selected OneBot12 bot user ID"
134
+ },
135
+ "nickname": {
136
+ "type": [
137
+ "string",
138
+ "null"
139
+ ],
140
+ "description": "账号昵称兜底",
141
+ "x-i18n": {
142
+ "en": {
143
+ "description": "Fallback account nickname"
144
+ }
145
+ }
146
+ },
147
+ "profile": {
148
+ "$ref": "#/$defs/selfProfileFallback",
149
+ "description": "账号资料兜底",
150
+ "x-i18n": {
151
+ "en": {
152
+ "description": "Fallback account profile"
153
+ }
154
+ }
134
155
  }
135
156
  },
136
157
  "required": [
@@ -154,9 +175,93 @@
154
175
  "description": "Command prefix. The default empty string allows unprefixed commands; '/' requires a leading slash. Each endpoints[i] can override it."
155
176
  }
156
177
  }
178
+ },
179
+ "nickname": {
180
+ "type": [
181
+ "string",
182
+ "null"
183
+ ],
184
+ "description": "账号昵称兜底",
185
+ "x-i18n": {
186
+ "en": {
187
+ "description": "Fallback account nickname"
188
+ }
189
+ }
190
+ },
191
+ "profile": {
192
+ "$ref": "#/$defs/selfProfileFallback",
193
+ "description": "账号资料兜底",
194
+ "x-i18n": {
195
+ "en": {
196
+ "description": "Fallback account profile"
197
+ }
198
+ }
157
199
  }
158
200
  },
159
201
  "required": [
160
202
  "endpoints"
161
- ]
203
+ ],
204
+ "$defs": {
205
+ "selfProfileFallback": {
206
+ "type": "object",
207
+ "additionalProperties": false,
208
+ "properties": {
209
+ "gender": {
210
+ "type": [
211
+ "string",
212
+ "null"
213
+ ],
214
+ "enum": [
215
+ "male",
216
+ "female",
217
+ "other",
218
+ "unknown",
219
+ null
220
+ ]
221
+ },
222
+ "age": {
223
+ "type": [
224
+ "integer",
225
+ "null"
226
+ ],
227
+ "minimum": 0
228
+ },
229
+ "birthday": {
230
+ "type": [
231
+ "string",
232
+ "null"
233
+ ],
234
+ "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
235
+ },
236
+ "signature": {
237
+ "type": [
238
+ "string",
239
+ "null"
240
+ ]
241
+ },
242
+ "avatar": {
243
+ "type": [
244
+ "string",
245
+ "null"
246
+ ],
247
+ "pattern": "^(https?://[^\\s/?#]+(?:[/?#].*)?|)$"
248
+ },
249
+ "interests": {
250
+ "type": [
251
+ "array",
252
+ "null"
253
+ ],
254
+ "items": {
255
+ "type": "string"
256
+ }
257
+ },
258
+ "bio": {
259
+ "type": [
260
+ "string",
261
+ "null"
262
+ ]
263
+ }
264
+ }
265
+ }
266
+ }
162
267
  }
package/src/protocol.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { EndpointProfileConfiguration } from 'zhin.js/adapter';
1
2
  import { readOnebot12Response } from './response.js';
2
3
  /**
3
4
  * OneBot 12 protocol helpers (no legacy Adapter/Endpoint / segment-mapper).
@@ -10,7 +11,7 @@ import { formatCompact, getLogger } from '@zhin.js/logger';
10
11
  const logger = getLogger('onebot12');
11
12
 
12
13
  /** One endpoint config after AdapterIndex expands `plugins.<instanceKey>.endpoints`. */
13
- export interface OneBot12EndpointConfig {
14
+ export interface OneBot12EndpointConfig extends EndpointProfileConfiguration {
14
15
  readonly platform: string;
15
16
  readonly userId: string;
16
17
  readonly connection?: 'ws' | 'webhook' | 'wss';
@@ -0,0 +1,22 @@
1
+ import type { EndpointProfile, PendingRpcRequest } from 'zhin.js/adapter';
2
+
3
+ interface Onebot12SelfProfileOptions {
4
+ readonly call: (request: PendingRpcRequest) => Promise<unknown>;
5
+ readonly accountId: string;
6
+ readonly reportAccount: (id: string) => void;
7
+ }
8
+
9
+ /** The protocol caller already binds self={platform,user_id}; validate the returned account too. */
10
+ export function createOnebot12SelfProfile({ call, accountId, reportAccount }: Onebot12SelfProfileOptions): EndpointProfile {
11
+ return Object.freeze<EndpointProfile>({
12
+ writableFields: Object.freeze([]),
13
+ async read({ signal }) {
14
+ const self = await call({ action: 'get_self_info', signal }) as { user_id?: string; user_name?: string; user_displayname?: string } | undefined;
15
+ if (self?.user_id !== accountId) throw new Error('OneBot12 returned another account profile');
16
+ const nickname = self.user_displayname || self.user_name;
17
+ if (typeof nickname !== 'string') throw new Error('OneBot12 returned an incomplete self profile');
18
+ reportAccount(self.user_id);
19
+ return { nickname };
20
+ },
21
+ });
22
+ }
@@ -1,4 +1,4 @@
1
- import { receiveOneBotLikeSideEvent } from '@zhin.js/core';
1
+ import { receiveOneBotLikeSideEvent } from '@zhin.js/adapter-onebot-events';
2
2
  import type { EndpointEventEmitter } from 'zhin.js/adapter';
3
3
  import { formatCompact, type getAdapterLogger } from '@zhin.js/logger';
4
4
  import type { OneBot12Event } from './protocol.js';
package/src/webhook.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { createOnebot12SelfProfile } from './self-profile.js';
1
2
  import { acceptHttpIngress } from 'imhelper';
2
3
  /**
3
4
  * OneBot12 HTTP webhook endpoint — POST inbound + api_url outbound.
@@ -71,6 +72,7 @@ export class OneBot12WebhookEndpoint extends Onebot12Client implements Endpoint
71
72
  close: () => { this.#open = false; }, stop: () => this.#stop(),
72
73
  send: request => this.#send(request),
73
74
  management: this.#management, control: this.#control, content: this.#content,
75
+ profile: createOnebot12SelfProfile({ call: callApi, accountId: options.config.userId, reportAccount: id => this[endpointSpec].reportSelfUserId(id) }),
74
76
  });
75
77
  this.#releaseClientEvents = forwardOnebot12ClientEvents(this, (name, payload) => {
76
78
  void this[endpointSpec].events.run(() => {
@@ -1,3 +1,4 @@
1
+ import { createOnebot12SelfProfile } from './self-profile.js';
1
2
  /**
2
3
  * OneBot12 WS client endpoint — outbound connect to OneBot implementation.
3
4
  */
@@ -85,6 +86,7 @@ export class OneBot12WsEndpoint extends Onebot12Client implements Endpoint {
85
86
  send: request => this.#send(request),
86
87
  get transportState() { return readTransportState(); },
87
88
  management: this.#management, control: this.#control, content: this.#content,
89
+ profile: createOnebot12SelfProfile({ call: callApi, accountId: options.config.userId, reportAccount: id => this[endpointSpec].reportSelfUserId(id) }),
88
90
  });
89
91
  this.#releaseClientEvents = forwardOnebot12ClientEvents(this, (name, payload) => {
90
92
  void this[endpointSpec].events.run(() => {
@@ -1,3 +1,4 @@
1
+ import { createOnebot12SelfProfile } from './self-profile.js';
1
2
  /**
2
3
  * OneBot12 reverse WSS endpoint — accepts inbound WebSocket from OneBot implementation.
3
4
  */
@@ -85,6 +86,7 @@ export class OneBot12WssEndpoint extends Onebot12Client implements Endpoint {
85
86
  send: request => this.#send(request),
86
87
  get transportState() { return readTransportState(); },
87
88
  management: this.#management, control: this.#control, content: this.#content,
89
+ profile: createOnebot12SelfProfile({ call: callApi, accountId: options.config.userId, reportAccount: id => this[endpointSpec].reportSelfUserId(id) }),
88
90
  });
89
91
  this.#releaseClientEvents = forwardOnebot12ClientEvents(this, (name, payload) => {
90
92
  void this[endpointSpec].events.run(() => {