Skip to content

omicverse.jarvis.channels

source package omicverse.jarvis.channels

Channel adapters for Jarvis.

Classes

  • AccessControl Allow all users when allowed is empty; otherwise whitelist.

Functions

source class AccessControl(allowed: Optional[List[str]] = None)

Allow all users when allowed is empty; otherwise whitelist.

Methods

source method AccessControl.allows(user_id: int, username: Optional[str])bool

source run_bot(token: str, session_manager: Any, access_control: AccessControl, verbose: bool = False)None

Build and start the Telegram application (blocking).

Raises

  • ImportError

source run_feishu_bot(*, app_id: str, app_secret: str, session_manager: Any, host: str = '0.0.0.0', port: int = 8080, path: str = '/feishu/events', verification_token: Optional[str] = None, encrypt_key: Optional[str] = None)None

source run_feishu_ws_bot(*, app_id: str, app_secret: str, session_manager: Any, verification_token: Optional[str] = None, encrypt_key: Optional[str] = None)None

Raises

  • RuntimeError

source run_imessage_bot(*, session_manager: Any, cli_path: str = 'imsg', db_path: Optional[str] = None, include_attachments: bool = False)None

source run_qq_bot(*, app_id: str, client_secret: str, session_manager: Any, markdown: bool = False, image_host: Optional[str] = None, image_server_bind: str = '0.0.0.0', image_server_port: int = 8081)None

Start the QQ Bot channel and block until interrupted.

Parameters

  • app_id : str QQ Bot AppID from the QQ Open Platform.

  • client_secret : str QQ Bot ClientSecret / AppSecret.

  • session_manager : SessionManager OmicVerse Jarvis session manager.

  • markdown : bool Enable markdown reply format (msg_type=2). Requires the bot to have markdown message permission on the QQ Open Platform (default: False). Analysis reports and summaries use markdown; plain text is the fallback.

  • image_host : str, optional Public base URL for the image hosting server (e.g. http://1.2.3.4:8081). Required if you want analysis figures to be sent as QQ images. If omitted, figures are generated but not forwarded to QQ.

  • image_server_bind : str Local interface to bind the image HTTP server (default: 0.0.0.0).

  • image_server_port : int Port for the image HTTP server (default: 8081).