@hailer/mcp 1.2.1 → 2.0.0-beta.1

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 (764) hide show
  1. package/.claude/agents/agent-hailer-helper.md +118 -0
  2. package/.claude/commands/app-squad.md +16 -110
  3. package/.claude/commands/debug-squad.md +13 -290
  4. package/.claude/commands/publish.md +2 -2
  5. package/.claude/commands/review-squad.md +17 -139
  6. package/.claude/skills/create-and-publish-app/SKILL.md +95 -153
  7. package/.claude/skills/hailer-app-builder/SKILL.md +2 -2
  8. package/.claude/skills/hailer-ui-guide/SKILL.md +265 -0
  9. package/.env.example +50 -1
  10. package/CLAUDE.md +136 -10
  11. package/dist/app.d.ts.map +1 -1
  12. package/dist/app.js +3 -0
  13. package/dist/app.js.map +1 -1
  14. package/dist/bot/bot-manager.d.ts +9 -6
  15. package/dist/bot/bot-manager.d.ts.map +1 -1
  16. package/dist/bot/bot-manager.js +142 -31
  17. package/dist/bot/bot-manager.js.map +1 -1
  18. package/dist/bot/bot.d.ts +59 -16
  19. package/dist/bot/bot.d.ts.map +1 -1
  20. package/dist/bot/bot.js +889 -142
  21. package/dist/bot/bot.js.map +1 -1
  22. package/dist/bot/operation-logger.d.ts.map +1 -1
  23. package/dist/bot/operation-logger.js +24 -12
  24. package/dist/bot/operation-logger.js.map +1 -1
  25. package/dist/bot/services/bot-permissions.d.ts +2 -2
  26. package/dist/bot/services/bot-permissions.d.ts.map +1 -1
  27. package/dist/bot/services/bot-permissions.js +28 -9
  28. package/dist/bot/services/bot-permissions.js.map +1 -1
  29. package/dist/bot/services/conversation-manager.d.ts +23 -23
  30. package/dist/bot/services/conversation-manager.d.ts.map +1 -1
  31. package/dist/bot/services/conversation-manager.js +52 -49
  32. package/dist/bot/services/conversation-manager.js.map +1 -1
  33. package/dist/bot/services/helper-prompt.d.ts +8 -0
  34. package/dist/bot/services/helper-prompt.d.ts.map +1 -0
  35. package/dist/bot/services/helper-prompt.js +177 -0
  36. package/dist/bot/services/helper-prompt.js.map +1 -0
  37. package/dist/bot/services/message-classifier.d.ts +16 -16
  38. package/dist/bot/services/message-classifier.d.ts.map +1 -1
  39. package/dist/bot/services/message-classifier.js +55 -49
  40. package/dist/bot/services/message-classifier.js.map +1 -1
  41. package/dist/bot/services/message-formatter.d.ts +38 -38
  42. package/dist/bot/services/message-formatter.d.ts.map +1 -1
  43. package/dist/bot/services/message-formatter.js +81 -74
  44. package/dist/bot/services/message-formatter.js.map +1 -1
  45. package/dist/bot/services/permission-guard.d.ts.map +1 -1
  46. package/dist/bot/services/permission-guard.js +20 -10
  47. package/dist/bot/services/permission-guard.js.map +1 -1
  48. package/dist/bot/services/signal-router.d.ts.map +1 -1
  49. package/dist/bot/services/signal-router.js +11 -6
  50. package/dist/bot/services/signal-router.js.map +1 -1
  51. package/dist/bot/services/system-prompt.d.ts +14 -0
  52. package/dist/bot/services/system-prompt.d.ts.map +1 -1
  53. package/dist/bot/services/system-prompt.js +179 -4
  54. package/dist/bot/services/system-prompt.js.map +1 -1
  55. package/dist/bot/services/token-billing.d.ts +23 -23
  56. package/dist/bot/services/token-billing.d.ts.map +1 -1
  57. package/dist/bot/services/token-billing.js +51 -36
  58. package/dist/bot/services/token-billing.js.map +1 -1
  59. package/dist/bot/services/types.d.ts +3 -1
  60. package/dist/bot/services/types.d.ts.map +1 -1
  61. package/dist/bot/services/typing-indicator.d.ts +8 -8
  62. package/dist/bot/services/typing-indicator.d.ts.map +1 -1
  63. package/dist/bot/services/typing-indicator.js +12 -10
  64. package/dist/bot/services/typing-indicator.js.map +1 -1
  65. package/dist/bot/services/workspace-refresh.d.ts +3 -3
  66. package/dist/bot/services/workspace-refresh.d.ts.map +1 -1
  67. package/dist/bot/services/workspace-refresh.js +23 -13
  68. package/dist/bot/services/workspace-refresh.js.map +1 -1
  69. package/dist/bot/tool-executor.d.ts +10 -6
  70. package/dist/bot/tool-executor.d.ts.map +1 -1
  71. package/dist/bot/tool-executor.js +12 -6
  72. package/dist/bot/tool-executor.js.map +1 -1
  73. package/dist/bot/workspace-overview.d.ts.map +1 -1
  74. package/dist/bot/workspace-overview.js +6 -3
  75. package/dist/bot/workspace-overview.js.map +1 -1
  76. package/dist/bot-config/activity-error.d.ts +47 -0
  77. package/dist/bot-config/activity-error.d.ts.map +1 -0
  78. package/dist/bot-config/activity-error.js +67 -0
  79. package/dist/bot-config/activity-error.js.map +1 -0
  80. package/dist/bot-config/context.d.ts +4 -4
  81. package/dist/bot-config/context.d.ts.map +1 -1
  82. package/dist/bot-config/context.js +18 -14
  83. package/dist/bot-config/context.js.map +1 -1
  84. package/dist/bot-config/events.d.ts +45 -0
  85. package/dist/bot-config/events.d.ts.map +1 -0
  86. package/dist/bot-config/events.js +51 -0
  87. package/dist/bot-config/events.js.map +1 -0
  88. package/dist/bot-config/index.d.ts +3 -0
  89. package/dist/bot-config/index.d.ts.map +1 -1
  90. package/dist/bot-config/index.js +8 -1
  91. package/dist/bot-config/index.js.map +1 -1
  92. package/dist/bot-config/loader.d.ts +3 -0
  93. package/dist/bot-config/loader.d.ts.map +1 -1
  94. package/dist/bot-config/loader.js +45 -20
  95. package/dist/bot-config/loader.js.map +1 -1
  96. package/dist/bot-config/persistence.js.map +1 -1
  97. package/dist/bot-config/reconciler.d.ts +11 -0
  98. package/dist/bot-config/reconciler.d.ts.map +1 -0
  99. package/dist/bot-config/reconciler.js +121 -0
  100. package/dist/bot-config/reconciler.js.map +1 -0
  101. package/dist/bot-config/state.d.ts.map +1 -1
  102. package/dist/bot-config/state.js.map +1 -1
  103. package/dist/bot-config/types.d.ts +32 -0
  104. package/dist/bot-config/types.d.ts.map +1 -1
  105. package/dist/bot-config/webhooks.d.ts.map +1 -1
  106. package/dist/bot-config/webhooks.js.map +1 -1
  107. package/dist/bot-config/workflow-installer.d.ts +37 -0
  108. package/dist/bot-config/workflow-installer.d.ts.map +1 -0
  109. package/dist/bot-config/workflow-installer.js +346 -0
  110. package/dist/bot-config/workflow-installer.js.map +1 -0
  111. package/dist/cli.d.ts.map +1 -1
  112. package/dist/cli.js +12 -0
  113. package/dist/cli.js.map +1 -1
  114. package/dist/config.d.ts +23 -19
  115. package/dist/config.d.ts.map +1 -1
  116. package/dist/config.js +65 -27
  117. package/dist/config.js.map +1 -1
  118. package/dist/core.d.ts +6 -4
  119. package/dist/core.d.ts.map +1 -1
  120. package/dist/core.js +11 -16
  121. package/dist/core.js.map +1 -1
  122. package/dist/lib/logger.d.ts.map +1 -1
  123. package/dist/lib/logger.js +7 -4
  124. package/dist/lib/logger.js.map +1 -1
  125. package/dist/lib/request-logger.d.ts +19 -19
  126. package/dist/lib/request-logger.d.ts.map +1 -1
  127. package/dist/lib/request-logger.js +19 -19
  128. package/dist/lib/request-logger.js.map +1 -1
  129. package/dist/mcp/UserContextCache.d.ts +28 -22
  130. package/dist/mcp/UserContextCache.d.ts.map +1 -1
  131. package/dist/mcp/UserContextCache.js +23 -23
  132. package/dist/mcp/UserContextCache.js.map +1 -1
  133. package/dist/mcp/auth.js.map +1 -1
  134. package/dist/mcp/hailer-clients.d.ts +5 -4
  135. package/dist/mcp/hailer-clients.d.ts.map +1 -1
  136. package/dist/mcp/hailer-clients.js +61 -27
  137. package/dist/mcp/hailer-clients.js.map +1 -1
  138. package/dist/mcp/hailer-rpc.d.ts +40 -0
  139. package/dist/mcp/hailer-rpc.d.ts.map +1 -0
  140. package/dist/mcp/hailer-rpc.js +43 -0
  141. package/dist/mcp/hailer-rpc.js.map +1 -0
  142. package/dist/mcp/session-store.d.ts +16 -16
  143. package/dist/mcp/session-store.d.ts.map +1 -1
  144. package/dist/mcp/session-store.js +16 -16
  145. package/dist/mcp/session-store.js.map +1 -1
  146. package/dist/mcp/tool-profiles.d.ts +69 -0
  147. package/dist/mcp/tool-profiles.d.ts.map +1 -0
  148. package/dist/mcp/tool-profiles.js +176 -0
  149. package/dist/mcp/tool-profiles.js.map +1 -0
  150. package/dist/mcp/tool-registry.d.ts +16 -0
  151. package/dist/mcp/tool-registry.d.ts.map +1 -1
  152. package/dist/mcp/tool-registry.js +91 -39
  153. package/dist/mcp/tool-registry.js.map +1 -1
  154. package/dist/mcp/tools/activity.d.ts.map +1 -1
  155. package/dist/mcp/tools/activity.js +398 -198
  156. package/dist/mcp/tools/activity.js.map +1 -1
  157. package/dist/mcp/tools/aliases.d.ts +11 -0
  158. package/dist/mcp/tools/aliases.d.ts.map +1 -0
  159. package/dist/mcp/tools/aliases.js +176 -0
  160. package/dist/mcp/tools/aliases.js.map +1 -0
  161. package/dist/mcp/tools/app-core.d.ts +6 -8
  162. package/dist/mcp/tools/app-core.d.ts.map +1 -1
  163. package/dist/mcp/tools/app-core.js +355 -254
  164. package/dist/mcp/tools/app-core.js.map +1 -1
  165. package/dist/mcp/tools/app-marketplace.d.ts +8 -16
  166. package/dist/mcp/tools/app-marketplace.d.ts.map +1 -1
  167. package/dist/mcp/tools/app-marketplace.js +604 -930
  168. package/dist/mcp/tools/app-marketplace.js.map +1 -1
  169. package/dist/mcp/tools/app.d.ts +4 -7
  170. package/dist/mcp/tools/app.d.ts.map +1 -1
  171. package/dist/mcp/tools/app.js +4 -7
  172. package/dist/mcp/tools/app.js.map +1 -1
  173. package/dist/mcp/tools/bot-self.d.ts +21 -0
  174. package/dist/mcp/tools/bot-self.d.ts.map +1 -0
  175. package/dist/mcp/tools/bot-self.js +174 -0
  176. package/dist/mcp/tools/bot-self.js.map +1 -0
  177. package/dist/mcp/tools/calendar.d.ts +21 -0
  178. package/dist/mcp/tools/calendar.d.ts.map +1 -0
  179. package/dist/mcp/tools/calendar.js +741 -0
  180. package/dist/mcp/tools/calendar.js.map +1 -0
  181. package/dist/mcp/tools/company.d.ts.map +1 -1
  182. package/dist/mcp/tools/company.js +2 -1
  183. package/dist/mcp/tools/company.js.map +1 -1
  184. package/dist/mcp/tools/date.js.map +1 -1
  185. package/dist/mcp/tools/discussion.d.ts +23 -3
  186. package/dist/mcp/tools/discussion.d.ts.map +1 -1
  187. package/dist/mcp/tools/discussion.js +417 -534
  188. package/dist/mcp/tools/discussion.js.map +1 -1
  189. package/dist/mcp/tools/file.d.ts.map +1 -1
  190. package/dist/mcp/tools/file.js +18 -16
  191. package/dist/mcp/tools/file.js.map +1 -1
  192. package/dist/mcp/tools/index.js +4 -4
  193. package/dist/mcp/tools/index.js.map +1 -1
  194. package/dist/mcp/tools/insight.d.ts +7 -5
  195. package/dist/mcp/tools/insight.d.ts.map +1 -1
  196. package/dist/mcp/tools/insight.js +419 -477
  197. package/dist/mcp/tools/insight.js.map +1 -1
  198. package/dist/mcp/tools/user.d.ts.map +1 -1
  199. package/dist/mcp/tools/user.js +15 -13
  200. package/dist/mcp/tools/user.js.map +1 -1
  201. package/dist/mcp/tools/workflow-permissions.d.ts +2 -4
  202. package/dist/mcp/tools/workflow-permissions.d.ts.map +1 -1
  203. package/dist/mcp/tools/workflow-permissions.js +88 -97
  204. package/dist/mcp/tools/workflow-permissions.js.map +1 -1
  205. package/dist/mcp/tools/workflow.d.ts +2 -7
  206. package/dist/mcp/tools/workflow.d.ts.map +1 -1
  207. package/dist/mcp/tools/workflow.js +817 -850
  208. package/dist/mcp/tools/workflow.js.map +1 -1
  209. package/dist/mcp/utils/api-errors.d.ts.map +1 -1
  210. package/dist/mcp/utils/api-errors.js +2 -2
  211. package/dist/mcp/utils/api-errors.js.map +1 -1
  212. package/dist/mcp/utils/data-transformers.d.ts.map +1 -1
  213. package/dist/mcp/utils/data-transformers.js +8 -4
  214. package/dist/mcp/utils/data-transformers.js.map +1 -1
  215. package/dist/mcp/utils/file-upload.d.ts.map +1 -1
  216. package/dist/mcp/utils/file-upload.js +1 -1
  217. package/dist/mcp/utils/file-upload.js.map +1 -1
  218. package/dist/mcp/utils/hailer-api-client.d.ts +81 -81
  219. package/dist/mcp/utils/hailer-api-client.d.ts.map +1 -1
  220. package/dist/mcp/utils/hailer-api-client.js +103 -101
  221. package/dist/mcp/utils/hailer-api-client.js.map +1 -1
  222. package/dist/mcp/utils/index.d.ts.map +1 -1
  223. package/dist/mcp/utils/index.js.map +1 -1
  224. package/dist/mcp/utils/logger.d.ts.map +1 -1
  225. package/dist/mcp/utils/logger.js.map +1 -1
  226. package/dist/mcp/utils/response-builder.d.ts.map +1 -1
  227. package/dist/mcp/utils/response-builder.js +8 -4
  228. package/dist/mcp/utils/response-builder.js.map +1 -1
  229. package/dist/mcp/utils/role-utils.d.ts.map +1 -1
  230. package/dist/mcp/utils/role-utils.js +6 -3
  231. package/dist/mcp/utils/role-utils.js.map +1 -1
  232. package/dist/mcp/utils/tool-helpers.d.ts.map +1 -1
  233. package/dist/mcp/utils/tool-helpers.js +2 -2
  234. package/dist/mcp/utils/tool-helpers.js.map +1 -1
  235. package/dist/mcp/utils/types.d.ts +1 -1
  236. package/dist/mcp/utils/types.d.ts.map +1 -1
  237. package/dist/mcp/utils/types.js.map +1 -1
  238. package/dist/mcp/webhook-handler.d.ts +43 -8
  239. package/dist/mcp/webhook-handler.d.ts.map +1 -1
  240. package/dist/mcp/webhook-handler.js +861 -116
  241. package/dist/mcp/webhook-handler.js.map +1 -1
  242. package/dist/mcp/workspace-admin-store.d.ts +49 -0
  243. package/dist/mcp/workspace-admin-store.d.ts.map +1 -0
  244. package/dist/mcp/workspace-admin-store.js +168 -0
  245. package/dist/mcp/workspace-admin-store.js.map +1 -0
  246. package/dist/mcp/workspace-cache.d.ts +2 -2
  247. package/dist/mcp/workspace-cache.d.ts.map +1 -1
  248. package/dist/mcp/workspace-cache.js +9 -5
  249. package/dist/mcp/workspace-cache.js.map +1 -1
  250. package/dist/mcp-server.d.ts +26 -11
  251. package/dist/mcp-server.d.ts.map +1 -1
  252. package/dist/mcp-server.js +360 -36
  253. package/dist/mcp-server.js.map +1 -1
  254. package/dist/plugins/vipunen/client.d.ts +41 -41
  255. package/dist/plugins/vipunen/client.d.ts.map +1 -1
  256. package/dist/plugins/vipunen/client.js +53 -48
  257. package/dist/plugins/vipunen/client.js.map +1 -1
  258. package/dist/plugins/vipunen/index.js.map +1 -1
  259. package/dist/plugins/vipunen/tools.d.ts.map +1 -1
  260. package/dist/plugins/vipunen/tools.js +6 -3
  261. package/dist/plugins/vipunen/tools.js.map +1 -1
  262. package/dist/public-chat/graduate.d.ts +29 -0
  263. package/dist/public-chat/graduate.d.ts.map +1 -0
  264. package/dist/public-chat/graduate.js +593 -0
  265. package/dist/public-chat/graduate.js.map +1 -0
  266. package/dist/public-chat/handler.d.ts +12 -0
  267. package/dist/public-chat/handler.d.ts.map +1 -0
  268. package/dist/public-chat/handler.js +179 -0
  269. package/dist/public-chat/handler.js.map +1 -0
  270. package/dist/public-chat/index.d.ts +16 -0
  271. package/dist/public-chat/index.d.ts.map +1 -0
  272. package/dist/public-chat/index.js +74 -0
  273. package/dist/public-chat/index.js.map +1 -0
  274. package/dist/public-chat/knowledge.d.ts +3 -0
  275. package/dist/public-chat/knowledge.d.ts.map +1 -0
  276. package/dist/public-chat/knowledge.js +1339 -0
  277. package/dist/public-chat/knowledge.js.map +1 -0
  278. package/dist/public-chat/rate-limit.d.ts +16 -0
  279. package/dist/public-chat/rate-limit.d.ts.map +1 -0
  280. package/dist/public-chat/rate-limit.js +51 -0
  281. package/dist/public-chat/rate-limit.js.map +1 -0
  282. package/dist/public-chat/session-store.d.ts +41 -0
  283. package/dist/public-chat/session-store.d.ts.map +1 -0
  284. package/dist/public-chat/session-store.js +95 -0
  285. package/dist/public-chat/session-store.js.map +1 -0
  286. package/dist/public-chat/studio-prewarm.d.ts +61 -0
  287. package/dist/public-chat/studio-prewarm.d.ts.map +1 -0
  288. package/dist/public-chat/studio-prewarm.js +162 -0
  289. package/dist/public-chat/studio-prewarm.js.map +1 -0
  290. package/dist/public-chat/system-prompt.d.ts +22 -0
  291. package/dist/public-chat/system-prompt.d.ts.map +1 -0
  292. package/dist/public-chat/system-prompt.js +428 -0
  293. package/dist/public-chat/system-prompt.js.map +1 -0
  294. package/package.json +14 -6
  295. package/scripts/build-public-chat-knowledge.py +101 -0
  296. package/scripts/probe-mcp-pricing.ts +52 -0
  297. package/scripts/smoke-public-chat-live.ts +148 -0
  298. package/scripts/smoke-public-chat.ts +110 -0
  299. package/.claude/CLAUDE.md +0 -126
  300. package/.claude/commands/audit-squad.md +0 -158
  301. package/.claude/commands/cleanup-squad.md +0 -98
  302. package/.claude/commands/config-squad.md +0 -106
  303. package/.claude/commands/crud-squad.md +0 -87
  304. package/.claude/commands/data-squad.md +0 -97
  305. package/.claude/commands/doc-squad.md +0 -65
  306. package/.claude/commands/help.md +0 -29
  307. package/.claude/commands/help:agents.md +0 -182
  308. package/.claude/commands/help:commands.md +0 -78
  309. package/.claude/commands/help:faq.md +0 -79
  310. package/.claude/commands/help:plugins.md +0 -50
  311. package/.claude/commands/help:skills.md +0 -87
  312. package/.claude/commands/help:tools.md +0 -75
  313. package/.claude/commands/hotfix-squad.md +0 -112
  314. package/.claude/commands/integration-squad.md +0 -82
  315. package/.claude/commands/janitor-squad.md +0 -167
  316. package/.claude/commands/onboard-squad.md +0 -130
  317. package/.claude/commands/swarm.md +0 -210
  318. package/.claude/commands/tool-builder.md +0 -39
  319. package/.claude/skills/publish-hailer-app/SKILL.md +0 -280
  320. package/dist/CLAUDE.md +0 -370
  321. package/dist/agents/bot-manager.d.ts +0 -48
  322. package/dist/agents/bot-manager.d.ts.map +0 -1
  323. package/dist/agents/bot-manager.js +0 -254
  324. package/dist/agents/bot-manager.js.map +0 -1
  325. package/dist/agents/bug-fixer/ai.d.ts +0 -80
  326. package/dist/agents/bug-fixer/ai.d.ts.map +0 -1
  327. package/dist/agents/bug-fixer/ai.js +0 -466
  328. package/dist/agents/bug-fixer/ai.js.map +0 -1
  329. package/dist/agents/bug-fixer/bot.d.ts +0 -92
  330. package/dist/agents/bug-fixer/bot.d.ts.map +0 -1
  331. package/dist/agents/bug-fixer/bot.js +0 -687
  332. package/dist/agents/bug-fixer/bot.js.map +0 -1
  333. package/dist/agents/bug-fixer/config.d.ts +0 -21
  334. package/dist/agents/bug-fixer/config.d.ts.map +0 -1
  335. package/dist/agents/bug-fixer/config.js +0 -218
  336. package/dist/agents/bug-fixer/config.js.map +0 -1
  337. package/dist/agents/bug-fixer/files.d.ts +0 -67
  338. package/dist/agents/bug-fixer/files.d.ts.map +0 -1
  339. package/dist/agents/bug-fixer/files.js +0 -386
  340. package/dist/agents/bug-fixer/files.js.map +0 -1
  341. package/dist/agents/bug-fixer/git.d.ts +0 -48
  342. package/dist/agents/bug-fixer/git.d.ts.map +0 -1
  343. package/dist/agents/bug-fixer/git.js +0 -298
  344. package/dist/agents/bug-fixer/git.js.map +0 -1
  345. package/dist/agents/bug-fixer/index.d.ts +0 -103
  346. package/dist/agents/bug-fixer/index.d.ts.map +0 -1
  347. package/dist/agents/bug-fixer/index.js +0 -262
  348. package/dist/agents/bug-fixer/index.js.map +0 -1
  349. package/dist/agents/bug-fixer/lsp.d.ts +0 -113
  350. package/dist/agents/bug-fixer/lsp.d.ts.map +0 -1
  351. package/dist/agents/bug-fixer/lsp.js +0 -485
  352. package/dist/agents/bug-fixer/lsp.js.map +0 -1
  353. package/dist/agents/bug-fixer/monitor.d.ts +0 -123
  354. package/dist/agents/bug-fixer/monitor.d.ts.map +0 -1
  355. package/dist/agents/bug-fixer/monitor.js +0 -629
  356. package/dist/agents/bug-fixer/monitor.js.map +0 -1
  357. package/dist/agents/bug-fixer/prompt.d.ts +0 -5
  358. package/dist/agents/bug-fixer/prompt.d.ts.map +0 -1
  359. package/dist/agents/bug-fixer/prompt.js +0 -94
  360. package/dist/agents/bug-fixer/prompt.js.map +0 -1
  361. package/dist/agents/bug-fixer/registries/pending-classification.d.ts +0 -28
  362. package/dist/agents/bug-fixer/registries/pending-classification.d.ts.map +0 -1
  363. package/dist/agents/bug-fixer/registries/pending-classification.js +0 -50
  364. package/dist/agents/bug-fixer/registries/pending-classification.js.map +0 -1
  365. package/dist/agents/bug-fixer/registries/pending-fix.d.ts +0 -33
  366. package/dist/agents/bug-fixer/registries/pending-fix.d.ts.map +0 -1
  367. package/dist/agents/bug-fixer/registries/pending-fix.js +0 -64
  368. package/dist/agents/bug-fixer/registries/pending-fix.js.map +0 -1
  369. package/dist/agents/bug-fixer/registries/pending.d.ts +0 -27
  370. package/dist/agents/bug-fixer/registries/pending.d.ts.map +0 -1
  371. package/dist/agents/bug-fixer/registries/pending.js +0 -49
  372. package/dist/agents/bug-fixer/registries/pending.js.map +0 -1
  373. package/dist/agents/bug-fixer/specialist-daemon.d.ts +0 -88
  374. package/dist/agents/bug-fixer/specialist-daemon.d.ts.map +0 -1
  375. package/dist/agents/bug-fixer/specialist-daemon.js +0 -431
  376. package/dist/agents/bug-fixer/specialist-daemon.js.map +0 -1
  377. package/dist/agents/bug-fixer/specialist.d.ts +0 -47
  378. package/dist/agents/bug-fixer/specialist.d.ts.map +0 -1
  379. package/dist/agents/bug-fixer/specialist.js +0 -327
  380. package/dist/agents/bug-fixer/specialist.js.map +0 -1
  381. package/dist/agents/bug-fixer/types.d.ts +0 -123
  382. package/dist/agents/bug-fixer/types.d.ts.map +0 -1
  383. package/dist/agents/bug-fixer/types.js +0 -9
  384. package/dist/agents/bug-fixer/types.js.map +0 -1
  385. package/dist/agents/factory.d.ts +0 -172
  386. package/dist/agents/factory.d.ts.map +0 -1
  387. package/dist/agents/factory.js +0 -706
  388. package/dist/agents/factory.js.map +0 -1
  389. package/dist/agents/hailer-expert/index.d.ts +0 -8
  390. package/dist/agents/hailer-expert/index.d.ts.map +0 -1
  391. package/dist/agents/hailer-expert/index.js +0 -14
  392. package/dist/agents/hailer-expert/index.js.map +0 -1
  393. package/dist/agents/hal/daemon.d.ts +0 -174
  394. package/dist/agents/hal/daemon.d.ts.map +0 -1
  395. package/dist/agents/hal/daemon.js +0 -1385
  396. package/dist/agents/hal/daemon.js.map +0 -1
  397. package/dist/agents/hal/definitions.d.ts +0 -42
  398. package/dist/agents/hal/definitions.d.ts.map +0 -1
  399. package/dist/agents/hal/definitions.js +0 -300
  400. package/dist/agents/hal/definitions.js.map +0 -1
  401. package/dist/agents/hal/index.d.ts +0 -3
  402. package/dist/agents/hal/index.d.ts.map +0 -1
  403. package/dist/agents/hal/index.js +0 -8
  404. package/dist/agents/hal/index.js.map +0 -1
  405. package/dist/agents/index.d.ts +0 -18
  406. package/dist/agents/index.d.ts.map +0 -1
  407. package/dist/agents/index.js +0 -48
  408. package/dist/agents/index.js.map +0 -1
  409. package/dist/agents/shared/base.d.ts +0 -253
  410. package/dist/agents/shared/base.d.ts.map +0 -1
  411. package/dist/agents/shared/base.js +0 -1122
  412. package/dist/agents/shared/base.js.map +0 -1
  413. package/dist/agents/shared/schemas/action-schema.d.ts +0 -62
  414. package/dist/agents/shared/schemas/action-schema.d.ts.map +0 -1
  415. package/dist/agents/shared/schemas/action-schema.js +0 -483
  416. package/dist/agents/shared/schemas/action-schema.js.map +0 -1
  417. package/dist/agents/shared/services/agent-registry.d.ts +0 -108
  418. package/dist/agents/shared/services/agent-registry.d.ts.map +0 -1
  419. package/dist/agents/shared/services/agent-registry.js +0 -469
  420. package/dist/agents/shared/services/agent-registry.js.map +0 -1
  421. package/dist/agents/shared/services/conversation-manager.d.ts +0 -57
  422. package/dist/agents/shared/services/conversation-manager.d.ts.map +0 -1
  423. package/dist/agents/shared/services/conversation-manager.js +0 -168
  424. package/dist/agents/shared/services/conversation-manager.js.map +0 -1
  425. package/dist/agents/shared/services/mcp-client.d.ts +0 -56
  426. package/dist/agents/shared/services/mcp-client.d.ts.map +0 -1
  427. package/dist/agents/shared/services/mcp-client.js +0 -124
  428. package/dist/agents/shared/services/mcp-client.js.map +0 -1
  429. package/dist/agents/shared/services/message-classifier.d.ts +0 -37
  430. package/dist/agents/shared/services/message-classifier.d.ts.map +0 -1
  431. package/dist/agents/shared/services/message-classifier.js +0 -203
  432. package/dist/agents/shared/services/message-classifier.js.map +0 -1
  433. package/dist/agents/shared/services/message-formatter.d.ts +0 -89
  434. package/dist/agents/shared/services/message-formatter.d.ts.map +0 -1
  435. package/dist/agents/shared/services/message-formatter.js +0 -390
  436. package/dist/agents/shared/services/message-formatter.js.map +0 -1
  437. package/dist/agents/shared/services/session-logger.d.ts +0 -162
  438. package/dist/agents/shared/services/session-logger.d.ts.map +0 -1
  439. package/dist/agents/shared/services/session-logger.js +0 -724
  440. package/dist/agents/shared/services/session-logger.js.map +0 -1
  441. package/dist/agents/shared/services/structured-output-executor.d.ts +0 -88
  442. package/dist/agents/shared/services/structured-output-executor.d.ts.map +0 -1
  443. package/dist/agents/shared/services/structured-output-executor.js +0 -296
  444. package/dist/agents/shared/services/structured-output-executor.js.map +0 -1
  445. package/dist/agents/shared/services/token-billing.d.ts +0 -72
  446. package/dist/agents/shared/services/token-billing.d.ts.map +0 -1
  447. package/dist/agents/shared/services/token-billing.js +0 -198
  448. package/dist/agents/shared/services/token-billing.js.map +0 -1
  449. package/dist/agents/shared/services/tool-executor.d.ts +0 -43
  450. package/dist/agents/shared/services/tool-executor.d.ts.map +0 -1
  451. package/dist/agents/shared/services/tool-executor.js +0 -175
  452. package/dist/agents/shared/services/tool-executor.js.map +0 -1
  453. package/dist/agents/shared/services/typing-indicator.d.ts +0 -24
  454. package/dist/agents/shared/services/typing-indicator.d.ts.map +0 -1
  455. package/dist/agents/shared/services/typing-indicator.js +0 -54
  456. package/dist/agents/shared/services/typing-indicator.js.map +0 -1
  457. package/dist/agents/shared/services/workspace-schema-cache.d.ts +0 -122
  458. package/dist/agents/shared/services/workspace-schema-cache.d.ts.map +0 -1
  459. package/dist/agents/shared/services/workspace-schema-cache.js +0 -507
  460. package/dist/agents/shared/services/workspace-schema-cache.js.map +0 -1
  461. package/dist/agents/shared/specialist.d.ts +0 -91
  462. package/dist/agents/shared/specialist.d.ts.map +0 -1
  463. package/dist/agents/shared/specialist.js +0 -399
  464. package/dist/agents/shared/specialist.js.map +0 -1
  465. package/dist/agents/shared/tool-schema-loader.d.ts +0 -65
  466. package/dist/agents/shared/tool-schema-loader.d.ts.map +0 -1
  467. package/dist/agents/shared/tool-schema-loader.js +0 -238
  468. package/dist/agents/shared/tool-schema-loader.js.map +0 -1
  469. package/dist/agents/shared/types.d.ts +0 -190
  470. package/dist/agents/shared/types.d.ts.map +0 -1
  471. package/dist/agents/shared/types.js +0 -13
  472. package/dist/agents/shared/types.js.map +0 -1
  473. package/dist/bot/bot-config.d.ts +0 -37
  474. package/dist/bot/bot-config.d.ts.map +0 -1
  475. package/dist/bot/bot-config.js +0 -219
  476. package/dist/bot/bot-config.js.map +0 -1
  477. package/dist/bot/services/__tests__/permission-guard.test.d.ts +0 -2
  478. package/dist/bot/services/__tests__/permission-guard.test.d.ts.map +0 -1
  479. package/dist/bot/services/__tests__/permission-guard.test.js +0 -357
  480. package/dist/bot/services/__tests__/permission-guard.test.js.map +0 -1
  481. package/dist/bot/services/session-logger.d.ts +0 -162
  482. package/dist/bot/services/session-logger.d.ts.map +0 -1
  483. package/dist/bot/services/session-logger.js +0 -724
  484. package/dist/bot/services/session-logger.js.map +0 -1
  485. package/dist/bot/services/workspace-schema-cache.d.ts +0 -122
  486. package/dist/bot/services/workspace-schema-cache.d.ts.map +0 -1
  487. package/dist/bot/services/workspace-schema-cache.js +0 -506
  488. package/dist/bot/services/workspace-schema-cache.js.map +0 -1
  489. package/dist/bot-config/tools.d.ts +0 -28
  490. package/dist/bot-config/tools.d.ts.map +0 -1
  491. package/dist/bot-config/tools.js +0 -279
  492. package/dist/bot-config/tools.js.map +0 -1
  493. package/dist/client/agents/base.d.ts +0 -207
  494. package/dist/client/agents/base.d.ts.map +0 -1
  495. package/dist/client/agents/base.js +0 -744
  496. package/dist/client/agents/base.js.map +0 -1
  497. package/dist/client/agents/definitions.d.ts +0 -53
  498. package/dist/client/agents/definitions.d.ts.map +0 -1
  499. package/dist/client/agents/definitions.js +0 -263
  500. package/dist/client/agents/definitions.js.map +0 -1
  501. package/dist/client/agents/orchestrator.d.ts +0 -141
  502. package/dist/client/agents/orchestrator.d.ts.map +0 -1
  503. package/dist/client/agents/orchestrator.js +0 -1062
  504. package/dist/client/agents/orchestrator.js.map +0 -1
  505. package/dist/client/agents/specialist.d.ts +0 -86
  506. package/dist/client/agents/specialist.d.ts.map +0 -1
  507. package/dist/client/agents/specialist.js +0 -340
  508. package/dist/client/agents/specialist.js.map +0 -1
  509. package/dist/client/bot-entrypoint.d.ts +0 -7
  510. package/dist/client/bot-entrypoint.d.ts.map +0 -1
  511. package/dist/client/bot-entrypoint.js +0 -103
  512. package/dist/client/bot-entrypoint.js.map +0 -1
  513. package/dist/client/bot-manager.d.ts +0 -44
  514. package/dist/client/bot-manager.d.ts.map +0 -1
  515. package/dist/client/bot-manager.js +0 -173
  516. package/dist/client/bot-manager.js.map +0 -1
  517. package/dist/client/bot-runner.d.ts +0 -35
  518. package/dist/client/bot-runner.d.ts.map +0 -1
  519. package/dist/client/bot-runner.js +0 -188
  520. package/dist/client/bot-runner.js.map +0 -1
  521. package/dist/client/chat-agent-daemon.d.ts +0 -464
  522. package/dist/client/chat-agent-daemon.d.ts.map +0 -1
  523. package/dist/client/chat-agent-daemon.js +0 -1774
  524. package/dist/client/chat-agent-daemon.js.map +0 -1
  525. package/dist/client/daemon-factory.d.ts +0 -106
  526. package/dist/client/daemon-factory.d.ts.map +0 -1
  527. package/dist/client/daemon-factory.js +0 -301
  528. package/dist/client/daemon-factory.js.map +0 -1
  529. package/dist/client/factory.d.ts +0 -111
  530. package/dist/client/factory.d.ts.map +0 -1
  531. package/dist/client/factory.js +0 -314
  532. package/dist/client/factory.js.map +0 -1
  533. package/dist/client/index.d.ts +0 -17
  534. package/dist/client/index.d.ts.map +0 -1
  535. package/dist/client/index.js +0 -38
  536. package/dist/client/index.js.map +0 -1
  537. package/dist/client/multi-bot-manager.d.ts +0 -42
  538. package/dist/client/multi-bot-manager.d.ts.map +0 -1
  539. package/dist/client/multi-bot-manager.js +0 -161
  540. package/dist/client/multi-bot-manager.js.map +0 -1
  541. package/dist/client/orchestrator-daemon.d.ts +0 -87
  542. package/dist/client/orchestrator-daemon.d.ts.map +0 -1
  543. package/dist/client/orchestrator-daemon.js +0 -444
  544. package/dist/client/orchestrator-daemon.js.map +0 -1
  545. package/dist/client/server.d.ts +0 -8
  546. package/dist/client/server.d.ts.map +0 -1
  547. package/dist/client/server.js +0 -251
  548. package/dist/client/server.js.map +0 -1
  549. package/dist/client/services/agent-registry.d.ts +0 -108
  550. package/dist/client/services/agent-registry.d.ts.map +0 -1
  551. package/dist/client/services/agent-registry.js +0 -630
  552. package/dist/client/services/agent-registry.js.map +0 -1
  553. package/dist/client/services/conversation-manager.d.ts +0 -50
  554. package/dist/client/services/conversation-manager.d.ts.map +0 -1
  555. package/dist/client/services/conversation-manager.js +0 -136
  556. package/dist/client/services/conversation-manager.js.map +0 -1
  557. package/dist/client/services/mcp-client.d.ts +0 -48
  558. package/dist/client/services/mcp-client.d.ts.map +0 -1
  559. package/dist/client/services/mcp-client.js +0 -105
  560. package/dist/client/services/mcp-client.js.map +0 -1
  561. package/dist/client/services/message-classifier.d.ts +0 -37
  562. package/dist/client/services/message-classifier.d.ts.map +0 -1
  563. package/dist/client/services/message-classifier.js +0 -187
  564. package/dist/client/services/message-classifier.js.map +0 -1
  565. package/dist/client/services/message-formatter.d.ts +0 -84
  566. package/dist/client/services/message-formatter.d.ts.map +0 -1
  567. package/dist/client/services/message-formatter.js +0 -353
  568. package/dist/client/services/message-formatter.js.map +0 -1
  569. package/dist/client/services/session-logger.d.ts +0 -106
  570. package/dist/client/services/session-logger.d.ts.map +0 -1
  571. package/dist/client/services/session-logger.js +0 -446
  572. package/dist/client/services/session-logger.js.map +0 -1
  573. package/dist/client/services/tool-executor.d.ts +0 -41
  574. package/dist/client/services/tool-executor.d.ts.map +0 -1
  575. package/dist/client/services/tool-executor.js +0 -169
  576. package/dist/client/services/tool-executor.js.map +0 -1
  577. package/dist/client/services/workspace-schema-cache.d.ts +0 -149
  578. package/dist/client/services/workspace-schema-cache.d.ts.map +0 -1
  579. package/dist/client/services/workspace-schema-cache.js +0 -732
  580. package/dist/client/services/workspace-schema-cache.js.map +0 -1
  581. package/dist/client/specialist-daemon.d.ts +0 -77
  582. package/dist/client/specialist-daemon.d.ts.map +0 -1
  583. package/dist/client/specialist-daemon.js +0 -197
  584. package/dist/client/specialist-daemon.js.map +0 -1
  585. package/dist/client/specialists.d.ts +0 -53
  586. package/dist/client/specialists.d.ts.map +0 -1
  587. package/dist/client/specialists.js +0 -178
  588. package/dist/client/specialists.js.map +0 -1
  589. package/dist/client/tool-schema-loader.d.ts +0 -62
  590. package/dist/client/tool-schema-loader.d.ts.map +0 -1
  591. package/dist/client/tool-schema-loader.js +0 -232
  592. package/dist/client/tool-schema-loader.js.map +0 -1
  593. package/dist/client/types.d.ts +0 -327
  594. package/dist/client/types.d.ts.map +0 -1
  595. package/dist/client/types.js +0 -121
  596. package/dist/client/types.js.map +0 -1
  597. package/dist/commands/seed-config.d.ts +0 -9
  598. package/dist/commands/seed-config.d.ts.map +0 -1
  599. package/dist/commands/seed-config.js +0 -377
  600. package/dist/commands/seed-config.js.map +0 -1
  601. package/dist/commands/setup.d.ts +0 -11
  602. package/dist/commands/setup.d.ts.map +0 -1
  603. package/dist/commands/setup.js +0 -320
  604. package/dist/commands/setup.js.map +0 -1
  605. package/dist/lib/discussion-lock.d.ts +0 -42
  606. package/dist/lib/discussion-lock.d.ts.map +0 -1
  607. package/dist/lib/discussion-lock.js +0 -110
  608. package/dist/lib/discussion-lock.js.map +0 -1
  609. package/dist/mcp/signal-handler.d.ts +0 -82
  610. package/dist/mcp/signal-handler.d.ts.map +0 -1
  611. package/dist/mcp/signal-handler.js +0 -406
  612. package/dist/mcp/signal-handler.js.map +0 -1
  613. package/dist/mcp/tools/__tests__/discussion-forward.test.d.ts +0 -2
  614. package/dist/mcp/tools/__tests__/discussion-forward.test.d.ts.map +0 -1
  615. package/dist/mcp/tools/__tests__/discussion-forward.test.js +0 -218
  616. package/dist/mcp/tools/__tests__/discussion-forward.test.js.map +0 -1
  617. package/dist/mcp/tools/app-member.d.ts +0 -14
  618. package/dist/mcp/tools/app-member.d.ts.map +0 -1
  619. package/dist/mcp/tools/app-member.js +0 -195
  620. package/dist/mcp/tools/app-member.js.map +0 -1
  621. package/dist/mcp/tools/app-scaffold.d.ts +0 -14
  622. package/dist/mcp/tools/app-scaffold.d.ts.map +0 -1
  623. package/dist/mcp/tools/app-scaffold.js +0 -581
  624. package/dist/mcp/tools/app-scaffold.js.map +0 -1
  625. package/dist/mcp/tools/bot-config/constants.d.ts +0 -23
  626. package/dist/mcp/tools/bot-config/constants.d.ts.map +0 -1
  627. package/dist/mcp/tools/bot-config/constants.js +0 -94
  628. package/dist/mcp/tools/bot-config/constants.js.map +0 -1
  629. package/dist/mcp/tools/bot-config/core.d.ts +0 -253
  630. package/dist/mcp/tools/bot-config/core.d.ts.map +0 -1
  631. package/dist/mcp/tools/bot-config/core.js +0 -2456
  632. package/dist/mcp/tools/bot-config/core.js.map +0 -1
  633. package/dist/mcp/tools/bot-config/index.d.ts +0 -10
  634. package/dist/mcp/tools/bot-config/index.d.ts.map +0 -1
  635. package/dist/mcp/tools/bot-config/index.js +0 -59
  636. package/dist/mcp/tools/bot-config/index.js.map +0 -1
  637. package/dist/mcp/tools/bot-config/tools.d.ts +0 -7
  638. package/dist/mcp/tools/bot-config/tools.d.ts.map +0 -1
  639. package/dist/mcp/tools/bot-config/tools.js +0 -15
  640. package/dist/mcp/tools/bot-config/tools.js.map +0 -1
  641. package/dist/mcp/tools/bot-config/types.d.ts +0 -50
  642. package/dist/mcp/tools/bot-config/types.d.ts.map +0 -1
  643. package/dist/mcp/tools/bot-config/types.js +0 -6
  644. package/dist/mcp/tools/bot-config/types.js.map +0 -1
  645. package/dist/mcp/tools/bug-fixer-tools.d.ts +0 -45
  646. package/dist/mcp/tools/bug-fixer-tools.d.ts.map +0 -1
  647. package/dist/mcp/tools/bug-fixer-tools.js +0 -1096
  648. package/dist/mcp/tools/bug-fixer-tools.js.map +0 -1
  649. package/dist/mcp/tools/document.d.ts +0 -11
  650. package/dist/mcp/tools/document.d.ts.map +0 -1
  651. package/dist/mcp/tools/document.js +0 -741
  652. package/dist/mcp/tools/document.js.map +0 -1
  653. package/dist/mcp/tools/investigate.d.ts +0 -9
  654. package/dist/mcp/tools/investigate.d.ts.map +0 -1
  655. package/dist/mcp/tools/investigate.js +0 -254
  656. package/dist/mcp/tools/investigate.js.map +0 -1
  657. package/dist/mcp/utils/pagination.d.ts +0 -40
  658. package/dist/mcp/utils/pagination.d.ts.map +0 -1
  659. package/dist/mcp/utils/pagination.js +0 -55
  660. package/dist/mcp/utils/pagination.js.map +0 -1
  661. package/dist/modules/bug-reports/bug-config.d.ts +0 -25
  662. package/dist/modules/bug-reports/bug-config.d.ts.map +0 -1
  663. package/dist/modules/bug-reports/bug-config.js +0 -187
  664. package/dist/modules/bug-reports/bug-config.js.map +0 -1
  665. package/dist/modules/bug-reports/bug-monitor.d.ts +0 -108
  666. package/dist/modules/bug-reports/bug-monitor.d.ts.map +0 -1
  667. package/dist/modules/bug-reports/bug-monitor.js +0 -510
  668. package/dist/modules/bug-reports/bug-monitor.js.map +0 -1
  669. package/dist/modules/bug-reports/giuseppe-agent.d.ts +0 -58
  670. package/dist/modules/bug-reports/giuseppe-agent.d.ts.map +0 -1
  671. package/dist/modules/bug-reports/giuseppe-agent.js +0 -467
  672. package/dist/modules/bug-reports/giuseppe-agent.js.map +0 -1
  673. package/dist/modules/bug-reports/giuseppe-ai.d.ts +0 -83
  674. package/dist/modules/bug-reports/giuseppe-ai.d.ts.map +0 -1
  675. package/dist/modules/bug-reports/giuseppe-ai.js +0 -466
  676. package/dist/modules/bug-reports/giuseppe-ai.js.map +0 -1
  677. package/dist/modules/bug-reports/giuseppe-bot.d.ts +0 -110
  678. package/dist/modules/bug-reports/giuseppe-bot.d.ts.map +0 -1
  679. package/dist/modules/bug-reports/giuseppe-bot.js +0 -804
  680. package/dist/modules/bug-reports/giuseppe-bot.js.map +0 -1
  681. package/dist/modules/bug-reports/giuseppe-daemon.d.ts +0 -80
  682. package/dist/modules/bug-reports/giuseppe-daemon.d.ts.map +0 -1
  683. package/dist/modules/bug-reports/giuseppe-daemon.js +0 -617
  684. package/dist/modules/bug-reports/giuseppe-daemon.js.map +0 -1
  685. package/dist/modules/bug-reports/giuseppe-files.d.ts +0 -64
  686. package/dist/modules/bug-reports/giuseppe-files.d.ts.map +0 -1
  687. package/dist/modules/bug-reports/giuseppe-files.js +0 -375
  688. package/dist/modules/bug-reports/giuseppe-files.js.map +0 -1
  689. package/dist/modules/bug-reports/giuseppe-git.d.ts +0 -48
  690. package/dist/modules/bug-reports/giuseppe-git.d.ts.map +0 -1
  691. package/dist/modules/bug-reports/giuseppe-git.js +0 -298
  692. package/dist/modules/bug-reports/giuseppe-git.js.map +0 -1
  693. package/dist/modules/bug-reports/giuseppe-lsp.d.ts +0 -113
  694. package/dist/modules/bug-reports/giuseppe-lsp.d.ts.map +0 -1
  695. package/dist/modules/bug-reports/giuseppe-lsp.js +0 -485
  696. package/dist/modules/bug-reports/giuseppe-lsp.js.map +0 -1
  697. package/dist/modules/bug-reports/giuseppe-prompt.d.ts +0 -5
  698. package/dist/modules/bug-reports/giuseppe-prompt.d.ts.map +0 -1
  699. package/dist/modules/bug-reports/giuseppe-prompt.js +0 -94
  700. package/dist/modules/bug-reports/giuseppe-prompt.js.map +0 -1
  701. package/dist/modules/bug-reports/index.d.ts +0 -77
  702. package/dist/modules/bug-reports/index.d.ts.map +0 -1
  703. package/dist/modules/bug-reports/index.js +0 -215
  704. package/dist/modules/bug-reports/index.js.map +0 -1
  705. package/dist/modules/bug-reports/pending-classification-registry.d.ts +0 -28
  706. package/dist/modules/bug-reports/pending-classification-registry.d.ts.map +0 -1
  707. package/dist/modules/bug-reports/pending-classification-registry.js +0 -50
  708. package/dist/modules/bug-reports/pending-classification-registry.js.map +0 -1
  709. package/dist/modules/bug-reports/pending-fix-registry.d.ts +0 -30
  710. package/dist/modules/bug-reports/pending-fix-registry.d.ts.map +0 -1
  711. package/dist/modules/bug-reports/pending-fix-registry.js +0 -42
  712. package/dist/modules/bug-reports/pending-fix-registry.js.map +0 -1
  713. package/dist/modules/bug-reports/pending-registry.d.ts +0 -27
  714. package/dist/modules/bug-reports/pending-registry.d.ts.map +0 -1
  715. package/dist/modules/bug-reports/pending-registry.js +0 -49
  716. package/dist/modules/bug-reports/pending-registry.js.map +0 -1
  717. package/dist/modules/bug-reports/types.d.ts +0 -123
  718. package/dist/modules/bug-reports/types.d.ts.map +0 -1
  719. package/dist/modules/bug-reports/types.js +0 -9
  720. package/dist/modules/bug-reports/types.js.map +0 -1
  721. package/dist/plugins/bug-fixer/index.d.ts +0 -2
  722. package/dist/plugins/bug-fixer/index.d.ts.map +0 -1
  723. package/dist/plugins/bug-fixer/index.js +0 -18
  724. package/dist/plugins/bug-fixer/index.js.map +0 -1
  725. package/dist/plugins/bug-fixer/tools.d.ts +0 -45
  726. package/dist/plugins/bug-fixer/tools.d.ts.map +0 -1
  727. package/dist/plugins/bug-fixer/tools.js +0 -1096
  728. package/dist/plugins/bug-fixer/tools.js.map +0 -1
  729. package/dist/plugins/vipunen/__tests__/tools.test.d.ts +0 -10
  730. package/dist/plugins/vipunen/__tests__/tools.test.d.ts.map +0 -1
  731. package/dist/plugins/vipunen/__tests__/tools.test.js +0 -646
  732. package/dist/plugins/vipunen/__tests__/tools.test.js.map +0 -1
  733. package/dist/routes/agents.d.ts +0 -44
  734. package/dist/routes/agents.d.ts.map +0 -1
  735. package/dist/routes/agents.js +0 -311
  736. package/dist/routes/agents.js.map +0 -1
  737. package/dist/services/agent-credential-store.d.ts +0 -73
  738. package/dist/services/agent-credential-store.d.ts.map +0 -1
  739. package/dist/services/agent-credential-store.js +0 -212
  740. package/dist/services/agent-credential-store.js.map +0 -1
  741. package/dist/stdio-server.d.ts +0 -14
  742. package/dist/stdio-server.d.ts.map +0 -1
  743. package/dist/stdio-server.js +0 -101
  744. package/dist/stdio-server.js.map +0 -1
  745. package/dist/workspace/context.d.ts +0 -148
  746. package/dist/workspace/context.d.ts.map +0 -1
  747. package/dist/workspace/context.js +0 -339
  748. package/dist/workspace/context.js.map +0 -1
  749. package/dist/workspace/credentials.d.ts +0 -55
  750. package/dist/workspace/credentials.d.ts.map +0 -1
  751. package/dist/workspace/credentials.js +0 -239
  752. package/dist/workspace/credentials.js.map +0 -1
  753. package/dist/workspace/index.d.ts +0 -21
  754. package/dist/workspace/index.d.ts.map +0 -1
  755. package/dist/workspace/index.js +0 -45
  756. package/dist/workspace/index.js.map +0 -1
  757. package/dist/workspace/loader.d.ts +0 -27
  758. package/dist/workspace/loader.d.ts.map +0 -1
  759. package/dist/workspace/loader.js +0 -222
  760. package/dist/workspace/loader.js.map +0 -1
  761. package/dist/workspace/schema.d.ts +0 -37
  762. package/dist/workspace/schema.d.ts.map +0 -1
  763. package/dist/workspace/schema.js +0 -192
  764. package/dist/workspace/schema.js.map +0 -1
@@ -1,1096 +0,0 @@
1
- "use strict";
2
- /**
3
- * Bug Fixer MCP Tools
4
- *
5
- * Bug-fixing tools for Bug Fixer specialist daemon.
6
- * These tools handle file operations, git, and build commands.
7
- */
8
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
9
- if (k2 === undefined) k2 = k;
10
- var desc = Object.getOwnPropertyDescriptor(m, k);
11
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
12
- desc = { enumerable: true, get: function() { return m[k]; } };
13
- }
14
- Object.defineProperty(o, k2, desc);
15
- }) : (function(o, m, k, k2) {
16
- if (k2 === undefined) k2 = k;
17
- o[k2] = m[k];
18
- }));
19
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
20
- Object.defineProperty(o, "default", { enumerable: true, value: v });
21
- }) : function(o, v) {
22
- o["default"] = v;
23
- });
24
- var __importStar = (this && this.__importStar) || (function () {
25
- var ownKeys = function(o) {
26
- ownKeys = Object.getOwnPropertyNames || function (o) {
27
- var ar = [];
28
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
29
- return ar;
30
- };
31
- return ownKeys(o);
32
- };
33
- return function (mod) {
34
- if (mod && mod.__esModule) return mod;
35
- var result = {};
36
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
37
- __setModuleDefault(result, mod);
38
- return result;
39
- };
40
- })();
41
- Object.defineProperty(exports, "__esModule", { value: true });
42
- exports.bugFixerTools = exports.markBugFixedTool = exports.markBugDeclinedTool = exports.bugFixerRetryFixTool = exports.bugFixerPublishFixTool = exports.bugFixerMarkDeclinedTool = exports.bugFixerStartFixTool = exports.bugFixerAnalyzeBugTool = exports.bugFixerPublishAppTool = exports.bugFixerGitRevertTool = exports.bugFixerGitPushTool = exports.bugFixerGitCommitTool = exports.bugFixerGitPullTool = exports.bugFixerGitStatusTool = exports.bugFixerRunBuildTool = exports.bugFixerApplyFixTool = exports.bugFixerWriteFileTool = exports.bugFixerReadFileTool = exports.bugFixerListFilesTool = exports.bugFixerFindAppTool = void 0;
43
- const zod_1 = require("zod");
44
- const child_process_1 = require("child_process");
45
- const fs = __importStar(require("fs/promises"));
46
- const path = __importStar(require("path"));
47
- const tool_registry_1 = require("../tool-registry");
48
- const logger_1 = require("../../lib/logger");
49
- const config_1 = require("../../config");
50
- const pending_classification_1 = require("../../agents/bug-fixer/registries/pending-classification");
51
- const pending_fix_1 = require("../../agents/bug-fixer/registries/pending-fix");
52
- const logger = (0, logger_1.createLogger)({ component: "bug-fixer-tools" });
53
- // Parse all configured app paths
54
- function getAppPaths() {
55
- const paths = [];
56
- // Multiple paths (comma-separated)
57
- if (config_1.environment.DEV_APPS_PATHS) {
58
- paths.push(...config_1.environment.DEV_APPS_PATHS.split(',').map(p => p.trim()).filter(p => p.length > 0));
59
- }
60
- // Single path (fallback)
61
- if (config_1.environment.DEV_APPS_PATH && !paths.includes(config_1.environment.DEV_APPS_PATH)) {
62
- paths.push(config_1.environment.DEV_APPS_PATH);
63
- }
64
- // Default to cwd if nothing configured
65
- if (paths.length === 0) {
66
- paths.push(process.cwd());
67
- }
68
- return paths;
69
- }
70
- // Cache for scanned apps
71
- let appsCache = null;
72
- // Helper to scan for apps across all configured directories
73
- async function scanApps() {
74
- // Return cached if available
75
- if (appsCache)
76
- return appsCache;
77
- const apps = [];
78
- const appPaths = getAppPaths();
79
- for (const basePath of appPaths) {
80
- try {
81
- const entries = await fs.readdir(basePath, { withFileTypes: true });
82
- for (const entry of entries) {
83
- if (entry.isDirectory() && !entry.name.startsWith(".") && !["node_modules", "dist"].includes(entry.name)) {
84
- const appPath = path.join(basePath, entry.name);
85
- // Try to read manifest for appId
86
- let manifest = null;
87
- try {
88
- const content = await fs.readFile(path.join(appPath, "manifest.json"), "utf-8");
89
- manifest = JSON.parse(content);
90
- }
91
- catch {
92
- try {
93
- const content = await fs.readFile(path.join(appPath, "public", "manifest.json"), "utf-8");
94
- manifest = JSON.parse(content);
95
- }
96
- catch {
97
- // Not a Hailer app
98
- }
99
- }
100
- if (manifest) {
101
- apps.push({
102
- name: manifest.name || entry.name,
103
- path: appPath,
104
- appId: manifest.appId
105
- });
106
- }
107
- }
108
- }
109
- }
110
- catch (e) {
111
- logger.warn("Failed to scan apps directory", { path: basePath, error: e });
112
- }
113
- }
114
- // Cache results
115
- appsCache = apps;
116
- logger.info("Scanned apps for bug fixer tools", {
117
- paths: appPaths,
118
- found: apps.map(a => ({ name: a.name, appId: a.appId?.substring(0, 8) || "none" }))
119
- });
120
- return apps;
121
- }
122
- // Find App Tool
123
- exports.bugFixerFindAppTool = {
124
- name: "bug_fixer_find_app",
125
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
126
- description: "Find a Hailer app project by name or from bug title",
127
- schema: zod_1.z.object({
128
- searchTerm: zod_1.z.string().describe("App name or bug title to search for").optional(),
129
- name: zod_1.z.string().describe("Alias for searchTerm - app name to search for").optional(),
130
- appName: zod_1.z.string().describe("Alias for searchTerm - app name to search for").optional()
131
- }).refine(data => data.searchTerm || data.name || data.appName, {
132
- message: "Either searchTerm, name, or appName is required"
133
- }),
134
- async execute(args, _context) {
135
- // Accept searchTerm, name, or appName
136
- const searchTerm = (args.searchTerm || args.name || args.appName || '').toLowerCase();
137
- const apps = await scanApps();
138
- for (const app of apps) {
139
- if (app.name.toLowerCase().includes(searchTerm) ||
140
- searchTerm.includes(app.name.toLowerCase())) {
141
- return {
142
- content: [{ type: "text", text: JSON.stringify({ found: true, name: app.name, path: app.path }) }]
143
- };
144
- }
145
- }
146
- return {
147
- content: [{ type: "text", text: JSON.stringify({ found: false, availableApps: apps.map(a => a.name) }) }]
148
- };
149
- }
150
- };
151
- // List Files Tool
152
- exports.bugFixerListFilesTool = {
153
- name: "bug_fixer_list_files",
154
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
155
- description: "List source files in a Hailer app project",
156
- schema: zod_1.z.object({
157
- appPath: zod_1.z.string().describe("Path to the app project").optional(),
158
- app: zod_1.z.string().describe("Alias for appPath - path to the app project").optional()
159
- }).refine(data => data.appPath || data.app, {
160
- message: "Either appPath or app is required"
161
- }),
162
- async execute(args, _context) {
163
- // Accept either appPath or app
164
- const appPath = args.appPath || args.app || '';
165
- const files = [];
166
- const extensions = [".tsx", ".ts", ".jsx", ".js"];
167
- const ignoreDirs = ["node_modules", "dist", "build", ".git"];
168
- const scan = async (dir, depth = 0) => {
169
- if (depth > 5)
170
- return;
171
- try {
172
- const entries = await fs.readdir(dir, { withFileTypes: true });
173
- for (const entry of entries) {
174
- const fullPath = path.join(dir, entry.name);
175
- const relativePath = path.relative(appPath, fullPath);
176
- if (entry.isDirectory()) {
177
- if (!ignoreDirs.includes(entry.name) && !entry.name.startsWith(".")) {
178
- await scan(fullPath, depth + 1);
179
- }
180
- }
181
- else if (extensions.some(ext => entry.name.endsWith(ext))) {
182
- if (!entry.name.includes(".test.") && !entry.name.includes(".spec.")) {
183
- files.push(relativePath);
184
- }
185
- }
186
- }
187
- }
188
- catch { /* skip */ }
189
- };
190
- await scan(appPath);
191
- return {
192
- content: [{ type: "text", text: JSON.stringify({ files: files.slice(0, 50), total: files.length }) }]
193
- };
194
- }
195
- };
196
- // Read File Tool
197
- exports.bugFixerReadFileTool = {
198
- name: "bug_fixer_read_file",
199
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
200
- description: "Read a source file from the app",
201
- schema: zod_1.z.object({
202
- appPath: zod_1.z.string().describe("Path to the app project"),
203
- filePath: zod_1.z.string().describe("Relative path to the file")
204
- }),
205
- async execute(args, _context) {
206
- try {
207
- const fullPath = path.join(args.appPath, args.filePath);
208
- const content = await fs.readFile(fullPath, "utf-8");
209
- return {
210
- content: [{ type: "text", text: JSON.stringify({ content }) }]
211
- };
212
- }
213
- catch (e) {
214
- return {
215
- content: [{ type: "text", text: JSON.stringify({ error: e.message }) }]
216
- };
217
- }
218
- }
219
- };
220
- // Write File Tool
221
- exports.bugFixerWriteFileTool = {
222
- name: "bug_fixer_write_file",
223
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
224
- description: "Write/update a source file in the app",
225
- schema: zod_1.z.object({
226
- appPath: zod_1.z.string().describe("Path to the app project"),
227
- filePath: zod_1.z.string().describe("Relative path to the file"),
228
- content: zod_1.z.string().describe("New file content")
229
- }),
230
- async execute(args, _context) {
231
- try {
232
- const fullPath = path.join(args.appPath, args.filePath);
233
- await fs.mkdir(path.dirname(fullPath), { recursive: true });
234
- await fs.writeFile(fullPath, args.content, "utf-8");
235
- logger.info("Bug Fixer wrote file", { filePath: args.filePath });
236
- return {
237
- content: [{ type: "text", text: JSON.stringify({ success: true, path: args.filePath }) }]
238
- };
239
- }
240
- catch (e) {
241
- return {
242
- content: [{ type: "text", text: JSON.stringify({ error: e.message }) }]
243
- };
244
- }
245
- }
246
- };
247
- // Apply Fix Tool (search/replace pattern - calls existing bot logic)
248
- const fixFileSchema = zod_1.z.object({
249
- path: zod_1.z.string().describe("Relative file path (e.g., 'src/App.tsx')"),
250
- action: zod_1.z.enum(["edit", "create", "delete"]).describe("Action: edit (search/replace), create (new file), delete"),
251
- search: zod_1.z.string().optional().describe("For 'edit': the exact code snippet to find"),
252
- replace: zod_1.z.string().optional().describe("For 'edit': the code to replace it with"),
253
- content: zod_1.z.string().optional().describe("For 'create': the full file content")
254
- });
255
- exports.bugFixerApplyFixTool = {
256
- name: "bug_fixer_apply_fix",
257
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
258
- description: `Apply code fixes using search/replace pattern. More token-efficient than rewriting entire files.
259
-
260
- **For 'edit' action:** Provide search (code to find) and replace (code to replace with).
261
- **For 'create' action:** Provide content (full file content).
262
- **For 'delete' action:** Just provide path.
263
-
264
- Example:
265
- \`\`\`json
266
- {
267
- "appPath": "lineup-manager",
268
- "fixes": [{
269
- "path": "src/App.tsx",
270
- "action": "edit",
271
- "search": "const handleDragEnd = () => {\\n // old code\\n}",
272
- "replace": "const handleDragEnd = () => {\\n // fixed code\\n}"
273
- }]
274
- }
275
- \`\`\``,
276
- schema: zod_1.z.object({
277
- appPath: zod_1.z.string().describe("App folder name or path (e.g., 'lineup-manager')"),
278
- fixes: zod_1.z.array(fixFileSchema).describe("Array of file operations to apply")
279
- }),
280
- async execute(args, _context) {
281
- try {
282
- // Resolve app path - try absolute first, then search in configured directories
283
- let appFullPath = args.appPath;
284
- if (!path.isAbsolute(args.appPath)) {
285
- // Try to find in scanned apps
286
- const apps = await scanApps();
287
- const matchedApp = apps.find(a => a.name.toLowerCase() === args.appPath.toLowerCase() ||
288
- a.path.endsWith(`/${args.appPath}`));
289
- if (matchedApp) {
290
- appFullPath = matchedApp.path;
291
- }
292
- else {
293
- // Fallback: try first configured path
294
- const basePaths = getAppPaths();
295
- appFullPath = path.join(basePaths[0], args.appPath);
296
- }
297
- }
298
- // Check app exists
299
- try {
300
- await fs.access(appFullPath);
301
- }
302
- catch {
303
- return {
304
- content: [{ type: "text", text: JSON.stringify({
305
- success: false,
306
- error: `App not found at: ${appFullPath}`
307
- }) }]
308
- };
309
- }
310
- const modifiedFiles = [];
311
- const errors = [];
312
- for (const fix of args.fixes) {
313
- const filePath = path.join(appFullPath, fix.path);
314
- try {
315
- if (fix.action === 'edit' && fix.search && fix.replace !== undefined) {
316
- // Read file
317
- const content = await fs.readFile(filePath, 'utf-8');
318
- // Try exact match first
319
- if (content.includes(fix.search)) {
320
- const newContent = content.replace(fix.search, fix.replace);
321
- await fs.writeFile(filePath, newContent, 'utf-8');
322
- modifiedFiles.push(fix.path);
323
- logger.info("Bug Fixer applied fix (exact match)", { path: fix.path });
324
- }
325
- else {
326
- // Try normalized whitespace match
327
- const normalizeWs = (s) => s.replace(/\s+/g, ' ').trim();
328
- const normalizedContent = normalizeWs(content);
329
- const normalizedSearch = normalizeWs(fix.search);
330
- if (normalizedContent.includes(normalizedSearch)) {
331
- // Line-by-line search
332
- const searchLines = fix.search.split('\n').map((l) => l.trim()).filter((l) => l);
333
- const contentLines = content.split('\n');
334
- let found = false;
335
- for (let i = 0; i <= contentLines.length - searchLines.length; i++) {
336
- const candidateLines = contentLines.slice(i, i + searchLines.length);
337
- if (candidateLines.every((line, j) => line.trim() === searchLines[j])) {
338
- const before = contentLines.slice(0, i);
339
- const after = contentLines.slice(i + searchLines.length);
340
- const replaceLines = fix.replace.split('\n');
341
- const newContent = [...before, ...replaceLines, ...after].join('\n');
342
- await fs.writeFile(filePath, newContent, 'utf-8');
343
- modifiedFiles.push(fix.path);
344
- found = true;
345
- logger.info("Bug Fixer applied fix (normalized match)", { path: fix.path });
346
- break;
347
- }
348
- }
349
- if (!found) {
350
- errors.push(`${fix.path}: Search string not found (whitespace mismatch)`);
351
- }
352
- }
353
- else {
354
- errors.push(`${fix.path}: Search string not found`);
355
- }
356
- }
357
- }
358
- else if (fix.action === 'create' && fix.content) {
359
- await fs.mkdir(path.dirname(filePath), { recursive: true });
360
- await fs.writeFile(filePath, fix.content, 'utf-8');
361
- modifiedFiles.push(fix.path);
362
- logger.info("Bug Fixer created file", { path: fix.path });
363
- }
364
- else if (fix.action === 'delete') {
365
- await fs.unlink(filePath);
366
- modifiedFiles.push(fix.path);
367
- logger.info("Bug Fixer deleted file", { path: fix.path });
368
- }
369
- else {
370
- errors.push(`${fix.path}: Invalid action or missing required fields`);
371
- }
372
- }
373
- catch (e) {
374
- errors.push(`${fix.path}: ${e.message}`);
375
- }
376
- }
377
- if (errors.length > 0) {
378
- return {
379
- content: [{ type: "text", text: JSON.stringify({
380
- success: false,
381
- modifiedFiles,
382
- errors,
383
- hint: "Check that 'search' exactly matches the code in the file (including whitespace)"
384
- }) }]
385
- };
386
- }
387
- return {
388
- content: [{ type: "text", text: JSON.stringify({
389
- success: true,
390
- modifiedFiles,
391
- message: `Applied ${modifiedFiles.length} fix(es). Run bug_fixer_run_build to verify.`
392
- }) }]
393
- };
394
- }
395
- catch (e) {
396
- return {
397
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }]
398
- };
399
- }
400
- }
401
- };
402
- // Run Build Tool
403
- exports.bugFixerRunBuildTool = {
404
- name: "bug_fixer_run_build",
405
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
406
- description: "Run TypeScript build to check for errors",
407
- schema: zod_1.z.object({
408
- appPath: zod_1.z.string().describe("Path to the app project")
409
- }),
410
- async execute(args, _context) {
411
- try {
412
- const output = (0, child_process_1.execSync)("npm run build 2>&1", { cwd: args.appPath, encoding: "utf-8", timeout: 60000 });
413
- return {
414
- content: [{ type: "text", text: JSON.stringify({ success: true, output: output.slice(-2000) }) }]
415
- };
416
- }
417
- catch (e) {
418
- return {
419
- content: [{ type: "text", text: JSON.stringify({ success: false, error: (e.stdout || e.stderr || e.message).slice(-2000) }) }]
420
- };
421
- }
422
- }
423
- };
424
- // Git Status Tool
425
- exports.bugFixerGitStatusTool = {
426
- name: "bug_fixer_git_status",
427
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
428
- description: "Check git status - branch, changes, sync with remote",
429
- schema: zod_1.z.object({
430
- appPath: zod_1.z.string().describe("Path to the app project")
431
- }),
432
- async execute(args, _context) {
433
- try {
434
- const status = (0, child_process_1.execSync)("git status --short", { cwd: args.appPath, encoding: "utf-8" });
435
- const branch = (0, child_process_1.execSync)("git branch --show-current", { cwd: args.appPath, encoding: "utf-8" }).trim();
436
- let behind = 0, ahead = 0;
437
- try {
438
- const revList = (0, child_process_1.execSync)("git rev-list --left-right --count HEAD...@{upstream} 2>/dev/null", { cwd: args.appPath, encoding: "utf-8" }).trim().split(/\s+/);
439
- ahead = parseInt(revList[0]) || 0;
440
- behind = parseInt(revList[1]) || 0;
441
- }
442
- catch { /* no upstream */ }
443
- return {
444
- content: [{ type: "text", text: JSON.stringify({ branch, status: status || "clean", ahead, behind }) }]
445
- };
446
- }
447
- catch (e) {
448
- return {
449
- content: [{ type: "text", text: JSON.stringify({ error: e.message }) }]
450
- };
451
- }
452
- }
453
- };
454
- // Git Pull Tool
455
- exports.bugFixerGitPullTool = {
456
- name: "bug_fixer_git_pull",
457
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
458
- description: "Pull latest changes from remote",
459
- schema: zod_1.z.object({
460
- appPath: zod_1.z.string().describe("Path to the app project")
461
- }),
462
- async execute(args, _context) {
463
- try {
464
- const output = (0, child_process_1.execSync)("git pull", { cwd: args.appPath, encoding: "utf-8" });
465
- return {
466
- content: [{ type: "text", text: JSON.stringify({ success: true, output }) }]
467
- };
468
- }
469
- catch (e) {
470
- return {
471
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.stderr || e.message }) }]
472
- };
473
- }
474
- }
475
- };
476
- // Git Commit Tool
477
- exports.bugFixerGitCommitTool = {
478
- name: "bug_fixer_git_commit",
479
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
480
- description: "Stage all changes and commit",
481
- schema: zod_1.z.object({
482
- appPath: zod_1.z.string().describe("Path to the app project"),
483
- message: zod_1.z.string().describe("Commit message")
484
- }),
485
- async execute(args, _context) {
486
- try {
487
- (0, child_process_1.execSync)("git add -A", { cwd: args.appPath });
488
- (0, child_process_1.execSync)(`git commit -m "${args.message.replace(/"/g, '\\"')}"`, { cwd: args.appPath });
489
- const hash = (0, child_process_1.execSync)("git rev-parse --short HEAD", { cwd: args.appPath, encoding: "utf-8" }).trim();
490
- logger.info("Bug Fixer committed", { hash, message: args.message });
491
- return {
492
- content: [{ type: "text", text: JSON.stringify({ success: true, hash }) }]
493
- };
494
- }
495
- catch (e) {
496
- return {
497
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.stderr || e.stdout || e.message }) }]
498
- };
499
- }
500
- }
501
- };
502
- // Git Push Tool
503
- exports.bugFixerGitPushTool = {
504
- name: "bug_fixer_git_push",
505
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
506
- description: "Push commits to remote",
507
- schema: zod_1.z.object({
508
- appPath: zod_1.z.string().describe("Path to the app project")
509
- }),
510
- async execute(args, _context) {
511
- try {
512
- (0, child_process_1.execSync)("git push", { cwd: args.appPath, encoding: "utf-8", stdio: "pipe" });
513
- return {
514
- content: [{ type: "text", text: JSON.stringify({ success: true }) }]
515
- };
516
- }
517
- catch (e) {
518
- return {
519
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.stderr || e.message }) }]
520
- };
521
- }
522
- }
523
- };
524
- // Git Revert Tool
525
- exports.bugFixerGitRevertTool = {
526
- name: "bug_fixer_git_revert",
527
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
528
- description: "Discard all uncommitted changes",
529
- schema: zod_1.z.object({
530
- appPath: zod_1.z.string().describe("Path to the app project")
531
- }),
532
- async execute(args, _context) {
533
- try {
534
- (0, child_process_1.execSync)("git checkout -- .", { cwd: args.appPath });
535
- return {
536
- content: [{ type: "text", text: JSON.stringify({ success: true }) }]
537
- };
538
- }
539
- catch (e) {
540
- return {
541
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }]
542
- };
543
- }
544
- }
545
- };
546
- // Publish App Tool
547
- exports.bugFixerPublishAppTool = {
548
- name: "bug_fixer_publish_app",
549
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
550
- description: "Publish app to Hailer production - ALWAYS ASK USER FIRST",
551
- schema: zod_1.z.object({
552
- appPath: zod_1.z.string().describe("Path to the app project")
553
- }),
554
- async execute(args, context) {
555
- try {
556
- const { publishHailerAppTool } = await Promise.resolve().then(() => __importStar(require("./app-scaffold")));
557
- const result = await publishHailerAppTool.execute({ projectDirectory: args.appPath }, context);
558
- return result;
559
- }
560
- catch (e) {
561
- return {
562
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }]
563
- };
564
- }
565
- }
566
- };
567
- // ============================================================================
568
- // HIGH-LEVEL WORKFLOW TOOLS (LLM-driven workflow control)
569
- // ============================================================================
570
- /**
571
- * Analyze Bug Tool - Read bug report and get classification info
572
- * The LLM uses this to understand the bug and decide next steps
573
- */
574
- exports.bugFixerAnalyzeBugTool = {
575
- name: "bug_fixer_analyze_bug",
576
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
577
- description: `Read a bug report and get classification information.
578
- Returns the bug details and classification if already analyzed.
579
- Use this to understand the current state of a bug discussion.`,
580
- schema: zod_1.z.object({
581
- discussionId: zod_1.z.string().describe("The discussion ID for the bug report").optional(),
582
- activityId: zod_1.z.string().describe("Alias - the bug activity ID (will look up discussion)").optional()
583
- }).refine(data => data.discussionId || data.activityId, {
584
- message: "Either discussionId or activityId is required"
585
- }),
586
- async execute(args, context) {
587
- try {
588
- // Accept either discussionId or look up from activityId
589
- let discussionId = args.discussionId;
590
- if (!discussionId && args.activityId) {
591
- // Try to find discussionId from pending registries by activityId
592
- const allPending = pending_classification_1.pendingClassificationRegistry.getAll();
593
- for (const pending of allPending) {
594
- if (pending.bugId === args.activityId) {
595
- discussionId = pending.discussionId;
596
- break;
597
- }
598
- }
599
- // If still not found, fetch activity to get discussion
600
- if (!discussionId) {
601
- const activity = await context.hailer.fetchActivityById(args.activityId);
602
- if (activity?.discussion) {
603
- discussionId = activity.discussion;
604
- }
605
- }
606
- }
607
- if (!discussionId) {
608
- return {
609
- content: [{
610
- type: "text",
611
- text: JSON.stringify({
612
- status: "error",
613
- message: "Could not find discussion for the given ID"
614
- })
615
- }]
616
- };
617
- }
618
- // Check if we have pending classification info
619
- const pending = pending_classification_1.pendingClassificationRegistry.get(discussionId);
620
- if (pending) {
621
- return {
622
- content: [{
623
- type: "text",
624
- text: JSON.stringify({
625
- status: "pending_confirmation",
626
- bugId: pending.bugId,
627
- bugName: pending.bugName,
628
- appId: pending.appId,
629
- appName: pending.appName,
630
- classification: pending.classification,
631
- reason: pending.reason,
632
- description: pending.bug.description,
633
- stepsToReproduce: pending.bug.stepsToReproduce,
634
- message: "Bug has been classified. Waiting for user to confirm whether to proceed with fix."
635
- })
636
- }]
637
- };
638
- }
639
- // Check if we have a pending fix
640
- const pendingFix = pending_fix_1.pendingFixRegistry.get(args.discussionId);
641
- if (pendingFix) {
642
- return {
643
- content: [{
644
- type: "text",
645
- text: JSON.stringify({
646
- status: pendingFix.state === "awaiting_test" ? "fix_applied" : "awaiting_explanation",
647
- bugId: pendingFix.bugId,
648
- appId: pendingFix.appId,
649
- fixSummary: pendingFix.fixSummary,
650
- filesModified: pendingFix.filesModified,
651
- message: pendingFix.state === "awaiting_test"
652
- ? "Fix has been applied. Waiting for user to test and approve."
653
- : "Fix was rejected. Waiting for user to explain what's wrong."
654
- })
655
- }]
656
- };
657
- }
658
- return {
659
- content: [{
660
- type: "text",
661
- text: JSON.stringify({
662
- status: "not_found",
663
- message: "No pending bug found for this discussion. The bug may have already been processed."
664
- })
665
- }]
666
- };
667
- }
668
- catch (e) {
669
- return {
670
- content: [{ type: "text", text: JSON.stringify({ error: e.message }) }]
671
- };
672
- }
673
- }
674
- };
675
- /**
676
- * Start Fix Tool - Begin the bug fix process
677
- * This triggers the full fix workflow: find app → analyze → apply fix → build
678
- */
679
- exports.bugFixerStartFixTool = {
680
- name: "bug_fixer_start_fix",
681
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
682
- description: `Start the bug fix process. Call this when the user confirms they want you to fix the bug.
683
- This will: find the app, analyze the code, generate and apply a fix, and run the build.
684
- The user should test the fix afterward.`,
685
- schema: zod_1.z.object({
686
- discussionId: zod_1.z.string().describe("The discussion ID for the bug report")
687
- }),
688
- async execute(args, _context) {
689
- try {
690
- const pending = pending_classification_1.pendingClassificationRegistry.get(args.discussionId);
691
- if (!pending) {
692
- return {
693
- content: [{
694
- type: "text",
695
- text: JSON.stringify({
696
- success: false,
697
- error: "No pending bug classification found for this discussion. Cannot start fix."
698
- })
699
- }]
700
- };
701
- }
702
- // Trigger the fix via the registry callback
703
- const triggered = await pending_classification_1.pendingClassificationRegistry.triggerFixIt(args.discussionId);
704
- if (triggered) {
705
- return {
706
- content: [{
707
- type: "text",
708
- text: JSON.stringify({
709
- success: true,
710
- message: "Fix process started. The bot will analyze and apply the fix, then notify the user to test."
711
- })
712
- }]
713
- };
714
- }
715
- else {
716
- return {
717
- content: [{
718
- type: "text",
719
- text: JSON.stringify({
720
- success: false,
721
- error: "Failed to trigger fix process. The callback may not be registered."
722
- })
723
- }]
724
- };
725
- }
726
- }
727
- catch (e) {
728
- return {
729
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }]
730
- };
731
- }
732
- }
733
- };
734
- /**
735
- * Mark Declined Tool - Mark bug as not-a-bug and close it
736
- */
737
- exports.bugFixerMarkDeclinedTool = {
738
- name: "bug_fixer_mark_declined",
739
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
740
- description: `Mark a bug report as "not a bug" and move it to the Declined phase.
741
- Call this when the user confirms it's actually a feature request or not a real bug.`,
742
- schema: zod_1.z.object({
743
- discussionId: zod_1.z.string().describe("The discussion ID for the bug report")
744
- }),
745
- async execute(args, _context) {
746
- try {
747
- const pending = pending_classification_1.pendingClassificationRegistry.get(args.discussionId);
748
- if (!pending) {
749
- return {
750
- content: [{
751
- type: "text",
752
- text: JSON.stringify({
753
- success: false,
754
- error: "No pending bug classification found for this discussion."
755
- })
756
- }]
757
- };
758
- }
759
- // Trigger the not-a-bug action via the registry callback
760
- const triggered = await pending_classification_1.pendingClassificationRegistry.triggerNotABug(args.discussionId);
761
- if (triggered) {
762
- return {
763
- content: [{
764
- type: "text",
765
- text: JSON.stringify({
766
- success: true,
767
- bugId: pending.bugId,
768
- message: "Bug marked as declined (not a bug). Moved to Declined phase."
769
- })
770
- }]
771
- };
772
- }
773
- else {
774
- return {
775
- content: [{
776
- type: "text",
777
- text: JSON.stringify({
778
- success: false,
779
- error: "Failed to decline bug. The callback may not be registered."
780
- })
781
- }]
782
- };
783
- }
784
- }
785
- catch (e) {
786
- return {
787
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }]
788
- };
789
- }
790
- }
791
- };
792
- /**
793
- * Publish Fix Tool - Publish the fix to production
794
- */
795
- exports.bugFixerPublishFixTool = {
796
- name: "bug_fixer_publish_fix",
797
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
798
- description: `Publish a tested fix to production and mark the bug as Fixed.
799
- Call this ONLY after the user has tested the fix and approved it.`,
800
- schema: zod_1.z.object({
801
- discussionId: zod_1.z.string().describe("The discussion ID for the bug report")
802
- }),
803
- async execute(args, _context) {
804
- try {
805
- // Trigger approval via the registry callback
806
- const triggered = await pending_fix_1.pendingFixRegistry.triggerApproval(args.discussionId);
807
- if (triggered) {
808
- return {
809
- content: [{
810
- type: "text",
811
- text: JSON.stringify({
812
- success: true,
813
- message: "Fix is being published to production. This may take a moment."
814
- })
815
- }]
816
- };
817
- }
818
- else {
819
- // Get more info about why it failed
820
- const pending = pending_fix_1.pendingFixRegistry.get(args.discussionId);
821
- if (!pending) {
822
- return {
823
- content: [{
824
- type: "text",
825
- text: JSON.stringify({
826
- success: false,
827
- error: "No pending fix found for this discussion. Cannot publish."
828
- })
829
- }]
830
- };
831
- }
832
- if (pending.state !== "awaiting_test") {
833
- return {
834
- content: [{
835
- type: "text",
836
- text: JSON.stringify({
837
- success: false,
838
- error: `Cannot publish - fix is in state '${pending.state}'. User must test and approve first.`
839
- })
840
- }]
841
- };
842
- }
843
- return {
844
- content: [{
845
- type: "text",
846
- text: JSON.stringify({
847
- success: false,
848
- error: "Failed to trigger publish. The approval callback may not be registered."
849
- })
850
- }]
851
- };
852
- }
853
- }
854
- catch (e) {
855
- return {
856
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }]
857
- };
858
- }
859
- }
860
- };
861
- /**
862
- * Retry Fix Tool - Retry a fix with additional context/explanation
863
- */
864
- exports.bugFixerRetryFixTool = {
865
- name: "bug_fixer_retry_fix",
866
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
867
- description: `Retry fixing a bug with additional context from the user.
868
- Call this when the user explains why the previous fix didn't work.`,
869
- schema: zod_1.z.object({
870
- discussionId: zod_1.z.string().describe("The discussion ID for the bug report"),
871
- explanation: zod_1.z.string().describe("User's explanation of what's still broken or wrong")
872
- }),
873
- async execute(args, _context) {
874
- try {
875
- const pending = pending_fix_1.pendingFixRegistry.get(args.discussionId);
876
- if (!pending) {
877
- return {
878
- content: [{
879
- type: "text",
880
- text: JSON.stringify({
881
- success: false,
882
- error: "No pending fix found for this discussion."
883
- })
884
- }]
885
- };
886
- }
887
- // Trigger retry via the registry callback
888
- const triggered = await pending_fix_1.pendingFixRegistry.triggerRetry(args.discussionId, args.explanation);
889
- if (triggered) {
890
- return {
891
- content: [{
892
- type: "text",
893
- text: JSON.stringify({
894
- success: true,
895
- message: "Retry started with user feedback. The bot will generate a new fix."
896
- })
897
- }]
898
- };
899
- }
900
- else {
901
- return {
902
- content: [{
903
- type: "text",
904
- text: JSON.stringify({
905
- success: false,
906
- error: "Failed to trigger retry. The callback may not be registered."
907
- })
908
- }]
909
- };
910
- }
911
- }
912
- catch (e) {
913
- return {
914
- content: [{ type: "text", text: JSON.stringify({ success: false, error: e.message }) }]
915
- };
916
- }
917
- }
918
- };
919
- // Mark Bug Declined Tool - handles everything automatically
920
- exports.markBugDeclinedTool = {
921
- name: "mark_bug_declined",
922
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
923
- description: "Mark a bug as declined (not a bug / won't fix). Automatically sets phase to Declined, status to 'Won't Fix', and leaves the discussion.",
924
- schema: zod_1.z.object({
925
- bugId: zod_1.z.string().describe("The bug activity ID"),
926
- workflowId: zod_1.z.string().describe("The workflow ID for the Bug Reports workflow"),
927
- discussionId: zod_1.z.string().describe("The discussion ID to leave after marking declined"),
928
- reason: zod_1.z.string().optional().describe("Optional reason for declining"),
929
- }),
930
- async execute(args, context) {
931
- const { bugId, workflowId, discussionId, reason } = args;
932
- const { hailer } = context;
933
- try {
934
- // 1. Get workflow phases from cached init data (reliable method used by list_workflow_phases)
935
- const workflowData = context.init.processes?.find((p) => p._id === workflowId);
936
- if (!workflowData) {
937
- return {
938
- content: [{ type: "text", text: JSON.stringify({
939
- success: false,
940
- error: `Workflow ${workflowId} not found`
941
- }) }]
942
- };
943
- }
944
- const phases = workflowData.phases || {};
945
- const declinedPhase = Object.entries(phases).find(([_, phase]) => phase.name?.toLowerCase() === 'declined');
946
- if (!declinedPhase) {
947
- return {
948
- content: [{ type: "text", text: JSON.stringify({
949
- success: false,
950
- error: "Could not find 'Declined' phase in workflow",
951
- availablePhases: Object.values(phases).map((p) => p.name)
952
- }) }]
953
- };
954
- }
955
- const [declinedPhaseId, declinedPhaseData] = declinedPhase;
956
- // 2. Get workflow schema to find status field ID
957
- const schema = await hailer.getWorkflowSchema(workflowId, declinedPhaseId);
958
- const statusField = Object.entries(schema.fields || {}).find(([_, f]) => f.key === 'status' || f.label?.toLowerCase() === 'status');
959
- // 3. Update activity with phase AND status
960
- const updateData = {
961
- _id: bugId,
962
- phaseId: declinedPhaseId,
963
- };
964
- if (statusField) {
965
- updateData.fields = { [statusField[0]]: "Won't Fix" };
966
- }
967
- await hailer.updateActivities([updateData]);
968
- // 4. Leave the discussion
969
- try {
970
- await hailer.leaveDiscussion(discussionId);
971
- }
972
- catch (e) {
973
- // Ignore leave errors - might already be out
974
- }
975
- return {
976
- content: [{ type: "text", text: JSON.stringify({
977
- success: true,
978
- phase: "Declined",
979
- status: "Won't Fix",
980
- leftDiscussion: true,
981
- reason: reason || "Not a bug"
982
- }) }]
983
- };
984
- }
985
- catch (error) {
986
- return {
987
- content: [{ type: "text", text: JSON.stringify({
988
- success: false,
989
- error: error instanceof Error ? error.message : String(error)
990
- }) }]
991
- };
992
- }
993
- }
994
- };
995
- // Mark Bug Fixed Tool - handles everything automatically
996
- exports.markBugFixedTool = {
997
- name: "mark_bug_fixed",
998
- group: tool_registry_1.ToolGroup.BOT_INTERNAL,
999
- description: "Mark a bug as fixed. Automatically sets phase to Fixed, status to 'Fixed', and leaves the discussion. Only use AFTER fix is published and user confirmed it works!",
1000
- schema: zod_1.z.object({
1001
- bugId: zod_1.z.string().describe("The bug activity ID"),
1002
- workflowId: zod_1.z.string().describe("The workflow ID for the Bug Reports workflow"),
1003
- discussionId: zod_1.z.string().describe("The discussion ID to leave after marking fixed"),
1004
- fixSummary: zod_1.z.string().optional().describe("Optional summary of what was fixed"),
1005
- }),
1006
- async execute(args, context) {
1007
- const { bugId, workflowId, discussionId, fixSummary } = args;
1008
- const { hailer } = context;
1009
- try {
1010
- // 1. Get workflow phases from cached init data (reliable method used by list_workflow_phases)
1011
- const workflowData = context.init.processes?.find((p) => p._id === workflowId);
1012
- if (!workflowData) {
1013
- return {
1014
- content: [{ type: "text", text: JSON.stringify({
1015
- success: false,
1016
- error: `Workflow ${workflowId} not found`
1017
- }) }]
1018
- };
1019
- }
1020
- const phases = workflowData.phases || {};
1021
- const fixedPhase = Object.entries(phases).find(([_, phase]) => phase.name?.toLowerCase() === 'fixed');
1022
- if (!fixedPhase) {
1023
- return {
1024
- content: [{ type: "text", text: JSON.stringify({
1025
- success: false,
1026
- error: "Could not find 'Fixed' phase in workflow",
1027
- availablePhases: Object.values(phases).map((p) => p.name)
1028
- }) }]
1029
- };
1030
- }
1031
- const [fixedPhaseId, fixedPhaseData] = fixedPhase;
1032
- // 2. Get workflow schema to find status field ID
1033
- const schema = await hailer.getWorkflowSchema(workflowId, fixedPhaseId);
1034
- const statusField = Object.entries(schema.fields || {}).find(([_, f]) => f.key === 'status' || f.label?.toLowerCase() === 'status');
1035
- // 3. Update activity with phase AND status
1036
- const updateData = {
1037
- _id: bugId,
1038
- phaseId: fixedPhaseId,
1039
- };
1040
- if (statusField) {
1041
- updateData.fields = { [statusField[0]]: "Fixed" };
1042
- }
1043
- await hailer.updateActivities([updateData]);
1044
- // 4. Leave the discussion
1045
- try {
1046
- await hailer.leaveDiscussion(discussionId);
1047
- }
1048
- catch (e) {
1049
- // Ignore leave errors - might already be out
1050
- }
1051
- return {
1052
- content: [{ type: "text", text: JSON.stringify({
1053
- success: true,
1054
- phase: "Fixed",
1055
- status: "Fixed",
1056
- leftDiscussion: true,
1057
- fixSummary: fixSummary || "Bug fixed"
1058
- }) }]
1059
- };
1060
- }
1061
- catch (error) {
1062
- return {
1063
- content: [{ type: "text", text: JSON.stringify({
1064
- success: false,
1065
- error: error instanceof Error ? error.message : String(error)
1066
- }) }]
1067
- };
1068
- }
1069
- }
1070
- };
1071
- // Export all tools
1072
- exports.bugFixerTools = [
1073
- // Low-level tools
1074
- exports.bugFixerFindAppTool,
1075
- exports.bugFixerListFilesTool,
1076
- exports.bugFixerReadFileTool,
1077
- exports.bugFixerWriteFileTool,
1078
- exports.bugFixerApplyFixTool,
1079
- exports.bugFixerRunBuildTool,
1080
- exports.bugFixerGitStatusTool,
1081
- exports.bugFixerGitPullTool,
1082
- exports.bugFixerGitCommitTool,
1083
- exports.bugFixerGitPushTool,
1084
- exports.bugFixerGitRevertTool,
1085
- exports.bugFixerPublishAppTool,
1086
- // High-level workflow tools (LLM-driven)
1087
- exports.bugFixerAnalyzeBugTool,
1088
- exports.bugFixerStartFixTool,
1089
- exports.bugFixerMarkDeclinedTool,
1090
- exports.bugFixerPublishFixTool,
1091
- exports.bugFixerRetryFixTool,
1092
- // Standalone phase/status tools (no registry dependency)
1093
- exports.markBugDeclinedTool,
1094
- exports.markBugFixedTool,
1095
- ];
1096
- //# sourceMappingURL=bug-fixer-tools.js.map