Summary
Slack-connected agents can generate files and send them to the chat channel via the herdctl_send_file MCP tool (added in #47). Discord-connected agents cannot — they lack the equivalent wiring. The infrastructure is already platform-agnostic; Discord just needs to plug into it.
Current State
- Slack:
slack-manager.ts creates a FileSenderContext, wraps it via createFileSenderDef(), and passes it as injectedMcpServers to fleetManager.trigger(). The Slack connector has an uploadFile() method that calls files.uploadV2().
- Discord:
discord-manager.ts does not pass injectedMcpServers to fleetManager.trigger(). The Discord connector has no uploadFile() method.
What Needs to Change
1. Add uploadFile() to the Discord connector
Discord.js supports file uploads via channel.send():
await channel.send({
content: message,
files: [{ attachment: fileBuffer, name: filename }]
});
Add an uploadFile(params) method to the Discord connector matching the same shape used by the file sender context.
2. Wire up FileSenderContext in discord-manager.ts
Follow the same pattern as slack-manager.ts:
const fileSenderContext: FileSenderContext = {
workingDirectory: workingDir,
uploadFile: async (params) => {
return connector.uploadFile({
channelId: event.metadata.channelId,
fileBuffer: params.fileBuffer,
filename: params.filename,
message: params.message,
});
},
};
const fileSenderDef = createFileSenderDef(fileSenderContext);
injectedMcpServers = { [fileSenderDef.name]: fileSenderDef };
Then pass injectedMcpServers to fleetManager.trigger().
3. No changes to file-sender-mcp.ts
The file sender MCP tool definition is already platform-agnostic. It accepts a FileSenderContext with a generic uploadFile() callback. No changes needed.
Scope
This is a small change — the architecture and tool definition already exist. It's wiring Discord into the same pattern that Slack uses.
Summary
Slack-connected agents can generate files and send them to the chat channel via the
herdctl_send_fileMCP tool (added in #47). Discord-connected agents cannot — they lack the equivalent wiring. The infrastructure is already platform-agnostic; Discord just needs to plug into it.Current State
slack-manager.tscreates aFileSenderContext, wraps it viacreateFileSenderDef(), and passes it asinjectedMcpServerstofleetManager.trigger(). The Slack connector has anuploadFile()method that callsfiles.uploadV2().discord-manager.tsdoes not passinjectedMcpServerstofleetManager.trigger(). The Discord connector has nouploadFile()method.What Needs to Change
1. Add
uploadFile()to the Discord connectorDiscord.js supports file uploads via
channel.send():Add an
uploadFile(params)method to the Discord connector matching the same shape used by the file sender context.2. Wire up
FileSenderContextindiscord-manager.tsFollow the same pattern as
slack-manager.ts:Then pass
injectedMcpServerstofleetManager.trigger().3. No changes to
file-sender-mcp.tsThe file sender MCP tool definition is already platform-agnostic. It accepts a
FileSenderContextwith a genericuploadFile()callback. No changes needed.Scope
This is a small change — the architecture and tool definition already exist. It's wiring Discord into the same pattern that Slack uses.