@su-record/vibe 3.0.0 → 3.1.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 (341) hide show
  1. package/hooks/scripts/__tests__/.vibe/command-log.txt +3 -78
  2. package/hooks/scripts/__tests__/.vibe/memories/memories.db +0 -0
  3. package/hooks/scripts/__tests__/.vibe/memories/memories.db-shm +0 -0
  4. package/hooks/scripts/__tests__/.vibe/memories/memories.db-wal +0 -0
  5. package/hooks/scripts/__tests__/clone-behaviors.test.js +64 -0
  6. package/hooks/scripts/__tests__/clone-merge-responsive.test.js +106 -0
  7. package/hooks/scripts/clone-extract.js +242 -28
  8. package/hooks/scripts/clone-merge-responsive.js +184 -0
  9. package/hooks/scripts/clone-spec.js +33 -8
  10. package/hooks/scripts/clone-validate.js +15 -9
  11. package/package.json +5 -2
  12. package/skills/clone/SKILL.md +132 -55
  13. package/skills/vibe.clone/SKILL.md +39 -19
  14. package/dist/cli/llm/gemini-commands.d.ts +0 -25
  15. package/dist/cli/llm/gemini-commands.d.ts.map +0 -1
  16. package/dist/cli/llm/gemini-commands.js +0 -143
  17. package/dist/cli/llm/gemini-commands.js.map +0 -1
  18. package/dist/cli/postinstall/codex-agents.d.ts +0 -24
  19. package/dist/cli/postinstall/codex-agents.d.ts.map +0 -1
  20. package/dist/cli/postinstall/codex-agents.js +0 -114
  21. package/dist/cli/postinstall/codex-agents.js.map +0 -1
  22. package/dist/cli/postinstall/codex-instruction.d.ts +0 -10
  23. package/dist/cli/postinstall/codex-instruction.d.ts.map +0 -1
  24. package/dist/cli/postinstall/codex-instruction.js +0 -56
  25. package/dist/cli/postinstall/codex-instruction.js.map +0 -1
  26. package/dist/cli/postinstall/gemini-agents.d.ts +0 -12
  27. package/dist/cli/postinstall/gemini-agents.d.ts.map +0 -1
  28. package/dist/cli/postinstall/gemini-agents.js +0 -80
  29. package/dist/cli/postinstall/gemini-agents.js.map +0 -1
  30. package/dist/cli/postinstall/gemini-instruction.d.ts +0 -10
  31. package/dist/cli/postinstall/gemini-instruction.d.ts.map +0 -1
  32. package/dist/cli/postinstall/gemini-instruction.js +0 -59
  33. package/dist/cli/postinstall/gemini-instruction.js.map +0 -1
  34. package/dist/infra/lib/ContextCompressor.d.ts +0 -104
  35. package/dist/infra/lib/ContextCompressor.d.ts.map +0 -1
  36. package/dist/infra/lib/ContextCompressor.js +0 -297
  37. package/dist/infra/lib/ContextCompressor.js.map +0 -1
  38. package/dist/infra/lib/ContextCompressor.test.d.ts +0 -2
  39. package/dist/infra/lib/ContextCompressor.test.d.ts.map +0 -1
  40. package/dist/infra/lib/ContextCompressor.test.js +0 -25
  41. package/dist/infra/lib/ContextCompressor.test.js.map +0 -1
  42. package/dist/infra/lib/ProgressTracker.d.ts +0 -73
  43. package/dist/infra/lib/ProgressTracker.d.ts.map +0 -1
  44. package/dist/infra/lib/ProgressTracker.js +0 -267
  45. package/dist/infra/lib/ProgressTracker.js.map +0 -1
  46. package/dist/infra/lib/TokenBudgetTracker.d.ts +0 -68
  47. package/dist/infra/lib/TokenBudgetTracker.d.ts.map +0 -1
  48. package/dist/infra/lib/TokenBudgetTracker.js +0 -191
  49. package/dist/infra/lib/TokenBudgetTracker.js.map +0 -1
  50. package/dist/infra/lib/autonomy/AuditStore.d.ts +0 -63
  51. package/dist/infra/lib/autonomy/AuditStore.d.ts.map +0 -1
  52. package/dist/infra/lib/autonomy/AuditStore.js +0 -185
  53. package/dist/infra/lib/autonomy/AuditStore.js.map +0 -1
  54. package/dist/infra/lib/autonomy/AutonomyConfig.d.ts +0 -84
  55. package/dist/infra/lib/autonomy/AutonomyConfig.d.ts.map +0 -1
  56. package/dist/infra/lib/autonomy/AutonomyConfig.js +0 -49
  57. package/dist/infra/lib/autonomy/AutonomyConfig.js.map +0 -1
  58. package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts +0 -78
  59. package/dist/infra/lib/autonomy/AutonomyOrchestrator.d.ts.map +0 -1
  60. package/dist/infra/lib/autonomy/AutonomyOrchestrator.js +0 -246
  61. package/dist/infra/lib/autonomy/AutonomyOrchestrator.js.map +0 -1
  62. package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts +0 -36
  63. package/dist/infra/lib/autonomy/BackgroundMonitor.d.ts.map +0 -1
  64. package/dist/infra/lib/autonomy/BackgroundMonitor.js +0 -138
  65. package/dist/infra/lib/autonomy/BackgroundMonitor.js.map +0 -1
  66. package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts +0 -56
  67. package/dist/infra/lib/autonomy/CollaborationProtocol.d.ts.map +0 -1
  68. package/dist/infra/lib/autonomy/CollaborationProtocol.js +0 -122
  69. package/dist/infra/lib/autonomy/CollaborationProtocol.js.map +0 -1
  70. package/dist/infra/lib/autonomy/ConfirmationManager.d.ts +0 -42
  71. package/dist/infra/lib/autonomy/ConfirmationManager.d.ts.map +0 -1
  72. package/dist/infra/lib/autonomy/ConfirmationManager.js +0 -200
  73. package/dist/infra/lib/autonomy/ConfirmationManager.js.map +0 -1
  74. package/dist/infra/lib/autonomy/ConfirmationStore.d.ts +0 -55
  75. package/dist/infra/lib/autonomy/ConfirmationStore.d.ts.map +0 -1
  76. package/dist/infra/lib/autonomy/ConfirmationStore.js +0 -130
  77. package/dist/infra/lib/autonomy/ConfirmationStore.js.map +0 -1
  78. package/dist/infra/lib/autonomy/EventBus.d.ts +0 -20
  79. package/dist/infra/lib/autonomy/EventBus.d.ts.map +0 -1
  80. package/dist/infra/lib/autonomy/EventBus.js +0 -119
  81. package/dist/infra/lib/autonomy/EventBus.js.map +0 -1
  82. package/dist/infra/lib/autonomy/EventOutbox.d.ts +0 -32
  83. package/dist/infra/lib/autonomy/EventOutbox.d.ts.map +0 -1
  84. package/dist/infra/lib/autonomy/EventOutbox.js +0 -152
  85. package/dist/infra/lib/autonomy/EventOutbox.js.map +0 -1
  86. package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts +0 -24
  87. package/dist/infra/lib/autonomy/NotificationDispatcher.d.ts.map +0 -1
  88. package/dist/infra/lib/autonomy/NotificationDispatcher.js +0 -112
  89. package/dist/infra/lib/autonomy/NotificationDispatcher.js.map +0 -1
  90. package/dist/infra/lib/autonomy/PolicyEngine.d.ts +0 -76
  91. package/dist/infra/lib/autonomy/PolicyEngine.d.ts.map +0 -1
  92. package/dist/infra/lib/autonomy/PolicyEngine.js +0 -208
  93. package/dist/infra/lib/autonomy/PolicyEngine.js.map +0 -1
  94. package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts +0 -61
  95. package/dist/infra/lib/autonomy/ProactiveAnalyzer.d.ts.map +0 -1
  96. package/dist/infra/lib/autonomy/ProactiveAnalyzer.js +0 -236
  97. package/dist/infra/lib/autonomy/ProactiveAnalyzer.js.map +0 -1
  98. package/dist/infra/lib/autonomy/RiskClassifier.d.ts +0 -35
  99. package/dist/infra/lib/autonomy/RiskClassifier.d.ts.map +0 -1
  100. package/dist/infra/lib/autonomy/RiskClassifier.js +0 -147
  101. package/dist/infra/lib/autonomy/RiskClassifier.js.map +0 -1
  102. package/dist/infra/lib/autonomy/SecuritySentinel.d.ts +0 -51
  103. package/dist/infra/lib/autonomy/SecuritySentinel.d.ts.map +0 -1
  104. package/dist/infra/lib/autonomy/SecuritySentinel.js +0 -162
  105. package/dist/infra/lib/autonomy/SecuritySentinel.js.map +0 -1
  106. package/dist/infra/lib/autonomy/SuggestionStore.d.ts +0 -54
  107. package/dist/infra/lib/autonomy/SuggestionStore.d.ts.map +0 -1
  108. package/dist/infra/lib/autonomy/SuggestionStore.js +0 -144
  109. package/dist/infra/lib/autonomy/SuggestionStore.js.map +0 -1
  110. package/dist/infra/lib/autonomy/TaskDecomposer.d.ts +0 -38
  111. package/dist/infra/lib/autonomy/TaskDecomposer.d.ts.map +0 -1
  112. package/dist/infra/lib/autonomy/TaskDecomposer.js +0 -175
  113. package/dist/infra/lib/autonomy/TaskDecomposer.js.map +0 -1
  114. package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts +0 -2
  115. package/dist/infra/lib/autonomy/__tests__/audit-store.test.d.ts.map +0 -1
  116. package/dist/infra/lib/autonomy/__tests__/audit-store.test.js +0 -198
  117. package/dist/infra/lib/autonomy/__tests__/audit-store.test.js.map +0 -1
  118. package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts +0 -2
  119. package/dist/infra/lib/autonomy/__tests__/event-bus.test.d.ts.map +0 -1
  120. package/dist/infra/lib/autonomy/__tests__/event-bus.test.js +0 -225
  121. package/dist/infra/lib/autonomy/__tests__/event-bus.test.js.map +0 -1
  122. package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts +0 -2
  123. package/dist/infra/lib/autonomy/__tests__/event-core.test.d.ts.map +0 -1
  124. package/dist/infra/lib/autonomy/__tests__/event-core.test.js +0 -194
  125. package/dist/infra/lib/autonomy/__tests__/event-core.test.js.map +0 -1
  126. package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts +0 -2
  127. package/dist/infra/lib/autonomy/__tests__/governance.test.d.ts.map +0 -1
  128. package/dist/infra/lib/autonomy/__tests__/governance.test.js +0 -540
  129. package/dist/infra/lib/autonomy/__tests__/governance.test.js.map +0 -1
  130. package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts +0 -2
  131. package/dist/infra/lib/autonomy/__tests__/integration.test.d.ts.map +0 -1
  132. package/dist/infra/lib/autonomy/__tests__/integration.test.js +0 -480
  133. package/dist/infra/lib/autonomy/__tests__/integration.test.js.map +0 -1
  134. package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts +0 -2
  135. package/dist/infra/lib/autonomy/__tests__/proactive.test.d.ts.map +0 -1
  136. package/dist/infra/lib/autonomy/__tests__/proactive.test.js +0 -410
  137. package/dist/infra/lib/autonomy/__tests__/proactive.test.js.map +0 -1
  138. package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts +0 -2
  139. package/dist/infra/lib/autonomy/__tests__/sentinel.test.d.ts.map +0 -1
  140. package/dist/infra/lib/autonomy/__tests__/sentinel.test.js +0 -486
  141. package/dist/infra/lib/autonomy/__tests__/sentinel.test.js.map +0 -1
  142. package/dist/infra/lib/autonomy/index.d.ts +0 -18
  143. package/dist/infra/lib/autonomy/index.d.ts.map +0 -1
  144. package/dist/infra/lib/autonomy/index.js +0 -22
  145. package/dist/infra/lib/autonomy/index.js.map +0 -1
  146. package/dist/infra/lib/autonomy/schemas.d.ts +0 -317
  147. package/dist/infra/lib/autonomy/schemas.d.ts.map +0 -1
  148. package/dist/infra/lib/autonomy/schemas.js +0 -90
  149. package/dist/infra/lib/autonomy/schemas.js.map +0 -1
  150. package/dist/infra/lib/claude/index.d.ts +0 -5
  151. package/dist/infra/lib/claude/index.d.ts.map +0 -1
  152. package/dist/infra/lib/claude/index.js +0 -5
  153. package/dist/infra/lib/claude/index.js.map +0 -1
  154. package/dist/infra/lib/claude/storage.d.ts +0 -12
  155. package/dist/infra/lib/claude/storage.d.ts.map +0 -1
  156. package/dist/infra/lib/claude/storage.js +0 -54
  157. package/dist/infra/lib/claude/storage.js.map +0 -1
  158. package/dist/infra/lib/gemini/auth.d.ts +0 -18
  159. package/dist/infra/lib/gemini/auth.d.ts.map +0 -1
  160. package/dist/infra/lib/gemini/auth.js +0 -32
  161. package/dist/infra/lib/gemini/auth.js.map +0 -1
  162. package/dist/infra/lib/gemini/capabilities.d.ts +0 -28
  163. package/dist/infra/lib/gemini/capabilities.d.ts.map +0 -1
  164. package/dist/infra/lib/gemini/capabilities.js +0 -178
  165. package/dist/infra/lib/gemini/capabilities.js.map +0 -1
  166. package/dist/infra/lib/gemini/chat.d.ts +0 -35
  167. package/dist/infra/lib/gemini/chat.d.ts.map +0 -1
  168. package/dist/infra/lib/gemini/chat.js +0 -161
  169. package/dist/infra/lib/gemini/chat.js.map +0 -1
  170. package/dist/infra/lib/gemini/completion.d.ts +0 -12
  171. package/dist/infra/lib/gemini/completion.d.ts.map +0 -1
  172. package/dist/infra/lib/gemini/completion.js +0 -13
  173. package/dist/infra/lib/gemini/completion.js.map +0 -1
  174. package/dist/infra/lib/gemini/constants.d.ts +0 -8
  175. package/dist/infra/lib/gemini/constants.d.ts.map +0 -1
  176. package/dist/infra/lib/gemini/constants.js +0 -11
  177. package/dist/infra/lib/gemini/constants.js.map +0 -1
  178. package/dist/infra/lib/gemini/index.d.ts +0 -13
  179. package/dist/infra/lib/gemini/index.d.ts.map +0 -1
  180. package/dist/infra/lib/gemini/index.js +0 -12
  181. package/dist/infra/lib/gemini/index.js.map +0 -1
  182. package/dist/infra/lib/gemini/models.d.ts +0 -11
  183. package/dist/infra/lib/gemini/models.d.ts.map +0 -1
  184. package/dist/infra/lib/gemini/models.js +0 -38
  185. package/dist/infra/lib/gemini/models.js.map +0 -1
  186. package/dist/infra/lib/gemini/orchestration.d.ts +0 -33
  187. package/dist/infra/lib/gemini/orchestration.d.ts.map +0 -1
  188. package/dist/infra/lib/gemini/orchestration.js +0 -62
  189. package/dist/infra/lib/gemini/orchestration.js.map +0 -1
  190. package/dist/infra/lib/gemini/types.d.ts +0 -115
  191. package/dist/infra/lib/gemini/types.d.ts.map +0 -1
  192. package/dist/infra/lib/gemini/types.js +0 -5
  193. package/dist/infra/lib/gemini/types.js.map +0 -1
  194. package/dist/infra/orchestrator/AgentAnnouncer.d.ts +0 -64
  195. package/dist/infra/orchestrator/AgentAnnouncer.d.ts.map +0 -1
  196. package/dist/infra/orchestrator/AgentAnnouncer.js +0 -127
  197. package/dist/infra/orchestrator/AgentAnnouncer.js.map +0 -1
  198. package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts +0 -5
  199. package/dist/infra/orchestrator/AgentAnnouncer.test.d.ts.map +0 -1
  200. package/dist/infra/orchestrator/AgentAnnouncer.test.js +0 -119
  201. package/dist/infra/orchestrator/AgentAnnouncer.test.js.map +0 -1
  202. package/dist/infra/orchestrator/AgentExecutor.d.ts +0 -22
  203. package/dist/infra/orchestrator/AgentExecutor.d.ts.map +0 -1
  204. package/dist/infra/orchestrator/AgentExecutor.js +0 -272
  205. package/dist/infra/orchestrator/AgentExecutor.js.map +0 -1
  206. package/dist/infra/orchestrator/AgentManager.d.ts +0 -72
  207. package/dist/infra/orchestrator/AgentManager.d.ts.map +0 -1
  208. package/dist/infra/orchestrator/AgentManager.js +0 -183
  209. package/dist/infra/orchestrator/AgentManager.js.map +0 -1
  210. package/dist/infra/orchestrator/AgentManifestCache.d.ts +0 -54
  211. package/dist/infra/orchestrator/AgentManifestCache.d.ts.map +0 -1
  212. package/dist/infra/orchestrator/AgentManifestCache.js +0 -191
  213. package/dist/infra/orchestrator/AgentManifestCache.js.map +0 -1
  214. package/dist/infra/orchestrator/AgentRegistry.d.ts +0 -76
  215. package/dist/infra/orchestrator/AgentRegistry.d.ts.map +0 -1
  216. package/dist/infra/orchestrator/AgentRegistry.js +0 -217
  217. package/dist/infra/orchestrator/AgentRegistry.js.map +0 -1
  218. package/dist/infra/orchestrator/AgentRegistry.test.d.ts +0 -5
  219. package/dist/infra/orchestrator/AgentRegistry.test.d.ts.map +0 -1
  220. package/dist/infra/orchestrator/AgentRegistry.test.js +0 -122
  221. package/dist/infra/orchestrator/AgentRegistry.test.js.map +0 -1
  222. package/dist/infra/orchestrator/BackgroundManager.d.ts +0 -128
  223. package/dist/infra/orchestrator/BackgroundManager.d.ts.map +0 -1
  224. package/dist/infra/orchestrator/BackgroundManager.js +0 -620
  225. package/dist/infra/orchestrator/BackgroundManager.js.map +0 -1
  226. package/dist/infra/orchestrator/BackgroundManager.test.d.ts +0 -6
  227. package/dist/infra/orchestrator/BackgroundManager.test.d.ts.map +0 -1
  228. package/dist/infra/orchestrator/BackgroundManager.test.js +0 -162
  229. package/dist/infra/orchestrator/BackgroundManager.test.js.map +0 -1
  230. package/dist/infra/orchestrator/CheckpointManager.d.ts +0 -54
  231. package/dist/infra/orchestrator/CheckpointManager.d.ts.map +0 -1
  232. package/dist/infra/orchestrator/CheckpointManager.js +0 -121
  233. package/dist/infra/orchestrator/CheckpointManager.js.map +0 -1
  234. package/dist/infra/orchestrator/CodexAgentRuntime.d.ts +0 -12
  235. package/dist/infra/orchestrator/CodexAgentRuntime.d.ts.map +0 -1
  236. package/dist/infra/orchestrator/CodexAgentRuntime.js +0 -94
  237. package/dist/infra/orchestrator/CodexAgentRuntime.js.map +0 -1
  238. package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts +0 -2
  239. package/dist/infra/orchestrator/CodexAgentRuntime.test.d.ts.map +0 -1
  240. package/dist/infra/orchestrator/CodexAgentRuntime.test.js +0 -37
  241. package/dist/infra/orchestrator/CodexAgentRuntime.test.js.map +0 -1
  242. package/dist/infra/orchestrator/LLMCluster.d.ts +0 -82
  243. package/dist/infra/orchestrator/LLMCluster.d.ts.map +0 -1
  244. package/dist/infra/orchestrator/LLMCluster.js +0 -146
  245. package/dist/infra/orchestrator/LLMCluster.js.map +0 -1
  246. package/dist/infra/orchestrator/MultiLlmResearch.d.ts +0 -31
  247. package/dist/infra/orchestrator/MultiLlmResearch.d.ts.map +0 -1
  248. package/dist/infra/orchestrator/MultiLlmResearch.js +0 -160
  249. package/dist/infra/orchestrator/MultiLlmResearch.js.map +0 -1
  250. package/dist/infra/orchestrator/PhasePipeline.d.ts +0 -122
  251. package/dist/infra/orchestrator/PhasePipeline.d.ts.map +0 -1
  252. package/dist/infra/orchestrator/PhasePipeline.js +0 -385
  253. package/dist/infra/orchestrator/PhasePipeline.js.map +0 -1
  254. package/dist/infra/orchestrator/PhaseResultStore.d.ts +0 -39
  255. package/dist/infra/orchestrator/PhaseResultStore.d.ts.map +0 -1
  256. package/dist/infra/orchestrator/PhaseResultStore.js +0 -151
  257. package/dist/infra/orchestrator/PhaseResultStore.js.map +0 -1
  258. package/dist/infra/orchestrator/SessionStore.d.ts +0 -40
  259. package/dist/infra/orchestrator/SessionStore.d.ts.map +0 -1
  260. package/dist/infra/orchestrator/SessionStore.js +0 -116
  261. package/dist/infra/orchestrator/SessionStore.js.map +0 -1
  262. package/dist/infra/orchestrator/SmartRouter.d.ts +0 -90
  263. package/dist/infra/orchestrator/SmartRouter.d.ts.map +0 -1
  264. package/dist/infra/orchestrator/SmartRouter.js +0 -277
  265. package/dist/infra/orchestrator/SmartRouter.js.map +0 -1
  266. package/dist/infra/orchestrator/SmartRouter.test.d.ts +0 -5
  267. package/dist/infra/orchestrator/SmartRouter.test.d.ts.map +0 -1
  268. package/dist/infra/orchestrator/SmartRouter.test.js +0 -484
  269. package/dist/infra/orchestrator/SmartRouter.test.js.map +0 -1
  270. package/dist/infra/orchestrator/SwarmOrchestrator.d.ts +0 -143
  271. package/dist/infra/orchestrator/SwarmOrchestrator.d.ts.map +0 -1
  272. package/dist/infra/orchestrator/SwarmOrchestrator.js +0 -378
  273. package/dist/infra/orchestrator/SwarmOrchestrator.js.map +0 -1
  274. package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts +0 -5
  275. package/dist/infra/orchestrator/SwarmOrchestrator.test.d.ts.map +0 -1
  276. package/dist/infra/orchestrator/SwarmOrchestrator.test.js +0 -95
  277. package/dist/infra/orchestrator/SwarmOrchestrator.test.js.map +0 -1
  278. package/dist/infra/orchestrator/agentDiscovery.d.ts +0 -26
  279. package/dist/infra/orchestrator/agentDiscovery.d.ts.map +0 -1
  280. package/dist/infra/orchestrator/agentDiscovery.js +0 -175
  281. package/dist/infra/orchestrator/agentDiscovery.js.map +0 -1
  282. package/dist/infra/orchestrator/backgroundAgent.d.ts +0 -9
  283. package/dist/infra/orchestrator/backgroundAgent.d.ts.map +0 -1
  284. package/dist/infra/orchestrator/backgroundAgent.js +0 -10
  285. package/dist/infra/orchestrator/backgroundAgent.js.map +0 -1
  286. package/dist/infra/orchestrator/index.d.ts +0 -207
  287. package/dist/infra/orchestrator/index.d.ts.map +0 -1
  288. package/dist/infra/orchestrator/index.js +0 -362
  289. package/dist/infra/orchestrator/index.js.map +0 -1
  290. package/dist/infra/orchestrator/orchestrator.d.ts +0 -60
  291. package/dist/infra/orchestrator/orchestrator.d.ts.map +0 -1
  292. package/dist/infra/orchestrator/orchestrator.js +0 -214
  293. package/dist/infra/orchestrator/orchestrator.js.map +0 -1
  294. package/dist/infra/orchestrator/parallelResearch.d.ts +0 -27
  295. package/dist/infra/orchestrator/parallelResearch.d.ts.map +0 -1
  296. package/dist/infra/orchestrator/parallelResearch.js +0 -285
  297. package/dist/infra/orchestrator/parallelResearch.js.map +0 -1
  298. package/dist/infra/orchestrator/types.d.ts +0 -205
  299. package/dist/infra/orchestrator/types.d.ts.map +0 -1
  300. package/dist/infra/orchestrator/types.js +0 -87
  301. package/dist/infra/orchestrator/types.js.map +0 -1
  302. package/dist/infra/orchestrator/types.test.d.ts +0 -2
  303. package/dist/infra/orchestrator/types.test.d.ts.map +0 -1
  304. package/dist/infra/orchestrator/types.test.js +0 -57
  305. package/dist/infra/orchestrator/types.test.js.map +0 -1
  306. package/dist/tools/semantic/analyzeDependencyGraph.d.ts +0 -12
  307. package/dist/tools/semantic/analyzeDependencyGraph.d.ts.map +0 -1
  308. package/dist/tools/semantic/analyzeDependencyGraph.js +0 -359
  309. package/dist/tools/semantic/analyzeDependencyGraph.js.map +0 -1
  310. package/dist/tools/semantic/astGrep.d.ts +0 -25
  311. package/dist/tools/semantic/astGrep.d.ts.map +0 -1
  312. package/dist/tools/semantic/astGrep.js +0 -324
  313. package/dist/tools/semantic/astGrep.js.map +0 -1
  314. package/dist/tools/semantic/astGrep.test.d.ts +0 -2
  315. package/dist/tools/semantic/astGrep.test.d.ts.map +0 -1
  316. package/dist/tools/semantic/astGrep.test.js +0 -74
  317. package/dist/tools/semantic/astGrep.test.js.map +0 -1
  318. package/dist/tools/semantic/findReferences.d.ts +0 -9
  319. package/dist/tools/semantic/findReferences.d.ts.map +0 -1
  320. package/dist/tools/semantic/findReferences.js +0 -200
  321. package/dist/tools/semantic/findReferences.js.map +0 -1
  322. package/dist/tools/semantic/findSymbol.d.ts +0 -8
  323. package/dist/tools/semantic/findSymbol.d.ts.map +0 -1
  324. package/dist/tools/semantic/findSymbol.js +0 -204
  325. package/dist/tools/semantic/findSymbol.js.map +0 -1
  326. package/dist/tools/semantic/index.d.ts +0 -9
  327. package/dist/tools/semantic/index.d.ts.map +0 -1
  328. package/dist/tools/semantic/index.js +0 -11
  329. package/dist/tools/semantic/index.js.map +0 -1
  330. package/dist/tools/semantic/lsp.d.ts +0 -68
  331. package/dist/tools/semantic/lsp.d.ts.map +0 -1
  332. package/dist/tools/semantic/lsp.js +0 -561
  333. package/dist/tools/semantic/lsp.js.map +0 -1
  334. package/dist/tools/spec/e2eTestGenerator.d.ts +0 -61
  335. package/dist/tools/spec/e2eTestGenerator.d.ts.map +0 -1
  336. package/dist/tools/spec/e2eTestGenerator.js +0 -255
  337. package/dist/tools/spec/e2eTestGenerator.js.map +0 -1
  338. package/dist/tools/spec/specVersioning.d.ts +0 -76
  339. package/dist/tools/spec/specVersioning.d.ts.map +0 -1
  340. package/dist/tools/spec/specVersioning.js +0 -236
  341. package/dist/tools/spec/specVersioning.js.map +0 -1
@@ -1,116 +0,0 @@
1
- /**
2
- * SessionStore - 백그라운드 에이전트 세션 저장소
3
- */
4
- // TTL 설정
5
- const SESSION_TTL = 60 * 60 * 1000; // 1시간
6
- const SESSION_HISTORY_TTL = 24 * 60 * 60 * 1000; // 24시간
7
- const CLEANUP_INTERVAL = 10 * 60 * 1000; // 10분
8
- /**
9
- * SessionStore - 세션 저장 및 관리
10
- */
11
- class SessionStoreImpl {
12
- activeSessions = new Map();
13
- sessionHistory = [];
14
- cleanupTimer = null;
15
- constructor() {
16
- this.startCleanupTimer();
17
- }
18
- startCleanupTimer() {
19
- if (this.cleanupTimer)
20
- return;
21
- this.cleanupTimer = setInterval(() => this.cleanup(), CLEANUP_INTERVAL);
22
- if (this.cleanupTimer.unref) {
23
- this.cleanupTimer.unref();
24
- }
25
- }
26
- cleanup() {
27
- const now = Date.now();
28
- // 활성 세션 정리
29
- for (const [sessionId, session] of this.activeSessions.entries()) {
30
- if (now - session.createdAt > SESSION_TTL) {
31
- if (session.handle.status === 'running') {
32
- session.cancelController.abort();
33
- }
34
- this.activeSessions.delete(sessionId);
35
- }
36
- }
37
- // 히스토리 정리
38
- const cutoff = now - SESSION_HISTORY_TTL;
39
- while (this.sessionHistory.length > 0 && this.sessionHistory[0].startTime < cutoff) {
40
- this.sessionHistory.shift();
41
- }
42
- }
43
- add(sessionId, data) {
44
- this.activeSessions.set(sessionId, data);
45
- }
46
- get(sessionId) {
47
- return this.activeSessions.get(sessionId);
48
- }
49
- delete(sessionId) {
50
- this.activeSessions.delete(sessionId);
51
- }
52
- addToHistory(info) {
53
- this.sessionHistory.push(info);
54
- }
55
- findInHistory(sessionId) {
56
- return this.sessionHistory.find(s => s.sessionId === sessionId);
57
- }
58
- getActiveSessions() {
59
- return Array.from(this.activeSessions.values());
60
- }
61
- getRecentHistory(limit) {
62
- return this.sessionHistory.slice(-limit).reverse();
63
- }
64
- }
65
- // 싱글톤 인스턴스
66
- export const sessionStore = new SessionStoreImpl();
67
- /**
68
- * 활성 세션 목록 조회
69
- */
70
- export function listActiveSessions() {
71
- const sessions = sessionStore.getActiveSessions().map(s => ({
72
- sessionId: s.handle.sessionId,
73
- agentName: s.handle.agentName,
74
- status: s.handle.status,
75
- startTime: new Date(s.handle.startTime).toISOString(),
76
- runningFor: `${((Date.now() - s.handle.startTime) / 1000).toFixed(0)}s`
77
- }));
78
- if (sessions.length === 0) {
79
- return {
80
- content: [{ type: 'text', text: 'No active background agents' }]
81
- };
82
- }
83
- let summary = `## Active Background Agents (${sessions.length})\n\n`;
84
- for (const session of sessions) {
85
- summary += `- **${session.agentName}** (${session.sessionId})\n`;
86
- summary += ` Status: ${session.status} | Running: ${session.runningFor}\n`;
87
- }
88
- return {
89
- content: [{ type: 'text', text: summary }],
90
- sessions
91
- };
92
- }
93
- /**
94
- * 세션 히스토리 조회
95
- */
96
- export function getSessionHistory(limit = 10) {
97
- const recent = sessionStore.getRecentHistory(limit);
98
- if (recent.length === 0) {
99
- return {
100
- content: [{ type: 'text', text: 'No session history' }]
101
- };
102
- }
103
- let summary = `## Session History (last ${recent.length})\n\n`;
104
- for (const session of recent) {
105
- const duration = session.endTime
106
- ? `${((session.endTime - session.startTime) / 1000).toFixed(1)}s`
107
- : 'N/A';
108
- summary += `- **${session.agentName}** (${session.sessionId})\n`;
109
- summary += ` Status: ${session.status} | Duration: ${duration}\n`;
110
- }
111
- return {
112
- content: [{ type: 'text', text: summary }],
113
- history: recent
114
- };
115
- }
116
- //# sourceMappingURL=SessionStore.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SessionStore.js","sourceRoot":"","sources":["../../../src/infra/orchestrator/SessionStore.ts"],"names":[],"mappings":"AAAA;;GAEG;AAiBH,SAAS;AACT,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,MAAM;AAC1C,MAAM,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,OAAO;AACxD,MAAM,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,MAAM;AAE/C;;GAEG;AACH,MAAM,gBAAgB;IACZ,cAAc,GAAG,IAAI,GAAG,EAAuB,CAAC;IAChD,cAAc,GAAkB,EAAE,CAAC;IACnC,YAAY,GAA0C,IAAI,CAAC;IAEnE;QACE,IAAI,CAAC,iBAAiB,EAAE,CAAC;IAC3B,CAAC;IAEO,iBAAiB;QACvB,IAAI,IAAI,CAAC,YAAY;YAAE,OAAO;QAC9B,IAAI,CAAC,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAC;QACxE,IAAI,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;YAC5B,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC;IAEO,OAAO;QACb,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAEvB,WAAW;QACX,KAAK,MAAM,CAAC,SAAS,EAAE,OA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AvailabilityCache } from './types.js';
5
- /**
6
- * Claude 실행기 — SmartRouter 의 마지막 fallback(Claude)을 담당.
7
- * 기본 구현은 LLMCluster(claude CLI). 테스트에서는 mock 을 주입한다.
8
- */
9
- export interface ClaudeRunner {
10
- claudeOrchestrate(prompt: string, systemPrompt?: string): Promise<string>;
11
- }
12
- /**
13
- * AllProvidersFailedError - 모든 LLM 프로바이더 실패 시 throw
14
- */
15
- export declare class AllProvidersFailedError extends Error {
16
- readonly attemptedProviders: LLMProvider[];
17
- readonly errors: Record<string, string>;
18
- readonly duration: number;
19
- constructor(attemptedProviders: LLMProvider[], errors: Record<string, string>, duration: number);
20
- }
21
- /**
22
- * SmartRouter 설정
23
- */
24
- export interface SmartRouterOptions {
25
- verbose?: boolean;
26
- /** Claude fallback 실행기 (기본: LLMCluster). 테스트 주입용. */
27
- claudeRunner?: ClaudeRunner;
28
- }
29
- /**
30
- * SmartRouter - Task 유형별 최적 LLM 선택 + fallback chain
31
- * GPT와 Antigravity를 지원
32
- */
33
- export declare class SmartRouter {
34
- private cache;
35
- private verbose;
36
- private claudeRunner;
37
- constructor(options?: SmartRouterOptions);
38
- /**
39
- * 스마트 라우팅 - 작업 유형에 따라 최적의 LLM 선택 + fallback
40
- */
41
- route(request: SmartRouteRequest): Promise<SmartRouteResult>;
42
- /**
43
- * LLM 우선순위 결정
44
- * WHY task-based routing: GPT excels at code/reasoning tasks; Antigravity excels
45
- * at web search and multimodal (UI/UX). Routing by task type maximizes
46
- * quality while keeping Claude as the last-resort fallback (expensive).
47
- */
48
- private getProviderPriority;
49
- /**
50
- * LLM 호출 with timeout (프로바이더당 30초)
51
- */
52
- private callLlmWithTimeout;
53
- /**
54
- * LLM 호출
55
- */
56
- private callLlm;
57
- /**
58
- * 재시도 없이 즉시 다음 LLM으로 넘어가야 하는 에러
59
- */
60
- private shouldSkipRetry;
61
- /**
62
- * LLM 가용성 확인 (캐시 기반)
63
- */
64
- private isUnavailable;
65
- /**
66
- * LLM 가용 상태로 마킹
67
- */
68
- private markAvailable;
69
- /**
70
- * LLM 불가용 상태로 마킹
71
- */
72
- private markUnavailable;
73
- private delay;
74
- webSearch(query: string): Promise<SmartRouteResult>;
75
- architectureReview(prompt: string): Promise<SmartRouteResult>;
76
- uiuxReview(prompt: string): Promise<SmartRouteResult>;
77
- codeAnalysis(prompt: string): Promise<SmartRouteResult>;
78
- debugging(prompt: string): Promise<SmartRouteResult>;
79
- codeGen(description: string, context?: string): Promise<SmartRouteResult>;
80
- /**
81
- * 캐시 상태 조회 (디버깅용)
82
- */
83
- getCacheStatus(): LLMAvailabilityCache;
84
- /**
85
- * 캐시 초기화
86
- */
87
- resetCache(): void;
88
- }
89
- export declare function getSmartRouter(options?: SmartRouterOptions): SmartRouter;
90
- //# sourceMappingURL=SmartRouter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SmartRouter.d.ts","sourceRoot":"","sources":["../../../src/infra/orchestrator/SmartRouter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EAGrB,MAAM,YAAY,CAAC;AAOpB;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,iBAAiB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC3E;AAeD;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,KAAK;IAChD,SAAgB,kBAAkB,EAAE,WAAW,EAAE,CAAC;IAClD,SAAgB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/C,SAAgB,QAAQ,EAAE,MAAM,CAAC;gBAG/B,kBAAkB,EAAE,WAAW,EAAE,EACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC9B,QAAQ,EAAE,MAAM;CAUnB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO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Router - LLM 스마트 라우팅 및 fallback 관리
3
- */
4
- import { TASK_SYSTEM_PROMPTS, getTaskLlmPriority } from './types.js';
5
- import * as gptApi from '../lib/gpt/index.js';
6
- import * as antigravityApi from '../lib/antigravity/index.js';
7
- import * as zaiApi from '../lib/zai/index.js';
8
- import { LLMCluster } from './LLMCluster.js';
9
- import { debugLog } from '../lib/utils.js';
10
- // Claude CLI 는 로컬 spawn 이라 외부 API 보다 느릴 수 있어 더 긴 timeout 을 준다.
11
- const CLAUDE_TIMEOUT_MS = 180_000;
12
- // LLM 가용성 캐시 (5분 TTL)
13
- // WHY 5min: Long enough to avoid hammering a down provider, short enough to
14
- // recover quickly when a transient outage resolves (most LLM 503s clear in <3min).
15
- const LLM_CACHE_TTL = 5 * 60 * 1000;
16
- // 프로바이더별 timeout (30초)
17
- // WHY 30s: LLM responses can legitimately take 10-20s for long prompts; 30s
18
- // balances patience against blocking the fallback chain too long.
19
- const PROVIDER_TIMEOUT_MS = 30_000;
20
- /**
21
- * AllProvidersFailedError - 모든 LLM 프로바이더 실패 시 throw
22
- */
23
- export class AllProvidersFailedError extends Error {
24
- attemptedProviders;
25
- errors;
26
- duration;
27
- constructor(attemptedProviders, errors, duration) {
28
- const lastProvider = attemptedProviders[attemptedProviders.length - 1];
29
- const lastError = lastProvider ? errors[lastProvider] : 'No providers attempted';
30
- super(`All LLM providers failed. Last error (${lastProvider}): ${lastError}`);
31
- this.name = 'AllProvidersFailedError';
32
- this.attemptedProviders = attemptedProviders;
33
- this.errors = errors;
34
- this.duration = duration;
35
- }
36
- }
37
- /**
38
- * SmartRouter - Task 유형별 최적 LLM 선택 + fallback chain
39
- * GPT와 Antigravity를 지원
40
- */
41
- export class SmartRouter {
42
- cache;
43
- verbose;
44
- claudeRunner;
45
- constructor(options = {}) {
46
- this.verbose = options.verbose ?? false;
47
- this.claudeRunner = options.claudeRunner ?? new LLMCluster();
48
- this.cache = {
49
- gpt: { available: true, checkedAt: 0, errorCount: 0 },
50
- antigravity: { available: true, checkedAt: 0, errorCount: 0 },
51
- zai: { available: true, checkedAt: 0, errorCount: 0 }
52
- };
53
- }
54
- /**
55
- * 스마트 라우팅 - 작업 유형에 따라 최적의 LLM 선택 + fallback
56
- */
57
- async route(request) {
58
- const startTime = Date.now();
59
- const { type, prompt, systemPrompt = TASK_SYSTEM_PROMPTS.general, preferredLlm, maxRetries = 2 } = request;
60
- // LLM 우선순위 결정
61
- const providers = this.getProviderPriority(type, preferredLlm);
62
- const attemptedProviders = [];
63
- const errors = {};
64
- // WHY sequential fallback: Parallel calls waste tokens/quota on the slower
65
- // provider. Sequential tries the best-fit first, only falling back on failure.
66
- for (const provider of providers) {
67
- if (this.isUnavailable(provider)) {
68
- if (this.verbose) {
69
- debugLog(`[SmartRouter] Skipping ${provider} (recently failed)`);
70
- }
71
- continue;
72
- }
73
- attemptedProviders.push(provider);
74
- // 재시도 로직
75
- for (let attempt = 0; attempt <= maxRetries; attempt++) {
76
- try {
77
- const content = await this.callLlmWithTimeout(provider, prompt, systemPrompt);
78
- this.markAvailable(provider);
79
- return {
80
- content,
81
- provider,
82
- success: true,
83
- usedFallback: attemptedProviders.length > 1,
84
- attemptedProviders,
85
- duration: Date.now() - startTime
86
- };
87
- }
88
- catch (error) {
89
- const errorMsg = error instanceof Error ? error.message : String(error);
90
- errors[provider] = errorMsg;
91
- if (this.verbose) {
92
- debugLog(`[SmartRouter] ${provider} attempt ${attempt + 1} failed: ${errorMsg}`);
93
- }
94
- if (this.shouldSkipRetry(errorMsg)) {
95
- this.markUnavailable(provider);
96
- break;
97
- }
98
- if (attempt < maxRetries) {
99
- await this.delay(1000 * (attempt + 1));
100
- }
101
- }
102
- }
103
- this.markUnavailable(provider);
104
- }
105
- // 모든 외부 LLM 실패 - AllProvidersFailedError throw
106
- throw new AllProvidersFailedError(attemptedProviders, errors, Date.now() - startTime);
107
- }
108
- /**
109
- * LLM 우선순위 결정
110
- * WHY task-based routing: GPT excels at code/reasoning tasks; Antigravity excels
111
- * at web search and multimodal (UI/UX). Routing by task type maximizes
112
- * quality while keeping Claude as the last-resort fallback (expensive).
113
- */
114
- getProviderPriority(type, preferredLlm) {
115
- const basePriority = getTaskLlmPriority(type);
116
- if (preferredLlm) {
117
- const others = basePriority.filter(p => p !== preferredLlm);
118
- return [preferredLlm, ...others];
119
- }
120
- return basePriority;
121
- }
122
- /**
123
- * LLM 호출 with timeout (프로바이더당 30초)
124
- */
125
- async callLlmWithTimeout(provider, prompt, systemPrompt) {
126
- // Claude 는 로컬 CLI spawn 이라 외부 API 보다 더 긴 timeout 을 허용한다.
127
- const timeoutMs = provider === 'claude' ? CLAUDE_TIMEOUT_MS : PROVIDER_TIMEOUT_MS;
128
- // AbortController 로 timeout 시 진행 중인 fetch 를 실제로 취소한다.
129
- // (이전에는 Promise.race 만으로 로컬에서 빠져나올 뿐 원격 요청은 계속됐다 — B-3)
130
- const controller = new AbortController();
131
- let timer;
132
- const timeoutPromise = new Promise((_, reject) => {
133
- timer = setTimeout(() => {
134
- const err = new Error(`Provider ${provider} timeout (${timeoutMs / 1000}s)`);
135
- controller.abort(err);
136
- reject(err);
137
- }, timeoutMs);
138
- });
139
- try {
140
- const result = await Promise.race([
141
- this.callLlm(provider, prompt, systemPrompt, controller.signal, timeoutMs),
142
- timeoutPromise
143
- ]);
144
- return result;
145
- }
146
- finally {
147
- if (timer)
148
- clearTimeout(timer);
149
- }
150
- }
151
- /**
152
- * LLM 호출
153
- */
154
- async callLlm(provider, prompt, systemPrompt, signal, timeoutMs) {
155
- switch (provider) {
156
- case 'gpt':
157
- return gptApi.coreGptOrchestrate(prompt, systemPrompt, { jsonMode: false, signal, timeoutMs });
158
- case 'antigravity':
159
- return antigravityApi.coreAntigravityOrchestrate(prompt, systemPrompt, { jsonMode: false, signal, timeoutMs });
160
- case 'zai':
161
- // GLM(coding plan 최고 모델). UI 작업의 최우선 provider.
162
- return zaiApi.coreZaiOrchestrate(prompt, systemPrompt, { jsonMode: false, signal, timeoutMs });
163
- case 'claude':
164
- // 마지막 fallback — 로컬 claude CLI 실행 (LLMCluster 또는 주입된 runner).
165
- // 이전에는 'handled by caller' 예외만 던져 claude-only 환경/외부 LLM 장애 시
166
- // 항상 AllProvidersFailedError 로 끝났다. (execSync 라 signal abort 는 미적용)
167
- return this.claudeRunner.claudeOrchestrate(prompt, systemPrompt);
168
- default:
169
- throw new Error(`Unknown provider: ${provider}`);
170
- }
171
- }
172
- /**
173
- * 재시도 없이 즉시 다음 LLM으로 넘어가야 하는 에러
174
- */
175
- shouldSkipRetry(errorMsg) {
176
- const skipPatterns = [
177
- 'rate limit', 'quota', 'exhausted', '429', 'usage limit', 'too many requests',
178
- 'no token', 'token not set', 'no api key', 'api key not set',
179
- 'missing token', 'missing api key', 'not authenticated',
180
- 'authentication failed', 'unauthorized', '401', 'auth'
181
- ];
182
- const lowerMsg = errorMsg.toLowerCase();
183
- return skipPatterns.some(pattern => lowerMsg.includes(pattern));
184
- }
185
- /**
186
- * LLM 가용성 확인 (캐시 기반)
187
- */
188
- isUnavailable(provider) {
189
- if (provider === 'claude')
190
- return false;
191
- const cache = this.cache[provider];
192
- const now = Date.now();
193
- if (now - cache.checkedAt > LLM_CACHE_TTL) {
194
- cache.available = true;
195
- cache.errorCount = 0;
196
- return false;
197
- }
198
- return !cache.available || cache.errorCount >= 3;
199
- }
200
- /**
201
- * LLM 가용 상태로 마킹
202
- */
203
- markAvailable(provider) {
204
- if (provider === 'claude')
205
- return;
206
- this.cache[provider] = {
207
- available: true,
208
- checkedAt: Date.now(),
209
- errorCount: 0
210
- };
211
- }
212
- /**
213
- * LLM 불가용 상태로 마킹
214
- */
215
- markUnavailable(provider) {
216
- if (provider === 'claude')
217
- return;
218
- const cache = this.cache[provider];
219
- cache.errorCount++;
220
- cache.checkedAt = Date.now();
221
- // WHY 3 errors: A single timeout is often transient; 3 consecutive failures
222
- // strongly indicate the provider is genuinely down, so skip it until TTL expires.
223
- if (cache.errorCount >= 3) {
224
- cache.available = false;
225
- }
226
- }
227
- delay(ms) {
228
- return new Promise(resolve => setTimeout(resolve, ms));
229
- }
230
- // ============================================
231
- // Convenience Methods (Smart* shortcuts)
232
- // ============================================
233
- async webSearch(query) {
234
- return this.route({ type: 'web-search', prompt: query, systemPrompt: TASK_SYSTEM_PROMPTS['web-search'] });
235
- }
236
- async architectureReview(prompt) {
237
- return this.route({ type: 'architecture', prompt, systemPrompt: TASK_SYSTEM_PROMPTS.architecture });
238
- }
239
- async uiuxReview(prompt) {
240
- return this.route({ type: 'uiux', prompt, systemPrompt: TASK_SYSTEM_PROMPTS.uiux });
241
- }
242
- async codeAnalysis(prompt) {
243
- return this.route({ type: 'code-analysis', prompt, systemPrompt: TASK_SYSTEM_PROMPTS['code-analysis'] });
244
- }
245
- async debugging(prompt) {
246
- return this.route({ type: 'debugging', prompt, systemPrompt: TASK_SYSTEM_PROMPTS.debugging });
247
- }
248
- async codeGen(description, context) {
249
- const prompt = context ? `${description}\n\nContext:\n${context}` : description;
250
- return this.route({ type: 'code-gen', prompt, systemPrompt: TASK_SYSTEM_PROMPTS['code-gen'] });
251
- }
252
- /**
253
- * 캐시 상태 조회 (디버깅용)
254
- */
255
- getCacheStatus() {
256
- return { ...this.cache };
257
- }
258
- /**
259
- * 캐시 초기화
260
- */
261
- resetCache() {
262
- this.cache = {
263
- gpt: { available: true, checkedAt: 0, errorCount: 0 },
264
- antigravity: { available: true, checkedAt: 0, errorCount: 0 },
265
- zai: { available: true, checkedAt: 0, errorCount: 0 }
266
- };
267
- }
268
- }
269
- // 싱글톤 인스턴스
270
- let defaultRouter = null;
271
- export function getSmartRouter(options) {
272
- if (!defaultRouter || options) {
273
- defaultRouter = new SmartRouter(options);
274
- }
275
- return defaultRouter;
276
- }
277
- //# sourceMappingURL=SmartRouter.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SmartRouter.js","sourceRoot":"","sources":["../../../src/infra/orchestrator/SmartRouter.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAML,mBAAmB,E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AAE,MAAM,EAAE,YAAY,EAAE,mBAAmB,CAAC,SAAS,EAAE,CAAC,CAAC;IAChG,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,WAAmB,EAAE,OAAgB;QACjD,MAAM,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,GAAG,WAAW,iBAAiB,OAAO,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC;QAChF,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,mBAAmB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;OAEG;IACH,cAAc;QACZ,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC;IAED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,KAAK,GAAG;YACX,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE;YACrD,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE;YAC7D,GAAG,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE;SACtD,CAAC;IACJ,CAAC;CACF;AAED,WAAW;AACX,IAAI,aAAa,GAAuB,IAAI,CAAC;AAE7C,MAAM,UAAU,cAAc,CAAC,OAA4B;IACzD,IAAI,CAAC,aAAa,IAAI,OAAO,EAAE,CAAC;QAC9B,aAAa,GAAG,IAAI,WAAW,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IACD,OAAO,aAAa,CAAC;AACvB,CAAC"}
@@ -1,5 +0,0 @@
1
- /**
2
- * SmartRouter Tests - LLM smart routing and fallback management
3
- */
4
- export {};
5
- //# sourceMappingURL=SmartRouter.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SmartRouter.test.d.ts","sourceRoot":"","sources":["../../../src/infra/orchestrator/SmartRouter.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}