@agenticmail/enterprise 0.5.311 → 0.5.313

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 (214) hide show
  1. package/README.md +682 -544
  2. package/dist/agent-autonomy-PSXQ4MNP.js +766 -0
  3. package/dist/agent-heartbeat-6H3YAQ32.js +510 -0
  4. package/dist/agent-heartbeat-7WS3XILF.js +510 -0
  5. package/dist/agent-heartbeat-BFGKYUUK.js +510 -0
  6. package/dist/agent-heartbeat-SSV65YTX.js +510 -0
  7. package/dist/agent-heartbeat-T5IIHVF4.js +510 -0
  8. package/dist/agent-heartbeat-X3C6FIU2.js +510 -0
  9. package/dist/agent-tools-BW6CLQQ7.js +13897 -0
  10. package/dist/agent-tools-KEA7QEWF.js +13897 -0
  11. package/dist/agent-tools-NU7V3S5N.js +13899 -0
  12. package/dist/agent-tools-WINDYRQ2.js +13897 -0
  13. package/dist/chunk-3ELH5CU6.js +4910 -0
  14. package/dist/chunk-4QYRS3MS.js +1519 -0
  15. package/dist/chunk-52REEVDW.js +1519 -0
  16. package/dist/chunk-5RZJ76YI.js +4977 -0
  17. package/dist/chunk-6L7FQI5Q.js +4909 -0
  18. package/dist/chunk-763OMGFI.js +1519 -0
  19. package/dist/chunk-7ILSXGY6.js +1519 -0
  20. package/dist/chunk-7UCKD25B.js +551 -0
  21. package/dist/chunk-A6MSR7DL.js +4977 -0
  22. package/dist/chunk-ASD2YB6O.js +1519 -0
  23. package/dist/chunk-AZOIHLLX.js +4977 -0
  24. package/dist/chunk-BDCFOP7O.js +537 -0
  25. package/dist/chunk-BSVWPG6I.js +106 -0
  26. package/dist/chunk-C46DNDZB.js +1519 -0
  27. package/dist/chunk-CFVTK4FQ.js +4977 -0
  28. package/dist/chunk-CHJAOKCJ.js +4921 -0
  29. package/dist/chunk-CYEWTXYH.js +4977 -0
  30. package/dist/chunk-D3KFSWLK.js +48 -0
  31. package/dist/chunk-DUVGNAIY.js +4977 -0
  32. package/dist/chunk-DX4XEFVE.js +25229 -0
  33. package/dist/chunk-EX6FQSEV.js +167 -0
  34. package/dist/chunk-F5VZ5EUH.js +1519 -0
  35. package/dist/chunk-FVUDSPOD.js +4977 -0
  36. package/dist/chunk-G6FTZKJX.js +4977 -0
  37. package/dist/chunk-GFEAZN6Y.js +1519 -0
  38. package/dist/chunk-HKV4FQFW.js +1519 -0
  39. package/dist/chunk-ICCPULDT.js +25217 -0
  40. package/dist/chunk-IYEM627Q.js +25216 -0
  41. package/dist/chunk-JHRJ4QJ6.js +1519 -0
  42. package/dist/chunk-K2DAUYHV.js +4977 -0
  43. package/dist/chunk-KDQDSZZQ.js +4973 -0
  44. package/dist/chunk-LDUD6AZY.js +1519 -0
  45. package/dist/chunk-LES5TJ5L.js +4909 -0
  46. package/dist/chunk-MJGGW6MC.js +106 -0
  47. package/dist/chunk-MQKIWAHQ.js +106 -0
  48. package/dist/chunk-NGA7BBPF.js +48 -0
  49. package/dist/chunk-OE3TI4IQ.js +1519 -0
  50. package/dist/chunk-OHSBIYDR.js +4977 -0
  51. package/dist/chunk-OPOBUYJT.js +1519 -0
  52. package/dist/chunk-OZEYDEPB.js +1519 -0
  53. package/dist/chunk-P4PODSQH.js +1519 -0
  54. package/dist/chunk-P7UOSFIE.js +636 -0
  55. package/dist/chunk-PFN6DODU.js +4921 -0
  56. package/dist/chunk-PKDVM4IY.js +4917 -0
  57. package/dist/chunk-Q5KG3G7U.js +25115 -0
  58. package/dist/chunk-QMVNW4FJ.js +25229 -0
  59. package/dist/chunk-QZ5UPRBE.js +4977 -0
  60. package/dist/chunk-SPP23N42.js +4977 -0
  61. package/dist/chunk-SRGHNFOY.js +4921 -0
  62. package/dist/chunk-TPLVQFXM.js +2594 -0
  63. package/dist/chunk-U3XYF4QP.js +4977 -0
  64. package/dist/chunk-VRRJH2DY.js +4921 -0
  65. package/dist/chunk-WY42BS3F.js +1519 -0
  66. package/dist/chunk-XAA4VHHZ.js +1519 -0
  67. package/dist/chunk-Y2KIY4BA.js +4969 -0
  68. package/dist/chunk-Z5Y5KTPC.js +4977 -0
  69. package/dist/chunk-ZA4QRACH.js +4977 -0
  70. package/dist/chunk-ZHLGSTXF.js +4909 -0
  71. package/dist/cli-agent-26BUULHZ.js +2169 -0
  72. package/dist/cli-agent-2FLJWXOC.js +2169 -0
  73. package/dist/cli-agent-4NNQFLO6.js +2255 -0
  74. package/dist/cli-agent-5WV3EEPW.js +2252 -0
  75. package/dist/cli-agent-65JUT6DU.js +2193 -0
  76. package/dist/cli-agent-6HLL7A5K.js +2255 -0
  77. package/dist/cli-agent-CZ26QWUZ.js +2210 -0
  78. package/dist/cli-agent-HPVSWDNQ.js +2255 -0
  79. package/dist/cli-agent-K4SBVG5X.js +2210 -0
  80. package/dist/cli-agent-K5D424X2.js +2252 -0
  81. package/dist/cli-agent-U4OL5FGK.js +2210 -0
  82. package/dist/cli-agent-WUMPOIKQ.js +2169 -0
  83. package/dist/cli-agent-WWRGGJ2F.js +2255 -0
  84. package/dist/cli-agent-ZDBBTVGU.js +2193 -0
  85. package/dist/cli-agent-ZIZ5JP4O.js +2252 -0
  86. package/dist/cli-recover-I4KNR2OI.js +487 -0
  87. package/dist/cli-recover-IQTUKWR2.js +487 -0
  88. package/dist/cli-recover-OYJHELOR.js +487 -0
  89. package/dist/cli-recover-PVQC7UXB.js +487 -0
  90. package/dist/cli-recover-T32NABFA.js +487 -0
  91. package/dist/cli-serve-FE4CMMSN.js +143 -0
  92. package/dist/cli-serve-FTQJ3RUK.js +143 -0
  93. package/dist/cli-serve-G4PUCASH.js +143 -0
  94. package/dist/cli-serve-HBZYUUQ3.js +143 -0
  95. package/dist/cli-serve-L3NUROMO.js +143 -0
  96. package/dist/cli-serve-LAA5WIZK.js +143 -0
  97. package/dist/cli-serve-LV4TUSJD.js +143 -0
  98. package/dist/cli-serve-MFCTVA2L.js +140 -0
  99. package/dist/cli-serve-QCRUFI5B.js +143 -0
  100. package/dist/cli-serve-S7OGQN4P.js +143 -0
  101. package/dist/cli-serve-SI4BQRXT.js +140 -0
  102. package/dist/cli-serve-UNB7EHN4.js +143 -0
  103. package/dist/cli-serve-UV3GVDRD.js +143 -0
  104. package/dist/cli-serve-V5QICXR5.js +143 -0
  105. package/dist/cli-serve-VG6Z6GIB.js +143 -0
  106. package/dist/cli-serve-XSYHPGZI.js +143 -0
  107. package/dist/cli-serve-Y534FCRV.js +140 -0
  108. package/dist/cli-verify-CZIITRED.js +149 -0
  109. package/dist/cli-verify-N73GOKEF.js +149 -0
  110. package/dist/cli-verify-QEEBZOUZ.js +149 -0
  111. package/dist/cli-verify-RC5HI6DU.js +149 -0
  112. package/dist/cli-verify-VKBNIEAX.js +149 -0
  113. package/dist/cli.js +5 -5
  114. package/dist/dashboard/app.js +16 -3
  115. package/dist/dashboard/components/org-switcher.js +5 -1
  116. package/dist/dashboard/org-switcher.js +156 -0
  117. package/dist/dashboard/pages/login.js +160 -4
  118. package/dist/dashboard/pages/task-pipeline.js +1 -1
  119. package/dist/factory-3IWXVE37.js +9 -0
  120. package/dist/factory-5M6PTMLC.js +11 -0
  121. package/dist/factory-CSSHN7GE.js +11 -0
  122. package/dist/factory-JFWXTAWK.js +11 -0
  123. package/dist/factory-TBGUYM5X.js +9 -0
  124. package/dist/google-W5AYGNUJ.js +33 -0
  125. package/dist/index.js +6 -6
  126. package/dist/meetings-FJ453ENF.js +12 -0
  127. package/dist/postgres-BCHZWRU3.js +832 -0
  128. package/dist/postgres-BI4QVRM6.js +825 -0
  129. package/dist/postgres-BOTHOPDW.js +875 -0
  130. package/dist/postgres-JBUKR3TA.js +873 -0
  131. package/dist/postgres-Z7QYSU6K.js +861 -0
  132. package/dist/routes-7QYAQTWA.js +90 -0
  133. package/dist/routes-JCBVZU54.js +90 -0
  134. package/dist/routes-KEDEJFRE.js +90 -0
  135. package/dist/routes-WI64ADVH.js +90 -0
  136. package/dist/routes-X36OSCID.js +90 -0
  137. package/dist/runtime-75XR6KEW.js +45 -0
  138. package/dist/runtime-BNM7ZNNL.js +45 -0
  139. package/dist/runtime-ES6WCJ7D.js +45 -0
  140. package/dist/runtime-KYJTML2B.js +45 -0
  141. package/dist/runtime-LO67ZHQA.js +45 -0
  142. package/dist/runtime-VIXKKVSZ.js +45 -0
  143. package/dist/runtime-WHWJPCGK.js +45 -0
  144. package/dist/runtime-Z2Q6GUHH.js +45 -0
  145. package/dist/runtime-ZZ6CALSB.js +45 -0
  146. package/dist/server-27A4WEJC.js +28 -0
  147. package/dist/server-2CBXP4WS.js +28 -0
  148. package/dist/server-4JQAB5R4.js +28 -0
  149. package/dist/server-6BOM5U64.js +28 -0
  150. package/dist/server-CA2I3LJY.js +28 -0
  151. package/dist/server-FLJKNPRD.js +28 -0
  152. package/dist/server-HMIHIQ2N.js +28 -0
  153. package/dist/server-KIXXLR2D.js +28 -0
  154. package/dist/server-KSEIZTXF.js +28 -0
  155. package/dist/server-MPVW7DKZ.js +28 -0
  156. package/dist/server-PRTVRQ2D.js +28 -0
  157. package/dist/server-SYIG6HAX.js +28 -0
  158. package/dist/server-U32KDIXC.js +28 -0
  159. package/dist/server-WFN6CA4T.js +28 -0
  160. package/dist/server-XQUE3FGT.js +28 -0
  161. package/dist/server-XWT2UORK.js +28 -0
  162. package/dist/server-Y3BGNN5Q.js +28 -0
  163. package/dist/setup-352L2TPS.js +20 -0
  164. package/dist/setup-4MM645XK.js +20 -0
  165. package/dist/setup-5JPWW6IP.js +20 -0
  166. package/dist/setup-CUN6LVUV.js +20 -0
  167. package/dist/setup-D3YHPWPY.js +20 -0
  168. package/dist/setup-D4A5I6UM.js +20 -0
  169. package/dist/setup-DOPLXTB3.js +20 -0
  170. package/dist/setup-E3NSIM6B.js +20 -0
  171. package/dist/setup-E3V2D7NL.js +20 -0
  172. package/dist/setup-FSYPGI2C.js +20 -0
  173. package/dist/setup-G3RPKRG3.js +20 -0
  174. package/dist/setup-KJ77HNWK.js +20 -0
  175. package/dist/setup-LPSOY5V5.js +20 -0
  176. package/dist/setup-N3ODDSQE.js +20 -0
  177. package/dist/setup-NLDM3M2P.js +20 -0
  178. package/dist/setup-PT6WGOYB.js +20 -0
  179. package/dist/setup-SWJMNDWF.js +20 -0
  180. package/dist/system-prompts-6OUTAMH6.js +41 -0
  181. package/dist/task-queue-YP2I54IA.js +9 -0
  182. package/dist/telegram-QRNGRT5M.js +17 -0
  183. package/dist/whatsapp-VYVINCGV.js +31 -0
  184. package/god_is_great.html +35 -0
  185. package/package.json +1 -1
  186. package/src/admin/routes.ts +24 -4
  187. package/src/agent-tools/index.ts +4 -1
  188. package/src/agent-tools/tool-resolver.ts +15 -4
  189. package/src/agent-tools/tools/browser.ts +2 -2
  190. package/src/agent-tools/tools/local/dependency-manager.ts +286 -0
  191. package/src/agent-tools/tools/local/index.ts +3 -0
  192. package/src/agent-tools/tools/messaging/telegram.ts +29 -0
  193. package/src/agent-tools/tools/messaging/whatsapp.ts +59 -4
  194. package/src/auth/routes.ts +15 -12
  195. package/src/cli-agent.ts +47 -6
  196. package/src/cli-serve.ts +2 -5
  197. package/src/dashboard/app.js +16 -3
  198. package/src/dashboard/components/org-switcher.js +5 -1
  199. package/src/dashboard/pages/login.js +160 -4
  200. package/src/dashboard/pages/task-pipeline.js +1 -1
  201. package/src/db/adapter.ts +2 -0
  202. package/src/db/factory.ts +78 -0
  203. package/src/db/postgres.ts +57 -12
  204. package/src/engine/agent-autonomy.ts +1 -1
  205. package/src/engine/agent-heartbeat.ts +1 -1
  206. package/src/engine/messaging-poller.ts +146 -11
  207. package/src/engine/oauth-connect-routes.ts +23 -3
  208. package/src/engine/routes.ts +1 -1
  209. package/src/engine/task-poller.ts +54 -3
  210. package/src/engine/task-queue.ts +30 -0
  211. package/src/runtime/index.ts +2 -1
  212. package/src/runtime/types.ts +2 -0
  213. package/src/server.ts +43 -1
  214. package/src/system-prompts/triage.ts +1 -1
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-7ILSXGY6.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-HKV4FQFW.js";
10
+ import "./chunk-D3KFSWLK.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-P4PODSQH.js";
10
+ import "./chunk-MQKIWAHQ.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-F5VZ5EUH.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-ASD2YB6O.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-4QYRS3MS.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-52REEVDW.js";
10
+ import "./chunk-NGA7BBPF.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-763OMGFI.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-LDUD6AZY.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-JHRJ4QJ6.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-WY42BS3F.js";
10
+ import "./chunk-BSVWPG6I.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-XAA4VHHZ.js";
10
+ import "./chunk-MJGGW6MC.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-GFEAZN6Y.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-OPOBUYJT.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,20 @@
1
+ import {
2
+ promptCompanyInfo,
3
+ promptDatabase,
4
+ promptDeployment,
5
+ promptDomain,
6
+ promptRegistration,
7
+ provision,
8
+ runSetupWizard
9
+ } from "./chunk-OE3TI4IQ.js";
10
+ import "./chunk-4WLJIZZB.js";
11
+ import "./chunk-KFQGP6VL.js";
12
+ export {
13
+ promptCompanyInfo,
14
+ promptDatabase,
15
+ promptDeployment,
16
+ promptDomain,
17
+ promptRegistration,
18
+ provision,
19
+ runSetupWizard
20
+ };
@@ -0,0 +1,41 @@
1
+ import {
2
+ BROWSER_RULES,
3
+ buildCalendarEventPrompt,
4
+ buildCatchupPrompt,
5
+ buildContactsPrompt,
6
+ buildDocsTaskPrompt,
7
+ buildDriveTaskPrompt,
8
+ buildFormsPrompt,
9
+ buildGmailPrompt,
10
+ buildGoogleChatPrompt,
11
+ buildGoogleTasksPrompt,
12
+ buildMeetJoinFromChatPrompt,
13
+ buildMeetJoinPrompt,
14
+ buildScheduleBlock,
15
+ buildScheduleInfo,
16
+ buildSheetsTaskPrompt,
17
+ buildSlidesPrompt,
18
+ buildTaskPrompt,
19
+ buildTriagePrompt
20
+ } from "./chunk-7UCKD25B.js";
21
+ import "./chunk-KFQGP6VL.js";
22
+ export {
23
+ BROWSER_RULES,
24
+ buildCalendarEventPrompt,
25
+ buildCatchupPrompt,
26
+ buildContactsPrompt,
27
+ buildDocsTaskPrompt,
28
+ buildDriveTaskPrompt,
29
+ buildFormsPrompt,
30
+ buildGmailPrompt,
31
+ buildGoogleChatPrompt,
32
+ buildGoogleTasksPrompt,
33
+ buildMeetJoinFromChatPrompt,
34
+ buildMeetJoinPrompt,
35
+ buildScheduleBlock,
36
+ buildScheduleInfo,
37
+ buildSheetsTaskPrompt,
38
+ buildSlidesPrompt,
39
+ buildTaskPrompt,
40
+ buildTriagePrompt
41
+ };
@@ -0,0 +1,9 @@
1
+ import {
2
+ TaskQueueManager,
3
+ init_task_queue
4
+ } from "./chunk-BDCFOP7O.js";
5
+ import "./chunk-KFQGP6VL.js";
6
+ init_task_queue();
7
+ export {
8
+ TaskQueueManager
9
+ };
@@ -0,0 +1,17 @@
1
+ import {
2
+ createTelegramTools,
3
+ deleteTelegramWebhook,
4
+ getTelegramWebhookInfo,
5
+ init_telegram,
6
+ pollTelegramUpdates,
7
+ setTelegramWebhook
8
+ } from "./chunk-EX6FQSEV.js";
9
+ import "./chunk-KFQGP6VL.js";
10
+ init_telegram();
11
+ export {
12
+ createTelegramTools,
13
+ deleteTelegramWebhook,
14
+ getTelegramWebhookInfo,
15
+ pollTelegramUpdates,
16
+ setTelegramWebhook
17
+ };
@@ -0,0 +1,31 @@
1
+ import {
2
+ autoStartConnections,
3
+ createWhatsAppTools,
4
+ getActiveWhatsAppAgents,
5
+ getConnection,
6
+ getConnectionStatus,
7
+ getOrCreateConnection,
8
+ getWhatsAppQR,
9
+ hasAuthState,
10
+ init_whatsapp,
11
+ isWhatsAppConnected,
12
+ onWhatsAppMessage,
13
+ sendTestMessage,
14
+ toJid
15
+ } from "./chunk-P7UOSFIE.js";
16
+ import "./chunk-KFQGP6VL.js";
17
+ init_whatsapp();
18
+ export {
19
+ autoStartConnections,
20
+ createWhatsAppTools,
21
+ getActiveWhatsAppAgents,
22
+ getConnection,
23
+ getConnectionStatus,
24
+ getOrCreateConnection,
25
+ getWhatsAppQR,
26
+ hasAuthState,
27
+ isWhatsAppConnected,
28
+ onWhatsAppMessage,
29
+ sendTestMessage,
30
+ toJid
31
+ };
@@ -0,0 +1,35 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>God is Great</title>
7
+ <style>
8
+ body {
9
+ font-family: Arial, sans-serif;
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ height: 100vh;
14
+ margin: 0;
15
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
16
+ color: white;
17
+ }
18
+ .message {
19
+ font-size: 3rem;
20
+ text-align: center;
21
+ text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
22
+ padding: 40px;
23
+ border-radius: 20px;
24
+ background: rgba(255,255,255,0.1);
25
+ backdrop-filter: blur(10px);
26
+ border: 1px solid rgba(255,255,255,0.2);
27
+ }
28
+ </style>
29
+ </head>
30
+ <body>
31
+ <div class="message">
32
+ God is Great
33
+ </div>
34
+ </body>
35
+ </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/enterprise",
3
- "version": "0.5.311",
3
+ "version": "0.5.313",
4
4
  "description": "AgenticMail Enterprise — cloud-hosted AI agent identity, email, auth & compliance for organizations",
5
5
  "type": "module",
6
6
  "bin": {
@@ -757,13 +757,15 @@ export function createAdminRoutes(db: DatabaseAdapter) {
757
757
  const userRole = c.get('userRole' as any);
758
758
  if (!userId) return c.json({ error: 'Not authenticated' }, 401);
759
759
 
760
+ const user = await db.getUser(userId);
761
+ const clientOrgId = user?.clientOrgId || c.get('clientOrgId' as any) || null;
762
+
760
763
  // Owner and admin always get full access
761
764
  if (userRole === 'owner' || userRole === 'admin') {
762
- return c.json({ permissions: '*', role: userRole });
765
+ return c.json({ permissions: '*', role: userRole, clientOrgId });
763
766
  }
764
767
 
765
- const user = await db.getUser(userId);
766
- return c.json({ permissions: user?.permissions ?? '*', role: userRole, clientOrgId: user?.clientOrgId || null });
768
+ return c.json({ permissions: user?.permissions ?? '*', role: userRole, clientOrgId });
767
769
  });
768
770
 
769
771
  // ─── Platform Capabilities ──────────────────────────
@@ -2195,8 +2197,26 @@ export function createAdminRoutes(db: DatabaseAdapter) {
2195
2197
 
2196
2198
  // ─── Client Organizations ─────────────────────────────
2197
2199
 
2198
- api.get('/organizations', requireRole('admin'), async (c) => {
2200
+ api.get('/organizations', async (c) => {
2199
2201
  try {
2202
+ // Org-bound users can only see their own organization
2203
+ const clientOrgId = c.get('clientOrgId' as any);
2204
+ if (clientOrgId) {
2205
+ const isPostgres = (db as any).pool;
2206
+ if (isPostgres) {
2207
+ const { rows } = await (db as any)._query(
2208
+ `SELECT o.*, COUNT(a.id) as agent_count FROM client_organizations o LEFT JOIN agents a ON a.client_org_id = o.id WHERE o.id = $1 GROUP BY o.id`, [clientOrgId]);
2209
+ return c.json({ organizations: rows });
2210
+ }
2211
+ return c.json({ organizations: [] });
2212
+ }
2213
+
2214
+ // Full access for admins/owners
2215
+ const userRole = c.get('userRole' as any);
2216
+ if (userRole !== 'admin' && userRole !== 'owner') {
2217
+ return c.json({ error: 'Insufficient permissions' }, 403);
2218
+ }
2219
+
2200
2220
  const isPostgres = (db as any).pool;
2201
2221
  if (isPostgres) {
2202
2222
  const { rows } = await (db as any)._query(`
@@ -219,9 +219,12 @@ export interface AllToolsOptions extends ToolCreationOptions {
219
219
  */
220
220
  export async function createAllTools(options?: AllToolsOptions): Promise<AnyAgentTool[]> {
221
221
  // Create security primitives
222
+ // Default allowed dirs: workspace + /tmp + home (agents need temp file access for media processing, etc.)
223
+ var defaultAllowedDirs = ['/tmp', '/var/tmp', process.env.HOME || '/root'];
224
+ var configuredDirs = options?.security?.pathSandbox?.allowedDirs || [];
222
225
  var pathSandbox = options?.workspaceDir && options?.security?.pathSandbox?.enabled !== false
223
226
  ? createPathSandbox(options.workspaceDir, {
224
- allowedDirs: options.security?.pathSandbox?.allowedDirs,
227
+ allowedDirs: [...defaultAllowedDirs, ...configuredDirs],
225
228
  blockedPatterns: options.security?.pathSandbox?.blockedPatterns,
226
229
  })
227
230
  : undefined;
@@ -422,6 +422,10 @@ const TOOL_REGISTRY: Record<string, ToolSet> = {
422
422
  shell_session_list: 'local_shell',
423
423
  shell_session_kill: 'local_shell',
424
424
  system_info: 'local_shell',
425
+ check_dependency: 'local_shell',
426
+ install_dependency: 'local_shell',
427
+ check_environment: 'local_shell',
428
+ cleanup_installed: 'local_shell',
425
429
 
426
430
  // ── Messaging: WhatsApp (16) ──
427
431
  whatsapp_connect: 'msg_whatsapp',
@@ -444,6 +448,7 @@ const TOOL_REGISTRY: Record<string, ToolSet> = {
444
448
  // ── Messaging: Telegram (4) ──
445
449
  telegram_send: 'msg_telegram',
446
450
  telegram_send_media: 'msg_telegram',
451
+ telegram_download_file: 'msg_telegram',
447
452
  telegram_get_me: 'msg_telegram',
448
453
  telegram_get_chat: 'msg_telegram',
449
454
 
@@ -511,16 +516,22 @@ const CONTEXT_PROMOTIONS: Record<SessionContext, ToolSet[]> = {
511
516
  'ent_knowledge',
512
517
  ],
513
518
 
514
- // WhatsApp: lean only WhatsApp tools + browser
519
+ // WhatsApp: messaging + essential file/shell tools for media processing
515
520
  whatsapp: [
516
521
  'msg_whatsapp',
517
522
  'browser',
523
+ 'local_shell',
524
+ 'filesystem',
525
+ 'web',
518
526
  ],
519
527
 
520
- // Telegram: lean only Telegram tools + browser
528
+ // Telegram: messaging + essential file/shell tools for media processing
521
529
  telegram: [
522
530
  'msg_telegram',
523
531
  'browser',
532
+ 'local_shell',
533
+ 'filesystem',
534
+ 'web',
524
535
  ],
525
536
 
526
537
  // Email handler: focused email + lookups
@@ -807,9 +818,9 @@ const SET_DESCRIPTIONS: Record<ToolSet, string> = {
807
818
  ent_knowledge: 'Knowledge base + hub search (3 tools)',
808
819
  agenticmail: 'Full email management (40 tools)',
809
820
  local_filesystem: 'File read/write/edit/move/delete/search (7 tools)',
810
- local_shell: 'Shell exec, PTY sessions, sudo, package install (7 tools)',
821
+ local_shell: 'Shell exec, PTY sessions, sudo, package install, dependency management (11 tools)',
811
822
  msg_whatsapp: 'WhatsApp messaging, media, groups (16 tools)',
812
- msg_telegram: 'Telegram messaging and media (4 tools)',
823
+ msg_telegram: 'Telegram messaging, media, and file download (5 tools)',
813
824
  management: 'Team management — delegate tasks, escalate, org chart (10 tools)',
814
825
  mcp_bridge: 'MCP integration adapters',
815
826
  };
@@ -665,8 +665,8 @@ export function createBrowserTool(options?: ToolCreationOptions & {
665
665
  switch (action) {
666
666
  case 'navigate': {
667
667
  var url = readStringParam(params, 'url', { required: true });
668
- // SSRF guard on navigation URL
669
- if (ssrfGuard) {
668
+ // SSRF guard on navigation URL (skip for file:// — browser can open local files)
669
+ if (ssrfGuard && !url.startsWith('file://') && !url.startsWith('file:///')) {
670
670
  try {
671
671
  await ssrfGuard.validateUrl(url);
672
672
  } catch (err: any) {