mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-14 12:38:34 +00:00
feat(telegram): add per-topic agent routing for forum groups [AI-assisted]
This feature allows different topics within a Telegram forum supergroup to route to different agents, each with isolated workspace, memory, and sessions. Key changes: - Add agentId field to TelegramTopicConfig type for per-topic routing - Add zod validation for agentId in topic config schema - Implement routing logic to re-derive session key with topic's agent - Add debug logging for topic agent overrides - Add unit tests for routing behavior (forum topics + DM topics) - Add config validation tests - Document feature in docs/channels/telegram.md This builds on the approach from PR #31513 by @Sid-Qin with additional fixes for security (preserved account fail-closed guard) and test coverage. Closes #31473
This commit is contained in:
committed by
Ayaan Zaidi
parent
7f2708a8c3
commit
58bc9a241b
@@ -187,6 +187,8 @@ export type TelegramTopicConfig = {
|
||||
systemPrompt?: string;
|
||||
/** If true, skip automatic voice-note transcription for mention detection in this topic. */
|
||||
disableAudioPreflight?: boolean;
|
||||
/** Route this topic to a specific agent (overrides group-level and binding routing). */
|
||||
agentId?: string;
|
||||
};
|
||||
|
||||
export type TelegramGroupConfig = {
|
||||
|
||||
Reference in New Issue
Block a user