feat(sdk): add host integration extension points

This commit is contained in:
chengyongru
2026-07-28 15:30:28 +08:00
committed by Xubin Ren
parent 12f828ea3d
commit c050955ae3
13 changed files with 359 additions and 7 deletions
+5
View File
@@ -65,6 +65,7 @@ async def test_turn_hook_builder_runs_factories_with_matching_registration_order
session_key="websocket:chat-1",
workspace=tmp_path,
metadata={"source": "test"},
attributes={"tenant": "acme"},
registered_hook_factories=[factory("registered_factory")],
registered_hooks=[RecordingHook(events, "registered")],
turn_hook_factories=[factory("turn_factory")],
@@ -92,6 +93,10 @@ async def test_turn_hook_builder_runs_factories_with_matching_registration_order
{"source": "test"},
{"source": "test"},
]
assert [context.attributes for context in captured] == [
{"tenant": "acme"},
{"tenant": "acme"},
]
@pytest.mark.asyncio