@backendkit-labs/agent-coding 0.28.5 → 0.30.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 (466) hide show
  1. package/README.md +4 -0
  2. package/dist/__tests__/cli-baseline.test.d.ts +2 -0
  3. package/dist/__tests__/cli-baseline.test.d.ts.map +1 -0
  4. package/dist/__tests__/cli-baseline.test.js +114 -0
  5. package/dist/__tests__/cli-baseline.test.js.map +1 -0
  6. package/dist/__tests__/context-hooks.test.d.ts +2 -0
  7. package/dist/__tests__/context-hooks.test.d.ts.map +1 -0
  8. package/dist/__tests__/context-hooks.test.js +21 -0
  9. package/dist/__tests__/context-hooks.test.js.map +1 -0
  10. package/dist/__tests__/createCodingEngine.forwarding.test.js +2 -1
  11. package/dist/__tests__/createCodingEngine.forwarding.test.js.map +1 -1
  12. package/dist/__tests__/sandbox.test.js +1 -1
  13. package/dist/__tests__/sandbox.test.js.map +1 -1
  14. package/dist/__tests__/workspace-trust.test.js +7 -5
  15. package/dist/__tests__/workspace-trust.test.js.map +1 -1
  16. package/dist/agents/AgentLoader.d.ts.map +1 -1
  17. package/dist/agents/AgentLoader.js +2 -1
  18. package/dist/agents/AgentLoader.js.map +1 -1
  19. package/dist/cli/agent-discovery/AgentPackageLoader.d.ts +22 -0
  20. package/dist/cli/agent-discovery/AgentPackageLoader.d.ts.map +1 -0
  21. package/dist/cli/agent-discovery/AgentPackageLoader.js +100 -0
  22. package/dist/cli/agent-discovery/AgentPackageLoader.js.map +1 -0
  23. package/dist/cli/agent-discovery/RemoteAgentRegistry.d.ts +31 -0
  24. package/dist/cli/agent-discovery/RemoteAgentRegistry.d.ts.map +1 -0
  25. package/dist/cli/agent-discovery/RemoteAgentRegistry.js +106 -0
  26. package/dist/cli/agent-discovery/RemoteAgentRegistry.js.map +1 -0
  27. package/dist/cli/agent-discovery/__tests__/RemoteAgentRegistry.ssrf.test.d.ts +2 -0
  28. package/dist/cli/agent-discovery/__tests__/RemoteAgentRegistry.ssrf.test.d.ts.map +1 -0
  29. package/dist/cli/agent-discovery/__tests__/RemoteAgentRegistry.ssrf.test.js +34 -0
  30. package/dist/cli/agent-discovery/__tests__/RemoteAgentRegistry.ssrf.test.js.map +1 -0
  31. package/dist/cli/agent-discovery/__tests__/discoverAgents.test.d.ts +2 -0
  32. package/dist/cli/agent-discovery/__tests__/discoverAgents.test.d.ts.map +1 -0
  33. package/dist/cli/agent-discovery/__tests__/discoverAgents.test.js +147 -0
  34. package/dist/cli/agent-discovery/__tests__/discoverAgents.test.js.map +1 -0
  35. package/dist/cli/agent-discovery/__tests__/download-guard.test.d.ts +2 -0
  36. package/dist/cli/agent-discovery/__tests__/download-guard.test.d.ts.map +1 -0
  37. package/dist/cli/agent-discovery/__tests__/download-guard.test.js +47 -0
  38. package/dist/cli/agent-discovery/__tests__/download-guard.test.js.map +1 -0
  39. package/dist/cli/agent-discovery/discoverAgents.d.ts +21 -0
  40. package/dist/cli/agent-discovery/discoverAgents.d.ts.map +1 -0
  41. package/dist/cli/agent-discovery/discoverAgents.js +74 -0
  42. package/dist/cli/agent-discovery/discoverAgents.js.map +1 -0
  43. package/dist/cli/agent-discovery/download-guard.d.ts +20 -0
  44. package/dist/cli/agent-discovery/download-guard.d.ts.map +1 -0
  45. package/dist/cli/agent-discovery/download-guard.js +84 -0
  46. package/dist/cli/agent-discovery/download-guard.js.map +1 -0
  47. package/dist/cli/agent-discovery/index.d.ts +5 -0
  48. package/dist/cli/agent-discovery/index.d.ts.map +1 -0
  49. package/dist/cli/agent-discovery/index.js +12 -0
  50. package/dist/cli/agent-discovery/index.js.map +1 -0
  51. package/dist/cli/agent-discovery/types.d.ts +48 -0
  52. package/dist/cli/agent-discovery/types.d.ts.map +1 -0
  53. package/dist/cli/agent-discovery/types.js +3 -0
  54. package/dist/cli/agent-discovery/types.js.map +1 -0
  55. package/dist/cli/bootstrap/GlobalSeed.d.ts +46 -0
  56. package/dist/cli/bootstrap/GlobalSeed.d.ts.map +1 -0
  57. package/dist/cli/bootstrap/GlobalSeed.js +285 -0
  58. package/dist/cli/bootstrap/GlobalSeed.js.map +1 -0
  59. package/dist/cli/bootstrap/config.d.ts +24 -0
  60. package/dist/cli/bootstrap/config.d.ts.map +1 -0
  61. package/dist/cli/bootstrap/config.js +71 -0
  62. package/dist/cli/bootstrap/config.js.map +1 -0
  63. package/dist/cli/checkpoint/index.d.ts +17 -0
  64. package/dist/cli/checkpoint/index.d.ts.map +1 -0
  65. package/dist/cli/checkpoint/index.js +207 -0
  66. package/dist/cli/checkpoint/index.js.map +1 -0
  67. package/dist/cli/commands/builtin.d.ts +7 -0
  68. package/dist/cli/commands/builtin.d.ts.map +1 -0
  69. package/dist/cli/commands/builtin.js +962 -0
  70. package/dist/cli/commands/builtin.js.map +1 -0
  71. package/dist/cli/context/__tests__/formatPipeline.test.d.ts +2 -0
  72. package/dist/cli/context/__tests__/formatPipeline.test.d.ts.map +1 -0
  73. package/dist/cli/context/__tests__/formatPipeline.test.js +25 -0
  74. package/dist/cli/context/__tests__/formatPipeline.test.js.map +1 -0
  75. package/dist/cli/context/index.d.ts +8 -0
  76. package/dist/cli/context/index.d.ts.map +1 -0
  77. package/dist/cli/context/index.js +8 -0
  78. package/dist/cli/context/index.js.map +1 -0
  79. package/dist/cli/context/pipeline.d.ts +46 -0
  80. package/dist/cli/context/pipeline.d.ts.map +1 -0
  81. package/dist/cli/context/pipeline.js +112 -0
  82. package/dist/cli/context/pipeline.js.map +1 -0
  83. package/dist/cli/context/stages/stage-instructions.d.ts +12 -0
  84. package/dist/cli/context/stages/stage-instructions.d.ts.map +1 -0
  85. package/dist/cli/context/stages/stage-instructions.js +76 -0
  86. package/dist/cli/context/stages/stage-instructions.js.map +1 -0
  87. package/dist/cli/context/stages/stage-lessons.d.ts +13 -0
  88. package/dist/cli/context/stages/stage-lessons.d.ts.map +1 -0
  89. package/dist/cli/context/stages/stage-lessons.js +83 -0
  90. package/dist/cli/context/stages/stage-lessons.js.map +1 -0
  91. package/dist/cli/context/stages/stage-manifest.d.ts +11 -0
  92. package/dist/cli/context/stages/stage-manifest.d.ts.map +1 -0
  93. package/dist/cli/context/stages/stage-manifest.js +62 -0
  94. package/dist/cli/context/stages/stage-manifest.js.map +1 -0
  95. package/dist/cli/context/stages/stage-project.d.ts +10 -0
  96. package/dist/cli/context/stages/stage-project.d.ts.map +1 -0
  97. package/dist/cli/context/stages/stage-project.js +55 -0
  98. package/dist/cli/context/stages/stage-project.js.map +1 -0
  99. package/dist/cli/context/stages/stage-session.d.ts +12 -0
  100. package/dist/cli/context/stages/stage-session.d.ts.map +1 -0
  101. package/dist/cli/context/stages/stage-session.js +69 -0
  102. package/dist/cli/context/stages/stage-session.js.map +1 -0
  103. package/dist/cli/file-sources.d.ts +17 -0
  104. package/dist/cli/file-sources.d.ts.map +1 -0
  105. package/dist/cli/file-sources.js +42 -0
  106. package/dist/cli/file-sources.js.map +1 -0
  107. package/dist/cli/index.d.ts +26 -0
  108. package/dist/cli/index.d.ts.map +1 -0
  109. package/dist/cli/index.js +55 -0
  110. package/dist/cli/index.js.map +1 -0
  111. package/dist/cli/skills/__tests__/SkillLoader.test.d.ts +2 -0
  112. package/dist/cli/skills/__tests__/SkillLoader.test.d.ts.map +1 -0
  113. package/dist/cli/skills/__tests__/SkillLoader.test.js +285 -0
  114. package/dist/cli/skills/__tests__/SkillLoader.test.js.map +1 -0
  115. package/dist/cli/skills/__tests__/SkillManager.safety.test.d.ts +2 -0
  116. package/dist/cli/skills/__tests__/SkillManager.safety.test.d.ts.map +1 -0
  117. package/dist/cli/skills/__tests__/SkillManager.safety.test.js +87 -0
  118. package/dist/cli/skills/__tests__/SkillManager.safety.test.js.map +1 -0
  119. package/dist/cli/skills/__tests__/stack.test.d.ts +2 -0
  120. package/dist/cli/skills/__tests__/stack.test.d.ts.map +1 -0
  121. package/dist/cli/skills/__tests__/stack.test.js +81 -0
  122. package/dist/cli/skills/__tests__/stack.test.js.map +1 -0
  123. package/dist/cli/skills/loader.d.ts +42 -0
  124. package/dist/cli/skills/loader.d.ts.map +1 -0
  125. package/dist/cli/skills/loader.js +158 -0
  126. package/dist/cli/skills/loader.js.map +1 -0
  127. package/dist/cli/skills/manager.d.ts +97 -0
  128. package/dist/cli/skills/manager.d.ts.map +1 -0
  129. package/dist/cli/skills/manager.js +304 -0
  130. package/dist/cli/skills/manager.js.map +1 -0
  131. package/dist/cli/skills/parse-md-skill.d.ts +14 -0
  132. package/dist/cli/skills/parse-md-skill.d.ts.map +1 -0
  133. package/dist/cli/skills/parse-md-skill.js +86 -0
  134. package/dist/cli/skills/parse-md-skill.js.map +1 -0
  135. package/dist/cli/skills/providers/github.d.ts +21 -0
  136. package/dist/cli/skills/providers/github.d.ts.map +1 -0
  137. package/dist/cli/skills/providers/github.js +146 -0
  138. package/dist/cli/skills/providers/github.js.map +1 -0
  139. package/dist/cli/skills/providers/index.d.ts +6 -0
  140. package/dist/cli/skills/providers/index.d.ts.map +1 -0
  141. package/dist/cli/skills/providers/index.js +12 -0
  142. package/dist/cli/skills/providers/index.js.map +1 -0
  143. package/dist/cli/skills/providers/local.d.ts +16 -0
  144. package/dist/cli/skills/providers/local.d.ts.map +1 -0
  145. package/dist/cli/skills/providers/local.js +91 -0
  146. package/dist/cli/skills/providers/local.js.map +1 -0
  147. package/dist/cli/skills/providers/obsidian.d.ts +31 -0
  148. package/dist/cli/skills/providers/obsidian.d.ts.map +1 -0
  149. package/dist/cli/skills/providers/obsidian.js +141 -0
  150. package/dist/cli/skills/providers/obsidian.js.map +1 -0
  151. package/dist/cli/skills/providers/skills-sh.d.ts +32 -0
  152. package/dist/cli/skills/providers/skills-sh.d.ts.map +1 -0
  153. package/dist/cli/skills/providers/skills-sh.js +53 -0
  154. package/dist/cli/skills/providers/skills-sh.js.map +1 -0
  155. package/dist/cli/skills/providers/types.d.ts +25 -0
  156. package/dist/cli/skills/providers/types.d.ts.map +1 -0
  157. package/dist/cli/skills/providers/types.js +3 -0
  158. package/dist/cli/skills/providers/types.js.map +1 -0
  159. package/dist/cli/skills/safe-name.d.ts +2 -0
  160. package/dist/cli/skills/safe-name.d.ts.map +1 -0
  161. package/dist/cli/skills/safe-name.js +22 -0
  162. package/dist/cli/skills/safe-name.js.map +1 -0
  163. package/dist/cli/skills/stack.d.ts +3 -0
  164. package/dist/cli/skills/stack.d.ts.map +1 -0
  165. package/dist/cli/skills/stack.js +64 -0
  166. package/dist/cli/skills/stack.js.map +1 -0
  167. package/dist/cli/skills/types.d.ts +28 -0
  168. package/dist/cli/skills/types.d.ts.map +1 -0
  169. package/dist/cli/skills/types.js +3 -0
  170. package/dist/cli/skills/types.js.map +1 -0
  171. package/dist/cli/trust/__tests__/workspace-trust.test.d.ts +2 -0
  172. package/dist/cli/trust/__tests__/workspace-trust.test.d.ts.map +1 -0
  173. package/dist/cli/trust/__tests__/workspace-trust.test.js +252 -0
  174. package/dist/cli/trust/__tests__/workspace-trust.test.js.map +1 -0
  175. package/dist/cli/trust/workspace-trust.d.ts +49 -0
  176. package/dist/cli/trust/workspace-trust.d.ts.map +1 -0
  177. package/dist/cli/trust/workspace-trust.js +163 -0
  178. package/dist/cli/trust/workspace-trust.js.map +1 -0
  179. package/dist/cli/workspace/index.d.ts +68 -0
  180. package/dist/cli/workspace/index.d.ts.map +1 -0
  181. package/dist/cli/workspace/index.js +231 -0
  182. package/dist/cli/workspace/index.js.map +1 -0
  183. package/dist/context-hooks.d.ts +11 -0
  184. package/dist/context-hooks.d.ts.map +1 -0
  185. package/dist/context-hooks.js +23 -0
  186. package/dist/context-hooks.js.map +1 -0
  187. package/dist/context-services.d.ts +12 -0
  188. package/dist/context-services.d.ts.map +1 -0
  189. package/dist/context-services.js +20 -0
  190. package/dist/context-services.js.map +1 -0
  191. package/dist/index.d.ts +5 -1
  192. package/dist/index.d.ts.map +1 -1
  193. package/dist/index.js +26 -12
  194. package/dist/index.js.map +1 -1
  195. package/dist/orchestration/capability-matrix.d.ts +1 -1
  196. package/dist/orchestration/capability-matrix.d.ts.map +1 -1
  197. package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.d.ts +2 -0
  198. package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.d.ts.map +1 -0
  199. package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.js +42 -0
  200. package/dist/pipeline/__tests__/AgentEngine.orchestratorFailure.test.js.map +1 -0
  201. package/dist/pipeline/__tests__/coding-pipeline-hooks.test.d.ts +2 -0
  202. package/dist/pipeline/__tests__/coding-pipeline-hooks.test.d.ts.map +1 -0
  203. package/dist/pipeline/__tests__/coding-pipeline-hooks.test.js +64 -0
  204. package/dist/pipeline/__tests__/coding-pipeline-hooks.test.js.map +1 -0
  205. package/dist/pipeline/__tests__/engine-brief.test.d.ts +2 -0
  206. package/dist/pipeline/__tests__/engine-brief.test.d.ts.map +1 -0
  207. package/dist/pipeline/__tests__/engine-brief.test.js +159 -0
  208. package/dist/pipeline/__tests__/engine-brief.test.js.map +1 -0
  209. package/dist/pipeline/__tests__/qa-orchestrator.test.d.ts +2 -0
  210. package/dist/pipeline/__tests__/qa-orchestrator.test.d.ts.map +1 -0
  211. package/dist/pipeline/__tests__/qa-orchestrator.test.js +276 -0
  212. package/dist/pipeline/__tests__/qa-orchestrator.test.js.map +1 -0
  213. package/dist/pipeline/coding-pipeline-hooks.d.ts +28 -0
  214. package/dist/pipeline/coding-pipeline-hooks.d.ts.map +1 -0
  215. package/dist/pipeline/coding-pipeline-hooks.js +91 -0
  216. package/dist/pipeline/coding-pipeline-hooks.js.map +1 -0
  217. package/dist/pipeline/index.d.ts +13 -0
  218. package/dist/pipeline/index.d.ts.map +1 -0
  219. package/dist/pipeline/index.js +44 -0
  220. package/dist/pipeline/index.js.map +1 -0
  221. package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.d.ts +11 -0
  222. package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.d.ts.map +1 -0
  223. package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.js +105 -0
  224. package/dist/pipeline/orchestration/__tests__/agent-id-consistency.test.js.map +1 -0
  225. package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.d.ts +2 -0
  226. package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.d.ts.map +1 -0
  227. package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.js +21 -0
  228. package/dist/pipeline/orchestration/__tests__/fsm-commit-skipped.test.js.map +1 -0
  229. package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.d.ts +9 -0
  230. package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.d.ts.map +1 -0
  231. package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.js +101 -0
  232. package/dist/pipeline/orchestration/__tests__/fsm-critical-path.test.js.map +1 -0
  233. package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.d.ts +2 -0
  234. package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.d.ts.map +1 -0
  235. package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.js +54 -0
  236. package/dist/pipeline/orchestration/__tests__/fsm-rework-and-regression.test.js.map +1 -0
  237. package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.d.ts +2 -0
  238. package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.d.ts.map +1 -0
  239. package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.js +57 -0
  240. package/dist/pipeline/orchestration/__tests__/intent-detector-llm.test.js.map +1 -0
  241. package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.d.ts +9 -0
  242. package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.d.ts.map +1 -0
  243. package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.js +43 -0
  244. package/dist/pipeline/orchestration/__tests__/intent-detector-scores.test.js.map +1 -0
  245. package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.d.ts +10 -0
  246. package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.d.ts.map +1 -0
  247. package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.js +264 -0
  248. package/dist/pipeline/orchestration/__tests__/reflection-cycle.test.js.map +1 -0
  249. package/dist/pipeline/orchestration/audit/audit-ci-blocker.d.ts +31 -0
  250. package/dist/pipeline/orchestration/audit/audit-ci-blocker.d.ts.map +1 -0
  251. package/dist/pipeline/orchestration/audit/audit-ci-blocker.js +120 -0
  252. package/dist/pipeline/orchestration/audit/audit-ci-blocker.js.map +1 -0
  253. package/dist/pipeline/orchestration/audit/audit-finding-tracer.d.ts +33 -0
  254. package/dist/pipeline/orchestration/audit/audit-finding-tracer.d.ts.map +1 -0
  255. package/dist/pipeline/orchestration/audit/audit-finding-tracer.js +126 -0
  256. package/dist/pipeline/orchestration/audit/audit-finding-tracer.js.map +1 -0
  257. package/dist/pipeline/orchestration/audit/audit-lessons-learned.d.ts +27 -0
  258. package/dist/pipeline/orchestration/audit/audit-lessons-learned.d.ts.map +1 -0
  259. package/dist/pipeline/orchestration/audit/audit-lessons-learned.js +155 -0
  260. package/dist/pipeline/orchestration/audit/audit-lessons-learned.js.map +1 -0
  261. package/dist/pipeline/orchestration/audit/audit-pending-issues.d.ts +21 -0
  262. package/dist/pipeline/orchestration/audit/audit-pending-issues.d.ts.map +1 -0
  263. package/dist/pipeline/orchestration/audit/audit-pending-issues.js +110 -0
  264. package/dist/pipeline/orchestration/audit/audit-pending-issues.js.map +1 -0
  265. package/dist/pipeline/orchestration/audit/audit-reflection-bridge.d.ts +39 -0
  266. package/dist/pipeline/orchestration/audit/audit-reflection-bridge.d.ts.map +1 -0
  267. package/dist/pipeline/orchestration/audit/audit-reflection-bridge.js +65 -0
  268. package/dist/pipeline/orchestration/audit/audit-reflection-bridge.js.map +1 -0
  269. package/dist/pipeline/orchestration/audit/audit-report-renderer.d.ts +30 -0
  270. package/dist/pipeline/orchestration/audit/audit-report-renderer.d.ts.map +1 -0
  271. package/dist/pipeline/orchestration/audit/audit-report-renderer.js +249 -0
  272. package/dist/pipeline/orchestration/audit/audit-report-renderer.js.map +1 -0
  273. package/dist/pipeline/orchestration/audit/audit-report-version-manager.d.ts +52 -0
  274. package/dist/pipeline/orchestration/audit/audit-report-version-manager.d.ts.map +1 -0
  275. package/dist/pipeline/orchestration/audit/audit-report-version-manager.js +144 -0
  276. package/dist/pipeline/orchestration/audit/audit-report-version-manager.js.map +1 -0
  277. package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.d.ts +37 -0
  278. package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.d.ts.map +1 -0
  279. package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.js +129 -0
  280. package/dist/pipeline/orchestration/audit/audit-silent-gates-buffer.js.map +1 -0
  281. package/dist/pipeline/orchestration/audit/index.d.ts +17 -0
  282. package/dist/pipeline/orchestration/audit/index.d.ts.map +1 -0
  283. package/dist/pipeline/orchestration/audit/index.js +26 -0
  284. package/dist/pipeline/orchestration/audit/index.js.map +1 -0
  285. package/dist/pipeline/orchestration/audit/types.d.ts +79 -0
  286. package/dist/pipeline/orchestration/audit/types.d.ts.map +1 -0
  287. package/dist/pipeline/orchestration/audit/types.js +10 -0
  288. package/dist/pipeline/orchestration/audit/types.js.map +1 -0
  289. package/dist/pipeline/orchestration/audit-reporter.d.ts +133 -0
  290. package/dist/pipeline/orchestration/audit-reporter.d.ts.map +1 -0
  291. package/dist/pipeline/orchestration/audit-reporter.js +322 -0
  292. package/dist/pipeline/orchestration/audit-reporter.js.map +1 -0
  293. package/dist/pipeline/orchestration/config-loader.d.ts +51 -0
  294. package/dist/pipeline/orchestration/config-loader.d.ts.map +1 -0
  295. package/dist/pipeline/orchestration/config-loader.js +215 -0
  296. package/dist/pipeline/orchestration/config-loader.js.map +1 -0
  297. package/dist/pipeline/orchestration/domain-detector.d.ts +36 -0
  298. package/dist/pipeline/orchestration/domain-detector.d.ts.map +1 -0
  299. package/dist/pipeline/orchestration/domain-detector.js +157 -0
  300. package/dist/pipeline/orchestration/domain-detector.js.map +1 -0
  301. package/dist/pipeline/orchestration/fsm.d.ts +92 -0
  302. package/dist/pipeline/orchestration/fsm.d.ts.map +1 -0
  303. package/dist/pipeline/orchestration/fsm.js +243 -0
  304. package/dist/pipeline/orchestration/fsm.js.map +1 -0
  305. package/dist/pipeline/orchestration/gate-resolver.d.ts +52 -0
  306. package/dist/pipeline/orchestration/gate-resolver.d.ts.map +1 -0
  307. package/dist/pipeline/orchestration/gate-resolver.js +120 -0
  308. package/dist/pipeline/orchestration/gate-resolver.js.map +1 -0
  309. package/dist/pipeline/orchestration/index.d.ts +16 -0
  310. package/dist/pipeline/orchestration/index.d.ts.map +1 -0
  311. package/dist/pipeline/orchestration/index.js +32 -0
  312. package/dist/pipeline/orchestration/index.js.map +1 -0
  313. package/dist/pipeline/orchestration/intent-detector.d.ts +37 -0
  314. package/dist/pipeline/orchestration/intent-detector.d.ts.map +1 -0
  315. package/dist/pipeline/orchestration/intent-detector.js +248 -0
  316. package/dist/pipeline/orchestration/intent-detector.js.map +1 -0
  317. package/dist/pipeline/orchestration/keyword-match.d.ts +17 -0
  318. package/dist/pipeline/orchestration/keyword-match.d.ts.map +1 -0
  319. package/dist/pipeline/orchestration/keyword-match.js +26 -0
  320. package/dist/pipeline/orchestration/keyword-match.js.map +1 -0
  321. package/dist/pipeline/orchestration/orchestrator.d.ts +158 -0
  322. package/dist/pipeline/orchestration/orchestrator.d.ts.map +1 -0
  323. package/dist/pipeline/orchestration/orchestrator.js +414 -0
  324. package/dist/pipeline/orchestration/orchestrator.js.map +1 -0
  325. package/dist/pipeline/orchestration/policy-engine.d.ts +54 -0
  326. package/dist/pipeline/orchestration/policy-engine.d.ts.map +1 -0
  327. package/dist/pipeline/orchestration/policy-engine.js +278 -0
  328. package/dist/pipeline/orchestration/policy-engine.js.map +1 -0
  329. package/dist/pipeline/orchestration/risk-scorer.d.ts +38 -0
  330. package/dist/pipeline/orchestration/risk-scorer.d.ts.map +1 -0
  331. package/dist/pipeline/orchestration/risk-scorer.js +145 -0
  332. package/dist/pipeline/orchestration/risk-scorer.js.map +1 -0
  333. package/dist/pipeline/orchestration/task-context.d.ts +205 -0
  334. package/dist/pipeline/orchestration/task-context.d.ts.map +1 -0
  335. package/dist/pipeline/orchestration/task-context.js +162 -0
  336. package/dist/pipeline/orchestration/task-context.js.map +1 -0
  337. package/dist/pipeline/orchestration/types.d.ts +111 -0
  338. package/dist/pipeline/orchestration/types.d.ts.map +1 -0
  339. package/dist/pipeline/orchestration/types.js +37 -0
  340. package/dist/pipeline/orchestration/types.js.map +1 -0
  341. package/dist/pipeline/qa/__tests__/QAService.test.d.ts +2 -0
  342. package/dist/pipeline/qa/__tests__/QAService.test.d.ts.map +1 -0
  343. package/dist/pipeline/qa/__tests__/QAService.test.js +170 -0
  344. package/dist/pipeline/qa/__tests__/QAService.test.js.map +1 -0
  345. package/dist/pipeline/qa/__tests__/QAService.verdict.test.d.ts +2 -0
  346. package/dist/pipeline/qa/__tests__/QAService.verdict.test.d.ts.map +1 -0
  347. package/dist/pipeline/qa/__tests__/QAService.verdict.test.js +39 -0
  348. package/dist/pipeline/qa/__tests__/QAService.verdict.test.js.map +1 -0
  349. package/dist/pipeline/qa/index.d.ts +3 -0
  350. package/dist/pipeline/qa/index.d.ts.map +1 -0
  351. package/dist/pipeline/qa/index.js +6 -0
  352. package/dist/pipeline/qa/index.js.map +1 -0
  353. package/dist/pipeline/qa/qa-service.d.ts +33 -0
  354. package/dist/pipeline/qa/qa-service.d.ts.map +1 -0
  355. package/dist/pipeline/qa/qa-service.js +239 -0
  356. package/dist/pipeline/qa/qa-service.js.map +1 -0
  357. package/dist/pipeline/qa-orchestrator.d.ts +60 -0
  358. package/dist/pipeline/qa-orchestrator.d.ts.map +1 -0
  359. package/dist/pipeline/qa-orchestrator.js +177 -0
  360. package/dist/pipeline/qa-orchestrator.js.map +1 -0
  361. package/dist/pipeline/reflection/domains/agent-domain.d.ts +40 -0
  362. package/dist/pipeline/reflection/domains/agent-domain.d.ts.map +1 -0
  363. package/dist/pipeline/reflection/domains/agent-domain.js +161 -0
  364. package/dist/pipeline/reflection/domains/agent-domain.js.map +1 -0
  365. package/dist/pipeline/reflection/domains/audit-domain.d.ts +46 -0
  366. package/dist/pipeline/reflection/domains/audit-domain.d.ts.map +1 -0
  367. package/dist/pipeline/reflection/domains/audit-domain.js +241 -0
  368. package/dist/pipeline/reflection/domains/audit-domain.js.map +1 -0
  369. package/dist/pipeline/reflection/domains/bootstrap-domain.d.ts +40 -0
  370. package/dist/pipeline/reflection/domains/bootstrap-domain.d.ts.map +1 -0
  371. package/dist/pipeline/reflection/domains/bootstrap-domain.js +156 -0
  372. package/dist/pipeline/reflection/domains/bootstrap-domain.js.map +1 -0
  373. package/dist/pipeline/reflection/domains/commit-domain.d.ts +40 -0
  374. package/dist/pipeline/reflection/domains/commit-domain.d.ts.map +1 -0
  375. package/dist/pipeline/reflection/domains/commit-domain.js +174 -0
  376. package/dist/pipeline/reflection/domains/commit-domain.js.map +1 -0
  377. package/dist/pipeline/reflection/domains/test-domain.d.ts +40 -0
  378. package/dist/pipeline/reflection/domains/test-domain.d.ts.map +1 -0
  379. package/dist/pipeline/reflection/domains/test-domain.js +194 -0
  380. package/dist/pipeline/reflection/domains/test-domain.js.map +1 -0
  381. package/dist/pipeline/reflection/historical-loader.d.ts +105 -0
  382. package/dist/pipeline/reflection/historical-loader.d.ts.map +1 -0
  383. package/dist/pipeline/reflection/historical-loader.js +462 -0
  384. package/dist/pipeline/reflection/historical-loader.js.map +1 -0
  385. package/dist/pipeline/reflection/hooks/agent-hook.d.ts +72 -0
  386. package/dist/pipeline/reflection/hooks/agent-hook.d.ts.map +1 -0
  387. package/dist/pipeline/reflection/hooks/agent-hook.js +98 -0
  388. package/dist/pipeline/reflection/hooks/agent-hook.js.map +1 -0
  389. package/dist/pipeline/reflection/hooks/audit-hook.d.ts +72 -0
  390. package/dist/pipeline/reflection/hooks/audit-hook.d.ts.map +1 -0
  391. package/dist/pipeline/reflection/hooks/audit-hook.js +112 -0
  392. package/dist/pipeline/reflection/hooks/audit-hook.js.map +1 -0
  393. package/dist/pipeline/reflection/hooks/bootstrap-hook.d.ts +71 -0
  394. package/dist/pipeline/reflection/hooks/bootstrap-hook.d.ts.map +1 -0
  395. package/dist/pipeline/reflection/hooks/bootstrap-hook.js +97 -0
  396. package/dist/pipeline/reflection/hooks/bootstrap-hook.js.map +1 -0
  397. package/dist/pipeline/reflection/hooks/commit-hook.d.ts +63 -0
  398. package/dist/pipeline/reflection/hooks/commit-hook.d.ts.map +1 -0
  399. package/dist/pipeline/reflection/hooks/commit-hook.js +90 -0
  400. package/dist/pipeline/reflection/hooks/commit-hook.js.map +1 -0
  401. package/dist/pipeline/reflection/hooks/test-hook.d.ts +65 -0
  402. package/dist/pipeline/reflection/hooks/test-hook.d.ts.map +1 -0
  403. package/dist/pipeline/reflection/hooks/test-hook.js +99 -0
  404. package/dist/pipeline/reflection/hooks/test-hook.js.map +1 -0
  405. package/dist/pipeline/reflection/lessons-memo-generator.d.ts +60 -0
  406. package/dist/pipeline/reflection/lessons-memo-generator.d.ts.map +1 -0
  407. package/dist/pipeline/reflection/lessons-memo-generator.js +286 -0
  408. package/dist/pipeline/reflection/lessons-memo-generator.js.map +1 -0
  409. package/dist/store/ProjectStore.d.ts +1 -1
  410. package/dist/store/ProjectStore.d.ts.map +1 -1
  411. package/dist/store/ProjectStore.js +2 -1
  412. package/dist/store/ProjectStore.js.map +1 -1
  413. package/dist/store/types.d.ts +28 -0
  414. package/dist/store/types.d.ts.map +1 -0
  415. package/dist/store/types.js +3 -0
  416. package/dist/store/types.js.map +1 -0
  417. package/dist/tools/__tests__/command-parser.test.js +1 -1
  418. package/dist/tools/__tests__/command-parser.test.js.map +1 -1
  419. package/dist/tools/__tests__/declared-facts.test.d.ts +2 -0
  420. package/dist/tools/__tests__/declared-facts.test.d.ts.map +1 -0
  421. package/dist/tools/__tests__/declared-facts.test.js +21 -0
  422. package/dist/tools/__tests__/declared-facts.test.js.map +1 -0
  423. package/dist/tools/__tests__/package-install.test.d.ts +2 -0
  424. package/dist/tools/__tests__/package-install.test.d.ts.map +1 -0
  425. package/dist/tools/__tests__/package-install.test.js +56 -0
  426. package/dist/tools/__tests__/package-install.test.js.map +1 -0
  427. package/dist/tools/__tests__/save-tools.secrets.test.js +1 -1
  428. package/dist/tools/__tests__/save-tools.secrets.test.js.map +1 -1
  429. package/dist/tools/edit-file.d.ts.map +1 -1
  430. package/dist/tools/edit-file.js +1 -0
  431. package/dist/tools/edit-file.js.map +1 -1
  432. package/dist/tools/list-directory.d.ts.map +1 -1
  433. package/dist/tools/list-directory.js +1 -0
  434. package/dist/tools/list-directory.js.map +1 -1
  435. package/dist/tools/package-install.d.ts +11 -0
  436. package/dist/tools/package-install.d.ts.map +1 -0
  437. package/dist/tools/package-install.js +112 -0
  438. package/dist/tools/package-install.js.map +1 -0
  439. package/dist/tools/read-file.d.ts.map +1 -1
  440. package/dist/tools/read-file.js +1 -0
  441. package/dist/tools/read-file.js.map +1 -1
  442. package/dist/tools/run-command.d.ts.map +1 -1
  443. package/dist/tools/run-command.js +5 -1
  444. package/dist/tools/run-command.js.map +1 -1
  445. package/dist/tools/save-audit.d.ts.map +1 -1
  446. package/dist/tools/save-audit.js +7 -6
  447. package/dist/tools/save-audit.js.map +1 -1
  448. package/dist/tools/save-context.d.ts.map +1 -1
  449. package/dist/tools/save-context.js +3 -2
  450. package/dist/tools/save-context.js.map +1 -1
  451. package/dist/tools/save-learning.d.ts.map +1 -1
  452. package/dist/tools/save-learning.js +4 -3
  453. package/dist/tools/save-learning.js.map +1 -1
  454. package/dist/tools/save-user-preference.d.ts.map +1 -1
  455. package/dist/tools/save-user-preference.js +3 -2
  456. package/dist/tools/save-user-preference.js.map +1 -1
  457. package/dist/tools/search-files.d.ts.map +1 -1
  458. package/dist/tools/search-files.js +1 -0
  459. package/dist/tools/search-files.js.map +1 -1
  460. package/dist/tools/update-session.d.ts.map +1 -1
  461. package/dist/tools/update-session.js +3 -2
  462. package/dist/tools/update-session.js.map +1 -1
  463. package/dist/tools/write-file.d.ts.map +1 -1
  464. package/dist/tools/write-file.js +1 -0
  465. package/dist/tools/write-file.js.map +1 -1
  466. package/package.json +71 -44
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @description Barrel de exportaciones del subsistema de auditoría.
3
+ *
4
+ * Exporta todas las clases helper y tipos para que el AuditReporter
5
+ * y otros módulos puedan importar desde un solo punto.
6
+ */
7
+ export { AuditReportVersionManager } from './audit-report-version-manager';
8
+ export type { AuditReportVersion } from './audit-report-version-manager';
9
+ export { AuditReportRenderer } from './audit-report-renderer';
10
+ export { AuditLessonsLearned } from './audit-lessons-learned';
11
+ export { AuditSilentGatesBuffer } from './audit-silent-gates-buffer';
12
+ export { AuditPendingIssues } from './audit-pending-issues';
13
+ export { AuditFindingTracer } from './audit-finding-tracer';
14
+ export { AuditCiBlocker } from './audit-ci-blocker';
15
+ export { AuditReflectionBridge } from './audit-reflection-bridge';
16
+ export type { AuditFinding, GateVeredict, GateRecord, SprintInfo, Lesson, FinalReport, SilentGateRecord, CiReport, AuditStats, } from './types';
17
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,YAAY,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAElE,YAAY,EACV,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EACV,MAAM,EACN,WAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,UAAU,GACX,MAAM,SAAS,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * @description Barrel de exportaciones del subsistema de auditoría.
4
+ *
5
+ * Exporta todas las clases helper y tipos para que el AuditReporter
6
+ * y otros módulos puedan importar desde un solo punto.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.AuditReflectionBridge = exports.AuditCiBlocker = exports.AuditFindingTracer = exports.AuditPendingIssues = exports.AuditSilentGatesBuffer = exports.AuditLessonsLearned = exports.AuditReportRenderer = exports.AuditReportVersionManager = void 0;
10
+ var audit_report_version_manager_1 = require("./audit-report-version-manager");
11
+ Object.defineProperty(exports, "AuditReportVersionManager", { enumerable: true, get: function () { return audit_report_version_manager_1.AuditReportVersionManager; } });
12
+ var audit_report_renderer_1 = require("./audit-report-renderer");
13
+ Object.defineProperty(exports, "AuditReportRenderer", { enumerable: true, get: function () { return audit_report_renderer_1.AuditReportRenderer; } });
14
+ var audit_lessons_learned_1 = require("./audit-lessons-learned");
15
+ Object.defineProperty(exports, "AuditLessonsLearned", { enumerable: true, get: function () { return audit_lessons_learned_1.AuditLessonsLearned; } });
16
+ var audit_silent_gates_buffer_1 = require("./audit-silent-gates-buffer");
17
+ Object.defineProperty(exports, "AuditSilentGatesBuffer", { enumerable: true, get: function () { return audit_silent_gates_buffer_1.AuditSilentGatesBuffer; } });
18
+ var audit_pending_issues_1 = require("./audit-pending-issues");
19
+ Object.defineProperty(exports, "AuditPendingIssues", { enumerable: true, get: function () { return audit_pending_issues_1.AuditPendingIssues; } });
20
+ var audit_finding_tracer_1 = require("./audit-finding-tracer");
21
+ Object.defineProperty(exports, "AuditFindingTracer", { enumerable: true, get: function () { return audit_finding_tracer_1.AuditFindingTracer; } });
22
+ var audit_ci_blocker_1 = require("./audit-ci-blocker");
23
+ Object.defineProperty(exports, "AuditCiBlocker", { enumerable: true, get: function () { return audit_ci_blocker_1.AuditCiBlocker; } });
24
+ var audit_reflection_bridge_1 = require("./audit-reflection-bridge");
25
+ Object.defineProperty(exports, "AuditReflectionBridge", { enumerable: true, get: function () { return audit_reflection_bridge_1.AuditReflectionBridge; } });
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+EAA2E;AAAlE,yIAAA,yBAAyB,OAAA;AAGlC,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAE5B,iEAA8D;AAArD,4HAAA,mBAAmB,OAAA;AAE5B,yEAAqE;AAA5D,mIAAA,sBAAsB,OAAA;AAE/B,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAE3B,+DAA4D;AAAnD,0HAAA,kBAAkB,OAAA;AAE3B,uDAAoD;AAA3C,kHAAA,cAAc,OAAA;AAEvB,qEAAkE;AAAzD,gIAAA,qBAAqB,OAAA"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @description Tipos compartidos del subsistema de auditoría.
3
+ *
4
+ * Estos tipos se usan en AuditReporter y todas las clases helper.
5
+ * Se extrajeron del archivo audit-reporter.ts original para evitar
6
+ * dependencias circulares.
7
+ */
8
+ export interface AuditFinding {
9
+ id: string;
10
+ dimension: string;
11
+ hallazgo: string;
12
+ severidad: 'critical' | 'high' | 'medium' | 'low';
13
+ evidencia: string;
14
+ recomendacion: string;
15
+ agenteResponsable: string;
16
+ /** SHA del commit que resolvió este hallazgo (opcional) */
17
+ resolvedByCommit?: string;
18
+ /** Fecha en que se resolvió (YYYY-MM-DD HH:mm:ss UTC) */
19
+ resolvedAt?: string;
20
+ }
21
+ export type GateVeredict = 'GO' | 'NO-GO' | 'NO-GO condicional';
22
+ export interface GateRecord {
23
+ gate: string;
24
+ agente: string;
25
+ veredicto: GateVeredict;
26
+ fecha: string;
27
+ hallazgos: AuditFinding[];
28
+ notas?: string;
29
+ }
30
+ export interface SprintInfo {
31
+ name: string;
32
+ version: string;
33
+ purpose: string;
34
+ newFiles: string[];
35
+ modifiedFiles: string[];
36
+ testCount: number;
37
+ testTime: string;
38
+ }
39
+ export interface Lesson {
40
+ dimension: string;
41
+ patron: string;
42
+ frecuencia: number;
43
+ gravedad: 'critical' | 'high' | 'medium' | 'low';
44
+ recomendacion: string;
45
+ }
46
+ export interface FinalReport {
47
+ sprint: SprintInfo;
48
+ gates: GateRecord[];
49
+ veredictoFinal: GateVeredict;
50
+ resumen: string;
51
+ riesgos: Array<{
52
+ riesgo: string;
53
+ probabilidad: string;
54
+ impacto: string;
55
+ mitigacion: string;
56
+ }>;
57
+ fecha: string;
58
+ }
59
+ export interface SilentGateRecord {
60
+ gate: string;
61
+ agente: string;
62
+ fecha: string;
63
+ veredicto: GateVeredict;
64
+ notas?: string;
65
+ }
66
+ export interface CiReport {
67
+ ok: boolean;
68
+ criticalCount: number;
69
+ highCount: number;
70
+ findings: AuditFinding[];
71
+ message: string;
72
+ }
73
+ export interface AuditStats {
74
+ totalGates: number;
75
+ withFindings: number;
76
+ approvalRate: number;
77
+ lessonsCount: number;
78
+ }
79
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IAClD,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,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AC;IAC9F,KAAK,EAAE,MAAM,CAAC;CACf;AAID,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,YAAY,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,OAAO,CAAC;IACZ,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * @description Tipos compartidos del subsistema de auditoría.
4
+ *
5
+ * Estos tipos se usan en AuditReporter y todas las clases helper.
6
+ * Se extrajeron del archivo audit-reporter.ts original para evitar
7
+ * dependencias circulares.
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/pipeline/orchestration/audit/types.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG"}
@@ -0,0 +1,133 @@
1
+ /**
2
+ * @description Audit Reporter — Orquestador de informes Markdown de auditoría multi-gate.
3
+ *
4
+ * **Responsabilidad:** Coordinar las 8 clases helper del subsistema de auditoría
5
+ * para generar informes con versionado semántico, fechas precisas y hash de integridad.
6
+ *
7
+ * **Delegación:**
8
+ * - `AuditReportVersionManager` → versionado semántico
9
+ * - `AuditReportRenderer` → renderizado Markdown + hash SHA-256
10
+ * - `AuditLessonsLearned` → lecciones aprendidas
11
+ * - `AuditSilentGatesBuffer` → batch diario de auto-gates silenciosos
12
+ * - `AuditPendingIssues` → issues pendientes (críticos/altos)
13
+ * - `AuditFindingTracer` → trazabilidad hallazgo → commit
14
+ * - `AuditCiBlocker` → bloqueo de deploys en CI/CD
15
+ * - `AuditReflectionBridge` → puente con Reflection Engine
16
+ *
17
+ * Cada informe se almacena en ~/.{appName}/projects/{cwd-hashed}/audits/
18
+ * y se aísla por proyecto usando el mismo esquema que la memoria persistente.
19
+ *
20
+ * @example
21
+ * ```ts
22
+ * const reporter = new AuditReporter({ projectRoot: process.cwd(), useGlobalDir: true });
23
+ * await reporter.recordGate('architecture', 'APPROVED', findings, task);
24
+ * await reporter.generateFinalReport(sprintInfo);
25
+ * ```
26
+ */
27
+ import { TaskContext } from './task-context';
28
+ import { ReflectionEngine } from '@backendkit-labs/agent-core';
29
+ import type { AuditFinding, GateVeredict, GateRecord, SprintInfo, AuditStats } from './audit';
30
+ export declare class AuditReporter {
31
+ private docsDir;
32
+ private gates;
33
+ private versionManager;
34
+ private renderer;
35
+ private lessons;
36
+ private silentBuffer;
37
+ private pendingIssues;
38
+ private findingTracer;
39
+ private ciBlocker;
40
+ private reflectionBridge;
41
+ constructor(options?: {
42
+ projectRoot?: string;
43
+ useGlobalDir?: boolean;
44
+ appName?: string;
45
+ });
46
+ /**
47
+ * @description Registra el resultado de un gate individual.
48
+ * Si skipIfEmpty=true y es auto-GO sin hallazgos, solo acumula en buffer diario
49
+ * sin persistir archivo individual.
50
+ */
51
+ recordGate(gate: string, agente: string, veredicto: GateVeredict, hallazgos: AuditFinding[], task?: TaskContext, notas?: string, skipIfEmpty?: boolean): Promise<string>;
52
+ /**
53
+ * @description Genera el informe final consolidado con todos los gates,
54
+ * veredicto general y plan de remediación. Incrementa minor.
55
+ */
56
+ generateFinalReport(sprint: SprintInfo): Promise<string>;
57
+ getGates(): GateRecord[];
58
+ reset(): void;
59
+ getAuditsDir(): string;
60
+ getLessonsLearned(): string[];
61
+ generateLessonsMemo(): Promise<string | null>;
62
+ hasActiveBlockers(): boolean;
63
+ getActiveBlockers(): AuditFinding[];
64
+ getStats(): AuditStats;
65
+ /**
66
+ * @description Genera un reporte diario con todos los auto-gates silenciosos
67
+ * acumulados. Reduce 130+ archivos individuales a 1 reporte diario consolidado.
68
+ *
69
+ * @see docs/auditorias/mejoras-audit-reporter.md
70
+ */
71
+ generateDailySilentGatesReport(fecha?: string): Promise<string | null>;
72
+ getSilentGates(): Array<{
73
+ gate: string;
74
+ agente: string;
75
+ fecha: string;
76
+ veredicto: GateVeredict;
77
+ }>;
78
+ clearSilentGates(): void;
79
+ /**
80
+ * @description Completa un sprint generando el informe final, reporte diario
81
+ * de auto-gates, y pending issues si el veredicto es NO-GO.
82
+ *
83
+ * @see docs/auditorias/mejoras-audit-reporter.md
84
+ */
85
+ completeSprint(sprint: SprintInfo, finalVeredict?: GateVeredict): Promise<{
86
+ reportPath: string;
87
+ pendingIssues: AuditFinding[];
88
+ silentReportPath: string | null;
89
+ }>;
90
+ /**
91
+ * @description Marca un hallazgo como resuelto, asociándolo con un commit.
92
+ * Busca en memoria y en disco.
93
+ *
94
+ * @see docs/auditorias/mejoras-audit-reporter.md
95
+ */
96
+ markFindingResolved(findingId: string, commitHash: string, commitMessage?: string): Promise<boolean>;
97
+ /**
98
+ * @description Marca hallazgos como resueltos buscando por archivos modificados
99
+ * en el commit. Útil para hook post-commit.
100
+ */
101
+ markFindingsResolvedByFiles(commitHash: string, modifiedFiles: string[]): Promise<number>;
102
+ /**
103
+ * @description Verifica si hay hallazgos críticos/altos sin resolver.
104
+ * Útil para CI/CD: si retorna true, el pipeline debe fallar.
105
+ *
106
+ * @see docs/auditorias/mejoras-audit-reporter.md
107
+ */
108
+ hasCriticalOpenFindings(): Promise<boolean>;
109
+ /**
110
+ * @description Genera reporte de estado para CI/CD.
111
+ */
112
+ generateCiReport(): Promise<{
113
+ ok: boolean;
114
+ criticalCount: number;
115
+ highCount: number;
116
+ findings: AuditFinding[];
117
+ message: string;
118
+ }>;
119
+ /**
120
+ * @description Conecta el AuditReporter con el Reflection Engine.
121
+ *
122
+ * @see docs/auditorias/mejoras-audit-reporter.md
123
+ */
124
+ connectReflectionEngine(engine: ReflectionEngine): void;
125
+ /**
126
+ * @description Desconecta el Reflection Engine.
127
+ */
128
+ disconnectReflectionEngine(): void;
129
+ private ensureDocsDir;
130
+ private calculateFinalVeredict;
131
+ private calculateAccumulatedRisks;
132
+ }
133
+ //# sourceMappingURL=audit-reporter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-reporter.d.ts","sourceRoot":"","sources":["../../../src/pipeline/orchestration/audit-reporter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAW/D,OAAO,KAAK,EACV,YAAY,EACZ,YAAY,EACZ,UAAU,EACV,UAAU,EAEV,UAAU,EACX,MAAM,SAAS,CAAC;AAajB,qBAAa,aAAa;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,KAAK,CAAoB;IAGjC,OAAO,CAAC,cAAc,CAA4B;IAClD,OAAO,CAAC,QAAQ,CAAsB;IACtC,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,YAAY,CAAyB;IAC7C,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,aAAa,CAAqB;IAC1C,OAAO,CAAC,SAAS,CAAiB;IAClC,OAAO,CAAC,gBAAgB,CAAwB;gBAEpC,OAAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE;IAyBxF;;;;OAIG;IACG,UAAU,CACd,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,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,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAM/F;;;;;OAKG;IACG,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;IAIjD;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC;QAChC,EAAE,EAAE,OAAO,CAAC;QACZ,aAAa,EAAE,MAAM,CAAC;QACtB,SAAS,EAAE,MAAM,CAAC;QAClB,QAAQ,EAAE,YAAY,EAAE,CAAC;QACzB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAMF;;;;OAIG;IACH,uBAAuB,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI;IAIvD;;OAEG;IACH,0BAA0B,IAAI,IAAI;YAMpB,aAAa;IAI3B,OAAO,CAAC,sBAAsB;IAQ9B,OAAO,CAAC,yBAAyB;CAUlC"}
@@ -0,0 +1,322 @@
1
+ "use strict";
2
+ /**
3
+ * @description Audit Reporter — Orquestador de informes Markdown de auditoría multi-gate.
4
+ *
5
+ * **Responsabilidad:** Coordinar las 8 clases helper del subsistema de auditoría
6
+ * para generar informes con versionado semántico, fechas precisas y hash de integridad.
7
+ *
8
+ * **Delegación:**
9
+ * - `AuditReportVersionManager` → versionado semántico
10
+ * - `AuditReportRenderer` → renderizado Markdown + hash SHA-256
11
+ * - `AuditLessonsLearned` → lecciones aprendidas
12
+ * - `AuditSilentGatesBuffer` → batch diario de auto-gates silenciosos
13
+ * - `AuditPendingIssues` → issues pendientes (críticos/altos)
14
+ * - `AuditFindingTracer` → trazabilidad hallazgo → commit
15
+ * - `AuditCiBlocker` → bloqueo de deploys en CI/CD
16
+ * - `AuditReflectionBridge` → puente con Reflection Engine
17
+ *
18
+ * Cada informe se almacena en ~/.{appName}/projects/{cwd-hashed}/audits/
19
+ * y se aísla por proyecto usando el mismo esquema que la memoria persistente.
20
+ *
21
+ * @example
22
+ * ```ts
23
+ * const reporter = new AuditReporter({ projectRoot: process.cwd(), useGlobalDir: true });
24
+ * await reporter.recordGate('architecture', 'APPROVED', findings, task);
25
+ * await reporter.generateFinalReport(sprintInfo);
26
+ * ```
27
+ */
28
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
+ if (k2 === undefined) k2 = k;
30
+ var desc = Object.getOwnPropertyDescriptor(m, k);
31
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
32
+ desc = { enumerable: true, get: function() { return m[k]; } };
33
+ }
34
+ Object.defineProperty(o, k2, desc);
35
+ }) : (function(o, m, k, k2) {
36
+ if (k2 === undefined) k2 = k;
37
+ o[k2] = m[k];
38
+ }));
39
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
40
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
41
+ }) : function(o, v) {
42
+ o["default"] = v;
43
+ });
44
+ var __importStar = (this && this.__importStar) || (function () {
45
+ var ownKeys = function(o) {
46
+ ownKeys = Object.getOwnPropertyNames || function (o) {
47
+ var ar = [];
48
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
49
+ return ar;
50
+ };
51
+ return ownKeys(o);
52
+ };
53
+ return function (mod) {
54
+ if (mod && mod.__esModule) return mod;
55
+ var result = {};
56
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
57
+ __setModuleDefault(result, mod);
58
+ return result;
59
+ };
60
+ })();
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ exports.AuditReporter = void 0;
63
+ const path = __importStar(require("path"));
64
+ const os = __importStar(require("os"));
65
+ const fs = __importStar(require("fs/promises"));
66
+ const agent_core_1 = require("@backendkit-labs/agent-core");
67
+ const agent_core_2 = require("@backendkit-labs/agent-core");
68
+ const audit_1 = require("./audit");
69
+ // ── Helpers ──────────────────────────────────────────────────────────────────
70
+ function getFormattedDate() {
71
+ return new Date()
72
+ .toISOString()
73
+ .replace('T', ' ')
74
+ .replace(/\.\d{3}Z/, ' UTC');
75
+ }
76
+ // ── AuditReporter ────────────────────────────────────────────────────────────
77
+ class AuditReporter {
78
+ docsDir;
79
+ gates = [];
80
+ // Sub-sistemas delegados
81
+ versionManager;
82
+ renderer;
83
+ lessons;
84
+ silentBuffer;
85
+ pendingIssues;
86
+ findingTracer;
87
+ ciBlocker;
88
+ reflectionBridge;
89
+ constructor(options) {
90
+ const root = options?.projectRoot ?? process.cwd();
91
+ const useGlobal = options?.useGlobalDir ?? true;
92
+ const appName = options?.appName ?? 'bk-agent';
93
+ if (useGlobal) {
94
+ const home = process.env.USERPROFILE ?? process.env.HOME ?? os.homedir();
95
+ this.docsDir = path.join(home, `.${appName}`, 'projects', (0, agent_core_1.cwdToProjectKey)(root), 'audits');
96
+ }
97
+ else {
98
+ this.docsDir = path.join(root, 'docs', 'auditorias');
99
+ }
100
+ // Inicializar sub-sistemas
101
+ this.versionManager = new audit_1.AuditReportVersionManager(this.docsDir);
102
+ this.renderer = new audit_1.AuditReportRenderer();
103
+ this.lessons = new audit_1.AuditLessonsLearned(this.docsDir);
104
+ this.silentBuffer = new audit_1.AuditSilentGatesBuffer(this.docsDir);
105
+ this.pendingIssues = new audit_1.AuditPendingIssues(this.docsDir);
106
+ this.findingTracer = new audit_1.AuditFindingTracer(this.docsDir);
107
+ this.ciBlocker = new audit_1.AuditCiBlocker(this.docsDir);
108
+ this.reflectionBridge = new audit_1.AuditReflectionBridge();
109
+ }
110
+ // ── recordGate ─────────────────────────────────────────────────────────────
111
+ /**
112
+ * @description Registra el resultado de un gate individual.
113
+ * Si skipIfEmpty=true y es auto-GO sin hallazgos, solo acumula en buffer diario
114
+ * sin persistir archivo individual.
115
+ */
116
+ async recordGate(gate, agente, veredicto, hallazgos, task, notas, skipIfEmpty) {
117
+ const isAutoEmpty = skipIfEmpty === true && veredicto === 'GO' && hallazgos.length === 0;
118
+ const fecha = getFormattedDate();
119
+ const record = { gate, agente, veredicto, fecha, hallazgos, notas };
120
+ this.gates.push(record);
121
+ // Auto-GO sin hallazgos → buffer diario, no persiste
122
+ if (isAutoEmpty) {
123
+ this.silentBuffer.add(gate, agente, fecha, veredicto, notas);
124
+ return '';
125
+ }
126
+ // Cargar y versionar: gate individual → patch
127
+ await this.versionManager.load();
128
+ this.versionManager.incrementPatch();
129
+ const version = this.versionManager.getVersionString();
130
+ const content = this.renderer.renderGateReport(record, version, fecha, task);
131
+ const suffix = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 6)}`;
132
+ const filename = `gate-${(0, agent_core_2.sanitizeFilename)(gate)}-${version}-${suffix}.md`;
133
+ await this.ensureDocsDir();
134
+ await this.versionManager.save();
135
+ const filePath = path.join(this.docsDir, filename);
136
+ await fs.writeFile(filePath, content, 'utf-8');
137
+ return filePath;
138
+ }
139
+ // ── generateFinalReport ────────────────────────────────────────────────────
140
+ /**
141
+ * @description Genera el informe final consolidado con todos los gates,
142
+ * veredicto general y plan de remediación. Incrementa minor.
143
+ */
144
+ async generateFinalReport(sprint) {
145
+ await this.versionManager.load();
146
+ this.versionManager.incrementMinor();
147
+ const fecha = getFormattedDate();
148
+ const version = this.versionManager.getVersionString();
149
+ const veredictoFinal = this.calculateFinalVeredict();
150
+ const riesgos = this.calculateAccumulatedRisks();
151
+ const resumen = this.renderer.buildExecutiveSummary(sprint, veredictoFinal, this.gates);
152
+ const report = { sprint, gates: this.gates, veredictoFinal, resumen, riesgos, fecha };
153
+ const content = this.renderer.renderFinalReport(report, version, fecha);
154
+ const filename = `informe-final-multigate-${(0, agent_core_2.sanitizeFilename)(sprint.name)}-v${version}.md`;
155
+ await this.ensureDocsDir();
156
+ await this.versionManager.save();
157
+ const filePath = path.join(this.docsDir, filename);
158
+ await fs.writeFile(filePath, content, 'utf-8');
159
+ // Generar memo de lecciones aprendidas
160
+ await this.lessons.generateMemo(this.gates).catch(() => { });
161
+ return filePath;
162
+ }
163
+ // ── Getters básicos ────────────────────────────────────────────────────────
164
+ getGates() {
165
+ return this.gates.map(g => ({ ...g, hallazgos: g.hallazgos.map(h => ({ ...h })) }));
166
+ }
167
+ reset() {
168
+ this.gates = [];
169
+ }
170
+ getAuditsDir() {
171
+ return this.docsDir;
172
+ }
173
+ // ── Lecciones aprendidas ───────────────────────────────────────────────────
174
+ getLessonsLearned() {
175
+ return this.lessons.analyze(this.gates);
176
+ }
177
+ async generateLessonsMemo() {
178
+ return this.lessons.generateMemo(this.gates);
179
+ }
180
+ // ── Blockers básicos ───────────────────────────────────────────────────────
181
+ hasActiveBlockers() {
182
+ return this.gates.some(g => g.hallazgos.some(h => h.severidad === 'critical' || h.severidad === 'high'));
183
+ }
184
+ getActiveBlockers() {
185
+ return this.gates.flatMap(g => g.hallazgos.filter(h => h.severidad === 'critical' || h.severidad === 'high'));
186
+ }
187
+ getStats() {
188
+ const total = this.gates.length;
189
+ const withFindings = this.gates.filter(g => g.hallazgos.length > 0).length;
190
+ const goCount = this.gates.filter(g => g.veredicto === 'GO').length;
191
+ return {
192
+ totalGates: total,
193
+ withFindings,
194
+ approvalRate: total > 0 ? Math.round((goCount / total) * 100) : 0,
195
+ lessonsCount: this.getLessonsLearned().length,
196
+ };
197
+ }
198
+ // ── Silent gates (batch diario) ────────────────────────────────────────────
199
+ /**
200
+ * @description Genera un reporte diario con todos los auto-gates silenciosos
201
+ * acumulados. Reduce 130+ archivos individuales a 1 reporte diario consolidado.
202
+ *
203
+ * @see docs/auditorias/mejoras-audit-reporter.md
204
+ */
205
+ async generateDailySilentGatesReport(fecha) {
206
+ return this.silentBuffer.generateDailyReport(fecha);
207
+ }
208
+ getSilentGates() {
209
+ return this.silentBuffer.getAll();
210
+ }
211
+ clearSilentGates() {
212
+ this.silentBuffer.clear();
213
+ }
214
+ // ── Complete Sprint ────────────────────────────────────────────────────────
215
+ /**
216
+ * @description Completa un sprint generando el informe final, reporte diario
217
+ * de auto-gates, y pending issues si el veredicto es NO-GO.
218
+ *
219
+ * @see docs/auditorias/mejoras-audit-reporter.md
220
+ */
221
+ async completeSprint(sprint, finalVeredict) {
222
+ const silentReportPath = await this.silentBuffer.generateDailyReport();
223
+ const reportPath = await this.generateFinalReport(sprint);
224
+ const veredicto = finalVeredict ?? this.calculateFinalVeredict();
225
+ const issues = [];
226
+ if (veredicto === 'NO-GO' || veredicto === 'NO-GO condicional') {
227
+ for (const gate of this.gates) {
228
+ for (const hallazgo of gate.hallazgos) {
229
+ if (hallazgo.severidad === 'critical' || hallazgo.severidad === 'high') {
230
+ issues.push({ ...hallazgo });
231
+ }
232
+ }
233
+ }
234
+ if (issues.length > 0) {
235
+ await this.pendingIssues.persist(issues, sprint, veredicto);
236
+ }
237
+ }
238
+ // Reportar hallazgos al Reflection Engine (si está conectado)
239
+ await this.reflectionBridge.reportFindings(this.gates).catch((err) => {
240
+ console.warn("[AuditReporter] Error en reportToReflectionEngine:", err?.message);
241
+ });
242
+ this.silentBuffer.clear();
243
+ this.gates = [];
244
+ return { reportPath, pendingIssues: issues, silentReportPath };
245
+ }
246
+ // ── Trazabilidad Hallazgo → Commit ─────────────────────────────────────────
247
+ /**
248
+ * @description Marca un hallazgo como resuelto, asociándolo con un commit.
249
+ * Busca en memoria y en disco.
250
+ *
251
+ * @see docs/auditorias/mejoras-audit-reporter.md
252
+ */
253
+ async markFindingResolved(findingId, commitHash, commitMessage) {
254
+ return this.findingTracer.markResolved(this.gates, findingId, commitHash, commitMessage);
255
+ }
256
+ /**
257
+ * @description Marca hallazgos como resueltos buscando por archivos modificados
258
+ * en el commit. Útil para hook post-commit.
259
+ */
260
+ async markFindingsResolvedByFiles(commitHash, modifiedFiles) {
261
+ return this.findingTracer.markResolvedByFiles(this.gates, commitHash, modifiedFiles);
262
+ }
263
+ // ── CLI audit check (bloqueo de deploys) ────────────────────────────────────
264
+ /**
265
+ * @description Verifica si hay hallazgos críticos/altos sin resolver.
266
+ * Útil para CI/CD: si retorna true, el pipeline debe fallar.
267
+ *
268
+ * @see docs/auditorias/mejoras-audit-reporter.md
269
+ */
270
+ async hasCriticalOpenFindings() {
271
+ return this.ciBlocker.hasCriticalOpenFindings(this.gates);
272
+ }
273
+ /**
274
+ * @description Genera reporte de estado para CI/CD.
275
+ */
276
+ async generateCiReport() {
277
+ return this.ciBlocker.generateCiReport(this.gates);
278
+ }
279
+ // ── Reflexión ──────────────────────────────────────────────────
280
+ /**
281
+ * @description Conecta el AuditReporter con el Reflection Engine.
282
+ *
283
+ * @see docs/auditorias/mejoras-audit-reporter.md
284
+ */
285
+ connectReflectionEngine(engine) {
286
+ this.reflectionBridge.connect(engine);
287
+ }
288
+ /**
289
+ * @description Desconecta el Reflection Engine.
290
+ */
291
+ disconnectReflectionEngine() {
292
+ this.reflectionBridge.disconnect();
293
+ }
294
+ // ── Privados ───────────────────────────────────────────────────────────────
295
+ async ensureDocsDir() {
296
+ await fs.mkdir(this.docsDir, { recursive: true });
297
+ }
298
+ calculateFinalVeredict() {
299
+ if (this.gates.length === 0)
300
+ return 'NO-GO';
301
+ if (this.gates.some(g => g.veredicto === 'NO-GO' && g.hallazgos.some(h => h.severidad === 'critical')))
302
+ return 'NO-GO';
303
+ if (this.gates.some(g => g.veredicto === 'NO-GO'))
304
+ return 'NO-GO condicional';
305
+ if (this.gates.some(g => g.veredicto === 'NO-GO condicional'))
306
+ return 'NO-GO condicional';
307
+ return 'GO';
308
+ }
309
+ calculateAccumulatedRisks() {
310
+ const criticalFindings = this.gates.flatMap(g => g.hallazgos.filter(h => h.severidad === 'critical' || h.severidad === 'high'));
311
+ if (criticalFindings.length === 0)
312
+ return [];
313
+ return criticalFindings.slice(0, 5).map(h => ({
314
+ riesgo: h.hallazgo,
315
+ probabilidad: h.severidad === 'critical' ? '🔴 Alta' : '🟡 Media',
316
+ impacto: h.severidad === 'critical' ? '🔴 Crítico' : '🟡 Alto',
317
+ mitigacion: h.recomendacion,
318
+ }));
319
+ }
320
+ }
321
+ exports.AuditReporter = AuditReporter;
322
+ //# sourceMappingURL=audit-reporter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"audit-reporter.js","sourceRoot":"","sources":["../../../src/pipeline/orchest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