@frockbot/client-core 0.3.17 → 0.3.18

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/index.ts +34 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frockbot/client-core",
3
- "version": "0.3.17",
3
+ "version": "0.3.18",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -13,10 +13,10 @@
13
13
  "typecheck": "tsc --noEmit -p tsconfig.json"
14
14
  },
15
15
  "dependencies": {
16
- "@frockbot/configuration-core": "0.3.17",
17
- "@frockbot/connection-core": "0.3.17",
18
- "@frockbot/kernel-contracts": "0.3.17",
19
- "@frockbot/protocol": "0.3.17",
16
+ "@frockbot/configuration-core": "0.3.18",
17
+ "@frockbot/connection-core": "0.3.18",
18
+ "@frockbot/kernel-contracts": "0.3.18",
19
+ "@frockbot/protocol": "0.3.18",
20
20
  "vue": "3.5.41"
21
21
  },
22
22
  "devDependencies": {
package/src/index.ts CHANGED
@@ -195,6 +195,35 @@ export interface VoiceDictationSessionV1 {
195
195
  close(): void;
196
196
  }
197
197
 
198
+ /** The browser projection of one app-wide Voice assistant session. */
199
+ export interface VoiceAssistantObserverV1 {
200
+ ready(sessionId: string, quotaRemainingSeconds: number): void;
201
+ state(state: "listening" | "speaking"): void;
202
+ transcript(entry: {
203
+ id: string;
204
+ speaker: "user" | "assistant";
205
+ text: string;
206
+ at: string;
207
+ }): void;
208
+ tool(entry: { id: string; name: string; label: string; at: string }): void;
209
+ /** PCM16LE, mono, 24 kHz. */
210
+ audio(pcm16: ArrayBuffer): void;
211
+ interrupted(): void;
212
+ offline(
213
+ reason: "stopped" | "idle" | "quota" | "error" | "replaced",
214
+ message: string,
215
+ ): void;
216
+ failed(message: string): void;
217
+ closed(): void;
218
+ }
219
+
220
+ /** The browser's handle on Voice. Input audio is PCM16LE, mono, 16 kHz. */
221
+ export interface VoiceAssistantSessionV1 {
222
+ sendAudio(pcm16: ArrayBuffer): void;
223
+ stop(): void;
224
+ close(): void;
225
+ }
226
+
198
227
  export interface AgentTransport {
199
228
  /** False when this platform cannot complete external Connection authorization. */
200
229
  readonly connectionsAvailable?: boolean;
@@ -206,6 +235,11 @@ export interface AgentTransport {
206
235
  openVoiceDictation?(
207
236
  observer: VoiceDictationObserverV1,
208
237
  ): VoiceDictationSessionV1;
238
+ /** Opens the User-scoped app-wide Voice assistant. */
239
+ openVoiceAssistant?(
240
+ deviceId: string,
241
+ observer: VoiceAssistantObserverV1,
242
+ ): VoiceAssistantSessionV1;
209
243
  turn(
210
244
  botId: string,
211
245
  text: string,