@su-record/vibe 2.6.13 → 2.6.15
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/LICENSE +21 -21
- package/README.md +497 -497
- package/agents/architect-low.md +41 -41
- package/agents/architect-medium.md +59 -59
- package/agents/architect.md +80 -80
- package/agents/build-error-resolver.md +115 -115
- package/agents/compounder.md +261 -261
- package/agents/diagrammer.md +178 -178
- package/agents/e2e-tester.md +266 -266
- package/agents/explorer-low.md +42 -42
- package/agents/explorer-medium.md +59 -59
- package/agents/explorer.md +48 -48
- package/agents/implementer-low.md +43 -43
- package/agents/implementer-medium.md +52 -52
- package/agents/implementer.md +54 -54
- package/agents/refactor-cleaner.md +143 -143
- package/agents/research/best-practices-agent.md +199 -199
- package/agents/research/codebase-patterns-agent.md +157 -157
- package/agents/research/framework-docs-agent.md +188 -188
- package/agents/research/security-advisory-agent.md +213 -213
- package/agents/review/architecture-reviewer.md +107 -107
- package/agents/review/complexity-reviewer.md +116 -116
- package/agents/review/data-integrity-reviewer.md +88 -88
- package/agents/review/git-history-reviewer.md +103 -103
- package/agents/review/performance-reviewer.md +86 -86
- package/agents/review/python-reviewer.md +150 -150
- package/agents/review/rails-reviewer.md +139 -139
- package/agents/review/react-reviewer.md +144 -144
- package/agents/review/security-reviewer.md +80 -80
- package/agents/review/simplicity-reviewer.md +140 -140
- package/agents/review/test-coverage-reviewer.md +116 -116
- package/agents/review/typescript-reviewer.md +127 -127
- package/agents/searcher.md +54 -54
- package/agents/simplifier.md +120 -120
- package/agents/tester.md +49 -49
- package/agents/ui-previewer.md +268 -268
- package/commands/vibe.analyze.md +356 -356
- package/commands/vibe.reason.md +329 -329
- package/commands/vibe.review.md +412 -412
- package/commands/vibe.run.md +1266 -1266
- package/commands/vibe.spec.md +1054 -1054
- package/commands/vibe.spec.review.md +319 -319
- package/commands/vibe.trace.md +161 -161
- package/commands/vibe.utils.md +376 -376
- package/commands/vibe.verify.md +375 -375
- package/dist/cli/collaborator.js +52 -52
- package/dist/cli/detect.d.ts.map +1 -1
- package/dist/cli/detect.js +118 -44
- package/dist/cli/detect.js.map +1 -1
- package/dist/cli/hud.js +20 -20
- package/dist/cli/index.js +118 -118
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/llm.js +144 -144
- package/dist/cli/mcp.d.ts +49 -0
- package/dist/cli/mcp.d.ts.map +1 -0
- package/dist/cli/mcp.js +169 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/postinstall.js +858 -858
- package/dist/cli/setup/ProjectSetup.d.ts +3 -0
- package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +28 -6
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/lib/DeepInit.js +24 -24
- package/dist/lib/IterationTracker.js +11 -11
- package/dist/lib/PythonParser.js +108 -108
- package/dist/lib/ReviewRace.js +96 -96
- package/dist/lib/SkillFrontmatter.js +28 -28
- package/dist/lib/SkillQualityGate.js +9 -9
- package/dist/lib/SkillRepository.js +159 -159
- package/dist/lib/UltraQA.js +77 -77
- package/dist/lib/gemini-api.js +5 -5
- package/dist/lib/gemini-mcp.d.ts +10 -0
- package/dist/lib/gemini-mcp.d.ts.map +1 -0
- package/dist/lib/gemini-mcp.js +353 -0
- package/dist/lib/gemini-mcp.js.map +1 -0
- package/dist/lib/gpt-api.js +4 -4
- package/dist/lib/gpt-mcp.d.ts +10 -0
- package/dist/lib/gpt-mcp.d.ts.map +1 -0
- package/dist/lib/gpt-mcp.js +352 -0
- package/dist/lib/gpt-mcp.js.map +1 -0
- package/dist/lib/memory/KnowledgeGraph.js +4 -4
- package/dist/lib/memory/MemorySearch.js +20 -20
- package/dist/lib/memory/MemoryStorage.js +64 -64
- package/dist/orchestrator/AgentManager.js +12 -12
- package/dist/orchestrator/MultiLlmResearch.js +8 -8
- package/dist/orchestrator/SmartRouter.js +11 -11
- package/dist/orchestrator/parallelResearch.js +24 -24
- package/dist/tools/analytics/getUsageAnalytics.d.ts +10 -0
- package/dist/tools/analytics/getUsageAnalytics.d.ts.map +1 -0
- package/dist/tools/analytics/getUsageAnalytics.js +246 -0
- package/dist/tools/analytics/getUsageAnalytics.js.map +1 -0
- package/dist/tools/analytics/index.d.ts +5 -0
- package/dist/tools/analytics/index.d.ts.map +1 -0
- package/dist/tools/analytics/index.js +5 -0
- package/dist/tools/analytics/index.js.map +1 -0
- package/dist/tools/convention/analyzeComplexity.test.js +115 -115
- package/dist/tools/convention/getCodingGuide.d.ts +7 -0
- package/dist/tools/convention/getCodingGuide.d.ts.map +1 -0
- package/dist/tools/convention/getCodingGuide.js +69 -0
- package/dist/tools/convention/getCodingGuide.js.map +1 -0
- package/dist/tools/convention/validateCodeQuality.test.js +104 -104
- package/dist/tools/planning/analyzeRequirements.d.ts +9 -0
- package/dist/tools/planning/analyzeRequirements.d.ts.map +1 -0
- package/dist/tools/planning/analyzeRequirements.js +171 -0
- package/dist/tools/planning/analyzeRequirements.js.map +1 -0
- package/dist/tools/planning/createUserStories.d.ts +9 -0
- package/dist/tools/planning/createUserStories.d.ts.map +1 -0
- package/dist/tools/planning/createUserStories.js +124 -0
- package/dist/tools/planning/createUserStories.js.map +1 -0
- package/dist/tools/planning/featureRoadmap.d.ts +10 -0
- package/dist/tools/planning/featureRoadmap.d.ts.map +1 -0
- package/dist/tools/planning/featureRoadmap.js +207 -0
- package/dist/tools/planning/featureRoadmap.js.map +1 -0
- package/dist/tools/planning/generatePrd.d.ts +11 -0
- package/dist/tools/planning/generatePrd.d.ts.map +1 -0
- package/dist/tools/planning/generatePrd.js +161 -0
- package/dist/tools/planning/generatePrd.js.map +1 -0
- package/dist/tools/planning/index.d.ts +8 -0
- package/dist/tools/planning/index.d.ts.map +1 -0
- package/dist/tools/planning/index.js +8 -0
- package/dist/tools/planning/index.js.map +1 -0
- package/dist/tools/prompt/analyzePrompt.d.ts +7 -0
- package/dist/tools/prompt/analyzePrompt.d.ts.map +1 -0
- package/dist/tools/prompt/analyzePrompt.js +150 -0
- package/dist/tools/prompt/analyzePrompt.js.map +1 -0
- package/dist/tools/prompt/enhancePrompt.d.ts +8 -0
- package/dist/tools/prompt/enhancePrompt.d.ts.map +1 -0
- package/dist/tools/prompt/enhancePrompt.js +110 -0
- package/dist/tools/prompt/enhancePrompt.js.map +1 -0
- package/dist/tools/prompt/enhancePromptGemini.d.ts +8 -0
- package/dist/tools/prompt/enhancePromptGemini.d.ts.map +1 -0
- package/dist/tools/prompt/enhancePromptGemini.js +332 -0
- package/dist/tools/prompt/enhancePromptGemini.js.map +1 -0
- package/dist/tools/prompt/index.d.ts +7 -0
- package/dist/tools/prompt/index.d.ts.map +1 -0
- package/dist/tools/prompt/index.js +7 -0
- package/dist/tools/prompt/index.js.map +1 -0
- package/dist/tools/reasoning/applyReasoningFramework.d.ts +8 -0
- package/dist/tools/reasoning/applyReasoningFramework.d.ts.map +1 -0
- package/dist/tools/reasoning/applyReasoningFramework.js +266 -0
- package/dist/tools/reasoning/applyReasoningFramework.js.map +1 -0
- package/dist/tools/reasoning/index.d.ts +5 -0
- package/dist/tools/reasoning/index.d.ts.map +1 -0
- package/dist/tools/reasoning/index.js +5 -0
- package/dist/tools/reasoning/index.js.map +1 -0
- package/dist/tools/spec/prdParser.test.js +171 -171
- package/dist/tools/spec/specGenerator.js +169 -169
- package/dist/tools/spec/traceabilityMatrix.js +64 -64
- package/dist/tools/spec/traceabilityMatrix.test.js +28 -28
- package/dist/tools/thinking/analyzeProblem.d.ts +7 -0
- package/dist/tools/thinking/analyzeProblem.d.ts.map +1 -0
- package/dist/tools/thinking/analyzeProblem.js +55 -0
- package/dist/tools/thinking/analyzeProblem.js.map +1 -0
- package/dist/tools/thinking/breakDownProblem.d.ts +8 -0
- package/dist/tools/thinking/breakDownProblem.d.ts.map +1 -0
- package/dist/tools/thinking/breakDownProblem.js +145 -0
- package/dist/tools/thinking/breakDownProblem.js.map +1 -0
- package/dist/tools/thinking/createThinkingChain.d.ts +7 -0
- package/dist/tools/thinking/createThinkingChain.d.ts.map +1 -0
- package/dist/tools/thinking/createThinkingChain.js +44 -0
- package/dist/tools/thinking/createThinkingChain.js.map +1 -0
- package/dist/tools/thinking/formatAsPlan.d.ts +9 -0
- package/dist/tools/thinking/formatAsPlan.d.ts.map +1 -0
- package/dist/tools/thinking/formatAsPlan.js +78 -0
- package/dist/tools/thinking/formatAsPlan.js.map +1 -0
- package/dist/tools/thinking/index.d.ts +10 -0
- package/dist/tools/thinking/index.d.ts.map +1 -0
- package/dist/tools/thinking/index.js +10 -0
- package/dist/tools/thinking/index.js.map +1 -0
- package/dist/tools/thinking/stepByStepAnalysis.d.ts +8 -0
- package/dist/tools/thinking/stepByStepAnalysis.d.ts.map +1 -0
- package/dist/tools/thinking/stepByStepAnalysis.js +63 -0
- package/dist/tools/thinking/stepByStepAnalysis.js.map +1 -0
- package/dist/tools/thinking/thinkAloudProcess.d.ts +8 -0
- package/dist/tools/thinking/thinkAloudProcess.d.ts.map +1 -0
- package/dist/tools/thinking/thinkAloudProcess.js +80 -0
- package/dist/tools/thinking/thinkAloudProcess.js.map +1 -0
- package/hooks/hooks.json +222 -222
- package/hooks/scripts/code-check.js +22 -22
- package/hooks/scripts/code-review.js +22 -22
- package/hooks/scripts/complexity.js +22 -22
- package/hooks/scripts/compound.js +23 -23
- package/hooks/scripts/context-save.js +33 -33
- package/hooks/scripts/gemini-ui-gen.js +281 -281
- package/hooks/scripts/generate-brand-assets.js +474 -474
- package/hooks/scripts/hud-multiline.js +262 -262
- package/hooks/scripts/hud-status.js +291 -291
- package/hooks/scripts/keyword-detector.js +214 -214
- package/hooks/scripts/llm-orchestrate.js +171 -171
- package/hooks/scripts/post-edit.js +97 -97
- package/hooks/scripts/post-tool-verify.js +210 -210
- package/hooks/scripts/pre-tool-guard.js +125 -125
- package/hooks/scripts/recall.js +22 -22
- package/hooks/scripts/session-start.js +30 -30
- package/hooks/scripts/skill-injector.js +191 -191
- package/hooks/scripts/utils.js +97 -97
- package/languages/csharp-unity.md +515 -515
- package/languages/gdscript-godot.md +470 -470
- package/languages/ruby-rails.md +489 -489
- package/languages/typescript-angular.md +433 -433
- package/languages/typescript-astro.md +416 -416
- package/languages/typescript-electron.md +406 -406
- package/languages/typescript-nestjs.md +524 -524
- package/languages/typescript-svelte.md +407 -407
- package/languages/typescript-tauri.md +365 -365
- package/package.json +84 -84
- package/skills/brand-assets.md +141 -141
- package/skills/commerce-patterns.md +361 -361
- package/skills/context7-usage.md +102 -102
- package/skills/e2e-commerce.md +304 -304
- package/skills/frontend-design.md +92 -92
- package/skills/git-worktree.md +181 -181
- package/skills/parallel-research.md +77 -77
- package/skills/priority-todos.md +239 -239
- package/skills/seo-checklist.md +244 -244
- package/skills/tool-fallback.md +190 -190
- package/skills/vibe-capabilities.md +161 -161
- package/vibe/constitution.md +227 -227
- package/vibe/rules/core/communication-guide.md +98 -98
- package/vibe/rules/core/development-philosophy.md +52 -52
- package/vibe/rules/core/quick-start.md +102 -102
- package/vibe/rules/quality/bdd-contract-testing.md +393 -393
- package/vibe/rules/quality/checklist.md +276 -276
- package/vibe/rules/quality/testing-strategy.md +440 -440
- package/vibe/rules/standards/anti-patterns.md +541 -541
- package/vibe/rules/standards/code-structure.md +291 -291
- package/vibe/rules/standards/complexity-metrics.md +313 -313
- package/vibe/rules/standards/naming-conventions.md +198 -198
- package/vibe/setup.sh +31 -31
- package/vibe/templates/constitution-template.md +252 -252
- package/vibe/templates/contract-backend-template.md +526 -526
- package/vibe/templates/contract-frontend-template.md +599 -599
- package/vibe/templates/feature-template.md +96 -96
- package/vibe/templates/spec-template.md +221 -221
package/dist/lib/UltraQA.js
CHANGED
|
@@ -91,60 +91,60 @@ export function shouldContinue(session) {
|
|
|
91
91
|
* Generate architect diagnosis prompt
|
|
92
92
|
*/
|
|
93
93
|
export function generateDiagnosisPrompt(result) {
|
|
94
|
-
return `
|
|
95
|
-
## QA Failure Diagnosis Required
|
|
96
|
-
|
|
97
|
-
**Cycle**: ${result.cycle}
|
|
98
|
-
**Goal**: ${result.goal}
|
|
99
|
-
**Command**: ${result.command}
|
|
100
|
-
**Exit Code**: ${result.exitCode}
|
|
101
|
-
|
|
102
|
-
### Output:
|
|
103
|
-
\`\`\`
|
|
104
|
-
${result.output.slice(0, 2000)}
|
|
105
|
-
\`\`\`
|
|
106
|
-
|
|
107
|
-
### Task:
|
|
108
|
-
1. Identify the root cause of this failure
|
|
109
|
-
2. Determine if it's a code issue, config issue, or environment issue
|
|
110
|
-
3. Provide a specific fix recommendation
|
|
111
|
-
|
|
112
|
-
Return JSON:
|
|
113
|
-
\`\`\`json
|
|
114
|
-
{
|
|
115
|
-
"rootCause": "description of root cause",
|
|
116
|
-
"category": "code|config|environment|dependency",
|
|
117
|
-
"fix": "specific fix to apply",
|
|
118
|
-
"files": ["list", "of", "files", "to", "modify"],
|
|
119
|
-
"confidence": "high|medium|low"
|
|
120
|
-
}
|
|
121
|
-
\`\`\`
|
|
94
|
+
return `
|
|
95
|
+
## QA Failure Diagnosis Required
|
|
96
|
+
|
|
97
|
+
**Cycle**: ${result.cycle}
|
|
98
|
+
**Goal**: ${result.goal}
|
|
99
|
+
**Command**: ${result.command}
|
|
100
|
+
**Exit Code**: ${result.exitCode}
|
|
101
|
+
|
|
102
|
+
### Output:
|
|
103
|
+
\`\`\`
|
|
104
|
+
${result.output.slice(0, 2000)}
|
|
105
|
+
\`\`\`
|
|
106
|
+
|
|
107
|
+
### Task:
|
|
108
|
+
1. Identify the root cause of this failure
|
|
109
|
+
2. Determine if it's a code issue, config issue, or environment issue
|
|
110
|
+
3. Provide a specific fix recommendation
|
|
111
|
+
|
|
112
|
+
Return JSON:
|
|
113
|
+
\`\`\`json
|
|
114
|
+
{
|
|
115
|
+
"rootCause": "description of root cause",
|
|
116
|
+
"category": "code|config|environment|dependency",
|
|
117
|
+
"fix": "specific fix to apply",
|
|
118
|
+
"files": ["list", "of", "files", "to", "modify"],
|
|
119
|
+
"confidence": "high|medium|low"
|
|
120
|
+
}
|
|
121
|
+
\`\`\`
|
|
122
122
|
`.trim();
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* Generate executor fix prompt
|
|
126
126
|
*/
|
|
127
127
|
export function generateFixPrompt(diagnosis, result) {
|
|
128
|
-
return `
|
|
129
|
-
## Apply Fix for QA Failure
|
|
130
|
-
|
|
131
|
-
**Previous Diagnosis**:
|
|
132
|
-
${diagnosis}
|
|
133
|
-
|
|
134
|
-
**Failed Command**: ${result.command}
|
|
135
|
-
**Cycle**: ${result.cycle}
|
|
136
|
-
|
|
137
|
-
### Task:
|
|
138
|
-
Apply the fix identified in the diagnosis. Make minimal changes to resolve the issue.
|
|
139
|
-
|
|
140
|
-
### Rules:
|
|
141
|
-
1. Only modify files mentioned in the diagnosis
|
|
142
|
-
2. Make the smallest change that fixes the issue
|
|
143
|
-
3. Do not refactor or improve unrelated code
|
|
144
|
-
4. Run the verification command after fixing
|
|
145
|
-
|
|
146
|
-
### After fixing, run:
|
|
147
|
-
\`${result.command}\`
|
|
128
|
+
return `
|
|
129
|
+
## Apply Fix for QA Failure
|
|
130
|
+
|
|
131
|
+
**Previous Diagnosis**:
|
|
132
|
+
${diagnosis}
|
|
133
|
+
|
|
134
|
+
**Failed Command**: ${result.command}
|
|
135
|
+
**Cycle**: ${result.cycle}
|
|
136
|
+
|
|
137
|
+
### Task:
|
|
138
|
+
Apply the fix identified in the diagnosis. Make minimal changes to resolve the issue.
|
|
139
|
+
|
|
140
|
+
### Rules:
|
|
141
|
+
1. Only modify files mentioned in the diagnosis
|
|
142
|
+
2. Make the smallest change that fixes the issue
|
|
143
|
+
3. Do not refactor or improve unrelated code
|
|
144
|
+
4. Run the verification command after fixing
|
|
145
|
+
|
|
146
|
+
### After fixing, run:
|
|
147
|
+
\`${result.command}\`
|
|
148
148
|
`.trim();
|
|
149
149
|
}
|
|
150
150
|
/**
|
|
@@ -198,35 +198,35 @@ export function parseQAGoals(input) {
|
|
|
198
198
|
* Create UltraQA workflow description
|
|
199
199
|
*/
|
|
200
200
|
export function describeUltraQAWorkflow() {
|
|
201
|
-
return `
|
|
202
|
-
## UltraQA Workflow
|
|
203
|
-
|
|
204
|
-
5-cycle autonomous QA loop:
|
|
205
|
-
|
|
206
|
-
\`\`\`
|
|
207
|
-
┌─────────────────────────────────────────────┐
|
|
208
|
-
│ ULTRAQA CYCLE │
|
|
209
|
-
│ │
|
|
210
|
-
│ 1. Run verification (test/build/lint) │
|
|
211
|
-
│ ↓ │
|
|
212
|
-
│ 2. Check result │
|
|
213
|
-
│ ↓ │
|
|
214
|
-
│ ┌───┴───┐ │
|
|
215
|
-
│ PASS FAIL │
|
|
216
|
-
│ ↓ ↓ │
|
|
217
|
-
│ DONE 3. Architect diagnosis │
|
|
218
|
-
│ ↓ │
|
|
219
|
-
│ 4. Executor fix │
|
|
220
|
-
│ ↓ │
|
|
221
|
-
│ 5. Repeat (max 5 cycles) │
|
|
222
|
-
└─────────────────────────────────────────────┘
|
|
223
|
-
\`\`\`
|
|
224
|
-
|
|
225
|
-
Exit conditions:
|
|
226
|
-
- ✅ All goals pass
|
|
227
|
-
- ❌ Max 5 cycles reached
|
|
228
|
-
- ❌ Same failure 3 times
|
|
229
|
-
- ❌ Environment error
|
|
201
|
+
return `
|
|
202
|
+
## UltraQA Workflow
|
|
203
|
+
|
|
204
|
+
5-cycle autonomous QA loop:
|
|
205
|
+
|
|
206
|
+
\`\`\`
|
|
207
|
+
┌─────────────────────────────────────────────┐
|
|
208
|
+
│ ULTRAQA CYCLE │
|
|
209
|
+
│ │
|
|
210
|
+
│ 1. Run verification (test/build/lint) │
|
|
211
|
+
│ ↓ │
|
|
212
|
+
│ 2. Check result │
|
|
213
|
+
│ ↓ │
|
|
214
|
+
│ ┌───┴───┐ │
|
|
215
|
+
│ PASS FAIL │
|
|
216
|
+
│ ↓ ↓ │
|
|
217
|
+
│ DONE 3. Architect diagnosis │
|
|
218
|
+
│ ↓ │
|
|
219
|
+
│ 4. Executor fix │
|
|
220
|
+
│ ↓ │
|
|
221
|
+
│ 5. Repeat (max 5 cycles) │
|
|
222
|
+
└─────────────────────────────────────────────┘
|
|
223
|
+
\`\`\`
|
|
224
|
+
|
|
225
|
+
Exit conditions:
|
|
226
|
+
- ✅ All goals pass
|
|
227
|
+
- ❌ Max 5 cycles reached
|
|
228
|
+
- ❌ Same failure 3 times
|
|
229
|
+
- ❌ Environment error
|
|
230
230
|
`.trim();
|
|
231
231
|
}
|
|
232
232
|
//# sourceMappingURL=UltraQA.js.map
|
package/dist/lib/gemini-api.js
CHANGED
|
@@ -433,35 +433,35 @@ export async function vibeGeminiOrchestrate(prompt, systemPrompt, options = {})
|
|
|
433
433
|
* Vibe Spec 파싱 (Vibe Spec → 실행 계획)
|
|
434
434
|
*/
|
|
435
435
|
export async function vibeGeminiParseSpec(spec) {
|
|
436
|
-
return vibeGeminiOrchestrate(spec, `You are a Vibe Spec parser. Parse the given specification and output a structured execution plan.
|
|
436
|
+
return vibeGeminiOrchestrate(spec, `You are a Vibe Spec parser. Parse the given specification and output a structured execution plan.
|
|
437
437
|
Output format: { "phases": [...], "files": [...], "dependencies": [...] }`);
|
|
438
438
|
}
|
|
439
439
|
/**
|
|
440
440
|
* Vibe 실행 계획 수립 (Task → Steps)
|
|
441
441
|
*/
|
|
442
442
|
export async function vibeGeminiPlanExecution(task, context) {
|
|
443
|
-
return vibeGeminiOrchestrate(`Task: ${task}\n\nContext:\n${context}`, `You are a Vibe execution planner. Given a task and context, create a step-by-step execution plan.
|
|
443
|
+
return vibeGeminiOrchestrate(`Task: ${task}\n\nContext:\n${context}`, `You are a Vibe execution planner. Given a task and context, create a step-by-step execution plan.
|
|
444
444
|
Output format: { "steps": [{ "id": 1, "action": "...", "target": "...", "expected": "..." }], "estimatedComplexity": "low|medium|high" }`);
|
|
445
445
|
}
|
|
446
446
|
/**
|
|
447
447
|
* Vibe 코드 분석 (빠른 구조 분석)
|
|
448
448
|
*/
|
|
449
449
|
export async function vibeGeminiAnalyze(code, question) {
|
|
450
|
-
return vibeGeminiOrchestrate(`Code:\n\`\`\`\n${code}\n\`\`\`\n\nQuestion: ${question}`, `You are a code analyzer. Answer the question about the given code concisely.
|
|
450
|
+
return vibeGeminiOrchestrate(`Code:\n\`\`\`\n${code}\n\`\`\`\n\nQuestion: ${question}`, `You are a code analyzer. Answer the question about the given code concisely.
|
|
451
451
|
Output format: { "answer": "...", "confidence": 0.0-1.0, "relatedSymbols": [...] }`);
|
|
452
452
|
}
|
|
453
453
|
/**
|
|
454
454
|
* Vibe 다음 액션 결정 (상태 기반)
|
|
455
455
|
*/
|
|
456
456
|
export async function vibeGeminiDecideNextAction(currentState, availableActions, goal) {
|
|
457
|
-
return vibeGeminiOrchestrate(`Current State:\n${currentState}\n\nAvailable Actions:\n${availableActions.join('\n')}\n\nGoal: ${goal}`, `You are an action decider. Based on the current state and goal, select the best next action.
|
|
457
|
+
return vibeGeminiOrchestrate(`Current State:\n${currentState}\n\nAvailable Actions:\n${availableActions.join('\n')}\n\nGoal: ${goal}`, `You are an action decider. Based on the current state and goal, select the best next action.
|
|
458
458
|
Output format: { "selectedAction": "...", "reason": "...", "parameters": {} }`);
|
|
459
459
|
}
|
|
460
460
|
/**
|
|
461
461
|
* Vibe UI/UX 분석 (검색 없이 내부 지식으로)
|
|
462
462
|
*/
|
|
463
463
|
export async function vibeGeminiAnalyzeUX(description) {
|
|
464
|
-
return vibeGeminiOrchestrate(description, `You are a UI/UX expert. Analyze the given design description and provide structured feedback.
|
|
464
|
+
return vibeGeminiOrchestrate(description, `You are a UI/UX expert. Analyze the given design description and provide structured feedback.
|
|
465
465
|
Output format: { "issues": [...], "suggestions": [...], "accessibility": { "score": 0-100, "concerns": [...] } }`, { jsonMode: true });
|
|
466
466
|
}
|
|
467
467
|
//# sourceMappingURL=gemini-api.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-mcp.d.ts","sourceRoot":"","sources":["../../src/lib/gemini-mcp.ts"],"names":[],"mappings":";AACA;;;;;;GAMG"}
|
|
@@ -0,0 +1,353 @@
|
|
|
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
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
10
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
11
|
+
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
12
|
+
// Gemini API 모듈 로드
|
|
13
|
+
import * as geminiApi from './gemini-api.js';
|
|
14
|
+
import * as geminiStorage from './gemini-storage.js';
|
|
15
|
+
// MCP 서버 생성
|
|
16
|
+
const server = new Server({
|
|
17
|
+
name: 'vibe-gemini',
|
|
18
|
+
version: '1.0.0',
|
|
19
|
+
}, {
|
|
20
|
+
capabilities: {
|
|
21
|
+
tools: {},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
// 도구 목록 정의
|
|
25
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => {
|
|
26
|
+
return {
|
|
27
|
+
tools: [
|
|
28
|
+
{
|
|
29
|
+
name: 'gemini_chat',
|
|
30
|
+
description: 'Gemini 모델에 질문하기. 코드 분석, UI/UX 검토, 아키텍처 상담 등에 활용. 서브에이전트로 사용 가능.',
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: 'object',
|
|
33
|
+
properties: {
|
|
34
|
+
prompt: {
|
|
35
|
+
type: 'string',
|
|
36
|
+
description: '질문 또는 요청 내용',
|
|
37
|
+
},
|
|
38
|
+
model: {
|
|
39
|
+
type: 'string',
|
|
40
|
+
description: '사용할 모델 (gemini-2.5-flash, gemini-3-flash, gemini-3-pro)',
|
|
41
|
+
default: 'gemini-2.5-flash',
|
|
42
|
+
},
|
|
43
|
+
systemPrompt: {
|
|
44
|
+
type: 'string',
|
|
45
|
+
description: '시스템 프롬프트 (선택)',
|
|
46
|
+
},
|
|
47
|
+
maxTokens: {
|
|
48
|
+
type: 'number',
|
|
49
|
+
description: '최대 토큰 수',
|
|
50
|
+
default: 4096,
|
|
51
|
+
},
|
|
52
|
+
temperature: {
|
|
53
|
+
type: 'number',
|
|
54
|
+
description: '온도 (0-1)',
|
|
55
|
+
default: 0.7,
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
required: ['prompt'],
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'gemini_analyze_code',
|
|
63
|
+
description: '코드 분석 요청. Gemini가 코드를 분석하고 개선점을 제안.',
|
|
64
|
+
inputSchema: {
|
|
65
|
+
type: 'object',
|
|
66
|
+
properties: {
|
|
67
|
+
code: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
description: '분석할 코드',
|
|
70
|
+
},
|
|
71
|
+
language: {
|
|
72
|
+
type: 'string',
|
|
73
|
+
description: '프로그래밍 언어',
|
|
74
|
+
},
|
|
75
|
+
focus: {
|
|
76
|
+
type: 'string',
|
|
77
|
+
description: '분석 초점 (performance, security, readability, all)',
|
|
78
|
+
default: 'all',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
required: ['code'],
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'gemini_review_ui',
|
|
86
|
+
description: 'UI/UX 리뷰 요청. Gemini가 UI 설계를 분석하고 피드백 제공.',
|
|
87
|
+
inputSchema: {
|
|
88
|
+
type: 'object',
|
|
89
|
+
properties: {
|
|
90
|
+
description: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'UI 설명 또는 구조',
|
|
93
|
+
},
|
|
94
|
+
context: {
|
|
95
|
+
type: 'string',
|
|
96
|
+
description: '프로젝트 컨텍스트 (선택)',
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
required: ['description'],
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'gemini_quick_ask',
|
|
104
|
+
description: '빠른 질문. 코드 탐색이나 간단한 질문에 최적화 (낮은 temperature, 짧은 응답).',
|
|
105
|
+
inputSchema: {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: {
|
|
108
|
+
prompt: {
|
|
109
|
+
type: 'string',
|
|
110
|
+
description: '질문 내용',
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
required: ['prompt'],
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
name: 'gemini_auth_status',
|
|
118
|
+
description: 'Gemini OAuth 인증 상태 확인',
|
|
119
|
+
inputSchema: {
|
|
120
|
+
type: 'object',
|
|
121
|
+
properties: {},
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
name: 'gemini_list_models',
|
|
126
|
+
description: '사용 가능한 Gemini 모델 목록',
|
|
127
|
+
inputSchema: {
|
|
128
|
+
type: 'object',
|
|
129
|
+
properties: {},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
],
|
|
133
|
+
};
|
|
134
|
+
});
|
|
135
|
+
// 도구 실행 핸들러
|
|
136
|
+
server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
137
|
+
const { name, arguments: args } = request.params;
|
|
138
|
+
try {
|
|
139
|
+
switch (name) {
|
|
140
|
+
case 'gemini_chat': {
|
|
141
|
+
const { prompt, model, systemPrompt, maxTokens, temperature } = args;
|
|
142
|
+
const result = await geminiApi.chat({
|
|
143
|
+
model: model || 'gemini-2.5-flash',
|
|
144
|
+
messages: [{ role: 'user', content: prompt }],
|
|
145
|
+
systemPrompt: systemPrompt || '',
|
|
146
|
+
maxTokens: maxTokens || 4096,
|
|
147
|
+
temperature: temperature || 0.7,
|
|
148
|
+
});
|
|
149
|
+
return {
|
|
150
|
+
content: [
|
|
151
|
+
{
|
|
152
|
+
type: 'text',
|
|
153
|
+
text: JSON.stringify({
|
|
154
|
+
response: result.content,
|
|
155
|
+
model: result.model,
|
|
156
|
+
usage: result.usage,
|
|
157
|
+
}, null, 2),
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
case 'gemini_analyze_code': {
|
|
163
|
+
const { code, language, focus } = args;
|
|
164
|
+
const sysPrompt = `You are an expert code reviewer. Analyze the given ${language || 'code'} and provide detailed feedback focusing on: ${focus || 'all aspects including performance, security, readability, and best practices'}.
|
|
165
|
+
|
|
166
|
+
Respond in Korean and provide:
|
|
167
|
+
1. 코드 요약
|
|
168
|
+
2. 주요 이슈 (있다면)
|
|
169
|
+
3. 개선 제안
|
|
170
|
+
4. 전체 품질 점수 (1-10)`;
|
|
171
|
+
const result = await geminiApi.chat({
|
|
172
|
+
model: 'gemini-2.5-flash',
|
|
173
|
+
messages: [{ role: 'user', content: code }],
|
|
174
|
+
systemPrompt: sysPrompt,
|
|
175
|
+
maxTokens: 4096,
|
|
176
|
+
temperature: 0.3,
|
|
177
|
+
});
|
|
178
|
+
return {
|
|
179
|
+
content: [
|
|
180
|
+
{
|
|
181
|
+
type: 'text',
|
|
182
|
+
text: result.content,
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
case 'gemini_review_ui': {
|
|
188
|
+
const { description, context } = args;
|
|
189
|
+
const sysPrompt = `You are a UI/UX expert. Review the given UI description and provide detailed feedback.
|
|
190
|
+
|
|
191
|
+
${context ? `Project context: ${context}` : ''}
|
|
192
|
+
|
|
193
|
+
Respond in Korean and provide:
|
|
194
|
+
1. UI 구조 평가
|
|
195
|
+
2. UX 개선점
|
|
196
|
+
3. 접근성 체크
|
|
197
|
+
4. 모범 사례 비교
|
|
198
|
+
5. 구체적인 개선 제안`;
|
|
199
|
+
const result = await geminiApi.chat({
|
|
200
|
+
model: 'gemini-2.5-flash',
|
|
201
|
+
messages: [{ role: 'user', content: description }],
|
|
202
|
+
systemPrompt: sysPrompt,
|
|
203
|
+
maxTokens: 4096,
|
|
204
|
+
temperature: 0.5,
|
|
205
|
+
});
|
|
206
|
+
return {
|
|
207
|
+
content: [
|
|
208
|
+
{
|
|
209
|
+
type: 'text',
|
|
210
|
+
text: result.content,
|
|
211
|
+
},
|
|
212
|
+
],
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
case 'gemini_quick_ask': {
|
|
216
|
+
const { prompt } = args;
|
|
217
|
+
const response = await geminiApi.quickAsk(prompt);
|
|
218
|
+
return {
|
|
219
|
+
content: [
|
|
220
|
+
{
|
|
221
|
+
type: 'text',
|
|
222
|
+
text: response,
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
};
|
|
226
|
+
}
|
|
227
|
+
case 'gemini_auth_status': {
|
|
228
|
+
try {
|
|
229
|
+
const account = geminiStorage.getActiveAccount();
|
|
230
|
+
if (account) {
|
|
231
|
+
const isExpired = geminiStorage.isTokenExpired(account);
|
|
232
|
+
return {
|
|
233
|
+
content: [
|
|
234
|
+
{
|
|
235
|
+
type: 'text',
|
|
236
|
+
text: JSON.stringify({
|
|
237
|
+
authenticated: true,
|
|
238
|
+
email: account.email,
|
|
239
|
+
projectId: account.projectId || 'default',
|
|
240
|
+
tokenValid: !isExpired,
|
|
241
|
+
expires: new Date(account.expires).toISOString(),
|
|
242
|
+
}, null, 2),
|
|
243
|
+
},
|
|
244
|
+
],
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
return {
|
|
249
|
+
content: [
|
|
250
|
+
{
|
|
251
|
+
type: 'text',
|
|
252
|
+
text: JSON.stringify({
|
|
253
|
+
authenticated: false,
|
|
254
|
+
message: 'vibe gemini --auth 명령으로 인증하세요.',
|
|
255
|
+
}, null, 2),
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
catch (error) {
|
|
262
|
+
return {
|
|
263
|
+
content: [
|
|
264
|
+
{
|
|
265
|
+
type: 'text',
|
|
266
|
+
text: JSON.stringify({
|
|
267
|
+
authenticated: false,
|
|
268
|
+
error: error.message,
|
|
269
|
+
}, null, 2),
|
|
270
|
+
},
|
|
271
|
+
],
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
case 'gemini_list_models': {
|
|
276
|
+
const models = geminiApi.getAvailableModels();
|
|
277
|
+
return {
|
|
278
|
+
content: [
|
|
279
|
+
{
|
|
280
|
+
type: 'text',
|
|
281
|
+
text: JSON.stringify(models, null, 2),
|
|
282
|
+
},
|
|
283
|
+
],
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
default:
|
|
287
|
+
return {
|
|
288
|
+
content: [
|
|
289
|
+
{
|
|
290
|
+
type: 'text',
|
|
291
|
+
text: `Unknown tool: ${name}`,
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
isError: true,
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
catch (error) {
|
|
299
|
+
const errorMessage = error.message;
|
|
300
|
+
// 429 Rate Limit 에러 시 Claude fallback 안내
|
|
301
|
+
if (errorMessage.includes('429') || errorMessage.includes('RESOURCE_EXHAUSTED')) {
|
|
302
|
+
return {
|
|
303
|
+
content: [
|
|
304
|
+
{
|
|
305
|
+
type: 'text',
|
|
306
|
+
text: JSON.stringify({
|
|
307
|
+
status: 'fallback',
|
|
308
|
+
reason: 'rate_limit',
|
|
309
|
+
message: 'Gemini API 할당량 초과. Claude가 직접 처리해주세요.',
|
|
310
|
+
original_error: errorMessage,
|
|
311
|
+
}, null, 2),
|
|
312
|
+
},
|
|
313
|
+
],
|
|
314
|
+
isError: false, // fallback은 에러가 아님
|
|
315
|
+
};
|
|
316
|
+
}
|
|
317
|
+
// 인증 에러 시 fallback 안내
|
|
318
|
+
if (errorMessage.includes('401') || errorMessage.includes('403') || errorMessage.includes('invalid_grant')) {
|
|
319
|
+
return {
|
|
320
|
+
content: [
|
|
321
|
+
{
|
|
322
|
+
type: 'text',
|
|
323
|
+
text: JSON.stringify({
|
|
324
|
+
status: 'fallback',
|
|
325
|
+
reason: 'auth_error',
|
|
326
|
+
message: 'Gemini 인증 만료. Claude가 직접 처리해주세요. (vibe gemini --auth로 재인증 가능)',
|
|
327
|
+
original_error: errorMessage,
|
|
328
|
+
}, null, 2),
|
|
329
|
+
},
|
|
330
|
+
],
|
|
331
|
+
isError: false,
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
// 기타 에러
|
|
335
|
+
return {
|
|
336
|
+
content: [
|
|
337
|
+
{
|
|
338
|
+
type: 'text',
|
|
339
|
+
text: `Error: ${errorMessage}`,
|
|
340
|
+
},
|
|
341
|
+
],
|
|
342
|
+
isError: true,
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
});
|
|
346
|
+
// 서버 시작
|
|
347
|
+
async function main() {
|
|
348
|
+
const transport = new StdioServerTransport();
|
|
349
|
+
await server.connect(transport);
|
|
350
|
+
console.error('vibe-gemini MCP server running');
|
|
351
|
+
}
|
|
352
|
+
main().catch(console.error);
|
|
353
|
+
//# sourceMappingURL=gemini-mcp.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gemini-mcp.js","sourceRoot":"","sources":["../../src/lib/gemini-mcp.ts"],"names":[],"mappings":";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,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC;4BACnB,MAAM,EAAE,UAAU;4BAClB,MAAM,EAAE,YAAY;4BACpB,OAAO,EAAE,+DAA+D;4BACxE,cAAc,EAAE,YAAY;yBAC7B,EAAE,IAAI,EAAE,CAAC,CAAC;qBACZ;iBACF;gBACD,OAAO,EAAE,KAAK;aACf,CAAC;QACJ,CAAC;QAED,QAAQ;QACR,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,UAAU,YAAY,EAAE;iBAC/B;aACF;YACD,OAAO,EAAE,IAAI;SACd,CAAC;IACJ,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,QAAQ;AACR,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,gCAAgC,CAAC,CAAC;AAClD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
package/dist/lib/gpt-api.js
CHANGED
|
@@ -529,28 +529,28 @@ export async function vibeGptOrchestrate(prompt, systemPrompt, options = {}) {
|
|
|
529
529
|
* Vibe Spec 파싱 (Vibe Spec → 실행 계획)
|
|
530
530
|
*/
|
|
531
531
|
export async function vibeGptParseSpec(spec) {
|
|
532
|
-
return vibeGptOrchestrate(spec, `You are a Vibe Spec parser. Parse the given specification and output a structured execution plan.
|
|
532
|
+
return vibeGptOrchestrate(spec, `You are a Vibe Spec parser. Parse the given specification and output a structured execution plan.
|
|
533
533
|
Output format: { "phases": [...], "files": [...], "dependencies": [...] }`);
|
|
534
534
|
}
|
|
535
535
|
/**
|
|
536
536
|
* Vibe 실행 계획 수립 (Task → Steps)
|
|
537
537
|
*/
|
|
538
538
|
export async function vibeGptPlanExecution(task, context) {
|
|
539
|
-
return vibeGptOrchestrate(`Task: ${task}\n\nContext:\n${context}`, `You are a Vibe execution planner. Given a task and context, create a step-by-step execution plan.
|
|
539
|
+
return vibeGptOrchestrate(`Task: ${task}\n\nContext:\n${context}`, `You are a Vibe execution planner. Given a task and context, create a step-by-step execution plan.
|
|
540
540
|
Output format: { "steps": [{ "id": 1, "action": "...", "target": "...", "expected": "..." }], "estimatedComplexity": "low|medium|high" }`);
|
|
541
541
|
}
|
|
542
542
|
/**
|
|
543
543
|
* Vibe 코드 분석 (빠른 구조 분석)
|
|
544
544
|
*/
|
|
545
545
|
export async function vibeGptAnalyze(code, question) {
|
|
546
|
-
return vibeGptOrchestrate(`Code:\n\`\`\`\n${code}\n\`\`\`\n\nQuestion: ${question}`, `You are a code analyzer. Answer the question about the given code concisely.
|
|
546
|
+
return vibeGptOrchestrate(`Code:\n\`\`\`\n${code}\n\`\`\`\n\nQuestion: ${question}`, `You are a code analyzer. Answer the question about the given code concisely.
|
|
547
547
|
Output format: { "answer": "...", "confidence": 0.0-1.0, "relatedSymbols": [...] }`);
|
|
548
548
|
}
|
|
549
549
|
/**
|
|
550
550
|
* Vibe 다음 액션 결정 (상태 기반)
|
|
551
551
|
*/
|
|
552
552
|
export async function vibeGptDecideNextAction(currentState, availableActions, goal) {
|
|
553
|
-
return vibeGptOrchestrate(`Current State:\n${currentState}\n\nAvailable Actions:\n${availableActions.join('\n')}\n\nGoal: ${goal}`, `You are an action decider. Based on the current state and goal, select the best next action.
|
|
553
|
+
return vibeGptOrchestrate(`Current State:\n${currentState}\n\nAvailable Actions:\n${availableActions.join('\n')}\n\nGoal: ${goal}`, `You are an action decider. Based on the current state and goal, select the best next action.
|
|
554
554
|
Output format: { "selectedAction": "...", "reason": "...", "parameters": {} }`);
|
|
555
555
|
}
|
|
556
556
|
//# sourceMappingURL=gpt-api.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gpt-mcp.d.ts","sourceRoot":"","sources":["../../src/lib/gpt-mcp.ts"],"names":[],"mappings":";AACA;;;;;;GAMG"}
|