open-agents-ai 0.123.0 → 0.125.0
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/index.js +59 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41534,22 +41534,46 @@ async function handleVoiceMenu(ctx, save, hasLocal) {
|
|
|
41534
41534
|
const currentMode = ctx.voiceGetMode?.() ?? "action";
|
|
41535
41535
|
const currentModel = ctx.voiceGetModel?.() ?? "unknown";
|
|
41536
41536
|
const enabledLabel = isEnabled ? selectColors.green("\u25CF Voice: Enabled") : selectColors.dim("\u25CB Voice: Disabled");
|
|
41537
|
+
const clones = ctx.voiceListClones?.() ?? [];
|
|
41538
|
+
const activeClone = clones.find((c3) => c3.isActive);
|
|
41539
|
+
const cloneStatus = activeClone ? `clone: ${selectColors.cyan(activeClone.name)}` : "no clone active";
|
|
41537
41540
|
const items = [
|
|
41538
41541
|
{ key: "header-status", label: selectColors.dim("\u2500\u2500\u2500 Voice Status \u2500\u2500\u2500") },
|
|
41539
41542
|
{ key: "toggle", label: isEnabled ? "Disable Voice" : "Enable Voice", detail: enabledLabel },
|
|
41543
|
+
{ key: "info-voice", label: selectColors.dim(` Engine: ${currentModel} Mode: ${currentMode} ${cloneStatus}`) },
|
|
41540
41544
|
{ key: "header-config", label: selectColors.dim("\u2500\u2500\u2500 Configuration \u2500\u2500\u2500") },
|
|
41541
41545
|
{ key: "mode", label: "Voice Mode", detail: `${selectColors.green(currentMode)} \u2014 ${modeLabels[currentMode]}` },
|
|
41542
41546
|
{ key: "voice", label: "Change TTS Voice", detail: `current: ${selectColors.green(currentModel)}` },
|
|
41543
41547
|
{ key: "system", label: "Change TTS System", detail: "onnx / mlx / luxtts" },
|
|
41544
41548
|
{ key: "clone", label: "Clone Voice", detail: "drag & drop audio file" },
|
|
41545
|
-
{ key: "list", label: "Manage Clone Voices", detail:
|
|
41549
|
+
{ key: "list", label: "Manage Clone Voices", detail: `${clones.length} clone(s)` },
|
|
41550
|
+
{ key: "header-test", label: selectColors.dim("\u2500\u2500\u2500 Preview \u2500\u2500\u2500") },
|
|
41551
|
+
{ key: "preview", label: "Preview Voice", detail: "speak a random test phrase (or press p)" }
|
|
41546
41552
|
];
|
|
41547
41553
|
const result = await tuiSelect({
|
|
41548
41554
|
items,
|
|
41549
41555
|
title: "Voice Configuration",
|
|
41550
41556
|
rl: ctx.rl,
|
|
41551
41557
|
availableRows: ctx.availableContentRows?.(),
|
|
41552
|
-
skipKeys: ["header-status", "header-config"]
|
|
41558
|
+
skipKeys: ["header-status", "header-config", "info-voice", "header-test"],
|
|
41559
|
+
customKeyHint: " p preview",
|
|
41560
|
+
onCustomKey(item, key, helpers) {
|
|
41561
|
+
if (key === "p" || key === "P") {
|
|
41562
|
+
const testPhrases = [
|
|
41563
|
+
"Testing voice output. The agent is ready to assist you.",
|
|
41564
|
+
"All systems operational. Voice synthesis configured and active.",
|
|
41565
|
+
"Hello! This is your AI coding assistant speaking.",
|
|
41566
|
+
"Voice clone engaged. Ready for the next task.",
|
|
41567
|
+
"Open Agents, powered by open-weight models. No API keys required.",
|
|
41568
|
+
"The distributed cognitive commons awaits your contribution."
|
|
41569
|
+
];
|
|
41570
|
+
const phrase = testPhrases[Math.floor(Math.random() * testPhrases.length)];
|
|
41571
|
+
ctx.voiceSpeak?.(phrase);
|
|
41572
|
+
helpers.done();
|
|
41573
|
+
return true;
|
|
41574
|
+
}
|
|
41575
|
+
return false;
|
|
41576
|
+
}
|
|
41553
41577
|
});
|
|
41554
41578
|
if (!result.confirmed || !result.key)
|
|
41555
41579
|
return;
|
|
@@ -41560,6 +41584,19 @@ async function handleVoiceMenu(ctx, save, hasLocal) {
|
|
|
41560
41584
|
save({ voice: isOn });
|
|
41561
41585
|
continue;
|
|
41562
41586
|
}
|
|
41587
|
+
case "preview": {
|
|
41588
|
+
const testPhrases = [
|
|
41589
|
+
"Testing voice output. The agent is ready to assist you.",
|
|
41590
|
+
"All systems operational. Voice synthesis configured and active.",
|
|
41591
|
+
"Hello! This is your AI coding assistant speaking.",
|
|
41592
|
+
"Voice clone engaged. Ready for the next task.",
|
|
41593
|
+
"Open Agents, powered by open-weight models.",
|
|
41594
|
+
"The distributed cognitive commons awaits."
|
|
41595
|
+
];
|
|
41596
|
+
const phrase = testPhrases[Math.floor(Math.random() * testPhrases.length)];
|
|
41597
|
+
ctx.voiceSpeak?.(phrase);
|
|
41598
|
+
continue;
|
|
41599
|
+
}
|
|
41563
41600
|
case "mode": {
|
|
41564
41601
|
const modeItems = [
|
|
41565
41602
|
{ key: "chat", label: "Chat", detail: "speaks streamed model text at normal pitch" },
|
|
@@ -41569,7 +41606,7 @@ async function handleVoiceMenu(ctx, save, hasLocal) {
|
|
|
41569
41606
|
const modeResult = await tuiSelect({
|
|
41570
41607
|
items: modeItems,
|
|
41571
41608
|
activeKey: currentMode,
|
|
41572
|
-
title: "Voice Mode",
|
|
41609
|
+
title: "Voice \u203A Mode",
|
|
41573
41610
|
rl: ctx.rl,
|
|
41574
41611
|
availableRows: ctx.availableContentRows?.()
|
|
41575
41612
|
});
|
|
@@ -41596,7 +41633,7 @@ async function handleVoiceMenu(ctx, save, hasLocal) {
|
|
|
41596
41633
|
const voiceResult = await tuiSelect({
|
|
41597
41634
|
items: voiceItems,
|
|
41598
41635
|
activeKey: currentModel,
|
|
41599
|
-
title: "
|
|
41636
|
+
title: "Voice \u203A Engine",
|
|
41600
41637
|
rl: ctx.rl,
|
|
41601
41638
|
availableRows: ctx.availableContentRows?.(),
|
|
41602
41639
|
skipKeys: ["header-onnx", "header-mlx", "header-clone"]
|
|
@@ -42426,7 +42463,24 @@ async function handleUpdate(subcommand, ctx) {
|
|
|
42426
42463
|
installError = (stderr || err.message || "").trim();
|
|
42427
42464
|
resolve32(!err);
|
|
42428
42465
|
});
|
|
42429
|
-
child.stdout?.
|
|
42466
|
+
child.stdout?.on("data", (chunk) => {
|
|
42467
|
+
const text = String(chunk);
|
|
42468
|
+
for (const line of text.split("\n")) {
|
|
42469
|
+
if (line.trim()) {
|
|
42470
|
+
process.stdout.write(` ${c2.dim("\u2502")} ${line.trim().slice(0, 70)}
|
|
42471
|
+
`);
|
|
42472
|
+
}
|
|
42473
|
+
}
|
|
42474
|
+
});
|
|
42475
|
+
child.stderr?.on("data", (chunk) => {
|
|
42476
|
+
const text = String(chunk);
|
|
42477
|
+
for (const line of text.split("\n")) {
|
|
42478
|
+
if (line.trim() && !line.includes("npm warn")) {
|
|
42479
|
+
process.stdout.write(` ${c2.dim("\u2502")} ${c2.yellow(line.trim().slice(0, 70))}
|
|
42480
|
+
`);
|
|
42481
|
+
}
|
|
42482
|
+
}
|
|
42483
|
+
});
|
|
42430
42484
|
});
|
|
42431
42485
|
if (needsSudo) {
|
|
42432
42486
|
process.stdout.write("\x1B[?1049l");
|
package/package.json
CHANGED