mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-11-23 05:59:44 +08:00
New Runner plugin plugins/Runner/multica-agent (plugin:langbot-team/MulticaAgent/default). Each LangBot conversation maps to one Multica chat session; messages are posted via the Multica chat API (PAT + X-Workspace-ID), and the runner polls until the assistant reply for that task lands, then returns it. In-chat commands (/multica agents|use|new) list agents and switch the agent per conversation. Deleted sessions are recreated once; failed/cancelled/timed-out agent tasks surface as run.failed with stable multica.* codes. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
28 lines
684 B
Python
28 lines
684 B
Python
"""Multica Runner errors."""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
class MulticaAPIError(Exception):
|
|
"""A Multica API request failed."""
|
|
|
|
def __init__(
|
|
self,
|
|
message: str,
|
|
code: str = "multica.api_error",
|
|
retryable: bool = False,
|
|
status: int | None = None,
|
|
):
|
|
self.message = message
|
|
self.code = code
|
|
self.retryable = retryable
|
|
self.status = status
|
|
super().__init__(message)
|
|
|
|
|
|
class MulticaConfigError(MulticaAPIError):
|
|
"""Multica runner configuration is invalid."""
|
|
|
|
def __init__(self, message: str, code: str = "multica.config_invalid"):
|
|
super().__init__(message, code=code)
|