car-runtime 0.16.0 → 0.17.0
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/index.d.ts +34 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -242,10 +242,19 @@ export class CarRuntime {
|
|
|
242
242
|
*
|
|
243
243
|
* **Note:** intent is not exposed on the tracked path until the
|
|
244
244
|
* positional argument list is converted to an options object —
|
|
245
|
-
* this method already takes
|
|
246
|
-
*
|
|
247
|
-
* {@link inferTrackedWithRequest} which takes a JSON-
|
|
248
|
-
* `GenerateRequest` and exposes every field
|
|
245
|
+
* this method already takes 9 positional parameters and adding
|
|
246
|
+
* intent would push call sites past readability. For new code,
|
|
247
|
+
* use {@link inferTrackedWithRequest} which takes a JSON-
|
|
248
|
+
* stringified `GenerateRequest` and exposes every field
|
|
249
|
+
* including `intent`.
|
|
250
|
+
*
|
|
251
|
+
* `imagesJson` is a JSON-encoded array of `ContentBlock` image
|
|
252
|
+
* variants — either
|
|
253
|
+
* `{ "type": "image_base64", "data": "<b64>", "media_type": "image/png" }`
|
|
254
|
+
* or `{ "type": "image_url", "url": "https://…", "detail": "auto" }`.
|
|
255
|
+
* Vision-capable hosted models (Claude 3.5+/4.x, GPT-4o, Gemini)
|
|
256
|
+
* accept these directly; non-vision providers reject the request
|
|
257
|
+
* via a structured error from the daemon. See #230.
|
|
249
258
|
*/
|
|
250
259
|
inferTracked(
|
|
251
260
|
prompt: string,
|
|
@@ -256,6 +265,7 @@ export class CarRuntime {
|
|
|
256
265
|
messagesJson?: string | null,
|
|
257
266
|
toolChoice?: string | null,
|
|
258
267
|
parallelToolCalls?: boolean | null,
|
|
268
|
+
imagesJson?: string | null,
|
|
259
269
|
): Promise<string>;
|
|
260
270
|
|
|
261
271
|
/**
|
|
@@ -895,6 +905,26 @@ export function transcribeStreamPush(
|
|
|
895
905
|
|
|
896
906
|
export function listVoiceSessions(rt: CarRuntime): string;
|
|
897
907
|
|
|
908
|
+
/**
|
|
909
|
+
* Start a streaming TTS synthesis.
|
|
910
|
+
*
|
|
911
|
+
* Stub: not exposed in the FFI bindings. Connect to the daemon's
|
|
912
|
+
* WebSocket and use `voice.tts_stream.start`; chunks arrive as
|
|
913
|
+
* `voice.event` notifications with `type = "tts_chunk"`.
|
|
914
|
+
*/
|
|
915
|
+
export function ttsStreamStart(
|
|
916
|
+
rt: CarRuntime,
|
|
917
|
+
streamId: string,
|
|
918
|
+
text: string,
|
|
919
|
+
optionsJson?: string | null,
|
|
920
|
+
): Promise<string>;
|
|
921
|
+
|
|
922
|
+
/** Cancel an in-flight TTS stream. Idempotent. */
|
|
923
|
+
export function ttsStreamCancel(rt: CarRuntime, streamId: string): Promise<string>;
|
|
924
|
+
|
|
925
|
+
/** List the ids of all in-flight TTS streams. */
|
|
926
|
+
export function listTtsStreams(rt: CarRuntime): string;
|
|
927
|
+
|
|
898
928
|
// --- Voice turn dispatch (two-track sidecar pattern) ---
|
|
899
929
|
|
|
900
930
|
export interface DispatchVoiceTurnRequest {
|