sync update from LAN repo (source master @ ca48c4ec)

This commit is contained in:
gozeros committed 2026-11-05 10:53:54 +08:00
1 parent 8bc8b0e082
commit ea9dcff9c0
873 files changed
+107866 -14011

No files matched your search

@@ -77,6 +77,11 @@ class AgentStore(ABC):
"""Return featured + still-visible-to-``user_id`` agents, ordered by ``featured_order`` asc."""
raise NotImplementedError
@abstractmethod
async def list_sidebar(self, user_id: str, *, limit: int = 3) -> list[dict[str, Any]]:
"""Return only the id/name fields needed by the workspace sidebar."""
raise NotImplementedError
@abstractmethod
async def list_by_ids(self, agent_ids: list[str], user_id: str) -> list[dict[str, Any]]:
"""Return rows for ``agent_ids`` visible to ``user_id``, preserving the input order."""
@@ -133,6 +138,7 @@ class AgentStore(ABC):
owner: str | None = None,
square_id: str | None = None,
square_is_default: bool = False,
hidden: bool | None = None,
) -> tuple[list[dict[str, Any]], int]:
"""Return one page of agents plus the total matching count.
@@ -143,6 +149,9 @@ class AgentStore(ABC):
- ``None`` — the default listing visibility (``list_visible``).
``admin=True`` bypasses the visibility/scope filter entirely (every
agent), but still honors ``search`` / ``tag_ids``. Caller authorizes.
Admin-hidden agents (``hidden=True`` rows) are excluded from every
non-admin listing; under ``admin=True`` the ``hidden`` param selects
only hidden / only visible rows (``None`` = both).
``search`` matches the raw name OR its desensitized display form.
``tag_ids`` keeps agents carrying ANY of the tags (OR). ``owner`` keeps
@@ -167,8 +176,20 @@ class AgentStore(ABC):
raise NotImplementedError
@abstractmethod
async def set_extras(self, agent_id: str, *, tool_groups: list[str] | None, model: str | None) -> None:
"""Upsert the cached ``tool_groups`` / ``model`` for ``agent_id``."""
async def set_extras(
self,
agent_id: str,
*,
tool_groups: list[str] | None,
model: str | None,
chat_link: Any = None,
update_chat_link: bool = False,
) -> None:
"""Upsert the cached ``tool_groups`` / ``model`` for ``agent_id``.
``chat_link`` is written only when ``update_chat_link`` is true, so a
skills/model refresh does not clear a previously mirrored jump link.
"""
raise NotImplementedError
@abstractmethod