@startsimpli/integrations 0.2.182 → 0.2.183

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@startsimpli/integrations",
3
- "version": "0.2.182",
3
+ "version": "0.2.183",
4
4
  "description": "Provider-agnostic types, API clients, hooks, and UI primitives for email + calendar integrations across StartSimpli apps, plus foundry customer email (subpath ./comms).",
5
5
  "license": "MIT",
6
6
  "homepage": "https://startsimpli.com",
@@ -50,9 +50,9 @@
50
50
  "react-native": ">=0.74.0",
51
51
  "@startsimpli/ui-native": ">=0.1.12",
52
52
  "react-native-safe-area-context": ">=4.0.0",
53
- "@startsimpli/utils": "^0.4.20",
54
53
  "@startsimpli/ui": "^0.4.186",
55
- "@startsimpli/auth": "^0.4.53"
54
+ "@startsimpli/auth": "^0.4.53",
55
+ "@startsimpli/utils": "^0.4.20"
56
56
  },
57
57
  "peerDependenciesMeta": {
58
58
  "react": {
@@ -98,11 +98,11 @@
98
98
  "vitest": "^3.0.0",
99
99
  "react-native": "0.85.3",
100
100
  "react-native-safe-area-context": "~5.7.0",
101
- "@startsimpli/llm": "0.4.31",
102
- "@startsimpli/ui": "0.4.186",
103
101
  "@startsimpli/ui-native": "0.1.15",
102
+ "@startsimpli/ui": "0.4.186",
104
103
  "@startsimpli/auth": "0.4.53",
105
- "@startsimpli/utils": "0.4.20"
104
+ "@startsimpli/utils": "0.4.20",
105
+ "@startsimpli/llm": "0.4.31"
106
106
  },
107
107
  "scripts": {
108
108
  "type-check": "tsc --noEmit && tsc --noEmit -p tsconfig.native.json",
@@ -316,3 +316,12 @@ describe('a seam over anything', () => {
316
316
  expect(out.text).toBe('Moved Linear thing to Saturday.');
317
317
  });
318
318
  });
319
+
320
+ describe('spoken titles', () => {
321
+ it('say a long to-do title in full instead of cutting it at eight words', async () => {
322
+ const { confirmText } = await import('../corpus/briefing/actions/confirm');
323
+ const title = 'Make the relay update the fleet status every two hours so the assistant is never stale';
324
+ const said = confirmText({ type: 'add_item', title, dueDate: null }, title, Date.parse('2026-11-16T15:00:00Z'), 'America/Denver');
325
+ expect(said).toBe(`Added ${title}.`);
326
+ });
327
+ });
@@ -219,6 +219,20 @@ describe('meeting controller', () => {
219
219
  });
220
220
  });
221
221
 
222
+ describe('a recording with no words', () => {
223
+ it('is dropped quietly: no line, no reply spoken, and the meeting listens again', async () => {
224
+ const { c, speak } = rig({ utterances: [blob()], turn: vi.fn(async () => turnResult(1, { transcript: '', reply_text: 'Sorry, I did not catch that. Can you say that again?', audio_url: null, audio_reason: 'nothing was heard' })) as never });
225
+ c.start();
226
+ await settle(() => c.state().conversationId !== null);
227
+ await new Promise((r) => setTimeout(r, 30));
228
+ expect(c.state().lines).toEqual([]);
229
+ expect((speak as any).mock.calls.length).toBe(0);
230
+ expect(c.state().noAudio).toBeNull();
231
+ expect(c.state().phase).toBe('listening');
232
+ await c.end();
233
+ });
234
+ });
235
+
222
236
  describe('typed text before Start', () => {
223
237
  it('speaks the reply and goes back to idle, instead of staying on Thinking in silence', async () => {
224
238
  const { c, speak } = rig({ utterances: [] });
@@ -143,6 +143,7 @@ describe('an audio turn', () => {
143
143
  const { deps, brain } = setup({ transcribe: async () => ' ' });
144
144
  const out = await handleConverseTurn(deps, { audio });
145
145
  expect(out.reply_text).toMatch(/did not catch/i);
146
+ expect(out.audio_url).toBeNull();
146
147
  expect(brain).not.toHaveBeenCalled();
147
148
  });
148
149
 
@@ -7,7 +7,9 @@ import type { BriefingAudio, BriefingSynthesize } from '../generate';
7
7
  import type { ItemPatch, UndoEntry } from './types';
8
8
  import type { VoiceAction } from '../intent/types';
9
9
 
10
- export const shortTitle = (title: string) => speakable(title, 8) || 'that item';
10
+ /** A title as it is said aloud: long enough to be the whole thing in nearly every case, cut at a word otherwise. */
11
+ export const SPOKEN_TITLE_WORDS = 16;
12
+ export const shortTitle = (title: string) => speakable(title, SPOKEN_TITLE_WORDS) || 'that item';
11
13
 
12
14
  export function confirmText(action: VoiceAction, title: string, now: number, timeZone: string): string {
13
15
  const today = localDate(now, timeZone);
@@ -34,6 +34,7 @@ export function intentSystemPrompt(): string {
34
34
  '- "the next one" = the item after the one being read. "that other thing" = an open item that was NOT in the briefing (clarify if several).',
35
35
  '- Match descriptions loosely against titles ("the bench one", "the lease call").',
36
36
  '- Adding something new ("add X", "remind me to X", "I need to X by Friday") is add_item with the thing as an imperative title and the date as due. Do not add anything that already exists as an item.',
37
+ '- The title is the WORK itself, never the act of adding it. "add a to-do for the relay to keep the status current" is the title "Keep the status current" (say who it is for only when it matters); "remind me to call the bank" is "Call the bank". Never start a title with add, create, remind me, a to-do or a task. Keep every detail the person gave, in full: do not shorten it.',
37
38
  '- Several instructions in one reply are several actions in the order spoken.',
38
39
  '- Anything that is not an instruction about to-dos (greetings, chatter, questions): one clarify asking them to say it again.',
39
40
  '- Dates: resolve against today in the person\'s zone. A bare weekday is the next such day after today; "next week" is Monday of next week; "next Friday" is Friday of next week. Never return a date before today.',
@@ -110,7 +110,10 @@ export async function handleConverseTurn(deps: ConverseDeps, req: ConverseTurnRe
110
110
  }
111
111
  }
112
112
  lap('keep_user_audio');
113
- const assistant = await speakSide(deps, `${conversationId}-t${n}-reply`, replyText);
113
+ // Nothing was heard: the page stays quiet and listens again, so there is nothing to speak (the text is still kept).
114
+ const assistant = req.audio && !utterance
115
+ ? { text: replyText, audio_reason: 'nothing was heard' }
116
+ : await speakSide(deps, `${conversationId}-t${n}-reply`, replyText);
114
117
  lap('tts');
115
118
 
116
119
  // 4. Save.
@@ -109,6 +109,11 @@ export function createMeetingController<A = Blob>(options: {
109
109
  const out = await client.turn({ ...input, conversationId: s.conversationId ?? undefined, turnId, timeZone: options.timeZone });
110
110
  seen = Math.max(seen, out.turn);
111
111
  startPolling();
112
+ // A recording with no words in it (a cough, a pause, the room): no line, no "sorry", no sound. Listen again.
113
+ if (input.audio && !(out.transcript ?? '').trim()) {
114
+ set({ conversationId: out.conversation_id });
115
+ return true;
116
+ }
112
117
  set({
113
118
  conversationId: out.conversation_id,
114
119
  lines: [...s.lines, { role: 'user', text: out.transcript }, { role: 'assistant', text: out.reply_text }],