cognova 0.2.19 → 0.2.21

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 (395) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{D9xw8uE_.js → -O86rjFZ.js} +1 -1
  3. package/.output/public/_nuxt/{DOHxCkGP.js → -Q9J9PRu.js} +1 -1
  4. package/.output/public/_nuxt/{D7Wh0rDY.js → 0DkCurh5.js} +1 -1
  5. package/.output/public/_nuxt/{pBQdXg6-.js → 49whOfsW.js} +1 -1
  6. package/.output/public/_nuxt/{Ctk8prsJ.js → 4Vi9hKJC.js} +1 -1
  7. package/.output/public/_nuxt/{Ck27MWrT.js → 66GNa6MU.js} +1 -1
  8. package/.output/public/_nuxt/9dGxQN-2.js +1 -0
  9. package/.output/public/_nuxt/{D8mRVRI0.js → 9wWq016N.js} +1 -1
  10. package/.output/public/_nuxt/{GVe-4Ph3.js → B04GYyxD.js} +1 -1
  11. package/.output/public/_nuxt/{CZc2yEa4.js → B0KPvVav.js} +1 -1
  12. package/.output/public/_nuxt/{BU3iKy5X.js → B1meh0Ci.js} +1 -1
  13. package/.output/public/_nuxt/{BpyLpp2u.js → B53zbEPa.js} +1 -1
  14. package/.output/public/_nuxt/{lA4dCLQU.js → B6-aFDg7.js} +1 -1
  15. package/.output/public/_nuxt/{DkfpcEOx.js → B6lgiDn1.js} +1 -1
  16. package/.output/public/_nuxt/{BAHFbKQX.js → B7uuK82m.js} +1 -1
  17. package/.output/public/_nuxt/{CGU5SCtz.js → B9OPrqTh.js} +1 -1
  18. package/.output/public/_nuxt/{Jnpoujml.js → BA646MN4.js} +1 -1
  19. package/.output/public/_nuxt/{T9GHjrNI.js → BDhTzPPo.js} +1 -1
  20. package/.output/public/_nuxt/{C1adFeD7.js → BDzVzzBM.js} +1 -1
  21. package/.output/public/_nuxt/{DlI0WiRW.js → BEkFNtxw.js} +3 -3
  22. package/.output/public/_nuxt/{2esUefJW.js → BI7-RNYV.js} +1 -1
  23. package/.output/public/_nuxt/{CLemJ5rV.js → BN8XazaH.js} +3 -3
  24. package/.output/public/_nuxt/{CxeiZXxL.js → BNP0kT7B.js} +1 -1
  25. package/.output/public/_nuxt/{DaiuS8Oa.js → BPfVf7kt.js} +1 -1
  26. package/.output/public/_nuxt/{C83foXIS.js → BQGDi8tM.js} +1 -1
  27. package/.output/public/_nuxt/{BqcLcVqS.js → BUXewbUG.js} +1 -1
  28. package/.output/public/_nuxt/{DGW-6lPv.js → BW0FZi7D.js} +1 -1
  29. package/.output/public/_nuxt/{CANguo9i.js → BXmijQzM.js} +1 -1
  30. package/.output/public/_nuxt/{D5eZOtxz.js → BZFf3mr_.js} +1 -1
  31. package/.output/public/_nuxt/{L-wDsWD2.js → BZx0xqxG.js} +1 -1
  32. package/.output/public/_nuxt/{DaHtDNa_.js → BbElT9yG.js} +1 -1
  33. package/.output/public/_nuxt/{Cd_NSs1m.js → BjyHtuwq.js} +1 -1
  34. package/.output/public/_nuxt/{BgWDR6Lw.js → BnfOmQBX.js} +1 -1
  35. package/.output/public/_nuxt/BoqEl-F1.js +1 -0
  36. package/.output/public/_nuxt/{BdcvMuE5.js → Bq2pktu_.js} +2 -2
  37. package/.output/public/_nuxt/{Cmgjw0Gq.js → Br712gOY.js} +1 -1
  38. package/.output/public/_nuxt/{5wtsMO-L.js → Bs4sk8vv.js} +1 -1
  39. package/.output/public/_nuxt/{BU2cb1WW.js → Bt87rSlM.js} +1 -1
  40. package/.output/public/_nuxt/{CYTJ1RUE.js → BtOA13zl.js} +1 -1
  41. package/.output/public/_nuxt/{Da7TeqHg.js → Bti4Nb4c.js} +1 -1
  42. package/.output/public/_nuxt/{CinAAQCA.js → Bu0HhyZq.js} +1 -1
  43. package/.output/public/_nuxt/{B3GkYra-.js → Bv25Wgb9.js} +1 -1
  44. package/.output/public/_nuxt/{DzCd4XVJ.js → BwMPB_Mu.js} +1 -1
  45. package/.output/public/_nuxt/{CRDPv2IF.js → BzkqPhn-.js} +1 -1
  46. package/.output/public/_nuxt/{DHw1eO-H.js → C35LJkds.js} +1 -1
  47. package/.output/public/_nuxt/{0I_ByKAf.js → C4VW2EjN.js} +1 -1
  48. package/.output/public/_nuxt/{CB1bsj7q.js → C6FzuEFH.js} +1 -1
  49. package/.output/public/_nuxt/C866FgGj.js +1 -0
  50. package/.output/public/_nuxt/{BC8KsQEf.js → CBqC92gC.js} +7 -7
  51. package/.output/public/_nuxt/{BsjzqOSI.js → CD2Wt775.js} +1 -1
  52. package/.output/public/_nuxt/{CJFWEUF1.js → CE491BHV.js} +1 -1
  53. package/.output/public/_nuxt/{C2L_Po9T.js → CF8ziKf1.js} +1 -1
  54. package/.output/public/_nuxt/{uRnVeYSZ.js → CFE6wnRK.js} +1 -1
  55. package/.output/public/_nuxt/{Bt7k30rZ.js → CFjVdIUR.js} +1 -1
  56. package/.output/public/_nuxt/{BdwdSTTv.js → CGPn0bIO.js} +1 -1
  57. package/.output/public/_nuxt/{Dc7JcEzN.js → CKSWEIag.js} +1 -1
  58. package/.output/public/_nuxt/{DS0R5f-u.js → CL9cB3YW.js} +1 -1
  59. package/.output/public/_nuxt/{DBNKZ2lD.js → CLUsxCN7.js} +1 -1
  60. package/.output/public/_nuxt/{CRwLFCah.js → CM5aLXsq.js} +1 -1
  61. package/.output/public/_nuxt/{DLCiFGhh.js → CN_jZBEh.js} +1 -1
  62. package/.output/public/_nuxt/{CrvCHahl.js → CNgf0D2d.js} +1 -1
  63. package/.output/public/_nuxt/{Brn3KJ4F.js → CPYFvNZ2.js} +1 -1
  64. package/.output/public/_nuxt/{CGYcIC6i.js → CQTD64un.js} +1 -1
  65. package/.output/public/_nuxt/{Ce8HCJf2.js → CRLO8tx3.js} +1 -1
  66. package/.output/public/_nuxt/{BTXVr2qS.js → CTIUqf4N.js} +1 -1
  67. package/.output/public/_nuxt/{CqkDUH4g.js → CUDpi0L3.js} +1 -1
  68. package/.output/public/_nuxt/{eaWTN9Xx.js → CY4SEsrB.js} +1 -1
  69. package/.output/public/_nuxt/{DP_btl92.js → CYAPNNGW.js} +1 -1
  70. package/.output/public/_nuxt/{Bn6U1R03.js → CZV2u8Xx.js} +1 -1
  71. package/.output/public/_nuxt/{D-iqXq71.js → C_TYqFbT.js} +1 -1
  72. package/.output/public/_nuxt/{DcSBMY1N.js → CdIGoC9r.js} +1 -1
  73. package/.output/public/_nuxt/{Bub0AycX.js → CiPQXVBy.js} +1 -1
  74. package/.output/public/_nuxt/{B6b5WBUt.js → Cif20myG.js} +1 -1
  75. package/.output/public/_nuxt/{dh14EFai.js → Ck1KJ2HV.js} +1 -1
  76. package/.output/public/_nuxt/{DeGeWkgm.js → CkSyHzm-.js} +1 -1
  77. package/.output/public/_nuxt/{BFvHK_cM.js → ClKTC8bU.js} +1 -1
  78. package/.output/public/_nuxt/CltqyXO5.js +1 -0
  79. package/.output/public/_nuxt/{C4GJPeiI.js → CmuSeGko.js} +1 -1
  80. package/.output/public/_nuxt/{DWOW-Cdy.js → Cn_NBSuo.js} +1 -1
  81. package/.output/public/_nuxt/{ZaPXfv7F.js → CvUov1Ey.js} +1 -1
  82. package/.output/public/_nuxt/{BlZVX3pn.js → CwY5tLRb.js} +1 -1
  83. package/.output/public/_nuxt/{QYD2FF-Y.js → CwoQ23uO.js} +1 -1
  84. package/.output/public/_nuxt/{xD0dE8wS.js → Cwoe6TAi.js} +1 -1
  85. package/.output/public/_nuxt/{CRCPfQS-.js → CxTuME0Z.js} +2 -2
  86. package/.output/public/_nuxt/{CDFqHGd6.js → Cyjm1APH.js} +1 -1
  87. package/.output/public/_nuxt/{Q0XJORJf.js → Cyo4VJ6S.js} +1 -1
  88. package/.output/public/_nuxt/{BevO_JgG.js → D-WxGaym.js} +1 -1
  89. package/.output/public/_nuxt/{Bn-WtsyL.js → D0SYimTY.js} +1 -1
  90. package/.output/public/_nuxt/{C2VzD5v7.js → D82AhPdI.js} +1 -1
  91. package/.output/public/_nuxt/{Cd6yPoTw.js → D9dLxr1_.js} +1 -1
  92. package/.output/public/_nuxt/{CSzgREhd.js → D9jU4ocP.js} +1 -1
  93. package/.output/public/_nuxt/{BSZs06C7.js → DAQeLqQw.js} +1 -1
  94. package/.output/public/_nuxt/{k4gD2Q1e.js → DDg2H-HK.js} +1 -1
  95. package/.output/public/_nuxt/{C3LqKYMv.js → DESvLlSI.js} +1 -1
  96. package/.output/public/_nuxt/{CTpEHLzQ.js → DFSB3QxC.js} +1 -1
  97. package/.output/public/_nuxt/{BoRhj5eh.js → DFqzAgzP.js} +1 -1
  98. package/.output/public/_nuxt/{1xdJYr3g.js → DJuYHeIc.js} +1 -1
  99. package/.output/public/_nuxt/{BhICtOVw.js → DK0AJoGL.js} +1 -1
  100. package/.output/public/_nuxt/{DbdpgOQc.js → DQdWxVax.js} +1 -1
  101. package/.output/public/_nuxt/{U6oBvom5.js → DRF-DnQg.js} +1 -1
  102. package/.output/public/_nuxt/{BoyaE2WK.js → DUf0f355.js} +1 -1
  103. package/.output/public/_nuxt/{C2iUvu7Y.js → DWnLv2oh.js} +1 -1
  104. package/.output/public/_nuxt/{Dj92zOuJ.js → DXkvGTEB.js} +1 -1
  105. package/.output/public/_nuxt/{DJXhwj4b.js → DZncVjYt.js} +1 -1
  106. package/.output/public/_nuxt/{CRam5D7c.js → DaAG12aj.js} +1 -1
  107. package/.output/public/_nuxt/{D4s3pp8O.js → Db66Rsfj.js} +1 -1
  108. package/.output/public/_nuxt/{CmZjhT0Y.js → DbLjznUU.js} +1 -1
  109. package/.output/public/_nuxt/{BN8oBViB.js → Dfzca1IN.js} +1 -1
  110. package/.output/public/_nuxt/{DBLItvFs.js → DhvuBruY.js} +1 -1
  111. package/.output/public/_nuxt/{BOb2nBTe.js → Dj9yr6QC.js} +1 -1
  112. package/.output/public/_nuxt/{DiNFXBiC.js → DjJn4g73.js} +1 -1
  113. package/.output/public/_nuxt/{CPv7vm5a.js → DkAUrkyD.js} +1 -1
  114. package/.output/public/_nuxt/{BvaI39gO.js → DkybthvX.js} +1 -1
  115. package/.output/public/_nuxt/{BPuUmv9c.js → DlNwSYeM.js} +1 -1
  116. package/.output/public/_nuxt/{DFELG0yq.js → Dm5HyQgM.js} +1 -1
  117. package/.output/public/_nuxt/{Dvz3E9oI.js → Dn7zgQZh.js} +1 -1
  118. package/.output/public/_nuxt/{2GiGgeXh.js → DoIqoxBH.js} +1 -1
  119. package/.output/public/_nuxt/{Dn78Aa2V.js → Dqx39Omg.js} +1 -1
  120. package/.output/public/_nuxt/{DvClFXmZ.js → DrQVjmDX.js} +1 -1
  121. package/.output/public/_nuxt/{CwNlDU9U.js → DuYzdzqK.js} +1 -1
  122. package/.output/public/_nuxt/{SY-uB-M7.js → DvZW6QuM.js} +1 -1
  123. package/.output/public/_nuxt/{DKiTNmSv.js → DxztGg8Y.js} +1 -1
  124. package/.output/public/_nuxt/{DUws3F7Z.js → EPFrlLUV.js} +1 -1
  125. package/.output/public/_nuxt/{DJcB285V.js → JsQhjNzl.js} +1 -1
  126. package/.output/public/_nuxt/{CiB_saWz.js → NApXVVQD.js} +1 -1
  127. package/.output/public/_nuxt/{QLVAu0lw.js → OwiFxd0L.js} +1 -1
  128. package/.output/public/_nuxt/{CLz02Wwh.js → QAfF68DH.js} +1 -1
  129. package/.output/public/_nuxt/{BFdl5SgW.js → QDt0Bhze.js} +1 -1
  130. package/.output/public/_nuxt/{BRW_vpqh.js → RF9kzKHY.js} +1 -1
  131. package/.output/public/_nuxt/{Cudrwb04.js → RzJhlhBq.js} +1 -1
  132. package/.output/public/_nuxt/{DiMhvSOf.js → SHHFgixe.js} +1 -1
  133. package/.output/public/_nuxt/V5ro_Ide.js +1 -0
  134. package/.output/public/_nuxt/{Bu2PklVX.js → Zge3ScOQ.js} +1 -1
  135. package/.output/public/_nuxt/{CZ3rgvtp.js → Zj8SE5Ja.js} +1 -1
  136. package/.output/public/_nuxt/{edY2TeMa.js → ZjXNlFkb.js} +1 -1
  137. package/.output/public/_nuxt/{DS-fOYWT.js → _5GQc09B.js} +1 -1
  138. package/.output/public/_nuxt/{u3fzHugO.js → aK4BeJQk.js} +1 -1
  139. package/.output/public/_nuxt/builds/latest.json +1 -1
  140. package/.output/public/_nuxt/builds/meta/36770554-14f7-4f3a-add8-2f51436e3d25.json +1 -0
  141. package/.output/public/_nuxt/{CuhzX4Km.js → cQU5gXxh.js} +1 -1
  142. package/.output/public/_nuxt/{B8GQk9Pq.js → cq8AG_FV.js} +1 -1
  143. package/.output/public/_nuxt/{BrAACupN.js → d2FXPfMj.js} +1 -1
  144. package/.output/public/_nuxt/{r-hA7E7a.js → dD3g22lS.js} +1 -1
  145. package/.output/public/_nuxt/{rdjgsK-s.js → f35n4CdE.js} +1 -1
  146. package/.output/public/_nuxt/{5bb2zRmX.js → gWMUdeHB.js} +1 -1
  147. package/.output/public/_nuxt/{B6oh5cW5.js → i2HesToX.js} +1 -1
  148. package/.output/public/_nuxt/{Bw60ICyV.js → iIxC-lNx.js} +1 -1
  149. package/.output/public/_nuxt/{Dw6GDP1h.js → nRp8uM7H.js} +1 -1
  150. package/.output/public/_nuxt/{DNqEe3aR.js → oBlsjU0k.js} +1 -1
  151. package/.output/public/_nuxt/{oD8wGmeX.js → rH7JJqZQ.js} +1 -1
  152. package/.output/public/_nuxt/{DX7Ul07b.js → tak9pMy9.js} +1 -1
  153. package/.output/public/_nuxt/{FTxQ_eC3.js → vebhRA6y.js} +1 -1
  154. package/.output/server/chunks/build/A-BWukSPjS.mjs +1 -4
  155. package/.output/server/chunks/build/A-BWukSPjS.mjs.map +1 -1
  156. package/.output/server/chunks/build/Accordion-BaJYea6e.mjs +239 -307
  157. package/.output/server/chunks/build/Accordion-BaJYea6e.mjs.map +1 -1
  158. package/.output/server/chunks/build/AccordionItem-DdG2zgcN.mjs +1 -4
  159. package/.output/server/chunks/build/AccordionItem-DdG2zgcN.mjs.map +1 -1
  160. package/.output/server/chunks/build/AgentForm-styles.DCUnzu4-.mjs.map +1 -1
  161. package/.output/server/chunks/build/Badge-BrU9UkCv.mjs +1 -4
  162. package/.output/server/chunks/build/Badge-BrU9UkCv.mjs.map +1 -1
  163. package/.output/server/chunks/build/Badge-C1RKkIgG.mjs +42 -58
  164. package/.output/server/chunks/build/Badge-C1RKkIgG.mjs.map +1 -1
  165. package/.output/server/chunks/build/Blockquote-DND8wTkU.mjs +1 -4
  166. package/.output/server/chunks/build/Blockquote-DND8wTkU.mjs.map +1 -1
  167. package/.output/server/chunks/build/Callout-1halpaEg.mjs +6 -10
  168. package/.output/server/chunks/build/Callout-1halpaEg.mjs.map +1 -1
  169. package/.output/server/chunks/build/Card-BHCSDKDt.mjs +9 -13
  170. package/.output/server/chunks/build/Card-BHCSDKDt.mjs.map +1 -1
  171. package/.output/server/chunks/build/Card-G40WAFiH.mjs +10 -15
  172. package/.output/server/chunks/build/Card-G40WAFiH.mjs.map +1 -1
  173. package/.output/server/chunks/build/CardGroup-BOuJcNGp.mjs +1 -4
  174. package/.output/server/chunks/build/CardGroup-BOuJcNGp.mjs.map +1 -1
  175. package/.output/server/chunks/build/Code-B1xkAS5a.mjs +1 -4
  176. package/.output/server/chunks/build/Code-B1xkAS5a.mjs.map +1 -1
  177. package/.output/server/chunks/build/CodeCollapse-BIhaNa22.mjs +7 -11
  178. package/.output/server/chunks/build/CodeCollapse-BIhaNa22.mjs.map +1 -1
  179. package/.output/server/chunks/build/CodeGroup-BviYyCuo.mjs +50 -71
  180. package/.output/server/chunks/build/CodeGroup-BviYyCuo.mjs.map +1 -1
  181. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs +2 -6
  182. package/.output/server/chunks/build/CodeIcon-CWD5HcV7.mjs.map +1 -1
  183. package/.output/server/chunks/build/CodePreview-D8PsCQ6m.mjs +4 -8
  184. package/.output/server/chunks/build/CodePreview-D8PsCQ6m.mjs.map +1 -1
  185. package/.output/server/chunks/build/CodeTree-BUTLupmL.mjs +74 -89
  186. package/.output/server/chunks/build/CodeTree-BUTLupmL.mjs.map +1 -1
  187. package/.output/server/chunks/build/Collapsible-BIvXNaSq.mjs +11 -20
  188. package/.output/server/chunks/build/Collapsible-BIvXNaSq.mjs.map +1 -1
  189. package/.output/server/chunks/build/ColorModeButton-CiS8E1tc.mjs +4 -5
  190. package/.output/server/chunks/build/ConfirmModal-DuQXeyic.mjs.map +1 -1
  191. package/.output/server/chunks/build/Container-DYkNsgEA.mjs +1 -4
  192. package/.output/server/chunks/build/Container-DYkNsgEA.mjs.map +1 -1
  193. package/.output/server/chunks/build/DashboardNavbar-Cpq8yKA0.mjs +43 -66
  194. package/.output/server/chunks/build/DashboardNavbar-Cpq8yKA0.mjs.map +1 -1
  195. package/.output/server/chunks/build/DashboardSidebarToggle-Chnqv04k.mjs +6 -15
  196. package/.output/server/chunks/build/DashboardSidebarToggle-Chnqv04k.mjs.map +1 -1
  197. package/.output/server/chunks/build/DashboardToolbar-66a616OO.mjs +18 -26
  198. package/.output/server/chunks/build/DashboardToolbar-66a616OO.mjs.map +1 -1
  199. package/.output/server/chunks/build/DocumentEditor-styles.CHRLgdKS.mjs.map +1 -1
  200. package/.output/server/chunks/build/Drawer-zOHju6ul.mjs +229 -263
  201. package/.output/server/chunks/build/Drawer-zOHju6ul.mjs.map +1 -1
  202. package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs +419 -483
  203. package/.output/server/chunks/build/DropdownMenu-BBrV9nXz.mjs.map +1 -1
  204. package/.output/server/chunks/build/EditorToolbar-B9OwSI5e.mjs +148 -179
  205. package/.output/server/chunks/build/EditorToolbar-B9OwSI5e.mjs.map +1 -1
  206. package/.output/server/chunks/build/Em-DsIz_BnD.mjs +1 -4
  207. package/.output/server/chunks/build/Em-DsIz_BnD.mjs.map +1 -1
  208. package/.output/server/chunks/build/Field-cwwmSQDT.mjs +14 -19
  209. package/.output/server/chunks/build/Field-cwwmSQDT.mjs.map +1 -1
  210. package/.output/server/chunks/build/FieldGroup-CAIpQv8s.mjs +1 -4
  211. package/.output/server/chunks/build/FieldGroup-CAIpQv8s.mjs.map +1 -1
  212. package/.output/server/chunks/build/FieldGroup-KzsWn_XG.mjs +1 -4
  213. package/.output/server/chunks/build/FieldGroup-KzsWn_XG.mjs.map +1 -1
  214. package/.output/server/chunks/build/Form-X6hlUv6q.mjs +20 -44
  215. package/.output/server/chunks/build/Form-X6hlUv6q.mjs.map +1 -1
  216. package/.output/server/chunks/build/FormField-Caux_FCv.mjs +23 -34
  217. package/.output/server/chunks/build/FormField-Caux_FCv.mjs.map +1 -1
  218. package/.output/server/chunks/build/H1-BbFNsPyP.mjs +4 -9
  219. package/.output/server/chunks/build/H1-BbFNsPyP.mjs.map +1 -1
  220. package/.output/server/chunks/build/H2-vHTl_pWr.mjs +5 -10
  221. package/.output/server/chunks/build/H2-vHTl_pWr.mjs.map +1 -1
  222. package/.output/server/chunks/build/H3-7eTcfO3s.mjs +5 -10
  223. package/.output/server/chunks/build/H3-7eTcfO3s.mjs.map +1 -1
  224. package/.output/server/chunks/build/H4-C89p_PKO.mjs +4 -9
  225. package/.output/server/chunks/build/H4-C89p_PKO.mjs.map +1 -1
  226. package/.output/server/chunks/build/Hr-Bm8RlL3O.mjs +1 -4
  227. package/.output/server/chunks/build/Hr-Bm8RlL3O.mjs.map +1 -1
  228. package/.output/server/chunks/build/Icon-Dp9iy0BI.mjs +1 -4
  229. package/.output/server/chunks/build/Icon-Dp9iy0BI.mjs.map +1 -1
  230. package/.output/server/chunks/build/Img-CWLmvN1t.mjs +63 -76
  231. package/.output/server/chunks/build/Img-CWLmvN1t.mjs.map +1 -1
  232. package/.output/server/chunks/build/Input-CV2hlBHo.mjs +54 -70
  233. package/.output/server/chunks/build/Input-CV2hlBHo.mjs.map +1 -1
  234. package/.output/server/chunks/build/InputTags-VS4G6txn.mjs +101 -133
  235. package/.output/server/chunks/build/InputTags-VS4G6txn.mjs.map +1 -1
  236. package/.output/server/chunks/build/Kbd-CQG6I_Ch.mjs +1 -4
  237. package/.output/server/chunks/build/Kbd-CQG6I_Ch.mjs.map +1 -1
  238. package/.output/server/chunks/build/Kbd-Daq7k0fm.mjs +19 -22
  239. package/.output/server/chunks/build/Kbd-Daq7k0fm.mjs.map +1 -1
  240. package/.output/server/chunks/build/Li-Bw1QUaGv.mjs +1 -4
  241. package/.output/server/chunks/build/Li-Bw1QUaGv.mjs.map +1 -1
  242. package/.output/server/chunks/build/{MDC-CBPIDFRQ.mjs → MDC-Dx0YPDhe.mjs} +38 -58
  243. package/.output/server/chunks/build/{MDC-CBPIDFRQ.mjs.map → MDC-Dx0YPDhe.mjs.map} +1 -1
  244. package/.output/server/chunks/build/Modal-Z_SoWhh-.mjs +299 -343
  245. package/.output/server/chunks/build/Modal-Z_SoWhh-.mjs.map +1 -1
  246. package/.output/server/chunks/build/Ol-D-fPnfFM.mjs +1 -4
  247. package/.output/server/chunks/build/Ol-D-fPnfFM.mjs.map +1 -1
  248. package/.output/server/chunks/build/P-B5YI1V9y.mjs +1 -4
  249. package/.output/server/chunks/build/P-B5YI1V9y.mjs.map +1 -1
  250. package/.output/server/chunks/build/Pre-ChiJcf3C.mjs +7 -11
  251. package/.output/server/chunks/build/Pre-ChiJcf3C.mjs.map +1 -1
  252. package/.output/server/chunks/build/Pre-styles.Ddy5_gRD.mjs.map +1 -1
  253. package/.output/server/chunks/build/ProseH5-DahJyv8h.mjs +1 -4
  254. package/.output/server/chunks/build/ProseH6-C4Is5h6c.mjs +1 -4
  255. package/.output/server/chunks/build/Select-BB1oLrCD.mjs +643 -758
  256. package/.output/server/chunks/build/Select-BB1oLrCD.mjs.map +1 -1
  257. package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs +702 -814
  258. package/.output/server/chunks/build/SelectMenu-DPssg6zD.mjs.map +1 -1
  259. package/.output/server/chunks/build/Separator-CYbxFNTe.mjs +35 -44
  260. package/.output/server/chunks/build/Separator-CYbxFNTe.mjs.map +1 -1
  261. package/.output/server/chunks/build/Skeleton-DZqsQzFi.mjs +1 -4
  262. package/.output/server/chunks/build/Skeleton-DZqsQzFi.mjs.map +1 -1
  263. package/.output/server/chunks/build/Slideover-DJNgcnZ2.mjs +282 -322
  264. package/.output/server/chunks/build/Slideover-DJNgcnZ2.mjs.map +1 -1
  265. package/.output/server/chunks/build/Steps-BZpvXfzb.mjs +1 -4
  266. package/.output/server/chunks/build/Steps-BZpvXfzb.mjs.map +1 -1
  267. package/.output/server/chunks/build/Strong-DXJqOWL3.mjs +1 -4
  268. package/.output/server/chunks/build/Strong-DXJqOWL3.mjs.map +1 -1
  269. package/.output/server/chunks/build/Switch-GWdksmY6.mjs +75 -92
  270. package/.output/server/chunks/build/Switch-GWdksmY6.mjs.map +1 -1
  271. package/.output/server/chunks/build/Table-BSrLZ7dt.mjs +3 -7
  272. package/.output/server/chunks/build/Table-BSrLZ7dt.mjs.map +1 -1
  273. package/.output/server/chunks/build/Table-DCwTlhCj.mjs +67 -95
  274. package/.output/server/chunks/build/Table-DCwTlhCj.mjs.map +1 -1
  275. package/.output/server/chunks/build/Tabs-B6vgKDY9.mjs +164 -205
  276. package/.output/server/chunks/build/Tabs-B6vgKDY9.mjs.map +1 -1
  277. package/.output/server/chunks/build/Tabs-Dk3nvOFF.mjs +7 -13
  278. package/.output/server/chunks/build/Tabs-Dk3nvOFF.mjs.map +1 -1
  279. package/.output/server/chunks/build/TabsItem-CDhyuBtJ.mjs +1 -4
  280. package/.output/server/chunks/build/TabsItem-CDhyuBtJ.mjs.map +1 -1
  281. package/.output/server/chunks/build/TaskForm-styles.DRSLq_mo.mjs.map +1 -1
  282. package/.output/server/chunks/build/Tbody-CjMT5oH-.mjs +1 -4
  283. package/.output/server/chunks/build/Tbody-CjMT5oH-.mjs.map +1 -1
  284. package/.output/server/chunks/build/Td-ZBVaEjFN.mjs +1 -4
  285. package/.output/server/chunks/build/Td-ZBVaEjFN.mjs.map +1 -1
  286. package/.output/server/chunks/build/Th-D317icbd.mjs +1 -4
  287. package/.output/server/chunks/build/Th-D317icbd.mjs.map +1 -1
  288. package/.output/server/chunks/build/Thead-Ca_ZESTK.mjs +1 -4
  289. package/.output/server/chunks/build/Thead-Ca_ZESTK.mjs.map +1 -1
  290. package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs +90 -119
  291. package/.output/server/chunks/build/Tooltip-TRyl6dje.mjs.map +1 -1
  292. package/.output/server/chunks/build/Tr-6jI8j9gD.mjs +1 -4
  293. package/.output/server/chunks/build/Tr-6jI8j9gD.mjs.map +1 -1
  294. package/.output/server/chunks/build/Tree-DUhXKd8y.mjs +600 -724
  295. package/.output/server/chunks/build/Tree-DUhXKd8y.mjs.map +1 -1
  296. package/.output/server/chunks/build/Ul-BUGj_CPb.mjs +1 -4
  297. package/.output/server/chunks/build/Ul-BUGj_CPb.mjs.map +1 -1
  298. package/.output/server/chunks/build/_id_-CwBeklIM.mjs +6 -11
  299. package/.output/server/chunks/build/_id_-CwBeklIM.mjs.map +1 -1
  300. package/.output/server/chunks/build/_name_-D7MtW4Vu.mjs +80 -95
  301. package/.output/server/chunks/build/_name_-D7MtW4Vu.mjs.map +1 -1
  302. package/.output/server/chunks/build/{_uuid_-22DWyyT2.mjs → _uuid_-lvG92ein.mjs} +47 -90
  303. package/.output/server/chunks/build/_uuid_-lvG92ein.mjs.map +1 -0
  304. package/.output/server/chunks/build/account-LDZ4TL6x.mjs.map +1 -1
  305. package/.output/server/chunks/build/app-CGhRZPNT.mjs +4 -6
  306. package/.output/server/chunks/build/app-CGhRZPNT.mjs.map +1 -1
  307. package/.output/server/chunks/build/auth-BGPNH2QJ.mjs.map +1 -1
  308. package/.output/server/chunks/build/{chat-marxFgC2.mjs → chat-BphuYhvA.mjs} +15 -24
  309. package/.output/server/chunks/build/chat-BphuYhvA.mjs.map +1 -0
  310. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  311. package/.output/server/chunks/build/client.precomputed.mjs.map +1 -1
  312. package/.output/server/chunks/build/cookie-C_iulBi6.mjs +3 -4
  313. package/.output/server/chunks/build/dashboard-CLk1NlbR.mjs +10 -11
  314. package/.output/server/chunks/build/dashboard-CLk1NlbR.mjs.map +1 -1
  315. package/.output/server/chunks/build/dashboard-nDujDyOg.mjs +2196 -2613
  316. package/.output/server/chunks/build/dashboard-nDujDyOg.mjs.map +1 -1
  317. package/.output/server/chunks/build/docs-Bwucwp0r.mjs +57 -79
  318. package/.output/server/chunks/build/docs-Bwucwp0r.mjs.map +1 -1
  319. package/.output/server/chunks/build/error-404-styles.AYNYglVn.mjs.map +1 -1
  320. package/.output/server/chunks/build/error-500-styles.CQugGB96.mjs.map +1 -1
  321. package/.output/server/chunks/build/fetch-BB7Qzkwe.mjs +1 -2
  322. package/.output/server/chunks/build/hooks-D6PmTth8.mjs +4 -5
  323. package/.output/server/chunks/build/hooks-D6PmTth8.mjs.map +1 -1
  324. package/.output/server/chunks/build/{index-B3B162Ta.mjs → index-Byt-3Yq6.mjs} +607 -742
  325. package/.output/server/chunks/build/index-Byt-3Yq6.mjs.map +1 -0
  326. package/.output/server/chunks/build/index-CJkn2jiM.mjs +58 -84
  327. package/.output/server/chunks/build/index-CJkn2jiM.mjs.map +1 -1
  328. package/.output/server/chunks/build/{index-jLKAA7pL.mjs → index-CxDxc9fm.mjs} +39 -53
  329. package/.output/server/chunks/build/{index-jLKAA7pL.mjs.map → index-CxDxc9fm.mjs.map} +1 -1
  330. package/.output/server/chunks/build/index-Cz9Y6NwN.mjs +1 -2
  331. package/.output/server/chunks/build/index-Cz9Y6NwN.mjs.map +1 -1
  332. package/.output/server/chunks/build/{index-Cl87bx3X.mjs → index-DzdvIi8V.mjs} +6 -8
  333. package/.output/server/chunks/build/{index-Cl87bx3X.mjs.map → index-DzdvIi8V.mjs.map} +1 -1
  334. package/.output/server/chunks/build/{integrations-D5JWURiJ.mjs → integrations-Hf4O1jkW.mjs} +46 -111
  335. package/.output/server/chunks/build/integrations-Hf4O1jkW.mjs.map +1 -0
  336. package/.output/server/chunks/build/library-DxRdgP6X.mjs.map +1 -1
  337. package/.output/server/chunks/build/login-BmER_VoU.mjs +293 -349
  338. package/.output/server/chunks/build/login-BmER_VoU.mjs.map +1 -1
  339. package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs +9 -11
  340. package/.output/server/chunks/build/manage-secrets-BWzqc_-f.mjs.map +1 -1
  341. package/.output/server/chunks/build/mdc-highlighter.mjs.map +1 -1
  342. package/.output/server/chunks/build/memories-BqA719O1.mjs.map +1 -1
  343. package/.output/server/chunks/build/node-D32ZN4X1.mjs +1 -2
  344. package/.output/server/chunks/build/server.mjs +7 -7
  345. package/.output/server/chunks/build/server.mjs.map +1 -1
  346. package/.output/server/chunks/build/settings-neokAVE5.mjs.map +1 -1
  347. package/.output/server/chunks/build/slot-BA0jpvfd.mjs +1 -1
  348. package/.output/server/chunks/build/ssr-Bqnw2a-w.mjs +3 -5
  349. package/.output/server/chunks/build/ssrSlot-FUxZcI57.mjs +1 -1
  350. package/.output/server/chunks/build/styles.mjs +2 -2
  351. package/.output/server/chunks/build/styles.mjs.map +1 -1
  352. package/.output/server/chunks/build/{tasks-DLUNgLwE.mjs → tasks-CnpIQNpS.mjs} +7 -18
  353. package/.output/server/chunks/build/tasks-CnpIQNpS.mjs.map +1 -0
  354. package/.output/server/chunks/build/usage-BHdQZbfI.mjs +231 -293
  355. package/.output/server/chunks/build/usage-BHdQZbfI.mjs.map +1 -1
  356. package/.output/server/chunks/build/useAgents-nmbkB9-_.mjs +2 -3
  357. package/.output/server/chunks/build/useAgents-nmbkB9-_.mjs.map +1 -1
  358. package/.output/server/chunks/build/useAuth-rW9toE_m.mjs +4 -14
  359. package/.output/server/chunks/build/useAuth-rW9toE_m.mjs.map +1 -1
  360. package/.output/server/chunks/build/useCopyToClipboard-vi6FYyyZ.mjs +1 -2
  361. package/.output/server/chunks/build/useCopyToClipboard-vi6FYyyZ.mjs.map +1 -1
  362. package/.output/server/chunks/build/useNotificationBus-BG5JNQf1.mjs.map +1 -1
  363. package/.output/server/chunks/build/usePreferences-DH1QjxOj.mjs +1 -2
  364. package/.output/server/chunks/build/usePreferences-DH1QjxOj.mjs.map +1 -1
  365. package/.output/server/chunks/build/view-mb0ISqfM.mjs +105 -140
  366. package/.output/server/chunks/build/view-mb0ISqfM.mjs.map +1 -1
  367. package/.output/server/chunks/build/{virtual_nuxt__Users_tony_Documents_GitHub_second-brain_.nuxt_mdc-configs-D-mPnyQ5.mjs → virtual_nuxt__Users_tony_Documents_GitHub_second-brain_node_modules_.cache_nuxt_.nuxt_mdc-configs-D-mPnyQ5.mjs} +1 -1
  368. package/.output/server/chunks/build/virtual_nuxt__Users_tony_Documents_GitHub_second-brain_node_modules_.cache_nuxt_.nuxt_mdc-configs-D-mPnyQ5.mjs.map +1 -0
  369. package/.output/server/chunks/build/{virtual_nuxt__Users_tony_Documents_GitHub_second-brain_.nuxt_mdc-imports-PtwWlZ2H.mjs → virtual_nuxt__Users_tony_Documents_GitHub_second-brain_node_modules_.cache_nuxt_.nuxt_mdc-imports-PtwWlZ2H.mjs} +4 -4
  370. package/.output/server/chunks/build/virtual_nuxt__Users_tony_Documents_GitHub_second-brain_node_modules_.cache_nuxt_.nuxt_mdc-imports-PtwWlZ2H.mjs.map +1 -0
  371. package/.output/server/chunks/nitro/nitro.mjs +905 -996
  372. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  373. package/.output/server/package.json +1 -1
  374. package/Claude/skills/_lib/api.py +4 -4
  375. package/Claude/skills/project/project.py +2 -1
  376. package/Claude/skills/skill-creator/SKILL.md +7 -0
  377. package/Claude/skills/task/task.py +4 -3
  378. package/app/pages/settings/integrations.vue +2 -23
  379. package/dist/cli/index.js +372 -170
  380. package/package.json +1 -1
  381. package/server/bridge/adapters/imessage.ts +12 -136
  382. package/shared/types/index.ts +0 -2
  383. package/.output/public/_nuxt/BV9LrrQq.js +0 -1
  384. package/.output/public/_nuxt/CdcXA9zv.js +0 -1
  385. package/.output/public/_nuxt/Cv2DAUoN.js +0 -1
  386. package/.output/public/_nuxt/DEgm6J7X.js +0 -1
  387. package/.output/public/_nuxt/DL1RFS0w.js +0 -1
  388. package/.output/public/_nuxt/builds/meta/cb5185ae-c87f-4b13-8998-00a627da9237.json +0 -1
  389. package/.output/server/chunks/build/_uuid_-22DWyyT2.mjs.map +0 -1
  390. package/.output/server/chunks/build/chat-marxFgC2.mjs.map +0 -1
  391. package/.output/server/chunks/build/index-B3B162Ta.mjs.map +0 -1
  392. package/.output/server/chunks/build/integrations-D5JWURiJ.mjs.map +0 -1
  393. package/.output/server/chunks/build/tasks-DLUNgLwE.mjs.map +0 -1
  394. package/.output/server/chunks/build/virtual_nuxt__Users_tony_Documents_GitHub_second-brain_.nuxt_mdc-configs-D-mPnyQ5.mjs.map +0 -1
  395. package/.output/server/chunks/build/virtual_nuxt__Users_tony_Documents_GitHub_second-brain_.nuxt_mdc-imports-PtwWlZ2H.mjs.map +0 -1
package/dist/cli/index.js CHANGED
@@ -155,7 +155,7 @@ var require_src = __commonJS({
155
155
  });
156
156
 
157
157
  // src/commands/init.ts
158
- import { execSync as execSync5 } from "child_process";
158
+ import { execSync as execSync6 } from "child_process";
159
159
  import { join as join9 } from "path";
160
160
  import crypto3 from "crypto";
161
161
 
@@ -1791,9 +1791,13 @@ import { cpSync as cpSync2, mkdirSync as mkdirSync3, existsSync as existsSync5,
1791
1791
  import { join as join6 } from "path";
1792
1792
 
1793
1793
  // src/templates/claude-md.ts
1794
+ import { platform } from "os";
1794
1795
  function generateClaudeMd(config) {
1795
1796
  const { personality, vault, database, appUrl, installDir } = config;
1796
1797
  const p = personality;
1798
+ const plat = platform();
1799
+ const serviceManager = plat === "darwin" ? "launchd" : plat === "linux" ? "systemd" : null;
1800
+ const platformName = plat === "darwin" ? "macOS" : plat === "linux" ? "Linux" : plat === "win32" ? "Windows" : "this system";
1797
1801
  return `# ${p.agentName}
1798
1802
 
1799
1803
  You are ${p.agentName}, ${p.userName}'s personal knowledge management assistant running through **Cognova**. You operate directly on ${p.userName}'s machine via the Claude Agent SDK \u2014 you are not sandboxed.
@@ -1802,7 +1806,7 @@ You are ${p.agentName}, ${p.userName}'s personal knowledge management assistant
1802
1806
 
1803
1807
  You are a Claude-powered agent embedded in a Cognova installation. ${p.userName} has granted you full system access: file system, shell, local services, and the Cognova API. You can read and write files, execute commands, manage processes, and interact with all Cognova features.
1804
1808
 
1805
- You run as a persistent service managed by PM2. Your conversations are streamed to ${p.userName} through the Cognova web dashboard.
1809
+ ${serviceManager ? `You run as a persistent system service managed by **${serviceManager}** on ${platformName}.` : `You run on ${platformName}.`} Your conversations are streamed to ${p.userName} through the Cognova web dashboard.
1806
1810
 
1807
1811
  ## Identity
1808
1812
 
@@ -1821,7 +1825,7 @@ You run as a persistent service managed by PM2. Your conversations are streamed
1821
1825
  | Vault | ${vault.path} (PARA method) |
1822
1826
  | Database | ${database.type === "local" ? "Local PostgreSQL (Docker)" : "Remote PostgreSQL"} |
1823
1827
  | Skills | ~/.claude/skills/ |
1824
- | Process Manager | PM2 \u2014 \`pm2 status\`, \`pm2 logs cognova\` |
1828
+ | Service Manager | ${serviceManager ? `${serviceManager} (${platformName})` : platformName} \u2014 \`cognova status\`, \`cognova logs\` |
1825
1829
 
1826
1830
  ## Skills
1827
1831
 
@@ -1890,6 +1894,7 @@ Memory is your most important tool. You are stateless between sessions \u2014 wi
1890
1894
  **CRITICAL \u2014 Zero tolerance for leaked secrets:**
1891
1895
  - NEVER store passwords, tokens, API keys, or credentials in memory, notes, conversation, or any file
1892
1896
  - NEVER write secrets to files \u2014 use \`/secret set KEY\` or the Cognova settings UI instead
1897
+ - ALWAYS store sensitive information using the secrets tool, which encrypts data.
1893
1898
  - NEVER embed API keys, tokens, or credentials in SKILL.md files or Python scripts when creating or modifying skills \u2014 always use \`get_secret()\` from \`_lib/api.py\`
1894
1899
  - If ${p.userName} shares a credential in chat, warn them and store it via \`/secret set KEY\` immediately
1895
1900
  - When you need a token for an integration, check with \`/secret list\` and \`/secret get KEY\` before asking ${p.userName}
@@ -1898,8 +1903,8 @@ Memory is your most important tool. You are stateless between sessions \u2014 wi
1898
1903
 
1899
1904
  ### Troubleshooting
1900
1905
  - Use \`/environment status\` or \`/environment health\` to diagnose issues
1901
- - Check logs: \`pm2 logs cognova --lines 50\`
1902
- - Restart: \`pm2 restart cognova\`
1906
+ - Check logs: \`cognova logs\`
1907
+ - Restart: \`cognova restart\`
1903
1908
 
1904
1909
  ### Onboarding
1905
1910
  On first session (when no memories exist), ask ${p.userName} about themselves before doing anything else. Store each fact as a memory and write a \`## User Profile\` section at the end of this CLAUDE.md with a brief summary. This ensures core user context is always loaded, even if memory retrieval fails.
@@ -1909,6 +1914,7 @@ On first session (when no memories exist), ask ${p.userName} about themselves be
1909
1914
  - You MAY create new skills in ~/.claude/skills/
1910
1915
  - You MAY update existing skills when you find improvements
1911
1916
  - Always inform ${p.userName} when modifying your own configuration
1917
+ - AVOID mofifying core system files. If an issue is found in Cognova, validate it thoroughly and then suggest to the user to report it to the github repo.
1912
1918
 
1913
1919
  ## Vault Structure
1914
1920
 
@@ -2117,117 +2123,256 @@ function mergeSettings(existing, generated) {
2117
2123
  }
2118
2124
 
2119
2125
  // src/lib/process-manager.ts
2126
+ import { execSync as execSync4 } from "child_process";
2127
+
2128
+ // src/lib/daemon.ts
2120
2129
  import { execSync as execSync3 } from "child_process";
2121
- import { writeFileSync as writeFileSync4, mkdirSync as mkdirSync4, existsSync as existsSync6 } from "fs";
2130
+ import { existsSync as existsSync6, mkdirSync as mkdirSync4, readFileSync as readFileSync5, unlinkSync, writeFileSync as writeFileSync4 } from "fs";
2131
+ import { homedir as homedir2, platform as platform2 } from "os";
2122
2132
  import { join as join7 } from "path";
2123
-
2124
- // src/templates/pm2-ecosystem.ts
2125
- function generatePm2Ecosystem(config) {
2126
- return `const { readFileSync } = require('fs')
2127
- const { join } = require('path')
2128
-
2129
- // Load .env file into env vars for PM2
2130
- function loadEnv(dir) {
2131
- try {
2132
- const content = readFileSync(join(dir, '.env'), 'utf-8')
2133
- const env = {}
2134
- for (const line of content.split('\\n')) {
2135
- const trimmed = line.trim()
2136
- if (!trimmed || trimmed.startsWith('#')) continue
2137
- const eq = trimmed.indexOf('=')
2138
- if (eq === -1) continue
2139
- env[trimmed.slice(0, eq)] = trimmed.slice(eq + 1)
2140
- }
2141
- return env
2142
- } catch { return {} }
2143
- }
2144
-
2145
- const dotenv = loadEnv('${config.installDir}')
2146
-
2147
- module.exports = {
2148
- apps: [{
2149
- name: 'cognova',
2150
- script: '.output/server/index.mjs',
2151
- cwd: '${config.installDir}',
2152
- // Use 'node' interpreter when NVM is detected to avoid path parsing issues
2153
- interpreter: 'node',
2154
- node_args: '--max-old-space-size=4096',
2155
- env: {
2156
- ...dotenv,
2157
- NODE_ENV: 'production',
2158
- PORT: 3000,
2159
- COGNOVA_PROJECT_DIR: '${config.installDir}'
2160
- },
2161
- // Restart on crash
2162
- autorestart: true,
2163
- max_restarts: 10,
2164
- restart_delay: 5000,
2165
- // Logging
2166
- log_date_format: 'YYYY-MM-DD HH:mm:ss',
2167
- error_file: '${config.installDir}/logs/error.log',
2168
- out_file: '${config.installDir}/logs/out.log',
2169
- merge_logs: true
2170
- }]
2133
+ function getDaemonInfo(installDir) {
2134
+ const plat = platform2();
2135
+ const serviceName = "com.cognova";
2136
+ if (plat === "darwin") {
2137
+ return {
2138
+ platform: "macos",
2139
+ serviceName,
2140
+ configPath: join7(homedir2(), "Library", "LaunchAgents", `${serviceName}.plist`),
2141
+ logsDir: join7(installDir, "logs")
2142
+ };
2143
+ }
2144
+ if (plat === "linux") {
2145
+ return {
2146
+ platform: "linux",
2147
+ serviceName: "cognova",
2148
+ configPath: join7(homedir2(), ".config", "systemd", "user", "cognova.service"),
2149
+ logsDir: join7(installDir, "logs")
2150
+ };
2151
+ }
2152
+ return {
2153
+ platform: "unsupported",
2154
+ serviceName: "cognova",
2155
+ configPath: "",
2156
+ logsDir: ""
2157
+ };
2171
2158
  }
2159
+ function generateLaunchdPlist(config) {
2160
+ const nodePath = execSync3("which node", { encoding: "utf-8" }).trim();
2161
+ const serverPath = join7(config.installDir, ".output", "server", "index.mjs");
2162
+ const logsDir = join7(config.installDir, "logs");
2163
+ const envPath = join7(config.installDir, ".env");
2164
+ let envVars = "";
2165
+ if (existsSync6(envPath)) {
2166
+ const envContent = readFileSync5(envPath, "utf-8");
2167
+ const envLines = envContent.split("\n").filter((line) => line.trim() && !line.startsWith("#"));
2168
+ envVars = envLines.map((line) => {
2169
+ const [key, ...valueParts] = line.split("=");
2170
+ const value = valueParts.join("=").replace(/^["']|["']$/g, "");
2171
+ return ` <key>${key}</key>
2172
+ <string>${value}</string>`;
2173
+ }).join("\n");
2174
+ }
2175
+ return `<?xml version="1.0" encoding="UTF-8"?>
2176
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
2177
+ <plist version="1.0">
2178
+ <dict>
2179
+ <key>Label</key>
2180
+ <string>com.cognova</string>
2181
+
2182
+ <key>ProgramArguments</key>
2183
+ <array>
2184
+ <string>${nodePath}</string>
2185
+ <string>${serverPath}</string>
2186
+ </array>
2187
+
2188
+ <key>WorkingDirectory</key>
2189
+ <string>${config.installDir}</string>
2190
+
2191
+ <key>EnvironmentVariables</key>
2192
+ <dict>
2193
+ ${envVars}
2194
+ </dict>
2195
+
2196
+ <key>RunAtLoad</key>
2197
+ <true/>
2198
+
2199
+ <key>KeepAlive</key>
2200
+ <true/>
2201
+
2202
+ <key>StandardOutPath</key>
2203
+ <string>${logsDir}/stdout.log</string>
2204
+
2205
+ <key>StandardErrorPath</key>
2206
+ <string>${logsDir}/stderr.log</string>
2207
+ </dict>
2208
+ </plist>
2172
2209
  `;
2173
2210
  }
2174
-
2175
- // src/lib/process-manager.ts
2176
- async function setupAndStart(config) {
2211
+ function generateSystemdUnit(config) {
2212
+ const nodePath = execSync3("which node", { encoding: "utf-8" }).trim();
2213
+ const serverPath = join7(config.installDir, ".output", "server", "index.mjs");
2214
+ const logsDir = join7(config.installDir, "logs");
2215
+ const envPath = join7(config.installDir, ".env");
2216
+ return `[Unit]
2217
+ Description=Cognova Personal Knowledge Assistant
2218
+ After=network.target
2219
+
2220
+ [Service]
2221
+ Type=simple
2222
+ WorkingDirectory=${config.installDir}
2223
+ ExecStart=${nodePath} ${serverPath}
2224
+ Restart=always
2225
+ RestartSec=10
2226
+ StandardOutput=append:${logsDir}/stdout.log
2227
+ StandardError=append:${logsDir}/stderr.log
2228
+ Environment=NODE_ENV=production
2229
+ EnvironmentFile=${envPath}
2230
+
2231
+ [Install]
2232
+ WantedBy=default.target
2233
+ `;
2234
+ }
2235
+ function installDaemon(config) {
2236
+ const info = getDaemonInfo(config.installDir);
2237
+ if (info.platform === "unsupported") {
2238
+ throw new Error("Daemon installation not supported on this platform");
2239
+ }
2240
+ if (!existsSync6(info.logsDir)) {
2241
+ mkdirSync4(info.logsDir, { recursive: true });
2242
+ }
2243
+ const configDir = join7(info.configPath, "..");
2244
+ if (!existsSync6(configDir)) {
2245
+ mkdirSync4(configDir, { recursive: true });
2246
+ }
2247
+ const configContent = info.platform === "macos" ? generateLaunchdPlist(config) : generateSystemdUnit(config);
2248
+ writeFileSync4(info.configPath, configContent, "utf-8");
2249
+ if (info.platform === "linux") {
2250
+ execSync3("systemctl --user daemon-reload", { stdio: "ignore" });
2251
+ }
2252
+ }
2253
+ function startDaemon(installDir) {
2254
+ const info = getDaemonInfo(installDir);
2255
+ if (info.platform === "unsupported") {
2256
+ throw new Error("Daemon control not supported on this platform");
2257
+ }
2258
+ if (info.platform === "macos") {
2259
+ execSync3(`launchctl load ${info.configPath}`, { stdio: "inherit" });
2260
+ } else {
2261
+ execSync3("systemctl --user start cognova", { stdio: "inherit" });
2262
+ execSync3("systemctl --user enable cognova", { stdio: "inherit" });
2263
+ }
2264
+ }
2265
+ function stopDaemon(installDir) {
2266
+ const info = getDaemonInfo(installDir);
2267
+ if (info.platform === "unsupported") {
2268
+ throw new Error("Daemon control not supported on this platform");
2269
+ }
2270
+ if (info.platform === "macos") {
2271
+ execSync3(`launchctl unload ${info.configPath}`, { stdio: "inherit" });
2272
+ } else {
2273
+ execSync3("systemctl --user stop cognova", { stdio: "inherit" });
2274
+ }
2275
+ }
2276
+ function restartDaemon(installDir) {
2277
+ const info = getDaemonInfo(installDir);
2278
+ if (info.platform === "unsupported") {
2279
+ throw new Error("Daemon control not supported on this platform");
2280
+ }
2281
+ if (info.platform === "macos") {
2282
+ try {
2283
+ execSync3(`launchctl unload ${info.configPath}`, { stdio: "ignore" });
2284
+ } catch {
2285
+ }
2286
+ execSync3(`launchctl load ${info.configPath}`, { stdio: "inherit" });
2287
+ } else {
2288
+ execSync3("systemctl --user restart cognova", { stdio: "inherit" });
2289
+ }
2290
+ }
2291
+ function getDaemonStatus(installDir) {
2292
+ const info = getDaemonInfo(installDir);
2293
+ if (info.platform === "unsupported") {
2294
+ return "unknown";
2295
+ }
2177
2296
  try {
2178
- execSync3("pm2 --version", { stdio: "pipe" });
2179
- } catch {
2180
- const install = await Re({
2181
- message: "PM2 not found. Install it globally?",
2182
- initialValue: true
2183
- });
2184
- if (Ct(install)) process.exit(0);
2185
- if (install) {
2186
- const s2 = bt2();
2187
- s2.start("Installing PM2");
2188
- const cmd = process.platform === "linux" ? "sudo npm install -g pm2" : "npm install -g pm2";
2189
- execSync3(cmd, { stdio: "inherit" });
2190
- s2.stop("PM2 installed");
2297
+ if (info.platform === "macos") {
2298
+ const output = execSync3("launchctl list", { encoding: "utf-8" });
2299
+ return output.includes("com.cognova") ? "running" : "stopped";
2191
2300
  } else {
2192
- R2.warn("Skipping PM2. Start manually with: node .output/server/index.mjs");
2193
- return;
2301
+ const output = execSync3("systemctl --user is-active cognova", { encoding: "utf-8" });
2302
+ return output.trim() === "active" ? "running" : "stopped";
2194
2303
  }
2304
+ } catch {
2305
+ return "stopped";
2306
+ }
2307
+ }
2308
+ function getLogsPath(installDir) {
2309
+ const logsDir = join7(installDir, "logs");
2310
+ return {
2311
+ stdout: join7(logsDir, "stdout.log"),
2312
+ stderr: join7(logsDir, "stderr.log")
2313
+ };
2314
+ }
2315
+
2316
+ // src/lib/process-manager.ts
2317
+ async function setupAndStart(config) {
2318
+ const info = getDaemonInfo(config.installDir);
2319
+ if (info.platform === "unsupported") {
2320
+ R2.warn("Native daemon management not supported on this platform");
2321
+ R2.info("Start manually with: node .output/server/index.mjs");
2322
+ return;
2195
2323
  }
2196
- const logsDir = join7(config.installDir, "logs");
2197
- if (!existsSync6(logsDir))
2198
- mkdirSync4(logsDir, { recursive: true });
2199
- const ecosystem = generatePm2Ecosystem(config);
2200
- writeFileSync4(join7(config.installDir, "ecosystem.config.cjs"), ecosystem);
2201
2324
  const s = bt2();
2202
- s.start("Starting Cognova with PM2");
2325
+ s.start("Building application");
2203
2326
  try {
2204
- execSync3("pm2 start ecosystem.config.cjs", {
2205
- cwd: config.installDir,
2206
- stdio: "pipe"
2207
- });
2327
+ execSync4("pnpm build", { cwd: config.installDir, stdio: "pipe" });
2328
+ s.stop("Application built");
2329
+ } catch (err) {
2330
+ s.stop("Build failed");
2331
+ R2.error(`Build error: ${err}`);
2332
+ throw err;
2333
+ }
2334
+ s.start(`Installing ${info.platform === "macos" ? "launchd" : "systemd"} service`);
2335
+ try {
2336
+ installDaemon(config);
2337
+ s.stop(`Service configuration installed`);
2338
+ } catch (err) {
2339
+ s.stop("Service installation failed");
2340
+ R2.error(`Installation error: ${err}`);
2341
+ throw err;
2342
+ }
2343
+ s.start("Starting Cognova");
2344
+ try {
2345
+ startDaemon(config.installDir);
2208
2346
  s.stop("Cognova is running");
2347
+ if (info.platform === "macos") {
2348
+ R2.info("Service: ~/Library/LaunchAgents/com.cognova.plist");
2349
+ R2.info("Auto-start: Enabled (will start on login)");
2350
+ } else {
2351
+ R2.info("Service: ~/.config/systemd/user/cognova.service");
2352
+ R2.info("Auto-start: Enabled (will start on login)");
2353
+ }
2209
2354
  } catch (err) {
2210
2355
  s.stop("Failed to start");
2211
- const errMsg = String(err);
2212
- if (errMsg.includes("nvm") && errMsg.includes("not found")) {
2213
- R2.error("PM2 + NVM compatibility issue detected");
2214
- R2.info("Try: pm2 delete cognova && pm2 start ecosystem.config.cjs");
2215
- R2.info(`Working directory: ${config.installDir}`);
2356
+ R2.error(`Start error: ${err}`);
2357
+ if (info.platform === "macos") {
2358
+ R2.info("Troubleshoot: launchctl list | grep cognova");
2359
+ R2.info(`View logs: tail -f ${info.logsDir}/stderr.log`);
2216
2360
  } else {
2217
- R2.error(`PM2 error: ${err}`);
2361
+ R2.info("Troubleshoot: systemctl --user status cognova");
2362
+ R2.info(`View logs: journalctl --user -u cognova -f`);
2218
2363
  }
2219
2364
  throw err;
2220
2365
  }
2221
2366
  }
2222
2367
 
2223
2368
  // src/lib/health.ts
2224
- import { execSync as execSync4 } from "child_process";
2369
+ import { execSync as execSync5 } from "child_process";
2225
2370
  async function waitForHealth(url, maxWaitSeconds = 30) {
2226
2371
  const s = bt2();
2227
2372
  s.start("Waiting for app to become healthy");
2228
2373
  for (let i = 0; i < maxWaitSeconds; i++) {
2229
2374
  try {
2230
- const result = execSync4(`curl -sf ${url}/api/health`, { encoding: "utf-8", timeout: 3e3 });
2375
+ const result = execSync5(`curl -sf ${url}/api/health`, { encoding: "utf-8", timeout: 3e3 });
2231
2376
  const data = JSON.parse(result);
2232
2377
  if (data.status === "ok") {
2233
2378
  s.stop("App is healthy");
@@ -2238,19 +2383,19 @@ async function waitForHealth(url, maxWaitSeconds = 30) {
2238
2383
  await new Promise((resolve) => setTimeout(resolve, 1e3));
2239
2384
  }
2240
2385
  s.stop("App did not become healthy in time");
2241
- R2.warn(`Check logs: pm2 logs cognova`);
2386
+ R2.warn("Check logs: cognova logs");
2242
2387
  return false;
2243
2388
  }
2244
2389
 
2245
2390
  // src/lib/progress.ts
2246
- import { existsSync as existsSync7, readFileSync as readFileSync5, writeFileSync as writeFileSync5, unlinkSync } from "fs";
2391
+ import { existsSync as existsSync7, readFileSync as readFileSync6, writeFileSync as writeFileSync5, unlinkSync as unlinkSync2 } from "fs";
2247
2392
  import { join as join8 } from "path";
2248
2393
  var PROGRESS_FILE = join8(process.env.HOME || "~", ".cognova-setup.json");
2249
2394
  function loadProgress() {
2250
2395
  try {
2251
2396
  if (!existsSync7(PROGRESS_FILE))
2252
2397
  return null;
2253
- const content = readFileSync5(PROGRESS_FILE, "utf-8");
2398
+ const content = readFileSync6(PROGRESS_FILE, "utf-8");
2254
2399
  return JSON.parse(content);
2255
2400
  } catch {
2256
2401
  return null;
@@ -2267,7 +2412,7 @@ function saveProgress(progress) {
2267
2412
  function clearProgress() {
2268
2413
  try {
2269
2414
  if (existsSync7(PROGRESS_FILE))
2270
- unlinkSync(PROGRESS_FILE);
2415
+ unlinkSync2(PROGRESS_FILE);
2271
2416
  } catch {
2272
2417
  }
2273
2418
  }
@@ -2545,7 +2690,7 @@ async function init() {
2545
2690
  "Dependency installation",
2546
2691
  async () => {
2547
2692
  s.start("Installing dependencies");
2548
- execSync5("pnpm install", { cwd: resolvedInstallDir, stdio: "pipe" });
2693
+ execSync6("pnpm install", { cwd: resolvedInstallDir, stdio: "pipe" });
2549
2694
  s.stop("Dependencies installed");
2550
2695
  },
2551
2696
  { canSkip: false }
@@ -2563,23 +2708,23 @@ async function init() {
2563
2708
  R2.info("Dependencies already installed");
2564
2709
  }
2565
2710
  R2.step(import_picocolors6.default.bold("Launch"));
2566
- if (!progress.completedSteps.includes("pm2")) {
2711
+ if (!progress.completedSteps.includes("daemon")) {
2567
2712
  try {
2568
2713
  await withRetry(
2569
- "PM2 setup and start",
2714
+ "Service setup and start",
2570
2715
  () => setupAndStart(config),
2571
2716
  { canSkip: false }
2572
2717
  );
2573
- progress.completedSteps.push("pm2");
2718
+ progress.completedSteps.push("daemon");
2574
2719
  saveProgress(progress);
2575
2720
  } catch (err) {
2576
2721
  if (err instanceof SkipError) {
2577
- R2.error("PM2 setup is required and cannot be skipped");
2722
+ R2.error("Service setup is required and cannot be skipped");
2578
2723
  }
2579
2724
  process.exit(1);
2580
2725
  }
2581
2726
  } else {
2582
- R2.info("PM2 already configured");
2727
+ R2.info("Service already configured");
2583
2728
  }
2584
2729
  if (!progress.completedSteps.includes("health")) {
2585
2730
  try {
@@ -2593,7 +2738,7 @@ async function init() {
2593
2738
  } catch (err) {
2594
2739
  if (err instanceof SkipError) {
2595
2740
  R2.warn("Health check skipped - app may not be fully started");
2596
- R2.info("Check status with: pm2 status");
2741
+ R2.info("Check status with: cognova status");
2597
2742
  } else {
2598
2743
  process.exit(1);
2599
2744
  }
@@ -2611,15 +2756,14 @@ async function init() {
2611
2756
  ` ${import_picocolors6.default.cyan("Agent:")} ${personality.agentName}`,
2612
2757
  "",
2613
2758
  ` ${import_picocolors6.default.dim("Manage:")}`,
2614
- ` cognova start Start the app`,
2615
- ` cognova stop Stop the app`,
2616
- ` cognova restart Restart the app`,
2759
+ ` cognova start Start the service`,
2760
+ ` cognova stop Stop the service`,
2761
+ ` cognova restart Restart the service`,
2762
+ ` cognova status Check service status`,
2763
+ ` cognova logs View logs`,
2617
2764
  ` cognova update Update to latest version`,
2618
2765
  ` cognova doctor Check health`,
2619
2766
  ` cognova reset Re-generate configs`,
2620
- "",
2621
- ` pm2 logs cognova View logs`,
2622
- ` pm2 monit Monitor resources`,
2623
2767
  ""
2624
2768
  ].join("\n"));
2625
2769
  Le(`${personality.agentName} is ready. Open ${import_picocolors6.default.underline(config.appUrl)} to get started.`);
@@ -2627,40 +2771,81 @@ async function init() {
2627
2771
  }
2628
2772
 
2629
2773
  // src/commands/start.ts
2630
- import { execSync as execSync6 } from "child_process";
2631
2774
  import { existsSync as existsSync8 } from "fs";
2632
- import { join as join10 } from "path";
2775
+ import { execSync as execSync7 } from "child_process";
2633
2776
  async function start() {
2634
2777
  const installDir = findInstallDir();
2635
- const ecosystem = join10(installDir, "ecosystem.config.cjs");
2636
- if (!existsSync8(ecosystem)) {
2637
- console.error("No ecosystem.config.cjs found. Run `cognova init` first.");
2778
+ const info = getDaemonInfo(installDir);
2779
+ if (!existsSync8(info.configPath)) {
2780
+ console.error(`No ${info.platform === "macos" ? "launchd plist" : "systemd unit"} found. Run \`cognova init\` first.`);
2781
+ process.exit(1);
2782
+ }
2783
+ try {
2784
+ startDaemon(installDir);
2785
+ console.log("Cognova started.");
2786
+ } catch (err) {
2787
+ console.error("Failed to start:", err);
2638
2788
  process.exit(1);
2639
2789
  }
2640
- execSync6("pm2 start ecosystem.config.cjs", { cwd: installDir, stdio: "inherit" });
2641
- console.log("Cognova started.");
2642
2790
  }
2643
2791
  async function stop() {
2644
2792
  try {
2645
- execSync6("pm2 stop cognova", { stdio: "inherit" });
2793
+ const installDir = findInstallDir();
2794
+ stopDaemon(installDir);
2646
2795
  console.log("Cognova stopped.");
2647
2796
  } catch {
2648
2797
  console.error("Failed to stop. Is Cognova running?");
2798
+ process.exit(1);
2649
2799
  }
2650
2800
  }
2651
2801
  async function restart() {
2652
2802
  try {
2653
- execSync6("pm2 restart cognova", { stdio: "inherit" });
2803
+ const installDir = findInstallDir();
2804
+ restartDaemon(installDir);
2654
2805
  console.log("Cognova restarted.");
2655
2806
  } catch {
2656
2807
  console.error("Failed to restart. Is Cognova running?");
2808
+ process.exit(1);
2809
+ }
2810
+ }
2811
+ async function status() {
2812
+ try {
2813
+ const installDir = findInstallDir();
2814
+ const daemonStatus = getDaemonStatus(installDir);
2815
+ const info = getDaemonInfo(installDir);
2816
+ console.log(`Status: ${daemonStatus}`);
2817
+ if (daemonStatus === "running") {
2818
+ console.log(`Platform: ${info.platform}`);
2819
+ console.log(`Config: ${info.configPath}`);
2820
+ } else {
2821
+ console.log("Cognova is not running. Start with: cognova start");
2822
+ }
2823
+ } catch (err) {
2824
+ console.error("Failed to check status:", err);
2825
+ process.exit(1);
2826
+ }
2827
+ }
2828
+ async function logs() {
2829
+ try {
2830
+ const installDir = findInstallDir();
2831
+ const info = getDaemonInfo(installDir);
2832
+ const logPaths = getLogsPath(installDir);
2833
+ console.log("Showing stderr log (Ctrl+C to exit)...\n");
2834
+ if (info.platform === "macos") {
2835
+ execSync7(`tail -f ${logPaths.stderr}`, { stdio: "inherit" });
2836
+ } else {
2837
+ execSync7("journalctl --user -u cognova -f", { stdio: "inherit" });
2838
+ }
2839
+ } catch (err) {
2840
+ console.error("Failed to show logs:", err);
2841
+ process.exit(1);
2657
2842
  }
2658
2843
  }
2659
2844
 
2660
2845
  // src/commands/update.ts
2661
- import { execSync as execSync7 } from "child_process";
2846
+ import { execSync as execSync8 } from "child_process";
2662
2847
  import { existsSync as existsSync9, cpSync as cpSync3, rmSync } from "fs";
2663
- import { join as join11 } from "path";
2848
+ import { join as join10 } from "path";
2664
2849
  var import_picocolors7 = __toESM(require_picocolors(), 1);
2665
2850
  var BACKUP_ITEMS = [
2666
2851
  "app",
@@ -2675,22 +2860,22 @@ var BACKUP_ITEMS = [
2675
2860
  "pnpm-lock.yaml"
2676
2861
  ];
2677
2862
  function createBackup(installDir) {
2678
- const backupDir = join11(installDir, ".update-backup");
2863
+ const backupDir = join10(installDir, ".update-backup");
2679
2864
  if (existsSync9(backupDir))
2680
2865
  rmSync(backupDir, { recursive: true });
2681
2866
  for (const item of BACKUP_ITEMS) {
2682
- const src = join11(installDir, item);
2867
+ const src = join10(installDir, item);
2683
2868
  if (!existsSync9(src)) continue;
2684
- const dest = join11(backupDir, item);
2869
+ const dest = join10(backupDir, item);
2685
2870
  cpSync3(src, dest, { recursive: true });
2686
2871
  }
2687
2872
  return backupDir;
2688
2873
  }
2689
2874
  function restoreBackup(installDir, backupDir) {
2690
2875
  for (const item of BACKUP_ITEMS) {
2691
- const src = join11(backupDir, item);
2876
+ const src = join10(backupDir, item);
2692
2877
  if (!existsSync9(src)) continue;
2693
- const dest = join11(installDir, item);
2878
+ const dest = join10(installDir, item);
2694
2879
  if (existsSync9(dest))
2695
2880
  rmSync(dest, { recursive: true });
2696
2881
  cpSync3(src, dest, { recursive: true });
@@ -2712,7 +2897,7 @@ async function update() {
2712
2897
  s.start("Checking for updates");
2713
2898
  let latestVersion;
2714
2899
  try {
2715
- latestVersion = execSync7("npm view cognova version", { encoding: "utf-8" }).trim();
2900
+ latestVersion = execSync8("npm view cognova version", { encoding: "utf-8" }).trim();
2716
2901
  } catch {
2717
2902
  s.stop("Could not check npm registry");
2718
2903
  R2.warn("Unable to check for updates. Rebuilding current version.");
@@ -2730,10 +2915,10 @@ async function update() {
2730
2915
  let updateFailed = false;
2731
2916
  try {
2732
2917
  s.start("Downloading latest version");
2733
- const tmpDir = execSync7("mktemp -d", { encoding: "utf-8" }).trim();
2918
+ const tmpDir = execSync8("mktemp -d", { encoding: "utf-8" }).trim();
2734
2919
  try {
2735
- execSync7(`npm pack cognova@${latestVersion} --pack-destination ${tmpDir}`, { stdio: "pipe" });
2736
- execSync7(`tar -xzf ${tmpDir}/cognova-${latestVersion}.tgz -C ${tmpDir}`, { stdio: "pipe" });
2920
+ execSync8(`npm pack cognova@${latestVersion} --pack-destination ${tmpDir}`, { stdio: "pipe" });
2921
+ execSync8(`tar -xzf ${tmpDir}/cognova-${latestVersion}.tgz -C ${tmpDir}`, { stdio: "pipe" });
2737
2922
  copyAppSource(`${tmpDir}/package`, installDir);
2738
2923
  s.stop("Source files updated");
2739
2924
  } finally {
@@ -2745,10 +2930,10 @@ async function update() {
2745
2930
  const dotenv = loadEnvFile(installDir);
2746
2931
  const envWithDotenv = { ...process.env, ...dotenv };
2747
2932
  s.start("Installing dependencies");
2748
- execSync7("pnpm install", { cwd: installDir, stdio: "pipe" });
2933
+ execSync8("pnpm install", { cwd: installDir, stdio: "pipe" });
2749
2934
  s.stop("Dependencies installed");
2750
2935
  s.start("Running database migrations");
2751
- execSync7("pnpm db:migrate", { cwd: installDir, stdio: "pipe", env: envWithDotenv });
2936
+ execSync8("pnpm db:migrate", { cwd: installDir, stdio: "pipe", env: envWithDotenv });
2752
2937
  s.stop("Migrations complete");
2753
2938
  } catch (err) {
2754
2939
  updateFailed = true;
@@ -2764,7 +2949,7 @@ async function update() {
2764
2949
  rollbackSpinner.start("Restoring previous version");
2765
2950
  try {
2766
2951
  restoreBackup(installDir, backupDir);
2767
- execSync7("pnpm install", { cwd: installDir, stdio: "pipe" });
2952
+ execSync8("pnpm install", { cwd: installDir, stdio: "pipe" });
2768
2953
  rollbackSpinner.stop("Previous version restored");
2769
2954
  R2.info("Your previous installation has been restored.");
2770
2955
  } catch (rollbackErr) {
@@ -2785,19 +2970,19 @@ async function update() {
2785
2970
  }
2786
2971
  s.start("Restarting application");
2787
2972
  try {
2788
- execSync7("pm2 restart cognova", { stdio: "pipe" });
2973
+ restartDaemon(installDir);
2789
2974
  s.stop("Application restarted");
2790
2975
  } catch {
2791
- s.stop("PM2 restart failed \u2014 start manually with `cognova start`");
2976
+ s.stop("Restart failed \u2014 start manually with `cognova start`");
2792
2977
  }
2793
2978
  R2.info(`Run ${import_picocolors7.default.cyan("cognova reset")} to regenerate CLAUDE.md or settings.json.`);
2794
2979
  Le(`Updated to v${latestVersion}`);
2795
2980
  }
2796
2981
 
2797
2982
  // src/commands/doctor.ts
2798
- import { execSync as execSync8 } from "child_process";
2983
+ import { execSync as execSync9 } from "child_process";
2799
2984
  import { existsSync as existsSync10 } from "fs";
2800
- import { join as join12 } from "path";
2985
+ import { join as join11 } from "path";
2801
2986
  var import_picocolors8 = __toESM(require_picocolors(), 1);
2802
2987
  async function doctor() {
2803
2988
  We(import_picocolors8.default.bgCyan(import_picocolors8.default.black(" Cognova Doctor ")));
@@ -2810,61 +2995,61 @@ async function doctor() {
2810
2995
  const checks = [
2811
2996
  {
2812
2997
  name: ".env file",
2813
- check: () => existsSync10(join12(installDir, ".env")),
2998
+ check: () => existsSync10(join11(installDir, ".env")),
2814
2999
  fixDescription: 'Run "cognova reset" to regenerate'
2815
3000
  },
2816
3001
  {
2817
3002
  name: "node_modules",
2818
- check: () => existsSync10(join12(installDir, "node_modules")),
3003
+ check: () => existsSync10(join11(installDir, "node_modules")),
2819
3004
  fix: async () => {
2820
3005
  const s = bt2();
2821
3006
  s.start("Installing dependencies");
2822
- execSync8("pnpm install", { cwd: installDir, stdio: "inherit" });
3007
+ execSync9("pnpm install", { cwd: installDir, stdio: "inherit" });
2823
3008
  s.stop("Dependencies installed");
2824
3009
  },
2825
3010
  fixDescription: "Install dependencies"
2826
3011
  },
2827
3012
  {
2828
3013
  name: "Build output",
2829
- check: () => existsSync10(join12(installDir, ".output", "server", "index.mjs")),
3014
+ check: () => existsSync10(join11(installDir, ".output", "server", "index.mjs")),
2830
3015
  fix: async () => {
2831
3016
  const s = bt2();
2832
3017
  s.start("Building application");
2833
- execSync8("pnpm build", { cwd: installDir, stdio: "inherit" });
3018
+ execSync9("pnpm build", { cwd: installDir, stdio: "inherit" });
2834
3019
  s.stop("Build complete");
2835
3020
  },
2836
3021
  fixDescription: "Build the application"
2837
3022
  },
2838
3023
  {
2839
3024
  name: "~/.claude/CLAUDE.md",
2840
- check: () => existsSync10(join12(claudeDir, "CLAUDE.md")),
3025
+ check: () => existsSync10(join11(claudeDir, "CLAUDE.md")),
2841
3026
  fixDescription: 'Run "cognova reset --claude" to reinstall'
2842
3027
  },
2843
3028
  {
2844
3029
  name: "~/.claude/skills/",
2845
- check: () => existsSync10(join12(claudeDir, "skills")),
3030
+ check: () => existsSync10(join11(claudeDir, "skills")),
2846
3031
  fixDescription: 'Run "cognova reset --claude" to reinstall'
2847
3032
  },
2848
3033
  {
2849
3034
  name: "~/.claude/hooks/",
2850
- check: () => existsSync10(join12(claudeDir, "hooks")),
3035
+ check: () => existsSync10(join11(claudeDir, "hooks")),
2851
3036
  fixDescription: 'Run "cognova reset --claude" to reinstall'
2852
3037
  },
2853
3038
  {
2854
3039
  name: "~/.claude/rules/",
2855
- check: () => existsSync10(join12(claudeDir, "rules")),
3040
+ check: () => existsSync10(join11(claudeDir, "rules")),
2856
3041
  fixDescription: 'Run "cognova reset --claude" to reinstall'
2857
3042
  },
2858
3043
  {
2859
3044
  name: "~/.claude/settings.json",
2860
- check: () => existsSync10(join12(claudeDir, "settings.json")),
3045
+ check: () => existsSync10(join11(claudeDir, "settings.json")),
2861
3046
  fixDescription: 'Run "cognova reset --claude" to reinstall'
2862
3047
  },
2863
3048
  {
2864
3049
  name: "Claude Code CLI",
2865
3050
  check: () => {
2866
3051
  try {
2867
- execSync8("claude --version", { stdio: "pipe" });
3052
+ execSync9("claude --version", { stdio: "pipe" });
2868
3053
  return true;
2869
3054
  } catch {
2870
3055
  return false;
@@ -2876,7 +3061,7 @@ async function doctor() {
2876
3061
  name: "Python 3",
2877
3062
  check: () => {
2878
3063
  try {
2879
- execSync8("python3 --version", { stdio: "pipe" });
3064
+ execSync9("python3 --version", { stdio: "pipe" });
2880
3065
  return true;
2881
3066
  } catch {
2882
3067
  return false;
@@ -2888,7 +3073,7 @@ async function doctor() {
2888
3073
  name: "Docker daemon",
2889
3074
  check: () => {
2890
3075
  try {
2891
- execSync8("docker info", { stdio: "pipe" });
3076
+ execSync9("docker info", { stdio: "pipe" });
2892
3077
  return true;
2893
3078
  } catch {
2894
3079
  return false;
@@ -2899,10 +3084,10 @@ async function doctor() {
2899
3084
  s.start("Starting Docker daemon");
2900
3085
  try {
2901
3086
  if (process.platform === "darwin") {
2902
- execSync8("open -a Docker", { stdio: "pipe" });
3087
+ execSync9("open -a Docker", { stdio: "pipe" });
2903
3088
  R2.info("Docker Desktop is starting - this may take a moment");
2904
3089
  } else if (process.platform === "linux") {
2905
- execSync8("sudo systemctl start docker", { stdio: "inherit" });
3090
+ execSync9("sudo systemctl start docker", { stdio: "inherit" });
2906
3091
  }
2907
3092
  s.stop("Docker daemon start command issued");
2908
3093
  } catch (err) {
@@ -2913,36 +3098,34 @@ async function doctor() {
2913
3098
  fixDescription: "Start Docker daemon"
2914
3099
  },
2915
3100
  {
2916
- name: "PM2 process",
3101
+ name: "Service status",
2917
3102
  check: () => {
2918
3103
  try {
2919
- const out = execSync8("pm2 jlist", { encoding: "utf-8" });
2920
- const procs = JSON.parse(out);
2921
- return procs.some(
2922
- (proc) => proc.name === "cognova" && proc.pm2_env?.status === "online"
2923
- );
3104
+ const status2 = getDaemonStatus(installDir);
3105
+ return status2 === "running";
2924
3106
  } catch {
2925
3107
  return false;
2926
3108
  }
2927
3109
  },
2928
3110
  fix: async () => {
3111
+ const info = getDaemonInfo(installDir);
2929
3112
  const s = bt2();
2930
- s.start("Starting PM2 process");
3113
+ s.start(`Starting ${info.platform === "macos" ? "launchd" : "systemd"} service`);
2931
3114
  try {
2932
- execSync8("pm2 start ecosystem.config.cjs", { cwd: installDir, stdio: "inherit" });
2933
- s.stop("PM2 process started");
3115
+ startDaemon(installDir);
3116
+ s.stop("Service started");
2934
3117
  } catch (err) {
2935
- s.stop("Failed to start PM2");
3118
+ s.stop("Failed to start service");
2936
3119
  throw err;
2937
3120
  }
2938
3121
  },
2939
- fixDescription: "Start the PM2 process"
3122
+ fixDescription: 'Start the service with "cognova start"'
2940
3123
  },
2941
3124
  {
2942
3125
  name: "App health endpoint",
2943
3126
  check: () => {
2944
3127
  try {
2945
- const result = execSync8("curl -sf http://localhost:3000/api/health", { encoding: "utf-8" });
3128
+ const result = execSync9("curl -sf http://localhost:3000/api/health", { encoding: "utf-8" });
2946
3129
  const data = JSON.parse(result);
2947
3130
  return data.status === "ok";
2948
3131
  } catch {
@@ -2954,7 +3137,7 @@ async function doctor() {
2954
3137
  name: "Database connection",
2955
3138
  check: () => {
2956
3139
  try {
2957
- const result = execSync8("curl -sf http://localhost:3000/api/health", { encoding: "utf-8" });
3140
+ const result = execSync9("curl -sf http://localhost:3000/api/health", { encoding: "utf-8" });
2958
3141
  const data = JSON.parse(result);
2959
3142
  return data.database?.available === true;
2960
3143
  } catch {
@@ -2974,7 +3157,7 @@ async function doctor() {
2974
3157
  check: () => {
2975
3158
  if (!metadata) return "unknown";
2976
3159
  try {
2977
- const latest = execSync8("npm view cognova version", { encoding: "utf-8" }).trim();
3160
+ const latest = execSync9("npm view cognova version", { encoding: "utf-8" }).trim();
2978
3161
  return latest === metadata.version ? true : `outdated (${metadata.version} \u2192 ${latest})`;
2979
3162
  } catch {
2980
3163
  return "could not check";
@@ -3102,9 +3285,11 @@ var HELP_TEXT = `
3102
3285
 
3103
3286
  Commands:
3104
3287
  init Interactive setup wizard
3105
- start Start Cognova (PM2)
3288
+ start Start Cognova
3106
3289
  stop Stop Cognova
3107
3290
  restart Restart Cognova
3291
+ status Check service status
3292
+ logs View application logs
3108
3293
  update Update to latest version
3109
3294
  doctor Check health of all components
3110
3295
  reset Re-generate configuration files
@@ -3127,14 +3312,14 @@ var COMMAND_HELP = {
3127
3312
  5. Configures database (local Docker or remote PostgreSQL)
3128
3313
  6. Sets network access mode
3129
3314
  7. Creates admin credentials
3130
- 8. Installs dependencies, builds, and starts with PM2
3315
+ 8. Installs dependencies, builds, and starts as system service
3131
3316
 
3132
3317
  Usage: cognova init
3133
3318
  `,
3134
3319
  start: `
3135
3320
  cognova start \u2014 Start Cognova
3136
3321
 
3137
- Starts the application using PM2 process manager.
3322
+ Starts the application as a system service (launchd on macOS, systemd on Linux).
3138
3323
  Requires a prior 'cognova init' to have been run.
3139
3324
 
3140
3325
  Usage: cognova start
@@ -3142,22 +3327,37 @@ var COMMAND_HELP = {
3142
3327
  stop: `
3143
3328
  cognova stop \u2014 Stop Cognova
3144
3329
 
3145
- Stops the PM2 process. Data and configuration are preserved.
3330
+ Stops the service. Data and configuration are preserved.
3146
3331
 
3147
3332
  Usage: cognova stop
3148
3333
  `,
3149
3334
  restart: `
3150
3335
  cognova restart \u2014 Restart Cognova
3151
3336
 
3152
- Restarts the PM2 process. Useful after manual config changes.
3337
+ Restarts the service. Useful after manual config changes.
3153
3338
 
3154
3339
  Usage: cognova restart
3340
+ `,
3341
+ status: `
3342
+ cognova status \u2014 Check service status
3343
+
3344
+ Shows whether Cognova is running and service configuration details.
3345
+
3346
+ Usage: cognova status
3347
+ `,
3348
+ logs: `
3349
+ cognova logs \u2014 View application logs
3350
+
3351
+ Streams application logs in real-time (stderr).
3352
+ Press Ctrl+C to exit.
3353
+
3354
+ Usage: cognova logs
3155
3355
  `,
3156
3356
  update: `
3157
3357
  cognova update \u2014 Update to latest version
3158
3358
 
3159
3359
  Checks npm registry for a newer version, downloads and installs it.
3160
- Preserves: .env, .api-token, ecosystem.config.cjs, logs/
3360
+ Preserves: .env, .api-token, service config, logs/
3161
3361
  Runs database migrations and rebuilds automatically.
3162
3362
  Creates a backup before updating so failed updates can be rolled back.
3163
3363
 
@@ -3170,7 +3370,7 @@ var COMMAND_HELP = {
3170
3370
  - Configuration files (.env, Claude config)
3171
3371
  - Dependencies (Node, Python, Claude Code CLI)
3172
3372
  - Build output
3173
- - PM2 process status
3373
+ - Service status (launchd/systemd)
3174
3374
  - App health endpoint
3175
3375
  - Database connection
3176
3376
  - Vault directory
@@ -3209,6 +3409,8 @@ var commands = {
3209
3409
  start,
3210
3410
  stop,
3211
3411
  restart,
3412
+ status,
3413
+ logs,
3212
3414
  update,
3213
3415
  doctor,
3214
3416
  reset