agentvibes 2.15.0-alpha.2 → 2.15.0-alpha.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/package.json +1 -1
- package/src/installer.js +30 -15
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "agentvibes",
|
|
4
|
-
"version": "2.15.0-alpha.
|
|
4
|
+
"version": "2.15.0-alpha.3",
|
|
5
5
|
"description": "Now your AI Agents can finally talk back! Professional TTS voice for Claude Code and Claude Desktop (via MCP) with multi-provider support.",
|
|
6
6
|
"homepage": "https://agentvibes.org",
|
|
7
7
|
"keywords": [
|
package/src/installer.js
CHANGED
|
@@ -45,7 +45,7 @@ import { program } from 'commander';
|
|
|
45
45
|
import path from 'node:path';
|
|
46
46
|
import fs from 'node:fs/promises';
|
|
47
47
|
import fsSync from 'node:fs';
|
|
48
|
-
import { execSync, execFileSync } from 'node:child_process';
|
|
48
|
+
import { execSync, execFileSync, spawn } from 'node:child_process';
|
|
49
49
|
import chalk from 'chalk';
|
|
50
50
|
import inquirer from 'inquirer';
|
|
51
51
|
import figlet from 'figlet';
|
|
@@ -162,16 +162,26 @@ function showReleaseInfo() {
|
|
|
162
162
|
* @param {string} targetDir - Installation directory
|
|
163
163
|
* @param {object} spinner - ora spinner instance
|
|
164
164
|
*/
|
|
165
|
-
async function playWelcomeDemo(targetDir, spinner) {
|
|
165
|
+
async function playWelcomeDemo(targetDir, spinner, options = {}) {
|
|
166
|
+
// Skip welcome demo if --yes flag is used (non-interactive install)
|
|
167
|
+
if (options.yes) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
|
|
166
171
|
// Check if we have audio player
|
|
167
|
-
let
|
|
172
|
+
let audioPlayer = null;
|
|
168
173
|
|
|
169
174
|
try {
|
|
170
|
-
execSync('which mpv 2>/dev/null
|
|
171
|
-
|
|
172
|
-
} catch {
|
|
175
|
+
execSync('which mpv 2>/dev/null', { stdio: 'pipe' });
|
|
176
|
+
audioPlayer = 'mpv';
|
|
177
|
+
} catch {
|
|
178
|
+
try {
|
|
179
|
+
execSync('which afplay 2>/dev/null', { stdio: 'pipe' });
|
|
180
|
+
audioPlayer = 'afplay';
|
|
181
|
+
} catch {}
|
|
182
|
+
}
|
|
173
183
|
|
|
174
|
-
if (!
|
|
184
|
+
if (!audioPlayer) {
|
|
175
185
|
console.log(chalk.gray('\n (Welcome demo skipped - requires mpv or afplay)'));
|
|
176
186
|
return;
|
|
177
187
|
}
|
|
@@ -218,20 +228,25 @@ We hope you have fun with Agent Vibes! Please consider giving us a GitHub star.
|
|
|
218
228
|
titleAlignment: 'center'
|
|
219
229
|
}));
|
|
220
230
|
|
|
221
|
-
|
|
231
|
+
console.log(chalk.cyan('🎵 Playing welcome demo in background...\n'));
|
|
222
232
|
|
|
223
233
|
try {
|
|
224
|
-
// Play the
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
234
|
+
// Play the audio in the background (non-blocking)
|
|
235
|
+
const args = audioPlayer === 'mpv'
|
|
236
|
+
? ['--no-video', '--really-quiet', welcomeDemoAudio]
|
|
237
|
+
: [welcomeDemoAudio];
|
|
238
|
+
|
|
239
|
+
const audioProcess = spawn(audioPlayer, args, {
|
|
240
|
+
detached: true,
|
|
241
|
+
stdio: 'ignore'
|
|
228
242
|
});
|
|
229
243
|
|
|
230
|
-
|
|
244
|
+
// Detach the process so it continues running after parent exits
|
|
245
|
+
audioProcess.unref();
|
|
231
246
|
|
|
232
247
|
} catch (error) {
|
|
233
|
-
spinner.info(chalk.gray('Welcome demo skipped'));
|
|
234
248
|
// Silent fail - demo is optional
|
|
249
|
+
console.log(chalk.gray(' (Welcome demo skipped)'));
|
|
235
250
|
}
|
|
236
251
|
}
|
|
237
252
|
|
|
@@ -2006,7 +2021,7 @@ async function install(options = {}) {
|
|
|
2006
2021
|
console.log(chalk.gray(' via SessionStart hook - no additional setup needed!\n'));
|
|
2007
2022
|
|
|
2008
2023
|
// Play welcome demo with harpsichord intro and reverb voice
|
|
2009
|
-
await playWelcomeDemo(targetDir, spinner);
|
|
2024
|
+
await playWelcomeDemo(targetDir, spinner, options);
|
|
2010
2025
|
|
|
2011
2026
|
console.log(chalk.cyan('🎤 Try these commands:'));
|
|
2012
2027
|
console.log(chalk.white(' • /agent-vibes:list') + chalk.gray(' - See all available voices'));
|