package vip.mate.channel.tool; import java.util.Map; /** * Context handed to {@link ChannelToolProvider#createTools(ChannelToolContext)} * when materialising tools for one specific {@code mate_channel} row. * *
{@link #channelId()} alone is enough for the provider to call its
* SDK-client factory (e.g. {@code FeishuClientFactory.client(channelId)});
* the remaining fields are convenience for handlers that want to
* default any "who should I attribute this to" or "which app are we
* acting on behalf of" parameters.
*
* @param channelId {@code mate_channel.id} — the only required field
* @param channelName display name of the channel row (for log clarity)
* @param channelType {@code mate_channel.channel_type} — matches
* {@link ChannelToolProvider#channelType()}
* @param agentId the {@code mate_agent.id} this channel routes
* inbound messages to, may be null when the channel
* is unbound
* @param config parsed {@code mate_channel.config_json} as a map
* (e.g. {@code app_id}, {@code app_secret},
* {@code domain}). Provided so handlers don't each
* re-parse the JSON.
*/
public record ChannelToolContext(
Long channelId,
String channelName,
String channelType,
Long agentId,
Map