File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,7 +242,10 @@ export const botschatPlugin = {
242242 } ,
243243 } ,
244244
245- reload : { configPrefixes : [ "channels.botschat" ] } ,
245+ reload : {
246+ configPrefixes : [ "channels.botschat" ] ,
247+ noopPrefixes : [ "plugins.installs.botschat" ] ,
248+ } ,
246249
247250 config : {
248251 listAccountIds : ( cfg : unknown ) => listBotsChatAccountIds ( cfg ) ,
@@ -267,6 +270,12 @@ export const botschatPlugin = {
267270 outbound : {
268271 deliveryMode : "direct" as const ,
269272
273+ resolveTarget : ( { to } : { to ?: string ; allowFrom ?: string [ ] ; accountId ?: string | null ; mode ?: string } ) => {
274+ const trimmed = to ?. trim ( ) ;
275+ if ( trimmed ) return { ok : true as const , to : trimmed } ;
276+ return { ok : true as const , to : "@default" } ;
277+ } ,
278+
270279 sendText : async ( ctx : {
271280 to : string ;
272281 text : string ;
Original file line number Diff line number Diff line change @@ -39,9 +39,10 @@ export type BotsChatChannelConfig = {
3939
4040/** Plugin → Cloud (outbound, agent responses) */
4141export type CloudOutbound =
42- | { type : "auth" ; token : string ; agents ?: string [ ] ; model ?: string }
42+ | { type : "auth" ; token : string ; agentId ?: string ; agentType ?: string ; agents ?: string [ ] ; model ?: string }
4343 | {
4444 type : "agent.text" ;
45+ agentId ?: string ;
4546 sessionKey : string ;
4647 text : string ;
4748 replyToId ?: string ;
@@ -141,14 +142,15 @@ export type CloudOutbound =
141142
142143/** Cloud → Plugin (inbound, user messages) */
143144export type CloudInbound =
144- | { type : "auth.ok" ; userId ?: string }
145+ | { type : "auth.ok" ; userId ?: string ; agentId ?: string ; availableAgents ?: Array < { id : string ; name : string ; type : string ; role : string ; capabilities : string [ ] ; status : string } > }
145146 | { type : "auth.fail" ; reason : string }
146147 | {
147148 type : "user.message" ;
148149 sessionKey : string ;
149150 text : string ;
150151 userId : string ;
151152 messageId : string ;
153+ targetAgentId ?: string ;
152154 mediaUrl ?: string ;
153155 /** Parent message fields — attached by ConnectionDO for thread messages */
154156 parentMessageId ?: string ;
You can’t perform that action at this time.
0 commit comments