careervivid 2.1.16 โ†’ 2.1.21

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.
@@ -1 +1 @@
1
- {"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/repl.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAA4D,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAS7G,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,GAAE,MAAM,GAAG,IAAW,QAwBtF;AAED,wBAAsB,OAAO,CAC3B,MAAM,EAAE,WAAW,GAAG,sBAAsB,GAAG,IAAI,EACnD,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,EAC9K,gBAAgB,EAAE,WAAW,EAC7B,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,iBAAiB,EAAE,MAAM,EACzB,KAAK,EAAE,GAAG,EAAE,GACX,OAAO,CAAC,IAAI,CAAC,CA6uBf"}
1
+ {"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/repl.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAEzD,OAAO,EAA4D,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAS7G,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,GAAE,MAAM,GAAG,IAAW,QAwBtF;AAED,wBAAsB,OAAO,CAC3B,MAAM,EAAE,WAAW,GAAG,sBAAsB,GAAG,IAAI,EACnD,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,OAAO,CAAA;CAAE,EAC9K,gBAAgB,EAAE,WAAW,EAC7B,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,iBAAiB,EAAE,MAAM,EACzB,KAAK,EAAE,GAAG,EAAE,GACX,OAAO,CAAC,IAAI,CAAC,CAkwBf"}
@@ -142,7 +142,8 @@ export async function askLoop(engine, options, selectedProvider, selectedModel,
142
142
  userInput = lines.join("\n").trim();
143
143
  pasteBuffer = [];
144
144
  }
145
- else if (duration < 150) {
145
+ else if (duration < 150 && !userInput.startsWith("!") && !userInput.startsWith("/")) {
146
+ // Only buffer lines that are NOT commands โ€” fixes ! and / getting swallowed by paste detection
146
147
  pasteBuffer.push(userInput);
147
148
  return ask();
148
149
  }
@@ -196,63 +197,88 @@ export async function askLoop(engine, options, selectedProvider, selectedModel,
196
197
  return ask();
197
198
  }
198
199
  if (cmd === "voice") {
199
- if (arg === "on") {
200
- setVoiceEnabled(true);
201
- console.log(chalk.green(`\n ๐Ÿ”Š Voice enabled (${getCurrentVoice()} ยท ${getCurrentTtsModel()}).\n`));
202
- }
203
- else if (arg === "off") {
204
- setVoiceEnabled(false);
205
- stopPlayback();
206
- console.log(chalk.yellow("\n ๐Ÿ”‡ Voice disabled.\n"));
207
- }
208
- else if (arg === "list-voices" || arg === "voices") {
209
- console.log(chalk.cyan("\n Available voices:"));
210
- for (const v of AVAILABLE_VOICES) {
211
- const active = v === getCurrentVoice() ? chalk.green(" โ† active") : "";
212
- console.log(chalk.dim(` ${v}${active}`));
200
+ // โ”€โ”€ Interactive /voice menu using enquirer selects โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
201
+ if (!arg) {
202
+ // Top-level voice menu
203
+ const status = isVoiceEnabled() ? "on" : "off";
204
+ const topChoice = await prompt({
205
+ type: "select",
206
+ name: "action",
207
+ message: `Voice settings (${chalk.dim(`voice: ${getCurrentVoice()} model: ${getCurrentTtsModel()}`)})`,
208
+ choices: [
209
+ { name: "toggle", message: `${isVoiceEnabled() ? "๐Ÿ”‡ Turn voice off" : "๐Ÿ”Š Turn voice on"}` },
210
+ { name: "set-voice", message: "๐ŸŽต Pick a voice" },
211
+ { name: "set-model", message: "โš™๏ธ Pick a TTS model" },
212
+ { name: "speak", message: "โ–ถ๏ธ Replay last response" },
213
+ { name: "cancel", message: chalk.dim("Cancel") },
214
+ ],
215
+ });
216
+ if (topChoice.action === "toggle") {
217
+ const newState = !isVoiceEnabled();
218
+ setVoiceEnabled(newState);
219
+ if (!newState)
220
+ stopPlayback();
221
+ console.log(newState
222
+ ? chalk.green(`\n ๐Ÿ”Š Voice on (${getCurrentVoice()} ยท ${getCurrentTtsModel()})\n`)
223
+ : chalk.yellow("\n ๐Ÿ”‡ Voice off\n"));
213
224
  }
214
- console.log(chalk.dim("\n Usage: /voice set-voice Puck\n"));
215
- }
216
- else if (arg.startsWith("set-voice ")) {
217
- const name = arg.slice("set-voice ".length).trim();
218
- const match = AVAILABLE_VOICES.find(v => v.toLowerCase() === name.toLowerCase());
219
- if (!match) {
220
- console.log(chalk.red(`\n Unknown voice: "${name}". Run /voice list-voices to see options.\n`));
225
+ else if (topChoice.action === "set-voice") {
226
+ const voiceChoice = await prompt({
227
+ type: "select",
228
+ name: "voice",
229
+ message: "Choose a voice:",
230
+ choices: AVAILABLE_VOICES.map(v => ({
231
+ name: v,
232
+ message: v === getCurrentVoice() ? chalk.green(`${v} โ† active`) : v,
233
+ })),
234
+ });
235
+ setCurrentVoice(voiceChoice.voice);
236
+ console.log(chalk.green(`\n ๐ŸŽต Voice set to ${chalk.bold(voiceChoice.voice)}\n`));
221
237
  }
222
- else {
223
- setCurrentVoice(match);
224
- console.log(chalk.green(`\n ๐ŸŽต Voice set to ${chalk.bold(match)}.\n`));
238
+ else if (topChoice.action === "set-model") {
239
+ const modelLabels = {
240
+ "gemini-3.1-flash-preview-tts": "Gemini 3.1 Flash (latest, fast)",
241
+ "gemini-3.1-pro-preview-tts": "Gemini 3.1 Pro (latest, highest quality)",
242
+ "gemini-2.5-flash-preview-tts": "Gemini 2.5 Flash (previous gen, fast)",
243
+ "gemini-2.5-pro-preview-tts": "Gemini 2.5 Pro (previous gen, high quality)",
244
+ };
245
+ const modelChoice = await prompt({
246
+ type: "select",
247
+ name: "model",
248
+ message: "Choose a TTS model:",
249
+ choices: AVAILABLE_TTS_MODELS.map(m => ({
250
+ name: m,
251
+ message: m === getCurrentTtsModel()
252
+ ? chalk.green(`${modelLabels[m] ?? m} โ† active`)
253
+ : (modelLabels[m] ?? m),
254
+ })),
255
+ });
256
+ setCurrentTtsModel(modelChoice.model);
257
+ console.log(chalk.green(`\n โš™๏ธ TTS model set to ${chalk.bold(modelChoice.model)}\n`));
225
258
  }
226
- }
227
- else if (arg === "list-models" || arg === "models") {
228
- console.log(chalk.cyan("\n Available TTS models:"));
229
- for (const m of AVAILABLE_TTS_MODELS) {
230
- const active = m === getCurrentTtsModel() ? chalk.green(" โ† active") : "";
231
- console.log(chalk.dim(` ${m}${active}`));
259
+ else if (topChoice.action === "speak") {
260
+ const last = getLastResponse();
261
+ if (!last) {
262
+ console.log(chalk.dim("\n Nothing to speak yet.\n"));
263
+ }
264
+ else {
265
+ speakText(last).catch(() => { });
266
+ console.log(chalk.dim("\n ๐Ÿ”Š Speaking...\n"));
267
+ }
232
268
  }
233
- console.log(chalk.dim("\n Usage: /voice set-model gemini-2.5-pro-preview-tts\n"));
234
269
  }
235
- else if (arg.startsWith("set-model ")) {
236
- const name = arg.slice("set-model ".length).trim();
237
- const match = AVAILABLE_TTS_MODELS.find(m => m === name);
238
- if (!match) {
239
- console.log(chalk.red(`\n Unknown model: "${name}". Run /voice list-models to see options.\n`));
270
+ else {
271
+ // Still support direct text subcommands for scripting: /voice on, /voice off
272
+ if (arg === "on") {
273
+ setVoiceEnabled(true);
274
+ console.log(chalk.green(`\n ๐Ÿ”Š Voice on (${getCurrentVoice()} ยท ${getCurrentTtsModel()})\n`));
240
275
  }
241
- else {
242
- setCurrentTtsModel(match);
243
- console.log(chalk.green(`\n โš™๏ธ TTS model set to ${chalk.bold(match)}.\n`));
276
+ if (arg === "off") {
277
+ setVoiceEnabled(false);
278
+ stopPlayback();
279
+ console.log(chalk.yellow("\n ๐Ÿ”‡ Voice off\n"));
244
280
  }
245
281
  }
246
- else {
247
- const status = isVoiceEnabled() ? chalk.green("on") : chalk.yellow("off");
248
- console.log(chalk.dim(`\n Voice is ${status} ยท Voice: ${chalk.white(getCurrentVoice())} ยท Model: ${chalk.white(getCurrentTtsModel())}`));
249
- console.log(chalk.dim("\n Commands:"));
250
- console.log(chalk.dim(" /voice on | off"));
251
- console.log(chalk.dim(" /voice set-voice <name> e.g. /voice set-voice Puck"));
252
- console.log(chalk.dim(" /voice list-voices"));
253
- console.log(chalk.dim(" /voice set-model <name> e.g. /voice set-model gemini-2.5-pro-preview-tts"));
254
- console.log(chalk.dim(" /voice list-models\n"));
255
- }
256
282
  return ask();
257
283
  }
258
284
  if (cmd === "speak") {
package/dist/lib/tts.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  * Replay: /speak
10
10
  */
11
11
  export declare const AVAILABLE_VOICES: readonly ["Zephyr", "Puck", "Charon", "Kore", "Fenrir", "Aoede", "Orbit", "Stellar", "Leda", "Orus"];
12
- export declare const AVAILABLE_TTS_MODELS: readonly ["gemini-2.5-flash-preview-tts", "gemini-2.5-pro-preview-tts"];
12
+ export declare const AVAILABLE_TTS_MODELS: readonly ["gemini-3.1-flash-preview-tts", "gemini-3.1-pro-preview-tts", "gemini-2.5-flash-preview-tts", "gemini-2.5-pro-preview-tts"];
13
13
  export declare function isVoiceEnabled(): boolean;
14
14
  export declare function setVoiceEnabled(on: boolean): void;
15
15
  export declare function setLastResponse(text: string): void;
@@ -1 +1 @@
1
- {"version":3,"file":"tts.d.ts","sourceRoot":"","sources":["../../src/lib/tts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAgBH,eAAO,MAAM,gBAAgB,sGAWnB,CAAC;AAEX,eAAO,MAAM,oBAAoB,yEAGvB,CAAC;AAYX,wBAAgB,cAAc,YAA2B;AACzD,wBAAgB,eAAe,CAAC,EAAE,EAAE,OAAO,QAAwB;AACnE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,QAA0B;AACtE,wBAAgB,eAAe,WAA2B;AAC1D,wBAAgB,eAAe,WAA2B;AAC1D,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,QAAuB;AAChE,wBAAgB,kBAAkB,WAA8B;AAChE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,QAA0B;AA8BtE,wBAAgB,YAAY,SAK3B;AA2DD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuDhF"}
1
+ {"version":3,"file":"tts.d.ts","sourceRoot":"","sources":["../../src/lib/tts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAgBH,eAAO,MAAM,gBAAgB,sGAWnB,CAAC;AAEX,eAAO,MAAM,oBAAoB,uIAKvB,CAAC;AAYX,wBAAgB,cAAc,YAA2B;AACzD,wBAAgB,eAAe,CAAC,EAAE,EAAE,OAAO,QAAwB;AACnE,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,QAA0B;AACtE,wBAAgB,eAAe,WAA2B;AAC1D,wBAAgB,eAAe,WAA2B;AAC1D,wBAAgB,eAAe,CAAC,CAAC,EAAE,MAAM,QAAuB;AAChE,wBAAgB,kBAAkB,WAA8B;AAChE,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,QAA0B;AA8BtE,wBAAgB,YAAY,SAK3B;AA2DD;;;GAGG;AACH,wBAAsB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuDhF"}
package/dist/lib/tts.js CHANGED
@@ -32,15 +32,17 @@ export const AVAILABLE_VOICES = [
32
32
  "Orus", // Confident, authoritative
33
33
  ];
34
34
  export const AVAILABLE_TTS_MODELS = [
35
- "gemini-2.5-flash-preview-tts", // Fast, efficient (default)
36
- "gemini-2.5-pro-preview-tts", // Higher quality, slower
35
+ "gemini-3.1-flash-preview-tts", // Latest, fast (default)
36
+ "gemini-3.1-pro-preview-tts", // Latest, highest quality
37
+ "gemini-2.5-flash-preview-tts", // Previous gen, fast
38
+ "gemini-2.5-pro-preview-tts", // Previous gen, high quality
37
39
  ];
38
40
  // โ”€โ”€ State โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
39
41
  let voiceEnabled = false;
40
42
  let lastResponse = "";
41
43
  let playbackProcess = null;
42
44
  let currentVoice = "Zephyr";
43
- let currentTtsModel = "gemini-2.5-flash-preview-tts";
45
+ let currentTtsModel = "gemini-3.1-flash-preview-tts";
44
46
  // Cache the Gemini key for the session so we don't hit the endpoint every turn
45
47
  let cachedGeminiKey = null;
46
48
  export function isVoiceEnabled() { return voiceEnabled; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "careervivid",
3
- "version": "2.1.16",
3
+ "version": "2.1.21",
4
4
  "description": "Official CLI for CareerVivid โ€” AI voice interviews, autonomous job applications, resume editing, and portfolio publishing from your terminal",
5
5
  "type": "module",
6
6
  "bin": {