feat: add native result-file delivery

This commit is contained in:
xmanrui 2026-08-23 20:02:06 +08:00
parent 2803bbcbab
commit d472dd5a75
65 changed files with 10205 additions and 255 deletions

View file

@ -8,9 +8,15 @@ import { apply as applyTelegram } from './channels/telegram/index.mjs';
import { apply as applyWecom } from './channels/wecom/index.mjs';
import { apply as applyWeixin } from './channels/weixin/index.mjs';
import { apply as applyWhatsapp } from './channels/whatsapp/index.mjs';
import { installOutboundArtifactTool } from '../../src/channels/shared/semantic/artifact.mjs';
export const name = 'dsh-im-host';
export const inject = ['connection', 'credentials', 'webServer', 'typertGateway'];
export const inject = [
'connection',
'credentials',
'webServer',
'typertGateway',
];
function channelConfig(config, name) {
const channel = config[name] ?? {};
@ -34,6 +40,13 @@ export function createImHostPlugin(internals = {}) {
name,
inject,
async apply(ctx, config = {}) {
if (typeof ctx?.inject === 'function') {
ctx.inject(['tools', 'systemPrompt'], (artifactCtx) => {
installOutboundArtifactTool(artifactCtx);
});
} else {
installOutboundArtifactTool(ctx);
}
await startFeishu(ctx, channelConfig(config, 'feishu'));
await startWeixin(ctx, channelConfig(config, 'weixin'));
await startDingtalk(ctx, channelConfig(config, 'dingtalk'));