feat(companion): add known event name typing and listing

This commit is contained in:
William Valentin
2026-02-16 19:30:39 -08:00
parent 4d6bed72d8
commit 4f25994876
5 changed files with 37 additions and 4 deletions
+12
View File
@@ -224,6 +224,18 @@ describe('CompanionRuntimeClient', () => {
expect(typingHandler).toHaveBeenCalledWith({ active: true });
});
it('lists known companion event names', () => {
const client = new CompanionRuntimeClient({
url: 'ws://127.0.0.1:1',
});
expect(client.listKnownEventNames()).toEqual([
'agent.stream',
'agent.typing',
'context_warning',
]);
});
it('supports subscribeContextWarning helper', () => {
const client = new CompanionRuntimeClient({
url: 'ws://127.0.0.1:1',