@livx.cc/agentx 0.99.1 → 0.99.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 +65 -11
- package/dist/cli.js.map +1 -1
- package/dist/index.js +21 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -3528,6 +3528,7 @@ var Agent = class _Agent {
|
|
|
3528
3528
|
let res;
|
|
3529
3529
|
const sent = this.trimContext();
|
|
3530
3530
|
const frag = reasoningToChatFragment(o.model, o.reasoning);
|
|
3531
|
+
const sentTools = o.model.startsWith("claude-code/") ? [] : wireTools;
|
|
3531
3532
|
const isCursorWithTools = o.model.startsWith("cursor/") && wireTools.length > 0;
|
|
3532
3533
|
const cursorPo = isCursorWithTools ? {
|
|
3533
3534
|
toolExecutor: async (name, args) => {
|
|
@@ -3545,10 +3546,10 @@ var Agent = class _Agent {
|
|
|
3545
3546
|
for (let attempt = 0; ; attempt++) {
|
|
3546
3547
|
try {
|
|
3547
3548
|
if (useStream) {
|
|
3548
|
-
const r = await o.ai.chat({ model: o.model, messages: sent, tools:
|
|
3549
|
+
const r = await o.ai.chat({ model: o.model, messages: sent, tools: sentTools, stream: true, signal: o.signal, ...o.toolChoice ? { toolChoice: o.toolChoice } : {}, ...reasonOpts });
|
|
3549
3550
|
res = await this.consumeStream(r);
|
|
3550
3551
|
} else {
|
|
3551
|
-
const r = await o.ai.chat({ model: o.model, messages: sent, tools:
|
|
3552
|
+
const r = await o.ai.chat({ model: o.model, messages: sent, tools: sentTools, stream: false, signal: o.signal, ...o.toolChoice ? { toolChoice: o.toolChoice } : {}, ...reasonOpts });
|
|
3552
3553
|
res = r;
|
|
3553
3554
|
}
|
|
3554
3555
|
break;
|
|
@@ -4742,7 +4743,21 @@ var EMOTIONS = [
|
|
|
4742
4743
|
"confident",
|
|
4743
4744
|
"skeptical",
|
|
4744
4745
|
"contemplative",
|
|
4745
|
-
"determined"
|
|
4746
|
+
"determined",
|
|
4747
|
+
// remaining sonic-3 vocabulary — without these a valid model tag would be DROPPED (flat delivery).
|
|
4748
|
+
"joking",
|
|
4749
|
+
"trust",
|
|
4750
|
+
"anticipation",
|
|
4751
|
+
"outraged",
|
|
4752
|
+
"threatened",
|
|
4753
|
+
"contempt",
|
|
4754
|
+
"envious",
|
|
4755
|
+
"dejected",
|
|
4756
|
+
"rejected",
|
|
4757
|
+
"wistful",
|
|
4758
|
+
"insecure",
|
|
4759
|
+
"resigned",
|
|
4760
|
+
"distant"
|
|
4746
4761
|
];
|
|
4747
4762
|
var VALID = new Set(EMOTIONS);
|
|
4748
4763
|
var ALIASES = {
|
|
@@ -4787,7 +4802,9 @@ var ALIASES = {
|
|
|
4787
4802
|
peaceful: "calm",
|
|
4788
4803
|
serene: "calm",
|
|
4789
4804
|
relaxed: "calm",
|
|
4790
|
-
sleepy: "tired"
|
|
4805
|
+
sleepy: "tired",
|
|
4806
|
+
comedic: "joking"
|
|
4807
|
+
// Cartesia lists "joking/comedic" as one — canonicalize to joking
|
|
4791
4808
|
};
|
|
4792
4809
|
var NONVERBAL = { laughter: "laughter", laughs: "laughter", laugh: "laughter", laughing: "laughter" };
|
|
4793
4810
|
function normalizeEmotion(raw) {
|