@livx.cc/agentx 0.99.98 → 0.99.99
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 +18 -4
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -14094,8 +14094,12 @@ var SecondChannelOptions = class {
|
|
|
14094
14094
|
decisionBudgetMs = 300;
|
|
14095
14095
|
generateBudgetMs = 500;
|
|
14096
14096
|
minGapMs = 2500;
|
|
14097
|
-
/** Backchannel after backchannel needs this gap (
|
|
14098
|
-
|
|
14097
|
+
/** Backchannel after backchannel needs this gap (~4-6 cues in a 30s monologue — Para phone call 2026-10-13: 5s left
|
|
14098
|
+
* one cue in a long statement). */
|
|
14099
|
+
backchannelGapMs = 3e3;
|
|
14100
|
+
/** The user resumes within this long of their last words after a line of theirs was dispatched: the same statement goes
|
|
14101
|
+
* on (an STT endpoint mid-monologue) — its words still count toward the backchannel guards, and it is no fresh request. */
|
|
14102
|
+
continueMs = 3e3;
|
|
14099
14103
|
/** A decision whose partial grew by this many words while in flight is stale → dropped. */
|
|
14100
14104
|
staleWords = 3;
|
|
14101
14105
|
microWords = 30;
|
|
@@ -14182,6 +14186,11 @@ var SecondChannel = class {
|
|
|
14182
14186
|
inflight = null;
|
|
14183
14187
|
startedAt;
|
|
14184
14188
|
lang = null;
|
|
14189
|
+
carried = 0;
|
|
14190
|
+
// words of this statement already dispatched (a monologue split by STT endpoints)
|
|
14191
|
+
floorWords = 0;
|
|
14192
|
+
// carried + the last dispatched line's words
|
|
14193
|
+
lastHeardAt = -Infinity;
|
|
14185
14194
|
pinned = false;
|
|
14186
14195
|
// anticipate: the plan for the user's current/next turn (turnNo bumps per dispatched turn → a late plan is dropped)
|
|
14187
14196
|
turnNo = 0;
|
|
@@ -14229,6 +14238,8 @@ var SecondChannel = class {
|
|
|
14229
14238
|
onInterim(text) {
|
|
14230
14239
|
const t = text.trim();
|
|
14231
14240
|
if (!t || t === this.heard) return;
|
|
14241
|
+
if (this.main !== "idle" || !this.heard) this.carried = this.o.now() - this.lastHeardAt < this.o.continueMs ? this.floorWords : 0;
|
|
14242
|
+
this.lastHeardAt = this.o.now();
|
|
14232
14243
|
if (this.main !== "idle") this.onAgentState("idle");
|
|
14233
14244
|
this.heard = t;
|
|
14234
14245
|
this.detect(t);
|
|
@@ -14310,6 +14321,7 @@ var SecondChannel = class {
|
|
|
14310
14321
|
/** The user's final line was dispatched to the main agent (its words are the bridge's micro-context). */
|
|
14311
14322
|
onUserTurn(text) {
|
|
14312
14323
|
this.heard = text.trim();
|
|
14324
|
+
this.floorWords = this.carried + words2(this.heard).length;
|
|
14313
14325
|
this.lastUser = this.heard;
|
|
14314
14326
|
this.detect(this.heard);
|
|
14315
14327
|
this.main = "idle";
|
|
@@ -14391,8 +14403,10 @@ var SecondChannel = class {
|
|
|
14391
14403
|
* sentence end only deep into a story — a short request's end is the end of their turn (replay: "mm-hm" right after
|
|
14392
14404
|
* "Check hacker news for recent news.", just before the final). */
|
|
14393
14405
|
backchannelMoment(n, breath) {
|
|
14394
|
-
if (
|
|
14395
|
-
if (
|
|
14406
|
+
if (/\?$/.test(this.heard) || pendingQuestion(this.heard)) return false;
|
|
14407
|
+
if (this.carried) n += this.carried;
|
|
14408
|
+
else if (n < this.o.requestHoldWords && requestOpener(this.heard)) return false;
|
|
14409
|
+
if (n < this.o.backchannelMinWords) return false;
|
|
14396
14410
|
if (/[.!]$/.test(this.heard)) return n >= 2 * this.o.backchannelMinWords;
|
|
14397
14411
|
return breath || /[,;:…]$/.test(this.heard);
|
|
14398
14412
|
}
|