@zhin.js/adapter-weixin-ilink 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,56 @@
1
1
  # @zhin.js/adapter-weixin-ilink
2
2
 
3
+ ## 1.1.22
4
+
5
+ ### Patch Changes
6
+
7
+ - 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.
8
+ - 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.
9
+ - 4fe49b5: 支持配置按需生效:分离保存与有效版本,独立变更先应用,账号资料更新保留连接,模型按回合使用确定版本;Console 返回结构化应用结果。监听改为仅显式 --watch 启用,开发模板显式选择源码和配置监听。
10
+
11
+ 自变更消费配置应用回执,避免已处理配置被二次重载;持久化本次写入修订和应用结果,未知结果或修订冲突时停止自动续作并保留现场,恢复不会覆盖未经本次变更确认的配置。
12
+
13
+ - Updated dependencies [b249e5e]
14
+ - Updated dependencies [57661f6]
15
+ - Updated dependencies [cbd3f14]
16
+ - Updated dependencies [299863a]
17
+ - Updated dependencies [aaa93d7]
18
+ - Updated dependencies [4fe49b5]
19
+ - Updated dependencies [cce07db]
20
+ - Updated dependencies [b652db3]
21
+ - Updated dependencies [0315ba0]
22
+ - @zhin.js/core@1.1.56
23
+ - @zhin.js/adapter@1.1.28
24
+ - @zhin.js/im-contract@1.1.11
25
+ - @zhin.js/feature-kit@1.1.12
26
+ - @zhin.js/client@1.1.24
27
+ - @zhin.js/page@1.1.14
28
+
29
+ ## 1.1.21
30
+
31
+ ### Patch Changes
32
+
33
+ - 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.
34
+
35
+ 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.
36
+
37
+ 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.
38
+
39
+ - Updated dependencies [b88e988]
40
+ - Updated dependencies [f78eb84]
41
+ - Updated dependencies [c15cef9]
42
+ - Updated dependencies [b0c02a2]
43
+ - Updated dependencies [af8f803]
44
+ - Updated dependencies [26fda97]
45
+ - Updated dependencies [976886c]
46
+ - Updated dependencies [032dc96]
47
+ - @zhin.js/adapter@1.1.27
48
+ - @zhin.js/client@1.1.23
49
+ - @zhin.js/im-contract@1.1.10
50
+ - @zhin.js/core@1.1.55
51
+ - @zhin.js/page@1.1.13
52
+ - @zhin.js/feature-kit@1.1.11
53
+
3
54
  ## 1.1.20
4
55
 
5
56
  ### Patch Changes
@@ -8,12 +8,19 @@ import {} from "../../lib/protocol.js";
8
8
  export { WeixinIlinkEndpoint } from "../../lib/endpoint.js";
9
9
  export default defineAdapter({
10
10
  capabilities: ['inbound', 'outbound'],
11
- operations: ['typing'],
12
11
  // 所有媒体(url 下载 / base64 落盘 / 本地 path)统一物化后走 CDN 上传(sendWeixinMediaFile),
13
12
  // 无直发面;微信无卡片交互面,交互段降级纯文本。
14
- segments: {
15
- outboundMedia: ['upload'],
16
- interactive: 'text',
13
+ profile: {
14
+ default: {
15
+ messaging: {
16
+ segments: {
17
+ outboundMedia: ['upload'],
18
+ interactive: 'text',
19
+ },
20
+ },
21
+ feedback: { mode: 'typing' },
22
+ delivery: { send: true, spool: true },
23
+ },
17
24
  },
18
25
  createAdapter: () => new WeixinIlinkAdapter(),
19
26
  });
@@ -18,12 +18,19 @@ export type {
18
18
 
19
19
  export default defineAdapter<WeixinIlinkEndpointConfig>({
20
20
  capabilities: ['inbound', 'outbound'],
21
- operations: ['typing'],
22
21
  // 所有媒体(url 下载 / base64 落盘 / 本地 path)统一物化后走 CDN 上传(sendWeixinMediaFile),
23
22
  // 无直发面;微信无卡片交互面,交互段降级纯文本。
24
- segments: {
25
- outboundMedia: ['upload'],
26
- interactive: 'text',
23
+ profile: {
24
+ default: {
25
+ messaging: {
26
+ segments: {
27
+ outboundMedia: ['upload'],
28
+ interactive: 'text',
29
+ },
30
+ },
31
+ feedback: { mode: 'typing' },
32
+ delivery: { send: true, spool: true },
33
+ },
27
34
  },
28
35
  createAdapter: () => new WeixinIlinkAdapter(),
29
36
  });
package/lib/protocol.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { EndpointProfileConfiguration } from 'zhin.js/adapter';
1
2
  /**
2
3
  * Weixin iLink 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
  import { type ConversationRef, type Segment } from '@zhin.js/im-contract';
6
7
  import type { WeixinMessage } from './ilink-types.js';
7
8
  /** One expanded Weixin iLink endpoint configuration produced by AdapterIndex. */
8
- export interface WeixinIlinkEndpointConfig {
9
+ export interface WeixinIlinkEndpointConfig extends EndpointProfileConfiguration {
9
10
  readonly id: string;
10
11
  readonly botAgent?: string;
11
12
  readonly baseUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/adapter-weixin-ilink",
3
- "version": "1.1.20",
3
+ "version": "1.1.22",
4
4
  "type": "module",
5
5
  "description": "Zhin.js Weixin iLink (ClawBot) adapter for Plugin Runtime (long-poll)",
6
6
  "main": "./lib/index.js",
@@ -49,20 +49,20 @@
49
49
  }
50
50
  },
51
51
  "dependencies": {
52
- "@zhin.js/client": "1.1.22",
53
- "@zhin.js/adapter": "1.1.26",
54
- "@zhin.js/core": "1.1.54",
55
- "@zhin.js/feature-kit": "1.1.10",
52
+ "@zhin.js/adapter": "1.1.28",
53
+ "@zhin.js/client": "1.1.24",
56
54
  "@zhin.js/console-contract": "1.1.3",
57
- "@zhin.js/im-contract": "1.1.9",
55
+ "@zhin.js/core": "1.1.56",
56
+ "@zhin.js/feature-kit": "1.1.12",
57
+ "@zhin.js/im-contract": "1.1.11",
58
58
  "@zhin.js/logger": "1.1.2",
59
- "@zhin.js/page": "1.1.12"
59
+ "@zhin.js/page": "1.1.14"
60
60
  },
61
61
  "peerDependencies": {
62
- "@zhin.js/adapter": "^1.1.26",
63
- "@zhin.js/command": "^1.1.12",
64
- "zhin.js": "^1.1.19",
65
- "@zhin.js/core": "^1.1.54"
62
+ "@zhin.js/adapter": "^1.1.28",
63
+ "@zhin.js/command": "^1.1.14",
64
+ "@zhin.js/core": "^1.1.56",
65
+ "zhin.js": "^1.1.21"
66
66
  },
67
67
  "peerDependenciesMeta": {
68
68
  "@zhin.js/command": {
@@ -76,7 +76,7 @@
76
76
  "@types/node": "^26.1.2",
77
77
  "typescript": "^6.0.3",
78
78
  "vitest": "^4.1.10",
79
- "zhin.js": "1.1.19"
79
+ "zhin.js": "1.1.21"
80
80
  },
81
81
  "ilink_appid": "bot",
82
82
  "engines": {
@@ -91,7 +91,7 @@
91
91
  "features": [
92
92
  {
93
93
  "package": "@zhin.js/adapter",
94
- "api": "^2.0.0"
94
+ "api": "^2.1.0"
95
95
  },
96
96
  {
97
97
  "package": "@zhin.js/command",
package/plugin.js CHANGED
@@ -3,6 +3,7 @@ import { definePlugin, pluginConsoleRpcToken } from 'zhin.js';
3
3
  import { createWeixinIlinkConsoleRpc } from "./lib/console.js";
4
4
  export default definePlugin({
5
5
  name: 'weixin-ilink',
6
+ configUpdate: { featurePaths: [['nickname'], ['profile'], ['endpoints']] },
6
7
  metadata: {
7
8
  displayName: 'Weixin iLink Adapter',
8
9
  },
package/schema.json CHANGED
@@ -122,6 +122,27 @@
122
122
  "description": "Command prefix for this endpoint."
123
123
  }
124
124
  }
125
+ },
126
+ "nickname": {
127
+ "type": [
128
+ "string",
129
+ "null"
130
+ ],
131
+ "description": "账号昵称兜底",
132
+ "x-i18n": {
133
+ "en": {
134
+ "description": "Fallback account nickname"
135
+ }
136
+ }
137
+ },
138
+ "profile": {
139
+ "$ref": "#/$defs/selfProfileFallback",
140
+ "description": "账号资料兜底",
141
+ "x-i18n": {
142
+ "en": {
143
+ "description": "Fallback account profile"
144
+ }
145
+ }
125
146
  }
126
147
  },
127
148
  "required": [
@@ -143,9 +164,93 @@
143
164
  "description": "Command prefix. The default empty string allows unprefixed commands; '/' requires a leading slash. Each endpoints[i] can override it."
144
165
  }
145
166
  }
167
+ },
168
+ "nickname": {
169
+ "type": [
170
+ "string",
171
+ "null"
172
+ ],
173
+ "description": "账号昵称兜底",
174
+ "x-i18n": {
175
+ "en": {
176
+ "description": "Fallback account nickname"
177
+ }
178
+ }
179
+ },
180
+ "profile": {
181
+ "$ref": "#/$defs/selfProfileFallback",
182
+ "description": "账号资料兜底",
183
+ "x-i18n": {
184
+ "en": {
185
+ "description": "Fallback account profile"
186
+ }
187
+ }
146
188
  }
147
189
  },
148
190
  "required": [
149
191
  "endpoints"
150
- ]
192
+ ],
193
+ "$defs": {
194
+ "selfProfileFallback": {
195
+ "type": "object",
196
+ "additionalProperties": false,
197
+ "properties": {
198
+ "gender": {
199
+ "type": [
200
+ "string",
201
+ "null"
202
+ ],
203
+ "enum": [
204
+ "male",
205
+ "female",
206
+ "other",
207
+ "unknown",
208
+ null
209
+ ]
210
+ },
211
+ "age": {
212
+ "type": [
213
+ "integer",
214
+ "null"
215
+ ],
216
+ "minimum": 0
217
+ },
218
+ "birthday": {
219
+ "type": [
220
+ "string",
221
+ "null"
222
+ ],
223
+ "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
224
+ },
225
+ "signature": {
226
+ "type": [
227
+ "string",
228
+ "null"
229
+ ]
230
+ },
231
+ "avatar": {
232
+ "type": [
233
+ "string",
234
+ "null"
235
+ ],
236
+ "pattern": "^(https?://[^\\s/?#]+(?:[/?#].*)?|)$"
237
+ },
238
+ "interests": {
239
+ "type": [
240
+ "array",
241
+ "null"
242
+ ],
243
+ "items": {
244
+ "type": "string"
245
+ }
246
+ },
247
+ "bio": {
248
+ "type": [
249
+ "string",
250
+ "null"
251
+ ]
252
+ }
253
+ }
254
+ }
255
+ }
151
256
  }
package/src/protocol.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { EndpointProfileConfiguration } from 'zhin.js/adapter';
1
2
  /**
2
3
  * Weixin iLink protocol helpers (no legacy Adapter/Endpoint / segment-mapper).
3
4
  * Canonicalization is owned by gateway/core before endpoint.send.
@@ -9,7 +10,7 @@ import { DEFAULT_API_BASE_URL, DEFAULT_CDN_BASE_URL } from './ilink-meta.js';
9
10
  import type { WeixinMessage } from './ilink-types.js';
10
11
 
11
12
  /** One expanded Weixin iLink endpoint configuration produced by AdapterIndex. */
12
- export interface WeixinIlinkEndpointConfig {
13
+ export interface WeixinIlinkEndpointConfig extends EndpointProfileConfiguration {
13
14
  readonly id: string;
14
15
  readonly botAgent?: string;
15
16
  readonly baseUrl?: string;