Files
nanobot/nanobot/channels/feishu/config.py
T
chengyongru 328e933d36 refactor: isolate runtime contracts and enforce import boundaries (#6166)
* test: enforce Python import ownership boundaries

* test: protect client import boundaries and rehome shared UI contracts

* refactor: remove gateway and client dependency inversions

* fix: detect dynamic imports in conditional expressions

* refactor(tools): keep configuration contracts with their owners

* docs: keep design guidance focused on ownership and checks

* fix: preserve default threaded turn delivery
2026-10-13 13:56:28 +08:00

37 lines
1.0 KiB
Python

"""Dependency-free Feishu configuration model shared by management and runtime."""
from typing import Literal
from pydantic import Field
from nanobot.config_base import Base
class FeishuConfig(Base):
"""Feishu/Lark channel configuration using WebSocket long connection."""
instance_id: str = "default"
name: str = "nanobot"
identity_key: str = ""
enabled: bool = False
app_id: str = ""
app_secret: str = ""
encrypt_key: str = ""
verification_token: str = ""
allow_from: list[str] = Field(default_factory=list)
react_emoji: str = "THUMBSUP"
done_emoji: str | None = None
tool_hint_prefix: str = "\U0001f527"
group_policy: Literal["open", "mention"] = "mention"
reply_to_message: bool = False
streaming: bool = True
domain: Literal["feishu", "lark"] = "feishu"
topic_isolation: bool = True
def feishu_default_config() -> dict[str, object]:
return FeishuConfig().model_dump(by_alias=True)
__all__ = ["FeishuConfig", "feishu_default_config"]