diff --git a/dist/fabric/src/channel.js b/dist/fabric/src/channel.js index 8ecd4d6..4496ab6 100644 --- a/dist/fabric/src/channel.js +++ b/dist/fabric/src/channel.js @@ -93,7 +93,9 @@ export const fabricChannelPlugin = createChatChannelPlugin({ threads: false, media: false, nativeCommands: false, - blockStreaming: true, + // Fabric has no message-length limit and we never want a reply split + // into multiple messages -> no block streaming. + blockStreaming: false, }, reload: { configPrefixes: ['channels.fabric'] }, config: { @@ -126,7 +128,12 @@ export const fabricChannelPlugin = createChatChannelPlugin({ }, threading: { topLevelReplyToMode: 'channel' }, outbound: { - base: {}, + base: { + deliveryMode: 'direct', + // Fabric has no length limit: never chunk — always one message. + chunker: (text) => [text], + textChunkLimit: Number.MAX_SAFE_INTEGER, + }, attachedResults: { channel: 'fabric', sendText: async (ctx) => { diff --git a/dist/fabric/src/inbound.js b/dist/fabric/src/inbound.js index 4f52d09..b81b903 100644 --- a/dist/fabric/src/inbound.js +++ b/dist/fabric/src/inbound.js @@ -144,7 +144,8 @@ export class FabricInbound { }, onRecordError: (err) => this.log.warn(`fabric: session record failed agent=${agentId}: ${String(err)}`), onDispatchError: (err, info) => this.log.warn(`fabric: ${info.kind} dispatch failed agent=${agentId}: ${String(err)}`), - replyOptions: {}, + // Fabric has no length limit: deliver the whole reply as ONE message. + replyOptions: { disableBlockStreaming: true }, }); this.log.info(`fabric: dispatch returned agent=${agentId} channel=${channelId}`); } diff --git a/src/channel.ts b/src/channel.ts index 64f5668..18d4f84 100644 --- a/src/channel.ts +++ b/src/channel.ts @@ -105,7 +105,9 @@ export const fabricChannelPlugin = createChatChannelPlugin no block streaming. + blockStreaming: false, }, reload: { configPrefixes: ['channels.fabric'] }, config: { @@ -142,7 +144,12 @@ export const fabricChannelPlugin = createChatChannelPlugin [text], + textChunkLimit: Number.MAX_SAFE_INTEGER, + }, attachedResults: { channel: 'fabric', sendText: async (ctx: { diff --git a/src/inbound.ts b/src/inbound.ts index 9dcd422..75c5f4d 100644 --- a/src/inbound.ts +++ b/src/inbound.ts @@ -176,7 +176,8 @@ export class FabricInbound { this.log.warn(`fabric: session record failed agent=${agentId}: ${String(err)}`), onDispatchError: (err: unknown, info: { kind: string }) => this.log.warn(`fabric: ${info.kind} dispatch failed agent=${agentId}: ${String(err)}`), - replyOptions: {}, + // Fabric has no length limit: deliver the whole reply as ONE message. + replyOptions: { disableBlockStreaming: true } as never, }); this.log.info(`fabric: dispatch returned agent=${agentId} channel=${channelId}`); } catch (err) {