JianFeeeee
aad8ddbf1e
fix(core): output_send 的 stage 补 Extra 与 after_output
## 缺陷(2026-10-18 实测定位)
`before_output` 被两个语义共用:
emitResponse(eventloop.go) = 一轮的回复,turn 边界
output.go = 单次 output_send__* 的工具输出
**真正把消息发出去的是后者**,而它构造 stageCtx 时连 Extra 都没初始化:
stageCtx := &sdk.StageContext{
FinalText: payload,
Phase: sdk.StageBeforeOutput,
}
诊断日志实证:`[qq-dbg] before_output: input_source="" qq_uid=<nil> extra_keys=0`
后果:通道插件在"消息即将发出"这个最需要上下文的时点,什么都读不到。
QQ 的「对方正在输入中」因此一次都没能触发。
## 修法
Extra 补三个键:
output_channel 目标通道(插件据此判断"是不是发给我的")
output_meta 本次发送的 meta 原文(user_id / group_id 在里面)
output_type text / image / file / voice
## 同时补上 after_output
这是"消息真的送达"的时刻,但此前只有 before_output。没有配对收尾,
插件只能等自己的超时(QQ 那边是 30 秒)—— 用户看到指示器挂很久。
阶段顺序:before_output(可改写 payload/拦截)→ Execute → after_output。
## 为什么 after_output 放在 Execute 成功之后
失败时不发 after_output:消息没送达,"发出后收尾"的语义不成立,
提前触发会让插件误以为已经发出去(进而在状态跟踪上记错)。
2026-10-18 18:01:15 +08:00
..
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-17 19:18:24 +08:00
2026-10-17 19:18:24 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-17 19:18:24 +08:00
2026-10-17 19:18:24 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-17 19:18:24 +08:00
2026-10-17 19:18:24 +08:00
2026-10-18 17:40:07 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-12 14:26:13 +08:00
2026-10-12 10:13:36 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-12 14:26:13 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 13:20:54 +08:00
2026-10-18 13:20:54 +08:00
2026-10-12 14:26:13 +08:00
2026-10-12 14:26:13 +08:00
2026-10-17 19:18:24 +08:00
2026-10-12 14:26:13 +08:00
2026-10-12 10:13:36 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 13:07:40 +08:00
2026-10-18 17:40:07 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 18:01:15 +08:00
2026-10-17 19:18:24 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-09-19 16:49:16 +08:00
2026-10-08 10:40:17 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-09-27 11:55:33 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-06 09:22:12 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 13:07:40 +08:00
2026-10-18 13:07:40 +08:00
2026-10-18 13:07:40 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-09-13 08:59:15 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-09-13 07:00:51 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 13:07:40 +08:00
2026-10-17 19:18:24 +08:00
2026-10-17 19:18:24 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:53 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:53 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 13:20:54 +08:00
2026-09-17 18:56:15 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 06:38:51 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-13 16:18:13 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 13:20:54 +08:00
2026-10-18 06:38:51 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-05 11:25:20 +08:00
2026-10-17 19:18:24 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-08 10:40:17 +08:00
2026-10-18 06:38:51 +08:00