@lovelybunch/api 1.0.76-alpha.0 → 1.0.76-alpha.10

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 (421) hide show
  1. package/dist/lib/auth/auth-manager.js +1 -1
  2. package/dist/lib/mcp-client.d.ts +39 -0
  3. package/dist/lib/mcp-client.js +131 -0
  4. package/dist/lib/terminal/terminal-manager.js +31 -0
  5. package/dist/routes/api/v1/ai/route.js +136 -1
  6. package/dist/routes/api/v1/ai/tools.js +49 -232
  7. package/dist/routes/api/v1/config/route.js +13 -9
  8. package/dist/routes/api/v1/context/agents/route.d.ts +3 -0
  9. package/dist/routes/api/v1/context/agents/route.js +159 -0
  10. package/dist/routes/api/v1/context/index.js +6 -0
  11. package/dist/routes/api/v1/context/memory/route.d.ts +3 -0
  12. package/dist/routes/api/v1/context/memory/route.js +163 -0
  13. package/dist/routes/api/v1/context/team/route.d.ts +3 -0
  14. package/dist/routes/api/v1/context/team/route.js +159 -0
  15. package/dist/routes/api/v1/knowledge/route.js +26 -32
  16. package/dist/routes/api/v1/mail/route.d.ts +3 -3
  17. package/dist/routes/api/v1/mcp/index.js +170 -4
  18. package/dist/routes/api/v1/proposals/[id]/route.d.ts +10 -24
  19. package/dist/routes/api/v1/proposals/[id]/route.js +10 -1
  20. package/dist/routes/api/v1/proposals/route.d.ts +2 -16
  21. package/dist/routes/api/v1/proposals/route.js +11 -8
  22. package/dist/routes/api/v1/slack/route.d.ts +6 -6
  23. package/dist/routes/api/v1/tasks/route.d.ts +18 -38
  24. package/dist/routes/api/v1/tasks/route.js +94 -16
  25. package/dist/routes/api/v1/terminal/[proposalId]/create/route.js +2 -2
  26. package/dist/routes/api/v1/terminal/code/index.d.ts +3 -0
  27. package/dist/routes/api/v1/terminal/code/index.js +5 -0
  28. package/dist/routes/api/v1/terminal/code/route.d.ts +14 -0
  29. package/dist/routes/api/v1/terminal/code/route.js +159 -0
  30. package/dist/server-with-static.js +2 -0
  31. package/dist/server.js +2 -0
  32. package/package.json +6 -7
  33. package/static/assets/ActivityPage-B3rsYt_4.js +1 -0
  34. package/static/assets/AgentsContextEditPage-4D7qO4S-.js +9 -0
  35. package/static/assets/AgentsContextPage-NmvLRo0k.js +1 -0
  36. package/static/assets/{ApiKeysSettingsPage-DiBqSUMz.js → ApiKeysSettingsPage-BGj5p9zw.js} +2 -2
  37. package/static/assets/ArchitectureEditPage-DI2jNmc9.js +15 -0
  38. package/static/assets/ArchitecturePage-DiIuThUM.js +1 -0
  39. package/static/assets/{AuthSettingsPage-BY7x-6wd.js → AuthSettingsPage-DWuwxAS0.js} +2 -2
  40. package/static/assets/{CallbackPage-CYcV3OHa.js → CallbackPage-BCmkYhEr.js} +1 -1
  41. package/static/assets/CodePage-BZhIkymg.js +2 -0
  42. package/static/assets/{CollapsibleSection-BLZv27JC.js → CollapsibleSection-BJzLVd-x.js} +1 -1
  43. package/static/assets/DashboardPage-DtwE553F.js +41 -0
  44. package/static/assets/{GitPage-CKIIMGjF.js → GitPage-qG7VYL9b.js} +4 -4
  45. package/static/assets/{GitSettingsPage-sI4uzGzt.js → GitSettingsPage-C8Bgpj-X.js} +2 -2
  46. package/static/assets/{IdentityPage-vzzaKU2-.js → IdentityPage-Cf8Ruu-g.js} +2 -2
  47. package/static/assets/{ImplementationStepsEditor-BMHTxNEX.js → ImplementationStepsEditor-BXIRT7o1.js} +2 -2
  48. package/static/assets/IntegrationsSettingsPage-th56kUgi.js +1 -0
  49. package/static/assets/{JobDetailPage-C-IKmhAF.js → JobDetailPage-ZyEcbPAe.js} +1 -1
  50. package/static/assets/KnowledgeDetailPage-BklEOfs0.js +1 -0
  51. package/static/assets/KnowledgeEditPage-BGqzVqHi.js +1 -0
  52. package/static/assets/{KnowledgePage-DJphs1Kg.js → KnowledgePage-Dmm7vzAj.js} +2 -2
  53. package/static/assets/{LoginPage-DVaToPHL.js → LoginPage-PDafaEnq.js} +1 -1
  54. package/static/assets/{MailInboxPage-I-MbS647.js → MailInboxPage-M5_2gGkB.js} +1 -1
  55. package/static/assets/{MailProcessingModal-DXtDHWM_.js → MailProcessingModal-C4PotIFc.js} +2 -2
  56. package/static/assets/{MailReadPage-DUN8EQjl.js → MailReadPage-D32FUx5o.js} +1 -1
  57. package/static/assets/{MailSentPage-DsGgBGBQ.js → MailSentPage-CjBrbezf.js} +1 -1
  58. package/static/assets/{McpSettingsPage-d66ZIwm7.js → McpSettingsPage-DxE-4YPc.js} +1 -1
  59. package/static/assets/MemoryEditPage-BlQ5EN1w.js +13 -0
  60. package/static/assets/MemoryPage-B8fsgW7z.js +1 -0
  61. package/static/assets/NewKnowledgePage-CuH201xQ.js +1 -0
  62. package/static/assets/{NewSkillPage-DesCsYgS.js → NewSkillPage-BdX7eNoi.js} +1 -1
  63. package/static/assets/{NewTaskPage-CrmiPuuw.js → NewTaskPage-D9W2Yi0r.js} +2 -2
  64. package/static/assets/{NotFoundPage-BcTtqwNP.js → NotFoundPage-D9tmTVho.js} +1 -1
  65. package/static/assets/NotificationsSettingsPage-B4lBxS8D.js +1 -0
  66. package/static/assets/ProjectEditPage-DdqUI91K.js +11 -0
  67. package/static/assets/{ProjectPage-CKaHBZlw.js → ProjectPage-DB7ugw8l.js} +1 -1
  68. package/static/assets/PromptsSettingsPage-DFXoKUjj.js +1 -0
  69. package/static/assets/{ResourceDetailPage-BSeDQxri.js → ResourceDetailPage-CWc4YIMc.js} +1 -1
  70. package/static/assets/{ResourcesPage-YmerqN0J.js → ResourcesPage-BK-EXoIA.js} +2 -2
  71. package/static/assets/RoleEditPage-B20UAC2r.js +13 -0
  72. package/static/assets/{RolePage-DoN5_uka.js → RolePage-C5Jf7wxY.js} +1 -1
  73. package/static/assets/{RulesSettingsPage-yQELBKgb.js → RulesSettingsPage-91WP1FQf.js} +2 -2
  74. package/static/assets/SchedulePage-BijprHGn.js +4 -0
  75. package/static/assets/{SkillDetailPage-BFjBVPS8.js → SkillDetailPage-Cpxz_wmk.js} +1 -1
  76. package/static/assets/{SkillEditPage-CjpscD5K.js → SkillEditPage-Cz7VRg0r.js} +1 -1
  77. package/static/assets/{SkillsPage-Dr_uyKVB.js → SkillsPage-Bxmsi6Xd.js} +2 -2
  78. package/static/assets/{SkillsSettingsPage-BknrbJBC.js → SkillsSettingsPage-Cysx53Au.js} +1 -1
  79. package/static/assets/{SourceInput-LclyzQLW.js → SourceInput-D59F7hff.js} +1 -1
  80. package/static/assets/{TagInput-BZ6JyIo1.js → TagInput-BH6wDXWJ.js} +1 -1
  81. package/static/assets/{TaskDetailPage-D97oWW98.js → TaskDetailPage-5ktdWaTr.js} +2 -2
  82. package/static/assets/TaskEditPage-CIZWp_s4.js +1 -0
  83. package/static/assets/{TasksPage-COvedmQz.js → TasksPage-BNXDm-Er.js} +3 -3
  84. package/static/assets/TeamEditPage-C10siqme.js +9 -0
  85. package/static/assets/TeamPage-CXpZVAfy.js +1 -0
  86. package/static/assets/{TerminalPage-DhbOmISZ.js → TerminalPage-DJ-Tu_hG.js} +1 -1
  87. package/static/assets/TerminalSessionPage-BLryJlkL.js +3 -0
  88. package/static/assets/UserPreferencesPage-BvAcv5tt.js +1 -0
  89. package/static/assets/{UserSettingsPage-AXLWqe0G.js → UserSettingsPage-NQfoOvHf.js} +1 -1
  90. package/static/assets/UtilitiesPage-NnBCWVn8.js +1 -0
  91. package/static/assets/{alert-BUrHsk9_.js → alert-CMfexl-V.js} +1 -1
  92. package/static/assets/apl-B4CMkyY2.js +1 -0
  93. package/static/assets/{arrow-down-J9YP8VW9.js → arrow-down-7VoAlw8h.js} +1 -1
  94. package/static/assets/{arrow-left-RAzvFXpe.js → arrow-left-CkQCXG-O.js} +1 -1
  95. package/static/assets/{arrow-up-CjXXRPYC.js → arrow-up-Bozm6eto.js} +1 -1
  96. package/static/assets/{arrow-up-down-BRoDh-fK.js → arrow-up-down-BgZelEPF.js} +1 -1
  97. package/static/assets/asciiarmor-Df11BRmG.js +1 -0
  98. package/static/assets/asn1-EdZsLKOL.js +1 -0
  99. package/static/assets/asterisk-B-8jnY81.js +1 -0
  100. package/static/assets/{badge-CA-A_JCd.js → badge-CKqDVhJv.js} +1 -1
  101. package/static/assets/brainfuck-C4LP7Hcl.js +1 -0
  102. package/static/assets/{browser-modal-DVtwh2h7.js → browser-modal-CIOZi1Jw.js} +2 -2
  103. package/static/assets/{card-DdrUHBUG.js → card-jBf8qQSy.js} +1 -1
  104. package/static/assets/{chevron-left-C4bGr2Al.js → chevron-left-D1qHCYRd.js} +1 -1
  105. package/static/assets/{chevron-up-CPpQ_jgb.js → chevron-up-CcwaoTsZ.js} +1 -1
  106. package/static/assets/{chevrons-up-C8oR0iOR.js → chevrons-up-BtlNQbrw.js} +1 -1
  107. package/static/assets/{circle-alert-B3zeVGHG.js → circle-alert-DqK0nUqF.js} +1 -1
  108. package/static/assets/{circle-check-big-CeVxJ4hA.js → circle-check-big-DDQIqE0G.js} +1 -1
  109. package/static/assets/{circle-check-OfRBf8tJ.js → circle-check-qo4cPVA1.js} +1 -1
  110. package/static/assets/{circle-play-C_Chmziu.js → circle-play-CQ-UItmT.js} +1 -1
  111. package/static/assets/{circle-x-CtfEmATn.js → circle-x-Bd57ohC5.js} +1 -1
  112. package/static/assets/clike-B9uivgTg.js +1 -0
  113. package/static/assets/{clipboard-Z_0Z5-r1.js → clipboard-JQLlAwqS.js} +1 -1
  114. package/static/assets/{clock-B43LjbrK.js → clock-DTp411N-.js} +1 -1
  115. package/static/assets/clojure-BMjYHr_A.js +1 -0
  116. package/static/assets/cmake-BQqOBYOt.js +1 -0
  117. package/static/assets/cobol-CWcv1MsR.js +1 -0
  118. package/static/assets/{code-D77i0toJ.js → code-Bi-U-NxE.js} +1 -1
  119. package/static/assets/coffeescript-S37ZYGWr.js +1 -0
  120. package/static/assets/commonlisp-DBKNyK5s.js +1 -0
  121. package/static/assets/crystal-SjHAIU92.js +1 -0
  122. package/static/assets/css-BnMrqG3P.js +1 -0
  123. package/static/assets/cypher-C_CwsFkJ.js +1 -0
  124. package/static/assets/d-pRatUO7H.js +1 -0
  125. package/static/assets/diff-DbItnlRl.js +1 -0
  126. package/static/assets/dockerfile-BKs6k2Af.js +1 -0
  127. package/static/assets/{download-C8rLaNF6.js → download-DNaE6rtO.js} +1 -1
  128. package/static/assets/dtd-DF_7sFjM.js +1 -0
  129. package/static/assets/dylan-DwRh75JA.js +1 -0
  130. package/static/assets/ebnf-CDyGwa7X.js +1 -0
  131. package/static/assets/ecl-Cabwm37j.js +1 -0
  132. package/static/assets/eiffel-CnydiIhH.js +1 -0
  133. package/static/assets/elm-vLlmbW-K.js +1 -0
  134. package/static/assets/erlang-BNw1qcRV.js +1 -0
  135. package/static/assets/{external-link-D6UvIQYD.js → external-link-DRsIhdWR.js} +1 -1
  136. package/static/assets/{eye-C3fWwYx-.js → eye-jqpFU8Rl.js} +1 -1
  137. package/static/assets/factor-kuTfRLto.js +1 -0
  138. package/static/assets/fcl-Kvtd6kyn.js +1 -0
  139. package/static/assets/{folder-git-2-Crtn4eyJ.js → folder-git-2-ixHmuqNj.js} +1 -1
  140. package/static/assets/forth-Ffai-XNe.js +1 -0
  141. package/static/assets/fortran-DYz_wnZ1.js +1 -0
  142. package/static/assets/gas-Bneqetm1.js +1 -0
  143. package/static/assets/gherkin-heZmZLOM.js +1 -0
  144. package/static/assets/globe-BZEWER4V.js +6 -0
  145. package/static/assets/groovy-D9Dt4D0W.js +1 -0
  146. package/static/assets/haskell-Cw1EW3IL.js +1 -0
  147. package/static/assets/haxe-H-WmDvRZ.js +1 -0
  148. package/static/assets/http-DBlCnlav.js +1 -0
  149. package/static/assets/idl-BEugSyMb.js +1 -0
  150. package/static/assets/index-2_Tb936f.js +1 -0
  151. package/static/assets/index-B8B_4B2l.js +1 -0
  152. package/static/assets/index-BD47WGC6.js +1 -0
  153. package/static/assets/index-BGKQ2Csq.js +3 -0
  154. package/static/assets/index-BLjvGp1F.js +1 -0
  155. package/static/assets/{index-SWBrq2bx.js → index-BWhM9fZn.js} +117 -102
  156. package/static/assets/index-Bft1WzL9.js +1 -0
  157. package/static/assets/index-C3ao8yMv.js +7 -0
  158. package/static/assets/index-CK5AHHmM.js +1 -0
  159. package/static/assets/index-CdmUQF6-.js +1 -0
  160. package/static/assets/index-CiS46Fde.js +1 -0
  161. package/static/assets/index-CoeRBZRl.js +2 -0
  162. package/static/assets/index-CtWTFIFI.js +1 -0
  163. package/static/assets/index-D-5sddKG.js +1 -0
  164. package/static/assets/index-DHAvHhw0.js +1 -0
  165. package/static/assets/index-DffngCzC.js +1 -0
  166. package/static/assets/index-M-XcYp88.js +1 -0
  167. package/static/assets/index-UDlexUv4.js +1 -0
  168. package/static/assets/index-htJaaOEZ.js +1 -0
  169. package/static/assets/index-oRAlpULD.css +1 -0
  170. package/static/assets/{info-BZi8bEGv.js → info-Na9GqbtC.js} +1 -1
  171. package/static/assets/javascript-iXu5QeM3.js +1 -0
  172. package/static/assets/julia-DuME0IfC.js +1 -0
  173. package/static/assets/{label-C8Wxd6GE.js → label-CHVVHrlr.js} +1 -1
  174. package/static/assets/livescript-BwQOo05w.js +1 -0
  175. package/static/assets/lua-BgMRiT3U.js +1 -0
  176. package/static/assets/markdown-editor-B6HEtSkH.css +1 -0
  177. package/static/assets/markdown-editor-CT9CPLw5.js +111 -0
  178. package/static/assets/mathematica-DTrFuWx2.js +1 -0
  179. package/static/assets/mbox-CNhZ1qSd.js +1 -0
  180. package/static/assets/{message-square-BpqFAvyq.js → message-square-B5NR6hzj.js} +1 -1
  181. package/static/assets/mirc-CjQqDB4T.js +1 -0
  182. package/static/assets/mllike-CXdrOF99.js +1 -0
  183. package/static/assets/modelica-Dc1JOy9r.js +1 -0
  184. package/static/assets/mscgen-BA5vi2Kp.js +1 -0
  185. package/static/assets/mumps-BT43cFF4.js +1 -0
  186. package/static/assets/nginx-DdIZxoE0.js +1 -0
  187. package/static/assets/nsis-LdVXkNf5.js +1 -0
  188. package/static/assets/ntriples-BfvgReVJ.js +1 -0
  189. package/static/assets/octave-Ck1zUtKM.js +1 -0
  190. package/static/assets/oz-BzwKVEFT.js +1 -0
  191. package/static/assets/{paperclip-Dk7jEYtI.js → paperclip-SI0kWfGf.js} +1 -1
  192. package/static/assets/pascal--L3eBynH.js +1 -0
  193. package/static/assets/{pause-CX3StCWt.js → pause-DKI9nsrI.js} +1 -1
  194. package/static/assets/perl-CdXCOZ3F.js +1 -0
  195. package/static/assets/pig-CevX1Tat.js +1 -0
  196. package/static/assets/pipeline-builders-Bkf0wt_O.js +17 -0
  197. package/static/assets/{play-CRPN1vUy.js → play-BTA0gBuh.js} +1 -1
  198. package/static/assets/powershell-CFHJl5sT.js +1 -0
  199. package/static/assets/properties-C78fOPTZ.js +1 -0
  200. package/static/assets/protobuf-ChK-085T.js +1 -0
  201. package/static/assets/pug-DeIclll2.js +1 -0
  202. package/static/assets/puppet-DMA9R1ak.js +1 -0
  203. package/static/assets/python-BuPzkPfP.js +1 -0
  204. package/static/assets/q-pXgVlZs6.js +1 -0
  205. package/static/assets/r-B6wPVr8A.js +1 -0
  206. package/static/assets/{radio-group-DFIfCEpZ.js → radio-group-BO2__pxZ.js} +1 -1
  207. package/static/assets/{refresh-cw-DGBXSYy5.js → refresh-cw-DLJpfa8_.js} +1 -1
  208. package/static/assets/rpm-CTu-6PCP.js +1 -0
  209. package/static/assets/ruby-B2Rjki9n.js +1 -0
  210. package/static/assets/sas-B4kiWyti.js +1 -0
  211. package/static/assets/scheme-C41bIUwD.js +1 -0
  212. package/static/assets/{search-C9jI6Lg7.js → search-SRuczbr5.js} +1 -1
  213. package/static/assets/select-D8HyxWyg.js +1 -0
  214. package/static/assets/shell-CjFT_Tl9.js +1 -0
  215. package/static/assets/sieve-C3Gn_uJK.js +1 -0
  216. package/static/assets/simple-mode-GW_nhZxv.js +1 -0
  217. package/static/assets/smalltalk-CnHTOXQT.js +1 -0
  218. package/static/assets/solr-DehyRSwq.js +1 -0
  219. package/static/assets/sparql-DkYu6x3z.js +1 -0
  220. package/static/assets/spreadsheet-BCZA_wO0.js +1 -0
  221. package/static/assets/sql-D0XecflT.js +1 -0
  222. package/static/assets/stex-C3f8Ysf7.js +1 -0
  223. package/static/assets/stylus-B533Al4x.js +1 -0
  224. package/static/assets/swift-BzpIVaGY.js +1 -0
  225. package/static/assets/{switch-C2zPfM3G.js → switch-Ck0OeSLk.js} +1 -1
  226. package/static/assets/tabs-CmFe8eVW.js +1 -0
  227. package/static/assets/{tag-BOwlwHfi.js → tag-BTjGQC_2.js} +1 -1
  228. package/static/assets/tcl-DVfN8rqt.js +1 -0
  229. package/static/assets/{terminal-preview-BvBQu5Sd.js → terminal-preview-BkQIuk__.js} +1 -1
  230. package/static/assets/textile-CnDTJFAw.js +1 -0
  231. package/static/assets/tiddlywiki-DO-Gjzrf.js +1 -0
  232. package/static/assets/tiki-DGYXhP31.js +1 -0
  233. package/static/assets/toml-Bm5Em-hy.js +1 -0
  234. package/static/assets/troff-wAsdV37c.js +1 -0
  235. package/static/assets/ttcn-CfJYG6tj.js +1 -0
  236. package/static/assets/ttcn-cfg-B9xdYoR4.js +1 -0
  237. package/static/assets/turtle-B1tBg_DP.js +1 -0
  238. package/static/assets/{use-terminal-xv9qDaX1.js → use-terminal-CrqBojgD.js} +1 -1
  239. package/static/assets/vb-CmGdzxic.js +1 -0
  240. package/static/assets/vbscript-BuJXcnF6.js +1 -0
  241. package/static/assets/velocity-D8B20fx6.js +1 -0
  242. package/static/assets/verilog-C6RDOZhf.js +1 -0
  243. package/static/assets/vhdl-lSbBsy5d.js +1 -0
  244. package/static/assets/{video-CW0zFsfp.js → video-BlwRNgSo.js} +1 -1
  245. package/static/assets/webidl-ZXfAyPTL.js +1 -0
  246. package/static/assets/xquery-DzFWVndE.js +1 -0
  247. package/static/assets/yacas-BJ4BC0dw.js +1 -0
  248. package/static/assets/z80-Hz9HOZM7.js +1 -0
  249. package/static/index.html +2 -2
  250. package/dist/lib/auth/auth-manager.d.ts.map +0 -1
  251. package/dist/lib/auth/auth-manager.js.map +0 -1
  252. package/dist/lib/gait-path.d.ts.map +0 -1
  253. package/dist/lib/gait-path.js.map +0 -1
  254. package/dist/lib/git-settings.d.ts.map +0 -1
  255. package/dist/lib/git-settings.js.map +0 -1
  256. package/dist/lib/git.d.ts.map +0 -1
  257. package/dist/lib/git.js.map +0 -1
  258. package/dist/lib/jobs/global-job-scheduler.d.ts.map +0 -1
  259. package/dist/lib/jobs/global-job-scheduler.js.map +0 -1
  260. package/dist/lib/jobs/job-runner.d.ts.map +0 -1
  261. package/dist/lib/jobs/job-runner.js.map +0 -1
  262. package/dist/lib/jobs/job-scheduler.d.ts.map +0 -1
  263. package/dist/lib/jobs/job-scheduler.js.map +0 -1
  264. package/dist/lib/jobs/job-store.d.ts.map +0 -1
  265. package/dist/lib/jobs/job-store.js.map +0 -1
  266. package/dist/lib/project-paths.d.ts.map +0 -1
  267. package/dist/lib/project-paths.js.map +0 -1
  268. package/dist/lib/storage/file-storage.d.ts.map +0 -1
  269. package/dist/lib/storage/file-storage.js.map +0 -1
  270. package/dist/lib/symlinks/symlink-manager.d.ts.map +0 -1
  271. package/dist/lib/symlinks/symlink-manager.js.map +0 -1
  272. package/dist/lib/symlinks/types.d.ts.map +0 -1
  273. package/dist/lib/symlinks/types.js.map +0 -1
  274. package/dist/lib/terminal/context-helper.d.ts.map +0 -1
  275. package/dist/lib/terminal/context-helper.js.map +0 -1
  276. package/dist/lib/terminal/global-manager.d.ts.map +0 -1
  277. package/dist/lib/terminal/global-manager.js.map +0 -1
  278. package/dist/lib/terminal/shell-utils.d.ts.map +0 -1
  279. package/dist/lib/terminal/shell-utils.js.map +0 -1
  280. package/dist/lib/terminal/terminal-manager.d.ts.map +0 -1
  281. package/dist/lib/terminal/terminal-manager.js.map +0 -1
  282. package/dist/lib/user-preferences.d.ts.map +0 -1
  283. package/dist/lib/user-preferences.js.map +0 -1
  284. package/dist/middleware/auth.d.ts.map +0 -1
  285. package/dist/middleware/auth.js.map +0 -1
  286. package/dist/routes/api/v1/agents/[id]/index.d.ts.map +0 -1
  287. package/dist/routes/api/v1/agents/[id]/index.js.map +0 -1
  288. package/dist/routes/api/v1/agents/[id]/route.d.ts.map +0 -1
  289. package/dist/routes/api/v1/agents/[id]/route.js.map +0 -1
  290. package/dist/routes/api/v1/agents/index.d.ts.map +0 -1
  291. package/dist/routes/api/v1/agents/index.js.map +0 -1
  292. package/dist/routes/api/v1/agents/route.d.ts.map +0 -1
  293. package/dist/routes/api/v1/agents/route.js.map +0 -1
  294. package/dist/routes/api/v1/ai/index.d.ts.map +0 -1
  295. package/dist/routes/api/v1/ai/index.js.map +0 -1
  296. package/dist/routes/api/v1/ai/route.d.ts.map +0 -1
  297. package/dist/routes/api/v1/ai/route.js.map +0 -1
  298. package/dist/routes/api/v1/api-keys/index.d.ts.map +0 -1
  299. package/dist/routes/api/v1/api-keys/index.js.map +0 -1
  300. package/dist/routes/api/v1/api-keys/route.d.ts.map +0 -1
  301. package/dist/routes/api/v1/api-keys/route.js.map +0 -1
  302. package/dist/routes/api/v1/auth/index.d.ts.map +0 -1
  303. package/dist/routes/api/v1/auth/index.js.map +0 -1
  304. package/dist/routes/api/v1/auth/route.d.ts.map +0 -1
  305. package/dist/routes/api/v1/auth/route.js.map +0 -1
  306. package/dist/routes/api/v1/auth-settings/index.d.ts.map +0 -1
  307. package/dist/routes/api/v1/auth-settings/index.js.map +0 -1
  308. package/dist/routes/api/v1/auth-settings/route.d.ts.map +0 -1
  309. package/dist/routes/api/v1/auth-settings/route.js.map +0 -1
  310. package/dist/routes/api/v1/chats/[id]/index.d.ts.map +0 -1
  311. package/dist/routes/api/v1/chats/[id]/index.js.map +0 -1
  312. package/dist/routes/api/v1/chats/[id]/route.d.ts.map +0 -1
  313. package/dist/routes/api/v1/chats/[id]/route.js.map +0 -1
  314. package/dist/routes/api/v1/chats/index.d.ts.map +0 -1
  315. package/dist/routes/api/v1/chats/index.js.map +0 -1
  316. package/dist/routes/api/v1/chats/route.d.ts.map +0 -1
  317. package/dist/routes/api/v1/chats/route.js.map +0 -1
  318. package/dist/routes/api/v1/config/index.d.ts.map +0 -1
  319. package/dist/routes/api/v1/config/index.js.map +0 -1
  320. package/dist/routes/api/v1/config/route.d.ts.map +0 -1
  321. package/dist/routes/api/v1/config/route.js.map +0 -1
  322. package/dist/routes/api/v1/context/architecture/route.d.ts.map +0 -1
  323. package/dist/routes/api/v1/context/architecture/route.js.map +0 -1
  324. package/dist/routes/api/v1/context/index.d.ts.map +0 -1
  325. package/dist/routes/api/v1/context/index.js.map +0 -1
  326. package/dist/routes/api/v1/context/knowledge/[filename]/index.d.ts.map +0 -1
  327. package/dist/routes/api/v1/context/knowledge/[filename]/index.js.map +0 -1
  328. package/dist/routes/api/v1/context/knowledge/[filename]/route.d.ts.map +0 -1
  329. package/dist/routes/api/v1/context/knowledge/[filename]/route.js.map +0 -1
  330. package/dist/routes/api/v1/context/knowledge/index.d.ts.map +0 -1
  331. package/dist/routes/api/v1/context/knowledge/index.js.map +0 -1
  332. package/dist/routes/api/v1/context/knowledge/route.d.ts.map +0 -1
  333. package/dist/routes/api/v1/context/knowledge/route.js.map +0 -1
  334. package/dist/routes/api/v1/context/project/route.d.ts.map +0 -1
  335. package/dist/routes/api/v1/context/project/route.js.map +0 -1
  336. package/dist/routes/api/v1/git/index.d.ts.map +0 -1
  337. package/dist/routes/api/v1/git/index.js.map +0 -1
  338. package/dist/routes/api/v1/jobs/[id]/route.d.ts.map +0 -1
  339. package/dist/routes/api/v1/jobs/[id]/route.js.map +0 -1
  340. package/dist/routes/api/v1/jobs/[id]/run/route.d.ts.map +0 -1
  341. package/dist/routes/api/v1/jobs/[id]/run/route.js.map +0 -1
  342. package/dist/routes/api/v1/jobs/index.d.ts.map +0 -1
  343. package/dist/routes/api/v1/jobs/index.js.map +0 -1
  344. package/dist/routes/api/v1/jobs/route.d.ts.map +0 -1
  345. package/dist/routes/api/v1/jobs/route.js.map +0 -1
  346. package/dist/routes/api/v1/jobs/status/route.d.ts.map +0 -1
  347. package/dist/routes/api/v1/jobs/status/route.js.map +0 -1
  348. package/dist/routes/api/v1/mcp/index.d.ts.map +0 -1
  349. package/dist/routes/api/v1/mcp/index.js.map +0 -1
  350. package/dist/routes/api/v1/mcp/route.d.ts.map +0 -1
  351. package/dist/routes/api/v1/mcp/route.js.map +0 -1
  352. package/dist/routes/api/v1/proposals/[id]/route.d.ts.map +0 -1
  353. package/dist/routes/api/v1/proposals/[id]/route.js.map +0 -1
  354. package/dist/routes/api/v1/proposals/index.d.ts.map +0 -1
  355. package/dist/routes/api/v1/proposals/index.js.map +0 -1
  356. package/dist/routes/api/v1/proposals/route.d.ts.map +0 -1
  357. package/dist/routes/api/v1/proposals/route.js.map +0 -1
  358. package/dist/routes/api/v1/resources/[id]/index.d.ts.map +0 -1
  359. package/dist/routes/api/v1/resources/[id]/index.js.map +0 -1
  360. package/dist/routes/api/v1/resources/[id]/route.js.map +0 -1
  361. package/dist/routes/api/v1/resources/[id]/thumbnail/index.d.ts.map +0 -1
  362. package/dist/routes/api/v1/resources/[id]/thumbnail/index.js.map +0 -1
  363. package/dist/routes/api/v1/resources/[id]/thumbnail/route.js.map +0 -1
  364. package/dist/routes/api/v1/resources/index.d.ts.map +0 -1
  365. package/dist/routes/api/v1/resources/index.js.map +0 -1
  366. package/dist/routes/api/v1/resources/route.d.ts.map +0 -1
  367. package/dist/routes/api/v1/resources/route.js.map +0 -1
  368. package/dist/routes/api/v1/symlinks/index.d.ts.map +0 -1
  369. package/dist/routes/api/v1/symlinks/index.js.map +0 -1
  370. package/dist/routes/api/v1/symlinks/route.d.ts.map +0 -1
  371. package/dist/routes/api/v1/symlinks/route.js.map +0 -1
  372. package/dist/routes/api/v1/terminal/[proposalId]/create/index.d.ts.map +0 -1
  373. package/dist/routes/api/v1/terminal/[proposalId]/create/index.js.map +0 -1
  374. package/dist/routes/api/v1/terminal/[proposalId]/create/route.d.ts.map +0 -1
  375. package/dist/routes/api/v1/terminal/[proposalId]/create/route.js.map +0 -1
  376. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.d.ts.map +0 -1
  377. package/dist/routes/api/v1/terminal/[proposalId]/destroy/index.js.map +0 -1
  378. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.d.ts.map +0 -1
  379. package/dist/routes/api/v1/terminal/[proposalId]/destroy/route.js.map +0 -1
  380. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.d.ts.map +0 -1
  381. package/dist/routes/api/v1/terminal/[proposalId]/resize/index.js.map +0 -1
  382. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.d.ts.map +0 -1
  383. package/dist/routes/api/v1/terminal/[proposalId]/resize/route.js.map +0 -1
  384. package/dist/routes/api/v1/terminal/sessions/index.d.ts.map +0 -1
  385. package/dist/routes/api/v1/terminal/sessions/index.js.map +0 -1
  386. package/dist/routes/api/v1/terminal/sessions/route.d.ts.map +0 -1
  387. package/dist/routes/api/v1/terminal/sessions/route.js.map +0 -1
  388. package/dist/routes/api/v1/user/index.d.ts.map +0 -1
  389. package/dist/routes/api/v1/user/index.js.map +0 -1
  390. package/dist/routes/api/v1/user/settings/index.d.ts.map +0 -1
  391. package/dist/routes/api/v1/user/settings/index.js.map +0 -1
  392. package/dist/routes/api/v1/user/settings/route.d.ts.map +0 -1
  393. package/dist/routes/api/v1/user/settings/route.js.map +0 -1
  394. package/dist/server-with-static.d.ts.map +0 -1
  395. package/dist/server-with-static.js.map +0 -1
  396. package/dist/server.d.ts.map +0 -1
  397. package/dist/server.js.map +0 -1
  398. package/static/assets/ActivityPage-DxajSxG1.js +0 -1
  399. package/static/assets/ArchitectureEditPage-iflIJaCh.js +0 -21
  400. package/static/assets/ArchitecturePage-oB3FtdZ7.js +0 -1
  401. package/static/assets/CodePage-DxJYFhiT.js +0 -2
  402. package/static/assets/DashboardPage-BdsK2Vor.js +0 -51
  403. package/static/assets/IntegrationsSettingsPage-BzuUrHO1.js +0 -1
  404. package/static/assets/KnowledgeDetailPage-C1RHtPzz.js +0 -1
  405. package/static/assets/KnowledgeEditPage-D3gIqqKn.js +0 -1
  406. package/static/assets/NewKnowledgePage-WbN6BikQ.js +0 -9
  407. package/static/assets/NotificationsSettingsPage-BeJw7gY7.js +0 -1
  408. package/static/assets/ProjectEditPage-DiHz-pYk.js +0 -11
  409. package/static/assets/PromptsSettingsPage-B_Opt_KA.js +0 -1
  410. package/static/assets/RoleEditPage-Bm7HG4sg.js +0 -13
  411. package/static/assets/SchedulePage-nmchdGUK.js +0 -4
  412. package/static/assets/TaskEditPage-BTfzRYwM.js +0 -1
  413. package/static/assets/TerminalSessionPage-D2rZb8Ej.js +0 -8
  414. package/static/assets/UserPreferencesPage-CgtsVqvs.js +0 -1
  415. package/static/assets/UtilitiesPage-CxQkYrza.js +0 -1
  416. package/static/assets/index-CHdBxVyk.css +0 -2
  417. package/static/assets/kiro-CX1mOsRO.js +0 -17
  418. package/static/assets/markdown-editor-DAk7M9Ju.js +0 -62
  419. package/static/assets/markdown-editor-DUEthZ0y.css +0 -1
  420. package/static/assets/select-DgNHsbaX.js +0 -1
  421. package/static/assets/tabs-B7fjkp5h.js +0 -1
@@ -9,11 +9,10 @@ export declare function GET(c: Context): Promise<(Response & import("hono").Type
9
9
  success: true;
10
10
  data: {
11
11
  id: string;
12
- title: string;
13
- intent?: string;
12
+ intent: string;
14
13
  content?: string;
15
14
  author: {
16
- type: import("@lovelybunch/core").AuthorType;
15
+ type: import("@lovelybunch/types").AuthorType;
17
16
  id: string;
18
17
  name: string;
19
18
  email?: string;
@@ -48,7 +47,7 @@ export declare function GET(c: Context): Promise<(Response & import("hono").Type
48
47
  version: string;
49
48
  name: string;
50
49
  description: string;
51
- type: import("@lovelybunch/core").FeatureFlagType;
50
+ type: import("@lovelybunch/types").FeatureFlagType;
52
51
  defaultValue: any;
53
52
  scopes: string[];
54
53
  targets: {
@@ -96,7 +95,7 @@ export declare function GET(c: Context): Promise<(Response & import("hono").Type
96
95
  minimumSampleSize: number;
97
96
  testType: "two-tailed" | "one-tailed";
98
97
  };
99
- status: import("@lovelybunch/core").ExperimentStatus;
98
+ status: import("@lovelybunch/types").ExperimentStatus;
100
99
  startedAt?: string;
101
100
  endedAt?: string;
102
101
  }[];
@@ -134,13 +133,7 @@ export declare function GET(c: Context): Promise<(Response & import("hono").Type
134
133
  schedule?: string;
135
134
  rollbackPlan?: string;
136
135
  };
137
- status: import("@lovelybunch/core").CPStatus;
138
- comments?: {
139
- id: string;
140
- author: string;
141
- content: string;
142
- createdAt: string;
143
- }[];
136
+ status: import("@lovelybunch/types").CPStatus;
144
137
  metadata: {
145
138
  createdAt: string;
146
139
  updatedAt: string;
@@ -173,11 +166,10 @@ export declare function PATCH(c: Context): Promise<(Response & import("hono").Ty
173
166
  success: true;
174
167
  data: {
175
168
  id: string;
176
- title: string;
177
- intent?: string;
169
+ intent: string;
178
170
  content?: string;
179
171
  author: {
180
- type: import("@lovelybunch/core").AuthorType;
172
+ type: import("@lovelybunch/types").AuthorType;
181
173
  id: string;
182
174
  name: string;
183
175
  email?: string;
@@ -212,7 +204,7 @@ export declare function PATCH(c: Context): Promise<(Response & import("hono").Ty
212
204
  version: string;
213
205
  name: string;
214
206
  description: string;
215
- type: import("@lovelybunch/core").FeatureFlagType;
207
+ type: import("@lovelybunch/types").FeatureFlagType;
216
208
  defaultValue: any;
217
209
  scopes: string[];
218
210
  targets: {
@@ -260,7 +252,7 @@ export declare function PATCH(c: Context): Promise<(Response & import("hono").Ty
260
252
  minimumSampleSize: number;
261
253
  testType: "two-tailed" | "one-tailed";
262
254
  };
263
- status: import("@lovelybunch/core").ExperimentStatus;
255
+ status: import("@lovelybunch/types").ExperimentStatus;
264
256
  startedAt?: string;
265
257
  endedAt?: string;
266
258
  }[];
@@ -298,13 +290,7 @@ export declare function PATCH(c: Context): Promise<(Response & import("hono").Ty
298
290
  schedule?: string;
299
291
  rollbackPlan?: string;
300
292
  };
301
- status: import("@lovelybunch/core").CPStatus;
302
- comments?: {
303
- id: string;
304
- author: string;
305
- content: string;
306
- createdAt: string;
307
- }[];
293
+ status: import("@lovelybunch/types").CPStatus;
308
294
  metadata: {
309
295
  createdAt: string;
310
296
  updatedAt: string;
@@ -1,5 +1,6 @@
1
1
  import { FileStorageAdapter } from '../../../../../lib/storage/file-storage.js';
2
2
  import { getLogger } from '@lovelybunch/core/logging';
3
+ import { getSlackService } from '../../../../../lib/slack/slack-service.js';
3
4
  const storage = new FileStorageAdapter();
4
5
  // Logger is lazily initialized inside handlers to use server config
5
6
  export async function GET(c) {
@@ -90,6 +91,14 @@ export async function PATCH(c) {
90
91
  reason: null
91
92
  }
92
93
  });
94
+ // Send Slack notification for status change (non-blocking)
95
+ getSlackService().sendNotification({
96
+ type: 'proposal.statusChange',
97
+ proposalId: id,
98
+ intent: updatedProposal?.intent || existing.intent,
99
+ status: newStatus,
100
+ previousStatus: oldStatus,
101
+ }).catch(err => console.warn('[proposals] Slack notification failed:', err));
93
102
  }
94
103
  return c.json({
95
104
  success: true,
@@ -134,7 +143,7 @@ export async function DELETE(c) {
134
143
  tags: ['proposal'],
135
144
  payload: {
136
145
  id,
137
- title: proposal.title
146
+ intent: proposal.intent
138
147
  }
139
148
  });
140
149
  }
@@ -3,8 +3,7 @@ export declare function GET(c: Context): Promise<(Response & import("hono").Type
3
3
  success: true;
4
4
  data: {
5
5
  id: string;
6
- title: string;
7
- intent?: string;
6
+ intent: string;
8
7
  content?: string;
9
8
  author: {
10
9
  type: import("@lovelybunch/types").AuthorType;
@@ -129,12 +128,6 @@ export declare function GET(c: Context): Promise<(Response & import("hono").Type
129
128
  rollbackPlan?: string;
130
129
  };
131
130
  status: import("@lovelybunch/types").CPStatus;
132
- comments?: {
133
- id: string;
134
- author: string;
135
- content: string;
136
- createdAt: string;
137
- }[];
138
131
  metadata: {
139
132
  createdAt: string;
140
133
  updatedAt: string;
@@ -167,8 +160,7 @@ export declare function POST(c: Context): Promise<(Response & import("hono").Typ
167
160
  success: true;
168
161
  data: {
169
162
  id: string;
170
- title: string;
171
- intent?: string;
163
+ intent: string;
172
164
  content?: string;
173
165
  author: {
174
166
  type: import("@lovelybunch/types").AuthorType;
@@ -293,12 +285,6 @@ export declare function POST(c: Context): Promise<(Response & import("hono").Typ
293
285
  rollbackPlan?: string;
294
286
  };
295
287
  status: import("@lovelybunch/types").CPStatus;
296
- comments?: {
297
- id: string;
298
- author: string;
299
- content: string;
300
- createdAt: string;
301
- }[];
302
288
  metadata: {
303
289
  createdAt: string;
304
290
  updatedAt: string;
@@ -2,6 +2,7 @@ import { FileStorageAdapter } from '../../../../lib/storage/file-storage.js';
2
2
  import { getAuthorInfo } from '../../../../lib/user-preferences.js';
3
3
  import Fuse from 'fuse.js';
4
4
  import { getLogger } from '@lovelybunch/core/logging';
5
+ import { getSlackService } from '../../../../lib/slack/slack-service.js';
5
6
  const storage = new FileStorageAdapter();
6
7
  // Logger is lazily initialized inside handlers to use server config
7
8
  export async function GET(c) {
@@ -23,8 +24,7 @@ export async function GET(c) {
23
24
  if (searchQuery?.trim()) {
24
25
  const fuse = new Fuse(proposals, {
25
26
  keys: [
26
- { name: 'title', weight: 0.4 },
27
- { name: 'intent', weight: 0.4 }, // Deprecated fallback
27
+ { name: 'intent', weight: 0.4 },
28
28
  { name: 'id', weight: 0.3 },
29
29
  { name: 'author.name', weight: 0.2 },
30
30
  { name: 'metadata.tags', weight: 0.1 }
@@ -58,13 +58,9 @@ export async function POST(c) {
58
58
  const authorInfo = await getAuthorInfo();
59
59
  // Create a new proposal with required fields
60
60
  const now = new Date();
61
- // Use title as primary, fall back to deprecated intent for backward compatibility
62
- const titleValue = body.title || body.intent || '';
63
61
  const proposal = {
64
62
  id: body.id || `cp-${Date.now()}`,
65
- title: titleValue,
66
- // Keep intent for backward compatibility (deprecated)
67
- ...(body.intent && { intent: body.intent }),
63
+ intent: body.intent,
68
64
  content: body.content,
69
65
  author: body.author || {
70
66
  id: 'current-user',
@@ -103,11 +99,18 @@ export async function POST(c) {
103
99
  tags: ['proposal'],
104
100
  payload: {
105
101
  id: proposal.id,
106
- title: proposal.title,
102
+ intent: proposal.intent,
107
103
  priority: proposal.metadata.priority,
108
104
  author: proposal.author
109
105
  }
110
106
  });
107
+ // Send Slack notification (non-blocking)
108
+ getSlackService().sendNotification({
109
+ type: 'proposal.created',
110
+ proposalId: proposal.id,
111
+ intent: proposal.intent,
112
+ author: proposal.author.name,
113
+ }).catch(err => console.warn('[proposals] Slack notification failed:', err));
111
114
  return c.json({
112
115
  success: true,
113
116
  data: proposal
@@ -7,6 +7,9 @@ export declare function getConfig(c: Context): Promise<(Response & import("hono"
7
7
  success: true;
8
8
  data: {
9
9
  enabled: boolean;
10
+ channelId: string;
11
+ channelName: string;
12
+ siteUrl: string;
10
13
  notifications: {
11
14
  proposals: {
12
15
  created: boolean;
@@ -21,9 +24,6 @@ export declare function getConfig(c: Context): Promise<(Response & import("hono"
21
24
  merge: boolean;
22
25
  };
23
26
  };
24
- channelId: string;
25
- channelName: string;
26
- siteUrl: string;
27
27
  hasBotToken: boolean;
28
28
  hasSigningSecret: boolean;
29
29
  };
@@ -39,6 +39,9 @@ export declare function updateConfig(c: Context): Promise<(Response & import("ho
39
39
  success: true;
40
40
  data: {
41
41
  enabled: boolean;
42
+ channelId: string;
43
+ channelName: string;
44
+ siteUrl: string;
42
45
  notifications: {
43
46
  proposals: {
44
47
  created: boolean;
@@ -53,9 +56,6 @@ export declare function updateConfig(c: Context): Promise<(Response & import("ho
53
56
  merge: boolean;
54
57
  };
55
58
  };
56
- channelId: string;
57
- channelName: string;
58
- siteUrl: string;
59
59
  hasBotToken: boolean;
60
60
  hasSigningSecret: boolean;
61
61
  };
@@ -1,45 +1,25 @@
1
1
  import { Context } from 'hono';
2
+ /**
3
+ * GET /api/v1/tasks
4
+ *
5
+ * Query params:
6
+ * q - fuzzy search query (title, content, id, author, tags)
7
+ * status - filter by status
8
+ * author - filter by author
9
+ * priority - filter by priority
10
+ * tags - comma-separated tag filter
11
+ * limit - max results per page (1-100, default: all)
12
+ * offset - number of results to skip (for pagination, default: 0)
13
+ * full - set to "true" to include full content, planSteps, and comments
14
+ */
2
15
  export declare function GET(c: Context): Promise<(Response & import("hono").TypedResponse<{
16
+ offset: number;
17
+ data: never[];
18
+ limit: number;
3
19
  totalCount: number;
20
+ count: number;
21
+ query?: string;
4
22
  success: true;
5
- data: {
6
- id: string;
7
- title: string;
8
- intent?: string;
9
- content?: string;
10
- author: {
11
- type: import("@lovelybunch/types").AuthorType;
12
- id: string;
13
- name: string;
14
- email?: string;
15
- };
16
- productSpecRef?: string;
17
- planSteps: {
18
- id: string;
19
- description: string;
20
- command?: string;
21
- expectedOutcome?: string;
22
- status: "pending" | "active" | "done" | "failed" | "skipped";
23
- output?: string;
24
- error?: string;
25
- executedAt?: string;
26
- }[];
27
- status: import("@lovelybunch/types").TaskStatus;
28
- comments?: {
29
- id: string;
30
- author: string;
31
- content: string;
32
- createdAt: string;
33
- }[];
34
- metadata: {
35
- createdAt: string;
36
- updatedAt: string;
37
- reviewers: string[];
38
- tags?: string[];
39
- priority?: "low" | "medium" | "high" | "critical";
40
- readiness?: number;
41
- };
42
- }[];
43
23
  }, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
44
24
  success: false;
45
25
  error: {
@@ -3,7 +3,64 @@ import { getAuthorInfo } from '../../../../lib/user-preferences.js';
3
3
  import Fuse from 'fuse.js';
4
4
  import { getLogger } from '@lovelybunch/core/logging';
5
5
  const storage = new FileStorageAdapter();
6
- // Logger is lazily initialized inside handlers to use server config
6
+ const MAX_SUMMARY_CHARS = 200;
7
+ function summarizeContent(content) {
8
+ if (!content)
9
+ return '';
10
+ const cleaned = content
11
+ .replace(/^#+\s+/gm, '')
12
+ .replace(/[*_`]/g, '')
13
+ .replace(/\[([^\]]+)\]\([^)]+\)/g, '$1')
14
+ .trim();
15
+ const lines = cleaned.split('\n').filter(l => l.trim().length > 0);
16
+ const summary = lines.slice(0, 3).join(' ');
17
+ return summary.length > MAX_SUMMARY_CHARS
18
+ ? summary.substring(0, MAX_SUMMARY_CHARS) + '...'
19
+ : summary;
20
+ }
21
+ function extractSnippet(text, query, maxLen = 200) {
22
+ if (!text)
23
+ return '';
24
+ const lower = text.toLowerCase();
25
+ const terms = query.toLowerCase().split(/\s+/);
26
+ let bestIdx = -1;
27
+ for (const term of terms) {
28
+ const idx = lower.indexOf(term);
29
+ if (idx !== -1 && (bestIdx === -1 || idx < bestIdx))
30
+ bestIdx = idx;
31
+ }
32
+ if (bestIdx === -1)
33
+ return text.slice(0, maxLen) + (text.length > maxLen ? '...' : '');
34
+ const start = Math.max(0, bestIdx - 60);
35
+ const end = Math.min(text.length, bestIdx + 140);
36
+ let snippet = text.slice(start, end);
37
+ if (start > 0)
38
+ snippet = '...' + snippet;
39
+ if (end < text.length)
40
+ snippet += '...';
41
+ return snippet;
42
+ }
43
+ function toLightweight(task) {
44
+ const { content, comments, ...rest } = task;
45
+ return {
46
+ ...rest,
47
+ content: summarizeContent(content),
48
+ commentCount: comments?.length ?? 0,
49
+ };
50
+ }
51
+ /**
52
+ * GET /api/v1/tasks
53
+ *
54
+ * Query params:
55
+ * q - fuzzy search query (title, content, id, author, tags)
56
+ * status - filter by status
57
+ * author - filter by author
58
+ * priority - filter by priority
59
+ * tags - comma-separated tag filter
60
+ * limit - max results per page (1-100, default: all)
61
+ * offset - number of results to skip (for pagination, default: 0)
62
+ * full - set to "true" to include full content, planSteps, and comments
63
+ */
7
64
  export async function GET(c) {
8
65
  try {
9
66
  const url = new URL(c.req.url);
@@ -15,36 +72,57 @@ export async function GET(c) {
15
72
  const searchQuery = searchParams.get('q');
16
73
  const limitParam = searchParams.get('limit');
17
74
  const limit = limitParam ? Math.min(Math.max(1, parseInt(limitParam, 10) || 20), 100) : undefined;
75
+ const offsetParam = searchParams.get('offset');
76
+ const offset = offsetParam ? Math.max(0, parseInt(offsetParam, 10) || 0) : 0;
77
+ const full = searchParams.get('full') === 'true';
18
78
  let tasks = await storage.listTasks({
19
79
  status,
20
80
  author: author || undefined,
21
81
  priority: priority || undefined,
22
82
  tags
23
83
  });
24
- // Apply search filter if provided
84
+ let data;
25
85
  if (searchQuery?.trim()) {
26
86
  const fuse = new Fuse(tasks, {
27
87
  keys: [
28
- { name: 'title', weight: 0.4 },
29
- { name: 'intent', weight: 0.4 }, // Deprecated fallback
30
- { name: 'id', weight: 0.3 },
31
- { name: 'author.name', weight: 0.2 },
32
- { name: 'metadata.tags', weight: 0.1 }
88
+ { name: 'title', weight: 2 },
89
+ { name: 'content', weight: 1 },
90
+ { name: 'intent', weight: 1.5 },
91
+ { name: 'id', weight: 1 },
92
+ { name: 'author.name', weight: 0.5 },
93
+ { name: 'metadata.tags', weight: 1.5 }
33
94
  ],
34
- threshold: 0.3,
35
- includeScore: true
95
+ threshold: 0.15,
96
+ includeScore: true,
97
+ ignoreLocation: true,
98
+ minMatchCharLength: 3,
99
+ });
100
+ const MAX_SCORE = 0.85;
101
+ const results = fuse.search(searchQuery).filter(r => (r.score ?? 1) <= MAX_SCORE);
102
+ data = results.map(result => {
103
+ const base = full ? result.item : toLightweight(result.item);
104
+ return {
105
+ ...base,
106
+ snippet: extractSnippet(result.item.content || result.item.title || '', searchQuery),
107
+ score: result.score,
108
+ };
36
109
  });
37
- const searchResults = fuse.search(searchQuery);
38
- tasks = searchResults.map(result => result.item);
39
110
  }
40
- const totalCount = tasks.length;
41
- if (limit !== undefined) {
42
- tasks = tasks.slice(0, limit);
111
+ else {
112
+ data = full ? tasks : tasks.map(toLightweight);
113
+ }
114
+ const totalCount = data.length;
115
+ if (limit !== undefined || offset > 0) {
116
+ data = data.slice(offset, limit !== undefined ? offset + limit : undefined);
43
117
  }
44
118
  return c.json({
45
119
  success: true,
46
- data: tasks,
47
- ...(limit !== undefined && { totalCount })
120
+ ...(searchQuery ? { query: searchQuery } : {}),
121
+ totalCount,
122
+ count: data.length,
123
+ ...(limit !== undefined && { limit }),
124
+ offset,
125
+ data,
48
126
  });
49
127
  }
50
128
  catch (error) {
@@ -4,7 +4,7 @@ export async function POST(c) {
4
4
  try {
5
5
  const proposalId = c.req.param('proposalId');
6
6
  const body = await c.req.json().catch(() => ({}));
7
- const { startupCommand } = body;
7
+ const { enableLogging = false, startupCommand } = body;
8
8
  if (!proposalId) {
9
9
  return c.json({ error: 'Proposal ID is required' }, 400);
10
10
  }
@@ -13,7 +13,7 @@ export async function POST(c) {
13
13
  const shellPreference = (userSettings.preferences.terminalShell || 'bash');
14
14
  // Create a new terminal session for this proposal
15
15
  const terminalManager = getGlobalTerminalManager();
16
- const session = await terminalManager.createSession(proposalId, shellPreference, startupCommand);
16
+ const session = await terminalManager.createSession(proposalId, enableLogging, shellPreference, startupCommand);
17
17
  return c.json({
18
18
  sessionId: session.id,
19
19
  proposalId: session.proposalId,
@@ -0,0 +1,3 @@
1
+ import { Hono } from 'hono';
2
+ declare const code: Hono<import("hono/types").BlankEnv, import("hono/types").BlankSchema, "/">;
3
+ export default code;
@@ -0,0 +1,5 @@
1
+ import { Hono } from 'hono';
2
+ import { POST } from './route.js';
3
+ const code = new Hono();
4
+ code.post('/', POST);
5
+ export default code;
@@ -0,0 +1,14 @@
1
+ import { Context } from 'hono';
2
+ export declare function POST(c: Context): Promise<(Response & import("hono").TypedResponse<{
3
+ error: string;
4
+ }, 400, "json">) | (Response & import("hono").TypedResponse<{
5
+ error: string;
6
+ }, 404, "json">) | (Response & import("hono").TypedResponse<{
7
+ sessionId: string;
8
+ taskId: string;
9
+ command: string;
10
+ scriptPath: string;
11
+ createdAt: string;
12
+ }, import("hono/utils/http-status").ContentfulStatusCode, "json">) | (Response & import("hono").TypedResponse<{
13
+ error: string;
14
+ }, 500, "json">)>;
@@ -0,0 +1,159 @@
1
+ import { promises as fs } from 'fs';
2
+ import path from 'path';
3
+ import { tmpdir } from 'os';
4
+ import matter from 'gray-matter';
5
+ import { getGlobalTerminalManager } from '../../../../../lib/terminal/global-manager.js';
6
+ import { loadUserSettings } from '../../../../../lib/user-preferences.js';
7
+ import { FileStorageAdapter } from '../../../../../lib/storage/file-storage.js';
8
+ import { buildPipelineScript, buildPipelineBanner } from '@lovelybunch/core';
9
+ const storage = new FileStorageAdapter();
10
+ const VALID_AGENTS = ['claude', 'gemini', 'codex', 'droid', 'kiro'];
11
+ const VALID_CONTEXT_TYPES = ['change-task', 'prepare-task', 'skill', 'general'];
12
+ function resolveGaitPath() {
13
+ if (process.env.NODE_ENV === 'development' && process.env.GAIT_DEV_ROOT) {
14
+ return process.env.GAIT_DEV_ROOT;
15
+ }
16
+ if (process.env.GAIT_DATA_PATH) {
17
+ return path.resolve(process.env.GAIT_DATA_PATH, '.nut');
18
+ }
19
+ return path.resolve(process.cwd(), '.nut');
20
+ }
21
+ async function loadMcpServers() {
22
+ const gaitPath = resolveGaitPath();
23
+ const mcpConfigPath = path.join(gaitPath, 'mcp', 'config.json');
24
+ try {
25
+ const raw = await fs.readFile(mcpConfigPath, 'utf-8');
26
+ const json = JSON.parse(raw);
27
+ const mcpServersMap = json.mcpServers || {};
28
+ return { servers: Object.keys(mcpServersMap), mcpServersMap };
29
+ }
30
+ catch {
31
+ return { servers: [], mcpServersMap: {} };
32
+ }
33
+ }
34
+ async function loadSkills() {
35
+ const gaitPath = resolveGaitPath();
36
+ const skillsPath = path.join(gaitPath, 'skills');
37
+ try {
38
+ await fs.mkdir(skillsPath, { recursive: true });
39
+ const entries = await fs.readdir(skillsPath, { withFileTypes: true });
40
+ const skills = await Promise.all(entries
41
+ .filter(entry => entry.isDirectory())
42
+ .map(async (entry) => {
43
+ const skillFile = path.join(skillsPath, entry.name, 'SKILL.md');
44
+ try {
45
+ const content = await fs.readFile(skillFile, 'utf-8');
46
+ const { data } = matter(content);
47
+ return { id: entry.name, name: data.name || entry.name };
48
+ }
49
+ catch {
50
+ return { id: entry.name, name: entry.name };
51
+ }
52
+ }));
53
+ return { skills, ids: skills.map(s => s.id) };
54
+ }
55
+ catch {
56
+ return { skills: [], ids: [] };
57
+ }
58
+ }
59
+ export async function POST(c) {
60
+ try {
61
+ const body = await c.req.json();
62
+ const { taskId } = body;
63
+ if (!taskId) {
64
+ return c.json({ error: 'taskId is required' }, 400);
65
+ }
66
+ const agent = (body.model || 'claude');
67
+ if (!VALID_AGENTS.includes(agent)) {
68
+ return c.json({ error: `Invalid model '${agent}'. Valid options: ${VALID_AGENTS.join(', ')}` }, 400);
69
+ }
70
+ const contextType = (body.contextType || 'change-task');
71
+ if (!VALID_CONTEXT_TYPES.includes(contextType)) {
72
+ return c.json({ error: `Invalid contextType '${contextType}'. Valid options: ${VALID_CONTEXT_TYPES.join(', ')}` }, 400);
73
+ }
74
+ // Validate task exists
75
+ const task = await storage.getTask(taskId);
76
+ if (!task) {
77
+ return c.json({ error: `Task '${taskId}' not found` }, 404);
78
+ }
79
+ // Optionally create a worktree
80
+ let worktreePath;
81
+ if (body.newWorktree) {
82
+ if (body.worktreeSuffix && body.worktreeBranch) {
83
+ return c.json({ error: 'Cannot use both worktreeSuffix and worktreeBranch' }, 400);
84
+ }
85
+ const idPart = taskId.startsWith('cp-') ? taskId.slice(3) : taskId;
86
+ const baseBranch = `feat/cp-${idPart}`;
87
+ let branchName;
88
+ if (body.worktreeBranch) {
89
+ branchName = body.worktreeBranch.trim();
90
+ }
91
+ else if (body.worktreeSuffix) {
92
+ const suffix = body.worktreeSuffix.trim().replace(/[^A-Za-z0-9_-]+/g, '-').replace(/^-+|-+$/g, '');
93
+ branchName = suffix ? `${baseBranch}-${suffix}` : baseBranch;
94
+ }
95
+ else {
96
+ branchName = baseBranch;
97
+ }
98
+ try {
99
+ const apiBase = `http://localhost:${process.env.PORT || 3000}`;
100
+ const worktreeResponse = await fetch(`${apiBase}/api/v1/git/worktrees`, {
101
+ method: 'POST',
102
+ headers: { 'Content-Type': 'application/json' },
103
+ body: JSON.stringify({ branch: branchName, from: 'main' }),
104
+ });
105
+ const worktreeResult = await worktreeResponse.json();
106
+ if (worktreeResult.success) {
107
+ worktreePath = worktreeResult.data?.added?.path;
108
+ }
109
+ }
110
+ catch {
111
+ // Continue without worktree
112
+ }
113
+ }
114
+ // Load MCP servers and skills
115
+ const { servers: selectedMcpServers, mcpServersMap } = await loadMcpServers();
116
+ const { skills, ids: selectedSkillIds } = await loadSkills();
117
+ // Build the raw node script and write to a temp file so the PTY
118
+ // command stays short (avoids echo noise and buffer-length limits).
119
+ const script = buildPipelineScript({
120
+ taskId,
121
+ contextType,
122
+ cliAgent: agent,
123
+ mcpServersMap,
124
+ selectedMcpServers,
125
+ skills,
126
+ selectedSkillIds,
127
+ automationEnabled: Boolean(body.autonomous),
128
+ customInstruction: body.customInstructions,
129
+ interactive: body.interactive ?? true,
130
+ });
131
+ const tmpDir = await fs.mkdtemp(path.join(tmpdir(), 'nut-pipeline-'));
132
+ const scriptPath = path.join(tmpDir, 'run.js');
133
+ await fs.writeFile(scriptPath, script, 'utf-8');
134
+ const interactive = body.interactive ?? true;
135
+ const banner = buildPipelineBanner({ taskId, cliAgent: agent, contextType, interactive });
136
+ const exitSuffix = interactive ? '' : '; exit';
137
+ const command = `printf '${banner}' && node ${scriptPath}${exitSuffix}`;
138
+ // Create terminal session with the pipeline command as a startup command
139
+ // so it runs via GAIT_STARTUP_CMD during shell init (same as the web UI path).
140
+ const userSettings = await loadUserSettings();
141
+ const shellPreference = (userSettings.preferences.terminalShell || 'bash');
142
+ const startupCommand = worktreePath
143
+ ? `cd '${worktreePath.replace(/'/g, "'\\''")}' && ${command}`
144
+ : command;
145
+ const terminalManager = getGlobalTerminalManager();
146
+ const session = await terminalManager.createSession(taskId, shellPreference, startupCommand);
147
+ return c.json({
148
+ sessionId: session.id,
149
+ taskId: session.taskId,
150
+ command,
151
+ scriptPath,
152
+ createdAt: session.createdAt,
153
+ });
154
+ }
155
+ catch (error) {
156
+ console.error('Error starting code session:', error);
157
+ return c.json({ error: 'Failed to start code session' }, 500);
158
+ }
159
+ }