@su-record/vibe 3.2.14 → 3.2.16

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 (351) hide show
  1. package/dist/cli/commands/index.d.ts +1 -1
  2. package/dist/cli/commands/index.d.ts.map +1 -1
  3. package/dist/cli/commands/index.js +1 -1
  4. package/dist/cli/commands/index.js.map +1 -1
  5. package/dist/cli/commands/info.d.ts +3 -1
  6. package/dist/cli/commands/info.d.ts.map +1 -1
  7. package/dist/cli/commands/info.js +12 -3
  8. package/dist/cli/commands/info.js.map +1 -1
  9. package/dist/cli/commands/init.d.ts +0 -7
  10. package/dist/cli/commands/init.d.ts.map +1 -1
  11. package/dist/cli/commands/init.js +5 -37
  12. package/dist/cli/commands/init.js.map +1 -1
  13. package/dist/cli/commands/update.d.ts.map +1 -1
  14. package/dist/cli/commands/update.js +4 -6
  15. package/dist/cli/commands/update.js.map +1 -1
  16. package/dist/cli/commands/upgrade.d.ts +1 -1
  17. package/dist/cli/commands/upgrade.d.ts.map +1 -1
  18. package/dist/cli/commands/upgrade.js +7 -2
  19. package/dist/cli/commands/upgrade.js.map +1 -1
  20. package/dist/cli/postinstall/claude-agents.js +1 -1
  21. package/dist/cli/postinstall/claude-agents.js.map +1 -1
  22. package/dist/cli/postinstall/constants.d.ts +0 -1
  23. package/dist/cli/postinstall/constants.d.ts.map +1 -1
  24. package/dist/cli/postinstall/constants.js +0 -8
  25. package/dist/cli/postinstall/constants.js.map +1 -1
  26. package/dist/cli/postinstall/main.d.ts.map +1 -1
  27. package/dist/cli/postinstall/main.js +20 -13
  28. package/dist/cli/postinstall/main.js.map +1 -1
  29. package/dist/cli/postinstall.d.ts +0 -3
  30. package/dist/cli/postinstall.d.ts.map +1 -1
  31. package/dist/cli/postinstall.js +0 -3
  32. package/dist/cli/postinstall.js.map +1 -1
  33. package/dist/cli/setup/InstallHome.d.ts +27 -0
  34. package/dist/cli/setup/InstallHome.d.ts.map +1 -0
  35. package/dist/cli/setup/InstallHome.js +105 -0
  36. package/dist/cli/setup/InstallHome.js.map +1 -0
  37. package/dist/cli/setup/ProjectSetup.d.ts +0 -8
  38. package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
  39. package/dist/cli/setup/ProjectSetup.js +0 -96
  40. package/dist/cli/setup/ProjectSetup.js.map +1 -1
  41. package/dist/cli/setup.d.ts +1 -1
  42. package/dist/cli/setup.d.ts.map +1 -1
  43. package/dist/cli/setup.js +1 -1
  44. package/dist/cli/setup.js.map +1 -1
  45. package/dist/infra/lib/codex-proxy.d.ts +126 -0
  46. package/dist/infra/lib/codex-proxy.d.ts.map +1 -1
  47. package/dist/infra/lib/codex-proxy.js +16 -16
  48. package/dist/infra/lib/codex-proxy.js.map +1 -1
  49. package/dist/infra/lib/figma/audit.d.ts.map +1 -1
  50. package/dist/infra/lib/figma/audit.js +0 -2
  51. package/dist/infra/lib/figma/audit.js.map +1 -1
  52. package/dist/infra/lib/figma/extract.d.ts +6 -1
  53. package/dist/infra/lib/figma/extract.d.ts.map +1 -1
  54. package/dist/infra/lib/figma/extract.js +17 -15
  55. package/dist/infra/lib/figma/extract.js.map +1 -1
  56. package/dist/infra/lib/figma/types.d.ts +103 -0
  57. package/dist/infra/lib/figma/types.d.ts.map +1 -1
  58. package/dist/infra/lib/figma/types.js +8 -0
  59. package/dist/infra/lib/figma/types.js.map +1 -1
  60. package/hooks/scripts/clone-extract.js +16 -1
  61. package/hooks/scripts/code-check.js +12 -5
  62. package/hooks/scripts/lib/dispatcher.js +43 -3
  63. package/hooks/scripts/utils.js +32 -2
  64. package/package.json +10 -8
  65. package/dist/__tests__/agent-model-sync.test.d.ts +0 -2
  66. package/dist/__tests__/agent-model-sync.test.d.ts.map +0 -1
  67. package/dist/__tests__/agent-model-sync.test.js +0 -71
  68. package/dist/__tests__/agent-model-sync.test.js.map +0 -1
  69. package/dist/__tests__/architecture.test.d.ts +0 -2
  70. package/dist/__tests__/architecture.test.d.ts.map +0 -1
  71. package/dist/__tests__/architecture.test.js +0 -207
  72. package/dist/__tests__/architecture.test.js.map +0 -1
  73. package/dist/__tests__/engines-contract.test.d.ts +0 -2
  74. package/dist/__tests__/engines-contract.test.d.ts.map +0 -1
  75. package/dist/__tests__/engines-contract.test.js +0 -72
  76. package/dist/__tests__/engines-contract.test.js.map +0 -1
  77. package/dist/__tests__/instruction-drift.test.d.ts +0 -2
  78. package/dist/__tests__/instruction-drift.test.d.ts.map +0 -1
  79. package/dist/__tests__/instruction-drift.test.js +0 -116
  80. package/dist/__tests__/instruction-drift.test.js.map +0 -1
  81. package/dist/__tests__/skill-namespace.test.d.ts +0 -2
  82. package/dist/__tests__/skill-namespace.test.d.ts.map +0 -1
  83. package/dist/__tests__/skill-namespace.test.js +0 -60
  84. package/dist/__tests__/skill-namespace.test.js.map +0 -1
  85. package/dist/__tests__/stakes-contract.test.d.ts +0 -2
  86. package/dist/__tests__/stakes-contract.test.d.ts.map +0 -1
  87. package/dist/__tests__/stakes-contract.test.js +0 -173
  88. package/dist/__tests__/stakes-contract.test.js.map +0 -1
  89. package/dist/__tests__/stuck-semantics.test.d.ts +0 -2
  90. package/dist/__tests__/stuck-semantics.test.d.ts.map +0 -1
  91. package/dist/__tests__/stuck-semantics.test.js +0 -161
  92. package/dist/__tests__/stuck-semantics.test.js.map +0 -1
  93. package/dist/__tests__/wiring-integrity.test.d.ts +0 -2
  94. package/dist/__tests__/wiring-integrity.test.d.ts.map +0 -1
  95. package/dist/__tests__/wiring-integrity.test.js +0 -160
  96. package/dist/__tests__/wiring-integrity.test.js.map +0 -1
  97. package/dist/cli/commands/info.test.d.ts +0 -2
  98. package/dist/cli/commands/info.test.d.ts.map +0 -1
  99. package/dist/cli/commands/info.test.js +0 -74
  100. package/dist/cli/commands/info.test.js.map +0 -1
  101. package/dist/cli/commands/upgrade.test.d.ts +0 -2
  102. package/dist/cli/commands/upgrade.test.d.ts.map +0 -1
  103. package/dist/cli/commands/upgrade.test.js +0 -99
  104. package/dist/cli/commands/upgrade.test.js.map +0 -1
  105. package/dist/cli/design/design-md-parser.test.d.ts +0 -2
  106. package/dist/cli/design/design-md-parser.test.d.ts.map +0 -1
  107. package/dist/cli/design/design-md-parser.test.js +0 -149
  108. package/dist/cli/design/design-md-parser.test.js.map +0 -1
  109. package/dist/cli/detect.characterization.test.d.ts +0 -7
  110. package/dist/cli/detect.characterization.test.d.ts.map +0 -1
  111. package/dist/cli/detect.characterization.test.js +0 -294
  112. package/dist/cli/detect.characterization.test.js.map +0 -1
  113. package/dist/cli/postinstall/cursor-agents.d.ts +0 -13
  114. package/dist/cli/postinstall/cursor-agents.d.ts.map +0 -1
  115. package/dist/cli/postinstall/cursor-agents.js +0 -89
  116. package/dist/cli/postinstall/cursor-agents.js.map +0 -1
  117. package/dist/cli/postinstall/cursor-rules.d.ts +0 -11
  118. package/dist/cli/postinstall/cursor-rules.d.ts.map +0 -1
  119. package/dist/cli/postinstall/cursor-rules.js +0 -205
  120. package/dist/cli/postinstall/cursor-rules.js.map +0 -1
  121. package/dist/cli/postinstall/cursor-skills.d.ts +0 -9
  122. package/dist/cli/postinstall/cursor-skills.d.ts.map +0 -1
  123. package/dist/cli/postinstall/cursor-skills.js +0 -796
  124. package/dist/cli/postinstall/cursor-skills.js.map +0 -1
  125. package/dist/cli/postinstall/fs-utils.test.d.ts +0 -2
  126. package/dist/cli/postinstall/fs-utils.test.d.ts.map +0 -1
  127. package/dist/cli/postinstall/fs-utils.test.js +0 -259
  128. package/dist/cli/postinstall/fs-utils.test.js.map +0 -1
  129. package/dist/cli/setup/CodexHooks.test.d.ts +0 -2
  130. package/dist/cli/setup/CodexHooks.test.d.ts.map +0 -1
  131. package/dist/cli/setup/CodexHooks.test.js +0 -52
  132. package/dist/cli/setup/CodexHooks.test.js.map +0 -1
  133. package/dist/cli/setup/GlobalInstaller.test.d.ts +0 -2
  134. package/dist/cli/setup/GlobalInstaller.test.d.ts.map +0 -1
  135. package/dist/cli/setup/GlobalInstaller.test.js +0 -16
  136. package/dist/cli/setup/GlobalInstaller.test.js.map +0 -1
  137. package/dist/cli/utils/cli-detector.test.d.ts +0 -2
  138. package/dist/cli/utils/cli-detector.test.d.ts.map +0 -1
  139. package/dist/cli/utils/cli-detector.test.js +0 -52
  140. package/dist/cli/utils/cli-detector.test.js.map +0 -1
  141. package/dist/infra/lib/SkillFrontmatter.test.d.ts +0 -2
  142. package/dist/infra/lib/SkillFrontmatter.test.d.ts.map +0 -1
  143. package/dist/infra/lib/SkillFrontmatter.test.js +0 -60
  144. package/dist/infra/lib/SkillFrontmatter.test.js.map +0 -1
  145. package/dist/infra/lib/__tests__/AutomationLevel.test.d.ts +0 -2
  146. package/dist/infra/lib/__tests__/AutomationLevel.test.d.ts.map +0 -1
  147. package/dist/infra/lib/__tests__/AutomationLevel.test.js +0 -297
  148. package/dist/infra/lib/__tests__/AutomationLevel.test.js.map +0 -1
  149. package/dist/infra/lib/__tests__/ComponentRegistry.test.d.ts +0 -2
  150. package/dist/infra/lib/__tests__/ComponentRegistry.test.d.ts.map +0 -1
  151. package/dist/infra/lib/__tests__/ComponentRegistry.test.js +0 -99
  152. package/dist/infra/lib/__tests__/ComponentRegistry.test.js.map +0 -1
  153. package/dist/infra/lib/__tests__/DecisionTracer.test.d.ts +0 -2
  154. package/dist/infra/lib/__tests__/DecisionTracer.test.d.ts.map +0 -1
  155. package/dist/infra/lib/__tests__/DecisionTracer.test.js +0 -274
  156. package/dist/infra/lib/__tests__/DecisionTracer.test.js.map +0 -1
  157. package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.d.ts +0 -2
  158. package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.d.ts.map +0 -1
  159. package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.js +0 -350
  160. package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.js.map +0 -1
  161. package/dist/infra/lib/__tests__/LoopBreaker.test.d.ts +0 -2
  162. package/dist/infra/lib/__tests__/LoopBreaker.test.d.ts.map +0 -1
  163. package/dist/infra/lib/__tests__/LoopBreaker.test.js +0 -340
  164. package/dist/infra/lib/__tests__/LoopBreaker.test.js.map +0 -1
  165. package/dist/infra/lib/__tests__/VerificationLoop.test.d.ts +0 -2
  166. package/dist/infra/lib/__tests__/VerificationLoop.test.d.ts.map +0 -1
  167. package/dist/infra/lib/__tests__/VerificationLoop.test.js +0 -486
  168. package/dist/infra/lib/__tests__/VerificationLoop.test.js.map +0 -1
  169. package/dist/infra/lib/config/GlobalConfigManager.test.d.ts +0 -2
  170. package/dist/infra/lib/config/GlobalConfigManager.test.d.ts.map +0 -1
  171. package/dist/infra/lib/config/GlobalConfigManager.test.js +0 -9
  172. package/dist/infra/lib/config/GlobalConfigManager.test.js.map +0 -1
  173. package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.d.ts +0 -2
  174. package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.d.ts.map +0 -1
  175. package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js +0 -43
  176. package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js.map +0 -1
  177. package/dist/infra/lib/embedding/__tests__/VectorStore.test.d.ts +0 -2
  178. package/dist/infra/lib/embedding/__tests__/VectorStore.test.d.ts.map +0 -1
  179. package/dist/infra/lib/embedding/__tests__/VectorStore.test.js +0 -94
  180. package/dist/infra/lib/embedding/__tests__/VectorStore.test.js.map +0 -1
  181. package/dist/infra/lib/embedding/__tests__/cosine.test.d.ts +0 -2
  182. package/dist/infra/lib/embedding/__tests__/cosine.test.d.ts.map +0 -1
  183. package/dist/infra/lib/embedding/__tests__/cosine.test.js +0 -73
  184. package/dist/infra/lib/embedding/__tests__/cosine.test.js.map +0 -1
  185. package/dist/infra/lib/evolution/__tests__/deprecation.test.d.ts +0 -2
  186. package/dist/infra/lib/evolution/__tests__/deprecation.test.d.ts.map +0 -1
  187. package/dist/infra/lib/evolution/__tests__/deprecation.test.js +0 -251
  188. package/dist/infra/lib/evolution/__tests__/deprecation.test.js.map +0 -1
  189. package/dist/infra/lib/evolution/__tests__/eval.test.d.ts +0 -2
  190. package/dist/infra/lib/evolution/__tests__/eval.test.d.ts.map +0 -1
  191. package/dist/infra/lib/evolution/__tests__/eval.test.js +0 -603
  192. package/dist/infra/lib/evolution/__tests__/eval.test.js.map +0 -1
  193. package/dist/infra/lib/evolution/__tests__/generation.test.d.ts +0 -2
  194. package/dist/infra/lib/evolution/__tests__/generation.test.d.ts.map +0 -1
  195. package/dist/infra/lib/evolution/__tests__/generation.test.js +0 -396
  196. package/dist/infra/lib/evolution/__tests__/generation.test.js.map +0 -1
  197. package/dist/infra/lib/evolution/__tests__/insight.test.d.ts +0 -2
  198. package/dist/infra/lib/evolution/__tests__/insight.test.d.ts.map +0 -1
  199. package/dist/infra/lib/evolution/__tests__/insight.test.js +0 -204
  200. package/dist/infra/lib/evolution/__tests__/insight.test.js.map +0 -1
  201. package/dist/infra/lib/evolution/__tests__/integration.test.d.ts +0 -2
  202. package/dist/infra/lib/evolution/__tests__/integration.test.d.ts.map +0 -1
  203. package/dist/infra/lib/evolution/__tests__/integration.test.js +0 -206
  204. package/dist/infra/lib/evolution/__tests__/integration.test.js.map +0 -1
  205. package/dist/infra/lib/evolution/__tests__/lifecycle.test.d.ts +0 -2
  206. package/dist/infra/lib/evolution/__tests__/lifecycle.test.d.ts.map +0 -1
  207. package/dist/infra/lib/evolution/__tests__/lifecycle.test.js +0 -350
  208. package/dist/infra/lib/evolution/__tests__/lifecycle.test.js.map +0 -1
  209. package/dist/infra/lib/evolution/__tests__/parity.test.d.ts +0 -2
  210. package/dist/infra/lib/evolution/__tests__/parity.test.d.ts.map +0 -1
  211. package/dist/infra/lib/evolution/__tests__/parity.test.js +0 -319
  212. package/dist/infra/lib/evolution/__tests__/parity.test.js.map +0 -1
  213. package/dist/infra/lib/llm/auth/AuthProfileManager.test.d.ts +0 -5
  214. package/dist/infra/lib/llm/auth/AuthProfileManager.test.d.ts.map +0 -1
  215. package/dist/infra/lib/llm/auth/AuthProfileManager.test.js +0 -168
  216. package/dist/infra/lib/llm/auth/AuthProfileManager.test.js.map +0 -1
  217. package/dist/infra/lib/llm/auth/TokenRefresher.test.d.ts +0 -2
  218. package/dist/infra/lib/llm/auth/TokenRefresher.test.d.ts.map +0 -1
  219. package/dist/infra/lib/llm/auth/TokenRefresher.test.js +0 -120
  220. package/dist/infra/lib/llm/auth/TokenRefresher.test.js.map +0 -1
  221. package/dist/infra/lib/llm/timeout.test.d.ts +0 -2
  222. package/dist/infra/lib/llm/timeout.test.d.ts.map +0 -1
  223. package/dist/infra/lib/llm/timeout.test.js +0 -50
  224. package/dist/infra/lib/llm/timeout.test.js.map +0 -1
  225. package/dist/infra/lib/llm-availability.test.d.ts +0 -2
  226. package/dist/infra/lib/llm-availability.test.d.ts.map +0 -1
  227. package/dist/infra/lib/llm-availability.test.js +0 -37
  228. package/dist/infra/lib/llm-availability.test.js.map +0 -1
  229. package/dist/infra/lib/memory/KnowledgeGraph.test.d.ts +0 -2
  230. package/dist/infra/lib/memory/KnowledgeGraph.test.d.ts.map +0 -1
  231. package/dist/infra/lib/memory/KnowledgeGraph.test.js +0 -189
  232. package/dist/infra/lib/memory/KnowledgeGraph.test.js.map +0 -1
  233. package/dist/infra/lib/memory/MemorySearch.test.d.ts +0 -2
  234. package/dist/infra/lib/memory/MemorySearch.test.d.ts.map +0 -1
  235. package/dist/infra/lib/memory/MemorySearch.test.js +0 -149
  236. package/dist/infra/lib/memory/MemorySearch.test.js.map +0 -1
  237. package/dist/infra/lib/memory/MemoryStorage.test.d.ts +0 -2
  238. package/dist/infra/lib/memory/MemoryStorage.test.d.ts.map +0 -1
  239. package/dist/infra/lib/memory/MemoryStorage.test.js +0 -198
  240. package/dist/infra/lib/memory/MemoryStorage.test.js.map +0 -1
  241. package/dist/infra/lib/memory/SessionRAGRetriever.test.d.ts +0 -2
  242. package/dist/infra/lib/memory/SessionRAGRetriever.test.d.ts.map +0 -1
  243. package/dist/infra/lib/memory/SessionRAGRetriever.test.js +0 -180
  244. package/dist/infra/lib/memory/SessionRAGRetriever.test.js.map +0 -1
  245. package/dist/infra/lib/memory/SessionRAGStore.test.d.ts +0 -2
  246. package/dist/infra/lib/memory/SessionRAGStore.test.d.ts.map +0 -1
  247. package/dist/infra/lib/memory/SessionRAGStore.test.js +0 -326
  248. package/dist/infra/lib/memory/SessionRAGStore.test.js.map +0 -1
  249. package/dist/infra/lib/memory/__tests__/InMemoryStorage.test.d.ts +0 -2
  250. package/dist/infra/lib/memory/__tests__/InMemoryStorage.test.d.ts.map +0 -1
  251. package/dist/infra/lib/memory/__tests__/InMemoryStorage.test.js +0 -114
  252. package/dist/infra/lib/memory/__tests__/InMemoryStorage.test.js.map +0 -1
  253. package/dist/infra/lib/memory/__tests__/ReflectionStore.test.d.ts +0 -2
  254. package/dist/infra/lib/memory/__tests__/ReflectionStore.test.d.ts.map +0 -1
  255. package/dist/infra/lib/memory/__tests__/ReflectionStore.test.js +0 -196
  256. package/dist/infra/lib/memory/__tests__/ReflectionStore.test.js.map +0 -1
  257. package/dist/infra/lib/memory/index.test.d.ts +0 -2
  258. package/dist/infra/lib/memory/index.test.d.ts.map +0 -1
  259. package/dist/infra/lib/memory/index.test.js +0 -23
  260. package/dist/infra/lib/memory/index.test.js.map +0 -1
  261. package/dist/infra/lib/telemetry/SkillTelemetry.test.d.ts +0 -2
  262. package/dist/infra/lib/telemetry/SkillTelemetry.test.d.ts.map +0 -1
  263. package/dist/infra/lib/telemetry/SkillTelemetry.test.js +0 -124
  264. package/dist/infra/lib/telemetry/SkillTelemetry.test.js.map +0 -1
  265. package/dist/infra/lib/ui-ux/Bm25Engine.test.d.ts +0 -2
  266. package/dist/infra/lib/ui-ux/Bm25Engine.test.d.ts.map +0 -1
  267. package/dist/infra/lib/ui-ux/Bm25Engine.test.js +0 -159
  268. package/dist/infra/lib/ui-ux/Bm25Engine.test.js.map +0 -1
  269. package/dist/infra/lib/ui-ux/CsvDataLoader.test.d.ts +0 -2
  270. package/dist/infra/lib/ui-ux/CsvDataLoader.test.d.ts.map +0 -1
  271. package/dist/infra/lib/ui-ux/CsvDataLoader.test.js +0 -141
  272. package/dist/infra/lib/ui-ux/CsvDataLoader.test.js.map +0 -1
  273. package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.d.ts +0 -2
  274. package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.d.ts.map +0 -1
  275. package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.js +0 -370
  276. package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.js.map +0 -1
  277. package/dist/infra/lib/ui-ux/SearchService.test.d.ts +0 -2
  278. package/dist/infra/lib/ui-ux/SearchService.test.d.ts.map +0 -1
  279. package/dist/infra/lib/ui-ux/SearchService.test.js +0 -215
  280. package/dist/infra/lib/ui-ux/SearchService.test.js.map +0 -1
  281. package/dist/test-helpers/index.d.ts +0 -36
  282. package/dist/test-helpers/index.d.ts.map +0 -1
  283. package/dist/test-helpers/index.js +0 -85
  284. package/dist/test-helpers/index.js.map +0 -1
  285. package/dist/test-helpers/index.test.d.ts +0 -2
  286. package/dist/test-helpers/index.test.d.ts.map +0 -1
  287. package/dist/test-helpers/index.test.js +0 -92
  288. package/dist/test-helpers/index.test.js.map +0 -1
  289. package/dist/tests/curated-release-notes.test.d.ts +0 -2
  290. package/dist/tests/curated-release-notes.test.d.ts.map +0 -1
  291. package/dist/tests/curated-release-notes.test.js +0 -160
  292. package/dist/tests/curated-release-notes.test.js.map +0 -1
  293. package/dist/tools/convention/analyzeComplexity.test.d.ts +0 -2
  294. package/dist/tools/convention/analyzeComplexity.test.d.ts.map +0 -1
  295. package/dist/tools/convention/analyzeComplexity.test.js +0 -207
  296. package/dist/tools/convention/analyzeComplexity.test.js.map +0 -1
  297. package/dist/tools/convention/validateCodeQuality.test.d.ts +0 -2
  298. package/dist/tools/convention/validateCodeQuality.test.d.ts.map +0 -1
  299. package/dist/tools/convention/validateCodeQuality.test.js +0 -230
  300. package/dist/tools/convention/validateCodeQuality.test.js.map +0 -1
  301. package/dist/tools/loop/validateLoopDefinition.test.d.ts +0 -14
  302. package/dist/tools/loop/validateLoopDefinition.test.d.ts.map +0 -1
  303. package/dist/tools/loop/validateLoopDefinition.test.js +0 -229
  304. package/dist/tools/loop/validateLoopDefinition.test.js.map +0 -1
  305. package/dist/tools/spec/executionPacket.test.d.ts +0 -2
  306. package/dist/tools/spec/executionPacket.test.d.ts.map +0 -1
  307. package/dist/tools/spec/executionPacket.test.js +0 -374
  308. package/dist/tools/spec/executionPacket.test.js.map +0 -1
  309. package/dist/tools/spec/prdParser.test.d.ts +0 -6
  310. package/dist/tools/spec/prdParser.test.d.ts.map +0 -1
  311. package/dist/tools/spec/prdParser.test.js +0 -332
  312. package/dist/tools/spec/prdParser.test.js.map +0 -1
  313. package/dist/tools/spec/specGenerator.test.d.ts +0 -2
  314. package/dist/tools/spec/specGenerator.test.d.ts.map +0 -1
  315. package/dist/tools/spec/specGenerator.test.js +0 -130
  316. package/dist/tools/spec/specGenerator.test.js.map +0 -1
  317. package/dist/tools/spec/traceabilityMatrix.path-resolution.test.d.ts +0 -10
  318. package/dist/tools/spec/traceabilityMatrix.path-resolution.test.d.ts.map +0 -1
  319. package/dist/tools/spec/traceabilityMatrix.path-resolution.test.js +0 -120
  320. package/dist/tools/spec/traceabilityMatrix.path-resolution.test.js.map +0 -1
  321. package/dist/tools/spec/traceabilityMatrix.test.d.ts +0 -6
  322. package/dist/tools/spec/traceabilityMatrix.test.d.ts.map +0 -1
  323. package/dist/tools/spec/traceabilityMatrix.test.js +0 -359
  324. package/dist/tools/spec/traceabilityMatrix.test.js.map +0 -1
  325. package/hooks/scripts/__tests__/.vibe/command-log.txt +0 -3
  326. package/hooks/scripts/__tests__/anchor-inbox.test.js +0 -119
  327. package/hooks/scripts/__tests__/auto-test-debounce.test.js +0 -145
  328. package/hooks/scripts/__tests__/clone-behaviors.test.js +0 -152
  329. package/hooks/scripts/__tests__/clone-merge-responsive.test.js +0 -106
  330. package/hooks/scripts/__tests__/code-check-detectors.test.js +0 -213
  331. package/hooks/scripts/__tests__/code-check-false-positive.test.js +0 -74
  332. package/hooks/scripts/__tests__/code-check-memory-write.test.js +0 -81
  333. package/hooks/scripts/__tests__/codex-hook-adapter.test.js +0 -64
  334. package/hooks/scripts/__tests__/curation-index.test.js +0 -157
  335. package/hooks/scripts/__tests__/dispatcher-inprocess.test.js +0 -99
  336. package/hooks/scripts/__tests__/figma-extract.test.js +0 -338
  337. package/hooks/scripts/__tests__/fixtures/seq-harness.js +0 -13
  338. package/hooks/scripts/__tests__/fixtures/seq-step.js +0 -22
  339. package/hooks/scripts/__tests__/hook-payload.test.js +0 -29
  340. package/hooks/scripts/__tests__/llm-orchestrate-antigravity.test.js +0 -66
  341. package/hooks/scripts/__tests__/loop-ledger.test.js +0 -321
  342. package/hooks/scripts/__tests__/post-edit-dispatcher.test.js +0 -139
  343. package/hooks/scripts/__tests__/pre-tool-guard.test.js +0 -523
  344. package/hooks/scripts/__tests__/recipe-extractor.test.js +0 -244
  345. package/hooks/scripts/__tests__/run-ledger-verify-required.test.js +0 -151
  346. package/hooks/scripts/__tests__/run-ledger.test.js +0 -481
  347. package/hooks/scripts/__tests__/scope-from-spec.test.js +0 -215
  348. package/hooks/scripts/__tests__/sentinel-guard.test.js +0 -263
  349. package/hooks/scripts/__tests__/step-counter.test.js +0 -459
  350. package/hooks/scripts/__tests__/stop-dispatcher-sequential.test.js +0 -74
  351. package/hooks/scripts/__tests__/utils-npm-root.test.js +0 -99
@@ -1,321 +0,0 @@
1
- /**
2
- * loop-ledger 라이브러리 + CLI 테스트
3
- *
4
- * 커버리지:
5
- * - appendLoopEvent round-trip
6
- * - isStuck: 2회 연속 동일 hash → true
7
- * - isStuck: 다른 hash → false
8
- * - isStuck: 이력 없음 → false
9
- * - fail-open: 손상된 jsonl 줄 무시
10
- * - hashDiscoverOutput: 공백 정규화
11
- * - CLI: start / end / check-stuck 서브커맨드
12
- */
13
-
14
- import { describe, it, expect, beforeEach, afterEach } from 'vitest';
15
- import fs from 'fs';
16
- import path from 'path';
17
- import os from 'os';
18
- import { spawnSync } from 'child_process';
19
- import { fileURLToPath } from 'url';
20
-
21
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
22
-
23
- let tmpDir;
24
- beforeEach(() => {
25
- tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'vibe-loop-ledger-test-'));
26
- });
27
- afterEach(() => {
28
- try { fs.rmSync(tmpDir, { recursive: true, force: true }); } catch { /* ignore */ }
29
- });
30
-
31
- async function importLedger() {
32
- const p = path.resolve(__dirname, '..', 'lib', 'loop-ledger.js');
33
- return import(p);
34
- }
35
-
36
- const CLI = path.resolve(__dirname, '..', 'loop-ledger.js');
37
-
38
- function historyPath(dir) {
39
- return path.join(dir, '.vibe', 'metrics', 'loop-history.jsonl');
40
- }
41
-
42
- // ─── appendLoopEvent round-trip ───────────────────────────────────────
43
-
44
- describe('loop-ledger: appendLoopEvent round-trip', () => {
45
- it('start 이벤트를 append 하면 jsonl 파일에 기록된다', async () => {
46
- const { appendLoopEvent } = await importLedger();
47
- appendLoopEvent(tmpDir, { loop: 'nightly', event: 'start' });
48
-
49
- const p = historyPath(tmpDir);
50
- expect(fs.existsSync(p)).toBe(true);
51
- const line = fs.readFileSync(p, 'utf-8').trim();
52
- const obj = JSON.parse(line);
53
- expect(obj.loop).toBe('nightly');
54
- expect(obj.event).toBe('start');
55
- expect(obj.ts).toBeDefined();
56
- });
57
-
58
- it('end 이벤트에 result, summary, discoverHash가 포함된다', async () => {
59
- const { appendLoopEvent } = await importLedger();
60
- appendLoopEvent(tmpDir, {
61
- loop: 'nightly',
62
- event: 'end',
63
- result: 'ok',
64
- summary: '3 items processed',
65
- discoverHash: 'abc123',
66
- });
67
-
68
- const p = historyPath(tmpDir);
69
- const line = fs.readFileSync(p, 'utf-8').trim();
70
- const obj = JSON.parse(line);
71
- expect(obj.event).toBe('end');
72
- expect(obj.result).toBe('ok');
73
- expect(obj.summary).toBe('3 items processed');
74
- expect(obj.discoverHash).toBe('abc123');
75
- });
76
-
77
- it('여러 이벤트가 순서대로 append 된다', async () => {
78
- const { appendLoopEvent } = await importLedger();
79
- appendLoopEvent(tmpDir, { loop: 'loop-a', event: 'start' });
80
- appendLoopEvent(tmpDir, { loop: 'loop-a', event: 'end', result: 'ok' });
81
- appendLoopEvent(tmpDir, { loop: 'loop-b', event: 'start' });
82
-
83
- const p = historyPath(tmpDir);
84
- const lines = fs.readFileSync(p, 'utf-8').trim().split('\n');
85
- expect(lines).toHaveLength(3);
86
- expect(JSON.parse(lines[0]).loop).toBe('loop-a');
87
- expect(JSON.parse(lines[1]).event).toBe('end');
88
- expect(JSON.parse(lines[2]).loop).toBe('loop-b');
89
- });
90
-
91
- it('appendLoopEvent는 true를 반환한다', async () => {
92
- const { appendLoopEvent } = await importLedger();
93
- const result = appendLoopEvent(tmpDir, { loop: 'x', event: 'start' });
94
- expect(result).toBe(true);
95
- });
96
- });
97
-
98
- // ─── isStuck ──────────────────────────────────────────────────────────
99
-
100
- describe('loop-ledger: isStuck', () => {
101
- it('이력 없으면 false', async () => {
102
- const { isStuck } = await importLedger();
103
- expect(isStuck(tmpDir, 'nightly', 'hash-abc')).toBe(false);
104
- });
105
-
106
- it('직전 discover 이벤트와 동일 hash → true (2회 연속 성립)', async () => {
107
- const { appendLoopEvent, isStuck } = await importLedger();
108
- // 이전 반복의 discover 이벤트 (같은 hash)
109
- appendLoopEvent(tmpDir, {
110
- loop: 'nightly',
111
- event: 'discover',
112
- discoverHash: 'hash-same',
113
- });
114
- // 신규 반복이 같은 hash를 갖고 오면 stuck
115
- expect(isStuck(tmpDir, 'nightly', 'hash-same')).toBe(true);
116
- });
117
-
118
- it('직전 discover 이벤트와 다른 hash → false', async () => {
119
- const { appendLoopEvent, isStuck } = await importLedger();
120
- appendLoopEvent(tmpDir, {
121
- loop: 'nightly',
122
- event: 'discover',
123
- discoverHash: 'hash-old',
124
- });
125
- expect(isStuck(tmpDir, 'nightly', 'hash-new')).toBe(false);
126
- });
127
-
128
- it('end 이벤트의 hash는 비교 대상이 아님 (discover만 본다)', async () => {
129
- const { appendLoopEvent, isStuck } = await importLedger();
130
- appendLoopEvent(tmpDir, {
131
- loop: 'nightly',
132
- event: 'end',
133
- result: 'ok',
134
- discoverHash: 'hash-same',
135
- });
136
- expect(isStuck(tmpDir, 'nightly', 'hash-same')).toBe(false);
137
- });
138
-
139
- it('다른 루프 이름의 이벤트는 영향 안 줌', async () => {
140
- const { appendLoopEvent, isStuck } = await importLedger();
141
- appendLoopEvent(tmpDir, {
142
- loop: 'other-loop',
143
- event: 'discover',
144
- discoverHash: 'hash-same',
145
- });
146
- // 'nightly' 에 대한 이력 없음 → false
147
- expect(isStuck(tmpDir, 'nightly', 'hash-same')).toBe(false);
148
- });
149
-
150
- it('start 이벤트만 있고 discover 없으면 false', async () => {
151
- const { appendLoopEvent, isStuck } = await importLedger();
152
- appendLoopEvent(tmpDir, { loop: 'nightly', event: 'start' });
153
- expect(isStuck(tmpDir, 'nightly', 'hash-abc')).toBe(false);
154
- });
155
-
156
- it('discoverHash 가 빈 문자열이면 false', async () => {
157
- const { appendLoopEvent, isStuck } = await importLedger();
158
- appendLoopEvent(tmpDir, {
159
- loop: 'nightly',
160
- event: 'discover',
161
- discoverHash: '',
162
- });
163
- expect(isStuck(tmpDir, 'nightly', '')).toBe(false);
164
- });
165
- });
166
-
167
- // ─── fail-open: 손상된 jsonl 줄 ──────────────────────────────────────
168
-
169
- describe('loop-ledger: fail-open on corrupt jsonl', () => {
170
- it('손상된 줄이 있어도 isStuck이 충돌하지 않고 false 반환', async () => {
171
- const { appendLoopEvent, isStuck } = await importLedger();
172
-
173
- // 정상 줄 + 손상 줄 + 정상 줄 혼합
174
- const p = historyPath(tmpDir);
175
- fs.mkdirSync(path.dirname(p), { recursive: true });
176
- fs.writeFileSync(
177
- p,
178
- [
179
- JSON.stringify({ ts: '2026-01-01T00:00:00.000Z', loop: 'nightly', event: 'discover', discoverHash: 'abc' }),
180
- 'CORRUPTED LINE {{{',
181
- JSON.stringify({ ts: '2026-01-01T01:00:00.000Z', loop: 'nightly', event: 'discover', discoverHash: 'xyz' }),
182
- ].join('\n') + '\n',
183
- 'utf-8'
184
- );
185
-
186
- // 손상 줄은 건너뛰고, 가장 최근 discover 이벤트(최신)의 hash는 'xyz'
187
- expect(isStuck(tmpDir, 'nightly', 'xyz')).toBe(true);
188
- expect(isStuck(tmpDir, 'nightly', 'abc')).toBe(false);
189
- });
190
-
191
- it('appendLoopEvent: 전체 파일이 corrupt 여도 추가 후 정상 동작', async () => {
192
- const { appendLoopEvent } = await importLedger();
193
- const p = historyPath(tmpDir);
194
- fs.mkdirSync(path.dirname(p), { recursive: true });
195
- fs.writeFileSync(p, 'NOT JSON\n', 'utf-8');
196
-
197
- const ok = appendLoopEvent(tmpDir, { loop: 'x', event: 'start' });
198
- expect(ok).toBe(true);
199
- const lines = fs.readFileSync(p, 'utf-8').split('\n').filter(Boolean);
200
- // 손상 줄 + 새로 추가된 정상 줄
201
- expect(lines.length).toBeGreaterThanOrEqual(2);
202
- const last = JSON.parse(lines[lines.length - 1]);
203
- expect(last.event).toBe('start');
204
- });
205
- });
206
-
207
- // ─── hashDiscoverOutput ───────────────────────────────────────────────
208
-
209
- describe('loop-ledger: hashDiscoverOutput', () => {
210
- it('동일 텍스트는 동일 해시를 반환한다', async () => {
211
- const { hashDiscoverOutput } = await importLedger();
212
- const h1 = hashDiscoverOutput('hello world');
213
- const h2 = hashDiscoverOutput('hello world');
214
- expect(h1).toBe(h2);
215
- });
216
-
217
- it('공백 정규화: 여분 공백/줄바꿈이 달라도 동일 해시', async () => {
218
- const { hashDiscoverOutput } = await importLedger();
219
- const h1 = hashDiscoverOutput('item a\nitem b');
220
- const h2 = hashDiscoverOutput('item a item b');
221
- const h3 = hashDiscoverOutput(' item a item b ');
222
- expect(h1).toBe(h2);
223
- expect(h2).toBe(h3);
224
- });
225
-
226
- it('다른 텍스트는 다른 해시', async () => {
227
- const { hashDiscoverOutput } = await importLedger();
228
- expect(hashDiscoverOutput('abc')).not.toBe(hashDiscoverOutput('xyz'));
229
- });
230
-
231
- it('sha256 hex 64자 반환', async () => {
232
- const { hashDiscoverOutput } = await importLedger();
233
- expect(hashDiscoverOutput('test')).toMatch(/^[0-9a-f]{64}$/);
234
- });
235
- });
236
-
237
- // ─── CLI: start / end / check-stuck ─────────────────────────────────
238
-
239
- describe('loop-ledger CLI', () => {
240
- it('start → exit 0, 확인 메시지 출력, jsonl 생성', () => {
241
- const result = spawnSync('node', [CLI, 'start', 'nightly'], {
242
- encoding: 'utf-8',
243
- timeout: 5000,
244
- env: { ...process.env, CLAUDE_PROJECT_DIR: tmpDir },
245
- });
246
- expect(result.status).toBe(0);
247
- expect(result.stdout).toContain('start recorded');
248
- expect(result.stdout).toContain('nightly');
249
- expect(fs.existsSync(historyPath(tmpDir))).toBe(true);
250
- });
251
-
252
- it('end → exit 0, jsonl에 end 이벤트 기록', () => {
253
- const result = spawnSync('node', [CLI, 'end', 'nightly', 'ok', 'summary text'], {
254
- encoding: 'utf-8',
255
- timeout: 5000,
256
- env: { ...process.env, CLAUDE_PROJECT_DIR: tmpDir },
257
- });
258
- expect(result.status).toBe(0);
259
- expect(result.stdout).toContain('end recorded');
260
-
261
- const line = fs.readFileSync(historyPath(tmpDir), 'utf-8').trim();
262
- const obj = JSON.parse(line);
263
- expect(obj.event).toBe('end');
264
- expect(obj.result).toBe('ok');
265
- expect(obj.summary).toBe('summary text');
266
- });
267
-
268
- it('check-stuck: 직전 discover hash와 동일 → stdout "stuck"', async () => {
269
- const { appendLoopEvent } = await importLedger();
270
- appendLoopEvent(tmpDir, {
271
- loop: 'nightly',
272
- event: 'discover',
273
- discoverHash: 'deadbeef',
274
- });
275
-
276
- const result = spawnSync('node', [CLI, 'check-stuck', 'nightly', 'deadbeef'], {
277
- encoding: 'utf-8',
278
- timeout: 5000,
279
- env: { ...process.env, CLAUDE_PROJECT_DIR: tmpDir },
280
- });
281
- expect(result.status).toBe(0);
282
- expect(result.stdout.trim()).toBe('stuck');
283
- });
284
-
285
- it('check-stuck: 새 hash → stdout "ok"', async () => {
286
- const { appendLoopEvent } = await importLedger();
287
- appendLoopEvent(tmpDir, {
288
- loop: 'nightly',
289
- event: 'end',
290
- result: 'ok',
291
- discoverHash: 'old-hash',
292
- });
293
-
294
- const result = spawnSync('node', [CLI, 'check-stuck', 'nightly', 'new-hash'], {
295
- encoding: 'utf-8',
296
- timeout: 5000,
297
- env: { ...process.env, CLAUDE_PROJECT_DIR: tmpDir },
298
- });
299
- expect(result.status).toBe(0);
300
- expect(result.stdout.trim()).toBe('ok');
301
- });
302
-
303
- it('check-stuck: 이력 없으면 "ok"', () => {
304
- const result = spawnSync('node', [CLI, 'check-stuck', 'nightly', 'anyhash'], {
305
- encoding: 'utf-8',
306
- timeout: 5000,
307
- env: { ...process.env, CLAUDE_PROJECT_DIR: tmpDir },
308
- });
309
- expect(result.status).toBe(0);
310
- expect(result.stdout.trim()).toBe('ok');
311
- });
312
-
313
- it('인수 없이 실행해도 exit 0 (fail-open)', () => {
314
- const result = spawnSync('node', [CLI], {
315
- encoding: 'utf-8',
316
- timeout: 5000,
317
- env: { ...process.env, CLAUDE_PROJECT_DIR: tmpDir },
318
- });
319
- expect(result.status).toBe(0);
320
- });
321
- });
@@ -1,139 +0,0 @@
1
- /**
2
- * post-edit-dispatcher 계약 테스트
3
- *
4
- * 검증 대상:
5
- * - findings 있음 → stdout에 JSON hookSpecificOutput 출력, exit 0
6
- * - findings 없음 → stdout 없음, exit 0
7
- * - 손상된 stdin에도 exit 0 (fail-open)
8
- * - additionalContext 형식 정확성
9
- */
10
- import { describe, it, expect } from 'vitest';
11
- import { spawnSync } from 'child_process';
12
- import path from 'path';
13
- import { fileURLToPath } from 'url';
14
- import fs from 'fs';
15
- import os from 'os';
16
-
17
- const __dirname = path.dirname(fileURLToPath(import.meta.url));
18
- const DISPATCHER = path.resolve(__dirname, '..', 'post-edit-dispatcher.js');
19
-
20
- /**
21
- * 디스패처를 stdin 페이로드와 함께 실행.
22
- * @param {object|string} payload
23
- * @param {string} [projectDir]
24
- * @returns {{ stdout: string, stderr: string, exitCode: number }}
25
- */
26
- function runDispatcher(payload, projectDir) {
27
- const input = typeof payload === 'string' ? payload : JSON.stringify(payload);
28
- const env = {
29
- ...process.env,
30
- CLAUDE_PROJECT_DIR: projectDir || __dirname,
31
- };
32
- const result = spawnSync('node', [DISPATCHER], {
33
- input,
34
- encoding: 'utf-8',
35
- timeout: 30000,
36
- env,
37
- });
38
- return {
39
- stdout: (result.stdout || '').trim(),
40
- stderr: (result.stderr || '').trim(),
41
- exitCode: result.status ?? 0,
42
- };
43
- }
44
-
45
- describe('post-edit-dispatcher: 출력 형식', () => {
46
- it('빈 페이로드 → exit 0, stdout 없음 (findings 없음)', () => {
47
- const { stdout, exitCode } = runDispatcher({});
48
- expect(exitCode).toBe(0);
49
- expect(stdout).toBe('');
50
- });
51
-
52
- it('손상된 stdin(비JSON) → exit 0 (fail-open)', () => {
53
- const { exitCode } = runDispatcher('not-json');
54
- expect(exitCode).toBe(0);
55
- });
56
-
57
- it('존재하지 않는 파일 경로 → exit 0', () => {
58
- const { exitCode } = runDispatcher({
59
- tool_name: 'Edit',
60
- tool_input: { file_path: '/nonexistent/__vibe_test__.xyz' },
61
- });
62
- expect(exitCode).toBe(0);
63
- });
64
- });
65
-
66
- describe('post-edit-dispatcher: JSON hookSpecificOutput 형식', () => {
67
- let tmpDir;
68
- let tsFile;
69
-
70
- beforeEach(() => {
71
- tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'vibe-dispatcher-test-'));
72
- tsFile = path.join(tmpDir, 'test-file.ts');
73
- });
74
-
75
- afterEach(() => {
76
- try { fs.rmSync(tmpDir, { recursive: true, force: true }); } catch { /* ignore */ }
77
- });
78
-
79
- it('P1 이슈가 있는 TS 파일 → JSON hookSpecificOutput 출력', () => {
80
- // any 타입이 포함된 TS 파일 생성
81
- fs.writeFileSync(tsFile, 'function foo(x: any): any { return x; }\n', 'utf-8');
82
-
83
- const { stdout, exitCode } = runDispatcher({
84
- tool_name: 'Edit',
85
- tool_input: { file_path: tsFile },
86
- }, tmpDir);
87
-
88
- expect(exitCode).toBe(0);
89
- if (stdout) {
90
- // stdout이 있으면 JSON hookSpecificOutput 형식이어야 함
91
- let parsed;
92
- try {
93
- parsed = JSON.parse(stdout);
94
- } catch {
95
- // plain text일 수도 있음 (code-check 모듈 로드 실패 시)
96
- return;
97
- }
98
- if (parsed.hookSpecificOutput) {
99
- expect(parsed.hookSpecificOutput.hookEventName).toBe('PostToolUse');
100
- expect(typeof parsed.hookSpecificOutput.additionalContext).toBe('string');
101
- expect(parsed.hookSpecificOutput.additionalContext.length).toBeGreaterThan(0);
102
- }
103
- }
104
- });
105
-
106
- it('findings 있으면 additionalContext에 요약 포함', () => {
107
- fs.writeFileSync(tsFile, 'const x: any = 1;\n', 'utf-8');
108
-
109
- const { stdout, exitCode } = runDispatcher({
110
- tool_name: 'Edit',
111
- tool_input: { file_path: tsFile },
112
- }, tmpDir);
113
-
114
- expect(exitCode).toBe(0);
115
- if (stdout) {
116
- try {
117
- const parsed = JSON.parse(stdout);
118
- if (parsed.hookSpecificOutput?.additionalContext) {
119
- // any 탐지 관련 내용이 포함되어야 함
120
- expect(parsed.hookSpecificOutput.additionalContext).toContain('any');
121
- }
122
- } catch { /* JSON 아닐 수 있음 */ }
123
- }
124
- });
125
- });
126
-
127
- describe('post-edit-dispatcher: additionalContext JSON 계약', () => {
128
- it('JSON 구조가 올바른 hookSpecificOutput 스키마를 따름', () => {
129
- // 직접 JSON 생성해 스키마 검증
130
- const output = {
131
- hookSpecificOutput: {
132
- hookEventName: 'PostToolUse',
133
- additionalContext: 'P1 any-type line 1: x: any',
134
- },
135
- };
136
- expect(output.hookSpecificOutput.hookEventName).toBe('PostToolUse');
137
- expect(typeof output.hookSpecificOutput.additionalContext).toBe('string');
138
- });
139
- });