@agent-native/core 0.115.4 → 0.116.0

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 (408) hide show
  1. package/agent-native.eject.json +1 -0
  2. package/corpus/README.md +3 -3
  3. package/corpus/core/CHANGELOG.md +28 -0
  4. package/corpus/core/agent-native.eject.json +1 -0
  5. package/corpus/core/docs/AGENTS.md +1 -1
  6. package/corpus/core/docs/content/agent-mentions.mdx +2 -2
  7. package/corpus/core/docs/content/{workspace.mdx → agent-resources.mdx} +1 -7
  8. package/corpus/core/docs/content/agent-teams.mdx +4 -4
  9. package/corpus/core/docs/content/dispatch.mdx +10 -10
  10. package/corpus/core/docs/content/drop-in-agent.mdx +4 -4
  11. package/corpus/core/docs/content/external-agents.mdx +1 -1
  12. package/corpus/core/docs/content/frames.mdx +1 -1
  13. package/corpus/core/docs/content/integrations.mdx +13 -2
  14. package/corpus/core/docs/content/key-concepts.mdx +2 -2
  15. package/corpus/core/docs/content/mcp-clients.mdx +7 -1
  16. package/corpus/core/docs/content/multi-app-workspace.mdx +3 -3
  17. package/corpus/core/docs/content/real-time-collaboration.mdx +33 -15
  18. package/corpus/core/docs/content/recurring-jobs.mdx +7 -7
  19. package/corpus/core/docs/content/skills-guide.mdx +4 -4
  20. package/corpus/core/docs/content/template-brain.mdx +1 -1
  21. package/corpus/core/docs/content/toolkit-collaboration.mdx +1 -1
  22. package/corpus/core/docs/content/using-your-agent.mdx +1 -1
  23. package/corpus/core/docs/content/what-is-agent-native.mdx +4 -4
  24. package/corpus/core/docs/content/workspace-management.mdx +4 -4
  25. package/corpus/core/package.json +1 -1
  26. package/corpus/core/src/agent/production-agent.ts +13 -3
  27. package/corpus/core/src/cli/doctor.ts +6 -1
  28. package/corpus/core/src/client/AgentPanel.tsx +79 -41
  29. package/corpus/core/src/client/AssistantChat.tsx +71 -25
  30. package/corpus/core/src/client/FeedbackButton.tsx +33 -7
  31. package/corpus/core/src/client/MultiTabAssistantChat.tsx +6 -8
  32. package/corpus/core/src/client/agent-chat-adapter.ts +11 -2
  33. package/corpus/core/src/client/agent-page/AgentTabFrame.tsx +22 -3
  34. package/corpus/core/src/client/agent-page/AgentTabsPage.tsx +34 -19
  35. package/corpus/core/src/client/chat/message-components.tsx +43 -16
  36. package/corpus/core/src/client/chat/tool-call-display.tsx +30 -18
  37. package/corpus/core/src/client/chat/tool-render-registry.tsx +2 -0
  38. package/corpus/core/src/client/resources/McpConnectionSuggestion.tsx +19 -2
  39. package/corpus/core/src/client/resources/ResourceTree.tsx +7 -10
  40. package/corpus/core/src/client/resources/ResourcesPanel.tsx +33 -70
  41. package/corpus/core/src/client/resources/mcp-connection-resume.ts +107 -0
  42. package/corpus/core/src/client/resources/mcp-integration-catalog.ts +65 -12
  43. package/corpus/core/src/client/resources/mcp-integration-logos.ts +4 -0
  44. package/corpus/core/src/client/sse-event-processor.ts +50 -14
  45. package/corpus/core/src/client/use-db-sync.ts +16 -6
  46. package/corpus/core/src/connections/catalog.ts +7 -1
  47. package/corpus/core/src/eject/remote-mcp-presets.ts +37 -5
  48. package/corpus/core/src/guards/explicit-collab-access.ts +229 -0
  49. package/corpus/core/src/guards/index.ts +1 -0
  50. package/corpus/core/src/localization/default-messages.ts +54 -5
  51. package/corpus/core/src/mcp/connect-route.ts +34 -51
  52. package/corpus/core/src/provider-api/index.ts +1 -1
  53. package/corpus/core/src/server/collab-plugin.ts +137 -18
  54. package/corpus/core/src/server/index.ts +2 -0
  55. package/corpus/core/src/styles/agent-native.css +40 -0
  56. package/corpus/core/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  57. package/corpus/core/src/templates/default/.agents/skills/real-time-collab/SKILL.md +35 -13
  58. package/corpus/core/src/templates/default/.agents/skills/real-time-sync/SKILL.md +1 -1
  59. package/corpus/core/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  60. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  61. package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +35 -13
  62. package/corpus/core/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +1 -1
  63. package/corpus/core/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +12 -8
  64. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  65. package/corpus/templates/analytics/.agents/skills/real-time-sync/SKILL.md +1 -1
  66. package/corpus/templates/analytics/AGENTS.md +7 -2
  67. package/corpus/templates/analytics/actions/export-dashboard-panel-to-google-sheet.ts +144 -0
  68. package/corpus/templates/analytics/app/components/layout/Layout.tsx +7 -88
  69. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +34 -37
  70. package/corpus/templates/analytics/app/global.css +0 -4
  71. package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +2 -7
  72. package/corpus/templates/analytics/app/i18n-data.ts +107 -0
  73. package/corpus/templates/analytics/app/lib/data-source-status.ts +9 -0
  74. package/corpus/templates/analytics/app/lib/sql-query.ts +1 -2
  75. package/corpus/templates/analytics/app/pages/Ask.tsx +2 -7
  76. package/corpus/templates/analytics/app/pages/DataSources.tsx +48 -0
  77. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +59 -0
  78. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +2 -0
  79. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/report-panel-window.ts +3 -1
  80. package/corpus/templates/analytics/changelog/2026-07-22-clear-background-chat-progress.md +6 -0
  81. package/corpus/templates/analytics/changelog/2026-07-22-daily-dashboard-email-query-batches.md +6 -0
  82. package/corpus/templates/analytics/changelog/2026-07-22-export-table-panels-directly-to-google-sheets.md +6 -0
  83. package/corpus/templates/analytics/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  84. package/corpus/templates/analytics/changelog/2026-07-22-recent-chats-can-expand-in-the-sidebar.md +6 -0
  85. package/corpus/templates/analytics/seeds/dashboards/agent-native-templates-first-party.json +8 -8
  86. package/corpus/templates/analytics/server/lib/canonical-first-party-dashboard-repair.ts +31 -0
  87. package/corpus/templates/analytics/server/lib/dashboard-report-subscriptions.ts +3 -5
  88. package/corpus/templates/analytics/server/lib/dashboard-report.ts +12 -0
  89. package/corpus/templates/analytics/server/lib/first-party-dashboard-repair.ts +3 -5
  90. package/corpus/templates/analytics/server/lib/first-party-metric-catalog.ts +150 -21
  91. package/corpus/templates/analytics/server/lib/google-sheets-export.ts +188 -0
  92. package/corpus/templates/analytics/server/lib/provider-api.ts +7 -2
  93. package/corpus/templates/analytics/server/plugins/collab.ts +6 -3
  94. package/corpus/templates/analytics/shared/sql-query-limits.ts +1 -0
  95. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  96. package/corpus/templates/assets/.agents/skills/real-time-collab/SKILL.md +35 -13
  97. package/corpus/templates/assets/.agents/skills/real-time-sync/SKILL.md +1 -1
  98. package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -1
  99. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +54 -62
  100. package/corpus/templates/assets/app/hooks/use-navigation-state.ts +2 -6
  101. package/corpus/templates/assets/app/routes/_index.tsx +8 -5
  102. package/corpus/templates/assets/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  103. package/corpus/templates/assets/changelog/2026-07-22-recent-chats-expand-from-a-compact-list.md +6 -0
  104. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  105. package/corpus/templates/brain/.agents/skills/real-time-sync/SKILL.md +1 -1
  106. package/corpus/templates/brain/actions/rotate-source-ingest-token.ts +77 -0
  107. package/corpus/templates/brain/app/components/layout/Layout.tsx +5 -1
  108. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +38 -51
  109. package/corpus/templates/brain/app/hooks/use-navigation-state.ts +2 -9
  110. package/corpus/templates/brain/app/i18n-data.ts +120 -0
  111. package/corpus/templates/brain/app/routes/sources.tsx +156 -5
  112. package/corpus/templates/brain/changelog/2026-07-22-chat-runs-always-end-with-an-answer.md +6 -0
  113. package/corpus/templates/brain/changelog/2026-07-22-clear-background-chat-progress.md +6 -0
  114. package/corpus/templates/brain/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
  115. package/corpus/templates/brain/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  116. package/corpus/templates/brain/changelog/2026-07-22-long-chat-titles-stay-inside-the-sidebar.md +6 -0
  117. package/corpus/templates/brain/changelog/2026-07-22-new-clips-and-webhook-sources-now-show-their-secure-connecti.md +6 -0
  118. package/corpus/templates/brain/jobs/emit-netlify-brain-queue-cron.ts +125 -0
  119. package/corpus/templates/brain/netlify.toml +5 -1
  120. package/corpus/templates/brain/scripts/configure-prod-clips-source.ts +50 -0
  121. package/corpus/templates/brain/server/lib/capture-sanitization.ts +64 -6
  122. package/corpus/templates/brain/server/plugins/agent-chat.ts +4 -0
  123. package/corpus/templates/brain/server/plugins/brain-jobs.ts +1 -0
  124. package/corpus/templates/brain/server/routes/api/brain/queue/run.post.ts +55 -0
  125. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  126. package/corpus/templates/calendar/.agents/skills/real-time-sync/SKILL.md +1 -1
  127. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  128. package/corpus/templates/chat/.agents/skills/real-time-sync/SKILL.md +1 -1
  129. package/corpus/templates/chat/app/components/layout/Layout.tsx +1 -0
  130. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +43 -67
  131. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +2 -7
  132. package/corpus/templates/chat/app/routes/_index.tsx +8 -5
  133. package/corpus/templates/chat/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
  134. package/corpus/templates/chat/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  135. package/corpus/templates/chat/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +6 -0
  136. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  137. package/corpus/templates/clips/AGENTS.md +9 -1
  138. package/corpus/templates/clips/actions/export-to-brain.ts +82 -6
  139. package/corpus/templates/clips/actions/request-transcript.ts +25 -14
  140. package/corpus/templates/clips/changelog/2026-07-22-clips-transcripts-now-retry-brain-export.md +5 -0
  141. package/corpus/templates/clips/changelog/2026-07-22-german-umlauts-and-other-non-ascii-characters-now-paste-corr.md +6 -0
  142. package/corpus/templates/clips/desktop/src-tauri/src/clips/mod.rs +26 -3
  143. package/corpus/templates/clips/jobs/emit-netlify-brain-export-cron.ts +118 -0
  144. package/corpus/templates/clips/netlify.toml +4 -1
  145. package/corpus/templates/clips/scripts/configure-prod-brain-export.ts +92 -0
  146. package/corpus/templates/clips/server/jobs/brain-export.ts +182 -0
  147. package/corpus/templates/clips/server/lib/brain-export-state.ts +42 -0
  148. package/corpus/templates/clips/server/lib/post-finalize-dispatch.ts +5 -1
  149. package/corpus/templates/clips/server/plugins/calendar-jobs.ts +2 -0
  150. package/corpus/templates/clips/server/register-secrets.ts +42 -0
  151. package/corpus/templates/clips/server/routes/api/_agent-native-background/post-finalize-worker.post.ts +10 -1
  152. package/corpus/templates/clips/server/routes/api/clips/brain-export/run.post.ts +45 -0
  153. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  154. package/corpus/templates/content/.agents/skills/real-time-sync/SKILL.md +1 -1
  155. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -1
  156. package/corpus/templates/content/server/plugins/collab.ts +1 -1
  157. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  158. package/corpus/templates/crm/actions/_crm-data-program-actions.ts +15 -0
  159. package/corpus/templates/crm/actions/get-crm-dashboard-panel.ts +2 -0
  160. package/corpus/templates/crm/actions/run.ts +2 -6
  161. package/corpus/templates/crm/actions/update-crm-record.ts +4 -2
  162. package/corpus/templates/crm/app/components/layout/CrmLayout.tsx +6 -0
  163. package/corpus/templates/crm/changelog/2026-07-22-crm-field-validation-now-explains-which-fields-cannot-be-edi.md +6 -0
  164. package/corpus/templates/crm/changelog/2026-07-22-fixed-hubspot-contact-syncs-missing-records-updated-after-th.md +6 -0
  165. package/corpus/templates/crm/changelog/2026-07-22-fixed-pipeline-dashboard-panels-so-their-opportunity-data-lo.md +6 -0
  166. package/corpus/templates/crm/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  167. package/corpus/templates/crm/server/crm/hubspot-adapter.ts +4 -1
  168. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  169. package/corpus/templates/design/app/components/layout/Sidebar.tsx +1 -1
  170. package/corpus/templates/design/server/plugins/collab.ts +11 -8
  171. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  172. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  173. package/corpus/templates/forms/.agents/skills/real-time-sync/SKILL.md +1 -1
  174. package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -0
  175. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +1 -1
  176. package/corpus/templates/forms/app/hooks/use-navigation-state.ts +2 -9
  177. package/corpus/templates/forms/app/root.tsx +1 -6
  178. package/corpus/templates/forms/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  179. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  180. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  181. package/corpus/templates/mail/.agents/skills/real-time-sync/SKILL.md +1 -1
  182. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +2 -2
  183. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  184. package/corpus/templates/plan/.agents/skills/real-time-sync/SKILL.md +1 -1
  185. package/corpus/templates/plan/app/components/layout/Layout.tsx +5 -1
  186. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +57 -72
  187. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +2 -9
  188. package/corpus/templates/plan/app/lib/create-plan-routing.ts +2 -2
  189. package/corpus/templates/plan/app/pages/PlanChatPage.tsx +0 -1
  190. package/corpus/templates/plan/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
  191. package/corpus/templates/plan/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  192. package/corpus/templates/plan/changelog/2026-07-22-recent-chats-and-sidebar-controls-are-more-compact.md +6 -0
  193. package/corpus/templates/plan/server/plugins/collab.ts +5 -2
  194. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  195. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +1 -1
  196. package/corpus/templates/slides/server/plugins/collab.ts +11 -8
  197. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  198. package/corpus/templates/tasks/.agents/skills/real-time-sync/SKILL.md +1 -1
  199. package/corpus/templates/tasks/app/components/layout/Sidebar.tsx +5 -22
  200. package/corpus/templates/tasks/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
  201. package/corpus/toolkit/CHANGELOG.md +7 -0
  202. package/corpus/toolkit/README.md +12 -3
  203. package/corpus/toolkit/package.json +1 -1
  204. package/corpus/toolkit/src/chat-history/ChatHistoryRail.tsx +89 -0
  205. package/corpus/toolkit/src/chat-history/index.ts +5 -0
  206. package/corpus/toolkit/src/chat-history.css +59 -0
  207. package/corpus/toolkit/src/composer/RealtimeVoiceMode.tsx +106 -36
  208. package/corpus/toolkit/src/composer/VoiceButton.tsx +49 -0
  209. package/corpus/toolkit/src/composer/realtime-voice-audio-level.ts +2 -1
  210. package/corpus/toolkit/src/composer/useRealtimeVoiceMode.tsx +5 -3
  211. package/corpus/toolkit/src/styles.css +35 -0
  212. package/dist/agent/production-agent.d.ts.map +1 -1
  213. package/dist/agent/production-agent.js +13 -3
  214. package/dist/agent/production-agent.js.map +1 -1
  215. package/dist/cli/doctor.d.ts +1 -1
  216. package/dist/cli/doctor.d.ts.map +1 -1
  217. package/dist/cli/doctor.js +5 -2
  218. package/dist/cli/doctor.js.map +1 -1
  219. package/dist/client/AgentPanel.d.ts +1 -0
  220. package/dist/client/AgentPanel.d.ts.map +1 -1
  221. package/dist/client/AgentPanel.js +38 -18
  222. package/dist/client/AgentPanel.js.map +1 -1
  223. package/dist/client/AssistantChat.d.ts.map +1 -1
  224. package/dist/client/AssistantChat.js +55 -20
  225. package/dist/client/AssistantChat.js.map +1 -1
  226. package/dist/client/FeedbackButton.d.ts +4 -2
  227. package/dist/client/FeedbackButton.d.ts.map +1 -1
  228. package/dist/client/FeedbackButton.js +18 -2
  229. package/dist/client/FeedbackButton.js.map +1 -1
  230. package/dist/client/MultiTabAssistantChat.d.ts +1 -1
  231. package/dist/client/MultiTabAssistantChat.d.ts.map +1 -1
  232. package/dist/client/MultiTabAssistantChat.js +2 -3
  233. package/dist/client/MultiTabAssistantChat.js.map +1 -1
  234. package/dist/client/agent-chat-adapter.d.ts.map +1 -1
  235. package/dist/client/agent-chat-adapter.js +11 -3
  236. package/dist/client/agent-chat-adapter.js.map +1 -1
  237. package/dist/client/agent-page/AgentTabFrame.d.ts +3 -1
  238. package/dist/client/agent-page/AgentTabFrame.d.ts.map +1 -1
  239. package/dist/client/agent-page/AgentTabFrame.js +3 -2
  240. package/dist/client/agent-page/AgentTabFrame.js.map +1 -1
  241. package/dist/client/agent-page/AgentTabsPage.d.ts +2 -0
  242. package/dist/client/agent-page/AgentTabsPage.d.ts.map +1 -1
  243. package/dist/client/agent-page/AgentTabsPage.js +26 -15
  244. package/dist/client/agent-page/AgentTabsPage.js.map +1 -1
  245. package/dist/client/chat/message-components.d.ts +6 -1
  246. package/dist/client/chat/message-components.d.ts.map +1 -1
  247. package/dist/client/chat/message-components.js +17 -11
  248. package/dist/client/chat/message-components.js.map +1 -1
  249. package/dist/client/chat/tool-call-display.d.ts +11 -1
  250. package/dist/client/chat/tool-call-display.d.ts.map +1 -1
  251. package/dist/client/chat/tool-call-display.js +16 -17
  252. package/dist/client/chat/tool-call-display.js.map +1 -1
  253. package/dist/client/chat/tool-render-registry.d.ts +2 -0
  254. package/dist/client/chat/tool-render-registry.d.ts.map +1 -1
  255. package/dist/client/chat/tool-render-registry.js.map +1 -1
  256. package/dist/client/resources/McpConnectionSuggestion.d.ts.map +1 -1
  257. package/dist/client/resources/McpConnectionSuggestion.js +15 -1
  258. package/dist/client/resources/McpConnectionSuggestion.js.map +1 -1
  259. package/dist/client/resources/ResourceTree.d.ts.map +1 -1
  260. package/dist/client/resources/ResourceTree.js +3 -3
  261. package/dist/client/resources/ResourceTree.js.map +1 -1
  262. package/dist/client/resources/ResourcesPanel.d.ts +1 -0
  263. package/dist/client/resources/ResourcesPanel.d.ts.map +1 -1
  264. package/dist/client/resources/ResourcesPanel.js +34 -20
  265. package/dist/client/resources/ResourcesPanel.js.map +1 -1
  266. package/dist/client/resources/mcp-connection-resume.d.ts +11 -0
  267. package/dist/client/resources/mcp-connection-resume.d.ts.map +1 -0
  268. package/dist/client/resources/mcp-connection-resume.js +95 -0
  269. package/dist/client/resources/mcp-connection-resume.js.map +1 -0
  270. package/dist/client/resources/mcp-integration-catalog.d.ts +1 -0
  271. package/dist/client/resources/mcp-integration-catalog.d.ts.map +1 -1
  272. package/dist/client/resources/mcp-integration-catalog.js +63 -8
  273. package/dist/client/resources/mcp-integration-catalog.js.map +1 -1
  274. package/dist/client/resources/mcp-integration-logos.d.ts.map +1 -1
  275. package/dist/client/resources/mcp-integration-logos.js +4 -0
  276. package/dist/client/resources/mcp-integration-logos.js.map +1 -1
  277. package/dist/client/sse-event-processor.d.ts +5 -0
  278. package/dist/client/sse-event-processor.d.ts.map +1 -1
  279. package/dist/client/sse-event-processor.js +39 -13
  280. package/dist/client/sse-event-processor.js.map +1 -1
  281. package/dist/client/use-db-sync.d.ts +3 -2
  282. package/dist/client/use-db-sync.d.ts.map +1 -1
  283. package/dist/client/use-db-sync.js +17 -6
  284. package/dist/client/use-db-sync.js.map +1 -1
  285. package/dist/collab/routes.d.ts +1 -1
  286. package/dist/connections/catalog.d.ts +1 -1
  287. package/dist/connections/catalog.d.ts.map +1 -1
  288. package/dist/connections/catalog.js +7 -1
  289. package/dist/connections/catalog.js.map +1 -1
  290. package/dist/eject/remote-mcp-presets.d.ts.map +1 -1
  291. package/dist/eject/remote-mcp-presets.js +33 -3
  292. package/dist/eject/remote-mcp-presets.js.map +1 -1
  293. package/dist/guards/explicit-collab-access.d.ts +8 -0
  294. package/dist/guards/explicit-collab-access.d.ts.map +1 -0
  295. package/dist/guards/explicit-collab-access.js +214 -0
  296. package/dist/guards/explicit-collab-access.js.map +1 -0
  297. package/dist/guards/index.d.ts +1 -0
  298. package/dist/guards/index.d.ts.map +1 -1
  299. package/dist/guards/index.js +1 -0
  300. package/dist/guards/index.js.map +1 -1
  301. package/dist/localization/default-messages.d.ts +43 -0
  302. package/dist/localization/default-messages.d.ts.map +1 -1
  303. package/dist/localization/default-messages.js +48 -5
  304. package/dist/localization/default-messages.js.map +1 -1
  305. package/dist/mcp/connect-route.d.ts.map +1 -1
  306. package/dist/mcp/connect-route.js +34 -48
  307. package/dist/mcp/connect-route.js.map +1 -1
  308. package/dist/notifications/routes.d.ts +3 -3
  309. package/dist/observability/routes.d.ts +1 -1
  310. package/dist/progress/routes.d.ts +1 -1
  311. package/dist/provider-api/actions/custom-provider-registration.d.ts +11 -11
  312. package/dist/provider-api/actions/provider-api.d.ts +7 -7
  313. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  314. package/dist/provider-api/index.js +1 -1
  315. package/dist/provider-api/index.js.map +1 -1
  316. package/dist/server/collab-plugin.d.ts +34 -3
  317. package/dist/server/collab-plugin.d.ts.map +1 -1
  318. package/dist/server/collab-plugin.js +65 -12
  319. package/dist/server/collab-plugin.js.map +1 -1
  320. package/dist/server/index.d.ts +1 -1
  321. package/dist/server/index.d.ts.map +1 -1
  322. package/dist/server/index.js.map +1 -1
  323. package/dist/styles/agent-native.css +40 -0
  324. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  325. package/dist/templates/chat/.agents/skills/real-time-sync/SKILL.md +1 -1
  326. package/dist/templates/chat/app/components/layout/Layout.tsx +1 -0
  327. package/dist/templates/chat/app/components/layout/Sidebar.tsx +43 -67
  328. package/dist/templates/chat/app/hooks/use-navigation-state.ts +2 -7
  329. package/dist/templates/chat/app/routes/_index.tsx +8 -5
  330. package/dist/templates/chat/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
  331. package/dist/templates/chat/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  332. package/dist/templates/chat/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +6 -0
  333. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  334. package/dist/templates/default/.agents/skills/real-time-collab/SKILL.md +35 -13
  335. package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +1 -1
  336. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  337. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  338. package/dist/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +35 -13
  339. package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +1 -1
  340. package/dist/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +12 -8
  341. package/docs/AGENTS.md +1 -1
  342. package/docs/content/agent-mentions.mdx +2 -2
  343. package/docs/content/{workspace.mdx → agent-resources.mdx} +1 -7
  344. package/docs/content/agent-teams.mdx +4 -4
  345. package/docs/content/dispatch.mdx +10 -10
  346. package/docs/content/drop-in-agent.mdx +4 -4
  347. package/docs/content/external-agents.mdx +1 -1
  348. package/docs/content/frames.mdx +1 -1
  349. package/docs/content/integrations.mdx +13 -2
  350. package/docs/content/key-concepts.mdx +2 -2
  351. package/docs/content/mcp-clients.mdx +7 -1
  352. package/docs/content/multi-app-workspace.mdx +3 -3
  353. package/docs/content/real-time-collaboration.mdx +33 -15
  354. package/docs/content/recurring-jobs.mdx +7 -7
  355. package/docs/content/skills-guide.mdx +4 -4
  356. package/docs/content/template-brain.mdx +1 -1
  357. package/docs/content/toolkit-collaboration.mdx +1 -1
  358. package/docs/content/using-your-agent.mdx +1 -1
  359. package/docs/content/what-is-agent-native.mdx +4 -4
  360. package/docs/content/workspace-management.mdx +4 -4
  361. package/package.json +3 -3
  362. package/src/agent/production-agent.ts +13 -3
  363. package/src/cli/doctor.ts +6 -1
  364. package/src/client/AgentPanel.tsx +79 -41
  365. package/src/client/AssistantChat.tsx +71 -25
  366. package/src/client/FeedbackButton.tsx +33 -7
  367. package/src/client/MultiTabAssistantChat.tsx +6 -8
  368. package/src/client/agent-chat-adapter.ts +11 -2
  369. package/src/client/agent-page/AgentTabFrame.tsx +22 -3
  370. package/src/client/agent-page/AgentTabsPage.tsx +34 -19
  371. package/src/client/chat/message-components.tsx +43 -16
  372. package/src/client/chat/tool-call-display.tsx +30 -18
  373. package/src/client/chat/tool-render-registry.tsx +2 -0
  374. package/src/client/resources/McpConnectionSuggestion.tsx +19 -2
  375. package/src/client/resources/ResourceTree.tsx +7 -10
  376. package/src/client/resources/ResourcesPanel.tsx +33 -70
  377. package/src/client/resources/mcp-connection-resume.ts +107 -0
  378. package/src/client/resources/mcp-integration-catalog.ts +65 -12
  379. package/src/client/resources/mcp-integration-logos.ts +4 -0
  380. package/src/client/sse-event-processor.ts +50 -14
  381. package/src/client/use-db-sync.ts +16 -6
  382. package/src/connections/catalog.ts +7 -1
  383. package/src/eject/remote-mcp-presets.ts +37 -5
  384. package/src/guards/explicit-collab-access.ts +229 -0
  385. package/src/guards/index.ts +1 -0
  386. package/src/localization/default-messages.ts +54 -5
  387. package/src/mcp/connect-route.ts +34 -51
  388. package/src/provider-api/index.ts +1 -1
  389. package/src/server/collab-plugin.ts +137 -18
  390. package/src/server/index.ts +2 -0
  391. package/src/styles/agent-native.css +40 -0
  392. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  393. package/src/templates/chat/.agents/skills/real-time-sync/SKILL.md +1 -1
  394. package/src/templates/chat/app/components/layout/Layout.tsx +1 -0
  395. package/src/templates/chat/app/components/layout/Sidebar.tsx +43 -67
  396. package/src/templates/chat/app/hooks/use-navigation-state.ts +2 -7
  397. package/src/templates/chat/app/routes/_index.tsx +8 -5
  398. package/src/templates/chat/changelog/2026-07-22-compact-sidebar-footer.md +6 -0
  399. package/src/templates/chat/changelog/2026-07-22-full-page-chat-keeps-the-active-conversation-when-moving-to-.md +6 -0
  400. package/src/templates/chat/changelog/2026-07-22-recent-chats-are-easier-to-scan-and-expand.md +6 -0
  401. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  402. package/src/templates/default/.agents/skills/real-time-collab/SKILL.md +35 -13
  403. package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +1 -1
  404. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  405. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -1
  406. package/src/templates/workspace-core/.agents/skills/real-time-collab/SKILL.md +35 -13
  407. package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +1 -1
  408. package/src/templates/workspace-core/.agents/skills/voice-transcription/SKILL.md +12 -8
@@ -0,0 +1,107 @@
1
+ const MCP_CONNECTION_RESUME_STORAGE_KEY = "agent-native:mcp-connection-resume";
2
+ const MCP_CONNECTION_RESUME_EVENT = "agent-native:mcp-connection-complete";
3
+ const MCP_CONNECTION_RESUME_TTL_MS = 10 * 60 * 1_000;
4
+ const MCP_CONNECTION_RESUME_MAX_MESSAGE_LENGTH = 24_000;
5
+
6
+ export interface McpConnectionResumeRequest {
7
+ message: string;
8
+ returnUrl: string;
9
+ createdAt: number;
10
+ }
11
+
12
+ function currentReturnUrl(): string {
13
+ if (typeof window === "undefined") return "/";
14
+ return (
15
+ window.location.pathname + window.location.search + window.location.hash
16
+ );
17
+ }
18
+
19
+ function getSessionStorage(): Storage | null {
20
+ if (typeof window === "undefined") return null;
21
+ try {
22
+ return window.sessionStorage;
23
+ } catch {
24
+ return null;
25
+ }
26
+ }
27
+
28
+ export function saveMcpConnectionResume(message: string): boolean {
29
+ const trimmedMessage = message.trim();
30
+ if (
31
+ !trimmedMessage ||
32
+ trimmedMessage.length > MCP_CONNECTION_RESUME_MAX_MESSAGE_LENGTH
33
+ ) {
34
+ return false;
35
+ }
36
+ const storage = getSessionStorage();
37
+ if (!storage) return false;
38
+
39
+ const request: McpConnectionResumeRequest = {
40
+ message: trimmedMessage,
41
+ returnUrl: currentReturnUrl(),
42
+ createdAt: Date.now(),
43
+ };
44
+ try {
45
+ storage.setItem(MCP_CONNECTION_RESUME_STORAGE_KEY, JSON.stringify(request));
46
+ return true;
47
+ } catch {
48
+ return false;
49
+ }
50
+ }
51
+
52
+ export function clearMcpConnectionResume(): void {
53
+ const storage = getSessionStorage();
54
+ if (!storage) return;
55
+ try {
56
+ storage.removeItem(MCP_CONNECTION_RESUME_STORAGE_KEY);
57
+ } catch {
58
+ // Ignore storage-denied browsers; the pending request is best effort.
59
+ }
60
+ }
61
+
62
+ export function consumeMcpConnectionResume(
63
+ returnUrl = currentReturnUrl(),
64
+ ): McpConnectionResumeRequest | null {
65
+ const storage = getSessionStorage();
66
+ if (!storage) return null;
67
+
68
+ let request: McpConnectionResumeRequest;
69
+ try {
70
+ const raw = storage.getItem(MCP_CONNECTION_RESUME_STORAGE_KEY);
71
+ if (!raw) return null;
72
+ request = JSON.parse(raw) as McpConnectionResumeRequest;
73
+ } catch {
74
+ clearMcpConnectionResume();
75
+ return null;
76
+ }
77
+
78
+ if (
79
+ !request ||
80
+ typeof request.message !== "string" ||
81
+ typeof request.returnUrl !== "string" ||
82
+ typeof request.createdAt !== "number"
83
+ ) {
84
+ clearMcpConnectionResume();
85
+ return null;
86
+ }
87
+ if (Date.now() - request.createdAt > MCP_CONNECTION_RESUME_TTL_MS) {
88
+ clearMcpConnectionResume();
89
+ return null;
90
+ }
91
+ if (request.returnUrl !== returnUrl) return null;
92
+
93
+ clearMcpConnectionResume();
94
+ return request;
95
+ }
96
+
97
+ export function notifyMcpConnectionComplete(): void {
98
+ if (typeof window === "undefined") return;
99
+ window.dispatchEvent(new Event(MCP_CONNECTION_RESUME_EVENT));
100
+ }
101
+
102
+ export function addMcpConnectionCompleteListener(listener: () => void) {
103
+ if (typeof window === "undefined") return () => {};
104
+ window.addEventListener(MCP_CONNECTION_RESUME_EVENT, listener);
105
+ return () =>
106
+ window.removeEventListener(MCP_CONNECTION_RESUME_EVENT, listener);
107
+ }
@@ -49,6 +49,7 @@ export interface DefaultMcpIntegration {
49
49
  templateUses?: readonly string[];
50
50
  };
51
51
  headerPlaceholder?: string;
52
+ aliases?: string[];
52
53
  keywords: string[];
53
54
  }
54
55
 
@@ -121,6 +122,42 @@ export const DEFAULT_MCP_INTEGRATIONS: DefaultMcpIntegration[] = [
121
122
  setupNoteKey: "mcpIntegrations.catalog.notion.setupNote",
122
123
  keywords: ["docs", "knowledge", "notes", "pages"],
123
124
  },
125
+ {
126
+ id: "granola",
127
+ name: "Granola",
128
+ provider: "granola",
129
+ description: "Search meeting notes, transcripts, and action items.",
130
+ descriptionKey: "mcpIntegrations.catalog.granola.description",
131
+ useCase: "meeting notes, recordings, transcripts, action items, follow-ups",
132
+ useCaseKey: "mcpIntegrations.catalog.granola.useCase",
133
+ url: "https://mcp.granola.ai/mcp",
134
+ authMode: "oauth",
135
+ connectionMode: "oauth",
136
+ availability: "ready",
137
+ verification: "preflight-only",
138
+ logoUrl: mcpIntegrationLogo("granola"),
139
+ docsUrl: "https://docs.granola.ai/help-center/sharing/integrations/mcp",
140
+ setupNoteKey: "mcpIntegrations.catalog.granola.setupNote",
141
+ aliases: [
142
+ "meeting notes",
143
+ "meeting recordings",
144
+ "recordings",
145
+ "transcripts",
146
+ "action items",
147
+ "follow-ups",
148
+ "follow ups",
149
+ "decisions",
150
+ ],
151
+ keywords: [
152
+ "meetings",
153
+ "meeting notes",
154
+ "recordings",
155
+ "transcripts",
156
+ "action items",
157
+ "follow-ups",
158
+ "decisions",
159
+ ],
160
+ },
124
161
  {
125
162
  id: "semgrep",
126
163
  name: "Semgrep",
@@ -173,6 +210,7 @@ export const DEFAULT_MCP_INTEGRATIONS: DefaultMcpIntegration[] = [
173
210
  docsUrl:
174
211
  "https://developer.atlassian.com/cloud/rovo-mcp/guides/getting-started/",
175
212
  setupNoteKey: "mcpIntegrations.catalog.atlassian.setupNote",
213
+ aliases: ["jira", "confluence", "rovo"],
176
214
  keywords: ["atlassian", "jira", "confluence", "issues", "tickets"],
177
215
  },
178
216
  {
@@ -679,10 +717,19 @@ export function filterMcpIntegrations(
679
717
  }
680
718
 
681
719
  const MCP_LINK_HOSTS: Record<string, string[]> = {
720
+ context7: ["context7.com"],
721
+ sentry: ["sentry.io", "sentry.dev"],
682
722
  notion: ["notion.so", "notion.site"],
723
+ granola: ["granola.ai"],
724
+ semgrep: ["semgrep.dev", "semgrep.com"],
683
725
  canva: ["canva.com", "canva.ai"],
684
726
  figma: ["figma.com"],
685
727
  linear: ["linear.app"],
728
+ atlassian: ["atlassian.com", "atlassian.net", "jira.com", "confluence.com"],
729
+ supabase: ["supabase.com"],
730
+ neon: ["neon.tech"],
731
+ stripe: ["stripe.com"],
732
+ cloudflare: ["cloudflare.com"],
686
733
  github: ["github.com", "github.dev"],
687
734
  gitlab: ["gitlab.com"],
688
735
  slack: ["slack.com"],
@@ -694,6 +741,8 @@ const MCP_LINK_HOSTS: Record<string, string[]> = {
694
741
  paypal: ["paypal.com"],
695
742
  box: ["box.com"],
696
743
  netlify: ["netlify.com"],
744
+ vercel: ["vercel.com"],
745
+ zapier: ["zapier.com"],
697
746
  };
698
747
 
699
748
  function hostMatches(hostname: string, domain: string): boolean {
@@ -713,7 +762,12 @@ function findUrlForText(text: string): URL | null {
713
762
  }
714
763
 
715
764
  const MCP_RESOURCE_INTENT_PATTERN =
716
- /\b(?:connect|connected|connection|integration|integrate|link|page|document|doc|file|workspace|project|issue|design|board|channel|message|ticket|read|access|open|see|fetch|sync|import)\b/i;
765
+ /\b(?:action|add|access|board|check|connect|connected|connection|create|decision|design|document|doc|do|extract|fetch|file|find|follow[- ]?ups?|get|import|integration|integrate|issue|link|list|meeting|message|notes?|open|page|populate|project|pull|read|recordings?|review|search|see|summary|summarize|sync|task|ticket|todo|transcripts?|turn|use|workspace)\b/i;
766
+
767
+ function textContainsTerm(text: string, term: string): boolean {
768
+ const escaped = term.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
769
+ return new RegExp(`(^|[^a-z0-9])${escaped}([^a-z0-9]|$)`, "i").test(text);
770
+ }
717
771
 
718
772
  export function findMcpIntegrationForText(
719
773
  text: string,
@@ -734,17 +788,16 @@ export function findMcpIntegrationForText(
734
788
  MCP_RESOURCE_INTENT_PATTERN.test(normalizedText) ||
735
789
  isMcpConnectionFailureText(normalizedText);
736
790
  if (!hasResourceIntent) return null;
737
- return (
738
- integrations.find((integration) => {
739
- const aliases = [integration.name, integration.provider, integration.id];
740
- return aliases.some((alias) => {
741
- const escaped = alias.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
742
- return new RegExp(`(^|[^a-z0-9])${escaped}([^a-z0-9]|$)`, "i").test(
743
- normalizedText,
744
- );
745
- });
746
- }) ?? null
747
- );
791
+ const matchesCanonicalName = (integration: DefaultMcpIntegration) =>
792
+ [
793
+ integration.name,
794
+ integration.provider,
795
+ integration.id,
796
+ ...(integration.aliases ?? []),
797
+ ].some((alias) => textContainsTerm(normalizedText, alias));
798
+ const canonicalMatch = integrations.find(matchesCanonicalName);
799
+ if (canonicalMatch) return canonicalMatch;
800
+ return null;
748
801
  }
749
802
 
750
803
  export function isMcpConnectionFailureText(text: string): boolean {
@@ -23,6 +23,10 @@ const LOGOS = {
23
23
  mime: "image/svg+xml",
24
24
  data: "PHN2ZyBmaWxsPSIjMDAwMDAwIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+Tm90aW9uPC90aXRsZT48cGF0aCBkPSJNNC40NTkgNC4yMDhjLjc0Ni42MDYgMS4wMjYuNTYgMi40MjguNDY2bDEzLjIxNS0uNzkzYy4yOCAwIC4wNDctLjI4LS4wNDYtLjMyNkwxNy44NiAxLjk2OGMtLjQyLS4zMjYtLjk4MS0uNy0yLjA1NS0uNjA3TDMuMDEgMi4yOTVjLS40NjYuMDQ2LS41Ni4yOC0uMzc0LjQ2NnptLjc5MyAzLjA4djEzLjkwNGMwIC43NDcuMzczIDEuMDI3IDEuMjE0Ljk4bDE0LjUyMy0uODRjLjg0MS0uMDQ2LjkzNS0uNTYuOTM1LTEuMTY3VjYuMzU0YzAtLjYwNi0uMjMzLS45MzMtLjc0OC0uODg3bC0xNS4xNzcuODg3Yy0uNTYuMDQ3LS43NDcuMzI3LS43NDcuOTMzem0xNC4zMzcuNzQ1Yy4wOTMuNDIgMCAuODQtLjQyLjg4OGwtLjcuMTR2MTAuMjY0Yy0uNjA4LjMyNy0xLjE2OC41MTQtMS42MzUuNTE0LS43NDggMC0uOTM1LS4yMzQtMS40OTUtLjkzM2wtNC41NzctNy4xODZ2Ni45NTJMMTIuMjEgMTlzMCAuODQtMS4xNjguODRsLTMuMjIyLjE4NmMtLjA5My0uMTg2IDAtLjY1My4zMjctLjc0NmwuODQtLjIzM1Y5Ljg1NEw3LjgyMiA5Ljc2Yy0uMDk0LS40Mi4xNC0xLjAyNi43OTMtMS4wNzNsMy40NTYtLjIzMyA0Ljc2NCA3LjI3OXYtNi40NGwtMS4yMTUtLjEzOWMtLjA5My0uNTE0LjI4LS44ODcuNzQ3LS45MzN6TTEuOTM2IDEuMDM1bDEzLjMxLS45OGMxLjYzNC0uMTQgMi4wNTUtLjA0NyAzLjA4Mi43bDQuMjQ5IDIuOTg2Yy43LjUxMy45MzQuNjUzLjkzNCAxLjIxM3YxNi4zNzhjMCAxLjAyNi0uMzczIDEuNjM0LTEuNjggMS43MjZsLTE1LjQ1OC45MzRjLS45OC4wNDctMS40NDgtLjA5My0xLjk2Mi0uNzQ3bC0zLjEyOS00LjA2Yy0uNTYtLjc0Ny0uNzkzLTEuMzA2LS43OTMtMS45NlYyLjY2N2MwLS44MzkuMzc0LTEuNTQgMS40NDctMS42MzJ6Ii8+PC9zdmc+",
25
25
  },
26
+ granola: {
27
+ mime: "image/svg+xml",
28
+ data: "PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHJlY3Qgd2lkdGg9IjI0IiBoZWlnaHQ9IjI0IiByeD0iNiIgZmlsbD0iI2Y0ZWZlNyIvPjxwYXRoIGQ9Ik00IDkuNWMyLjEtMi42IDQuOC0zLjkgOC0zLjlzNS45IDEuMyA4IDMuOWMtMi4xIDIuNi00LjggMy45LTggMy45cy01LjktMS4zLTgtMy45WiIgZmlsbD0iIzI4YTg3OCIvPjxwYXRoIGQ9Ik01LjMgMTIuMmMxLjkgMS43IDQuMSAyLjYgNi43IDIuNnM0LjgtLjkgNi43LTIuNmMtLjUgMy44LTMuMSA2LjItNi43IDYuMnMtNi4yLTIuNC02LjctNi4yWiIgZmlsbD0iIzEzOGY2OCIvPjxjaXJjbGUgY3g9IjkiIGN5PSI5LjUiIHI9IjEiIGZpbGw9IiNmZmYiLz48Y2lyY2xlIGN4PSIxMiIgY3k9IjkuNSIgcj0iMSIgZmlsbD0iI2ZmZiIvPjxjaXJjbGUgY3g9IjE1IiBjeT0iOS41IiByPSIxIiBmaWxsPSIjZmZmIi8+PC9zdmc+",
29
+ },
26
30
  linear: {
27
31
  mime: "image/svg+xml",
28
32
  data: "PHN2ZyBmaWxsPSIjNUU2QUQyIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+TGluZWFyPC90aXRsZT48cGF0aCBkPSJNMi44ODYgNC4xOEExMS45ODIgMTEuOTgyIDAgMCAxIDExLjk5IDBDMTguNjI0IDAgMjQgNS4zNzYgMjQgMTIuMDA5YzAgMy42NC0xLjYyIDYuOTAzLTQuMTggOS4xMDVMMi44ODcgNC4xOFpNMS44MTcgNS42MjZsMTYuNTU2IDE2LjU1NmMtLjUyNC4zMy0xLjA3NS42Mi0xLjY1Ljg2NkwuOTUxIDcuMjc3Yy4yNDctLjU3NS41MzctMS4xMjYuODY2LTEuNjVaTS4zMjIgOS4xNjNsMTQuNTE1IDE0LjUxNWMtLjcxLjE3Mi0xLjQ0My4yODItMi4xOTUuMzIyTDAgMTEuMzU4YTEyIDEyIDAgMCAxIC4zMjItMi4xOTVabS0uMTcgNC44NjIgOS44MjMgOS44MjRhMTIuMDIgMTIuMDIgMCAwIDEtOS44MjQtOS44MjRaIi8+PC9zdmc+",
@@ -974,6 +974,51 @@ function completedToolOnlyMessage(toolNames: string[]): string | null {
974
974
  return `The agent completed ${label}, but stopped before sending a final message. Review the completed tool card above or ask the agent to continue.`;
975
975
  }
976
976
 
977
+ export function appendMissingFinalResponseWarning(
978
+ content: ContentPart[],
979
+ completedToolNames?: Iterable<string>,
980
+ ): { message: string; errorCode: string; recoverable: true } | null {
981
+ const lastTextIndex = lastAssistantTextIndex(content);
982
+ const successfulToolNames = [
983
+ ...new Set(
984
+ completedToolNames ?? completedToolNamesAfterLastAssistantText(content),
985
+ ),
986
+ ];
987
+ let lastToolIndex = -1;
988
+ const materializedToolNames = new Set<string>();
989
+ for (let index = lastTextIndex + 1; index < content.length; index++) {
990
+ const part = content[index];
991
+ if (
992
+ part.type === "tool-call" &&
993
+ part.activity !== true &&
994
+ part.result !== undefined
995
+ ) {
996
+ lastToolIndex = index;
997
+ materializedToolNames.add(part.toolName);
998
+ }
999
+ }
1000
+ if (successfulToolNames.length === 0 && lastTextIndex > lastToolIndex) {
1001
+ return null;
1002
+ }
1003
+ const completedToolMessage = completedToolOnlyMessage(successfulToolNames);
1004
+ const message = completedToolMessage
1005
+ ? completedToolMessage
1006
+ : materializedToolNames.size > 0
1007
+ ? `The agent stopped after ${formatToolNames([...materializedToolNames])} without sending a final message. Review the tool card above or ask the agent to continue.`
1008
+ : "The agent stopped without sending a final message. Ask the agent to continue or retry.";
1009
+ if (!content.some((part) => part.type === "text" && part.text === message)) {
1010
+ content.push({ type: "text", text: message });
1011
+ }
1012
+ return {
1013
+ message,
1014
+ errorCode:
1015
+ successfulToolNames.length > 0 || materializedToolNames.size > 0
1016
+ ? "final_response_missing_after_tool"
1017
+ : "final_response_missing",
1018
+ recoverable: true,
1019
+ };
1020
+ }
1021
+
977
1022
  interface ProcessEventState {
978
1023
  completedToolsAfterLastAssistantText: Set<string>;
979
1024
  /** Set once `agent-chat:stream-progress` has been dispatched for the
@@ -1535,16 +1580,11 @@ export function processEvent(
1535
1580
  } as ChatModelRunResult,
1536
1581
  };
1537
1582
  }
1538
- const toolOnlyMessage = completedToolOnlyMessage(
1539
- state
1540
- ? [...state.completedToolsAfterLastAssistantText]
1541
- : completedToolNamesAfterLastAssistantText(content),
1583
+ const runWarning = appendMissingFinalResponseWarning(
1584
+ content,
1585
+ state ? state.completedToolsAfterLastAssistantText : undefined,
1542
1586
  );
1543
- if (toolOnlyMessage) {
1544
- content.push({
1545
- type: "text",
1546
- text: toolOnlyMessage,
1547
- });
1587
+ if (runWarning) {
1548
1588
  return {
1549
1589
  action: "done",
1550
1590
  result: {
@@ -1552,11 +1592,7 @@ export function processEvent(
1552
1592
  status: { type: "complete" as const, reason: "stop" as const },
1553
1593
  metadata: {
1554
1594
  custom: {
1555
- runWarning: {
1556
- message: toolOnlyMessage,
1557
- errorCode: "final_response_missing_after_tool",
1558
- recoverable: true,
1559
- },
1595
+ runWarning,
1560
1596
  },
1561
1597
  },
1562
1598
  } as ChatModelRunResult,
@@ -33,6 +33,7 @@ const POLL_ABORT_MIN_MS = 10_000;
33
33
  // four times per minute forever. Focus and active agent work still poll now.
34
34
  const SSE_FALLBACK_INTERVAL_MS = 60_000;
35
35
  const IDLE_POLL_INTERVAL_MS = 60_000;
36
+ const HIDDEN_POLL_INTERVAL_MS = 10_000;
36
37
  const POLL_AUTH_FAILURE_COOLDOWN_MS = 60_000;
37
38
  /**
38
39
  * Max cadence for SSE/poll-driven query invalidation in `useDbSync`. Events
@@ -344,11 +345,14 @@ class SyncTransport {
344
345
  }, authDelay);
345
346
  return;
346
347
  }
347
- const base = this.isActive
348
+ const visibleBase = this.isActive
348
349
  ? this.effectiveInterval
349
350
  : this.sseConnected
350
351
  ? this.effectiveFallbackInterval
351
352
  : this.effectiveIdleInterval;
353
+ const base = isDocumentHidden()
354
+ ? Math.max(visibleBase, HIDDEN_POLL_INTERVAL_MS)
355
+ : visibleBase;
352
356
  // Exponential backoff while polls keep failing (500s during a deploy,
353
357
  // DNS blips, a struggling DB). Auth failures have their own cooldown
354
358
  // above; this covers everything else so a down server isn't hammered at
@@ -490,6 +494,11 @@ class SyncTransport {
490
494
  clearTimeout(this.timer);
491
495
  this.timer = null;
492
496
  }
497
+ } else {
498
+ // Keep push connected and the polling safety net alive in backgrounded
499
+ // tabs, but relax an active chat's cadence so hidden work stays current
500
+ // without polling as aggressively as the visible surface.
501
+ this.reschedule();
493
502
  }
494
503
  };
495
504
 
@@ -641,7 +650,7 @@ export function subscribeSyncEvents(
641
650
  transport.add(id, {
642
651
  onEvents: options.onEvents,
643
652
  onSseStateChange: options.onSseStateChange,
644
- pauseWhenHidden: options.pauseWhenHidden ?? true,
653
+ pauseWhenHidden: options.pauseWhenHidden ?? false,
645
654
  interval: options.interval ?? 60_000,
646
655
  idleInterval: options.interval ?? 60_000,
647
656
  fallbackInterval: options.fallbackInterval ?? 60_000,
@@ -675,8 +684,9 @@ export function subscribeSyncEvents(
675
684
  * @param options.interval - Poll interval in ms. Default: 2000
676
685
  * @param options.fallbackInterval - Poll interval while SSE is connected.
677
686
  * Default: 60000
678
- * @param options.pauseWhenHidden - Pause polling while the tab is hidden.
679
- * Default: true
687
+ * @param options.pauseWhenHidden - Pause sync while the tab is hidden.
688
+ * Default: false. Hidden tabs keep SSE connected and poll no faster than
689
+ * every 10 seconds while active; idle polling remains at 60 seconds.
680
690
  * @param options.ignoreSource - Skip events whose `requestSource` matches this
681
691
  * value. Use a per-tab ID so the UI ignores its own writes while still
682
692
  * picking up changes from other tabs, agents, and scripts.
@@ -714,7 +724,7 @@ export function useDbSync(
714
724
  options.fallbackInterval ?? SSE_FALLBACK_INTERVAL_MS,
715
725
  interval,
716
726
  ),
717
- pauseWhenHidden = true,
727
+ pauseWhenHidden = false,
718
728
  } = options;
719
729
  const idleInterval =
720
730
  options.interval === undefined ? IDLE_POLL_INTERVAL_MS : interval;
@@ -1053,7 +1063,7 @@ export function useScreenRefreshKey(
1053
1063
  options.fallbackInterval ?? SSE_FALLBACK_INTERVAL_MS,
1054
1064
  interval,
1055
1065
  ),
1056
- pauseWhenHidden = true,
1066
+ pauseWhenHidden = false,
1057
1067
  } = options;
1058
1068
  const idleInterval =
1059
1069
  options.interval === undefined ? IDLE_POLL_INTERVAL_MS : interval;
@@ -194,7 +194,13 @@ export const WORKSPACE_CONNECTION_PROVIDERS = [
194
194
  },
195
195
  ],
196
196
  capabilities: ["search", "import", "docs"],
197
- recommendedTemplateUses: ["brain", "content", "slides", "dispatch"],
197
+ recommendedTemplateUses: [
198
+ "brain",
199
+ "content",
200
+ "slides",
201
+ "dispatch",
202
+ "analytics",
203
+ ],
198
204
  oauth: {
199
205
  provider: "google",
200
206
  authorizationUrl: "https://accounts.google.com/o/oauth2/v2/auth",
@@ -18,17 +18,49 @@ import { createElement, type ComponentType, type ReactElement } from "react";
18
18
  export * from "@agent-native/core/client/resources/runtime";
19
19
 
20
20
  function preset(id: string): DefaultMcpIntegration {
21
- return {
22
- ...RUNTIME_DEFAULT_MCP_INTEGRATIONS.find(
23
- (integration) => integration.id === id,
24
- )!,
25
- };
21
+ const runtimePreset = RUNTIME_DEFAULT_MCP_INTEGRATIONS.find(
22
+ (integration) => integration.id === id,
23
+ );
24
+ if (runtimePreset) return { ...runtimePreset };
25
+
26
+ if (id === "granola") {
27
+ return {
28
+ id: "granola",
29
+ name: "Granola",
30
+ provider: "granola",
31
+ description: "Search meeting notes, transcripts, and action items.",
32
+ descriptionKey: "mcpIntegrations.catalog.granola.description",
33
+ useCase:
34
+ "meeting notes, recordings, transcripts, action items, follow-ups",
35
+ useCaseKey: "mcpIntegrations.catalog.granola.useCase",
36
+ url: "https://mcp.granola.ai/mcp",
37
+ authMode: "oauth",
38
+ connectionMode: "oauth",
39
+ availability: "ready",
40
+ verification: "preflight-only",
41
+ logoUrl: "",
42
+ docsUrl: "https://docs.granola.ai/help-center/sharing/integrations/mcp",
43
+ setupNoteKey: "mcpIntegrations.catalog.granola.setupNote",
44
+ keywords: [
45
+ "meetings",
46
+ "meeting notes",
47
+ "recordings",
48
+ "transcripts",
49
+ "action items",
50
+ "follow-ups",
51
+ "decisions",
52
+ ],
53
+ };
54
+ }
55
+
56
+ throw new Error(`MCP preset ${id} is missing from the runtime catalog.`);
26
57
  }
27
58
 
28
59
  export const DEFAULT_MCP_INTEGRATIONS: DefaultMcpIntegration[] = [
29
60
  preset("context7"),
30
61
  preset("sentry"),
31
62
  preset("notion"),
63
+ preset("granola"),
32
64
  preset("semgrep"),
33
65
  preset("linear"),
34
66
  preset("atlassian"),