@agent-native/core 0.7.12 → 0.7.14

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 (586) hide show
  1. package/README.md +1 -1
  2. package/dist/a2a/client.d.ts +44 -1
  3. package/dist/a2a/client.d.ts.map +1 -1
  4. package/dist/a2a/client.js +88 -11
  5. package/dist/a2a/client.js.map +1 -1
  6. package/dist/a2a/handlers.d.ts +10 -0
  7. package/dist/a2a/handlers.d.ts.map +1 -1
  8. package/dist/a2a/handlers.js +287 -62
  9. package/dist/a2a/handlers.js.map +1 -1
  10. package/dist/a2a/server.d.ts.map +1 -1
  11. package/dist/a2a/server.js +95 -17
  12. package/dist/a2a/server.js.map +1 -1
  13. package/dist/a2a/task-store.d.ts +11 -1
  14. package/dist/a2a/task-store.d.ts.map +1 -1
  15. package/dist/a2a/task-store.js +38 -2
  16. package/dist/a2a/task-store.js.map +1 -1
  17. package/dist/agent/engine/ai-sdk-engine.d.ts.map +1 -1
  18. package/dist/agent/engine/ai-sdk-engine.js +26 -8
  19. package/dist/agent/engine/ai-sdk-engine.js.map +1 -1
  20. package/dist/agent/engine/builder-engine.d.ts +19 -0
  21. package/dist/agent/engine/builder-engine.d.ts.map +1 -0
  22. package/dist/agent/engine/builder-engine.js +412 -0
  23. package/dist/agent/engine/builder-engine.js.map +1 -0
  24. package/dist/agent/engine/builtin.d.ts.map +1 -1
  25. package/dist/agent/engine/builtin.js +26 -10
  26. package/dist/agent/engine/builtin.js.map +1 -1
  27. package/dist/agent/engine/index.d.ts +1 -1
  28. package/dist/agent/engine/index.d.ts.map +1 -1
  29. package/dist/agent/engine/index.js +1 -1
  30. package/dist/agent/engine/index.js.map +1 -1
  31. package/dist/agent/engine/registry.d.ts +20 -1
  32. package/dist/agent/engine/registry.d.ts.map +1 -1
  33. package/dist/agent/engine/registry.js +49 -1
  34. package/dist/agent/engine/registry.js.map +1 -1
  35. package/dist/agent/engine/types.d.ts +30 -0
  36. package/dist/agent/engine/types.d.ts.map +1 -1
  37. package/dist/agent/engine/types.js +19 -1
  38. package/dist/agent/engine/types.js.map +1 -1
  39. package/dist/agent/production-agent.d.ts.map +1 -1
  40. package/dist/agent/production-agent.js +65 -7
  41. package/dist/agent/production-agent.js.map +1 -1
  42. package/dist/agent/run-manager.d.ts.map +1 -1
  43. package/dist/agent/run-manager.js +11 -1
  44. package/dist/agent/run-manager.js.map +1 -1
  45. package/dist/agent/thread-data-builder.d.ts +4 -0
  46. package/dist/agent/thread-data-builder.d.ts.map +1 -1
  47. package/dist/agent/thread-data-builder.js +1 -0
  48. package/dist/agent/thread-data-builder.js.map +1 -1
  49. package/dist/agent/types.d.ts +8 -0
  50. package/dist/agent/types.d.ts.map +1 -1
  51. package/dist/chat-threads/store.d.ts +3 -0
  52. package/dist/chat-threads/store.d.ts.map +1 -1
  53. package/dist/chat-threads/store.js +32 -0
  54. package/dist/chat-threads/store.js.map +1 -1
  55. package/dist/checkpoints/service.d.ts +1 -0
  56. package/dist/checkpoints/service.d.ts.map +1 -1
  57. package/dist/checkpoints/service.js +26 -2
  58. package/dist/checkpoints/service.js.map +1 -1
  59. package/dist/cli/create.d.ts +30 -0
  60. package/dist/cli/create.d.ts.map +1 -1
  61. package/dist/cli/create.js +25 -13
  62. package/dist/cli/create.js.map +1 -1
  63. package/dist/cli/templates-meta.d.ts.map +1 -1
  64. package/dist/cli/templates-meta.js +11 -0
  65. package/dist/cli/templates-meta.js.map +1 -1
  66. package/dist/client/AgentPanel.d.ts +3 -1
  67. package/dist/client/AgentPanel.d.ts.map +1 -1
  68. package/dist/client/AgentPanel.js +22 -11
  69. package/dist/client/AgentPanel.js.map +1 -1
  70. package/dist/client/AgentTaskCard.d.ts.map +1 -1
  71. package/dist/client/AgentTaskCard.js +2 -0
  72. package/dist/client/AgentTaskCard.js.map +1 -1
  73. package/dist/client/AssistantChat.d.ts +2 -0
  74. package/dist/client/AssistantChat.d.ts.map +1 -1
  75. package/dist/client/AssistantChat.js +159 -84
  76. package/dist/client/AssistantChat.js.map +1 -1
  77. package/dist/client/ConnectBuilderCard.d.ts +1 -7
  78. package/dist/client/ConnectBuilderCard.d.ts.map +1 -1
  79. package/dist/client/ConnectBuilderCard.js +30 -132
  80. package/dist/client/ConnectBuilderCard.js.map +1 -1
  81. package/dist/client/ErrorBoundary.d.ts +1 -3
  82. package/dist/client/ErrorBoundary.d.ts.map +1 -1
  83. package/dist/client/ErrorBoundary.js +37 -9
  84. package/dist/client/ErrorBoundary.js.map +1 -1
  85. package/dist/client/FeedbackButton.d.ts.map +1 -1
  86. package/dist/client/FeedbackButton.js +4 -3
  87. package/dist/client/FeedbackButton.js.map +1 -1
  88. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  89. package/dist/client/MultiTabAssistantChat.js +169 -52
  90. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  91. package/dist/client/agent-chat.d.ts +11 -0
  92. package/dist/client/agent-chat.d.ts.map +1 -1
  93. package/dist/client/agent-chat.js +1 -1
  94. package/dist/client/agent-chat.js.map +1 -1
  95. package/dist/client/analytics.d.ts +5 -8
  96. package/dist/client/analytics.d.ts.map +1 -1
  97. package/dist/client/analytics.js +53 -11
  98. package/dist/client/analytics.js.map +1 -1
  99. package/dist/client/builder-mark.d.ts +9 -0
  100. package/dist/client/builder-mark.d.ts.map +1 -0
  101. package/dist/client/builder-mark.js +10 -0
  102. package/dist/client/builder-mark.js.map +1 -0
  103. package/dist/client/components/AgentPresenceChip.d.ts +12 -0
  104. package/dist/client/components/AgentPresenceChip.d.ts.map +1 -0
  105. package/dist/client/components/AgentPresenceChip.js +42 -0
  106. package/dist/client/components/AgentPresenceChip.js.map +1 -0
  107. package/dist/client/components/PresenceBar.d.ts +17 -0
  108. package/dist/client/components/PresenceBar.d.ts.map +1 -0
  109. package/dist/client/components/PresenceBar.js +118 -0
  110. package/dist/client/components/PresenceBar.js.map +1 -0
  111. package/dist/client/components/ui/popover.d.ts +8 -0
  112. package/dist/client/components/ui/popover.d.ts.map +1 -0
  113. package/dist/client/components/ui/popover.js +11 -0
  114. package/dist/client/components/ui/popover.js.map +1 -0
  115. package/dist/client/composer/ComposerPlusMenu.d.ts +7 -0
  116. package/dist/client/composer/ComposerPlusMenu.d.ts.map +1 -0
  117. package/dist/client/composer/ComposerPlusMenu.js +183 -0
  118. package/dist/client/composer/ComposerPlusMenu.js.map +1 -0
  119. package/dist/client/composer/TiptapComposer.d.ts.map +1 -1
  120. package/dist/client/composer/TiptapComposer.js +244 -19
  121. package/dist/client/composer/TiptapComposer.js.map +1 -1
  122. package/dist/client/composer/types.d.ts +1 -0
  123. package/dist/client/composer/types.d.ts.map +1 -1
  124. package/dist/client/composer/useVoiceDictation.d.ts +2 -0
  125. package/dist/client/composer/useVoiceDictation.d.ts.map +1 -1
  126. package/dist/client/composer/useVoiceDictation.js +89 -12
  127. package/dist/client/composer/useVoiceDictation.js.map +1 -1
  128. package/dist/client/error-format.d.ts +2 -0
  129. package/dist/client/error-format.d.ts.map +1 -0
  130. package/dist/client/error-format.js +31 -0
  131. package/dist/client/error-format.js.map +1 -0
  132. package/dist/client/index.d.ts +6 -1
  133. package/dist/client/index.d.ts.map +1 -1
  134. package/dist/client/index.js +8 -1
  135. package/dist/client/index.js.map +1 -1
  136. package/dist/client/observability/ObservabilityDashboard.d.ts +5 -0
  137. package/dist/client/observability/ObservabilityDashboard.d.ts.map +1 -0
  138. package/dist/client/observability/ObservabilityDashboard.js +169 -0
  139. package/dist/client/observability/ObservabilityDashboard.js.map +1 -0
  140. package/dist/client/observability/ThumbsFeedback.d.ts +8 -0
  141. package/dist/client/observability/ThumbsFeedback.d.ts.map +1 -0
  142. package/dist/client/observability/ThumbsFeedback.js +64 -0
  143. package/dist/client/observability/ThumbsFeedback.js.map +1 -0
  144. package/dist/client/observability/index.d.ts +4 -0
  145. package/dist/client/observability/index.d.ts.map +1 -0
  146. package/dist/client/observability/index.js +4 -0
  147. package/dist/client/observability/index.js.map +1 -0
  148. package/dist/client/observability/useObservability.d.ts +128 -0
  149. package/dist/client/observability/useObservability.d.ts.map +1 -0
  150. package/dist/client/observability/useObservability.js +109 -0
  151. package/dist/client/observability/useObservability.js.map +1 -0
  152. package/dist/client/onboarding/OnboardingPanel.d.ts.map +1 -1
  153. package/dist/client/onboarding/OnboardingPanel.js +34 -92
  154. package/dist/client/onboarding/OnboardingPanel.js.map +1 -1
  155. package/dist/client/org/RequireActiveOrg.d.ts +33 -0
  156. package/dist/client/org/RequireActiveOrg.d.ts.map +1 -0
  157. package/dist/client/org/RequireActiveOrg.js +68 -0
  158. package/dist/client/org/RequireActiveOrg.js.map +1 -0
  159. package/dist/client/org/TeamPage.d.ts.map +1 -1
  160. package/dist/client/org/TeamPage.js +125 -4
  161. package/dist/client/org/TeamPage.js.map +1 -1
  162. package/dist/client/org/hooks.d.ts +30 -0
  163. package/dist/client/org/hooks.d.ts.map +1 -1
  164. package/dist/client/org/hooks.js +115 -15
  165. package/dist/client/org/hooks.js.map +1 -1
  166. package/dist/client/org/index.d.ts +3 -2
  167. package/dist/client/org/index.d.ts.map +1 -1
  168. package/dist/client/org/index.js +2 -1
  169. package/dist/client/org/index.js.map +1 -1
  170. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  171. package/dist/client/resources/ResourcesPanel.js +8 -4
  172. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  173. package/dist/client/settings/AutomationsSection.d.ts.map +1 -1
  174. package/dist/client/settings/AutomationsSection.js +2 -1
  175. package/dist/client/settings/AutomationsSection.js.map +1 -1
  176. package/dist/client/settings/BrowserSection.js +1 -1
  177. package/dist/client/settings/BrowserSection.js.map +1 -1
  178. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  179. package/dist/client/settings/SettingsPanel.js +133 -20
  180. package/dist/client/settings/SettingsPanel.js.map +1 -1
  181. package/dist/client/settings/VoiceTranscriptionSection.d.ts.map +1 -1
  182. package/dist/client/settings/VoiceTranscriptionSection.js +10 -4
  183. package/dist/client/settings/VoiceTranscriptionSection.js.map +1 -1
  184. package/dist/client/settings/useBuilderStatus.d.ts +26 -0
  185. package/dist/client/settings/useBuilderStatus.d.ts.map +1 -1
  186. package/dist/client/settings/useBuilderStatus.js +128 -4
  187. package/dist/client/settings/useBuilderStatus.js.map +1 -1
  188. package/dist/client/sse-event-processor.d.ts +2 -0
  189. package/dist/client/sse-event-processor.d.ts.map +1 -1
  190. package/dist/client/sse-event-processor.js +16 -2
  191. package/dist/client/sse-event-processor.js.map +1 -1
  192. package/dist/client/tools/ToolEditor.d.ts +5 -0
  193. package/dist/client/tools/ToolEditor.d.ts.map +1 -0
  194. package/dist/client/tools/ToolEditor.js +98 -0
  195. package/dist/client/tools/ToolEditor.js.map +1 -0
  196. package/dist/client/tools/ToolViewer.d.ts +5 -0
  197. package/dist/client/tools/ToolViewer.d.ts.map +1 -0
  198. package/dist/client/tools/ToolViewer.js +309 -0
  199. package/dist/client/tools/ToolViewer.js.map +1 -0
  200. package/dist/client/tools/ToolViewerPage.d.ts +2 -0
  201. package/dist/client/tools/ToolViewerPage.d.ts.map +1 -0
  202. package/dist/client/tools/ToolViewerPage.js +23 -0
  203. package/dist/client/tools/ToolViewerPage.js.map +1 -0
  204. package/dist/client/tools/ToolsListPage.d.ts +2 -0
  205. package/dist/client/tools/ToolsListPage.d.ts.map +1 -0
  206. package/dist/client/tools/ToolsListPage.js +72 -0
  207. package/dist/client/tools/ToolsListPage.js.map +1 -0
  208. package/dist/client/tools/ToolsSidebarSection.d.ts +2 -0
  209. package/dist/client/tools/ToolsSidebarSection.d.ts.map +1 -0
  210. package/dist/client/tools/ToolsSidebarSection.js +188 -0
  211. package/dist/client/tools/ToolsSidebarSection.js.map +1 -0
  212. package/dist/client/tools/index.d.ts +6 -0
  213. package/dist/client/tools/index.d.ts.map +1 -0
  214. package/dist/client/tools/index.js +6 -0
  215. package/dist/client/tools/index.js.map +1 -0
  216. package/dist/client/transcription/BuilderTranscriptionCta.d.ts +9 -0
  217. package/dist/client/transcription/BuilderTranscriptionCta.d.ts.map +1 -0
  218. package/dist/client/transcription/BuilderTranscriptionCta.js +18 -0
  219. package/dist/client/transcription/BuilderTranscriptionCta.js.map +1 -0
  220. package/dist/client/transcription/use-live-transcription.d.ts +29 -0
  221. package/dist/client/transcription/use-live-transcription.d.ts.map +1 -0
  222. package/dist/client/transcription/use-live-transcription.js +156 -0
  223. package/dist/client/transcription/use-live-transcription.js.map +1 -0
  224. package/dist/client/use-builder-enabled.d.ts +17 -0
  225. package/dist/client/use-builder-enabled.d.ts.map +1 -0
  226. package/dist/client/use-builder-enabled.js +36 -0
  227. package/dist/client/use-builder-enabled.js.map +1 -0
  228. package/dist/client/use-chat-threads.d.ts +1 -0
  229. package/dist/client/use-chat-threads.d.ts.map +1 -1
  230. package/dist/client/use-chat-threads.js +29 -0
  231. package/dist/client/use-chat-threads.js.map +1 -1
  232. package/dist/client/use-db-sync.d.ts.map +1 -1
  233. package/dist/client/use-db-sync.js +10 -8
  234. package/dist/client/use-db-sync.js.map +1 -1
  235. package/dist/client/useProductionAgent.d.ts.map +1 -1
  236. package/dist/client/useProductionAgent.js +3 -1
  237. package/dist/client/useProductionAgent.js.map +1 -1
  238. package/dist/collab/agent-identity.d.ts +15 -0
  239. package/dist/collab/agent-identity.d.ts.map +1 -0
  240. package/dist/collab/agent-identity.js +14 -0
  241. package/dist/collab/agent-identity.js.map +1 -0
  242. package/dist/collab/agent-presence.d.ts +59 -0
  243. package/dist/collab/agent-presence.d.ts.map +1 -0
  244. package/dist/collab/agent-presence.js +165 -0
  245. package/dist/collab/agent-presence.js.map +1 -0
  246. package/dist/collab/awareness.d.ts +7 -0
  247. package/dist/collab/awareness.d.ts.map +1 -1
  248. package/dist/collab/awareness.js +2 -2
  249. package/dist/collab/awareness.js.map +1 -1
  250. package/dist/collab/client-struct.d.ts +43 -0
  251. package/dist/collab/client-struct.d.ts.map +1 -0
  252. package/dist/collab/client-struct.js +272 -0
  253. package/dist/collab/client-struct.js.map +1 -0
  254. package/dist/collab/client.d.ts +2 -0
  255. package/dist/collab/client.d.ts.map +1 -1
  256. package/dist/collab/client.js +15 -1
  257. package/dist/collab/client.js.map +1 -1
  258. package/dist/collab/index.d.ts +6 -1
  259. package/dist/collab/index.d.ts.map +1 -1
  260. package/dist/collab/index.js +11 -1
  261. package/dist/collab/index.js.map +1 -1
  262. package/dist/collab/json-to-yjs.d.ts +72 -0
  263. package/dist/collab/json-to-yjs.d.ts.map +1 -0
  264. package/dist/collab/json-to-yjs.js +456 -0
  265. package/dist/collab/json-to-yjs.js.map +1 -0
  266. package/dist/collab/struct-routes.d.ts +52 -0
  267. package/dist/collab/struct-routes.d.ts.map +1 -0
  268. package/dist/collab/struct-routes.js +74 -0
  269. package/dist/collab/struct-routes.js.map +1 -0
  270. package/dist/collab/ydoc-manager.d.ts +19 -0
  271. package/dist/collab/ydoc-manager.d.ts.map +1 -1
  272. package/dist/collab/ydoc-manager.js +49 -0
  273. package/dist/collab/ydoc-manager.js.map +1 -1
  274. package/dist/db/migrations.d.ts +9 -0
  275. package/dist/db/migrations.d.ts.map +1 -1
  276. package/dist/db/migrations.js +75 -10
  277. package/dist/db/migrations.js.map +1 -1
  278. package/dist/deploy/build.js +1 -1
  279. package/dist/file-upload/builder.d.ts.map +1 -1
  280. package/dist/file-upload/builder.js +13 -5
  281. package/dist/file-upload/builder.js.map +1 -1
  282. package/dist/integrations/adapters/email.d.ts +17 -0
  283. package/dist/integrations/adapters/email.d.ts.map +1 -0
  284. package/dist/integrations/adapters/email.js +620 -0
  285. package/dist/integrations/adapters/email.js.map +1 -0
  286. package/dist/integrations/adapters/telegram.d.ts.map +1 -1
  287. package/dist/integrations/adapters/telegram.js +19 -3
  288. package/dist/integrations/adapters/telegram.js.map +1 -1
  289. package/dist/integrations/index.d.ts +1 -0
  290. package/dist/integrations/index.d.ts.map +1 -1
  291. package/dist/integrations/index.js +1 -0
  292. package/dist/integrations/index.js.map +1 -1
  293. package/dist/integrations/internal-token.d.ts +18 -0
  294. package/dist/integrations/internal-token.d.ts.map +1 -0
  295. package/dist/integrations/internal-token.js +86 -0
  296. package/dist/integrations/internal-token.js.map +1 -0
  297. package/dist/integrations/pending-tasks-retry-job.d.ts +15 -0
  298. package/dist/integrations/pending-tasks-retry-job.d.ts.map +1 -0
  299. package/dist/integrations/pending-tasks-retry-job.js +199 -0
  300. package/dist/integrations/pending-tasks-retry-job.js.map +1 -0
  301. package/dist/integrations/pending-tasks-store.d.ts +40 -0
  302. package/dist/integrations/pending-tasks-store.d.ts.map +1 -0
  303. package/dist/integrations/pending-tasks-store.js +151 -0
  304. package/dist/integrations/pending-tasks-store.js.map +1 -0
  305. package/dist/integrations/plugin.d.ts.map +1 -1
  306. package/dist/integrations/plugin.js +151 -9
  307. package/dist/integrations/plugin.js.map +1 -1
  308. package/dist/integrations/task-queue-stats.d.ts +22 -0
  309. package/dist/integrations/task-queue-stats.d.ts.map +1 -0
  310. package/dist/integrations/task-queue-stats.js +117 -0
  311. package/dist/integrations/task-queue-stats.js.map +1 -0
  312. package/dist/integrations/types.d.ts +2 -0
  313. package/dist/integrations/types.d.ts.map +1 -1
  314. package/dist/integrations/webhook-handler.d.ts +23 -4
  315. package/dist/integrations/webhook-handler.d.ts.map +1 -1
  316. package/dist/integrations/webhook-handler.js +217 -59
  317. package/dist/integrations/webhook-handler.js.map +1 -1
  318. package/dist/jobs/tools.d.ts.map +1 -1
  319. package/dist/jobs/tools.js +137 -161
  320. package/dist/jobs/tools.js.map +1 -1
  321. package/dist/mcp-client/manager.d.ts +3 -0
  322. package/dist/mcp-client/manager.d.ts.map +1 -1
  323. package/dist/mcp-client/manager.js +5 -0
  324. package/dist/mcp-client/manager.js.map +1 -1
  325. package/dist/notifications/actions.d.ts +2 -2
  326. package/dist/notifications/actions.d.ts.map +1 -1
  327. package/dist/notifications/actions.js +77 -69
  328. package/dist/notifications/actions.js.map +1 -1
  329. package/dist/oauth-tokens/google-refresh.d.ts.map +1 -1
  330. package/dist/oauth-tokens/google-refresh.js +6 -0
  331. package/dist/oauth-tokens/google-refresh.js.map +1 -1
  332. package/dist/observability/evals.d.ts +22 -0
  333. package/dist/observability/evals.d.ts.map +1 -0
  334. package/dist/observability/evals.js +371 -0
  335. package/dist/observability/evals.js.map +1 -0
  336. package/dist/observability/experiments.d.ts +24 -0
  337. package/dist/observability/experiments.d.ts.map +1 -0
  338. package/dist/observability/experiments.js +274 -0
  339. package/dist/observability/experiments.js.map +1 -0
  340. package/dist/observability/feedback.d.ts +14 -0
  341. package/dist/observability/feedback.d.ts.map +1 -0
  342. package/dist/observability/feedback.js +256 -0
  343. package/dist/observability/feedback.js.map +1 -0
  344. package/dist/observability/index.d.ts +6 -0
  345. package/dist/observability/index.d.ts.map +1 -0
  346. package/dist/observability/index.js +5 -0
  347. package/dist/observability/index.js.map +1 -0
  348. package/dist/observability/plugin.d.ts +2 -0
  349. package/dist/observability/plugin.d.ts.map +1 -0
  350. package/dist/observability/plugin.js +12 -0
  351. package/dist/observability/plugin.js.map +1 -0
  352. package/dist/observability/routes.d.ts +68 -0
  353. package/dist/observability/routes.d.ts.map +1 -0
  354. package/dist/observability/routes.js +301 -0
  355. package/dist/observability/routes.js.map +1 -0
  356. package/dist/observability/store.d.ts +77 -0
  357. package/dist/observability/store.d.ts.map +1 -0
  358. package/dist/observability/store.js +976 -0
  359. package/dist/observability/store.js.map +1 -0
  360. package/dist/observability/traces.d.ts +37 -0
  361. package/dist/observability/traces.d.ts.map +1 -0
  362. package/dist/observability/traces.js +182 -0
  363. package/dist/observability/traces.js.map +1 -0
  364. package/dist/observability/types.d.ts +159 -0
  365. package/dist/observability/types.d.ts.map +1 -0
  366. package/dist/observability/types.js +16 -0
  367. package/dist/observability/types.js.map +1 -0
  368. package/dist/onboarding/default-steps.d.ts.map +1 -1
  369. package/dist/onboarding/default-steps.js +15 -7
  370. package/dist/onboarding/default-steps.js.map +1 -1
  371. package/dist/onboarding/types.d.ts +10 -1
  372. package/dist/onboarding/types.d.ts.map +1 -1
  373. package/dist/org/context.d.ts +43 -1
  374. package/dist/org/context.d.ts.map +1 -1
  375. package/dist/org/context.js +299 -6
  376. package/dist/org/context.js.map +1 -1
  377. package/dist/org/handlers.d.ts +76 -0
  378. package/dist/org/handlers.d.ts.map +1 -1
  379. package/dist/org/handlers.js +460 -32
  380. package/dist/org/handlers.js.map +1 -1
  381. package/dist/org/index.d.ts +2 -2
  382. package/dist/org/index.d.ts.map +1 -1
  383. package/dist/org/index.js +2 -2
  384. package/dist/org/index.js.map +1 -1
  385. package/dist/org/migrations.d.ts.map +1 -1
  386. package/dist/org/migrations.js +8 -0
  387. package/dist/org/migrations.js.map +1 -1
  388. package/dist/org/plugin.d.ts +6 -0
  389. package/dist/org/plugin.d.ts.map +1 -1
  390. package/dist/org/plugin.js +71 -7
  391. package/dist/org/plugin.js.map +1 -1
  392. package/dist/org/schema.d.ts +38 -0
  393. package/dist/org/schema.d.ts.map +1 -1
  394. package/dist/org/schema.js +2 -0
  395. package/dist/org/schema.js.map +1 -1
  396. package/dist/org/types.d.ts +7 -0
  397. package/dist/org/types.d.ts.map +1 -1
  398. package/dist/progress/actions.d.ts +3 -0
  399. package/dist/progress/actions.d.ts.map +1 -1
  400. package/dist/progress/actions.js +86 -110
  401. package/dist/progress/actions.js.map +1 -1
  402. package/dist/progress/routes.d.ts +1 -1
  403. package/dist/progress/routes.js +1 -1
  404. package/dist/scripts/agent-engines/list-agent-engines.js +1 -1
  405. package/dist/scripts/agent-engines/list-agent-engines.js.map +1 -1
  406. package/dist/scripts/agent-engines/manage-agent-engine.d.ts +10 -0
  407. package/dist/scripts/agent-engines/manage-agent-engine.d.ts.map +1 -0
  408. package/dist/scripts/agent-engines/manage-agent-engine.js +47 -0
  409. package/dist/scripts/agent-engines/manage-agent-engine.js.map +1 -0
  410. package/dist/scripts/agent-engines/set-agent-engine.js +2 -2
  411. package/dist/scripts/agent-engines/set-agent-engine.js.map +1 -1
  412. package/dist/scripts/call-agent.d.ts.map +1 -1
  413. package/dist/scripts/call-agent.js +90 -18
  414. package/dist/scripts/call-agent.js.map +1 -1
  415. package/dist/scripts/db/index.d.ts.map +1 -1
  416. package/dist/scripts/db/index.js +2 -0
  417. package/dist/scripts/db/index.js.map +1 -1
  418. package/dist/scripts/db/migrate-user-api-keys.d.ts +24 -0
  419. package/dist/scripts/db/migrate-user-api-keys.d.ts.map +1 -0
  420. package/dist/scripts/db/migrate-user-api-keys.js +224 -0
  421. package/dist/scripts/db/migrate-user-api-keys.js.map +1 -0
  422. package/dist/scripts/db/wipe-leaked-builder-keys.d.ts +27 -0
  423. package/dist/scripts/db/wipe-leaked-builder-keys.d.ts.map +1 -0
  424. package/dist/scripts/db/wipe-leaked-builder-keys.js +163 -0
  425. package/dist/scripts/db/wipe-leaked-builder-keys.js.map +1 -0
  426. package/dist/secrets/register-framework-secrets.d.ts +5 -0
  427. package/dist/secrets/register-framework-secrets.d.ts.map +1 -1
  428. package/dist/secrets/register-framework-secrets.js +7 -44
  429. package/dist/secrets/register-framework-secrets.js.map +1 -1
  430. package/dist/secrets/substitution.d.ts.map +1 -1
  431. package/dist/secrets/substitution.js +14 -2
  432. package/dist/secrets/substitution.js.map +1 -1
  433. package/dist/server/action-discovery.d.ts.map +1 -1
  434. package/dist/server/action-discovery.js +39 -0
  435. package/dist/server/action-discovery.js.map +1 -1
  436. package/dist/server/action-routes.js +1 -1
  437. package/dist/server/action-routes.js.map +1 -1
  438. package/dist/server/agent-chat-plugin.d.ts +39 -0
  439. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  440. package/dist/server/agent-chat-plugin.js +869 -458
  441. package/dist/server/agent-chat-plugin.js.map +1 -1
  442. package/dist/server/agent-teams.js +1 -1
  443. package/dist/server/agent-teams.js.map +1 -1
  444. package/dist/server/analytics.d.ts +5 -6
  445. package/dist/server/analytics.d.ts.map +1 -1
  446. package/dist/server/analytics.js +6 -14
  447. package/dist/server/analytics.js.map +1 -1
  448. package/dist/server/app-name.d.ts +5 -2
  449. package/dist/server/app-name.d.ts.map +1 -1
  450. package/dist/server/app-name.js +14 -3
  451. package/dist/server/app-name.js.map +1 -1
  452. package/dist/server/app-url.d.ts.map +1 -1
  453. package/dist/server/app-url.js +10 -1
  454. package/dist/server/app-url.js.map +1 -1
  455. package/dist/server/auth.d.ts +16 -0
  456. package/dist/server/auth.d.ts.map +1 -1
  457. package/dist/server/auth.js +373 -7
  458. package/dist/server/auth.js.map +1 -1
  459. package/dist/server/better-auth-instance.d.ts +2 -0
  460. package/dist/server/better-auth-instance.d.ts.map +1 -1
  461. package/dist/server/better-auth-instance.js +4 -0
  462. package/dist/server/better-auth-instance.js.map +1 -1
  463. package/dist/server/builder-browser.d.ts +59 -1
  464. package/dist/server/builder-browser.d.ts.map +1 -1
  465. package/dist/server/builder-browser.js +139 -23
  466. package/dist/server/builder-browser.js.map +1 -1
  467. package/dist/server/collab-plugin.d.ts +4 -0
  468. package/dist/server/collab-plugin.d.ts.map +1 -1
  469. package/dist/server/collab-plugin.js +30 -4
  470. package/dist/server/collab-plugin.js.map +1 -1
  471. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  472. package/dist/server/core-routes-plugin.js +241 -33
  473. package/dist/server/core-routes-plugin.js.map +1 -1
  474. package/dist/server/credential-provider.d.ts +50 -2
  475. package/dist/server/credential-provider.d.ts.map +1 -1
  476. package/dist/server/credential-provider.js +125 -2
  477. package/dist/server/credential-provider.js.map +1 -1
  478. package/dist/server/design-token-utils.d.ts +132 -0
  479. package/dist/server/design-token-utils.d.ts.map +1 -0
  480. package/dist/server/design-token-utils.js +714 -0
  481. package/dist/server/design-token-utils.js.map +1 -0
  482. package/dist/server/email.d.ts +10 -0
  483. package/dist/server/email.d.ts.map +1 -1
  484. package/dist/server/email.js +63 -16
  485. package/dist/server/email.js.map +1 -1
  486. package/dist/server/framework-request-handler.d.ts.map +1 -1
  487. package/dist/server/framework-request-handler.js +38 -3
  488. package/dist/server/framework-request-handler.js.map +1 -1
  489. package/dist/server/google-oauth.d.ts +18 -1
  490. package/dist/server/google-oauth.d.ts.map +1 -1
  491. package/dist/server/google-oauth.js +21 -4
  492. package/dist/server/google-oauth.js.map +1 -1
  493. package/dist/server/index.d.ts +3 -3
  494. package/dist/server/index.d.ts.map +1 -1
  495. package/dist/server/index.js +3 -3
  496. package/dist/server/index.js.map +1 -1
  497. package/dist/server/onboarding-html.d.ts.map +1 -1
  498. package/dist/server/onboarding-html.js +43 -5
  499. package/dist/server/onboarding-html.js.map +1 -1
  500. package/dist/server/poll.d.ts.map +1 -1
  501. package/dist/server/poll.js +46 -5
  502. package/dist/server/poll.js.map +1 -1
  503. package/dist/server/ssr-handler.d.ts.map +1 -1
  504. package/dist/server/ssr-handler.js +2 -1
  505. package/dist/server/ssr-handler.js.map +1 -1
  506. package/dist/server/transcribe-voice.d.ts.map +1 -1
  507. package/dist/server/transcribe-voice.js +125 -21
  508. package/dist/server/transcribe-voice.js.map +1 -1
  509. package/dist/sharing/schema.d.ts +1 -1
  510. package/dist/styles/agent-native.css +16 -2
  511. package/dist/templates/default/.agents/skills/progress/SKILL.md +14 -12
  512. package/dist/templates/default/app/root.tsx +57 -13
  513. package/dist/templates/default/react-router.config.ts +3 -0
  514. package/dist/terminal/terminal-plugin.d.ts.map +1 -1
  515. package/dist/terminal/terminal-plugin.js +23 -3
  516. package/dist/terminal/terminal-plugin.js.map +1 -1
  517. package/dist/tools/actions.d.ts +3 -0
  518. package/dist/tools/actions.d.ts.map +1 -0
  519. package/dist/tools/actions.js +140 -0
  520. package/dist/tools/actions.js.map +1 -0
  521. package/dist/tools/fetch-tool.js +1 -1
  522. package/dist/tools/fetch-tool.js.map +1 -1
  523. package/dist/tools/html-shell.d.ts +2 -0
  524. package/dist/tools/html-shell.d.ts.map +1 -0
  525. package/dist/tools/html-shell.js +387 -0
  526. package/dist/tools/html-shell.js.map +1 -0
  527. package/dist/tools/routes.d.ts +2 -0
  528. package/dist/tools/routes.d.ts.map +1 -0
  529. package/dist/tools/routes.js +576 -0
  530. package/dist/tools/routes.js.map +1 -0
  531. package/dist/tools/schema.d.ts +575 -0
  532. package/dist/tools/schema.d.ts.map +1 -0
  533. package/dist/tools/schema.js +112 -0
  534. package/dist/tools/schema.js.map +1 -0
  535. package/dist/tools/store.d.ts +40 -0
  536. package/dist/tools/store.d.ts.map +1 -0
  537. package/dist/tools/store.js +190 -0
  538. package/dist/tools/store.js.map +1 -0
  539. package/dist/tools/theme.d.ts +2 -0
  540. package/dist/tools/theme.d.ts.map +1 -0
  541. package/dist/tools/theme.js +67 -0
  542. package/dist/tools/theme.js.map +1 -0
  543. package/dist/transcription/builder-transcription.d.ts +27 -0
  544. package/dist/transcription/builder-transcription.d.ts.map +1 -0
  545. package/dist/transcription/builder-transcription.js +53 -0
  546. package/dist/transcription/builder-transcription.js.map +1 -0
  547. package/dist/triggers/actions.d.ts +3 -0
  548. package/dist/triggers/actions.d.ts.map +1 -1
  549. package/dist/triggers/actions.js +189 -213
  550. package/dist/triggers/actions.js.map +1 -1
  551. package/dist/vite/action-types-plugin.d.ts.map +1 -1
  552. package/dist/vite/action-types-plugin.js +10 -2
  553. package/dist/vite/action-types-plugin.js.map +1 -1
  554. package/dist/vite/client.d.ts.map +1 -1
  555. package/dist/vite/client.js +26 -6
  556. package/dist/vite/client.js.map +1 -1
  557. package/docs/content/a2a-protocol.md +2 -2
  558. package/docs/content/agent-mentions.md +1 -1
  559. package/docs/content/authentication.md +51 -0
  560. package/docs/content/automations.md +22 -19
  561. package/docs/content/cloneable-saas.md +59 -62
  562. package/docs/content/deployment.md +21 -61
  563. package/docs/content/faq.md +73 -43
  564. package/docs/content/getting-started.md +37 -61
  565. package/docs/content/key-concepts.md +1 -1
  566. package/docs/content/mcp-clients.md +14 -1
  567. package/docs/content/messaging.md +284 -0
  568. package/docs/content/{enterprise-workspace.md → multi-app-workspace.md} +3 -3
  569. package/docs/content/multi-tenancy.md +1 -1
  570. package/docs/content/progress.md +11 -11
  571. package/docs/content/pure-agent-apps.md +55 -28
  572. package/docs/content/template-calendar.md +61 -56
  573. package/docs/content/template-clips.md +22 -18
  574. package/docs/content/template-content.md +36 -26
  575. package/docs/content/template-dispatch.md +5 -4
  576. package/docs/content/template-forms.md +13 -11
  577. package/docs/content/template-slides.md +43 -31
  578. package/docs/content/template-video.md +49 -22
  579. package/docs/content/tools.md +107 -0
  580. package/docs/content/what-is-agent-native.md +89 -105
  581. package/docs/content/workspace-management.md +1 -1
  582. package/package.json +12 -2
  583. package/src/templates/default/.agents/skills/progress/SKILL.md +14 -12
  584. package/src/templates/default/app/root.tsx +57 -13
  585. package/src/templates/default/react-router.config.ts +3 -0
  586. package/docs/content/integrations.md +0 -198
@@ -0,0 +1,284 @@
1
+ ---
2
+ title: "Messaging"
3
+ description: "Talk to your agent from Slack, email, Telegram, or WhatsApp — same agent, same memory, same tools."
4
+ ---
5
+
6
+ # Messaging
7
+
8
+ Talk to your agent from the platforms you already use. Send a Slack DM, reply to an email, message a Telegram bot, or ping over WhatsApp — same agent, same memory, same tools, same thread history as the web chat.
9
+
10
+ ## Overview {#overview}
11
+
12
+ Messaging integrations let users reach their agent from external messaging platforms instead of opening the web UI. Whichever platform a message comes in on, the agent processes it with the same system prompt, the same actions, and the same database — and replies in the same thread.
13
+
14
+ Each integration works through webhooks. The platform delivers incoming messages over HTTP, the agent processes them in the background, and the response is posted back. No polling, no long-lived connections.
15
+
16
+ > Note: this doc is specifically about platforms you can _message_ your agent over. Other kinds of integrations — Google Docs, OAuth providers, SQL databases, MCP servers, etc. — are covered in their own docs.
17
+
18
+ ## How it works {#how-it-works}
19
+
20
+ The flow is the same for every platform:
21
+
22
+ 1. A user sends a message on the external platform (Slack, email, Telegram, WhatsApp)
23
+ 2. The platform delivers the message to your app via a webhook at `/_agent-native/integrations/<platform>/webhook`
24
+ 3. The integrations plugin validates the request, extracts the message text and thread context, and maps it to an internal conversation thread
25
+ 4. The agent processes the message in the background using the same pipeline as the web chat
26
+ 5. The response is posted back to the external platform in the same thread
27
+
28
+ `User (Slack/Email/Telegram/WhatsApp)` → `Webhook` → `Agent Processing` → `Response posted back`
29
+
30
+ ## Setup {#setup}
31
+
32
+ The integrations plugin auto-mounts when no custom version exists in your template. To customize it, create a plugin file:
33
+
34
+ ```ts
35
+ // server/plugins/integrations.ts
36
+ import { createIntegrationsPlugin } from "@agent-native/core/server";
37
+ import { scriptRegistry } from "../../agent.config";
38
+
39
+ export default createIntegrationsPlugin({
40
+ actions: scriptRegistry,
41
+ systemPrompt: "You are a helpful assistant...",
42
+ });
43
+ ```
44
+
45
+ The plugin registers webhook routes for each enabled platform under `/_agent-native/integrations/`. Which platforms are active depends on which environment variables are configured.
46
+
47
+ ## Dispatch as the orchestrator {#dispatch}
48
+
49
+ Messaging integrations are most powerful when set up in the **Dispatch template** (`templates/dispatch/`). Dispatch is a central control plane that:
50
+
51
+ - Receives inbound messages from every configured platform (Slack, email, Telegram, WhatsApp) in one place
52
+ - Delegates domain-specific work to specialist agents over the [A2A protocol](/docs/a2a-protocol) via the `call-agent` action
53
+ - Sends the result back to the original platform in the same thread
54
+
55
+ The pattern is one inbox, many specialist agents. A user emails the Dispatch agent "make me a slide deck about Q3" → Dispatch delegates to the slides agent → the slides agent returns a URL → Dispatch emails the user back with the link. Same flow for analytics queries, calendar invites, content drafts, anything else you have a specialist agent for.
56
+
57
+ You don't have to use Dispatch — any template that mounts the integrations plugin can receive messages — but Dispatch is the recommended home for messaging because it can route across your whole agent fleet.
58
+
59
+ See [Dispatch template](/docs/template-dispatch) and [A2A protocol](/docs/a2a-protocol) for details.
60
+
61
+ ## Slack {#slack}
62
+
63
+ ### 1. Create a Slack app
64
+
65
+ Go to [api.slack.com/apps](https://api.slack.com/apps) and create a new app. Under **OAuth & Permissions**, add the following bot token scopes:
66
+
67
+ - `chat:write` — send messages
68
+ - `app_mentions:read` — receive @-mentions (optional)
69
+
70
+ ### 2. Enable Event Subscriptions
71
+
72
+ Under **Event Subscriptions**, set the Request URL to:
73
+
74
+ ```text
75
+ https://your-app.example.com/_agent-native/integrations/slack/webhook
76
+ ```
77
+
78
+ Subscribe to the `message.im` bot event (and optionally `app_mention` for channel mentions).
79
+
80
+ ### 3. Set environment variables
81
+
82
+ ```bash
83
+ SLACK_BOT_TOKEN=xoxb-your-bot-token
84
+ SLACK_SIGNING_SECRET=your-signing-secret
85
+ ```
86
+
87
+ The bot token is found under **OAuth & Permissions** after installing the app to your workspace. The signing secret is under **Basic Information**.
88
+
89
+ ## Email {#email}
90
+
91
+ The email adapter receives inbound mail via Resend or SendGrid webhooks and replies in-thread using standard `Message-ID` / `In-Reply-To` / `References` headers. Sender email addresses are treated as identities — if a user emails the agent from `alice@acme.com`, that maps directly to the workspace user with that email.
92
+
93
+ Adapter file: `packages/core/src/integrations/adapters/email.ts`
94
+
95
+ ### 1. Set environment variables
96
+
97
+ ```bash
98
+ EMAIL_AGENT_ADDRESS=agent@your-domain.com
99
+ # Configure ONE of these (Resend or SendGrid):
100
+ RESEND_API_KEY=re_...
101
+ SENDGRID_API_KEY=SG...
102
+ # Optional — recommended for production:
103
+ EMAIL_INBOUND_WEBHOOK_SECRET=your-shared-secret
104
+ ```
105
+
106
+ `EMAIL_AGENT_ADDRESS` is the address users send mail to. Set either `RESEND_API_KEY` _or_ `SENDGRID_API_KEY` — whichever provider you use. `EMAIL_INBOUND_WEBHOOK_SECRET` enables Svix signature verification (Resend) or basic-auth / `x-webhook-secret` header verification (SendGrid).
107
+
108
+ ### 2. Configure the webhook URL
109
+
110
+ ```text
111
+ https://your-app.example.com/_agent-native/integrations/email/webhook
112
+ ```
113
+
114
+ ### 3. Provider setup — Resend
115
+
116
+ Two options for the agent address:
117
+
118
+ - **Free `<slug>.resend.app` address** — no DNS setup required. Pick a slug in the Resend dashboard and your agent gets `agent@<slug>.resend.app`.
119
+ - **Custom domain** — add MX records pointing to Resend per the dashboard's instructions.
120
+
121
+ Then in the Resend dashboard:
122
+
123
+ 1. Go to **Webhooks** → **Add Endpoint**
124
+ 2. Set the URL to `https://your-app.example.com/_agent-native/integrations/email/webhook`
125
+ 3. Subscribe to the `email.received` event
126
+ 4. Copy the signing secret into `EMAIL_INBOUND_WEBHOOK_SECRET`
127
+
128
+ ### 3. Provider setup — SendGrid
129
+
130
+ 1. In your DNS, add an MX record for the agent's domain pointing to `mx.sendgrid.net` (priority 10)
131
+ 2. In the SendGrid dashboard, go to **Settings** → **Inbound Parse** → **Add Host & URL**
132
+ 3. Set the host to your domain and the destination URL to `https://your-app.example.com/_agent-native/integrations/email/webhook`
133
+ 4. (Recommended) Set basic auth or a custom `x-webhook-secret` header matching `EMAIL_INBOUND_WEBHOOK_SECRET`
134
+
135
+ ### Threading and CC behavior
136
+
137
+ - **Threading** uses the standard email headers: the agent's reply sets `In-Reply-To` to the inbound `Message-ID` and accumulates the `References` chain. Most clients (Gmail, Outlook, Apple Mail) thread the conversation automatically.
138
+ - **Direct vs CC'd** — the adapter detects whether the agent was in `To` (directly addressed) or `Cc` (overheard). When CC'd, the agent's reply goes to all original recipients (reply-all). The Dispatch system prompt also instructs the agent to only respond when input is clearly being requested, so it stays out of the way on threads it's only copied on.
139
+ - **Identity** — the sender's email address is the identity. It maps directly to a workspace user with that email; the agent acts on behalf of that user.
140
+
141
+ ### Rich responses
142
+
143
+ Agent replies render as HTML email. The adapter converts markdown to HTML (headings, lists, links, bold, inline code, paragraphs) and wraps it in a minimal styled template, with a plain-text fallback. So tables, bullet lists, and links from the agent come through as proper rich email — not raw markdown.
144
+
145
+ ### Rate limiting and allowed domains
146
+
147
+ - **Rate limit** — 20 inbound messages per sender per hour, enforced in-memory per process. Excess messages are dropped.
148
+ - **Allowed domains** — the `integration_configs` row for `email` accepts an optional `allowedDomains: string[]`. When set, only senders whose domain is in the list are accepted. Use this to restrict the agent to a specific company or tenant.
149
+
150
+ ### Proactive sends
151
+
152
+ The agent can email users on its own (not just reply) by calling the `send-platform-message` action with `platform: "email"`. Useful for digest emails, alerts, or follow-ups from automations and recurring jobs.
153
+
154
+ ## Telegram {#telegram}
155
+
156
+ ### 1. Create a bot
157
+
158
+ Message [@BotFather](https://t.me/BotFather) on Telegram and use the `/newbot` command. You will receive a bot token.
159
+
160
+ ### 2. Set environment variables
161
+
162
+ ```bash
163
+ TELEGRAM_BOT_TOKEN=your-bot-token
164
+ ```
165
+
166
+ ### 3. Register the webhook
167
+
168
+ After deploying your app, call the setup endpoint to register the webhook with Telegram:
169
+
170
+ ```text
171
+ // The integrations plugin exposes a setup endpoint
172
+ POST /_agent-native/integrations/telegram/setup
173
+
174
+ // This calls Telegram's setWebhook API pointing to:
175
+ // https://your-app.example.com/_agent-native/integrations/telegram/webhook
176
+ ```
177
+
178
+ You can also register the webhook manually using the Telegram Bot API if you prefer.
179
+
180
+ ## WhatsApp {#whatsapp}
181
+
182
+ ### 1. Set up the WhatsApp Cloud API
183
+
184
+ Go to the [Meta Developer Portal](https://developers.facebook.com/), create an app, and enable the WhatsApp product. Configure a phone number for your business.
185
+
186
+ ### 2. Set environment variables
187
+
188
+ ```bash
189
+ WHATSAPP_ACCESS_TOKEN=your-access-token
190
+ WHATSAPP_VERIFY_TOKEN=your-verify-token
191
+ WHATSAPP_PHONE_NUMBER_ID=your-phone-number-id
192
+ ```
193
+
194
+ The verify token is a string you choose — Meta uses it during webhook verification. The access token and phone number ID come from the Meta Developer Portal.
195
+
196
+ ### 3. Configure the webhook
197
+
198
+ In the Meta Developer Portal, set the webhook URL to:
199
+
200
+ ```text
201
+ https://your-app.example.com/_agent-native/integrations/whatsapp/webhook
202
+ ```
203
+
204
+ Subscribe to the `messages` webhook field.
205
+
206
+ ## Configuration {#configuration}
207
+
208
+ Integrations can be managed from the settings UI in the sidebar. Each platform shows its connection status and webhook URL. You can enable/disable individual integrations without removing environment variables.
209
+
210
+ The webhook URLs follow a consistent pattern:
211
+
212
+ ```text
213
+ /_agent-native/integrations/<platform>/webhook
214
+
215
+ # Examples:
216
+ /_agent-native/integrations/slack/webhook
217
+ /_agent-native/integrations/email/webhook
218
+ /_agent-native/integrations/telegram/webhook
219
+ /_agent-native/integrations/whatsapp/webhook
220
+ ```
221
+
222
+ ## Thread continuity {#thread-continuity}
223
+
224
+ Conversations from external platforms are mapped to internal threads. Each Slack DM, email thread, Telegram chat, or WhatsApp conversation becomes a persistent thread in the agent-native database. This means:
225
+
226
+ - The agent retains context across messages in the same external conversation
227
+ - External conversations appear in the web UI alongside web-originated threads, tagged with their source platform
228
+ - You can continue a conversation that started in Slack from the web UI, or vice versa
229
+
230
+ For email specifically, threading uses the `Message-ID`, `In-Reply-To`, and `References` headers — the oldest Message-ID in the References chain is treated as the thread root, matching Gmail's behavior.
231
+
232
+ ## Custom adapters {#custom-adapters}
233
+
234
+ To add support for a new messaging platform, implement the `PlatformAdapter` interface:
235
+
236
+ ```ts
237
+ import type { PlatformAdapter } from "@agent-native/core/server";
238
+
239
+ const myAdapter: PlatformAdapter = {
240
+ platform: "discord",
241
+
242
+ // Verify the incoming webhook request is authentic
243
+ verifyRequest(request: Request): Promise<boolean> {
244
+ // Validate signature headers
245
+ },
246
+
247
+ // Extract the message text and thread context from the webhook payload
248
+ parseMessage(body: unknown): Promise<{
249
+ text: string;
250
+ threadId: string;
251
+ senderId: string;
252
+ metadata?: Record<string, unknown>;
253
+ }> {
254
+ // Parse platform-specific payload
255
+ },
256
+
257
+ // Send the agent's response back to the platform
258
+ sendResponse(threadId: string, text: string): Promise<void> {
259
+ // Call the platform's API to post the message
260
+ },
261
+ };
262
+ ```
263
+
264
+ Register your adapter in the integrations plugin config:
265
+
266
+ ```ts
267
+ export default createIntegrationsPlugin({
268
+ actions: scriptRegistry,
269
+ systemPrompt: "You are a helpful assistant...",
270
+ adapters: [myAdapter],
271
+ });
272
+ ```
273
+
274
+ ## Security {#security}
275
+
276
+ Every incoming webhook is verified before processing:
277
+
278
+ - **Slack** — HMAC-SHA256 signature verification using `SLACK_SIGNING_SECRET`. The `X-Slack-Signature` header is checked against the request body.
279
+ - **Email (Resend)** — Svix signature verification using `EMAIL_INBOUND_WEBHOOK_SECRET`, with a 5-minute replay window.
280
+ - **Email (SendGrid)** — basic auth or `x-webhook-secret` header matching `EMAIL_INBOUND_WEBHOOK_SECRET`. Plus optional `allowedDomains` filtering on the sender.
281
+ - **Telegram** — requests are validated by checking the secret token set during webhook registration via the Telegram Bot API.
282
+ - **WhatsApp** — Meta's webhook verification challenge (using `WHATSAPP_VERIFY_TOKEN`) and payload signature validation.
283
+
284
+ All platform credentials (tokens, secrets, API keys) are stored as environment variables and never persisted in the database or source code. Use the settings UI or your deployment platform's env var management to configure them.
@@ -1,15 +1,15 @@
1
1
  ---
2
- title: "Enterprise Workspace"
2
+ title: "Multi-App Workspace"
3
3
  description: "Host many agent-native apps in one monorepo with shared auth, RBAC, skills, instructions, components, and credentials."
4
4
  ---
5
5
 
6
- # Enterprise Workspace
6
+ # Multi-App Workspace
7
7
 
8
8
  When vibe-coding an internal tool takes an afternoon, you don't stop at one. A team ends up with a CRM, a support inbox, a dashboard, a recruiting tracker, an ops console — ten small apps, each scaffolded independently. That's great until you need to change something in all of them.
9
9
 
10
10
  At that point every app has its own `AGENTS.md`, its own auth plugin, its own copy-pasted layout component, its own hard-coded Slack token, its own idea of what an "organization" is. A compliance rule change means ten PRs. Rotating an API key means ten redeployments. A brand refresh means ten different headers drifting out of sync. The thing that made it easy to build them is now making it hard to manage them.
11
11
 
12
- The **enterprise workspace** pattern is how agent-native solves this. You host all your apps in one monorepo alongside a private **workspace core** package. The core owns everything cross-cutting — auth, RBAC, agent skills, `AGENTS.md`, React components, design tokens, shared credentials, shared actions. Each app shrinks down to the handful of screens that make it unique. Change the core once; every app inherits the change on the next dev reload.
12
+ The **multi-app workspace** pattern is how agent-native solves this. You host all your apps in one monorepo alongside a private **workspace core** package. The core owns everything cross-cutting — auth, RBAC, agent skills, `AGENTS.md`, React components, design tokens, shared credentials, shared actions. Each app shrinks down to the handful of screens that make it unique. Change the core once; every app inherits the change on the next dev reload.
13
13
 
14
14
  ## What gets shared {#what-gets-shared}
15
15
 
@@ -85,4 +85,4 @@ If you're evaluating agent-native for a product like a CRM, project tracker, sup
85
85
 
86
86
  - [Authentication](/docs/authentication) — auth modes, social providers, session API
87
87
  - [Security & Data Scoping](/docs/security) — SQL-level isolation, input validation, access guards
88
- - [Enterprise Workspace](/docs/enterprise-workspace) — hosting multiple agent-native apps in one monorepo with shared auth and RBAC
88
+ - [Multi-App Workspace](/docs/multi-app-workspace) — hosting multiple agent-native apps in one monorepo with shared auth and RBAC
@@ -41,7 +41,7 @@ Separate concern from [notifications](/docs/notifications): notifications fire o
41
41
  | `failed` | Error terminal |
42
42
  | `cancelled` | User interrupted |
43
43
 
44
- Terminal statuses set `completed_at`. The UI tray shows only `running` rows; completed rows stay in the database for `list-runs` queries.
44
+ Terminal statuses set `completed_at`. The UI tray shows only `running` rows; completed rows stay in the database for `manage-progress --action=list` queries.
45
45
 
46
46
  ## API {#api}
47
47
 
@@ -123,22 +123,22 @@ export function HeaderBar() {
123
123
 
124
124
  Inline header widget — mount it next to the notifications bell. Shows a spinner icon + count badge when runs are active; click opens a dropdown with one live percent bar per run. Hides the trigger entirely when no active runs. Polls `/_agent-native/runs?active=true` every `pollMs` (default 3 s). Uses shadcn semantic tokens, adapts to light and dark themes.
125
125
 
126
- ## Agent tools {#agent-tools}
126
+ ## Agent tool {#agent-tool}
127
127
 
128
- Four native tools are registered in every template:
128
+ A single `manage-progress` tool is registered in every template. The `action` parameter selects the operation:
129
129
 
130
- | Tool | Purpose |
131
- | --------------------- | --------------------------------------------------------------- |
132
- | `start-run` | Call at the top of a long task. Returns a runId. |
133
- | `update-run-progress` | Call periodically during the task with `percent` and/or `step`. |
134
- | `complete-run` | Terminal — one of `succeeded`, `failed`, `cancelled`. |
135
- | `list-runs` | Inspect recent runs (filter by `active=true`). |
130
+ | Action | Purpose |
131
+ | ---------- | --------------------------------------------------------------- |
132
+ | `start` | Call at the top of a long task. Returns a runId. |
133
+ | `update` | Call periodically during the task with `percent` and/or `step`. |
134
+ | `complete` | Terminal — one of `succeeded`, `failed`, `cancelled`. |
135
+ | `list` | Inspect recent runs (filter by `active=true`). |
136
136
 
137
137
  ### When to start a run {#when-to-start}
138
138
 
139
139
  - Use for anything > ~5 seconds. A spinner with no context feels frozen.
140
140
  - Update at natural checkpoints, not every iteration. Every 5–10% is plenty.
141
- - **Always** call `complete-run`, including in error paths. An orphan `running` row is worse than no row.
141
+ - **Always** call `manage-progress --action=complete`, including in error paths. An orphan `running` row is worse than no row.
142
142
  - Pair with `notify` on completion so the user sees the outcome when they're not actively watching the tray.
143
143
 
144
144
  ## Event bus {#event-bus}
@@ -171,6 +171,6 @@ Notify me that run {{runId}} has been running for a long time.
171
171
 
172
172
  ## What's next
173
173
 
174
- - [**Notifications**](/docs/notifications) — pair with `complete-run` to tell the user when work finishes
174
+ - [**Notifications**](/docs/notifications) — pair with `manage-progress --action=complete` to tell the user when work finishes
175
175
  - [**Automations**](/docs/automations) — watchdog slow runs via `run.progress.updated`
176
176
  - [**Client**](/docs/client) — `useDbSync` for real-time cache invalidation
@@ -1,69 +1,96 @@
1
1
  ---
2
2
  title: "Pure-Agent Apps"
3
- description: "Build an agent without a heavy UIjust the agent plus a minimal observability/management surface. All the framework benefits, none of the dashboard work."
3
+ description: "Apps where the agent is the whole productopen it, ask for what you want, and the agent does the rest."
4
4
  ---
5
5
 
6
6
  # Pure-Agent Apps
7
7
 
8
- Not every agent-native app needs a full SaaS-style interface. Sometimes the agent _is_ the product. A support triage agent. A daily report generator. A research bot. An email auto-responder. An ops runbook executor.
8
+ Imagine opening an app and seeing… just a chat. No dashboard. No sidebar full of menus. No forms. You ask for what you want — "summarize my unread emails," "post the daily metrics to Slack," "find the candidates who replied last week" — and the agent goes off and does it. The output shows up in chat, in Slack, in your inbox, wherever it belongs.
9
9
 
10
- For these, the "app" is mostly just the agent doing work in the background. You still want a UI — but a minimal one, focused on **observability, management, and steering** rather than hand-crafted dashboards and forms.
10
+ That's a pure-agent app. The agent _is_ the product.
11
11
 
12
- This is the "agents benefit from a UI even when there's no rich app around them" pattern. The hot take is "agents will replace apps." The reality is "every agent eventually needs a UI for humans to supervise, configure, and debug it." Agent-native gives you that UI for free.
12
+ ## What it feels like to use one {#user-experience}
13
13
 
14
- ## The minimum viable UI {#minimum-ui}
14
+ Most apps are built around a UI: a database table you browse, a form you fill, a chart you read. The agent is a sidekick.
15
15
 
16
- A pure-agent app ships with five surfaces, all provided by the framework — you don't build them:
16
+ In a pure-agent app, that's flipped. The chat is the front door. You type a request; the agent takes action; you see the result. Everything else settings, history, what's currently running — is one click away, but most of the time you don't need it.
17
17
 
18
- 1. **Chat** the main input. Users talk to the agent, steer it, queue tasks. (`<AgentSidebar>` or `<AgentPanel>`)
19
- 2. **Workspace** — skills, memory (`learnings.md`), `AGENTS.md`, custom sub-agents, connected MCP servers, scheduled jobs. Customize the agent's behavior without shipping code. (Workspace tab in the sidebar)
20
- 3. **Job history** — which scheduled jobs ran, when, whether they succeeded, what they did. (Workspace tab → `jobs/`)
21
- 4. **Thread history** — every past conversation, each preserved with its tool calls and final output. (Chat tab)
22
- 5. **Settings** — API keys, connected accounts, onboarding status. (Sidebar settings)
18
+ Examples of where this works really well:
23
19
 
24
- Those five together are enough UI for most pure-agent use cases. No analytics dashboard. No Kanban. No forms. Just: talk to it, see what it's done, configure how it behaves.
20
+ - **Background workers** a triage agent that watches your inbox and labels things, a daily-report agent that posts to Slack each morning, an on-call agent that responds to alerts.
21
+ - **One-shot helpers** — "research this company and write a one-pager," "scan my GitHub issues and tell me which ones look stale."
22
+ - **Channel-driven assistants** — agents you mostly talk to from Slack, Telegram, email, or another agent (via [A2A](/docs/a2a-protocol)). The "app" itself is mostly a control panel.
23
+ - **Internal tools** — an agent that knows your runbooks, your APIs, your conventions, and can act on them.
25
24
 
26
- ## When to pick this pattern {#when-to-pick}
25
+ The hot take is "agents will replace apps." The honest version is "agents still need a UI — for humans to supervise, configure, and steer them." Pure-agent apps give you that UI without the dashboard sprawl.
27
26
 
28
- Pure-agent makes sense when:
27
+ ## When this beats a traditional app {#when}
29
28
 
30
- - **The work happens in the background.** Scheduled jobs, webhook-triggered handlers, Slack/Telegram responders. Users rarely sit in the app.
31
- - **The output leaves the app.** The agent posts to Slack, sends email, writes to a third-party system. There's nothing to view in-app; the value is elsewhere.
32
- - **The domain is one-shot.** A research bot that returns a report. No persistent object to dashboard.
33
- - **You're prototyping.** Ship the agent now; add a rich UI only when you've proven users need it.
29
+ Pick the pure-agent pattern when:
34
30
 
35
- Pick a full [cloneable SaaS](/docs/cloneable-saas) template instead when the app has real persistent objects (emails, events, documents, charts) users need to browse, pivot, and share.
31
+ - **The work happens in the background.** Most of the value is created while the user isn't looking.
32
+ - **The output leaves the app.** The agent posts to Slack, sends email, updates a third-party system. There's nothing to browse in-app — the value is elsewhere.
33
+ - **The domain is one-shot.** Research bot, summary generator, report writer. There's no persistent object that needs a list view.
34
+ - **You're prototyping.** Ship the agent now; add a richer UI later if it turns out users actually want one.
36
35
 
37
- ## The minimal scaffold {#scaffold}
36
+ If your product is built around persistent objects users browse, pivot, and share — emails, events, documents, charts — pick a [cloneable SaaS](/docs/cloneable-saas) template instead. Those have full UIs _plus_ the agent.
38
37
 
39
- Start from the **Starter** template:
38
+ ## What ships in the box {#minimum-ui}
39
+
40
+ Every pure-agent app gets five built-in surfaces, all provided by the framework — you don't build them:
41
+
42
+ 1. **Chat** — the main input. Users talk to the agent, steer it, queue tasks.
43
+ 2. **Workspace** — skills, memory, instructions, custom sub-agents, connected MCP servers, scheduled jobs. Customize the agent's behavior without shipping code.
44
+ 3. **Job history** — which scheduled jobs ran, when, whether they succeeded, what they did.
45
+ 4. **Thread history** — every past conversation, each preserved with its tool calls and final output.
46
+ 5. **Settings** — API keys, connected accounts, onboarding status.
47
+
48
+ Those five are usually enough. No analytics dashboard. No Kanban. No forms. Just: talk to it, see what it's done, configure how it behaves.
49
+
50
+ ## Why you'd pick this over "an app with an AI sidebar" {#vs-traditional}
51
+
52
+ Two reasons:
53
+
54
+ 1. **You don't have to build the UI.** A pure-agent app skips weeks of dashboard work. The chat handles input; the framework handles supervision and history; the agent handles output.
55
+ 2. **It's channel-agnostic from day one.** The same agent that runs in your web UI also runs from Slack, Telegram, email, and other agents — because everything goes through the agent, not the UI. See [Messaging the agent](/docs/messaging) for how that works.
56
+
57
+ The trade-off: pure-agent apps don't give users a "browse-everything-at-a-glance" view. If your users need that, mix patterns: start pure-agent, add a small status page or list view if you discover users want one.
58
+
59
+ ## Building one {#building}
60
+
61
+ If you're not a developer, you can usually start with the [Dispatch template](/docs/template-dispatch) — it's a workspace-style pure-agent app with Slack/Telegram, scheduled jobs, and shared secrets out of the box.
62
+
63
+ For developers who want the absolute minimum, start from the **Starter** template:
40
64
 
41
65
  ```bash
42
66
  pnpm dlx @agent-native/core create my-agent --template starter
43
67
  ```
44
68
 
45
- Starter gives you the six-rules architecture, the agent panel, the workspace, auth, polling, and one example action — and nothing else. Add your own actions in `actions/`, connect any MCP servers you need, write the relevant skills into the workspace, and you're done. The "UI" is the agent sidebar — which is already complete.
69
+ Starter gives you the architecture, the agent panel, the workspace, auth, polling, and one example action — and nothing else. Add your own actions in `actions/`, connect any MCP servers you need, write the relevant skills into the workspace, and you're done.
46
70
 
47
- If you really want _zero_ UI except the agent, `app/routes/index.tsx` can just render `<AgentPanel defaultMode="chat" />` fullscreen. The only thing the user sees is the chat. Everything else — job history, workspace, settings — is one click away in the panel's tabs.
71
+ If you really want _zero_ UI except the agent, `app/routes/index.tsx` can render `<AgentPanel defaultMode="chat" />` fullscreen. The only thing the user sees is the chat. Everything else — job history, workspace, settings — is one click away in the panel's tabs.
48
72
 
49
- ## What you still get for free {#still-free}
73
+ ### What you still get for free {#still-free}
50
74
 
51
75
  Even with no custom UI, you still inherit every framework benefit:
52
76
 
53
- - **Actions** as agent tools + HTTP endpoints + MCP tools + A2A tools. External agents, Claude Desktop, and your own HTTP clients can drive the agent without going through the chat UI.
54
- - **Recurring jobs** for scheduled work — "every morning at 7 summarize my unread emails and post to Slack."
77
+ - **Actions** as agent tools, HTTP endpoints, MCP tools, and A2A tools. External agents, Claude Desktop, and your own HTTP clients can drive the agent without going through the chat UI.
78
+ - **Recurring jobs** for scheduled work — "every morning at 7, summarize my unread emails and post to Slack."
55
79
  - **The workspace** for per-user customization, skills, memory, MCP connections.
56
80
  - **Sub-agent delegation** via [agent teams](/docs/agent-teams).
57
81
  - **Portability** — deploys to any serverless host, any SQL database.
58
82
  - **Multi-tenant by default** — each user gets their own workspace without a dev-box.
59
83
 
60
- ## Adding a tiny bit of UI {#tiny-ui}
84
+ ### Adding a tiny bit of UI {#tiny-ui}
61
85
 
62
- Most "pure-agent" apps eventually want a little bit of custom UI — not a dashboard, but maybe a status page, a job history, or a config screen. The [drop-in agent](/docs/drop-in-agent) components coexist with anything else you render. Add a single `/status` route that lists recent runs; keep everything else in the chat. That's usually enough.
86
+ Most pure-agent apps eventually want a little custom UI — not a dashboard, but maybe a status page, a job history, or a config screen. The [drop-in agent](/docs/drop-in-agent) components coexist with anything else you render. Add a single `/status` route that lists recent runs; keep everything else in the chat. That's usually enough.
63
87
 
64
88
  ## What's next
65
89
 
90
+ - [**Getting Started**](/docs/getting-started) — clone the Starter template
91
+ - [**Messaging the agent**](/docs/messaging) — how users talk to the agent across web, Slack, Telegram, email
66
92
  - [**Recurring Jobs**](/docs/recurring-jobs) — scheduled prompts the agent runs on its own
93
+ - [**Dispatch**](/docs/template-dispatch) — the workspace template that's a great starting point for pure-agent apps
67
94
  - [**Drop-in Agent**](/docs/drop-in-agent) — mounting `<AgentPanel>` fullscreen or in a sidebar
68
95
  - [**Actions**](/docs/actions) — the tools your pure-agent will call
69
96
  - [**Workspace**](/docs/workspace) — the customization surface for skills, memory, and MCP servers