Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.
Python agentagent-osaiai-agentsai-partnerchatopsclaudeclaude-codecodexdevtoolsdiscord-botlark-botllmlocal-firstlong-term-memoryopencodeslack-botvibe-codingvibeywechat
fix(feishu): implement multi-select question modal and fix dead callback routing
cyhhao2ec2b089190e
diff --git a/config/v2_compat.py b/config/v2_compat.pyindex ea26d9afb..dd3339a2b 100644--- a/config/v2_compat.py+++ b/config/v2_compat.py@@ -1,7 +1,7 @@from dataclasses import dataclassfrom typing import Optional-from config.v2_config import V2Config, SlackConfig, DiscordConfig+from config.v2_config import V2Config, SlackConfig, DiscordConfig, LarkConfig@dataclass@@ -36,12 +36,14 @@ class AppCompatConfig:platform: strslack: SlackConfigdiscord: Optional[DiscordConfig]+ lark: Optional[LarkConfig]claude: ClaudeCompatConfigcodex: Optional[CodexCompatConfig]opencode: Optional[OpenCodeCompatConfig]log_level: strack_mode: strlanguage: str+ show_duration: bool = Truedefault_backend: str = "opencode"@@ -72,11 +74,13 @@ def to_app_config(v2: V2Config) -> AppCompatConfig:platform=v2.platform,slack=slack,discord=v2.discord,+ lark=v2.lark,claude=claude,codex=codex,opencode=opencode,log_level=v2.runtime.log_level,ack_mode=v2.ack_mode,language=v2.language,+ show_duration=v2.show_duration,default_backend=v2.agents.default_backend,)diff --git a/config/v2_config.py b/config/v2_config.pyindex 16167f77b..0031edd6b 100644--- a/config/v2_config.py+++ b/config/v2_config.py@@ -54,10 +54,18 @@ class LarkConfig(BaseIMConfig):app_id: str = ""app_secret: str = ""require_mention: bool = False+ domain: str = "feishu" # "feishu" for domestic (open.feishu.cn), "lark" for international (open.larksuite.com)def validate(self) -> None:- # Allow empty for initial setup- pass+ if self.domain not in ("feishu", "lark"):+ raise ValueError(f"Invalid lark domain: {self.domain!r}. Must be 'feishu' or 'lark'.")++ @property+ def api_base_url(self) -> str:+ """Return the base API URL for the configured domain."""+ if self.domain == "lark":+ return "https://open.larksuite.com"+ return "https://open.feishu.cn"@dataclassdiff --git a/config/v2_sessions.py b/config/v2_sessions.pyindex aade5eb68..db78de6c2 100644--- a/config/v2_sessions.py+++ b/config/v2_sessions.py@@ -65,13 +65,12 @@ class ActivePollInfo:class SessionState:# session_mappings: user_id -> agent_name -> thread_id -> session_idsession_mappings: Dict[str, Dict[str, Dict[str, str]]] = field(default_factory=dict)- active_slack_threads: Dict[str, Dict[str, Dict[str, float]]] = field(- default_factory=dict- )+ active_slack_threads: Dict[str, Dict[str, Dict[str, float]]] = field(default_factory=dict)# active_polls: opencode_session_id -> ActivePollInfoactive_polls: Dict[str, Dict[str, Any]] = field(default_factory=dict)- # processed_message_ts: channel_id -> thread_ts -> last_processed_message_ts- processed_message_ts: Dict[str, Dict[str, str]] = field(default_factory=dict)+ # processed_message_ts: channel_id -> thread_ts -> list of processed message IDs+ # (set-based dedup, supports all platforms including Feishu non-monotonic IDs)+ processed_message_ts: Dict[str, Dict[str, Any]] = field(default_factory=dict)last_activity: Optional[str] = None@@ -119,22 +118,51 @@ class SessionsStore:self.state.active_slack_threads[user_id][channel_id] = channel_mapreturn channel_map- def get_last_processed_message_ts(- self, channel_id: str, thread_ts: str- ) -> Optional[str]:- """Get the last processed message ts for a thread."""- channel_map = self.state.processed_message_ts.get(channel_id)- if channel_map:- return channel_map.get(thread_ts)- return None+ # Max number of message IDs to keep per thread for dedup+ _DEDUP_SET_MAX = 200++ def _get_processed_set(self, channel_id: str, thread_ts: str) -> List[str]:+ """Get the processed message ID list for a thread.- def set_last_processed_message_ts(- self, channel_id: str, thread_ts: str, message_ts: str- ) -> None:- """Set the last processed message ts for a thread."""+ Handles backward-compat: old format stored a single string (high-water mark).+ New format stores a list of message IDs.+ """+ channel_map = self.state.processed_message_ts.get(channel_id)+ if not channel_map:+ return []+ value = channel_map.get(thread_ts)+ if value is None:+ return []+ # Backward compat: old format was a single string+ if isinstance(value, str):+ return [value]+ if isinstance(value, list):+ return value+ return []++ def is_message_in_processed_set(self, channel_id: str, thread_ts: str, message_ts: str) -> bool:+ """Check if a message ID is in the processed set."""+ return message_ts in self._get_processed_set(channel_id, thread_ts)++ def add_to_processed_set(self, channel_id: str, thread_ts: str, message_ts: str) -> None:+ """Add a message ID to the processed set (bounded)."""if channel_id not in self.state.processed_message_ts:self.state.processed_message_ts[channel_id] = {}- self.state.processed_message_ts[channel_id][thread_ts] = message_ts+ value = self.state.processed_message_ts[channel_id].get(thread_ts)+ # Backward compat: migrate old string format to list+ if isinstance(value, str):+ processed = [value]+ elif isinstance(value, list):+ processed = value+ else:+ processed = []++ if message_ts not in processed:+ processed.append(message_ts)+ # Trim to keep only the most recent entries+ if len(processed) > self._DEDUP_SET_MAX:+ processed = processed[-self._DEDUP_SET_MAX :]+ self.state.processed_message_ts[channel_id][thread_ts] = processedself.save()def add_active_poll(self, poll_info: ActivePollInfo) -> None:@@ -157,10 +185,7 @@ class SessionsStore:def get_all_active_polls(self) -> Dict[str, ActivePollInfo]:"""Get all active polls."""- return {- sid: ActivePollInfo.from_dict(data)- for sid, data in self.state.active_polls.items()- }+ return {sid: ActivePollInfo.from_dict(data) for sid, data in self.state.active_polls.items()}def update_active_poll(self, poll_info: ActivePollInfo) -> None:"""Update an existing active poll."""diff --git a/core/controller.py b/core/controller.pyindex 7fd63f39a..6d8139dd6 100644--- a/core/controller.py+++ b/core/controller.py@@ -81,6 +81,10 @@ class Controller:# Create platform-specific formatterif self.config.platform == "discord":formatter = DiscordFormatter()+ elif self.config.platform == "lark":+ from modules.im.formatters.feishu_formatter import FeishuFormatter++ formatter = FeishuFormatter()else:formatter = SlackFormatter()@@ -114,15 +118,27 @@ class Controller:self.im_client.set_settings_manager(self.settings_manager)self.im_client.set_controller(self)logger.info("Injected settings_manager and controller into DiscordBot")+ elif self.config.platform == "lark":+ from modules.im.feishu import FeishuBot++ if isinstance(self.im_client, FeishuBot):+ self.im_client.set_settings_manager(self.settings_manager)+ self.im_client.set_controller(self)+ logger.info("Injected settings_manager and controller into FeishuBot")def _get_lang(self) -> str:- self._refresh_language_from_config()+ self._refresh_config_from_disk()return getattr(self.config, "language", "en")def _t(self, key: str, **kwargs) -> str:return i18n_t(key, self._get_lang(), **kwargs)- def _refresh_language_from_config(self) -> None:+ def _refresh_config_from_disk(self) -> None:+ """Hot-reload mutable message-processing settings from config.json.++ Called on every ``_t()`` invocation (guarded by mtime check).+ Refreshes: language, show_duration, ack_mode, require_mention (global).+ """try:config_path = paths.get_config_path()if not config_path.exists():@@ -133,9 +149,23 @@ class Controller:v2_config = V2Config.load()self.config.language = v2_config.language+ self.config.show_duration = v2_config.show_duration+ self.config.ack_mode = v2_config.ack_mode++ # Sync global require_mention into the IM client's platform config+ platform = getattr(self.config, "platform", "")+ im_cfg = getattr(self.im_client, "config", None)+ if im_cfg is not None and hasattr(im_cfg, "require_mention"):+ if platform == "lark" and v2_config.lark:+ im_cfg.require_mention = v2_config.lark.require_mention+ elif platform == "slack":+ im_cfg.require_mention = v2_config.slack.require_mention+ elif platform == "discord" and v2_config.discord:+ im_cfg.require_mention = v2_config.discord.require_mention+self._config_mtime = mtimeexcept Exception as err:- logger.debug("Failed to reload language from config: %s", err)+ logger.debug("Failed to reload config from disk: %s", err)def _migrate_language_from_settings(self) -> None:"""Persist legacy per-channel language into global config if missing."""@@ -518,7 +548,7 @@ class Controller:summary = self._build_result_summary(text, self._get_result_max_chars())await self.im_client.send_message(target_context, summary, parse_mode=parse_mode)- if self.config.platform in {"slack", "discord"} and hasattr(self.im_client, "upload_markdown"):+ if self.config.platform in {"slack", "discord", "lark"} and hasattr(self.im_client, "upload_markdown"):try:await self.im_client.upload_markdown(target_context,diff --git a/core/handlers/command_handlers.py b/core/handlers/command_handlers.pyindex 574884c12..a845523c5 100644--- a/core/handlers/command_handlers.py+++ b/core/handlers/command_handlers.py@@ -33,8 +33,8 @@ class CommandHandlers:def _get_channel_context(self, context: MessageContext) -> MessageContext:"""Get context for channel messages (no thread)"""- # For Slack/Discord: send command responses directly to channel, not in thread- if self.config.platform in {"slack", "discord"}:+ # Send command responses directly to channel, not in thread/topic+ if self.config.platform in {"slack", "discord", "lark"}:return MessageContext(user_id=context.user_id,channel_id=context.channel_id,@@ -70,8 +70,8 @@ class CommandHandlers:default_agent = getattr(self.controller.agent_service, "default_agent", None)agent_display_name = get_agent_display_name(agent_name, fallback=default_agent or "Unknown")- # For non-Slack platforms without buttons, use traditional text message- if self.config.platform not in {"slack", "discord"}:+ # For non-interactive platforms, use traditional text message+ if self.config.platform not in {"slack", "discord", "lark"}:formatter = self.im_client.formatter# Build welcome message using formatter to handle escaping properly@@ -268,7 +268,26 @@ class CommandHandlers:f"📂 {self._t('command.cwd.changeInstructions')}",)return- if self.config.platform != "slack":+ if self.config.platform == "lark":+ if hasattr(self.im_client, "open_change_cwd_modal"):+ try:+ current_cwd = self.controller.get_cwd(context)+ await self.im_client.open_change_cwd_modal(+ trigger_id=context,+ current_cwd=current_cwd,+ channel_id=context.channel_id,+ )+ return+ except Exception as e:+ logger.error(f"Error opening change CWD card for Lark: {e}")+ channel_context = self._get_channel_context(context)+ await self.im_client.send_message(+ channel_context,+ f"📂 {self._t('command.cwd.changeInstructions')}",+ )+ return++ if self.config.platform not in {"slack"}:channel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context,@@ -331,7 +350,44 @@ class CommandHandlers:f"⏮️ {self._t('command.resume.clickButton')}",)return- if self.config.platform != "slack":+ if self.config.platform == "lark":+ settings_key = self.controller._get_settings_key(context)+ sessions_by_agent = self.settings_manager.list_all_agent_sessions(settings_key)+ if not sessions_by_agent:+ channel_context = self._get_channel_context(context)+ await self.im_client.send_message(+ channel_context,+ f"ℹ️ {self._t('command.resume.noStoredSessions')}",+ )+ return+ # Flatten sessions_by_agent dict into a list for Feishu card+ flat_sessions = []+ for agent_name, agent_sessions in sessions_by_agent.items():+ for s in agent_sessions:+ flat_sessions.append(+ {+ "id": s.get("id", ""),+ "label": f"[{agent_name}] {s.get('label', s.get('id', '')[:8])}",+ }+ )+ if hasattr(self.im_client, "open_resume_session_modal"):+ try:+ await self.im_client.open_resume_session_modal(+ trigger_id=context,+ sessions=flat_sessions,+ channel_id=context.channel_id,+ )+ return+ except Exception as e:+ logger.error(f"Error opening resume session card for Lark: {e}")+ channel_context = self._get_channel_context(context)+ await self.im_client.send_message(+ channel_context,+ f"⏮️ {self._t('command.resume.clickButton')}",+ )+ return++ if self.config.platform not in {"slack"}:channel_context = self._get_channel_context(context)await self.im_client.send_message(channel_context,diff --git a/core/handlers/message_handler.py b/core/handlers/message_handler.pyindex 2cddab3e2..835f724e2 100644--- a/core/handlers/message_handler.py+++ b/core/handlers/message_handler.py@@ -485,9 +485,10 @@ class MessageHandler:try:# Download the file contentif hasattr(self.im_client, "download_file") and attachment.url:- # Create a dict for Slack's download_file method+ # Platform-agnostic download info dictfile_info = {- "url_private_download": attachment.url,+ "url": attachment.url,+ "url_private_download": attachment.url, # Slack compat"name": attachment.name,"size": attachment.size,}diff --git a/core/handlers/settings_handler.py b/core/handlers/settings_handler.pyindex 01ccda792..ddca31584 100644--- a/core/handlers/settings_handler.py+++ b/core/handlers/settings_handler.py@@ -52,6 +52,8 @@ class SettingsHandler:await self._handle_settings_slack(context)elif self.config.platform == "discord":await self._handle_settings_discord(context)+ elif self.config.platform == "lark":+ await self._handle_settings_lark(context)else:# For other platforms, use inline keyboardawait self._handle_settings_traditional(context)@@ -172,6 +174,35 @@ class SettingsHandler:returnawait self._handle_settings_traditional(context)+ async def _handle_settings_lark(self, context: MessageContext):+ """Handle settings for Lark/Feishu using interactive form card."""+ settings_key = self._get_settings_key(context)+ user_settings = self.settings_manager.get_user_settings(settings_key)+ message_types = self.settings_manager.get_available_message_types()+ display_names = self._message_type_display_names()++ current_require_mention = self.settings_manager.get_require_mention_override(settings_key)+ global_require_mention = self.config.lark.require_mention if self.config.lark else False+ current_language = self.config.language++ if hasattr(self.im_client, "open_settings_modal"):+ try:+ await self.im_client.open_settings_modal(+ trigger_id=context,+ user_settings=user_settings,+ message_types=message_types,+ display_names=display_names,+ channel_id=context.channel_id,+ current_require_mention=current_require_mention,+ global_require_mention=global_require_mention,+ current_language=current_language,+ )+ except Exception as e:+ logger.error(f"Error opening settings card for Lark: {e}", exc_info=True)+ await self.im_client.send_message(context, f"❌ {self._t('error.settingsFailed')}")+ else:+ await self._handle_settings_traditional(context)+async def handle_toggle_message_type(self, context: MessageContext, msg_type: str):"""Handle toggle for message type visibility"""try:@@ -292,6 +323,8 @@ class SettingsHandler:await self._handle_routing_slack(context)elif self.config.platform == "discord":await self._handle_routing_discord(context)+ elif self.config.platform == "lark":+ await self._handle_routing_lark(context)else:# For other platforms, show a simple messageawait self.im_client.send_message(@@ -478,3 +511,80 @@ class SettingsHandler:except Exception as e:logger.error(f"Error opening routing modal: {e}", exc_info=True)await self.im_client.send_message(context, f"❌ {self._t('error.routingModalFailed')}")++ async def _handle_routing_lark(self, context: MessageContext):+ """Handle routing for Lark/Feishu using interactive form card.++ Gathers the same backend/model/agent data as Slack/Discord so the+ Feishu card can display selectors for all available options.+ """+ settings_key = self._get_settings_key(context)+ current_routing = self.settings_manager.get_channel_routing(settings_key)++ all_backends = list(self.controller.agent_service.agents.keys())+ registered_backends = sorted(all_backends, key=lambda x: (x != "opencode", x))+ current_backend = self.controller.resolve_agent_for_context(context)++ opencode_agents = []+ opencode_models = {}+ opencode_default_config = {}++ if "opencode" in registered_backends:+ try:+ opencode_agent = self.controller.agent_service.agents.get("opencode")+ if opencode_agent and hasattr(opencode_agent, "_get_server"):+ server = await opencode_agent._get_server()+ await server.ensure_running()++ cwd = self.controller.get_cwd(context)+ opencode_agents = await server.get_available_agents(cwd)+ opencode_models = await server.get_available_models(cwd)+ opencode_default_config = await server.get_default_config(cwd)+ except Exception as e:+ logger.warning(f"Failed to fetch OpenCode data: {e}")++ claude_agents = []+ claude_models = []++ if "claude" in registered_backends:+ try:+ from vibe.api import claude_agents as get_claude_agents, claude_models as get_claude_models++ cwd = self.controller.get_cwd(context)+ agents_result = get_claude_agents(cwd)+ if agents_result.get("ok"):+ claude_agents = agents_result.get("agents", [])+ models_result = get_claude_models()+ if models_result.get("ok"):+ claude_models = models_result.get("models", [])+ except Exception as e:+ logger.warning(f"Failed to fetch Claude data: {e}")++ codex_models = []+ if "codex" in registered_backends:+ try:+ from vibe.api import codex_models as get_codex_models++ models_result = get_codex_models()+ if models_result.get("ok"):+ codex_models = models_result.get("models", [])+ except Exception as e:+ logger.warning(f"Failed to fetch Codex data: {e}")++ try:+ await self.im_client.open_routing_modal(+ trigger_id=context,+ channel_id=context.channel_id,+ registered_backends=registered_backends,+ current_backend=current_backend,+ current_routing=current_routing,+ opencode_agents=opencode_agents,+ opencode_models=opencode_models,+ opencode_default_config=opencode_default_config,+ claude_agents=claude_agents,+ claude_models=claude_models,+ codex_models=codex_models,+ )+ except Exception as e:+ logger.error(f"Error opening routing card for Lark: {e}", exc_info=True)+ await self.im_client.send_message(context, f"❌ {self._t('error.routingModalFailed')}")diff --git a/modules/agents/base.py b/modules/agents/base.pyindex 4d0b3e4fb..aa639eccb 100644--- a/modules/agents/base.py+++ b/modules/agents/base.py@@ -98,17 +98,32 @@ class BaseAgent(ABC):suffix: Optional[str] = None,request: Optional[AgentRequest] = None,) -> None:+ show_duration = getattr(self.config, "show_duration", True)if duration_ms is None:duration_ms = self._calculate_duration_ms(started_at)- formatted = self.im_client.formatter.format_result_message(- subtype or "",- duration_ms,- result_text,- show_duration=getattr(self.config, "show_duration", True),- )- if suffix:- formatted = f"{formatted}\n{suffix}"- await self.controller.emit_agent_message(context, "result", formatted, parse_mode=parse_mode)++ # When show_duration is disabled, skip the entire result line+ # unless there is actual result_text or suffix to deliver.+ if not show_duration:+ parts = []+ if result_text and result_text.strip():+ parts.append(result_text)+ if suffix:+ parts.append(suffix)+ if parts:+ formatted = "\n".join(parts)+ await self.controller.emit_agent_message(context, "result", formatted, parse_mode=parse_mode)+ else:+ formatted = self.im_client.formatter.format_result_message(+ subtype or "",+ duration_ms,+ result_text,+ show_duration=True,+ )+ if suffix:+ formatted = f"{formatted}\n{suffix}"+ await self.controller.emit_agent_message(context, "result", formatted, parse_mode=parse_mode)+# Remove ack reaction after result is sentif request:await self._remove_ack_reaction(request)diff --git a/modules/im/discord.py b/modules/im/discord.pyindex fbdddf617..c185c91b1 100644--- a/modules/im/discord.py+++ b/modules/im/discord.py@@ -396,6 +396,10 @@ class DiscordBot(BaseIMClient):if message.author and message.author.bot:return+ # Hot-reload config BEFORE reading any config values (require_mention, etc.)+ if self._controller and hasattr(self._controller, "_refresh_config_from_disk"):+ self._controller._refresh_config_from_disk()+content = self._clean_message_text(message.content)channel = message.channel@@ -569,7 +573,11 @@ class DiscordBot(BaseIMClient):default=mt in self.selected_types,))- default_status = self.outer._t("common.on") if global_require_mention else self.outer._t("common.off")+ default_status = (+ self.outer._t("modal.settings.mentionStatusOn")+ if global_require_mention+ else self.outer._t("modal.settings.mentionStatusOff")+ )require_options = [discord.SelectOption(label=_prefixed_label(diff --git a/modules/im/feishu.py b/modules/im/feishu.pyindex ce1337237..ccbbc0ccf 100644--- a/modules/im/feishu.py+++ b/modules/im/feishu.py@@ -14,18 +14,27 @@ from .base import BaseIMClient, FileAttachment, InlineButton, InlineKeyboard, Mefrom .formatters import FeishuFormatterfrom config.v2_config import LarkConfigfrom vibe.i18n import get_supported_languages, t as i18n_t+from modules.agents.opencode.utils import (+ build_opencode_model_option_items,+ build_reasoning_effort_options,+ resolve_opencode_allowed_providers,+ resolve_opencode_provider_preferences,+)logger = logging.getLogger(__name__)# Feishu emoji name mapping (common reactions)+# See: https://open.feishu.cn/document/server-docs/im-v1/message-reaction/emojis-introduce_EMOJI_MAP: Dict[str, str] = {- "eyes": "EYES",- "👀": "EYES",+ "eyes": "OnIt",+ "👀": "OnIt",+ "robot_face": "SMART",+ "🤖": "SMART","thumbsup": "THUMBSUP","👍": "THUMBSUP","+1": "THUMBSUP",- "thumbsdown": "THUMBSDOWN",- "👎": "THUMBSDOWN",+ "thumbsdown": "ThumbsDown",+ "👎": "ThumbsDown","heart": "HEART","❤️": "HEART","check": "OK",@@ -37,6 +46,18 @@ _EMOJI_MAP: Dict[str, str] = {"🚀": "ROCKET","smile": "SMILE","😄": "SMILE",+ "fire": "FIRE",+ "🔥": "FIRE",+ "clap": "APPLAUSE",+ "👏": "APPLAUSE",+ "muscle": "MUSCLE",+ "💪": "MUSCLE",+ "tada": "PARTY",+ "🎉": "PARTY",+ "thinking": "THINKING",+ "🤔": "THINKING",+ "done": "DONE",+ "lgtm": "LGTM",}@@ -73,6 +94,8 @@ class FeishuBot(BaseIMClient):self._on_routing_update: Optional[Callable] = Noneself._on_routing_modal_update: Optional[Callable] = Noneself._on_resume_session: Optional[Callable] = None+ # Cache for two-step routing flow (chat_id -> kwargs from settings_handler)+ self._routing_cache: Dict[str, Dict[str, Any]] = {}self._stop_event: Optional[asyncio.Event] = Noneself._loop: Optional[asyncio.AbstractEventLoop] = Noneself._recent_event_ids: Dict[str, float] = {}@@ -113,6 +136,14 @@ class FeishuBot(BaseIMClient):def should_use_thread_for_reply(self) -> bool:return True+ def _get_sdk_domain(self) -> str:+ """Return the lark-oapi SDK domain constant based on config."""+ import lark_oapi as lark++ if getattr(self.config, "domain", "feishu") == "lark":+ return lark.LARK_DOMAIN+ return lark.FEISHU_DOMAIN+def format_markdown(self, text: str) -> str:# Feishu's interactive card markdown is close to standard markdownreturn text@@ -130,6 +161,7 @@ class FeishuBot(BaseIMClient):lark.Client.builder().app_id(self.config.app_id).app_secret(self.config.app_secret)+ .domain(self._get_sdk_domain()).log_level(lark.LogLevel.WARNING).build())@@ -140,7 +172,7 @@ class FeishuBot(BaseIMClient):if self._cached_token and self._token_expires_at and time.time() < self._token_expires_at:return self._cached_tokentry:- url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"+ url = f"{self.config.api_base_url}/open-apis/auth/v3/tenant_access_token/internal"payload = json.dumps({"app_id": self.config.app_id, "app_secret": self.config.app_secret})timeout = aiohttp.ClientTimeout(total=10)async with aiohttp.ClientSession(timeout=timeout) as session:@@ -163,7 +195,7 @@ class FeishuBot(BaseIMClient):token = await self._get_tenant_token()if not token:return- url = "https://open.feishu.cn/open-apis/bot/v3/info"+ url = f"{self.config.api_base_url}/open-apis/bot/v3/info"timeout = aiohttp.ClientTimeout(total=10)async with aiohttp.ClientSession(timeout=timeout) as session:async with session.get(url, headers={"Authorization": f"Bearer {token}"}) as resp:@@ -275,7 +307,12 @@ class FeishuBot(BaseIMClient):return message_idasync def _reply_message(self, parent_id: str, text: str) -> str:- """Reply to an existing message (thread reply)."""+ """Reply to an existing message as a topic (reply_in_thread).++ Using ``reply_in_thread=True`` keeps replies collapsed inside+ a topic, similar to Slack threads, instead of flooding the+ main channel timeline.+ """self._ensure_client()from lark_oapi.api.im.v1 import (ReplyMessageRequest,@@ -286,7 +323,11 @@ class FeishuBot(BaseIMClient):ReplyMessageRequest.builder().message_id(parent_id).request_body(- ReplyMessageRequestBody.builder().msg_type("interactive").content(self._build_card_json(text)).build()+ ReplyMessageRequestBody.builder()+ .msg_type("interactive")+ .content(self._build_card_json(text))+ .reply_in_thread(True)+ .build()).build())@@ -306,25 +347,69 @@ class FeishuBot(BaseIMClient):text: str,buttons: Optional[List[List[dict]]] = None,) -> str:- """Build interactive card JSON for a message with optional buttons."""+ """Build interactive card JSON (v2) for a message with optional buttons.++ Uses JSON 2.0 card schema so that button callbacks are delivered via+ the ``card.action.trigger`` event, which supports WebSocket long+ connections.+ """elements: list = [{"tag": "markdown", "content": text}]if buttons:for row in buttons:- actions = []- for btn in row:- actions.append(+ if len(row) == 1:+ btn = row[0]+ behaviors_value: dict = {"key": btn["callback_data"]}+ if btn.get("thread_id"):+ behaviors_value["thread_id"] = btn["thread_id"]+ elements.append({"tag": "button","text": {"tag": "plain_text", "content": btn["text"]},"type": btn.get("type", "default"),- "value": {"key": btn["callback_data"]},+ "width": "fill",+ "behaviors": [+ {"type": "callback", "value": behaviors_value},+ ],+ }+ )+ else:+ columns = []+ for btn in row:+ behaviors_value = {"key": btn["callback_data"]}+ if btn.get("thread_id"):+ behaviors_value["thread_id"] = btn["thread_id"]+ columns.append(+ {+ "tag": "column",+ "width": "weighted",+ "weight": 1,+ "elements": [+ {+ "tag": "button",+ "text": {"tag": "plain_text", "content": btn["text"]},+ "type": btn.get("type", "default"),+ "behaviors": [+ {"type": "callback", "value": behaviors_value},+ ],+ }+ ],+ }+ )+ elements.append(+ {+ "tag": "column_set",+ "flex_mode": "none",+ "background_style": "default",+ "columns": columns,})- elements.append({"tag": "action", "actions": actions})card = {- "config": {"wide_screen_mode": True},- "elements": elements,+ "schema": "2.0",+ "body": {+ "direction": "vertical",+ "elements": elements,+ },}return json.dumps(card, ensure_ascii=False)@@ -349,7 +434,13 @@ class FeishuBot(BaseIMClient):for row in keyboard.buttons:btn_row = []for button in row:- btn_row.append({"text": button.text, "callback_data": button.callback_data})+ btn_row.append(+ {+ "text": button.text,+ "callback_data": button.callback_data,+ "thread_id": context.thread_id or "",+ }+ )button_rows.append(btn_row)card_json = self._build_card_json(text, button_rows)@@ -390,7 +481,7 @@ class FeishuBot(BaseIMClient):return message_idasync def _reply_message_with_card(self, parent_id: str, card_json: str) -> str:- """Reply to a message with an interactive card."""+ """Reply to a message with an interactive card (as topic)."""self._ensure_client()from lark_oapi.api.im.v1 import (ReplyMessageRequest,@@ -400,7 +491,13 @@ class FeishuBot(BaseIMClient):request = (ReplyMessageRequest.builder().message_id(parent_id)- .request_body(ReplyMessageRequestBody.builder().msg_type("interactive").content(card_json).build())+ .request_body(+ ReplyMessageRequestBody.builder()+ .msg_type("interactive")+ .content(card_json)+ .reply_in_thread(True)+ .build()+ ).build())@@ -509,7 +606,7 @@ class FeishuBot(BaseIMClient):)response = await self._lark_client.im.v1.message_reaction.acreate(request)if not response.success():- logger.debug(+ logger.warning("Feishu add_reaction failed: code=%s msg=%s",response.code,response.msg,@@ -530,7 +627,7 @@ class FeishuBot(BaseIMClient):return Falseemoji_type = _normalize_emoji(emoji)# List reactions- url = f"https://open.feishu.cn/open-apis/im/v1/messages/{message_id}/reactions"+ url = f"{self.config.api_base_url}/open-apis/im/v1/messages/{message_id}/reactions"async with aiohttp.ClientSession() as session:async with session.get(url, headers={"Authorization": f"Bearer {token}"}) as resp:if resp.status != 200:@@ -572,7 +669,7 @@ class FeishuBot(BaseIMClient):file_data = (content or "").encode("utf-8")# Upload via multipart form- url = "https://open.feishu.cn/open-apis/im/v1/files"+ url = f"{self.config.api_base_url}/open-apis/im/v1/files"form = aiohttp.FormData()form.add_field("file_type", "stream")form.add_field("file_name", title)@@ -613,7 +710,13 @@ class FeishuBot(BaseIMClient):request = (ReplyMessageRequest.builder().message_id(context.thread_id)- .request_body(ReplyMessageRequestBody.builder().msg_type("file").content(file_content).build())+ .request_body(+ ReplyMessageRequestBody.builder()+ .msg_type("file")+ .content(file_content)+ .reply_in_thread(True)+ .build()+ ).build())response = await self._lark_client.im.v1.message.areply(request)@@ -678,7 +781,7 @@ class FeishuBot(BaseIMClient):token = await self._get_tenant_token()if not token:return None- url = f"https://open.feishu.cn/open-apis/im/v1/messages/{message_id}/resources/{file_key}?type=file"+ url = f"{self.config.api_base_url}/open-apis/im/v1/messages/{message_id}/resources/{file_key}?type=file"timeout = aiohttp.ClientTimeout(total=timeout_seconds)async with aiohttp.ClientSession(timeout=timeout) as session:async with session.get(url, headers={"Authorization": f"Bearer {token}"}) as resp:@@ -711,7 +814,7 @@ class FeishuBot(BaseIMClient):file_key = msg_content.get("file_key", "")file_name = msg_content.get("file_name", "unknown")url = (- f"https://open.feishu.cn/open-apis/im/v1/messages/{message_id}/resources/{file_key}?type=file"+ f"{self.config.api_base_url}/open-apis/im/v1/messages/{message_id}/resources/{file_key}?type=file"if message_id and file_keyelse None)@@ -727,7 +830,7 @@ class FeishuBot(BaseIMClient):elif msg_type == "image":image_key = msg_content.get("image_key", "")url = (- f"https://open.feishu.cn/open-apis/im/v1/messages/{message_id}/resources/{image_key}?type=image"+ f"{self.config.api_base_url}/open-apis/im/v1/messages/{message_id}/resources/{image_key}?type=image"if message_id and image_keyelse None)@@ -744,7 +847,7 @@ class FeishuBot(BaseIMClient):file_key = msg_content.get("file_key", "")file_name = msg_content.get("file_name", "unknown")url = (- f"https://open.feishu.cn/open-apis/im/v1/messages/{message_id}/resources/{file_key}?type=file"+ f"{self.config.api_base_url}/open-apis/im/v1/messages/{message_id}/resources/{file_key}?type=file"if message_id and file_keyelse None)@@ -795,7 +898,7 @@ class FeishuBot(BaseIMClient):token = await self._get_tenant_token()if not token:return {"id": user_id}- url = f"https://open.feishu.cn/open-apis/contact/v3/users/{user_id}?user_id_type=open_id"+ url = f"{self.config.api_base_url}/open-apis/contact/v3/users/{user_id}?user_id_type=open_id"async with aiohttp.ClientSession() as session:async with session.get(url, headers={"Authorization": f"Bearer {token}"}) as resp:result = await resp.json()@@ -819,7 +922,7 @@ class FeishuBot(BaseIMClient):token = await self._get_tenant_token()if not token:return {"id": channel_id, "name": channel_id}- url = f"https://open.feishu.cn/open-apis/im/v1/chats/{channel_id}"+ url = f"{self.config.api_base_url}/open-apis/im/v1/chats/{channel_id}"async with aiohttp.ClientSession() as session:async with session.get(url, headers={"Authorization": f"Bearer {token}"}) as resp:result = await resp.json()@@ -848,12 +951,25 @@ class FeishuBot(BaseIMClient):async def _async_handle_message(self, event_data: Dict[str, Any]):"""Process an incoming message event asynchronously."""try:+ # Hot-reload config BEFORE reading any config values (require_mention, etc.)+ if self._controller and hasattr(self._controller, "_refresh_config_from_disk"):+ self._controller._refresh_config_from_disk()+event = event_datamessage = event.get("message", {})sender = event.get("sender", {})sender_id = sender.get("sender_id", {})sender_type = sender.get("sender_type", "")+ logger.info(+ "Feishu message event received: chat_id=%s, msg_id=%s, sender_type=%s, msg_type=%s, chat_type=%s",+ message.get("chat_id", "?"),+ message.get("message_id", "?"),+ sender_type,+ message.get("message_type", "?"),+ message.get("chat_type", "?"),+ )+# Ignore bot messagesif sender_type == "app":return@@ -884,7 +1000,7 @@ class FeishuBot(BaseIMClient):return# Extract @mentions from text and clean them- mentions = message.get("mentions", [])+ mentions = message.get("mentions") or []bot_mentioned = Falsefor mention in mentions:mention_key = mention.get("key", "")@@ -904,7 +1020,7 @@ class FeishuBot(BaseIMClient):if msg_type == "merge_forward":shared_text = await self._extract_shared_message_content(msg_content, msg_type)- if not text and not file_attachments and not shared_text:+ if not text and not file_attachments and not shared_text and not bot_mentioned:returnif not user_id:@@ -920,6 +1036,15 @@ class FeishuBot(BaseIMClient):chat_id, global_default=self.config.require_mention)+ logger.info(+ "Feishu mention check: require_mention=%s, is_p2p=%s, is_thread_reply=%s, bot_mentioned=%s, chat_id=%s",+ effective_require_mention,+ is_p2p,+ is_thread_reply,+ bot_mentioned,+ chat_id,+ )+if effective_require_mention and not is_p2p:if not is_thread_reply:if not bot_mentioned:@@ -1006,83 +1131,251 @@ class FeishuBot(BaseIMClient):asyncio.run_coroutine_threadsafe(self._async_handle_card_action(event_data), self._loop)async def _async_handle_card_action(self, event_data: Dict[str, Any]):- """Process a card button click asynchronously."""+ """Process a card button click or form submission asynchronously."""try:action = event_data.get("action", {})- value = action.get("value", {})+ value = action.get("value") or {}callback_data = value.get("key", "")+ callback_thread_id = value.get("thread_id", "")+ form_value = action.get("form_value")+ button_name = action.get("name", "")user_id = event_data.get("operator", {}).get("open_id", "")- # The open_message_id refers to the card message- message_id = event_data.get("open_message_id", "")- chat_id = event_data.get("open_chat_id", "")-- if not callback_data:- return+ # card.action.trigger puts IDs inside a "context" sub-object+ ctx_data = event_data.get("context", {})+ message_id = ctx_data.get("open_message_id", "") or event_data.get("open_message_id", "")+ chat_id = ctx_data.get("open_chat_id", "") or event_data.get("open_chat_id", "")context = MessageContext(user_id=user_id,channel_id=chat_id,message_id=message_id,+ thread_id=callback_thread_id or None,platform_specific={"event": event_data,"action": action,+ # Provide trigger_id so question_handler.open_question_modal()+ # doesn't abort with "Modal UI is not available".+ # Feishu doesn't use a real trigger_id (we send cards, not+ # popup modals), but the handler checks for a truthy value.+ "trigger_id": "feishu_card_action",},)- # Handle specific callback patterns for settings, routing, etc.- if callback_data.startswith("settings_"):- await self._handle_settings_callback(context, callback_data)- return-- if callback_data.startswith("routing_"):- await self._handle_routing_callback(context, callback_data)- return-- if callback_data.startswith("cwd_"):- await self._handle_cwd_callback(context, callback_data)- return-- if callback_data.startswith("resume_"):- await self._handle_resume_callback(context, callback_data)+ # --- Form submissions (action_type: form_submit) ---+ if form_value is not None:+ if button_name == "cwd_submit":+ await self._handle_cwd_form_submit(context, form_value)+ elif button_name == "settings_submit":+ await self._handle_settings_form_submit(context, form_value)+ elif button_name == "routing_backend_select":+ await self._handle_routing_backend_select(context, form_value)+ elif button_name == "routing_submit":+ await self._handle_routing_form_submit(context, form_value)+ elif button_name.startswith("question_submit"):+ await self._handle_question_form_submit(context, form_value, button_name)+ else:+ logger.warning("Unknown form submit button: %s", button_name)return- if callback_data.startswith("question_"):- await self._handle_question_callback(context, callback_data)+ # --- Regular button callbacks ---+ if not callback_data:return- # Generic callback+ # Route all callbacks through the generic handler, which sends+ # them to message_handler.handle_callback_query for proper routing.if self.on_callback_query_callback:await self.on_callback_query_callback(context, callback_data)except Exception as exc:logger.error("Error handling Feishu card action: %s", exc, exc_info=True)- async def _handle_settings_callback(self, context: MessageContext, data: str):- """Handle settings-related card callbacks."""- if hasattr(self, "_on_settings_update") and self._on_settings_update:- await self._on_settings_update(context, data)-- async def _handle_routing_callback(self, context: MessageContext, data: str):- """Handle routing-related card callbacks."""- if hasattr(self, "_on_routing_update") and self._on_routing_update:- await self._on_routing_update(context, data)-- async def _handle_cwd_callback(self, context: MessageContext, data: str):- """Handle CWD change card callbacks."""- if hasattr(self, "_on_change_cwd") and self._on_change_cwd:- parts = data.split(":", 1)- new_cwd = parts[1] if len(parts) > 1 else ""+ # ------------------------------------------------------------------+ # Form submission handlers (JSON 2.0 form container)+ # ------------------------------------------------------------------+ async def _handle_cwd_form_submit(self, context: MessageContext, form_value: Dict[str, Any]):+ """Handle CWD change form submission."""+ new_cwd = form_value.get("new_cwd", "").strip()+ if not new_cwd:+ logger.warning("CWD form submitted with empty path")+ return+ if self._on_change_cwd:await self._on_change_cwd(context.user_id, new_cwd, context.channel_id)- async def _handle_resume_callback(self, context: MessageContext, data: str):- """Handle session resume card callbacks."""- if hasattr(self, "_on_resume_session") and self._on_resume_session:- await self._on_resume_session(context, data)+ async def _handle_settings_form_submit(self, context: MessageContext, form_value: Dict[str, Any]):+ """Handle settings form submission."""+ show_message_types = form_value.get("show_message_types", [])+ # Ensure it's a list (Feishu multi_select_static returns a list)+ if isinstance(show_message_types, str):+ show_message_types = [show_message_types]++ require_mention_raw = form_value.get("require_mention", "__default__")+ if require_mention_raw == "true":+ require_mention = True+ elif require_mention_raw == "false":+ require_mention = False+ else:+ require_mention = None # __default__++ language = form_value.get("language")++ if self._on_settings_update:+ await self._on_settings_update(+ context.user_id,+ show_message_types,+ context.channel_id,+ require_mention,+ language,+ )++ async def _handle_routing_backend_select(self, context: MessageContext, form_value: Dict[str, Any]):+ """Handle step 1 of routing: user selected a backend, now show backend-specific options."""+ selected_backend = form_value.get("backend", "")+ if not selected_backend:+ logger.warning("Routing backend select submitted with empty backend")+ return++ cached = self._routing_cache.get(context.channel_id)+ if not cached:+ logger.warning("No cached routing data for channel %s", context.channel_id)+ return++ await self._send_routing_backend_options_card(+ channel_id=context.channel_id,+ selected_backend=selected_backend,+ **cached,+ )++ async def _handle_routing_form_submit(self, context: MessageContext, form_value: Dict[str, Any]):+ """Handle step 2 routing form submission (backend-specific options)."""+ # Backend is embedded in form as a disabled select or retrieved from cache+ backend = form_value.get("backend", "")+ if not backend:+ # Fallback: get from cache+ cached = self._routing_cache.get(context.channel_id, {})+ backend = cached.get("_selected_backend", "")++ # Helper to normalise "__default__" to None+ def _val(key: str):+ v = form_value.get(key)+ if v == "__default__" or not v:+ return None+ return v++ opencode_agent = _val("opencode_agent")+ opencode_model = _val("opencode_model")+ opencode_reasoning = _val("opencode_reasoning")+ claude_agent = _val("claude_agent")+ claude_model = _val("claude_model")+ codex_model = _val("codex_model")+ codex_reasoning = _val("codex_reasoning")++ if self._on_routing_update:+ await self._on_routing_update(+ context.user_id,+ context.channel_id,+ backend,+ opencode_agent,+ opencode_model,+ opencode_reasoning,+ claude_agent,+ claude_model,+ codex_model,+ codex_reasoning,+ )++ # ------------------------------------------------------------------+ # Question form submission handler+ # ------------------------------------------------------------------+ async def _handle_question_form_submit(self, context: MessageContext, form_value: Dict[str, Any], button_name: str):+ """Handle question modal form submission.++ Extracts answers from form fields (q0, q1, ...) and routes them+ through ``on_callback_query_callback`` as+ ``{callback_prefix}:modal:{json_payload}`` — the same format that+ Slack and Discord use, so the agent question handler can parse it+ identically.++ The button name encodes metadata as+ ``question_submit:{callback_prefix}:{question_count}:{thread_id}``.+ """+ # Parse metadata from button name: question_submit:opencode_question:2:om_xxx+ parts = button_name.split(":")+ callback_prefix = parts[1] if len(parts) > 1 else "opencode_question"+ question_count = int(parts[2]) if len(parts) > 2 else 1+ embedded_thread_id = parts[3] if len(parts) > 3 else ""++ # Restore thread_id on context if available from the embedded metadata,+ # since Feishu form submissions lose the thread context.+ if embedded_thread_id and not context.thread_id:+ context = MessageContext(+ user_id=context.user_id,+ channel_id=context.channel_id,+ message_id=context.message_id,+ thread_id=embedded_thread_id,+ platform_specific=context.platform_specific,+ )++ answers: list = []+ for idx in range(question_count):+ field_key = f"q{idx}"+ raw = form_value.get(field_key)+ if isinstance(raw, list):+ # multi_select_static returns a list of selected values+ answers.append([str(v) for v in raw if v])+ elif raw:+ # select_static returns a single string value+ answers.append([str(raw)])+ else:+ answers.append([])++ logger.info(+ "Question form submitted: prefix=%s, count=%d, answers=%s",+ callback_prefix,+ question_count,+ answers,+ )++ payload = json.dumps({"answers": answers})+ callback_data = f"{callback_prefix}:modal:{payload}"++ # Replace the interactive form card with a static confirmation so it+ # doesn't stay clickable after submission (Feishu cards persist by default).+ if context.message_id:+ flat = ", ".join(a for group in answers for a in group) or "-"+ done_card = json.dumps(+ {+ "schema": "2.0",+ "header": {+ "title": {+ "tag": "plain_text",+ "content": "✅ " + self._t("common.submitted", context.channel_id),+ },+ "template": "green",+ },+ "body": {+ "direction": "vertical",+ "elements": [{"tag": "markdown", "content": flat}],+ },+ },+ ensure_ascii=False,+ )+ try:+ from lark_oapi.api.im.v1 import PatchMessageRequest, PatchMessageRequestBody++ req = (+ PatchMessageRequest.builder()+ .message_id(context.message_id)+ .request_body(PatchMessageRequestBody.builder().content(done_card).build())+ .build()+ )+ resp = await self._lark_client.im.v1.message.apatch(req)+ if not resp.success():+ logger.warning("Failed to update question card after submit: %s", resp.msg)+ except Exception as exc:+ logger.warning("Could not update question card: %s", exc)- async def _handle_question_callback(self, context: MessageContext, data: str):- """Handle question answer card callbacks."""if self.on_callback_query_callback:- await self.on_callback_query_callback(context, data)+ await self.on_callback_query_callback(context, callback_data)# ------------------------------------------------------------------# Modal-equivalent: interactive cards sent as messages@@ -1098,56 +1391,130 @@ class FeishuBot(BaseIMClient):global_require_mention: bool = False,current_language: str = None,):- """Send an interactive card with settings options.-- Since Feishu doesn't have Slack-style modals, we send a settings card.- """+ """Send a JSON 2.0 form card with settings (message types, @mention, language)."""t = lambda key, **kw: self._t(key, channel_id, **kw)- # Build message type options as buttons- elements: list = []- elements.append({"tag": "markdown", "content": f"**{t('modal.settings.title')}**"})-- # Show message types- types_text = ", ".join(f"`{display_names.get(mt, mt)}`" for mt in message_types)current_types = getattr(user_settings, "show_message_types", [])- current_text = ", ".join(f"`{display_names.get(mt, mt)}`" for mt in current_types)- elements.append(- {- "tag": "markdown",- "content": f"{t('modal.settings.showMessageTypes')}: {current_text}",- }- )- # Require mention status- mention_status = "default"+ # --- Build message type multi-select options ---+ msg_type_options = []+ for mt in message_types:+ msg_type_options.append(+ {+ "text": {"tag": "plain_text", "content": display_names.get(mt, mt)},+ "value": mt,+ }+ )++ # --- Build require-mention single-select options ---+ global_status = (+ t("modal.settings.mentionStatusOn") if global_require_mention else t("modal.settings.mentionStatusOff")+ )+ mention_options = [+ {+ "text": {"tag": "plain_text", "content": t("modal.settings.optionDefault", status=global_status)},+ "value": "__default__",+ },+ {+ "text": {"tag": "plain_text", "content": t("modal.settings.optionRequireMention")},+ "value": "true",+ },+ {+ "text": {"tag": "plain_text", "content": t("modal.settings.optionDontRequireMention")},+ "value": "false",+ },+ ]+ # Determine current mention selectionif current_require_mention is True:- mention_status = "on"+ mention_initial = "true"elif current_require_mention is False:- mention_status = "off"- elements.append(- {- "tag": "markdown",- "content": f"Require @mention: **{mention_status}**",- }- )+ mention_initial = "false"+ else:+ mention_initial = "__default__"- # Language- if current_language:- elements.append(+ # --- Build language single-select options ---+ supported_langs = get_supported_languages()+ lang_options = []+ for lang in supported_langs:+ lang_options.append({- "tag": "markdown",- "content": f"Language: **{current_language}**",+ "text": {"tag": "plain_text", "content": lang},+ "value": lang,})+ lang_initial = current_language if current_language in supported_langs else supported_langs[0]++ # --- Assemble form card ---+ form_elements: list = [+ # Message visibility multi-select+ {"tag": "markdown", "content": f"**{t('modal.settings.showMessageTypes')}**"},+ {+ "tag": "multi_select_static",+ "name": "show_message_types",+ "placeholder": {+ "tag": "plain_text",+ "content": t("modal.settings.showMessageTypesPlaceholder"),+ },+ "options": msg_type_options,+ "selected_values": current_types,+ },+ # Require @mention single-select+ {"tag": "markdown", "content": f"**{t('modal.settings.requireMention')}**"},+ {+ "tag": "select_static",+ "name": "require_mention",+ "placeholder": {+ "tag": "plain_text",+ "content": t("modal.settings.selectMentionBehavior"),+ },+ "options": mention_options,+ "initial_option": mention_initial,+ },+ # Lark permission note for @mention+ {"tag": "markdown", "content": f"_{t('modal.settings.requireMentionLarkNote')}_"},+ # Language single-select+ {"tag": "markdown", "content": f"**{t('modal.settings.language')}**"},+ {+ "tag": "select_static",+ "name": "language",+ "placeholder": {+ "tag": "plain_text",+ "content": t("modal.settings.language"),+ },+ "options": lang_options,+ "initial_option": lang_initial,+ },+ # Tip+ {+ "tag": "markdown",+ "content": t("modal.settings.tip"),+ },+ # Submit button+ {+ "tag": "button",+ "text": {"tag": "plain_text", "content": t("common.save")},+ "type": "primary",+ "action_type": "form_submit",+ "name": "settings_submit",+ },+ ]card = {- "config": {"wide_screen_mode": True},+ "schema": "2.0","header": {"title": {"tag": "plain_text", "content": t("modal.settings.title")},"template": "blue",},- "elements": elements,+ "body": {+ "direction": "vertical",+ "elements": [+ {+ "tag": "form",+ "name": "settings_form",+ "elements": form_elements,+ },+ ],+ },}ctx = MessageContext(user_id="system", channel_id=channel_id or "")@@ -1157,30 +1524,57 @@ class FeishuBot(BaseIMClient):logger.error("Failed to send settings card: %s", exc)async def open_change_cwd_modal(self, trigger_id: Any, current_cwd: str, channel_id: str = None):- """Send an interactive card for CWD change."""+ """Send a JSON 2.0 form card for changing the working directory."""t = lambda key, **kw: self._t(key, channel_id, **kw)- elements = [- {- "tag": "markdown",- "content": f"**Change Working Directory**\n\nCurrent: `{current_cwd}`",+ card = {+ "schema": "2.0",+ "header": {+ "title": {"tag": "plain_text", "content": t("modal.cwd.title")},+ "template": "blue",},- {- "tag": "note",+ "body": {+ "direction": "vertical","elements": [{- "tag": "plain_text",- "content": "Reply with `/cwd <new_path>` to change the working directory.",- }+ "tag": "markdown",+ "content": t("modal.cwd.current") + f" `{current_cwd}`",+ },+ {+ "tag": "form",+ "name": "cwd_form",+ "elements": [+ {+ "tag": "input",+ "name": "new_cwd",+ "required": True,+ "label": {+ "tag": "plain_text",+ "content": t("modal.cwd.new"),+ },+ "placeholder": {+ "tag": "plain_text",+ "content": t("modal.cwd.placeholder"),+ },+ "default_value": current_cwd,+ },+ {+ "tag": "markdown",+ "content": t("modal.cwd.hint"),+ },+ {+ "tag": "button",+ "text": {+ "tag": "plain_text",+ "content": t("common.submit"),+ },+ "type": "primary",+ "action_type": "form_submit",+ "name": "cwd_submit",+ },+ ],+ },],},- ]- card = {- "config": {"wide_screen_mode": True},- "header": {- "title": {"tag": "plain_text", "content": "Working Directory"},- "template": "blue",- },- "elements": elements,}ctx = MessageContext(user_id="system", channel_id=channel_id or "")try:@@ -1195,35 +1589,308 @@ class FeishuBot(BaseIMClient):current_backend: str = None,**kwargs,):- """Send an interactive card for routing configuration."""- elements = [+ """Step 1: send a card with only the backend selector.++ All backend/model/agent data is cached so that step 2+ (``_send_routing_backend_options_card``) can render the+ backend-specific options without re-fetching.+ """+ t = lambda key, **kw: self._t(key, channel_id, **kw)++ registered_backends = kwargs.get("registered_backends", [])++ # Cache everything for step 2+ self._routing_cache[channel_id or ""] = {+ "current_routing": kwargs.get("current_routing"),+ "registered_backends": registered_backends,+ "opencode_agents": kwargs.get("opencode_agents", []),+ "opencode_models": kwargs.get("opencode_models", {}),+ "opencode_default_config": kwargs.get("opencode_default_config", {}),+ "claude_agents": kwargs.get("claude_agents", []),+ "claude_models": kwargs.get("claude_models", []),+ "codex_models": kwargs.get("codex_models", []),+ }++ # --- Backend selector options ---+ backend_options = []+ for b in registered_backends:+ backend_options.append(+ {+ "text": {"tag": "plain_text", "content": b},+ "value": b,+ }+ )+ backend_initial = (+ current_backend+ if current_backend and current_backend in registered_backends+ else (registered_backends[0] if registered_backends else None)+ )++ if not backend_options:+ # No backends — just show info+ ctx = MessageContext(user_id="system", channel_id=channel_id or "")+ await self.send_message(ctx, "No agent backends available.")+ return++ form_elements: list = [+ {"tag": "markdown", "content": f"**{t('modal.routing.backend')}**"},{- "tag": "markdown",- "content": f"**Agent Routing**\n\nCurrent backend: `{current_backend or 'default'}`",+ "tag": "select_static",+ "name": "backend",+ "placeholder": {"tag": "plain_text", "content": t("modal.routing.selectBackend")},+ "options": backend_options,+ **({"initial_option": backend_initial} if backend_initial else {}),},+ {"tag": "markdown", "content": t("modal.routing.tip")},{- "tag": "note",+ "tag": "button",+ "text": {+ "tag": "plain_text",+ "content": t("common.next"),+ },+ "type": "primary",+ "action_type": "form_submit",+ "name": "routing_backend_select",+ },+ ]++ card = {+ "schema": "2.0",+ "header": {+ "title": {"tag": "plain_text", "content": t("modal.routing.title")},+ "template": "blue",+ },+ "body": {+ "direction": "vertical","elements": [{- "tag": "plain_text",- "content": "Use /routing <backend> to change the agent backend.",- }+ "tag": "form",+ "name": "routing_backend_form",+ "elements": form_elements,+ },],},+ }++ ctx = MessageContext(user_id="system", channel_id=channel_id or "")+ try:+ await self._send_card_to_channel(ctx, card)+ except Exception as exc:+ logger.error("Failed to send routing backend card: %s", exc)++ async def _send_routing_backend_options_card(+ self,+ channel_id: str,+ selected_backend: str,+ **kwargs,+ ):+ """Step 2: send a card with options specific to the selected backend."""+ t = lambda key, **kw: self._t(key, channel_id, **kw)++ current_routing = kwargs.get("current_routing")+ opencode_agents = kwargs.get("opencode_agents", [])+ opencode_models = kwargs.get("opencode_models", {})+ opencode_default_config = kwargs.get("opencode_default_config", {})+ claude_agents = kwargs.get("claude_agents", [])+ claude_models = kwargs.get("claude_models", [])+ codex_models = kwargs.get("codex_models", [])++ # Store selected backend for the final submit handler+ cache = self._routing_cache.get(channel_id, {})+ cache["_selected_backend"] = selected_backend+ self._routing_cache[channel_id] = cache++ form_elements: list = [+ # Show selected backend (read-only display)+ {"tag": "markdown", "content": f"**{t('modal.routing.backend')}**: `{selected_backend}`"},]++ # ---- OpenCode section ----+ if selected_backend == "opencode":+ # OpenCode agent selector+ if opencode_agents:+ oc_agent_options = [{"text": {"tag": "plain_text", "content": "(Default)"}, "value": "__default__"}]+ for agent_info in opencode_agents:+ name = agent_info if isinstance(agent_info, str) else agent_info.get("name", str(agent_info))+ oc_agent_options.append({"text": {"tag": "plain_text", "content": name}, "value": name})+ oc_current_agent = getattr(current_routing, "opencode_agent", None) if current_routing else None+ form_elements.append({"tag": "markdown", "content": t("modal.routing.opencodeAgent")})+ form_elements.append(+ {+ "tag": "select_static",+ "name": "opencode_agent",+ "placeholder": {"tag": "plain_text", "content": t("modal.routing.selectOpencodeAgent")},+ "options": oc_agent_options,+ "initial_option": oc_current_agent if oc_current_agent else "__default__",+ }+ )++ # OpenCode model selector (using shared utility)+ oc_current_model = getattr(current_routing, "opencode_model", None) if current_routing else None+ preferred_providers = resolve_opencode_provider_preferences(+ opencode_default_config,+ oc_current_model,+ )+ allowed_providers = resolve_opencode_allowed_providers(+ opencode_default_config,+ opencode_models,+ )+ model_entries = build_opencode_model_option_items(+ opencode_models,+ max_total=99,+ preferred_providers=preferred_providers,+ allowed_providers=allowed_providers,+ )+ if model_entries:+ oc_model_options = [{"text": {"tag": "plain_text", "content": "(Default)"}, "value": "__default__"}]+ for entry in model_entries:+ label = entry.get("label", "")+ value = entry.get("value", "")+ if not label or not value:+ continue+ oc_model_options.append({"text": {"tag": "plain_text", "content": label[:60]}, "value": value})+ form_elements.append({"tag": "markdown", "content": t("modal.routing.model")})+ form_elements.append(+ {+ "tag": "select_static",+ "name": "opencode_model",+ "placeholder": {"tag": "plain_text", "content": t("modal.routing.selectModel")},+ "options": oc_model_options,+ "initial_option": oc_current_model if oc_current_model else "__default__",+ }+ )++ # OpenCode reasoning effort (using shared utility)+ re_entries = build_reasoning_effort_options(opencode_models, oc_current_model)+ re_options = []+ for entry in re_entries:+ label = entry.get("label", "")+ value = entry.get("value", "")+ if not label or not value:+ continue+ re_options.append({"text": {"tag": "plain_text", "content": label}, "value": value})+ oc_current_re = getattr(current_routing, "opencode_reasoning_effort", None) if current_routing else None+ if re_options:+ form_elements.append({"tag": "markdown", "content": t("modal.routing.reasoningEffort")})+ form_elements.append(+ {+ "tag": "select_static",+ "name": "opencode_reasoning",+ "placeholder": {"tag": "plain_text", "content": t("modal.routing.selectReasoningEffort")},+ "options": re_options,+ "initial_option": oc_current_re if oc_current_re else "__default__",+ }+ )++ # ---- Claude section ----+ elif selected_backend == "claude":+ # Claude agent selector+ if claude_agents:+ cl_agent_options = [{"text": {"tag": "plain_text", "content": "(Default)"}, "value": "__default__"}]+ for agent_info in claude_agents:+ name = agent_info if isinstance(agent_info, str) else agent_info.get("name", str(agent_info))+ cl_agent_options.append({"text": {"tag": "plain_text", "content": name}, "value": name})+ cl_current_agent = getattr(current_routing, "claude_agent", None) if current_routing else None+ form_elements.append({"tag": "markdown", "content": t("modal.routing.claudeAgent")})+ form_elements.append(+ {+ "tag": "select_static",+ "name": "claude_agent",+ "placeholder": {"tag": "plain_text", "content": t("modal.routing.selectClaudeAgent")},+ "options": cl_agent_options,+ "initial_option": cl_current_agent if cl_current_agent else "__default__",+ }+ )++ # Claude model selector+ if claude_models:+ cl_model_options = [{"text": {"tag": "plain_text", "content": "(Default)"}, "value": "__default__"}]+ for m in claude_models:+ mid = m if isinstance(m, str) else m.get("id", str(m))+ cl_model_options.append({"text": {"tag": "plain_text", "content": mid}, "value": mid})+ cl_current_model = getattr(current_routing, "claude_model", None) if current_routing else None+ form_elements.append({"tag": "markdown", "content": t("modal.routing.model")})+ form_elements.append(+ {+ "tag": "select_static",+ "name": "claude_model",+ "placeholder": {"tag": "plain_text", "content": t("modal.routing.selectModel")},+ "options": cl_model_options,+ "initial_option": cl_current_model if cl_current_model else "__default__",+ }+ )++ # ---- Codex section ----+ elif selected_backend == "codex":+ # Codex model selector+ if codex_models:+ cx_model_options = [{"text": {"tag": "plain_text", "content": "(Default)"}, "value": "__default__"}]+ for m in codex_models:+ mid = m if isinstance(m, str) else m.get("id", str(m))+ cx_model_options.append({"text": {"tag": "plain_text", "content": mid}, "value": mid})+ cx_current_model = getattr(current_routing, "codex_model", None) if current_routing else None+ form_elements.append({"tag": "markdown", "content": t("modal.routing.model")})+ form_elements.append(+ {+ "tag": "select_static",+ "name": "codex_model",+ "placeholder": {"tag": "plain_text", "content": t("modal.routing.selectModel")},+ "options": cx_model_options,+ "initial_option": cx_current_model if cx_current_model else "__default__",+ }+ )++ # Codex reasoning effort+ reasoning_efforts = ["low", "medium", "high"]+ cx_re_options = [{"text": {"tag": "plain_text", "content": "(Default)"}, "value": "__default__"}]+ for re_val in reasoning_efforts:+ cx_re_options.append({"text": {"tag": "plain_text", "content": re_val}, "value": re_val})+ cx_current_re = getattr(current_routing, "codex_reasoning_effort", None) if current_routing else None+ form_elements.append({"tag": "markdown", "content": t("modal.routing.codexReasoningEffort")})+ form_elements.append(+ {+ "tag": "select_static",+ "name": "codex_reasoning",+ "placeholder": {"tag": "plain_text", "content": t("modal.routing.selectReasoningEffort")},+ "options": cx_re_options,+ "initial_option": cx_current_re if cx_current_re else "__default__",+ }+ )++ # Submit button+ form_elements.append(+ {+ "tag": "button",+ "text": {"tag": "plain_text", "content": t("common.save")},+ "type": "primary",+ "action_type": "form_submit",+ "name": "routing_submit",+ }+ )+card = {- "config": {"wide_screen_mode": True},+ "schema": "2.0","header": {- "title": {"tag": "plain_text", "content": "Agent Routing"},+ "title": {"tag": "plain_text", "content": f"{t('modal.routing.title')} — {selected_backend}"},"template": "blue",},- "elements": elements,+ "body": {+ "direction": "vertical",+ "elements": [+ {+ "tag": "form",+ "name": "routing_options_form",+ "elements": form_elements,+ },+ ],+ },}+ctx = MessageContext(user_id="system", channel_id=channel_id or "")try:await self._send_card_to_channel(ctx, card)except Exception as exc:- logger.error("Failed to send routing card: %s", exc)+ logger.error("Failed to send routing options card: %s", exc)async def open_resume_session_modal(self,@@ -1232,36 +1899,39 @@ class FeishuBot(BaseIMClient):channel_id: str = None,**kwargs,):- """Send an interactive card for session resume selection."""+ """Send an interactive card (v2) for session resume selection."""elements = [{"tag": "markdown", "content": "**Resume Session**"},]if sessions:- actions = []for session in sessions[:10]: # Limit to 10 sessionssession_id = session.get("id", "")label = session.get("label", session_id[:8])- actions.append(+ elements.append({"tag": "button","text": {"tag": "plain_text", "content": label},"type": "default",- "value": {"key": f"resume_{session_id}"},+ "width": "fill",+ "behaviors": [+ {"type": "callback", "value": {"key": f"resume_{session_id}"}},+ ],})- if actions:- elements.append({"tag": "action", "actions": actions})else:elements.append({"tag": "markdown", "content": "_No active sessions found._"})card = {- "config": {"wide_screen_mode": True},+ "schema": "2.0","header": {"title": {"tag": "plain_text", "content": "Resume Session"},"template": "blue",},- "elements": elements,+ "body": {+ "direction": "vertical",+ "elements": elements,+ },}ctx = MessageContext(user_id="system", channel_id=channel_id or "")try:@@ -1272,44 +1942,160 @@ class FeishuBot(BaseIMClient):async def open_question_modal(self,trigger_id: Any,- question: str = "",- options: list = None,- channel_id: str = None,- thread_id: str = None,+ context: MessageContext = None,+ pending: Any = None,+ callback_prefix: str = "opencode_question",**kwargs,):- """Send an interactive card with question options."""- elements = [- {"tag": "markdown", "content": question or "Please select an option:"},- ]+ """Send a JSON 2.0 form card with question select fields.++ Aligns with the Slack/Discord ``open_question_modal`` signature so that+ ``question_handler.py`` can call it identically across platforms.++ ``pending`` can be:+ - A dict with ``"questions"`` key (OpenCode question handler format).+ - A ``PendingQuestion`` dataclass with ``.questions`` attribute.++ Each question has ``header``, ``question``, ``multiple``, and ``options``+ (each option has ``label`` and optionally ``description``).+ """+ if pending is None:+ logger.warning("open_question_modal called with pending=None, nothing to show")+ return- if options:- actions = []- for idx, opt in enumerate(options):- if isinstance(opt, dict):- label = opt.get("label", opt.get("text", f"Option {idx + 1}"))- value = opt.get("value", opt.get("callback_data", f"question_{idx}"))+ # Support both dict and dataclass+ if hasattr(pending, "questions"):+ questions = pending.questions or []+ elif isinstance(pending, dict):+ questions = pending.get("questions") or []+ else:+ questions = []++ if not questions:+ logger.warning("open_question_modal called with empty questions list")+ return++ # Determine channel/thread from the context+ channel_id = context.channel_id if context else ""+ thread_id = context.thread_id if context else None++ t = lambda key, **kw: self._t(key, channel_id, **kw)++ form_elements: list = []++ for idx, q in enumerate(questions):+ # Support both Question dataclass and dict+ if hasattr(q, "header"):+ header = (q.header or f"Question {idx + 1}").strip()+ prompt = (q.question or "").strip()+ multiple = bool(q.multiple)+ options = q.options or []+ elif isinstance(q, dict):+ header = (q.get("header") or f"Question {idx + 1}").strip()+ prompt = (q.get("question") or "").strip()+ multiple = bool(q.get("multiple") or q.get("multiSelect"))+ options = q.get("options") if isinstance(q.get("options"), list) else []+ else:+ continue++ # Build option items for the select component+ option_items = []+ for opt in options:+ if hasattr(opt, "label"):+ label = opt.label+ desc = getattr(opt, "description", "")+ elif isinstance(opt, dict):+ label = opt.get("label")+ desc = opt.get("description", "")else:label = str(opt)- value = f"question_{idx}"- actions.append(+ desc = ""+ if label is None:+ continue+ option_items.append({- "tag": "button",- "text": {"tag": "plain_text", "content": label},- "type": "default",- "value": {"key": value},+ "text": {"tag": "plain_text", "content": str(label)[:75]},+ "value": str(label),})- if actions:- elements.append({"tag": "action", "actions": actions})++ if not option_items:+ continue++ # Label text (markdown element before the select — Feishu selects don't support label)+ label_text = header+ if prompt:+ label_text = f"{header}: {prompt}"+ form_elements.append(+ {+ "tag": "markdown",+ "content": f"**{label_text}**",+ }+ )++ field_name = f"q{idx}"+ if multiple:+ form_elements.append(+ {+ "tag": "multi_select_static",+ "name": field_name,+ "placeholder": {"tag": "plain_text", "content": t("common.selectOneOrMore")},+ "options": option_items,+ }+ )+ else:+ form_elements.append(+ {+ "tag": "select_static",+ "name": field_name,+ "placeholder": {"tag": "plain_text", "content": t("common.selectOne")},+ "options": option_items,+ }+ )++ if not form_elements:+ logger.warning("open_question_modal: no valid questions produced form elements")+ return++ # Submit button — encode metadata in button name since Feishu+ # does NOT include behaviors.value for form_submit actions.+ # Format: question_submit:{callback_prefix}:{question_count}:{thread_id}+ thread_id_enc = thread_id or ""+ submit_name = f"question_submit:{callback_prefix}:{len(questions)}:{thread_id_enc}"+ form_elements.append(+ {+ "tag": "button",+ "text": {"tag": "plain_text", "content": t("common.submit")},+ "type": "primary",+ "width": "fill",+ "action_type": "form_submit",+ "name": submit_name,+ }+ )++ title = t("modal.question.claudeCode") if callback_prefix.startswith("claude") else t("modal.question.opencode")card = {- "config": {"wide_screen_mode": True},- "elements": elements,+ "schema": "2.0",+ "header": {+ "title": {"tag": "plain_text", "content": title},+ "template": "blue",+ },+ "body": {+ "direction": "vertical",+ "elements": [+ {+ "tag": "form",+ "name": "question_form",+ "elements": form_elements,+ },+ ],+ },}+ctx = MessageContext(- user_id="system",- channel_id=channel_id or "",+ user_id=context.user_id if context else "system",+ channel_id=channel_id,thread_id=thread_id,)try:@@ -1317,6 +2103,20 @@ class FeishuBot(BaseIMClient):except Exception as exc:logger.error("Failed to send question card: %s", exc)+ async def open_opencode_question_modal(+ self,+ trigger_id: Any,+ context: MessageContext = None,+ pending: Any = None,+ ):+ """Convenience wrapper matching the preferred OpenCode question handler call."""+ await self.open_question_modal(+ trigger_id=trigger_id,+ context=context,+ pending=pending,+ callback_prefix="opencode_question",+ )+async def _send_card_to_channel(self, context: MessageContext, card: dict) -> str:"""Send a raw card JSON to a channel."""self._ensure_client()@@ -1414,7 +2214,13 @@ class FeishuBot(BaseIMClient):logger.error("Error in on_message_receive: %s", exc, exc_info=True)def on_card_action(data):- """Callback for card.action.trigger events."""+ """Callback for card.action.trigger events.++ Must return a P2CardActionTriggerResponse so the SDK can+ reply to Feishu within the 3-second window.+ """+ from lark_oapi.event.callback.model.p2_card_action_trigger import P2CardActionTriggerResponse+try:event_dict = {}if hasattr(data, "event") and data.event:@@ -1426,6 +2232,8 @@ class FeishuBot(BaseIMClient):self._handle_card_action(event_dict)except Exception as exc:logger.error("Error in on_card_action: %s", exc, exc_info=True)+ # Always return a response to avoid Feishu "request failed" toast+ return P2CardActionTriggerResponse({})handler = (lark.EventDispatcherHandler.builder("", "")@@ -1475,12 +2283,20 @@ class FeishuBot(BaseIMClient):app_id=self.config.app_id,app_secret=self.config.app_secret,event_handler=event_handler,- log_level=lark.LogLevel.WARNING,+ log_level=lark.LogLevel.INFO,+ domain=self._get_sdk_domain(),)import threading- ws_thread = threading.Thread(target=self._ws_client.start, daemon=True, name="feishu-ws")+ def _ws_thread_target():+ try:+ logger.info("Feishu WS thread starting, domain=%s", self._get_sdk_domain())+ self._ws_client.start()+ except Exception as exc:+ logger.error("Feishu WS thread crashed: %s", exc, exc_info=True)++ ws_thread = threading.Thread(target=_ws_thread_target, daemon=True, name="feishu-ws")ws_thread.start()logger.info("Feishu WebSocket client started")diff --git a/modules/im/slack.py b/modules/im/slack.pyindex bfd620570..16d7d6d8c 100644--- a/modules/im/slack.py+++ b/modules/im/slack.py@@ -795,6 +795,10 @@ class SlackBot(BaseIMClient):returnif event_type == "message":+ # Hot-reload config BEFORE reading any config values (require_mention, etc.)+ if self._controller and hasattr(self._controller, "_refresh_config_from_disk"):+ self._controller._refresh_config_from_disk()+# Ignore bot messagesif event.get("bot_id"):return@@ -1640,7 +1644,9 @@ class SlackBot(BaseIMClient):multi_select_element["initial_options"] = selected_options# Build require_mention selector- global_mention_label = t("common.on") if global_require_mention else t("common.off")+ global_mention_label = (+ t("modal.settings.mentionStatusOn") if global_require_mention else t("modal.settings.mentionStatusOff")+ )require_mention_options = [{"text": {"type": "plain_text", "text": t("modal.settings.optionDefault", status=global_mention_label)},diff --git a/modules/settings_manager.py b/modules/settings_manager.pyindex 248384a51..34761d476 100644--- a/modules/settings_manager.py+++ b/modules/settings_manager.py@@ -494,18 +494,16 @@ class SettingsManager:def is_message_already_processed(self, channel_id: str, thread_ts: str, message_ts: str) -> bool:"""Check if a message has already been processed.- Compares the message_ts with the last processed message ts for the thread.- Returns True if message_ts <= last_processed_ts (i.e., already processed).+ Uses set-based exact-match dedup to support all platforms:+ - Slack timestamps (epoch.sequence) — monotonic but set-match still works+ - Feishu message IDs (om_xxxxx) — NOT monotonic, need exact match+ - Discord message IDs — snowflake integers"""- last_ts = self.sessions_store.get_last_processed_message_ts(channel_id, thread_ts)- if not last_ts:- return False- # Slack ts format is "epoch.sequence", can be compared as strings- return message_ts <= last_ts+ return self.sessions_store.is_message_in_processed_set(channel_id, thread_ts, message_ts)def record_processed_message(self, channel_id: str, thread_ts: str, message_ts: str) -> None:"""Record that a message has been processed."""- self.sessions_store.set_last_processed_message_ts(channel_id, thread_ts, message_ts)+ self.sessions_store.add_to_processed_set(channel_id, thread_ts, message_ts)logger.debug(f"Recorded processed message: channel={channel_id}, thread={thread_ts}, message={message_ts}")# ---------------------------------------------diff --git a/scripts/test_feishu_ws.py b/scripts/test_feishu_ws.pynew file mode 100644index 000000000..5e3c2a6e4--- /dev/null+++ b/scripts/test_feishu_ws.py@@ -0,0 +1,135 @@+#!/usr/bin/env python3+"""Standalone test: verify Feishu/Lark WebSocket connection + event receiving."""++import json+import sys+import time+import threading++sys.path.insert(0, ".")++from config.v2_config import V2Config+++def main():+ config = V2Config.load()+ lark_cfg = config.lark+ if not lark_cfg or not lark_cfg.app_id:+ print("ERROR: No lark config found")+ return++ print(f"App ID: {lark_cfg.app_id}")+ print(f"Domain: {lark_cfg.domain}")+ print(f"Base URL: {lark_cfg.api_base_url}")++ import lark_oapi as lark++ domain = lark.LARK_DOMAIN if lark_cfg.domain == "lark" else lark.FEISHU_DOMAIN+ print(f"SDK domain: {domain}")++ # --- Step 1: verify REST API (tenant token) ---+ print("\n--- Step 1: REST API test (get tenant token) ---")+ import requests++ resp = requests.post(+ f"{lark_cfg.api_base_url}/open-apis/auth/v3/tenant_access_token/internal",+ json={"app_id": lark_cfg.app_id, "app_secret": lark_cfg.app_secret},+ )+ token_data = resp.json()+ if token_data.get("code") != 0:+ print(f"FAIL: {token_data}")+ return+ token = token_data["tenant_access_token"]+ print(f"OK: got tenant token (expires in {token_data.get('expire')}s)")++ # --- Step 2: verify bot info ---+ print("\n--- Step 2: Bot info test ---")+ resp2 = requests.get(+ f"{lark_cfg.api_base_url}/open-apis/bot/v3/info",+ headers={"Authorization": f"Bearer {token}"},+ )+ bot_data = resp2.json()+ if bot_data.get("code") != 0:+ print(f"FAIL: {bot_data}")+ return+ bot_open_id = bot_data.get("bot", {}).get("open_id")+ print(f"OK: bot open_id = {bot_open_id}")++ # --- Step 3: WebSocket connection test ---+ print("\n--- Step 3: WebSocket connection test ---")+ print("Building event handler...")++ received_events = []++ def on_message(data):+ print(f"\n*** EVENT RECEIVED ***")+ try:+ if hasattr(data, "header"):+ print(f" event_type: {data.header.event_type}")+ print(f" event_id: {data.header.event_id}")+ if hasattr(data, "event") and data.event:+ event = data.event+ msg = getattr(event, "message", None)+ if msg:+ print(f" message_id: {getattr(msg, 'message_id', '?')}")+ print(f" message_type: {getattr(msg, 'message_type', '?')}")+ print(f" content: {getattr(msg, 'content', '?')}")+ print(f" chat_type: {getattr(msg, 'chat_type', '?')}")+ print(f" chat_id: {getattr(msg, 'chat_id', '?')}")+ sender = getattr(event, "sender", None)+ if sender:+ sid = getattr(sender, "sender_id", None)+ print(f" sender_type: {getattr(sender, 'sender_type', '?')}")+ if sid:+ print(f" open_id: {getattr(sid, 'open_id', '?')}")+ except Exception as exc:+ print(f" (parse error: {exc})")+ received_events.append(data)++ handler = lark.EventDispatcherHandler.builder("", "").register_p2_im_message_receive_v1(on_message).build()++ print(f"Creating WS client with domain={domain}")+ ws_client = lark.ws.Client(+ app_id=lark_cfg.app_id,+ app_secret=lark_cfg.app_secret,+ event_handler=handler,+ log_level=lark.LogLevel.DEBUG,+ domain=domain,+ )++ ws_error = [None]++ def ws_thread():+ try:+ ws_client.start()+ except Exception as exc:+ ws_error[0] = exc+ print(f"\nWS THREAD ERROR: {exc}")++ t = threading.Thread(target=ws_thread, daemon=True)+ t.start()++ print("Waiting 5s for WS connection...")+ time.sleep(5)++ if ws_error[0]:+ print(f"\nFAILED: WS connection error: {ws_error[0]}")+ return++ if not t.is_alive():+ print("\nFAILED: WS thread died")+ return++ print("\nWS connection appears OK. Waiting for messages...")+ print("Send a message to the bot in Lark/Feishu, then check output here.")+ print("Press Ctrl+C to stop.\n")++ try:+ while True:+ time.sleep(1)+ except KeyboardInterrupt:+ print(f"\nStopped. Received {len(received_events)} events total.")+++if __name__ == "__main__":+ main()diff --git a/ui/src/components/Dashboard.tsx b/ui/src/components/Dashboard.tsxindex e2b919257..ec8bed354 100644--- a/ui/src/components/Dashboard.tsx+++ b/ui/src/components/Dashboard.tsx@@ -282,6 +282,8 @@ export const Dashboard: React.FC = () => {const platform = config.platform || 'slack';const toggleValue = platform === 'discord'? !config.discord?.require_mention+ : platform === 'lark'+ ? !config.lark?.require_mention: !config.slack?.require_mention;const newConfig = {...config,@@ -293,6 +295,10 @@ export const Dashboard: React.FC = () => {...(config.slack || {}),require_mention: platform === 'slack' ? toggleValue : config.slack?.require_mention,},+ lark: {+ ...(config.lark || {}),+ require_mention: platform === 'lark' ? toggleValue : config.lark?.require_mention,+ },};setConfig(newConfig);autoSaveMessageConfig(newConfig);@@ -300,6 +306,8 @@ export const Dashboard: React.FC = () => {className={`px-2 py-1 rounded text-xs font-semibold border ${(config.platform === 'discord'? config.discord?.require_mention+ : config.platform === 'lark'+ ? config.lark?.require_mention: config.slack?.require_mention)? 'bg-success/10 text-success border-success/20': 'bg-neutral-100 text-muted border-border'@@ -307,6 +315,8 @@ export const Dashboard: React.FC = () => {>{(config.platform === 'discord'? config.discord?.require_mention+ : config.platform === 'lark'+ ? config.lark?.require_mention: config.slack?.require_mention)? t('common.enabled'): t('common.disabled')}diff --git a/ui/src/components/Wizard.tsx b/ui/src/components/Wizard.tsxindex 9baf0c65e..9a1014095 100644--- a/ui/src/components/Wizard.tsx+++ b/ui/src/components/Wizard.tsx@@ -37,6 +37,7 @@ const buildConfigPayload = (data: any) => ({...data.lark,app_id: data.lark?.app_id || '',app_secret: data.lark?.app_secret || '',+ domain: data.lark?.domain || 'feishu',require_mention: data.lark?.require_mention || false,},runtime: {diff --git a/ui/src/components/steps/ChannelList.tsx b/ui/src/components/steps/ChannelList.tsxindex aae52c4a6..fa8da34cc 100644--- a/ui/src/components/steps/ChannelList.tsx+++ b/ui/src/components/steps/ChannelList.tsx@@ -98,6 +98,7 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB: (config.slack?.bot_token || config.slackBotToken || '');const larkAppId = config.lark?.app_id || data.lark?.app_id || '';const larkAppSecret = config.lark?.app_secret || data.lark?.app_secret || '';+ const larkDomain = config.lark?.domain || data.lark?.domain || 'feishu';useEffect(() => {if (platform !== 'discord') return;@@ -134,7 +135,7 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB}try {if (platform === 'lark') {- const result = await api.larkChats(larkAppId, larkAppSecret);+ const result = await api.larkChats(larkAppId, larkAppSecret, larkDomain);if (result.ok) {setChannels(result.channels || []);}@@ -528,10 +529,10 @@ export const ChannelList: React.FC<ChannelListProps> = ({ data = {}, onNext, onB><option value="">{t('common.default')} ({platform === 'discord'- ? (config.discord?.require_mention ? t('common.enabled') : t('common.disabled'))+ ? (config.discord?.require_mention ? t('channelList.mentionStatusOn') : t('channelList.mentionStatusOff')): platform === 'lark'- ? (config.lark?.require_mention ? t('common.enabled') : t('common.disabled'))- : (config.slack?.require_mention ? t('common.enabled') : t('common.disabled'))})+ ? (config.lark?.require_mention ? t('channelList.mentionStatusOn') : t('channelList.mentionStatusOff'))+ : (config.slack?.require_mention ? t('channelList.mentionStatusOn') : t('channelList.mentionStatusOff'))})</option><option value="true">{t('channelList.requireMentionOn')}</option><option value="false">{t('channelList.requireMentionOff')}</option>diff --git a/ui/src/components/steps/LarkConfig.tsx b/ui/src/components/steps/LarkConfig.tsxindex c223c7fe9..ae21ba2d6 100644--- a/ui/src/components/steps/LarkConfig.tsx+++ b/ui/src/components/steps/LarkConfig.tsx@@ -1,5 +1,5 @@import React, { useEffect, useMemo, useState } from 'react';-import { Shield, RefreshCw, Check, MessageSquare, KeyRound, Plus, ExternalLink, ChevronDown, ChevronUp, BookOpen, Copy, AlertTriangle } from 'lucide-react';+import { Shield, RefreshCw, Check, MessageSquare, KeyRound, Plus, ExternalLink, ChevronDown, ChevronUp, BookOpen, Copy, AlertTriangle, Radio, Globe, Wifi } from 'lucide-react';import { useTranslation } from 'react-i18next';import clsx from 'clsx';import { useApi } from '../../context/ApiContext';@@ -11,6 +11,7 @@ const LARK_PERMISSIONS_JSON = `{"im:chat","im:message","im:message.group_at_msg:readonly",+ "im:message.group_msg:readonly","im:message.p2p_msg:readonly","im:message.reactions:read","im:message.reactions:write_only",@@ -30,31 +31,61 @@ interface LarkConfigProps {export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack }) => {const { t } = useTranslation();const api = useApi();+ const [domain, setDomain] = useState<'feishu' | 'lark'>(data.lark?.domain || 'feishu');const [appId, setAppId] = useState(data.lark?.app_id || '');const [appSecret, setAppSecret] = useState(data.lark?.app_secret || '');const [checking, setChecking] = useState(false);const [authResult, setAuthResult] = useState<any>(null);+ const [wsStatus, setWsStatus] = useState<'idle' | 'connecting' | 'connected' | 'error'>('idle');const [chats, setChats] = useState<any[]>([]);- const [expandedSteps, setExpandedSteps] = useState<Record<number, boolean>>({ 1: true, 2: false, 3: false, 4: false });+ const [expandedSteps, setExpandedSteps] = useState<Record<number, boolean>>({ 1: true, 2: false, 3: false, 4: false, 5: false });const [copiedJson, setCopiedJson] = useState(false);+ const platformBase = domain === 'lark' ? 'https://open.larksuite.com' : 'https://open.feishu.cn';+ // Dynamic links based on appId — only useful after credentials are entered+ const appBase = appId ? `${platformBase}/app/${appId}` : '';+ const permissionsUrl = appBase ? `${appBase}/auth` : '';+ const eventsUrl = appBase ? `${appBase}/event` : '';+ const versionUrl = appBase ? `${appBase}/version` : '';+useEffect(() => {setAuthResult(null);+ setWsStatus('idle');}, [appId, appSecret]);useEffect(() => {- if (appId && appSecret && !expandedSteps[4]) {- setExpandedSteps(prev => ({ ...prev, 4: true }));+ if (appId && appSecret && !expandedSteps[2]) {+ setExpandedSteps(prev => ({ ...prev, 2: true }));}}, [appId, appSecret]);+ // Stop temp WS on unmount+ useEffect(() => {+ return () => {+ api.larkTempWsStop().catch(() => {});+ };+ }, []);+const isValid = useMemo(() => appId.length > 0 && appSecret.length > 0 && authResult?.ok, [appId, appSecret, authResult]);const runAuthTest = async () => {setChecking(true);+ setWsStatus('idle');try {- const result = await api.larkAuthTest(appId, appSecret);+ const result = await api.larkAuthTest(appId, appSecret, domain);setAuthResult(result);++ // On success, start temp WS so the Feishu console shows "Use Long Connection"+ if (result.ok) {+ setWsStatus('connecting');+ try {+ await api.larkTempWsStart(appId, appSecret, domain);+ await new Promise(resolve => setTimeout(resolve, 2000));+ setWsStatus('connected');+ } catch {+ setWsStatus('error');+ }+ }} catch (err: any) {setAuthResult({ ok: false, error: err?.message || 'Request failed' });} finally {@@ -65,7 +96,7 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack })const loadChats = async () => {if (!appId || !appSecret) return;try {- const result = await api.larkChats(appId, appSecret);+ const result = await api.larkChats(appId, appSecret, domain);if (result.ok) {setChats(result.channels || []);}@@ -84,10 +115,6 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack })setExpandedSteps(prev => ({ ...prev, [step]: !prev[step] }));};- const openFeishuPlatform = () => {- window.open('https://open.feishu.cn/app', '_blank');- };-const copyPermissionsJson = async () => {try {await navigator.clipboard.writeText(LARK_PERMISSIONS_JSON);@@ -98,6 +125,17 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack })}};+ const LinkButton: React.FC<{ url: string; label: string }> = ({ url, label }) => (+ <button+ onClick={() => window.open(url, '_blank')}+ disabled={!url}+ className="flex items-center gap-2 px-4 py-2 bg-accent text-white rounded-lg hover:bg-accent/90 transition-colors font-medium shadow-sm disabled:opacity-50 disabled:cursor-not-allowed"+ >+ <ExternalLink size={16} />+ {label}+ </button>+ );+const StepHeader: React.FC<{ step: number; title: string; icon: React.ReactNode; completed?: boolean }> = ({step,title,@@ -133,14 +171,42 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack })<p className="text-muted mt-1">{t('larkConfig.subtitle')}</p></div>+ {/* Domain selector */}+ <div className="mb-4 bg-panel border border-border rounded-xl p-4 space-y-2">+ <label className="text-sm font-medium text-text flex items-center gap-2">+ <Globe size={16} className="text-accent" /> {t('larkConfig.domainLabel')}+ </label>+ <div className="flex gap-3">+ <button+ onClick={() => { setDomain('feishu'); setAuthResult(null); setWsStatus('idle'); }}+ className={clsx(+ 'flex-1 px-4 py-2.5 rounded-lg border-2 text-sm font-medium transition-all',+ domain === 'feishu'+ ? 'border-accent bg-accent/10 text-accent'+ : 'border-border bg-bg text-muted hover:border-accent/30'+ )}+ >+ {t('larkConfig.domainFeishu')}+ </button>+ <button+ onClick={() => { setDomain('lark'); setAuthResult(null); setWsStatus('idle'); }}+ className={clsx(+ 'flex-1 px-4 py-2.5 rounded-lg border-2 text-sm font-medium transition-all',+ domain === 'lark'+ ? 'border-accent bg-accent/10 text-accent'+ : 'border-border bg-bg text-muted hover:border-accent/30'+ )}+ >+ {t('larkConfig.domainLark')}+ </button>+ </div>+ <p className="text-xs text-muted">{t('larkConfig.domainHint')}</p>+ </div>+<div className="space-y-3 overflow-y-auto flex-1 pr-1">- {/* Step 1: Create Feishu App */}+ {/* Step 1: Create App */}<div className="bg-panel border border-border rounded-xl overflow-hidden">- <StepHeader- step={1}- title={t('larkConfig.step1Title')}- icon={<Plus size={16} className="text-accent" />}- />+ <StepHeader step={1} title={t('larkConfig.step1Title')} icon={<Plus size={16} className="text-accent" />} />{expandedSteps[1] && (<div className="p-4 space-y-4 border-t border-border"><p className="text-sm text-muted">{t('larkConfig.step1Description')}</p>@@ -149,120 +215,18 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack })<li>{t('larkConfig.step1Item2')}</li><li>{t('larkConfig.step1Item3')}</li></ol>- <div>- <button- onClick={openFeishuPlatform}- className="flex items-center gap-2 px-4 py-2 bg-accent text-white rounded-lg hover:bg-accent/90 transition-colors font-medium shadow-sm"- >- <ExternalLink size={16} />- {t('larkConfig.openFeishuPlatform')}- </button>- </div>+ <LinkButton url={`${platformBase}/app`} label={t('larkConfig.openPlatform')} /></div>)}</div>- {/* Step 2: Configure Permissions */}+ {/* Step 2: Enter Credentials & Validate */}<div className="bg-panel border border-border rounded-xl overflow-hidden">- <StepHeader- step={2}- title={t('larkConfig.step2Title')}- icon={<Shield size={16} className="text-accent" />}- />+ <StepHeader step={2} title={t('larkConfig.step2Title')} icon={<KeyRound size={16} className="text-accent" />} completed={isValid} />{expandedSteps[2] && (<div className="p-4 space-y-4 border-t border-border"><p className="text-sm text-muted">{t('larkConfig.step2Description')}</p>- {/* Batch import JSON */}- <div className="bg-blue-50 border border-blue-200 rounded-lg p-3 space-y-2">- <div className="flex items-center justify-between">- <span className="text-sm font-medium text-blue-800">{t('larkConfig.step2BatchImport')}</span>- <button- onClick={copyPermissionsJson}- className="flex items-center gap-1.5 px-3 py-1 bg-blue-100 hover:bg-blue-200 text-blue-700 rounded text-xs font-medium transition-colors"- >- {copiedJson ? <Check size={12} /> : <Copy size={12} />}- {copiedJson ? t('larkConfig.step2Copied') : t('larkConfig.step2CopyJson')}- </button>- </div>- <pre className="text-xs bg-white/70 rounded p-2 overflow-x-auto font-mono text-blue-900 whitespace-pre">{LARK_PERMISSIONS_JSON}</pre>- <p className="text-xs text-blue-700">{t('larkConfig.step2BatchImportHint')}</p>- </div>-- <details className="text-sm text-muted">- <summary className="cursor-pointer font-medium text-text hover:text-accent transition-colors">{t('larkConfig.step2ManualList')}</summary>- <ul className="space-y-1.5 mt-2 pl-1">- <li className="flex items-start gap-2">- <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">1</code>- {t('larkConfig.step2Item1')}- </li>- <li className="flex items-start gap-2">- <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">2</code>- {t('larkConfig.step2Item2')}- </li>- <li className="flex items-start gap-2">- <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">3</code>- {t('larkConfig.step2Item3')}- </li>- <li className="flex items-start gap-2">- <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">4</code>- {t('larkConfig.step2Item4')}- </li>- <li className="flex items-start gap-2">- <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">5</code>- {t('larkConfig.step2Item5')}- </li>- <li className="flex items-start gap-2">- <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">6</code>- {t('larkConfig.step2Item6')}- </li>- <li className="flex items-start gap-2">- <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">7</code>- {t('larkConfig.step2Item7')}- </li>- <li className="flex items-start gap-2">- <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">8</code>- {t('larkConfig.step2Item8')}- </li>- </ul>- </details>- </div>- )}- </div>-- {/* Step 3: Publish App */}- <div className="bg-panel border border-border rounded-xl overflow-hidden">- <StepHeader- step={3}- title={t('larkConfig.step3Title')}- icon={<BookOpen size={16} className="text-accent" />}- />- {expandedSteps[3] && (- <div className="p-4 space-y-4 border-t border-border">- <p className="text-sm text-muted">{t('larkConfig.step3Description')}</p>- <ol className="list-decimal list-inside space-y-1.5 text-sm text-muted pl-1">- <li>{t('larkConfig.step3Item1')}</li>- <li>{t('larkConfig.step3Item2')}</li>- </ol>- <div className="bg-amber-50 border border-amber-200 rounded-lg p-3 text-sm text-amber-800">- <strong>{t('slackConfig.important')}:</strong> {t('larkConfig.step3Tip')}- </div>- </div>- )}- </div>-- {/* Step 4: Enter Credentials & Validate */}- <div className="bg-panel border border-border rounded-xl overflow-hidden">- <StepHeader- step={4}- title={t('larkConfig.step4Title')}- icon={<KeyRound size={16} className="text-accent" />}- completed={isValid}- />- {expandedSteps[4] && (- <div className="p-4 space-y-4 border-t border-border">- <p className="text-sm text-muted">{t('larkConfig.step4Description')}</p>-<div className="space-y-2 pt-2"><label className="text-sm font-medium text-text flex items-center gap-2"><KeyRound size={16} className="text-accent" /> {t('larkConfig.appId')}@@ -308,10 +272,7 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack }))}>{authResult.ok ? (- <>- <Check size={14} />- <span>{t('larkConfig.credentialsValidated')}</span>- </>+ <><Check size={14} /><span>{t('larkConfig.credentialsValidated')}</span></>) : (<span>{t('larkConfig.authFailed')}: {authResult.error}</span>)}@@ -319,6 +280,21 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack }))}</div>+ {/* WS connection status */}+ {wsStatus !== 'idle' && (+ <div className={clsx(+ 'rounded-lg p-3 text-sm flex items-center gap-2 border',+ wsStatus === 'connecting' ? 'bg-blue-50 border-blue-200 text-blue-800' :+ wsStatus === 'connected' ? 'bg-success/10 border-success/20 text-success' :+ 'bg-danger/10 border-danger/20 text-danger'+ )}>+ {wsStatus === 'connecting' && <RefreshCw size={14} className="animate-spin" />}+ {wsStatus === 'connected' && <Wifi size={14} />}+ {wsStatus === 'connecting' && t('larkConfig.step2ConnectingWs')}+ {wsStatus === 'connected' && t('larkConfig.step2WsConnected')}+ </div>+ )}+{authResult?.ok && chats.length > 0 && (<div className="space-y-2"><label className="text-sm font-medium text-text flex items-center gap-2">@@ -338,14 +314,117 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack })</div></div>)}+ </div>+ )}+ </div>++ {/* Step 3: Configure Permissions */}+ <div className="bg-panel border border-border rounded-xl overflow-hidden">+ <StepHeader step={3} title={t('larkConfig.step3Title')} icon={<Shield size={16} className="text-accent" />} />+ {expandedSteps[3] && (+ <div className="p-4 space-y-4 border-t border-border">+ <p className="text-sm text-muted">{t('larkConfig.step3Description')}</p>++ {permissionsUrl && (+ <LinkButton url={permissionsUrl} label={t('larkConfig.step3OpenLink')} />+ )}++ {/* Batch import JSON */}+ <div className="bg-blue-50 border border-blue-200 rounded-lg p-3 space-y-2">+ <div className="flex items-center justify-between">+ <span className="text-sm font-medium text-blue-800">{t('larkConfig.step3BatchImport')}</span>+ <button+ onClick={copyPermissionsJson}+ className="flex items-center gap-1.5 px-3 py-1 bg-blue-100 hover:bg-blue-200 text-blue-700 rounded text-xs font-medium transition-colors"+ >+ {copiedJson ? <Check size={12} /> : <Copy size={12} />}+ {copiedJson ? t('larkConfig.step3Copied') : t('larkConfig.step3CopyJson')}+ </button>+ </div>+ <pre className="text-xs bg-white/70 rounded p-2 overflow-x-auto font-mono text-blue-900 whitespace-pre">{LARK_PERMISSIONS_JSON}</pre>+ <p className="text-xs text-blue-700">{t('larkConfig.step3BatchImportHint')}</p>+ </div>++ <details className="text-sm text-muted">+ <summary className="cursor-pointer font-medium text-text hover:text-accent transition-colors">{t('larkConfig.step3ManualList')}</summary>+ <ul className="space-y-1.5 mt-2 pl-1">+ {[1,2,3,4,5,6,7,8,9].map(i => (+ <li key={i} className="flex items-start gap-2">+ <code className="text-xs bg-neutral-100 px-1.5 py-0.5 rounded font-mono shrink-0">{i}</code>+ {t(`larkConfig.step3Item${i}`)}+ </li>+ ))}+ </ul>+ </details>+ </div>+ )}+ </div>++ {/* Step 4: Configure Events, Callbacks & Long Connection */}+ <div className="bg-panel border border-border rounded-xl overflow-hidden">+ <StepHeader step={4} title={t('larkConfig.step4Title')} icon={<Radio size={16} className="text-accent" />} />+ {expandedSteps[4] && (+ <div className="p-4 space-y-4 border-t border-border">+ <p className="text-sm text-muted">{t('larkConfig.step4Description')}</p>++ {eventsUrl && (+ <LinkButton url={eventsUrl} label={t('larkConfig.step4OpenLink')} />+ )}++ {/* Part A: Event subscription */}+ <div className="space-y-2">+ <h4 className="text-sm font-semibold text-text">{t('larkConfig.step4EventTitle')}</h4>+ <ol className="list-decimal list-inside space-y-1.5 text-sm text-muted pl-1">+ <li>{t('larkConfig.step4Item1')}</li>+ <li>{t('larkConfig.step4Item2')}</li>+ <li>{t('larkConfig.step4Item3')}</li>+ </ol>+ </div>++ {/* Part B: Callback subscription */}+ <div className="space-y-2">+ <h4 className="text-sm font-semibold text-text">{t('larkConfig.step4CallbackTitle')}</h4>+ <p className="text-sm text-muted">{t('larkConfig.step4CallbackDesc')}</p>+ <ol className="list-decimal list-inside space-y-1.5 text-sm text-muted pl-1">+ <li>{t('larkConfig.step4CallbackItem1')}</li>+ <li>{t('larkConfig.step4CallbackItem2')}</li>+ <li>{t('larkConfig.step4CallbackItem3')}</li>+ </ol>+ </div>++ <div className="bg-amber-50 border border-amber-200 rounded-lg p-3 text-sm text-amber-800">+ <strong>{t('slackConfig.important')}:</strong> {t('larkConfig.step4Tip')}+ </div>- {/* Post-start event subscription note */}+ {/* FAQ callout */}<div className="bg-blue-50 border border-blue-200 rounded-lg p-3 space-y-1.5"><div className="flex items-center gap-2 text-sm font-medium text-blue-800"><AlertTriangle size={14} className="text-blue-600" />- {t('larkConfig.step3LongConnFaqTitle')}+ {t('larkConfig.step4LongConnFaqTitle')}</div>- <p className="text-xs text-blue-700">{t('larkConfig.step3LongConnFaqDesc')}</p>+ <p className="text-xs text-blue-700">{t('larkConfig.step4LongConnFaqDesc')}</p>+ <p className="text-xs text-blue-700 font-medium">{t('larkConfig.step4LarkWsWarning')}</p>+ </div>+ </div>+ )}+ </div>++ {/* Step 5: Publish App */}+ <div className="bg-panel border border-border rounded-xl overflow-hidden">+ <StepHeader step={5} title={t('larkConfig.step5Title')} icon={<BookOpen size={16} className="text-accent" />} />+ {expandedSteps[5] && (+ <div className="p-4 space-y-4 border-t border-border">+ <p className="text-sm text-muted">{t('larkConfig.step5Description')}</p>++ {versionUrl && (+ <LinkButton url={versionUrl} label={t('larkConfig.step5OpenLink')} />+ )}++ <ol className="list-decimal list-inside space-y-1.5 text-sm text-muted pl-1">+ <li>{t('larkConfig.step5Item1')}</li>+ </ol>+ <div className="bg-amber-50 border border-amber-200 rounded-lg p-3 text-sm text-amber-800">+ <strong>{t('slackConfig.important')}:</strong> {t('larkConfig.step5Tip')}</div></div>)}@@ -357,14 +436,18 @@ export const LarkConfig: React.FC<LarkConfigProps> = ({ data, onNext, onBack }){t('common.back')}</button><button- onClick={() => onNext({- platform: 'lark',- lark: {- ...(data.lark || {}),- app_id: appId,- app_secret: appSecret,- },- })}+ onClick={() => {+ api.larkTempWsStop().catch(() => {});+ onNext({+ platform: 'lark',+ lark: {+ ...(data.lark || {}),+ app_id: appId,+ app_secret: appSecret,+ domain: domain,+ },+ });+ }}disabled={!isValid}className={clsx('px-8 py-3 rounded-lg font-medium transition-colors shadow-sm',diff --git a/ui/src/components/steps/Summary.tsx b/ui/src/components/steps/Summary.tsxindex 70dda901d..11c47a417 100644--- a/ui/src/components/steps/Summary.tsx+++ b/ui/src/components/steps/Summary.tsx@@ -21,7 +21,9 @@ export const Summary: React.FC<SummaryProps> = ({ data, onBack }) => {const [error, setError] = useState<string | null>(null);const platform = data.platform || 'slack';const [requireMention, setRequireMention] = useState(- platform === 'discord' ? (data.discord?.require_mention || false) : (data.slack?.require_mention || false)+ platform === 'discord' ? (data.discord?.require_mention || false)+ : platform === 'lark' ? (data.lark?.require_mention || false)+ : (data.slack?.require_mention || false));const [autoUpdate, setAutoUpdate] = useState(data.update?.auto_update ?? true);const navigate = useNavigate();@@ -34,11 +36,15 @@ export const Summary: React.FC<SummaryProps> = ({ data, onBack }) => {...data,slack: {...data.slack,- require_mention: requireMention,+ require_mention: platform === 'slack' ? requireMention : data.slack?.require_mention,},discord: {...data.discord,- require_mention: requireMention,+ require_mention: platform === 'discord' ? requireMention : data.discord?.require_mention,+ },+ lark: {+ ...data.lark,+ require_mention: platform === 'lark' ? requireMention : data.lark?.require_mention,},update: {...data.update,@@ -230,6 +236,7 @@ const buildConfigPayload = (data: any) => {...data.lark,app_id: data.lark?.app_id || '',app_secret: data.lark?.app_secret || '',+ domain: data.lark?.domain || 'feishu',require_mention: data.lark?.require_mention || false,},runtime: {diff --git a/ui/src/context/ApiContext.tsx b/ui/src/context/ApiContext.tsxindex 69b62e832..5a6c284a3 100644--- a/ui/src/context/ApiContext.tsx+++ b/ui/src/context/ApiContext.tsx@@ -14,8 +14,10 @@ export type ApiContextType = {discordAuthTest: (botToken: string) => Promise<any>;discordGuilds: (botToken: string) => Promise<any>;discordChannels: (botToken: string, guildId: string) => Promise<any>;- larkAuthTest: (appId: string, appSecret: string) => Promise<any>;- larkChats: (appId: string, appSecret: string) => Promise<any>;+ larkAuthTest: (appId: string, appSecret: string, domain?: string) => Promise<any>;+ larkChats: (appId: string, appSecret: string, domain?: string) => Promise<any>;+ larkTempWsStart: (appId: string, appSecret: string, domain?: string) => Promise<any>;+ larkTempWsStop: () => Promise<any>;doctor: () => Promise<any>;opencodeOptions: (cwd: string) => Promise<any>;opencodeSetupPermission: () => Promise<{ ok: boolean; message: string; config_path: string }>;@@ -126,8 +128,10 @@ export const ApiProvider: React.FC<{ children: React.ReactNode }> = ({ childrendiscordAuthTest: (botToken) => postJson('/discord/auth_test', { bot_token: botToken }),discordGuilds: (botToken) => postJson('/discord/guilds', { bot_token: botToken }),discordChannels: (botToken, guildId) => postJson('/discord/channels', { bot_token: botToken, guild_id: guildId }),- larkAuthTest: (appId, appSecret) => postJson('/lark/auth_test', { app_id: appId, app_secret: appSecret }),- larkChats: (appId, appSecret) => postJson('/lark/chats', { app_id: appId, app_secret: appSecret }),+ larkAuthTest: (appId, appSecret, domain) => postJson('/lark/auth_test', { app_id: appId, app_secret: appSecret, domain: domain || 'feishu' }),+ larkChats: (appId, appSecret, domain) => postJson('/lark/chats', { app_id: appId, app_secret: appSecret, domain: domain || 'feishu' }),+ larkTempWsStart: (appId, appSecret, domain) => postJson('/lark/temp_ws/start', { app_id: appId, app_secret: appSecret, domain: domain || 'feishu' }),+ larkTempWsStop: () => postJson('/lark/temp_ws/stop', {}),doctor: () => postJson('/doctor', {}),opencodeOptions: (cwd) => postJson('/opencode/options', { cwd }),opencodeSetupPermission: () => postJson('/opencode/setup-permission', {}),diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.jsonindex 061c7bbca..c6a0b7a42 100644--- a/ui/src/i18n/en.json+++ b/ui/src/i18n/en.json@@ -125,47 +125,69 @@"larkConfig": {"title": "Configure Lark","subtitle": "Set up your Lark/Feishu bot in a few steps",- "step1Title": "Create Feishu App",- "step1Description": "Create a self-built application on the Feishu Open Platform and add the Bot capability.",- "step1Item1": "Go to Feishu Open Platform and click \"Create App\"",+ "domainLabel": "Platform Region",+ "domainFeishu": "Feishu (China)",+ "domainLark": "Lark (International)",+ "domainHint": "Select Feishu if your organization uses feishu.cn, or Lark if it uses larksuite.com",+ "step1Title": "Create App",+ "step1Description": "Create a self-built application on the Open Platform and add the Bot capability.",+ "step1Item1": "Go to the Open Platform and click \"Create App\"","step1Item2": "Select \"Enterprise Self-Built App\" and fill in the app details","step1Item3": "In the app capabilities, add \"Bot\"",- "openFeishuPlatform": "Open Feishu Platform",- "step2Title": "Configure Permissions",- "step2Description": "In Permission Management, enable the following permissions. You can select all and click \"Batch Enable\".",- "step2Item1": "im:message — Send and receive messages",- "step2Item2": "im:message:send_as_bot — Send messages as bot",- "step2Item3": "im:message.group_at_msg — Receive group @messages",- "step2Item4": "im:message.p2p_msg — Receive DM messages",- "step2Item5": "im:resource — Upload/download files and images",- "step2Item6": "im:chat — Access chat/group information",- "step2Item7": "im:message.reactions — Read/write emoji reactions",- "step2Item8": "contact:user.base:readonly — Read user basic info",- "step3Title": "Publish App",- "step3Description": "You must publish the app before configuring event subscriptions. Long connection requires a published app.",- "step3Item1": "Go to \"Version Management & Release\"",- "step3Item2": "Create a new version and submit for release",- "step3Tip": "The app must be published before the \"Use Long Connection\" option appears in Event Subscription settings.",- "step4Title": "Enter Credentials & Validate",- "step4Description": "Enter your App ID and App Secret from the \"Credentials & Basic Info\" page.",+ "openPlatform": "Open Platform",+ "step2Title": "Enter Credentials & Validate",+ "step2Description": "Enter your App ID and App Secret from the \"Credentials & Basic Info\" page.",+ "step2ConnectingWs": "Establishing connection...",+ "step2WsConnected": "Connection established. You can now configure events in the next step.","appId": "App ID","appIdPlaceholder": "cli_xxxxxxxxxx","appIdHint": "Found in Credentials & Basic Info page","appSecret": "App Secret","appSecretPlaceholder": "Enter your App Secret",- "appSecretHint": "Click to reveal and copy from Feishu Open Platform",+ "appSecretHint": "Click to reveal and copy from the Open Platform","validateCredentials": "Validate Credentials","credentialsValidated": "Credentials validated","authFailed": "Validation failed",- "step2BatchImport": "Quick setup: Copy JSON and use \"Batch Import/Export Permissions\"",- "step2CopyJson": "Copy JSON",- "step2Copied": "Copied!",- "step2BatchImportHint": "In Permission Management, click \"Batch Import/Export Permissions\", paste this JSON, and confirm.",- "step2ManualList": "Or manually enable permissions one by one",- "step3LongConnFaqTitle": "Can't find \"Use Long Connection\"?",- "step3LongConnFaqDesc": "If you only see \"Send events to developer server\", your app may not have the Bot capability enabled. Go back to Step 1, enter your app → Add Capabilities → enable \"Bot\". After saving, return to Events & Callbacks and the \"Use Long Connection\" option will appear.","chatListLabel": "Bot's Chat Groups",- "chatListHint": "These are the groups the bot has joined. You can enable specific channels in the next step."+ "chatListHint": "These are the groups the bot has joined. You can enable specific channels in the next step.",+ "step3Title": "Configure Permissions",+ "step3Description": "In Permission Management, click \"Batch Import/Export Permissions\" to enable the following permissions.",+ "step3Item1": "im:message — Send and receive messages",+ "step3Item2": "im:message:send_as_bot — Send messages as bot",+ "step3Item3": "im:message.group_at_msg — Receive group @messages",+ "step3Item4": "im:message.group_msg — Receive all group messages (required for non-@mention mode)",+ "step3Item5": "im:message.p2p_msg — Receive DM messages",+ "step3Item6": "im:resource — Upload/download files and images",+ "step3Item7": "im:chat — Access chat/group information",+ "step3Item8": "im:message.reactions — Read/write emoji reactions",+ "step3Item9": "contact:user.base:readonly — Read user basic info",+ "step3BatchImport": "Quick setup: Copy JSON and use \"Batch Import/Export Permissions\"",+ "step3CopyJson": "Copy JSON",+ "step3Copied": "Copied!",+ "step3BatchImportHint": "In Permission Management, click \"Batch Import/Export Permissions\", paste this JSON, and confirm.",+ "step3ManualList": "Or manually enable permissions one by one",+ "step3OpenLink": "Open Permission Management",+ "step4Title": "Configure Events, Callbacks & Long Connection",+ "step4Description": "Subscribe to message events and card callbacks, then enable long connection so the bot can receive messages and respond to button interactions in real time.",+ "step4EventTitle": "A. Event Configuration",+ "step4Item1": "Switch to the \"Event Configuration\" tab",+ "step4Item2": "Set subscription method to \"Use Long Connection\"",+ "step4Item3": "Click \"Add Event\" and subscribe to \"Receive Messages im.message.receive_v1\"",+ "step4CallbackTitle": "B. Callback Configuration",+ "step4CallbackDesc": "Callbacks handle card button clicks. Without this, menu buttons will not work.",+ "step4CallbackItem1": "Switch to the \"Callback Configuration\" tab",+ "step4CallbackItem2": "Click \"Add Callback\" and add \"Card Interaction card.action.trigger\"",+ "step4CallbackItem3": "Set subscription method to \"Use Long Connection\" as well",+ "step4Tip": "Both events and callbacks must be configured, otherwise the bot cannot receive messages or respond to button actions. Remember to publish a new version after configuration.",+ "step4OpenLink": "Open Events & Callbacks",+ "step4LongConnFaqTitle": "Can't find \"Use Long Connection\"?",+ "step4LongConnFaqDesc": "If you only see \"Send events to developer server\", your app may not have the Bot capability enabled. Go back to Step 1, enter your app → Add Capabilities → enable \"Bot\". After saving, return to Events & Callbacks and the \"Use Long Connection\" option will appear.",+ "step4LarkWsWarning": "Lark (International) may not have the WebSocket option. If it is unavailable, please use the domestic Feishu version instead.",+ "step5Title": "Publish App",+ "step5Description": "Create and publish a version to make the app available in your organization.",+ "step5Item1": "Create a new version and submit for release",+ "step5Tip": "After publishing, all configurations (permissions, events, bot capability) will take effect.",+ "step5OpenLink": "Open Version Management"},"slackConfig": {"title": "Slack Configuration",@@ -271,7 +293,9 @@"settingsSaveFailed": "Failed to save settings","requireMention": "Require @Mention","requireMentionOn": "Require @mention",- "requireMentionOff": "Don't require @mention"+ "requireMentionOff": "Don't require @mention",+ "mentionStatusOn": "Require @",+ "mentionStatusOff": "Don't require @"},"summary": {"title": "Review & Finish",diff --git a/ui/src/i18n/zh.json b/ui/src/i18n/zh.jsonindex 0dbe2037c..1eb7734b7 100644--- a/ui/src/i18n/zh.json+++ b/ui/src/i18n/zh.json@@ -124,48 +124,70 @@},"larkConfig": {"title": "配置飞书",- "subtitle": "几步完成飞书机器人的配置",- "step1Title": "创建飞书应用",- "step1Description": "在飞书开放平台创建企业自建应用,并添加机器人能力。",- "step1Item1": "进入飞书开放平台,点击「创建企业自建应用」",+ "subtitle": "几步完成飞书/Lark 机器人的配置",+ "domainLabel": "平台区域",+ "domainFeishu": "飞书(中国)",+ "domainLark": "Lark(国际版)",+ "domainHint": "如果你的组织使用 feishu.cn 请选飞书,使用 larksuite.com 请选 Lark",+ "step1Title": "创建应用",+ "step1Description": "在开放平台创建企业自建应用,并添加机器人能力。",+ "step1Item1": "进入开放平台,点击「创建企业自建应用」","step1Item2": "填写应用名称和描述","step1Item3": "在应用能力中,添加「机器人」",- "openFeishuPlatform": "打开飞书开放平台",- "step2Title": "配置权限",- "step2Description": "在权限管理中,开通以下权限。可以全选后点击「批量开通」。",- "step2Item1": "im:message — 收发消息",- "step2Item2": "im:message:send_as_bot — 以机器人身份发消息",- "step2Item3": "im:message.group_at_msg — 接收群聊 @消息",- "step2Item4": "im:message.p2p_msg — 接收私聊消息",- "step2Item5": "im:resource — 上传/下载文件和图片",- "step2Item6": "im:chat — 访问群聊信息",- "step2Item7": "im:message.reactions — 读写表情回复",- "step2Item8": "contact:user.base:readonly — 读取用户基本信息",- "step3Title": "发布应用",- "step3Description": "必须先发布应用,才能配置事件订阅。长连接功能需要应用已发布上线。",- "step3Item1": "进入「版本管理与发布」",- "step3Item2": "创建新版本并提交发布",- "step3Tip": "应用必须先发布上线,「使用长连接接收事件」选项才会出现在事件订阅设置中。",- "step4Title": "填入凭证并验证",- "step4Description": "从「凭证与基础信息」页面获取 App ID 和 App Secret。",+ "openPlatform": "打开开放平台",+ "step2Title": "填入凭证并验证",+ "step2Description": "从「凭证与基础信息」页面获取 App ID 和 App Secret。",+ "step2ConnectingWs": "正在建立连接...",+ "step2WsConnected": "连接已建立,现在可以在下一步配置权限和事件订阅。","appId": "App ID","appIdPlaceholder": "cli_xxxxxxxxxx","appIdHint": "在「凭证与基础信息」页面获取","appSecret": "App Secret","appSecretPlaceholder": "输入 App Secret",- "appSecretHint": "在飞书开放平台点击显示并复制",+ "appSecretHint": "在开放平台点击显示并复制","validateCredentials": "验证凭证","credentialsValidated": "凭证验证通过","authFailed": "验证失败",- "step2BatchImport": "快捷配置:复制 JSON 后使用「批量导入/导出权限」",- "step2CopyJson": "复制 JSON",- "step2Copied": "已复制!",- "step2BatchImportHint": "在权限管理页面,点击「批量导入/导出权限」,粘贴此 JSON 并确认即可。",- "step2ManualList": "或逐个手动开通权限",- "step3LongConnFaqTitle": "找不到「使用长连接接收事件」?",- "step3LongConnFaqDesc": "如果只看到「将事件发送至开发者服务器」,说明应用尚未开启机器人能力。请回到第 1 步,进入应用 → 添加应用能力 → 开启「机器人」。保存后再回到「事件与回调」页面,就会出现「使用长连接接收事件」选项。","chatListLabel": "机器人所在群组",- "chatListHint": "以下是机器人已加入的群组,你可以在下一步选择启用哪些频道。"+ "chatListHint": "以下是机器人已加入的群组,你可以在下一步选择启用哪些频道。",+ "step3Title": "配置权限",+ "step3Description": "在权限管理中,点击「批量导入/导出权限」开通以下权限。",+ "step3Item1": "im:message — 收发消息",+ "step3Item2": "im:message:send_as_bot — 以机器人身份发消息",+ "step3Item3": "im:message.group_at_msg — 接收群聊 @消息",+ "step3Item4": "im:message.group_msg — 接收群聊所有消息(关闭 @提及 要求时必需)",+ "step3Item5": "im:message.p2p_msg — 接收私聊消息",+ "step3Item6": "im:resource — 上传/下载文件和图片",+ "step3Item7": "im:chat — 访问群聊信息",+ "step3Item8": "im:message.reactions — 读写表情回复",+ "step3Item9": "contact:user.base:readonly — 读取用户基本信息",+ "step3BatchImport": "快捷配置:复制 JSON 后使用「批量导入/导出权限」",+ "step3CopyJson": "复制 JSON",+ "step3Copied": "已复制!",+ "step3BatchImportHint": "在权限管理页面,点击「批量导入/导出权限」,粘贴此 JSON 并确认即可。",+ "step3ManualList": "或逐个手动开通权限",+ "step3OpenLink": "打开权限管理",+ "step4Title": "配置事件、回调与长连接",+ "step4Description": "订阅消息事件和卡片回调,并启用长连接,让机器人能实时接收消息和响应按钮交互。",+ "step4EventTitle": "A. 事件配置",+ "step4Item1": "切换到「事件配置」标签页",+ "step4Item2": "订阅方式选择「使用长连接接收事件」",+ "step4Item3": "点击「添加事件」,搜索并订阅「接收消息 im.message.receive_v1」",+ "step4CallbackTitle": "B. 回调配置",+ "step4CallbackDesc": "回调用于接收卡片按钮点击等交互事件,不配置的话菜单按钮将无法使用。",+ "step4CallbackItem1": "切换到「回调配置」标签页",+ "step4CallbackItem2": "点击「添加回调」,搜索并添加「卡片回传交互 card.action.trigger」",+ "step4CallbackItem3": "订阅方式同样选择「使用长连接接收回调」",+ "step4Tip": "事件和回调都必须配置,否则机器人无法收到消息或响应按钮操作。配置完成后务必发布新版本。",+ "step4OpenLink": "打开事件与回调",+ "step4LongConnFaqTitle": "找不到「使用长连接接收事件」?",+ "step4LongConnFaqDesc": "如果只看到「将事件发送至开发者服务器」,说明应用尚未开启机器人能力。请回到第 1 步,进入应用 → 添加应用能力 → 开启「机器人」。保存后再回到「事件与回调」页面,就会出现「使用长连接接收事件」选项。",+ "step4LarkWsWarning": "国际版 Lark 可能没有 WebSocket 选项。如果没有这个选项,请使用中国版飞书。",+ "step5Title": "发布应用",+ "step5Description": "创建并发布版本,让应用在组织内生效。",+ "step5Item1": "创建新版本并提交发布",+ "step5Tip": "发布后,所有配置(权限、事件、机器人能力)才会正式生效。",+ "step5OpenLink": "打开版本管理"},"slackConfig": {"title": "Slack 配置",@@ -271,7 +293,9 @@"settingsSaveFailed": "保存设置失败","requireMention": "需要 @提及","requireMentionOn": "需要 @提及",- "requireMentionOff": "不需要 @提及"+ "requireMentionOff": "不需要 @提及",+ "mentionStatusOn": "需要 @",+ "mentionStatusOff": "不需要 @"},"summary": {"title": "检查并完成",diff --git a/uv.lock b/uv.lockindex 592c9e51d..0c8332812 100644--- a/uv.lock+++ b/uv.lock@@ -1,6 +1,10 @@version = 1revision = 1requires-python = ">=3.10"+resolution-markers = [+ "python_full_version >= '3.13'",+ "python_full_version < '3.13'",+][[package]]name = "aiohappyeyeballs"@@ -185,6 +189,62 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/3a/2a/7cc015f5b9f5db42b7d48157e23356022889fc354a2813c15934b7cb5c0e/attrs-25.4.0-py3-none-any.whl", hash = "sha256:adcf7e2a1fb3b36ac48d97835bb6d8ade15b8dcce26aba8bf1d14847b57a3373", size = 67615 },]+[[package]]+name = "audioop-lts"+version = "0.2.2"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/38/53/946db57842a50b2da2e0c1e34bd37f36f5aadba1a929a3971c5d7841dbca/audioop_lts-0.2.2.tar.gz", hash = "sha256:64d0c62d88e67b98a1a5e71987b7aa7b5bcffc7dcee65b635823dbdd0a8dbbd0", size = 30686 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/de/d4/94d277ca941de5a507b07f0b592f199c22454eeaec8f008a286b3fbbacd6/audioop_lts-0.2.2-cp313-abi3-macosx_10_13_universal2.whl", hash = "sha256:fd3d4602dc64914d462924a08c1a9816435a2155d74f325853c1f1ac3b2d9800", size = 46523 },+ { url = "https://files.pythonhosted.org/packages/f8/5a/656d1c2da4b555920ce4177167bfeb8623d98765594af59702c8873f60ec/audioop_lts-0.2.2-cp313-abi3-macosx_10_13_x86_64.whl", hash = "sha256:550c114a8df0aafe9a05442a1162dfc8fec37e9af1d625ae6060fed6e756f303", size = 27455 },+ { url = "https://files.pythonhosted.org/packages/1b/83/ea581e364ce7b0d41456fb79d6ee0ad482beda61faf0cab20cbd4c63a541/audioop_lts-0.2.2-cp313-abi3-macosx_11_0_arm64.whl", hash = "sha256:9a13dc409f2564de15dd68be65b462ba0dde01b19663720c68c1140c782d1d75", size = 26997 },+ { url = "https://files.pythonhosted.org/packages/b8/3b/e8964210b5e216e5041593b7d33e97ee65967f17c282e8510d19c666dab4/audioop_lts-0.2.2-cp313-abi3-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:51c916108c56aa6e426ce611946f901badac950ee2ddaf302b7ed35d9958970d", size = 85844 },+ { url = "https://files.pythonhosted.org/packages/c7/2e/0a1c52faf10d51def20531a59ce4c706cb7952323b11709e10de324d6493/audioop_lts-0.2.2-cp313-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:47eba38322370347b1c47024defbd36374a211e8dd5b0dcbce7b34fdb6f8847b", size = 85056 },+ { url = "https://files.pythonhosted.org/packages/75/e8/cd95eef479656cb75ab05dfece8c1f8c395d17a7c651d88f8e6e291a63ab/audioop_lts-0.2.2-cp313-abi3-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:ba7c3a7e5f23e215cb271516197030c32aef2e754252c4c70a50aaff7031a2c8", size = 93892 },+ { url = "https://files.pythonhosted.org/packages/5c/1e/a0c42570b74f83efa5cca34905b3eef03f7ab09fe5637015df538a7f3345/audioop_lts-0.2.2-cp313-abi3-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:def246fe9e180626731b26e89816e79aae2276f825420a07b4a647abaa84becc", size = 96660 },+ { url = "https://files.pythonhosted.org/packages/50/d5/8a0ae607ca07dbb34027bac8db805498ee7bfecc05fd2c148cc1ed7646e7/audioop_lts-0.2.2-cp313-abi3-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e160bf9df356d841bb6c180eeeea1834085464626dc1b68fa4e1d59070affdc3", size = 79143 },+ { url = "https://files.pythonhosted.org/packages/12/17/0d28c46179e7910bfb0bb62760ccb33edb5de973052cb2230b662c14ca2e/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:4b4cd51a57b698b2d06cb9993b7ac8dfe89a3b2878e96bc7948e9f19ff51dba6", size = 84313 },+ { url = "https://files.pythonhosted.org/packages/84/ba/bd5d3806641564f2024e97ca98ea8f8811d4e01d9b9f9831474bc9e14f9e/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_ppc64le.whl", hash = "sha256:4a53aa7c16a60a6857e6b0b165261436396ef7293f8b5c9c828a3a203147ed4a", size = 93044 },+ { url = "https://files.pythonhosted.org/packages/f9/5e/435ce8d5642f1f7679540d1e73c1c42d933331c0976eb397d1717d7f01a3/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_riscv64.whl", hash = "sha256:3fc38008969796f0f689f1453722a0f463da1b8a6fbee11987830bfbb664f623", size = 78766 },+ { url = "https://files.pythonhosted.org/packages/ae/3b/b909e76b606cbfd53875693ec8c156e93e15a1366a012f0b7e4fb52d3c34/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_s390x.whl", hash = "sha256:15ab25dd3e620790f40e9ead897f91e79c0d3ce65fe193c8ed6c26cffdd24be7", size = 87640 },+ { url = "https://files.pythonhosted.org/packages/30/e7/8f1603b4572d79b775f2140d7952f200f5e6c62904585d08a01f0a70393a/audioop_lts-0.2.2-cp313-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:03f061a1915538fd96272bac9551841859dbb2e3bf73ebe4a23ef043766f5449", size = 86052 },+ { url = "https://files.pythonhosted.org/packages/b5/96/c37846df657ccdda62ba1ae2b6534fa90e2e1b1742ca8dcf8ebd38c53801/audioop_lts-0.2.2-cp313-abi3-win32.whl", hash = "sha256:3bcddaaf6cc5935a300a8387c99f7a7fbbe212a11568ec6cf6e4bc458c048636", size = 26185 },+ { url = "https://files.pythonhosted.org/packages/34/a5/9d78fdb5b844a83da8a71226c7bdae7cc638861085fff7a1d707cb4823fa/audioop_lts-0.2.2-cp313-abi3-win_amd64.whl", hash = "sha256:a2c2a947fae7d1062ef08c4e369e0ba2086049a5e598fda41122535557012e9e", size = 30503 },+ { url = "https://files.pythonhosted.org/packages/34/25/20d8fde083123e90c61b51afb547bb0ea7e77bab50d98c0ab243d02a0e43/audioop_lts-0.2.2-cp313-abi3-win_arm64.whl", hash = "sha256:5f93a5db13927a37d2d09637ccca4b2b6b48c19cd9eda7b17a2e9f77edee6a6f", size = 24173 },+ { url = "https://files.pythonhosted.org/packages/58/a7/0a764f77b5c4ac58dc13c01a580f5d32ae8c74c92020b961556a43e26d02/audioop_lts-0.2.2-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:73f80bf4cd5d2ca7814da30a120de1f9408ee0619cc75da87d0641273d202a09", size = 47096 },+ { url = "https://files.pythonhosted.org/packages/aa/ed/ebebedde1a18848b085ad0fa54b66ceb95f1f94a3fc04f1cd1b5ccb0ed42/audioop_lts-0.2.2-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:106753a83a25ee4d6f473f2be6b0966fc1c9af7e0017192f5531a3e7463dce58", size = 27748 },+ { url = "https://files.pythonhosted.org/packages/cb/6e/11ca8c21af79f15dbb1c7f8017952ee8c810c438ce4e2b25638dfef2b02c/audioop_lts-0.2.2-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:fbdd522624141e40948ab3e8cdae6e04c748d78710e9f0f8d4dae2750831de19", size = 27329 },+ { url = "https://files.pythonhosted.org/packages/84/52/0022f93d56d85eec5da6b9da6a958a1ef09e80c39f2cc0a590c6af81dcbb/audioop_lts-0.2.2-cp313-cp313t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:143fad0311e8209ece30a8dbddab3b65ab419cbe8c0dde6e8828da25999be911", size = 92407 },+ { url = "https://files.pythonhosted.org/packages/87/1d/48a889855e67be8718adbc7a01f3c01d5743c325453a5e81cf3717664aad/audioop_lts-0.2.2-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:dfbbc74ec68a0fd08cfec1f4b5e8cca3d3cd7de5501b01c4b5d209995033cde9", size = 91811 },+ { url = "https://files.pythonhosted.org/packages/98/a6/94b7213190e8077547ffae75e13ed05edc488653c85aa5c41472c297d295/audioop_lts-0.2.2-cp313-cp313t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:cfcac6aa6f42397471e4943e0feb2244549db5c5d01efcd02725b96af417f3fe", size = 100470 },+ { url = "https://files.pythonhosted.org/packages/e9/e9/78450d7cb921ede0cfc33426d3a8023a3bda755883c95c868ee36db8d48d/audioop_lts-0.2.2-cp313-cp313t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:752d76472d9804ac60f0078c79cdae8b956f293177acd2316cd1e15149aee132", size = 103878 },+ { url = "https://files.pythonhosted.org/packages/4f/e2/cd5439aad4f3e34ae1ee852025dc6aa8f67a82b97641e390bf7bd9891d3e/audioop_lts-0.2.2-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:83c381767e2cc10e93e40281a04852facc4cd9334550e0f392f72d1c0a9c5753", size = 84867 },+ { url = "https://files.pythonhosted.org/packages/68/4b/9d853e9076c43ebba0d411e8d2aa19061083349ac695a7d082540bad64d0/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:c0022283e9556e0f3643b7c3c03f05063ca72b3063291834cca43234f20c60bb", size = 90001 },+ { url = "https://files.pythonhosted.org/packages/58/26/4bae7f9d2f116ed5593989d0e521d679b0d583973d203384679323d8fa85/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_ppc64le.whl", hash = "sha256:a2d4f1513d63c795e82948e1305f31a6d530626e5f9f2605408b300ae6095093", size = 99046 },+ { url = "https://files.pythonhosted.org/packages/b2/67/a9f4fb3e250dda9e9046f8866e9fa7d52664f8985e445c6b4ad6dfb55641/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:c9c8e68d8b4a56fda8c025e538e639f8c5953f5073886b596c93ec9b620055e7", size = 84788 },+ { url = "https://files.pythonhosted.org/packages/70/f7/3de86562db0121956148bcb0fe5b506615e3bcf6e63c4357a612b910765a/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_s390x.whl", hash = "sha256:96f19de485a2925314f5020e85911fb447ff5fbef56e8c7c6927851b95533a1c", size = 94472 },+ { url = "https://files.pythonhosted.org/packages/f1/32/fd772bf9078ae1001207d2df1eef3da05bea611a87dd0e8217989b2848fa/audioop_lts-0.2.2-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:e541c3ef484852ef36545f66209444c48b28661e864ccadb29daddb6a4b8e5f5", size = 92279 },+ { url = "https://files.pythonhosted.org/packages/4f/41/affea7181592ab0ab560044632571a38edaf9130b84928177823fbf3176a/audioop_lts-0.2.2-cp313-cp313t-win32.whl", hash = "sha256:d5e73fa573e273e4f2e5ff96f9043858a5e9311e94ffefd88a3186a910c70917", size = 26568 },+ { url = "https://files.pythonhosted.org/packages/28/2b/0372842877016641db8fc54d5c88596b542eec2f8f6c20a36fb6612bf9ee/audioop_lts-0.2.2-cp313-cp313t-win_amd64.whl", hash = "sha256:9191d68659eda01e448188f60364c7763a7ca6653ed3f87ebb165822153a8547", size = 30942 },+ { url = "https://files.pythonhosted.org/packages/ee/ca/baf2b9cc7e96c179bb4a54f30fcd83e6ecb340031bde68f486403f943768/audioop_lts-0.2.2-cp313-cp313t-win_arm64.whl", hash = "sha256:c174e322bb5783c099aaf87faeb240c8d210686b04bd61dfd05a8e5a83d88969", size = 24603 },+ { url = "https://files.pythonhosted.org/packages/5c/73/413b5a2804091e2c7d5def1d618e4837f1cb82464e230f827226278556b7/audioop_lts-0.2.2-cp314-cp314t-macosx_10_13_universal2.whl", hash = "sha256:f9ee9b52f5f857fbaf9d605a360884f034c92c1c23021fb90b2e39b8e64bede6", size = 47104 },+ { url = "https://files.pythonhosted.org/packages/ae/8c/daa3308dc6593944410c2c68306a5e217f5c05b70a12e70228e7dd42dc5c/audioop_lts-0.2.2-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:49ee1a41738a23e98d98b937a0638357a2477bc99e61b0f768a8f654f45d9b7a", size = 27754 },+ { url = "https://files.pythonhosted.org/packages/4e/86/c2e0f627168fcf61781a8f72cab06b228fe1da4b9fa4ab39cfb791b5836b/audioop_lts-0.2.2-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:5b00be98ccd0fc123dcfad31d50030d25fcf31488cde9e61692029cd7394733b", size = 27332 },+ { url = "https://files.pythonhosted.org/packages/c7/bd/35dce665255434f54e5307de39e31912a6f902d4572da7c37582809de14f/audioop_lts-0.2.2-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:a6d2e0f9f7a69403e388894d4ca5ada5c47230716a03f2847cfc7bd1ecb589d6", size = 92396 },+ { url = "https://files.pythonhosted.org/packages/2d/d2/deeb9f51def1437b3afa35aeb729d577c04bcd89394cb56f9239a9f50b6f/audioop_lts-0.2.2-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f9b0b8a03ef474f56d1a842af1a2e01398b8f7654009823c6d9e0ecff4d5cfbf", size = 91811 },+ { url = "https://files.pythonhosted.org/packages/76/3b/09f8b35b227cee28cc8231e296a82759ed80c1a08e349811d69773c48426/audioop_lts-0.2.2-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:2b267b70747d82125f1a021506565bdc5609a2b24bcb4773c16d79d2bb260bbd", size = 100483 },+ { url = "https://files.pythonhosted.org/packages/0b/15/05b48a935cf3b130c248bfdbdea71ce6437f5394ee8533e0edd7cfd93d5e/audioop_lts-0.2.2-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:0337d658f9b81f4cd0fdb1f47635070cc084871a3d4646d9de74fdf4e7c3d24a", size = 103885 },+ { url = "https://files.pythonhosted.org/packages/83/80/186b7fce6d35b68d3d739f228dc31d60b3412105854edb975aa155a58339/audioop_lts-0.2.2-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:167d3b62586faef8b6b2275c3218796b12621a60e43f7e9d5845d627b9c9b80e", size = 84899 },+ { url = "https://files.pythonhosted.org/packages/49/89/c78cc5ac6cb5828f17514fb12966e299c850bc885e80f8ad94e38d450886/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:0d9385e96f9f6da847f4d571ce3cb15b5091140edf3db97276872647ce37efd7", size = 89998 },+ { url = "https://files.pythonhosted.org/packages/4c/4b/6401888d0c010e586c2ca50fce4c903d70a6bb55928b16cfbdfd957a13da/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:48159d96962674eccdca9a3df280e864e8ac75e40a577cc97c5c42667ffabfc5", size = 99046 },+ { url = "https://files.pythonhosted.org/packages/de/f8/c874ca9bb447dae0e2ef2e231f6c4c2b0c39e31ae684d2420b0f9e97ee68/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:8fefe5868cd082db1186f2837d64cfbfa78b548ea0d0543e9b28935ccce81ce9", size = 84843 },+ { url = "https://files.pythonhosted.org/packages/3e/c0/0323e66f3daebc13fd46b36b30c3be47e3fc4257eae44f1e77eb828c703f/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:58cf54380c3884fb49fdd37dfb7a772632b6701d28edd3e2904743c5e1773602", size = 94490 },+ { url = "https://files.pythonhosted.org/packages/98/6b/acc7734ac02d95ab791c10c3f17ffa3584ccb9ac5c18fd771c638ed6d1f5/audioop_lts-0.2.2-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:088327f00488cdeed296edd9215ca159f3a5a5034741465789cad403fcf4bec0", size = 92297 },+ { url = "https://files.pythonhosted.org/packages/13/c3/c3dc3f564ce6877ecd2a05f8d751b9b27a8c320c2533a98b0c86349778d0/audioop_lts-0.2.2-cp314-cp314t-win32.whl", hash = "sha256:068aa17a38b4e0e7de771c62c60bbca2455924b67a8814f3b0dee92b5820c0b3", size = 27331 },+ { url = "https://files.pythonhosted.org/packages/72/bb/b4608537e9ffcb86449091939d52d24a055216a36a8bf66b936af8c3e7ac/audioop_lts-0.2.2-cp314-cp314t-win_amd64.whl", hash = "sha256:a5bf613e96f49712073de86f20dbdd4014ca18efd4d34ed18c75bd808337851b", size = 31697 },+ { url = "https://files.pythonhosted.org/packages/f6/22/91616fe707a5c5510de2cac9b046a30defe7007ba8a0c04f9c08f27df312/audioop_lts-0.2.2-cp314-cp314t-win_arm64.whl", hash = "sha256:b492c3b040153e68b9fdaff5913305aaaba5bb433d8a7f73d5cf6a64ed3cc1dd", size = 25206 },+]+[[package]]name = "blinker"version = "1.9.0"@@ -285,6 +345,95 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/ae/3a/dbeec9d1ee0844c679f6bb5d6ad4e9f198b1224f4e7a32825f47f6192b0c/cffi-2.0.0-cp314-cp314t-win_arm64.whl", hash = "sha256:0a1527a803f0a659de1af2e1fd700213caba79377e27e4693648c2923da066f9", size = 184195 },]+[[package]]+name = "charset-normalizer"+version = "3.4.5"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/1d/35/02daf95b9cd686320bb622eb148792655c9412dbb9b67abb5694e5910a24/charset_normalizer-3.4.5.tar.gz", hash = "sha256:95adae7b6c42a6c5b5b559b1a99149f090a57128155daeea91732c8d970d8644", size = 134804 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/a7/21/a2b1505639008ba2e6ef03733a81fc6cfd6a07ea6139a2b76421230b8dad/charset_normalizer-3.4.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:4167a621a9a1a986c73777dbc15d4b5eac8ac5c10393374109a343d4013ec765", size = 283319 },+ { url = "https://files.pythonhosted.org/packages/70/67/df234c29b68f4e1e095885c9db1cb4b69b8aba49cf94fac041db4aaf1267/charset_normalizer-3.4.5-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3f64c6bf8f32f9133b668c7f7a7cbdbc453412bc95ecdbd157f3b1e377a92990", size = 189974 },+ { url = "https://files.pythonhosted.org/packages/df/7f/fc66af802961c6be42e2c7b69c58f95cbd1f39b0e81b3365d8efe2a02a04/charset_normalizer-3.4.5-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:568e3c34b58422075a1b49575a6abc616d9751b4d61b23f712e12ebb78fe47b2", size = 207866 },+ { url = "https://files.pythonhosted.org/packages/c9/23/404eb36fac4e95b833c50e305bba9a241086d427bb2167a42eac7c4f7da4/charset_normalizer-3.4.5-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:036c079aa08a6a592b82487f97c60b439428320ed1b2ea0b3912e99d30c77765", size = 203239 },+ { url = "https://files.pythonhosted.org/packages/4b/2f/8a1d989bfadd120c90114ab33e0d2a0cbde05278c1fc15e83e62d570f50a/charset_normalizer-3.4.5-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:340810d34ef83af92148e96e3e44cb2d3f910d2bf95e5618a5c467d9f102231d", size = 196529 },+ { url = "https://files.pythonhosted.org/packages/a5/0c/c75f85ff7ca1f051958bb518cd43922d86f576c03947a050fbedfdfb4f15/charset_normalizer-3.4.5-cp310-cp310-manylinux_2_31_armv7l.whl", hash = "sha256:cd2d0f0ec9aa977a27731a3209ebbcacebebaf41f902bd453a928bfd281cf7f8", size = 184152 },+ { url = "https://files.pythonhosted.org/packages/f9/20/4ed37f6199af5dde94d4aeaf577f3813a5ec6635834cda1d957013a09c76/charset_normalizer-3.4.5-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0b362bcd27819f9c07cbf23db4e0e8cd4b44c5ecd900c2ff907b2b92274a7412", size = 195226 },+ { url = "https://files.pythonhosted.org/packages/28/31/7ba1102178cba7c34dcc050f43d427172f389729e356038f0726253dd914/charset_normalizer-3.4.5-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:77be992288f720306ab4108fe5c74797de327f3248368dfc7e1a916d6ed9e5a2", size = 192933 },+ { url = "https://files.pythonhosted.org/packages/4b/23/f86443ab3921e6a60b33b93f4a1161222231f6c69bc24fb18f3bee7b8518/charset_normalizer-3.4.5-cp310-cp310-musllinux_1_2_armv7l.whl", hash = "sha256:8b78d8a609a4b82c273257ee9d631ded7fac0d875bdcdccc109f3ee8328cfcb1", size = 185647 },+ { url = "https://files.pythonhosted.org/packages/82/44/08b8be891760f1f5a6d23ce11d6d50c92981603e6eb740b4f72eea9424e2/charset_normalizer-3.4.5-cp310-cp310-musllinux_1_2_ppc64le.whl", hash = "sha256:ba20bdf69bd127f66d0174d6f2a93e69045e0b4036dc1ca78e091bcc765830c4", size = 209533 },+ { url = "https://files.pythonhosted.org/packages/3b/5f/df114f23406199f8af711ddccfbf409ffbc5b7cdc18fa19644997ff0c9bb/charset_normalizer-3.4.5-cp310-cp310-musllinux_1_2_riscv64.whl", hash = "sha256:76a9d0de4d0eab387822e7b35d8f89367dd237c72e82ab42b9f7bf5e15ada00f", size = 195901 },+ { url = "https://files.pythonhosted.org/packages/07/83/71ef34a76fe8aa05ff8f840244bda2d61e043c2ef6f30d200450b9f6a1be/charset_normalizer-3.4.5-cp310-cp310-musllinux_1_2_s390x.whl", hash = "sha256:8fff79bf5978c693c9b1a4d71e4a94fddfb5fe744eb062a318e15f4a2f63a550", size = 204950 },+ { url = "https://files.pythonhosted.org/packages/58/40/0253be623995365137d7dc68e45245036207ab2227251e69a3d93ce43183/charset_normalizer-3.4.5-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:c7e84e0c0005e3bdc1a9211cd4e62c78ba80bc37b2365ef4410cd2007a9047f2", size = 198546 },+ { url = "https://files.pythonhosted.org/packages/ed/5c/5f3cb5b259a130895ef5ae16b38eaf141430fa3f7af50cd06c5d67e4f7b2/charset_normalizer-3.4.5-cp310-cp310-win32.whl", hash = "sha256:58ad8270cfa5d4bef1bc85bd387217e14ff154d6630e976c6f56f9a040757475", size = 132516 },+ { url = "https://files.pythonhosted.org/packages/a5/c3/84fb174e7770f2df2e1a2115090771bfbc2227fb39a765c6d00568d1aab4/charset_normalizer-3.4.5-cp310-cp310-win_amd64.whl", hash = "sha256:02a9d1b01c1e12c27883b0c9349e0bcd9ae92e727ff1a277207e1a262b1cbf05", size = 142906 },+ { url = "https://files.pythonhosted.org/packages/d7/b2/6f852f8b969f2cbd0d4092d2e60139ab1af95af9bb651337cae89ec0f684/charset_normalizer-3.4.5-cp310-cp310-win_arm64.whl", hash = "sha256:039215608ac7b358c4da0191d10fc76868567fbf276d54c14721bdedeb6de064", size = 133258 },+ { url = "https://files.pythonhosted.org/packages/8f/9e/bcec3b22c64ecec47d39bf5167c2613efd41898c019dccd4183f6aa5d6a7/charset_normalizer-3.4.5-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:610f72c0ee565dfb8ae1241b666119582fdbfe7c0975c175be719f940e110694", size = 279531 },+ { url = "https://files.pythonhosted.org/packages/58/12/81fd25f7e7078ab5d1eedbb0fac44be4904ae3370a3bf4533c8f2d159acd/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:60d68e820af339df4ae8358c7a2e7596badeb61e544438e489035f9fbf3246a5", size = 188006 },+ { url = "https://files.pythonhosted.org/packages/ae/6e/f2d30e8c27c1b0736a6520311982cf5286cfc7f6cac77d7bc1325e3a23f2/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:10b473fc8dca1c3ad8559985794815f06ca3fc71942c969129070f2c3cdf7281", size = 205085 },+ { url = "https://files.pythonhosted.org/packages/d0/90/d12cefcb53b5931e2cf792a33718d7126efb116a320eaa0742c7059a95e4/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d4eb8ac7469b2a5d64b5b8c04f84d8bf3ad340f4514b98523805cbf46e3b3923", size = 200545 },+ { url = "https://files.pythonhosted.org/packages/03/f4/44d3b830a20e89ff82a3134912d9a1cf6084d64f3b95dcad40f74449a654/charset_normalizer-3.4.5-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5bcb3227c3d9aaf73eaaab1db7ccd80a8995c509ee9941e2aae060ca6e4e5d81", size = 193863 },+ { url = "https://files.pythonhosted.org/packages/25/4b/f212119c18a6320a9d4a730d1b4057875cdeabf21b3614f76549042ef8a8/charset_normalizer-3.4.5-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:75ee9c1cce2911581a70a3c0919d8bccf5b1cbc9b0e5171400ec736b4b569497", size = 181827 },+ { url = "https://files.pythonhosted.org/packages/74/00/b26158e48b425a202a92965f8069e8a63d9af1481dfa206825d7f74d2a3c/charset_normalizer-3.4.5-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:1d1401945cb77787dbd3af2446ff2d75912327c4c3a1526ab7955ecf8600687c", size = 191085 },+ { url = "https://files.pythonhosted.org/packages/c4/c2/1c1737bf6fd40335fe53d28fe49afd99ee4143cc57a845e99635ce0b9b6d/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:0a45e504f5e1be0bd385935a8e1507c442349ca36f511a47057a71c9d1d6ea9e", size = 190688 },+ { url = "https://files.pythonhosted.org/packages/5a/3d/abb5c22dc2ef493cd56522f811246a63c5427c08f3e3e50ab663de27fcf4/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:e09f671a54ce70b79a1fc1dc6da3072b7ef7251fadb894ed92d9aa8218465a5f", size = 183077 },+ { url = "https://files.pythonhosted.org/packages/44/33/5298ad4d419a58e25b3508e87f2758d1442ff00c2471f8e0403dab8edad5/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:d01de5e768328646e6a3fa9e562706f8f6641708c115c62588aef2b941a4f88e", size = 206706 },+ { url = "https://files.pythonhosted.org/packages/7b/17/51e7895ac0f87c3b91d276a449ef09f5532a7529818f59646d7a55089432/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:131716d6786ad5e3dc542f5cc6f397ba3339dc0fb87f87ac30e550e8987756af", size = 191665 },+ { url = "https://files.pythonhosted.org/packages/90/8f/cce9adf1883e98906dbae380d769b4852bb0fa0004bc7d7a2243418d3ea8/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:1a374cc0b88aa710e8865dc1bd6edb3743c59f27830f0293ab101e4cf3ce9f85", size = 201950 },+ { url = "https://files.pythonhosted.org/packages/08/ca/bce99cd5c397a52919e2769d126723f27a4c037130374c051c00470bcd38/charset_normalizer-3.4.5-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:d31f0d1671e1534e395f9eb84a68e0fb670e1edb1fe819a9d7f564ae3bc4e53f", size = 195830 },+ { url = "https://files.pythonhosted.org/packages/87/4f/2e3d023a06911f1281f97b8f036edc9872167036ca6f55cc874a0be6c12c/charset_normalizer-3.4.5-cp311-cp311-win32.whl", hash = "sha256:cace89841c0599d736d3d74a27bc5821288bb47c5441923277afc6059d7fbcb4", size = 132029 },+ { url = "https://files.pythonhosted.org/packages/fe/1f/a853b73d386521fd44b7f67ded6b17b7b2367067d9106a5c4b44f9a34274/charset_normalizer-3.4.5-cp311-cp311-win_amd64.whl", hash = "sha256:f8102ae93c0bc863b1d41ea0f4499c20a83229f52ed870850892df555187154a", size = 142404 },+ { url = "https://files.pythonhosted.org/packages/b4/10/dba36f76b71c38e9d391abe0fd8a5b818790e053c431adecfc98c35cd2a9/charset_normalizer-3.4.5-cp311-cp311-win_arm64.whl", hash = "sha256:ed98364e1c262cf5f9363c3eca8c2df37024f52a8fa1180a3610014f26eac51c", size = 132796 },+ { url = "https://files.pythonhosted.org/packages/9c/b6/9ee9c1a608916ca5feae81a344dffbaa53b26b90be58cc2159e3332d44ec/charset_normalizer-3.4.5-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:ed97c282ee4f994ef814042423a529df9497e3c666dca19be1d4cd1129dc7ade", size = 280976 },+ { url = "https://files.pythonhosted.org/packages/f8/d8/a54f7c0b96f1df3563e9190f04daf981e365a9b397eedfdfb5dbef7e5c6c/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0294916d6ccf2d069727d65973c3a1ca477d68708db25fd758dd28b0827cff54", size = 189356 },+ { url = "https://files.pythonhosted.org/packages/42/69/2bf7f76ce1446759a5787cb87d38f6a61eb47dbbdf035cfebf6347292a65/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:dc57a0baa3eeedd99fafaef7511b5a6ef4581494e8168ee086031744e2679467", size = 206369 },+ { url = "https://files.pythonhosted.org/packages/10/9c/949d1a46dab56b959d9a87272482195f1840b515a3380e39986989a893ae/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:ed1a9a204f317ef879b32f9af507d47e49cd5e7f8e8d5d96358c98373314fc60", size = 203285 },+ { url = "https://files.pythonhosted.org/packages/67/5c/ae30362a88b4da237d71ea214a8c7eb915db3eec941adda511729ac25fa2/charset_normalizer-3.4.5-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7ad83b8f9379176c841f8865884f3514d905bcd2a9a3b210eaa446e7d2223e4d", size = 196274 },+ { url = "https://files.pythonhosted.org/packages/b2/07/c9f2cb0e46cb6d64fdcc4f95953747b843bb2181bda678dc4e699b8f0f9a/charset_normalizer-3.4.5-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:a118e2e0b5ae6b0120d5efa5f866e58f2bb826067a646431da4d6a2bdae7950e", size = 184715 },+ { url = "https://files.pythonhosted.org/packages/36/64/6b0ca95c44fddf692cd06d642b28f63009d0ce325fad6e9b2b4d0ef86a52/charset_normalizer-3.4.5-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:754f96058e61a5e22e91483f823e07df16416ce76afa4ebf306f8e1d1296d43f", size = 193426 },+ { url = "https://files.pythonhosted.org/packages/50/bc/a730690d726403743795ca3f5bb2baf67838c5fea78236098f324b965e40/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:0c300cefd9b0970381a46394902cd18eaf2aa00163f999590ace991989dcd0fc", size = 191780 },+ { url = "https://files.pythonhosted.org/packages/97/4f/6c0bc9af68222b22951552d73df4532b5be6447cee32d58e7e8c74ecbb7b/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:c108f8619e504140569ee7de3f97d234f0fbae338a7f9f360455071ef9855a95", size = 185805 },+ { url = "https://files.pythonhosted.org/packages/dd/b9/a523fb9b0ee90814b503452b2600e4cbc118cd68714d57041564886e7325/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:d1028de43596a315e2720a9849ee79007ab742c06ad8b45a50db8cdb7ed4a82a", size = 208342 },+ { url = "https://files.pythonhosted.org/packages/4d/61/c59e761dee4464050713e50e27b58266cc8e209e518c0b378c1580c959ba/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:19092dde50335accf365cce21998a1c6dd8eafd42c7b226eb54b2747cdce2fac", size = 193661 },+ { url = "https://files.pythonhosted.org/packages/1c/43/729fa30aad69783f755c5ad8649da17ee095311ca42024742701e202dc59/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:4354e401eb6dab9aed3c7b4030514328a6c748d05e1c3e19175008ca7de84fb1", size = 204819 },+ { url = "https://files.pythonhosted.org/packages/87/33/d9b442ce5a91b96fc0840455a9e49a611bbadae6122778d0a6a79683dd31/charset_normalizer-3.4.5-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a68766a3c58fde7f9aaa22b3786276f62ab2f594efb02d0a1421b6282e852e98", size = 198080 },+ { url = "https://files.pythonhosted.org/packages/56/5a/b8b5a23134978ee9885cee2d6995f4c27cc41f9baded0a9685eabc5338f0/charset_normalizer-3.4.5-cp312-cp312-win32.whl", hash = "sha256:1827734a5b308b65ac54e86a618de66f935a4f63a8a462ff1e19a6788d6c2262", size = 132630 },+ { url = "https://files.pythonhosted.org/packages/70/53/e44a4c07e8904500aec95865dc3f6464dc3586a039ef0df606eb3ac38e35/charset_normalizer-3.4.5-cp312-cp312-win_amd64.whl", hash = "sha256:728c6a963dfab66ef865f49286e45239384249672cd598576765acc2a640a636", size = 142856 },+ { url = "https://files.pythonhosted.org/packages/ea/aa/c5628f7cad591b1cf45790b7a61483c3e36cf41349c98af7813c483fd6e8/charset_normalizer-3.4.5-cp312-cp312-win_arm64.whl", hash = "sha256:75dfd1afe0b1647449e852f4fb428195a7ed0588947218f7ba929f6538487f02", size = 132982 },+ { url = "https://files.pythonhosted.org/packages/f5/48/9f34ec4bb24aa3fdba1890c1bddb97c8a4be1bd84ef5c42ac2352563ad05/charset_normalizer-3.4.5-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:ac59c15e3f1465f722607800c68713f9fbc2f672b9eb649fe831da4019ae9b23", size = 280788 },+ { url = "https://files.pythonhosted.org/packages/0e/09/6003e7ffeb90cc0560da893e3208396a44c210c5ee42efff539639def59b/charset_normalizer-3.4.5-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:165c7b21d19365464e8f70e5ce5e12524c58b48c78c1f5a57524603c1ab003f8", size = 188890 },+ { url = "https://files.pythonhosted.org/packages/42/1e/02706edf19e390680daa694d17e2b8eab4b5f7ac285e2a51168b4b22ee6b/charset_normalizer-3.4.5-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:28269983f25a4da0425743d0d257a2d6921ea7d9b83599d4039486ec5b9f911d", size = 206136 },+ { url = "https://files.pythonhosted.org/packages/c7/87/942c3def1b37baf3cf786bad01249190f3ca3d5e63a84f831e704977de1f/charset_normalizer-3.4.5-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d27ce22ec453564770d29d03a9506d449efbb9fa13c00842262b2f6801c48cce", size = 202551 },+ { url = "https://files.pythonhosted.org/packages/94/0a/af49691938dfe175d71b8a929bd7e4ace2809c0c5134e28bc535660d5262/charset_normalizer-3.4.5-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0625665e4ebdddb553ab185de5db7054393af8879fb0c87bd5690d14379d6819", size = 195572 },+ { url = "https://files.pythonhosted.org/packages/20/ea/dfb1792a8050a8e694cfbde1570ff97ff74e48afd874152d38163d1df9ae/charset_normalizer-3.4.5-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:c23eb3263356d94858655b3e63f85ac5d50970c6e8febcdde7830209139cc37d", size = 184438 },+ { url = "https://files.pythonhosted.org/packages/72/12/c281e2067466e3ddd0595bfaea58a6946765ace5c72dfa3edc2f5f118026/charset_normalizer-3.4.5-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e6302ca4ae283deb0af68d2fbf467474b8b6aedcd3dab4db187e07f94c109763", size = 193035 },+ { url = "https://files.pythonhosted.org/packages/ba/4f/3792c056e7708e10464bad0438a44708886fb8f92e3c3d29ec5e2d964d42/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:e51ae7d81c825761d941962450f50d041db028b7278e7b08930b4541b3e45cb9", size = 191340 },+ { url = "https://files.pythonhosted.org/packages/e7/86/80ddba897127b5c7a9bccc481b0cd36c8fefa485d113262f0fe4332f0bf4/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:597d10dec876923e5c59e48dbd366e852eacb2b806029491d307daea6b917d7c", size = 185464 },+ { url = "https://files.pythonhosted.org/packages/4d/00/b5eff85ba198faacab83e0e4b6f0648155f072278e3b392a82478f8b988b/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:5cffde4032a197bd3b42fd0b9509ec60fb70918d6970e4cc773f20fc9180ca67", size = 208014 },+ { url = "https://files.pythonhosted.org/packages/c8/11/d36f70be01597fd30850dde8a1269ebc8efadd23ba5785808454f2389bde/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:2da4eedcb6338e2321e831a0165759c0c620e37f8cd044a263ff67493be8ffb3", size = 193297 },+ { url = "https://files.pythonhosted.org/packages/1a/1d/259eb0a53d4910536c7c2abb9cb25f4153548efb42800c6a9456764649c0/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:65a126fb4b070d05340a84fc709dd9e7c75d9b063b610ece8a60197a291d0adf", size = 204321 },+ { url = "https://files.pythonhosted.org/packages/84/31/faa6c5b9d3688715e1ed1bb9d124c384fe2fc1633a409e503ffe1c6398c1/charset_normalizer-3.4.5-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:c7a80a9242963416bd81f99349d5f3fce1843c303bd404f204918b6d75a75fd6", size = 197509 },+ { url = "https://files.pythonhosted.org/packages/fd/a5/c7d9dd1503ffc08950b3260f5d39ec2366dd08254f0900ecbcf3a6197c7c/charset_normalizer-3.4.5-cp313-cp313-win32.whl", hash = "sha256:f1d725b754e967e648046f00c4facc42d414840f5ccc670c5670f59f83693e4f", size = 132284 },+ { url = "https://files.pythonhosted.org/packages/b9/0f/57072b253af40c8aa6636e6de7d75985624c1eb392815b2f934199340a89/charset_normalizer-3.4.5-cp313-cp313-win_amd64.whl", hash = "sha256:e37bd100d2c5d3ba35db9c7c5ba5a9228cbcffe5c4778dc824b164e5257813d7", size = 142630 },+ { url = "https://files.pythonhosted.org/packages/31/41/1c4b7cc9f13bd9d369ce3bc993e13d374ce25fa38a2663644283ecf422c1/charset_normalizer-3.4.5-cp313-cp313-win_arm64.whl", hash = "sha256:93b3b2cc5cf1b8743660ce77a4f45f3f6d1172068207c1defc779a36eea6bb36", size = 133254 },+ { url = "https://files.pythonhosted.org/packages/43/be/0f0fd9bb4a7fa4fb5067fb7d9ac693d4e928d306f80a0d02bde43a7c4aee/charset_normalizer-3.4.5-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8197abe5ca1ffb7d91e78360f915eef5addff270f8a71c1fc5be24a56f3e4873", size = 280232 },+ { url = "https://files.pythonhosted.org/packages/28/02/983b5445e4bef49cd8c9da73a8e029f0825f39b74a06d201bfaa2e55142a/charset_normalizer-3.4.5-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a2aecdb364b8a1802afdc7f9327d55dad5366bc97d8502d0f5854e50712dbc5f", size = 189688 },+ { url = "https://files.pythonhosted.org/packages/d0/88/152745c5166437687028027dc080e2daed6fe11cfa95a22f4602591c42db/charset_normalizer-3.4.5-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:a66aa5022bf81ab4b1bebfb009db4fd68e0c6d4307a1ce5ef6a26e5878dfc9e4", size = 206833 },+ { url = "https://files.pythonhosted.org/packages/cb/0f/ebc15c8b02af2f19be9678d6eed115feeeccc45ce1f4b098d986c13e8769/charset_normalizer-3.4.5-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d77f97e515688bd615c1d1f795d540f32542d514242067adcb8ef532504cb9ee", size = 202879 },+ { url = "https://files.pythonhosted.org/packages/38/9c/71336bff6934418dc8d1e8a1644176ac9088068bc571da612767619c97b3/charset_normalizer-3.4.5-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:01a1ed54b953303ca7e310fafe0fe347aab348bd81834a0bcd602eb538f89d66", size = 195764 },+ { url = "https://files.pythonhosted.org/packages/b7/95/ce92fde4f98615661871bc282a856cf9b8a15f686ba0af012984660d480b/charset_normalizer-3.4.5-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:b2d37d78297b39a9eb9eb92c0f6df98c706467282055419df141389b23f93362", size = 183728 },+ { url = "https://files.pythonhosted.org/packages/1c/e7/f5b4588d94e747ce45ae680f0f242bc2d98dbd4eccfab73e6160b6893893/charset_normalizer-3.4.5-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e71bbb595973622b817c042bd943c3f3667e9c9983ce3d205f973f486fec98a7", size = 192937 },+ { url = "https://files.pythonhosted.org/packages/f9/29/9d94ed6b929bf9f48bf6ede6e7474576499f07c4c5e878fb186083622716/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:4cd966c2559f501c6fd69294d082c2934c8dd4719deb32c22961a5ac6db0df1d", size = 192040 },+ { url = "https://files.pythonhosted.org/packages/15/d2/1a093a1cf827957f9445f2fe7298bcc16f8fc5e05c1ed2ad1af0b239035e/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:d5e52d127045d6ae01a1e821acfad2f3a1866c54d0e837828538fabe8d9d1bd6", size = 184107 },+ { url = "https://files.pythonhosted.org/packages/0f/7d/82068ce16bd36135df7b97f6333c5d808b94e01d4599a682e2337ed5fd14/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:30a2b1a48478c3428d047ed9690d57c23038dac838a87ad624c85c0a78ebeb39", size = 208310 },+ { url = "https://files.pythonhosted.org/packages/84/4e/4dfb52307bb6af4a5c9e73e482d171b81d36f522b21ccd28a49656baa680/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:d8ed79b8f6372ca4254955005830fd61c1ccdd8c0fac6603e2c145c61dd95db6", size = 192918 },+ { url = "https://files.pythonhosted.org/packages/08/a4/159ff7da662cf7201502ca89980b8f06acf3e887b278956646a8aeb178ab/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:c5af897b45fa606b12464ccbe0014bbf8c09191e0a66aab6aa9d5cf6e77e0c94", size = 204615 },+ { url = "https://files.pythonhosted.org/packages/d6/62/0dd6172203cb6b429ffffc9935001fde42e5250d57f07b0c28c6046deb6b/charset_normalizer-3.4.5-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:1088345bcc93c58d8d8f3d783eca4a6e7a7752bbff26c3eee7e73c597c191c2e", size = 197784 },+ { url = "https://files.pythonhosted.org/packages/c7/5e/1aab5cb737039b9c59e63627dc8bbc0d02562a14f831cc450e5f91d84ce1/charset_normalizer-3.4.5-cp314-cp314-win32.whl", hash = "sha256:ee57b926940ba00bca7ba7041e665cc956e55ef482f851b9b65acb20d867e7a2", size = 133009 },+ { url = "https://files.pythonhosted.org/packages/40/65/e7c6c77d7aaa4c0d7974f2e403e17f0ed2cb0fc135f77d686b916bf1eead/charset_normalizer-3.4.5-cp314-cp314-win_amd64.whl", hash = "sha256:4481e6da1830c8a1cc0b746b47f603b653dadb690bcd851d039ffaefe70533aa", size = 143511 },+ { url = "https://files.pythonhosted.org/packages/ba/91/52b0841c71f152f563b8e072896c14e3d83b195c188b338d3cc2e582d1d4/charset_normalizer-3.4.5-cp314-cp314-win_arm64.whl", hash = "sha256:97ab7787092eb9b50fb47fa04f24c75b768a606af1bcba1957f07f128a7219e4", size = 133775 },+ { url = "https://files.pythonhosted.org/packages/c5/60/3a621758945513adfd4db86827a5bafcc615f913dbd0b4c2ed64a65731be/charset_normalizer-3.4.5-py3-none-any.whl", hash = "sha256:9db5e3fcdcee89a78c04dffb3fe33c79f77bd741a624946db2591c81b2fc85b0", size = 55455 },+]+[[package]]name = "claude-agent-sdk"version = "0.1.23"@@ -388,6 +537,19 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/0d/c3/e90f4a4feae6410f914f8ebac129b9ae7a8c92eb60a638012dde42030a9d/cryptography-46.0.3-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:6b5063083824e5509fdba180721d55909ffacccc8adbec85268b48439423d78c", size = 3438528 },]+[[package]]+name = "discord-py"+version = "2.7.1"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "aiohttp" },+ { name = "audioop-lts", marker = "python_full_version >= '3.13'" },+]+sdist = { url = "https://files.pythonhosted.org/packages/ef/57/9a2d9abdabdc9db8ef28ce0cf4129669e1c8717ba28d607b5ba357c4de3b/discord_py-2.7.1.tar.gz", hash = "sha256:24d5e6a45535152e4b98148a9dd6b550d25dc2c9fb41b6d670319411641249da", size = 1106326 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/f7/a7/17208c3b3f92319e7fad259f1c6d5a5baf8fd0654c54846ced329f83c3eb/discord_py-2.7.1-py3-none-any.whl", hash = "sha256:849dca2c63b171146f3a7f3f8acc04248098e9e6203412ce3cf2745f284f7439", size = 1227550 },+]+[[package]]name = "exceptiongroup"version = "1.3.1"@@ -641,6 +803,21 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/41/45/1a4ed80516f02155c51f51e8cedb3c1902296743db0bbc66608a0db2814f/jsonschema_specifications-2025.9.1-py3-none-any.whl", hash = "sha256:98802fee3a11ee76ecaca44429fda8a41bff98b00a0f2838151b113f210cc6fe", size = 18437 },]+[[package]]+name = "lark-oapi"+version = "1.5.3"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "httpx" },+ { name = "pycryptodome" },+ { name = "requests" },+ { name = "requests-toolbelt" },+ { name = "websockets" },+]+wheels = [+ { url = "https://files.pythonhosted.org/packages/bf/ff/2ece5d735ebfa2af600a53176f2636ae47af2bf934e08effab64f0d1e047/lark_oapi-1.5.3-py3-none-any.whl", hash = "sha256:fda6b32bb38d21b6bdaae94979c600b94c7c521e985adade63a54e4b3e20cc36", size = 6993016 },+]+[[package]]name = "markdown-to-mrkdwn"version = "0.3.1"@@ -1021,6 +1198,41 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/a0/e3/59cd50310fc9b59512193629e1984c1f95e5c8ae6e5d8c69532ccc65a7fe/pycparser-2.23-py3-none-any.whl", hash = "sha256:e5c6e8d3fbad53479cab09ac03729e0a9faf2bee3db8208a550daf5af81a5934", size = 118140 },]+[[package]]+name = "pycryptodome"+version = "3.23.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/8e/a6/8452177684d5e906854776276ddd34eca30d1b1e15aa1ee9cefc289a33f5/pycryptodome-3.23.0.tar.gz", hash = "sha256:447700a657182d60338bab09fdb27518f8856aecd80ae4c6bdddb67ff5da44ef", size = 4921276 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/04/5d/bdb09489b63cd34a976cc9e2a8d938114f7a53a74d3dd4f125ffa49dce82/pycryptodome-3.23.0-cp313-cp313t-macosx_10_13_universal2.whl", hash = "sha256:0011f7f00cdb74879142011f95133274741778abba114ceca229adbf8e62c3e4", size = 2495152 },+ { url = "https://files.pythonhosted.org/packages/a7/ce/7840250ed4cc0039c433cd41715536f926d6e86ce84e904068eb3244b6a6/pycryptodome-3.23.0-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:90460fc9e088ce095f9ee8356722d4f10f86e5be06e2354230a9880b9c549aae", size = 1639348 },+ { url = "https://files.pythonhosted.org/packages/ee/f0/991da24c55c1f688d6a3b5a11940567353f74590734ee4a64294834ae472/pycryptodome-3.23.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4764e64b269fc83b00f682c47443c2e6e85b18273712b98aa43bcb77f8570477", size = 2184033 },+ { url = "https://files.pythonhosted.org/packages/54/16/0e11882deddf00f68b68dd4e8e442ddc30641f31afeb2bc25588124ac8de/pycryptodome-3.23.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eb8f24adb74984aa0e5d07a2368ad95276cf38051fe2dc6605cbcf482e04f2a7", size = 2270142 },+ { url = "https://files.pythonhosted.org/packages/d5/fc/4347fea23a3f95ffb931f383ff28b3f7b1fe868739182cb76718c0da86a1/pycryptodome-3.23.0-cp313-cp313t-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d97618c9c6684a97ef7637ba43bdf6663a2e2e77efe0f863cce97a76af396446", size = 2309384 },+ { url = "https://files.pythonhosted.org/packages/6e/d9/c5261780b69ce66d8cfab25d2797bd6e82ba0241804694cd48be41add5eb/pycryptodome-3.23.0-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9a53a4fe5cb075075d515797d6ce2f56772ea7e6a1e5e4b96cf78a14bac3d265", size = 2183237 },+ { url = "https://files.pythonhosted.org/packages/5a/6f/3af2ffedd5cfa08c631f89452c6648c4d779e7772dfc388c77c920ca6bbf/pycryptodome-3.23.0-cp313-cp313t-musllinux_1_2_i686.whl", hash = "sha256:763d1d74f56f031788e5d307029caef067febf890cd1f8bf61183ae142f1a77b", size = 2343898 },+ { url = "https://files.pythonhosted.org/packages/9a/dc/9060d807039ee5de6e2f260f72f3d70ac213993a804f5e67e0a73a56dd2f/pycryptodome-3.23.0-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:954af0e2bd7cea83ce72243b14e4fb518b18f0c1649b576d114973e2073b273d", size = 2269197 },+ { url = "https://files.pythonhosted.org/packages/f9/34/e6c8ca177cb29dcc4967fef73f5de445912f93bd0343c9c33c8e5bf8cde8/pycryptodome-3.23.0-cp313-cp313t-win32.whl", hash = "sha256:257bb3572c63ad8ba40b89f6fc9d63a2a628e9f9708d31ee26560925ebe0210a", size = 1768600 },+ { url = "https://files.pythonhosted.org/packages/e4/1d/89756b8d7ff623ad0160f4539da571d1f594d21ee6d68be130a6eccb39a4/pycryptodome-3.23.0-cp313-cp313t-win_amd64.whl", hash = "sha256:6501790c5b62a29fcb227bd6b62012181d886a767ce9ed03b303d1f22eb5c625", size = 1799740 },+ { url = "https://files.pythonhosted.org/packages/5d/61/35a64f0feaea9fd07f0d91209e7be91726eb48c0f1bfc6720647194071e4/pycryptodome-3.23.0-cp313-cp313t-win_arm64.whl", hash = "sha256:9a77627a330ab23ca43b48b130e202582e91cc69619947840ea4d2d1be21eb39", size = 1703685 },+ { url = "https://files.pythonhosted.org/packages/db/6c/a1f71542c969912bb0e106f64f60a56cc1f0fabecf9396f45accbe63fa68/pycryptodome-3.23.0-cp37-abi3-macosx_10_9_universal2.whl", hash = "sha256:187058ab80b3281b1de11c2e6842a357a1f71b42cb1e15bce373f3d238135c27", size = 2495627 },+ { url = "https://files.pythonhosted.org/packages/6e/4e/a066527e079fc5002390c8acdd3aca431e6ea0a50ffd7201551175b47323/pycryptodome-3.23.0-cp37-abi3-macosx_10_9_x86_64.whl", hash = "sha256:cfb5cd445280c5b0a4e6187a7ce8de5a07b5f3f897f235caa11f1f435f182843", size = 1640362 },+ { url = "https://files.pythonhosted.org/packages/50/52/adaf4c8c100a8c49d2bd058e5b551f73dfd8cb89eb4911e25a0c469b6b4e/pycryptodome-3.23.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:67bd81fcbe34f43ad9422ee8fd4843c8e7198dd88dd3d40e6de42ee65fbe1490", size = 2182625 },+ { url = "https://files.pythonhosted.org/packages/5f/e9/a09476d436d0ff1402ac3867d933c61805ec2326c6ea557aeeac3825604e/pycryptodome-3.23.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8987bd3307a39bc03df5c8e0e3d8be0c4c3518b7f044b0f4c15d1aa78f52575", size = 2268954 },+ { url = "https://files.pythonhosted.org/packages/f9/c5/ffe6474e0c551d54cab931918127c46d70cab8f114e0c2b5a3c071c2f484/pycryptodome-3.23.0-cp37-abi3-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa0698f65e5b570426fc31b8162ed4603b0c2841cbb9088e2b01641e3065915b", size = 2308534 },+ { url = "https://files.pythonhosted.org/packages/18/28/e199677fc15ecf43010f2463fde4c1a53015d1fe95fb03bca2890836603a/pycryptodome-3.23.0-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:53ecbafc2b55353edcebd64bf5da94a2a2cdf5090a6915bcca6eca6cc452585a", size = 2181853 },+ { url = "https://files.pythonhosted.org/packages/ce/ea/4fdb09f2165ce1365c9eaefef36625583371ee514db58dc9b65d3a255c4c/pycryptodome-3.23.0-cp37-abi3-musllinux_1_2_i686.whl", hash = "sha256:156df9667ad9f2ad26255926524e1c136d6664b741547deb0a86a9acf5ea631f", size = 2342465 },+ { url = "https://files.pythonhosted.org/packages/22/82/6edc3fc42fe9284aead511394bac167693fb2b0e0395b28b8bedaa07ef04/pycryptodome-3.23.0-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:dea827b4d55ee390dc89b2afe5927d4308a8b538ae91d9c6f7a5090f397af1aa", size = 2267414 },+ { url = "https://files.pythonhosted.org/packages/59/fe/aae679b64363eb78326c7fdc9d06ec3de18bac68be4b612fc1fe8902693c/pycryptodome-3.23.0-cp37-abi3-win32.whl", hash = "sha256:507dbead45474b62b2bbe318eb1c4c8ee641077532067fec9c1aa82c31f84886", size = 1768484 },+ { url = "https://files.pythonhosted.org/packages/54/2f/e97a1b8294db0daaa87012c24a7bb714147c7ade7656973fd6c736b484ff/pycryptodome-3.23.0-cp37-abi3-win_amd64.whl", hash = "sha256:c75b52aacc6c0c260f204cbdd834f76edc9fb0d8e0da9fbf8352ef58202564e2", size = 1799636 },+ { url = "https://files.pythonhosted.org/packages/18/3d/f9441a0d798bf2b1e645adc3265e55706aead1255ccdad3856dbdcffec14/pycryptodome-3.23.0-cp37-abi3-win_arm64.whl", hash = "sha256:11eeeb6917903876f134b56ba11abe95c0b0fd5e3330def218083c7d98bbcb3c", size = 1703675 },+ { url = "https://files.pythonhosted.org/packages/d9/12/e33935a0709c07de084d7d58d330ec3f4daf7910a18e77937affdb728452/pycryptodome-3.23.0-pp310-pypy310_pp73-macosx_10_15_x86_64.whl", hash = "sha256:ddb95b49df036ddd264a0ad246d1be5b672000f12d6961ea2c267083a5e19379", size = 1623886 },+ { url = "https://files.pythonhosted.org/packages/22/0b/aa8f9419f25870889bebf0b26b223c6986652bdf071f000623df11212c90/pycryptodome-3.23.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d8e95564beb8782abfd9e431c974e14563a794a4944c29d6d3b7b5ea042110b4", size = 1672151 },+ { url = "https://files.pythonhosted.org/packages/d4/5e/63f5cbde2342b7f70a39e591dbe75d9809d6338ce0b07c10406f1a140cdc/pycryptodome-3.23.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14e15c081e912c4b0d75632acd8382dfce45b258667aa3c67caf7a4d4c13f630", size = 1664461 },+ { url = "https://files.pythonhosted.org/packages/d6/92/608fbdad566ebe499297a86aae5f2a5263818ceeecd16733006f1600403c/pycryptodome-3.23.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a7fc76bf273353dc7e5207d172b83f569540fc9a28d63171061c42e361d22353", size = 1702440 },+ { url = "https://files.pythonhosted.org/packages/d1/92/2eadd1341abd2989cce2e2740b4423608ee2014acb8110438244ee97d7ff/pycryptodome-3.23.0-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:45c69ad715ca1a94f778215a11e66b7ff989d792a4d63b68dc586a1da1392ff5", size = 1803005 },+]+[[package]]name = "pydantic"version = "2.12.5"@@ -1292,6 +1504,33 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/2c/58/ca301544e1fa93ed4f80d724bf5b194f6e4b945841c5bfd555878eea9fcb/referencing-0.37.0-py3-none-any.whl", hash = "sha256:381329a9f99628c9069361716891d34ad94af76e461dcb0335825aecc7692231", size = 26766 },]+[[package]]+name = "requests"+version = "2.32.5"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "certifi" },+ { name = "charset-normalizer" },+ { name = "idna" },+ { name = "urllib3" },+]+sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738 },+]++[[package]]+name = "requests-toolbelt"+version = "1.0.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "requests" },+]+sdist = { url = "https://files.pythonhosted.org/packages/f3/61/d7545dafb7ac2230c70d38d31cbfe4cc64f7144dc41f6e4e4b78ecd9f5bb/requests-toolbelt-1.0.0.tar.gz", hash = "sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6", size = 206888 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/3f/51/d4db610ef29373b879047326cbf6fa98b6c1969d6f6dc423279de2b1be2c/requests_toolbelt-1.0.0-py2.py3-none-any.whl", hash = "sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06", size = 54481 },+]+[[package]]name = "rpds-py"version = "0.30.0"@@ -1470,6 +1709,15 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/dc/9b/47798a6c91d8bdb567fe2698fe81e0c6b7cb7ef4d13da4114b41d239f65d/typing_inspection-0.4.2-py3-none-any.whl", hash = "sha256:4ed1cacbdc298c220f1bd249ed5287caa16f34d44ef4e9c3d0cbad5b521545e7", size = 14611 },]+[[package]]+name = "urllib3"+version = "2.6.3"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", size = 435556 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/39/08/aaaad47bc4e9dc8c725e68f9d04865dbcb2052843ff09c97b08904852d84/urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4", size = 131584 },+]+[[package]]name = "uvicorn"version = "0.40.0"@@ -1491,7 +1739,9 @@ dependencies = [{ name = "aiohttp" },{ name = "anyio" },{ name = "claude-agent-sdk" },+ { name = "discord-py" },{ name = "flask" },+ { name = "lark-oapi" },{ name = "markdown-to-mrkdwn" },{ name = "pyyaml" },{ name = "slack-sdk" },@@ -1503,13 +1753,83 @@ requires-dist = [{ name = "aiohttp", specifier = ">=3.8.0" },{ name = "anyio", specifier = ">=4.0.0" },{ name = "claude-agent-sdk", specifier = ">=0.1.23" },+ { name = "discord-py", specifier = ">=2.4.0" },{ name = "flask", specifier = ">=3.0.0" },+ { name = "lark-oapi", specifier = ">=1.4.0" },{ name = "markdown-to-mrkdwn", specifier = ">=0.2.0" },{ name = "pyyaml", specifier = ">=6.0" },{ name = "slack-sdk", specifier = ">=3.26.0" },{ name = "typing-extensions", specifier = ">=4.12.2" },]+[[package]]+name = "websockets"+version = "16.0"+source = { registry = "https://pypi.org/simple" }+sdist = { url = "https://files.pythonhosted.org/packages/04/24/4b2031d72e840ce4c1ccb255f693b15c334757fc50023e4db9537080b8c4/websockets-16.0.tar.gz", hash = "sha256:5f6261a5e56e8d5c42a4497b364ea24d94d9563e8fbd44e78ac40879c60179b5", size = 179346 }+wheels = [+ { url = "https://files.pythonhosted.org/packages/20/74/221f58decd852f4b59cc3354cccaf87e8ef695fede361d03dc9a7396573b/websockets-16.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:04cdd5d2d1dacbad0a7bf36ccbcd3ccd5a30ee188f2560b7a62a30d14107b31a", size = 177343 },+ { url = "https://files.pythonhosted.org/packages/19/0f/22ef6107ee52ab7f0b710d55d36f5a5d3ef19e8a205541a6d7ffa7994e5a/websockets-16.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8ff32bb86522a9e5e31439a58addbb0166f0204d64066fb955265c4e214160f0", size = 175021 },+ { url = "https://files.pythonhosted.org/packages/10/40/904a4cb30d9b61c0e278899bf36342e9b0208eb3c470324a9ecbaac2a30f/websockets-16.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:583b7c42688636f930688d712885cf1531326ee05effd982028212ccc13e5957", size = 175320 },+ { url = "https://files.pythonhosted.org/packages/9d/2f/4b3ca7e106bc608744b1cdae041e005e446124bebb037b18799c2d356864/websockets-16.0-cp310-cp310-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:7d837379b647c0c4c2355c2499723f82f1635fd2c26510e1f587d89bc2199e72", size = 183815 },+ { url = "https://files.pythonhosted.org/packages/86/26/d40eaa2a46d4302becec8d15b0fc5e45bdde05191e7628405a19cf491ccd/websockets-16.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:df57afc692e517a85e65b72e165356ed1df12386ecb879ad5693be08fac65dde", size = 185054 },+ { url = "https://files.pythonhosted.org/packages/b0/ba/6500a0efc94f7373ee8fefa8c271acdfd4dca8bd49a90d4be7ccabfc397e/websockets-16.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:2b9f1e0d69bc60a4a87349d50c09a037a2607918746f07de04df9e43252c77a3", size = 184565 },+ { url = "https://files.pythonhosted.org/packages/04/b4/96bf2cee7c8d8102389374a2616200574f5f01128d1082f44102140344cc/websockets-16.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:335c23addf3d5e6a8633f9f8eda77efad001671e80b95c491dd0924587ece0b3", size = 183848 },+ { url = "https://files.pythonhosted.org/packages/02/8e/81f40fb00fd125357814e8c3025738fc4ffc3da4b6b4a4472a82ba304b41/websockets-16.0-cp310-cp310-win32.whl", hash = "sha256:37b31c1623c6605e4c00d466c9d633f9b812ea430c11c8a278774a1fde1acfa9", size = 178249 },+ { url = "https://files.pythonhosted.org/packages/b4/5f/7e40efe8df57db9b91c88a43690ac66f7b7aa73a11aa6a66b927e44f26fa/websockets-16.0-cp310-cp310-win_amd64.whl", hash = "sha256:8e1dab317b6e77424356e11e99a432b7cb2f3ec8c5ab4dabbcee6add48f72b35", size = 178685 },+ { url = "https://files.pythonhosted.org/packages/f2/db/de907251b4ff46ae804ad0409809504153b3f30984daf82a1d84a9875830/websockets-16.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:31a52addea25187bde0797a97d6fc3d2f92b6f72a9370792d65a6e84615ac8a8", size = 177340 },+ { url = "https://files.pythonhosted.org/packages/f3/fa/abe89019d8d8815c8781e90d697dec52523fb8ebe308bf11664e8de1877e/websockets-16.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:417b28978cdccab24f46400586d128366313e8a96312e4b9362a4af504f3bbad", size = 175022 },+ { url = "https://files.pythonhosted.org/packages/58/5d/88ea17ed1ded2079358b40d31d48abe90a73c9e5819dbcde1606e991e2ad/websockets-16.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:af80d74d4edfa3cb9ed973a0a5ba2b2a549371f8a741e0800cb07becdd20f23d", size = 175319 },+ { url = "https://files.pythonhosted.org/packages/d2/ae/0ee92b33087a33632f37a635e11e1d99d429d3d323329675a6022312aac2/websockets-16.0-cp311-cp311-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:08d7af67b64d29823fed316505a89b86705f2b7981c07848fb5e3ea3020c1abe", size = 184631 },+ { url = "https://files.pythonhosted.org/packages/c8/c5/27178df583b6c5b31b29f526ba2da5e2f864ecc79c99dae630a85d68c304/websockets-16.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7be95cfb0a4dae143eaed2bcba8ac23f4892d8971311f1b06f3c6b78952ee70b", size = 185870 },+ { url = "https://files.pythonhosted.org/packages/87/05/536652aa84ddc1c018dbb7e2c4cbcd0db884580bf8e95aece7593fde526f/websockets-16.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:d6297ce39ce5c2e6feb13c1a996a2ded3b6832155fcfc920265c76f24c7cceb5", size = 185361 },+ { url = "https://files.pythonhosted.org/packages/6d/e2/d5332c90da12b1e01f06fb1b85c50cfc489783076547415bf9f0a659ec19/websockets-16.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:1c1b30e4f497b0b354057f3467f56244c603a79c0d1dafce1d16c283c25f6e64", size = 184615 },+ { url = "https://files.pythonhosted.org/packages/77/fb/d3f9576691cae9253b51555f841bc6600bf0a983a461c79500ace5a5b364/websockets-16.0-cp311-cp311-win32.whl", hash = "sha256:5f451484aeb5cafee1ccf789b1b66f535409d038c56966d6101740c1614b86c6", size = 178246 },+ { url = "https://files.pythonhosted.org/packages/54/67/eaff76b3dbaf18dcddabc3b8c1dba50b483761cccff67793897945b37408/websockets-16.0-cp311-cp311-win_amd64.whl", hash = "sha256:8d7f0659570eefb578dacde98e24fb60af35350193e4f56e11190787bee77dac", size = 178684 },+ { url = "https://files.pythonhosted.org/packages/84/7b/bac442e6b96c9d25092695578dda82403c77936104b5682307bd4deb1ad4/websockets-16.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:71c989cbf3254fbd5e84d3bff31e4da39c43f884e64f2551d14bb3c186230f00", size = 177365 },+ { url = "https://files.pythonhosted.org/packages/b0/fe/136ccece61bd690d9c1f715baaeefd953bb2360134de73519d5df19d29ca/websockets-16.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:8b6e209ffee39ff1b6d0fa7bfef6de950c60dfb91b8fcead17da4ee539121a79", size = 175038 },+ { url = "https://files.pythonhosted.org/packages/40/1e/9771421ac2286eaab95b8575b0cb701ae3663abf8b5e1f64f1fd90d0a673/websockets-16.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:86890e837d61574c92a97496d590968b23c2ef0aeb8a9bc9421d174cd378ae39", size = 175328 },+ { url = "https://files.pythonhosted.org/packages/18/29/71729b4671f21e1eaa5d6573031ab810ad2936c8175f03f97f3ff164c802/websockets-16.0-cp312-cp312-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:9b5aca38b67492ef518a8ab76851862488a478602229112c4b0d58d63a7a4d5c", size = 184915 },+ { url = "https://files.pythonhosted.org/packages/97/bb/21c36b7dbbafc85d2d480cd65df02a1dc93bf76d97147605a8e27ff9409d/websockets-16.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e0334872c0a37b606418ac52f6ab9cfd17317ac26365f7f65e203e2d0d0d359f", size = 186152 },+ { url = "https://files.pythonhosted.org/packages/4a/34/9bf8df0c0cf88fa7bfe36678dc7b02970c9a7d5e065a3099292db87b1be2/websockets-16.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:a0b31e0b424cc6b5a04b8838bbaec1688834b2383256688cf47eb97412531da1", size = 185583 },+ { url = "https://files.pythonhosted.org/packages/47/88/4dd516068e1a3d6ab3c7c183288404cd424a9a02d585efbac226cb61ff2d/websockets-16.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:485c49116d0af10ac698623c513c1cc01c9446c058a4e61e3bf6c19dff7335a2", size = 184880 },+ { url = "https://files.pythonhosted.org/packages/91/d6/7d4553ad4bf1c0421e1ebd4b18de5d9098383b5caa1d937b63df8d04b565/websockets-16.0-cp312-cp312-win32.whl", hash = "sha256:eaded469f5e5b7294e2bdca0ab06becb6756ea86894a47806456089298813c89", size = 178261 },+ { url = "https://files.pythonhosted.org/packages/c3/f0/f3a17365441ed1c27f850a80b2bc680a0fa9505d733fe152fdf5e98c1c0b/websockets-16.0-cp312-cp312-win_amd64.whl", hash = "sha256:5569417dc80977fc8c2d43a86f78e0a5a22fee17565d78621b6bb264a115d4ea", size = 178693 },+ { url = "https://files.pythonhosted.org/packages/cc/9c/baa8456050d1c1b08dd0ec7346026668cbc6f145ab4e314d707bb845bf0d/websockets-16.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:878b336ac47938b474c8f982ac2f7266a540adc3fa4ad74ae96fea9823a02cc9", size = 177364 },+ { url = "https://files.pythonhosted.org/packages/7e/0c/8811fc53e9bcff68fe7de2bcbe75116a8d959ac699a3200f4847a8925210/websockets-16.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:52a0fec0e6c8d9a784c2c78276a48a2bdf099e4ccc2a4cad53b27718dbfd0230", size = 175039 },+ { url = "https://files.pythonhosted.org/packages/aa/82/39a5f910cb99ec0b59e482971238c845af9220d3ab9fa76dd9162cda9d62/websockets-16.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:e6578ed5b6981005df1860a56e3617f14a6c307e6a71b4fff8c48fdc50f3ed2c", size = 175323 },+ { url = "https://files.pythonhosted.org/packages/bd/28/0a25ee5342eb5d5f297d992a77e56892ecb65e7854c7898fb7d35e9b33bd/websockets-16.0-cp313-cp313-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:95724e638f0f9c350bb1c2b0a7ad0e83d9cc0c9259f3ea94e40d7b02a2179ae5", size = 184975 },+ { url = "https://files.pythonhosted.org/packages/f9/66/27ea52741752f5107c2e41fda05e8395a682a1e11c4e592a809a90c6a506/websockets-16.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c0204dc62a89dc9d50d682412c10b3542d748260d743500a85c13cd1ee4bde82", size = 186203 },+ { url = "https://files.pythonhosted.org/packages/37/e5/8e32857371406a757816a2b471939d51c463509be73fa538216ea52b792a/websockets-16.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:52ac480f44d32970d66763115edea932f1c5b1312de36df06d6b219f6741eed8", size = 185653 },+ { url = "https://files.pythonhosted.org/packages/9b/67/f926bac29882894669368dc73f4da900fcdf47955d0a0185d60103df5737/websockets-16.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6e5a82b677f8f6f59e8dfc34ec06ca6b5b48bc4fcda346acd093694cc2c24d8f", size = 184920 },+ { url = "https://files.pythonhosted.org/packages/3c/a1/3d6ccdcd125b0a42a311bcd15a7f705d688f73b2a22d8cf1c0875d35d34a/websockets-16.0-cp313-cp313-win32.whl", hash = "sha256:abf050a199613f64c886ea10f38b47770a65154dc37181bfaff70c160f45315a", size = 178255 },+ { url = "https://files.pythonhosted.org/packages/6b/ae/90366304d7c2ce80f9b826096a9e9048b4bb760e44d3b873bb272cba696b/websockets-16.0-cp313-cp313-win_amd64.whl", hash = "sha256:3425ac5cf448801335d6fdc7ae1eb22072055417a96cc6b31b3861f455fbc156", size = 178689 },+ { url = "https://files.pythonhosted.org/packages/f3/1d/e88022630271f5bd349ed82417136281931e558d628dd52c4d8621b4a0b2/websockets-16.0-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:8cc451a50f2aee53042ac52d2d053d08bf89bcb31ae799cb4487587661c038a0", size = 177406 },+ { url = "https://files.pythonhosted.org/packages/f2/78/e63be1bf0724eeb4616efb1ae1c9044f7c3953b7957799abb5915bffd38e/websockets-16.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:daa3b6ff70a9241cf6c7fc9e949d41232d9d7d26fd3522b1ad2b4d62487e9904", size = 175085 },+ { url = "https://files.pythonhosted.org/packages/bb/f4/d3c9220d818ee955ae390cf319a7c7a467beceb24f05ee7aaaa2414345ba/websockets-16.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:fd3cb4adb94a2a6e2b7c0d8d05cb94e6f1c81a0cf9dc2694fb65c7e8d94c42e4", size = 175328 },+ { url = "https://files.pythonhosted.org/packages/63/bc/d3e208028de777087e6fb2b122051a6ff7bbcca0d6df9d9c2bf1dd869ae9/websockets-16.0-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:781caf5e8eee67f663126490c2f96f40906594cb86b408a703630f95550a8c3e", size = 185044 },+ { url = "https://files.pythonhosted.org/packages/ad/6e/9a0927ac24bd33a0a9af834d89e0abc7cfd8e13bed17a86407a66773cc0e/websockets-16.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:caab51a72c51973ca21fa8a18bd8165e1a0183f1ac7066a182ff27107b71e1a4", size = 186279 },+ { url = "https://files.pythonhosted.org/packages/b9/ca/bf1c68440d7a868180e11be653c85959502efd3a709323230314fda6e0b3/websockets-16.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:19c4dc84098e523fd63711e563077d39e90ec6702aff4b5d9e344a60cb3c0cb1", size = 185711 },+ { url = "https://files.pythonhosted.org/packages/c4/f8/fdc34643a989561f217bb477cbc47a3a07212cbda91c0e4389c43c296ebf/websockets-16.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:a5e18a238a2b2249c9a9235466b90e96ae4795672598a58772dd806edc7ac6d3", size = 184982 },+ { url = "https://files.pythonhosted.org/packages/dd/d1/574fa27e233764dbac9c52730d63fcf2823b16f0856b3329fc6268d6ae4f/websockets-16.0-cp314-cp314-win32.whl", hash = "sha256:a069d734c4a043182729edd3e9f247c3b2a4035415a9172fd0f1b71658a320a8", size = 177915 },+ { url = "https://files.pythonhosted.org/packages/8a/f1/ae6b937bf3126b5134ce1f482365fde31a357c784ac51852978768b5eff4/websockets-16.0-cp314-cp314-win_amd64.whl", hash = "sha256:c0ee0e63f23914732c6d7e0cce24915c48f3f1512ec1d079ed01fc629dab269d", size = 178381 },+ { url = "https://files.pythonhosted.org/packages/06/9b/f791d1db48403e1f0a27577a6beb37afae94254a8c6f08be4a23e4930bc0/websockets-16.0-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:a35539cacc3febb22b8f4d4a99cc79b104226a756aa7400adc722e83b0d03244", size = 177737 },+ { url = "https://files.pythonhosted.org/packages/bd/40/53ad02341fa33b3ce489023f635367a4ac98b73570102ad2cdd770dacc9a/websockets-16.0-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:b784ca5de850f4ce93ec85d3269d24d4c82f22b7212023c974c401d4980ebc5e", size = 175268 },+ { url = "https://files.pythonhosted.org/packages/74/9b/6158d4e459b984f949dcbbb0c5d270154c7618e11c01029b9bbd1bb4c4f9/websockets-16.0-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:569d01a4e7fba956c5ae4fc988f0d4e187900f5497ce46339c996dbf24f17641", size = 175486 },+ { url = "https://files.pythonhosted.org/packages/e5/2d/7583b30208b639c8090206f95073646c2c9ffd66f44df967981a64f849ad/websockets-16.0-cp314-cp314t-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:50f23cdd8343b984957e4077839841146f67a3d31ab0d00e6b824e74c5b2f6e8", size = 185331 },+ { url = "https://files.pythonhosted.org/packages/45/b0/cce3784eb519b7b5ad680d14b9673a31ab8dcb7aad8b64d81709d2430aa8/websockets-16.0-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:152284a83a00c59b759697b7f9e9cddf4e3c7861dd0d964b472b70f78f89e80e", size = 186501 },+ { url = "https://files.pythonhosted.org/packages/19/60/b8ebe4c7e89fb5f6cdf080623c9d92789a53636950f7abacfc33fe2b3135/websockets-16.0-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:bc59589ab64b0022385f429b94697348a6a234e8ce22544e3681b2e9331b5944", size = 186062 },+ { url = "https://files.pythonhosted.org/packages/88/a8/a080593f89b0138b6cba1b28f8df5673b5506f72879322288b031337c0b8/websockets-16.0-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:32da954ffa2814258030e5a57bc73a3635463238e797c7375dc8091327434206", size = 185356 },+ { url = "https://files.pythonhosted.org/packages/c2/b6/b9afed2afadddaf5ebb2afa801abf4b0868f42f8539bfe4b071b5266c9fe/websockets-16.0-cp314-cp314t-win32.whl", hash = "sha256:5a4b4cc550cb665dd8a47f868c8d04c8230f857363ad3c9caf7a0c3bf8c61ca6", size = 178085 },+ { url = "https://files.pythonhosted.org/packages/9f/3e/28135a24e384493fa804216b79a6a6759a38cc4ff59118787b9fb693df93/websockets-16.0-cp314-cp314t-win_amd64.whl", hash = "sha256:b14dc141ed6d2dde437cddb216004bcac6a1df0935d79656387bd41632ba0bbd", size = 178531 },+ { url = "https://files.pythonhosted.org/packages/72/07/c98a68571dcf256e74f1f816b8cc5eae6eb2d3d5cfa44d37f801619d9166/websockets-16.0-pp311-pypy311_pp73-macosx_10_15_x86_64.whl", hash = "sha256:349f83cd6c9a415428ee1005cadb5c2c56f4389bc06a9af16103c3bc3dcc8b7d", size = 174947 },+ { url = "https://files.pythonhosted.org/packages/7e/52/93e166a81e0305b33fe416338be92ae863563fe7bce446b0f687b9df5aea/websockets-16.0-pp311-pypy311_pp73-macosx_11_0_arm64.whl", hash = "sha256:4a1aba3340a8dca8db6eb5a7986157f52eb9e436b74813764241981ca4888f03", size = 175260 },+ { url = "https://files.pythonhosted.org/packages/56/0c/2dbf513bafd24889d33de2ff0368190a0e69f37bcfa19009ef819fe4d507/websockets-16.0-pp311-pypy311_pp73-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl", hash = "sha256:f4a32d1bd841d4bcbffdcb3d2ce50c09c3909fbead375ab28d0181af89fd04da", size = 176071 },+ { url = "https://files.pythonhosted.org/packages/a5/8f/aea9c71cc92bf9b6cc0f7f70df8f0b420636b6c96ef4feee1e16f80f75dd/websockets-16.0-pp311-pypy311_pp73-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0298d07ee155e2e9fda5be8a9042200dd2e3bb0b8a38482156576f863a9d457c", size = 176968 },+ { url = "https://files.pythonhosted.org/packages/9a/3f/f70e03f40ffc9a30d817eef7da1be72ee4956ba8d7255c399a01b135902a/websockets-16.0-pp311-pypy311_pp73-win_amd64.whl", hash = "sha256:a653aea902e0324b52f1613332ddf50b00c06fdaf7e92624fbf8c77c78fa5767", size = 178735 },+ { url = "https://files.pythonhosted.org/packages/6f/28/258ebab549c2bf3e64d2b0217b973467394a9cea8c42f70418ca2c5d0d2e/websockets-16.0-py3-none-any.whl", hash = "sha256:1637db62fad1dc833276dded54215f2c7fa46912301a24bd94d45d46a011ceec", size = 171598 },+]+[[package]]name = "werkzeug"version = "3.1.5"diff --git a/vibe/api.py b/vibe/api.pyindex 3a93175ae..1dd2af8d7 100644--- a/vibe/api.py+++ b/vibe/api.py@@ -62,6 +62,7 @@ def config_to_payload(config: V2Config) -> dict:"update": config.update.__dict__,"ack_mode": config.ack_mode,"language": config.language,+ "show_duration": config.show_duration,}return payload@@ -974,11 +975,18 @@ def codex_models() -> dict:return {"ok": True, "models": uniq}-def _lark_tenant_token(app_id: str, app_secret: str) -> Optional[str]:+def _lark_api_base(domain: str = "feishu") -> str:+ """Return the API base URL for the given Lark/Feishu domain."""+ if domain == "lark":+ return "https://open.larksuite.com"+ return "https://open.feishu.cn"+++def _lark_tenant_token(app_id: str, app_secret: str, domain: str = "feishu") -> Optional[str]:"""Get Lark tenant access token (internal helper, not exposed to frontend)."""import urllib.request- url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"+ url = f"{_lark_api_base(domain)}/open-apis/auth/v3/tenant_access_token/internal"data = json.dumps({"app_id": app_id, "app_secret": app_secret}).encode()req = urllib.request.Request(url, data=data, headers={"Content-Type": "application/json"})with urllib.request.urlopen(req, timeout=10) as resp:@@ -988,10 +996,10 @@ def _lark_tenant_token(app_id: str, app_secret: str) -> Optional[str]:return None-def lark_auth_test(app_id: str, app_secret: str) -> dict:+def lark_auth_test(app_id: str, app_secret: str, domain: str = "feishu") -> dict:"""Test Lark/Feishu app credentials. Only returns ok/error, never exposes token."""try:- token = _lark_tenant_token(app_id, app_secret)+ token = _lark_tenant_token(app_id, app_secret, domain)if not token:return {"ok": False, "error": "Invalid credentials"}return {"ok": True}@@ -999,19 +1007,20 @@ def lark_auth_test(app_id: str, app_secret: str) -> dict:return {"ok": False, "error": str(exc)}-def lark_list_chats(app_id: str, app_secret: str) -> dict:+def lark_list_chats(app_id: str, app_secret: str, domain: str = "feishu") -> dict:"""List Lark/Feishu group chats the bot has joined (with pagination)."""import urllib.requesttry:- token = _lark_tenant_token(app_id, app_secret)+ token = _lark_tenant_token(app_id, app_secret, domain)if not token:return {"ok": False, "error": "Failed to get access token"}+ base = _lark_api_base(domain)channels = []page_token = ""while True:- url = "https://open.feishu.cn/open-apis/im/v1/chats?page_size=100"+ url = f"{base}/open-apis/im/v1/chats?page_size=100"if page_token:url = f"{url}&page_token={page_token}"req = urllib.request.Request(url, headers={"Authorization": f"Bearer {token}"})@@ -1035,3 +1044,83 @@ def lark_list_chats(app_id: str, app_secret: str) -> dict:return {"ok": True, "channels": channels}except Exception as exc:return {"ok": False, "error": str(exc)}+++# ---------------------------------------------------------------------------+# Lark temporary WebSocket connection (for setup wizard)+# ---------------------------------------------------------------------------+# The Feishu console only shows the "Use Long Connection" option when an+# active WebSocket connection exists. During the setup wizard we start a+# temporary WS client so the user can configure event subscriptions.++_temp_ws_lock = __import__("threading").Lock()+_temp_ws_client = None+_temp_ws_thread = None+++def lark_temp_ws_start(app_id: str, app_secret: str, domain: str = "feishu") -> dict:+ """Start a temporary WebSocket connection so the Feishu console shows the long-connection option."""+ global _temp_ws_client, _temp_ws_thread++ with _temp_ws_lock:+ # Stop any existing temp connection first+ _stop_temp_ws_internal()++ try:+ import lark_oapi as lark++ sdk_domain = lark.LARK_DOMAIN if domain == "lark" else lark.FEISHU_DOMAIN++ # Minimal event handler (does nothing, just keeps the connection alive)+ handler = lark.EventDispatcherHandler.builder("", "").build()++ client = lark.ws.Client(+ app_id=app_id,+ app_secret=app_secret,+ event_handler=handler,+ log_level=lark.LogLevel.INFO,+ domain=sdk_domain,+ )++ import threading++ def _run():+ try:+ client.start()+ except Exception:+ pass # Thread exits silently on stop++ t = threading.Thread(target=_run, daemon=True, name="lark-temp-ws")+ t.start()++ _temp_ws_client = client+ _temp_ws_thread = t++ return {"ok": True, "message": "Temporary WebSocket connection started"}+ except Exception as exc:+ return {"ok": False, "error": str(exc)}+++def lark_temp_ws_stop() -> dict:+ """Stop the temporary WebSocket connection."""+ with _temp_ws_lock:+ _stop_temp_ws_internal()+ return {"ok": True}+++def _stop_temp_ws_internal():+ """Internal helper to stop temp WS (caller must hold _temp_ws_lock)."""+ global _temp_ws_client, _temp_ws_thread+ if _temp_ws_client is not None:+ try:+ # Prevent auto-reconnect and close the underlying connection+ _temp_ws_client._auto_reconnect = False+ from lark_oapi.ws.client import loop as ws_loop++ import asyncio++ asyncio.run_coroutine_threadsafe(_temp_ws_client._disconnect(), ws_loop)+ except Exception:+ pass+ _temp_ws_client = None+ _temp_ws_thread = Nonediff --git a/vibe/i18n/en.json b/vibe/i18n/en.jsonindex 06bc7d64f..9574638a4 100644--- a/vibe/i18n/en.json+++ b/vibe/i18n/en.json@@ -12,7 +12,8 @@"default": "(Default)","selectOne": "Select one","selectOneOrMore": "Select one or more",- "processing": "Processing `/{command}`..."+ "processing": "Processing `/{command}`...",+ "submitted": "Submitted"},"error": {"channelNotEnabled": "This channel is not enabled. Please go to the control panel to enable it.",@@ -110,6 +111,9 @@"optionDefault": "(Default) - {status}","optionRequireMention": "Require @mention","optionDontRequireMention": "Don't require @mention",+ "mentionStatusOn": "Require @",+ "mentionStatusOff": "Don't require @",+ "requireMentionLarkNote": "Note: To receive non-mention messages in groups, the Feishu app needs the `im:message.group_msg` permission.","language": "Language / \u8bed\u8a00","languageHint": "Changes the language for bot messages in Slack and the Web UI."},diff --git a/vibe/i18n/zh.json b/vibe/i18n/zh.jsonindex e5fdffecf..543273f98 100644--- a/vibe/i18n/zh.json+++ b/vibe/i18n/zh.json@@ -12,7 +12,8 @@"default": "(默认)","selectOne": "选择一个","selectOneOrMore": "选择一个或多个",- "processing": "正在处理 `/{command}`..."+ "processing": "正在处理 `/{command}`...",+ "submitted": "已提交"},"error": {"channelNotEnabled": "此频道未启用。请前往控制面板启用它。",@@ -110,6 +111,9 @@"optionDefault": "(默认) - {status}","optionRequireMention": "需要 @提及","optionDontRequireMention": "不需要 @提及",+ "mentionStatusOn": "需要 @",+ "mentionStatusOff": "不需要 @",+ "requireMentionLarkNote": "注意:要在群组中接收非 @提及消息,飞书应用需要 `im:message.group_msg` 权限。","language": "语言 / Language","languageHint": "更改 Slack 与 Web UI 中机器人消息的语言。"},diff --git a/vibe/runtime.py b/vibe/runtime.pyindex 04b7979b1..9b2de001d 100644--- a/vibe/runtime.py+++ b/vibe/runtime.py@@ -35,12 +35,12 @@ def get_ui_dist_path() -> Path:dev_ui_path = project_root / "ui" / "dist"if dev_ui_path.exists():return dev_ui_path-+# Then check if UI is bundled with the packagepackage_ui_path = get_package_root() / "ui" / "dist"if package_ui_path.exists():return package_ui_path-+# Fallback to development pathreturn dev_ui_path@@ -52,12 +52,12 @@ def get_service_main_path() -> Path:dev_main_path = project_root / "main.py"if dev_main_path.exists():return dev_main_path-+# Then check if service_main.py is bundled with the packagepackage_main_path = get_package_root() / "service_main.py"if package_main_path.exists():return package_main_path-+# Fallback to development pathreturn dev_main_path@@ -68,7 +68,7 @@ def get_working_dir() -> Path:project_root = get_project_root()if (project_root / "main.py").exists():return project_root-+# In installed mode, use package rootreturn get_package_root()@@ -146,7 +146,7 @@ def spawn_background(args, pid_path, stdout_name: str, stderr_name: str):return process.pid-def stop_process(pid_path):+def stop_process(pid_path, timeout=5):if not pid_path.exists():return Falsepid = int(pid_path.read_text(encoding="utf-8").strip())@@ -155,6 +155,17 @@ def stop_process(pid_path):return Falseos.kill(pid, signal.SIGTERM)pid_path.unlink(missing_ok=True)+ # Wait for the process to actually exit; SIGKILL if it doesn't+ deadline = time.monotonic() + timeout+ while time.monotonic() < deadline:+ if not pid_alive(pid):+ return True+ time.sleep(0.2)+ # Process didn't exit in time — force kill+ try:+ os.kill(pid, signal.SIGKILL)+ except OSError:+ passreturn True@@ -194,9 +205,7 @@ def start_service():def start_ui(host, port):- command = "from vibe.ui_server import run_ui_server; run_ui_server('{}', {})".format(- host, port- )+ command = "from vibe.ui_server import run_ui_server; run_ui_server('{}', {})".format(host, port)return spawn_background([sys.executable, "-c", command],paths.get_runtime_ui_pid_path(),diff --git a/vibe/ui_server.py b/vibe/ui_server.pyindex cdbef8933..0a6b6c4b1 100644--- a/vibe/ui_server.py+++ b/vibe/ui_server.py@@ -304,7 +304,9 @@ def lark_auth_test():from vibe import apipayload = request.json or {}- result = api.lark_auth_test(payload.get("app_id", ""), payload.get("app_secret", ""))+ result = api.lark_auth_test(+ payload.get("app_id", ""), payload.get("app_secret", ""), payload.get("domain", "feishu")+ )return jsonify(result)@@ -313,7 +315,28 @@ def lark_chats():from vibe import apipayload = request.json or {}- return jsonify(api.lark_list_chats(payload.get("app_id", ""), payload.get("app_secret", "")))+ return jsonify(+ api.lark_list_chats(payload.get("app_id", ""), payload.get("app_secret", ""), payload.get("domain", "feishu"))+ )++[email protected]("/lark/temp_ws/start", methods=["POST"])+def lark_temp_ws_start():+ from vibe import api++ payload = request.json or {}+ return jsonify(+ api.lark_temp_ws_start(+ payload.get("app_id", ""), payload.get("app_secret", ""), payload.get("domain", "feishu")+ )+ )++[email protected]("/lark/temp_ws/stop", methods=["POST"])+def lark_temp_ws_stop():+ from vibe import api++ return jsonify(api.lark_temp_ws_stop())@app.route("/doctor", methods=["POST"])