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(admin): reload store before bind validation, filter expired codes, block unauth Feishu channels
cyh8be7ebdb7952
diff --git a/config/v2_settings.py b/config/v2_settings.pyindex 7e05f274f..193df6c54 100644--- a/config/v2_settings.py+++ b/config/v2_settings.py@@ -293,6 +293,10 @@ class SettingsStore:Thread-safe: uses a lock to prevent concurrent bind races."""with self._bind_lock:+ # Reload from disk so we pick up bind codes created by the UI API+ # (which uses a separate SettingsStore instance).+ self._load()+# Check already boundif self.is_bound_user(user_id):return False, Falsediff --git a/modules/im/feishu.py b/modules/im/feishu.pyindex 25ccdc82a..804d963e7 100644--- a/modules/im/feishu.py+++ b/modules/im/feishu.py@@ -1230,13 +1230,10 @@ class FeishuBot(BaseIMClient):is_dm = Trueif not is_bound_user or not is_dm:if not chat_id or not await self._is_authorized_channel(chat_id):- if is_bound_user:- # Bound user in a non-authorized channel — allow through- # but don't mark as DM (it's a channel context)- pass- else:- logger.info("Card action from unauthorized/unknown channel %s, ignoring", chat_id)- return+ logger.info(+ "Card action from unauthorized/unknown channel %s (bound=%s), ignoring", chat_id, is_bound_user+ )+ returncontext = MessageContext(user_id=user_id,diff --git a/vibe/api.py b/vibe/api.pyindex 3de0066e8..d5e6f8a2d 100644--- a/vibe/api.py+++ b/vibe/api.py@@ -1223,9 +1223,9 @@ def delete_bind_code(code: str) -> dict:def get_first_bind_code() -> dict:"""Get or create the initial bind code for setup wizard."""store = SettingsStore()- # If any active code exists, return it+ # If any valid (active + not expired) code exists, return itfor bc in store.get_bind_codes():- if bc.is_active:+ if bc.is_active and store.validate_bind_code(bc.code) is not None:return {"ok": True, "code": bc.code, "is_new": False}# Otherwise create a new one-time codebc = store.create_bind_code("one_time")