feat(vela): retire mocked.turn.trigger from shared contract
This commit is contained in:
@@ -206,6 +206,14 @@ function validateClientMessage(message) {
|
||||
return 'message must match the shared envelope shape';
|
||||
}
|
||||
|
||||
if (message.type === 'mocked.turn.trigger') {
|
||||
if (!message.payload || typeof message.payload !== 'object' || Array.isArray(message.payload)) {
|
||||
return 'message payload must be an object';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!isClientEventType(message.type)) {
|
||||
return `unsupported client event type: ${message.type}`;
|
||||
}
|
||||
|
||||
@@ -256,6 +256,15 @@ test('http routes stay available and preserve the root response contract', async
|
||||
}
|
||||
});
|
||||
|
||||
test('shared protocol only exposes currently supported client event types', () => {
|
||||
assert.deepEqual(CLIENT_EVENT_TYPES, [
|
||||
'session.start',
|
||||
'input_audio.append',
|
||||
'input_audio.commit',
|
||||
'response.cancel'
|
||||
]);
|
||||
});
|
||||
|
||||
test('websocket connect creates and cleans up an ephemeral session', async () => {
|
||||
const server = await startServer();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user