@voicethere/agent 0.7.7 → 0.7.9

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.
@@ -12121,7 +12121,7 @@ async function loadWorldFromRedis() {
12121
12121
  }
12122
12122
  async function saveWorldToRedis(world) {
12123
12123
  if (!redis) return;
12124
- await redis.setBuffer(REDIS_WORLD_KEY, copyWorldBuffer(world));
12124
+ await redis.set(REDIS_WORLD_KEY, copyWorldBuffer(world));
12125
12125
  }
12126
12126
  async function runSimulationTick() {
12127
12127
  const now = Date.now();
@@ -12194,7 +12194,7 @@ async function ensureRedisWorldInitialized() {
12194
12194
  const existing = await redis.getBuffer(REDIS_WORLD_KEY);
12195
12195
  if (!existing || existing.byteLength === 0) {
12196
12196
  const empty = createEmptyWorldBuffer();
12197
- await redis.setBuffer(REDIS_WORLD_KEY, copyWorldBuffer(empty));
12197
+ await redis.set(REDIS_WORLD_KEY, copyWorldBuffer(empty));
12198
12198
  }
12199
12199
  }
12200
12200
  defineAgent({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voicethere/agent",
3
- "version": "0.7.7",
3
+ "version": "0.7.9",
4
4
  "description": "VoiceThere customer agent SDK — IPC types and runtime helpers for sandboxed child bundles",
5
5
  "type": "module",
6
6
  "exports": {
@@ -95,9 +95,9 @@
95
95
  "@node-webrtc-rust/sdk": ">=0.9.0"
96
96
  },
97
97
  "devDependencies": {
98
- "@node-webrtc-rust/helpers": "0.9.0",
99
- "@node-webrtc-rust/sdk": "0.9.0",
100
- "@node-webrtc-rust/signaling": "0.9.0",
98
+ "@node-webrtc-rust/helpers": "0.9.5",
99
+ "@node-webrtc-rust/sdk": "0.9.5",
100
+ "@node-webrtc-rust/signaling": "0.9.5",
101
101
  "@types/node": "22.20.1",
102
102
  "http-server": "14.1.1",
103
103
  "ioredis": "5.11.1",
@@ -6,17 +6,20 @@
6
6
  * - `{ type: "crash_exit" }` → process.exit(1)
7
7
  * - `{ type: "ping", id }` → `{ type: "pong", id }`
8
8
  * - `onUserSpeechFinal` text starting with "crash" → throw
9
- * - other finals → speak(`echo. ${text}`)
9
+ * - other finals → speak(`Okay. ${text}`)
10
10
  * - onSessionStart → speak("ready") after 1s (voice ready waiter)
11
11
  */
12
12
  import { defineAgent, sendToClient, speak } from "@voicethere/agent";
13
13
 
14
- /** TTS echo prefix with a sentence boundary so Piper does not glue words. */
14
+ /**
15
+ * TTS reply prefix with a sentence boundary so Piper does not glue words.
16
+ * Use a word local streaming STT reliably emits a token for (`Okay.`); `echo.`
17
+ * measured ~5% no-token Piper renders. Never glue `echo:` onto the payload.
18
+ */
15
19
  export function formatEchoSpeak(text: string): string {
16
20
  const trimmed = text.trim();
17
21
  if (!trimmed) return "";
18
- // Never glue `echo:` onto the next word; Piper skips "echo colon" on `echo:One`.
19
- return `echo. ${trimmed}`;
22
+ return `Okay. ${trimmed}`;
20
23
  }
21
24
 
22
25
  export const CRASH_AGENT_MESSAGE =
@@ -5,11 +5,15 @@
5
5
  */
6
6
  import { defineAgent, parseChatText, speak } from "@voicethere/agent";
7
7
 
8
- /** TTS echo prefix with a sentence boundary so Piper does not glue words. */
8
+ /**
9
+ * TTS reply prefix with a sentence boundary so Piper does not glue words.
10
+ * Use a word local streaming STT (Kroko Zipformer) reliably emits a token for;
11
+ * `echo.` measured ~5% no-token Piper renders (audio intact). `Okay.` does not.
12
+ */
9
13
  export function formatEchoSpeak(text: string): string {
10
14
  const trimmed = text.trim();
11
15
  if (!trimmed) return "";
12
- return `echo. ${trimmed}`;
16
+ return `Okay. ${trimmed}`;
13
17
  }
14
18
 
15
19
  defineAgent({
@@ -367,7 +367,7 @@ async function loadWorldFromRedis(): Promise<Float32Array> {
367
367
 
368
368
  async function saveWorldToRedis(world: Float32Array): Promise<void> {
369
369
  if (!redis) return;
370
- await redis.setBuffer(REDIS_WORLD_KEY, copyWorldBuffer(world));
370
+ await redis.set(REDIS_WORLD_KEY, copyWorldBuffer(world));
371
371
  }
372
372
 
373
373
  async function runSimulationTick(): Promise<void> {
@@ -449,7 +449,7 @@ async function ensureRedisWorldInitialized(): Promise<void> {
449
449
  const existing = await redis.getBuffer(REDIS_WORLD_KEY);
450
450
  if (!existing || existing.byteLength === 0) {
451
451
  const empty = createEmptyWorldBuffer();
452
- await redis.setBuffer(REDIS_WORLD_KEY, copyWorldBuffer(empty));
452
+ await redis.set(REDIS_WORLD_KEY, copyWorldBuffer(empty));
453
453
  }
454
454
  }
455
455