@livx.cc/agentx 0.99.157 → 0.99.159

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/cli.js CHANGED
@@ -7757,6 +7757,105 @@ function formatTurns(turns, name = (t) => `Speaker ${t.speaker}`) {
7757
7757
  return turns.map((t) => `${name(t)}: ${t.text}`).join("\n");
7758
7758
  }
7759
7759
 
7760
+ // node_modules/@bod.ee/voice/src/core/agent-text-feed.ts
7761
+ var AgentTextFeedOptions = class {
7762
+ /** Deliver a piece (`text` may be '' with `endOfSegment`). */
7763
+ send = () => {
7764
+ };
7765
+ clock;
7766
+ /** Playback clock of the current turn (ms) — the same one word timestamps are anchored on. */
7767
+ playedMs = () => 0;
7768
+ /** Send this far ahead of playback (docs: 500 ms–1 s). */
7769
+ leadMs = 700;
7770
+ /** Speech-rate estimate without word timestamps. */
7771
+ charsPerSec = 15;
7772
+ tickMs = 50;
7773
+ };
7774
+ var AgentTextFeed = class {
7775
+ options;
7776
+ open = false;
7777
+ byWords = false;
7778
+ words = [];
7779
+ // [word, start sec on the playback clock]
7780
+ wordsSent = 0;
7781
+ chars = "";
7782
+ charsSent = 0;
7783
+ originMs = -1;
7784
+ // char clock: playback position of the turn's first audio byte (-1 = no audio yet)
7785
+ timer = null;
7786
+ constructor(options) {
7787
+ this.options = { ...new AgentTextFeedOptions(), ...options };
7788
+ }
7789
+ get active() {
7790
+ return this.open;
7791
+ }
7792
+ /** A spoken turn starts (closes a previous one still open — a gapless handoff plays it out). */
7793
+ begin(byWords) {
7794
+ if (this.open) this.end();
7795
+ this.open = true;
7796
+ this.byWords = byWords;
7797
+ this.words = [];
7798
+ this.wordsSent = 0;
7799
+ this.chars = "";
7800
+ this.charsSent = 0;
7801
+ this.originMs = -1;
7802
+ this.schedule();
7803
+ }
7804
+ /** Text handed to the TTS (char clock only). */
7805
+ text(t) {
7806
+ if (this.open && !this.byWords) this.chars += t;
7807
+ }
7808
+ /** The turn's first audio byte lands at this playback position (char clock only). */
7809
+ audioAt(ms) {
7810
+ if (this.open && this.originMs < 0) this.originMs = ms;
7811
+ }
7812
+ /** A TTS word timestamp on the playback clock (word clock only). */
7813
+ word(w, startSec) {
7814
+ if (this.open && this.byWords && w) this.words.push([w, startSec]);
7815
+ }
7816
+ /** The turn's audio finished playing: send the rest, close the segment. */
7817
+ end() {
7818
+ if (!this.open) return;
7819
+ this.flush(Infinity, true);
7820
+ }
7821
+ /** Barge-in: send only what was already due, close the segment. */
7822
+ cut() {
7823
+ if (!this.open) return;
7824
+ this.flush(this.options.playedMs() + this.options.leadMs, true);
7825
+ }
7826
+ schedule() {
7827
+ this.timer = this.options.clock.setTimeout(() => {
7828
+ this.timer = null;
7829
+ if (!this.open) return;
7830
+ this.flush(this.options.playedMs() + this.options.leadMs, false);
7831
+ if (this.open) this.schedule();
7832
+ }, this.options.tickMs);
7833
+ }
7834
+ flush(dueMs, close) {
7835
+ let piece = "";
7836
+ if (this.byWords) {
7837
+ let n = this.wordsSent;
7838
+ while (n < this.words.length && this.words[n][1] * 1e3 <= dueMs) n++;
7839
+ piece = this.words.slice(this.wordsSent, n).map(([w]) => w + " ").join("");
7840
+ this.wordsSent = n;
7841
+ } else if (this.originMs >= 0 || dueMs === Infinity) {
7842
+ const n = dueMs === Infinity ? this.chars.length : Math.min(this.chars.length, Math.floor((dueMs - this.originMs) / 1e3 * this.options.charsPerSec));
7843
+ if (n > this.charsSent) {
7844
+ piece = this.chars.slice(this.charsSent, n);
7845
+ this.charsSent = n;
7846
+ }
7847
+ }
7848
+ if (close) {
7849
+ this.open = false;
7850
+ if (this.timer) {
7851
+ this.options.clock.clearTimeout(this.timer);
7852
+ this.timer = null;
7853
+ }
7854
+ }
7855
+ if (piece || close) this.options.send(piece, close);
7856
+ }
7857
+ };
7858
+
7760
7859
  // node_modules/@bod.ee/voice/src/core/engine.ts
7761
7860
  var log14 = forComponent2("VoiceEngine");
7762
7861
  var addLangs = (to, from) => {
@@ -8049,6 +8148,8 @@ var VoiceEngine = class _VoiceEngine {
8049
8148
  // leading timestamped words that are the ack spoken on this turn's context, not the reply
8050
8149
  revealedN = 0;
8051
8150
  revealPoll = null;
8151
+ agentText = null;
8152
+ // stt.agentTextInput: our spoken text, paced to playback
8052
8153
  // Sub-turn timestamp anchoring. A TTS context emits word starts relative to ITS OWN audio start, so
8053
8154
  // `wordStarts` (one flat turn timeline) is only valid while the turn stays on one context. It does
8054
8155
  // not: `subturnBoundary()` rotates the context, and Cartesia ALSO rotates it on its own (~5s idle
@@ -8190,6 +8291,7 @@ var VoiceEngine = class _VoiceEngine {
8190
8291
  this.tts.onAudio = (c) => {
8191
8292
  if (!this.speaking && !this.bcActive) return;
8192
8293
  if (this.wordAnchorPending && this.speaking) this.anchorSubturn();
8294
+ if (this.speaking) this.agentText?.audioAt(this.player.endMs());
8193
8295
  this.player.write(c);
8194
8296
  };
8195
8297
  if (this.options.revealMode === "word" || this.options.heardTimestamps) {
@@ -8201,6 +8303,7 @@ var VoiceEngine = class _VoiceEngine {
8201
8303
  else {
8202
8304
  this.wordStarts.push(this.wordOrigin + s);
8203
8305
  this.wordTexts.push(words5[i] ?? "");
8306
+ this.agentText?.word(words5[i] ?? "", this.wordOrigin + s);
8204
8307
  }
8205
8308
  });
8206
8309
  };
@@ -8226,6 +8329,18 @@ var VoiceEngine = class _VoiceEngine {
8226
8329
  this.handleUtterance(k.text, language ? { [language]: k.text.length } : void 0, k.turns);
8227
8330
  };
8228
8331
  this.stt.onLevel = (rms) => this.handleLevel(rms);
8332
+ const stt = this.stt;
8333
+ this.agentText = stt.agentTextInput && stt.sendAgentText ? new AgentTextFeed({
8334
+ clock: this.clock,
8335
+ playedMs: () => Math.max(0, this.player.playedMs()),
8336
+ send: (text, end) => {
8337
+ try {
8338
+ stt.sendAgentText(text, end);
8339
+ } catch (e) {
8340
+ log14.warn(`sendAgentText threw: ${e instanceof Error ? e.message : e}`);
8341
+ }
8342
+ }
8343
+ }) : null;
8229
8344
  await Promise.all([
8230
8345
  this.tts.connect(),
8231
8346
  this.stt.start(),
@@ -8331,10 +8446,11 @@ var VoiceEngine = class _VoiceEngine {
8331
8446
  this.lineBefore = new Set(this.echoWords);
8332
8447
  this.tts.newContext();
8333
8448
  this.clause = "";
8449
+ this.agentText?.begin(!!this.tts.wantTimestamps);
8334
8450
  this.clearAckTimer("new_turn");
8335
8451
  if (ack && this.options.ackPhrase) {
8336
8452
  this.diag("ack_fired", { phrase: this.options.ackPhrase, adaptive: false });
8337
- this.tts.speak(this.options.ackPhrase + " ", true);
8453
+ this.say(this.options.ackPhrase + " ");
8338
8454
  this.spokeDeltas = true;
8339
8455
  this.ackAt = this.clock.now();
8340
8456
  this.lastAck = this.options.ackPhrase;
@@ -8406,13 +8522,13 @@ var VoiceEngine = class _VoiceEngine {
8406
8522
  }
8407
8523
  for (const w of this.words(this.reply)) this.echoWords.add(w);
8408
8524
  const cut = this.options.flushFirstClause && this.clause !== null && this.tts.flush ? speech.search(/[,.;:!?…](?=\s|$)/) : -1;
8409
- if (cut < 0) this.tts.speak(forSpeech(speech), true);
8525
+ if (cut < 0) this.say(forSpeech(speech));
8410
8526
  else {
8411
- this.tts.speak(forSpeech(speech.slice(0, cut + 1)), true);
8527
+ this.say(forSpeech(speech.slice(0, cut + 1)));
8412
8528
  this.clause = null;
8413
8529
  this.tts.flush();
8414
8530
  this.diag("tts_first_clause_flush", {});
8415
- if (speech.slice(cut + 1)) this.tts.speak(forSpeech(speech.slice(cut + 1)), true);
8531
+ if (speech.slice(cut + 1)) this.say(forSpeech(speech.slice(cut + 1)));
8416
8532
  }
8417
8533
  if (!this.spokeDeltas && this.turnStartAt) log14.debug(`ttft: ${Math.round(this.clock.now() - this.turnStartAt)}ms`);
8418
8534
  this.spokeDeltas = true;
@@ -8453,6 +8569,7 @@ var VoiceEngine = class _VoiceEngine {
8453
8569
  for (const [w, s] of this.wordPending) {
8454
8570
  this.wordStarts.push(this.wordOrigin + s);
8455
8571
  this.wordTexts.push(w);
8572
+ this.agentText?.word(w, this.wordOrigin + s);
8456
8573
  }
8457
8574
  this.wordPending = [];
8458
8575
  }
@@ -8495,6 +8612,11 @@ var VoiceEngine = class _VoiceEngine {
8495
8612
  if (full) this.options.onReveal(full);
8496
8613
  }
8497
8614
  }
8615
+ /** Speech on the open turn's TTS context — also fed to the STT's agent text input (when on). */
8616
+ say(text) {
8617
+ this.agentText?.text(text);
8618
+ this.tts.speak(text, true);
8619
+ }
8498
8620
  /** close the spoken turn (idempotent); stays audible until ALL audio arrived AND playback drains */
8499
8621
  endSpeech() {
8500
8622
  this.interrupted = false;
@@ -8514,7 +8636,7 @@ var VoiceEngine = class _VoiceEngine {
8514
8636
  const t = this.emo.flush();
8515
8637
  this.emo = null;
8516
8638
  if (t.prose) this.reply += t.prose;
8517
- if (t.speech) this.tts.speak(forSpeech(t.speech), true);
8639
+ if (t.speech) this.say(forSpeech(t.speech));
8518
8640
  }
8519
8641
  if (this.reply) this.prevReply = this.reply;
8520
8642
  const settle = () => {
@@ -8528,6 +8650,7 @@ var VoiceEngine = class _VoiceEngine {
8528
8650
  }
8529
8651
  this.drainTimer = null;
8530
8652
  this.speaking = false;
8653
+ this.agentText?.end();
8531
8654
  this.stopWordReveal(true);
8532
8655
  if (this.turnStartAt) log14.debug(`turn: ${Math.round(this.clock.now() - this.turnStartAt)}ms (incl. playback)`);
8533
8656
  this.echoUntil = this.clock.now() + 2500;
@@ -8643,7 +8766,7 @@ var VoiceEngine = class _VoiceEngine {
8643
8766
  return;
8644
8767
  }
8645
8768
  this.diag("ack_fired", { phrase, adaptive: true, waitedMs: this.options.adaptiveAckMs, ...picked ? { picked } : {} });
8646
- this.tts.speak(phrase + " ", true);
8769
+ this.say(phrase + " ");
8647
8770
  this.spokeDeltas = true;
8648
8771
  this.ackAt = this.clock.now();
8649
8772
  this.lastAck = phrase;
@@ -8729,6 +8852,7 @@ var VoiceEngine = class _VoiceEngine {
8729
8852
  this.interrupted = true;
8730
8853
  this.suspectUntil = 0;
8731
8854
  this.echoUntil = this.clock.now() + Math.max(2500, this.player.drainMs() + 3e3);
8855
+ this.agentText?.cut();
8732
8856
  this.tts.cancel();
8733
8857
  this.player.kill();
8734
8858
  if (!this.usingAec) this.echoHead = true;
@@ -8759,6 +8883,7 @@ var VoiceEngine = class _VoiceEngine {
8759
8883
  if (this.specTimer) this.clock.clearTimeout(this.specTimer);
8760
8884
  this.bcSupersede();
8761
8885
  this.cancelAside("stop");
8886
+ this.agentText?.cut();
8762
8887
  this.stt.stop();
8763
8888
  this.player.kill();
8764
8889
  this.tts.close();
@@ -9871,8 +9996,8 @@ var SonioxSTTOptions = class {
9871
9996
  /** `stt-rt-preview` was RETIRED (aliased to the two-generations-old v3 on 2025-10-31), so every
9872
9997
  * caller that never set this was silently running an old model while the alias kept it working —
9873
9998
  * the failure mode of a default that is a moving vendor pointer. Pin a real version instead;
9874
- * `stt-rt-v5` is live today (verified against GET https://api.soniox.com/v1/models). */
9875
- model = "stt-rt-v5";
9999
+ * `stt-rt-v6` (2026-11-03) replaced v5, deprecated and removed 2026-12-15 (docs.soniox.com/stt/models). */
10000
+ model = "stt-rt-v6";
9876
10001
  languageHints = ["en"];
9877
10002
  /** Opt-in Soniox language identification (`enable_language_identification`): every token is tagged with a
9878
10003
  * `language` code, and onUtterance's 3rd arg reports the utterance's dominant one (by characters). */
@@ -9897,6 +10022,10 @@ var SonioxSTTOptions = class {
9897
10022
  /** No-audio watchdog: if the mic source stops delivering chunks for this long, capture is dead →
9898
10023
  * fire onFatal + stop (else Soniox idle-timeouts and reconnect-loops forever). 0 = disable. */
9899
10024
  noAudioTimeoutMs = 1e4;
10025
+ /** Opt-in Soniox agent text input (`enable_agent_text_input`, stt-rt-v6 only): the assistant's spoken text goes on the
10026
+ * same socket (`sendAgentText`, which VoiceEngine drives paced to playback), so Soniox filters the leftover echo
10027
+ * of our own voice out of the transcript. Complements AEC — keep echo cancellation on. */
10028
+ agentTextInput = false;
9900
10029
  };
9901
10030
  var SonioxSTT = class {
9902
10031
  options;
@@ -9959,6 +10088,17 @@ var SonioxSTT = class {
9959
10088
  constructor(options) {
9960
10089
  this.options = { ...new SonioxSTTOptions(), ...options };
9961
10090
  }
10091
+ get agentTextInput() {
10092
+ return this.options.agentTextInput;
10093
+ }
10094
+ /** Send the next not-yet-sent piece of what the assistant is saying (`agent_text`); `endOfSegment` closes the
10095
+ * assistant's turn (finished or interrupted). Spaces are kept as given. No-op unless `agentTextInput` is on and the
10096
+ * socket is open (a reconnect starts a fresh stream; text sent before it is not re-sent). */
10097
+ sendAgentText(text, endOfSegment = false) {
10098
+ if (!this.options.agentTextInput || this.stopped || this.ws?.readyState !== WebSocket.OPEN) return;
10099
+ if (!text && !endOfSegment) return;
10100
+ this.ws.send(JSON.stringify({ type: "agent_text", text, ...endOfSegment ? { end_of_segment: true } : {} }));
10101
+ }
9962
10102
  get usingAec() {
9963
10103
  return this.options.source?.aec ?? false;
9964
10104
  }
@@ -9983,18 +10123,20 @@ var SonioxSTT = class {
9983
10123
  ...this.options.languageHintsStrict ? { language_hints_strict: true } : {},
9984
10124
  ...this.options.languageIdentification ? { enable_language_identification: true } : {},
9985
10125
  ...this.options.diarization ? { enable_speaker_diarization: true } : {},
9986
- ...this.options.terms?.length ? { context: { terms: this.options.terms } } : {}
10126
+ ...this.options.terms?.length ? { context: { terms: this.options.terms } } : {},
10127
+ ...this.options.agentTextInput ? { enable_agent_text_input: true } : {}
9987
10128
  })
9988
10129
  );
9989
10130
  this.ws.onmessage = (ev) => this.handle(JSON.parse(String(ev.data)));
9990
10131
  this.ws.onclose = (ev) => {
9991
- if (this.stopped) return;
10132
+ if (this.stopped || this.failed) return;
9992
10133
  log15.warn(`soniox ws closed (${ev.code} ${ev.reason || ""}) \u2014 reconnecting`);
9993
10134
  this.diag("stt_ws_closed", { code: ev.code, reason: String(ev.reason || ""), reconnecting: true });
9994
10135
  this.reset();
9995
10136
  this.connectWs().catch((e) => {
9996
10137
  log15.error(`soniox reconnect failed: ${e.message}`);
9997
10138
  this.diag("stt_reconnect_failed", { message: e.message });
10139
+ this.fail(`Speech-to-text (Soniox) lost its connection and could not reconnect (${e.message}).`);
9998
10140
  });
9999
10141
  };
10000
10142
  }
@@ -10054,7 +10196,10 @@ var SonioxSTT = class {
10054
10196
  handle(m) {
10055
10197
  if (m.error_message) {
10056
10198
  this.diag("stt_error", { message: String(m.error_message), code: m.error_code });
10057
- return log15.error(`soniox: ${m.error_message}`);
10199
+ log15.error(`soniox: ${m.error_message}`);
10200
+ const fatal = sonioxFatal(m.error_code, String(m.error_message));
10201
+ if (fatal) this.fail(fatal);
10202
+ return;
10058
10203
  }
10059
10204
  let endpoint = false;
10060
10205
  const foreign = this.options.languageHintsStrict ? foreignScript(this.options.languageHints) : null;
@@ -10130,6 +10275,14 @@ var SonioxSTT = class {
10130
10275
  this.firstTokenAt = 0;
10131
10276
  this.lastWordEndMs = 0;
10132
10277
  }
10278
+ /** Unrecoverable: tell the host once, then stop (no reconnect loop). */
10279
+ failed = false;
10280
+ fail(message) {
10281
+ if (this.failed || this.stopped) return;
10282
+ this.failed = true;
10283
+ this.onFatal(message);
10284
+ this.stop();
10285
+ }
10133
10286
  stop() {
10134
10287
  this.stopped = true;
10135
10288
  if (this.endpointTimer) clearInterval(this.endpointTimer);
@@ -10139,6 +10292,15 @@ var SonioxSTT = class {
10139
10292
  this.ws?.close();
10140
10293
  }
10141
10294
  };
10295
+ function sonioxFatal(code, message) {
10296
+ const c = Number(code);
10297
+ if (c === 402 || /balance|autopay|add funds|payment required/i.test(message))
10298
+ return `Speech-to-text is out of credit (Soniox): ${message} Add funds at console.soniox.com.`;
10299
+ if (c === 401 || c === 403 || /api key|unauthori[sz]ed|forbidden/i.test(message))
10300
+ return `Speech-to-text (Soniox) rejected the API key: ${message}`;
10301
+ if (c === 400) return `Speech-to-text (Soniox) rejected the request: ${message}`;
10302
+ return null;
10303
+ }
10142
10304
  var SCRIPTS = {
10143
10305
  he: ["Hebrew"],
10144
10306
  yi: ["Hebrew"],
@@ -18331,13 +18493,13 @@ function holdLine(c) {
18331
18493
  const said = new Set(c.history.filter((h) => h.who === "you").map((h) => norm3(h.text)));
18332
18494
  return (HOLDS[c.lang] ?? []).find((x) => !said.has(norm3(x))) ?? "";
18333
18495
  }
18334
- function fastQuickLane(ai, model, gender, persona = "", hedgeMs = 900) {
18496
+ function fastQuickLane(ai, model, gender, persona = "", hedgeMs = 900, tools = true) {
18335
18497
  return async (c, signal) => {
18336
18498
  if (c.rest && GO_ON.test(c.heard)) return { kind: "resume", line: "" };
18337
18499
  const hold = holdLine(c);
18338
18500
  if (hold) return { kind: "say", line: hold };
18339
18501
  const ask = async () => {
18340
- const raw = await fastText(ai, { model, prompt: quickPrompt(c, gender, persona), signal, temperature: 0.4 });
18502
+ const raw = await fastText(ai, { model, prompt: quickPrompt(c, gender, persona, tools), signal, temperature: 0.4 });
18341
18503
  const mv = quickMove(raw, c);
18342
18504
  if (!mv) log39.debug(`quick lane: unusable "${raw.slice(0, 80)}"`);
18343
18505
  return mv;
@@ -18354,12 +18516,12 @@ function fastQuickLane(ai, model, gender, persona = "", hedgeMs = 900) {
18354
18516
  }
18355
18517
  };
18356
18518
  }
18357
- function quickPrompt(c, gender, persona = "") {
18519
+ function quickPrompt(c, gender, persona = "", tools = true) {
18358
18520
  const hist = c.history.slice(-12).map((h) => `${h.who === "user" ? "Them" : "You"}: ${h.text.slice(0, 400)}${h.cut ? " \u2014(they cut you here)" : ""}`).join("\n");
18359
18521
  return `${persona ? `Who you are on this call:
18360
18522
  ${persona.slice(0, 500)}
18361
18523
 
18362
- ` : ""}You are the quick voice of a live phone call. A slower expert colleague works behind you: they use tools, the web and files and think things through. You answer at once.
18524
+ ` : ""}You are the quick voice of a live phone call. ${tools ? "A slower expert colleague works behind you: they use tools, the web and files and think things through." : "A slower colleague works behind you and thinks things through. This call has NO tools: nothing can be looked up, checked, searched or fetched by anyone."} You answer at once.
18363
18525
 
18364
18526
  The call so far:
18365
18527
  ${hist || "(just started)"}
@@ -18370,7 +18532,7 @@ They just said: "${c.heard}"
18370
18532
  Reply with exactly ONE line, one of:
18371
18533
  BYE: <a short farewell> \u2014 they mean to end the call ("no, thank you, bye", "okay, talk later"): the call hangs up after it. Judge the intent: "say bye to Dan" or "before I go, one more thing" is not an end.
18372
18534
  SAY: <your words> \u2014 ONLY a greeting or how-are-you, a short reaction ("wow", "really?"), or when they ask exactly to repeat something ALREADY said ("say that again", "which one was that?"). Any request ("tell me a story\u2026"), any question about content ("what is\u2026?", "wait, what?", "how long is it?") is DEEP, even if you could guess. Max two short sentences. Use only facts from the call above; never invent a name, number, news item or result.
18373
- DEEP: <a 2-8 word acknowledgement> | <what the colleague must do, names spelled right> \u2014 anything needing a lookup, current information, tools, files, or real thinking. The acknowledgement is your natural first reaction to THIS kind of ask, in your own voice: a lookup says you're on it and names what you'll look at ("Sure, let me pull up the kitty changelog."); a story, joke or idea gets a reaction to the idea itself (a story about a dragon: "Ooh, a dragon story, okay\u2026"); a question about what was said gets a short "ah"-type reaction ("Ah, good question."). Say "checking" or "looking" only when something is actually looked up. Never a result. The speech-to-text misspells names: fix them from context ("Haka News" \u2192 Hacker News).
18535
+ DEEP: <a 2-8 word acknowledgement> | <what the colleague must do, names spelled right> \u2014 anything needing a lookup, current information, tools, files, or real thinking. The acknowledgement is your natural first reaction to THIS kind of ask, in your own voice: ${tools ? `a lookup says you're on it and names what you'll look at ("Sure, let me pull up the kitty changelog."); ` : `never say you will check, look up, pull up, find or fetch anything \u2014 nothing can be; a question gets a short thinking reaction ("Hmm, okay\u2026", "Right, so\u2026"); `}a story, joke or idea gets a reaction to the idea itself (a story about a dragon: "Ooh, a dragon story, okay\u2026"); a question about what was said gets a short "ah"-type reaction ("Ah, good question."). Say "checking" or "looking" only when something is actually looked up. Never a result. The speech-to-text misspells names: fix them from context ("Haka News" \u2192 Hacker News).
18374
18536
  QUIET \u2014 nothing is owed: a bare "okay", "mm-hm", or a reaction you already answered.
18375
18537
  "Wait" / "hold on" with nothing new: a brief SAY ("Sure.") \u2014 no work for the colleague. Vary your words: never reuse an acknowledgement or reaction already said in this call.
18376
18538
  A reaction ("wow", "really?") gets a short fitting reply in your own words ("I know, right?"), never their word back. Never repeat what was already said. Speak ${languageName(c.lang)}. ${personaHint(gender)} Output only the line.`;
@@ -25785,7 +25947,8 @@ async function channelServe(args, ai, cfg) {
25785
25947
  ...fast,
25786
25948
  // no `ai` here: the channel's model wiring is explicit
25787
25949
  ...quick ? {
25788
- quick: fastQuickLane(ai, fast.fastModel, args.voiceGender, process.env.AGENTX_CALL_PERSONA ?? ""),
25950
+ quick: fastQuickLane(ai, fast.fastModel, args.voiceGender, process.env.AGENTX_CALL_PERSONA ?? "", void 0, process.env.AGENTX_CALL_NO_TOOLS !== "1"),
25951
+ // (1: MAIN has no tools — a sandboxed phone call)
25789
25952
  noteTurn: (text) => out({ type: "note", text }),
25790
25953
  heardCut: () => cut?.heard ?? null,
25791
25954
  cutRest: () => cut && cut.full.slice(cut.heard.length).trim() || null,