@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,272 +0,0 @@
1
- /**
2
- * AgentExecutor - 백그라운드 에이전트 실행
3
- */
4
- import { getModelOverride } from '../lib/config/GlobalConfigManager.js';
5
- import { getAgentSdkQuery } from '../lib/utils.js';
6
- import { AGENT } from '../lib/constants.js';
7
- import { sessionStore } from './SessionStore.js';
8
- import { isCodexAvailable } from '../lib/llm-availability.js';
9
- import { launchCodexBackgroundAgent } from './CodexAgentRuntime.js';
10
- /**
11
- * 시뮬레이션 핸들 생성 (Agent SDK 미설치 시)
12
- */
13
- function createSimulatedHandle(agentName, prompt) {
14
- return {
15
- sessionId: `simulated-${Date.now()}`,
16
- agentName,
17
- status: 'completed',
18
- startTime: Date.now(),
19
- getResult: async () => ({
20
- agentName,
21
- sessionId: `simulated-${Date.now()}`,
22
- result: `[Agent SDK not installed] Would execute: ${prompt.slice(0, 100)}...`,
23
- success: true,
24
- duration: 0
25
- }),
26
- cancel: () => { }
27
- };
28
- }
29
- /**
30
- * 백그라운드 에이전트 시작
31
- */
32
- export async function launchBackgroundAgent(args) {
33
- const { prompt, agentName = `agent-${Date.now()}`, model = getModelOverride('claudeBackground') ?? process.env.CLAUDE_BACKGROUND_MODEL, maxTurns = AGENT.MAX_TURNS, allowedTools = AGENT.DEFAULT_ALLOWED_TOOLS, projectPath = process.cwd(), onProgress } = args;
34
- const query = await getAgentSdkQuery();
35
- if (!query) {
36
- if (isCodexAvailable()) {
37
- const handle = launchCodexBackgroundAgent(args);
38
- const resultPromise = handle.getResult();
39
- sessionStore.add(handle.sessionId, {
40
- handle,
41
- resultPromise,
42
- cancelController: new AbortController(),
43
- createdAt: handle.startTime
44
- });
45
- resultPromise.then((agentResult) => {
46
- sessionStore.addToHistory({
47
- sessionId: agentResult.sessionId,
48
- agentName: agentResult.agentName,
49
- status: agentResult.success ? 'completed' : 'failed',
50
- startTime: handle.startTime,
51
- endTime: Date.now(),
52
- prompt
53
- });
54
- sessionStore.delete(handle.sessionId);
55
- });
56
- return {
57
- content: [{
58
- type: 'text',
59
- text: `Background agent "${agentName}" started via Codex\nSession ID: ${handle.sessionId}\n\nUse getBackgroundAgentResult("${handle.sessionId}") to check status.`
60
- }],
61
- handle
62
- };
63
- }
64
- const handle = createSimulatedHandle(agentName, prompt);
65
- return {
66
- content: [{
67
- type: 'text',
68
- text: `Background agent "${agentName}" started (simulated)\nSession ID: ${handle.sessionId}\n\nNote: Install @anthropic-ai/claude-agent-sdk for real execution.`
69
- }],
70
- handle
71
- };
72
- }
73
- const startTime = Date.now();
74
- const cancelController = new AbortController();
75
- let sessionId = '';
76
- let result = '';
77
- let status = 'running';
78
- // 결과 수집 Promise
79
- const resultPromise = new Promise(async (resolve) => {
80
- // cancel 시 즉시 resolve되도록 abort 리스너 등록
81
- let resolved = false;
82
- const safeResolve = (value) => {
83
- if (!resolved) {
84
- resolved = true;
85
- resolve(value);
86
- }
87
- };
88
- cancelController.signal.addEventListener('abort', () => {
89
- status = 'cancelled';
90
- safeResolve({
91
- agentName, sessionId,
92
- result: result || 'Cancelled by user',
93
- success: false,
94
- error: 'Cancelled',
95
- duration: Date.now() - startTime
96
- });
97
- });
98
- try {
99
- // abortController 를 SDK 에 전달해, cancel()/timeout 시 로컬 promise 뿐 아니라
100
- // 실제 query stream/process 가 종료되도록 한다 (B-3 잔여).
101
- const response = query({
102
- prompt,
103
- options: { model, maxTurns, allowedTools, cwd: projectPath, abortController: cancelController }
104
- });
105
- for await (const message of response) {
106
- if (cancelController.signal.aborted) {
107
- return; // abort 리스너에서 이미 resolve됨
108
- }
109
- const msg = message;
110
- if (msg.type === 'system' && msg.subtype === 'init' && msg.session_id) {
111
- sessionId = msg.session_id;
112
- }
113
- if (msg.type === 'system' && msg.subtype === 'progress' && onProgress) {
114
- onProgress(msg.content || 'Processing...');
115
- }
116
- if (msg.type === 'result' && msg.result) {
117
- result = msg.result;
118
- }
119
- if (msg.type === 'assistant' && msg.message?.content) {
120
- const textContent = msg.message.content
121
- .filter(block => block.type === 'text' && block.text)
122
- .map(block => block.text)
123
- .join('\n');
124
- if (textContent)
125
- result += textContent;
126
- }
127
- }
128
- status = 'completed';
129
- safeResolve({
130
- agentName, sessionId,
131
- result: result || 'No result',
132
- success: true,
133
- duration: Date.now() - startTime
134
- });
135
- }
136
- catch (error) {
137
- status = 'failed';
138
- safeResolve({
139
- agentName, sessionId,
140
- result: result || '',
141
- success: false,
142
- error: error instanceof Error ? error.message : String(error),
143
- duration: Date.now() - startTime
144
- });
145
- }
146
- });
147
- // 핸들 생성
148
- const handle = {
149
- sessionId: sessionId || `pending-${Date.now()}`,
150
- agentName,
151
- status,
152
- startTime,
153
- getResult: () => resultPromise,
154
- cancel: () => {
155
- cancelController.abort();
156
- status = 'cancelled';
157
- }
158
- };
159
- // 세션 등록
160
- sessionStore.add(handle.sessionId, {
161
- handle, resultPromise, cancelController, createdAt: startTime
162
- });
163
- // 완료 시 히스토리에 추가
164
- resultPromise.then((agentResult) => {
165
- sessionStore.addToHistory({
166
- sessionId: agentResult.sessionId,
167
- agentName: agentResult.agentName,
168
- status: agentResult.success ? 'completed' : 'failed',
169
- startTime,
170
- endTime: Date.now(),
171
- prompt
172
- });
173
- sessionStore.delete(handle.sessionId);
174
- });
175
- return {
176
- content: [{
177
- type: 'text',
178
- text: `Background agent "${agentName}" started\nSession ID: ${handle.sessionId}\nModel: ${model}\nMax Turns: ${maxTurns}\n\nUse getBackgroundAgentResult("${handle.sessionId}") to check status.`
179
- }],
180
- handle
181
- };
182
- }
183
- /**
184
- * 백그라운드 에이전트 결과 조회
185
- */
186
- export async function getBackgroundAgentResult(sessionId) {
187
- const session = sessionStore.get(sessionId);
188
- if (!session) {
189
- const historical = sessionStore.findInHistory(sessionId);
190
- if (historical) {
191
- return {
192
- content: [{
193
- type: 'text',
194
- text: `Session "${sessionId}" completed at ${new Date(historical.endTime).toISOString()}\nStatus: ${historical.status}`
195
- }]
196
- };
197
- }
198
- return {
199
- content: [{ type: 'text', text: `Session "${sessionId}" not found` }]
200
- };
201
- }
202
- if (session.handle.status === 'running') {
203
- return {
204
- content: [{
205
- type: 'text',
206
- text: `Session "${sessionId}" is still running\nAgent: ${session.handle.agentName}\nStarted: ${new Date(session.handle.startTime).toISOString()}`
207
- }]
208
- };
209
- }
210
- const result = await session.resultPromise;
211
- return {
212
- content: [{
213
- type: 'text',
214
- text: `Session "${sessionId}" ${result.success ? 'completed' : 'failed'}\nDuration: ${(result.duration / 1000).toFixed(1)}s\n\nResult:\n${result.result}`
215
- }],
216
- result
217
- };
218
- }
219
- /**
220
- * 백그라운드 에이전트 취소
221
- */
222
- export function cancelBackgroundAgent(sessionId) {
223
- const session = sessionStore.get(sessionId);
224
- if (!session) {
225
- return {
226
- content: [{ type: 'text', text: `Session "${sessionId}" not found or already completed` }]
227
- };
228
- }
229
- session.handle.cancel();
230
- return {
231
- content: [{ type: 'text', text: `Session "${sessionId}" cancelled` }]
232
- };
233
- }
234
- /**
235
- * 여러 백그라운드 에이전트 동시 실행
236
- */
237
- export async function launchParallelAgents(agentConfigs) {
238
- const handles = [];
239
- const errors = [];
240
- const results = await Promise.all(agentConfigs.map(async (config) => {
241
- try {
242
- const result = await launchBackgroundAgent(config);
243
- if ('handle' in result) {
244
- return result.handle;
245
- }
246
- return null;
247
- }
248
- catch (error) {
249
- errors.push(`${config.agentName}: ${error instanceof Error ? error.message : String(error)}`);
250
- return null;
251
- }
252
- }));
253
- for (const result of results) {
254
- if (result)
255
- handles.push(result);
256
- }
257
- let summary = `## Launched ${handles.length} Background Agents\n\n`;
258
- for (const handle of handles) {
259
- summary += `- ${handle.agentName}: ${handle.sessionId}\n`;
260
- }
261
- if (errors.length > 0) {
262
- summary += `\n### Errors (${errors.length})\n`;
263
- for (const error of errors) {
264
- summary += `- ${error}\n`;
265
- }
266
- }
267
- return {
268
- content: [{ type: 'text', text: summary }],
269
- handles
270
- };
271
- }
272
- //# sourceMappingURL=AgentExecutor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentExecutor.js","sourceRoot":"","sources":["../../../src/infra/orchestrator/AgentExecutor.ts"],"names":[],"mappings":"AAAA;;GAEG;AAQH,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AAEpE;;GAEG;AACH,SAAS,qBAAqB,CAC5B,SAAiB,EACjB,MAAc;IAEd,OAAO;QACL,SAAS,EAAE,aAAa,IAAI,CAAC,GAAG,EAAE,EAAE;QACpC,SAAS;QACT,MAAM,EAAE,WAAW;QACnB,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,SAAS,EAAE,KAAK,IAAI,EAAE,CAAC,CAAC;YACtB,SAAS;YACT,SAAS,EAAE,aAAa,IAAI,CAAC,GAAG,E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AAS,IAAI,CAAC;IAC5D,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACtB,OAAO,IAAI,iBAAiB,MAAM,CAAC,MAAM,KAAK,CAAC;QAC/C,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,OAAO,IAAI,KAAK,KAAK,IAAI,CAAC;QAC5B,CAAC;IACH,CAAC;IAED,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QAC1C,OAAO;KAC6C,CAAC;AACzD,CAAC"}
@@ -1,72 +0,0 @@
1
- /**
2
- * AgentManager - 에이전트 관리 및 실행
3
- */
4
- import { AgentResult, BackgroundAgentArgs, BackgroundAgentHandle, DiscoveredAgent } from './types.js';
5
- import { ToolResult } from '../types/tool.js';
6
- /**
7
- * AgentManager 설정
8
- */
9
- export interface AgentManagerOptions {
10
- projectPath?: string;
11
- }
12
- /**
13
- * AgentManager - 에이전트 탐색, 실행, 결과 관리
14
- */
15
- export declare class AgentManager {
16
- private projectPath;
17
- constructor(options?: AgentManagerOptions);
18
- /**
19
- * 에이전트 탐색
20
- */
21
- discover(category?: string): Promise<DiscoveredAgent[]>;
22
- /**
23
- * 특정 에이전트 로드
24
- */
25
- load(agentName: string): Promise<DiscoveredAgent | null>;
26
- /**
27
- * 카테고리별 에이전트 목록
28
- */
29
- listByCategory(category: string): Promise<DiscoveredAgent[]>;
30
- /**
31
- * 백그라운드 에이전트 시작
32
- */
33
- launch(args: BackgroundAgentArgs): Promise<BackgroundAgentHandle | null>;
34
- /**
35
- * 여러 에이전트 동시 실행
36
- */
37
- launchParallel(configs: BackgroundAgentArgs[]): Promise<BackgroundAgentHandle[]>;
38
- /**
39
- * 에이전트 결과 조회
40
- */
41
- getResult(sessionId: string): Promise<AgentResult | null>;
42
- /**
43
- * 에이전트 취소
44
- */
45
- cancel(sessionId: string): boolean;
46
- /**
47
- * 활성 세션 목록
48
- */
49
- getActiveSessions(): ToolResult;
50
- /**
51
- * 세션 히스토리
52
- */
53
- getHistory(limit?: number): ToolResult;
54
- /**
55
- * 리뷰 에이전트 병렬 실행
56
- */
57
- runParallelReview(filePaths: string[], techStack?: string[]): Promise<AgentResult[]>;
58
- /**
59
- * 기술 스택에 맞는 에이전트 필터링
60
- */
61
- private filterRelevantAgents;
62
- /**
63
- * 리뷰 프롬프트 생성
64
- */
65
- private buildReviewPrompt;
66
- /**
67
- * 프로젝트 경로 업데이트
68
- */
69
- setProjectPath(path: string): void;
70
- }
71
- export declare function getAgentManager(options?: AgentManagerOptions): AgentManager;
72
- //# sourceMappingURL=AgentManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentManager.d.ts","sourceRoot":"","sources":["../../../src/infra/orchestrator/AgentManager.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,WAAW,EACX,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAY9C;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,WAAW,CAAS;gBAEhB,OAAO,GAAE,mBAAwB;IAI7C;;OAEG;IACG,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAY7D;;OAEG;IACG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAI9D;;OAEG;IACG,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAIlE;;OAEG;IACG,MAAM,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,qBAAqB,GAAG,IAAI,CAAC;IAY9E;;OAEG;IACG,cAAc,CAAC,OAAO,EAAE,mBAAmB,EAAE,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IActF;;OAEG;IACG,SAAS,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC;IAS/D;;OAEG;IACH,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAKlC;;OAEG;IACH,iBAAiB,IAAI,UAAU;IAI/B;;OAEG;IACH,UAAU,CAAC,KAAK,GAAE,MAAW,GAAG,UAAU;IAI1C;;OAEG;IACG,iBAAiB,CACrB,SAAS,EAAE,MAAM,EAAE,EACnB,SAAS,GAAE,MAAM,EAAO,GACvB,OAAO,CAAC,WAAW,EAAE,CAAC;IAuBzB;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAuC5B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAgBzB;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAGnC;AAKD,wBAAgB,eAAe,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,YAAY,CAK3E"}
@@ -1,183 +0,0 @@
1
- /**
2
- * AgentManager - 에이전트 관리 및 실행
3
- */
4
- import { getModelOverride } from '../lib/config/GlobalConfigManager.js';
5
- import { discoverAgents, loadAgent, listAgentsByCategory } from './agentDiscovery.js';
6
- import { launchBackgroundAgent, getBackgroundAgentResult, cancelBackgroundAgent, listActiveSessions, getSessionHistory, launchParallelAgents } from './backgroundAgent.js';
7
- /**
8
- * AgentManager - 에이전트 탐색, 실행, 결과 관리
9
- */
10
- export class AgentManager {
11
- projectPath;
12
- constructor(options = {}) {
13
- this.projectPath = options.projectPath ?? process.cwd();
14
- }
15
- /**
16
- * 에이전트 탐색
17
- */
18
- async discover(category) {
19
- const result = await discoverAgents({
20
- projectPath: this.projectPath,
21
- category
22
- });
23
- if ('agents' in result) {
24
- return result.agents;
25
- }
26
- return [];
27
- }
28
- /**
29
- * 특정 에이전트 로드
30
- */
31
- async load(agentName) {
32
- return loadAgent(agentName, this.projectPath);
33
- }
34
- /**
35
- * 카테고리별 에이전트 목록
36
- */
37
- async listByCategory(category) {
38
- return listAgentsByCategory(category, this.projectPath);
39
- }
40
- /**
41
- * 백그라운드 에이전트 시작
42
- */
43
- async launch(args) {
44
- const result = await launchBackgroundAgent({
45
- ...args,
46
- projectPath: args.projectPath || this.projectPath
47
- });
48
- if ('handle' in result) {
49
- return result.handle;
50
- }
51
- return null;
52
- }
53
- /**
54
- * 여러 에이전트 동시 실행
55
- */
56
- async launchParallel(configs) {
57
- const result = await launchParallelAgents(configs.map(c => ({
58
- ...c,
59
- projectPath: c.projectPath || this.projectPath
60
- })));
61
- if ('handles' in result) {
62
- return result.handles;
63
- }
64
- return [];
65
- }
66
- /**
67
- * 에이전트 결과 조회
68
- */
69
- async getResult(sessionId) {
70
- const result = await getBackgroundAgentResult(sessionId);
71
- if ('result' in result) {
72
- return result.result;
73
- }
74
- return null;
75
- }
76
- /**
77
- * 에이전트 취소
78
- */
79
- cancel(sessionId) {
80
- const result = cancelBackgroundAgent(sessionId);
81
- return result.content[0].text.includes('cancelled');
82
- }
83
- /**
84
- * 활성 세션 목록
85
- */
86
- getActiveSessions() {
87
- return listActiveSessions();
88
- }
89
- /**
90
- * 세션 히스토리
91
- */
92
- getHistory(limit = 10) {
93
- return getSessionHistory(limit);
94
- }
95
- /**
96
- * 리뷰 에이전트 병렬 실행
97
- */
98
- async runParallelReview(filePaths, techStack = []) {
99
- const reviewAgents = await this.listByCategory('review');
100
- const relevantAgents = this.filterRelevantAgents(reviewAgents, techStack);
101
- const agentConfigs = relevantAgents.map(agent => ({
102
- agentName: agent.name,
103
- prompt: this.buildReviewPrompt(agent, filePaths),
104
- model: getModelOverride('claudeReview') ?? process.env.CLAUDE_REVIEW_MODEL,
105
- maxTurns: 3,
106
- allowedTools: ['Read', 'Glob', 'Grep']
107
- }));
108
- const handles = await this.launchParallel(agentConfigs);
109
- const results = [];
110
- for (const handle of handles) {
111
- const result = await handle.getResult();
112
- results.push(result);
113
- }
114
- return results;
115
- }
116
- /**
117
- * 기술 스택에 맞는 에이전트 필터링
118
- */
119
- filterRelevantAgents(agents, techStack) {
120
- const coreReviewers = [
121
- 'security-reviewer',
122
- 'performance-reviewer',
123
- 'architecture-reviewer',
124
- 'complexity-reviewer',
125
- 'simplicity-reviewer',
126
- 'data-integrity-reviewer',
127
- 'test-coverage-reviewer',
128
- 'git-history-reviewer'
129
- ];
130
- const stackReviewers = {
131
- typescript: ['typescript-reviewer'],
132
- python: ['python-reviewer'],
133
- react: ['react-reviewer'],
134
- rails: ['rails-reviewer'],
135
- ruby: ['rails-reviewer']
136
- };
137
- const relevantNames = new Set(coreReviewers);
138
- for (const tech of techStack) {
139
- const reviewers = stackReviewers[tech.toLowerCase()];
140
- if (reviewers) {
141
- reviewers.forEach(r => relevantNames.add(r));
142
- }
143
- }
144
- return agents.filter(agent => {
145
- const normalizedName = agent.name.toLowerCase().replace(/\s+/g, '-');
146
- return relevantNames.has(normalizedName) ||
147
- Array.from(relevantNames).some(r => normalizedName.includes(r));
148
- });
149
- }
150
- /**
151
- * 리뷰 프롬프트 생성
152
- */
153
- buildReviewPrompt(agent, filePaths) {
154
- return `You are a ${agent.name}. Review the following files for issues in your domain:
155
-
156
- Files to review:
157
- ${filePaths.map(f => `- ${f}`).join('\n')}
158
-
159
- ${agent.content}
160
-
161
- Provide findings in this format:
162
- - Priority: P1 (Critical), P2 (Important), P3 (Nice-to-have)
163
- - Category: Your specialty area
164
- - Location: file:line
165
- - Issue: Description
166
- - Fix: Recommendation`;
167
- }
168
- /**
169
- * 프로젝트 경로 업데이트
170
- */
171
- setProjectPath(path) {
172
- this.projectPath = path;
173
- }
174
- }
175
- // 싱글톤 인스턴스
176
- let defaultManager = null;
177
- export function getAgentManager(options) {
178
- if (!defaultManager || options) {
179
- defaultManager = new AgentManager(options);
180
- }
181
- return defaultManager;
182
- }
183
- //# sourceMappingURL=AgentManager.js.map
@@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,CAAC,cAAc,IAAI,OAAO,EAAE,CAAC;QAC/B,cAAc,GAAG,IAAI,YAAY,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,cAAc,CAAC;AACxB,CAAC"}
@@ -1,54 +0,0 @@
1
- /**
2
- * AgentManifestCache - Two-tier agent loading with LRU cache
3
- * Lightweight manifests at warmup, full content on demand
4
- */
5
- export interface AgentManifest {
6
- name: string;
7
- path: string;
8
- category: string;
9
- description: string;
10
- estimatedTokens: number;
11
- }
12
- export interface CachedFullAgent {
13
- manifest: AgentManifest;
14
- content: string;
15
- loadedAt: number;
16
- lastAccess: number;
17
- }
18
- export interface AgentCacheStats {
19
- manifestCount: number;
20
- fullCacheSize: number;
21
- fullCacheMaxSize: number;
22
- totalEstimatedTokens: number;
23
- categories: string[];
24
- }
25
- export declare class AgentManifestCache {
26
- private static instances;
27
- private static defaultInstance;
28
- private manifests;
29
- private fullCache;
30
- private accessOrder;
31
- private maxFullCacheSize;
32
- private projectPath;
33
- private agentsBasePath;
34
- private constructor();
35
- static getInstance(projectPath?: string, maxFullCacheSize?: number): AgentManifestCache;
36
- warmUp(): Promise<void>;
37
- getManifest(name: string): AgentManifest | null;
38
- getFullAgent(name: string): Promise<CachedFullAgent | null>;
39
- listByCategory(category: string): AgentManifest[];
40
- listAll(): AgentManifest[];
41
- estimateTokenCost(names: string[]): {
42
- total: number;
43
- breakdown: Record<string, number>;
44
- wouldExceedBudget: boolean;
45
- };
46
- getStats(): AgentCacheStats;
47
- invalidate(): void;
48
- static resetInstance(): void;
49
- private findAgentsDir;
50
- private readPreview;
51
- private evictIfNeeded;
52
- private touchAccessOrder;
53
- }
54
- //# sourceMappingURL=AgentManifestCache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentManifestCache.d.ts","sourceRoot":"","sources":["../../../src/infra/orchestrator/AgentManifestCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAaH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE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