@su-record/vibe 3.0.0 → 3.2.0

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 (455) hide show
  1. package/CLAUDE.md +2 -2
  2. package/README.en.md +6 -4
  3. package/README.md +5 -3
  4. package/dist/__tests__/wiring-integrity.test.d.ts +2 -0
  5. package/dist/__tests__/wiring-integrity.test.d.ts.map +1 -0
  6. package/dist/__tests__/wiring-integrity.test.js +160 -0
  7. package/dist/__tests__/wiring-integrity.test.js.map +1 -0
  8. package/dist/cli/commands/info.d.ts.map +1 -1
  9. package/dist/cli/commands/info.js +2 -1
  10. package/dist/cli/commands/info.js.map +1 -1
  11. package/dist/cli/commands/init.d.ts.map +1 -1
  12. package/dist/cli/commands/init.js +4 -2
  13. package/dist/cli/commands/init.js.map +1 -1
  14. package/dist/cli/index.js +102 -128
  15. package/dist/cli/index.js.map +1 -1
  16. package/dist/cli/postinstall/claude-agents.d.ts.map +1 -1
  17. package/dist/cli/postinstall/claude-agents.js +0 -5
  18. package/dist/cli/postinstall/claude-agents.js.map +1 -1
  19. package/dist/cli/postinstall/constants.d.ts +6 -0
  20. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  21. package/dist/cli/postinstall/constants.js +42 -60
  22. package/dist/cli/postinstall/constants.js.map +1 -1
  23. package/dist/cli/postinstall/inline-skills.js +2 -2
  24. package/dist/cli/postinstall/inline-skills.js.map +1 -1
  25. package/dist/cli/postinstall/main.d.ts.map +1 -1
  26. package/dist/cli/postinstall/main.js +2 -0
  27. package/dist/cli/postinstall/main.js.map +1 -1
  28. package/dist/cli/postinstall.d.ts +6 -1
  29. package/dist/cli/postinstall.d.ts.map +1 -1
  30. package/dist/cli/postinstall.js +6 -1
  31. package/dist/cli/postinstall.js.map +1 -1
  32. package/dist/cli/setup/GlobalInstaller.d.ts +1 -15
  33. package/dist/cli/setup/GlobalInstaller.d.ts.map +1 -1
  34. package/dist/cli/setup/GlobalInstaller.js +16 -115
  35. package/dist/cli/setup/GlobalInstaller.js.map +1 -1
  36. package/dist/cli/setup/GlobalInstaller.test.d.ts +2 -0
  37. package/dist/cli/setup/GlobalInstaller.test.d.ts.map +1 -0
  38. package/dist/cli/setup/GlobalInstaller.test.js +16 -0
  39. package/dist/cli/setup/GlobalInstaller.test.js.map +1 -0
  40. package/dist/cli/setup/ProjectSetup.js +2 -2
  41. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  42. package/dist/cli/setup.d.ts +1 -1
  43. package/dist/cli/setup.d.ts.map +1 -1
  44. package/dist/cli/setup.js +1 -1
  45. package/dist/cli/setup.js.map +1 -1
  46. package/dist/infra/lib/SkillRepository.js +1 -1
  47. package/dist/infra/lib/evolution/__tests__/integration.test.js +0 -42
  48. package/dist/infra/lib/evolution/__tests__/integration.test.js.map +1 -1
  49. package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -78
  50. package/hooks/scripts/__tests__/clone-behaviors.test.js +97 -1
  51. package/hooks/scripts/__tests__/clone-merge-responsive.test.js +106 -0
  52. package/hooks/scripts/__tests__/code-check-memory-write.test.js +81 -0
  53. package/hooks/scripts/__tests__/step-counter.test.js +21 -0
  54. package/hooks/scripts/auto-format.js +2 -11
  55. package/hooks/scripts/auto-test.js +2 -11
  56. package/hooks/scripts/clone-extract.js +388 -38
  57. package/hooks/scripts/clone-merge-responsive.js +184 -0
  58. package/hooks/scripts/clone-spec.js +33 -8
  59. package/hooks/scripts/clone-validate.js +15 -9
  60. package/hooks/scripts/code-check.js +27 -55
  61. package/hooks/scripts/lib/glob.js +32 -0
  62. package/hooks/scripts/lib/hook-context.js +19 -2
  63. package/hooks/scripts/post-edit.js +2 -3
  64. package/hooks/scripts/prompt-dispatcher.js +1 -1
  65. package/hooks/scripts/scope-guard.js +3 -42
  66. package/hooks/scripts/sentinel-guard.js +5 -20
  67. package/hooks/scripts/session-start.js +2 -2
  68. package/hooks/scripts/step-counter.js +35 -57
  69. package/package.json +6 -4
  70. package/skills/clone/SKILL.md +74 -203
  71. package/skills/clone/references/capture-rules.md +48 -0
  72. package/skills/clone/references/legal-and-error-recovery.md +40 -0
  73. package/skills/clone/references/refine-rules.md +61 -0
  74. package/skills/clone/references/scaffold-phases.md +59 -0
  75. package/skills/clone/references/setup-and-layout.md +30 -0
  76. package/skills/docs/SKILL.md +39 -4
  77. package/skills/docs/references/api-docs-changelog.md +34 -0
  78. package/skills/docs/references/codemaps-output.md +23 -0
  79. package/{agents/diagrammer.md → skills/docs/references/diagram-spec.md} +2 -15
  80. package/skills/exec-plan/SKILL.md +1 -1
  81. package/skills/exec-plan/templates/plan.md +1 -1
  82. package/skills/handoff/SKILL.md +3 -3
  83. package/skills/handoff/templates/handoff.md +1 -1
  84. package/skills/vibe/SKILL.md +3 -2
  85. package/skills/vibe.analyze/SKILL.md +12 -249
  86. package/skills/vibe.analyze/references/output-templates.md +188 -0
  87. package/skills/vibe.analyze/references/quality-gate.md +93 -0
  88. package/skills/vibe.clone/SKILL.md +52 -19
  89. package/skills/vibe.continue/SKILL.md +32 -0
  90. package/skills/vibe.design/SKILL.md +23 -1
  91. package/skills/vibe.design/references/ui-preview.md +20 -0
  92. package/skills/vibe.docs/SKILL.md +4 -2
  93. package/skills/vibe.figma/SKILL.md +33 -260
  94. package/skills/vibe.figma/references/branch-phases.md +113 -0
  95. package/skills/vibe.figma/references/state-schema.md +42 -0
  96. package/skills/vibe.figma/references/step-algorithms.md +204 -0
  97. package/skills/vibe.image/SKILL.md +62 -0
  98. package/skills/vibe.image/references/image-generation-examples.md +39 -0
  99. package/skills/vibe.reason/SKILL.md +3 -183
  100. package/skills/vibe.reason/references/output-format-template.md +57 -0
  101. package/skills/vibe.reason/references/quality-rubrics.md +94 -0
  102. package/skills/vibe.reason/references/worked-example.md +45 -0
  103. package/skills/vibe.review/SKILL.md +13 -348
  104. package/skills/vibe.review/references/boundary-check.md +25 -0
  105. package/skills/vibe.review/references/output-template.md +74 -0
  106. package/skills/vibe.review/references/quality-gate.md +84 -0
  107. package/skills/vibe.review/references/race-mode.md +117 -0
  108. package/skills/vibe.review/references/worked-examples.md +94 -0
  109. package/vibe/templates/claudemd-template.md +1 -1
  110. package/agents/acceptance-tester.md +0 -56
  111. package/agents/documenter.md +0 -43
  112. package/agents/figma/figma-engineer.md +0 -76
  113. package/dist/cli/llm/gemini-commands.d.ts +0 -25
  114. package/dist/cli/llm/gemini-commands.d.ts.map +0 -1
  115. package/dist/cli/llm/gemini-commands.js +0 -143
  116. package/dist/cli/llm/gemini-commands.js.map +0 -1
  117. package/dist/cli/postinstall/codex-agents.d.ts +0 -24
  118. package/dist/cli/postinstall/codex-agents.d.ts.map +0 -1
  119. package/dist/cli/postinstall/codex-agents.js +0 -114
  120. package/dist/cli/postinstall/codex-agents.js.map +0 -1
  121. package/dist/cli/postinstall/codex-instruction.d.ts +0 -10
  122. package/dist/cli/postinstall/codex-instruction.d.ts.map +0 -1
  123. package/dist/cli/postinstall/codex-instruction.js +0 -56
  124. package/dist/cli/postinstall/codex-instruction.js.map +0 -1
  125. package/dist/cli/postinstall/gemini-agents.d.ts +0 -12
  126. package/dist/cli/postinstall/gemini-agents.d.ts.map +0 -1
  127. package/dist/cli/postinstall/gemini-agents.js +0 -80
  128. package/dist/cli/postinstall/gemini-agents.js.map +0 -1
  129. package/dist/cli/postinstall/gemini-instruction.d.ts +0 -10
  130. package/dist/cli/postinstall/gemini-instruction.d.ts.map +0 -1
  131. package/dist/cli/postinstall/gemini-instruction.js +0 -59
  132. package/dist/cli/postinstall/gemini-instruction.js.map +0 -1
  133. package/dist/cli/postinstall/index.d.ts +0 -23
  134. package/dist/cli/postinstall/index.d.ts.map +0 -1
  135. package/dist/cli/postinstall/index.js +0 -23
  136. package/dist/cli/postinstall/index.js.map +0 -1
  137. package/dist/cli/setup/index.d.ts +0 -9
  138. package/dist/cli/setup/index.d.ts.map +0 -1
  139. package/dist/cli/setup/index.js +0 -12
  140. package/dist/cli/setup/index.js.map +0 -1
  141. package/dist/infra/lib/ContextCompressor.d.ts +0 -104
  142. package/dist/infra/lib/ContextCompressor.d.ts.map +0 -1
  143. package/dist/infra/lib/ContextCompressor.js +0 -297
  144. package/dist/infra/lib/ContextCompressor.js.map +0 -1
  145. package/dist/infra/lib/ContextCompressor.test.d.ts +0 -2
  146. package/dist/infra/lib/ContextCompressor.test.d.ts.map +0 -1
  147. package/dist/infra/lib/ContextCompressor.test.js +0 -25
  148. package/dist/infra/lib/ContextCompressor.test.js.map +0 -1
  149. package/dist/infra/lib/ProgressTracker.d.ts +0 -73
  150. package/dist/infra/lib/ProgressTracker.d.ts.map +0 -1
  151. package/dist/infra/lib/ProgressTracker.js +0 -267
  152. package/dist/infra/lib/ProgressTracker.js.map +0 -1
  153. package/dist/infra/lib/TokenBudgetTracker.d.ts +0 -68
  154. package/dist/infra/lib/TokenBudgetTracker.d.ts.map +0 -1
  155. package/dist/infra/lib/TokenBudgetTracker.js +0 -191
  156. package/dist/infra/lib/TokenBudgetTracker.js.map +0 -1
  157. package/dist/infra/lib/autonomy/AuditStore.d.ts +0 -63
  158. package/dist/infra/lib/autonomy/AuditStore.d.ts.map +0 -1
  159. package/dist/infra/lib/autonomy/AuditStore.js +0 -185
  160. package/dist/infra/lib/autonomy/AuditStore.js.map +0 -1
  161. package/dist/infra/lib/autonomy/AutonomyConfig.d.ts +0 -84
  162. package/dist/infra/lib/autonomy/AutonomyConfig.d.ts.map +0 -1
  163. package/dist/infra/lib/autonomy/AutonomyConfig.js +0 -49
  164. package/dist/infra/lib/autonomy/AutonomyConfig.js.map +0 -1
  165. package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts +0 -78
  166. package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts.map +0 -1
  167. package/dist/infra/lib/autonomy/AutonomyOrchestrator.js +0 -246
  168. package/dist/infra/lib/autonomy/AutonomyOrchestrator.js.map +0 -1
  169. package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts +0 -36
  170. package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts.map +0 -1
  171. package/dist/infra/lib/autonomy/BackgroundMonitor.js +0 -138
  172. package/dist/infra/lib/autonomy/BackgroundMonitor.js.map +0 -1
  173. package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts +0 -56
  174. package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts.map +0 -1
  175. package/dist/infra/lib/autonomy/CollaborationProtocol.js +0 -122
  176. package/dist/infra/lib/autonomy/CollaborationProtocol.js.map +0 -1
  177. package/dist/infra/lib/autonomy/ConfirmationManager.d.ts +0 -42
  178. package/dist/infra/lib/autonomy/ConfirmationManager.d.ts.map +0 -1
  179. package/dist/infra/lib/autonomy/ConfirmationManager.js +0 -200
  180. package/dist/infra/lib/autonomy/ConfirmationManager.js.map +0 -1
  181. package/dist/infra/lib/autonomy/ConfirmationStore.d.ts +0 -55
  182. package/dist/infra/lib/autonomy/ConfirmationStore.d.ts.map +0 -1
  183. package/dist/infra/lib/autonomy/ConfirmationStore.js +0 -130
  184. package/dist/infra/lib/autonomy/ConfirmationStore.js.map +0 -1
  185. package/dist/infra/lib/autonomy/EventBus.d.ts +0 -20
  186. package/dist/infra/lib/autonomy/EventBus.d.ts.map +0 -1
  187. package/dist/infra/lib/autonomy/EventBus.js +0 -119
  188. package/dist/infra/lib/autonomy/EventBus.js.map +0 -1
  189. package/dist/infra/lib/autonomy/EventOutbox.d.ts +0 -32
  190. package/dist/infra/lib/autonomy/EventOutbox.d.ts.map +0 -1
  191. package/dist/infra/lib/autonomy/EventOutbox.js +0 -152
  192. package/dist/infra/lib/autonomy/EventOutbox.js.map +0 -1
  193. package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts +0 -24
  194. package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts.map +0 -1
  195. package/dist/infra/lib/autonomy/NotificationDispatcher.js +0 -112
  196. package/dist/infra/lib/autonomy/NotificationDispatcher.js.map +0 -1
  197. package/dist/infra/lib/autonomy/PolicyEngine.d.ts +0 -76
  198. package/dist/infra/lib/autonomy/PolicyEngine.d.ts.map +0 -1
  199. package/dist/infra/lib/autonomy/PolicyEngine.js +0 -208
  200. package/dist/infra/lib/autonomy/PolicyEngine.js.map +0 -1
  201. package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts +0 -61
  202. package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts.map +0 -1
  203. package/dist/infra/lib/autonomy/ProactiveAnalyzer.js +0 -236
  204. package/dist/infra/lib/autonomy/ProactiveAnalyzer.js.map +0 -1
  205. package/dist/infra/lib/autonomy/RiskClassifier.d.ts +0 -35
  206. package/dist/infra/lib/autonomy/RiskClassifier.d.ts.map +0 -1
  207. package/dist/infra/lib/autonomy/RiskClassifier.js +0 -147
  208. package/dist/infra/lib/autonomy/RiskClassifier.js.map +0 -1
  209. package/dist/infra/lib/autonomy/SecuritySentinel.d.ts +0 -51
  210. package/dist/infra/lib/autonomy/SecuritySentinel.d.ts.map +0 -1
  211. package/dist/infra/lib/autonomy/SecuritySentinel.js +0 -162
  212. package/dist/infra/lib/autonomy/SecuritySentinel.js.map +0 -1
  213. package/dist/infra/lib/autonomy/SuggestionStore.d.ts +0 -54
  214. package/dist/infra/lib/autonomy/SuggestionStore.d.ts.map +0 -1
  215. package/dist/infra/lib/autonomy/SuggestionStore.js +0 -144
  216. package/dist/infra/lib/autonomy/SuggestionStore.js.map +0 -1
  217. package/dist/infra/lib/autonomy/TaskDecomposer.d.ts +0 -38
  218. package/dist/infra/lib/autonomy/TaskDecomposer.d.ts.map +0 -1
  219. package/dist/infra/lib/autonomy/TaskDecomposer.js +0 -175
  220. package/dist/infra/lib/autonomy/TaskDecomposer.js.map +0 -1
  221. package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts +0 -2
  222. package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts.map +0 -1
  223. package/dist/infra/lib/autonomy/__tests__/audit-store.test.js +0 -198
  224. package/dist/infra/lib/autonomy/__tests__/audit-store.test.js.map +0 -1
  225. package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts +0 -2
  226. package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts.map +0 -1
  227. package/dist/infra/lib/autonomy/__tests__/event-bus.test.js +0 -225
  228. package/dist/infra/lib/autonomy/__tests__/event-bus.test.js.map +0 -1
  229. package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts +0 -2
  230. package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts.map +0 -1
  231. package/dist/infra/lib/autonomy/__tests__/event-core.test.js +0 -194
  232. package/dist/infra/lib/autonomy/__tests__/event-core.test.js.map +0 -1
  233. package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts +0 -2
  234. package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts.map +0 -1
  235. package/dist/infra/lib/autonomy/__tests__/governance.test.js +0 -540
  236. package/dist/infra/lib/autonomy/__tests__/governance.test.js.map +0 -1
  237. package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts +0 -2
  238. package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts.map +0 -1
  239. package/dist/infra/lib/autonomy/__tests__/integration.test.js +0 -480
  240. package/dist/infra/lib/autonomy/__tests__/integration.test.js.map +0 -1
  241. package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts +0 -2
  242. package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts.map +0 -1
  243. package/dist/infra/lib/autonomy/__tests__/proactive.test.js +0 -410
  244. package/dist/infra/lib/autonomy/__tests__/proactive.test.js.map +0 -1
  245. package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts +0 -2
  246. package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts.map +0 -1
  247. package/dist/infra/lib/autonomy/__tests__/sentinel.test.js +0 -486
  248. package/dist/infra/lib/autonomy/__tests__/sentinel.test.js.map +0 -1
  249. package/dist/infra/lib/autonomy/index.d.ts +0 -18
  250. package/dist/infra/lib/autonomy/index.d.ts.map +0 -1
  251. package/dist/infra/lib/autonomy/index.js +0 -22
  252. package/dist/infra/lib/autonomy/index.js.map +0 -1
  253. package/dist/infra/lib/autonomy/schemas.d.ts +0 -317
  254. package/dist/infra/lib/autonomy/schemas.d.ts.map +0 -1
  255. package/dist/infra/lib/autonomy/schemas.js +0 -90
  256. package/dist/infra/lib/autonomy/schemas.js.map +0 -1
  257. package/dist/infra/lib/claude/index.d.ts +0 -5
  258. package/dist/infra/lib/claude/index.d.ts.map +0 -1
  259. package/dist/infra/lib/claude/index.js +0 -5
  260. package/dist/infra/lib/claude/index.js.map +0 -1
  261. package/dist/infra/lib/claude/storage.d.ts +0 -12
  262. package/dist/infra/lib/claude/storage.d.ts.map +0 -1
  263. package/dist/infra/lib/claude/storage.js +0 -54
  264. package/dist/infra/lib/claude/storage.js.map +0 -1
  265. package/dist/infra/lib/gemini/auth.d.ts +0 -18
  266. package/dist/infra/lib/gemini/auth.d.ts.map +0 -1
  267. package/dist/infra/lib/gemini/auth.js +0 -32
  268. package/dist/infra/lib/gemini/auth.js.map +0 -1
  269. package/dist/infra/lib/gemini/capabilities.d.ts +0 -28
  270. package/dist/infra/lib/gemini/capabilities.d.ts.map +0 -1
  271. package/dist/infra/lib/gemini/capabilities.js +0 -178
  272. package/dist/infra/lib/gemini/capabilities.js.map +0 -1
  273. package/dist/infra/lib/gemini/chat.d.ts +0 -35
  274. package/dist/infra/lib/gemini/chat.d.ts.map +0 -1
  275. package/dist/infra/lib/gemini/chat.js +0 -161
  276. package/dist/infra/lib/gemini/chat.js.map +0 -1
  277. package/dist/infra/lib/gemini/completion.d.ts +0 -12
  278. package/dist/infra/lib/gemini/completion.d.ts.map +0 -1
  279. package/dist/infra/lib/gemini/completion.js +0 -13
  280. package/dist/infra/lib/gemini/completion.js.map +0 -1
  281. package/dist/infra/lib/gemini/constants.d.ts +0 -8
  282. package/dist/infra/lib/gemini/constants.d.ts.map +0 -1
  283. package/dist/infra/lib/gemini/constants.js +0 -11
  284. package/dist/infra/lib/gemini/constants.js.map +0 -1
  285. package/dist/infra/lib/gemini/index.d.ts +0 -13
  286. package/dist/infra/lib/gemini/index.d.ts.map +0 -1
  287. package/dist/infra/lib/gemini/index.js +0 -12
  288. package/dist/infra/lib/gemini/index.js.map +0 -1
  289. package/dist/infra/lib/gemini/models.d.ts +0 -11
  290. package/dist/infra/lib/gemini/models.d.ts.map +0 -1
  291. package/dist/infra/lib/gemini/models.js +0 -38
  292. package/dist/infra/lib/gemini/models.js.map +0 -1
  293. package/dist/infra/lib/gemini/orchestration.d.ts +0 -33
  294. package/dist/infra/lib/gemini/orchestration.d.ts.map +0 -1
  295. package/dist/infra/lib/gemini/orchestration.js +0 -62
  296. package/dist/infra/lib/gemini/orchestration.js.map +0 -1
  297. package/dist/infra/lib/gemini/types.d.ts +0 -115
  298. package/dist/infra/lib/gemini/types.d.ts.map +0 -1
  299. package/dist/infra/lib/gemini/types.js +0 -5
  300. package/dist/infra/lib/gemini/types.js.map +0 -1
  301. package/dist/infra/orchestrator/AgentAnnouncer.d.ts +0 -64
  302. package/dist/infra/orchestrator/AgentAnnouncer.d.ts.map +0 -1
  303. package/dist/infra/orchestrator/AgentAnnouncer.js +0 -127
  304. package/dist/infra/orchestrator/AgentAnnouncer.js.map +0 -1
  305. package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts +0 -5
  306. package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts.map +0 -1
  307. package/dist/infra/orchestrator/AgentAnnouncer.test.js +0 -119
  308. package/dist/infra/orchestrator/AgentAnnouncer.test.js.map +0 -1
  309. package/dist/infra/orchestrator/AgentExecutor.d.ts +0 -22
  310. package/dist/infra/orchestrator/AgentExecutor.d.ts.map +0 -1
  311. package/dist/infra/orchestrator/AgentExecutor.js +0 -272
  312. package/dist/infra/orchestrator/AgentExecutor.js.map +0 -1
  313. package/dist/infra/orchestrator/AgentManager.d.ts +0 -72
  314. package/dist/infra/orchestrator/AgentManager.d.ts.map +0 -1
  315. package/dist/infra/orchestrator/AgentManager.js +0 -183
  316. package/dist/infra/orchestrator/AgentManager.js.map +0 -1
  317. package/dist/infra/orchestrator/AgentManifestCache.d.ts +0 -54
  318. package/dist/infra/orchestrator/AgentManifestCache.d.ts.map +0 -1
  319. package/dist/infra/orchestrator/AgentManifestCache.js +0 -191
  320. package/dist/infra/orchestrator/AgentManifestCache.js.map +0 -1
  321. package/dist/infra/orchestrator/AgentRegistry.d.ts +0 -76
  322. package/dist/infra/orchestrator/AgentRegistry.d.ts.map +0 -1
  323. package/dist/infra/orchestrator/AgentRegistry.js +0 -217
  324. package/dist/infra/orchestrator/AgentRegistry.js.map +0 -1
  325. package/dist/infra/orchestrator/AgentRegistry.test.d.ts +0 -5
  326. package/dist/infra/orchestrator/AgentRegistry.test.d.ts.map +0 -1
  327. package/dist/infra/orchestrator/AgentRegistry.test.js +0 -122
  328. package/dist/infra/orchestrator/AgentRegistry.test.js.map +0 -1
  329. package/dist/infra/orchestrator/BackgroundManager.d.ts +0 -128
  330. package/dist/infra/orchestrator/BackgroundManager.d.ts.map +0 -1
  331. package/dist/infra/orchestrator/BackgroundManager.js +0 -620
  332. package/dist/infra/orchestrator/BackgroundManager.js.map +0 -1
  333. package/dist/infra/orchestrator/BackgroundManager.test.d.ts +0 -6
  334. package/dist/infra/orchestrator/BackgroundManager.test.d.ts.map +0 -1
  335. package/dist/infra/orchestrator/BackgroundManager.test.js +0 -162
  336. package/dist/infra/orchestrator/BackgroundManager.test.js.map +0 -1
  337. package/dist/infra/orchestrator/CheckpointManager.d.ts +0 -54
  338. package/dist/infra/orchestrator/CheckpointManager.d.ts.map +0 -1
  339. package/dist/infra/orchestrator/CheckpointManager.js +0 -121
  340. package/dist/infra/orchestrator/CheckpointManager.js.map +0 -1
  341. package/dist/infra/orchestrator/CodexAgentRuntime.d.ts +0 -12
  342. package/dist/infra/orchestrator/CodexAgentRuntime.d.ts.map +0 -1
  343. package/dist/infra/orchestrator/CodexAgentRuntime.js +0 -94
  344. package/dist/infra/orchestrator/CodexAgentRuntime.js.map +0 -1
  345. package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts +0 -2
  346. package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts.map +0 -1
  347. package/dist/infra/orchestrator/CodexAgentRuntime.test.js +0 -37
  348. package/dist/infra/orchestrator/CodexAgentRuntime.test.js.map +0 -1
  349. package/dist/infra/orchestrator/LLMCluster.d.ts +0 -82
  350. package/dist/infra/orchestrator/LLMCluster.d.ts.map +0 -1
  351. package/dist/infra/orchestrator/LLMCluster.js +0 -146
  352. package/dist/infra/orchestrator/LLMCluster.js.map +0 -1
  353. package/dist/infra/orchestrator/MultiLlmResearch.d.ts +0 -31
  354. package/dist/infra/orchestrator/MultiLlmResearch.d.ts.map +0 -1
  355. package/dist/infra/orchestrator/MultiLlmResearch.js +0 -160
  356. package/dist/infra/orchestrator/MultiLlmResearch.js.map +0 -1
  357. package/dist/infra/orchestrator/PhasePipeline.d.ts +0 -122
  358. package/dist/infra/orchestrator/PhasePipeline.d.ts.map +0 -1
  359. package/dist/infra/orchestrator/PhasePipeline.js +0 -385
  360. package/dist/infra/orchestrator/PhasePipeline.js.map +0 -1
  361. package/dist/infra/orchestrator/PhaseResultStore.d.ts +0 -39
  362. package/dist/infra/orchestrator/PhaseResultStore.d.ts.map +0 -1
  363. package/dist/infra/orchestrator/PhaseResultStore.js +0 -151
  364. package/dist/infra/orchestrator/PhaseResultStore.js.map +0 -1
  365. package/dist/infra/orchestrator/SessionStore.d.ts +0 -40
  366. package/dist/infra/orchestrator/SessionStore.d.ts.map +0 -1
  367. package/dist/infra/orchestrator/SessionStore.js +0 -116
  368. package/dist/infra/orchestrator/SessionStore.js.map +0 -1
  369. package/dist/infra/orchestrator/SmartRouter.d.ts +0 -90
  370. package/dist/infra/orchestrator/SmartRouter.d.ts.map +0 -1
  371. package/dist/infra/orchestrator/SmartRouter.js +0 -277
  372. package/dist/infra/orchestrator/SmartRouter.js.map +0 -1
  373. package/dist/infra/orchestrator/SmartRouter.test.d.ts +0 -5
  374. package/dist/infra/orchestrator/SmartRouter.test.d.ts.map +0 -1
  375. package/dist/infra/orchestrator/SmartRouter.test.js +0 -484
  376. package/dist/infra/orchestrator/SmartRouter.test.js.map +0 -1
  377. package/dist/infra/orchestrator/SwarmOrchestrator.d.ts +0 -143
  378. package/dist/infra/orchestrator/SwarmOrchestrator.d.ts.map +0 -1
  379. package/dist/infra/orchestrator/SwarmOrchestrator.js +0 -378
  380. package/dist/infra/orchestrator/SwarmOrchestrator.js.map +0 -1
  381. package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts +0 -5
  382. package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts.map +0 -1
  383. package/dist/infra/orchestrator/SwarmOrchestrator.test.js +0 -95
  384. package/dist/infra/orchestrator/SwarmOrchestrator.test.js.map +0 -1
  385. package/dist/infra/orchestrator/agentDiscovery.d.ts +0 -26
  386. package/dist/infra/orchestrator/agentDiscovery.d.ts.map +0 -1
  387. package/dist/infra/orchestrator/agentDiscovery.js +0 -175
  388. package/dist/infra/orchestrator/agentDiscovery.js.map +0 -1
  389. package/dist/infra/orchestrator/backgroundAgent.d.ts +0 -9
  390. package/dist/infra/orchestrator/backgroundAgent.d.ts.map +0 -1
  391. package/dist/infra/orchestrator/backgroundAgent.js +0 -10
  392. package/dist/infra/orchestrator/backgroundAgent.js.map +0 -1
  393. package/dist/infra/orchestrator/index.d.ts +0 -207
  394. package/dist/infra/orchestrator/index.d.ts.map +0 -1
  395. package/dist/infra/orchestrator/index.js +0 -362
  396. package/dist/infra/orchestrator/index.js.map +0 -1
  397. package/dist/infra/orchestrator/orchestrator.d.ts +0 -60
  398. package/dist/infra/orchestrator/orchestrator.d.ts.map +0 -1
  399. package/dist/infra/orchestrator/orchestrator.js +0 -214
  400. package/dist/infra/orchestrator/orchestrator.js.map +0 -1
  401. package/dist/infra/orchestrator/parallelResearch.d.ts +0 -27
  402. package/dist/infra/orchestrator/parallelResearch.d.ts.map +0 -1
  403. package/dist/infra/orchestrator/parallelResearch.js +0 -285
  404. package/dist/infra/orchestrator/parallelResearch.js.map +0 -1
  405. package/dist/infra/orchestrator/types.d.ts +0 -205
  406. package/dist/infra/orchestrator/types.d.ts.map +0 -1
  407. package/dist/infra/orchestrator/types.js +0 -87
  408. package/dist/infra/orchestrator/types.js.map +0 -1
  409. package/dist/infra/orchestrator/types.test.d.ts +0 -2
  410. package/dist/infra/orchestrator/types.test.d.ts.map +0 -1
  411. package/dist/infra/orchestrator/types.test.js +0 -57
  412. package/dist/infra/orchestrator/types.test.js.map +0 -1
  413. package/dist/tools/semantic/analyzeDependencyGraph.d.ts +0 -12
  414. package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +0 -1
  415. package/dist/tools/semantic/analyzeDependencyGraph.js +0 -359
  416. package/dist/tools/semantic/analyzeDependencyGraph.js.map +0 -1
  417. package/dist/tools/semantic/astGrep.d.ts +0 -25
  418. package/dist/tools/semantic/astGrep.d.ts.map +0 -1
  419. package/dist/tools/semantic/astGrep.js +0 -324
  420. package/dist/tools/semantic/astGrep.js.map +0 -1
  421. package/dist/tools/semantic/astGrep.test.d.ts +0 -2
  422. package/dist/tools/semantic/astGrep.test.d.ts.map +0 -1
  423. package/dist/tools/semantic/astGrep.test.js +0 -74
  424. package/dist/tools/semantic/astGrep.test.js.map +0 -1
  425. package/dist/tools/semantic/findReferences.d.ts +0 -9
  426. package/dist/tools/semantic/findReferences.d.ts.map +0 -1
  427. package/dist/tools/semantic/findReferences.js +0 -200
  428. package/dist/tools/semantic/findReferences.js.map +0 -1
  429. package/dist/tools/semantic/findSymbol.d.ts +0 -8
  430. package/dist/tools/semantic/findSymbol.d.ts.map +0 -1
  431. package/dist/tools/semantic/findSymbol.js +0 -204
  432. package/dist/tools/semantic/findSymbol.js.map +0 -1
  433. package/dist/tools/semantic/index.d.ts +0 -9
  434. package/dist/tools/semantic/index.d.ts.map +0 -1
  435. package/dist/tools/semantic/index.js +0 -11
  436. package/dist/tools/semantic/index.js.map +0 -1
  437. package/dist/tools/semantic/lsp.d.ts +0 -68
  438. package/dist/tools/semantic/lsp.d.ts.map +0 -1
  439. package/dist/tools/semantic/lsp.js +0 -561
  440. package/dist/tools/semantic/lsp.js.map +0 -1
  441. package/dist/tools/spec/e2eTestGenerator.d.ts +0 -61
  442. package/dist/tools/spec/e2eTestGenerator.d.ts.map +0 -1
  443. package/dist/tools/spec/e2eTestGenerator.js +0 -255
  444. package/dist/tools/spec/e2eTestGenerator.js.map +0 -1
  445. package/dist/tools/spec/specVersioning.d.ts +0 -76
  446. package/dist/tools/spec/specVersioning.d.ts.map +0 -1
  447. package/dist/tools/spec/specVersioning.js +0 -236
  448. package/dist/tools/spec/specVersioning.js.map +0 -1
  449. package/hooks/scripts/__tests__/.vibe/memories/memories.db +0 -0
  450. package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
  451. package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
  452. package/hooks/scripts/evolution-engine.js +0 -91
  453. package/hooks/scripts/hud-status.js +0 -321
  454. package/hooks/scripts/skill-injector.js +0 -83
  455. package/skills/vibe.utils/SKILL.md +0 -415
@@ -1,178 +0,0 @@
1
- /**
2
- * Gemini 확장 기능
3
- *
4
- * - 웹 검색, UI 분석, 이미지 생성, 이미지 분석
5
- * - API Key → Google AI Studio
6
- */
7
- import path from 'path';
8
- import fs from 'fs';
9
- import { getApiKeyFromConfig } from './auth.js';
10
- import { ask, getGeminiModels, DEFAULT_MODEL } from './chat.js';
11
- // =============================================
12
- // 웹 검색
13
- // =============================================
14
- /**
15
- * 웹서치로 최신 정보 검색 (Gemini Pro + Google Search)
16
- */
17
- export async function webSearch(prompt) {
18
- return ask(prompt, {
19
- model: 'gemini-pro',
20
- maxTokens: 4096,
21
- temperature: 0.3,
22
- webSearch: true,
23
- systemPrompt: 'Search the web for the latest information and provide accurate answers. Always include today\'s date and time context when relevant.',
24
- });
25
- }
26
- /**
27
- * 빠른 웹서치 (Gemini Flash + Google Search)
28
- */
29
- export async function quickWebSearch(prompt) {
30
- return ask(prompt, {
31
- model: 'gemini-flash',
32
- maxTokens: 2048,
33
- temperature: 0.3,
34
- webSearch: true,
35
- });
36
- }
37
- // =============================================
38
- // UI 분석
39
- // =============================================
40
- /**
41
- * UI/UX 분석용 (Gemini Pro)
42
- */
43
- export async function analyzeUI(prompt) {
44
- return ask(prompt, {
45
- model: 'gemini-pro',
46
- maxTokens: 4096,
47
- temperature: 0.5,
48
- systemPrompt: 'You are a UI/UX expert. Analyze the given design or component and provide detailed feedback.',
49
- });
50
- }
51
- // =============================================
52
- // 이미지 생성
53
- // =============================================
54
- const IMAGE_MODELS = {
55
- 'nano-banana': 'gemini-3.1-flash-image-preview',
56
- 'nano-banana-pro': 'gemini-3-pro-image-preview',
57
- };
58
- /**
59
- * Gemini Image Generation (API Key only)
60
- */
61
- export async function generateImage(prompt, options = {}) {
62
- const apiKey = getApiKeyFromConfig();
63
- if (!apiKey) {
64
- throw new Error('Gemini API key required for image generation. Run "vibe gemini key <key>".');
65
- }
66
- const size = options.size || '1024x1024';
67
- const [width, height] = size.split('x').map(Number);
68
- const aspectRatio = width && height ? `${width}:${height}` : '1:1';
69
- const imageModel = IMAGE_MODELS[options.model || 'nano-banana'];
70
- const url = `https://generativelanguage.googleapis.com/v1beta/models/${imageModel}:generateContent?key=${apiKey}`;
71
- const requestBody = {
72
- contents: [{
73
- parts: [{
74
- text: `Generate an image: ${prompt}\n\nRequirements:\n- High quality, detailed image\n- Aspect ratio: ${aspectRatio}\n- Professional and polished look`,
75
- }],
76
- }],
77
- generationConfig: {
78
- responseModalities: ['TEXT', 'IMAGE'],
79
- },
80
- };
81
- const response = await fetch(url, {
82
- method: 'POST',
83
- headers: { 'Content-Type': 'application/json' },
84
- body: JSON.stringify(requestBody),
85
- });
86
- if (!response.ok) {
87
- const errorText = await response.text();
88
- let errorMessage = `Gemini Image API error (${response.status})`;
89
- try {
90
- const errorJson = JSON.parse(errorText);
91
- if (errorJson.error?.message)
92
- errorMessage = errorJson.error.message;
93
- }
94
- catch { /* ignore */ }
95
- throw new Error(errorMessage);
96
- }
97
- const result = await response.json();
98
- const parts = result.candidates?.[0]?.content?.parts || [];
99
- for (const part of parts) {
100
- if (part.inlineData?.mimeType?.startsWith('image/')) {
101
- return {
102
- data: Buffer.from(part.inlineData.data, 'base64'),
103
- mimeType: part.inlineData.mimeType,
104
- };
105
- }
106
- }
107
- throw new Error('No image in Gemini response');
108
- }
109
- // =============================================
110
- // 이미지 분석 (Multimodal)
111
- // =============================================
112
- function getImageMimeType(filePath) {
113
- const ext = path.extname(filePath).toLowerCase();
114
- const mimeMap = {
115
- '.png': 'image/png',
116
- '.jpg': 'image/jpeg',
117
- '.jpeg': 'image/jpeg',
118
- '.gif': 'image/gif',
119
- '.webp': 'image/webp',
120
- '.bmp': 'image/bmp',
121
- };
122
- return mimeMap[ext] || 'image/png';
123
- }
124
- async function analyzeImageWithApiKey(apiKey, contents, options) {
125
- const modelInfo = getGeminiModels()[options.model] || getGeminiModels()[DEFAULT_MODEL];
126
- const actualModel = modelInfo.id;
127
- const requestBody = {
128
- contents,
129
- generationConfig: {
130
- maxOutputTokens: options.maxTokens,
131
- temperature: options.temperature,
132
- },
133
- };
134
- if (options.systemPrompt) {
135
- requestBody.systemInstruction = { parts: [{ text: options.systemPrompt }] };
136
- }
137
- const url = `https://generativelanguage.googleapis.com/v1beta/models/${actualModel}:generateContent?key=${apiKey}`;
138
- const response = await fetch(url, {
139
- method: 'POST',
140
- headers: { 'Content-Type': 'application/json' },
141
- body: JSON.stringify(requestBody),
142
- });
143
- if (!response.ok) {
144
- const errorText = await response.text();
145
- throw new Error(`Gemini API error (${response.status}): ${errorText}`);
146
- }
147
- const result = await response.json();
148
- if (!result.candidates || result.candidates.length === 0) {
149
- throw new Error('Gemini API response is empty.');
150
- }
151
- return result.candidates[0].content?.parts?.[0]?.text || '';
152
- }
153
- /**
154
- * Gemini 이미지 분석 (Multimodal)
155
- */
156
- export async function analyzeImage(imagePath, prompt, options = {}) {
157
- const { model = 'gemini-flash', maxTokens = 4096, temperature = 0.3, systemPrompt, } = options;
158
- const absolutePath = path.resolve(imagePath);
159
- if (!fs.existsSync(absolutePath)) {
160
- throw new Error(`Image file not found: ${absolutePath}`);
161
- }
162
- const imageData = fs.readFileSync(absolutePath);
163
- const base64Data = imageData.toString('base64');
164
- const mimeType = getImageMimeType(absolutePath);
165
- const contents = [{
166
- role: 'user',
167
- parts: [
168
- { inlineData: { mimeType, data: base64Data } },
169
- { text: prompt },
170
- ],
171
- }];
172
- const apiKey = getApiKeyFromConfig();
173
- if (!apiKey) {
174
- throw new Error('Gemini API key required for image analysis.');
175
- }
176
- return analyzeImageWithApiKey(apiKey, contents, { model, maxTokens, temperature, systemPrompt });
177
- }
178
- //# sourceMappingURL=capabilities.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"capabilities.js","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/capabilities.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAChD,OAAO,EAAE,GAAG,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAShE,gDAAgD;AAChD,OAAO;AACP,gDAAgD;AAEhD;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,MAAc;IAC5C,OAAO,GAAG,CAAC,MAAM,EAAE;QACjB,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QAChB,SAAS,EAAE,IAAI;QACf,YAAY,EAAE,sIAAsI;KACrJ,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,MAAc;IACjD,OAAO,GAAG,CAAC,MAAM,EAAE;QACjB,KAAK,EAAE,cAAc;QACrB,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;QA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ChD,MAAM,QAAQ,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAEhD,MAAM,QAAQ,GAAwB,CAAC;YACrC,IAAI,EAAE,MAAe;YACrB,KAAK,EAAE;gBACL,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE;gBAC9C,EAAE,IAAI,EAAE,MAAM,EAAE;aACjB;SACF,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;IACrC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,sBAAsB,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC,CAAC;AACnG,CAAC"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Gemini Chat API (generateContent)
3
- *
4
- * API Key → Google AI Studio
5
- */
6
- import type { GeminiModelInfo, ChatOptions, ChatResponse, StreamChunk } from './types.js';
7
- export declare function getGeminiModels(): Record<string, GeminiModelInfo>;
8
- /** @deprecated getGeminiModels() 사용 권장 */
9
- export declare const GEMINI_MODELS: Record<string, GeminiModelInfo>;
10
- export declare const DEFAULT_MODEL = "gemini-flash";
11
- /**
12
- * Gemini API 호출 (API Key)
13
- */
14
- export declare function chat(options: ChatOptions): Promise<ChatResponse>;
15
- /**
16
- * 스트리밍 Chat (API Key → 단일 yield)
17
- */
18
- export declare function chatStream(options: ChatOptions): AsyncGenerator<StreamChunk>;
19
- /**
20
- * 사용 가능한 모델 목록
21
- */
22
- export declare function getAvailableModels(): GeminiModelInfo[];
23
- /**
24
- * 모델 정보 가져오기
25
- */
26
- export declare function getModelInfo(modelId: string): GeminiModelInfo | null;
27
- /**
28
- * 간단한 질문-응답
29
- */
30
- export declare function ask(prompt: string, options?: Omit<ChatOptions, 'messages'>): Promise<string>;
31
- /**
32
- * 코드 탐색용 빠른 질문 (Gemini Flash)
33
- */
34
- export declare function quickAsk(prompt: string): Promise<string>;
35
- //# sourceMappingURL=chat.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/chat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EACX,YAAY,EACZ,WAAW,EAEZ,MAAM,YAAY,CAAC;AAMpB,wBAAgB,eAAe,IAAI,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAkBjE;AAED,0CAA0C;AAC1C,eAAO,MAAM,aAAa,iCAAoB,CAAC;AAE/C,eAAO,MAAM,aAAa,iBAAiB,CAAC;AAgG5C;;GAEG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,YAAY,CAAC,CAQtE;AAED;;GAEG;AACH,wBAAuB,UAAU,CAAC,OAAO,EAAE,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,CASnF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,EAAE,CAEtD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CAEpE;AAED;;GAEG;AACH,wBAAsB,GAAG,CACvB,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,IAAI,CAAC,WAAW,EAAE,UAAU,CAAM,GAC1C,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED;;GAEG;AACH,wBAAsB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9D"}
@@ -1,161 +0,0 @@
1
- /**
2
- * Gemini Chat API (generateContent)
3
- *
4
- * API Key → Google AI Studio
5
- */
6
- import { sleep } from '../utils.js';
7
- import { getAuthInfo } from './auth.js';
8
- import { getModelOverride } from '../config/GlobalConfigManager.js';
9
- import { MAX_RETRIES, RETRY_BASE_DELAY_MS, } from './constants.js';
10
- // =============================================
11
- // 모델 레지스트리
12
- // =============================================
13
- export function getGeminiModels() {
14
- const proId = getModelOverride('gemini') ?? process.env.GEMINI_MODEL ?? 'gemini-3.1-pro-preview';
15
- const flashId = getModelOverride('geminiFlash') ?? process.env.GEMINI_FLASH_MODEL ?? 'gemini-3.1-flash-lite-preview';
16
- return {
17
- 'gemini-pro': {
18
- id: proId,
19
- name: 'Gemini Pro',
20
- description: 'Pro model for complex tasks',
21
- maxTokens: 8192,
22
- },
23
- 'gemini-flash': {
24
- id: flashId,
25
- name: 'Gemini Flash',
26
- description: 'Flash model, fastest',
27
- maxTokens: 8192,
28
- },
29
- };
30
- }
31
- /** @deprecated getGeminiModels() 사용 권장 */
32
- export const GEMINI_MODELS = getGeminiModels();
33
- export const DEFAULT_MODEL = 'gemini-flash';
34
- // =============================================
35
- // API Key 방식 (Google AI Studio)
36
- // =============================================
37
- async function chatWithApiKey(apiKey, options) {
38
- const { model = DEFAULT_MODEL, messages = [], maxTokens = 4096, temperature = 0.7, systemPrompt = '', jsonMode = false, } = options;
39
- const models = getGeminiModels();
40
- const modelInfo = models[model] || models[DEFAULT_MODEL];
41
- const actualModel = modelInfo.id;
42
- const contents = messages.map(msg => ({
43
- role: msg.role === 'assistant' || msg.role === 'model' ? 'model' : 'user',
44
- parts: [{ text: msg.content }],
45
- }));
46
- const generationConfig = {
47
- maxOutputTokens: maxTokens,
48
- temperature,
49
- };
50
- if (jsonMode) {
51
- generationConfig.responseMimeType = 'application/json';
52
- }
53
- const requestBody = {
54
- contents,
55
- generationConfig,
56
- };
57
- if (systemPrompt) {
58
- requestBody.systemInstruction = { parts: [{ text: systemPrompt }] };
59
- }
60
- const retryCount = options._retryCount || 0;
61
- try {
62
- const url = `https://generativelanguage.googleapis.com/v1beta/models/${actualModel}:generateContent?key=${apiKey}`;
63
- const response = await fetch(url, {
64
- method: 'POST',
65
- headers: { 'Content-Type': 'application/json' },
66
- body: JSON.stringify(requestBody),
67
- });
68
- if (!response.ok) {
69
- const errorText = await response.text();
70
- if (response.status === 429 && retryCount < MAX_RETRIES) {
71
- await sleep(Math.pow(2, retryCount) * RETRY_BASE_DELAY_MS);
72
- return chatWithApiKey(apiKey, { ...options, _retryCount: retryCount + 1 });
73
- }
74
- let errorMessage = `Google AI API error (${response.status})`;
75
- try {
76
- const errorJson = JSON.parse(errorText);
77
- if (errorJson.error?.message)
78
- errorMessage = errorJson.error.message;
79
- }
80
- catch { /* ignore */ }
81
- throw new Error(errorMessage);
82
- }
83
- const result = await response.json();
84
- if (!result.candidates || result.candidates.length === 0) {
85
- throw new Error('Gemini API response is empty.');
86
- }
87
- const candidate = result.candidates[0];
88
- return {
89
- content: candidate.content?.parts?.[0]?.text || '',
90
- model: actualModel,
91
- finishReason: candidate.finishReason,
92
- usage: result.usageMetadata,
93
- };
94
- }
95
- catch (error) {
96
- if (error.name === 'TypeError' && retryCount < MAX_RETRIES) {
97
- await sleep(Math.pow(2, retryCount) * RETRY_BASE_DELAY_MS);
98
- return chatWithApiKey(apiKey, { ...options, _retryCount: retryCount + 1 });
99
- }
100
- throw error;
101
- }
102
- }
103
- // =============================================
104
- // Public API
105
- // =============================================
106
- /**
107
- * Gemini API 호출 (API Key)
108
- */
109
- export async function chat(options) {
110
- const authInfo = await getAuthInfo();
111
- if (authInfo.apiKey) {
112
- return chatWithApiKey(authInfo.apiKey, options);
113
- }
114
- throw new Error('Gemini API key not found.');
115
- }
116
- /**
117
- * 스트리밍 Chat (API Key → 단일 yield)
118
- */
119
- export async function* chatStream(options) {
120
- const result = await chat(options);
121
- yield {
122
- content: result.content,
123
- done: true,
124
- model: result.model,
125
- finishReason: result.finishReason,
126
- usage: result.usage,
127
- };
128
- }
129
- /**
130
- * 사용 가능한 모델 목록
131
- */
132
- export function getAvailableModels() {
133
- return Object.values(getGeminiModels());
134
- }
135
- /**
136
- * 모델 정보 가져오기
137
- */
138
- export function getModelInfo(modelId) {
139
- return getGeminiModels()[modelId] || null;
140
- }
141
- /**
142
- * 간단한 질문-응답
143
- */
144
- export async function ask(prompt, options = {}) {
145
- const result = await chat({
146
- ...options,
147
- messages: [{ role: 'user', content: prompt }],
148
- });
149
- return result.content;
150
- }
151
- /**
152
- * 코드 탐색용 빠른 질문 (Gemini Flash)
153
- */
154
- export async function quickAsk(prompt) {
155
- return ask(prompt, {
156
- model: 'gemini-flash',
157
- maxTokens: 2048,
158
- temperature: 0.3,
159
- });
160
- }
161
- //# sourceMappingURL=chat.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat.js","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/chat.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAuB,MAAM,WAAW,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EACL,WAAW,EACX,mBAAmB,GACpB,MAAM,gBAAgB,CAAC;AASxB,gDAAgD;AAChD,WAAW;AACX,gDAAgD;AAEhD,MAAM,UAAU,eAAe;IAC7B,MAAM,KAAK,GAAG,gBAAgB,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,wBAAwB,CAAC;IACjG,MAAM,OAAO,GAAG,gBAAgB,CAAC,aAAa,CAAC,IAAI,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,+BAA+B,CAAC;IAErH,OAAO;QACL,YAAY,EAAE;YACZ,EAAE,EAAE,KAAK;YACT,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,6BAA6B;YAC1C,SAAS,EAAE,IAAI;SAChB;QACD,cAAc,EAAE;YACd,EAAE,EAAE,OAAO;YACX,IAAI,EAAE,cAAc;YACpB,WAAW,EAAE,sBAAsB;YACnC,SAAS,EAAE,IAAI;SAChB;KACF,CAAC;AACJ,CAAC;AAED,0CAA0C;AAC1C,MAAM,CAAC,MAAM,aAAa,GA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C,MAAM;QACJ,OAAO,EAAE,MAAM,CAAC,OAAO;QACvB,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,MAAM,CAAC,KAAK;QACnB,YAAY,EAAE,MAAM,CAAC,YAAY;QACjC,KAAK,EAAE,MAAM,CAAC,KAAK;KACpB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC;AAC1C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,OAAe;IAC1C,OAAO,eAAe,EAAE,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,GAAG,CACvB,MAAc,EACd,UAAyC,EAAE;IAE3C,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC;QACxB,GAAG,OAAO;QACV,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;KAC9C,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,OAAO,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,MAAc;IAC3C,OAAO,GAAG,CAAC,MAAM,EAAE;QACjB,KAAK,EAAE,cAAc;QACrB,SAAS,EAAE,IAAI;QACf,WAAW,EAAE,GAAG;KACjB,CAAC,CAAC;AACL,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Code Completion (placeholder)
3
- *
4
- * completeCode는 v1internal OAuth 전용이었으므로 제거됨.
5
- * gemini-cli 직접 호출로 대체 가능.
6
- */
7
- import type { CompleteCodeOptions, CompleteCodeResponse } from './types.js';
8
- /**
9
- * 코드 자동완성 (미지원 — OAuth 제거됨)
10
- */
11
- export declare function completeCode(_options: CompleteCodeOptions): Promise<CompleteCodeResponse>;
12
- //# sourceMappingURL=completion.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"completion.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/completion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE5E;;GAEG;AACH,wBAAsB,YAAY,CAChC,QAAQ,EAAE,mBAAmB,GAC5B,OAAO,CAAC,oBAAoB,CAAC,CAI/B"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Code Completion (placeholder)
3
- *
4
- * completeCode는 v1internal OAuth 전용이었으므로 제거됨.
5
- * gemini-cli 직접 호출로 대체 가능.
6
- */
7
- /**
8
- * 코드 자동완성 (미지원 — OAuth 제거됨)
9
- */
10
- export async function completeCode(_options) {
11
- throw new Error('completeCode is no longer supported. Use gemini-cli directly for code completion.');
12
- }
13
- //# sourceMappingURL=completion.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"completion.js","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/completion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,QAA6B;IAE7B,MAAM,IAAI,KAAK,CACb,mFAAmF,CACpF,CAAC;AACJ,CAAC"}
@@ -1,8 +0,0 @@
1
- /**
2
- * Gemini API 상수
3
- *
4
- * Auth: gemini-cli / codex-cli / API Key 만 지원
5
- */
6
- export declare const MAX_RETRIES = 3;
7
- export declare const RETRY_BASE_DELAY_MS = 1000;
8
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,eAAO,MAAM,WAAW,IAAI,CAAC;AAC7B,eAAO,MAAM,mBAAmB,OAAO,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Gemini API 상수
3
- *
4
- * Auth: gemini-cli / codex-cli / API Key 만 지원
5
- */
6
- // =============================================
7
- // Retry & Timeout
8
- // =============================================
9
- export const MAX_RETRIES = 3;
10
- export const RETRY_BASE_DELAY_MS = 1000;
11
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/constants.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,gDAAgD;AAChD,kBAAkB;AAClB,gDAAgD;AAEhD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC;AAC7B,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Gemini API 모듈
3
- *
4
- * Auth: gemini-cli / codex-cli (hooks) + API Key (library)
5
- */
6
- export type { AuthInfo, GeminiAuthMethod, GeminiModelInfo, AvailableModel, ChatMessage, ChatOptions, ChatResponse, StreamChunk, GeminiApiResponse, GeminiCandidate, ImageGenerationOptions, ImageGenerationResult, ImageAnalysisOptions, MultimodalContent, VibeGeminiOptions, } from './types.js';
7
- export { getApiKeyFromConfig, getAuthInfo, } from './auth.js';
8
- export { getGlobalConfigDir } from '../llm/auth/ConfigManager.js';
9
- export { GEMINI_MODELS, getGeminiModels, DEFAULT_MODEL, chat, chatStream, getAvailableModels, getModelInfo, ask, quickAsk, } from './chat.js';
10
- export { webSearch, quickWebSearch, analyzeUI, generateImage, analyzeImage, } from './capabilities.js';
11
- export { coreGeminiOrchestrate, coreGeminiParseSpec, coreGeminiPlanExecution, coreGeminiAnalyze, coreGeminiDecideNextAction, coreGeminiAnalyzeUX, } from './orchestration.js';
12
- export { fetchAvailableModels } from './models.js';
13
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EACV,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,WAAW,EACX,WAAW,EACX,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,mBAAmB,EACnB,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,IAAI,EACJ,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,GAAG,EACH,QAAQ,GACT,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,SAAS,EACT,cAAc,EACd,SAAS,EACT,aAAa,EACb,YAAY,GACb,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * Gemini API 모듈
3
- *
4
- * Auth: gemini-cli / codex-cli (hooks) + API Key (library)
5
- */
6
- export { getApiKeyFromConfig, getAuthInfo, } from './auth.js';
7
- export { getGlobalConfigDir } from '../llm/auth/ConfigManager.js';
8
- export { GEMINI_MODELS, getGeminiModels, DEFAULT_MODEL, chat, chatStream, getAvailableModels, getModelInfo, ask, quickAsk, } from './chat.js';
9
- export { webSearch, quickWebSearch, analyzeUI, generateImage, analyzeImage, } from './capabilities.js';
10
- export { coreGeminiOrchestrate, coreGeminiParseSpec, coreGeminiPlanExecution, coreGeminiAnalyze, coreGeminiDecideNextAction, coreGeminiAnalyzeUX, } from './orchestration.js';
11
- export { fetchAvailableModels } from './models.js';
12
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAoBH,OAAO,EACL,mBAAmB,EACnB,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAElE,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,IAAI,EACJ,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,GAAG,EACH,QAAQ,GACT,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,SAAS,EACT,cAAc,EACd,SAAS,EACT,aAAa,EACb,YAAY,GACb,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,qBAAqB,EACrB,mBAAmB,EACnB,uBAAuB,EACvB,iBAAiB,EACjB,0BAA0B,EAC1B,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC"}
@@ -1,11 +0,0 @@
1
- /**
2
- * Gemini Model Discovery API
3
- *
4
- * Google AI Studio (API Key) 전용
5
- */
6
- import type { AvailableModel } from './types.js';
7
- /**
8
- * 사용 가능한 모델 목록 조회 (API Key)
9
- */
10
- export declare function fetchAvailableModels(): Promise<AvailableModel[]>;
11
- //# sourceMappingURL=models.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/models.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAyBjD;;GAEG;AACH,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC,CAqBtE"}
@@ -1,38 +0,0 @@
1
- /**
2
- * Gemini Model Discovery API
3
- *
4
- * Google AI Studio (API Key) 전용
5
- */
6
- import { getApiKeyFromConfig } from './auth.js';
7
- function normalizeGoogleAI(raw) {
8
- return {
9
- modelId: raw.name || '',
10
- displayName: raw.displayName || raw.name || '',
11
- description: raw.description || '',
12
- inputTokenLimit: raw.inputTokenLimit || 0,
13
- outputTokenLimit: raw.outputTokenLimit || 0,
14
- supportedActions: raw.supportedGenerationMethods || [],
15
- };
16
- }
17
- /**
18
- * 사용 가능한 모델 목록 조회 (API Key)
19
- */
20
- export async function fetchAvailableModels() {
21
- const apiKey = getApiKeyFromConfig();
22
- if (!apiKey) {
23
- throw new Error('Gemini API key required. Run "vibe gemini key <key>".');
24
- }
25
- const url = `https://generativelanguage.googleapis.com/v1beta/models?key=${apiKey}`;
26
- const response = await fetch(url, {
27
- method: 'GET',
28
- headers: { 'Content-Type': 'application/json' },
29
- });
30
- if (!response.ok) {
31
- const errorText = await response.text();
32
- throw new Error(`Google AI models API error (${response.status}): ${errorText}`);
33
- }
34
- const result = await response.json();
35
- const rawModels = result.models || [];
36
- return rawModels.map(normalizeGoogleAI);
37
- }
38
- //# sourceMappingURL=models.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"models.js","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/models.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAehD,SAAS,iBAAiB,CAAC,GAAkB;IAC3C,OAAO;QACL,OAAO,EAAE,GAAG,CAAC,IAAI,IAAI,EAAE;QACvB,WAAW,EAAE,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,IAAI,IAAI,EAAE;QAC9C,WAAW,EAAE,GAAG,CAAC,WAAW,IAAI,EAAE;QAClC,eAAe,EAAE,GAAG,CAAC,eAAe,IAAI,CAAC;QACzC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB,IAAI,CAAC;QAC3C,gBAAgB,EAAE,GAAG,CAAC,0BAA0B,IAAI,EAAE;KACvD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;IACrC,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,MAAM,IAAI,KAAK,CAAC,uDAAuD,CAAC,CAAC;IAC3E,CAAC;IAED,MAAM,GAAG,GAAG,+DAA+D,MAAM,EAAE,CAAC;IACpF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE;QAChC,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;KAChD,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,+BAA+B,QAAQ,CAAC,MAAM,MAAM,SAAS,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAkC,CAAC;IACrE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,IAAI,EAAE,CAAC;IAEtC,OAAO,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;AAC1C,CAAC"}
@@ -1,33 +0,0 @@
1
- /**
2
- * Gemini 오케스트레이션 함수
3
- * - 검색 없이 빠르고 결정론적인 응답
4
- */
5
- import type { VibeGeminiOptions } from './types.js';
6
- /**
7
- * Core Gemini 오케스트레이션 (검색 없음, JSON 모드)
8
- * - 검색 제외로 빠른 응답
9
- * - temperature=0 으로 결정론적 결과
10
- * - JSON 출력 강제 가능
11
- */
12
- export declare function coreGeminiOrchestrate(prompt: string, systemPrompt: string, options?: VibeGeminiOptions): Promise<string>;
13
- /**
14
- * Core Spec 파싱 (Core Spec → 실행 계획)
15
- */
16
- export declare function coreGeminiParseSpec(spec: string): Promise<string>;
17
- /**
18
- * Core 실행 계획 수립 (Task → Steps)
19
- */
20
- export declare function coreGeminiPlanExecution(task: string, context: string): Promise<string>;
21
- /**
22
- * Core 코드 분석 (빠른 구조 분석)
23
- */
24
- export declare function coreGeminiAnalyze(code: string, question: string): Promise<string>;
25
- /**
26
- * Core 다음 액션 결정 (상태 기반)
27
- */
28
- export declare function coreGeminiDecideNextAction(currentState: string, availableActions: string[], goal: string): Promise<string>;
29
- /**
30
- * Core UI/UX 분석 (검색 없이 내부 지식으로)
31
- */
32
- export declare function coreGeminiAnalyzeUX(description: string): Promise<string>;
33
- //# sourceMappingURL=orchestration.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"orchestration.d.ts","sourceRoot":"","sources":["../../../../src/infra/lib/gemini/orchestration.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEpD;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,EACpB,OAAO,GAAE,iBAAsB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAGvE;AAED;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAM5F;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAMvF;AAED;;GAEG;AACH,wBAAsB,0BAA0B,CAC9C,YAAY,EAAE,MAAM,EACpB,gBAAgB,EAAE,MAAM,EAAE,EAC1B,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,MAAM,CAAC,CAMjB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAO9E"}