@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/index.d.ts
CHANGED
|
@@ -931,11 +931,15 @@ declare class DuplexAgent {
|
|
|
931
931
|
* re-dispatch — so the only remaining move is to voice a short ack and end. A genuinely NEW Act is
|
|
932
932
|
* still allowed (parallel independent work). During a re-ack pass, block every tool. */
|
|
933
933
|
private dispatchGuard;
|
|
934
|
-
/** True when the just-finished turn
|
|
934
|
+
/** True when the just-finished turn voiced NOTHING — dead air to repair. Two ways this happens:
|
|
935
|
+
* (a) a dispatch with no spoken ack, and (b) an INLINE turn whose `final` channel came back empty —
|
|
936
|
+
* gpt-oss harmony sometimes puts the whole reply in `analysis` (→ thinking_delta, suppressed in
|
|
937
|
+
* voice) and emits an empty `final`, so no text_delta ever streams. Both ship silence; both repair.
|
|
935
938
|
* Requires a host: without one there's no stream to detect speech on (and no one to speak to). */
|
|
936
|
-
private get
|
|
937
|
-
/** A
|
|
938
|
-
*
|
|
939
|
+
private get silentTurn();
|
|
940
|
+
/** A turn that voiced nothing is dead air. Re-prompt the reflex ONCE so the LLM itself voices a short
|
|
941
|
+
* line (no template). If it STILL says nothing, fall back to a minimal line so silence never ships.
|
|
942
|
+
* Wording adapts to whether work was dispatched (an ack) or the inline reply was simply lost. */
|
|
939
943
|
private ackIfSilent;
|
|
940
944
|
/** One user turn: the voice agent streams the reply (and may Act/Think). Serialized with re-voice turns. */
|
|
941
945
|
send(content: MessageContent): Promise<RunResult>;
|
package/dist/index.js
CHANGED
|
@@ -4831,23 +4831,28 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
|
|
|
4831
4831
|
}
|
|
4832
4832
|
};
|
|
4833
4833
|
}
|
|
4834
|
-
/** True when the just-finished turn
|
|
4834
|
+
/** True when the just-finished turn voiced NOTHING — dead air to repair. Two ways this happens:
|
|
4835
|
+
* (a) a dispatch with no spoken ack, and (b) an INLINE turn whose `final` channel came back empty —
|
|
4836
|
+
* gpt-oss harmony sometimes puts the whole reply in `analysis` (→ thinking_delta, suppressed in
|
|
4837
|
+
* voice) and emits an empty `final`, so no text_delta ever streams. Both ship silence; both repair.
|
|
4835
4838
|
* Requires a host: without one there's no stream to detect speech on (and no one to speak to). */
|
|
4836
|
-
get
|
|
4837
|
-
return !!this.options.host &&
|
|
4839
|
+
get silentTurn() {
|
|
4840
|
+
return !!this.options.host && !this.spokeThisTurn;
|
|
4838
4841
|
}
|
|
4839
|
-
/** A
|
|
4840
|
-
*
|
|
4842
|
+
/** A turn that voiced nothing is dead air. Re-prompt the reflex ONCE so the LLM itself voices a short
|
|
4843
|
+
* line (no template). If it STILL says nothing, fall back to a minimal line so silence never ships.
|
|
4844
|
+
* Wording adapts to whether work was dispatched (an ack) or the inline reply was simply lost. */
|
|
4841
4845
|
async ackIfSilent() {
|
|
4846
|
+
const dispatched = this.turnDispatched;
|
|
4842
4847
|
this.nudging = true;
|
|
4843
4848
|
try {
|
|
4844
|
-
await this.voice.send("[reminder] You dispatched a task but said nothing to the user. Say ONE short spoken acknowledgement now \u2014 no tools.");
|
|
4849
|
+
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.");
|
|
4845
4850
|
} catch (e) {
|
|
4846
4851
|
log9.warn(`ack nudge failed: ${e instanceof Error ? e.message : e}`);
|
|
4847
4852
|
} finally {
|
|
4848
4853
|
this.nudging = false;
|
|
4849
4854
|
}
|
|
4850
|
-
if (!this.spokeThisTurn) this.options.host?.notify?.({ kind: "text_delta", message: "Okay, on it." });
|
|
4855
|
+
if (!this.spokeThisTurn) this.options.host?.notify?.({ kind: "text_delta", message: dispatched ? "Okay, on it." : "Sorry, could you say that again?" });
|
|
4851
4856
|
}
|
|
4852
4857
|
/** One user turn: the voice agent streams the reply (and may Act/Think). Serialized with re-voice turns. */
|
|
4853
4858
|
send(content) {
|
|
@@ -4855,7 +4860,7 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
|
|
|
4855
4860
|
await this.initMemory();
|
|
4856
4861
|
this.resetTurn();
|
|
4857
4862
|
const res = await this.voice.send(content);
|
|
4858
|
-
if (this.
|
|
4863
|
+
if (this.silentTurn) await this.ackIfSilent();
|
|
4859
4864
|
return res;
|
|
4860
4865
|
});
|
|
4861
4866
|
}
|
|
@@ -4900,7 +4905,7 @@ Today's date: ${(/* @__PURE__ */ new Date()).toDateString()}.`;
|
|
|
4900
4905
|
if (!events.length) return;
|
|
4901
4906
|
this.resetTurn();
|
|
4902
4907
|
await this.voice.send(events.join("\n"));
|
|
4903
|
-
if (this.
|
|
4908
|
+
if (this.silentTurn) await this.ackIfSilent();
|
|
4904
4909
|
this.notify("revoice_done", "");
|
|
4905
4910
|
});
|
|
4906
4911
|
}
|