meshagent-api 0.44.9__tar.gz → 0.44.11__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {meshagent_api-0.44.9/meshagent_api.egg-info → meshagent_api-0.44.11}/PKG-INFO +1 -1
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/client.py +9 -1
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/client_test.py +37 -0
- meshagent_api-0.44.11/meshagent/api/version.py +1 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11/meshagent_api.egg-info}/PKG-INFO +1 -1
- meshagent_api-0.44.9/meshagent/api/version.py +0 -1
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/LICENSE +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/MANIFEST.in +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/README.md +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/__init__.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/agent_content.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/aiohttp_redaction.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/chan.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/crdt.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/dataset_schema.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/entrypoint.js +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/error_codes.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/helpers.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/http.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/image_runtime.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/keys.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/managed_agents.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/managed_agents_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/messaging.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/messaging_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/oauth.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/oauth_scopes.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/oauth_scopes_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/participant.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/participant_token.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/participant_token_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/port_forward.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/port_forward_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/protocol.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/protocol_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/py.typed +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/reasoning_schema.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/registry_auth.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/room_ports.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/room_server_client.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/room_server_client_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/runtime.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/runtime_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/schema.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/schema_document.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/schema_document_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/schema_registry.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/schema_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/schema_util.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/service_spec_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/service_template_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/services.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/specs/service.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/sql.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/sql_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/token_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/urls.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/webhooks.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/websocket_protocol.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent/api/websocket_protocol_test.py +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent_api.egg-info/SOURCES.txt +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent_api.egg-info/dependency_links.txt +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent_api.egg-info/requires.txt +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/meshagent_api.egg-info/top_level.txt +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/pyproject.toml +0 -0
- {meshagent_api-0.44.9 → meshagent_api-0.44.11}/setup.cfg +0 -0
|
@@ -3673,12 +3673,20 @@ class Meshagent:
|
|
|
3673
3673
|
Returns Room.
|
|
3674
3674
|
"""
|
|
3675
3675
|
url = f"{self.base_url}/accounts/projects/{project_id}/rooms"
|
|
3676
|
+
permissions_payload = (
|
|
3677
|
+
{
|
|
3678
|
+
user_id: scope.model_dump(mode="json")
|
|
3679
|
+
for user_id, scope in permissions.items()
|
|
3680
|
+
}
|
|
3681
|
+
if permissions is not None
|
|
3682
|
+
else None
|
|
3683
|
+
)
|
|
3676
3684
|
payload = {
|
|
3677
3685
|
"name": name,
|
|
3678
3686
|
"if_not_exists": bool(if_not_exists),
|
|
3679
3687
|
"metadata": metadata,
|
|
3680
3688
|
"annotations": annotations,
|
|
3681
|
-
"permissions":
|
|
3689
|
+
"permissions": permissions_payload,
|
|
3682
3690
|
}
|
|
3683
3691
|
async with self._session.post(
|
|
3684
3692
|
url, headers=self._get_headers(), json=payload
|
|
@@ -852,6 +852,43 @@ async def test_validate_participant_token_fetches_validated_token():
|
|
|
852
852
|
]
|
|
853
853
|
|
|
854
854
|
|
|
855
|
+
@pytest.mark.asyncio
|
|
856
|
+
async def test_create_room_serializes_permissions_payload():
|
|
857
|
+
room_payload = {
|
|
858
|
+
"id": "room-1",
|
|
859
|
+
"name": "room-a",
|
|
860
|
+
"metadata": {},
|
|
861
|
+
"annotations": {},
|
|
862
|
+
"permissions": {},
|
|
863
|
+
}
|
|
864
|
+
session = _FakeSession([_FakeResponse(status=200, payload=room_payload)])
|
|
865
|
+
client = Meshagent(base_url="http://example.test", token="token", session=session)
|
|
866
|
+
|
|
867
|
+
room = await client.create_room(
|
|
868
|
+
project_id="proj_123",
|
|
869
|
+
name="room-a",
|
|
870
|
+
if_not_exists=True,
|
|
871
|
+
metadata={"purpose": "test"},
|
|
872
|
+
annotations={"meshagent.storage.class": "ephemeral"},
|
|
873
|
+
permissions={"user-1": ApiScope.full()},
|
|
874
|
+
)
|
|
875
|
+
|
|
876
|
+
assert room.name == "room-a"
|
|
877
|
+
assert session.calls == [
|
|
878
|
+
(
|
|
879
|
+
"post",
|
|
880
|
+
"http://example.test/accounts/projects/proj_123/rooms",
|
|
881
|
+
{
|
|
882
|
+
"name": "room-a",
|
|
883
|
+
"if_not_exists": True,
|
|
884
|
+
"metadata": {"purpose": "test"},
|
|
885
|
+
"annotations": {"meshagent.storage.class": "ephemeral"},
|
|
886
|
+
"permissions": {"user-1": ApiScope.full().model_dump(mode="json")},
|
|
887
|
+
},
|
|
888
|
+
)
|
|
889
|
+
]
|
|
890
|
+
|
|
891
|
+
|
|
855
892
|
@pytest.mark.asyncio
|
|
856
893
|
async def test_agent_crud_methods_use_agent_routes():
|
|
857
894
|
configuration = ManagedAgentSpec(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.44.11"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.44.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|