Refactor project structure and enhance backend integration
- Expanded package inclusion in `pyproject.toml` to support new modules. - Introduced new `adapters` and `protocol` packages for better organization. - Added backend adapter implementations for control plane integration. - Updated main application imports to reflect new package structure. - Removed deprecated core components and adjusted documentation accordingly. - Enhanced architecture documentation to clarify the new runtime and integration layers.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import pytest
|
||||
|
||||
from core.session import Session, WsSessionState
|
||||
from models.ws_v1 import OutputAudioPlayedMessage, SessionStartMessage, parse_client_message
|
||||
from runtime.session.manager import Session, WsSessionState
|
||||
from protocol.ws_v1.schema import OutputAudioPlayedMessage, SessionStartMessage, parse_client_message
|
||||
|
||||
|
||||
def _session() -> Session:
|
||||
@@ -194,7 +194,7 @@ async def test_handle_session_start_requires_assistant_id_and_closes_transport()
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_handle_session_start_applies_whitelisted_overrides_and_ignores_workflow(monkeypatch):
|
||||
monkeypatch.setattr("core.session.settings.ws_emit_config_resolved", False)
|
||||
monkeypatch.setattr("runtime.session.manager.settings.ws_emit_config_resolved", False)
|
||||
|
||||
session = Session.__new__(Session)
|
||||
session.id = "sess_start_ok"
|
||||
@@ -289,9 +289,9 @@ async def test_handle_session_start_applies_whitelisted_overrides_and_ignores_wo
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_handle_session_start_emits_config_resolved_when_enabled(monkeypatch):
|
||||
monkeypatch.setattr("core.session.settings.ws_emit_config_resolved", True)
|
||||
monkeypatch.setattr("core.session.settings.ws_protocol_version", "v1-custom")
|
||||
monkeypatch.setattr("core.session.settings.default_codec", "pcmu")
|
||||
monkeypatch.setattr("runtime.session.manager.settings.ws_emit_config_resolved", True)
|
||||
monkeypatch.setattr("runtime.session.manager.settings.ws_protocol_version", "v1-custom")
|
||||
monkeypatch.setattr("runtime.session.manager.settings.default_codec", "pcmu")
|
||||
|
||||
session = Session.__new__(Session)
|
||||
session.id = "sess_start_emit_config"
|
||||
@@ -385,8 +385,8 @@ async def test_handle_session_start_emits_config_resolved_when_enabled(monkeypat
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_handle_audio_uses_chunk_size_for_frame_validation(monkeypatch):
|
||||
monkeypatch.setattr("core.session.settings.sample_rate", 16000)
|
||||
monkeypatch.setattr("core.session.settings.chunk_size_ms", 10)
|
||||
monkeypatch.setattr("runtime.session.manager.settings.sample_rate", 16000)
|
||||
monkeypatch.setattr("runtime.session.manager.settings.chunk_size_ms", 10)
|
||||
|
||||
session = Session.__new__(Session)
|
||||
session.id = "sess_chunk_frame"
|
||||
|
||||
Reference in New Issue
Block a user