@su-record/vibe 2.4.35 → 2.4.37

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 (51) hide show
  1. package/README.md +26 -13
  2. package/dist/cli/index.d.ts.map +1 -1
  3. package/dist/cli/index.js +11 -8
  4. package/dist/cli/index.js.map +1 -1
  5. package/dist/cli/llm.js +9 -9
  6. package/dist/lib/gemini-api.d.ts +36 -2
  7. package/dist/lib/gemini-api.d.ts.map +1 -1
  8. package/dist/lib/gemini-api.js +64 -5
  9. package/dist/lib/gemini-api.js.map +1 -1
  10. package/dist/lib/gpt-api.d.ts +34 -3
  11. package/dist/lib/gpt-api.d.ts.map +1 -1
  12. package/dist/lib/gpt-api.js +251 -42
  13. package/dist/lib/gpt-api.js.map +1 -1
  14. package/dist/lib/utils.d.ts +15 -0
  15. package/dist/lib/utils.d.ts.map +1 -1
  16. package/dist/lib/utils.js +27 -0
  17. package/dist/lib/utils.js.map +1 -1
  18. package/dist/orchestrator/backgroundAgent.d.ts.map +1 -1
  19. package/dist/orchestrator/backgroundAgent.js +37 -1
  20. package/dist/orchestrator/backgroundAgent.js.map +1 -1
  21. package/dist/orchestrator/index.d.ts +112 -1
  22. package/dist/orchestrator/index.d.ts.map +1 -1
  23. package/dist/orchestrator/index.js +216 -0
  24. package/dist/orchestrator/index.js.map +1 -1
  25. package/dist/orchestrator/orchestrator.d.ts +115 -1
  26. package/dist/orchestrator/orchestrator.d.ts.map +1 -1
  27. package/dist/orchestrator/orchestrator.js +358 -1
  28. package/dist/orchestrator/orchestrator.js.map +1 -1
  29. package/dist/orchestrator/types.d.ts +42 -0
  30. package/dist/orchestrator/types.d.ts.map +1 -1
  31. package/dist/orchestrator/types.js +10 -1
  32. package/dist/orchestrator/types.js.map +1 -1
  33. package/hooks/hooks.json +41 -21
  34. package/hooks/scripts/code-check.js +22 -0
  35. package/hooks/scripts/code-review.js +22 -0
  36. package/hooks/scripts/complexity.js +22 -0
  37. package/hooks/scripts/compound.js +23 -0
  38. package/hooks/scripts/context-save.js +33 -0
  39. package/hooks/scripts/llm-orchestrate.js +64 -0
  40. package/hooks/scripts/recall.js +22 -0
  41. package/hooks/scripts/session-start.js +30 -0
  42. package/hooks/scripts/utils.js +34 -0
  43. package/package.json +1 -1
  44. package/dist/lib/gemini-mcp.d.ts +0 -10
  45. package/dist/lib/gemini-mcp.d.ts.map +0 -1
  46. package/dist/lib/gemini-mcp.js +0 -353
  47. package/dist/lib/gemini-mcp.js.map +0 -1
  48. package/dist/lib/gpt-mcp.d.ts +0 -10
  49. package/dist/lib/gpt-mcp.d.ts.map +0 -1
  50. package/dist/lib/gpt-mcp.js +0 -352
  51. package/dist/lib/gpt-mcp.js.map +0 -1
package/hooks/hooks.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "hooks": [
11
11
  {
12
12
  "type": "command",
13
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/';const p=process.env.CLAUDE_PROJECT_DIR||'.';Promise.all([import(B+'memory/index.js').then(t=>t.startSession({projectPath:p})),import(B+'time/index.js').then(t=>t.getCurrentTime({format:'human',timezone:'Asia/Seoul'})),import(B+'memory/index.js').then(t=>t.listMemories({limit:5,projectPath:p}))]).then(([s,t,m])=>console.log(s.content[0].text+'\\n\\n'+t.content[0].text+'\\n\\n[Recent Memories]\\n'+m.content[0].text)).catch(e=>console.log('[Session] Error:',e.message))\""
13
+ "command": "node {{VIBE_PATH}}/hooks/scripts/session-start.js"
14
14
  }
15
15
  ]
16
16
  }
@@ -32,7 +32,7 @@
32
32
  "hooks": [
33
33
  {
34
34
  "type": "command",
35
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/convention/index.js';const p=process.env.CLAUDE_PROJECT_DIR||'.';import(B).then(t=>t.validateCodeQuality({targetPath:'.',projectPath:p}).then(r=>console.log('[CODE CHECK]',r.content[0].text.split('\\n').slice(0,3).join(' | ')))).catch(()=>console.log('[AUTO-CONTINUE] Code written. Continue.'))\""
35
+ "command": "node {{VIBE_PATH}}/hooks/scripts/code-check.js"
36
36
  }
37
37
  ]
38
38
  }
@@ -61,7 +61,7 @@
61
61
  "hooks": [
62
62
  {
63
63
  "type": "command",
64
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/memory/index.js';const p=process.env.CLAUDE_PROJECT_DIR||'.';import(B).then(t=>t.saveMemory({key:'solution-'+Date.now(),value:'Solution documented at '+new Date().toISOString(),category:'solution',projectPath:p}).then(r=>console.log('[COMPOUND]',r.content[0].text))).catch(e=>console.log('[COMPOUND] \\u2717 Error:',e.message))\""
64
+ "command": "node {{VIBE_PATH}}/hooks/scripts/compound.js"
65
65
  }
66
66
  ]
67
67
  },
@@ -70,7 +70,7 @@
70
70
  "hooks": [
71
71
  {
72
72
  "type": "command",
73
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/convention/index.js';const p=process.env.CLAUDE_PROJECT_DIR||'.';import(B).then(t=>t.validateCodeQuality({targetPath:'.',projectPath:p}).then(r=>console.log('[CODE REVIEW]',r.content[0].text.split('\\n').slice(0,5).join(' | ')))).catch(e=>console.log('[CODE REVIEW] Error:',e.message))\""
73
+ "command": "node {{VIBE_PATH}}/hooks/scripts/code-review.js"
74
74
  }
75
75
  ]
76
76
  },
@@ -88,7 +88,7 @@
88
88
  "hooks": [
89
89
  {
90
90
  "type": "command",
91
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/convention/index.js';const p=process.env.CLAUDE_PROJECT_DIR||'.';import(B).then(t=>t.analyzeComplexity({targetPath:'.',projectPath:p}).then(r=>console.log('[COMPLEXITY]',r.content[0].text.split('\\n').slice(0,5).join(' | ')))).catch(e=>console.log('[COMPLEXITY] Error:',e.message))\""
91
+ "command": "node {{VIBE_PATH}}/hooks/scripts/complexity.js"
92
92
  }
93
93
  ]
94
94
  },
@@ -97,7 +97,7 @@
97
97
  "hooks": [
98
98
  {
99
99
  "type": "command",
100
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/memory/index.js';const p=process.env.CLAUDE_PROJECT_DIR||'.';import(B).then(t=>t.listMemories({limit:10,projectPath:p}).then(r=>console.log('[RECALL] \\u2713 Found '+r.content[0].text.split('\\n').length+' memories:',r.content[0].text.split('\\n').slice(0,7).join(' | ')))).catch(e=>console.log('[RECALL] Error:',e.message))\""
100
+ "command": "node {{VIBE_PATH}}/hooks/scripts/recall.js"
101
101
  }
102
102
  ]
103
103
  },
@@ -106,7 +106,7 @@
106
106
  "hooks": [
107
107
  {
108
108
  "type": "command",
109
- "command": "node -e \"const V='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/lib/gpt-api.js';let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const q=JSON.parse(d).prompt;import(V).then(g=>g.chat({messages:[{role:'user',content:q}],systemPrompt:'You are a software architect. Analyze and review the architecture.'})).then(r=>console.log('[GPT] '+r.content)).catch(e=>console.log('[GPT] Error:',e.message))})\"",
109
+ "command": "node {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js gpt orchestrate \"You are a software architect. Analyze and review the architecture.\"",
110
110
  "statusMessage": "GPT analyzing architecture..."
111
111
  }
112
112
  ]
@@ -116,48 +116,68 @@
116
116
  "hooks": [
117
117
  {
118
118
  "type": "command",
119
- "command": "node -e \"const V='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/lib/gemini-api.js';let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const q=JSON.parse(d).prompt;import(V).then(g=>g.chat({messages:[{role:'user',content:q}],systemPrompt:'You are a UI/UX expert. Analyze and provide feedback.'})).then(r=>console.log('[Gemini] '+r.content)).catch(e=>console.log('[Gemini] Error:',e.message))})\"",
119
+ "command": "node {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js gemini orchestrate \"You are a UI/UX expert. Analyze and provide feedback.\"",
120
120
  "statusMessage": "Gemini reviewing UI/UX..."
121
121
  }
122
122
  ]
123
123
  },
124
+ {
125
+ "matcher": "디버깅|debugging|버그.*찾|find.*bug|debug.*this",
126
+ "hooks": [
127
+ {
128
+ "type": "command",
129
+ "command": "node {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js gpt orchestrate \"You are a debugging expert. Find bugs and suggest fixes.\"",
130
+ "statusMessage": "GPT debugging..."
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "matcher": "코드.*분석|analyze.*code|code.*review",
136
+ "hooks": [
137
+ {
138
+ "type": "command",
139
+ "command": "node {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js gemini orchestrate \"You are a code analysis expert. Review and analyze the code.\"",
140
+ "statusMessage": "Gemini analyzing code..."
141
+ }
142
+ ]
143
+ },
124
144
  {
125
145
  "matcher": "^(gpt[-.\\s]|지피티-)",
126
146
  "hooks": [
127
147
  {
128
148
  "type": "command",
129
- "command": "node -e \"const V='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/lib/gpt-api.js';let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const q=JSON.parse(d).prompt.replace(/^(gpt[-.\\s]|지피티-)\\s*/i,'').trim();import(V).then(g=>g.quickWebSearch(q)).then(r=>console.log('GPT-5.2 응답: '+r)).catch(e=>console.log('[GPT] Error:',e.message))})\"",
149
+ "command": "node {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js gpt search",
130
150
  "statusMessage": "Asking GPT (with web search)..."
131
151
  }
132
152
  ]
133
153
  },
134
154
  {
135
- "matcher": "^(gemini[-.\\s]|제미나이-)",
155
+ "matcher": "^vibe-gpt-",
136
156
  "hooks": [
137
157
  {
138
158
  "type": "command",
139
- "command": "node -e \"const V='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/lib/gemini-api.js';let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const q=JSON.parse(d).prompt.replace(/^(gemini[-.\\s]|제미나이-)\\s*/i,'').trim();import(V).then(g=>g.quickWebSearch(q)).then(r=>console.log('Gemini-3 응답: '+r)).catch(e=>console.log('[Gemini] Error:',e.message))})\"",
140
- "statusMessage": "Asking Gemini (with web search)..."
159
+ "command": "node {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js gpt orchestrate-json \"You are a Vibe orchestrator. Process the request and output structured JSON.\"",
160
+ "statusMessage": "Vibe GPT orchestrating (no search)..."
141
161
  }
142
162
  ]
143
163
  },
144
164
  {
145
- "matcher": "디버깅|debugging|버그.*찾|find.*bug|debug.*this",
165
+ "matcher": "^(gemini[-.\\s]|제미나이-)",
146
166
  "hooks": [
147
167
  {
148
168
  "type": "command",
149
- "command": "node -e \"const V='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/lib/gpt-api.js';let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const q=JSON.parse(d).prompt;import(V).then(g=>g.chat({messages:[{role:'user',content:q}],systemPrompt:'You are a debugging expert. Find bugs and suggest fixes.'})).then(r=>console.log('[GPT] '+r.content)).catch(e=>console.log('[GPT] Error:',e.message))})\"",
150
- "statusMessage": "GPT debugging..."
169
+ "command": "node {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js gemini search",
170
+ "statusMessage": "Asking Gemini (with web search)..."
151
171
  }
152
172
  ]
153
173
  },
154
174
  {
155
- "matcher": "코드.*분석|analyze.*code|code.*review.*gemini",
175
+ "matcher": "^vibe-gemini-",
156
176
  "hooks": [
157
177
  {
158
178
  "type": "command",
159
- "command": "node -e \"const V='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/lib/gemini-api.js';let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const q=JSON.parse(d).prompt;import(V).then(g=>g.chat({messages:[{role:'user',content:q}],systemPrompt:'You are a code analysis expert. Review and analyze the code.'})).then(r=>console.log('[Gemini] '+r.content)).catch(e=>console.log('[Gemini] Error:',e.message))})\"",
160
- "statusMessage": "Gemini analyzing code..."
179
+ "command": "node {{VIBE_PATH}}/hooks/scripts/llm-orchestrate.js gemini orchestrate-json \"You are a Vibe orchestrator. Process the request and output structured JSON.\"",
180
+ "statusMessage": "Vibe Gemini orchestrating (no search)..."
161
181
  }
162
182
  ]
163
183
  }
@@ -168,7 +188,7 @@
168
188
  "hooks": [
169
189
  {
170
190
  "type": "command",
171
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/memory/index.js';const p=process.env.CLAUDE_PROJECT_DIR||'.';import(B).then(t=>t.autoSaveContext({urgency:'medium',contextType:'progress',summary:'Context at 80% - auto checkpoint',projectPath:p}).then(r=>console.log('[CONTEXT 80%]',r.content[0].text))).catch(()=>{})\""
191
+ "command": "node {{VIBE_PATH}}/hooks/scripts/context-save.js medium"
172
192
  }
173
193
  ]
174
194
  },
@@ -177,7 +197,7 @@
177
197
  "hooks": [
178
198
  {
179
199
  "type": "command",
180
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/memory/index.js';const p=process.env.CLAUDE_PROJECT_DIR||'.';import(B).then(t=>t.autoSaveContext({urgency:'high',contextType:'progress',summary:'Context at 90% - save before overflow',projectPath:p}).then(r=>console.log('[CONTEXT 90%]',r.content[0].text))).catch(()=>{})\""
200
+ "command": "node {{VIBE_PATH}}/hooks/scripts/context-save.js high"
181
201
  }
182
202
  ]
183
203
  },
@@ -186,7 +206,7 @@
186
206
  "hooks": [
187
207
  {
188
208
  "type": "command",
189
- "command": "node -e \"const B='file:///{{VIBE_PATH}}/node_modules/@su-record/vibe/dist/tools/memory/index.js';const p=process.env.CLAUDE_PROJECT_DIR||'.';import(B).then(t=>t.autoSaveContext({urgency:'critical',contextType:'progress',summary:'Context at 95% - CRITICAL save before session end',projectPath:p}).then(r=>console.log('[CONTEXT 95%]',r.content[0].text))).catch(()=>{})\""
209
+ "command": "node {{VIBE_PATH}}/hooks/scripts/context-save.js critical"
190
210
  }
191
211
  ]
192
212
  }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * PostToolUse Hook - Write/Edit 후 코드 품질 검사
3
+ */
4
+ import { getToolsBaseUrl, PROJECT_DIR } from './utils.js';
5
+
6
+ const BASE_URL = getToolsBaseUrl();
7
+
8
+ async function main() {
9
+ try {
10
+ const module = await import(`${BASE_URL}convention/index.js`);
11
+ const result = await module.validateCodeQuality({
12
+ targetPath: '.',
13
+ projectPath: PROJECT_DIR,
14
+ });
15
+ const lines = result.content[0].text.split('\n').slice(0, 3).join(' | ');
16
+ console.log('[CODE CHECK]', lines);
17
+ } catch {
18
+ console.log('[AUTO-CONTINUE] Code written. Continue.');
19
+ }
20
+ }
21
+
22
+ main();
@@ -0,0 +1,22 @@
1
+ /**
2
+ * UserPromptSubmit Hook - 코드 리뷰 요청 시 품질 검사
3
+ */
4
+ import { getToolsBaseUrl, PROJECT_DIR } from './utils.js';
5
+
6
+ const BASE_URL = getToolsBaseUrl();
7
+
8
+ async function main() {
9
+ try {
10
+ const module = await import(`${BASE_URL}convention/index.js`);
11
+ const result = await module.validateCodeQuality({
12
+ targetPath: '.',
13
+ projectPath: PROJECT_DIR,
14
+ });
15
+ const lines = result.content[0].text.split('\n').slice(0, 5).join(' | ');
16
+ console.log('[CODE REVIEW]', lines);
17
+ } catch (e) {
18
+ console.log('[CODE REVIEW] Error:', e.message);
19
+ }
20
+ }
21
+
22
+ main();
@@ -0,0 +1,22 @@
1
+ /**
2
+ * UserPromptSubmit Hook - 복잡도 분석
3
+ */
4
+ import { getToolsBaseUrl, PROJECT_DIR } from './utils.js';
5
+
6
+ const BASE_URL = getToolsBaseUrl();
7
+
8
+ async function main() {
9
+ try {
10
+ const module = await import(`${BASE_URL}convention/index.js`);
11
+ const result = await module.analyzeComplexity({
12
+ targetPath: '.',
13
+ projectPath: PROJECT_DIR,
14
+ });
15
+ const lines = result.content[0].text.split('\n').slice(0, 5).join(' | ');
16
+ console.log('[COMPLEXITY]', lines);
17
+ } catch (e) {
18
+ console.log('[COMPLEXITY] Error:', e.message);
19
+ }
20
+ }
21
+
22
+ main();
@@ -0,0 +1,23 @@
1
+ /**
2
+ * UserPromptSubmit Hook - 버그 해결/PR 머지 시 솔루션 저장
3
+ */
4
+ import { getToolsBaseUrl, PROJECT_DIR } from './utils.js';
5
+
6
+ const BASE_URL = getToolsBaseUrl();
7
+
8
+ async function main() {
9
+ try {
10
+ const module = await import(`${BASE_URL}memory/index.js`);
11
+ const result = await module.saveMemory({
12
+ key: `solution-${Date.now()}`,
13
+ value: `Solution documented at ${new Date().toISOString()}`,
14
+ category: 'solution',
15
+ projectPath: PROJECT_DIR,
16
+ });
17
+ console.log('[COMPOUND]', result.content[0].text);
18
+ } catch (e) {
19
+ console.log('[COMPOUND] ✗ Error:', e.message);
20
+ }
21
+ }
22
+
23
+ main();
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Notification Hook - 컨텍스트 자동 저장 (80/90/95%)
3
+ * Usage: node context-save.js <urgency>
4
+ * urgency: medium | high | critical
5
+ */
6
+ import { getToolsBaseUrl, PROJECT_DIR } from './utils.js';
7
+
8
+ const BASE_URL = getToolsBaseUrl();
9
+
10
+ const urgency = process.argv[2] || 'medium';
11
+ const summaryMap = {
12
+ medium: 'Context at 80% - auto checkpoint',
13
+ high: 'Context at 90% - save before overflow',
14
+ critical: 'Context at 95% - CRITICAL save before session end',
15
+ };
16
+
17
+ async function main() {
18
+ try {
19
+ const module = await import(`${BASE_URL}memory/index.js`);
20
+ const result = await module.autoSaveContext({
21
+ urgency,
22
+ contextType: 'progress',
23
+ summary: summaryMap[urgency] || summaryMap.medium,
24
+ projectPath: PROJECT_DIR,
25
+ });
26
+ const percent = urgency === 'critical' ? '95' : urgency === 'high' ? '90' : '80';
27
+ console.log(`[CONTEXT ${percent}%]`, result.content[0].text);
28
+ } catch {
29
+ // 무시
30
+ }
31
+ }
32
+
33
+ main();
@@ -0,0 +1,64 @@
1
+ /**
2
+ * UserPromptSubmit Hook - LLM 오케스트레이션 (GPT/Gemini)
3
+ *
4
+ * Usage: node llm-orchestrate.js <provider> <mode> <systemPrompt>
5
+ * provider: gpt | gemini
6
+ * mode: search | orchestrate | orchestrate-json
7
+ * systemPrompt: (optional) custom system prompt for orchestrate mode
8
+ *
9
+ * Input: JSON from stdin with { prompt: string }
10
+ */
11
+ import { getLibBaseUrl } from './utils.js';
12
+
13
+ const LIB_URL = getLibBaseUrl();
14
+
15
+ const provider = process.argv[2] || 'gemini';
16
+ const mode = process.argv[3] || 'search';
17
+ const systemPrompt = process.argv[4] || 'You are a helpful assistant.';
18
+
19
+ async function main() {
20
+ // stdin에서 JSON 읽기
21
+ let inputData = '';
22
+ for await (const chunk of process.stdin) {
23
+ inputData += chunk;
24
+ }
25
+
26
+ let prompt;
27
+ try {
28
+ const parsed = JSON.parse(inputData);
29
+ prompt = parsed.prompt;
30
+ } catch {
31
+ console.log(`[${provider.toUpperCase()}] Error: Invalid JSON input`);
32
+ return;
33
+ }
34
+
35
+ // 접두사 제거
36
+ const prefixPatterns = {
37
+ gpt: /^(gpt[-.\s]|지피티-|vibe-gpt-)\s*/i,
38
+ gemini: /^(gemini[-.\s]|제미나이-|vibe-gemini-)\s*/i,
39
+ };
40
+ const cleanPrompt = prompt.replace(prefixPatterns[provider] || /^/, '').trim();
41
+
42
+ try {
43
+ const modulePath = `${LIB_URL}${provider}-api.js`;
44
+ const module = await import(modulePath);
45
+
46
+ let result;
47
+ if (mode === 'search') {
48
+ result = await module.quickWebSearch(cleanPrompt);
49
+ const label = provider === 'gpt' ? 'GPT-5.2' : 'Gemini-3';
50
+ console.log(`${label} 응답: ${result}`);
51
+ } else {
52
+ const jsonMode = mode === 'orchestrate-json';
53
+ const orchestrateFn = provider === 'gpt'
54
+ ? module.vibeGptOrchestrate
55
+ : module.vibeGeminiOrchestrate;
56
+ result = await orchestrateFn(cleanPrompt, systemPrompt, { jsonMode });
57
+ console.log(`[vibe-${provider}] ${result}`);
58
+ }
59
+ } catch (e) {
60
+ console.log(`[${provider.toUpperCase()}] Error: ${e.message}`);
61
+ }
62
+ }
63
+
64
+ main();
@@ -0,0 +1,22 @@
1
+ /**
2
+ * UserPromptSubmit Hook - 메모리 검색
3
+ */
4
+ import { getToolsBaseUrl, PROJECT_DIR } from './utils.js';
5
+
6
+ const BASE_URL = getToolsBaseUrl();
7
+
8
+ async function main() {
9
+ try {
10
+ const module = await import(`${BASE_URL}memory/index.js`);
11
+ const result = await module.listMemories({
12
+ limit: 10,
13
+ projectPath: PROJECT_DIR,
14
+ });
15
+ const lines = result.content[0].text.split('\n');
16
+ console.log(`[RECALL] ✓ Found ${lines.length} memories:`, lines.slice(0, 7).join(' | '));
17
+ } catch (e) {
18
+ console.log('[RECALL] Error:', e.message);
19
+ }
20
+ }
21
+
22
+ main();
@@ -0,0 +1,30 @@
1
+ /**
2
+ * SessionStart Hook - 세션 시작 시 메모리/시간 로드
3
+ */
4
+ import { getToolsBaseUrl, PROJECT_DIR } from './utils.js';
5
+
6
+ const BASE_URL = getToolsBaseUrl();
7
+
8
+ async function main() {
9
+ try {
10
+ const [memoryModule, timeModule] = await Promise.all([
11
+ import(`${BASE_URL}memory/index.js`),
12
+ import(`${BASE_URL}time/index.js`),
13
+ ]);
14
+
15
+ const [session, time, memories] = await Promise.all([
16
+ memoryModule.startSession({ projectPath: PROJECT_DIR }),
17
+ timeModule.getCurrentTime({ format: 'human', timezone: 'Asia/Seoul' }),
18
+ memoryModule.listMemories({ limit: 5, projectPath: PROJECT_DIR }),
19
+ ]);
20
+
21
+ console.log(session.content[0].text);
22
+ console.log('\n' + time.content[0].text);
23
+ console.log('\n[Recent Memories]');
24
+ console.log(memories.content[0].text);
25
+ } catch (e) {
26
+ console.log('[Session] Error:', e.message);
27
+ }
28
+ }
29
+
30
+ main();
@@ -0,0 +1,34 @@
1
+ /**
2
+ * 훅 스크립트 공통 유틸리티
3
+ */
4
+ import fs from 'fs';
5
+ import path from 'path';
6
+
7
+ export const VIBE_PATH = process.env.VIBE_PATH || process.cwd();
8
+ export const PROJECT_DIR = process.env.CLAUDE_PROJECT_DIR || '.';
9
+
10
+ /**
11
+ * 로컬 개발 환경 vs 설치된 패키지 환경 자동 감지하여 tools 경로 반환
12
+ */
13
+ export function getToolsBaseUrl() {
14
+ const localDist = path.join(VIBE_PATH, 'dist', 'tools');
15
+ const packageDist = path.join(VIBE_PATH, 'node_modules', '@su-record', 'vibe', 'dist', 'tools');
16
+
17
+ if (fs.existsSync(localDist)) {
18
+ return `file:///${localDist.replace(/\\/g, '/')}/`;
19
+ }
20
+ return `file:///${packageDist.replace(/\\/g, '/')}/`;
21
+ }
22
+
23
+ /**
24
+ * lib 경로 반환 (gpt-api, gemini-api 등)
25
+ */
26
+ export function getLibBaseUrl() {
27
+ const localDist = path.join(VIBE_PATH, 'dist', 'lib');
28
+ const packageDist = path.join(VIBE_PATH, 'node_modules', '@su-record', 'vibe', 'dist', 'lib');
29
+
30
+ if (fs.existsSync(localDist)) {
31
+ return `file:///${localDist.replace(/\\/g, '/')}/`;
32
+ }
33
+ return `file:///${packageDist.replace(/\\/g, '/')}/`;
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@su-record/vibe",
3
- "version": "2.4.35",
3
+ "version": "2.4.37",
4
4
  "description": "Vibe - Claude Code exclusive SPEC-driven AI coding framework with 35+ integrated tools",
5
5
  "type": "module",
6
6
  "main": "dist/cli/index.js",
@@ -1,10 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * vibe-gemini MCP Server
4
- * Gemini API를 MCP 도구로 제공하여 Claude Code에서 서브에이전트로 활용
5
- *
6
- * 사용법:
7
- * claude mcp add vibe-gemini node /path/to/vibe/dist/lib/gemini-mcp.js -s user
8
- */
9
- export {};
10
- //# sourceMappingURL=gemini-mcp.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"gemini-mcp.d.ts","sourceRoot":"","sources":["../../src/lib/gemini-mcp.ts"],"names":[],"mappings":";AACA;;;;;;GAMG"}