feat(vela): retire mocked.turn.trigger from shared contract

This commit is contained in:
2026-04-08 22:05:13 +02:00
parent 8e14eaeed0
commit 742e84e40f
7 changed files with 23 additions and 5 deletions

View File

@@ -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}`;
}

View File

@@ -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();