@livx.cc/agentx 0.99.141 → 0.99.143
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 +11 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +11 -5
- 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) {
|
|
@@ -13457,10 +13461,11 @@ var CHANNEL_MODES = {
|
|
|
13457
13461
|
maxPerWindow: 6
|
|
13458
13462
|
},
|
|
13459
13463
|
live: {
|
|
13464
|
+
kinds: ["backchannel"],
|
|
13460
13465
|
anticipate: true,
|
|
13461
13466
|
cueOnly: false,
|
|
13462
|
-
generateFor: ["backchannel"
|
|
13463
|
-
reactionGapMs:
|
|
13467
|
+
generateFor: ["backchannel"],
|
|
13468
|
+
reactionGapMs: 0,
|
|
13464
13469
|
generateBudgetMs: 400,
|
|
13465
13470
|
backchannelMinWords: 3,
|
|
13466
13471
|
shortTurnWords: 2,
|
|
@@ -14164,6 +14169,7 @@ var VoiceCall = class {
|
|
|
14164
14169
|
this.judge = new OverlapJudge({ ...ai ? { model: overlapModelFor(ai) } : {}, now: o.now });
|
|
14165
14170
|
this.gate = new TurnGate({
|
|
14166
14171
|
now: o.now,
|
|
14172
|
+
...o.mode === "live" ? { settleMs: 700 } : {},
|
|
14167
14173
|
...o.gate,
|
|
14168
14174
|
onTurn: (t) => this.onTurn(t),
|
|
14169
14175
|
onDrop: (text, why) => this.onDrop(text, why),
|