@profullstack/qryptchat 0.9.1 → 0.9.2

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.
@@ -1369,7 +1369,7 @@ async function main2(argv, { version = "0.0.0" } = {}) {
1369
1369
  }
1370
1370
  case "agent": {
1371
1371
  if (rest[0] === "call") {
1372
- const { runVoiceAgent } = await import("./chunk-997mmke4.js");
1372
+ const { runVoiceAgent } = await import("./chunk-r98rnjvx.js");
1373
1373
  return runVoiceAgent(await client(flags), {
1374
1374
  brain: typeof flags.brain === "string" ? flags.brain : undefined,
1375
1375
  voice: typeof flags.voice === "string" ? flags.voice : undefined,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  CALL_TYPE,
3
3
  parseCall
4
- } from "./chunk-pg6thvma.js";
4
+ } from "./chunk-ew1xhfzy.js";
5
5
 
6
6
  // src/cli/voice-agent.js
7
7
  import { spawn } from "node:child_process";
@@ -106,6 +106,7 @@ var e2eeOptions = (key) => ({
106
106
  });
107
107
  var JOIN_RECENT_MS = 30 * 60 * 1000;
108
108
  var ALONE_LEAVE_MS = 30 * 1000;
109
+ var FIRST_WAIT_MS = 10 * 60 * 1000;
109
110
  var MAX_CALL_MS = 3 * 60 * 60 * 1000;
110
111
  var RATE = 16000;
111
112
  var SPEAK_RATE = 24000;
@@ -187,6 +188,7 @@ class CallSession {
187
188
  this.closed = false;
188
189
  this.started = Date.now();
189
190
  this.lastHuman = Date.now();
191
+ this.humanSeen = false;
190
192
  }
191
193
  get id() {
192
194
  return this.conversation.id;
@@ -215,10 +217,13 @@ class CallSession {
215
217
  return [...this.room?.remoteParticipants?.values() ?? []].some((p) => this.isHuman(userIdOf(p.identity)));
216
218
  }
217
219
  checkAlone() {
218
- if (this.humansPresent())
220
+ if (this.humansPresent()) {
219
221
  this.lastHuman = Date.now();
220
- if (Date.now() - this.lastHuman > ALONE_LEAVE_MS)
221
- return this.close("everyone left");
222
+ this.humanSeen = true;
223
+ }
224
+ const limit = this.humanSeen ? ALONE_LEAVE_MS : FIRST_WAIT_MS;
225
+ if (Date.now() - this.lastHuman > limit)
226
+ return this.close(this.humanSeen ? "everyone left" : "nobody came");
222
227
  if (Date.now() - this.started > MAX_CALL_MS)
223
228
  return this.close("call too long");
224
229
  }
package/dist/commands.js CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  parseArgs2,
6
6
  findChat2,
7
7
  main2
8
- } from "./chunk-pg6thvma.js";
8
+ } from "./chunk-ew1xhfzy.js";
9
9
  import"./chunk-8gpysrd6.js";
10
10
  export {
11
11
  HELP2 as HELP,
package/dist/mcp.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import"./chunk-8gpysrd6.js";
2
2
  import {
3
3
  findChat2
4
- } from "./chunk-pg6thvma.js";
4
+ } from "./chunk-ew1xhfzy.js";
5
5
 
6
6
  // src/cli/mcp.js
7
7
  import { createInterface } from "node:readline";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@profullstack/qryptchat",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "description": "qc: qrypt.chat in your terminal. A full-screen end-to-end encrypted chat client (ML-KEM-1024), plus a scriptable CLI and an MCP server.",
5
5
  "type": "module",
6
6
  "bin": {