@jskit-ai/assistant-voice 0.2.89 → 0.2.91

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.
@@ -32,7 +32,9 @@ SPEECH_ENDPOINT=ws://127.0.0.1:3092/v1/voice \
32
32
  SPEECH_TOKEN_FILE=/run/secrets/example-speech-token npm run server
33
33
  ```
34
34
 
35
- 5. In another terminal run `npm run dev` and open `http://127.0.0.1:5176`.
35
+ 5. In another terminal run `npm run dev` and open `http://127.0.0.1:5176`. The server
36
+ listens on 127.0.0.1:3042, and the dev server proxies `/api` there; set
37
+ `VOICE_EXAMPLE_API_PORT` for both commands to use another port.
36
38
  Each text card uses `AssistantConversationClientElement`. Send a short request in two
37
39
  cards to see independent output and Stop controls on the one connection.
38
40
  6. Open **Voice chat with Planning**. Tap Talk for hands-free listening or hold
@@ -9,15 +9,15 @@
9
9
  },
10
10
  "dependencies": {
11
11
  "@fastify/websocket": "^11.2.0",
12
- "@jskit-ai/assistant-core": "0.2.83",
13
- "@jskit-ai/assistant-runtime": "0.2.89",
14
- "@jskit-ai/assistant-voice": "0.2.89",
15
- "@jskit-ai/connectors-catalog": "0.2.55",
16
- "@jskit-ai/http-runtime": "0.2.35",
17
- "@jskit-ai/kernel": "0.2.34",
18
- "@jskit-ai/material-web": "0.1.10",
19
- "@jskit-ai/realtime": "0.2.54",
20
- "@jskit-ai/shell-web": "0.2.51",
12
+ "@jskit-ai/assistant-core": "0.2.85",
13
+ "@jskit-ai/assistant-runtime": "0.2.91",
14
+ "@jskit-ai/assistant-voice": "0.2.91",
15
+ "@jskit-ai/connectors-catalog": "0.2.56",
16
+ "@jskit-ai/http-runtime": "0.2.36",
17
+ "@jskit-ai/kernel": "0.2.35",
18
+ "@jskit-ai/material-web": "0.1.11",
19
+ "@jskit-ai/realtime": "0.2.55",
20
+ "@jskit-ai/shell-web": "0.2.52",
21
21
  "@tanstack/vue-query": "^5.90.5",
22
22
  "fastify": "^5.12.7",
23
23
  "pinia": "^4.0.3",
@@ -93,11 +93,13 @@ if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1]
93
93
  const headlessText = process.argv.slice(3).join(" ").trim();
94
94
  if (headless && !headlessText) throw new Error("Pass a task after --headless.");
95
95
  const { app, runHeadless } = await createExampleServer();
96
- await app.listen({ host: "127.0.0.1", port: 3042 });
96
+ // 3042 unless VOICE_EXAMPLE_API_PORT names another port (vite.config.js proxies to the same one).
97
+ const port = Number(process.env.VOICE_EXAMPLE_API_PORT) || 3042;
98
+ await app.listen({ host: "127.0.0.1", port });
97
99
  for (const signal of ["SIGINT", "SIGTERM"]) process.once(signal, () => {
98
100
  app.close().catch(error => { app.log.error(error); process.exitCode = 1; });
99
101
  });
100
- console.log("Voice example API ready on 127.0.0.1:3042");
102
+ console.log(`Voice example API ready on 127.0.0.1:${port}`);
101
103
  if (headless) {
102
104
  runHeadless(headlessText).then(answer => console.log(`Headless task: ${answer}`))
103
105
  .catch(error => console.error(`Headless task failed: ${error.message}`));
@@ -1,7 +1,8 @@
1
1
  import { defineConfig } from "vite";
2
2
  import vue from "@vitejs/plugin-vue";
3
3
  import { createJskitClientBootstrapPlugin } from "@jskit-ai/kernel/client/vite";
4
- const apiTarget = "http://127.0.0.1:3042";
4
+ // The example API, on 3042 unless VOICE_EXAMPLE_API_PORT names another port (server.js listens on the same one).
5
+ const apiTarget = `http://127.0.0.1:${process.env.VOICE_EXAMPLE_API_PORT || 3042}`;
5
6
  export default defineConfig({ plugins: [vue(), createJskitClientBootstrapPlugin({ proxyTarget: apiTarget })],
6
7
  server: { proxy: {
7
8
  "/api": { target: apiTarget, ws: true }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/assistant-voice",
3
- "version": "0.2.89",
3
+ "version": "0.2.91",
4
4
  "type": "module",
5
5
  "description": "Duplex voice conversations with application-owned targets and authorization, and the speech service engine with its client.",
6
6
  "scripts": {
@@ -21,7 +21,7 @@
21
21
  "examples"
22
22
  ],
23
23
  "dependencies": {
24
- "@jskit-ai/assistant-core": "0.2.83",
24
+ "@jskit-ai/assistant-core": "0.2.85",
25
25
  "ws": "^8.20.1"
26
26
  },
27
27
  "jskit": {
@@ -67,7 +67,7 @@
67
67
  }
68
68
  },
69
69
  "peerDependencies": {
70
- "@jskit-ai/kernel": "0.2.34",
70
+ "@jskit-ai/kernel": "0.2.35",
71
71
  "vue": "^3.5.13",
72
72
  "vuetify": "^4.3.0"
73
73
  },
@@ -158,13 +158,15 @@ const gesture = useVoiceLauncher({
158
158
  .assistant-voice-controls__tools--icons .assistant-voice__talk-action p { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
159
159
  .assistant-voice-controls__feedback--compact .assistant-voice__review {
160
160
  display: flex;
161
+ flex-wrap: wrap;
161
162
  align-items: flex-end;
162
163
  gap: 4px;
163
164
  max-height: 128px;
164
165
  padding: 0;
165
166
  }
166
- .assistant-voice-controls__feedback--compact .assistant-voice__review-input { flex: 1 1 auto; min-width: 0; }
167
- .assistant-voice-controls__feedback--compact .assistant-voice__review-actions { flex: 0 0 auto; }
167
+ /* The editor keeps 160px beside Discard and Send; in a narrower panel (a 320px chat) they go below it, at its end. */
168
+ .assistant-voice-controls__feedback--compact .assistant-voice__review-input { flex: 1 1 160px; min-width: 0; }
169
+ .assistant-voice-controls__feedback--compact .assistant-voice__review-actions { flex: 0 0 auto; margin-inline-start: auto; }
168
170
  .assistant-voice-controls__feedback--compact .assistant-voice__error { margin: 0; padding: 0; }
169
171
  @media (max-height: 650px) { .assistant-voice__talk-action { padding-top: 8px; } }
170
172
  </style>