fix: always include parameters field in Genesys AudioHook messages
The AudioHook protocol requires every message to carry a `parameters` object. `_create_message` conditionally included it only when parameters were truthy, so pong responses and closed responses without outputVariables were sent without the field. Clients that validate message structure (including the Genesys reference implementation) rejected these messages, which broke server sequence tracking and prevented outputVariables from reaching the Architect flow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
committed by
Mark Backman
parent
e4a82ffcac
commit
086aff27a8
@@ -76,6 +76,7 @@ class TestGenesysAudioHookSerializer:
|
||||
|
||||
assert msg["type"] == "pong"
|
||||
assert msg["id"] == serializer.session_id
|
||||
assert msg["parameters"] == {}
|
||||
|
||||
def test_create_closed_response(self):
|
||||
"""Test creating a closed response message."""
|
||||
@@ -86,7 +87,7 @@ class TestGenesysAudioHookSerializer:
|
||||
|
||||
assert msg["type"] == "closed"
|
||||
assert serializer.is_open is False
|
||||
assert "parameters" not in msg # No parameters when no output_variables
|
||||
assert msg["parameters"] == {} # Empty parameters when no output_variables
|
||||
|
||||
def test_create_closed_response_with_output_variables(self):
|
||||
"""Test creating a closed response with custom output variables."""
|
||||
|
||||
Reference in New Issue
Block a user