@agent-native/core 0.79.16 → 0.79.18

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 (344) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +14 -0
  3. package/corpus/core/docs/content/file-uploads.md +11 -4
  4. package/corpus/core/docs/content/locales/ar-SA/multi-app-workspace.md +3 -3
  5. package/corpus/core/docs/content/locales/de-DE/multi-app-workspace.md +3 -3
  6. package/corpus/core/docs/content/locales/es-ES/multi-app-workspace.md +3 -3
  7. package/corpus/core/docs/content/locales/fr-FR/multi-app-workspace.md +3 -3
  8. package/corpus/core/docs/content/locales/hi-IN/multi-app-workspace.md +3 -3
  9. package/corpus/core/docs/content/locales/ja-JP/multi-app-workspace.md +3 -3
  10. package/corpus/core/docs/content/locales/ko-KR/multi-app-workspace.md +3 -3
  11. package/corpus/core/docs/content/locales/pt-BR/multi-app-workspace.md +3 -3
  12. package/corpus/core/docs/content/locales/zh-CN/multi-app-workspace.md +3 -3
  13. package/corpus/core/docs/content/locales/zh-TW/multi-app-workspace.md +3 -3
  14. package/corpus/core/docs/content/multi-app-workspace.md +3 -3
  15. package/corpus/core/docs/content/template-clips.md +14 -5
  16. package/corpus/core/package.json +1 -1
  17. package/corpus/core/src/agent/engine/builder-engine.ts +8 -3
  18. package/corpus/core/src/cli/mcp.ts +11 -6
  19. package/corpus/core/src/client/AssistantChat.tsx +6 -2
  20. package/corpus/core/src/client/chat/markdown-renderer.tsx +1 -0
  21. package/corpus/core/src/client/index.ts +7 -1
  22. package/corpus/core/src/client/org/OrgSwitcher.tsx +5 -5
  23. package/corpus/core/src/client/org/TeamPage.tsx +11 -3
  24. package/corpus/core/src/client/settings/SettingsTabsPage.tsx +216 -0
  25. package/corpus/core/src/client/settings/index.ts +5 -0
  26. package/corpus/core/src/file-upload/index.ts +1 -0
  27. package/corpus/core/src/file-upload/registry.ts +22 -6
  28. package/corpus/core/src/file-upload/types.ts +6 -1
  29. package/corpus/core/src/integrations/adapters/email.ts +26 -18
  30. package/corpus/core/src/integrations/adapters/slack.ts +8 -7
  31. package/corpus/core/src/integrations/adapters/telegram.ts +9 -11
  32. package/corpus/core/src/integrations/adapters/whatsapp.ts +12 -9
  33. package/corpus/core/src/integrations/plugin.ts +79 -13
  34. package/corpus/core/src/onboarding/default-steps.ts +6 -3
  35. package/corpus/core/src/onboarding/types.ts +1 -1
  36. package/corpus/core/src/org/handlers.ts +1 -1
  37. package/corpus/core/src/server/agent-chat-plugin.ts +4 -7
  38. package/corpus/core/src/server/better-auth-instance.ts +19 -62
  39. package/corpus/core/src/server/core-routes-plugin.ts +93 -180
  40. package/corpus/core/src/server/create-server.ts +55 -116
  41. package/corpus/core/src/server/email-actions.ts +3 -6
  42. package/corpus/core/src/server/email.ts +52 -17
  43. package/corpus/core/src/server/index.ts +2 -1
  44. package/corpus/core/src/server/scoped-key-storage.ts +223 -0
  45. package/corpus/core/src/shared/agent-env.ts +3 -3
  46. package/corpus/core/src/sharing/actions/share-resource.ts +1 -1
  47. package/corpus/core/src/styles/agent-native.css +55 -3
  48. package/corpus/core/src/templates/workspace-root/AGENTS.md +3 -2
  49. package/corpus/core/src/templates/workspace-root/README.md +1 -1
  50. package/corpus/core/src/templates/workspace-root/scripts/repair-workspace-org.ts +29 -90
  51. package/corpus/core/src/terminal/pty-server.ts +3 -38
  52. package/corpus/core/src/triggers/dispatcher.ts +1 -2
  53. package/corpus/templates/.retired/issues/package.json +7 -0
  54. package/corpus/templates/.retired/meeting-notes/package.json +7 -0
  55. package/corpus/templates/.retired/recruiting/package.json +7 -0
  56. package/corpus/templates/.retired/scheduling/package.json +7 -0
  57. package/corpus/templates/.retired/voice/package.json +7 -0
  58. package/corpus/templates/analytics/app/components/layout/Header.tsx +0 -1
  59. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +0 -17
  60. package/corpus/templates/analytics/app/i18n/zh-TW.ts +7 -1
  61. package/corpus/templates/analytics/app/i18n-data.ts +71 -2
  62. package/corpus/templates/analytics/app/pages/Settings.tsx +120 -73
  63. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +0 -11
  64. package/corpus/templates/analytics/app/routes/catalog.tsx +33 -176
  65. package/corpus/templates/analytics/app/routes/team.tsx +3 -2
  66. package/corpus/templates/analytics/changelog/2026-06-26-dashboard-templates-are-tucked-into-settings-and-show-simple.md +6 -0
  67. package/corpus/templates/analytics/changelog/2026-06-26-the-sessions-page-shows-a-single-page-title-instead-of-repea.md +6 -0
  68. package/corpus/templates/analytics/server/lib/dashboard-catalog.ts +37 -28
  69. package/corpus/templates/assets/app/routes/settings.tsx +65 -43
  70. package/corpus/templates/assets/app/routes/team.tsx +2 -10
  71. package/corpus/templates/brain/app/routes/settings.tsx +390 -358
  72. package/corpus/templates/brain/app/routes/team.tsx +2 -8
  73. package/corpus/templates/calendar/actions/db-connect.ts +5 -29
  74. package/corpus/templates/calendar/app/components/CloudUpgrade.tsx +8 -51
  75. package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +2 -1
  76. package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +4 -2
  77. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +0 -2
  78. package/corpus/templates/calendar/app/pages/Settings.tsx +304 -271
  79. package/corpus/templates/calendar/app/routes/_app.team.tsx +2 -17
  80. package/corpus/templates/calendar/server/handlers/google-auth.ts +22 -9
  81. package/corpus/templates/calendar/server/lib/booking-emails.ts +1 -1
  82. package/corpus/templates/calendar/server/lib/event-guest-notifications.ts +1 -1
  83. package/corpus/templates/calendar/server/lib/google-calendar.ts +48 -28
  84. package/corpus/templates/chat/app/components/layout/Header.tsx +0 -1
  85. package/corpus/templates/chat/app/hooks/use-navigation-state.ts +4 -2
  86. package/corpus/templates/chat/app/routes/settings.tsx +54 -54
  87. package/corpus/templates/chat/app/routes/team.tsx +2 -10
  88. package/corpus/templates/clips/.agents/skills/ai-video-tools/SKILL.md +7 -2
  89. package/corpus/templates/clips/.agents/skills/recording/SKILL.md +1 -1
  90. package/corpus/templates/clips/.agents/skills/video-sharing/SKILL.md +7 -0
  91. package/corpus/templates/clips/AGENTS.md +8 -0
  92. package/corpus/templates/clips/actions/invite-member.ts +1 -1
  93. package/corpus/templates/clips/actions/request-transcript.ts +1 -1
  94. package/corpus/templates/clips/app/components/library/library-layout.tsx +3 -3
  95. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +2 -0
  96. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +629 -643
  97. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +219 -155
  98. package/corpus/templates/clips/changelog/2026-06-26-long-desktop-recordings-are-checkpointed-so-macos-finalizati.md +6 -0
  99. package/corpus/templates/clips/changelog/2026-06-26-non-mac-desktop-recordings-wait-for-upload-transcription.md +6 -0
  100. package/corpus/templates/clips/changelog/2026-06-26-s3-compatible-storage-keys-now-save-securely-from-clips-sett.md +6 -0
  101. package/corpus/templates/clips/changelog/2026-06-26-shared-clip-links-guide-agents-through-processing-transcripts.md +6 -0
  102. package/corpus/templates/clips/changelog/2026-06-26-the-clip-details-sidebar-now-collapses-into-a-slide-out-pane.md +6 -0
  103. package/corpus/templates/clips/changelog/2026-06-26-the-clips-library-now-matches-the-shared-recessed-shell-styl.md +6 -0
  104. package/corpus/templates/clips/desktop/src/lib/recorder.ts +55 -3
  105. package/corpus/templates/clips/desktop/src/lib/transcription-capture.ts +217 -5
  106. package/corpus/templates/clips/desktop/src-tauri/src/lib.rs +1 -0
  107. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +176 -5
  108. package/corpus/templates/clips/server/lib/public-agent-context.ts +31 -0
  109. package/corpus/templates/clips/server/lib/s3-upload-provider.ts +60 -14
  110. package/corpus/templates/clips/server/lib/video-storage.ts +37 -9
  111. package/corpus/templates/clips/server/routes/api/agent-transcript.json.get.ts +5 -0
  112. package/corpus/templates/content/app/components/layout/Header.tsx +0 -1
  113. package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +1 -0
  114. package/corpus/templates/content/app/routes/_app.settings.tsx +54 -55
  115. package/corpus/templates/content/app/routes/_app.team.tsx +2 -28
  116. package/corpus/templates/content/server/lib/notion.ts +43 -11
  117. package/corpus/templates/content/server/routes/api/notion/auth-url.get.ts +2 -2
  118. package/corpus/templates/content/server/routes/api/notion/status.get.ts +3 -3
  119. package/corpus/templates/design/app/routes/settings.tsx +60 -38
  120. package/corpus/templates/design/app/routes/team.tsx +2 -10
  121. package/corpus/templates/dispatch/app/hooks/use-navigation-state.ts +2 -2
  122. package/corpus/templates/dispatch/app/routes/settings.tsx +70 -55
  123. package/corpus/templates/dispatch/app/routes/team.tsx +5 -1
  124. package/corpus/templates/forms/actions/db-connect.ts +7 -36
  125. package/corpus/templates/forms/actions/navigate.ts +2 -2
  126. package/corpus/templates/forms/app/components/CloudUpgrade.tsx +8 -47
  127. package/corpus/templates/forms/app/components/layout/Header.tsx +0 -1
  128. package/corpus/templates/forms/app/components/layout/Layout.tsx +42 -25
  129. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +35 -76
  130. package/corpus/templates/forms/app/global.css +9 -25
  131. package/corpus/templates/forms/app/hooks/use-navigation-state.ts +4 -4
  132. package/corpus/templates/forms/app/i18n/ar-SA.ts +1 -0
  133. package/corpus/templates/forms/app/i18n/de-DE.ts +1 -0
  134. package/corpus/templates/forms/app/i18n/en-US.ts +1 -0
  135. package/corpus/templates/forms/app/i18n/es-ES.ts +1 -0
  136. package/corpus/templates/forms/app/i18n/fr-FR.ts +1 -0
  137. package/corpus/templates/forms/app/i18n/hi-IN.ts +1 -0
  138. package/corpus/templates/forms/app/i18n/ja-JP.ts +1 -0
  139. package/corpus/templates/forms/app/i18n/ko-KR.ts +1 -0
  140. package/corpus/templates/forms/app/i18n/pt-BR.ts +1 -0
  141. package/corpus/templates/forms/app/i18n/zh-CN.ts +1 -0
  142. package/corpus/templates/forms/app/i18n/zh-TW.ts +1 -0
  143. package/corpus/templates/forms/app/lib/route-prewarm.ts +9 -8
  144. package/corpus/templates/forms/app/pages/AskPage.tsx +70 -0
  145. package/corpus/templates/forms/app/pages/FormsListPage.tsx +74 -81
  146. package/corpus/templates/forms/app/root.tsx +1 -1
  147. package/corpus/templates/forms/app/routes/_app.ask.tsx +14 -0
  148. package/corpus/templates/forms/app/routes/_app.settings.tsx +54 -54
  149. package/corpus/templates/forms/app/routes/_app.team.tsx +2 -9
  150. package/corpus/templates/forms/app/routes/_index.tsx +21 -130
  151. package/corpus/templates/forms/changelog/2026-06-26-ask-forms-opens-as-a-standard-app-tab-with-a-simpler-sidebar.md +6 -0
  152. package/corpus/templates/forms/changelog/2026-06-26-forms-are-shown-in-a-tighter-row-list-with-a-denser-sidebar.md +6 -0
  153. package/corpus/templates/forms/shared/navigation.ts +4 -2
  154. package/corpus/templates/macros/app/routes/settings.tsx +54 -54
  155. package/corpus/templates/macros/app/routes/team.tsx +2 -10
  156. package/corpus/templates/mail/actions/helpers.ts +2 -2
  157. package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +2 -1
  158. package/corpus/templates/mail/app/pages/SettingsPage.tsx +5 -5
  159. package/corpus/templates/mail/app/routes/team.tsx +3 -2
  160. package/corpus/templates/mail/server/handlers/emails.ts +3 -2
  161. package/corpus/templates/mail/server/handlers/google-auth.ts +19 -12
  162. package/corpus/templates/mail/server/lib/automation-engine.ts +3 -2
  163. package/corpus/templates/mail/server/lib/email-state.ts +2 -3
  164. package/corpus/templates/mail/server/lib/google-auth.ts +28 -11
  165. package/corpus/templates/mail/server/lib/jobs.ts +3 -2
  166. package/corpus/templates/mail/server/onboarding.ts +9 -6
  167. package/corpus/templates/mail/server/routes/api/attachments.get.ts +3 -3
  168. package/corpus/templates/plan/actions/request-plan-access.ts +1 -1
  169. package/corpus/templates/plan/app/components/layout/Header.tsx +0 -1
  170. package/corpus/templates/plan/app/hooks/use-navigation-state.ts +4 -2
  171. package/corpus/templates/plan/app/lib/route-prewarm.ts +0 -4
  172. package/corpus/templates/plan/app/routes/settings.tsx +75 -73
  173. package/corpus/templates/plan/app/routes/team.tsx +2 -8
  174. package/corpus/templates/plan/server/lib/comment-notifications.ts +1 -1
  175. package/corpus/templates/slides/actions/check-image-gen.ts +2 -1
  176. package/corpus/templates/slides/actions/db-connect.ts +7 -45
  177. package/corpus/templates/slides/actions/edit-image.ts +6 -3
  178. package/corpus/templates/slides/actions/generate-image-api.ts +1 -1
  179. package/corpus/templates/slides/actions/generate-image.ts +2 -2
  180. package/corpus/templates/slides/actions/generate-slides-ai.ts +5 -3
  181. package/corpus/templates/slides/actions/image-gen-status.ts +4 -3
  182. package/corpus/templates/slides/actions/image-search.ts +6 -3
  183. package/corpus/templates/slides/actions/search-images.ts +6 -3
  184. package/corpus/templates/slides/app/components/CloudUpgrade.tsx +8 -51
  185. package/corpus/templates/slides/app/components/layout/Header.tsx +0 -1
  186. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +0 -2
  187. package/corpus/templates/slides/app/routes/settings.tsx +54 -54
  188. package/corpus/templates/slides/app/routes/team.tsx +2 -12
  189. package/corpus/templates/slides/server/handlers/google-docs-auth.ts +9 -9
  190. package/corpus/templates/slides/server/handlers/image-gen.ts +5 -1
  191. package/corpus/templates/slides/server/handlers/image-providers/gemini.ts +9 -1
  192. package/corpus/templates/slides/server/handlers/image-providers/index.ts +18 -8
  193. package/corpus/templates/slides/server/handlers/image-providers/openai.ts +10 -4
  194. package/corpus/templates/slides/server/handlers/image-providers/types.ts +1 -0
  195. package/corpus/templates/slides/server/lib/google-docs-oauth.ts +59 -34
  196. package/corpus/templates/slides/server/register-secrets.ts +60 -0
  197. package/corpus/templates/videos/actions/db-connect.ts +7 -45
  198. package/corpus/templates/videos/app/components/CloudUpgrade.tsx +8 -51
  199. package/corpus/templates/videos/app/components/Sidebar.tsx +1 -9
  200. package/corpus/templates/videos/app/components/layout/Header.tsx +0 -1
  201. package/corpus/templates/videos/app/components/layout/NavSidebar.tsx +0 -3
  202. package/corpus/templates/videos/app/routes/settings.tsx +54 -54
  203. package/corpus/templates/videos/app/routes/team.tsx +2 -8
  204. package/dist/agent/engine/builder-engine.d.ts.map +1 -1
  205. package/dist/agent/engine/builder-engine.js +8 -3
  206. package/dist/agent/engine/builder-engine.js.map +1 -1
  207. package/dist/cli/mcp.d.ts.map +1 -1
  208. package/dist/cli/mcp.js +3 -4
  209. package/dist/cli/mcp.js.map +1 -1
  210. package/dist/client/AssistantChat.d.ts.map +1 -1
  211. package/dist/client/AssistantChat.js +6 -2
  212. package/dist/client/AssistantChat.js.map +1 -1
  213. package/dist/client/chat/markdown-renderer.d.ts.map +1 -1
  214. package/dist/client/chat/markdown-renderer.js +1 -0
  215. package/dist/client/chat/markdown-renderer.js.map +1 -1
  216. package/dist/client/index.d.ts +1 -1
  217. package/dist/client/index.d.ts.map +1 -1
  218. package/dist/client/index.js +1 -1
  219. package/dist/client/index.js.map +1 -1
  220. package/dist/client/org/OrgSwitcher.d.ts +3 -3
  221. package/dist/client/org/OrgSwitcher.js +2 -2
  222. package/dist/client/org/OrgSwitcher.js.map +1 -1
  223. package/dist/client/org/TeamPage.d.ts +6 -1
  224. package/dist/client/org/TeamPage.d.ts.map +1 -1
  225. package/dist/client/org/TeamPage.js +2 -2
  226. package/dist/client/org/TeamPage.js.map +1 -1
  227. package/dist/client/settings/SettingsTabsPage.d.ts +27 -0
  228. package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -0
  229. package/dist/client/settings/SettingsTabsPage.js +108 -0
  230. package/dist/client/settings/SettingsTabsPage.js.map +1 -0
  231. package/dist/client/settings/index.d.ts +1 -0
  232. package/dist/client/settings/index.d.ts.map +1 -1
  233. package/dist/client/settings/index.js +1 -0
  234. package/dist/client/settings/index.js.map +1 -1
  235. package/dist/collab/awareness.d.ts +2 -2
  236. package/dist/collab/awareness.d.ts.map +1 -1
  237. package/dist/collab/routes.d.ts +1 -1
  238. package/dist/file-upload/index.d.ts +1 -1
  239. package/dist/file-upload/index.d.ts.map +1 -1
  240. package/dist/file-upload/index.js +1 -1
  241. package/dist/file-upload/index.js.map +1 -1
  242. package/dist/file-upload/registry.d.ts +1 -0
  243. package/dist/file-upload/registry.d.ts.map +1 -1
  244. package/dist/file-upload/registry.js +24 -6
  245. package/dist/file-upload/registry.js.map +1 -1
  246. package/dist/file-upload/types.d.ts +6 -1
  247. package/dist/file-upload/types.d.ts.map +1 -1
  248. package/dist/file-upload/types.js.map +1 -1
  249. package/dist/integrations/adapters/email.d.ts.map +1 -1
  250. package/dist/integrations/adapters/email.js +18 -18
  251. package/dist/integrations/adapters/email.js.map +1 -1
  252. package/dist/integrations/adapters/slack.d.ts.map +1 -1
  253. package/dist/integrations/adapters/slack.js +8 -7
  254. package/dist/integrations/adapters/slack.js.map +1 -1
  255. package/dist/integrations/adapters/telegram.d.ts.map +1 -1
  256. package/dist/integrations/adapters/telegram.js +9 -9
  257. package/dist/integrations/adapters/telegram.js.map +1 -1
  258. package/dist/integrations/adapters/whatsapp.d.ts.map +1 -1
  259. package/dist/integrations/adapters/whatsapp.js +10 -9
  260. package/dist/integrations/adapters/whatsapp.js.map +1 -1
  261. package/dist/integrations/plugin.d.ts.map +1 -1
  262. package/dist/integrations/plugin.js +47 -13
  263. package/dist/integrations/plugin.js.map +1 -1
  264. package/dist/notifications/routes.d.ts +1 -1
  265. package/dist/onboarding/default-steps.d.ts.map +1 -1
  266. package/dist/onboarding/default-steps.js +6 -5
  267. package/dist/onboarding/default-steps.js.map +1 -1
  268. package/dist/onboarding/types.d.ts +1 -1
  269. package/dist/onboarding/types.d.ts.map +1 -1
  270. package/dist/onboarding/types.js.map +1 -1
  271. package/dist/org/handlers.js +1 -1
  272. package/dist/org/handlers.js.map +1 -1
  273. package/dist/progress/routes.d.ts +1 -1
  274. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  275. package/dist/server/agent-chat-plugin.js +4 -6
  276. package/dist/server/agent-chat-plugin.js.map +1 -1
  277. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  278. package/dist/server/better-auth-instance.d.ts.map +1 -1
  279. package/dist/server/better-auth-instance.js +17 -56
  280. package/dist/server/better-auth-instance.js.map +1 -1
  281. package/dist/server/core-routes-plugin.d.ts +1 -1
  282. package/dist/server/core-routes-plugin.d.ts.map +1 -1
  283. package/dist/server/core-routes-plugin.js +67 -153
  284. package/dist/server/core-routes-plugin.js.map +1 -1
  285. package/dist/server/create-server.d.ts +3 -9
  286. package/dist/server/create-server.d.ts.map +1 -1
  287. package/dist/server/create-server.js +37 -91
  288. package/dist/server/create-server.js.map +1 -1
  289. package/dist/server/email-actions.d.ts +2 -3
  290. package/dist/server/email-actions.d.ts.map +1 -1
  291. package/dist/server/email-actions.js +3 -6
  292. package/dist/server/email-actions.js.map +1 -1
  293. package/dist/server/email.d.ts +3 -3
  294. package/dist/server/email.d.ts.map +1 -1
  295. package/dist/server/email.js +40 -19
  296. package/dist/server/email.js.map +1 -1
  297. package/dist/server/index.d.ts +3 -3
  298. package/dist/server/index.d.ts.map +1 -1
  299. package/dist/server/index.js +3 -3
  300. package/dist/server/index.js.map +1 -1
  301. package/dist/server/scoped-key-storage.d.ts +22 -0
  302. package/dist/server/scoped-key-storage.d.ts.map +1 -0
  303. package/dist/server/scoped-key-storage.js +152 -0
  304. package/dist/server/scoped-key-storage.js.map +1 -0
  305. package/dist/shared/agent-env.d.ts +3 -3
  306. package/dist/shared/agent-env.d.ts.map +1 -1
  307. package/dist/shared/agent-env.js +3 -3
  308. package/dist/shared/agent-env.js.map +1 -1
  309. package/dist/sharing/actions/share-resource.js +1 -1
  310. package/dist/sharing/actions/share-resource.js.map +1 -1
  311. package/dist/styles/agent-native.css +55 -3
  312. package/dist/templates/workspace-root/AGENTS.md +3 -2
  313. package/dist/templates/workspace-root/README.md +1 -1
  314. package/dist/templates/workspace-root/scripts/repair-workspace-org.ts +29 -90
  315. package/dist/terminal/pty-server.d.ts.map +1 -1
  316. package/dist/terminal/pty-server.js +3 -36
  317. package/dist/terminal/pty-server.js.map +1 -1
  318. package/dist/triggers/dispatcher.js +1 -1
  319. package/dist/triggers/dispatcher.js.map +1 -1
  320. package/docs/content/file-uploads.md +11 -4
  321. package/docs/content/locales/ar-SA/multi-app-workspace.md +3 -3
  322. package/docs/content/locales/de-DE/multi-app-workspace.md +3 -3
  323. package/docs/content/locales/es-ES/multi-app-workspace.md +3 -3
  324. package/docs/content/locales/fr-FR/multi-app-workspace.md +3 -3
  325. package/docs/content/locales/hi-IN/multi-app-workspace.md +3 -3
  326. package/docs/content/locales/ja-JP/multi-app-workspace.md +3 -3
  327. package/docs/content/locales/ko-KR/multi-app-workspace.md +3 -3
  328. package/docs/content/locales/pt-BR/multi-app-workspace.md +3 -3
  329. package/docs/content/locales/zh-CN/multi-app-workspace.md +3 -3
  330. package/docs/content/locales/zh-TW/multi-app-workspace.md +3 -3
  331. package/docs/content/multi-app-workspace.md +3 -3
  332. package/docs/content/template-clips.md +14 -5
  333. package/package.json +1 -1
  334. package/src/templates/workspace-root/AGENTS.md +3 -2
  335. package/src/templates/workspace-root/README.md +1 -1
  336. package/src/templates/workspace-root/scripts/repair-workspace-org.ts +29 -90
  337. package/corpus/core/src/server/env-var-writes.ts +0 -16
  338. package/corpus/templates/analytics/app/pages/Team.tsx +0 -9
  339. package/corpus/templates/calendar/app/pages/Team.tsx +0 -12
  340. package/corpus/templates/mail/app/pages/Team.tsx +0 -17
  341. package/dist/server/env-var-writes.d.ts +0 -10
  342. package/dist/server/env-var-writes.d.ts.map +0 -1
  343. package/dist/server/env-var-writes.js +0 -18
  344. package/dist/server/env-var-writes.js.map +0 -1
@@ -1,5 +1,8 @@
1
1
  import { listFileUploadProviders } from "@agent-native/core/file-upload";
2
- import { resolveHasBuilderPrivateKey } from "@agent-native/core/server";
2
+ import {
3
+ resolveHasBuilderPrivateKey,
4
+ runWithRequestContext,
5
+ } from "@agent-native/core/server";
3
6
 
4
7
  export const STORAGE_SETUP_REQUIRED_REASON =
5
8
  "Video storage is not connected yet. Connect Builder.io or configure S3-compatible storage to upload clips.";
@@ -22,16 +25,41 @@ export function requiresConfiguredVideoStorage(): boolean {
22
25
  return process.env.NODE_ENV === "production" || !isLikelyLocalDatabase();
23
26
  }
24
27
 
25
- export async function hasRequestVideoStorage(): Promise<boolean> {
26
- for (const provider of listFileUploadProviders()) {
27
- if (provider.id !== "builder" && provider.isConfigured()) return true;
28
- }
28
+ interface VideoStorageResolveContext {
29
+ userEmail?: string;
30
+ orgId?: string | null;
31
+ }
32
+
33
+ export async function hasRequestVideoStorage(
34
+ context?: VideoStorageResolveContext,
35
+ ): Promise<boolean> {
36
+ const resolve = async () => {
37
+ for (const provider of listFileUploadProviders()) {
38
+ if (provider.id === "builder") continue;
39
+ if (provider.isConfigured()) return true;
40
+ if (provider.isConfiguredForRequest) {
41
+ try {
42
+ if (await provider.isConfiguredForRequest()) return true;
43
+ } catch {
44
+ // Treat a failed scoped lookup as not configured.
45
+ }
46
+ }
47
+ }
48
+
49
+ try {
50
+ return await resolveHasBuilderPrivateKey();
51
+ } catch {
52
+ return false;
53
+ }
54
+ };
29
55
 
30
- try {
31
- return await resolveHasBuilderPrivateKey();
32
- } catch {
33
- return false;
56
+ if (context?.userEmail) {
57
+ return runWithRequestContext(
58
+ { userEmail: context.userEmail, orgId: context.orgId ?? undefined },
59
+ resolve,
60
+ );
34
61
  }
62
+ return resolve();
35
63
  }
36
64
 
37
65
  export async function shouldRejectVideoUploadWithoutStorage(): Promise<boolean> {
@@ -20,6 +20,7 @@ import {
20
20
  loadAgentTranscript,
21
21
  loadPublicAgentAccess,
22
22
  queryString,
23
+ transcriptStatusInstructions,
23
24
  } from "../../lib/public-agent-context.js";
24
25
 
25
26
  export default defineEventHandler(async (event: H3Event) => {
@@ -58,6 +59,7 @@ export default defineEventHandler(async (event: H3Event) => {
58
59
  },
59
60
  apis: {
60
61
  context: { method: "GET", url: api.contextUrl },
62
+ transcript: { method: "GET", url: api.transcriptUrl },
61
63
  ...(isLoomEmbedBacked
62
64
  ? {}
63
65
  : {
@@ -70,9 +72,12 @@ export default defineEventHandler(async (event: H3Event) => {
70
72
  transcript: {
71
73
  status: transcript?.status ?? "missing",
72
74
  language: transcript?.language ?? null,
75
+ failureReason: transcript?.failureReason ?? null,
76
+ retryAfterSeconds: transcript?.status === "pending" ? 15 : null,
73
77
  fullText: transcript?.fullText ?? "",
74
78
  segments: agentSegments,
75
79
  segmentCount: agentSegments.length,
76
80
  },
81
+ instructions: transcriptStatusInstructions(transcript),
77
82
  };
78
83
  });
@@ -9,7 +9,6 @@ import { useHeaderTitle, useHeaderActions } from "./HeaderActions";
9
9
 
10
10
  const pageTitles: Record<string, string> = {
11
11
  "/": "Content",
12
- "/team": "Team",
13
12
  };
14
13
 
15
14
  function resolveTitle(pathname: string): string {
@@ -191,6 +191,7 @@ export function NotionButton() {
191
191
  method: "POST",
192
192
  headers: { "Content-Type": "application/json" },
193
193
  body: JSON.stringify({
194
+ scope: "workspace",
194
195
  vars: [
195
196
  { key: "NOTION_CLIENT_ID", value: clientId },
196
197
  { key: "NOTION_CLIENT_SECRET", value: clientSecret },
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  ChangelogSettingsCard,
3
3
  LanguagePicker,
4
+ SettingsTabsPage,
4
5
  openAgentSettings,
5
6
  useT,
6
7
  } from "@agent-native/core/client";
7
- import { Link } from "react-router";
8
+ import { TeamPage } from "@agent-native/core/client/org";
8
9
 
9
10
  import { useSetPageTitle } from "@/components/layout/HeaderActions";
10
11
  import { Button } from "@/components/ui/button";
@@ -23,65 +24,63 @@ export default function SettingsRoute() {
23
24
 
24
25
  return (
25
26
  <div className="flex-1 overflow-auto">
26
- <main className="mx-auto w-full max-w-3xl space-y-6 px-4 py-6 sm:px-8 sm:py-10">
27
- <div className="space-y-1">
28
- <h1 className="text-2xl font-bold tracking-tight">
29
- {t("settings.title")}
30
- </h1>
31
- <p className="text-sm leading-6 text-muted-foreground">
32
- {t("settings.description")}
33
- </p>
34
- </div>
35
-
36
- <section className="rounded-lg border border-border bg-card p-5">
37
- <div className="space-y-1">
38
- <h2 className="text-base font-semibold">
39
- {t("settings.languageTitle")}
40
- </h2>
27
+ <SettingsTabsPage
28
+ teamLabel={t("team.pageTitle")}
29
+ general={
30
+ <main className="mx-auto w-full max-w-3xl space-y-6">
41
31
  <p className="text-sm leading-6 text-muted-foreground">
42
- {t("settings.languageDescription")}
32
+ {t("settings.description")}
43
33
  </p>
44
- </div>
45
- <div className="mt-4 max-w-xs space-y-1.5">
46
- <Label>{t("settings.languageLabel")}</Label>
47
- <LanguagePicker label={t("settings.languageLabel")} />
48
- </div>
49
- </section>
50
34
 
51
- <section className="rounded-lg border border-border bg-card p-5">
52
- <div className="space-y-1">
53
- <h2 className="text-base font-semibold">
54
- {t("settings.workspaceTitle")}
55
- </h2>
56
- <p className="text-sm leading-6 text-muted-foreground">
57
- {t("settings.workspaceDescription")}
58
- </p>
59
- </div>
60
- <Button className="mt-4" variant="outline" asChild>
61
- <Link to="/team">{t("settings.openTeamSettings")}</Link>
62
- </Button>
63
- </section>
35
+ <section className="rounded-lg border border-border bg-card p-5">
36
+ <div className="space-y-1">
37
+ <h2 className="text-base font-semibold">
38
+ {t("settings.languageTitle")}
39
+ </h2>
40
+ <p className="text-sm leading-6 text-muted-foreground">
41
+ {t("settings.languageDescription")}
42
+ </p>
43
+ </div>
44
+ <div className="mt-4 max-w-xs space-y-1.5">
45
+ <Label>{t("settings.languageLabel")}</Label>
46
+ <LanguagePicker label={t("settings.languageLabel")} />
47
+ </div>
48
+ </section>
64
49
 
65
- <section className="rounded-lg border border-border bg-card p-5">
66
- <div className="space-y-1">
67
- <h2 className="text-base font-semibold">
68
- {t("settings.agentTitle")}
69
- </h2>
70
- <p className="text-sm leading-6 text-muted-foreground">
71
- {t("settings.agentDescription")}
72
- </p>
50
+ <section className="rounded-lg border border-border bg-card p-5">
51
+ <div className="space-y-1">
52
+ <h2 className="text-base font-semibold">
53
+ {t("settings.agentTitle")}
54
+ </h2>
55
+ <p className="text-sm leading-6 text-muted-foreground">
56
+ {t("settings.agentDescription")}
57
+ </p>
58
+ </div>
59
+ <Button
60
+ className="mt-4"
61
+ variant="outline"
62
+ onClick={() => openAgentSettings()}
63
+ >
64
+ {t("settings.openAgentSettings")}
65
+ </Button>
66
+ </section>
67
+ </main>
68
+ }
69
+ team={
70
+ <div className="mx-auto w-full max-w-3xl">
71
+ <TeamPage
72
+ showTitle={false}
73
+ createOrgDescription={t("team.createOrgDescription")}
74
+ className="max-w-3xl"
75
+ />
73
76
  </div>
74
- <Button
75
- className="mt-4"
76
- variant="outline"
77
- onClick={() => openAgentSettings()}
78
- >
79
- {t("settings.openAgentSettings")}
80
- </Button>
81
- </section>
82
-
83
- <ChangelogSettingsCard markdown={changelog} />
84
- </main>
77
+ }
78
+ whatsNew={
79
+ <div className="mx-auto w-full max-w-3xl">
80
+ <ChangelogSettingsCard markdown={changelog} />
81
+ </div>
82
+ }
83
+ />
85
84
  </div>
86
85
  );
87
86
  }
@@ -1,7 +1,5 @@
1
- import { useT } from "@agent-native/core/client";
2
- import { TeamPage } from "@agent-native/core/client/org";
1
+ import { Navigate } from "react-router";
3
2
 
4
- import { useSetPageTitle } from "@/components/layout/HeaderActions";
5
3
  import { messagesByLocale } from "@/i18n-data";
6
4
 
7
5
  export function meta() {
@@ -9,29 +7,5 @@ export function meta() {
9
7
  }
10
8
 
11
9
  export default function TeamRoute() {
12
- const t = useT();
13
- useSetPageTitle(
14
- <h1 className="text-lg font-semibold tracking-tight truncate">
15
- {t("team.pageTitle")}
16
- </h1>,
17
- );
18
- return (
19
- <div className="flex-1 overflow-auto">
20
- <div className="mx-auto w-full max-w-3xl px-4 py-6 sm:px-8">
21
- <div className="mb-6 space-y-1">
22
- <h2 className="text-2xl font-bold tracking-tight">
23
- {t("team.heading")}
24
- </h2>
25
- <p className="text-sm text-muted-foreground">
26
- {t("team.description")}
27
- </p>
28
- </div>
29
- <TeamPage
30
- title={t("team.peopleTitle")}
31
- createOrgDescription={t("team.createOrgDescription")}
32
- className="max-w-3xl"
33
- />
34
- </div>
35
- </div>
36
- );
10
+ return <Navigate to="/settings#team" replace />;
37
11
  }
@@ -5,7 +5,11 @@ import {
5
5
  listOAuthAccountsByOwner,
6
6
  saveOAuthTokens,
7
7
  } from "@agent-native/core/oauth-tokens";
8
- import { getSession, runWithRequestContext } from "@agent-native/core/server";
8
+ import {
9
+ getSession,
10
+ resolveSecret,
11
+ runWithRequestContext,
12
+ } from "@agent-native/core/server";
9
13
  import { assertAccess } from "@agent-native/core/sharing";
10
14
  import { createError, type H3Event } from "h3";
11
15
 
@@ -87,12 +91,31 @@ function decodeState(stateParam: string | undefined): Record<string, string> {
87
91
  }
88
92
  }
89
93
 
90
- function notionBasicAuthHeader(): string {
91
- const clientId = process.env.NOTION_CLIENT_ID;
92
- const clientSecret = process.env.NOTION_CLIENT_SECRET;
94
+ async function resolveNotionOAuthCredentials(event: H3Event): Promise<{
95
+ clientId: string;
96
+ clientSecret: string;
97
+ } | null> {
98
+ const session = await getSession(event).catch(() => null);
99
+ return runWithRequestContext(
100
+ { userEmail: session?.email, orgId: session?.orgId },
101
+ async () => {
102
+ const [clientId, clientSecret] = await Promise.all([
103
+ resolveSecret("NOTION_CLIENT_ID"),
104
+ resolveSecret("NOTION_CLIENT_SECRET"),
105
+ ]);
106
+ if (!clientId || !clientSecret) return null;
107
+ return { clientId, clientSecret };
108
+ },
109
+ );
110
+ }
111
+
112
+ async function notionBasicAuthHeader(event: H3Event): Promise<string> {
113
+ const credentials = await resolveNotionOAuthCredentials(event);
114
+ const clientId = credentials?.clientId;
115
+ const clientSecret = credentials?.clientSecret;
93
116
  if (!clientId || !clientSecret) {
94
117
  throw new Error(
95
- "Notion OAuth credentials are not configured. Set NOTION_CLIENT_ID and NOTION_CLIENT_SECRET.",
118
+ "Notion OAuth credentials are not configured. Save NOTION_CLIENT_ID and NOTION_CLIENT_SECRET in settings.",
96
119
  );
97
120
  }
98
121
  return `Basic ${Buffer.from(`${clientId}:${clientSecret}`).toString("base64")}`;
@@ -486,18 +509,27 @@ export async function disconnectNotionForOwner(owner: string) {
486
509
  return deleted;
487
510
  }
488
511
 
489
- export function buildNotionAuthUrl(event: H3Event, redirectPath = "/"): string {
490
- const clientId = process.env.NOTION_CLIENT_ID;
491
- if (!clientId) {
512
+ export async function hasNotionOAuthCredentials(
513
+ event: H3Event,
514
+ ): Promise<boolean> {
515
+ return !!(await resolveNotionOAuthCredentials(event));
516
+ }
517
+
518
+ export async function buildNotionAuthUrl(
519
+ event: H3Event,
520
+ redirectPath = "/",
521
+ ): Promise<string> {
522
+ const credentials = await resolveNotionOAuthCredentials(event);
523
+ if (!credentials?.clientId) {
492
524
  throw new Error(
493
- "Notion OAuth credentials are not configured. Set NOTION_CLIENT_ID and NOTION_CLIENT_SECRET.",
525
+ "Notion OAuth credentials are not configured. Save NOTION_CLIENT_ID and NOTION_CLIENT_SECRET in settings.",
494
526
  );
495
527
  }
496
528
  const redirectUri = `${getOrigin(event)}/api/notion/callback`;
497
529
  const state = encodeState({ redirectPath });
498
530
  const params = new URLSearchParams({
499
531
  owner: "user",
500
- client_id: clientId,
532
+ client_id: credentials.clientId,
501
533
  redirect_uri: redirectUri,
502
534
  response_type: "code",
503
535
  state,
@@ -518,7 +550,7 @@ export async function exchangeNotionCodeForTokens(
518
550
  const response = await fetch(`${NOTION_API_BASE}/oauth/token`, {
519
551
  method: "POST",
520
552
  headers: {
521
- Authorization: notionBasicAuthHeader(),
553
+ Authorization: await notionBasicAuthHeader(event),
522
554
  "Content-Type": "application/json",
523
555
  },
524
556
  body: JSON.stringify({
@@ -2,7 +2,7 @@ import { defineEventHandler, getQuery } from "h3";
2
2
 
3
3
  import { buildNotionAuthUrl } from "../../../lib/notion.js";
4
4
 
5
- export default defineEventHandler((event) => {
5
+ export default defineEventHandler(async (event) => {
6
6
  const redirectPath = (getQuery(event).redirect as string) || "/";
7
- return { url: buildNotionAuthUrl(event, redirectPath) };
7
+ return { url: await buildNotionAuthUrl(event, redirectPath) };
8
8
  });
@@ -4,6 +4,7 @@ import {
4
4
  buildNotionAuthUrl,
5
5
  getDocumentOwnerEmail,
6
6
  getNotionConnectionForOwner,
7
+ hasNotionOAuthCredentials,
7
8
  } from "../../../lib/notion.js";
8
9
 
9
10
  export default defineEventHandler(async (event) => {
@@ -21,14 +22,13 @@ export default defineEventHandler(async (event) => {
21
22
  }
22
23
 
23
24
  // Not connected — check what's available
24
- const hasOAuthCredentials =
25
- !!process.env.NOTION_CLIENT_ID && !!process.env.NOTION_CLIENT_SECRET;
25
+ const hasOAuthCredentials = await hasNotionOAuthCredentials(event);
26
26
 
27
27
  return {
28
28
  connected: false,
29
29
  workspaceName: null,
30
30
  workspaceId: null,
31
- authUrl: hasOAuthCredentials ? buildNotionAuthUrl(event) : null,
31
+ authUrl: hasOAuthCredentials ? await buildNotionAuthUrl(event) : null,
32
32
  error: "missing_credentials" as const,
33
33
  mode: null,
34
34
  };
@@ -1,11 +1,13 @@
1
1
  import {
2
2
  SettingsPanel,
3
+ SettingsTabsPage,
3
4
  useDevMode,
4
5
  ChangelogSettingsCard,
5
6
  LanguagePicker,
6
7
  openAgentSettings,
7
8
  useT,
8
9
  } from "@agent-native/core/client";
10
+ import { TeamPage } from "@agent-native/core/client/org";
9
11
 
10
12
  import {
11
13
  Card,
@@ -29,45 +31,65 @@ export default function SettingsRoute() {
29
31
 
30
32
  return (
31
33
  <div className="flex h-full min-h-0 flex-col overflow-y-auto bg-background">
32
- <SettingsPanel
33
- isDevMode={isDevMode}
34
- onToggleDevMode={() => setDevMode(!isDevMode)}
35
- showDevToggle={canToggle}
34
+ <SettingsTabsPage
35
+ general={
36
+ <>
37
+ <SettingsPanel
38
+ isDevMode={isDevMode}
39
+ onToggleDevMode={() => setDevMode(!isDevMode)}
40
+ showDevToggle={canToggle}
41
+ />
42
+ <div className="mx-auto w-full max-w-2xl px-4 pb-8">
43
+ <Card className="mb-6">
44
+ <CardHeader>
45
+ <CardTitle className="text-base">
46
+ {t("settings.languageTitle")}
47
+ </CardTitle>
48
+ <CardDescription>
49
+ {t("settings.languageDescription")}
50
+ </CardDescription>
51
+ </CardHeader>
52
+ <CardContent className="max-w-xs space-y-1.5">
53
+ <Label>{t("settings.languageLabel")}</Label>
54
+ <LanguagePicker label={t("settings.languageLabel")} />
55
+ </CardContent>
56
+ </Card>
57
+ <Card className="mb-6">
58
+ <CardHeader>
59
+ <CardTitle className="text-base">
60
+ {t("settings.agentTitle")}
61
+ </CardTitle>
62
+ <CardDescription>
63
+ {t("settings.agentDescription")}
64
+ </CardDescription>
65
+ </CardHeader>
66
+ <CardContent>
67
+ <button
68
+ type="button"
69
+ className="inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground"
70
+ onClick={() => openAgentSettings()}
71
+ >
72
+ {t("settings.openAgentSettings")}
73
+ </button>
74
+ </CardContent>
75
+ </Card>
76
+ </div>
77
+ </>
78
+ }
79
+ team={
80
+ <div className="mx-auto w-full max-w-3xl">
81
+ <TeamPage
82
+ showTitle={false}
83
+ createOrgDescription={t("pages.teamCreateOrgDescription")}
84
+ />
85
+ </div>
86
+ }
87
+ whatsNew={
88
+ <div className="mx-auto w-full max-w-2xl">
89
+ <ChangelogSettingsCard markdown={changelog} />
90
+ </div>
91
+ }
36
92
  />
37
- <div className="mx-auto w-full max-w-2xl px-4 pb-8">
38
- <Card className="mb-6">
39
- <CardHeader>
40
- <CardTitle className="text-base">
41
- {t("settings.languageTitle")}
42
- </CardTitle>
43
- <CardDescription>
44
- {t("settings.languageDescription")}
45
- </CardDescription>
46
- </CardHeader>
47
- <CardContent className="max-w-xs space-y-1.5">
48
- <Label>{t("settings.languageLabel")}</Label>
49
- <LanguagePicker label={t("settings.languageLabel")} />
50
- </CardContent>
51
- </Card>
52
- <Card className="mb-6">
53
- <CardHeader>
54
- <CardTitle className="text-base">
55
- {t("settings.agentTitle")}
56
- </CardTitle>
57
- <CardDescription>{t("settings.agentDescription")}</CardDescription>
58
- </CardHeader>
59
- <CardContent>
60
- <button
61
- type="button"
62
- className="inline-flex h-9 items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground"
63
- onClick={() => openAgentSettings()}
64
- >
65
- {t("settings.openAgentSettings")}
66
- </button>
67
- </CardContent>
68
- </Card>
69
- <ChangelogSettingsCard markdown={changelog} />
70
- </div>
71
93
  </div>
72
94
  );
73
95
  }
@@ -1,5 +1,4 @@
1
- import { useT } from "@agent-native/core/client";
2
- import { TeamPage } from "@agent-native/core/client/org";
1
+ import { Navigate } from "react-router";
3
2
 
4
3
  import { messagesByLocale } from "@/i18n-data";
5
4
 
@@ -8,12 +7,5 @@ export function meta() {
8
7
  }
9
8
 
10
9
  export default function TeamRoute() {
11
- const t = useT();
12
- return (
13
- <div className="flex-1 overflow-y-auto">
14
- <main className="mx-auto max-w-6xl px-4 py-6 sm:px-6 sm:py-10">
15
- <TeamPage createOrgDescription={t("pages.teamCreateOrgDescription")} />
16
- </main>
17
- </div>
18
- );
10
+ return <Navigate to="/settings#team" replace />;
19
11
  }
@@ -166,7 +166,7 @@ function resolveView(
166
166
  if (pathname.startsWith("/audit")) return "audit";
167
167
  if (pathname.startsWith("/dreams")) return "dreams";
168
168
  if (pathname.startsWith("/thread-debug")) return "thread-debug";
169
- if (pathname.startsWith("/team")) return "team";
169
+ if (pathname.startsWith("/team")) return "settings";
170
170
  return "overview";
171
171
  }
172
172
 
@@ -216,7 +216,7 @@ function resolvePath(
216
216
  case "threads":
217
217
  return "/thread-debug";
218
218
  case "team":
219
- return "/team";
219
+ return "/settings#team";
220
220
  case "extensions":
221
221
  return command?.extensionId
222
222
  ? `/extensions/${encodeURIComponent(command.extensionId)}`