open-agents-ai 0.185.37 → 0.185.39

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.
Files changed (2) hide show
  1. package/dist/index.js +44 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -35970,7 +35970,10 @@ let opusEncoder = null, opusDecoder = null;
35970
35970
  let agentText = '';
35971
35971
 
35972
35972
  function connectPP() {
35973
- const url = PP_WS_URL + '/api/chat?text_prompt=' + encodeURIComponent(TEXT_PROMPT) +
35973
+ // Connect via the /pp proxy on the same origin \u2014 works through tunnels
35974
+ const proto = window.location.protocol === 'https:' ? 'wss' : 'ws';
35975
+ const host = window.location.host; // includes port
35976
+ const url = proto + '://' + host + '/pp/api/chat?text_prompt=' + encodeURIComponent(TEXT_PROMPT) +
35974
35977
  '&voice_prompt=' + encodeURIComponent(VOICE_PROMPT) + '&seed=-1';
35975
35978
  statusEl.textContent = 'connecting to PersonaPlex...';
35976
35979
  ppWs = new WebSocket(url);
@@ -36253,8 +36256,46 @@ var init_voice_session = __esm({
36253
36256
  this.server = createServer2((req, res) => this.handleHTTP(req, res));
36254
36257
  this.server.timeout = 0;
36255
36258
  this.server.keepAliveTimeout = 0;
36256
- this.wss = new import_websocket_server.default({ server: this.server, path: "/ws" });
36259
+ this.wss = new import_websocket_server.default({ noServer: true });
36257
36260
  this.wss.on("connection", (ws, req) => this.handleWSConnection(ws, req));
36261
+ const ppWss = new import_websocket_server.default({ noServer: true });
36262
+ ppWss.on("connection", (clientWs, req) => {
36263
+ const ppPath = (req.url ?? "/").replace(/^\/pp/, "") || "/";
36264
+ const ppUrl = `ws://127.0.0.1:8998${ppPath}`;
36265
+ const ppWs = new import_websocket.default(ppUrl);
36266
+ ppWs.on("open", () => {
36267
+ clientWs.on("message", (data) => {
36268
+ try {
36269
+ ppWs.send(data);
36270
+ } catch {
36271
+ }
36272
+ });
36273
+ ppWs.on("message", (data) => {
36274
+ try {
36275
+ clientWs.send(data);
36276
+ } catch {
36277
+ }
36278
+ });
36279
+ });
36280
+ ppWs.on("error", () => clientWs.close());
36281
+ ppWs.on("close", () => clientWs.close());
36282
+ clientWs.on("close", () => ppWs.close());
36283
+ clientWs.on("error", () => ppWs.close());
36284
+ });
36285
+ this.server.on("upgrade", (req, socket, head) => {
36286
+ const pathname = (req.url ?? "/").split("?")[0];
36287
+ if (pathname === "/ws") {
36288
+ this.wss.handleUpgrade(req, socket, head, (ws) => {
36289
+ this.wss.emit("connection", ws, req);
36290
+ });
36291
+ } else if (pathname.startsWith("/pp")) {
36292
+ ppWss.handleUpgrade(req, socket, head, (ws) => {
36293
+ ppWss.emit("connection", ws, req);
36294
+ });
36295
+ } else {
36296
+ socket.destroy();
36297
+ }
36298
+ });
36258
36299
  await new Promise((resolve36, reject) => {
36259
36300
  this.server.listen(port, "127.0.0.1", () => resolve36());
36260
36301
  this.server.on("error", reject);
@@ -41546,7 +41587,7 @@ async function installPersonaPlex(onInfo, weightTier) {
41546
41587
  log("ARM64: Installing remaining moshi dependencies...");
41547
41588
  await execAsync(`"${pip}" install --quiet "numpy>=1.26,<2.2" "safetensors>=0.4.0,<0.5" "huggingface-hub>=0.24,<0.25" "einops==0.7" "sentencepiece==0.2" "sounddevice==0.5" "aiohttp>=3.10.5,<3.11"`, { timeout: 3e5 });
41548
41589
  } else {
41549
- await execAsync(`"${pip}" install --quiet "${join54(repoDir, "moshi")}/."`, { timeout: 3e5 });
41590
+ await execAsync(`"${pip}" install --quiet "${join54(repoDir, "moshi")}/."`, { timeout: 6e5 });
41550
41591
  }
41551
41592
  } catch (err) {
41552
41593
  log(`Moshi install failed: ${err instanceof Error ? err.message : String(err)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.185.37",
3
+ "version": "0.185.39",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",