@agenticmail/enterprise 0.5.324 → 0.5.326

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 (449) hide show
  1. package/dist/{agent-heartbeat-77N4OOQL.js → agent-heartbeat-ZFKA6GMI.js} +2 -2
  2. package/dist/{agent-tools-BNSTIK4P.js → agent-tools-R6RSBDJQ.js} +25 -25
  3. package/dist/{agenticmail-EDO5XOTP.js → agenticmail-QMWQNUY2.js} +1 -1
  4. package/dist/{browser-tool-JF3LNRGX.js → browser-tool-4KWE37RL.js} +4 -4
  5. package/dist/{chunk-JEGYVXYC.js → chunk-CQV7GGHT.js} +1 -1
  6. package/dist/{chunk-CQYLRIQ3.js → chunk-DWHJYAV6.js} +143 -26
  7. package/dist/{chunk-HKCKMCPY.js → chunk-G4YSECQ4.js} +2 -2
  8. package/dist/{chunk-DM7FTF7W.js → chunk-GNABVGDZ.js} +31 -32
  9. package/dist/{chunk-DMD24UFZ.js → chunk-HTT6LUPP.js} +19 -19
  10. package/dist/{chunk-3FMK32KQ.js → chunk-LHQP7QRX.js} +9 -9
  11. package/dist/{chunk-6C5PKREN.js → chunk-NOAQG5CY.js} +1 -1
  12. package/dist/{chunk-4EKXYIJF.js → chunk-PAHT4ABL.js} +4 -4
  13. package/dist/{chunk-JNMDD7JY.js → chunk-RHO7WRVJ.js} +5 -5
  14. package/dist/{chunk-BQM7MBPS.js → chunk-WYDVMFGJ.js} +5 -5
  15. package/dist/{chunk-TPLVQFXM.js → chunk-X2YL6KSY.js} +13 -13
  16. package/dist/{cli-agent-USMKX7WN.js → cli-agent-2NBPF3GN.js} +11 -11
  17. package/dist/{cli-recover-XEZ2SKPU.js → cli-recover-TTOR7CJR.js} +2 -2
  18. package/dist/{cli-serve-BDGOOOKQ.js → cli-serve-5VFU4GR4.js} +3 -3
  19. package/dist/{cli-verify-CZIITRED.js → cli-verify-WICBVLAM.js} +2 -2
  20. package/dist/cli.js +5 -5
  21. package/dist/{connection-manager-KAWEUWUR.js → connection-manager-Y7CCQK4X.js} +1 -1
  22. package/dist/dashboard/docs/cluster.html +285 -0
  23. package/dist/dashboard/pages/cluster.js +400 -69
  24. package/dist/{deployer-3YK4RPUL.js → deployer-7NG7LCJW.js} +1 -1
  25. package/dist/{factory-JFWXTAWK.js → factory-4V2W4BSV.js} +1 -1
  26. package/dist/index.js +9 -9
  27. package/dist/{integrations-TF4EBCJ7.js → integrations-V2WXFDIV.js} +13 -13
  28. package/dist/{local-6MLIZDKO.js → local-OXFH4V7E.js} +2 -2
  29. package/dist/{meeting-voice-intelligence-CJLR52YV.js → meeting-voice-intelligence-RZZCAD6G.js} +2 -2
  30. package/dist/{meetings-FJ453ENF.js → meetings-SQNTB6GD.js} +1 -1
  31. package/dist/{microsoft-2IIHDLJB.js → microsoft-2PDVV6HX.js} +3 -3
  32. package/dist/{postgres-WGUVC2S7.js → postgres-USXBPTHX.js} +2 -2
  33. package/dist/{pw-ai-IBEF6HBF.js → pw-ai-NK5GKBDG.js} +1 -1
  34. package/dist/{routes-XYR2RNEC.js → routes-T3CDAQTD.js} +4 -4
  35. package/dist/{runtime-6BULDBR3.js → runtime-X4BTVICL.js} +1 -1
  36. package/dist/{server-7NT4LMSQ.js → server-WQ6LLYGB.js} +5 -5
  37. package/dist/{setup-2JBXMUDS.js → setup-6DRKSOMH.js} +2 -2
  38. package/dist/{skills-FR7I5V7H.js → skills-EL4RTJKK.js} +1 -1
  39. package/logs/cloudflared-error.log +14 -0
  40. package/logs/enterprise-out.log +2 -0
  41. package/package.json +1 -1
  42. package/src/admin/routes.ts +1 -1
  43. package/src/agent-tools/tool-resolver.ts +1 -1
  44. package/src/agent-tools/tools/agenticmail.ts +2 -2
  45. package/src/agent-tools/tools/browser.ts +1 -1
  46. package/src/agent-tools/tools/enterprise-code-sandbox.ts +1 -1
  47. package/src/agent-tools/tools/enterprise-diff.ts +1 -1
  48. package/src/agent-tools/tools/enterprise-http.ts +1 -3
  49. package/src/agent-tools/tools/enterprise-security-scan.ts +1 -1
  50. package/src/agent-tools/tools/google/forms.ts +2 -2
  51. package/src/agent-tools/tools/google/gmail.ts +1 -1
  52. package/src/agent-tools/tools/google/maps.ts +2 -2
  53. package/src/agent-tools/tools/google/meeting-voice.ts +1 -1
  54. package/src/agent-tools/tools/google/meetings.ts +1 -1
  55. package/src/agent-tools/tools/google/slides.ts +2 -2
  56. package/src/agent-tools/tools/grep.ts +1 -1
  57. package/src/agent-tools/tools/knowledge-search.ts +1 -1
  58. package/src/agent-tools/tools/local/coding.ts +5 -5
  59. package/src/agent-tools/tools/microsoft/excel-vba.ts +1 -1
  60. package/src/agent-tools/tools/microsoft/excel.ts +1 -1
  61. package/src/agent-tools/tools/microsoft/powerpoint.ts +1 -1
  62. package/src/agent-tools/tools/visual-memory/index.ts +11 -11
  63. package/src/agent-tools/tools/visual-memory/similarity.ts +2 -2
  64. package/src/agent-tools/tools/visual-memory/storage.ts +1 -1
  65. package/src/agenticmail/providers/imap.ts +2 -2
  66. package/src/browser/enterprise-compat.ts +1 -1
  67. package/src/cli-agent.ts +3 -3
  68. package/src/cli-serve.ts +1 -1
  69. package/src/dashboard/docs/cluster.html +285 -0
  70. package/src/dashboard/pages/cluster.js +400 -69
  71. package/src/database-access/connection-manager.ts +6 -6
  72. package/src/database-access/routes.ts +0 -1
  73. package/src/db/dynamodb.ts +1 -1
  74. package/src/db/postgres.ts +2 -2
  75. package/src/deploy/fly.ts +4 -4
  76. package/src/deploy/managed.ts +0 -1
  77. package/src/engine/agent-config.ts +1 -1
  78. package/src/engine/agent-heartbeat.ts +1 -1
  79. package/src/engine/agent-hierarchy.ts +1 -1
  80. package/src/engine/agent-memory.ts +1 -1
  81. package/src/engine/agent-routes.ts +2 -2
  82. package/src/engine/chat-poller.ts +1 -1
  83. package/src/engine/cluster.ts +14 -1
  84. package/src/engine/community-registry.ts +2 -2
  85. package/src/engine/db-adapter.ts +0 -1
  86. package/src/engine/deployer.ts +8 -8
  87. package/src/engine/email-poller.ts +1 -1
  88. package/src/engine/knowledge-contribution.ts +1 -1
  89. package/src/engine/knowledge-import/import-manager.ts +2 -3
  90. package/src/engine/knowledge-import/processors/extract-github.ts +1 -1
  91. package/src/engine/knowledge-import/processors/extract-sharepoint.ts +1 -1
  92. package/src/engine/knowledge-import/processors/validate.ts +1 -1
  93. package/src/engine/lifecycle.ts +1 -1
  94. package/src/engine/meeting-monitor.ts +2 -2
  95. package/src/engine/meeting-voice-intelligence.ts +3 -3
  96. package/src/engine/messaging-poller.ts +2 -2
  97. package/src/engine/org-integration-routes.ts +2 -2
  98. package/src/engine/org-integrations.ts +1 -1
  99. package/src/engine/routes.ts +119 -1
  100. package/src/engine/skills.ts +1 -1
  101. package/src/engine/tool-catalog.ts +1 -1
  102. package/src/engine/vault-routes.ts +1 -1
  103. package/src/engine/vault.ts +1 -1
  104. package/src/mcp/adapters/adp.adapter.ts +1 -1
  105. package/src/mcp/adapters/auth0.adapter.ts +1 -1
  106. package/src/mcp/adapters/clickup.adapter.ts +1 -1
  107. package/src/mcp/adapters/close.adapter.ts +1 -1
  108. package/src/mcp/adapters/firebase.adapter.ts +1 -1
  109. package/src/mcp/adapters/google-ads.adapter.ts +1 -1
  110. package/src/mcp/adapters/kubernetes.adapter.ts +1 -1
  111. package/src/mcp/adapters/mixpanel.adapter.ts +1 -1
  112. package/src/mcp/adapters/recurly.adapter.ts +1 -1
  113. package/src/mcp/adapters/sap.adapter.ts +2 -2
  114. package/src/mcp/adapters/shortcut.adapter.ts +1 -1
  115. package/src/mcp/adapters/snowflake.adapter.ts +1 -1
  116. package/src/mcp/adapters/stripe.adapter.ts +1 -1
  117. package/src/mcp/adapters/supabase.adapter.ts +1 -1
  118. package/src/mcp/adapters/zuora.adapter.ts +1 -1
  119. package/src/middleware/request-limits.ts +1 -1
  120. package/src/runtime/agent-loop.ts +3 -3
  121. package/src/runtime/compaction.ts +2 -2
  122. package/src/runtime/followup.ts +1 -1
  123. package/src/runtime/hooks.ts +3 -3
  124. package/src/runtime/index.ts +5 -6
  125. package/src/runtime/llm-client.ts +1 -1
  126. package/src/runtime/subagent.ts +0 -1
  127. package/src/runtime/types.ts +2 -0
  128. package/src/security/brute-force.ts +1 -1
  129. package/src/security/csp.ts +1 -1
  130. package/src/security/index.ts +3 -3
  131. package/src/security/input-sanitizer.ts +1 -1
  132. package/src/security/threat-logger.ts +2 -2
  133. package/src/server.ts +2 -2
  134. package/src/setup/database.ts +1 -1
  135. package/src/setup/index.ts +1 -2
  136. package/src/setup/provision.ts +1 -1
  137. package/dist/_seed-data-FQR5PY2W.js +0 -4554
  138. package/dist/agent-heartbeat-3FWNHZFX.js +0 -510
  139. package/dist/agent-heartbeat-4RWHZR7H.js +0 -510
  140. package/dist/agent-heartbeat-6ZGB5ILY.js +0 -510
  141. package/dist/agent-heartbeat-BBINFNL4.js +0 -510
  142. package/dist/agent-heartbeat-BIVHLKFM.js +0 -510
  143. package/dist/agent-heartbeat-HGVIAHS5.js +0 -510
  144. package/dist/agent-heartbeat-HRKVFK2T.js +0 -510
  145. package/dist/agent-heartbeat-JC5GWVXD.js +0 -510
  146. package/dist/agent-heartbeat-K6A4HMHB.js +0 -510
  147. package/dist/agent-heartbeat-LCDXWFVB.js +0 -510
  148. package/dist/agent-heartbeat-P7HZCZAQ.js +0 -510
  149. package/dist/agent-heartbeat-PUIRSNIO.js +0 -510
  150. package/dist/agent-heartbeat-SN5ILQ6Y.js +0 -510
  151. package/dist/agent-heartbeat-TW5YTDYC.js +0 -510
  152. package/dist/agent-heartbeat-YCSWP54H.js +0 -510
  153. package/dist/agent-heartbeat-Z2QQXROL.js +0 -510
  154. package/dist/agent-tools-3W7XLUYA.js +0 -13949
  155. package/dist/agent-tools-54VZGT6L.js +0 -9
  156. package/dist/agent-tools-AYYDPO27.js +0 -13949
  157. package/dist/agent-tools-F2X47FKF.js +0 -13949
  158. package/dist/agent-tools-O6W3QAZL.js +0 -13949
  159. package/dist/agent-tools-OAWVZBMW.js +0 -9
  160. package/dist/agent-tools-QCCU74PN.js +0 -13949
  161. package/dist/agent-tools-QGE26U6R.js +0 -9
  162. package/dist/chunk-2LHUARN6.js +0 -4929
  163. package/dist/chunk-2WVCNCYC.js +0 -5087
  164. package/dist/chunk-3FM6YQUK.js +0 -5087
  165. package/dist/chunk-46GOWZT4.js +0 -5087
  166. package/dist/chunk-5KYJAUZV.js +0 -1519
  167. package/dist/chunk-6ZMLNEHB.js +0 -1519
  168. package/dist/chunk-7HBGXW7Z.js +0 -4929
  169. package/dist/chunk-7UCKD25B.js +0 -551
  170. package/dist/chunk-BDCFOP7O.js +0 -537
  171. package/dist/chunk-BPZQT5N5.js +0 -25652
  172. package/dist/chunk-C52OQNNY.js +0 -5087
  173. package/dist/chunk-C7HGQF4Y.js +0 -25652
  174. package/dist/chunk-CAHNZGGK.js +0 -25656
  175. package/dist/chunk-CK7R6UHE.js +0 -4945
  176. package/dist/chunk-D36RPWB7.js +0 -25652
  177. package/dist/chunk-DJK2UPFH.js +0 -4891
  178. package/dist/chunk-DXZGPUAF.js +0 -5087
  179. package/dist/chunk-F46WB5IL.js +0 -5087
  180. package/dist/chunk-F5QG5SQH.js +0 -5087
  181. package/dist/chunk-GYB2WHMN.js +0 -5101
  182. package/dist/chunk-H7GP733U.js +0 -5087
  183. package/dist/chunk-HHBXWB5U.js +0 -25640
  184. package/dist/chunk-HS5YWSGM.js +0 -3206
  185. package/dist/chunk-IMXS4N6W.js +0 -1519
  186. package/dist/chunk-JTV5LA47.js +0 -1519
  187. package/dist/chunk-KN3T3CTD.js +0 -4929
  188. package/dist/chunk-KV6G7NZX.js +0 -1519
  189. package/dist/chunk-M6ZIC5H3.js +0 -1370
  190. package/dist/chunk-MU5MEBIK.js +0 -1519
  191. package/dist/chunk-NLT5MC7X.js +0 -465
  192. package/dist/chunk-NVLYIM4J.js +0 -4945
  193. package/dist/chunk-NZY2BIZH.js +0 -4891
  194. package/dist/chunk-O42L6G67.js +0 -1519
  195. package/dist/chunk-OCNERGGM.js +0 -4891
  196. package/dist/chunk-OJSNHONE.js +0 -1519
  197. package/dist/chunk-OWTLNV4Q.js +0 -25623
  198. package/dist/chunk-PCNYEP6T.js +0 -4891
  199. package/dist/chunk-PI4AQ4Z6.js +0 -25652
  200. package/dist/chunk-PN3EGTCA.js +0 -194
  201. package/dist/chunk-PWWV2U5P.js +0 -195
  202. package/dist/chunk-Q37UKNRC.js +0 -1519
  203. package/dist/chunk-QXTC6J7H.js +0 -5087
  204. package/dist/chunk-RF2LGX3E.js +0 -1519
  205. package/dist/chunk-RH7KPWRQ.js +0 -465
  206. package/dist/chunk-RKERL5LZ.js +0 -4925
  207. package/dist/chunk-RVBK2IOX.js +0 -25652
  208. package/dist/chunk-SAKODCZ5.js +0 -4891
  209. package/dist/chunk-SALGFC5L.js +0 -4945
  210. package/dist/chunk-STGWZ2MS.js +0 -1519
  211. package/dist/chunk-SVSLIQYN.js +0 -1519
  212. package/dist/chunk-UY3ZVQDP.js +0 -25652
  213. package/dist/chunk-V6OSD62M.js +0 -5087
  214. package/dist/chunk-VP6YAHX4.js +0 -1519
  215. package/dist/chunk-WDYJOEAI.js +0 -5087
  216. package/dist/chunk-WEAFQNOS.js +0 -195
  217. package/dist/chunk-XKUSAZGP.js +0 -5087
  218. package/dist/chunk-YCWOCIPH.js +0 -5101
  219. package/dist/chunk-ZGE3XAXY.js +0 -1519
  220. package/dist/cli-agent-33GWIF2D.js +0 -2300
  221. package/dist/cli-agent-4XK6LVQQ.js +0 -2357
  222. package/dist/cli-agent-64EOV3ST.js +0 -2300
  223. package/dist/cli-agent-67WP6KKO.js +0 -2300
  224. package/dist/cli-agent-7RW5Y7C4.js +0 -2294
  225. package/dist/cli-agent-7TB2BWS6.js +0 -2370
  226. package/dist/cli-agent-AKXFFST2.js +0 -2370
  227. package/dist/cli-agent-C3YSECO4.js +0 -2344
  228. package/dist/cli-agent-DZTKLITB.js +0 -2357
  229. package/dist/cli-agent-FNMDJN7T.js +0 -2357
  230. package/dist/cli-agent-FOF7PFEP.js +0 -2357
  231. package/dist/cli-agent-FXZ6DJKP.js +0 -2357
  232. package/dist/cli-agent-H74M2ZYN.js +0 -2357
  233. package/dist/cli-agent-HG4Y657I.js +0 -2300
  234. package/dist/cli-agent-HORWVPHB.js +0 -2370
  235. package/dist/cli-agent-HSZT6SKF.js +0 -2423
  236. package/dist/cli-agent-ION2W5JF.js +0 -2441
  237. package/dist/cli-agent-JLUQ4ZU6.js +0 -2424
  238. package/dist/cli-agent-KBPWY3CB.js +0 -2302
  239. package/dist/cli-agent-MVCDH4HV.js +0 -2370
  240. package/dist/cli-agent-NZXOEPJ2.js +0 -2357
  241. package/dist/cli-agent-OO6H57UQ.js +0 -2300
  242. package/dist/cli-agent-PADN3QRC.js +0 -2357
  243. package/dist/cli-agent-QAYEX3BE.js +0 -2441
  244. package/dist/cli-agent-QT64DT5J.js +0 -2370
  245. package/dist/cli-agent-TCTRKCHN.js +0 -2300
  246. package/dist/cli-agent-TFL2M6UK.js +0 -2424
  247. package/dist/cli-agent-TSOJG7EX.js +0 -2357
  248. package/dist/cli-agent-UIKXATTD.js +0 -2357
  249. package/dist/cli-agent-UJN6FYTO.js +0 -2370
  250. package/dist/cli-agent-VIQAYVY4.js +0 -2357
  251. package/dist/cli-agent-WNWFVOFM.js +0 -2370
  252. package/dist/cli-agent-XBQX67VJ.js +0 -2423
  253. package/dist/cli-agent-ZLSC6FF4.js +0 -2357
  254. package/dist/cli-agent-ZSHUPBBN.js +0 -2357
  255. package/dist/cli-recover-T32NABFA.js +0 -487
  256. package/dist/cli-serve-2IL5DTEY.js +0 -153
  257. package/dist/cli-serve-3NGBX5ER.js +0 -140
  258. package/dist/cli-serve-47N5UKKW.js +0 -153
  259. package/dist/cli-serve-4RS4UDHC.js +0 -140
  260. package/dist/cli-serve-4XGZFUV2.js +0 -140
  261. package/dist/cli-serve-53FVANQK.js +0 -260
  262. package/dist/cli-serve-57225XWV.js +0 -140
  263. package/dist/cli-serve-63BDPSOP.js +0 -140
  264. package/dist/cli-serve-657NRUOX.js +0 -140
  265. package/dist/cli-serve-6ER7QMLR.js +0 -140
  266. package/dist/cli-serve-6OT3UEAN.js +0 -140
  267. package/dist/cli-serve-7JQ4FVUQ.js +0 -260
  268. package/dist/cli-serve-7L6EY5UH.js +0 -153
  269. package/dist/cli-serve-BFNIW2LF.js +0 -153
  270. package/dist/cli-serve-C7MN6U5Q.js +0 -153
  271. package/dist/cli-serve-CQFI3LMK.js +0 -140
  272. package/dist/cli-serve-CR3OY3IM.js +0 -153
  273. package/dist/cli-serve-DAJFRWQ7.js +0 -153
  274. package/dist/cli-serve-DTQLN5UI.js +0 -140
  275. package/dist/cli-serve-EQS2SGT3.js +0 -140
  276. package/dist/cli-serve-FW6FHFW4.js +0 -153
  277. package/dist/cli-serve-GEEOQS77.js +0 -153
  278. package/dist/cli-serve-H562I3ZK.js +0 -153
  279. package/dist/cli-serve-HDQZF4C4.js +0 -153
  280. package/dist/cli-serve-KBJNXWYJ.js +0 -140
  281. package/dist/cli-serve-LICAOMEB.js +0 -140
  282. package/dist/cli-serve-LLGYLWFS.js +0 -153
  283. package/dist/cli-serve-LMZKQ5GX.js +0 -140
  284. package/dist/cli-serve-LNTT73P2.js +0 -140
  285. package/dist/cli-serve-MQKBUZ7X.js +0 -140
  286. package/dist/cli-serve-N3OISDNB.js +0 -153
  287. package/dist/cli-serve-NBFT7B42.js +0 -140
  288. package/dist/cli-serve-RTWO3AWY.js +0 -140
  289. package/dist/cli-serve-SIHTSW5P.js +0 -140
  290. package/dist/cli-serve-SP6TEURE.js +0 -140
  291. package/dist/cli-serve-TDKZA6I5.js +0 -140
  292. package/dist/cli-serve-TF5ZVVXF.js +0 -140
  293. package/dist/cli-serve-TIZ27EVR.js +0 -153
  294. package/dist/cli-serve-TUNI2RCN.js +0 -153
  295. package/dist/cli-serve-WCU66CHX.js +0 -140
  296. package/dist/cli-serve-WNOZMAWD.js +0 -153
  297. package/dist/cli-serve-YCCKRRUY.js +0 -140
  298. package/dist/cli-serve-ZD5V7I6G.js +0 -140
  299. package/dist/cli-validate-6XDDLVVQ.js +0 -150
  300. package/dist/cli-verify-I4WGRQNT.js +0 -149
  301. package/dist/connection-manager-4ZA4XAFA.js +0 -9
  302. package/dist/db-adapter-IK2EDK2N.js +0 -7
  303. package/dist/db-adapter-IRHOUMVC.js +0 -7
  304. package/dist/dependency-manager-G6D2XXNY.js +0 -11
  305. package/dist/dependency-manager-OCUKF72T.js +0 -543
  306. package/dist/dependency-manager-YULUXN34.js +0 -511
  307. package/dist/factory-MQASIPEB.js +0 -11
  308. package/dist/google-W5AYGNUJ.js +0 -33
  309. package/dist/integrations-VWANOHQ4.js +0 -43830
  310. package/dist/local-O2FN57UN.js +0 -1128
  311. package/dist/local-S7SDOQHN.js +0 -1128
  312. package/dist/microsoft-HPLA5ZL5.js +0 -2414
  313. package/dist/microsoft-UFLZBEAC.js +0 -1619
  314. package/dist/microsoft-VREAZ7M2.js +0 -3955
  315. package/dist/microsoft-YUT6EIGP.js +0 -3400
  316. package/dist/postgres-BOTHOPDW.js +0 -875
  317. package/dist/routes-3MMLQTB6.js +0 -90
  318. package/dist/routes-4ZUIJ4HE.js +0 -90
  319. package/dist/routes-5MXHKKH4.js +0 -90
  320. package/dist/routes-64NJFK3B.js +0 -90
  321. package/dist/routes-6AKQ2LBV.js +0 -90
  322. package/dist/routes-CRRBUDO4.js +0 -90
  323. package/dist/routes-D7SMYOLT.js +0 -90
  324. package/dist/routes-DIAF3MC3.js +0 -90
  325. package/dist/routes-KMUNU6CY.js +0 -90
  326. package/dist/routes-LRRLXIZR.js +0 -90
  327. package/dist/routes-N647AJYG.js +0 -90
  328. package/dist/routes-SSSELAAR.js +0 -90
  329. package/dist/routes-STERVGKJ.js +0 -90
  330. package/dist/routes-TZMPYLHJ.js +0 -90
  331. package/dist/routes-XNK2MAVO.js +0 -90
  332. package/dist/routes-ZEZZACZP.js +0 -90
  333. package/dist/runtime-4UVCTFNQ.js +0 -45
  334. package/dist/runtime-5EQN4GFM.js +0 -45
  335. package/dist/runtime-5LP7PUD4.js +0 -45
  336. package/dist/runtime-6YEENDN3.js +0 -45
  337. package/dist/runtime-7LQFRG3B.js +0 -45
  338. package/dist/runtime-AMXJU2MB.js +0 -45
  339. package/dist/runtime-D6WSE7FG.js +0 -45
  340. package/dist/runtime-EYVN7NFJ.js +0 -45
  341. package/dist/runtime-F6RPWQVW.js +0 -45
  342. package/dist/runtime-FYMJURFC.js +0 -45
  343. package/dist/runtime-GGF4P55M.js +0 -45
  344. package/dist/runtime-H3SAMWWF.js +0 -45
  345. package/dist/runtime-H7T4I7I7.js +0 -45
  346. package/dist/runtime-HTIM7GZR.js +0 -45
  347. package/dist/runtime-JRNBL4O4.js +0 -45
  348. package/dist/runtime-K4C7NQLW.js +0 -45
  349. package/dist/runtime-MWWZCPC2.js +0 -45
  350. package/dist/runtime-N7CM2DYA.js +0 -45
  351. package/dist/runtime-OM2NIBMI.js +0 -45
  352. package/dist/runtime-OVGSOTAH.js +0 -45
  353. package/dist/runtime-QQ6LAY4U.js +0 -45
  354. package/dist/runtime-QWPVD7CY.js +0 -45
  355. package/dist/runtime-SX3B5MG3.js +0 -45
  356. package/dist/runtime-YLIIPTE4.js +0 -45
  357. package/dist/runtime-YU6P22CG.js +0 -45
  358. package/dist/runtime-ZOC337DD.js +0 -45
  359. package/dist/server-3AVWBRIF.js +0 -28
  360. package/dist/server-5BKJI5OW.js +0 -28
  361. package/dist/server-6NDO2S52.js +0 -28
  362. package/dist/server-7TD3M2BW.js +0 -28
  363. package/dist/server-AMCSXINC.js +0 -28
  364. package/dist/server-BEJ6RAGL.js +0 -28
  365. package/dist/server-BFPYDHBG.js +0 -28
  366. package/dist/server-BKEWXGVX.js +0 -28
  367. package/dist/server-BMEJZGFG.js +0 -28
  368. package/dist/server-CU6LVQS4.js +0 -28
  369. package/dist/server-DFR7FI3Q.js +0 -28
  370. package/dist/server-DFYGH2CV.js +0 -28
  371. package/dist/server-DURRN3GJ.js +0 -28
  372. package/dist/server-EELWOC3X.js +0 -28
  373. package/dist/server-EN5E2OWQ.js +0 -28
  374. package/dist/server-EXZC3OJO.js +0 -28
  375. package/dist/server-GW2HYJYI.js +0 -28
  376. package/dist/server-J25NCRWJ.js +0 -28
  377. package/dist/server-JDGNOTFV.js +0 -28
  378. package/dist/server-KA6U3YNP.js +0 -28
  379. package/dist/server-L52A2ME4.js +0 -28
  380. package/dist/server-NE5HD5DJ.js +0 -28
  381. package/dist/server-NLQAXPOG.js +0 -28
  382. package/dist/server-NQOT7W77.js +0 -28
  383. package/dist/server-OHHAA34U.js +0 -28
  384. package/dist/server-PWE5PQTR.js +0 -28
  385. package/dist/server-Q2Q32H2B.js +0 -28
  386. package/dist/server-Q77ME7TL.js +0 -28
  387. package/dist/server-QDKO6OVO.js +0 -28
  388. package/dist/server-RR6QJIXM.js +0 -28
  389. package/dist/server-T3R6BO6A.js +0 -28
  390. package/dist/server-TRIBAHDV.js +0 -28
  391. package/dist/server-TXV3ZVVR.js +0 -28
  392. package/dist/server-VHSFJP3I.js +0 -28
  393. package/dist/server-VOJF2XGU.js +0 -28
  394. package/dist/server-W76YHPEC.js +0 -28
  395. package/dist/server-WLLH4WST.js +0 -28
  396. package/dist/server-WTUJ2O3F.js +0 -28
  397. package/dist/server-X4CJTHHF.js +0 -28
  398. package/dist/server-XK3ILCJC.js +0 -28
  399. package/dist/server-ZRD3NDJE.js +0 -28
  400. package/dist/setup-2JYXGTW6.js +0 -20
  401. package/dist/setup-3XOSZEW5.js +0 -20
  402. package/dist/setup-44VBAO4J.js +0 -20
  403. package/dist/setup-4OA7QNJW.js +0 -20
  404. package/dist/setup-4ONNQBWB.js +0 -20
  405. package/dist/setup-4OSBXSCL.js +0 -20
  406. package/dist/setup-4QFGRBLZ.js +0 -20
  407. package/dist/setup-52US54Z4.js +0 -20
  408. package/dist/setup-5CY3CKKT.js +0 -20
  409. package/dist/setup-6766SGAR.js +0 -20
  410. package/dist/setup-6NUSB4XO.js +0 -20
  411. package/dist/setup-7FZJEOD4.js +0 -20
  412. package/dist/setup-7LYYXBUL.js +0 -20
  413. package/dist/setup-ADSKKBGV.js +0 -20
  414. package/dist/setup-AMV2WKVH.js +0 -20
  415. package/dist/setup-AYY24DKM.js +0 -20
  416. package/dist/setup-B34N4HPU.js +0 -20
  417. package/dist/setup-CEF4QY4L.js +0 -20
  418. package/dist/setup-E2YLC2EY.js +0 -20
  419. package/dist/setup-ER6NXTY5.js +0 -20
  420. package/dist/setup-FIOAQJ6C.js +0 -20
  421. package/dist/setup-G76S7X44.js +0 -20
  422. package/dist/setup-H2AGCBW5.js +0 -20
  423. package/dist/setup-H4JZUHH5.js +0 -20
  424. package/dist/setup-ICOZRKCX.js +0 -20
  425. package/dist/setup-JFTJH7UF.js +0 -20
  426. package/dist/setup-JJHOT2ZU.js +0 -20
  427. package/dist/setup-KEAM2BCL.js +0 -20
  428. package/dist/setup-LW4MLU2N.js +0 -20
  429. package/dist/setup-NHAZABW4.js +0 -20
  430. package/dist/setup-PRFNI6YW.js +0 -20
  431. package/dist/setup-RAHBMYHE.js +0 -20
  432. package/dist/setup-T6KYFR7O.js +0 -20
  433. package/dist/setup-TGM6L362.js +0 -20
  434. package/dist/setup-TNANAH7C.js +0 -20
  435. package/dist/setup-TXPR5UQX.js +0 -20
  436. package/dist/setup-UJSNSCLM.js +0 -20
  437. package/dist/setup-XCJMELVU.js +0 -20
  438. package/dist/setup-XIYEIFVK.js +0 -20
  439. package/dist/setup-XP2VGBEU.js +0 -20
  440. package/dist/setup-Z4PZSHBI.js +0 -20
  441. package/dist/skills-HCVBA6PK.js +0 -16
  442. package/dist/skills-HFSW74KZ.js +0 -16
  443. package/dist/system-prompts-6OUTAMH6.js +0 -41
  444. package/dist/task-queue-YP2I54IA.js +0 -9
  445. package/dist/transport-encryption-F2NQYACT.js +0 -25
  446. package/seed-data.mjs +0 -455
  447. package/src/agent-tools/tools/integrations/_seed-data.json +0 -4548
  448. package/src/agent-tools/tools/integrations/_seed-data.ts +0 -4563
  449. package/src/engine/NOTE.MD +0 -52
@@ -1,5 +1,325 @@
1
- import { h, useState, useEffect, Fragment, useApp, engineCall } from '../components/utils.js';
1
+ import { h, useState, useEffect, useRef, Fragment, useApp, engineCall, apiCall } from '../components/utils.js';
2
2
  import { I } from '../components/icons.js';
3
+ import { HelpButton } from '../components/settings-help.js';
4
+ import { KnowledgeLink } from '../components/knowledge-link.js';
5
+
6
+ function AddNodeModal({ onClose, onAdded, toast }) {
7
+ var [tab, setTab] = useState('manual'); // manual | ssh | script
8
+ var [form, setForm] = useState({ nodeId: '', name: '', host: '', port: 3101, sshHost: '', sshUser: 'root', sshKey: '', agentIds: '' });
9
+ var [testing, setTesting] = useState(false);
10
+ var [testResult, setTestResult] = useState(null);
11
+ var [saving, setSaving] = useState(false);
12
+ var [scriptGenerated, setScriptGenerated] = useState('');
13
+
14
+ var set = function(k, v) { setForm(function(f) { var n = Object.assign({}, f); n[k] = v; return n; }); };
15
+
16
+ var testConnection = function() {
17
+ if (!form.host) { toast('Host is required', 'error'); return; }
18
+ setTesting(true); setTestResult(null);
19
+ engineCall('/cluster/test-connection', {
20
+ method: 'POST',
21
+ body: JSON.stringify({ host: form.host, port: form.port || 3101 }),
22
+ }).then(function(d) { setTestResult(d); setTesting(false); })
23
+ .catch(function(e) { setTestResult({ success: false, error: e.message }); setTesting(false); });
24
+ };
25
+
26
+ var saveManual = function() {
27
+ if (!form.host) { toast('Host IP/hostname is required', 'error'); return; }
28
+ var nodeId = form.nodeId || form.host.replace(/[^a-zA-Z0-9-]/g, '-');
29
+ setSaving(true);
30
+ engineCall('/cluster/register', {
31
+ method: 'POST',
32
+ body: JSON.stringify({
33
+ nodeId: nodeId,
34
+ name: form.name || nodeId,
35
+ host: form.host,
36
+ port: parseInt(form.port) || 3101,
37
+ }),
38
+ }).then(function(d) { toast('Node added successfully', 'success'); onAdded(); onClose(); })
39
+ .catch(function(e) { toast(e.message, 'error'); setSaving(false); });
40
+ };
41
+
42
+ var deploySsh = function() {
43
+ if (!form.sshHost) { toast('SSH host is required', 'error'); return; }
44
+ setSaving(true);
45
+ engineCall('/cluster/deploy-via-ssh', {
46
+ method: 'POST',
47
+ body: JSON.stringify({
48
+ host: form.sshHost,
49
+ user: form.sshUser || 'root',
50
+ privateKey: form.sshKey || undefined,
51
+ agentIds: form.agentIds ? form.agentIds.split(',').map(function(s) { return s.trim(); }) : [],
52
+ port: parseInt(form.port) || 3101,
53
+ name: form.name || form.sshHost,
54
+ }),
55
+ }).then(function(d) { toast('Deployment started: ' + (d.message || 'check progress'), 'success'); onAdded(); onClose(); })
56
+ .catch(function(e) { toast(e.message, 'error'); setSaving(false); });
57
+ };
58
+
59
+ var generateScript = function() {
60
+ apiCall('/settings').then(function(settings) {
61
+ var dashUrl = settings?.domainStatus?.url || (typeof location !== 'undefined' ? location.origin : 'https://your-dashboard.agenticmail.io');
62
+ var dbUrl = '<YOUR_DATABASE_URL>';
63
+ var nodeId = form.nodeId || form.name?.toLowerCase().replace(/[^a-z0-9-]/g, '-') || 'worker-1';
64
+ var script = '#!/bin/bash\n' +
65
+ '# AgenticMail Worker Node Setup Script\n' +
66
+ '# Generated for: ' + (form.name || nodeId) + '\n' +
67
+ '# Run this on the target machine\n\n' +
68
+ 'set -e\n\n' +
69
+ '# 1. Install Node.js (if not installed)\n' +
70
+ 'if ! command -v node &> /dev/null; then\n' +
71
+ ' echo "Installing Node.js..."\n' +
72
+ ' curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -\n' +
73
+ ' sudo apt-get install -y nodejs || brew install node\n' +
74
+ 'fi\n\n' +
75
+ '# 2. Install AgenticMail Enterprise\n' +
76
+ 'npm install -g @agenticmail/enterprise\n\n' +
77
+ '# 3. Create environment file\n' +
78
+ 'mkdir -p ~/.agenticmail\n' +
79
+ 'cat > ~/.agenticmail/worker.env << \'ENV\'\n' +
80
+ 'ENTERPRISE_URL=' + dashUrl + '\n' +
81
+ 'WORKER_NODE_ID=' + nodeId + '\n' +
82
+ 'WORKER_NAME="' + (form.name || nodeId) + '"\n' +
83
+ 'DATABASE_URL=' + dbUrl + '\n' +
84
+ 'PORT=' + (form.port || 3101) + '\n' +
85
+ 'LOG_LEVEL=warn\n' +
86
+ 'ENV\n\n' +
87
+ '# 4. Install PM2 for process management\n' +
88
+ 'npm install -g pm2\n\n' +
89
+ '# 5. Start agent (replace <AGENT_ID> with actual ID)\n' +
90
+ '# pm2 start "agenticmail-enterprise agent --id <AGENT_ID>" --name agent-1 --env-path ~/.agenticmail/worker.env\n\n' +
91
+ 'echo ""\n' +
92
+ 'echo "Worker node setup complete!"\n' +
93
+ 'echo "Edit ~/.agenticmail/worker.env to set DATABASE_URL"\n' +
94
+ 'echo "Then start agents with: pm2 start \\"agenticmail-enterprise agent --id <AGENT_ID>\\""\n';
95
+ setScriptGenerated(script);
96
+ }).catch(function() {
97
+ toast('Failed to generate script', 'error');
98
+ });
99
+ };
100
+
101
+ var S = { padding: '8px 12px', borderRadius: 6, border: '1px solid var(--border)', background: 'var(--bg-primary)', color: 'var(--text-primary)', width: '100%', fontSize: 13 };
102
+
103
+ return h('div', { className: 'modal-overlay', onClick: function(e) { if (e.target.className === 'modal-overlay') onClose(); } },
104
+ h('div', { className: 'modal', style: { maxWidth: 640 } },
105
+ h('div', { className: 'modal-header' },
106
+ h('h3', null, 'Add Worker Node'),
107
+ h('button', { className: 'btn btn-ghost btn-sm', onClick: onClose }, 'X')
108
+ ),
109
+ h('div', { className: 'modal-body' },
110
+ // Tabs
111
+ h('div', { style: { display: 'flex', gap: 0, marginBottom: 20, borderBottom: '1px solid var(--border)' } },
112
+ ['manual', 'ssh', 'script'].map(function(t) {
113
+ var labels = { manual: 'Manual Registration', ssh: 'Deploy via SSH', script: 'Setup Script' };
114
+ return h('button', {
115
+ key: t,
116
+ style: { padding: '8px 16px', border: 'none', background: 'none', cursor: 'pointer', fontSize: 13, fontWeight: tab === t ? 600 : 400,
117
+ color: tab === t ? 'var(--accent-text)' : 'var(--text-muted)', borderBottom: tab === t ? '2px solid var(--accent)' : '2px solid transparent' },
118
+ onClick: function() { setTab(t); }
119
+ }, labels[t]);
120
+ })
121
+ ),
122
+
123
+ tab === 'manual' && h(Fragment, null,
124
+ h('p', { style: { fontSize: 13, color: 'var(--text-muted)', marginBottom: 16 } },
125
+ 'Register an existing machine that\'s already running AgenticMail. The node will appear in the cluster and start reporting status.'
126
+ ),
127
+ h('div', { style: { display: 'grid', gap: 12 } },
128
+ h('div', null,
129
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'Node Name'),
130
+ h('input', { style: S, value: form.name, placeholder: 'e.g., Office Mac Mini', onChange: function(e) { set('name', e.target.value); } })
131
+ ),
132
+ h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 120px', gap: 8 } },
133
+ h('div', null,
134
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'Host IP / Hostname *'),
135
+ h('input', { style: S, value: form.host, placeholder: '192.168.1.50 or worker.example.com', onChange: function(e) { set('host', e.target.value); } })
136
+ ),
137
+ h('div', null,
138
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'Port'),
139
+ h('input', { style: S, type: 'number', value: form.port, onChange: function(e) { set('port', e.target.value); } })
140
+ )
141
+ ),
142
+ h('div', null,
143
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'Node ID'),
144
+ h('input', { style: S, value: form.nodeId, placeholder: 'Auto-generated from hostname', onChange: function(e) { set('nodeId', e.target.value); } })
145
+ ),
146
+ // Test connection button
147
+ h('div', { style: { display: 'flex', gap: 8, alignItems: 'center' } },
148
+ h('button', { className: 'btn btn-secondary btn-sm', onClick: testConnection, disabled: testing || !form.host }, testing ? 'Testing...' : 'Test Connection'),
149
+ testResult && h('span', { style: { fontSize: 12, color: testResult.success ? 'var(--accent-green)' : 'var(--accent-red)' } },
150
+ testResult.success ? 'Connected! ' + (testResult.version || '') : 'Failed: ' + (testResult.error || 'unreachable')
151
+ )
152
+ ),
153
+ ),
154
+ h('div', { style: { display: 'flex', justifyContent: 'flex-end', gap: 8, marginTop: 20 } },
155
+ h('button', { className: 'btn btn-secondary', onClick: onClose }, 'Cancel'),
156
+ h('button', { className: 'btn btn-primary', onClick: saveManual, disabled: saving }, saving ? 'Adding...' : 'Add Node')
157
+ )
158
+ ),
159
+
160
+ tab === 'ssh' && h(Fragment, null,
161
+ h('p', { style: { fontSize: 13, color: 'var(--text-muted)', marginBottom: 16 } },
162
+ 'Automatically install AgenticMail and configure a worker node on a remote machine via SSH. The dashboard will SSH in, install dependencies, and start the agent process.'
163
+ ),
164
+ h('div', { style: { display: 'grid', gap: 12 } },
165
+ h('div', null,
166
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'Node Name'),
167
+ h('input', { style: S, value: form.name, placeholder: 'e.g., AWS Instance 1', onChange: function(e) { set('name', e.target.value); } })
168
+ ),
169
+ h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 120px', gap: 8 } },
170
+ h('div', null,
171
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'SSH Host *'),
172
+ h('input', { style: S, value: form.sshHost, placeholder: '1.2.3.4 or server.example.com', onChange: function(e) { set('sshHost', e.target.value); } })
173
+ ),
174
+ h('div', null,
175
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'SSH User'),
176
+ h('input', { style: S, value: form.sshUser, onChange: function(e) { set('sshUser', e.target.value); } })
177
+ )
178
+ ),
179
+ h('div', null,
180
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'SSH Private Key (paste or leave blank for default ~/.ssh/id_rsa)'),
181
+ h('textarea', { style: Object.assign({}, S, { height: 80, fontFamily: 'monospace', fontSize: 11 }), value: form.sshKey, placeholder: '-----BEGIN OPENSSH PRIVATE KEY-----\n...', onChange: function(e) { set('sshKey', e.target.value); } })
182
+ ),
183
+ h('div', null,
184
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'Agent IDs to deploy (comma-separated, or leave blank)'),
185
+ h('input', { style: S, value: form.agentIds, placeholder: 'agent-uuid-1, agent-uuid-2', onChange: function(e) { set('agentIds', e.target.value); } })
186
+ ),
187
+ ),
188
+ h('div', { style: { display: 'flex', justifyContent: 'flex-end', gap: 8, marginTop: 20 } },
189
+ h('button', { className: 'btn btn-secondary', onClick: onClose }, 'Cancel'),
190
+ h('button', { className: 'btn btn-primary', onClick: deploySsh, disabled: saving || !form.sshHost }, saving ? 'Deploying...' : 'Deploy Worker')
191
+ )
192
+ ),
193
+
194
+ tab === 'script' && h(Fragment, null,
195
+ h('p', { style: { fontSize: 13, color: 'var(--text-muted)', marginBottom: 16 } },
196
+ 'Generate a setup script to run on the target machine. Copy the script, SSH into the machine, and paste it.'
197
+ ),
198
+ h('div', { style: { display: 'grid', gap: 12 } },
199
+ h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 8 } },
200
+ h('div', null,
201
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'Node Name'),
202
+ h('input', { style: S, value: form.name, placeholder: 'my-worker', onChange: function(e) { set('name', e.target.value); } })
203
+ ),
204
+ h('div', null,
205
+ h('label', { style: { fontSize: 12, fontWeight: 600, display: 'block', marginBottom: 4 } }, 'Port'),
206
+ h('input', { style: S, type: 'number', value: form.port, onChange: function(e) { set('port', e.target.value); } })
207
+ )
208
+ ),
209
+ h('button', { className: 'btn btn-primary btn-sm', onClick: generateScript }, 'Generate Setup Script'),
210
+ scriptGenerated && h(Fragment, null,
211
+ h('div', { style: { position: 'relative' } },
212
+ h('pre', { style: { background: 'var(--bg-primary)', border: '1px solid var(--border)', borderRadius: 8, padding: 12, fontSize: 11, maxHeight: 300, overflow: 'auto', whiteSpace: 'pre-wrap' } }, scriptGenerated),
213
+ h('button', { className: 'btn btn-secondary btn-sm', style: { position: 'absolute', top: 8, right: 8 },
214
+ onClick: function() { navigator.clipboard.writeText(scriptGenerated); toast('Script copied to clipboard', 'success'); }
215
+ }, 'Copy')
216
+ )
217
+ )
218
+ ),
219
+ h('div', { style: { display: 'flex', justifyContent: 'flex-end', gap: 8, marginTop: 20 } },
220
+ h('button', { className: 'btn btn-secondary', onClick: onClose }, 'Close')
221
+ )
222
+ )
223
+ )
224
+ )
225
+ );
226
+ }
227
+
228
+ function NodeDetailModal({ node, onClose, onRefresh, toast }) {
229
+ var [pinging, setPinging] = useState(false);
230
+ var [pingResult, setPingResult] = useState(null);
231
+ var [agents, setAgents] = useState([]);
232
+
233
+ useEffect(function() {
234
+ // Fetch agent details for this node
235
+ if (node.agents && node.agents.length > 0) {
236
+ engineCall('/agents').then(function(d) {
237
+ var all = d.agents || d || [];
238
+ setAgents(all.filter(function(a) { return node.agents.indexOf(a.id) >= 0; }));
239
+ }).catch(function() {});
240
+ }
241
+ }, [node.nodeId]);
242
+
243
+ var pingNode = function() {
244
+ setPinging(true); setPingResult(null);
245
+ engineCall('/cluster/test-connection', {
246
+ method: 'POST',
247
+ body: JSON.stringify({ host: node.host, port: node.port }),
248
+ }).then(function(d) { setPingResult(d); setPinging(false); })
249
+ .catch(function(e) { setPingResult({ success: false, error: e.message }); setPinging(false); });
250
+ };
251
+
252
+ var restartNode = function() {
253
+ if (!confirm('Restart all agents on ' + node.name + '?')) return;
254
+ engineCall('/cluster/nodes/' + node.nodeId + '/restart', { method: 'POST' })
255
+ .then(function() { toast('Restart signal sent', 'success'); })
256
+ .catch(function(e) { toast(e.message, 'error'); });
257
+ };
258
+
259
+ var statusColor = { online: 'var(--accent-green)', degraded: 'var(--accent-orange)', offline: 'var(--text-muted)' }[node.status] || 'var(--text-muted)';
260
+ var uptime = node.onlineSince ? Math.floor((Date.now() - new Date(node.registeredAt).getTime()) / 86400000) + ' days' : '-';
261
+
262
+ return h('div', { className: 'modal-overlay', onClick: function(e) { if (e.target.className === 'modal-overlay') onClose(); } },
263
+ h('div', { className: 'modal', style: { maxWidth: 600 } },
264
+ h('div', { className: 'modal-header' },
265
+ h('div', { style: { display: 'flex', alignItems: 'center', gap: 8 } },
266
+ h('span', { style: { width: 10, height: 10, borderRadius: '50%', background: statusColor, display: 'inline-block' } }),
267
+ h('h3', { style: { margin: 0 } }, node.name || node.nodeId)
268
+ ),
269
+ h('button', { className: 'btn btn-ghost btn-sm', onClick: onClose }, 'X')
270
+ ),
271
+ h('div', { className: 'modal-body' },
272
+ // Info grid
273
+ h('div', { style: { display: 'grid', gridTemplateColumns: '1fr 1fr 1fr', gap: 16, marginBottom: 20 } },
274
+ h('div', null, h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Platform'), h('div', { style: { fontWeight: 600 } }, node.platform + '/' + node.arch)),
275
+ h('div', null, h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'CPUs'), h('div', { style: { fontWeight: 600 } }, node.cpuCount)),
276
+ h('div', null, h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Memory'), h('div', { style: { fontWeight: 600 } }, node.memoryMb >= 1024 ? (node.memoryMb / 1024).toFixed(1) + ' GB' : node.memoryMb + ' MB')),
277
+ h('div', null, h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Address'), h('div', { style: { fontWeight: 600, fontFamily: 'monospace', fontSize: 12 } }, node.host + ':' + node.port)),
278
+ h('div', null, h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Version'), h('div', { style: { fontWeight: 600 } }, 'v' + (node.version || '?'))),
279
+ h('div', null, h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Registered'), h('div', { style: { fontWeight: 600 } }, node.registeredAt ? new Date(node.registeredAt).toLocaleDateString() : '-')),
280
+ ),
281
+
282
+ // Capabilities
283
+ node.capabilities && node.capabilities.length > 0 && h('div', { style: { marginBottom: 16 } },
284
+ h('div', { style: { fontSize: 12, fontWeight: 600, marginBottom: 6 } }, 'Capabilities'),
285
+ h('div', { style: { display: 'flex', gap: 4, flexWrap: 'wrap' } },
286
+ node.capabilities.map(function(c) { return h('span', { key: c, className: 'badge badge-neutral' }, c); })
287
+ )
288
+ ),
289
+
290
+ // Agents on this node
291
+ h('div', { style: { marginBottom: 16 } },
292
+ h('div', { style: { fontSize: 12, fontWeight: 600, marginBottom: 6 } }, 'Agents (' + (node.agents ? node.agents.length : 0) + ')'),
293
+ node.agents && node.agents.length > 0
294
+ ? h('div', { style: { display: 'grid', gap: 6 } },
295
+ agents.length > 0
296
+ ? agents.map(function(a) {
297
+ return h('div', { key: a.id, style: { display: 'flex', alignItems: 'center', gap: 8, padding: '6px 10px', background: 'var(--bg-secondary)', borderRadius: 6 } },
298
+ h('span', { style: { fontWeight: 600, fontSize: 13 } }, a.name || a.id),
299
+ h('span', { style: { fontSize: 11, color: 'var(--text-muted)', fontFamily: 'monospace' } }, a.email || ''),
300
+ h('span', { className: 'badge badge-neutral', style: { marginLeft: 'auto' } }, a.role || 'agent')
301
+ );
302
+ })
303
+ : node.agents.map(function(id) {
304
+ return h('div', { key: id, style: { padding: '6px 10px', background: 'var(--bg-secondary)', borderRadius: 6, fontFamily: 'monospace', fontSize: 12 } }, id);
305
+ })
306
+ )
307
+ : h('div', { style: { fontSize: 13, color: 'var(--text-muted)', fontStyle: 'italic' } }, 'No agents running on this node')
308
+ ),
309
+
310
+ // Actions
311
+ h('div', { style: { display: 'flex', gap: 8, paddingTop: 12, borderTop: '1px solid var(--border)' } },
312
+ h('button', { className: 'btn btn-secondary btn-sm', onClick: pingNode, disabled: pinging }, pinging ? 'Pinging...' : 'Ping Node'),
313
+ pingResult && h('span', { style: { fontSize: 12, color: pingResult.success ? 'var(--accent-green)' : 'var(--accent-red)', alignSelf: 'center' } },
314
+ pingResult.success ? 'Reachable (' + (pingResult.latencyMs || '?') + 'ms)' : 'Unreachable: ' + (pingResult.error || '')
315
+ ),
316
+ h('div', { style: { flex: 1 } }),
317
+ h('button', { className: 'btn btn-secondary btn-sm', onClick: restartNode }, 'Restart Agents'),
318
+ )
319
+ )
320
+ )
321
+ );
322
+ }
3
323
 
4
324
  export function ClusterPage() {
5
325
  var app = useApp();
@@ -7,6 +327,8 @@ export function ClusterPage() {
7
327
  var [nodes, setNodes] = useState([]);
8
328
  var [stats, setStats] = useState(null);
9
329
  var [loading, setLoading] = useState(true);
330
+ var [addingNode, setAddingNode] = useState(false);
331
+ var [selectedNode, setSelectedNode] = useState(null);
10
332
 
11
333
  var load = function() {
12
334
  engineCall('/cluster/nodes').then(function(d) {
@@ -28,31 +350,30 @@ export function ClusterPage() {
28
350
  setNodes(function(prev) {
29
351
  var idx = prev.findIndex(function(n) { return n.nodeId === d.nodeId; });
30
352
  var next = prev.slice();
31
- if (idx >= 0) {
32
- if (d.event === 'offline') { next[idx] = Object.assign({}, next[idx], { status: 'offline' }); }
33
- else { next[idx] = d; }
34
- } else if (d.event === 'register' || d.event === 'snapshot') {
35
- next.push(d);
36
- }
353
+ if (d.event === 'offline' && idx >= 0) { next[idx] = Object.assign({}, next[idx], { status: 'offline', agents: [] }); }
354
+ else if (idx >= 0) { next[idx] = d; }
355
+ else if (d.event === 'register' || d.event === 'snapshot') { next.push(d); }
37
356
  return next;
38
357
  });
358
+ // Refresh stats
359
+ engineCall('/cluster/nodes').then(function(dd) { setStats(dd.stats || null); }).catch(function() {});
39
360
  }
40
361
  } catch(e) {}
41
362
  };
42
363
  return function() { es.close(); };
43
364
  }, []);
44
365
 
45
- var removeNode = function(nodeId) {
46
- if (!confirm('Remove worker node "' + nodeId + '"? Agents on it will become unreachable.')) return;
366
+ var removeNode = function(e, nodeId) {
367
+ e.stopPropagation();
368
+ if (!confirm('Remove worker node "' + nodeId + '"? This only removes it from the dashboard — agents on it will keep running but stop reporting.')) return;
47
369
  engineCall('/cluster/nodes/' + nodeId, { method: 'DELETE' }).then(function() {
48
370
  toast('Node removed', 'success');
49
371
  load();
50
372
  }).catch(function(e) { toast(e.message, 'error'); });
51
373
  };
52
374
 
53
- var statusColor = function(s) {
54
- return { online: 'success', degraded: 'warning', offline: 'neutral' }[s] || 'neutral';
55
- };
375
+ var statusColor = function(s) { return { online: 'success', degraded: 'warning', offline: 'neutral' }[s] || 'neutral'; };
376
+ var statusDot = function(s) { return { online: 'var(--accent-green)', degraded: 'var(--accent-orange)', offline: 'var(--text-muted)' }[s] || 'var(--text-muted)'; };
56
377
 
57
378
  var formatBytes = function(mb) {
58
379
  if (mb >= 1024) return (mb / 1024).toFixed(1) + ' GB';
@@ -71,107 +392,117 @@ export function ClusterPage() {
71
392
  if (loading) return h('div', { style: { padding: 40, textAlign: 'center', color: 'var(--text-muted)' } }, 'Loading cluster...');
72
393
 
73
394
  return h(Fragment, null,
395
+ addingNode && h(AddNodeModal, { onClose: function() { setAddingNode(false); }, onAdded: load, toast: toast }),
396
+ selectedNode && h(NodeDetailModal, { node: selectedNode, onClose: function() { setSelectedNode(null); }, onRefresh: load, toast: toast }),
397
+
74
398
  h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 20 } },
75
399
  h('div', null,
76
- h('h1', { style: { fontSize: 20, fontWeight: 700 } }, 'Cluster'),
77
- h('p', { style: { color: 'var(--text-muted)', fontSize: 13 } }, 'Manage worker nodes running agents across multiple machines')
400
+ h('h1', { style: { fontSize: 20, fontWeight: 700, display: 'flex', alignItems: 'center', gap: 8 } }, 'Cluster', h(KnowledgeLink, { page: 'cluster' }),
401
+ h(HelpButton, { label: 'Cluster' },
402
+ h('p', null, 'Manage worker nodes running agents across multiple machines. Scale horizontally by adding machines — each one runs agents that report back to this dashboard.'),
403
+ h('p', { style: { marginTop: 8 } }, h('strong', null, '3 ways to add a worker:'),
404
+ h('ul', { style: { paddingLeft: 16, marginTop: 4 } },
405
+ h('li', null, h('strong', null, 'Manual'), ' — Register an existing machine by IP/hostname'),
406
+ h('li', null, h('strong', null, 'SSH Deploy'), ' — Auto-install on a remote machine via SSH'),
407
+ h('li', null, h('strong', null, 'Setup Script'), ' — Generate a script to run on the target machine')
408
+ )
409
+ )
410
+ )
411
+ ),
412
+ h('p', { style: { color: 'var(--text-muted)', fontSize: 13 } }, 'Scale your AI workforce across multiple machines')
78
413
  ),
79
- h('button', { className: 'btn btn-secondary btn-sm', onClick: load }, I.refresh(), ' Refresh')
414
+ h('div', { style: { display: 'flex', gap: 8 } },
415
+ h('button', { className: 'btn btn-secondary btn-sm', onClick: load }, I.refresh(), ' Refresh'),
416
+ h('button', { className: 'btn btn-primary', onClick: function() { setAddingNode(true); } }, I.plus(), ' Add Worker Node')
417
+ )
80
418
  ),
81
419
 
82
420
  // Stats cards
83
- stats && h('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(160px, 1fr))', gap: 12, marginBottom: 20 } },
84
- h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16 } },
85
- h('div', { style: { fontSize: 24, fontWeight: 700 } }, stats.totalNodes),
421
+ stats && h('div', { style: { display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(150px, 1fr))', gap: 12, marginBottom: 20 } },
422
+ h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16, textAlign: 'center' } },
423
+ h('div', { style: { fontSize: 28, fontWeight: 700 } }, stats.totalNodes),
86
424
  h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Total Nodes')
87
425
  )),
88
- h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16 } },
89
- h('div', { style: { fontSize: 24, fontWeight: 700, color: 'var(--accent-green)' } }, stats.onlineNodes),
426
+ h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16, textAlign: 'center' } },
427
+ h('div', { style: { fontSize: 28, fontWeight: 700, color: 'var(--accent-green)' } }, stats.onlineNodes),
90
428
  h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Online')
91
429
  )),
92
- h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16 } },
93
- h('div', { style: { fontSize: 24, fontWeight: 700 } }, stats.totalAgents),
430
+ h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16, textAlign: 'center' } },
431
+ h('div', { style: { fontSize: 28, fontWeight: 700 } }, stats.totalAgents),
94
432
  h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Running Agents')
95
433
  )),
96
- h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16 } },
97
- h('div', { style: { fontSize: 24, fontWeight: 700 } }, stats.totalCpus),
434
+ h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16, textAlign: 'center' } },
435
+ h('div', { style: { fontSize: 28, fontWeight: 700 } }, stats.totalCpus),
98
436
  h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Total CPUs')
99
437
  )),
100
- h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16 } },
101
- h('div', { style: { fontSize: 24, fontWeight: 700 } }, formatBytes(stats.totalMemoryMb)),
438
+ h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 16, textAlign: 'center' } },
439
+ h('div', { style: { fontSize: 28, fontWeight: 700 } }, formatBytes(stats.totalMemoryMb)),
102
440
  h('div', { style: { fontSize: 12, color: 'var(--text-muted)' } }, 'Total Memory')
103
441
  ))
104
442
  ),
105
443
 
106
444
  // Nodes
107
445
  nodes.length === 0
108
- ? h('div', { className: 'card' }, h('div', { className: 'card-body' },
446
+ ? h('div', { className: 'card' }, h('div', { className: 'card-body', style: { padding: 40 } },
109
447
  h('div', { className: 'empty-state' },
110
448
  I.server(),
111
449
  h('h3', null, 'No worker nodes'),
112
- h('p', null, 'Worker nodes auto-register when you deploy agents to remote machines.'),
113
- h('div', { style: { marginTop: 16, padding: 16, background: 'var(--bg-secondary)', borderRadius: 8, textAlign: 'left', maxWidth: 500, margin: '16px auto' } },
114
- h('div', { style: { fontWeight: 600, marginBottom: 8 } }, 'How to add a worker node:'),
115
- h('ol', { style: { paddingLeft: 20, fontSize: 13, color: 'var(--text-muted)', lineHeight: 1.8 } },
116
- h('li', null, 'Install on the remote machine: ', h('code', null, 'npm i -g @agenticmail/enterprise')),
117
- h('li', null, 'Set environment variables:'),
118
- h('pre', { style: { background: 'var(--bg-primary)', padding: 8, borderRadius: 4, fontSize: 11, overflow: 'auto', margin: '4px 0' } },
119
- 'ENTERPRISE_URL=https://your-dashboard.agenticmail.io\nWORKER_NODE_ID=mac-mini-2\nWORKER_NAME="Office Mac Mini"\nDATABASE_URL=postgres://...'
120
- ),
121
- h('li', null, 'Start agent: ', h('code', null, 'agenticmail-enterprise agent --id <agent-id>')),
122
- h('li', null, 'The node will auto-register and appear here')
123
- )
124
- )
450
+ h('p', null, 'Your agents currently run on this machine. Add worker nodes to distribute agents across multiple machines for horizontal scaling.'),
451
+ h('button', { className: 'btn btn-primary', style: { marginTop: 12 }, onClick: function() { setAddingNode(true); } }, I.plus(), ' Add Your First Worker Node')
125
452
  )
126
453
  ))
127
454
  : h('div', { style: { display: 'grid', gap: 12 } },
128
455
  nodes.map(function(node) {
129
- return h('div', { key: node.nodeId, className: 'card' },
456
+ return h('div', { key: node.nodeId, className: 'card', style: { cursor: 'pointer', transition: 'border-color 0.2s' },
457
+ onClick: function() { setSelectedNode(node); },
458
+ onMouseEnter: function(e) { e.currentTarget.style.borderColor = 'var(--accent)'; },
459
+ onMouseLeave: function(e) { e.currentTarget.style.borderColor = ''; }
460
+ },
130
461
  h('div', { className: 'card-body', style: { padding: 16 } },
131
462
  h('div', { style: { display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start' } },
132
- h('div', null,
133
- h('div', { style: { display: 'flex', alignItems: 'center', gap: 8 } },
134
- h('span', { style: { fontSize: 16, fontWeight: 700 } }, node.name || node.nodeId),
135
- h('span', { className: 'badge badge-' + statusColor(node.status), style: { textTransform: 'capitalize' } }, node.status)
136
- ),
137
- h('div', { style: { fontSize: 12, color: 'var(--text-muted)', marginTop: 4 } },
138
- node.host + ':' + node.port, ' | ',
139
- node.platform + '/' + node.arch, ' | ',
140
- 'v' + node.version
463
+ h('div', { style: { display: 'flex', alignItems: 'center', gap: 10 } },
464
+ // Status dot
465
+ h('span', { style: { width: 12, height: 12, borderRadius: '50%', background: statusDot(node.status), flexShrink: 0, boxShadow: node.status === 'online' ? '0 0 6px ' + statusDot(node.status) : 'none' } }),
466
+ h('div', null,
467
+ h('div', { style: { fontSize: 15, fontWeight: 700 } }, node.name || node.nodeId),
468
+ h('div', { style: { fontSize: 12, color: 'var(--text-muted)', fontFamily: 'monospace' } }, node.host + ':' + node.port)
141
469
  )
142
470
  ),
143
- h('button', { className: 'btn btn-ghost btn-sm', onClick: function() { removeNode(node.nodeId); }, title: 'Remove' },
144
- I.trash()
471
+ h('div', { style: { display: 'flex', alignItems: 'center', gap: 8 } },
472
+ h('span', { className: 'badge badge-' + statusColor(node.status), style: { textTransform: 'capitalize' } }, node.status),
473
+ h('button', { className: 'btn btn-ghost btn-sm', onClick: function(e) { removeNode(e, node.nodeId); }, title: 'Remove node' }, I.trash())
145
474
  )
146
475
  ),
147
- // Resources
148
- h('div', { style: { display: 'flex', gap: 20, marginTop: 12 } },
476
+ // Metrics row
477
+ h('div', { style: { display: 'flex', gap: 24, marginTop: 12, paddingTop: 12, borderTop: '1px solid var(--border)' } },
478
+ h('div', null,
479
+ h('div', { style: { fontSize: 10, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.5 } }, 'Platform'),
480
+ h('div', { style: { fontWeight: 600, fontSize: 13 } }, node.platform + '/' + node.arch)
481
+ ),
149
482
  h('div', null,
150
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'CPUs'),
151
- h('div', { style: { fontWeight: 600 } }, node.cpuCount)
483
+ h('div', { style: { fontSize: 10, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.5 } }, 'CPUs'),
484
+ h('div', { style: { fontWeight: 600, fontSize: 13 } }, node.cpuCount || '-')
152
485
  ),
153
486
  h('div', null,
154
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Memory'),
155
- h('div', { style: { fontWeight: 600 } }, formatBytes(node.memoryMb))
487
+ h('div', { style: { fontSize: 10, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.5 } }, 'Memory'),
488
+ h('div', { style: { fontWeight: 600, fontSize: 13 } }, formatBytes(node.memoryMb))
156
489
  ),
157
490
  h('div', null,
158
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Agents'),
159
- h('div', { style: { fontWeight: 600 } }, node.agents ? node.agents.length : 0)
491
+ h('div', { style: { fontSize: 10, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.5 } }, 'Agents'),
492
+ h('div', { style: { fontWeight: 600, fontSize: 13 } }, node.agents ? node.agents.length : 0)
160
493
  ),
161
494
  h('div', null,
162
- h('div', { style: { fontSize: 11, color: 'var(--text-muted)' } }, 'Last Heartbeat'),
163
- h('div', { style: { fontWeight: 600, color: node.status === 'online' ? 'var(--accent-green)' : 'var(--text-muted)' } }, timeSince(node.lastHeartbeat))
495
+ h('div', { style: { fontSize: 10, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.5 } }, 'Version'),
496
+ h('div', { style: { fontWeight: 600, fontSize: 13 } }, 'v' + (node.version || '?'))
497
+ ),
498
+ h('div', null,
499
+ h('div', { style: { fontSize: 10, color: 'var(--text-muted)', textTransform: 'uppercase', letterSpacing: 0.5 } }, 'Last Seen'),
500
+ h('div', { style: { fontWeight: 600, fontSize: 13, color: node.status === 'online' ? 'var(--accent-green)' : 'var(--text-muted)' } }, timeSince(node.lastHeartbeat))
164
501
  )
165
502
  ),
166
503
  // Capabilities
167
504
  node.capabilities && node.capabilities.length > 0 && h('div', { style: { display: 'flex', gap: 4, marginTop: 8 } },
168
- node.capabilities.map(function(c) {
169
- return h('span', { key: c, className: 'badge badge-neutral', style: { fontSize: 10 } }, c);
170
- })
171
- ),
172
- // Agent list
173
- node.agents && node.agents.length > 0 && h('div', { style: { marginTop: 8, fontSize: 12, color: 'var(--text-muted)' } },
174
- 'Running: ', node.agents.join(', ')
505
+ node.capabilities.map(function(c) { return h('span', { key: c, className: 'badge badge-neutral', style: { fontSize: 10 } }, c); })
175
506
  )
176
507
  )
177
508
  );
@@ -17,7 +17,7 @@ import type {
17
17
  ConnectionPoolStats,
18
18
  DatabasePermission,
19
19
  } from './types.js';
20
- import { sanitizeQuery, classifyQuery, sanitizeForLogging, type SanitizeResult } from './query-sanitizer.js';
20
+ import { sanitizeQuery, sanitizeForLogging, type SanitizeResult } from './query-sanitizer.js';
21
21
  import crypto from 'crypto';
22
22
 
23
23
  // ─── Driver Interfaces ───────────────────────────────────────────────────────
@@ -124,7 +124,7 @@ export class DatabaseConnectionManager {
124
124
  return Array.isArray(result) ? result : (result?.rows || []);
125
125
  }
126
126
 
127
- private async dbGet(sql: string, params?: any[]): Promise<any> {
127
+ private async _dbGet(sql: string, params?: any[]): Promise<any> {
128
128
  if (!this.engineDb) return null;
129
129
  if (this.engineDb.get) return this.engineDb.get(sql, params);
130
130
  const rows = await this.dbAll(sql, params);
@@ -477,7 +477,7 @@ export class DatabaseConnectionManager {
477
477
  const finalSql = sanitizeResult.sanitizedQuery || query.sql;
478
478
 
479
479
  // 4. Check concurrent query limit
480
- const maxConcurrent = access.queryLimits?.maxConcurrentQueries ?? config.queryLimits?.maxConcurrentQueries ?? 5;
480
+ const _maxConcurrent = access.queryLimits?.maxConcurrentQueries ?? config.queryLimits?.maxConcurrentQueries ?? 5;
481
481
  // (In production, track active queries per connection — simplified here)
482
482
 
483
483
  // 5. Execute with timeout
@@ -717,7 +717,7 @@ export class DatabaseConnectionManager {
717
717
  private async logAudit(
718
718
  query: DatabaseQuery,
719
719
  config: DatabaseConnectionConfig,
720
- access: AgentDatabaseAccess,
720
+ _access: AgentDatabaseAccess,
721
721
  operation: string,
722
722
  rowsAffected: number,
723
723
  success: boolean,
@@ -875,7 +875,7 @@ export class DatabaseConnectionManager {
875
875
  /**
876
876
  * Parse a connection string to extract host/port/database/username when fields are missing.
877
877
  */
878
- private parseConnectionString(connStr: string, type: string): { host?: string; port?: number; database?: string; username?: string } {
878
+ private parseConnectionString(connStr: string, _type: string): { host?: string; port?: number; database?: string; username?: string } {
879
879
  try {
880
880
  // Handle postgres://, mysql://, mongodb://, redis://, libsql:// etc
881
881
  const cleaned = connStr.replace(/^(postgres|postgresql|mysql|mongodb\+srv|mongodb|redis|rediss|libsql)/, 'http');
@@ -1149,7 +1149,7 @@ export class DatabaseConnectionManager {
1149
1149
  let username = config.username;
1150
1150
  if (connStr) {
1151
1151
  try {
1152
- const parsed = self.parseConnectionString(connStr, 'redis');
1152
+ const _parsed = self.parseConnectionString(connStr, 'redis');
1153
1153
  if (!password) {
1154
1154
  // redis://user:pass@host:port or redis://:pass@host:port
1155
1155
  const url = new URL(connStr.replace(/^redis(s?)/, 'http'));
@@ -7,7 +7,6 @@
7
7
 
8
8
  import { Hono } from 'hono';
9
9
  import type { DatabaseConnectionManager } from './connection-manager.js';
10
- import type { DatabasePermission } from './types.js';
11
10
 
12
11
  async function notifyAgentReload(agentId: string) {
13
12
  try {
@@ -33,7 +33,7 @@ const TABLE = 'agenticmail_enterprise';
33
33
  // GSI1: GSI1PK/GSI1SK for secondary lookups (email, name, etc.)
34
34
 
35
35
  function pk(type: string) { return `${type}`; }
36
- function sk(id: string) { return id; }
36
+ function _sk(id: string) { return id; }
37
37
 
38
38
  export class DynamoAdapter extends DatabaseAdapter {
39
39
  readonly type = 'dynamodb' as const;