open-agents-ai 0.138.27 → 0.138.29
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 +64 -12
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -39768,15 +39768,10 @@ if __name__ == '__main__':
|
|
|
39768
39768
|
if (wavData.length > 44) {
|
|
39769
39769
|
const sampleRate = wavData.readUInt32LE(24);
|
|
39770
39770
|
const samples = new Int16Array(wavData.buffer, wavData.byteOffset + 44, (wavData.length - 44) / 2);
|
|
39771
|
-
const fadeInSamples = Math.min(Math.round(sampleRate * 0.
|
|
39771
|
+
const fadeInSamples = Math.min(Math.round(sampleRate * 0.35), samples.length);
|
|
39772
39772
|
for (let i = 0; i < fadeInSamples; i++) {
|
|
39773
39773
|
samples[i] = Math.round(samples[i] * (i / fadeInSamples));
|
|
39774
39774
|
}
|
|
39775
|
-
const fadeOutSamples = Math.min(Math.round(sampleRate * 0.05), samples.length);
|
|
39776
|
-
const fadeOutStart = samples.length - fadeOutSamples;
|
|
39777
|
-
for (let i = 0; i < fadeOutSamples; i++) {
|
|
39778
|
-
samples[fadeOutStart + i] = Math.round(samples[fadeOutStart + i] * (1 - i / fadeOutSamples));
|
|
39779
|
-
}
|
|
39780
39775
|
if (volume !== 1) {
|
|
39781
39776
|
for (let i = 0; i < samples.length; i++) {
|
|
39782
39777
|
samples[i] = Math.round(samples[i] * volume);
|
|
@@ -39834,7 +39829,7 @@ if __name__ == '__main__':
|
|
|
39834
39829
|
}
|
|
39835
39830
|
}
|
|
39836
39831
|
await this.playWav(wavPath);
|
|
39837
|
-
await this.sleep(
|
|
39832
|
+
await this.sleep(150);
|
|
39838
39833
|
try {
|
|
39839
39834
|
unlinkSync8(wavPath);
|
|
39840
39835
|
} catch {
|
|
@@ -41935,7 +41930,7 @@ async function handleVoiceList(ctx, focusFilename) {
|
|
|
41935
41930
|
title: focusFilename ? "Voice Clone References \u2014 Press any key to name your new voice" : "Voice Clone References",
|
|
41936
41931
|
rl: ctx.rl,
|
|
41937
41932
|
availableRows: ctx.availableContentRows?.(),
|
|
41938
|
-
customKeyHint: " e rename p play",
|
|
41933
|
+
customKeyHint: " e rename p play x export i import",
|
|
41939
41934
|
onDelete: (item, done) => {
|
|
41940
41935
|
if (ctx.voiceDeleteClone?.(item.key)) {
|
|
41941
41936
|
done(true);
|
|
@@ -41987,6 +41982,55 @@ async function handleVoiceList(ctx, focusFilename) {
|
|
|
41987
41982
|
});
|
|
41988
41983
|
return true;
|
|
41989
41984
|
}
|
|
41985
|
+
if (key === "x" || key === "X") {
|
|
41986
|
+
const clone = clones.find((cl) => cl.filename === item.key);
|
|
41987
|
+
if (!clone)
|
|
41988
|
+
return false;
|
|
41989
|
+
const { join: pjoin2 } = __require("node:path");
|
|
41990
|
+
const defaultPath = pjoin2(process.cwd(), clone.filename);
|
|
41991
|
+
helpers.getInput("Export to:", defaultPath).then((destPath) => {
|
|
41992
|
+
if (destPath !== null && destPath.trim()) {
|
|
41993
|
+
try {
|
|
41994
|
+
const { copyFileSync: copyFileSync2 } = __require("node:fs");
|
|
41995
|
+
copyFileSync2(clone.path, destPath.trim());
|
|
41996
|
+
renderInfo(`Exported "${clone.name}" \u2192 ${destPath.trim()}`);
|
|
41997
|
+
} catch (err) {
|
|
41998
|
+
renderError(`Export failed: ${err.message}`);
|
|
41999
|
+
}
|
|
42000
|
+
}
|
|
42001
|
+
helpers.render();
|
|
42002
|
+
});
|
|
42003
|
+
return true;
|
|
42004
|
+
}
|
|
42005
|
+
if (key === "i" || key === "I") {
|
|
42006
|
+
helpers.getInput("Import from (file path):").then((srcPath) => {
|
|
42007
|
+
if (srcPath !== null && srcPath.trim()) {
|
|
42008
|
+
const src = srcPath.trim();
|
|
42009
|
+
try {
|
|
42010
|
+
const { existsSync: fe, copyFileSync: cpf, mkdirSync: mkd } = __require("node:fs");
|
|
42011
|
+
const { basename: basename16, join: pjoin } = __require("node:path");
|
|
42012
|
+
if (!fe(src)) {
|
|
42013
|
+
renderError(`File not found: ${src}`);
|
|
42014
|
+
helpers.render();
|
|
42015
|
+
return;
|
|
42016
|
+
}
|
|
42017
|
+
const refsDir = pjoin(__require("node:os").homedir(), ".open-agents", "voice", "clone-refs");
|
|
42018
|
+
mkd(refsDir, { recursive: true });
|
|
42019
|
+
const destName = basename16(src);
|
|
42020
|
+
const dest = pjoin(refsDir, destName);
|
|
42021
|
+
cpf(src, dest);
|
|
42022
|
+
renderInfo(`Imported "${destName}" \u2192 ${dest}`);
|
|
42023
|
+
helpers.done();
|
|
42024
|
+
} catch (err) {
|
|
42025
|
+
renderError(`Import failed: ${err.message}`);
|
|
42026
|
+
helpers.render();
|
|
42027
|
+
}
|
|
42028
|
+
} else {
|
|
42029
|
+
helpers.render();
|
|
42030
|
+
}
|
|
42031
|
+
});
|
|
42032
|
+
return true;
|
|
42033
|
+
}
|
|
41990
42034
|
return false;
|
|
41991
42035
|
}
|
|
41992
42036
|
});
|
|
@@ -50744,7 +50788,8 @@ var init_status_bar = __esm({
|
|
|
50744
50788
|
_processing = false;
|
|
50745
50789
|
_brailleSpinner = new BrailleSpinner();
|
|
50746
50790
|
/** Current dynamic footer height (min 5: buffer + topSep + 1 input line + bottomSep + metrics) */
|
|
50747
|
-
_currentFooterHeight =
|
|
50791
|
+
_currentFooterHeight = 3;
|
|
50792
|
+
// input(1) + braille(1) + metrics(1)
|
|
50748
50793
|
/** Timestamp when streaming started (for token rate calculation) */
|
|
50749
50794
|
_streamStartTime = 0;
|
|
50750
50795
|
/** Current package version (shown in metrics row, rightmost) */
|
|
@@ -53707,8 +53752,10 @@ async function startInteractive(config, repoPath) {
|
|
|
53707
53752
|
streamRenderer.onRenderedLine = (line) => statusBar.bufferContentLine(line);
|
|
53708
53753
|
if (savedSettings.voice) {
|
|
53709
53754
|
if (savedSettings.voiceModel) {
|
|
53710
|
-
voiceEngine.
|
|
53711
|
-
|
|
53755
|
+
voiceEngine.modelId = savedSettings.voiceModel;
|
|
53756
|
+
}
|
|
53757
|
+
if (savedSettings.voiceCloneRef) {
|
|
53758
|
+
voiceEngine.luxttsCloneRef = savedSettings.voiceCloneRef;
|
|
53712
53759
|
}
|
|
53713
53760
|
voiceEngine.toggle().then((msg) => {
|
|
53714
53761
|
if (statusBar?.isActive && !statusBar.isStreaming) {
|
|
@@ -53995,6 +54042,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
53995
54042
|
const prompt = activeTask ? activeTask.runner.isPaused ? pausedPrompt : activePrompt : idlePrompt;
|
|
53996
54043
|
rl.setPrompt(prompt);
|
|
53997
54044
|
if (statusBar.isActive) {
|
|
54045
|
+
statusBar.positionAtInput();
|
|
53998
54046
|
statusBar.setPromptText(prompt, 2);
|
|
53999
54047
|
} else {
|
|
54000
54048
|
rl.prompt();
|
|
@@ -54391,7 +54439,11 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54391
54439
|
voiceEngine.renameCloneRef(filename, newName);
|
|
54392
54440
|
},
|
|
54393
54441
|
voiceSetActiveClone(filename) {
|
|
54394
|
-
|
|
54442
|
+
const msg = voiceEngine.setActiveCloneRef(filename);
|
|
54443
|
+
if (voiceEngine.luxttsCloneRef) {
|
|
54444
|
+
saveGlobalSettings({ voiceCloneRef: voiceEngine.luxttsCloneRef });
|
|
54445
|
+
}
|
|
54446
|
+
return msg;
|
|
54395
54447
|
},
|
|
54396
54448
|
voiceSpeak(text) {
|
|
54397
54449
|
voiceEngine.speak(text);
|
package/package.json
CHANGED