@livx.cc/agentx 0.98.1 → 0.98.2

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
@@ -4937,6 +4937,8 @@ var DuplexAgent = class _DuplexAgent {
4937
4937
  // briefs dispatched this turn (detect identical re-dispatch)
4938
4938
  spokeThisTurn = false;
4939
4939
  // any non-empty text_delta streamed this turn
4940
+ heldThisTurn = false;
4941
+ // Hold called this turn → turn is INTENTIONALLY silent (suppress reflex text + no dead-air ack)
4940
4942
  nudging = false;
4941
4943
  // re-ack pass in flight: block ALL tools, prevent recursion
4942
4944
  reflexBuf = "";
@@ -4999,6 +5001,7 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
4999
5001
  confirm: host.confirm ? (p, m) => host.confirm(p, m) : void 0,
5000
5002
  notify: (ev) => {
5001
5003
  if (ev?.kind === "text_delta" && typeof ev.message === "string") {
5004
+ if (this.heldThisTurn) return;
5002
5005
  if (this.fabricationCut) return;
5003
5006
  const msg = ev.message;
5004
5007
  this.reflexBuf += msg;
@@ -5068,6 +5071,7 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
5068
5071
  this.turnDispatched = false;
5069
5072
  this.turnBriefs.clear();
5070
5073
  this.spokeThisTurn = false;
5074
+ this.heldThisTurn = false;
5071
5075
  this.reflexBuf = "";
5072
5076
  this.reflexForwarded = 0;
5073
5077
  this.fabricationCut = false;
@@ -5096,7 +5100,7 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
5096
5100
  * voice) and emits an empty `final`, so no text_delta ever streams. Both ship silence; both repair.
5097
5101
  * Requires a host: without one there's no stream to detect speech on (and no one to speak to). */
5098
5102
  get silentTurn() {
5099
- return !!this.options.host && !this.spokeThisTurn;
5103
+ return !!this.options.host && !this.spokeThisTurn && !this.heldThisTurn;
5100
5104
  }
5101
5105
  /** A turn that voiced nothing is dead air. Re-prompt the reflex ONCE so the LLM itself voices a short
5102
5106
  * line (no template). If it STILL says nothing, fall back to a minimal line so silence never ships.
@@ -5657,6 +5661,7 @@ Another agent just implemented the above. Independently check the CURRENT state
5657
5661
  }
5658
5662
  },
5659
5663
  run: async ({ filler }) => {
5664
+ this.heldThisTurn = true;
5660
5665
  if (filler) this.notify("hold_filler", String(filler));
5661
5666
  return "Holding \u2014 listening for the rest of the user's thought. Do not respond further this turn.";
5662
5667
  }