dsh-aiyayi 1.5.22 → 1.5.23
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 +9 -0
- package/lib/feishu.js +7 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
+
## 1.5.23(2026-11-11 修复:feishu_bind 对无效 chatId 的确定性拒绝——230001 与 230002 同判 not-member)
|
|
12
|
+
|
|
13
|
+
- 环境:DSH-执行智能体(DeepSeek Harness 子会话,模型名未确证)
|
|
14
|
+
- git:本次 commit(2026-11-11,阿依娅伊)1.5.23:1.5.22 装版静态断言发现的边界修正。
|
|
15
|
+
- 现象:用伪造 chatId(`oc_aaa…` 32 个 a)调 `feishu_bind`,归属探测返回的不是 230002(非成员)而是 **230001 invalid container_id**(chat 根本不存在)——探测代码把非 0/230002 的码一律当"探测故障"抛出,于是走了「探测基建故障→`ok:true + warning` 原样绑定」分支,把一个不存在的 chat 绑进了 mappings。
|
|
16
|
+
- 根因:230001 与 230002 同为飞书的**确定性答案**(前者=chatId 无效/不存在,后者=合法 chat 但非成员),两者都意味着"绑了也没用";只有网络/其他未知错误才是真正的探测故障,应保留 ok:true+warning 的可用性兜底。
|
|
17
|
+
- 修法(`lib/feishu.js` `resolveChannelForChat`):probe 抛错时经 `extractFeishuErrorCode` 挖出 feishuCode===230001 → 不计入探测故障(视同该 app 非成员证据);全部 app 均为 230002 非成员或 230001 抛错且无其他错误 → `{ok:'not-member'}` → `feishu_bind` 返回 `ok:false` 确定拒绝(拒绝文案同时说明两种情形)。
|
|
18
|
+
- 验证:装版后对伪造 chatId 实测返回 ok:false;对真实已绑定 chat 归属探测照常 ok:true+appId。
|
|
19
|
+
|
|
11
20
|
## 1.5.22(2026-11-11 多应用多长连接:双机器人各自收发,根因消灭 230002 错绑发送)
|
|
12
21
|
|
|
13
22
|
- 环境:DSH-执行智能体(DeepSeek Harness 子会话,模型名未确证)
|
package/lib/feishu.js
CHANGED
|
@@ -234,6 +234,9 @@ export function apply(ctx, config) {
|
|
|
234
234
|
* 不是判据),命中即写缓存并返回该 channel;
|
|
235
235
|
* 3) 全部探测成功但都不是成员 → { ok:'not-member' }(确定性否决);
|
|
236
236
|
* 有探测因网络/其他错误失败 → { ok:'probe-error' }(归属未知,不硬猜)。
|
|
237
|
+
* 1.5.23:230002(非成员,probe 返回 member:false)与 230001(invalid
|
|
238
|
+
* container_id,chat 不存在/伪造,probe 抛错)都是飞书的确定性答案,
|
|
239
|
+
* 同判 not-member——绑一个不存在的 chat 与绑非成员 chat 同样无意义。
|
|
237
240
|
*/
|
|
238
241
|
async function resolveChannelForChat(chatId) {
|
|
239
242
|
const owners = readChatOwners(root)
|
|
@@ -257,6 +260,9 @@ export function apply(ctx, config) {
|
|
|
257
260
|
return { ok: 'resolved', appId: app.appId, channel: channels.get(app.appId) }
|
|
258
261
|
}
|
|
259
262
|
} catch (error) {
|
|
263
|
+
// 1.5.23:230001 invalid container_id(chat 不存在/伪造)是确定性"不可绑"
|
|
264
|
+
// 证据,与 230002 同判——不计入探测故障,直接视为该 app 非成员。
|
|
265
|
+
if (extractFeishuErrorCode(error) === 230001) continue
|
|
260
266
|
errors.push(`appId=${app.appId}: ${String(error)}`)
|
|
261
267
|
}
|
|
262
268
|
}
|
|
@@ -1337,7 +1343,7 @@ function registerFeishuTools(ctx, root, merged, apps, send = null) {
|
|
|
1337
1343
|
ok: false,
|
|
1338
1344
|
chatId,
|
|
1339
1345
|
error:
|
|
1340
|
-
'没有任何已配置的飞书应用是该 chat 的成员(成员探测 230002
|
|
1346
|
+
'没有任何已配置的飞书应用是该 chat 的成员(成员探测 230002 全否),或该 chatId 无效/不存在(230001 invalid container_id)——绑定不会生效。请确认 chatId 属于本机配置的机器人。',
|
|
1341
1347
|
}
|
|
1342
1348
|
} else {
|
|
1343
1349
|
warning = `归属探测失败(${(resolved.errors || []).join(';')}),已按原样绑定,发送时会再自动探测`
|