@holdyourvoice/hyv 2.8.4 → 2.8.5

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 CHANGED
@@ -4381,14 +4381,14 @@ var require_templates = __commonJS({
4381
4381
  }
4382
4382
  return results;
4383
4383
  }
4384
- function buildStyle(chalk32, styles) {
4384
+ function buildStyle(chalk31, styles) {
4385
4385
  const enabled = {};
4386
4386
  for (const layer of styles) {
4387
4387
  for (const style of layer.styles) {
4388
4388
  enabled[style[0]] = layer.inverse ? null : style.slice(1);
4389
4389
  }
4390
4390
  }
4391
- let current = chalk32;
4391
+ let current = chalk31;
4392
4392
  for (const [styleName, styles2] of Object.entries(enabled)) {
4393
4393
  if (!Array.isArray(styles2)) {
4394
4394
  continue;
@@ -4400,7 +4400,7 @@ var require_templates = __commonJS({
4400
4400
  }
4401
4401
  return current;
4402
4402
  }
4403
- module2.exports = (chalk32, temporary) => {
4403
+ module2.exports = (chalk31, temporary) => {
4404
4404
  const styles = [];
4405
4405
  const chunks = [];
4406
4406
  let chunk = [];
@@ -4410,13 +4410,13 @@ var require_templates = __commonJS({
4410
4410
  } else if (style) {
4411
4411
  const string = chunk.join("");
4412
4412
  chunk = [];
4413
- chunks.push(styles.length === 0 ? string : buildStyle(chalk32, styles)(string));
4413
+ chunks.push(styles.length === 0 ? string : buildStyle(chalk31, styles)(string));
4414
4414
  styles.push({ inverse, styles: parseStyle(style) });
4415
4415
  } else if (close) {
4416
4416
  if (styles.length === 0) {
4417
4417
  throw new Error("Found extraneous } in Chalk template literal");
4418
4418
  }
4419
- chunks.push(buildStyle(chalk32, styles)(chunk.join("")));
4419
+ chunks.push(buildStyle(chalk31, styles)(chunk.join("")));
4420
4420
  chunk = [];
4421
4421
  styles.pop();
4422
4422
  } else {
@@ -4464,16 +4464,16 @@ var require_source = __commonJS({
4464
4464
  }
4465
4465
  };
4466
4466
  var chalkFactory = (options) => {
4467
- const chalk33 = {};
4468
- applyOptions(chalk33, options);
4469
- chalk33.template = (...arguments_) => chalkTag(chalk33.template, ...arguments_);
4470
- Object.setPrototypeOf(chalk33, Chalk.prototype);
4471
- Object.setPrototypeOf(chalk33.template, chalk33);
4472
- chalk33.template.constructor = () => {
4467
+ const chalk32 = {};
4468
+ applyOptions(chalk32, options);
4469
+ chalk32.template = (...arguments_) => chalkTag(chalk32.template, ...arguments_);
4470
+ Object.setPrototypeOf(chalk32, Chalk.prototype);
4471
+ Object.setPrototypeOf(chalk32.template, chalk32);
4472
+ chalk32.template.constructor = () => {
4473
4473
  throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.");
4474
4474
  };
4475
- chalk33.template.Instance = ChalkClass;
4476
- return chalk33.template;
4475
+ chalk32.template.Instance = ChalkClass;
4476
+ return chalk32.template;
4477
4477
  };
4478
4478
  function Chalk(options) {
4479
4479
  return chalkFactory(options);
@@ -4584,7 +4584,7 @@ var require_source = __commonJS({
4584
4584
  return openAll + string + closeAll;
4585
4585
  };
4586
4586
  var template;
4587
- var chalkTag = (chalk33, ...strings) => {
4587
+ var chalkTag = (chalk32, ...strings) => {
4588
4588
  const [firstString] = strings;
4589
4589
  if (!isArray(firstString) || !isArray(firstString.raw)) {
4590
4590
  return strings.join(" ");
@@ -4600,14 +4600,14 @@ var require_source = __commonJS({
4600
4600
  if (template === void 0) {
4601
4601
  template = require_templates();
4602
4602
  }
4603
- return template(chalk33, parts.join(""));
4603
+ return template(chalk32, parts.join(""));
4604
4604
  };
4605
4605
  Object.defineProperties(Chalk.prototype, styles);
4606
- var chalk32 = Chalk();
4607
- chalk32.supportsColor = stdoutColor;
4608
- chalk32.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
4609
- chalk32.stderr.supportsColor = stderrColor;
4610
- module2.exports = chalk32;
4606
+ var chalk31 = Chalk();
4607
+ chalk31.supportsColor = stdoutColor;
4608
+ chalk31.stderr = Chalk({ level: stderrColor ? stderrColor.level : 0 });
4609
+ chalk31.stderr.supportsColor = stderrColor;
4610
+ module2.exports = chalk31;
4611
4611
  }
4612
4612
  });
4613
4613
 
@@ -7081,6 +7081,9 @@ var init_pipeline = __esm({
7081
7081
  var welcome_exports = {};
7082
7082
  __export(welcome_exports, {
7083
7083
  DEMO_TEXT: () => DEMO_TEXT,
7084
+ ONBOARDING_STEPS: () => ONBOARDING_STEPS,
7085
+ buildWelcomeMessage: () => buildWelcomeMessage,
7086
+ formatCompactDemoResult: () => formatCompactDemoResult,
7084
7087
  formatDemoResult: () => formatDemoResult,
7085
7088
  formatFreeToolsList: () => formatFreeToolsList,
7086
7089
  printWelcome: () => printWelcome,
@@ -7110,6 +7113,14 @@ function formatDemoResult(demo) {
7110
7113
  }
7111
7114
  return lines.join("\n");
7112
7115
  }
7116
+ function formatCompactDemoResult(demo) {
7117
+ const tells = demo.topIssues.slice(0, 2).map((i) => {
7118
+ const m = i.match(/line \d+: (\S+)/);
7119
+ return m ? m[1] : i.split(" \u2014 ")[0];
7120
+ }).join(", ");
7121
+ const tail = tells ? ` \u2014 e.g. ${tells}` : "";
7122
+ return `quick demo: ${demo.score}/100, ${demo.issueCount} issues${tail}`;
7123
+ }
7113
7124
  function formatFreeToolsList() {
7114
7125
  const cli = FREE_CLI_COMMANDS.map((c2) => ` \u2022 ${c2}`).join("\n");
7115
7126
  const npx = NPX_EXAMPLES.map((c2) => ` \u2022 ${c2}`).join("\n");
@@ -7126,48 +7137,52 @@ function formatFreeToolsList() {
7126
7137
  ` \u2022 Community \u2014 ${COMMUNITY_URL}`
7127
7138
  ].join("\n");
7128
7139
  }
7129
- function printWelcome(opts = {}) {
7130
- recordEvent("welcome_view", { condensed: !!opts.condensed });
7140
+ function buildWelcomeMessage(opts = {}) {
7131
7141
  if (opts.condensed) {
7132
- console.log(import_chalk11.default.bold("\nhold your voice") + import_chalk11.default.dim(" \u2014 make your AI agents sound exactly like you.\n"));
7133
- console.log(import_chalk11.default.dim(" free local: ") + "npx @holdyourvoice/hyv scan draft.md");
7134
- console.log(import_chalk11.default.dim(" full tour: ") + "hyv welcome");
7135
- console.log(import_chalk11.default.dim(" your voice: ") + "hyv init | hyv new my-voice");
7136
- console.log(import_chalk11.default.dim(` web tools: ${FREE_WEB_TOOLS[0].url}
7137
- `));
7138
- return;
7142
+ return [
7143
+ "hold your voice \u2014 make your AI agents sound exactly like you.",
7144
+ "",
7145
+ " hyv scan draft.md test a draft",
7146
+ " hyv init build your voice",
7147
+ " hyv mcp --setup connect cursor / claude",
7148
+ "",
7149
+ ` profiles + learning \u2192 ${PRICING_URL}`
7150
+ ].join("\n");
7151
+ }
7152
+ const lines = [
7153
+ "Hold Your Voice \u2014 make your AI agents sound exactly like you.",
7154
+ "",
7155
+ "4 steps:",
7156
+ ""
7157
+ ];
7158
+ for (const step of ONBOARDING_STEPS) {
7159
+ lines.push(` ${step.n}. ${step.title}`);
7160
+ lines.push(` ${step.cmd}`);
7161
+ lines.push(` ${step.hint}`);
7162
+ lines.push("");
7139
7163
  }
7140
- console.log(import_chalk11.default.bold("\nHold Your Voice") + import_chalk11.default.dim(" \u2014 make your AI agents sound exactly like you.\n"));
7141
7164
  if (!opts.skipDemo) {
7142
- console.log(import_chalk11.default.bold("Free local demo") + import_chalk11.default.dim(" (instant, no auth):\n"));
7143
7165
  const demo = runWelcomeDemo();
7144
7166
  recordEvent("welcome_demo", { score: demo.score, issues: demo.issueCount });
7145
- console.log(formatDemoResult(demo));
7146
- console.log("");
7147
- }
7148
- console.log(import_chalk11.default.bold("Free CLI") + import_chalk11.default.dim(" (works offline):\n"));
7149
- for (const cmd of FREE_CLI_COMMANDS) {
7150
- console.log(import_chalk11.default.dim(" \u2022 ") + cmd);
7151
- }
7152
- console.log(import_chalk11.default.bold("\nNo install?") + import_chalk11.default.dim(" use npx:\n"));
7153
- for (const cmd of NPX_EXAMPLES) {
7154
- console.log(import_chalk11.default.cyan(` ${cmd}`));
7155
- }
7156
- console.log(import_chalk11.default.bold("\nFree web tools") + import_chalk11.default.dim(" (30+ at holdyourvoice.com/tools):\n"));
7157
- for (const tool of FREE_WEB_TOOLS) {
7158
- console.log(import_chalk11.default.dim(` \u2022 ${tool.name}`) + import_chalk11.default.cyan(` \u2014 ${tool.url}`));
7167
+ lines.push(" try it now:");
7168
+ lines.push(` ${formatCompactDemoResult(demo)}`);
7169
+ lines.push(" hyv scan draft.md");
7170
+ lines.push("");
7159
7171
  }
7160
- console.log(import_chalk11.default.bold("\nReady for your voice?"));
7161
- console.log(import_chalk11.default.dim(" hyv init") + " | " + import_chalk11.default.dim("hyv new my-voice"));
7162
- console.log(import_chalk11.default.dim(" Local free forever. Profiles + learning = paid \u2192 ") + import_chalk11.default.cyan(PRICING_URL));
7163
- console.log(import_chalk11.default.dim(` Share what you're building \u2192 ${COMMUNITY_URL}
7164
- `));
7172
+ lines.push("Ready for voice profiles that learn from every edit?");
7173
+ lines.push(` hyv plan --upgrade \u2192 ${PRICING_URL}`);
7174
+ lines.push(" first month $1 \xB7 local scan stays free forever");
7175
+ lines.push("");
7176
+ return lines.join("\n");
7165
7177
  }
7166
- var import_chalk11, DEMO_TEXT;
7178
+ function printWelcome(opts = {}) {
7179
+ recordEvent("welcome_view", { condensed: !!opts.condensed });
7180
+ console.log("\n" + buildWelcomeMessage(opts));
7181
+ }
7182
+ var DEMO_TEXT, ONBOARDING_STEPS;
7167
7183
  var init_welcome = __esm({
7168
7184
  "src/lib/welcome.ts"() {
7169
7185
  "use strict";
7170
- import_chalk11 = __toESM(require_source());
7171
7186
  init_pipeline();
7172
7187
  init_free_paid();
7173
7188
  init_telemetry();
@@ -7178,6 +7193,12 @@ Firstly, you need to harness the power of seamless integration. Moreover, this r
7178
7193
  Here's the uncomfortable truth: most teams are not equipped to handle the paradigm shift. But arguably, those who embrace this cutting-edge technology will have a game-changer advantage.
7179
7194
 
7180
7195
  In conclusion, the key to success is to empower your team with actionable insights and foster a culture of continuous improvement.`;
7196
+ ONBOARDING_STEPS = [
7197
+ { n: 1, title: "install", cmd: "npm i -g @holdyourvoice/hyv@latest", hint: "one command, works in every terminal and agent" },
7198
+ { n: 2, title: "test a draft", cmd: "hyv scan draft.md", hint: "free local scan \u2014 flags ai tells offline" },
7199
+ { n: 3, title: "build your voice", cmd: "hyv init", hint: "profile from your writing \u2014 unlocks rewrite + learning" },
7200
+ { n: 4, title: "connect your agent", cmd: "hyv mcp --setup", hint: "cursor, claude code, codex \u2014 tools inside the chat" }
7201
+ ];
7181
7202
  }
7182
7203
  });
7183
7204
 
@@ -10540,7 +10561,7 @@ var {
10540
10561
  } = import_index.default;
10541
10562
 
10542
10563
  // src/index.ts
10543
- var import_chalk31 = __toESM(require_source());
10564
+ var import_chalk30 = __toESM(require_source());
10544
10565
 
10545
10566
  // src/commands/init.ts
10546
10567
  var import_chalk4 = __toESM(require_source());
@@ -12035,7 +12056,7 @@ function printProfileImpact(impact, data) {
12035
12056
  }
12036
12057
 
12037
12058
  // src/commands/onboarding.ts
12038
- var import_chalk12 = __toESM(require_source());
12059
+ var import_chalk11 = __toESM(require_source());
12039
12060
  var fs12 = __toESM(require("fs"));
12040
12061
  var path12 = __toESM(require("path"));
12041
12062
  init_config();
@@ -12121,7 +12142,7 @@ function registerOnboardingCommands(program3) {
12121
12142
  await flashcardOnboarding(name, token);
12122
12143
  }
12123
12144
  } catch (error) {
12124
- console.error(import_chalk12.default.red(`
12145
+ console.error(import_chalk11.default.red(`
12125
12146
  Error: ${error.message}`));
12126
12147
  process.exit(1);
12127
12148
  }
@@ -12130,16 +12151,16 @@ Error: ${error.message}`));
12130
12151
  async function flashcardOnboarding(name, token) {
12131
12152
  const { printWelcome: printWelcome2 } = await Promise.resolve().then(() => (init_welcome(), welcome_exports));
12132
12153
  printWelcome2({ condensed: true, skipDemo: true });
12133
- console.log(import_chalk12.default.bold(`Creating voice profile: ${name}
12154
+ console.log(import_chalk11.default.bold(`Creating voice profile: ${name}
12134
12155
  `));
12135
- console.log(import_chalk12.default.dim("Answer these questions to define your voice.\n"));
12156
+ console.log(import_chalk11.default.dim("Answer these questions to define your voice.\n"));
12136
12157
  const answers = {};
12137
12158
  for (const q of UNIVERSAL_QUESTIONS) {
12138
12159
  const answer = await askQuestion(q.question);
12139
12160
  answers[q.key] = answer;
12140
12161
  }
12141
12162
  const industry = answers.format?.toLowerCase().includes("code") || answers.audience?.toLowerCase().includes("developer") ? "tech" : answers.format?.toLowerCase().includes("market") || answers.audience?.toLowerCase().includes("market") ? "marketing" : "default";
12142
- console.log(import_chalk12.default.dim(`
12163
+ console.log(import_chalk11.default.dim(`
12143
12164
  Industry: ${industry}
12144
12165
  `));
12145
12166
  for (const q of INDUSTRY_QUESTIONS[industry]) {
@@ -12147,7 +12168,7 @@ Industry: ${industry}
12147
12168
  answers[q.key] = answer;
12148
12169
  }
12149
12170
  if (token) {
12150
- console.log(import_chalk12.default.cyan("\nGenerating profile on server..."));
12171
+ console.log(import_chalk11.default.cyan("\nGenerating profile on server..."));
12151
12172
  const response = await authenticatedRequest(
12152
12173
  "https://holdyourvoice.com/cli/profiles/new",
12153
12174
  {
@@ -12164,23 +12185,23 @@ Industry: ${industry}
12164
12185
  const profileContent = data.content || generateLocalProfile(name, answers);
12165
12186
  ensureHyvDir();
12166
12187
  writeCachedProfile(name, profileContent);
12167
- console.log(import_chalk12.default.green(`
12188
+ console.log(import_chalk11.default.green(`
12168
12189
  \u2713 Profile created: ${name}`));
12169
- console.log(import_chalk12.default.dim("Run `hyv profiles` to see your profiles."));
12190
+ console.log(import_chalk11.default.dim("Run `hyv profiles` to see your profiles."));
12170
12191
  } else {
12171
- console.log(import_chalk12.default.yellow("\nServer unavailable. Creating local profile..."));
12192
+ console.log(import_chalk11.default.yellow("\nServer unavailable. Creating local profile..."));
12172
12193
  const profileContent = generateLocalProfile(name, answers);
12173
12194
  ensureHyvDir();
12174
12195
  writeCachedProfile(name, profileContent);
12175
- console.log(import_chalk12.default.green(`
12196
+ console.log(import_chalk11.default.green(`
12176
12197
  \u2713 Local profile created: ${name}`));
12177
12198
  }
12178
12199
  } else {
12179
- console.log(import_chalk12.default.yellow("\nNot authenticated. Creating local profile..."));
12200
+ console.log(import_chalk11.default.yellow("\nNot authenticated. Creating local profile..."));
12180
12201
  const profileContent = generateLocalProfile(name, answers);
12181
12202
  ensureHyvDir();
12182
12203
  writeCachedProfile(name, profileContent);
12183
- console.log(import_chalk12.default.green(`
12204
+ console.log(import_chalk11.default.green(`
12184
12205
  \u2713 Local profile created: ${name}`));
12185
12206
  }
12186
12207
  }
@@ -12189,9 +12210,9 @@ async function createFromSamples(name, sampleDir, token) {
12189
12210
  if (!fs12.existsSync(dirPath)) {
12190
12211
  throw new Error(`Directory not found: ${dirPath}`);
12191
12212
  }
12192
- console.log(import_chalk12.default.bold(`
12213
+ console.log(import_chalk11.default.bold(`
12193
12214
  Creating voice profile: ${name}`));
12194
- console.log(import_chalk12.default.dim(`Reading samples from: ${dirPath}
12215
+ console.log(import_chalk11.default.dim(`Reading samples from: ${dirPath}
12195
12216
  `));
12196
12217
  const files = fs12.readdirSync(dirPath).filter((f) => f.endsWith(".md") || f.endsWith(".txt")).map((f) => path12.join(dirPath, f));
12197
12218
  if (files.length === 0) {
@@ -12202,22 +12223,22 @@ Creating voice profile: ${name}`));
12202
12223
  const text = fs12.readFileSync(file, "utf-8");
12203
12224
  if (text.trim().length > 0) {
12204
12225
  samples.push({ path: file, text });
12205
- console.log(import_chalk12.default.dim(` \u2022 ${path12.basename(file)} (${words(text).length} words)`));
12226
+ console.log(import_chalk11.default.dim(` \u2022 ${path12.basename(file)} (${words(text).length} words)`));
12206
12227
  }
12207
12228
  }
12208
12229
  if (samples.length === 0) {
12209
12230
  throw new Error("No readable text found in files");
12210
12231
  }
12211
12232
  const stats = extractStats(samples);
12212
- console.log(import_chalk12.default.dim(`
12233
+ console.log(import_chalk11.default.dim(`
12213
12234
  Stats extracted:`));
12214
- console.log(import_chalk12.default.dim(` Words: ${stats.word_count}`));
12215
- console.log(import_chalk12.default.dim(` Sentences: ${stats.sentence_count}`));
12216
- console.log(import_chalk12.default.dim(` Avg sentence: ${stats.avg_sentence_length} words`));
12217
- console.log(import_chalk12.default.dim(` Case style: ${stats.case_style}`));
12218
- console.log(import_chalk12.default.dim(` Argument pattern: ${stats.argument_pattern}`));
12235
+ console.log(import_chalk11.default.dim(` Words: ${stats.word_count}`));
12236
+ console.log(import_chalk11.default.dim(` Sentences: ${stats.sentence_count}`));
12237
+ console.log(import_chalk11.default.dim(` Avg sentence: ${stats.avg_sentence_length} words`));
12238
+ console.log(import_chalk11.default.dim(` Case style: ${stats.case_style}`));
12239
+ console.log(import_chalk11.default.dim(` Argument pattern: ${stats.argument_pattern}`));
12219
12240
  if (token) {
12220
- console.log(import_chalk12.default.cyan("\nGenerating profile on server..."));
12241
+ console.log(import_chalk11.default.cyan("\nGenerating profile on server..."));
12221
12242
  const response = await authenticatedRequest(
12222
12243
  "https://holdyourvoice.com/cli/profiles/new",
12223
12244
  {
@@ -12233,25 +12254,25 @@ Stats extracted:`));
12233
12254
  const data = response.data;
12234
12255
  ensureHyvDir();
12235
12256
  writeCachedProfile(name, data.content || generateLocalProfileFromStats(name, stats));
12236
- console.log(import_chalk12.default.green(`
12257
+ console.log(import_chalk11.default.green(`
12237
12258
  \u2713 Profile created: ${name}`));
12238
12259
  } else {
12239
- console.log(import_chalk12.default.yellow("\nServer unavailable. Creating local profile..."));
12260
+ console.log(import_chalk11.default.yellow("\nServer unavailable. Creating local profile..."));
12240
12261
  ensureHyvDir();
12241
12262
  writeCachedProfile(name, generateLocalProfileFromStats(name, stats));
12242
- console.log(import_chalk12.default.green(`
12263
+ console.log(import_chalk11.default.green(`
12243
12264
  \u2713 Local profile created: ${name}`));
12244
12265
  }
12245
12266
  } else {
12246
- console.log(import_chalk12.default.yellow("\nNot authenticated. Creating local profile..."));
12267
+ console.log(import_chalk11.default.yellow("\nNot authenticated. Creating local profile..."));
12247
12268
  ensureHyvDir();
12248
12269
  writeCachedProfile(name, generateLocalProfileFromStats(name, stats));
12249
- console.log(import_chalk12.default.green(`
12270
+ console.log(import_chalk11.default.green(`
12250
12271
  \u2713 Local profile created: ${name}`));
12251
12272
  }
12252
12273
  }
12253
12274
  async function generateExtractionPrompt(name) {
12254
- console.log(import_chalk12.default.bold(`
12275
+ console.log(import_chalk11.default.bold(`
12255
12276
  Generating extraction prompt for: ${name}
12256
12277
  `));
12257
12278
  const prompt = `I need you to analyze writing samples and create a voice profile.
@@ -12276,7 +12297,7 @@ function askQuestion(question) {
12276
12297
  input: process.stdin,
12277
12298
  output: process.stdout
12278
12299
  });
12279
- rl.question(import_chalk12.default.cyan(` ${question}
12300
+ rl.question(import_chalk11.default.cyan(` ${question}
12280
12301
  > `), (answer) => {
12281
12302
  rl.close();
12282
12303
  resolve12(answer.trim());
@@ -12343,7 +12364,7 @@ function generateLocalProfileFromStats(name, stats) {
12343
12364
  }
12344
12365
 
12345
12366
  // src/commands/plan.ts
12346
- var import_chalk13 = __toESM(require_source());
12367
+ var import_chalk12 = __toESM(require_source());
12347
12368
  init_config();
12348
12369
  init_auth();
12349
12370
  var import_open2 = __toESM(require_open());
@@ -12358,10 +12379,10 @@ function registerPlanCommand(program3) {
12358
12379
  }
12359
12380
  const token = getToken();
12360
12381
  if (!token) {
12361
- console.log(import_chalk13.default.yellow("\nNot authenticated \u2014 free tier still works.\n"));
12362
- console.log(import_chalk13.default.dim(" hyv scan draft.md | hyv welcome | npx @holdyourvoice/hyv scan draft.md"));
12382
+ console.log(import_chalk12.default.yellow("\nNot authenticated \u2014 free tier still works.\n"));
12383
+ console.log(import_chalk12.default.dim(" hyv scan draft.md | hyv welcome | npx @holdyourvoice/hyv scan draft.md"));
12363
12384
  printFreePaidMatrix({ compact: true });
12364
- console.log(import_chalk13.default.dim(" Run `hyv init` for profiles + learning.\n"));
12385
+ console.log(import_chalk12.default.dim(" Run `hyv init` for profiles + learning.\n"));
12365
12386
  return;
12366
12387
  }
12367
12388
  if (options.upgrade) {
@@ -12374,20 +12395,20 @@ function registerPlanCommand(program3) {
12374
12395
  await showPlan();
12375
12396
  }
12376
12397
  } catch (error) {
12377
- console.error(import_chalk13.default.red(`
12398
+ console.error(import_chalk12.default.red(`
12378
12399
  Error: ${error.message}`));
12379
12400
  process.exit(1);
12380
12401
  }
12381
12402
  });
12382
12403
  }
12383
12404
  async function showPlan() {
12384
- console.log(import_chalk13.default.bold("\nSubscription Plan\n"));
12405
+ console.log(import_chalk12.default.bold("\nSubscription Plan\n"));
12385
12406
  const response = await authenticatedRequest(
12386
12407
  "https://holdyourvoice.com/cli/heartbeat",
12387
12408
  { method: "GET" }
12388
12409
  );
12389
12410
  if (response.status !== 200) {
12390
- console.log(import_chalk13.default.yellow("Could not fetch plan info."));
12411
+ console.log(import_chalk12.default.yellow("Could not fetch plan info."));
12391
12412
  return;
12392
12413
  }
12393
12414
  const data = response.data;
@@ -12405,27 +12426,27 @@ async function showPlan() {
12405
12426
  team: "$29/mo",
12406
12427
  agency: "Custom"
12407
12428
  };
12408
- console.log(import_chalk13.default.dim("Plan:"), import_chalk13.default.bold(planNames[plan] || plan));
12409
- console.log(import_chalk13.default.dim("Price:"), planPrices[plan] || "-");
12410
- console.log(import_chalk13.default.dim("Status:"), data.subscription_status || "none");
12429
+ console.log(import_chalk12.default.dim("Plan:"), import_chalk12.default.bold(planNames[plan] || plan));
12430
+ console.log(import_chalk12.default.dim("Price:"), planPrices[plan] || "-");
12431
+ console.log(import_chalk12.default.dim("Status:"), data.subscription_status || "none");
12411
12432
  if (license) {
12412
- console.log(import_chalk13.default.dim("License:"), license.key_hint);
12433
+ console.log(import_chalk12.default.dim("License:"), license.key_hint);
12413
12434
  }
12414
12435
  const access = await getAccessState();
12415
- console.log(import_chalk13.default.bold("\nFree tier (always)"));
12416
- console.log(import_chalk13.default.dim(" local scan, fix, check, mcp, all web tools \u2014 hyv welcome"));
12436
+ console.log(import_chalk12.default.bold("\nFree tier (always)"));
12437
+ console.log(import_chalk12.default.dim(" local scan, fix, check, mcp, all web tools \u2014 hyv welcome"));
12417
12438
  if (plan === "none" || !access.hasPaidPlan) {
12418
- console.log(import_chalk13.default.bold("\nUpgrade unlocks"));
12419
- console.log(import_chalk13.default.dim(" profiles, learning loop, hybrid analysis, rich rewrites"));
12420
- console.log(import_chalk13.default.dim(` ${PRICING_URL}`));
12421
- console.log(import_chalk13.default.dim("\n hyv plan --upgrade | hyv plan --free for full matrix"));
12439
+ console.log(import_chalk12.default.bold("\nUpgrade unlocks"));
12440
+ console.log(import_chalk12.default.dim(" profiles, learning loop, hybrid analysis, rich rewrites"));
12441
+ console.log(import_chalk12.default.dim(` ${PRICING_URL}`));
12442
+ console.log(import_chalk12.default.dim("\n hyv plan --upgrade | hyv plan --free for full matrix"));
12422
12443
  } else {
12423
12444
  console.log("\nManage your subscription:");
12424
- console.log(import_chalk13.default.dim(" hyv plan --manage"));
12445
+ console.log(import_chalk12.default.dim(" hyv plan --manage"));
12425
12446
  }
12426
12447
  }
12427
12448
  async function upgradePlan() {
12428
- console.log(import_chalk13.default.cyan("\nOpening checkout...\n"));
12449
+ console.log(import_chalk12.default.cyan("\nOpening checkout...\n"));
12429
12450
  const response = await authenticatedRequest(
12430
12451
  "https://holdyourvoice.com/cli/subscribe",
12431
12452
  {
@@ -12437,20 +12458,20 @@ async function upgradePlan() {
12437
12458
  const data = response.data;
12438
12459
  const checkoutUrl = data.checkout_url;
12439
12460
  if (checkoutUrl) {
12440
- console.log(import_chalk13.default.dim("Opening browser..."));
12461
+ console.log(import_chalk12.default.dim("Opening browser..."));
12441
12462
  await (0, import_open2.default)(checkoutUrl);
12442
- console.log(import_chalk13.default.green("\n\u2713 Checkout opened in browser"));
12443
- console.log(import_chalk13.default.dim("Complete the checkout to activate your plan."));
12463
+ console.log(import_chalk12.default.green("\n\u2713 Checkout opened in browser"));
12464
+ console.log(import_chalk12.default.dim("Complete the checkout to activate your plan."));
12444
12465
  } else {
12445
- console.log(import_chalk13.default.yellow("No checkout URL received."));
12466
+ console.log(import_chalk12.default.yellow("No checkout URL received."));
12446
12467
  }
12447
12468
  } else {
12448
- console.log(import_chalk13.default.yellow("Could not create checkout session."));
12449
- console.log(import_chalk13.default.dim("Visit https://holdyourvoice.com/pricing to subscribe."));
12469
+ console.log(import_chalk12.default.yellow("Could not create checkout session."));
12470
+ console.log(import_chalk12.default.dim("Visit https://holdyourvoice.com/pricing to subscribe."));
12450
12471
  }
12451
12472
  }
12452
12473
  async function openBillingPortal() {
12453
- console.log(import_chalk13.default.cyan("\nOpening billing portal...\n"));
12474
+ console.log(import_chalk12.default.cyan("\nOpening billing portal...\n"));
12454
12475
  const response = await authenticatedRequest(
12455
12476
  "https://holdyourvoice.com/cli/subscribe/manage",
12456
12477
  { method: "POST" }
@@ -12459,41 +12480,41 @@ async function openBillingPortal() {
12459
12480
  const data = response.data;
12460
12481
  const portalUrl = data.portal_url;
12461
12482
  if (portalUrl) {
12462
- console.log(import_chalk13.default.dim("Opening browser..."));
12483
+ console.log(import_chalk12.default.dim("Opening browser..."));
12463
12484
  await (0, import_open2.default)(portalUrl);
12464
- console.log(import_chalk13.default.green("\n\u2713 Billing portal opened"));
12485
+ console.log(import_chalk12.default.green("\n\u2713 Billing portal opened"));
12465
12486
  } else {
12466
- console.log(import_chalk13.default.yellow("No portal URL received."));
12487
+ console.log(import_chalk12.default.yellow("No portal URL received."));
12467
12488
  }
12468
12489
  } else {
12469
- console.log(import_chalk13.default.yellow("Could not open billing portal."));
12470
- console.log(import_chalk13.default.dim("Visit https://holdyourvoice.com/dashboard to manage billing."));
12490
+ console.log(import_chalk12.default.yellow("Could not open billing portal."));
12491
+ console.log(import_chalk12.default.dim("Visit https://holdyourvoice.com/dashboard to manage billing."));
12471
12492
  }
12472
12493
  }
12473
12494
  async function downgradePlan() {
12474
- console.log(import_chalk13.default.yellow("\nDowngrade Plan\n"));
12495
+ console.log(import_chalk12.default.yellow("\nDowngrade Plan\n"));
12475
12496
  console.log("To downgrade your plan, please visit:");
12476
- console.log(import_chalk13.default.dim(" https://holdyourvoice.com/dashboard"));
12497
+ console.log(import_chalk12.default.dim(" https://holdyourvoice.com/dashboard"));
12477
12498
  console.log("\nOr contact support at shashank@holdyourvoice.com");
12478
12499
  }
12479
12500
 
12480
12501
  // src/commands/scan.ts
12481
- var import_chalk16 = __toESM(require_source());
12502
+ var import_chalk15 = __toESM(require_source());
12482
12503
  init_pipeline();
12483
12504
  init_local_profile();
12484
12505
  init_access();
12485
12506
 
12486
12507
  // src/lib/output.ts
12487
- var import_chalk14 = __toESM(require_source());
12508
+ var import_chalk13 = __toESM(require_source());
12488
12509
  var c = {
12489
- dim: (s) => import_chalk14.default.dim(s),
12490
- bold: (s) => import_chalk14.default.bold(s),
12491
- accent: (s) => import_chalk14.default.hex("#C4441A")(s),
12492
- green: (s) => import_chalk14.default.green(s),
12493
- red: (s) => import_chalk14.default.red(s),
12494
- yellow: (s) => import_chalk14.default.yellow(s),
12495
- cyan: (s) => import_chalk14.default.cyan(s),
12496
- white: (s) => import_chalk14.default.white(s)
12510
+ dim: (s) => import_chalk13.default.dim(s),
12511
+ bold: (s) => import_chalk13.default.bold(s),
12512
+ accent: (s) => import_chalk13.default.hex("#C4441A")(s),
12513
+ green: (s) => import_chalk13.default.green(s),
12514
+ red: (s) => import_chalk13.default.red(s),
12515
+ yellow: (s) => import_chalk13.default.yellow(s),
12516
+ cyan: (s) => import_chalk13.default.cyan(s),
12517
+ white: (s) => import_chalk13.default.white(s)
12497
12518
  };
12498
12519
  function logo() {
12499
12520
  return `${c.bold("hold your ")}${c.accent("voice")}`;
@@ -12641,7 +12662,7 @@ async function runHybridAnalysis(text, profile, opts = {}) {
12641
12662
  }
12642
12663
 
12643
12664
  // src/commands/history.ts
12644
- var import_chalk15 = __toESM(require_source());
12665
+ var import_chalk14 = __toESM(require_source());
12645
12666
  var fs13 = __toESM(require("fs"));
12646
12667
  var path13 = __toESM(require("path"));
12647
12668
  init_config();
@@ -12695,7 +12716,7 @@ function registerHistoryCommand(program3) {
12695
12716
  if (fs13.existsSync(HISTORY_FILE)) {
12696
12717
  fs13.unlinkSync(HISTORY_FILE);
12697
12718
  }
12698
- console.log(import_chalk15.default.green("\n\u2713 History cleared"));
12719
+ console.log(import_chalk14.default.green("\n\u2713 History cleared"));
12699
12720
  return;
12700
12721
  }
12701
12722
  let entries = readHistory();
@@ -12709,14 +12730,14 @@ function registerHistoryCommand(program3) {
12709
12730
  const limit = parseInt(options.limit, 10);
12710
12731
  entries = entries.slice(-limit);
12711
12732
  if (entries.length === 0) {
12712
- console.log(import_chalk15.default.dim("\nNo scan history yet. Run hyv scan or hyv score to start tracking."));
12733
+ console.log(import_chalk14.default.dim("\nNo scan history yet. Run hyv scan or hyv score to start tracking."));
12713
12734
  return;
12714
12735
  }
12715
12736
  if (options.format === "json") {
12716
12737
  console.log(JSON.stringify(entries, null, 2));
12717
12738
  return;
12718
12739
  }
12719
- console.log(import_chalk15.default.bold(`
12740
+ console.log(import_chalk14.default.bold(`
12720
12741
  score history (last ${entries.length} scans)
12721
12742
  `));
12722
12743
  if (options.chart) {
@@ -12728,7 +12749,7 @@ function registerHistoryCommand(program3) {
12728
12749
  if (min !== max) {
12729
12750
  console.log(` ${min} \u2524`);
12730
12751
  }
12731
- console.log(import_chalk15.default.dim(` \u2514${"\u2500".repeat(sl.length + 1)}`));
12752
+ console.log(import_chalk14.default.dim(` \u2514${"\u2500".repeat(sl.length + 1)}`));
12732
12753
  console.log("");
12733
12754
  }
12734
12755
  const scores = entries.map((e) => e.score);
@@ -12741,22 +12762,22 @@ function registerHistoryCommand(program3) {
12741
12762
  const firstAvg = firstHalf.reduce((s, e) => s + e.score, 0) / (firstHalf.length || 1);
12742
12763
  const secondAvg = secondHalf.reduce((s, e) => s + e.score, 0) / (secondHalf.length || 1);
12743
12764
  const trend = Math.round(secondAvg - firstAvg);
12744
- const trendStr = trend > 0 ? import_chalk15.default.green(`\u2191 improving (+${trend})`) : trend < 0 ? import_chalk15.default.red(`\u2193 declining (${trend})`) : import_chalk15.default.dim("\u2192 stable");
12745
- console.log(import_chalk15.default.dim(` avg: ${avg} best: ${best.score} worst: ${worst.score}`));
12746
- console.log(import_chalk15.default.dim(` trend: ${trendStr}`));
12747
- console.log(import_chalk15.default.bold("\n recent:\n"));
12765
+ const trendStr = trend > 0 ? import_chalk14.default.green(`\u2191 improving (+${trend})`) : trend < 0 ? import_chalk14.default.red(`\u2193 declining (${trend})`) : import_chalk14.default.dim("\u2192 stable");
12766
+ console.log(import_chalk14.default.dim(` avg: ${avg} best: ${best.score} worst: ${worst.score}`));
12767
+ console.log(import_chalk14.default.dim(` trend: ${trendStr}`));
12768
+ console.log(import_chalk14.default.bold("\n recent:\n"));
12748
12769
  const recent = entries.slice(-10).reverse();
12749
12770
  for (const entry of recent) {
12750
12771
  const time = new Date(entry.timestamp).toLocaleTimeString("en-US", { hour12: false, hour: "2-digit", minute: "2-digit" });
12751
- const icon = entry.issues === 0 ? import_chalk15.default.green("\u2713") : import_chalk15.default.red("\u25CF");
12752
- const score = entry.score < 60 ? import_chalk15.default.red(`${entry.score}/100`) : entry.score < 80 ? import_chalk15.default.yellow(`${entry.score}/100`) : import_chalk15.default.green(`${entry.score}/100`);
12753
- const issues = entry.issues > 0 ? import_chalk15.default.red(`${entry.issues} issues`) : import_chalk15.default.dim("clean");
12772
+ const icon = entry.issues === 0 ? import_chalk14.default.green("\u2713") : import_chalk14.default.red("\u25CF");
12773
+ const score = entry.score < 60 ? import_chalk14.default.red(`${entry.score}/100`) : entry.score < 80 ? import_chalk14.default.yellow(`${entry.score}/100`) : import_chalk14.default.green(`${entry.score}/100`);
12774
+ const issues = entry.issues > 0 ? import_chalk14.default.red(`${entry.issues} issues`) : import_chalk14.default.dim("clean");
12754
12775
  const file = path13.basename(entry.file).slice(0, 25).padEnd(25);
12755
- console.log(` ${import_chalk15.default.dim(time)} ${icon} ${file} ${score} ${issues}`);
12776
+ console.log(` ${import_chalk14.default.dim(time)} ${icon} ${file} ${score} ${issues}`);
12756
12777
  }
12757
12778
  console.log("");
12758
12779
  } catch (error) {
12759
- console.error(import_chalk15.default.red(`Error: ${error.message}`));
12780
+ console.error(import_chalk14.default.red(`Error: ${error.message}`));
12760
12781
  process.exit(1);
12761
12782
  }
12762
12783
  });
@@ -12771,7 +12792,7 @@ function registerScanCommand(program3) {
12771
12792
  const profile = await loadProfileForCommand(options.profile);
12772
12793
  const { text, path: filePath } = readText(file);
12773
12794
  if (!text.trim()) {
12774
- console.warn(import_chalk16.default.yellow("File is empty or contains only whitespace."));
12795
+ console.warn(import_chalk15.default.yellow("File is empty or contains only whitespace."));
12775
12796
  process.exit(0);
12776
12797
  }
12777
12798
  const ignoreRules = options.ignore ? new Set(options.ignore.split(",").map((r) => r.trim())) : /* @__PURE__ */ new Set();
@@ -12814,26 +12835,26 @@ function registerScanCommand(program3) {
12814
12835
  }, null, 2));
12815
12836
  } else {
12816
12837
  if (signals.length === 0) {
12817
- console.log(import_chalk16.default.green(`
12838
+ console.log(import_chalk15.default.green(`
12818
12839
  \u2713 No issues found in ${filePath}`));
12819
- console.log(import_chalk16.default.dim(` score: ${score}/100`));
12840
+ console.log(import_chalk15.default.dim(` score: ${score}/100`));
12820
12841
  } else {
12821
- console.log(import_chalk16.default.bold(`
12842
+ console.log(import_chalk15.default.bold(`
12822
12843
  hyv scan ${filePath}`));
12823
12844
  if (profile) {
12824
- console.log(import_chalk16.default.dim(` profile: ${profile.slug || profile.name}${hasRichProfile(profile) ? " (full)" : ""}`));
12845
+ console.log(import_chalk15.default.dim(` profile: ${profile.slug || profile.name}${hasRichProfile(profile) ? " (full)" : ""}`));
12825
12846
  }
12826
12847
  if (analysis.message) {
12827
- console.log(import_chalk16.default.dim(` engine: ${analysis.message}`));
12848
+ console.log(import_chalk15.default.dim(` engine: ${analysis.message}`));
12828
12849
  }
12829
12850
  console.log("");
12830
12851
  printGroupedSignals(signals, profile);
12831
- console.log(import_chalk16.default.yellow(`
12852
+ console.log(import_chalk15.default.yellow(`
12832
12853
  ${signals.length} issues (${signals.filter((s) => s.severity === "red").length} red, ${signals.filter((s) => s.severity === "yellow").length} yellow)`));
12833
- console.log(import_chalk16.default.dim(` score: ${score}/100`));
12834
- console.log(import_chalk16.default.dim(`
12854
+ console.log(import_chalk15.default.dim(` score: ${score}/100`));
12855
+ console.log(import_chalk15.default.dim(`
12835
12856
  fix: hyv fix ${file}`));
12836
- console.log(import_chalk16.default.dim(` diff: hyv diff ${file}
12857
+ console.log(import_chalk15.default.dim(` diff: hyv diff ${file}
12837
12858
  `));
12838
12859
  }
12839
12860
  await maybeShowLimitedModeHint(!!profile);
@@ -12851,14 +12872,14 @@ hyv scan ${filePath}`));
12851
12872
  process.exit(1);
12852
12873
  }
12853
12874
  } catch (error) {
12854
- console.error(import_chalk16.default.red(`Error: ${error.message}`));
12875
+ console.error(import_chalk15.default.red(`Error: ${error.message}`));
12855
12876
  process.exit(1);
12856
12877
  }
12857
12878
  });
12858
12879
  }
12859
12880
 
12860
12881
  // src/commands/doctor.ts
12861
- var import_chalk17 = __toESM(require_source());
12882
+ var import_chalk16 = __toESM(require_source());
12862
12883
  var fs14 = __toESM(require("fs"));
12863
12884
  var path14 = __toESM(require("path"));
12864
12885
  var os5 = __toESM(require("os"));
@@ -12870,87 +12891,87 @@ var HOME = os5.homedir();
12870
12891
  var IS_WIN = process.platform === "win32";
12871
12892
  function registerDoctorCommand(program3) {
12872
12893
  program3.command("doctor").description("Diagnose CLI health: engine, cache, auth, agents").option("--fix-agents", "Re-run agent config copy (idempotent)").action(async (opts) => {
12873
- console.log(import_chalk17.default.bold("\nhold your voice \u2014 doctor\n"));
12894
+ console.log(import_chalk16.default.bold("\nhold your voice \u2014 doctor\n"));
12874
12895
  let issues = 0;
12875
12896
  let fixed = 0;
12876
- console.log(import_chalk17.default.dim(`engine: ${getEngineLabel()} (node ${process.version})`));
12897
+ console.log(import_chalk16.default.dim(`engine: ${getEngineLabel()} (node ${process.version})`));
12877
12898
  if (isLocalOnlyMode()) {
12878
- console.log(import_chalk17.default.yellow(" local-only mode: HYV_LOCAL_ONLY is set"));
12899
+ console.log(import_chalk16.default.yellow(" local-only mode: HYV_LOCAL_ONLY is set"));
12879
12900
  }
12880
12901
  const access = await getAccessState();
12881
12902
  const profile = await loadProfileForCommand();
12882
- console.log(import_chalk17.default.dim(`mode: ${formatModeLabel(access, hasRichProfile(profile))}`));
12883
- console.log(import_chalk17.default.dim("tip: run hyv welcome for free capabilities\n"));
12884
- console.log(import_chalk17.default.dim("checking cli installation..."));
12903
+ console.log(import_chalk16.default.dim(`mode: ${formatModeLabel(access, hasRichProfile(profile))}`));
12904
+ console.log(import_chalk16.default.dim("tip: run hyv welcome for free capabilities\n"));
12905
+ console.log(import_chalk16.default.dim("checking cli installation..."));
12885
12906
  const cliPath = process.argv[1];
12886
12907
  if (cliPath && fs14.existsSync(cliPath)) {
12887
- console.log(import_chalk17.default.green(" \u2713 cli installed"));
12908
+ console.log(import_chalk16.default.green(" \u2713 cli installed"));
12888
12909
  } else {
12889
- console.log(import_chalk17.default.red(" \u2717 cli not found"));
12910
+ console.log(import_chalk16.default.red(" \u2717 cli not found"));
12890
12911
  issues++;
12891
12912
  }
12892
- console.log(import_chalk17.default.dim("checking .hyv directory..."));
12913
+ console.log(import_chalk16.default.dim("checking .hyv directory..."));
12893
12914
  if (fs14.existsSync(HYV_DIR)) {
12894
- console.log(import_chalk17.default.green(" \u2713 .hyv directory exists"));
12915
+ console.log(import_chalk16.default.green(" \u2713 .hyv directory exists"));
12895
12916
  } else {
12896
- console.log(import_chalk17.default.yellow(" ! .hyv directory missing \u2014 creating..."));
12917
+ console.log(import_chalk16.default.yellow(" ! .hyv directory missing \u2014 creating..."));
12897
12918
  fs14.mkdirSync(HYV_DIR, { recursive: true });
12898
12919
  fixed++;
12899
12920
  }
12900
- console.log(import_chalk17.default.dim("checking cache..."));
12921
+ console.log(import_chalk16.default.dim("checking cache..."));
12901
12922
  const diskProfiles = listDiskCachedProfiles();
12902
12923
  const syncMeta = path14.join(CACHE_DIR, "sync-meta.json");
12903
12924
  if (diskProfiles.length > 0 || fs14.existsSync(syncMeta)) {
12904
- console.log(import_chalk17.default.green(` \u2713 profile cache (${diskProfiles.length} full profile(s))`));
12925
+ console.log(import_chalk16.default.green(` \u2713 profile cache (${diskProfiles.length} full profile(s))`));
12905
12926
  if (fs14.existsSync(syncMeta)) {
12906
12927
  try {
12907
12928
  const meta = JSON.parse(fs14.readFileSync(syncMeta, "utf-8"));
12908
- console.log(import_chalk17.default.dim(` last sync: ${meta.synced_at || "unknown"}`));
12929
+ console.log(import_chalk16.default.dim(` last sync: ${meta.synced_at || "unknown"}`));
12909
12930
  } catch {
12910
12931
  }
12911
12932
  }
12912
12933
  } else {
12913
- console.log(import_chalk17.default.dim(" - no full profile cache (free local engine still works)"));
12934
+ console.log(import_chalk16.default.dim(" - no full profile cache (free local engine still works)"));
12914
12935
  }
12915
- console.log(import_chalk17.default.dim("checking authentication..."));
12936
+ console.log(import_chalk16.default.dim("checking authentication..."));
12916
12937
  if (isInitialized()) {
12917
12938
  const auth = readAuth();
12918
12939
  if (auth) {
12919
- console.log(import_chalk17.default.green(" \u2713 authenticated"));
12920
- console.log(import_chalk17.default.dim(` email: ${auth.user?.email || "unknown"}`));
12940
+ console.log(import_chalk16.default.green(" \u2713 authenticated"));
12941
+ console.log(import_chalk16.default.dim(` email: ${auth.user?.email || "unknown"}`));
12921
12942
  const session = await checkSession();
12922
12943
  if (session.valid) {
12923
- console.log(import_chalk17.default.green(" \u2713 session valid"));
12924
- console.log(import_chalk17.default.dim(` plan: ${session.plan || "none"}`));
12944
+ console.log(import_chalk16.default.green(" \u2713 session valid"));
12945
+ console.log(import_chalk16.default.dim(` plan: ${session.plan || "none"}`));
12925
12946
  } else {
12926
- console.log(import_chalk17.default.red(" \u2717 session expired"));
12927
- console.log(import_chalk17.default.dim(" run: hyv init"));
12947
+ console.log(import_chalk16.default.red(" \u2717 session expired"));
12948
+ console.log(import_chalk16.default.dim(" run: hyv init"));
12928
12949
  issues++;
12929
12950
  }
12930
12951
  } else {
12931
- console.log(import_chalk17.default.red(" \u2717 auth data missing"));
12952
+ console.log(import_chalk16.default.red(" \u2717 auth data missing"));
12932
12953
  issues++;
12933
12954
  }
12934
12955
  } else {
12935
- console.log(import_chalk17.default.yellow(" ! not authenticated (free local scan works)"));
12936
- console.log(import_chalk17.default.dim(" run: hyv init for profiles + learning"));
12956
+ console.log(import_chalk16.default.yellow(" ! not authenticated (free local scan works)"));
12957
+ console.log(import_chalk16.default.dim(" run: hyv init for profiles + learning"));
12937
12958
  }
12938
- console.log(import_chalk17.default.dim("checking voice profile..."));
12959
+ console.log(import_chalk16.default.dim("checking voice profile..."));
12939
12960
  const voiceMd = path14.join(HYV_DIR, "voice.md");
12940
12961
  const hasVoiceMd = fs14.existsSync(voiceMd) && fs14.readFileSync(voiceMd, "utf-8").trim().length > 50;
12941
12962
  const profileFiles = fs14.existsSync(PROFILES_DIR) ? fs14.readdirSync(PROFILES_DIR).filter((f) => f.endsWith(".md") && f !== "voice.md") : [];
12942
12963
  if (hasVoiceMd || profileFiles.length > 0 || diskProfiles.length > 0) {
12943
12964
  if (hasVoiceMd)
12944
- console.log(import_chalk17.default.green(" \u2713 voice.md exists"));
12965
+ console.log(import_chalk16.default.green(" \u2713 voice.md exists"));
12945
12966
  if (profileFiles.length > 0)
12946
- console.log(import_chalk17.default.green(` \u2713 ${profileFiles.length} markdown profile(s)`));
12967
+ console.log(import_chalk16.default.green(` \u2713 ${profileFiles.length} markdown profile(s)`));
12947
12968
  if (diskProfiles.length > 0)
12948
- console.log(import_chalk17.default.green(` \u2713 ${diskProfiles.length} full cached profile(s)`));
12969
+ console.log(import_chalk16.default.green(` \u2713 ${diskProfiles.length} full cached profile(s)`));
12949
12970
  } else {
12950
- console.log(import_chalk17.default.yellow(" ! no voice profile (optional for free scan)"));
12951
- console.log(import_chalk17.default.dim(" run: hyv new <name> or hyv init"));
12971
+ console.log(import_chalk16.default.yellow(" ! no voice profile (optional for free scan)"));
12972
+ console.log(import_chalk16.default.dim(" run: hyv new <name> or hyv init"));
12952
12973
  }
12953
- console.log(import_chalk17.default.dim("checking agent configurations..."));
12974
+ console.log(import_chalk16.default.dim("checking agent configurations..."));
12954
12975
  const cwd = process.cwd();
12955
12976
  const agents = [
12956
12977
  { name: "claude desktop", file: path14.join(IS_WIN ? path14.join(HOME, "AppData", "Roaming", "Claude") : path14.join(HOME, "Library", "Application Support", "Claude"), "claude_desktop_config.json") },
@@ -12960,9 +12981,9 @@ function registerDoctorCommand(program3) {
12960
12981
  ];
12961
12982
  for (const agent of agents) {
12962
12983
  if (fs14.existsSync(agent.file)) {
12963
- console.log(import_chalk17.default.green(` \u2713 ${agent.name}`));
12984
+ console.log(import_chalk16.default.green(` \u2713 ${agent.name}`));
12964
12985
  } else {
12965
- console.log(import_chalk17.default.dim(` - ${agent.name} not configured`));
12986
+ console.log(import_chalk16.default.dim(` - ${agent.name} not configured`));
12966
12987
  }
12967
12988
  }
12968
12989
  if (opts.fixAgents) {
@@ -12970,14 +12991,14 @@ function registerDoctorCommand(program3) {
12970
12991
  const postinstall = path14.resolve(__dirname, "..", "..", "scripts", "postinstall.js");
12971
12992
  if (fs14.existsSync(postinstall)) {
12972
12993
  require(postinstall);
12973
- console.log(import_chalk17.default.green(" \u2713 re-ran postinstall agent setup"));
12994
+ console.log(import_chalk16.default.green(" \u2713 re-ran postinstall agent setup"));
12974
12995
  fixed++;
12975
12996
  }
12976
12997
  } catch {
12977
- console.log(import_chalk17.default.yellow(" ! could not re-run postinstall"));
12998
+ console.log(import_chalk16.default.yellow(" ! could not re-run postinstall"));
12978
12999
  }
12979
13000
  }
12980
- console.log(import_chalk17.default.dim("checking mcp server..."));
13001
+ console.log(import_chalk16.default.dim("checking mcp server..."));
12981
13002
  const claudeConfigFile = path14.join(
12982
13003
  IS_WIN ? path14.join(HOME, "AppData", "Roaming", "Claude") : path14.join(HOME, "Library", "Application Support", "Claude"),
12983
13004
  "claude_desktop_config.json"
@@ -12986,33 +13007,33 @@ function registerDoctorCommand(program3) {
12986
13007
  try {
12987
13008
  const cfg = JSON.parse(fs14.readFileSync(claudeConfigFile, "utf-8"));
12988
13009
  if (cfg.mcpServers?.hyv) {
12989
- console.log(import_chalk17.default.green(" \u2713 mcp configured for claude desktop"));
13010
+ console.log(import_chalk16.default.green(" \u2713 mcp configured for claude desktop"));
12990
13011
  } else {
12991
- console.log(import_chalk17.default.yellow(" ! mcp not configured \u2014 run: hyv init"));
13012
+ console.log(import_chalk16.default.yellow(" ! mcp not configured \u2014 run: hyv init"));
12992
13013
  issues++;
12993
13014
  }
12994
13015
  } catch {
12995
- console.log(import_chalk17.default.yellow(" ! could not read claude desktop config"));
13016
+ console.log(import_chalk16.default.yellow(" ! could not read claude desktop config"));
12996
13017
  }
12997
13018
  } else {
12998
- console.log(import_chalk17.default.dim(" - claude desktop not found"));
13019
+ console.log(import_chalk16.default.dim(" - claude desktop not found"));
12999
13020
  }
13000
13021
  console.log("");
13001
13022
  if (issues === 0 && fixed === 0) {
13002
- console.log(import_chalk17.default.green("\u2713 everything looks good!"));
13023
+ console.log(import_chalk16.default.green("\u2713 everything looks good!"));
13003
13024
  } else if (fixed > 0) {
13004
- console.log(import_chalk17.default.green(`\u2713 fixed ${fixed} issue(s)`));
13025
+ console.log(import_chalk16.default.green(`\u2713 fixed ${fixed} issue(s)`));
13005
13026
  if (issues > 0)
13006
- console.log(import_chalk17.default.yellow(`! ${issues} issue(s) remaining`));
13027
+ console.log(import_chalk16.default.yellow(`! ${issues} issue(s) remaining`));
13007
13028
  } else {
13008
- console.log(import_chalk17.default.yellow(`! ${issues} issue(s) found`));
13029
+ console.log(import_chalk16.default.yellow(`! ${issues} issue(s) found`));
13009
13030
  }
13010
- console.log(import_chalk17.default.dim("\nfree scan: hyv scan draft.md | full tour: hyv welcome\n"));
13031
+ console.log(import_chalk16.default.dim("\nfree scan: hyv scan draft.md | full tour: hyv welcome\n"));
13011
13032
  });
13012
13033
  }
13013
13034
 
13014
13035
  // src/commands/rename.ts
13015
- var import_chalk18 = __toESM(require_source());
13036
+ var import_chalk17 = __toESM(require_source());
13016
13037
  init_config();
13017
13038
  init_auth();
13018
13039
  function registerRenameCommand(program3) {
@@ -13020,26 +13041,26 @@ function registerRenameCommand(program3) {
13020
13041
  try {
13021
13042
  const trimmedName = newName.trim();
13022
13043
  if (!trimmedName) {
13023
- console.log(import_chalk18.default.red("\nerror: what do you want to name your profile?\n"));
13024
- console.log(import_chalk18.default.dim(' example: hyv rename "my brand voice"\n'));
13044
+ console.log(import_chalk17.default.red("\nerror: what do you want to name your profile?\n"));
13045
+ console.log(import_chalk17.default.dim(' example: hyv rename "my brand voice"\n'));
13025
13046
  process.exit(1);
13026
13047
  return;
13027
13048
  }
13028
13049
  if (trimmedName.length > 100) {
13029
- console.log(import_chalk18.default.red("\nerror: name is too long \u2014 keep it under 100 characters\n"));
13050
+ console.log(import_chalk17.default.red("\nerror: name is too long \u2014 keep it under 100 characters\n"));
13030
13051
  process.exit(1);
13031
13052
  return;
13032
13053
  }
13033
13054
  if (!/^[a-zA-Z0-9\s\-_'&.]+$/.test(trimmedName)) {
13034
- console.log(import_chalk18.default.red("\nerror: name contains invalid characters\n"));
13035
- console.log(import_chalk18.default.dim(" allowed: letters, numbers, spaces, hyphens, underscores, apostrophes\n"));
13055
+ console.log(import_chalk17.default.red("\nerror: name contains invalid characters\n"));
13056
+ console.log(import_chalk17.default.dim(" allowed: letters, numbers, spaces, hyphens, underscores, apostrophes\n"));
13036
13057
  process.exit(1);
13037
13058
  return;
13038
13059
  }
13039
13060
  const token = getToken();
13040
13061
  if (!token) {
13041
- console.log(import_chalk18.default.red("\nerror: you're not signed in yet\n"));
13042
- console.log(import_chalk18.default.dim(" run: hyv init\n"));
13062
+ console.log(import_chalk17.default.red("\nerror: you're not signed in yet\n"));
13063
+ console.log(import_chalk17.default.dim(" run: hyv init\n"));
13043
13064
  process.exit(1);
13044
13065
  return;
13045
13066
  }
@@ -13055,16 +13076,16 @@ function registerRenameCommand(program3) {
13055
13076
  );
13056
13077
  if (response.status === 200) {
13057
13078
  const data = response.data;
13058
- console.log(import_chalk18.default.green(`
13079
+ console.log(import_chalk17.default.green(`
13059
13080
  \u2713 profile renamed to ${data.profile?.name || trimmedName}
13060
13081
  `));
13061
13082
  } else {
13062
- console.log(import_chalk18.default.red(`
13083
+ console.log(import_chalk17.default.red(`
13063
13084
  error: server returned ${response.status}
13064
13085
  `));
13065
13086
  }
13066
13087
  } catch (error) {
13067
- console.error(import_chalk18.default.red(`
13088
+ console.error(import_chalk17.default.red(`
13068
13089
  error: ${error.message}
13069
13090
  `));
13070
13091
  process.exit(1);
@@ -13073,7 +13094,7 @@ error: ${error.message}
13073
13094
  }
13074
13095
 
13075
13096
  // src/commands/fix.ts
13076
- var import_chalk19 = __toESM(require_source());
13097
+ var import_chalk18 = __toESM(require_source());
13077
13098
  var fs15 = __toESM(require("fs"));
13078
13099
  var path15 = __toESM(require("path"));
13079
13100
  init_pipeline();
@@ -13090,9 +13111,9 @@ function registerFixCommand(program3) {
13090
13111
  if (options.format === "json") {
13091
13112
  console.log(JSON.stringify({ file: filePath, autoFixes: 0, llmIssues: result.stats.needsLLM, changes: [] }));
13092
13113
  } else {
13093
- console.log(import_chalk19.default.green("\n\u2713 No auto-fixable issues found."));
13114
+ console.log(import_chalk18.default.green("\n\u2713 No auto-fixable issues found."));
13094
13115
  if (result.stats.needsLLM > 0) {
13095
- console.log(import_chalk19.default.dim(` ${result.stats.needsLLM} issues need LLM rewrite \u2014 run: hyv rewrite ${file}`));
13116
+ console.log(import_chalk18.default.dim(` ${result.stats.needsLLM} issues need LLM rewrite \u2014 run: hyv rewrite ${file}`));
13096
13117
  }
13097
13118
  }
13098
13119
  return;
@@ -13106,16 +13127,16 @@ function registerFixCommand(program3) {
13106
13127
  fixed: options.dryRun ? void 0 : result.fixed
13107
13128
  }, null, 2));
13108
13129
  } else {
13109
- console.log(import_chalk19.default.dim(`
13130
+ console.log(import_chalk18.default.dim(`
13110
13131
  hyv fix ${filePath}
13111
13132
  `));
13112
13133
  for (const change of result.changes) {
13113
- console.log(import_chalk19.default.dim(` Line ${change.line}: `) + import_chalk19.default.red(change.before) + import_chalk19.default.dim(" \u2192 ") + import_chalk19.default.green(change.after));
13134
+ console.log(import_chalk18.default.dim(` Line ${change.line}: `) + import_chalk18.default.red(change.before) + import_chalk18.default.dim(" \u2192 ") + import_chalk18.default.green(change.after));
13114
13135
  }
13115
- console.log(import_chalk19.default.green(`
13136
+ console.log(import_chalk18.default.green(`
13116
13137
  \u2713 ${result.changes.length} auto-fix${result.changes.length === 1 ? "" : "es"} applied`));
13117
13138
  if (result.stats.needsLLM > 0) {
13118
- console.log(import_chalk19.default.dim(` ${result.stats.needsLLM} issues need LLM rewrite \u2014 run: hyv rewrite ${file}`));
13139
+ console.log(import_chalk18.default.dim(` ${result.stats.needsLLM} issues need LLM rewrite \u2014 run: hyv rewrite ${file}`));
13119
13140
  }
13120
13141
  }
13121
13142
  if (!options.dryRun) {
@@ -13123,7 +13144,7 @@ hyv fix ${filePath}
13123
13144
  const backupPath = filePath + ".bak";
13124
13145
  fs15.copyFileSync(filePath, backupPath);
13125
13146
  fs15.writeFileSync(filePath, result.fixed);
13126
- console.log(import_chalk19.default.dim(` Written to ${filePath} (backup: ${path15.basename(backupPath)})`));
13147
+ console.log(import_chalk18.default.dim(` Written to ${filePath} (backup: ${path15.basename(backupPath)})`));
13127
13148
  saveLastEditSession({
13128
13149
  original_path: filePath,
13129
13150
  edited_path: filePath,
@@ -13131,7 +13152,7 @@ hyv fix ${filePath}
13131
13152
  edited_text: result.fixed,
13132
13153
  profile: options.profile
13133
13154
  });
13134
- console.log(import_chalk19.default.dim(" Tip: hyv reinforce --last to teach your profile from this edit"));
13155
+ console.log(import_chalk18.default.dim(" Tip: hyv reinforce --last to teach your profile from this edit"));
13135
13156
  } else if (filePath === "stdin" || !options.inPlace) {
13136
13157
  process.stdout.write("\n" + result.fixed + "\n");
13137
13158
  if (filePath !== "stdin") {
@@ -13147,14 +13168,14 @@ hyv fix ${filePath}
13147
13168
  }
13148
13169
  await maybeShowLimitedModeHint(!!profile);
13149
13170
  } catch (error) {
13150
- console.error(import_chalk19.default.red(`Error: ${error.message}`));
13171
+ console.error(import_chalk18.default.red(`Error: ${error.message}`));
13151
13172
  process.exit(1);
13152
13173
  }
13153
13174
  });
13154
13175
  }
13155
13176
 
13156
13177
  // src/commands/check.ts
13157
- var import_chalk20 = __toESM(require_source());
13178
+ var import_chalk19 = __toESM(require_source());
13158
13179
  init_pipeline();
13159
13180
  init_local_profile();
13160
13181
  init_access();
@@ -13166,18 +13187,18 @@ function registerCheckCommand(program3) {
13166
13187
  if (text === "-") {
13167
13188
  const fs26 = require("fs");
13168
13189
  if (process.stdin.isTTY) {
13169
- console.error(import_chalk20.default.red("No input provided. Pipe content or pass text as argument."));
13190
+ console.error(import_chalk19.default.red("No input provided. Pipe content or pass text as argument."));
13170
13191
  process.exit(1);
13171
13192
  }
13172
13193
  inputText = fs26.readFileSync(0, "utf-8");
13173
13194
  }
13174
13195
  if (!inputText.trim()) {
13175
- console.error(import_chalk20.default.red("No text provided."));
13196
+ console.error(import_chalk19.default.red("No text provided."));
13176
13197
  process.exit(1);
13177
13198
  }
13178
13199
  const fs25 = require("fs");
13179
13200
  if (text !== "-" && fs25.existsSync(text)) {
13180
- console.log(import_chalk20.default.yellow(`"${text}" looks like a file. Did you mean: hyv scan ${text}`));
13201
+ console.log(import_chalk19.default.yellow(`"${text}" looks like a file. Did you mean: hyv scan ${text}`));
13181
13202
  process.exit(1);
13182
13203
  }
13183
13204
  const result = runPipeline(inputText, profile, false);
@@ -13201,30 +13222,30 @@ function registerCheckCommand(program3) {
13201
13222
  }, null, 2));
13202
13223
  } else {
13203
13224
  if (result.stats.totalSignals === 0) {
13204
- console.log(import_chalk20.default.green("\n\u2713 Clean \u2014 no AI patterns found."));
13205
- console.log(import_chalk20.default.dim(` score: ${result.score}/100`));
13225
+ console.log(import_chalk19.default.green("\n\u2713 Clean \u2014 no AI patterns found."));
13226
+ console.log(import_chalk19.default.dim(` score: ${result.score}/100`));
13206
13227
  } else {
13207
13228
  console.log("");
13208
13229
  printGroupedSignals(result.signalMap.signals.slice(0, 15), profile);
13209
13230
  if (result.signalMap.signals.length > 15) {
13210
- console.log(import_chalk20.default.dim(` ... and ${result.signalMap.signals.length - 15} more`));
13231
+ console.log(import_chalk19.default.dim(` ... and ${result.signalMap.signals.length - 15} more`));
13211
13232
  }
13212
- console.log(import_chalk20.default.yellow(`
13233
+ console.log(import_chalk19.default.yellow(`
13213
13234
  ${result.stats.totalSignals} issues (${result.stats.red} red, ${result.stats.yellow} yellow)`));
13214
- console.log(import_chalk20.default.dim(` score: ${result.score}/100`));
13235
+ console.log(import_chalk19.default.dim(` score: ${result.score}/100`));
13215
13236
  }
13216
13237
  await maybeShowLimitedModeHint(!!profile);
13217
13238
  }
13218
13239
  process.exit(result.stats.totalSignals > 0 ? 1 : 0);
13219
13240
  } catch (error) {
13220
- console.error(import_chalk20.default.red(`Error: ${error.message}`));
13241
+ console.error(import_chalk19.default.red(`Error: ${error.message}`));
13221
13242
  process.exit(1);
13222
13243
  }
13223
13244
  });
13224
13245
  }
13225
13246
 
13226
13247
  // src/commands/score.ts
13227
- var import_chalk21 = __toESM(require_source());
13248
+ var import_chalk20 = __toESM(require_source());
13228
13249
  init_pipeline();
13229
13250
  init_local_profile();
13230
13251
  function registerScoreCommand(program3) {
@@ -13249,14 +13270,14 @@ function registerScoreCommand(program3) {
13249
13270
  process.exit(1);
13250
13271
  }
13251
13272
  } catch (error) {
13252
- console.error(import_chalk21.default.red(`Error: ${error.message}`));
13273
+ console.error(import_chalk20.default.red(`Error: ${error.message}`));
13253
13274
  process.exit(1);
13254
13275
  }
13255
13276
  });
13256
13277
  }
13257
13278
 
13258
13279
  // src/commands/diff.ts
13259
- var import_chalk22 = __toESM(require_source());
13280
+ var import_chalk21 = __toESM(require_source());
13260
13281
  init_pipeline();
13261
13282
  init_local_profile();
13262
13283
  function registerDiffCommand(program3) {
@@ -13266,9 +13287,9 @@ function registerDiffCommand(program3) {
13266
13287
  const { text, path: filePath } = readText(file);
13267
13288
  const result = runPipeline(text, profile, true);
13268
13289
  if (result.changes.length === 0) {
13269
- console.log(import_chalk22.default.green("\n\u2713 No auto-fixable changes."));
13290
+ console.log(import_chalk21.default.green("\n\u2713 No auto-fixable changes."));
13270
13291
  if (result.stats.needsLLM > 0) {
13271
- console.log(import_chalk22.default.dim(` ${result.stats.needsLLM} issues need LLM rewrite`));
13292
+ console.log(import_chalk21.default.dim(` ${result.stats.needsLLM} issues need LLM rewrite`));
13272
13293
  }
13273
13294
  return;
13274
13295
  }
@@ -13283,42 +13304,42 @@ function registerDiffCommand(program3) {
13283
13304
  const originalLines = text.split("\n");
13284
13305
  const fixedLines = result.fixed.split("\n");
13285
13306
  const contextN = parseInt(options.context, 10);
13286
- console.log(import_chalk22.default.dim(`--- ${filePath}`));
13287
- console.log(import_chalk22.default.dim(`+++ ${filePath} (fixed)`));
13307
+ console.log(import_chalk21.default.dim(`--- ${filePath}`));
13308
+ console.log(import_chalk21.default.dim(`+++ ${filePath} (fixed)`));
13288
13309
  for (const change of result.changes) {
13289
13310
  const lineIdx = change.line - 1;
13290
13311
  const start = Math.max(0, lineIdx - contextN);
13291
13312
  const end = Math.min(originalLines.length, lineIdx + contextN + 1);
13292
- console.log(import_chalk22.default.dim(`@@ -${start + 1},${end - start} +${start + 1},${end - start} @@`));
13313
+ console.log(import_chalk21.default.dim(`@@ -${start + 1},${end - start} +${start + 1},${end - start} @@`));
13293
13314
  for (let i = start; i < end; i++) {
13294
13315
  if (i === lineIdx) {
13295
- console.log(import_chalk22.default.red(`-${originalLines[i]}`));
13296
- console.log(import_chalk22.default.green(`+${fixedLines[i]}`));
13316
+ console.log(import_chalk21.default.red(`-${originalLines[i]}`));
13317
+ console.log(import_chalk21.default.green(`+${fixedLines[i]}`));
13297
13318
  } else {
13298
- console.log(import_chalk22.default.dim(` ${originalLines[i]}`));
13319
+ console.log(import_chalk21.default.dim(` ${originalLines[i]}`));
13299
13320
  }
13300
13321
  }
13301
13322
  }
13302
- console.log(import_chalk22.default.green(`
13323
+ console.log(import_chalk21.default.green(`
13303
13324
  ${result.changes.length} auto-fix${result.changes.length === 1 ? "" : "es"} available`));
13304
- console.log(import_chalk22.default.dim(` run: hyv fix ${file} -i to apply`));
13325
+ console.log(import_chalk21.default.dim(` run: hyv fix ${file} -i to apply`));
13305
13326
  if (options.apply && filePath !== "stdin") {
13306
13327
  const fs25 = require("fs");
13307
13328
  const path23 = require("path");
13308
13329
  const backupPath = filePath + ".bak";
13309
13330
  fs25.copyFileSync(filePath, backupPath);
13310
13331
  fs25.writeFileSync(filePath, result.fixed);
13311
- console.log(import_chalk22.default.green(` \u2713 Applied. Backup: ${path23.basename(backupPath)}`));
13332
+ console.log(import_chalk21.default.green(` \u2713 Applied. Backup: ${path23.basename(backupPath)}`));
13312
13333
  }
13313
13334
  } catch (error) {
13314
- console.error(import_chalk22.default.red(`Error: ${error.message}`));
13335
+ console.error(import_chalk21.default.red(`Error: ${error.message}`));
13315
13336
  process.exit(1);
13316
13337
  }
13317
13338
  });
13318
13339
  }
13319
13340
 
13320
13341
  // src/commands/rules.ts
13321
- var import_chalk23 = __toESM(require_source());
13342
+ var import_chalk22 = __toESM(require_source());
13322
13343
  init_config();
13323
13344
  var RULE_CATALOG = [
13324
13345
  // AI Overused Words
@@ -13412,7 +13433,7 @@ function registerRulesCommand(program3) {
13412
13433
  for (const id of ids)
13413
13434
  disabledRules.delete(id);
13414
13435
  writeConfig({ ...config, disabled_rules: [...disabledRules] });
13415
- console.log(import_chalk23.default.green(`
13436
+ console.log(import_chalk22.default.green(`
13416
13437
  \u2713 Enabled: ${ids.join(", ")}`));
13417
13438
  return;
13418
13439
  }
@@ -13421,13 +13442,13 @@ function registerRulesCommand(program3) {
13421
13442
  for (const id of ids)
13422
13443
  disabledRules.add(id);
13423
13444
  writeConfig({ ...config, disabled_rules: [...disabledRules] });
13424
- console.log(import_chalk23.default.green(`
13445
+ console.log(import_chalk22.default.green(`
13425
13446
  \u2713 Disabled: ${ids.join(", ")}`));
13426
13447
  return;
13427
13448
  }
13428
13449
  if (options.reset) {
13429
13450
  writeConfig({ ...config, disabled_rules: [] });
13430
- console.log(import_chalk23.default.green("\n\u2713 All rules reset to default (enabled)"));
13451
+ console.log(import_chalk22.default.green("\n\u2713 All rules reset to default (enabled)"));
13431
13452
  return;
13432
13453
  }
13433
13454
  let rules = [...RULE_CATALOG];
@@ -13455,34 +13476,34 @@ function registerRulesCommand(program3) {
13455
13476
  }
13456
13477
  console.log("");
13457
13478
  for (const [cat, catRules] of categories) {
13458
- console.log(import_chalk23.default.bold(` ${cat} rules (${catRules.length})
13479
+ console.log(import_chalk22.default.bold(` ${cat} rules (${catRules.length})
13459
13480
  `));
13460
- console.log(import_chalk23.default.dim(" ID Sev AutoFix Status"));
13461
- console.log(import_chalk23.default.dim(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
13481
+ console.log(import_chalk22.default.dim(" ID Sev AutoFix Status"));
13482
+ console.log(import_chalk22.default.dim(" \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500"));
13462
13483
  for (const rule of catRules) {
13463
- const sev = rule.severity === "red" ? import_chalk23.default.red("red") : import_chalk23.default.yellow("yel");
13464
- const fix = rule.autoFixable ? import_chalk23.default.green(" \u2713") : import_chalk23.default.dim(" \u2717");
13465
- const enabled2 = disabledRules.has(rule.id) ? import_chalk23.default.red(" \u2717 disabled") : import_chalk23.default.green(" \u2713 enabled");
13484
+ const sev = rule.severity === "red" ? import_chalk22.default.red("red") : import_chalk22.default.yellow("yel");
13485
+ const fix = rule.autoFixable ? import_chalk22.default.green(" \u2713") : import_chalk22.default.dim(" \u2717");
13486
+ const enabled2 = disabledRules.has(rule.id) ? import_chalk22.default.red(" \u2717 disabled") : import_chalk22.default.green(" \u2713 enabled");
13466
13487
  const id = rule.id.padEnd(24);
13467
- console.log(` ${import_chalk23.default.dim(id)} ${sev} ${fix} ${enabled2}`);
13488
+ console.log(` ${import_chalk22.default.dim(id)} ${sev} ${fix} ${enabled2}`);
13468
13489
  }
13469
13490
  console.log("");
13470
13491
  }
13471
13492
  const enabled = rules.filter((r) => !disabledRules.has(r.id)).length;
13472
13493
  const disabled = rules.length - enabled;
13473
- console.log(import_chalk23.default.dim(` ${rules.length} rules, ${enabled} enabled, ${disabled} disabled`));
13474
- console.log(import_chalk23.default.dim(` toggle: hyv rules --disable <id>`));
13475
- console.log(import_chalk23.default.dim(` reset: hyv rules --reset
13494
+ console.log(import_chalk22.default.dim(` ${rules.length} rules, ${enabled} enabled, ${disabled} disabled`));
13495
+ console.log(import_chalk22.default.dim(` toggle: hyv rules --disable <id>`));
13496
+ console.log(import_chalk22.default.dim(` reset: hyv rules --reset
13476
13497
  `));
13477
13498
  } catch (error) {
13478
- console.error(import_chalk23.default.red(`Error: ${error.message}`));
13499
+ console.error(import_chalk22.default.red(`Error: ${error.message}`));
13479
13500
  process.exit(1);
13480
13501
  }
13481
13502
  });
13482
13503
  }
13483
13504
 
13484
13505
  // src/commands/batch.ts
13485
- var import_chalk24 = __toESM(require_source());
13506
+ var import_chalk23 = __toESM(require_source());
13486
13507
  var fs16 = __toESM(require("fs"));
13487
13508
  var path16 = __toESM(require("path"));
13488
13509
  init_pipeline();
@@ -13497,12 +13518,12 @@ function registerBatchCommand(program3) {
13497
13518
  nodir: true
13498
13519
  });
13499
13520
  if (files.length === 0) {
13500
- console.log(import_chalk24.default.yellow(`
13521
+ console.log(import_chalk23.default.yellow(`
13501
13522
  No files matching: ${pattern}`));
13502
13523
  return;
13503
13524
  }
13504
13525
  if (options.format === "text") {
13505
- console.log(import_chalk24.default.dim(`
13526
+ console.log(import_chalk23.default.dim(`
13506
13527
  scanning ${files.length} file${files.length === 1 ? "" : "s"}...
13507
13528
  `));
13508
13529
  }
@@ -13543,23 +13564,23 @@ No files matching: ${pattern}`));
13543
13564
  }
13544
13565
  } else {
13545
13566
  for (const r of results) {
13546
- const icon = r.issues > 0 ? import_chalk24.default.red("\u25CF") : import_chalk24.default.green("\u25CB");
13547
- const score = r.score < 60 ? import_chalk24.default.red(r.score) : r.score < 80 ? import_chalk24.default.yellow(r.score) : import_chalk24.default.green(r.score);
13548
- const issueStr = r.issues > 0 ? import_chalk24.default.red(`${r.issues} issues`) : import_chalk24.default.green("clean");
13567
+ const icon = r.issues > 0 ? import_chalk23.default.red("\u25CF") : import_chalk23.default.green("\u25CB");
13568
+ const score = r.score < 60 ? import_chalk23.default.red(r.score) : r.score < 80 ? import_chalk23.default.yellow(r.score) : import_chalk23.default.green(r.score);
13569
+ const issueStr = r.issues > 0 ? import_chalk23.default.red(`${r.issues} issues`) : import_chalk23.default.green("clean");
13549
13570
  console.log(` ${icon} ${r.file.padEnd(40)} ${issueStr.padEnd(20)} score: ${score}`);
13550
13571
  }
13551
13572
  const withIssues = results.filter((r) => r.issues > 0).length;
13552
13573
  const totalIssues = results.reduce((sum, r) => sum + r.issues, 0);
13553
13574
  const worst = results.reduce((min, r) => r.score < min.score ? r : min, results[0]);
13554
- console.log(import_chalk24.default.dim(`
13575
+ console.log(import_chalk23.default.dim(`
13555
13576
  \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500`));
13556
- console.log(import_chalk24.default.dim(` ${results.length} files, ${withIssues} with issues, ${totalIssues} total issues`));
13577
+ console.log(import_chalk23.default.dim(` ${results.length} files, ${withIssues} with issues, ${totalIssues} total issues`));
13557
13578
  if (withIssues > 0) {
13558
- console.log(import_chalk24.default.dim(` worst: ${worst.file} (${worst.score}/100)`));
13579
+ console.log(import_chalk23.default.dim(` worst: ${worst.file} (${worst.score}/100)`));
13559
13580
  }
13560
13581
  if (options.fix && options.inPlace) {
13561
13582
  const fixed = results.filter((r) => r.autoFixes > 0);
13562
- console.log(import_chalk24.default.green(`
13583
+ console.log(import_chalk23.default.green(`
13563
13584
  \u2713 ${fixed.reduce((sum, r) => sum + r.autoFixes, 0)} auto-fixes applied across ${fixed.length} files`));
13564
13585
  }
13565
13586
  }
@@ -13570,14 +13591,14 @@ No files matching: ${pattern}`));
13570
13591
  if (hasFailures)
13571
13592
  process.exit(1);
13572
13593
  } catch (error) {
13573
- console.error(import_chalk24.default.red(`Error: ${error.message}`));
13594
+ console.error(import_chalk23.default.red(`Error: ${error.message}`));
13574
13595
  process.exit(1);
13575
13596
  }
13576
13597
  });
13577
13598
  }
13578
13599
 
13579
13600
  // src/commands/watch.ts
13580
- var import_chalk25 = __toESM(require_source());
13601
+ var import_chalk24 = __toESM(require_source());
13581
13602
  var fs17 = __toESM(require("fs"));
13582
13603
  var path17 = __toESM(require("path"));
13583
13604
  init_pipeline();
@@ -13588,13 +13609,13 @@ function registerWatchCommand(program3) {
13588
13609
  const profile = await loadProfileForCommand(options.profile);
13589
13610
  const absPath = path17.resolve(file);
13590
13611
  if (!fs17.existsSync(absPath)) {
13591
- console.error(import_chalk25.default.red(`File not found: ${absPath}`));
13612
+ console.error(import_chalk24.default.red(`File not found: ${absPath}`));
13592
13613
  process.exit(1);
13593
13614
  }
13594
- console.log(import_chalk25.default.dim(`
13615
+ console.log(import_chalk24.default.dim(`
13595
13616
  watching ${absPath}`));
13596
- console.log(import_chalk25.default.dim(`command: ${options.command} debounce: ${options.debounce}ms`));
13597
- console.log(import_chalk25.default.dim("ctrl+c to stop\n"));
13617
+ console.log(import_chalk24.default.dim(`command: ${options.command} debounce: ${options.debounce}ms`));
13618
+ console.log(import_chalk24.default.dim("ctrl+c to stop\n"));
13598
13619
  let debounceTimer = null;
13599
13620
  const debounceMs = parseInt(options.debounce, 10);
13600
13621
  let scanCount = 0;
@@ -13604,37 +13625,37 @@ watching ${absPath}`));
13604
13625
  const result = runPipeline(text, profile, options.command === "fix");
13605
13626
  scanCount++;
13606
13627
  const now = (/* @__PURE__ */ new Date()).toLocaleTimeString("en-US", { hour12: false });
13607
- console.log(import_chalk25.default.dim(`[${now}] saved \u2014 ${options.command}ing...`));
13628
+ console.log(import_chalk24.default.dim(`[${now}] saved \u2014 ${options.command}ing...`));
13608
13629
  if (options.command === "score") {
13609
13630
  const score = result.score;
13610
- const color = score < 60 ? import_chalk25.default.red : score < 80 ? import_chalk25.default.yellow : import_chalk25.default.green;
13631
+ const color = score < 60 ? import_chalk24.default.red : score < 80 ? import_chalk24.default.yellow : import_chalk24.default.green;
13611
13632
  console.log(` ${color(score + "/100")}`);
13612
13633
  if (lastScore > 0 && score !== lastScore) {
13613
13634
  const delta = score - lastScore;
13614
- console.log(import_chalk25.default.dim(` ${delta > 0 ? "\u2191" : "\u2193"} ${Math.abs(delta)} from last scan`));
13635
+ console.log(import_chalk24.default.dim(` ${delta > 0 ? "\u2191" : "\u2193"} ${Math.abs(delta)} from last scan`));
13615
13636
  }
13616
13637
  lastScore = score;
13617
13638
  } else if (options.command === "fix") {
13618
13639
  if (result.changes.length > 0) {
13619
13640
  for (const change of result.changes) {
13620
- console.log(import_chalk25.default.dim(` Line ${change.line}: `) + import_chalk25.default.red(change.before) + import_chalk25.default.dim(" \u2192 ") + import_chalk25.default.green(change.after));
13641
+ console.log(import_chalk24.default.dim(` Line ${change.line}: `) + import_chalk24.default.red(change.before) + import_chalk24.default.dim(" \u2192 ") + import_chalk24.default.green(change.after));
13621
13642
  }
13622
13643
  fs17.writeFileSync(absPath, result.fixed);
13623
- console.log(import_chalk25.default.green(` \u2713 ${result.changes.length} auto-fixes applied`));
13644
+ console.log(import_chalk24.default.green(` \u2713 ${result.changes.length} auto-fixes applied`));
13624
13645
  } else {
13625
- console.log(import_chalk25.default.green(" \u2713 no auto-fixable issues"));
13646
+ console.log(import_chalk24.default.green(" \u2713 no auto-fixable issues"));
13626
13647
  }
13627
13648
  } else {
13628
13649
  if (result.stats.totalSignals === 0) {
13629
- console.log(import_chalk25.default.green(` \u2713 clean \u2014 score: ${result.score}/100`));
13650
+ console.log(import_chalk24.default.green(` \u2713 clean \u2014 score: ${result.score}/100`));
13630
13651
  } else {
13631
- console.log(import_chalk25.default.yellow(` ${result.stats.totalSignals} issues (${result.stats.red} red, ${result.stats.yellow} yellow) score: ${result.score}/100`));
13652
+ console.log(import_chalk24.default.yellow(` ${result.stats.totalSignals} issues (${result.stats.red} red, ${result.stats.yellow} yellow) score: ${result.score}/100`));
13632
13653
  for (const signal of result.signalMap.signals.slice(0, 3)) {
13633
- const sev = signal.severity === "red" ? import_chalk25.default.red("\u25CF") : import_chalk25.default.yellow("\u25CB");
13654
+ const sev = signal.severity === "red" ? import_chalk24.default.red("\u25CF") : import_chalk24.default.yellow("\u25CB");
13634
13655
  console.log(` ${sev} line ${signal.line}: ${signal.id} \u2014 ${signal.suggestion}`);
13635
13656
  }
13636
13657
  if (result.signalMap.signals.length > 3) {
13637
- console.log(import_chalk25.default.dim(` ... and ${result.signalMap.signals.length - 3} more`));
13658
+ console.log(import_chalk24.default.dim(` ... and ${result.signalMap.signals.length - 3} more`));
13638
13659
  }
13639
13660
  }
13640
13661
  }
@@ -13649,21 +13670,21 @@ watching ${absPath}`));
13649
13670
  debounceTimer = setTimeout(runScan, debounceMs);
13650
13671
  });
13651
13672
  process.on("SIGINT", () => {
13652
- console.log(import_chalk25.default.dim(`
13673
+ console.log(import_chalk24.default.dim(`
13653
13674
  ${scanCount} scans completed. exiting.`));
13654
13675
  process.exit(0);
13655
13676
  });
13656
13677
  await new Promise(() => {
13657
13678
  });
13658
13679
  } catch (error) {
13659
- console.error(import_chalk25.default.red(`Error: ${error.message}`));
13680
+ console.error(import_chalk24.default.red(`Error: ${error.message}`));
13660
13681
  process.exit(1);
13661
13682
  }
13662
13683
  });
13663
13684
  }
13664
13685
 
13665
13686
  // src/commands/demo.ts
13666
- var import_chalk26 = __toESM(require_source());
13687
+ var import_chalk25 = __toESM(require_source());
13667
13688
  var fs18 = __toESM(require("fs"));
13668
13689
  var SAMPLES = {
13669
13690
  linkedin: {
@@ -13754,46 +13775,46 @@ function registerDemoCommand(program3) {
13754
13775
  const style = options.clean ? "clean" : options.style;
13755
13776
  const sample = SAMPLES[style];
13756
13777
  if (!sample) {
13757
- console.error(import_chalk26.default.red(`Unknown style: ${options.style}. Valid: ${Object.keys(SAMPLES).filter((k) => k !== "clean").join(", ")}`));
13778
+ console.error(import_chalk25.default.red(`Unknown style: ${options.style}. Valid: ${Object.keys(SAMPLES).filter((k) => k !== "clean").join(", ")}`));
13758
13779
  process.exit(1);
13759
13780
  }
13760
13781
  if (options.output) {
13761
13782
  const outputPath = require("path").resolve(options.output);
13762
13783
  fs18.writeFileSync(outputPath, sample.text);
13763
- console.log(import_chalk26.default.green(`
13784
+ console.log(import_chalk25.default.green(`
13764
13785
  \u2713 Sample written to ${outputPath}`));
13765
13786
  if (sample.patterns.length > 0) {
13766
- console.log(import_chalk26.default.dim(` Contains ${sample.patterns.length} AI patterns: ${sample.patterns.slice(0, 5).join(", ")}...`));
13787
+ console.log(import_chalk25.default.dim(` Contains ${sample.patterns.length} AI patterns: ${sample.patterns.slice(0, 5).join(", ")}...`));
13767
13788
  }
13768
- console.log(import_chalk26.default.dim(`
13789
+ console.log(import_chalk25.default.dim(`
13769
13790
  Scan it: hyv scan ${options.output}`));
13770
- console.log(import_chalk26.default.dim(` Fix it: hyv fix ${options.output}`));
13791
+ console.log(import_chalk25.default.dim(` Fix it: hyv fix ${options.output}`));
13771
13792
  } else {
13772
- console.log(import_chalk26.default.bold(`
13793
+ console.log(import_chalk25.default.bold(`
13773
13794
  \u2500\u2500\u2500 sample (${style}) \u2500\u2500\u2500
13774
13795
  `));
13775
13796
  console.log(sample.text);
13776
- console.log(import_chalk26.default.dim(`
13797
+ console.log(import_chalk25.default.dim(`
13777
13798
  \u2500\u2500\u2500 end \u2500\u2500\u2500`));
13778
13799
  if (sample.patterns.length > 0) {
13779
- console.log(import_chalk26.default.dim(`
13800
+ console.log(import_chalk25.default.dim(`
13780
13801
  ${sample.patterns.length} AI patterns embedded: ${sample.patterns.slice(0, 8).join(", ")}...`));
13781
13802
  }
13782
- console.log(import_chalk26.default.dim(`
13803
+ console.log(import_chalk25.default.dim(`
13783
13804
  Save to file: hyv demo --output demo.md`));
13784
- console.log(import_chalk26.default.dim(` Scan it: hyv scan demo.md`));
13785
- console.log(import_chalk26.default.dim(` Fix it: hyv fix demo.md
13805
+ console.log(import_chalk25.default.dim(` Scan it: hyv scan demo.md`));
13806
+ console.log(import_chalk25.default.dim(` Fix it: hyv fix demo.md
13786
13807
  `));
13787
13808
  }
13788
13809
  } catch (error) {
13789
- console.error(import_chalk26.default.red(`Error: ${error.message}`));
13810
+ console.error(import_chalk25.default.red(`Error: ${error.message}`));
13790
13811
  process.exit(1);
13791
13812
  }
13792
13813
  });
13793
13814
  }
13794
13815
 
13795
13816
  // src/commands/open.ts
13796
- var import_chalk27 = __toESM(require_source());
13817
+ var import_chalk26 = __toESM(require_source());
13797
13818
  var PAGES = {
13798
13819
  dashboard: "https://holdyourvoice.com/dashboard",
13799
13820
  profiles: "https://holdyourvoice.com/dashboard",
@@ -13810,12 +13831,12 @@ function registerOpenCommand(program3) {
13810
13831
  return;
13811
13832
  }
13812
13833
  const open3 = (await Promise.resolve().then(() => __toESM(require_open()))).default;
13813
- console.log(import_chalk27.default.dim(`
13834
+ console.log(import_chalk26.default.dim(`
13814
13835
  Opening ${url}...`));
13815
13836
  await open3(url);
13816
- console.log(import_chalk27.default.green(" \u2713 Opened in browser\n"));
13837
+ console.log(import_chalk26.default.green(" \u2713 Opened in browser\n"));
13817
13838
  } catch (error) {
13818
- console.error(import_chalk27.default.red(`Error: ${error.message}`));
13839
+ console.error(import_chalk26.default.red(`Error: ${error.message}`));
13819
13840
  process.exit(1);
13820
13841
  }
13821
13842
  });
@@ -13864,7 +13885,7 @@ function registerWelcomeCommand(program3) {
13864
13885
  printWelcome({ skipDemo: opts.demo === false });
13865
13886
  markOnboardingComplete(pkgVersion3);
13866
13887
  };
13867
- program3.command("welcome").description("Show free capabilities and run a live local demo").option("--no-demo", "Skip the live scan demo").option("--quiet", "Suppress output").action(action);
13888
+ program3.command("welcome").description("Quick start: 4 steps, test scan, subscribe prompt").option("--no-demo", "Skip the sample scan line").option("--quiet", "Suppress output").action(action);
13868
13889
  program3.command("free").description("List everything free in the CLI and on the web").action(() => {
13869
13890
  console.log("\n" + formatFreeToolsList() + "\n");
13870
13891
  });
@@ -13873,22 +13894,11 @@ function getDemoText() {
13873
13894
  return formatDemoResult(runWelcomeDemo());
13874
13895
  }
13875
13896
  function getWelcomeText() {
13876
- const lines = [
13877
- "Hold Your Voice \u2014 make your AI agents sound exactly like you.",
13878
- "",
13879
- "Free local demo:",
13880
- formatDemoResult(runWelcomeDemo()),
13881
- "",
13882
- formatFreeToolsList(),
13883
- "",
13884
- "Ready for your voice? hyv init | hyv new my-voice",
13885
- "(Local free forever. Profiles + learning = paid power.)"
13886
- ];
13887
- return lines.join("\n");
13897
+ return buildWelcomeMessage({ skipDemo: false });
13888
13898
  }
13889
13899
 
13890
13900
  // src/commands/content.ts
13891
- var import_chalk28 = __toESM(require_source());
13901
+ var import_chalk27 = __toESM(require_source());
13892
13902
  init_free_paid();
13893
13903
  var TEMPLATES = {
13894
13904
  cursor: {
@@ -13962,29 +13972,29 @@ ${COMMUNITY_URL}`
13962
13972
  function registerContentCommand(program3) {
13963
13973
  program3.command("content").description("Blog outlines, CI snippets, and share templates").argument("[topic]", "cursor | agents | ci | share", "cursor").option("--list", "List available templates").action((topic, opts) => {
13964
13974
  if (opts.list) {
13965
- console.log(import_chalk28.default.bold("\nhyv content templates\n"));
13975
+ console.log(import_chalk27.default.bold("\nhyv content templates\n"));
13966
13976
  for (const [key, t2] of Object.entries(TEMPLATES)) {
13967
- console.log(import_chalk28.default.dim(` ${key}`) + ` \u2014 ${t2.title}`);
13977
+ console.log(import_chalk27.default.dim(` ${key}`) + ` \u2014 ${t2.title}`);
13968
13978
  }
13969
13979
  console.log("");
13970
13980
  return;
13971
13981
  }
13972
13982
  const t = TEMPLATES[topic] || TEMPLATES.cursor;
13973
- console.log(import_chalk28.default.bold(`
13983
+ console.log(import_chalk27.default.bold(`
13974
13984
  ${t.title}
13975
13985
  `));
13976
13986
  console.log(t.body);
13977
- console.log(import_chalk28.default.dim("\nBlog: https://holdyourvoice.com/blog\n"));
13987
+ console.log(import_chalk27.default.dim("\nBlog: https://holdyourvoice.com/blog\n"));
13978
13988
  });
13979
13989
  }
13980
13990
 
13981
13991
  // src/commands/upgrade.ts
13982
- var import_chalk29 = __toESM(require_source());
13992
+ var import_chalk28 = __toESM(require_source());
13983
13993
  var import_child_process2 = require("child_process");
13984
13994
  function registerUpgradeCommand(program3) {
13985
13995
  program3.command("upgrade").description("Upgrade to the latest @holdyourvoice/hyv").option("--check", "Only check if an update is available").action(async (opts) => {
13986
13996
  const current = getCliVersion();
13987
- console.log(import_chalk29.default.dim(`
13997
+ console.log(import_chalk28.default.dim(`
13988
13998
  Current: ${getEngineLabel()}
13989
13999
  `));
13990
14000
  let latest = current;
@@ -13992,29 +14002,29 @@ Current: ${getEngineLabel()}
13992
14002
  const out = (0, import_child_process2.execSync)("npm view @holdyourvoice/hyv version", { encoding: "utf-8", timeout: 15e3 });
13993
14003
  latest = out.trim();
13994
14004
  } catch {
13995
- console.log(import_chalk29.default.yellow("Could not reach npm registry. Try: npm i -g @holdyourvoice/hyv@latest"));
14005
+ console.log(import_chalk28.default.yellow("Could not reach npm registry. Try: npm i -g @holdyourvoice/hyv@latest"));
13996
14006
  return;
13997
14007
  }
13998
14008
  const cmp = compareSemver(current, latest);
13999
14009
  if (cmp === 0) {
14000
- console.log(import_chalk29.default.green("\u2713 You are on the latest version."));
14010
+ console.log(import_chalk28.default.green("\u2713 You are on the latest version."));
14001
14011
  return;
14002
14012
  }
14003
14013
  if (cmp > 0) {
14004
- console.log(import_chalk29.default.green(`\u2713 You are ahead of npm (published: ${latest}).`));
14014
+ console.log(import_chalk28.default.green(`\u2713 You are ahead of npm (published: ${latest}).`));
14005
14015
  return;
14006
14016
  }
14007
- console.log(import_chalk29.default.cyan(`Update available: ${current} \u2192 ${latest}`));
14017
+ console.log(import_chalk28.default.cyan(`Update available: ${current} \u2192 ${latest}`));
14008
14018
  if (opts.check) {
14009
- console.log(import_chalk29.default.dim("\nRun: hyv upgrade or npm i -g @holdyourvoice/hyv@latest\n"));
14019
+ console.log(import_chalk28.default.dim("\nRun: hyv upgrade or npm i -g @holdyourvoice/hyv@latest\n"));
14010
14020
  return;
14011
14021
  }
14012
- console.log(import_chalk29.default.dim("Installing..."));
14022
+ console.log(import_chalk28.default.dim("Installing..."));
14013
14023
  try {
14014
14024
  (0, import_child_process2.execSync)("npm i -g @holdyourvoice/hyv@latest", { stdio: "inherit" });
14015
- console.log(import_chalk29.default.green("\n\u2713 Upgraded successfully. Restart your terminal.\n"));
14025
+ console.log(import_chalk28.default.green("\n\u2713 Upgraded successfully. Restart your terminal.\n"));
14016
14026
  } catch {
14017
- console.log(import_chalk29.default.red("\nUpgrade failed. Run manually: npm i -g @holdyourvoice/hyv@latest\n"));
14027
+ console.log(import_chalk28.default.red("\nUpgrade failed. Run manually: npm i -g @holdyourvoice/hyv@latest\n"));
14018
14028
  process.exit(1);
14019
14029
  }
14020
14030
  });
@@ -14364,7 +14374,7 @@ async function toolClean(args2) {
14364
14374
  var TOOLS = [
14365
14375
  {
14366
14376
  name: "hyv_welcome",
14367
- description: "Show the Hold Your Voice onboarding experience: live free demo scan, all free CLI commands, and all free web tools. Call when the user is new, asks what hyv can do for free, or needs onboarding inside an agent.",
14377
+ description: "Show the Hold Your Voice quick start: 4 steps (install, scan, init, mcp), a sample scan line, and subscribe prompt. Call when the user is new or asks how to get started.",
14368
14378
  inputSchema: { type: "object", properties: {} }
14369
14379
  },
14370
14380
  {
@@ -14632,7 +14642,7 @@ async function startMcpServer() {
14632
14642
  }
14633
14643
 
14634
14644
  // src/lib/mcp-setup.ts
14635
- var import_chalk30 = __toESM(require_source());
14645
+ var import_chalk29 = __toESM(require_source());
14636
14646
  var fs22 = __toESM(require("fs"));
14637
14647
  var path21 = __toESM(require("path"));
14638
14648
  var os8 = __toESM(require("os"));
@@ -14640,96 +14650,96 @@ var HOME2 = os8.homedir();
14640
14650
  var IS_WIN2 = process.platform === "win32";
14641
14651
  function printMcpSetup() {
14642
14652
  const claudeConfig = IS_WIN2 ? path21.join(HOME2, "AppData", "Roaming", "Claude", "claude_desktop_config.json") : path21.join(HOME2, "Library", "Application Support", "Claude", "claude_desktop_config.json");
14643
- console.log(import_chalk30.default.bold("\nhold your voice \u2014 mcp setup\n"));
14644
- console.log(import_chalk30.default.dim(` ${getEngineLabel()}
14653
+ console.log(import_chalk29.default.bold("\nhold your voice \u2014 mcp setup\n"));
14654
+ console.log(import_chalk29.default.dim(` ${getEngineLabel()}
14645
14655
  `));
14646
- console.log(import_chalk30.default.bold("Claude Desktop"));
14647
- console.log(import_chalk30.default.dim(" Add to claude_desktop_config.json \u2192 mcpServers:"));
14648
- console.log(import_chalk30.default.cyan(' "hyv": { "command": "hyv", "args": ["mcp"] }'));
14649
- console.log(import_chalk30.default.dim(` Config file: ${claudeConfig}
14656
+ console.log(import_chalk29.default.bold("Claude Desktop"));
14657
+ console.log(import_chalk29.default.dim(" Add to claude_desktop_config.json \u2192 mcpServers:"));
14658
+ console.log(import_chalk29.default.cyan(' "hyv": { "command": "hyv", "args": ["mcp"] }'));
14659
+ console.log(import_chalk29.default.dim(` Config file: ${claudeConfig}
14650
14660
  `));
14651
- console.log(import_chalk30.default.bold("Cursor"));
14652
- console.log(import_chalk30.default.dim(" Rule file: ~/.cursor/rules/hyv.md"));
14653
- console.log(import_chalk30.default.dim(" Run: hyv doctor --fix-agents to copy latest instructions\n"));
14654
- console.log(import_chalk30.default.bold("Claude Code"));
14655
- console.log(import_chalk30.default.dim(" Command: ~/.claude/commands/hyv.md\n"));
14656
- console.log(import_chalk30.default.bold("Windsurf / Codex / ChatGPT"));
14657
- console.log(import_chalk30.default.dim(" hyv doctor --fix-agents copies agent files from the package\n"));
14658
- console.log(import_chalk30.default.bold("Verify"));
14659
- console.log(import_chalk30.default.dim(" hyv mcp --test"));
14660
- console.log(import_chalk30.default.dim(" HYV_TELEMETRY=1 hyv mcp (optional usage logging to ~/.hyv/telemetry/)\n"));
14661
+ console.log(import_chalk29.default.bold("Cursor"));
14662
+ console.log(import_chalk29.default.dim(" Rule file: ~/.cursor/rules/hyv.md"));
14663
+ console.log(import_chalk29.default.dim(" Run: hyv doctor --fix-agents to copy latest instructions\n"));
14664
+ console.log(import_chalk29.default.bold("Claude Code"));
14665
+ console.log(import_chalk29.default.dim(" Command: ~/.claude/commands/hyv.md\n"));
14666
+ console.log(import_chalk29.default.bold("Windsurf / Codex / ChatGPT"));
14667
+ console.log(import_chalk29.default.dim(" hyv doctor --fix-agents copies agent files from the package\n"));
14668
+ console.log(import_chalk29.default.bold("Verify"));
14669
+ console.log(import_chalk29.default.dim(" hyv mcp --test"));
14670
+ console.log(import_chalk29.default.dim(" HYV_TELEMETRY=1 hyv mcp (optional usage logging to ~/.hyv/telemetry/)\n"));
14661
14671
  }
14662
14672
  async function runMcpSelfTest() {
14663
- console.log(import_chalk30.default.bold("\nhold your voice \u2014 mcp self-test\n"));
14664
- console.log(import_chalk30.default.dim(` ${getEngineLabel()}
14673
+ console.log(import_chalk29.default.bold("\nhold your voice \u2014 mcp self-test\n"));
14674
+ console.log(import_chalk29.default.dim(` ${getEngineLabel()}
14665
14675
  `));
14666
14676
  let passed = 0;
14667
14677
  let failed = 0;
14668
14678
  const tools = getMcpToolNames();
14669
14679
  if (tools.length >= 10) {
14670
- console.log(import_chalk30.default.green(` \u2713 ${tools.length} MCP tools registered`));
14680
+ console.log(import_chalk29.default.green(` \u2713 ${tools.length} MCP tools registered`));
14671
14681
  passed++;
14672
14682
  } else {
14673
- console.log(import_chalk30.default.red(` \u2717 expected 10+ tools, got ${tools.length}`));
14683
+ console.log(import_chalk29.default.red(` \u2717 expected 10+ tools, got ${tools.length}`));
14674
14684
  failed++;
14675
14685
  }
14676
14686
  const required = ["hyv_welcome", "hyv_scan", "hyv_analyze", "hyv_clean", "hyv_validate"];
14677
14687
  for (const name of required) {
14678
14688
  if (tools.includes(name)) {
14679
- console.log(import_chalk30.default.green(` \u2713 tool: ${name}`));
14689
+ console.log(import_chalk29.default.green(` \u2713 tool: ${name}`));
14680
14690
  passed++;
14681
14691
  } else {
14682
- console.log(import_chalk30.default.red(` \u2717 missing tool: ${name}`));
14692
+ console.log(import_chalk29.default.red(` \u2717 missing tool: ${name}`));
14683
14693
  failed++;
14684
14694
  }
14685
14695
  }
14686
14696
  try {
14687
14697
  const welcome = await invokeMcpTool("hyv_welcome", {});
14688
14698
  if (welcome.includes("Hold Your Voice") || welcome.includes("hold your voice")) {
14689
- console.log(import_chalk30.default.green(" \u2713 hyv_welcome responds"));
14699
+ console.log(import_chalk29.default.green(" \u2713 hyv_welcome responds"));
14690
14700
  passed++;
14691
14701
  } else {
14692
- console.log(import_chalk30.default.red(" \u2717 hyv_welcome unexpected output"));
14702
+ console.log(import_chalk29.default.red(" \u2717 hyv_welcome unexpected output"));
14693
14703
  failed++;
14694
14704
  }
14695
14705
  } catch (e) {
14696
- console.log(import_chalk30.default.red(` \u2717 hyv_welcome failed: ${e.message}`));
14706
+ console.log(import_chalk29.default.red(` \u2717 hyv_welcome failed: ${e.message}`));
14697
14707
  failed++;
14698
14708
  }
14699
14709
  try {
14700
14710
  const demo = await invokeMcpTool("hyv_demo", {});
14701
14711
  if (demo.includes("Score") || demo.includes("issues")) {
14702
- console.log(import_chalk30.default.green(" \u2713 hyv_demo pipeline works"));
14712
+ console.log(import_chalk29.default.green(" \u2713 hyv_demo pipeline works"));
14703
14713
  passed++;
14704
14714
  } else {
14705
- console.log(import_chalk30.default.red(" \u2717 hyv_demo unexpected output"));
14715
+ console.log(import_chalk29.default.red(" \u2717 hyv_demo unexpected output"));
14706
14716
  failed++;
14707
14717
  }
14708
14718
  } catch (e) {
14709
- console.log(import_chalk30.default.red(` \u2717 hyv_demo failed: ${e.message}`));
14719
+ console.log(import_chalk29.default.red(` \u2717 hyv_demo failed: ${e.message}`));
14710
14720
  failed++;
14711
14721
  }
14712
14722
  const voiceMd = path21.join(HOME2, ".hyv", "voice.md");
14713
14723
  if (fs22.existsSync(voiceMd)) {
14714
- console.log(import_chalk30.default.green(" \u2713 voice profile found"));
14724
+ console.log(import_chalk29.default.green(" \u2713 voice profile found"));
14715
14725
  passed++;
14716
14726
  } else {
14717
- console.log(import_chalk30.default.dim(" - no voice.md (free local engine still works)"));
14727
+ console.log(import_chalk29.default.dim(" - no voice.md (free local engine still works)"));
14718
14728
  }
14719
14729
  if (getDemoText().length > 100) {
14720
- console.log(import_chalk30.default.green(" \u2713 demo content available"));
14730
+ console.log(import_chalk29.default.green(" \u2713 demo content available"));
14721
14731
  passed++;
14722
14732
  } else {
14723
- console.log(import_chalk30.default.red(" \u2717 demo content missing"));
14733
+ console.log(import_chalk29.default.red(" \u2717 demo content missing"));
14724
14734
  failed++;
14725
14735
  }
14726
14736
  console.log("");
14727
14737
  if (failed === 0) {
14728
- console.log(import_chalk30.default.green(`\u2713 all checks passed (${passed})`));
14729
- console.log(import_chalk30.default.dim("\nStart server: hyv mcp\n"));
14738
+ console.log(import_chalk29.default.green(`\u2713 all checks passed (${passed})`));
14739
+ console.log(import_chalk29.default.dim("\nStart server: hyv mcp\n"));
14730
14740
  return true;
14731
14741
  }
14732
- console.log(import_chalk30.default.yellow(`! ${failed} check(s) failed, ${passed} passed`));
14742
+ console.log(import_chalk29.default.yellow(`! ${failed} check(s) failed, ${passed} passed`));
14733
14743
  return false;
14734
14744
  }
14735
14745
 
@@ -14908,15 +14918,15 @@ program2.command("mcp").description("Start MCP server (for Claude Desktop and ot
14908
14918
  return;
14909
14919
  }
14910
14920
  if (opts.setupChatgpt) {
14911
- console.log(import_chalk31.default.bold("\nhold your voice \u2014 chatgpt setup\n"));
14921
+ console.log(import_chalk30.default.bold("\nhold your voice \u2014 chatgpt setup\n"));
14912
14922
  console.log("To connect HYV to ChatGPT:");
14913
- console.log(import_chalk31.default.dim(" 1. Go to ") + import_chalk31.default.cyan("https://chatgpt.com/#settings/Connectors"));
14914
- console.log(import_chalk31.default.dim(" 2. Add a new connector"));
14915
- console.log(import_chalk31.default.dim(" 3. For local MCP, use: ") + import_chalk31.default.cyan("hyv mcp"));
14916
- console.log(import_chalk31.default.dim(" 4. ChatGPT Desktop supports stdio MCP servers"));
14923
+ console.log(import_chalk30.default.dim(" 1. Go to ") + import_chalk30.default.cyan("https://chatgpt.com/#settings/Connectors"));
14924
+ console.log(import_chalk30.default.dim(" 2. Add a new connector"));
14925
+ console.log(import_chalk30.default.dim(" 3. For local MCP, use: ") + import_chalk30.default.cyan("hyv mcp"));
14926
+ console.log(import_chalk30.default.dim(" 4. ChatGPT Desktop supports stdio MCP servers"));
14917
14927
  console.log("");
14918
- console.log(import_chalk31.default.dim("Note: The remote HTTP MCP endpoint is not yet available."));
14919
- console.log(import_chalk31.default.dim("Use the local stdio MCP server with Claude Desktop or Claude Code instead."));
14928
+ console.log(import_chalk30.default.dim("Note: The remote HTTP MCP endpoint is not yet available."));
14929
+ console.log(import_chalk30.default.dim("Use the local stdio MCP server with Claude Desktop or Claude Code instead."));
14920
14930
  return;
14921
14931
  }
14922
14932
  startMcpServer();