Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.
Python agent-orchestrationaiai-agentschatopsdiscordlangchainmcpmicrosoft-teamsmulti-agentopen-sourceopenaiself-hostedslack
Fit the decision tests to main's room detail and merged workspace roles
agent-runner35331521e5b7ff7
diff --git a/core/tests/switch_core/gateway/test_caller_permissions.py b/core/tests/switch_core/gateway/test_caller_permissions.pyindex cd0794b67..3561ce3d9 100644--- a/core/tests/switch_core/gateway/test_caller_permissions.py+++ b/core/tests/switch_core/gateway/test_caller_permissions.py@@ -45,6 +45,7 @@ from tests.switch_core.gateway.agent_route_harness import (add_user,)from tests.switch_core.gateway.test_room_detail_access import (+ _NO_DECISIONS,_ROOM_STORE,_USER_STORE,_add_room,@@ -99,6 +100,7 @@ class TestRoomPermissions:None, # type: ignore[arg-type] # bridge_store: the room has no bridgeNone, # type: ignore[arg-type] # external_user_store_protocol(),+ _NO_DECISIONS,user,caller == "admin",)@@ -651,6 +653,7 @@ class TestRoomTransfer:None, # type: ignore[arg-type] # bridge_store: the room has no bridgeNone, # type: ignore[arg-type] # external_user_store_protocol(),+ _NO_DECISIONS,owner,False,)diff --git a/core/tests/switch_core/gateway/test_decision_settings.py b/core/tests/switch_core/gateway/test_decision_settings.pyindex 358385e1a..492de5202 100644--- a/core/tests/switch_core/gateway/test_decision_settings.py+++ b/core/tests/switch_core/gateway/test_decision_settings.py@@ -223,7 +223,7 @@ async def test_no_server_default_offers_no_haiku_and_says_why(async def test_a_haiku_key_round_trips_as_its_last_four(session_factory: async_sessionmaker[AsyncSession], service: _Service) -> None:- admin = await _person(session_factory, "ada", role="owner")+ admin = await _person(session_factory, "ada", role="admin")async with _as(_app(session_factory, service), admin) as client:saved = await client.put("/decision-settings",diff --git a/core/tests/switch_core/gateway/test_room_detail_access.py b/core/tests/switch_core/gateway/test_room_detail_access.pyindex 3d7385cff..598c01ebf 100644--- a/core/tests/switch_core/gateway/test_room_detail_access.py+++ b/core/tests/switch_core/gateway/test_room_detail_access.py@@ -16,6 +16,7 @@ from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmakerfrom switch_core.bridges.resource.service import ResourceServicefrom switch_core.db.models import Room, Userfrom switch_core.db.stores.agent_store import AgentStore+from switch_core.db.stores.decision_settings_store import DecisionSettingsStorefrom switch_core.db.stores.document_store import DocumentStorefrom switch_core.db.stores.package_store import PackageStorefrom switch_core.db.stores.reference_store import ReferenceStore@@ -24,6 +25,7 @@ from switch_core.db.stores.room_link_store import RoomLinkStorefrom switch_core.db.stores.room_role_store import RoomRoleStorefrom switch_core.db.stores.room_store import RoomStorefrom switch_core.db.stores.user_store import UserStore+from switch_core.decision.settings import DecisionAvailability, ServerDefaultfrom switch_core.gateway.rooms import get_room_ROOM_STORE = RoomStore()@@ -79,6 +81,13 @@ async def _add_room(return room+_NO_DECISIONS = DecisionAvailability(+ enabled=False,+ server=ServerDefault(endpoint_url=None, api_key=None, bedrock_enabled=False),+ store=DecisionSettingsStore(),+)++class TestRoomDetailOwner:async def test_detail_names_the_owner(self, session_factory: async_sessionmaker[AsyncSession]@@ -94,6 +103,7 @@ class TestRoomDetailOwner:None, # type: ignore[arg-type] # bridge_store: the room has no bridgeNone, # type: ignore[arg-type] # external_user_store_protocol(),+ _NO_DECISIONS,owner,await _USER_STORE.administers(session, owner),)