careervivid 2.1.33 → 2.1.38
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/agent/tools/browser.js +2 -2
- package/dist/agent/tools/jobs.js +2 -2
- package/dist/commands/agent/configurator.d.ts.map +1 -1
- package/dist/commands/agent/configurator.js +9 -10
- package/dist/commands/agent/index.js +4 -4
- package/dist/commands/agent/repl.d.ts.map +1 -1
- package/dist/commands/agent/repl.js +1 -3
- package/dist/commands/interview.d.ts.map +1 -1
- package/dist/commands/interview.js +25 -4
- package/package.json +1 -1
|
@@ -540,7 +540,7 @@ Example: "Go to https://jobs.example.com/apply and fill out the application form
|
|
|
540
540
|
},
|
|
541
541
|
model: {
|
|
542
542
|
type: Type.STRING,
|
|
543
|
-
description: "Optional. Gemini model to use. Default: gemini-
|
|
543
|
+
description: "Optional. Gemini model to use. Default: gemini-1.5-flash. Use gemini-1.5-pro for extremely complex forms.",
|
|
544
544
|
},
|
|
545
545
|
},
|
|
546
546
|
required: ["task"],
|
|
@@ -570,7 +570,7 @@ Example: "Go to https://jobs.example.com/apply and fill out the application form
|
|
|
570
570
|
// For the agent tool, default to using the active LLM config from cv agent session
|
|
571
571
|
const llmConfig = {
|
|
572
572
|
provider: llmCfg.provider,
|
|
573
|
-
model: args.model || llmCfg.model || "gemini-
|
|
573
|
+
model: args.model || llmCfg.model || "gemini-1.5-flash",
|
|
574
574
|
apiKey: llmCfg.apiKey || cfg.geminiKey || getGeminiKey() || process.env.GEMINI_API_KEY || "",
|
|
575
575
|
baseUrl: llmCfg.baseUrl,
|
|
576
576
|
};
|
package/dist/agent/tools/jobs.js
CHANGED
|
@@ -466,7 +466,7 @@ IMPORTANT: Always confirm with the user before calling this tool — applying to
|
|
|
466
466
|
},
|
|
467
467
|
model: {
|
|
468
468
|
type: Type.STRING,
|
|
469
|
-
description: "Optional. Gemini model to use for the browser-use agent. Default: gemini-
|
|
469
|
+
description: "Optional. Gemini model to use for the browser-use agent. Default: gemini-1.5-flash.",
|
|
470
470
|
},
|
|
471
471
|
},
|
|
472
472
|
required: ["job_url"],
|
|
@@ -558,7 +558,7 @@ FILLING RULES:
|
|
|
558
558
|
const sessionBaseUrl = process.env.CV_SESSION_LLM_BASE_URL;
|
|
559
559
|
const llmConfig = {
|
|
560
560
|
provider: sessionProvider ?? llmCfg.provider,
|
|
561
|
-
model: args.model || sessionModel || llmCfg.model || "gemini-
|
|
561
|
+
model: args.model || sessionModel || llmCfg.model || "gemini-1.5-flash",
|
|
562
562
|
apiKey: sessionApiKey || llmCfg.apiKey || cfg.geminiKey || cfg.llmApiKey || getGeminiKey() || process.env.GOOGLE_API_KEY || process.env.GEMINI_API_KEY || "",
|
|
563
563
|
baseUrl: sessionBaseUrl || llmCfg.baseUrl,
|
|
564
564
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configurator.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/configurator.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0D,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI3G,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"configurator.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/configurator.ts"],"names":[],"mappings":"AAEA,OAAO,EAA0D,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI3G,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIpD,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;GAmBrB,CAAC;AAEF,eAAO,MAAM,UAAU;;;;;GA+BtB,CAAC;AAEF,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAsEpD;AAED,wBAAsB,mBAAmB,CAAC,OAAO,GAAE,GAAQ,GAAG,OAAO,CAAC;IACpE,gBAAgB,EAAE,WAAW,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAiKD"}
|
|
@@ -3,27 +3,26 @@ import pkg from "enquirer";
|
|
|
3
3
|
import { loadConfig, saveConfig, setProviderKey, getProviderKey } from "../../config.js";
|
|
4
4
|
const { prompt } = pkg;
|
|
5
5
|
export const MODEL_CREDIT_COST = {
|
|
6
|
-
"gemini-2.
|
|
7
|
-
"gemini-
|
|
8
|
-
"gemini-2.
|
|
9
|
-
"gemini-1.5-pro": 2,
|
|
6
|
+
"gemini-2.5-flash-lite": 0.5,
|
|
7
|
+
"gemini-2.5-flash": 1,
|
|
8
|
+
"gemini-2.5-pro": 2,
|
|
10
9
|
};
|
|
11
10
|
export const CV_MODELS = [
|
|
12
11
|
{
|
|
13
|
-
name: `⚡ gemini-2.
|
|
14
|
-
value: "gemini-2.
|
|
12
|
+
name: `⚡ gemini-2.5-flash ${chalk.gray("[1 credit/turn — default]")}`,
|
|
13
|
+
value: "gemini-2.5-flash",
|
|
15
14
|
cost: 1,
|
|
16
15
|
careerVivid: true,
|
|
17
16
|
},
|
|
18
17
|
{
|
|
19
|
-
name: `🚀 gemini-2.
|
|
20
|
-
value: "gemini-2.
|
|
18
|
+
name: `🚀 gemini-2.5-flash-lite ${chalk.gray("[0.5 credit/turn — fastest]")}`,
|
|
19
|
+
value: "gemini-2.5-flash-lite",
|
|
21
20
|
cost: 0.5,
|
|
22
21
|
careerVivid: true,
|
|
23
22
|
},
|
|
24
23
|
{
|
|
25
|
-
name: `🧠 gemini-
|
|
26
|
-
value: "gemini-
|
|
24
|
+
name: `🧠 gemini-2.5-pro ${chalk.gray("[2 credits/turn — deep reasoning]")}`,
|
|
25
|
+
value: "gemini-2.5-pro",
|
|
27
26
|
cost: 2,
|
|
28
27
|
careerVivid: true,
|
|
29
28
|
},
|
|
@@ -15,8 +15,8 @@ export function registerAgentCommand(program) {
|
|
|
15
15
|
.option("--coding", "Enable full coding tool suite (file I/O, shell, search).")
|
|
16
16
|
.option("--resume", "Add resume tools — load and discuss your CareerVivid resume.")
|
|
17
17
|
.option("--jobs", "Add job-hunting tools (default — enabled automatically).")
|
|
18
|
-
.option("--flash", "Use gemini-2.
|
|
19
|
-
.option("--pro", "Use gemini-
|
|
18
|
+
.option("--flash", "Use gemini-2.5-flash (fast, 1 credit/turn).")
|
|
19
|
+
.option("--pro", "Use gemini-2.5-pro (recommended for complex tasks).")
|
|
20
20
|
.option("--think <budget>", "Enable Gemini thinking mode with the given token budget (e.g. 8192).", parseInt)
|
|
21
21
|
.option("--verbose", "Show thinking tokens in the output (requires --think or --pro).")
|
|
22
22
|
.option("--project <id>", "GCP project ID for Vertex AI mode (uses gcloud ADC, no API key needed).")
|
|
@@ -55,12 +55,12 @@ export function registerAgentCommand(program) {
|
|
|
55
55
|
let thinkingBudget;
|
|
56
56
|
let selectedProvider;
|
|
57
57
|
if (isPro) {
|
|
58
|
-
selectedModel = "gemini-
|
|
58
|
+
selectedModel = "gemini-2.5-pro";
|
|
59
59
|
thinkingBudget = options.think ?? 0;
|
|
60
60
|
selectedProvider = "careervivid";
|
|
61
61
|
}
|
|
62
62
|
else if (isFlash) {
|
|
63
|
-
selectedModel = "gemini-2.
|
|
63
|
+
selectedModel = "gemini-2.5-flash";
|
|
64
64
|
thinkingBudget = 0;
|
|
65
65
|
selectedProvider = "careervivid";
|
|
66
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/repl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAUvD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,GAAE,MAAM,GAAG,IAAW,
|
|
1
|
+
{"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../../../src/commands/agent/repl.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,EAAE,sBAAsB,EAAE,MAAM,uCAAuC,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAInD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAUvD,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,GAAE,MAAM,GAAG,IAAW,QAoBtF;AA+DD,wBAAsB,OAAO,CAC3B,MAAM,EAAE,WAAW,GAAG,sBAAsB,GAAG,IAAI,EACnD,OAAO,EAAE;IACP,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,EACD,gBAAgB,EAAE,WAAW,EAC7B,aAAa,EAAE,MAAM,EACrB,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,iBAAiB,EAAE,MAAM,EACzB,KAAK,EAAE,GAAG,EAAE,EACZ,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,IAAI,CAAC,CA4Kf"}
|
|
@@ -34,9 +34,7 @@ export function printCreditStatus(remaining, limit = null) {
|
|
|
34
34
|
}
|
|
35
35
|
else if (remaining < 10 || pct < 0.05) {
|
|
36
36
|
console.log(chalk.yellow(`\n💳 Credits remaining: ${remaining} ⚠️ Running low`));
|
|
37
|
-
|
|
38
|
-
console.log(chalk.dim(" 💡 Tip: Switch to gemini-3.1-flash-lite-preview (0.5 cr/turn) to stretch your budget."));
|
|
39
|
-
}
|
|
37
|
+
console.log(chalk.dim(" 💡 Tip: Switch to gemini-1.5-flash (0.5 cr/turn) to stretch your budget."));
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
// ── 401 error handler ─────────────────────────────────────────────────────────
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interview.d.ts","sourceRoot":"","sources":["../../src/commands/interview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"interview.d.ts","sourceRoot":"","sources":["../../src/commands/interview.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAu2BpC,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAmG/D"}
|
|
@@ -51,7 +51,7 @@ const CLI_BILL_URL = process.env.CV_FUNCTIONS_URL
|
|
|
51
51
|
const CLI_CONTEXT_URL = process.env.CV_FUNCTIONS_URL
|
|
52
52
|
? `${process.env.CV_FUNCTIONS_URL}/cliGetInterviewContext`
|
|
53
53
|
: "https://us-west1-jastalk-firebase.cloudfunctions.net/cliGetInterviewContext";
|
|
54
|
-
const LIVE_MODEL = "gemini-
|
|
54
|
+
const LIVE_MODEL = "gemini-live-2.5-flash-native-audio";
|
|
55
55
|
const FEEDBACK_MODEL = "gemini-2.5-flash";
|
|
56
56
|
const END_TOKEN = "<END_INTERVIEW>";
|
|
57
57
|
const WRAP_WIDTH = 80;
|
|
@@ -410,6 +410,10 @@ async function runVoiceSession(opts) {
|
|
|
410
410
|
// (outputBuf never contains END_TOKEN because chunkClean strips it, so the
|
|
411
411
|
// turnComplete check on outputBuf would never fire without this flag.)
|
|
412
412
|
let endTokenSeen = false;
|
|
413
|
+
// Track audio bytes sent to speaker this turn to calculate mute duration
|
|
414
|
+
// 24kHz, 16-bit mono = 48000 bytes/second of playback
|
|
415
|
+
const SPEAKER_BYTES_PER_SEC = RECV_SAMPLE_RATE * 2; // 48000
|
|
416
|
+
let pendingAudioBytes = 0;
|
|
413
417
|
// ── Audio processes ──────────────────────────────────────────────────
|
|
414
418
|
const micProc = startMic(soxPath);
|
|
415
419
|
const speakerProc = startSpeaker(soxPath);
|
|
@@ -454,6 +458,7 @@ async function runVoiceSession(opts) {
|
|
|
454
458
|
muteTimer = null;
|
|
455
459
|
}
|
|
456
460
|
const pcmBuf = Buffer.from(audioPart, "base64");
|
|
461
|
+
pendingAudioBytes += pcmBuf.length;
|
|
457
462
|
speakerProc.stdin.write(pcmBuf);
|
|
458
463
|
}
|
|
459
464
|
// ── Output transcription (Vivid's words) — stream in real-time ──
|
|
@@ -535,15 +540,22 @@ async function runVoiceSession(opts) {
|
|
|
535
540
|
inputBuf = "";
|
|
536
541
|
}
|
|
537
542
|
if (!ended) {
|
|
543
|
+
// Calculate exactly how long the buffered audio will take to play.
|
|
544
|
+
// Show "Listening..." and unmute the mic together when playback ends.
|
|
545
|
+
const playbackMs = Math.ceil((pendingAudioBytes / SPEAKER_BYTES_PER_SEC) * 1000);
|
|
546
|
+
const muteMs = Math.max(playbackMs, 800); // minimum 800ms floor
|
|
547
|
+
pendingAudioBytes = 0;
|
|
538
548
|
muteTimer = setTimeout(() => {
|
|
539
549
|
vividSpeaking = false;
|
|
540
550
|
muteTimer = null;
|
|
551
|
+
// Show "Listening..." right as audio finishes playing
|
|
541
552
|
if (!userSpeechLineActive) {
|
|
542
553
|
process.stdout.write(chalk.green("\n ● Listening...\r"));
|
|
543
554
|
}
|
|
544
|
-
},
|
|
555
|
+
}, muteMs);
|
|
545
556
|
}
|
|
546
557
|
else {
|
|
558
|
+
pendingAudioBytes = 0;
|
|
547
559
|
// Interview ended via END_TOKEN — cancel pending mute timer
|
|
548
560
|
// so '● Listening...' never appears after the interview concludes
|
|
549
561
|
if (muteTimer) {
|
|
@@ -554,10 +566,19 @@ async function runVoiceSession(opts) {
|
|
|
554
566
|
}
|
|
555
567
|
},
|
|
556
568
|
onerror: (e) => {
|
|
557
|
-
|
|
569
|
+
const msg = e?.message ?? JSON.stringify(e) ?? "Unknown error";
|
|
570
|
+
console.log(chalk.red(`\n ❌ Live API connection error: ${msg}`));
|
|
571
|
+
console.log(chalk.dim(` Model: ${LIVE_MODEL} | Location: ${location}`));
|
|
572
|
+
ended = true;
|
|
573
|
+
},
|
|
574
|
+
onclose: (e) => {
|
|
575
|
+
if (!ended) {
|
|
576
|
+
const reason = e?.reason ?? e?.code ?? "unexpected close";
|
|
577
|
+
console.log(chalk.yellow(`\n ⚠️ Live API session closed unexpectedly: ${reason}`));
|
|
578
|
+
console.log(chalk.dim(` Model: ${LIVE_MODEL} | Location: ${location}`));
|
|
579
|
+
}
|
|
558
580
|
ended = true;
|
|
559
581
|
},
|
|
560
|
-
onclose: () => { ended = true; },
|
|
561
582
|
},
|
|
562
583
|
config: {
|
|
563
584
|
responseModalities: [Modality.AUDIO],
|
package/package.json
CHANGED