@startsimpli/integrations 0.2.225 → 0.2.227
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/__tests__/attention-orgs.test.ts +61 -0
- package/src/__tests__/attention-run.test.ts +3 -3
- package/src/__tests__/converse-meeting-interrupted.test.ts +74 -0
- package/src/__tests__/converse-meeting-vad.test.ts +25 -3
- package/src/__tests__/converse-meeting.test.ts +29 -0
- package/src/__tests__/converse-roci-transcript.test.ts +36 -0
- package/src/__tests__/converse-soak.test.ts +28 -0
- package/src/__tests__/converse-tts.test.ts +128 -0
- package/src/__tests__/converse.test.ts +38 -1
- package/src/__tests__/relay-items.test.ts +1 -1
- package/src/corpus/attention/importance.ts +1 -1
- package/src/corpus/attention/index.ts +1 -0
- package/src/corpus/attention/orgs.ts +41 -0
- package/src/corpus/attention/policy.ts +2 -0
- package/src/corpus/attention/push.ts +2 -1
- package/src/corpus/attention/queue.ts +3 -1
- package/src/corpus/attention/run-steps.ts +1 -1
- package/src/corpus/attention/run.ts +4 -3
- package/src/corpus/attention/types.ts +1 -1
- package/src/corpus/converse/handle.ts +12 -4
- package/src/corpus/converse/meeting-config.ts +8 -2
- package/src/corpus/converse/meeting.ts +24 -5
- package/src/corpus/converse/respond.ts +2 -2
- package/src/corpus/converse/speak-chunks.ts +33 -0
- package/src/corpus/converse/speak.ts +17 -4
- package/src/corpus/converse/types.ts +2 -0
- package/src/corpus/converse/vad.ts +16 -1
- package/src/corpus/notify/types.ts +2 -0
- package/src/native/app/FoundryApp.tsx +37 -2
- package/src/native/app/__tests__/briefingServices.test.ts +26 -0
- package/src/native/app/__tests__/haptics.test.tsx +55 -0
- package/src/native/app/__tests__/launch.test.ts +23 -1
- package/src/native/app/briefingServices.ts +9 -0
- package/src/native/app/converseServices.ts +17 -5
- package/src/native/app/device.ts +7 -0
- package/src/native/app/launch.ts +24 -0
- package/src/native/app/registry.tsx +6 -1
- package/src/native/app/services.ts +2 -2
- package/src/native/briefing/__tests__/playerPauseResume.test.ts +47 -0
- package/src/native/briefing/audioPlayer.ts +16 -1
- package/src/native/converse/ConverseScreen.tsx +45 -78
- package/src/native/converse/__tests__/bargeInIO.test.ts +49 -0
- package/src/native/converse/__tests__/liveScreen.test.tsx +59 -63
- package/src/native/converse/__tests__/meetingIO.test.ts +89 -23
- package/src/native/converse/__tests__/mock.test.ts +58 -0
- package/src/native/converse/__tests__/speedScreen.test.tsx +6 -2
- package/src/native/converse/index.ts +4 -1
- package/src/native/converse/io.ts +34 -20
- package/src/native/converse/mock.ts +136 -0
- package/src/native/converse/stateBanner.tsx +41 -0
- package/src/native/index.ts +1 -0
- package/src/native/push/NeedsYouCard.tsx +11 -7
- package/src/native/push/__tests__/decisionsApp.test.tsx +2 -3
- package/src/native/push/__tests__/needsYou.test.tsx +23 -9
- package/src/native/push/fake.ts +5 -5
- package/src/native/recording/recorder.ts +2 -1
- package/src/native/recording/recorderAudio.ts +14 -1
- package/src/native/talk/TalkTab.tsx +16 -13
- package/src/native/talk/__tests__/talk-tab.test.tsx +18 -0
- package/src/native/voice-session/__tests__/bargeIn.test.ts +93 -0
- package/src/native/voice-session/__tests__/bindings.test.ts +84 -0
- package/src/native/voice-session/__tests__/events.test.ts +72 -0
- package/src/native/voice-session/__tests__/inspector.test.ts +28 -0
- package/src/native/voice-session/__tests__/lifecycle.test.ts +197 -0
- package/src/native/voice-session/__tests__/music.test.ts +86 -0
- package/src/native/voice-session/__tests__/routes.test.ts +121 -0
- package/src/native/voice-session/__tests__/voiceSession.test.ts +177 -0
- package/src/native/voice-session/bindMeeting.ts +33 -0
- package/src/native/voice-session/fake.ts +21 -0
- package/src/native/voice-session/index.ts +142 -0
- package/src/native/voice-session/inspector.ts +14 -0
- package/src/native/voice-session/machine.ts +41 -0
- package/src/native/voice-session/nowPlaying.ts +35 -0
- package/src/native/voice-session/types.ts +45 -0
- package/src/native/voice-session/wire.ts +47 -0
- package/src/native/converse/DriveScreen.tsx +0 -47
- package/src/native/converse/__tests__/driveScreen.test.tsx +0 -54
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
2
|
-
|
|
3
|
-
vi.mock('react-native', async () => ({ ...(await import('../../../../../ui-native/test/rn-stub')) }));
|
|
4
|
-
|
|
5
|
-
import { act, hostById, maybeById, render } from '../../../../../ui-native/test/render';
|
|
6
|
-
import type { MeetingController } from '../../../corpus/converse/meeting';
|
|
7
|
-
import { DriveScreen } from '../DriveScreen';
|
|
8
|
-
|
|
9
|
-
const make = (phase: string, lines: unknown[] = [{ role: 'assistant', text: 'Question 1 of 2: TEST SAMPLE. Yes or no?' }]) => {
|
|
10
|
-
const state = { phase, micOn: phase !== 'idle', retryable: false, lines, error: null, noAudio: null, conversationId: 'c1', saved: null, relayNotice: null, micLive: true };
|
|
11
|
-
const calls = { start: 0, end: 0, stop: 0 };
|
|
12
|
-
const controller = {
|
|
13
|
-
start() { calls.start += 1; }, stop() { calls.stop += 1; }, mic() {}, end: async () => { calls.end += 1; return null; },
|
|
14
|
-
getState: () => state, state: () => state, subscribe: () => () => undefined,
|
|
15
|
-
} as unknown as MeetingController;
|
|
16
|
-
return { controller, calls };
|
|
17
|
-
};
|
|
18
|
-
const text = (r: ReturnType<typeof render>, id: string) => String(hostById(r, id).props.children ?? '');
|
|
19
|
-
|
|
20
|
-
describe('Drive screen: one control, one big word', () => {
|
|
21
|
-
it.each([['listening', 'LISTENING'], ['thinking', 'THINKING'], ['speaking', 'SPEAKING']])('%s shows %s', (phase, word) => {
|
|
22
|
-
const r = render(<DriveScreen controller={make(phase).controller} />);
|
|
23
|
-
expect(text(r, 'drive-state')).toBe(word);
|
|
24
|
-
});
|
|
25
|
-
it('shows the last assistant line in big text', () => {
|
|
26
|
-
const r = render(<DriveScreen controller={make('speaking').controller} />);
|
|
27
|
-
expect(text(r, 'drive-line')).toContain('Question 1 of 2');
|
|
28
|
-
});
|
|
29
|
-
it('idle: the one control starts the drive; running: it interrupts when speaking and ends otherwise', async () => {
|
|
30
|
-
const idle = make('idle', []);
|
|
31
|
-
const r = render(<DriveScreen controller={idle.controller} />);
|
|
32
|
-
await act(async () => { hostById(r, 'drive-control').props.onPress(); });
|
|
33
|
-
expect(idle.calls.start).toBe(1);
|
|
34
|
-
const talking = make('speaking');
|
|
35
|
-
const r2 = render(<DriveScreen controller={talking.controller} />);
|
|
36
|
-
await act(async () => { hostById(r2, 'drive-control').props.onPress(); });
|
|
37
|
-
expect(talking.calls.stop).toBe(1);
|
|
38
|
-
const quiet = make('listening');
|
|
39
|
-
const r3 = render(<DriveScreen controller={quiet.controller} />);
|
|
40
|
-
await act(async () => { hostById(r3, 'drive-control').props.onPress(); });
|
|
41
|
-
expect(quiet.calls.end).toBe(1);
|
|
42
|
-
});
|
|
43
|
-
it('idle greets by the configured assistant name, default Roci', () => {
|
|
44
|
-
const r = render(<DriveScreen controller={make('idle', []).controller} />);
|
|
45
|
-
expect(text(r, 'drive-line')).toContain('Roci here');
|
|
46
|
-
const r2 = render(<DriveScreen controller={make('idle', []).controller} assistantName="Pip" />);
|
|
47
|
-
expect(text(r2, 'drive-line')).toContain('Pip here');
|
|
48
|
-
});
|
|
49
|
-
it('has no text box, no speed row, no Voice/Text switch', () => {
|
|
50
|
-
const r = render(<DriveScreen controller={make('listening').controller} />);
|
|
51
|
-
expect(maybeById(r, 'converse-input')).toHaveLength(0);
|
|
52
|
-
expect(maybeById(r, 'converse-speed')).toHaveLength(0);
|
|
53
|
-
});
|
|
54
|
-
});
|