@livx.cc/agentx 0.99.142 → 0.99.144
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 +14 -4
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +14 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10670,6 +10670,8 @@ function isClosing(text) {
|
|
|
10670
10670
|
}
|
|
10671
10671
|
var TurnGateOptions = class {
|
|
10672
10672
|
holdMs = 1200;
|
|
10673
|
+
/** A finished statement (not a question) waits this long for more speech before it is a turn. 0 = sent at once. */
|
|
10674
|
+
settleMs = 0;
|
|
10673
10675
|
/** An identical final within this window is a duplicate. */
|
|
10674
10676
|
dupWindowMs = 5e3;
|
|
10675
10677
|
/** A fuller final within this window of the last turn (or with its sttId) is a re-final of it. */
|
|
@@ -10728,8 +10730,10 @@ var TurnGate = class {
|
|
|
10728
10730
|
if (sameStt || age < this.o.refinalWindowMs && key.startsWith(last.key + " ")) return this.refinal(last, t, key, sttId);
|
|
10729
10731
|
}
|
|
10730
10732
|
if (this.closed && isClosing(t)) return this.o.onDrop(t, "goodbye");
|
|
10731
|
-
|
|
10732
|
-
|
|
10733
|
+
const mid = endsMidPhrase(t);
|
|
10734
|
+
if (mid || this.o.settleMs && !/\?["')\]]*$/.test(t)) {
|
|
10735
|
+
const ms = mid ? this.o.holdMs : this.o.settleMs;
|
|
10736
|
+
this.held = { text: t, sttId, ms, timer: setTimeout(() => this.flush(), ms) };
|
|
10733
10737
|
return this.o.onHold(t);
|
|
10734
10738
|
}
|
|
10735
10739
|
this.send(t, key, sttId, "new");
|
|
@@ -10738,7 +10742,7 @@ var TurnGate = class {
|
|
|
10738
10742
|
speaking() {
|
|
10739
10743
|
if (!this.held) return;
|
|
10740
10744
|
clearTimeout(this.held.timer);
|
|
10741
|
-
this.held.timer = setTimeout(() => this.flush(), this.
|
|
10745
|
+
this.held.timer = setTimeout(() => this.flush(), this.held.ms);
|
|
10742
10746
|
}
|
|
10743
10747
|
/** MAIN started replying to turn `id` (its first text/tool/audio): a later re-final only adds its new words. */
|
|
10744
10748
|
replyStarted(id) {
|
|
@@ -13461,7 +13465,7 @@ var CHANNEL_MODES = {
|
|
|
13461
13465
|
anticipate: true,
|
|
13462
13466
|
cueOnly: false,
|
|
13463
13467
|
generateFor: ["backchannel"],
|
|
13464
|
-
reactionGapMs:
|
|
13468
|
+
reactionGapMs: 0,
|
|
13465
13469
|
generateBudgetMs: 400,
|
|
13466
13470
|
backchannelMinWords: 3,
|
|
13467
13471
|
shortTurnWords: 2,
|
|
@@ -14165,6 +14169,7 @@ var VoiceCall = class {
|
|
|
14165
14169
|
this.judge = new OverlapJudge({ ...ai ? { model: overlapModelFor(ai) } : {}, now: o.now });
|
|
14166
14170
|
this.gate = new TurnGate({
|
|
14167
14171
|
now: o.now,
|
|
14172
|
+
...o.mode === "live" ? { settleMs: 700 } : {},
|
|
14168
14173
|
...o.gate,
|
|
14169
14174
|
onTurn: (t) => this.onTurn(t),
|
|
14170
14175
|
onDrop: (text, why) => this.onDrop(text, why),
|
|
@@ -14211,6 +14216,11 @@ var VoiceCall = class {
|
|
|
14211
14216
|
if (this.ended || !text.trim()) return;
|
|
14212
14217
|
if (typeof aec === "boolean") this.fill.options.aec = aec;
|
|
14213
14218
|
this.gate.speaking();
|
|
14219
|
+
const c = this.cur;
|
|
14220
|
+
if (this.o.mode === "live" && c?.running && !c.worded && text.trim().split(/\s+/).length >= 2) {
|
|
14221
|
+
log29.debug("user resumed before the reply \u2014 yielded");
|
|
14222
|
+
this.barge();
|
|
14223
|
+
}
|
|
14214
14224
|
this.follow(text);
|
|
14215
14225
|
this.fill.onInterim(text);
|
|
14216
14226
|
}
|