@byh3071/vhk 0.8.0 → 0.8.1

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.
@@ -442,9 +442,16 @@ function platformCmd(cmd) {
442
442
  }
443
443
  return cmd;
444
444
  }
445
+ function resolveCmd(cmd, args) {
446
+ if (process.platform === "win32" && SHIM_BINARIES.has(cmd)) {
447
+ return { bin: "cmd.exe", argv: ["/d", "/s", "/c", `${cmd}.cmd`, ...args] };
448
+ }
449
+ return { bin: platformCmd(cmd), argv: args };
450
+ }
445
451
  function safeExecFile(cmd, args) {
452
+ const { bin, argv } = resolveCmd(cmd, args);
446
453
  try {
447
- const out = execFileSync(platformCmd(cmd), args, {
454
+ const out = execFileSync(bin, argv, {
448
455
  encoding: "utf-8",
449
456
  stdio: ["pipe", "pipe", "pipe"]
450
457
  }).toString();
@@ -455,8 +462,9 @@ function safeExecFile(cmd, args) {
455
462
  }
456
463
  }
457
464
  function safeExecFileStream(cmd, args) {
465
+ const { bin, argv } = resolveCmd(cmd, args);
458
466
  try {
459
- execFileSync(platformCmd(cmd), args, {
467
+ execFileSync(bin, argv, {
460
468
  encoding: "utf-8",
461
469
  stdio: "inherit"
462
470
  });
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  safeExecFileStream,
11
11
  startMcpServer,
12
12
  t
13
- } from "./chunk-NQ4V3VN4.js";
13
+ } from "./chunk-X3CIIDO2.js";
14
14
 
15
15
  // node_modules/.pnpm/ignore@7.0.5/node_modules/ignore/index.js
16
16
  var require_ignore = __commonJS({
@@ -310,7 +310,7 @@ var require_ignore = __commonJS({
310
310
  // path matching.
311
311
  // - check `string` either `MODE_IGNORE` or `MODE_CHECK_IGNORE`
312
312
  // @returns {TestResult} true if a file is ignored
313
- test(path15, checkUnignored, mode) {
313
+ test(path16, checkUnignored, mode) {
314
314
  let ignored = false;
315
315
  let unignored = false;
316
316
  let matchedRule;
@@ -319,7 +319,7 @@ var require_ignore = __commonJS({
319
319
  if (unignored === negative && ignored !== unignored || negative && !ignored && !unignored && !checkUnignored) {
320
320
  return;
321
321
  }
322
- const matched = rule[mode].test(path15);
322
+ const matched = rule[mode].test(path16);
323
323
  if (!matched) {
324
324
  return;
325
325
  }
@@ -340,17 +340,17 @@ var require_ignore = __commonJS({
340
340
  var throwError = (message, Ctor) => {
341
341
  throw new Ctor(message);
342
342
  };
343
- var checkPath = (path15, originalPath, doThrow) => {
344
- if (!isString(path15)) {
343
+ var checkPath = (path16, originalPath, doThrow) => {
344
+ if (!isString(path16)) {
345
345
  return doThrow(
346
346
  `path must be a string, but got \`${originalPath}\``,
347
347
  TypeError
348
348
  );
349
349
  }
350
- if (!path15) {
350
+ if (!path16) {
351
351
  return doThrow(`path must not be empty`, TypeError);
352
352
  }
353
- if (checkPath.isNotRelative(path15)) {
353
+ if (checkPath.isNotRelative(path16)) {
354
354
  const r = "`path.relative()`d";
355
355
  return doThrow(
356
356
  `path should be a ${r} string, but got "${originalPath}"`,
@@ -359,7 +359,7 @@ var require_ignore = __commonJS({
359
359
  }
360
360
  return true;
361
361
  };
362
- var isNotRelative = (path15) => REGEX_TEST_INVALID_PATH.test(path15);
362
+ var isNotRelative = (path16) => REGEX_TEST_INVALID_PATH.test(path16);
363
363
  checkPath.isNotRelative = isNotRelative;
364
364
  checkPath.convert = (p) => p;
365
365
  var Ignore = class {
@@ -389,19 +389,19 @@ var require_ignore = __commonJS({
389
389
  }
390
390
  // @returns {TestResult}
391
391
  _test(originalPath, cache, checkUnignored, slices) {
392
- const path15 = originalPath && checkPath.convert(originalPath);
392
+ const path16 = originalPath && checkPath.convert(originalPath);
393
393
  checkPath(
394
- path15,
394
+ path16,
395
395
  originalPath,
396
396
  this._strictPathCheck ? throwError : RETURN_FALSE
397
397
  );
398
- return this._t(path15, cache, checkUnignored, slices);
398
+ return this._t(path16, cache, checkUnignored, slices);
399
399
  }
400
- checkIgnore(path15) {
401
- if (!REGEX_TEST_TRAILING_SLASH.test(path15)) {
402
- return this.test(path15);
400
+ checkIgnore(path16) {
401
+ if (!REGEX_TEST_TRAILING_SLASH.test(path16)) {
402
+ return this.test(path16);
403
403
  }
404
- const slices = path15.split(SLASH).filter(Boolean);
404
+ const slices = path16.split(SLASH).filter(Boolean);
405
405
  slices.pop();
406
406
  if (slices.length) {
407
407
  const parent = this._t(
@@ -414,18 +414,18 @@ var require_ignore = __commonJS({
414
414
  return parent;
415
415
  }
416
416
  }
417
- return this._rules.test(path15, false, MODE_CHECK_IGNORE);
417
+ return this._rules.test(path16, false, MODE_CHECK_IGNORE);
418
418
  }
419
- _t(path15, cache, checkUnignored, slices) {
420
- if (path15 in cache) {
421
- return cache[path15];
419
+ _t(path16, cache, checkUnignored, slices) {
420
+ if (path16 in cache) {
421
+ return cache[path16];
422
422
  }
423
423
  if (!slices) {
424
- slices = path15.split(SLASH).filter(Boolean);
424
+ slices = path16.split(SLASH).filter(Boolean);
425
425
  }
426
426
  slices.pop();
427
427
  if (!slices.length) {
428
- return cache[path15] = this._rules.test(path15, checkUnignored, MODE_IGNORE);
428
+ return cache[path16] = this._rules.test(path16, checkUnignored, MODE_IGNORE);
429
429
  }
430
430
  const parent = this._t(
431
431
  slices.join(SLASH) + SLASH,
@@ -433,29 +433,29 @@ var require_ignore = __commonJS({
433
433
  checkUnignored,
434
434
  slices
435
435
  );
436
- return cache[path15] = parent.ignored ? parent : this._rules.test(path15, checkUnignored, MODE_IGNORE);
436
+ return cache[path16] = parent.ignored ? parent : this._rules.test(path16, checkUnignored, MODE_IGNORE);
437
437
  }
438
- ignores(path15) {
439
- return this._test(path15, this._ignoreCache, false).ignored;
438
+ ignores(path16) {
439
+ return this._test(path16, this._ignoreCache, false).ignored;
440
440
  }
441
441
  createFilter() {
442
- return (path15) => !this.ignores(path15);
442
+ return (path16) => !this.ignores(path16);
443
443
  }
444
444
  filter(paths) {
445
445
  return makeArray(paths).filter(this.createFilter());
446
446
  }
447
447
  // @returns {TestResult}
448
- test(path15) {
449
- return this._test(path15, this._testCache, true);
448
+ test(path16) {
449
+ return this._test(path16, this._testCache, true);
450
450
  }
451
451
  };
452
452
  var factory = (options) => new Ignore(options);
453
- var isPathValid = (path15) => checkPath(path15 && checkPath.convert(path15), path15, RETURN_FALSE);
453
+ var isPathValid = (path16) => checkPath(path16 && checkPath.convert(path16), path16, RETURN_FALSE);
454
454
  var setupWindows = () => {
455
455
  const makePosix = (str) => /^\\\\\?\\/.test(str) || /["<>|\u0000-\u001F]+/u.test(str) ? str : str.replace(/\\/g, "/");
456
456
  checkPath.convert = makePosix;
457
457
  const REGEX_TEST_WINDOWS_PATH_ABSOLUTE = /^[a-z]:\//i;
458
- checkPath.isNotRelative = (path15) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path15) || isNotRelative(path15);
458
+ checkPath.isNotRelative = (path16) => REGEX_TEST_WINDOWS_PATH_ABSOLUTE.test(path16) || isNotRelative(path16);
459
459
  };
460
460
  if (
461
461
  // Detect `process` so that it can run in browsers.
@@ -473,6 +473,9 @@ var require_ignore = __commonJS({
473
473
  // src/index.ts
474
474
  import { Command, Help } from "commander";
475
475
  import inquirer12 from "inquirer";
476
+ import fs16 from "fs";
477
+ import path15 from "path";
478
+ import { fileURLToPath as fileURLToPath3 } from "url";
476
479
 
477
480
  // src/lib/nlp-router.ts
478
481
  function normalize(input) {
@@ -508,7 +511,7 @@ var RULES = [
508
511
  command: "init",
509
512
  explanation: "\uD504\uB85C\uC81D\uD2B8 \uC2DC\uC791 (vhk \uC2DC\uC791)",
510
513
  confidence: "high",
511
- test: (t2) => /프로젝트.*(만들|시작)|폴더.*만들|만들고\s*싶|하네스|초기화/.test(t2) || /^시작$/.test(t2)
514
+ test: (t2) => (/프로젝트.*(만들|시작)|폴더.*만들|만들고\s*싶|하네스|초기화/.test(t2) || /^시작$/.test(t2)) && !/디자인|design|팔레트|palette|테마|theme|레퍼런스|reference|다크\s*모드|라이트\s*모드|색상\s*모드/.test(t2)
512
515
  },
513
516
  {
514
517
  command: "mcp-init",
@@ -526,13 +529,13 @@ var RULES = [
526
529
  command: "design",
527
530
  explanation: "\uB514\uC790\uC778 \uD1A0\uD070 \uC0DD\uC131 (vhk design)",
528
531
  confidence: "high",
529
- test: (t2) => /디자인\s*(토큰|시스템|만들|생성|셋업|설정)|design\s*(token|system|setup)|토큰\s*만들|css\s*변수.*만들|tailwind\s*(컬러|설정)/.test(t2)
532
+ test: (t2) => /디자인\s*(토큰|시스템|만들|생성|셋업|설정)|design\s*(token|system|setup)|토큰\s*만들|css\s*변수.*만들|tailwind\s*(컬러|설정)/.test(t2) && !/배포|deploy|vercel|netlify|cloudflare|wrangler|출시|publish|npm/.test(t2)
530
533
  },
531
534
  {
532
535
  command: "theme",
533
536
  explanation: "\uB2E4\uD06C/\uB77C\uC774\uD2B8 \uD14C\uB9C8 \uC801\uC6A9 (vhk theme)",
534
537
  confidence: "high",
535
- test: (t2) => /테마(?!\s*(파일|이름))|theme|다크\s*모드|라이트\s*모드|dark\s*mode|light\s*mode|색상\s*모드|모드\s*전환/.test(t2)
538
+ test: (t2) => /테마(?!\s*(파일|이름))|theme|다크\s*모드|라이트\s*모드|dark\s*mode|light\s*mode|색상\s*모드|모드\s*전환/.test(t2) && !/보안|시크릿|비밀|키\s*유출|secure|scan|스캔|배포|deploy/.test(t2)
536
539
  },
537
540
  {
538
541
  command: "ref",
@@ -3567,17 +3570,21 @@ async function publish() {
3567
3570
  console.log(chalk17.gray("\uCDE8\uC18C\uB428. \uBC84\uC804\uC774 \uC6D0\uB798\uB300\uB85C \uBCF5\uAD6C\uB429\uB2C8\uB2E4."));
3568
3571
  return;
3569
3572
  }
3570
- const pubSpinner = ora2(t("publish.publishing")).start();
3571
- const pubResult = safeExecFile("npm", ["publish", "--access", "public"]);
3573
+ console.log(chalk17.cyan(`
3574
+ \u{1F4E4} ${t("publish.publishing")}`));
3575
+ console.log(chalk17.gray(" 2FA \uD65C\uC131\uD654 \uC2DC: OTP 6\uC790\uB9AC \uC785\uB825 \uB610\uB294 \uBE0C\uB77C\uC6B0\uC800 \uC778\uC99D URL \uD074\uB9AD (Windows Hello / PIN \uC9C0\uC6D0)"));
3576
+ const pubResult = safeExecFileStream("npm", ["publish", "--access", "public"]);
3572
3577
  if (!pubResult.ok) {
3573
- pubSpinner.fail(t("publish.publishFailed"));
3578
+ console.log(chalk17.red(`
3579
+ \u2716 ${t("publish.publishFailed")}`));
3574
3580
  console.log(chalk17.red(pubResult.err.slice(0, 500)));
3575
3581
  pkg.version = currentVersion;
3576
3582
  writeFileSync2("package.json", JSON.stringify(pkg, null, 2) + "\n", "utf-8");
3577
3583
  console.log(chalk17.gray(`\u{1F4E6} package.json \uBC84\uC804\uC744 v${currentVersion}\uB85C \uBCF5\uAD6C\uD588\uC2B5\uB2C8\uB2E4.`));
3578
3584
  return;
3579
3585
  }
3580
- pubSpinner.succeed(t("publish.publishSuccess"));
3586
+ console.log(chalk17.green(`
3587
+ \u2714 ${t("publish.publishSuccess")}`));
3581
3588
  const addResult = safeExecFile("git", ["add", "package.json"]);
3582
3589
  if (addResult.ok) {
3583
3590
  safeExecFile("git", ["commit", "-m", `chore: release v${newVersion}`]);
@@ -4004,6 +4011,20 @@ async function runNaturalLanguageRoute(input) {
4004
4011
  }
4005
4012
 
4006
4013
  // src/index.ts
4014
+ function getVersion() {
4015
+ const dir = path15.dirname(fileURLToPath3(import.meta.url));
4016
+ for (const pkgPath of [path15.join(dir, "../package.json"), path15.join(dir, "../../package.json")]) {
4017
+ try {
4018
+ if (fs16.existsSync(pkgPath)) {
4019
+ const pkg = JSON.parse(fs16.readFileSync(pkgPath, "utf-8"));
4020
+ if (pkg.version) return pkg.version;
4021
+ }
4022
+ } catch {
4023
+ continue;
4024
+ }
4025
+ }
4026
+ return "0.0.0";
4027
+ }
4007
4028
  var program = new Command();
4008
4029
  var defaultHelp = new Help();
4009
4030
  var KO_ALIASES = {
@@ -4028,7 +4049,7 @@ var KO_ALIASES = {
4028
4049
  theme: "\uD14C\uB9C8",
4029
4050
  ref: "\uB808\uD37C\uB7F0\uC2A4"
4030
4051
  };
4031
- program.name("vhk").description("VHK \u2014 \uBC14\uC774\uBE0C\uCF54\uB529 \uD504\uB85C\uC81D\uD2B8 \uCF54\uCE58 (\uD55C\uAD6D\uC5B4\uB85C \uC548\uB0B4\uD569\uB2C8\uB2E4)").version("0.8.0");
4052
+ program.name("vhk").description("VHK \u2014 \uBC14\uC774\uBE0C\uCF54\uB529 \uD504\uB85C\uC81D\uD2B8 \uCF54\uCE58 (\uD55C\uAD6D\uC5B4\uB85C \uC548\uB0B4\uD569\uB2C8\uB2E4)").version(getVersion());
4032
4053
  program.configureHelp({
4033
4054
  formatHelp(cmd, helper) {
4034
4055
  if (cmd.parent) {
package/dist/mcp/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  startMcpServer
4
- } from "../chunk-NQ4V3VN4.js";
4
+ } from "../chunk-X3CIIDO2.js";
5
5
 
6
6
  // src/mcp/index.ts
7
7
  startMcpServer().catch((err) => {
package/package.json CHANGED
@@ -1,65 +1,65 @@
1
- {
2
- "name": "@byh3071/vhk",
3
- "version": "0.8.0",
4
- "description": "Vibe Harness Kit — 바이브코딩 풀사이클 CLI",
5
- "bin": {
6
- "vhk": "dist/index.js",
7
- "vhk-mcp": "dist/mcp/index.js"
8
- },
9
- "type": "module",
10
- "scripts": {
11
- "dev": "tsx src/index.ts",
12
- "build": "tsup",
13
- "test": "vitest",
14
- "test:run": "vitest --run",
15
- "prepublishOnly": "pnpm build && pnpm test:run",
16
- "save": "vhk save",
17
- "check": "vhk check",
18
- "scan": "vhk secure scan",
19
- "recap": "vhk recap",
20
- "ship": "vhk ship",
21
- "doctor": "vhk doctor"
22
- },
23
- "files": [
24
- "dist",
25
- "README.md",
26
- "LICENSE"
27
- ],
28
- "keywords": [
29
- "vibe-coding",
30
- "harness",
31
- "cli",
32
- "scaffold",
33
- "session-log",
34
- "rules-sync"
35
- ],
36
- "author": "byh3071 <byh3071@gmail.com>",
37
- "license": "MIT",
38
- "repository": {
39
- "type": "git",
40
- "url": "git+https://github.com/byh3071-cpu/vhk.git"
41
- },
42
- "engines": {
43
- "node": ">=20"
44
- },
45
- "dependencies": {
46
- "@modelcontextprotocol/sdk": "^1.29.0",
47
- "@notionhq/client": "^5.22.0",
48
- "chalk": "^5.6.2",
49
- "commander": "^14.0.3",
50
- "handlebars": "^4.7.9",
51
- "inquirer": "^9.3.8",
52
- "ora": "^9.4.0",
53
- "simple-git": "^3.36.0",
54
- "zod": "^4.4.3"
55
- },
56
- "devDependencies": {
57
- "@types/inquirer": "^9.0.9",
58
- "@types/node": "^25.9.1",
59
- "ignore": "^7.0.5",
60
- "tsup": "^8.5.1",
61
- "tsx": "^4.22.3",
62
- "typescript": "^6.0.3",
63
- "vitest": "^4.1.7"
64
- }
65
- }
1
+ {
2
+ "name": "@byh3071/vhk",
3
+ "version": "0.8.1",
4
+ "description": "Vibe Harness Kit — 바이브코딩 풀사이클 CLI",
5
+ "bin": {
6
+ "vhk": "dist/index.js",
7
+ "vhk-mcp": "dist/mcp/index.js"
8
+ },
9
+ "type": "module",
10
+ "scripts": {
11
+ "dev": "tsx src/index.ts",
12
+ "build": "tsup",
13
+ "test": "vitest",
14
+ "test:run": "vitest --run",
15
+ "prepublishOnly": "pnpm build && pnpm test:run",
16
+ "save": "vhk save",
17
+ "check": "vhk check",
18
+ "scan": "vhk secure scan",
19
+ "recap": "vhk recap",
20
+ "ship": "vhk ship",
21
+ "doctor": "vhk doctor"
22
+ },
23
+ "files": [
24
+ "dist",
25
+ "README.md",
26
+ "LICENSE"
27
+ ],
28
+ "keywords": [
29
+ "vibe-coding",
30
+ "harness",
31
+ "cli",
32
+ "scaffold",
33
+ "session-log",
34
+ "rules-sync"
35
+ ],
36
+ "author": "byh3071 <byh3071@gmail.com>",
37
+ "license": "MIT",
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/byh3071-cpu/vhk.git"
41
+ },
42
+ "engines": {
43
+ "node": ">=20"
44
+ },
45
+ "dependencies": {
46
+ "@modelcontextprotocol/sdk": "^1.29.0",
47
+ "@notionhq/client": "^5.22.0",
48
+ "chalk": "^5.6.2",
49
+ "commander": "^14.0.3",
50
+ "handlebars": "^4.7.9",
51
+ "inquirer": "^9.3.8",
52
+ "ora": "^9.4.0",
53
+ "simple-git": "^3.36.0",
54
+ "zod": "^4.4.3"
55
+ },
56
+ "devDependencies": {
57
+ "@types/inquirer": "^9.0.9",
58
+ "@types/node": "^25.9.1",
59
+ "ignore": "^7.0.5",
60
+ "tsup": "^8.5.1",
61
+ "tsx": "^4.22.3",
62
+ "typescript": "^6.0.3",
63
+ "vitest": "^4.1.7"
64
+ }
65
+ }