codingbuddy 5.1.3 → 5.3.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 (483) hide show
  1. package/README.md +9 -0
  2. package/dist/src/agent/agent-prompt.builder.js +135 -2
  3. package/dist/src/agent/agent-stack.loader.d.ts +3 -0
  4. package/dist/src/agent/agent-stack.loader.js +38 -0
  5. package/dist/src/agent/agent-stack.schema.d.ts +14 -0
  6. package/dist/src/agent/agent-stack.schema.js +19 -0
  7. package/dist/src/agent/agent-stack.service.d.ts +15 -0
  8. package/dist/src/agent/agent-stack.service.js +112 -0
  9. package/dist/src/agent/agent.module.js +5 -2
  10. package/dist/src/agent/agent.service.d.ts +8 -1
  11. package/dist/src/agent/agent.service.js +126 -40
  12. package/dist/src/agent/agent.types.d.ts +26 -46
  13. package/dist/src/agent/council-preset.service.d.ts +6 -0
  14. package/dist/src/agent/council-preset.service.js +46 -0
  15. package/dist/src/agent/council-preset.types.d.ts +6 -0
  16. package/dist/src/agent/council-preset.types.js +3 -0
  17. package/dist/src/agent/execution-plan.d.ts +8 -0
  18. package/dist/src/agent/execution-plan.js +73 -0
  19. package/dist/src/agent/execution-plan.types.d.ts +74 -0
  20. package/dist/src/agent/execution-plan.types.js +3 -0
  21. package/dist/src/agent/index.d.ts +8 -0
  22. package/dist/src/agent/index.js +8 -0
  23. package/dist/src/agent/teams-capability.service.d.ts +11 -0
  24. package/dist/src/agent/teams-capability.service.js +74 -0
  25. package/dist/src/agent/teams-capability.types.d.ts +6 -0
  26. package/dist/src/agent/teams-capability.types.js +3 -0
  27. package/dist/src/app.module.js +2 -0
  28. package/dist/src/cli/cli.d.ts +4 -3
  29. package/dist/src/cli/cli.js +172 -1
  30. package/dist/src/cli/cli.types.d.ts +18 -0
  31. package/dist/src/cli/completion/completion.d.ts +16 -0
  32. package/dist/src/cli/completion/completion.js +276 -0
  33. package/dist/src/cli/completion/index.d.ts +2 -0
  34. package/dist/src/cli/completion/index.js +7 -0
  35. package/dist/src/cli/init/init.constants.js +0 -1
  36. package/dist/src/cli/plugin/create-plugin.command.d.ts +21 -0
  37. package/dist/src/cli/plugin/create-plugin.command.js +151 -0
  38. package/dist/src/cli/plugin/install.command.d.ts +10 -0
  39. package/dist/src/cli/plugin/install.command.js +31 -0
  40. package/dist/src/cli/plugin/plugins.command.d.ts +9 -0
  41. package/dist/src/cli/plugin/plugins.command.js +51 -0
  42. package/dist/src/cli/plugin/search.command.d.ts +9 -0
  43. package/dist/src/cli/plugin/search.command.js +53 -0
  44. package/dist/src/cli/plugin/uninstall.command.d.ts +12 -0
  45. package/dist/src/cli/plugin/uninstall.command.js +79 -0
  46. package/dist/src/cli/plugin/update.command.d.ts +11 -0
  47. package/dist/src/cli/plugin/update.command.js +103 -0
  48. package/dist/src/cli/run-tui.d.ts +1 -0
  49. package/dist/src/cli/run-tui.js +7 -1
  50. package/dist/src/collaboration/council-summary.service.d.ts +2 -0
  51. package/dist/src/collaboration/council-summary.service.js +114 -0
  52. package/dist/src/collaboration/council-summary.types.d.ts +24 -0
  53. package/dist/src/collaboration/council-summary.types.js +3 -0
  54. package/dist/src/collaboration/index.d.ts +2 -0
  55. package/dist/src/collaboration/index.js +3 -1
  56. package/dist/src/config/config.schema.d.ts +3 -0
  57. package/dist/src/config/config.schema.js +5 -0
  58. package/dist/src/context/briefing-loader.service.d.ts +27 -0
  59. package/dist/src/context/briefing-loader.service.js +124 -0
  60. package/dist/src/context/briefing.service.d.ts +27 -0
  61. package/dist/src/context/briefing.service.js +181 -0
  62. package/dist/src/context/briefing.types.d.ts +13 -0
  63. package/dist/src/context/briefing.types.js +6 -0
  64. package/dist/src/context/context.module.js +16 -2
  65. package/dist/src/context/index.d.ts +2 -0
  66. package/dist/src/context/index.js +2 -0
  67. package/dist/src/keyword/keyword.types.d.ts +8 -0
  68. package/dist/src/main.js +0 -17
  69. package/dist/src/mcp/handlers/agent.handler.d.ts +6 -1
  70. package/dist/src/mcp/handlers/agent.handler.js +81 -8
  71. package/dist/src/mcp/handlers/briefing.handler.d.ts +12 -0
  72. package/dist/src/mcp/handlers/briefing.handler.js +71 -0
  73. package/dist/src/mcp/handlers/checklist-context.handler.d.ts +3 -1
  74. package/dist/src/mcp/handlers/checklist-context.handler.js +17 -2
  75. package/dist/src/mcp/handlers/discussion.handler.d.ts +3 -0
  76. package/dist/src/mcp/handlers/discussion.handler.js +22 -1
  77. package/dist/src/mcp/handlers/index.d.ts +4 -0
  78. package/dist/src/mcp/handlers/index.js +9 -1
  79. package/dist/src/mcp/handlers/mode.handler.d.ts +9 -1
  80. package/dist/src/mcp/handlers/mode.handler.js +79 -2
  81. package/dist/src/mcp/handlers/quality-report.handler.d.ts +14 -0
  82. package/dist/src/mcp/handlers/quality-report.handler.js +93 -0
  83. package/dist/src/mcp/handlers/resume.handler.d.ts +12 -0
  84. package/dist/src/mcp/handlers/resume.handler.js +63 -0
  85. package/dist/src/mcp/handlers/rule-impact.handler.d.ts +23 -0
  86. package/dist/src/mcp/handlers/rule-impact.handler.js +241 -0
  87. package/dist/src/mcp/handlers/skill.handler.js +2 -2
  88. package/dist/src/mcp/mcp.module.js +6 -0
  89. package/dist/src/plugin/plugin-installer.service.d.ts +41 -0
  90. package/dist/src/plugin/plugin-installer.service.js +183 -0
  91. package/dist/src/plugin/plugin-manifest.schema.d.ts +21 -0
  92. package/dist/src/plugin/plugin-manifest.schema.js +45 -0
  93. package/dist/src/plugin/plugin.module.d.ts +2 -0
  94. package/dist/src/plugin/plugin.module.js +17 -0
  95. package/dist/src/plugin/plugin.types.d.ts +7 -0
  96. package/dist/src/plugin/plugin.types.js +3 -0
  97. package/dist/src/plugin/registry-client.d.ts +24 -0
  98. package/dist/src/plugin/registry-client.js +45 -0
  99. package/dist/src/rules/rule-event-collector.d.ts +7 -0
  100. package/dist/src/rules/rule-event-collector.js +38 -0
  101. package/dist/src/rules/rule-event.types.d.ts +9 -0
  102. package/dist/src/rules/rule-event.types.js +10 -0
  103. package/dist/src/rules/rule-stats-writer.d.ts +23 -0
  104. package/dist/src/rules/rule-stats-writer.js +138 -0
  105. package/dist/src/rules/rules.module.js +4 -2
  106. package/dist/src/rules/rules.service.d.ts +8 -1
  107. package/dist/src/rules/rules.service.js +3 -0
  108. package/dist/src/rules/skill.schema.d.ts +10 -0
  109. package/dist/src/rules/skill.schema.js +42 -0
  110. package/dist/src/shared/rules-core.d.ts +7 -1
  111. package/dist/src/shared/rules-core.js +6 -0
  112. package/dist/src/shared/version.d.ts +1 -1
  113. package/dist/src/shared/version.js +1 -1
  114. package/dist/src/ship/file-specialist-mapper.d.ts +9 -0
  115. package/dist/src/ship/file-specialist-mapper.js +56 -0
  116. package/dist/src/ship/quality-report.service.d.ts +6 -0
  117. package/dist/src/ship/quality-report.service.js +56 -0
  118. package/dist/src/ship/quality-report.types.d.ts +20 -0
  119. package/dist/src/ship/quality-report.types.js +3 -0
  120. package/dist/src/ship/ship.module.d.ts +2 -0
  121. package/dist/src/ship/ship.module.js +21 -0
  122. package/dist/src/skill/i18n/keywords.js +921 -0
  123. package/dist/src/skill/skill-recommendation.service.d.ts +10 -2
  124. package/dist/src/skill/skill-recommendation.service.js +120 -16
  125. package/dist/src/skill/skill-recommendation.types.d.ts +5 -0
  126. package/dist/src/skill/skill.module.js +2 -0
  127. package/dist/src/tui/events/hud-file-bridge.d.ts +4 -0
  128. package/dist/src/tui/events/hud-file-bridge.js +36 -0
  129. package/dist/src/tui/testing/tui-test-utils.d.ts +2 -0
  130. package/dist/src/tui/testing/tui-test-utils.js +25 -0
  131. package/dist/src/tui-bundle.mjs +239 -36
  132. package/package.json +7 -2
  133. package/dist/api/mcp.js.map +0 -1
  134. package/dist/src/agent/agent-prompt.builder.js.map +0 -1
  135. package/dist/src/agent/agent-summary.utils.js.map +0 -1
  136. package/dist/src/agent/agent.module.js.map +0 -1
  137. package/dist/src/agent/agent.service.js.map +0 -1
  138. package/dist/src/agent/agent.types.js.map +0 -1
  139. package/dist/src/agent/index.js.map +0 -1
  140. package/dist/src/analyzer/analyzer.module.js.map +0 -1
  141. package/dist/src/analyzer/analyzer.service.js.map +0 -1
  142. package/dist/src/analyzer/analyzer.types.js.map +0 -1
  143. package/dist/src/analyzer/code.sampler.js.map +0 -1
  144. package/dist/src/analyzer/config.analyzer.js.map +0 -1
  145. package/dist/src/analyzer/conventions.analyzer.js.map +0 -1
  146. package/dist/src/analyzer/conventions.schemas.js.map +0 -1
  147. package/dist/src/analyzer/conventions.types.js.map +0 -1
  148. package/dist/src/analyzer/directory.analyzer.js.map +0 -1
  149. package/dist/src/analyzer/index.js.map +0 -1
  150. package/dist/src/analyzer/package.analyzer.js.map +0 -1
  151. package/dist/src/app.module.js.map +0 -1
  152. package/dist/src/checklist/checklist.module.js.map +0 -1
  153. package/dist/src/checklist/checklist.schema.js.map +0 -1
  154. package/dist/src/checklist/checklist.service.js.map +0 -1
  155. package/dist/src/checklist/checklist.types.js.map +0 -1
  156. package/dist/src/checklist/index.js.map +0 -1
  157. package/dist/src/cli/cli.js.map +0 -1
  158. package/dist/src/cli/cli.types.js.map +0 -1
  159. package/dist/src/cli/index.js.map +0 -1
  160. package/dist/src/cli/init/claude-settings.utils.js.map +0 -1
  161. package/dist/src/cli/init/config.generator.js.map +0 -1
  162. package/dist/src/cli/init/config.writer.js.map +0 -1
  163. package/dist/src/cli/init/gitignore.utils.js.map +0 -1
  164. package/dist/src/cli/init/index.js.map +0 -1
  165. package/dist/src/cli/init/init.command.js.map +0 -1
  166. package/dist/src/cli/init/init.constants.js.map +0 -1
  167. package/dist/src/cli/init/init.wizard.js.map +0 -1
  168. package/dist/src/cli/init/prompt.builder.js.map +0 -1
  169. package/dist/src/cli/init/prompts/agent-prompt.js.map +0 -1
  170. package/dist/src/cli/init/prompts/architecture-prompt.js.map +0 -1
  171. package/dist/src/cli/init/prompts/basic-prompt.js.map +0 -1
  172. package/dist/src/cli/init/prompts/conventions-prompt.js.map +0 -1
  173. package/dist/src/cli/init/prompts/index.js.map +0 -1
  174. package/dist/src/cli/init/prompts/language-prompt.js.map +0 -1
  175. package/dist/src/cli/init/prompts/model-prompt.js.map +0 -1
  176. package/dist/src/cli/init/prompts/tech-stack-prompt.js.map +0 -1
  177. package/dist/src/cli/init/prompts/test-strategy-prompt.js.map +0 -1
  178. package/dist/src/cli/init/summary/index.js.map +0 -1
  179. package/dist/src/cli/init/summary/summary.prompt.js.map +0 -1
  180. package/dist/src/cli/init/summary/summary.renderer.js.map +0 -1
  181. package/dist/src/cli/init/templates/config-renderer.js.map +0 -1
  182. package/dist/src/cli/init/templates/frameworks/default.template.js.map +0 -1
  183. package/dist/src/cli/init/templates/frameworks/express.template.js.map +0 -1
  184. package/dist/src/cli/init/templates/frameworks/index.js.map +0 -1
  185. package/dist/src/cli/init/templates/frameworks/nestjs.template.js.map +0 -1
  186. package/dist/src/cli/init/templates/frameworks/nextjs.template.js.map +0 -1
  187. package/dist/src/cli/init/templates/frameworks/node.template.js.map +0 -1
  188. package/dist/src/cli/init/templates/frameworks/react.template.js.map +0 -1
  189. package/dist/src/cli/init/templates/index.js.map +0 -1
  190. package/dist/src/cli/init/templates/template.renderer.js.map +0 -1
  191. package/dist/src/cli/init/templates/template.selector.js.map +0 -1
  192. package/dist/src/cli/init/templates/template.types.js.map +0 -1
  193. package/dist/src/cli/restart-tui.js.map +0 -1
  194. package/dist/src/cli/run-tui.js.map +0 -1
  195. package/dist/src/cli/utils/console.js.map +0 -1
  196. package/dist/src/cli/utils/index.js.map +0 -1
  197. package/dist/src/collaboration/discussion-engine.js.map +0 -1
  198. package/dist/src/collaboration/index.js.map +0 -1
  199. package/dist/src/collaboration/opinion-adapter.js.map +0 -1
  200. package/dist/src/collaboration/terminal-formatter.js.map +0 -1
  201. package/dist/src/collaboration/types.js.map +0 -1
  202. package/dist/src/config/config-diff.service.js.map +0 -1
  203. package/dist/src/config/config.loader.js.map +0 -1
  204. package/dist/src/config/config.module.js.map +0 -1
  205. package/dist/src/config/config.schema.js.map +0 -1
  206. package/dist/src/config/config.service.js.map +0 -1
  207. package/dist/src/config/context.loader.js.map +0 -1
  208. package/dist/src/config/ignore.parser.js.map +0 -1
  209. package/dist/src/config/index.js.map +0 -1
  210. package/dist/src/context/context-archive.service.js.map +0 -1
  211. package/dist/src/context/context-archive.types.js.map +0 -1
  212. package/dist/src/context/context-document.service.js.map +0 -1
  213. package/dist/src/context/context-document.types.js.map +0 -1
  214. package/dist/src/context/context-parser.utils.js.map +0 -1
  215. package/dist/src/context/context-serializer.utils.js.map +0 -1
  216. package/dist/src/context/context.module.js.map +0 -1
  217. package/dist/src/context/context.service.js.map +0 -1
  218. package/dist/src/context/context.types.js.map +0 -1
  219. package/dist/src/context/index.js.map +0 -1
  220. package/dist/src/context/intent-patterns.js.map +0 -1
  221. package/dist/src/custom/custom.module.js.map +0 -1
  222. package/dist/src/custom/custom.service.js.map +0 -1
  223. package/dist/src/custom/custom.types.js.map +0 -1
  224. package/dist/src/custom/index.js.map +0 -1
  225. package/dist/src/diagnostic/diagnostic-log.service.js.map +0 -1
  226. package/dist/src/diagnostic/diagnostic.module.js.map +0 -1
  227. package/dist/src/diagnostic/diagnostic.types.js.map +0 -1
  228. package/dist/src/diagnostic/index.js.map +0 -1
  229. package/dist/src/impact/impact-event.service.js.map +0 -1
  230. package/dist/src/impact/impact-report.service.js.map +0 -1
  231. package/dist/src/impact/impact.module.js.map +0 -1
  232. package/dist/src/impact/impact.types.js.map +0 -1
  233. package/dist/src/impact/index.js.map +0 -1
  234. package/dist/src/keyword/activation-message.builder.js.map +0 -1
  235. package/dist/src/keyword/auto-executor.js.map +0 -1
  236. package/dist/src/keyword/auto-executor.types.js.map +0 -1
  237. package/dist/src/keyword/auto-formatter.js.map +0 -1
  238. package/dist/src/keyword/auto-prompt-builder.js.map +0 -1
  239. package/dist/src/keyword/complexity-classifier.js.map +0 -1
  240. package/dist/src/keyword/complexity-indicators.js.map +0 -1
  241. package/dist/src/keyword/diff-analyzer.js.map +0 -1
  242. package/dist/src/keyword/explicit-pattern-matcher.js.map +0 -1
  243. package/dist/src/keyword/index.js.map +0 -1
  244. package/dist/src/keyword/keyword.module.js.map +0 -1
  245. package/dist/src/keyword/keyword.service.js.map +0 -1
  246. package/dist/src/keyword/keyword.types.js.map +0 -1
  247. package/dist/src/keyword/patterns/agent.patterns.js.map +0 -1
  248. package/dist/src/keyword/patterns/ai-ml.patterns.js.map +0 -1
  249. package/dist/src/keyword/patterns/backend.patterns.js.map +0 -1
  250. package/dist/src/keyword/patterns/context.patterns.js.map +0 -1
  251. package/dist/src/keyword/patterns/data-science.patterns.js.map +0 -1
  252. package/dist/src/keyword/patterns/data.patterns.js.map +0 -1
  253. package/dist/src/keyword/patterns/devops.patterns.js.map +0 -1
  254. package/dist/src/keyword/patterns/explicit.patterns.js.map +0 -1
  255. package/dist/src/keyword/patterns/frontend.patterns.js.map +0 -1
  256. package/dist/src/keyword/patterns/index.js.map +0 -1
  257. package/dist/src/keyword/patterns/intent-pattern-checks.js.map +0 -1
  258. package/dist/src/keyword/patterns/intent-patterns.types.js.map +0 -1
  259. package/dist/src/keyword/patterns/meta-discussion.patterns.js.map +0 -1
  260. package/dist/src/keyword/patterns/mobile.patterns.js.map +0 -1
  261. package/dist/src/keyword/patterns/platform.patterns.js.map +0 -1
  262. package/dist/src/keyword/patterns/security.patterns.js.map +0 -1
  263. package/dist/src/keyword/patterns/systems.patterns.js.map +0 -1
  264. package/dist/src/keyword/patterns/test.patterns.js.map +0 -1
  265. package/dist/src/keyword/patterns/tooling.patterns.js.map +0 -1
  266. package/dist/src/keyword/primary-agent-resolver.js.map +0 -1
  267. package/dist/src/keyword/rule-filter.js.map +0 -1
  268. package/dist/src/keyword/srp-template.js.map +0 -1
  269. package/dist/src/keyword/strategies/__tests__/strategy-test.utils.js.map +0 -1
  270. package/dist/src/keyword/strategies/act-agent.strategy.js.map +0 -1
  271. package/dist/src/keyword/strategies/eval-agent.strategy.js.map +0 -1
  272. package/dist/src/keyword/strategies/index.js.map +0 -1
  273. package/dist/src/keyword/strategies/plan-agent.strategy.js.map +0 -1
  274. package/dist/src/keyword/strategies/resolution-strategy.interface.js.map +0 -1
  275. package/dist/src/keyword/taskmaestro-detector.js.map +0 -1
  276. package/dist/src/keyword/visual-data.builder.js.map +0 -1
  277. package/dist/src/main.js.map +0 -1
  278. package/dist/src/mcp/handlers/abstract-handler.js.map +0 -1
  279. package/dist/src/mcp/handlers/agent.handler.js.map +0 -1
  280. package/dist/src/mcp/handlers/base.handler.js.map +0 -1
  281. package/dist/src/mcp/handlers/checklist-context.handler.js.map +0 -1
  282. package/dist/src/mcp/handlers/config.handler.js.map +0 -1
  283. package/dist/src/mcp/handlers/context-archive.handler.js.map +0 -1
  284. package/dist/src/mcp/handlers/context-document.handler.js.map +0 -1
  285. package/dist/src/mcp/handlers/conventions.handler.js.map +0 -1
  286. package/dist/src/mcp/handlers/discussion.handler.js.map +0 -1
  287. package/dist/src/mcp/handlers/discussion.types.js.map +0 -1
  288. package/dist/src/mcp/handlers/impact.handler.js.map +0 -1
  289. package/dist/src/mcp/handlers/index.js.map +0 -1
  290. package/dist/src/mcp/handlers/mode.handler.js.map +0 -1
  291. package/dist/src/mcp/handlers/pipeline.handler.js.map +0 -1
  292. package/dist/src/mcp/handlers/plugin-validation.handler.js.map +0 -1
  293. package/dist/src/mcp/handlers/release-check.handler.js.map +0 -1
  294. package/dist/src/mcp/handlers/rule-insights.handler.js.map +0 -1
  295. package/dist/src/mcp/handlers/rules.handler.js.map +0 -1
  296. package/dist/src/mcp/handlers/skill.handler.js.map +0 -1
  297. package/dist/src/mcp/handlers/tui.handler.js.map +0 -1
  298. package/dist/src/mcp/mcp-serverless.js.map +0 -1
  299. package/dist/src/mcp/mcp.controller.js.map +0 -1
  300. package/dist/src/mcp/mcp.module.js.map +0 -1
  301. package/dist/src/mcp/mcp.service.js.map +0 -1
  302. package/dist/src/mcp/response.utils.js.map +0 -1
  303. package/dist/src/mcp/sse-auth.guard.js.map +0 -1
  304. package/dist/src/model/index.js.map +0 -1
  305. package/dist/src/model/model-resolver.service.js.map +0 -1
  306. package/dist/src/model/model.constants.js.map +0 -1
  307. package/dist/src/model/model.resolver.js.map +0 -1
  308. package/dist/src/model/model.types.js.map +0 -1
  309. package/dist/src/parallel-validation/extract-file-paths.js.map +0 -1
  310. package/dist/src/parallel-validation/index.js.map +0 -1
  311. package/dist/src/parallel-validation/overlap-matrix.js.map +0 -1
  312. package/dist/src/parallel-validation/parallel-validation.handler.js.map +0 -1
  313. package/dist/src/parallel-validation/parallel-validation.types.js.map +0 -1
  314. package/dist/src/parallel-validation/wave-splitter.js.map +0 -1
  315. package/dist/src/pipeline/index.js.map +0 -1
  316. package/dist/src/pipeline/pipeline.executors.js.map +0 -1
  317. package/dist/src/pipeline/pipeline.module.js.map +0 -1
  318. package/dist/src/pipeline/pipeline.service.js.map +0 -1
  319. package/dist/src/pipeline/pipeline.types.js.map +0 -1
  320. package/dist/src/rules/agent.schema.js.map +0 -1
  321. package/dist/src/rules/rule-insights.service.js.map +0 -1
  322. package/dist/src/rules/rule-tracker.js.map +0 -1
  323. package/dist/src/rules/rules-content.utils.js.map +0 -1
  324. package/dist/src/rules/rules.module.js.map +0 -1
  325. package/dist/src/rules/rules.service.js.map +0 -1
  326. package/dist/src/rules/rules.types.js.map +0 -1
  327. package/dist/src/rules/skill.schema.js.map +0 -1
  328. package/dist/src/shared/agent.utils.js.map +0 -1
  329. package/dist/src/shared/async.utils.js.map +0 -1
  330. package/dist/src/shared/client-type.js.map +0 -1
  331. package/dist/src/shared/error.utils.js.map +0 -1
  332. package/dist/src/shared/esm-import.js.map +0 -1
  333. package/dist/src/shared/event-bridge-reader.js.map +0 -1
  334. package/dist/src/shared/file.utils.js.map +0 -1
  335. package/dist/src/shared/filesystem.interface.js.map +0 -1
  336. package/dist/src/shared/format.utils.js.map +0 -1
  337. package/dist/src/shared/keyword-core.js.map +0 -1
  338. package/dist/src/shared/language.service.js.map +0 -1
  339. package/dist/src/shared/language.types.js.map +0 -1
  340. package/dist/src/shared/lru-cache.js.map +0 -1
  341. package/dist/src/shared/node-filesystem.service.js.map +0 -1
  342. package/dist/src/shared/path.utils.js.map +0 -1
  343. package/dist/src/shared/pattern-matcher.js.map +0 -1
  344. package/dist/src/shared/rules-core.js.map +0 -1
  345. package/dist/src/shared/security.utils.js.map +0 -1
  346. package/dist/src/shared/slug.utils.js.map +0 -1
  347. package/dist/src/shared/tui-bundle-path.js.map +0 -1
  348. package/dist/src/shared/validation.constants.js.map +0 -1
  349. package/dist/src/shared/verbosity.types.js.map +0 -1
  350. package/dist/src/shared/version.js.map +0 -1
  351. package/dist/src/shared/version.utils.js.map +0 -1
  352. package/dist/src/skill/i18n/index.js.map +0 -1
  353. package/dist/src/skill/i18n/keywords.js.map +0 -1
  354. package/dist/src/skill/i18n/keywords.types.js.map +0 -1
  355. package/dist/src/skill/index.js.map +0 -1
  356. package/dist/src/skill/skill-content.utils.js.map +0 -1
  357. package/dist/src/skill/skill-recommendation.service.js.map +0 -1
  358. package/dist/src/skill/skill-recommendation.types.js.map +0 -1
  359. package/dist/src/skill/skill-triggers.js.map +0 -1
  360. package/dist/src/skill/skill.module.js.map +0 -1
  361. package/dist/src/state/index.js.map +0 -1
  362. package/dist/src/state/state.module.js.map +0 -1
  363. package/dist/src/state/state.service.js.map +0 -1
  364. package/dist/src/state/state.types.js.map +0 -1
  365. package/dist/src/tui/__perf__/memory-stability.spec.d.ts +0 -1
  366. package/dist/src/tui/__perf__/memory-stability.spec.js +0 -105
  367. package/dist/src/tui/__perf__/memory-stability.spec.js.map +0 -1
  368. package/dist/src/tui/__perf__/rendering-performance.spec.d.ts +0 -1
  369. package/dist/src/tui/__perf__/rendering-performance.spec.js +0 -166
  370. package/dist/src/tui/__perf__/rendering-performance.spec.js.map +0 -1
  371. package/dist/src/tui/cli-flags.js.map +0 -1
  372. package/dist/src/tui/components/ActModeScreen.js.map +0 -1
  373. package/dist/src/tui/components/ActivityVisualizer.js.map +0 -1
  374. package/dist/src/tui/components/ActivityVisualizer.spec.d.ts +0 -1
  375. package/dist/src/tui/components/ActivityVisualizer.spec.js +0 -91
  376. package/dist/src/tui/components/ActivityVisualizer.spec.js.map +0 -1
  377. package/dist/src/tui/components/AgentDiscussionPanel.js.map +0 -1
  378. package/dist/src/tui/components/AgentDiscussionPanel.spec.d.ts +0 -1
  379. package/dist/src/tui/components/AgentDiscussionPanel.spec.js +0 -229
  380. package/dist/src/tui/components/AgentDiscussionPanel.spec.js.map +0 -1
  381. package/dist/src/tui/components/ChecklistPanel.js.map +0 -1
  382. package/dist/src/tui/components/ChecklistPanel.spec.d.ts +0 -1
  383. package/dist/src/tui/components/ChecklistPanel.spec.js +0 -45
  384. package/dist/src/tui/components/ChecklistPanel.spec.js.map +0 -1
  385. package/dist/src/tui/components/ContextSection.js.map +0 -1
  386. package/dist/src/tui/components/EvalModeScreen.js.map +0 -1
  387. package/dist/src/tui/components/FlowMap.js.map +0 -1
  388. package/dist/src/tui/components/FlowMap.spec.d.ts +0 -1
  389. package/dist/src/tui/components/FlowMap.spec.js +0 -147
  390. package/dist/src/tui/components/FlowMap.spec.js.map +0 -1
  391. package/dist/src/tui/components/FocusedAgentPanel.js.map +0 -1
  392. package/dist/src/tui/components/FocusedAgentPanel.spec.d.ts +0 -1
  393. package/dist/src/tui/components/FocusedAgentPanel.spec.js +0 -183
  394. package/dist/src/tui/components/FocusedAgentPanel.spec.js.map +0 -1
  395. package/dist/src/tui/components/HeaderBar.js.map +0 -1
  396. package/dist/src/tui/components/HeaderBar.spec.d.ts +0 -1
  397. package/dist/src/tui/components/HeaderBar.spec.js +0 -96
  398. package/dist/src/tui/components/HeaderBar.spec.js.map +0 -1
  399. package/dist/src/tui/components/ModeScreenRouter.js.map +0 -1
  400. package/dist/src/tui/components/PlanModeScreen.js.map +0 -1
  401. package/dist/src/tui/components/SessionDashboard.js.map +0 -1
  402. package/dist/src/tui/components/SessionTabBar.js.map +0 -1
  403. package/dist/src/tui/components/SessionTabBar.spec.d.ts +0 -1
  404. package/dist/src/tui/components/SessionTabBar.spec.js +0 -59
  405. package/dist/src/tui/components/SessionTabBar.spec.js.map +0 -1
  406. package/dist/src/tui/components/StageHealthBar.js.map +0 -1
  407. package/dist/src/tui/components/StageHealthBar.spec.d.ts +0 -1
  408. package/dist/src/tui/components/StageHealthBar.spec.js +0 -99
  409. package/dist/src/tui/components/StageHealthBar.spec.js.map +0 -1
  410. package/dist/src/tui/components/act-screen.pure.js.map +0 -1
  411. package/dist/src/tui/components/activity-visualizer.pure.js.map +0 -1
  412. package/dist/src/tui/components/agent-discussion-panel.pure.js.map +0 -1
  413. package/dist/src/tui/components/checklist-panel.pure.js.map +0 -1
  414. package/dist/src/tui/components/context-section.pure.js.map +0 -1
  415. package/dist/src/tui/components/eval-screen.pure.js.map +0 -1
  416. package/dist/src/tui/components/flow-map.pure.js.map +0 -1
  417. package/dist/src/tui/components/focused-agent.pure.js.map +0 -1
  418. package/dist/src/tui/components/grid-layout.pure.js.map +0 -1
  419. package/dist/src/tui/components/index.js.map +0 -1
  420. package/dist/src/tui/components/live.pure.js.map +0 -1
  421. package/dist/src/tui/components/plan-screen.pure.js.map +0 -1
  422. package/dist/src/tui/components/session-dashboard.pure.js.map +0 -1
  423. package/dist/src/tui/components/session-tab-bar.pure.js.map +0 -1
  424. package/dist/src/tui/components/stage-health.pure.js.map +0 -1
  425. package/dist/src/tui/dashboard-app.js.map +0 -1
  426. package/dist/src/tui/dashboard-app.spec.d.ts +0 -1
  427. package/dist/src/tui/dashboard-app.spec.js +0 -158
  428. package/dist/src/tui/dashboard-app.spec.js.map +0 -1
  429. package/dist/src/tui/dashboard-types.js.map +0 -1
  430. package/dist/src/tui/ensure-tui-ready.js.map +0 -1
  431. package/dist/src/tui/eventbus-ui.integration.spec.d.ts +0 -1
  432. package/dist/src/tui/eventbus-ui.integration.spec.js +0 -577
  433. package/dist/src/tui/eventbus-ui.integration.spec.js.map +0 -1
  434. package/dist/src/tui/events/agent-metadata.service.js.map +0 -1
  435. package/dist/src/tui/events/agent-metadata.types.js.map +0 -1
  436. package/dist/src/tui/events/event-bus.js.map +0 -1
  437. package/dist/src/tui/events/events.module.js.map +0 -1
  438. package/dist/src/tui/events/hud-file-bridge.js.map +0 -1
  439. package/dist/src/tui/events/index.js.map +0 -1
  440. package/dist/src/tui/events/parse-agent.js.map +0 -1
  441. package/dist/src/tui/events/parse-tool-response.js.map +0 -1
  442. package/dist/src/tui/events/response-event-extractor.js.map +0 -1
  443. package/dist/src/tui/events/tui-interceptor.js.map +0 -1
  444. package/dist/src/tui/events/types.js.map +0 -1
  445. package/dist/src/tui/hooks/index.js.map +0 -1
  446. package/dist/src/tui/hooks/use-dashboard-state.js.map +0 -1
  447. package/dist/src/tui/hooks/use-focus-agent.js.map +0 -1
  448. package/dist/src/tui/hooks/use-multi-session-state.js.map +0 -1
  449. package/dist/src/tui/hooks/use-terminal-size.js.map +0 -1
  450. package/dist/src/tui/hooks/use-tick.js.map +0 -1
  451. package/dist/src/tui/hooks/use-tick.spec.d.ts +0 -1
  452. package/dist/src/tui/hooks/use-tick.spec.js +0 -70
  453. package/dist/src/tui/hooks/use-tick.spec.js.map +0 -1
  454. package/dist/src/tui/index.js.map +0 -1
  455. package/dist/src/tui/ipc/index.js.map +0 -1
  456. package/dist/src/tui/ipc/instance-registry.js.map +0 -1
  457. package/dist/src/tui/ipc/ipc-bridge.js.map +0 -1
  458. package/dist/src/tui/ipc/ipc-client.js.map +0 -1
  459. package/dist/src/tui/ipc/ipc-debug.js.map +0 -1
  460. package/dist/src/tui/ipc/ipc-server.js.map +0 -1
  461. package/dist/src/tui/ipc/ipc-state-cache.js.map +0 -1
  462. package/dist/src/tui/ipc/ipc.types.js.map +0 -1
  463. package/dist/src/tui/ipc/multi-session-manager.js.map +0 -1
  464. package/dist/src/tui/ipc/shutdown-manager.js.map +0 -1
  465. package/dist/src/tui/ipc/test-utils.js.map +0 -1
  466. package/dist/src/tui/ipc/tui-auto-launcher.js.map +0 -1
  467. package/dist/src/tui/multi-session-app.js.map +0 -1
  468. package/dist/src/tui/multi-session-app.spec.d.ts +0 -1
  469. package/dist/src/tui/multi-session-app.spec.js +0 -95
  470. package/dist/src/tui/multi-session-app.spec.js.map +0 -1
  471. package/dist/src/tui/transport-tui.integration.spec.d.ts +0 -1
  472. package/dist/src/tui/transport-tui.integration.spec.js +0 -189
  473. package/dist/src/tui/transport-tui.integration.spec.js.map +0 -1
  474. package/dist/src/tui/tui-config.js.map +0 -1
  475. package/dist/src/tui/types.js.map +0 -1
  476. package/dist/src/tui/utils/color-buffer.js.map +0 -1
  477. package/dist/src/tui/utils/colors.js.map +0 -1
  478. package/dist/src/tui/utils/display-width.js.map +0 -1
  479. package/dist/src/tui/utils/edge-router.js.map +0 -1
  480. package/dist/src/tui/utils/icons.js.map +0 -1
  481. package/dist/src/tui/utils/index.js.map +0 -1
  482. package/dist/src/tui/utils/theme.js.map +0 -1
  483. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -0,0 +1,151 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validatePluginName = validatePluginName;
4
+ exports.generateMinimalTemplate = generateMinimalTemplate;
5
+ exports.generateFullTemplate = generateFullTemplate;
6
+ exports.runCreatePlugin = runCreatePlugin;
7
+ const fs = require("fs");
8
+ const path = require("path");
9
+ const child_process_1 = require("child_process");
10
+ const console_1 = require("../utils/console");
11
+ const PLUGIN_NAME_REGEX = /^[a-z][a-z0-9-]*$/;
12
+ function validatePluginName(name) {
13
+ return PLUGIN_NAME_REGEX.test(name);
14
+ }
15
+ function getDefaultAuthor() {
16
+ try {
17
+ return (0, child_process_1.execSync)('git config user.name', { encoding: 'utf-8' }).trim();
18
+ }
19
+ catch {
20
+ return 'unknown';
21
+ }
22
+ }
23
+ function generateMinimalTemplate(ctx) {
24
+ const manifest = {
25
+ name: ctx.name,
26
+ version: '1.0.0',
27
+ description: ctx.description,
28
+ author: ctx.author,
29
+ provides: {
30
+ agents: [],
31
+ rules: [],
32
+ skills: [],
33
+ checklists: [],
34
+ },
35
+ };
36
+ const readme = `# ${ctx.name}
37
+
38
+ ${ctx.description}
39
+
40
+ ## Installation
41
+
42
+ \`\`\`bash
43
+ codingbuddy install ./${ctx.name}
44
+ \`\`\`
45
+
46
+ ## Author
47
+
48
+ ${ctx.author}
49
+ `;
50
+ const gitignore = `node_modules/
51
+ dist/
52
+ .DS_Store
53
+ `;
54
+ return {
55
+ 'plugin.json': JSON.stringify(manifest, null, 2),
56
+ 'README.md': readme,
57
+ '.gitignore': gitignore,
58
+ };
59
+ }
60
+ function generateFullTemplate(ctx) {
61
+ const minimalFiles = generateMinimalTemplate(ctx);
62
+ const manifest = JSON.parse(minimalFiles['plugin.json']);
63
+ manifest.provides = {
64
+ agents: ['agents/example-agent.json'],
65
+ rules: ['rules/example-rule.md'],
66
+ skills: ['skills/example-skill.md'],
67
+ checklists: ['checklists/example-checklist.json'],
68
+ };
69
+ const exampleAgent = {
70
+ name: 'Example Agent',
71
+ description: `Example specialist agent for ${ctx.name}`,
72
+ role: {
73
+ title: 'Example Specialist',
74
+ expertise: ['example-domain'],
75
+ },
76
+ activation_message: {
77
+ formatted: '🤖 example-agent [Example Specialist]',
78
+ },
79
+ };
80
+ const exampleSkill = `# Example Skill
81
+
82
+ ## Purpose
83
+
84
+ An example skill provided by ${ctx.name}.
85
+
86
+ ## Instructions
87
+
88
+ Describe the skill instructions here.
89
+ `;
90
+ const exampleRule = `# Example Rule
91
+
92
+ ## Description
93
+
94
+ An example rule provided by ${ctx.name}.
95
+
96
+ ## Guidelines
97
+
98
+ - Guideline 1
99
+ - Guideline 2
100
+ `;
101
+ const exampleChecklist = {
102
+ name: 'Example Checklist',
103
+ description: `Example checklist from ${ctx.name}`,
104
+ items: [
105
+ {
106
+ id: 'example-1',
107
+ text: 'Check example condition',
108
+ severity: 'medium',
109
+ },
110
+ ],
111
+ };
112
+ return {
113
+ ...minimalFiles,
114
+ 'plugin.json': JSON.stringify(manifest, null, 2),
115
+ 'agents/example-agent.json': JSON.stringify(exampleAgent, null, 2),
116
+ 'skills/example-skill.md': exampleSkill,
117
+ 'rules/example-rule.md': exampleRule,
118
+ 'checklists/example-checklist.json': JSON.stringify(exampleChecklist, null, 2),
119
+ };
120
+ }
121
+ async function runCreatePlugin(options) {
122
+ const console = (0, console_1.createConsoleUtils)();
123
+ if (!validatePluginName(options.name)) {
124
+ const msg = `Invalid plugin name "${options.name}". Must match /^[a-z][a-z0-9-]*$/`;
125
+ console.log.error(msg);
126
+ return { success: false, error: msg };
127
+ }
128
+ const pluginDir = path.join(options.outputDir, options.name);
129
+ if (fs.existsSync(pluginDir)) {
130
+ const msg = `Directory "${pluginDir}" already exists`;
131
+ console.log.error(msg);
132
+ return { success: false, error: msg };
133
+ }
134
+ const author = options.author ?? getDefaultAuthor();
135
+ const description = options.description ?? `A CodingBuddy plugin: ${options.name}`;
136
+ const ctx = {
137
+ name: options.name,
138
+ description,
139
+ author,
140
+ };
141
+ const files = options.template === 'full' ? generateFullTemplate(ctx) : generateMinimalTemplate(ctx);
142
+ console.log.step('🔧', `Scaffolding plugin "${options.name}" (${options.template} template)...`);
143
+ for (const [filePath, content] of Object.entries(files)) {
144
+ const fullPath = path.join(pluginDir, filePath);
145
+ fs.mkdirSync(path.dirname(fullPath), { recursive: true });
146
+ fs.writeFileSync(fullPath, content, 'utf-8');
147
+ }
148
+ console.log.success(`Plugin "${options.name}" created at ${pluginDir}`);
149
+ return { success: true, pluginDir };
150
+ }
151
+ //# sourceMappingURL=create-plugin.command.js.map
@@ -0,0 +1,10 @@
1
+ export interface InstallCommandOptions {
2
+ source: string;
3
+ projectRoot: string;
4
+ force: boolean;
5
+ }
6
+ export interface InstallCommandResult {
7
+ success: boolean;
8
+ error?: string;
9
+ }
10
+ export declare function runInstall(options: InstallCommandOptions): Promise<InstallCommandResult>;
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runInstall = runInstall;
4
+ const plugin_installer_service_1 = require("../../plugin/plugin-installer.service");
5
+ const console_1 = require("../utils/console");
6
+ async function runInstall(options) {
7
+ const console = (0, console_1.createConsoleUtils)();
8
+ const installer = new plugin_installer_service_1.PluginInstallerService();
9
+ try {
10
+ const resolved = await installer.resolveSource(options.source);
11
+ console.log.step('📦', `Installing plugin from ${resolved.source}...`);
12
+ const result = await installer.install({
13
+ source: resolved.source,
14
+ targetRoot: options.projectRoot,
15
+ force: options.force,
16
+ version: resolved.version,
17
+ });
18
+ if (result.success) {
19
+ console.log.success(result.summary ?? `Installed ${result.pluginName}`);
20
+ return { success: true };
21
+ }
22
+ console.log.error(result.error ?? 'Installation failed');
23
+ return { success: false, error: result.error };
24
+ }
25
+ catch (err) {
26
+ const message = err instanceof Error ? err.message : String(err);
27
+ console.log.error(message);
28
+ return { success: false, error: message };
29
+ }
30
+ }
31
+ //# sourceMappingURL=install.command.js.map
@@ -0,0 +1,9 @@
1
+ export interface PluginsCommandOptions {
2
+ projectRoot: string;
3
+ }
4
+ export interface PluginsCommandResult {
5
+ success: boolean;
6
+ count: number;
7
+ error?: string;
8
+ }
9
+ export declare function runPlugins(options: PluginsCommandOptions): PluginsCommandResult;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runPlugins = runPlugins;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ const console_1 = require("../utils/console");
7
+ function formatAssetCounts(provides) {
8
+ const parts = [];
9
+ if (provides.agents.length > 0) {
10
+ parts.push(`${provides.agents.length} agents`);
11
+ }
12
+ if (provides.rules.length > 0) {
13
+ parts.push(`${provides.rules.length} rules`);
14
+ }
15
+ if (provides.skills.length > 0) {
16
+ parts.push(`${provides.skills.length} skills`);
17
+ }
18
+ if (provides.checklists.length > 0) {
19
+ parts.push(`${provides.checklists.length} checklists`);
20
+ }
21
+ return parts.length > 0 ? `(${parts.join(', ')})` : '(no assets)';
22
+ }
23
+ function runPlugins(options) {
24
+ const console = (0, console_1.createConsoleUtils)();
25
+ const pluginsJsonPath = (0, path_1.join)(options.projectRoot, '.codingbuddy', 'plugins.json');
26
+ if (!(0, fs_1.existsSync)(pluginsJsonPath)) {
27
+ console.log.info('No plugins installed.');
28
+ return { success: true, count: 0 };
29
+ }
30
+ let registry;
31
+ try {
32
+ const raw = (0, fs_1.readFileSync)(pluginsJsonPath, 'utf-8');
33
+ registry = JSON.parse(raw);
34
+ }
35
+ catch {
36
+ console.log.error('Failed to read plugins.json. File may be corrupted.');
37
+ return { success: false, count: 0, error: 'Corrupted plugins.json' };
38
+ }
39
+ if (!registry.plugins || registry.plugins.length === 0) {
40
+ console.log.info('No plugins installed.');
41
+ return { success: true, count: 0 };
42
+ }
43
+ console.log.info('Installed plugins:');
44
+ for (const plugin of registry.plugins) {
45
+ const counts = formatAssetCounts(plugin.provides);
46
+ console.log.step(' ', `${plugin.name} ${plugin.version} ${counts}`);
47
+ }
48
+ console.log.info(`\nTotal: ${registry.plugins.length} plugin${registry.plugins.length !== 1 ? 's' : ''}`);
49
+ return { success: true, count: registry.plugins.length };
50
+ }
51
+ //# sourceMappingURL=plugins.command.js.map
@@ -0,0 +1,9 @@
1
+ export interface SearchCommandOptions {
2
+ query: string;
3
+ }
4
+ export interface SearchCommandResult {
5
+ success: boolean;
6
+ count: number;
7
+ error?: string;
8
+ }
9
+ export declare function runSearch(options: SearchCommandOptions): Promise<SearchCommandResult>;
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runSearch = runSearch;
4
+ const registry_client_1 = require("../../plugin/registry-client");
5
+ const console_1 = require("../utils/console");
6
+ function formatProvides(provides) {
7
+ const parts = [];
8
+ const agents = provides.agents?.length ?? 0;
9
+ const rules = provides.rules?.length ?? 0;
10
+ const skills = provides.skills?.length ?? 0;
11
+ const checklists = provides.checklists?.length ?? 0;
12
+ if (agents > 0)
13
+ parts.push(`${agents} agent${agents !== 1 ? 's' : ''}`);
14
+ if (rules > 0)
15
+ parts.push(`${rules} rule${rules !== 1 ? 's' : ''}`);
16
+ if (skills > 0)
17
+ parts.push(`${skills} skill${skills !== 1 ? 's' : ''}`);
18
+ if (checklists > 0)
19
+ parts.push(`${checklists} checklist${checklists !== 1 ? 's' : ''}`);
20
+ return parts.length > 0 ? parts.join(', ') : 'no assets';
21
+ }
22
+ function printPlugin(console, plugin) {
23
+ console.log.step(' ', `${plugin.name} (${plugin.version}) — ${plugin.description}`);
24
+ if (plugin.tags.length > 0) {
25
+ console.log.step(' ', ` Tags: ${plugin.tags.join(', ')}`);
26
+ }
27
+ console.log.step(' ', ` Provides: ${formatProvides(plugin.provides)}`);
28
+ console.log.step(' ', ` Install: codingbuddy install ${plugin.name}`);
29
+ }
30
+ async function runSearch(options) {
31
+ const console = (0, console_1.createConsoleUtils)();
32
+ const client = new registry_client_1.RegistryClient();
33
+ try {
34
+ const results = await client.search(options.query);
35
+ if (results.length === 0) {
36
+ console.log.info(`No plugins found matching "${options.query}"`);
37
+ return { success: true, count: 0 };
38
+ }
39
+ console.log.step('🔍', `Search results for "${options.query}":\n`);
40
+ for (const plugin of results) {
41
+ printPlugin(console, plugin);
42
+ process.stdout.write('\n');
43
+ }
44
+ console.log.info(`Found ${results.length} plugin${results.length !== 1 ? 's' : ''} matching "${options.query}"`);
45
+ return { success: true, count: results.length };
46
+ }
47
+ catch (err) {
48
+ const message = err instanceof Error ? err.message : String(err);
49
+ console.log.error(`Search failed: ${message}`);
50
+ return { success: false, count: 0, error: message };
51
+ }
52
+ }
53
+ //# sourceMappingURL=search.command.js.map
@@ -0,0 +1,12 @@
1
+ export interface UninstallCommandOptions {
2
+ pluginName: string;
3
+ projectRoot: string;
4
+ yes: boolean;
5
+ }
6
+ export interface UninstallCommandResult {
7
+ success: boolean;
8
+ error?: string;
9
+ confirmationRequired?: boolean;
10
+ pluginSummary?: string;
11
+ }
12
+ export declare function runUninstall(options: UninstallCommandOptions): UninstallCommandResult;
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runUninstall = runUninstall;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ const console_1 = require("../utils/console");
7
+ const ASSET_EXTENSIONS = {
8
+ agents: '.json',
9
+ rules: '.md',
10
+ skills: '.md',
11
+ checklists: '.md',
12
+ };
13
+ const ASSET_DIRS = ['agents', 'rules', 'skills', 'checklists'];
14
+ function removePluginFiles(aiRulesDir, provides) {
15
+ let removedCount = 0;
16
+ for (const dir of ASSET_DIRS) {
17
+ const names = provides[dir] ?? [];
18
+ const ext = ASSET_EXTENSIONS[dir];
19
+ for (const name of names) {
20
+ const filePath = (0, path_1.join)(aiRulesDir, dir, `${name}${ext}`);
21
+ if ((0, fs_1.existsSync)(filePath)) {
22
+ (0, fs_1.unlinkSync)(filePath);
23
+ removedCount++;
24
+ }
25
+ }
26
+ }
27
+ return removedCount;
28
+ }
29
+ function buildSummary(plugin) {
30
+ const parts = [];
31
+ if (plugin.provides.agents.length > 0)
32
+ parts.push(`${plugin.provides.agents.length} agents`);
33
+ if (plugin.provides.rules.length > 0)
34
+ parts.push(`${plugin.provides.rules.length} rules`);
35
+ if (plugin.provides.skills.length > 0)
36
+ parts.push(`${plugin.provides.skills.length} skills`);
37
+ if (plugin.provides.checklists.length > 0)
38
+ parts.push(`${plugin.provides.checklists.length} checklists`);
39
+ return parts.length > 0 ? `Removing ${parts.join(', ')}` : 'No assets to remove';
40
+ }
41
+ function runUninstall(options) {
42
+ const console = (0, console_1.createConsoleUtils)();
43
+ const pluginsJsonPath = (0, path_1.join)(options.projectRoot, '.codingbuddy', 'plugins.json');
44
+ if (!(0, fs_1.existsSync)(pluginsJsonPath)) {
45
+ console.log.error(`Plugin "${options.pluginName}" not found. No plugins are installed.`);
46
+ return { success: false, error: 'Plugin not found' };
47
+ }
48
+ let registry;
49
+ try {
50
+ const raw = (0, fs_1.readFileSync)(pluginsJsonPath, 'utf-8');
51
+ registry = JSON.parse(raw);
52
+ }
53
+ catch {
54
+ console.log.error('Failed to read plugins.json. File may be corrupted.');
55
+ return { success: false, error: 'Corrupted plugins.json' };
56
+ }
57
+ const plugin = registry.plugins.find(p => p.name === options.pluginName);
58
+ if (!plugin) {
59
+ console.log.error(`Plugin "${options.pluginName}" not found in registry.`);
60
+ return { success: false, error: 'Plugin not found' };
61
+ }
62
+ const summary = buildSummary(plugin);
63
+ console.log.step('📦', `Uninstalling ${plugin.name}@${plugin.version}...`);
64
+ console.log.step(' ', summary);
65
+ if (!options.yes) {
66
+ return {
67
+ success: false,
68
+ confirmationRequired: true,
69
+ pluginSummary: `${plugin.name}@${plugin.version}: ${summary}`,
70
+ };
71
+ }
72
+ const aiRulesDir = (0, path_1.join)(options.projectRoot, '.ai-rules');
73
+ removePluginFiles(aiRulesDir, plugin.provides);
74
+ registry.plugins = registry.plugins.filter(p => p.name !== options.pluginName);
75
+ (0, fs_1.writeFileSync)(pluginsJsonPath, JSON.stringify(registry, null, 2), 'utf-8');
76
+ console.log.success(`Removed ${plugin.name}`);
77
+ return { success: true };
78
+ }
79
+ //# sourceMappingURL=uninstall.command.js.map
@@ -0,0 +1,11 @@
1
+ export interface UpdateCommandOptions {
2
+ projectRoot: string;
3
+ pluginName?: string;
4
+ }
5
+ export interface UpdateCommandResult {
6
+ success: boolean;
7
+ checked: number;
8
+ updated: number;
9
+ error?: string;
10
+ }
11
+ export declare function runUpdate(options: UpdateCommandOptions): Promise<UpdateCommandResult>;
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.runUpdate = runUpdate;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
6
+ const registry_client_1 = require("../../plugin/registry-client");
7
+ const plugin_installer_service_1 = require("../../plugin/plugin-installer.service");
8
+ const console_1 = require("../utils/console");
9
+ function compareVersions(a, b) {
10
+ const partsA = a.split('.').map(Number);
11
+ const partsB = b.split('.').map(Number);
12
+ for (let i = 0; i < 3; i++) {
13
+ const diff = (partsA[i] ?? 0) - (partsB[i] ?? 0);
14
+ if (diff !== 0)
15
+ return diff;
16
+ }
17
+ return 0;
18
+ }
19
+ async function runUpdate(options) {
20
+ const console = (0, console_1.createConsoleUtils)();
21
+ const pluginsJsonPath = (0, path_1.join)(options.projectRoot, '.codingbuddy', 'plugins.json');
22
+ if (!(0, fs_1.existsSync)(pluginsJsonPath)) {
23
+ console.log.info('No plugins installed.');
24
+ return { success: true, checked: 0, updated: 0 };
25
+ }
26
+ let registry;
27
+ try {
28
+ const raw = (0, fs_1.readFileSync)(pluginsJsonPath, 'utf-8');
29
+ registry = JSON.parse(raw);
30
+ }
31
+ catch {
32
+ console.log.error('Failed to read plugins.json. File may be corrupted.');
33
+ return { success: false, checked: 0, updated: 0, error: 'Corrupted plugins.json' };
34
+ }
35
+ let pluginsToCheck = registry.plugins;
36
+ if (options.pluginName) {
37
+ const found = registry.plugins.find(p => p.name === options.pluginName);
38
+ if (!found) {
39
+ console.log.error(`Plugin "${options.pluginName}" is not installed.`);
40
+ return { success: false, checked: 0, updated: 0, error: 'Plugin not installed' };
41
+ }
42
+ pluginsToCheck = [found];
43
+ }
44
+ if (pluginsToCheck.length === 0) {
45
+ console.log.info('No plugins installed.');
46
+ return { success: true, checked: 0, updated: 0 };
47
+ }
48
+ const client = new registry_client_1.RegistryClient();
49
+ let registryIndex;
50
+ try {
51
+ registryIndex = await client.fetchIndex();
52
+ }
53
+ catch (err) {
54
+ const message = err instanceof Error ? err.message : String(err);
55
+ console.log.error(`Failed to fetch registry: ${message}`);
56
+ return { success: false, checked: 0, updated: 0, error: message };
57
+ }
58
+ console.log.step('🔍', 'Checking for plugin updates...\n');
59
+ const outdated = [];
60
+ for (const installed of pluginsToCheck) {
61
+ const registryEntry = registryIndex.plugins.find(p => p.name === installed.name);
62
+ if (!registryEntry) {
63
+ console.log.warn(`${installed.name}: not found in registry, skipping.`);
64
+ continue;
65
+ }
66
+ if (compareVersions(registryEntry.version, installed.version) > 0) {
67
+ outdated.push({ installed, latestVersion: registryEntry.version });
68
+ console.log.step('📦', `${installed.name}: ${installed.version} → ${registryEntry.version}`);
69
+ }
70
+ }
71
+ if (outdated.length === 0) {
72
+ console.log.success('All plugins are up-to-date.');
73
+ return { success: true, checked: pluginsToCheck.length, updated: 0 };
74
+ }
75
+ const installer = new plugin_installer_service_1.PluginInstallerService();
76
+ let updatedCount = 0;
77
+ let hasFailure = false;
78
+ for (const { installed, latestVersion } of outdated) {
79
+ console.log.step('⬆️', `Updating ${installed.name} to ${latestVersion}...`);
80
+ const result = await installer.install({
81
+ source: installed.source,
82
+ targetRoot: options.projectRoot,
83
+ force: true,
84
+ });
85
+ if (result.success) {
86
+ console.log.success(`Updated ${installed.name} to ${latestVersion}`);
87
+ updatedCount++;
88
+ }
89
+ else {
90
+ console.log.error(`Failed to update ${installed.name}: ${result.error}`);
91
+ hasFailure = true;
92
+ }
93
+ }
94
+ if (updatedCount > 0) {
95
+ console.log.info(`Updated ${updatedCount} plugin${updatedCount !== 1 ? 's' : ''}.`);
96
+ }
97
+ return {
98
+ success: !hasFailure,
99
+ checked: pluginsToCheck.length,
100
+ updated: updatedCount,
101
+ };
102
+ }
103
+ //# sourceMappingURL=update.command.js.map
@@ -1,3 +1,4 @@
1
+ export declare function resolveHudStateDir(): string;
1
2
  export declare function runTui(options?: {
2
3
  restart?: boolean;
3
4
  }): Promise<void>;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resolveHudStateDir = resolveHudStateDir;
3
4
  exports.runTui = runTui;
4
5
  const path = require("node:path");
5
6
  const os = require("node:os");
@@ -7,6 +8,11 @@ const ipc_types_1 = require("../tui/ipc/ipc.types");
7
8
  const instance_registry_1 = require("../tui/ipc/instance-registry");
8
9
  const restart_tui_1 = require("./restart-tui");
9
10
  const CLIENT_SHUTDOWN_TIMEOUT_MS = 3000;
11
+ function resolveHudStateDir() {
12
+ return (process.env.CODINGBUDDY_HUD_STATE_DIR ??
13
+ process.env.CLAUDE_PLUGIN_DATA ??
14
+ path.join(os.homedir(), '.codingbuddy'));
15
+ }
10
16
  async function runTui(options = {}) {
11
17
  if (options.restart) {
12
18
  const result = await (0, restart_tui_1.restartTui)();
@@ -46,7 +52,7 @@ async function runTui(options = {}) {
46
52
  const { HudFileBridge } = await Promise.resolve().then(() => require('../tui/events'));
47
53
  const sessions = manager.getSessions();
48
54
  if (sessions.length > 0) {
49
- const hudStatePath = path.join(process.env.CODINGBUDDY_HUD_STATE_DIR ?? path.join(os.homedir(), '.codingbuddy'), 'hud-state.json');
55
+ const hudStatePath = path.join(resolveHudStateDir(), 'hud-state.json');
50
56
  const bridge = new HudFileBridge(sessions[0].eventBus, hudStatePath);
51
57
  bridge.start();
52
58
  hudBridge = bridge;
@@ -0,0 +1,2 @@
1
+ import type { CouncilInput, CouncilSummary } from './council-summary.types';
2
+ export declare function generateCouncilSummary(inputs: readonly CouncilInput[]): CouncilSummary;
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateCouncilSummary = generateCouncilSummary;
4
+ function generateCouncilSummary(inputs) {
5
+ const opinions = [];
6
+ const failedAgents = [];
7
+ for (const input of inputs) {
8
+ if (input.opinion !== null) {
9
+ opinions.push(input.opinion);
10
+ }
11
+ else {
12
+ failedAgents.push(input.agentName);
13
+ }
14
+ }
15
+ const partialFailure = failedAgents.length > 0;
16
+ const consensus = detectConsensus(opinions);
17
+ const disagreements = detectDisagreements(opinions);
18
+ const blockingRisks = extractBlockingRisks(opinions);
19
+ const nextStep = determineNextStep(opinions, failedAgents, blockingRisks);
20
+ return {
21
+ opinions,
22
+ failedAgents,
23
+ consensus,
24
+ disagreements,
25
+ blockingRisks,
26
+ nextStep,
27
+ partialFailure,
28
+ };
29
+ }
30
+ function detectConsensus(opinions) {
31
+ if (opinions.length === 0)
32
+ return [];
33
+ const points = [];
34
+ const stances = new Set(opinions.map(o => o.stance));
35
+ if (stances.size === 1) {
36
+ const stance = opinions[0].stance;
37
+ points.push(`All specialists ${stanceVerb(stance)}`);
38
+ }
39
+ const sharedChanges = findSharedSuggestedChanges(opinions);
40
+ for (const change of sharedChanges) {
41
+ points.push(`Shared recommendation: ${change}`);
42
+ }
43
+ return points;
44
+ }
45
+ function findSharedSuggestedChanges(opinions) {
46
+ const changeCounts = new Map();
47
+ for (const opinion of opinions) {
48
+ for (const change of opinion.suggestedChanges) {
49
+ changeCounts.set(change, (changeCounts.get(change) ?? 0) + 1);
50
+ }
51
+ }
52
+ const shared = [];
53
+ for (const [change, count] of changeCounts) {
54
+ if (count >= 2) {
55
+ shared.push(change);
56
+ }
57
+ }
58
+ return shared;
59
+ }
60
+ function stanceVerb(stance) {
61
+ switch (stance) {
62
+ case 'approve':
63
+ return 'approve';
64
+ case 'concern':
65
+ return 'express concerns';
66
+ case 'reject':
67
+ return 'reject';
68
+ }
69
+ }
70
+ function detectDisagreements(opinions) {
71
+ if (opinions.length < 2)
72
+ return [];
73
+ const stances = new Set(opinions.map(o => o.stance));
74
+ if (stances.size <= 1)
75
+ return [];
76
+ const positions = opinions.map(o => ({
77
+ agentName: o.agentName,
78
+ stance: o.stance,
79
+ reasoning: o.reasoning,
80
+ }));
81
+ return [
82
+ {
83
+ topic: 'Overall assessment',
84
+ positions,
85
+ },
86
+ ];
87
+ }
88
+ function extractBlockingRisks(opinions) {
89
+ return opinions.filter(o => o.stance === 'reject').map(o => `${o.agentName}: ${o.reasoning}`);
90
+ }
91
+ function determineNextStep(opinions, failedAgents, blockingRisks) {
92
+ if (opinions.length === 0 && failedAgents.length === 0) {
93
+ return 'No specialist input available. Run specialist analysis first.';
94
+ }
95
+ if (opinions.length === 0 && failedAgents.length > 0) {
96
+ return `Re-run failed specialists (${failedAgents.join(', ')}) to obtain analysis.`;
97
+ }
98
+ if (blockingRisks.length > 0) {
99
+ return `Address ${blockingRisks.length} blocking risk(s) before proceeding.`;
100
+ }
101
+ const concerns = opinions.filter(o => o.stance === 'concern');
102
+ const parts = [];
103
+ if (failedAgents.length > 0) {
104
+ parts.push(`re-run failed specialists (${failedAgents.join(', ')})`);
105
+ }
106
+ if (concerns.length > 0) {
107
+ parts.push(`review ${concerns.length} concern(s)`);
108
+ }
109
+ if (parts.length > 0) {
110
+ return `Proceed with caution: ${parts.join(', ')}.`;
111
+ }
112
+ return 'Proceed with implementation — all specialists approve.';
113
+ }
114
+ //# sourceMappingURL=council-summary.service.js.map