@su-record/vibe 2.5.12 → 2.5.13

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.
Files changed (108) hide show
  1. package/commands/vibe.analyze.md +3 -3
  2. package/commands/vibe.review.md +3 -3
  3. package/commands/vibe.run.md +75 -9
  4. package/commands/vibe.spec.md +7 -7
  5. package/commands/vibe.utils.md +62 -5
  6. package/dist/cli/setup/GlobalInstaller.d.ts +24 -0
  7. package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -0
  8. package/dist/cli/setup/GlobalInstaller.js +130 -0
  9. package/dist/cli/setup/GlobalInstaller.js.map +1 -0
  10. package/dist/cli/setup/LanguageDetector.d.ts +16 -0
  11. package/dist/cli/setup/LanguageDetector.d.ts.map +1 -0
  12. package/dist/cli/setup/LanguageDetector.js +49 -0
  13. package/dist/cli/setup/LanguageDetector.js.map +1 -0
  14. package/dist/cli/setup/LegacyMigration.d.ts +25 -0
  15. package/dist/cli/setup/LegacyMigration.d.ts.map +1 -0
  16. package/dist/cli/setup/LegacyMigration.js +162 -0
  17. package/dist/cli/setup/LegacyMigration.js.map +1 -0
  18. package/dist/cli/setup/ProjectSetup.d.ts +30 -0
  19. package/dist/cli/setup/ProjectSetup.d.ts.map +1 -0
  20. package/dist/cli/setup/ProjectSetup.js +238 -0
  21. package/dist/cli/setup/ProjectSetup.js.map +1 -0
  22. package/dist/cli/setup/index.d.ts +14 -0
  23. package/dist/cli/setup/index.d.ts.map +1 -0
  24. package/dist/cli/setup/index.js +18 -0
  25. package/dist/cli/setup/index.js.map +1 -0
  26. package/dist/cli/setup.d.ts +10 -77
  27. package/dist/cli/setup.d.ts.map +1 -1
  28. package/dist/cli/setup.js +15 -592
  29. package/dist/cli/setup.js.map +1 -1
  30. package/dist/lib/llm/auth/ApiKeyManager.d.ts +21 -0
  31. package/dist/lib/llm/auth/ApiKeyManager.d.ts.map +1 -0
  32. package/dist/lib/llm/auth/ApiKeyManager.js +43 -0
  33. package/dist/lib/llm/auth/ApiKeyManager.js.map +1 -0
  34. package/dist/lib/llm/auth/ConfigManager.d.ts +29 -0
  35. package/dist/lib/llm/auth/ConfigManager.d.ts.map +1 -0
  36. package/dist/lib/llm/auth/ConfigManager.js +67 -0
  37. package/dist/lib/llm/auth/ConfigManager.js.map +1 -0
  38. package/dist/lib/llm/auth/index.d.ts +25 -0
  39. package/dist/lib/llm/auth/index.d.ts.map +1 -0
  40. package/dist/lib/llm/auth/index.js +83 -0
  41. package/dist/lib/llm/auth/index.js.map +1 -0
  42. package/dist/lib/llm/index.d.ts +10 -0
  43. package/dist/lib/llm/index.d.ts.map +1 -0
  44. package/dist/lib/llm/index.js +12 -0
  45. package/dist/lib/llm/index.js.map +1 -0
  46. package/dist/lib/llm/types.d.ts +96 -0
  47. package/dist/lib/llm/types.d.ts.map +1 -0
  48. package/dist/lib/llm/types.js +17 -0
  49. package/dist/lib/llm/types.js.map +1 -0
  50. package/dist/lib/llm/utils/index.d.ts +6 -0
  51. package/dist/lib/llm/utils/index.d.ts.map +1 -0
  52. package/dist/lib/llm/utils/index.js +6 -0
  53. package/dist/lib/llm/utils/index.js.map +1 -0
  54. package/dist/lib/llm/utils/retry.d.ts +25 -0
  55. package/dist/lib/llm/utils/retry.d.ts.map +1 -0
  56. package/dist/lib/llm/utils/retry.js +72 -0
  57. package/dist/lib/llm/utils/retry.js.map +1 -0
  58. package/dist/lib/llm/utils/stream.d.ts +13 -0
  59. package/dist/lib/llm/utils/stream.d.ts.map +1 -0
  60. package/dist/lib/llm/utils/stream.js +110 -0
  61. package/dist/lib/llm/utils/stream.js.map +1 -0
  62. package/dist/orchestrator/AgentExecutor.d.ts +23 -0
  63. package/dist/orchestrator/AgentExecutor.d.ts.map +1 -0
  64. package/dist/orchestrator/AgentExecutor.js +231 -0
  65. package/dist/orchestrator/AgentExecutor.js.map +1 -0
  66. package/dist/orchestrator/AgentManager.d.ts +73 -0
  67. package/dist/orchestrator/AgentManager.d.ts.map +1 -0
  68. package/dist/orchestrator/AgentManager.js +184 -0
  69. package/dist/orchestrator/AgentManager.js.map +1 -0
  70. package/dist/orchestrator/LLMCluster.d.ts +70 -0
  71. package/dist/orchestrator/LLMCluster.d.ts.map +1 -0
  72. package/dist/orchestrator/LLMCluster.js +91 -0
  73. package/dist/orchestrator/LLMCluster.js.map +1 -0
  74. package/dist/orchestrator/MultiLlmResearch.d.ts +27 -0
  75. package/dist/orchestrator/MultiLlmResearch.d.ts.map +1 -0
  76. package/dist/orchestrator/MultiLlmResearch.js +145 -0
  77. package/dist/orchestrator/MultiLlmResearch.js.map +1 -0
  78. package/dist/orchestrator/SessionStore.d.ts +41 -0
  79. package/dist/orchestrator/SessionStore.d.ts.map +1 -0
  80. package/dist/orchestrator/SessionStore.js +117 -0
  81. package/dist/orchestrator/SessionStore.js.map +1 -0
  82. package/dist/orchestrator/SmartRouter.d.ts +68 -0
  83. package/dist/orchestrator/SmartRouter.d.ts.map +1 -0
  84. package/dist/orchestrator/SmartRouter.js +256 -0
  85. package/dist/orchestrator/SmartRouter.js.map +1 -0
  86. package/dist/orchestrator/backgroundAgent.d.ts +10 -27
  87. package/dist/orchestrator/backgroundAgent.d.ts.map +1 -1
  88. package/dist/orchestrator/backgroundAgent.js +11 -345
  89. package/dist/orchestrator/backgroundAgent.js.map +1 -1
  90. package/dist/orchestrator/index.d.ts +3 -0
  91. package/dist/orchestrator/index.d.ts.map +1 -1
  92. package/dist/orchestrator/index.js +4 -0
  93. package/dist/orchestrator/index.js.map +1 -1
  94. package/dist/orchestrator/orchestrator.d.ts +19 -154
  95. package/dist/orchestrator/orchestrator.d.ts.map +1 -1
  96. package/dist/orchestrator/orchestrator.js +90 -514
  97. package/dist/orchestrator/orchestrator.js.map +1 -1
  98. package/dist/orchestrator/parallelResearch.d.ts +5 -12
  99. package/dist/orchestrator/parallelResearch.d.ts.map +1 -1
  100. package/dist/orchestrator/parallelResearch.js +10 -193
  101. package/dist/orchestrator/parallelResearch.js.map +1 -1
  102. package/hooks/scripts/generate-brand-assets.js +472 -0
  103. package/package.json +1 -1
  104. package/skills/brand-assets.md +141 -0
  105. package/skills/commerce-patterns.md +361 -0
  106. package/skills/e2e-commerce.md +304 -0
  107. package/skills/frontend-design.md +92 -0
  108. package/skills/seo-checklist.md +244 -0
@@ -281,9 +281,9 @@ Score = Σ(checked items × weight) / 100
281
281
 
282
282
  Grades:
283
283
  - 95-100: ✅ EXCELLENT - Comprehensive analysis
284
- - 85-94: GOOD - Ready for development
285
- - 70-84: ⚠️ FAIR - Needs more exploration
286
- - 0-69: ❌ POOR - Incomplete, re-analyze
284
+ - 90-94: ⚠️ GOOD - Additional exploration recommended
285
+ - 80-89: ⚠️ FAIR - Needs more exploration
286
+ - 0-79: ❌ POOR - Incomplete, re-analyze
287
287
  ```
288
288
 
289
289
  ### Analysis Depth Levels
@@ -265,9 +265,9 @@ Score = 100 - (P1 × 20) - (P2 × 5) - (P3 × 1)
265
265
 
266
266
  Grades:
267
267
  - 95-100: ✅ EXCELLENT - Merge ready
268
- - 85-94: GOOD - Minor fixes recommended
269
- - 70-84: ⚠️ FAIR - Must fix P2 issues
270
- - 0-69: ❌ POOR - Block merge, fix P1/P2
268
+ - 90-94: ⚠️ GOOD - Minor fixes required before merge
269
+ - 80-89: ⚠️ FAIR - Must fix P2 issues
270
+ - 0-79: ❌ POOR - Block merge, fix P1/P2
271
271
  ```
272
272
 
273
273
  ### Merge Decision Matrix
@@ -643,7 +643,73 @@ Phase N+1 Start (IMMEDIATE - exploration already done!)
643
643
  3. **Constraint compliance**: Check `<constraints>`
644
644
  4. **Run verification**: Execute verification commands
645
645
 
646
- ### 4. Gemini Code Review + Auto-Fix (NEW)
646
+ ### 4. Brand Assets Generation (Optional)
647
+
648
+ When starting a **new project** with brand context in SPEC, auto-generate app icons and favicons:
649
+
650
+ ```
651
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
652
+ 🎨 BRAND ASSETS GENERATION
653
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
654
+
655
+ [Check] Brand assets exist? → Skip if favicon.ico exists
656
+ [Check] Gemini API configured? → Required for image generation
657
+ [Check] SPEC has brand context? → Extract app name, colors, style
658
+
659
+ [Generate] Creating app icon with Gemini Image API...
660
+ - Prompt: "App icon for [AppName], [style], [color]..."
661
+ - Generated: 512x512 master icon
662
+
663
+ [Resize] Creating platform variants...
664
+ ✅ favicon.ico (16/32/48)
665
+ ✅ favicon-16x16.png
666
+ ✅ favicon-32x32.png
667
+ ✅ apple-touch-icon.png (180x180)
668
+ ✅ android-chrome-192x192.png
669
+ ✅ android-chrome-512x512.png
670
+ ✅ site.webmanifest
671
+
672
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
673
+ ✅ Brand assets generated in public/
674
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
675
+ ```
676
+
677
+ **SPEC Brand Context Example:**
678
+
679
+ ```xml
680
+ <context>
681
+ Brand:
682
+ - App Name: MyApp
683
+ - Primary Color: #2F6BFF
684
+ - Style: Modern, minimalist, flat design
685
+ - Icon Concept: Abstract geometric shape
686
+ </context>
687
+ ```
688
+
689
+ **Trigger Conditions:**
690
+ - First `/vibe.run` execution (no existing icons)
691
+ - SPEC contains brand/design context
692
+ - Gemini API key configured (`vibe gemini auth`)
693
+
694
+ **Manual Generation:**
695
+ ```bash
696
+ node hooks/scripts/generate-brand-assets.js \
697
+ --spec ".claude/vibe/specs/my-feature.md" \
698
+ --output "./public"
699
+
700
+ # Or with explicit values
701
+ node hooks/scripts/generate-brand-assets.js \
702
+ --name "MyApp" \
703
+ --color "#2F6BFF" \
704
+ --style "modern minimal" \
705
+ --output "./public"
706
+ ```
707
+
708
+ **Fallback:** If Gemini Image fails, generates text monogram icon (first letter + primary color).
709
+
710
+ ---
711
+
712
+ ### 5. Gemini Code Review + Auto-Fix
647
713
 
648
714
  After all scenarios are implemented, **Gemini reviews the code and auto-fixes based on feedback**:
649
715
 
@@ -722,7 +788,7 @@ node "$VIBE_SCRIPTS/llm-orchestrate.js" gemini orchestrate-json "Review this cod
722
788
  - Skip and proceed on fallback response
723
789
  - Must re-verify build/tests after fixes
724
790
 
725
- ### 5. Quality Report (Auto-generated)
791
+ ### 6. Quality Report (Auto-generated)
726
792
 
727
793
  After all scenarios complete + Gemini review, **quality report is auto-generated**:
728
794
 
@@ -767,7 +833,7 @@ After all scenarios complete + Gemini review, **quality report is auto-generated
767
833
 
768
834
  **This alone is enough to trust quality.**
769
835
 
770
- ### 6. Update Feature File
836
+ ### 7. Update Feature File
771
837
 
772
838
  Auto-update scenario status:
773
839
 
@@ -1004,18 +1070,18 @@ Score = Σ(checked items × weight) / 100
1004
1070
 
1005
1071
  Grades:
1006
1072
  - 95-100: ✅ EXCELLENT - Ready to merge
1007
- - 85-94: GOOD - Minor improvements recommended
1008
- - 70-84: ⚠️ FAIR - Improvements required before merge
1009
- - 0-69: ❌ POOR - Major fixes needed
1073
+ - 90-94: ⚠️ GOOD - Minor improvements required before merge
1074
+ - 80-89: ⚠️ FAIR - Significant improvements required
1075
+ - 0-79: ❌ POOR - Major fixes needed
1010
1076
  ```
1011
1077
 
1012
1078
  ### Quality Gate Thresholds
1013
1079
 
1014
1080
  | Gate | Minimum Score | Condition |
1015
1081
  |------|---------------|-----------|
1016
- | **Scenario Complete** | 85 | Each scenario must score ≥85 |
1017
- | **Phase Complete** | 90 | Average of all scenarios ≥90 |
1018
- | **Feature Complete** | 90 | All phases complete + Gemini review |
1082
+ | **Scenario Complete** | 95 | Each scenario must score ≥95 |
1083
+ | **Phase Complete** | 95 | Average of all scenarios ≥95 |
1084
+ | **Feature Complete** | 95 | All phases complete + Gemini review |
1019
1085
 
1020
1086
  ### Auto-Fix Triggers
1021
1087
 
@@ -665,28 +665,28 @@ Score = Σ(Check item met × Weight) / 100
665
665
 
666
666
  Grades:
667
667
  - 95-100: ✅ EXCELLENT - Ready to start implementation
668
- - 85-94: GOOD - Implementation possible (minor improvements recommended)
669
- - 70-84: ⚠️ FAIR - Improve before implementation
670
- - 0-69: ❌ POOR - Rewrite required
668
+ - 90-94: ⚠️ GOOD - Minor improvements required before implementation
669
+ - 80-89: ⚠️ FAIR - Significant improvements required
670
+ - 0-79: ❌ POOR - Rewrite required
671
671
  ```
672
672
 
673
673
  #### 7.3 Quality Gate (Auto-verification)
674
674
 
675
- **Minimum 85 points required to proceed to next step (GPT+Gemini review)**
675
+ **Minimum 95 points required to proceed to next step (GPT+Gemini review)**
676
676
 
677
677
  ```
678
678
  SPEC writing complete
679
679
 
680
680
  [Calculate Quality Score]
681
681
 
682
- Score < 85? → Show missing items → Attempt auto-fix
682
+ Score < 95? → Show missing items → Attempt auto-fix → Re-evaluate
683
683
 
684
- Score ≥ 85 → Proceed to GPT + Gemini review
684
+ Score ≥ 95 → Proceed to GPT + Gemini review
685
685
  ```
686
686
 
687
687
  #### 7.4 Auto-Fix for Low Score
688
688
 
689
- If score is below 85, attempt automatic fixes:
689
+ If score is below 95, attempt automatic fixes:
690
690
 
691
691
  | Missing Item | Auto-Fix Method |
692
692
  |--------------|-----------------|
@@ -1,6 +1,6 @@
1
1
  ---
2
- description: Utility tools (UI preview, diagram, E2E test, etc.)
3
- argument-hint: "--ui, --diagram, --e2e, or other options"
2
+ description: Utility tools (UI preview, diagram, E2E test, image generation, etc.)
3
+ argument-hint: "--ui, --diagram, --e2e, --image, or other options"
4
4
  ---
5
5
 
6
6
  # /vibe.utils
@@ -17,6 +17,8 @@ Collection of utility tools. Use with options.
17
17
  /vibe.utils --e2e "scenario" # E2E browser test (Playwright)
18
18
  /vibe.utils --e2e --visual # Visual regression test
19
19
  /vibe.utils --e2e --record # Video recording
20
+ /vibe.utils --image "description" # Generate image with Gemini (icon, banner, etc.)
21
+ /vibe.utils --image --icon "AppName" # Generate app icon/favicon
20
22
  /vibe.utils --build-fix # Fix build errors (minimal diff)
21
23
  /vibe.utils --clean # Remove dead code + DELETION_LOG
22
24
  /vibe.utils --codemaps # Generate architecture docs
@@ -57,6 +59,49 @@ Generate Mermaid diagrams for architecture visualization.
57
59
 
58
60
  ---
59
61
 
62
+ ## --image (Image Generation)
63
+
64
+ Generate images using Gemini Image API. Requires Gemini API key (`vibe gemini auth`).
65
+
66
+ **Options:**
67
+ - `--image "description"`: Generate image from text description
68
+ - `--image --icon "AppName"`: Generate app icon and favicon set
69
+ - `--image --icon --color "#hex"`: Specify primary color
70
+ - `--image --banner "title"`: Generate banner/header image
71
+
72
+ **Icon Generation:**
73
+
74
+ Creates complete icon set for web/mobile:
75
+ - `favicon.ico` (16/32/48)
76
+ - `favicon-16x16.png`, `favicon-32x32.png`
77
+ - `apple-touch-icon.png` (180x180)
78
+ - `android-chrome-192x192.png`, `android-chrome-512x512.png`
79
+ - `site.webmanifest`
80
+
81
+ **Example:**
82
+ ```
83
+ /vibe.utils --image "A modern tech startup logo, blue gradient, minimal"
84
+ /vibe.utils --image --icon "MyApp" --color "#2F6BFF"
85
+ /vibe.utils --image --banner "Welcome to MyApp"
86
+ ```
87
+
88
+ **Manual Script Execution:**
89
+ ```bash
90
+ node hooks/scripts/generate-brand-assets.js \
91
+ --name "MyApp" \
92
+ --color "#2F6BFF" \
93
+ --style "modern minimal" \
94
+ --output "./public"
95
+ ```
96
+
97
+ **Fallback:** If Gemini Image fails, generates text monogram (first letter + background color).
98
+
99
+ **Prerequisites:**
100
+ - Gemini API key configured (`vibe gemini auth`)
101
+ - ImageMagick or sips (macOS) for image resizing
102
+
103
+ ---
104
+
60
105
  ## --e2e (E2E Testing)
61
106
 
62
107
  Read and follow `agents/e2e-tester.md` for Playwright-based E2E testing.
@@ -275,11 +320,21 @@ Score = Σ(checked items × weight) / 100
275
320
 
276
321
  Grades:
277
322
  - 95-100: ✅ EXCELLENT - Ready to use
278
- - 85-94: GOOD - Minor improvements optional
279
- - 70-84: ⚠️ FAIR - Improvements needed
280
- - 0-69: ❌ POOR - Redo required
323
+ - 90-94: ⚠️ GOOD - Minor improvements recommended
324
+ - 80-89: ⚠️ FAIR - Improvements needed
325
+ - 0-79: ❌ POOR - Redo required
281
326
  ```
282
327
 
328
+ ### Image Generation Quality Checklist (--image)
329
+
330
+ | Category | Check Item | Weight |
331
+ |----------|------------|--------|
332
+ | **Relevance** | Image matches description/app concept | 30% |
333
+ | **Format** | Correct sizes for all platforms | 25% |
334
+ | **Quality** | Clear at small sizes (16x16) | 20% |
335
+ | **Consistency** | Works in light/dark backgrounds | 15% |
336
+ | **Completeness** | All required files generated | 10% |
337
+
283
338
  ### Output Requirements by Tool
284
339
 
285
340
  | Tool | Required Output |
@@ -289,6 +344,8 @@ Grades:
289
344
  | `--diagram --er` | Entity names, fields, relationships |
290
345
  | `--diagram --flow` | Start/end nodes, decision points |
291
346
  | `--e2e` | Test file + execution results |
347
+ | `--image` | Generated image file(s) + path |
348
+ | `--image --icon` | Full icon set + webmanifest |
292
349
  | `--compound` | Solution markdown + category tag |
293
350
 
294
351
  ---
@@ -0,0 +1,24 @@
1
+ /**
2
+ * GlobalInstaller - 전역 패키지 및 자산 설치
3
+ * setup.ts에서 추출
4
+ */
5
+ /**
6
+ * 전역 vibe 패키지 설치 경로:
7
+ * - Windows: %APPDATA%\vibe\ (예: C:\Users\xxx\AppData\Roaming\vibe\)
8
+ * - macOS/Linux: ~/.config/vibe/
9
+ */
10
+ export declare function getVibeConfigDir(): string;
11
+ /**
12
+ * 전역 vibe 패키지 설치
13
+ */
14
+ export declare function installGlobalVibePackage(isUpdate?: boolean): void;
15
+ /**
16
+ * ~/.claude/ 전역 assets 설치 (commands, agents, skills)
17
+ */
18
+ export declare function installGlobalAssets(isUpdate?: boolean): void;
19
+ /**
20
+ * MCP 서버 정리 (no-op)
21
+ * vibe는 더 이상 MCP를 사용하지 않음
22
+ */
23
+ export declare function registerMcpServers(_isUpdate?: boolean): void;
24
+ //# sourceMappingURL=GlobalInstaller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GlobalInstaller.d.ts","sourceRoot":"","sources":["../../../src/cli/setup/GlobalInstaller.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAYH;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAKzC;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,UAAQ,GAAG,IAAI,CA+C/D;AA4BD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,UAAQ,GAAG,IAAI,CAyB1D;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,UAAQ,GAAG,IAAI,CAE1D"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * GlobalInstaller - 전역 패키지 및 자산 설치
3
+ * setup.ts에서 추출
4
+ */
5
+ import path from 'path';
6
+ import fs from 'fs';
7
+ import os from 'os';
8
+ import { execSync } from 'child_process';
9
+ import { fileURLToPath } from 'url';
10
+ import { log, ensureDir, copyDirRecursive, removeDirRecursive, getPackageJson } from '../utils.js';
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+ /**
14
+ * 전역 vibe 패키지 설치 경로:
15
+ * - Windows: %APPDATA%\vibe\ (예: C:\Users\xxx\AppData\Roaming\vibe\)
16
+ * - macOS/Linux: ~/.config/vibe/
17
+ */
18
+ export function getVibeConfigDir() {
19
+ if (process.platform === 'win32') {
20
+ return path.join(process.env.APPDATA || path.join(os.homedir(), 'AppData', 'Roaming'), 'vibe');
21
+ }
22
+ return path.join(os.homedir(), '.config', 'vibe');
23
+ }
24
+ /**
25
+ * 전역 vibe 패키지 설치
26
+ */
27
+ export function installGlobalVibePackage(isUpdate = false) {
28
+ const globalVibeDir = getVibeConfigDir();
29
+ const nodeModulesDir = path.join(globalVibeDir, 'node_modules');
30
+ const vibePackageDir = path.join(nodeModulesDir, '@su-record', 'vibe');
31
+ const packageJson = getPackageJson();
32
+ const currentVersion = packageJson.version;
33
+ // 이미 설치되어 있는지 확인
34
+ const installedPackageJson = path.join(vibePackageDir, 'package.json');
35
+ if (fs.existsSync(installedPackageJson)) {
36
+ try {
37
+ const installed = JSON.parse(fs.readFileSync(installedPackageJson, 'utf-8'));
38
+ if (installed.version === currentVersion && !isUpdate) {
39
+ return;
40
+ }
41
+ }
42
+ catch { /* ignore: reinstall if can't read */ }
43
+ }
44
+ // 디렉토리 생성
45
+ ensureDir(globalVibeDir);
46
+ ensureDir(nodeModulesDir);
47
+ ensureDir(path.join(nodeModulesDir, '@su-record'));
48
+ // 기존 설치 제거
49
+ if (fs.existsSync(vibePackageDir)) {
50
+ removeDirRecursive(vibePackageDir);
51
+ }
52
+ // 1. 패키지 복사 시도 (실패해도 훅은 복사)
53
+ try {
54
+ const globalNpmRoot = execSync('npm root -g', { encoding: 'utf-8' }).trim();
55
+ const globalNpmVibeDir = path.join(globalNpmRoot, '@su-record', 'vibe');
56
+ if (fs.existsSync(globalNpmVibeDir)) {
57
+ copyDirRecursive(globalNpmVibeDir, vibePackageDir);
58
+ }
59
+ else {
60
+ execSync(`npm install @su-record/vibe@${currentVersion} --prefix "${globalVibeDir}" --no-save`, {
61
+ stdio: 'pipe',
62
+ });
63
+ }
64
+ }
65
+ catch (e) {
66
+ const message = e instanceof Error ? e.message : String(e);
67
+ log(' ⚠️ Package install failed: ' + message + '\n');
68
+ }
69
+ // 2. 훅 스크립트 복사 (패키지 복사 실패해도 실행)
70
+ copyHookScripts(vibePackageDir, globalVibeDir);
71
+ }
72
+ /**
73
+ * 훅 스크립트 복사
74
+ */
75
+ function copyHookScripts(vibePackageDir, globalVibeDir) {
76
+ try {
77
+ const packageRoot = path.resolve(__dirname, '..', '..', '..');
78
+ const installedHooksSource = path.join(vibePackageDir, 'hooks', 'scripts');
79
+ const localHooksSource = path.join(packageRoot, 'hooks', 'scripts');
80
+ const hooksScriptsSource = fs.existsSync(installedHooksSource) ? installedHooksSource : localHooksSource;
81
+ const hooksScriptsTarget = path.join(globalVibeDir, 'hooks', 'scripts');
82
+ if (fs.existsSync(hooksScriptsSource)) {
83
+ ensureDir(path.join(globalVibeDir, 'hooks'));
84
+ if (fs.existsSync(hooksScriptsTarget)) {
85
+ removeDirRecursive(hooksScriptsTarget);
86
+ }
87
+ copyDirRecursive(hooksScriptsSource, hooksScriptsTarget);
88
+ }
89
+ else {
90
+ log(' ⚠️ Hook scripts source not found: ' + hooksScriptsSource + '\n');
91
+ }
92
+ }
93
+ catch (e) {
94
+ const message = e instanceof Error ? e.message : String(e);
95
+ log(' ⚠️ Hook scripts copy failed: ' + message + '\n');
96
+ }
97
+ }
98
+ /**
99
+ * ~/.claude/ 전역 assets 설치 (commands, agents, skills)
100
+ */
101
+ export function installGlobalAssets(isUpdate = false) {
102
+ const globalClaudeDir = path.join(os.homedir(), '.claude');
103
+ ensureDir(globalClaudeDir);
104
+ const packageRoot = path.resolve(__dirname, '..', '..', '..');
105
+ // commands
106
+ const globalCommandsDir = path.join(globalClaudeDir, 'commands');
107
+ ensureDir(globalCommandsDir);
108
+ const commandsSource = path.join(packageRoot, 'commands');
109
+ copyDirRecursive(commandsSource, globalCommandsDir);
110
+ // agents
111
+ const globalAgentsDir = path.join(globalClaudeDir, 'agents');
112
+ ensureDir(globalAgentsDir);
113
+ const agentsSource = path.join(packageRoot, 'agents');
114
+ copyDirRecursive(agentsSource, globalAgentsDir);
115
+ // skills
116
+ const globalSkillsDir = path.join(globalClaudeDir, 'skills');
117
+ ensureDir(globalSkillsDir);
118
+ const skillsSource = path.join(packageRoot, 'skills');
119
+ if (fs.existsSync(skillsSource)) {
120
+ copyDirRecursive(skillsSource, globalSkillsDir);
121
+ }
122
+ }
123
+ /**
124
+ * MCP 서버 정리 (no-op)
125
+ * vibe는 더 이상 MCP를 사용하지 않음
126
+ */
127
+ export function registerMcpServers(_isUpdate = false) {
128
+ // no-op: vibe는 MCP를 사용하지 않음
129
+ }
130
+ //# sourceMappingURL=GlobalInstaller.js.map
@@ -0,0 +1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C;IAEhD,SAAS;IACT,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;IAC7D,SAAS,CAAC,eAAe,CAAC,CAAC;IAC3B,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC;IACtD,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;QAChC,gBAAgB,CAAC,YAAY,EAAE,eAAe,CAAC,CAAC;IAClD,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,SAAS,GAAG,KAAK;IAClD,4BAA4B;AAC9B,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * LanguageDetector - OS 언어 감지 모듈
3
+ * setup.ts에서 추출
4
+ */
5
+ export type SupportedLanguage = 'ko' | 'en';
6
+ /**
7
+ * OS 언어 설정 감지하여 vibe 언어 반환
8
+ * - 한국어 OS → 'ko'
9
+ * - 그 외 → 'en' (기본값)
10
+ */
11
+ export declare function detectOsLanguage(): SupportedLanguage;
12
+ /**
13
+ * 언어에 따른 CLAUDE.md 응답 언어 지시문 생성
14
+ */
15
+ export declare function getLanguageInstruction(language: SupportedLanguage): string;
16
+ //# sourceMappingURL=LanguageDetector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageDetector.d.ts","sourceRoot":"","sources":["../../../src/cli/setup/LanguageDetector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,MAAM,iBAAiB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,iBAAiB,CA6BpD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAI1E"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * LanguageDetector - OS 언어 감지 모듈
3
+ * setup.ts에서 추출
4
+ */
5
+ import { execSync } from 'child_process';
6
+ /**
7
+ * OS 언어 설정 감지하여 vibe 언어 반환
8
+ * - 한국어 OS → 'ko'
9
+ * - 그 외 → 'en' (기본값)
10
+ */
11
+ export function detectOsLanguage() {
12
+ try {
13
+ let locale = '';
14
+ if (process.platform === 'win32') {
15
+ // Windows: PowerShell로 시스템 로캘 확인
16
+ try {
17
+ locale = execSync('powershell -Command "[System.Globalization.CultureInfo]::CurrentCulture.Name"', {
18
+ encoding: 'utf-8',
19
+ stdio: ['pipe', 'pipe', 'pipe']
20
+ }).trim();
21
+ }
22
+ catch {
23
+ // 대안: LANG 환경변수
24
+ locale = process.env.LANG || process.env.LC_ALL || '';
25
+ }
26
+ }
27
+ else {
28
+ // macOS/Linux: LANG 환경변수
29
+ locale = process.env.LANG || process.env.LC_ALL || process.env.LC_MESSAGES || '';
30
+ }
31
+ // 한국어 로캘 감지 (ko-KR, ko_KR, ko 등)
32
+ if (locale.toLowerCase().startsWith('ko')) {
33
+ return 'ko';
34
+ }
35
+ return 'en';
36
+ }
37
+ catch {
38
+ return 'en';
39
+ }
40
+ }
41
+ /**
42
+ * 언어에 따른 CLAUDE.md 응답 언어 지시문 생성
43
+ */
44
+ export function getLanguageInstruction(language) {
45
+ return language === 'ko'
46
+ ? '\n\n## Response Language\n\n**IMPORTANT: Always respond in Korean (한국어) unless the user explicitly requests otherwise.**'
47
+ : '\n\n## Response Language\n\n**IMPORTANT: Always respond in English unless the user explicitly requests otherwise.**';
48
+ }
49
+ //# sourceMappingURL=LanguageDetector.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LanguageDetector.js","sourceRoot":"","sources":["../../../src/cli/setup/LanguageDetector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIzC;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,IAAI,CAAC;QACH,IAAI,MAAM,GAAG,EAAE,CAAC;QAEhB,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;YACjC,iCAAiC;YACjC,IAAI,CAAC;gBACH,MAAM,GAAG,QAAQ,CAAC,+EAA+E,EAAE;oBACjG,QAAQ,EAAE,OAAO;oBACjB,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;iBAChC,CAAC,CAAC,IAAI,EAAE,CAAC;YACZ,CAAC;YAAC,MAAM,CAAC;gBACP,gBAAgB;gBAChB,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,EAAE,CAAC;YACxD,CAAC;QACH,CAAC;aAAM,CAAC;YACN,yBAAyB;YACzB,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,GAAG,CAAC,WAAW,IAAI,EAAE,CAAC;QACnF,CAAC;QAED,iCAAiC;QACjC,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;YAC1C,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAA2B;IAChE,OAAO,QAAQ,KAAK,IAAI;QACtB,CAAC,CAAC,0HAA0H;QAC5H,CAAC,CAAC,qHAAqH,CAAC;AAC5H,CAAC"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * LegacyMigration - 레거시 마이그레이션 및 정리
3
+ * setup.ts에서 추출
4
+ */
5
+ /**
6
+ * .vibe/ → .claude/vibe/ 마이그레이션
7
+ */
8
+ export declare function migrateLegacyVibe(projectRoot: string, vibeDir: string): boolean;
9
+ /**
10
+ * 레거시 파일/폴더 정리
11
+ */
12
+ export declare function cleanupLegacy(projectRoot: string, claudeDir: string): void;
13
+ /**
14
+ * 프로젝트 로컬 설정/자산 제거
15
+ */
16
+ export declare function removeLocalAssets(claudeDir: string): void;
17
+ /**
18
+ * ~/.claude.json 정리 (로컬 MCP 설정 제거)
19
+ */
20
+ export declare function cleanupClaudeConfig(): void;
21
+ /**
22
+ * 레거시 mcp/ 폴더 정리
23
+ */
24
+ export declare function cleanupLegacyMcp(vibeDir: string): void;
25
+ //# sourceMappingURL=LegacyMigration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegacyMigration.d.ts","sourceRoot":"","sources":["../../../src/cli/setup/LegacyMigration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAyB/E;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CA8C1E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAiBzD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CA6C1C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAOtD"}