@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,191 +0,0 @@
1
- /**
2
- * AgentManifestCache - Two-tier agent loading with LRU cache
3
- * Lightweight manifests at warmup, full content on demand
4
- */
5
- import { promises as fs } from 'fs';
6
- import path from 'path';
7
- import { glob } from 'glob';
8
- import { parseAgentMarkdown, extractCategory } from './agentDiscovery.js';
9
- import { TokenBudgetTracker } from '../lib/TokenBudgetTracker.js';
10
- import { TOKENS } from '../lib/constants.js';
11
- // ============================================================================
12
- // Constants
13
- // ============================================================================
14
- const AGENTS_DIRS = ['.codex/agents', '.claude/agents', 'agents'];
15
- const WARMUP_PREVIEW_LINES = 20;
16
- const DEFAULT_MAX_FULL_CACHE = 5;
17
- // ============================================================================
18
- // AgentManifestCache
19
- // ============================================================================
20
- export class AgentManifestCache {
21
- static instances = new Map();
22
- static defaultInstance = null;
23
- manifests = new Map();
24
- fullCache = new Map();
25
- accessOrder = [];
26
- maxFullCacheSize;
27
- projectPath;
28
- agentsBasePath = null;
29
- constructor(projectPath, maxFullCacheSize) {
30
- this.projectPath = projectPath;
31
- this.maxFullCacheSize = maxFullCacheSize;
32
- }
33
- static getInstance(projectPath = process.cwd(), maxFullCacheSize = DEFAULT_MAX_FULL_CACHE) {
34
- const existing = AgentManifestCache.instances.get(projectPath);
35
- if (existing)
36
- return existing;
37
- const inst = new AgentManifestCache(projectPath, maxFullCacheSize);
38
- AgentManifestCache.instances.set(projectPath, inst);
39
- return inst;
40
- }
41
- async warmUp() {
42
- this.agentsBasePath = await this.findAgentsDir();
43
- if (!this.agentsBasePath)
44
- return;
45
- const files = await glob('**/*.md', {
46
- cwd: this.agentsBasePath,
47
- absolute: true,
48
- });
49
- for (const filePath of files) {
50
- try {
51
- const content = await this.readPreview(filePath);
52
- const stat = await fs.stat(filePath);
53
- const parsed = parseAgentMarkdown(content, filePath);
54
- const category = extractCategory(filePath, this.agentsBasePath);
55
- const estimatedTokens = Math.ceil(stat.size * TOKENS.PER_CHAR_ESTIMATE);
56
- const name = parsed.name || path.basename(filePath, '.md');
57
- this.manifests.set(name, {
58
- name,
59
- path: path.relative(this.projectPath, filePath),
60
- category,
61
- description: parsed.description || '',
62
- estimatedTokens,
63
- });
64
- }
65
- catch {
66
- // Skip individual file errors
67
- }
68
- }
69
- }
70
- getManifest(name) {
71
- return this.manifests.get(name) ?? null;
72
- }
73
- async getFullAgent(name) {
74
- const cached = this.fullCache.get(name);
75
- if (cached) {
76
- cached.lastAccess = Date.now();
77
- this.touchAccessOrder(name);
78
- return cached;
79
- }
80
- const manifest = this.manifests.get(name);
81
- if (!manifest)
82
- return null;
83
- try {
84
- const fullPath = path.resolve(this.projectPath, manifest.path);
85
- const content = await fs.readFile(fullPath, 'utf-8');
86
- const entry = {
87
- manifest,
88
- content,
89
- loadedAt: Date.now(),
90
- lastAccess: Date.now(),
91
- };
92
- this.evictIfNeeded();
93
- this.fullCache.set(name, entry);
94
- this.accessOrder.push(name);
95
- return entry;
96
- }
97
- catch {
98
- return null;
99
- }
100
- }
101
- listByCategory(category) {
102
- return [...this.manifests.values()].filter(m => m.category === category);
103
- }
104
- listAll() {
105
- return [...this.manifests.values()];
106
- }
107
- estimateTokenCost(names) {
108
- const breakdown = {};
109
- let total = 0;
110
- for (const name of names) {
111
- const manifest = this.manifests.get(name);
112
- if (manifest) {
113
- breakdown[name] = manifest.estimatedTokens;
114
- total += manifest.estimatedTokens;
115
- }
116
- }
117
- let wouldExceedBudget = false;
118
- try {
119
- const tracker = TokenBudgetTracker.getInstance(this.projectPath);
120
- wouldExceedBudget = total > tracker.getRemainingBudget();
121
- }
122
- catch {
123
- // Tracker not available
124
- }
125
- return { total, breakdown, wouldExceedBudget };
126
- }
127
- getStats() {
128
- const categories = new Set();
129
- let totalEstimatedTokens = 0;
130
- for (const m of this.manifests.values()) {
131
- categories.add(m.category);
132
- totalEstimatedTokens += m.estimatedTokens;
133
- }
134
- return {
135
- manifestCount: this.manifests.size,
136
- fullCacheSize: this.fullCache.size,
137
- fullCacheMaxSize: this.maxFullCacheSize,
138
- totalEstimatedTokens,
139
- categories: [...categories],
140
- };
141
- }
142
- invalidate() {
143
- this.manifests.clear();
144
- this.fullCache.clear();
145
- this.accessOrder = [];
146
- }
147
- static resetInstance() {
148
- AgentManifestCache.instances.clear();
149
- AgentManifestCache.defaultInstance = null;
150
- }
151
- // ========================================================================
152
- // Private helpers
153
- // ========================================================================
154
- async findAgentsDir() {
155
- for (const dir of AGENTS_DIRS) {
156
- const candidate = path.join(this.projectPath, dir);
157
- try {
158
- await fs.access(candidate);
159
- return candidate;
160
- }
161
- catch {
162
- // Try next
163
- }
164
- }
165
- return null;
166
- }
167
- async readPreview(filePath) {
168
- const content = await fs.readFile(filePath, 'utf-8');
169
- const lines = content.split('\n');
170
- return lines.slice(0, WARMUP_PREVIEW_LINES).join('\n');
171
- }
172
- evictIfNeeded() {
173
- while (this.fullCache.size >= this.maxFullCacheSize) {
174
- const oldest = this.accessOrder.shift();
175
- if (oldest) {
176
- this.fullCache.delete(oldest);
177
- }
178
- else {
179
- break;
180
- }
181
- }
182
- }
183
- touchAccessOrder(name) {
184
- const idx = this.accessOrder.indexOf(name);
185
- if (idx !== -1) {
186
- this.accessOrder.splice(idx, 1);
187
- }
188
- this.accessOrder.push(name);
189
- }
190
- }
191
- //# sourceMappingURL=AgentManifestCache.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentManifestCache.js","sourceRoot":"","sources":["../../../src/infra/orchestrator/AgentManifestCache.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AA6B7C,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,WAAW,GAAG,CAAC,eAAe,EAAE,gBAAgB,EAAE,QAAQ,CAAC,CAAC;AAClE,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAEjC,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,MAAM,OAAO,kBAAkB;IACrB,MAAM,CAAC,SAAS,GAAoC,IAAI,GAAG,EAAE,CAAC;IAC9D,MAAM,CAAC,eAAe,GAA8B,IAAI,CAAC;IAEzD,SAAS,GAA+B,IAAI,GAAG,EAAE,CAAC;IAClD,SAAS,GAAiC,IAAI,GAAG,EAAE,CAAC;IACpD,WAAW,GAAa,EAAE,CAAC;IAC3B,gBAAgB,CAAS;IACzB,WAAW,CAAS;IACpB,cAAc,GAAkB,IAAI,CAAC;IAE7C,YAA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,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;gBAC3B,OAAO,SAAS,CAAC;YACnB,CAAC;YAAC,MAAM,CAAC;gBACP,WAAW;YACb,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,QAAgB;QACxC,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAClC,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;IAEO,aAAa;QACnB,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACpD,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;YACxC,IAAI,MAAM,EAAE,CAAC;gBACX,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAChC,CAAC;iBAAM,CAAC;gBACN,MAAM;YACR,CAAC;QACH,CAAC;IACH,CAAC;IAEO,gBAAgB,CAAC,IAAY;QACnC,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3C,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;YACf,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;QAClC,CAAC;QACD,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC9B,CAAC"}
@@ -1,76 +0,0 @@
1
- /**
2
- * AgentRegistry - 에이전트 실행 이력 영속 저장 (SQLite)
3
- * 세션 재시작 시 복구, 통계, 크래시 감지
4
- */
5
- export interface AgentExecution {
6
- id: string;
7
- taskId: string;
8
- agentName: string;
9
- prompt?: string;
10
- result?: string;
11
- status: 'pending' | 'running' | 'completed' | 'failed';
12
- duration?: number;
13
- model?: string;
14
- startedAt: number;
15
- completedAt?: number;
16
- sessionId?: string;
17
- error?: string;
18
- createdAt?: number;
19
- }
20
- export interface AgentHistoryItem {
21
- id: string;
22
- taskId: string;
23
- agentName: string;
24
- status: string;
25
- duration: number | null;
26
- model: string | null;
27
- startedAt: number;
28
- completedAt: number | null;
29
- error: string | null;
30
- createdAt: number;
31
- }
32
- export interface AgentStatsSummary {
33
- totalExecutions: number;
34
- completed: number;
35
- failed: number;
36
- successRate: number;
37
- avgDuration: number;
38
- }
39
- export interface GlobalAgentStats {
40
- total: number;
41
- completed: number;
42
- failed: number;
43
- successRate: number;
44
- avgDuration: number;
45
- byAgent: Record<string, AgentStatsSummary>;
46
- byModel: Record<string, {
47
- count: number;
48
- avgDuration: number;
49
- }>;
50
- }
51
- export declare class AgentRegistry {
52
- private db;
53
- private insertStmt;
54
- private updateCompleteStmt;
55
- private updateFailStmt;
56
- constructor(projectPath: string);
57
- private initializeSchema;
58
- recordStart(execution: {
59
- id: string;
60
- taskId: string;
61
- agentName: string;
62
- prompt?: string;
63
- model?: string;
64
- sessionId?: string;
65
- }): string;
66
- recordComplete(id: string, result: string, duration: number): void;
67
- recordFailure(id: string, error: string, duration: number): void;
68
- getIncompleteExecutions(): AgentHistoryItem[];
69
- markOrphaned(olderThanMs: number): number;
70
- getHistory(limit?: number, agentName?: string): AgentHistoryItem[];
71
- getAgentStats(agentName: string): AgentStatsSummary;
72
- getGlobalStats(): GlobalAgentStats;
73
- cleanup(ttlMs?: number): number;
74
- close(): void;
75
- }
76
- //# sourceMappingURL=AgentRegistry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentRegistry.d.ts","sourceRoot":"","sources":["../../../src/infra/orchestrator/AgentRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,MAAM,WAAW,cAAc;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3
- * 세션 재시작 시 복구, 통계, 크래시 감지
4
- */
5
- import Database from 'better-sqlite3';
6
- import path from 'path';
7
- import fs from 'fs';
8
- // ============================================
9
- // Constants
10
- // ============================================
11
- const MAX_PROMPT_LENGTH = 2000;
12
- const MAX_RESULT_LENGTH = 2000;
13
- const DEFAULT_CLEANUP_TTL_MS = 24 * 60 * 60 * 1000; // 24h
14
- // Sensitive info masking
15
- const SENSITIVE_PATTERNS = [
16
- /sk-[a-zA-Z0-9]{20,}/g,
17
- /AIza[a-zA-Z0-9_-]{35}/g,
18
- /ya29\.[a-zA-Z0-9_-]+/g,
19
- /eyJ[a-zA-Z0-9_-]+\.eyJ[a-zA-Z0-9_-]+/g,
20
- ];
21
- function maskSensitive(text) {
22
- let masked = text;
23
- for (const pattern of SENSITIVE_PATTERNS) {
24
- masked = masked.replace(pattern, '***REDACTED***');
25
- }
26
- return masked;
27
- }
28
- function truncateText(text, maxLen) {
29
- if (!text)
30
- return text;
31
- return text.length > maxLen ? text.slice(0, maxLen) : text;
32
- }
33
- // ============================================
34
- // AgentRegistry
35
- // ============================================
36
- export class AgentRegistry {
37
- db;
38
- insertStmt;
39
- updateCompleteStmt;
40
- updateFailStmt;
41
- constructor(projectPath) {
42
- const dbDir = path.join(projectPath, '.claude', 'vibe', 'agents');
43
- const dbPath = path.join(dbDir, 'registry.db');
44
- // Ensure directory exists
45
- if (!fs.existsSync(dbDir)) {
46
- fs.mkdirSync(dbDir, { recursive: true, mode: 0o700 });
47
- }
48
- this.db = new Database(dbPath);
49
- this.db.pragma('journal_mode = WAL');
50
- this.db.pragma('busy_timeout = 5000');
51
- // Set file permissions
52
- try {
53
- fs.chmodSync(dbPath, 0o600);
54
- }
55
- catch {
56
- // May fail on some platforms
57
- }
58
- this.initializeSchema();
59
- // Prepare statements
60
- this.insertStmt = this.db.prepare(`
61
- INSERT INTO agent_executions (id, task_id, agent_name, prompt, status, model, started_at, session_id, created_at)
62
- VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)
63
- `);
64
- this.updateCompleteStmt = this.db.prepare(`
65
- UPDATE agent_executions SET status = 'completed', result = ?, duration = ?, completed_at = ? WHERE id = ?
66
- `);
67
- this.updateFailStmt = this.db.prepare(`
68
- UPDATE agent_executions SET status = 'failed', error = ?, duration = ?, completed_at = ? WHERE id = ?
69
- `);
70
- }
71
- initializeSchema() {
72
- this.db.exec(`
73
- CREATE TABLE IF NOT EXISTS agent_executions (
74
- id TEXT PRIMARY KEY,
75
- task_id TEXT NOT NULL,
76
- agent_name TEXT NOT NULL,
77
- prompt TEXT,
78
- result TEXT,
79
- status TEXT NOT NULL DEFAULT 'pending',
80
- duration INTEGER,
81
- model TEXT,
82
- started_at INTEGER NOT NULL,
83
- completed_at INTEGER,
84
- session_id TEXT,
85
- error TEXT,
86
- created_at INTEGER NOT NULL DEFAULT (strftime('%s','now') * 1000)
87
- );
88
- CREATE INDEX IF NOT EXISTS idx_status ON agent_executions(status);
89
- CREATE INDEX IF NOT EXISTS idx_agent_name ON agent_executions(agent_name);
90
- `);
91
- }
92
- recordStart(execution) {
93
- const now = Date.now();
94
- this.insertStmt.run(execution.id, execution.taskId, execution.agentName, maskSensitive(truncateText(execution.prompt, MAX_PROMPT_LENGTH) ?? ''), 'running', execution.model ?? null, now, execution.sessionId ?? null, now);
95
- return execution.id;
96
- }
97
- recordComplete(id, result, duration) {
98
- this.updateCompleteStmt.run(maskSensitive(truncateText(result, MAX_RESULT_LENGTH) ?? ''), duration, Date.now(), id);
99
- }
100
- recordFailure(id, error, duration) {
101
- const maskedError = maskSensitive(error);
102
- this.updateFailStmt.run(maskedError, duration, Date.now(), id);
103
- }
104
- getIncompleteExecutions() {
105
- const stmt = this.db.prepare(`
106
- SELECT id, task_id as taskId, agent_name as agentName, status, duration, model,
107
- started_at as startedAt, completed_at as completedAt, error, created_at as createdAt
108
- FROM agent_executions WHERE status = 'running' ORDER BY started_at ASC
109
- `);
110
- return stmt.all();
111
- }
112
- markOrphaned(olderThanMs) {
113
- const cutoff = Date.now() - olderThanMs;
114
- const stmt = this.db.prepare(`
115
- UPDATE agent_executions SET status = 'failed', error = 'Orphaned (process crash)',
116
- completed_at = ? WHERE status = 'running' AND started_at < ?
117
- `);
118
- const result = stmt.run(Date.now(), cutoff);
119
- return result.changes;
120
- }
121
- getHistory(limit = 50, agentName) {
122
- if (agentName) {
123
- const stmt = this.db.prepare(`
124
- SELECT id, task_id as taskId, agent_name as agentName, status, duration, model,
125
- started_at as startedAt, completed_at as completedAt, error, created_at as createdAt
126
- FROM agent_executions WHERE agent_name = ? ORDER BY created_at DESC LIMIT ?
127
- `);
128
- return stmt.all(agentName, limit);
129
- }
130
- const stmt = this.db.prepare(`
131
- SELECT id, task_id as taskId, agent_name as agentName, status, duration, model,
132
- started_at as startedAt, completed_at as completedAt, error, created_at as createdAt
133
- FROM agent_executions ORDER BY created_at DESC LIMIT ?
134
- `);
135
- return stmt.all(limit);
136
- }
137
- getAgentStats(agentName) {
138
- const stmt = this.db.prepare(`
139
- SELECT COUNT(*) as total,
140
- SUM(CASE WHEN status = 'completed' THEN 1 ELSE 0 END) as completed,
141
- SUM(CASE WHEN status = 'failed' THEN 1 ELSE 0 END) as failed,
142
- AVG(CASE WHEN duration IS NOT NULL THEN duration END) as avgDuration
143
- FROM agent_executions WHERE agent_name = ?
144
- `);
145
- const row = stmt.get(agentName);
146
- return {
147
- totalExecutions: row.total,
148
- completed: row.completed,
149
- failed: row.failed,
150
- successRate: row.total > 0 ? row.completed / row.total : 0,
151
- avgDuration: row.avgDuration ?? 0,
152
- };
153
- }
154
- getGlobalStats() {
155
- // Overall stats
156
- const overallStmt = this.db.prepare(`
157
- SELECT COUNT(*) as total,
158
- SUM(CASE WHEN status = 'completed' THEN 1 ELSE 0 END) as completed,
159
- SUM(CASE WHEN status = 'failed' THEN 1 ELSE 0 END) as failed,
160
- AVG(CASE WHEN duration IS NOT NULL THEN duration END) as avgDuration
161
- FROM agent_executions
162
- `);
163
- const overall = overallStmt.get();
164
- // By agent
165
- const byAgentStmt = this.db.prepare(`
166
- SELECT agent_name as agentName, COUNT(*) as total,
167
- SUM(CASE WHEN status = 'completed' THEN 1 ELSE 0 END) as completed,
168
- SUM(CASE WHEN status = 'failed' THEN 1 ELSE 0 END) as failed,
169
- AVG(CASE WHEN duration IS NOT NULL THEN duration END) as avgDuration
170
- FROM agent_executions GROUP BY agent_name
171
- `);
172
- const agentRows = byAgentStmt.all();
173
- const byAgent = {};
174
- for (const row of agentRows) {
175
- byAgent[row.agentName] = {
176
- totalExecutions: row.total,
177
- completed: row.completed,
178
- failed: row.failed,
179
- successRate: row.total > 0 ? row.completed / row.total : 0,
180
- avgDuration: row.avgDuration ?? 0,
181
- };
182
- }
183
- // By model
184
- const byModelStmt = this.db.prepare(`
185
- SELECT model, COUNT(*) as count,
186
- AVG(CASE WHEN duration IS NOT NULL THEN duration END) as avgDuration
187
- FROM agent_executions WHERE model IS NOT NULL GROUP BY model
188
- `);
189
- const modelRows = byModelStmt.all();
190
- const byModel = {};
191
- for (const row of modelRows) {
192
- byModel[row.model] = { count: row.count, avgDuration: row.avgDuration ?? 0 };
193
- }
194
- return {
195
- total: overall.total,
196
- completed: overall.completed,
197
- failed: overall.failed,
198
- successRate: overall.total > 0 ? overall.completed / overall.total : 0,
199
- avgDuration: overall.avgDuration ?? 0,
200
- byAgent,
201
- byModel,
202
- };
203
- }
204
- cleanup(ttlMs = DEFAULT_CLEANUP_TTL_MS) {
205
- const cutoff = Date.now() - ttlMs;
206
- const stmt = this.db.prepare(`
207
- DELETE FROM agent_executions
208
- WHERE (status = 'completed' OR status = 'failed') AND completed_at < ?
209
- `);
210
- const result = stmt.run(cutoff);
211
- return result.changes;
212
- }
213
- close() {
214
- this.db.close();
215
- }
216
- }
217
- //# sourceMappingURL=AgentRegistry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentRegistry.js","sourceRoot":"","sources":["../../../src/infra/orchestrator/AgentRegistry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAE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,CAAC,OAAO,CAAC;;;KAG5B,CAAC,CAAC;QACH,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;QAChC,OAAO,MAAM,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC;IAClB,CAAC;CACF"}
@@ -1,5 +0,0 @@
1
- /**
2
- * AgentRegistry Tests
3
- */
4
- export {};
5
- //# sourceMappingURL=AgentRegistry.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentRegistry.test.d.ts","sourceRoot":"","sources":["../../../src/infra/orchestrator/AgentRegistry.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,122 +0,0 @@
1
- /**
2
- * AgentRegistry Tests
3
- */
4
- import { describe, it, expect, beforeEach, afterEach } from 'vitest';
5
- import fs from 'fs';
6
- import path from 'path';
7
- import os from 'os';
8
- import { AgentRegistry } from './AgentRegistry.js';
9
- const TEST_DIR = path.join(os.tmpdir(), `vibe-registry-test-${process.pid}`);
10
- describe('AgentRegistry', () => {
11
- let registry;
12
- beforeEach(() => {
13
- if (fs.existsSync(TEST_DIR)) {
14
- fs.rmSync(TEST_DIR, { recursive: true });
15
- }
16
- fs.mkdirSync(TEST_DIR, { recursive: true });
17
- registry = new AgentRegistry(TEST_DIR);
18
- });
19
- afterEach(() => {
20
- try {
21
- registry.close();
22
- }
23
- catch { /* ignore */ }
24
- if (fs.existsSync(TEST_DIR)) {
25
- fs.rmSync(TEST_DIR, { recursive: true });
26
- }
27
- });
28
- it('should create DB at correct path', () => {
29
- const dbPath = path.join(TEST_DIR, '.claude', 'vibe', 'agents', 'registry.db');
30
- expect(fs.existsSync(dbPath)).toBe(true);
31
- });
32
- it('should record start and complete', () => {
33
- registry.recordStart({
34
- id: 'exec-1', taskId: 'task-1', agentName: 'test-agent',
35
- prompt: 'Do something', model: 'claude-sonnet',
36
- });
37
- registry.recordComplete('exec-1', 'Task done', 1500);
38
- const history = registry.getHistory(10);
39
- expect(history).toHaveLength(1);
40
- expect(history[0].status).toBe('completed');
41
- expect(history[0].duration).toBe(1500);
42
- });
43
- it('should record failure with masked errors', () => {
44
- registry.recordStart({
45
- id: 'exec-2', taskId: 'task-2', agentName: 'test-agent',
46
- });
47
- registry.recordFailure('exec-2', 'Auth failed with sk-1234567890abcdefghijklmno', 500);
48
- const history = registry.getHistory(10);
49
- expect(history).toHaveLength(1);
50
- expect(history[0].status).toBe('failed');
51
- expect(history[0].error).not.toContain('sk-1234567890');
52
- expect(history[0].error).toContain('***REDACTED***');
53
- });
54
- it('should detect incomplete (running) executions', () => {
55
- registry.recordStart({
56
- id: 'exec-3', taskId: 'task-3', agentName: 'crashed-agent',
57
- });
58
- const incomplete = registry.getIncompleteExecutions();
59
- expect(incomplete).toHaveLength(1);
60
- expect(incomplete[0].id).toBe('exec-3');
61
- });
62
- it('should mark orphaned tasks', () => {
63
- registry.recordStart({
64
- id: 'exec-4', taskId: 'task-4', agentName: 'orphaned-agent',
65
- });
66
- // Mark as orphaned — use negative offset so cutoff is in the future
67
- const count = registry.markOrphaned(-1000);
68
- expect(count).toBe(1);
69
- const history = registry.getHistory(10);
70
- expect(history[0].status).toBe('failed');
71
- expect(history[0].error).toContain('Orphaned');
72
- });
73
- it('should return agent stats', () => {
74
- registry.recordStart({ id: 'e1', taskId: 't1', agentName: 'reviewer' });
75
- registry.recordComplete('e1', 'ok', 1000);
76
- registry.recordStart({ id: 'e2', taskId: 't2', agentName: 'reviewer' });
77
- registry.recordFailure('e2', 'error', 500);
78
- const stats = registry.getAgentStats('reviewer');
79
- expect(stats.totalExecutions).toBe(2);
80
- expect(stats.completed).toBe(1);
81
- expect(stats.failed).toBe(1);
82
- expect(stats.successRate).toBe(0.5);
83
- });
84
- it('should return global stats', () => {
85
- registry.recordStart({ id: 'e1', taskId: 't1', agentName: 'agent-a', model: 'claude' });
86
- registry.recordComplete('e1', 'ok', 1000);
87
- registry.recordStart({ id: 'e2', taskId: 't2', agentName: 'agent-b', model: 'gpt-4' });
88
- registry.recordComplete('e2', 'ok', 2000);
89
- const stats = registry.getGlobalStats();
90
- expect(stats.total).toBe(2);
91
- expect(stats.completed).toBe(2);
92
- expect(Object.keys(stats.byAgent)).toHaveLength(2);
93
- expect(Object.keys(stats.byModel)).toHaveLength(2);
94
- });
95
- it('should cleanup old records', () => {
96
- registry.recordStart({ id: 'e1', taskId: 't1', agentName: 'old-agent' });
97
- registry.recordComplete('e1', 'old result', 100);
98
- // Use a large negative offset to ensure the cutoff is in the future
99
- // cleanup(-1000) means cutoff = Date.now() - (-1000) = Date.now() + 1000 (future)
100
- const removed = registry.cleanup(-1000);
101
- expect(removed).toBe(1);
102
- expect(registry.getHistory()).toHaveLength(0);
103
- });
104
- it('should filter history by agent name', () => {
105
- registry.recordStart({ id: 'e1', taskId: 't1', agentName: 'agent-a' });
106
- registry.recordComplete('e1', 'ok', 100);
107
- registry.recordStart({ id: 'e2', taskId: 't2', agentName: 'agent-b' });
108
- registry.recordComplete('e2', 'ok', 200);
109
- const historyA = registry.getHistory(10, 'agent-a');
110
- expect(historyA).toHaveLength(1);
111
- expect(historyA[0].agentName).toBe('agent-a');
112
- });
113
- it('should truncate long prompts and results', () => {
114
- const longPrompt = 'x'.repeat(5000);
115
- registry.recordStart({ id: 'e1', taskId: 't1', agentName: 'agent', prompt: longPrompt });
116
- registry.recordComplete('e1', 'y'.repeat(5000), 100);
117
- // No error thrown — truncation handled internally
118
- const history = registry.getHistory(1);
119
- expect(history).toHaveLength(1);
120
- });
121
- });
122
- //# sourceMappingURL=AgentRegistry.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AgentRegistry.test.js","sourceRoot":"","sources":["../../../src/infra/orchestrator/AgentRegistry.test.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC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