feat(outlink): support rich format in outlink messages - #7353
feat(outlink): support rich format in outlink messages#7353Nixieboluo wants to merge 24 commits into
Conversation
Coverage Report
File CoverageNo changed files found. |
|
✅ Admin Preview Image Ready! 🕒 Time: 2026-08-11 18:01:13 (UTC+8) |
|
✅ Build Successful - Preview fastgpt Image for this PR: 🕒 Time: 2026-08-12 16:16:56 (UTC+8) |
47ec0f5 to
179e105
Compare
c121914yu
left a comment
There was a problem hiding this comment.
基于 179e105 的定向复核,新增 runtime 的主流程测试已通过,但建议合并前先确认上面两处兼容性问题。另有一个未阻断的架构风险:Readable.push() 的背压结果没有被处理,慢 responder 可能积累事件;建议补充慢/失败 responder 和 Redis 故障场景测试。FastGPT 定向测试 4 个 suite、19 个测试通过;git diff --check 通过。
7e89f39 to
02a85f9
Compare
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
Signed-off-by: Nixieboluo <me@sagirii.me>
342f3e7 to
19df6e7
Compare
|
基于当前 head
此外,本 PR 实际包含个人微信协议/二维码状态/富媒体、企微迁移及钉钉共享 token 等用户可见或跨模块改动,范围明显大于正文中的 shared runtime 描述。建议拆分,或补充按渠道列出的需求和验收矩阵。 |
|
修复:
|
|
✅ Docs Preview Deployed! 🔗 👀 Click here to visit preview 🕒 Time: 2026-08-12 16:10:29 (UTC+8) |
…edia-support # Conflicts: # .agents/design/outlink/wechat-clawbot.md # .agents/design/outlink/wechat-polling-refactor.md # packages/service/core/dataset/apiDataset/dingtalkDataset/api.ts # packages/service/support/outLink/runtime/utils.ts # packages/service/support/outLink/wechat/mq.ts # packages/service/support/outLink/wechat/type.ts # packages/service/test/core/dataset/apiDataset/dingtalkDataset/api.test.ts # packages/service/test/support/outLink/runtime/utils.test.ts # pro
a614d8e to
7037f4a
Compare
Signed-off-by: Nixieboluo <me@sagirii.me>
7037f4a to
3d443a0
Compare
|
[P1] 微信 iLink 大整数修复仍不兼容仓库声明支持的 Node 20 当前实现依赖 这里有可降级兼容的无损方案:在 请补一条在最低支持版本 Node 20.19 下运行的 uint64 响应测试,避免当前 Node 24 环境把兼容问题隐藏掉。 |
42b665d to
11e0009
Compare
bccf7e7 to
8ff980c
Compare
8ff980c to
31e1d05
Compare
Signed-off-by: Nixieboluo <me@sagirii.me>
9fd2568 to
4cec6a2
Compare
Signed-off-by: Nixieboluo <me@sagirii.me>
Summary
This PR introduces the shared FastGPT runtime and media utilities used by rich-message outlink providers.
The outlink runtime exposes a provider-neutral async iterable response API. Provider integrations normalize incoming platform messages into FastGPT chat queries and consume ordered
start,chunk,done, anderrorevents without duplicating workflow execution, chat persistence, usage accounting, or common error handling.In addition to the shared runtime, this PR adds the personal WeChat channel implementation and the shared utilities required by the coordinated provider migrations in the companion Pro PR.
What changed
Shared outlink runtime
runOutlinkRuntimeservice.Personal WeChat channel
message_idlosslessly as a string before it is used for grouping and BullMQ reply job IDs.Shared query, media, and configuration utilities
Readable.Related channel support
APIs introduced
Outlink runtime
runOutlinkRuntime<T>({ outLinkConfig, message, respond })OutlinkMessagechatId,messageId,chatUserId, and FastGPT query items.OutlinkResponseEvent{ type: 'start' }{ type: 'chunk'; content: string }{ type: 'done'; content: string }{ type: 'error'; content: string }OutlinkResponderAsyncIterable<OutlinkResponseEvent>and delivers events through a provider-specific transport.OutlinkProviderMessageHandler<T>runOutlinkRuntime.Provider configuration
FeishuAppSchemaappId,appSecret, and optionalencryptKey.loadOutlinkProviderConfig<T>({ shareId, channel, appSchema })Query and media utilities
composeOutLinkQuery(...queries)citeOutLinkQuery(query)<Cite>while preserving attached files.createOutLinkFileLimitStream({ source, maxBytes })OutLinkFileSizeExceededErrorAudio and usage
aiTranscriptions({ model, fileStream, filename, headers })Readableas the audio input.pushWhisperUsage({ teamId, tmbId, duration, source })Compatibility
outlinkInvokeChatandpackages/service/support/outLink/runtime/utils.tsare intentionally removed.All channel integrations covered by this PR pair use
runOutlinkRuntimethrough provider adapters. This is an internal service API migration and does not add a new public HTTP endpoint.Companion PR
The companion Pro PR migrates Feishu, DingTalk, Official Account, and WeCom providers to this shared runtime:
https://github.com/labring/fastgpt-pro/pull/1027
Validation