@frockbot/client-core 0.3.13 → 0.3.15
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 +5 -5
- package/src/index.ts +36 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frockbot/client-core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.15",
|
|
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
|
-
"@frockbot/connection-core": "0.3.
|
|
18
|
-
"@frockbot/kernel-contracts": "0.3.
|
|
19
|
-
"@frockbot/protocol": "0.3.
|
|
16
|
+
"@frockbot/configuration-core": "0.3.15",
|
|
17
|
+
"@frockbot/connection-core": "0.3.15",
|
|
18
|
+
"@frockbot/kernel-contracts": "0.3.15",
|
|
19
|
+
"@frockbot/protocol": "0.3.15",
|
|
20
20
|
"vue": "3.5.41"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
package/src/index.ts
CHANGED
|
@@ -161,9 +161,45 @@ export interface ClientRun {
|
|
|
161
161
|
recovery?: { action: "resume"; message: string };
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
+
/**
|
|
165
|
+
* What the composer is told while a person dictates.
|
|
166
|
+
*
|
|
167
|
+
* Deltas are appended as they are heard; a `transcript` replaces the deltas
|
|
168
|
+
* that built the segment it finishes, because the provider's own segment is
|
|
169
|
+
* punctuated and the deltas are not. `final` says everything captured has been
|
|
170
|
+
* transcribed and the message may be sent.
|
|
171
|
+
*/
|
|
172
|
+
export interface VoiceDictationObserverV1 {
|
|
173
|
+
ready(): void;
|
|
174
|
+
delta(text: string): void;
|
|
175
|
+
transcript(text: string): void;
|
|
176
|
+
final(): void;
|
|
177
|
+
/** Plain English, already fit to show a person. */
|
|
178
|
+
failed(message: string): void;
|
|
179
|
+
closed(): void;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/** The handle the composer drives. Audio is PCM16, 16 kHz, mono. */
|
|
183
|
+
export interface VoiceDictationSessionV1 {
|
|
184
|
+
sendAudio(pcm16: ArrayBuffer): void;
|
|
185
|
+
/** Stop capturing and transcribe the rest; `final` follows. */
|
|
186
|
+
commit(): void;
|
|
187
|
+
/** Throw the capture away. */
|
|
188
|
+
cancel(): void;
|
|
189
|
+
close(): void;
|
|
190
|
+
}
|
|
191
|
+
|
|
164
192
|
export interface AgentTransport {
|
|
165
193
|
/** False when this platform cannot complete external Connection authorization. */
|
|
166
194
|
readonly connectionsAvailable?: boolean;
|
|
195
|
+
/**
|
|
196
|
+
* Opens the composer's dictation socket (voice plan D2). Optional: a
|
|
197
|
+
* platform that cannot open one simply offers no microphone, and the
|
|
198
|
+
* composer's send button never changes shape.
|
|
199
|
+
*/
|
|
200
|
+
openVoiceDictation?(
|
|
201
|
+
observer: VoiceDictationObserverV1,
|
|
202
|
+
): VoiceDictationSessionV1;
|
|
167
203
|
turn(
|
|
168
204
|
botId: string,
|
|
169
205
|
text: string,
|