@voicelayer/sdk 0.3.0 → 0.3.1
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/dist/brain/index.d.ts +2 -2
- package/dist/brain/index.js +6 -1
- package/dist/index.d.ts +249 -249
- package/dist/index.js +7 -1
- package/dist/runtime/text-session.d.ts +1 -1
- package/dist/runtime/text-session.js +6 -1
- package/dist/{text-session-B7oyrhwQ.d.ts → text-session-oMqJh6SF.d.ts} +98 -98
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -608,7 +608,12 @@ var init_agents = __esm({
|
|
|
608
608
|
z.object({
|
|
609
609
|
status: z.enum(["online", "degraded"]).optional(),
|
|
610
610
|
statusDetail: z.string().max(512).optional(),
|
|
611
|
-
metadata: AgentMetadata.optional()
|
|
611
|
+
metadata: AgentMetadata.optional(),
|
|
612
|
+
// The text-turn protocol the worker speaks (G-4), repeated on every heartbeat: a registration answered by an older API
|
|
613
|
+
// during a rollout drops the field, and the next heartbeat restores it. SDK ≥ 0.3.1 always sends it — `null` when the
|
|
614
|
+
// worker takes no text turns, so a leftover beat can't keep a stale "text-capable" alive either. Absent (an older SDK)
|
|
615
|
+
// leaves the stored value as is.
|
|
616
|
+
textTurns: z.number().int().min(1).max(1e3).nullable().optional()
|
|
612
617
|
});
|
|
613
618
|
HeartbeatResponse = z.object({
|
|
614
619
|
agent: AgentDTO,
|
|
@@ -9528,6 +9533,7 @@ var HeartbeatTicker = class {
|
|
|
9528
9533
|
if (this.stopped) return;
|
|
9529
9534
|
const body = { status: this.state.status };
|
|
9530
9535
|
if (this.state.statusDetail !== null) body.statusDetail = this.state.statusDetail;
|
|
9536
|
+
body.textTurns = this.state.registerInput.body.textTurns ?? null;
|
|
9531
9537
|
if (this.state.pendingMetadata !== void 0) {
|
|
9532
9538
|
body.metadata = this.state.pendingMetadata;
|
|
9533
9539
|
this.state.pendingMetadata = void 0;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ab as GraphTraceEvent, ac as LiveTextConversation, ad as LiveTurnResult, ae as RunLiveTextOptions, u as RunTextSessionOptions, v as RunTextTranscriptOptions, V as TextSession, W as TextTranscriptResult, af as runLiveTextConversation, a8 as runTextSession, a9 as runTextTranscript, ag as runWithOpenAIScope } from '../text-session-
|
|
1
|
+
export { ab as GraphTraceEvent, ac as LiveTextConversation, ad as LiveTurnResult, ae as RunLiveTextOptions, u as RunTextSessionOptions, v as RunTextTranscriptOptions, V as TextSession, W as TextTranscriptResult, af as runLiveTextConversation, a8 as runTextSession, a9 as runTextTranscript, ag as runWithOpenAIScope } from '../text-session-oMqJh6SF.js';
|
|
2
2
|
import '@livekit/agents';
|
|
3
3
|
import 'zod';
|
|
4
4
|
import 'openai';
|
|
@@ -543,7 +543,12 @@ var init_agents = __esm({
|
|
|
543
543
|
z.object({
|
|
544
544
|
status: z.enum(["online", "degraded"]).optional(),
|
|
545
545
|
statusDetail: z.string().max(512).optional(),
|
|
546
|
-
metadata: AgentMetadata.optional()
|
|
546
|
+
metadata: AgentMetadata.optional(),
|
|
547
|
+
// The text-turn protocol the worker speaks (G-4), repeated on every heartbeat: a registration answered by an older API
|
|
548
|
+
// during a rollout drops the field, and the next heartbeat restores it. SDK ≥ 0.3.1 always sends it — `null` when the
|
|
549
|
+
// worker takes no text turns, so a leftover beat can't keep a stale "text-capable" alive either. Absent (an older SDK)
|
|
550
|
+
// leaves the stored value as is.
|
|
551
|
+
textTurns: z.number().int().min(1).max(1e3).nullable().optional()
|
|
547
552
|
});
|
|
548
553
|
z.object({
|
|
549
554
|
agent: AgentDTO,
|