@livx.cc/agentx 0.95.2 → 0.95.3
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 -9
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +8 -4
- package/dist/index.js +14 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4764,23 +4764,28 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
|
|
|
4764
4764
|
}
|
|
4765
4765
|
};
|
|
4766
4766
|
}
|
|
4767
|
-
/** True when the just-finished turn
|
|
4767
|
+
/** True when the just-finished turn voiced NOTHING — dead air to repair. Two ways this happens:
|
|
4768
|
+
* (a) a dispatch with no spoken ack, and (b) an INLINE turn whose `final` channel came back empty —
|
|
4769
|
+
* gpt-oss harmony sometimes puts the whole reply in `analysis` (→ thinking_delta, suppressed in
|
|
4770
|
+
* voice) and emits an empty `final`, so no text_delta ever streams. Both ship silence; both repair.
|
|
4768
4771
|
* Requires a host: without one there's no stream to detect speech on (and no one to speak to). */
|
|
4769
|
-
get
|
|
4770
|
-
return !!this.options.host &&
|
|
4772
|
+
get silentTurn() {
|
|
4773
|
+
return !!this.options.host && !this.spokeThisTurn;
|
|
4771
4774
|
}
|
|
4772
|
-
/** A
|
|
4773
|
-
*
|
|
4775
|
+
/** A turn that voiced nothing is dead air. Re-prompt the reflex ONCE so the LLM itself voices a short
|
|
4776
|
+
* line (no template). If it STILL says nothing, fall back to a minimal line so silence never ships.
|
|
4777
|
+
* Wording adapts to whether work was dispatched (an ack) or the inline reply was simply lost. */
|
|
4774
4778
|
async ackIfSilent() {
|
|
4779
|
+
const dispatched = this.turnDispatched;
|
|
4775
4780
|
this.nudging = true;
|
|
4776
4781
|
try {
|
|
4777
|
-
await this.voice.send("[reminder] You dispatched a task but said nothing to the user. Say ONE short spoken acknowledgement now \u2014 no tools.");
|
|
4782
|
+
await this.voice.send(dispatched ? "[reminder] You dispatched a task but said nothing to the user. Say ONE short spoken acknowledgement now \u2014 no tools." : "[reminder] You said nothing to the user this turn. Give your ONE short spoken reply now \u2014 no tools.");
|
|
4778
4783
|
} catch (e) {
|
|
4779
4784
|
log8.warn(`ack nudge failed: ${e instanceof Error ? e.message : e}`);
|
|
4780
4785
|
} finally {
|
|
4781
4786
|
this.nudging = false;
|
|
4782
4787
|
}
|
|
4783
|
-
if (!this.spokeThisTurn) this.options.host?.notify?.({ kind: "text_delta", message: "Okay, on it." });
|
|
4788
|
+
if (!this.spokeThisTurn) this.options.host?.notify?.({ kind: "text_delta", message: dispatched ? "Okay, on it." : "Sorry, could you say that again?" });
|
|
4784
4789
|
}
|
|
4785
4790
|
/** One user turn: the voice agent streams the reply (and may Act/Think). Serialized with re-voice turns. */
|
|
4786
4791
|
send(content) {
|
|
@@ -4788,7 +4793,7 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
|
|
|
4788
4793
|
await this.initMemory();
|
|
4789
4794
|
this.resetTurn();
|
|
4790
4795
|
const res = await this.voice.send(content);
|
|
4791
|
-
if (this.
|
|
4796
|
+
if (this.silentTurn) await this.ackIfSilent();
|
|
4792
4797
|
return res;
|
|
4793
4798
|
});
|
|
4794
4799
|
}
|
|
@@ -4833,7 +4838,7 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
|
|
|
4833
4838
|
if (!events.length) return;
|
|
4834
4839
|
this.resetTurn();
|
|
4835
4840
|
await this.voice.send(events.join("\n"));
|
|
4836
|
-
if (this.
|
|
4841
|
+
if (this.silentTurn) await this.ackIfSilent();
|
|
4837
4842
|
this.notify("revoice_done", "");
|
|
4838
4843
|
});
|
|
4839
4844
|
}
|