@agent-native/core 0.141.7 → 0.144.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 (328) hide show
  1. package/agent-native.eject.json +9 -0
  2. package/corpus/README.md +1 -1
  3. package/corpus/templates/analytics/.agents/skills/provider-api/SKILL.md +19 -0
  4. package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +296 -0
  5. package/corpus/templates/analytics/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  6. package/corpus/templates/analytics/.agents/skills/turn-into-skill/SKILL.md +112 -0
  7. package/corpus/templates/analytics/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  8. package/corpus/templates/analytics/AGENTS.md +35 -38
  9. package/corpus/templates/analytics/actions/ensure-native-v2-dashboards.ts +1 -1
  10. package/corpus/templates/analytics/actions/list-dashboard-usage-stats.ts +17 -22
  11. package/corpus/templates/analytics/actions/navigate.ts +4 -5
  12. package/corpus/templates/analytics/actions/provider-api-register.ts +50 -0
  13. package/corpus/templates/analytics/actions/query-agent-native-analytics.ts +44 -11
  14. package/corpus/templates/analytics/actions/test-custom-api-connection.ts +106 -0
  15. package/corpus/templates/analytics/app/components/CustomApiCard.tsx +430 -0
  16. package/corpus/templates/analytics/app/i18n-data.ts +680 -0
  17. package/corpus/templates/analytics/app/lib/native-mcp-exclusions.ts +6 -0
  18. package/corpus/templates/analytics/app/lib/sql-query.ts +33 -6
  19. package/corpus/templates/analytics/app/pages/DataSources.tsx +4 -0
  20. package/corpus/templates/analytics/changelog/2026-08-06-analytics-dashboards-load-reliably-during-background-data-sw.md +6 -0
  21. package/corpus/templates/analytics/changelog/2026-08-06-analytics-dashboards-remain-responsive-while-historical-data.md +6 -0
  22. package/corpus/templates/analytics/changelog/2026-08-06-analytics-query-results-now-render-as-a-table-with-csv-downl.md +6 -0
  23. package/corpus/templates/analytics/changelog/2026-08-06-connect-public-https-custom-apis-and-hand-tested-endpoints-t.md +6 -0
  24. package/corpus/templates/analytics/changelog/2026-08-06-durable-agent-worker-memory.md +6 -0
  25. package/corpus/templates/analytics/changelog/2026-08-06-live-dashboard-panels-use-the-shared-query-timeout.md +6 -0
  26. package/corpus/templates/analytics/changelog/2026-08-06-on-demand-billing-is-available-as-a-native-dashboard-with-ta.md +6 -0
  27. package/corpus/templates/analytics/changelog/2026-08-06-visible-dashboard-names-are-unique.md +6 -0
  28. package/corpus/templates/analytics/netlify.toml +7 -0
  29. package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +4 -0
  30. package/corpus/templates/analytics/server/db/index.ts +27 -0
  31. package/corpus/templates/analytics/server/db/schema.ts +10 -0
  32. package/corpus/templates/analytics/server/lib/dashboards-store.ts +227 -60
  33. package/corpus/templates/analytics/server/lib/first-party-analytics-backend.ts +133 -44
  34. package/corpus/templates/analytics/server/lib/native-v2-dashboards.ts +227 -1
  35. package/corpus/templates/analytics/server/plugins/agent-chat.ts +5 -0
  36. package/corpus/templates/analytics/server/plugins/analytics-rollup-backfill-jobs.ts +1 -0
  37. package/corpus/templates/analytics/server/plugins/db.ts +52 -18
  38. package/corpus/templates/assets/.agents/skills/asset-generation/SKILL.md +28 -2
  39. package/corpus/templates/assets/.agents/skills/image-generation/SKILL.md +16 -1
  40. package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +296 -0
  41. package/corpus/templates/assets/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  42. package/corpus/templates/assets/.agents/skills/turn-into-skill/SKILL.md +112 -0
  43. package/corpus/templates/assets/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  44. package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +296 -0
  45. package/corpus/templates/brain/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  46. package/corpus/templates/brain/.agents/skills/turn-into-skill/SKILL.md +112 -0
  47. package/corpus/templates/brain/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  48. package/corpus/templates/brain/actions/list-connection-providers.ts +24 -3
  49. package/corpus/templates/brain/app/lib/dispatch-links.ts +44 -0
  50. package/corpus/templates/brain/app/routes/sources.tsx +15 -7
  51. package/corpus/templates/brain/changelog/2026-08-06-brain-provider-setup-links-open-dispatch-correctly-in-standa.md +6 -0
  52. package/corpus/templates/brain/server/plugins/agent-chat.ts +1 -0
  53. package/corpus/templates/calendar/.agents/skills/event-management/SKILL.md +26 -0
  54. package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +296 -0
  55. package/corpus/templates/calendar/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  56. package/corpus/templates/calendar/.agents/skills/turn-into-skill/SKILL.md +112 -0
  57. package/corpus/templates/calendar/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  58. package/corpus/templates/calendar/AGENTS.md +11 -32
  59. package/corpus/templates/calendar/actions/update-event.ts +107 -1
  60. package/corpus/templates/calendar/app/components/calendar/EventCalendarSelect.tsx +83 -0
  61. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +57 -0
  62. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +59 -73
  63. package/corpus/templates/calendar/app/hooks/use-events.ts +4 -1
  64. package/corpus/templates/calendar/app/i18n-data.ts +20 -0
  65. package/corpus/templates/calendar/changelog/2026-08-06-delegated-requests-continue-in-the-background.md +6 -0
  66. package/corpus/templates/calendar/changelog/2026-08-06-existing-events-can-move-between-connected-google-account-ca.md +6 -0
  67. package/corpus/templates/calendar/server/lib/google-calendar.ts +101 -0
  68. package/corpus/templates/calendar/server/plugins/agent-chat.ts +7 -1
  69. package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +296 -0
  70. package/corpus/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  71. package/corpus/templates/chat/.agents/skills/turn-into-skill/SKILL.md +112 -0
  72. package/corpus/templates/chat/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  73. package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +296 -0
  74. package/corpus/templates/clips/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  75. package/corpus/templates/clips/.agents/skills/turn-into-skill/SKILL.md +112 -0
  76. package/corpus/templates/clips/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  77. package/corpus/templates/clips/app/components/editor/editor-layout.tsx +9 -24
  78. package/corpus/templates/clips/app/components/editor/timeline-geometry.ts +15 -0
  79. package/corpus/templates/clips/app/components/editor/waveform.tsx +4 -17
  80. package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +14 -3
  81. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +28 -38
  82. package/corpus/templates/clips/app/routes/share.$shareId.tsx +21 -27
  83. package/corpus/templates/clips/changelog/2026-08-06-clips-recovers-from-stalled-recording-setup-without-requirin.md +6 -0
  84. package/corpus/templates/clips/changelog/2026-08-06-clips-starts-faster-after-a-deploy-or-idle-period-startup-no.md +6 -0
  85. package/corpus/templates/clips/changelog/2026-08-06-deleting-a-recording-returns-cleanly-to-the-library-and-fit-.md +6 -0
  86. package/corpus/templates/clips/changelog/2026-08-06-hide-clip-insights-from-viewers-without-analytics-access.md +6 -0
  87. package/corpus/templates/clips/desktop/src/app.tsx +48 -20
  88. package/corpus/templates/clips/desktop/src/lib/recorder.ts +275 -74
  89. package/corpus/templates/clips/desktop/src/lib/recording-start-guard.ts +84 -0
  90. package/corpus/templates/clips/desktop/src/overlays/toolbar.tsx +14 -4
  91. package/corpus/templates/clips/server/plugins/db.ts +214 -26
  92. package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +296 -0
  93. package/corpus/templates/content/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  94. package/corpus/templates/content/.agents/skills/turn-into-skill/SKILL.md +112 -0
  95. package/corpus/templates/content/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  96. package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +296 -0
  97. package/corpus/templates/crm/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  98. package/corpus/templates/crm/.agents/skills/turn-into-skill/SKILL.md +112 -0
  99. package/corpus/templates/crm/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  100. package/corpus/templates/crm/changelog/2026-08-06-crm-starts-faster-after-a-deploy-or-idle-period-one-time-dat.md +6 -0
  101. package/corpus/templates/crm/server/plugins/db.ts +11 -8
  102. package/corpus/templates/design/.agents/skills/design-generation/SKILL.md +36 -1
  103. package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +296 -0
  104. package/corpus/templates/design/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  105. package/corpus/templates/design/.agents/skills/turn-into-skill/SKILL.md +112 -0
  106. package/corpus/templates/design/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  107. package/corpus/templates/design/actions/import-from-url.ts +1 -1
  108. package/corpus/templates/design/app/components/design/LayersPanel.tsx +27 -18
  109. package/corpus/templates/design/app/pages/Index.tsx +6 -2
  110. package/corpus/templates/design/changelog/2026-08-05-deleting-a-design-from-the-home-page-no-longer-leaves-the-ap.md +6 -0
  111. package/corpus/templates/design/changelog/2026-08-05-renaming-a-layer-now-focuses-its-name-field-automatically.md +6 -0
  112. package/corpus/templates/design/server/plugins/agent-chat.ts +2 -0
  113. package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +296 -0
  114. package/corpus/templates/dispatch/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  115. package/corpus/templates/dispatch/.agents/skills/turn-into-skill/SKILL.md +112 -0
  116. package/corpus/templates/dispatch/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  117. package/corpus/templates/dispatch/changelog/2026-08-06-ready-workspace-apps-stay-one-click-away-in-a-compact-dispat.md +6 -0
  118. package/corpus/templates/dispatch/changelog/2026-08-06-shared-vault-values-and-management-are-now-restricted-to-wor.md +6 -0
  119. package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +296 -0
  120. package/corpus/templates/factory/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  121. package/corpus/templates/factory/.agents/skills/turn-into-skill/SKILL.md +112 -0
  122. package/corpus/templates/factory/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  123. package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +296 -0
  124. package/corpus/templates/forms/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  125. package/corpus/templates/forms/.agents/skills/turn-into-skill/SKILL.md +112 -0
  126. package/corpus/templates/forms/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  127. package/corpus/templates/forms/changelog/2026-08-06-delegated-requests-continue-in-the-background.md +6 -0
  128. package/corpus/templates/forms/server/plugins/agent-chat.ts +4 -0
  129. package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +296 -0
  130. package/corpus/templates/macros/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  131. package/corpus/templates/macros/.agents/skills/turn-into-skill/SKILL.md +112 -0
  132. package/corpus/templates/macros/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  133. package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +296 -0
  134. package/corpus/templates/mail/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  135. package/corpus/templates/mail/.agents/skills/turn-into-skill/SKILL.md +112 -0
  136. package/corpus/templates/mail/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  137. package/corpus/templates/mail/changelog/2026-08-06-delegated-requests-continue-in-the-background.md +6 -0
  138. package/corpus/templates/mail/server/plugins/agent-chat.ts +6 -0
  139. package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +296 -0
  140. package/corpus/templates/plan/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  141. package/corpus/templates/plan/.agents/skills/turn-into-skill/SKILL.md +112 -0
  142. package/corpus/templates/plan/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  143. package/corpus/templates/slides/.agents/skills/create-deck/SKILL.md +48 -5
  144. package/corpus/templates/slides/.agents/skills/design-systems/SKILL.md +37 -1
  145. package/corpus/templates/slides/.agents/skills/image-generation-via-a2a/SKILL.md +6 -0
  146. package/corpus/templates/slides/.agents/skills/slide-editing/SKILL.md +15 -2
  147. package/corpus/templates/slides/.agents/skills/slide-images/SKILL.md +29 -24
  148. package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +296 -0
  149. package/corpus/templates/slides/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  150. package/corpus/templates/slides/.agents/skills/turn-into-skill/SKILL.md +112 -0
  151. package/corpus/templates/slides/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  152. package/corpus/templates/slides/AGENTS.md +7 -9
  153. package/corpus/templates/slides/_gitignore +1 -0
  154. package/corpus/templates/slides/actions/export-pptx.ts +402 -36
  155. package/corpus/templates/slides/actions/import-file.ts +46 -85
  156. package/corpus/templates/slides/actions/import-google-slides-reference.ts +271 -12
  157. package/corpus/templates/slides/actions/import-pptx.ts +85 -60
  158. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +10 -13
  159. package/corpus/templates/slides/app/components/editor/AddSlidePopover.tsx +5 -1
  160. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +25 -12
  161. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +112 -57
  162. package/corpus/templates/slides/app/components/editor/GoogleDriveConnectionCta.tsx +202 -0
  163. package/corpus/templates/slides/app/components/editor/GoogleSlidesReferenceImport.tsx +26 -14
  164. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +173 -0
  165. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +182 -141
  166. package/corpus/templates/slides/app/components/editor/canvas-interactions/index.ts +1 -0
  167. package/corpus/templates/slides/app/components/editor/canvas-interactions/slides-canvas-adapter.ts +18 -0
  168. package/corpus/templates/slides/app/components/editor/slide-text-targets.ts +85 -0
  169. package/corpus/templates/slides/app/components/layout/Layout.tsx +3 -0
  170. package/corpus/templates/slides/app/components/onboarding/FirstDeckOnboardingFlow.tsx +4 -0
  171. package/corpus/templates/slides/app/components/presentation/PresentationView.tsx +27 -1
  172. package/corpus/templates/slides/app/i18n/en-US.ts +1 -0
  173. package/corpus/templates/slides/app/lib/create-deck-generation.ts +1 -1
  174. package/corpus/templates/slides/app/lib/deck-preview-frame.ts +15 -0
  175. package/corpus/templates/slides/app/lib/deck-share-links.ts +9 -0
  176. package/corpus/templates/slides/app/lib/export-pptx-client.ts +89 -0
  177. package/corpus/templates/slides/app/lib/slide-animation-elements.ts +3 -0
  178. package/corpus/templates/slides/app/pages/Index.tsx +91 -1
  179. package/corpus/templates/slides/changelog/2026-08-06-clicking-the-gray-canvas-around-a-slide-clears-its-selection.md +6 -0
  180. package/corpus/templates/slides/changelog/2026-08-06-deck-thumbnails-keep-a-consistent-listing-frame-across-aspec.md +6 -0
  181. package/corpus/templates/slides/changelog/2026-08-06-deep-linked-decks-open-directly-instead-of-being-interrupted.md +6 -0
  182. package/corpus/templates/slides/changelog/2026-08-06-google-slides-exports-now-show-clear-import-steps-when-direc.md +6 -0
  183. package/corpus/templates/slides/changelog/2026-08-06-import-pdf-google-slides-and-powerpoint-decks-directly-from-.md +6 -0
  184. package/corpus/templates/slides/changelog/2026-08-06-imported-powerpoint-exports-keep-text-and-images-editable-an.md +6 -0
  185. package/corpus/templates/slides/changelog/2026-08-06-presentation-prompts-continue-adding-rendered-slides-until-t.md +6 -0
  186. package/corpus/templates/slides/changelog/2026-08-06-public-decks-now-share-read-only-presentation-links-by-defau.md +6 -0
  187. package/corpus/templates/slides/changelog/2026-08-06-slides-offers-a-direct-connect-google-button-when-a-drive-co.md +6 -0
  188. package/corpus/templates/slides/changelog/2026-08-06-slides-preserve-uploaded-pdf-layouts-accept-larger-reference.md +6 -0
  189. package/corpus/templates/slides/changelog/2026-08-06-styled-words-stay-part-of-their-text-box-instead-of-becoming.md +6 -0
  190. package/corpus/templates/slides/server/handlers/google-docs-auth.ts +7 -20
  191. package/corpus/templates/slides/server/handlers/import/html-converter.ts +236 -13
  192. package/corpus/templates/slides/server/handlers/import/pptx-assets.ts +67 -0
  193. package/corpus/templates/slides/server/handlers/import/pptx-parser.ts +2 -0
  194. package/corpus/templates/slides/server/handlers/uploads.ts +7 -3
  195. package/corpus/templates/slides/server/lib/chat-attachments.ts +6 -3
  196. package/corpus/templates/slides/server/lib/emails.ts +7 -2
  197. package/corpus/templates/slides/server/lib/google-docs-error.ts +50 -0
  198. package/corpus/templates/slides/server/lib/google-docs-oauth.ts +1 -0
  199. package/corpus/templates/slides/server/lib/import-asset-storage.ts +127 -0
  200. package/corpus/templates/slides/server/plugins/agent-chat.ts +4 -3
  201. package/corpus/templates/slides/server/routes/api/import-assets/[token].get.ts +70 -0
  202. package/corpus/templates/slides/shared/upload-types.ts +3 -0
  203. package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +296 -0
  204. package/corpus/templates/tasks/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  205. package/corpus/templates/tasks/.agents/skills/turn-into-skill/SKILL.md +112 -0
  206. package/corpus/templates/tasks/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  207. package/dist/agent/production-agent.d.ts +17 -0
  208. package/dist/agent/production-agent.js +72 -1
  209. package/dist/cli/agent-plugin.d.ts +112 -0
  210. package/dist/cli/agent-plugin.js +1081 -0
  211. package/dist/cli/app-skill.js +39 -1
  212. package/dist/cli/code-agent-executor.d.ts +3 -0
  213. package/dist/cli/code-agent-executor.js +51 -13
  214. package/dist/cli/index.js +13 -0
  215. package/dist/cli/templates-meta.js +1 -1
  216. package/dist/client/AgentPanel.d.ts +3 -1
  217. package/dist/client/AgentPanel.js +9 -2
  218. package/dist/client/AssistantChat.d.ts +8 -0
  219. package/dist/client/AssistantChat.js +23 -8
  220. package/dist/client/NewWorkspaceAppFlow.js +1 -0
  221. package/dist/client/agent-chat-adapter.js +123 -4
  222. package/dist/client/assistant-ui-recovery.d.ts +2 -1
  223. package/dist/client/assistant-ui-recovery.js +7 -3
  224. package/dist/client/onboarding/FirstRunOnboarding.js +11 -4
  225. package/dist/client/org/TeamPage.js +1 -1
  226. package/dist/client/require-session.js +1 -1
  227. package/dist/client/resources/McpConnectionSuggestion.d.ts +1 -0
  228. package/dist/client/resources/McpConnectionSuggestion.js +27 -10
  229. package/dist/client/resources/McpIntegrationDialog.js +77 -45
  230. package/dist/client/resources/mcp-integration-catalog.d.ts +13 -1
  231. package/dist/client/resources/mcp-integration-catalog.js +255 -2
  232. package/dist/client/resources/mcp-integration-logos.js +18 -2
  233. package/dist/client/settings/AccountSettingsCard.js +2 -1
  234. package/dist/collab/routes.d.ts +1 -1
  235. package/dist/collab/struct-routes.d.ts +1 -1
  236. package/dist/db/client.d.ts +9 -0
  237. package/dist/db/client.js +51 -16
  238. package/dist/db/create-get-db.js +2 -2
  239. package/dist/db/ddl-guard.d.ts +11 -10
  240. package/dist/db/ddl-guard.js +40 -12
  241. package/dist/deploy/build.d.ts +2 -0
  242. package/dist/deploy/build.js +97 -4
  243. package/dist/deploy/workspace-deploy.js +0 -2
  244. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  245. package/dist/guards/no-env-credentials.js +9 -0
  246. package/dist/ingestion/index.d.ts +1 -1
  247. package/dist/ingestion/pptx.d.ts +68 -0
  248. package/dist/ingestion/pptx.js +660 -213
  249. package/dist/integrations/plugin.js +9 -6
  250. package/dist/localization/default-messages.d.ts +54 -0
  251. package/dist/localization/default-messages.js +57 -2
  252. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  253. package/dist/mcp-client/oauth-routes.d.ts +2 -0
  254. package/dist/mcp-client/oauth-routes.js +73 -6
  255. package/dist/notifications/routes.d.ts +1 -1
  256. package/dist/observability/routes.d.ts +3 -3
  257. package/dist/onboarding/app-profile.js +11 -0
  258. package/dist/resources/handlers.d.ts +1 -1
  259. package/dist/resources/store.js +15 -1
  260. package/dist/scripts/call-agent.js +34 -4
  261. package/dist/secrets/routes.d.ts +9 -9
  262. package/dist/server/agent-chat/action-filters-a2a.d.ts +1 -1
  263. package/dist/server/agent-chat/action-filters-a2a.js +36 -1
  264. package/dist/server/agent-chat-plugin.js +29 -8
  265. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  266. package/dist/server/auth.js +47 -11
  267. package/dist/server/better-auth-instance.js +5 -3
  268. package/dist/server/core-routes-plugin.d.ts +8 -1
  269. package/dist/server/core-routes-plugin.js +28 -3
  270. package/dist/server/credential-provider.d.ts +3 -3
  271. package/dist/server/credential-provider.js +90 -4
  272. package/dist/server/onboarding-html.d.ts +2 -0
  273. package/dist/server/onboarding-html.js +115 -29
  274. package/dist/server/self-dispatch.d.ts +5 -4
  275. package/dist/server/self-dispatch.js +25 -14
  276. package/dist/server/ssr-handler.d.ts +1 -1
  277. package/dist/server/ssr-handler.js +1 -1
  278. package/dist/server/transcribe-voice.d.ts +1 -1
  279. package/dist/shared/cache-control.d.ts +26 -2
  280. package/dist/shared/cache-control.js +43 -2
  281. package/dist/shared/password-policy.d.ts +3 -0
  282. package/dist/shared/password-policy.js +3 -0
  283. package/dist/sharing/actions/set-resource-visibility.js +16 -4
  284. package/dist/sharing/registry.d.ts +14 -0
  285. package/dist/styles/agent-native.css +6 -0
  286. package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +296 -0
  287. package/dist/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  288. package/dist/templates/chat/.agents/skills/turn-into-skill/SKILL.md +112 -0
  289. package/dist/templates/chat/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  290. package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +296 -0
  291. package/dist/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  292. package/dist/templates/default/.agents/skills/turn-into-skill/SKILL.md +112 -0
  293. package/dist/templates/default/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  294. package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +296 -0
  295. package/dist/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  296. package/dist/templates/headless/.agents/skills/turn-into-skill/SKILL.md +112 -0
  297. package/dist/templates/headless/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  298. package/dist/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +6 -0
  299. package/dist/templates/workspace-core/.agents/skills/performance/SKILL.md +51 -0
  300. package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +296 -0
  301. package/dist/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  302. package/dist/templates/workspace-core/.agents/skills/turn-into-skill/SKILL.md +112 -0
  303. package/dist/templates/workspace-core/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  304. package/dist/templates/workspace-root/AGENTS.md +7 -0
  305. package/dist/user-profile/actions/change-password.js +8 -3
  306. package/dist/user-profile/actions/set-password.js +5 -1
  307. package/dist/vite/action-types-plugin.js +59 -0
  308. package/docs/content/skills-guide.mdx +13 -0
  309. package/package.json +6 -2
  310. package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +296 -0
  311. package/src/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  312. package/src/templates/chat/.agents/skills/turn-into-skill/SKILL.md +112 -0
  313. package/src/templates/chat/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  314. package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +296 -0
  315. package/src/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  316. package/src/templates/default/.agents/skills/turn-into-skill/SKILL.md +112 -0
  317. package/src/templates/default/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  318. package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +296 -0
  319. package/src/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  320. package/src/templates/headless/.agents/skills/turn-into-skill/SKILL.md +112 -0
  321. package/src/templates/headless/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  322. package/src/templates/workspace-core/.agents/skills/adding-workspace-apps/SKILL.md +6 -0
  323. package/src/templates/workspace-core/.agents/skills/performance/SKILL.md +51 -0
  324. package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +296 -0
  325. package/src/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +4 -0
  326. package/src/templates/workspace-core/.agents/skills/turn-into-skill/SKILL.md +112 -0
  327. package/src/templates/workspace-core/.agents/skills/turn-into-skill/agents/openai.yaml +4 -0
  328. package/src/templates/workspace-root/AGENTS.md +7 -0
@@ -16,6 +16,7 @@ export const DEFAULT_MCP_INTEGRATIONS = [
16
16
  availability: "ready",
17
17
  verification: "verified",
18
18
  logoUrl: mcpIntegrationLogo("context7"),
19
+ supportsOrganizationScope: true,
19
20
  docsUrl: "https://context7.com/",
20
21
  keywords: ["docs", "documentation", "libraries", "frameworks"],
21
22
  },
@@ -63,6 +64,31 @@ export const DEFAULT_MCP_INTEGRATIONS = [
63
64
  "screenshots",
64
65
  ],
65
66
  },
67
+ {
68
+ id: "amplitude",
69
+ name: "Amplitude",
70
+ provider: "amplitude",
71
+ description: "Read and work with Amplitude product analytics.",
72
+ descriptionKey: "mcpIntegrations.catalog.amplitude.description",
73
+ useCase: "product analytics, charts, dashboards, cohorts, experiments",
74
+ useCaseKey: "mcpIntegrations.catalog.amplitude.useCase",
75
+ url: "https://mcp.amplitude.com/mcp",
76
+ authMode: "oauth",
77
+ connectionMode: "oauth",
78
+ availability: "ready",
79
+ verification: "preflight-only",
80
+ logoUrl: mcpIntegrationLogo("amplitude"),
81
+ docsUrl: "https://amplitude.com/docs/amplitude-ai/amplitude-mcp/other-clients",
82
+ setupNoteKey: "mcpIntegrations.catalog.amplitude.setupNote",
83
+ keywords: [
84
+ "analytics",
85
+ "product analytics",
86
+ "charts",
87
+ "dashboards",
88
+ "cohorts",
89
+ "experiments",
90
+ ],
91
+ },
66
92
  {
67
93
  id: "notion",
68
94
  name: "Notion",
@@ -107,6 +133,32 @@ export const DEFAULT_MCP_INTEGRATIONS = [
107
133
  "decisions",
108
134
  ],
109
135
  },
136
+ {
137
+ id: "gong",
138
+ name: "Gong",
139
+ provider: "gong",
140
+ description: "Search Gong calls and generate account and deal insights.",
141
+ descriptionKey: "mcpIntegrations.catalog.gong.description",
142
+ useCase: "sales calls, transcripts, deal insights, account summaries",
143
+ useCaseKey: "mcpIntegrations.catalog.gong.useCase",
144
+ url: "https://mcp.gong.io/mcp",
145
+ authMode: "oauth",
146
+ connectionMode: "manual",
147
+ availability: "provider-setup",
148
+ verification: "restricted",
149
+ logoUrl: mcpIntegrationLogo("gong"),
150
+ supportsOrganizationScope: true,
151
+ docsUrl: "https://help.gong.io/docs/create-an-integration-to-connect-to-the-mcp-server",
152
+ setupNoteKey: "mcpIntegrations.catalog.gong.setupNote",
153
+ keywords: [
154
+ "sales calls",
155
+ "calls",
156
+ "transcripts",
157
+ "deals",
158
+ "accounts",
159
+ "revenue intelligence",
160
+ ],
161
+ },
110
162
  {
111
163
  id: "semgrep",
112
164
  name: "Semgrep",
@@ -121,6 +173,7 @@ export const DEFAULT_MCP_INTEGRATIONS = [
121
173
  availability: "ready",
122
174
  verification: "preflight-only",
123
175
  logoUrl: mcpIntegrationLogo("semgrep"),
176
+ supportsOrganizationScope: true,
124
177
  docsUrl: "https://github.com/semgrep/mcp#readme",
125
178
  keywords: ["security", "sast", "code scanning", "vulnerabilities"],
126
179
  },
@@ -141,6 +194,82 @@ export const DEFAULT_MCP_INTEGRATIONS = [
141
194
  docsUrl: "https://linear.app/docs/mcp",
142
195
  keywords: ["issues", "tickets", "planning", "project management"],
143
196
  },
197
+ {
198
+ id: "apollo",
199
+ name: "Apollo",
200
+ provider: "apollo",
201
+ description: "Search, enrich, and manage Apollo GTM data.",
202
+ descriptionKey: "mcpIntegrations.catalog.apollo.description",
203
+ useCase: "prospecting, enrichment, contacts, sequences, account research",
204
+ useCaseKey: "mcpIntegrations.catalog.apollo.useCase",
205
+ url: "https://mcp.apollo.io/mcp",
206
+ authMode: "oauth",
207
+ connectionMode: "oauth",
208
+ availability: "ready",
209
+ verification: "preflight-only",
210
+ logoUrl: mcpIntegrationLogo("apollo"),
211
+ docsUrl: "https://docs.apollo.io/docs/apollo-mcp",
212
+ setupNoteKey: "mcpIntegrations.catalog.apollo.setupNote",
213
+ keywords: [
214
+ "prospecting",
215
+ "enrichment",
216
+ "contacts",
217
+ "sequences",
218
+ "accounts",
219
+ "GTM",
220
+ ],
221
+ },
222
+ {
223
+ id: "common-room",
224
+ name: "Common Room",
225
+ provider: "common-room",
226
+ description: "Research buyer signals, contacts, and organizations.",
227
+ descriptionKey: "mcpIntegrations.catalog.commonRoom.description",
228
+ useCase: "buyer intelligence, product signals, intent, contact enrichment",
229
+ useCaseKey: "mcpIntegrations.catalog.commonRoom.useCase",
230
+ url: "https://mcp.commonroom.io/mcp",
231
+ authMode: "oauth",
232
+ connectionMode: "oauth",
233
+ availability: "ready",
234
+ verification: "preflight-only",
235
+ logoUrl: mcpIntegrationLogo("common-room"),
236
+ docsUrl: "https://www.commonroom.io/docs/using-common-room/mcp-server/",
237
+ setupNoteKey: "mcpIntegrations.catalog.commonRoom.setupNote",
238
+ keywords: [
239
+ "buyer intelligence",
240
+ "intent",
241
+ "signals",
242
+ "contacts",
243
+ "organizations",
244
+ "GTM",
245
+ ],
246
+ },
247
+ {
248
+ id: "exa",
249
+ name: "Exa",
250
+ provider: "exa",
251
+ description: "Search the web and fetch pages with Exa.",
252
+ descriptionKey: "mcpIntegrations.catalog.exa.description",
253
+ useCase: "web search, research, code search, page fetching",
254
+ useCaseKey: "mcpIntegrations.catalog.exa.useCase",
255
+ url: "https://mcp.exa.ai/mcp",
256
+ authMode: "none",
257
+ connectionMode: "direct",
258
+ availability: "ready",
259
+ verification: "preflight-only",
260
+ logoUrl: mcpIntegrationLogo("exa"),
261
+ supportsOrganizationScope: true,
262
+ docsUrl: "https://exa.ai/docs/reference/exa-mcp",
263
+ setupNoteKey: "mcpIntegrations.catalog.exa.setupNote",
264
+ keywords: [
265
+ "web search",
266
+ "research",
267
+ "code search",
268
+ "crawl",
269
+ "fetch",
270
+ "web",
271
+ ],
272
+ },
144
273
  {
145
274
  id: "atlassian",
146
275
  name: "Atlassian",
@@ -229,6 +358,59 @@ export const DEFAULT_MCP_INTEGRATIONS = [
229
358
  setupNoteKey: "mcpIntegrations.catalog.cloudflare.setupNote",
230
359
  keywords: ["cloud", "workers", "dns", "security", "observability"],
231
360
  },
361
+ {
362
+ id: "grafana",
363
+ name: "Grafana",
364
+ provider: "grafana",
365
+ description: "Query Grafana Cloud metrics, logs, and observability data.",
366
+ descriptionKey: "mcpIntegrations.catalog.grafana.description",
367
+ useCase: "observability, metrics, logs, traces, dashboards",
368
+ useCaseKey: "mcpIntegrations.catalog.grafana.useCase",
369
+ url: "https://mcp.grafana.com/mcp",
370
+ authMode: "oauth",
371
+ connectionMode: "oauth",
372
+ availability: "beta",
373
+ verification: "preflight-only",
374
+ logoUrl: mcpIntegrationLogo("grafana"),
375
+ docsUrl: "https://grafana.com/docs/grafana-cloud/ai-tools/mcp-servers/cloud-mcp/",
376
+ setupNoteKey: "mcpIntegrations.catalog.grafana.setupNote",
377
+ keywords: [
378
+ "observability",
379
+ "metrics",
380
+ "logs",
381
+ "traces",
382
+ "dashboards",
383
+ "Grafana Cloud",
384
+ ],
385
+ },
386
+ {
387
+ id: "google-workspace",
388
+ name: "Google Workspace",
389
+ provider: "google-workspace",
390
+ description: "Search Google Workspace data through its remote MCP server.",
391
+ descriptionKey: "mcpIntegrations.catalog.googleWorkspace.description",
392
+ useCase: "Workspace search across Gmail, Drive, Calendar, Chat, Docs, Sheets, Slides",
393
+ useCaseKey: "mcpIntegrations.catalog.googleWorkspace.useCase",
394
+ url: "https://workspacemcp.googleapis.com/mcp/v1",
395
+ authMode: "oauth",
396
+ connectionMode: "manual",
397
+ availability: "beta",
398
+ verification: "restricted",
399
+ logoUrl: mcpIntegrationLogo("google-workspace"),
400
+ docsUrl: "https://developers.google.com/workspace/guides/configure-mcp-servers",
401
+ setupNoteKey: "mcpIntegrations.catalog.googleWorkspace.setupNote",
402
+ brandAliases: ["Google", "Gmail", "Google Drive", "Google Calendar"],
403
+ keywords: [
404
+ "email",
405
+ "gmail",
406
+ "drive",
407
+ "calendar",
408
+ "chat",
409
+ "docs",
410
+ "sheets",
411
+ "slides",
412
+ ],
413
+ },
232
414
  {
233
415
  id: "gitlab",
234
416
  name: "GitLab",
@@ -374,10 +556,36 @@ export const DEFAULT_MCP_INTEGRATIONS = [
374
556
  availability: "provider-setup",
375
557
  verification: "restricted",
376
558
  logoUrl: mcpIntegrationLogo("hubspot"),
559
+ managedOAuth: true,
377
560
  docsUrl: "https://developers.hubspot.com/docs/apps/developer-platform/build-apps/integrate-with-the-remote-hubspot-mcp-server",
378
561
  setupNoteKey: "mcpIntegrations.catalog.hubspot.setupNote",
379
562
  keywords: ["crm", "contacts", "companies", "deals", "tickets"],
380
563
  },
564
+ {
565
+ id: "pylon",
566
+ name: "Pylon",
567
+ provider: "pylon",
568
+ description: "Search and update Pylon support data.",
569
+ descriptionKey: "mcpIntegrations.catalog.pylon.description",
570
+ useCase: "customer support, issues, accounts, contacts, conversations",
571
+ useCaseKey: "mcpIntegrations.catalog.pylon.useCase",
572
+ url: "https://mcp.usepylon.com/",
573
+ authMode: "oauth",
574
+ connectionMode: "oauth",
575
+ availability: "provider-setup",
576
+ verification: "restricted",
577
+ logoUrl: mcpIntegrationLogo("pylon"),
578
+ docsUrl: "https://www.usepylon.com/integrations/mcp",
579
+ setupNoteKey: "mcpIntegrations.catalog.pylon.setupNote",
580
+ keywords: [
581
+ "support",
582
+ "issues",
583
+ "accounts",
584
+ "contacts",
585
+ "conversations",
586
+ "customer support",
587
+ ],
588
+ },
381
589
  {
382
590
  id: "intercom",
383
591
  name: "Intercom",
@@ -468,6 +676,32 @@ export const DEFAULT_MCP_INTEGRATIONS = [
468
676
  setupNoteKey: "mcpIntegrations.catalog.box.setupNote",
469
677
  keywords: ["files", "folders", "documents", "enterprise content"],
470
678
  },
679
+ {
680
+ id: "builder-cms",
681
+ name: "Builder.io",
682
+ provider: "builder",
683
+ description: "Search Builder Publish and Hybrid Space content.",
684
+ descriptionKey: "mcpIntegrations.catalog.builder.description",
685
+ useCase: "content models, pages, entries, Publish and Hybrid Spaces",
686
+ useCaseKey: "mcpIntegrations.catalog.builder.useCase",
687
+ url: "https://mcp.builder.io/mcp/publish",
688
+ authMode: "oauth",
689
+ connectionMode: "oauth",
690
+ availability: "ready",
691
+ verification: "preflight-only",
692
+ logoUrl: mcpIntegrationLogo("builder-cms"),
693
+ docsUrl: "https://www.builder.io/c/docs/mcp-builder-server/",
694
+ setupNoteKey: "mcpIntegrations.catalog.builder.setupNote",
695
+ keywords: [
696
+ "Builder",
697
+ "content",
698
+ "CMS",
699
+ "pages",
700
+ "models",
701
+ "Publish",
702
+ "Hybrid",
703
+ ],
704
+ },
471
705
  {
472
706
  id: "netlify",
473
707
  name: "Netlify",
@@ -608,12 +842,22 @@ export function navigateToMcpOAuthStart(url) {
608
842
  navigate();
609
843
  }
610
844
  }
611
- export function resolveMcpIntegrationScope(defaultScope, hasOrg, canCreateOrgMcp) {
612
- return defaultScope === "org" && hasOrg && canCreateOrgMcp ? "org" : "user";
845
+ export function resolveMcpIntegrationScope(defaultScope, hasOrg, canCreateOrgMcp, supportsOrganizationScope = true) {
846
+ return defaultScope === "org" &&
847
+ hasOrg &&
848
+ canCreateOrgMcp &&
849
+ supportsOrganizationScope
850
+ ? "org"
851
+ : "user";
613
852
  }
614
853
  export function shouldOfferMcpOrganizationScope(hasOrg, canCreateOrgMcp) {
615
854
  return hasOrg && canCreateOrgMcp;
616
855
  }
856
+ export function shouldOfferMcpIntegrationOrganizationScope(integration, hasOrg, canCreateOrgMcp) {
857
+ return (shouldOfferMcpOrganizationScope(hasOrg, canCreateOrgMcp) &&
858
+ integration.supportsOrganizationScope === true &&
859
+ integration.managedOAuth !== true);
860
+ }
617
861
  export function filterMcpIntegrations(query, integrations = getDefaultMcpIntegrations()) {
618
862
  const needle = query.trim().toLowerCase();
619
863
  if (!needle)
@@ -635,8 +879,16 @@ export function filterMcpIntegrations(query, integrations = getDefaultMcpIntegra
635
879
  });
636
880
  }
637
881
  const MCP_LINK_HOSTS = {
882
+ amplitude: ["amplitude.com"],
883
+ apollo: ["apollo.io"],
884
+ "common-room": ["commonroom.io"],
638
885
  context7: ["context7.com"],
886
+ exa: ["exa.ai"],
639
887
  sentry: ["sentry.io", "sentry.dev"],
888
+ gong: ["gong.io"],
889
+ grafana: ["grafana.com", "grafana.net"],
890
+ "google-workspace": ["google.com", "googleapis.com"],
891
+ "builder-cms": ["builder.io"],
640
892
  notion: ["notion.so", "notion.site"],
641
893
  granola: ["granola.ai"],
642
894
  semgrep: ["semgrep.dev", "semgrep.com"],
@@ -654,6 +906,7 @@ const MCP_LINK_HOSTS = {
654
906
  asana: ["asana.com"],
655
907
  hubspot: ["hubspot.com"],
656
908
  intercom: ["intercom.com"],
909
+ pylon: ["usepylon.com", "pylon.com"],
657
910
  monday: ["monday.com"],
658
911
  webflow: ["webflow.com"],
659
912
  paypal: ["paypal.com"],
@@ -108,9 +108,25 @@ const LOGOS = {
108
108
  data: "PHN2ZyBmaWxsPSIjRkY0RjAwIiByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+WmFwaWVyPC90aXRsZT48cGF0aCBkPSJNNC4xNTcgMEE0LjE1MSA0LjE1MSAwIDAgMCAwIDQuMTYxdjE1LjY3OEE0LjE1MSA0LjE1MSAwIDAgMCA0LjE1NyAyNGgxNS42ODJBNC4xNTIgNC4xNTIgMCAwIDAgMjQgMTkuODM5VjQuMTYxQTQuMTUyIDQuMTUyIDAgMCAwIDE5LjgzOSAwSDQuMTU3Wm0xMC42MSA4Ljc2MWguMDNhLjU3Ny41NzcgMCAwIDEgLjIzLjAzOC41ODUuNTg1IDAgMCAxIC4yMDEuMTI0LjYzLjYzIDAgMCAxIC4xNjIuNDMxLjYxMi42MTIgMCAwIDEtL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hLjM3NS4zNzUgMCAwIDAgLjA4Ny4xMzIuNTc2LjU3NiAwIDAgMCAuMzk3LjExdi4wMDRhLjg2My44NjMgMCAwIDAgLjU2My0uMTgyLjU3My41NzMgMCAwIDAgLjIxMS0uNDU3di0uMTRoLS45MDNaIi8+PC9zdmc+",
109
109
  },
110
110
  };
111
+ const FALLBACK_MONOGRAMS = {
112
+ amplitude: "AM",
113
+ apollo: "AP",
114
+ "common-room": "CR",
115
+ exa: "EX",
116
+ gong: "GO",
117
+ grafana: "GF",
118
+ "google-workspace": "GW",
119
+ pylon: "PY",
120
+ "builder-cms": "B",
121
+ };
111
122
  export function mcpIntegrationLogo(id) {
112
123
  const logo = LOGOS[id];
113
- if (!logo)
114
- return "";
124
+ if (!logo) {
125
+ const label = FALLBACK_MONOGRAMS[id];
126
+ if (!label)
127
+ return "";
128
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><text x="12" y="12" text-anchor="middle" dominant-baseline="central" font-family="Arial,sans-serif" font-size="${label.length > 1 ? 8 : 14}" font-weight="700" fill="currentColor">${label}</text></svg>`;
129
+ return `data:image/svg+xml,${encodeURIComponent(svg)}`;
130
+ }
115
131
  return `data:${logo.mime};base64,${logo.data}`;
116
132
  }
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ActionButton, Avatar, TextField, } from "@agent-native/toolkit/design-system";
3
3
  import { IconCamera, IconCheck, IconLock } from "@tabler/icons-react";
4
4
  import { useEffect, useRef, useState } from "react";
5
+ import { PASSWORD_MIN_LENGTH } from "../../shared/password-policy.js";
5
6
  import { Popover, PopoverContent, PopoverTrigger, } from "../components/ui/popover.js";
6
7
  import { useT } from "../i18n.js";
7
8
  import { useActionMutation, useActionQuery } from "../use-action.js";
@@ -46,7 +47,7 @@ function PasswordSettings() {
46
47
  const submit = () => {
47
48
  setSaved(false);
48
49
  setValidationError(null);
49
- if (newPassword.length < 8) {
50
+ if (newPassword.length < PASSWORD_MIN_LENGTH) {
50
51
  setValidationError("length");
51
52
  return;
52
53
  }
@@ -26,8 +26,8 @@ export declare const getCollabState: import("h3").EventHandlerWithFetch<import("
26
26
  * Body: { update: string (base64), requestSource?: string }
27
27
  */
28
28
  export declare const postCollabUpdate: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
29
- error: string;
30
29
  ok?: undefined;
30
+ error: string;
31
31
  } | {
32
32
  error?: undefined;
33
33
  ok: boolean;
@@ -13,8 +13,8 @@
13
13
  * Body: { json: any, fieldName?: string, type?: "map"|"array", requestSource?: string }
14
14
  */
15
15
  export declare const postCollabJson: import("h3").EventHandlerWithFetch<import("h3").EventHandlerRequest, Promise<{
16
- error: string;
17
16
  ok?: undefined;
17
+ error: string;
18
18
  } | {
19
19
  error?: undefined;
20
20
  ok: boolean;
@@ -183,6 +183,15 @@ export declare function isServerlessRuntime(): boolean;
183
183
  * leave room for concurrency.
184
184
  */
185
185
  export declare function pgPoolOptions(url: string): Record<string, unknown>;
186
+ /**
187
+ * Shared options for every Neon serverless pool. The startup parameter is
188
+ * applied by Postgres before the first transaction, so a killed function
189
+ * cannot return a connection that remains idle in transaction indefinitely.
190
+ */
191
+ export declare function neonPoolOptions(): {
192
+ max: number;
193
+ idle_in_transaction_session_timeout?: number;
194
+ };
186
195
  /**
187
196
  * Connection cap for the @neondatabase/serverless `Pool`.
188
197
  *
package/dist/db/client.js CHANGED
@@ -778,15 +778,35 @@ export function pgPoolOptions(url) {
778
778
  const serverless = isServerlessRuntime();
779
779
  return {
780
780
  onnotice: () => { },
781
- max: serverless ? 4 : 20,
781
+ max: serverless ? serverlessPoolMax() : 20,
782
782
  idle_timeout: serverless ? 20 : 240,
783
783
  max_lifetime: 60 * 30,
784
784
  connect_timeout: 10,
785
+ ...(serverless
786
+ ? {
787
+ connection: {
788
+ idle_in_transaction_session_timeout: 30_000,
789
+ },
790
+ }
791
+ : {}),
785
792
  // Supabase's connection pooler (Transaction mode) requires prepare:false.
786
793
  // Only disable for Supabase URLs to avoid degrading other deployments.
787
794
  ...(url.includes("supabase") ? { prepare: false } : {}),
788
795
  };
789
796
  }
797
+ /**
798
+ * Shared options for every Neon serverless pool. The startup parameter is
799
+ * applied by Postgres before the first transaction, so a killed function
800
+ * cannot return a connection that remains idle in transaction indefinitely.
801
+ */
802
+ export function neonPoolOptions() {
803
+ return {
804
+ max: neonPoolMax(),
805
+ ...(isServerlessRuntime()
806
+ ? { idle_in_transaction_session_timeout: 30_000 }
807
+ : {}),
808
+ };
809
+ }
790
810
  /**
791
811
  * Connection cap for the @neondatabase/serverless `Pool`.
792
812
  *
@@ -804,20 +824,27 @@ export function pgPoolOptions(url) {
804
824
  export function neonPoolMax() {
805
825
  if (!isServerlessRuntime())
806
826
  return 20;
807
- // Netlify can run several background workers concurrently; a background
808
- // worker is not a global singleton and must not hold a larger pool than the
809
- // foreground path. The agent's
810
- // pre-send setup fires ~6 concurrent DB reads in parallel; with only 2
811
- // connections that burst exhausts the pool and a single stalled connection
812
- // freezes the worker before it can claim — observed on analytics' heavier
813
- // action surface, where the worker froze right after `model_done` and never
814
- // recorded `env_config`/`presend`, while the foreground path ran the
815
- // identical code in ~2s. Four connections preserve the concurrent
816
- // read burst while keeping foreground and background caps aligned, avoiding
817
- // "Max client connections reached" across many warm instances.
827
+ return serverlessPoolMax();
828
+ }
829
+ function serverlessPoolMax() {
830
+ // Scheduled Analytics workers run independently and may overlap across
831
+ // invocations. They process work sequentially, so one connection prevents
832
+ // a slow sweep from multiplying Neon connections while foreground requests
833
+ // retain two slots for their concurrent reads.
834
+ if (isLowConnectionBackgroundRuntime())
835
+ return 1;
836
+ // Netlify can run several background workers concurrently. Keep their four
837
+ // slots: the agent pre-send setup fires ~6 concurrent DB reads, and two
838
+ // connections previously froze the worker before it could claim. Foreground
839
+ // requests use two slots instead, leaving more headroom across warm
840
+ // instances where the user-facing routes are the pressure source.
818
841
  if (isBackgroundFunctionPoolContext())
819
842
  return 4;
820
- return 4;
843
+ return 2;
844
+ }
845
+ function isLowConnectionBackgroundRuntime() {
846
+ return (globalThis
847
+ .__AGENT_NATIVE_LOW_CONNECTION_BACKGROUND_RUNTIME__ === true);
821
848
  }
822
849
  /**
823
850
  * Inline mirror of `isInBackgroundFunctionRuntime()`
@@ -1085,7 +1112,7 @@ async function createDbExecInternal(config = {}, trackSingletonResources = false
1085
1112
  // connections, so its direct executions use stateless Neon HTTP instead.
1086
1113
  // The foreground and transaction surface keep the WebSocket pool.
1087
1114
  const bgHttp = isBackgroundFunctionPoolContext();
1088
- const makePool = () => new Pool({ connectionString: url, max: neonPoolMax() });
1115
+ const makePool = () => new Pool({ connectionString: url, ...neonPoolOptions() });
1089
1116
  // The singleton exec shares the process pool; `createDbExec()` callers own
1090
1117
  // a `close()` and so must not be handed it.
1091
1118
  const pool = trackSingletonResources
@@ -1250,8 +1277,16 @@ async function createDbExecInternal(config = {}, trackSingletonResources = false
1250
1277
  return result;
1251
1278
  }
1252
1279
  catch (err) {
1253
- await queryNeonClient(client, "ROLLBACK").catch(() => { });
1254
- releaseClient(isConnectionError(err) ? true : undefined);
1280
+ let rollbackFailed = false;
1281
+ try {
1282
+ await queryNeonClient(client, "ROLLBACK");
1283
+ }
1284
+ catch {
1285
+ rollbackFailed = true;
1286
+ }
1287
+ // A failed rollback can leave the backend inside the transaction.
1288
+ // Do not return that client to PgBouncer as if it were clean.
1289
+ releaseClient(isConnectionError(err) || rollbackFailed ? true : undefined);
1255
1290
  throw err;
1256
1291
  }
1257
1292
  }, 1);
@@ -1,6 +1,6 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
2
  import { drizzle as drizzleD1 } from "drizzle-orm/d1";
3
- import { getDialect, getCloudflareD1Binding, getDatabaseUrl, getDatabaseAuthToken, isLocalSqliteUrl, isPgliteUrl, isConnectionError, getPgliteClient, loadPgliteDrizzle, prepareLocalSqliteUrl, sqliteFilenameFromUrl, pgPoolOptions, neonPoolMax, attachNeonPoolErrorLogger, withDbTimeout, retryOnConnectionError, dbOpTimeoutMs, sharedDbPool, onSharedDbPoolsClosed, onSharedDbPoolReplaced, } from "./client.js";
3
+ import { getDialect, getCloudflareD1Binding, getDatabaseUrl, getDatabaseAuthToken, isLocalSqliteUrl, isPgliteUrl, isConnectionError, getPgliteClient, loadPgliteDrizzle, prepareLocalSqliteUrl, sqliteFilenameFromUrl, pgPoolOptions, neonPoolOptions, attachNeonPoolErrorLogger, withDbTimeout, retryOnConnectionError, dbOpTimeoutMs, sharedDbPool, onSharedDbPoolsClosed, onSharedDbPoolReplaced, } from "./client.js";
4
4
  // Lazy driver loaders — cached promises so dynamic import only runs once.
5
5
  let _pgDrizzle;
6
6
  function getPgDrizzle() {
@@ -407,7 +407,7 @@ export function createGetDb(schema) {
407
407
  // `createGetDb` store: one connect per process instead of one per
408
408
  // schema module. See `sharedDbPool` in client.ts.
409
409
  resetOnPoolClose("neon", url);
410
- const rawPool = sharedDbPool("neon", url, () => new Pool({ connectionString: url, max: neonPoolMax() }));
410
+ const rawPool = sharedDbPool("neon", url, () => new Pool({ connectionString: url, ...neonPoolOptions() }));
411
411
  attachNeonPoolErrorLogger(rawPool);
412
412
  // Wrap the pool with the resilience layer so Drizzle queries get the
413
413
  // same withDbTimeout + retryOnConnectionError protection as the raw
@@ -32,33 +32,33 @@ import { type DbExec } from "./client.js";
32
32
  /**
33
33
  * True when running against Postgres AND the given table already exists in the
34
34
  * `public` schema. Returns `false` on SQLite (callers gate their own behaviour
35
- * there), for invalid identifiers, or when `information_schema` is unreadable —
36
- * the conservative answer "not known to exist" makes the caller fall through to
37
- * its idempotent `CREATE TABLE IF NOT EXISTS`, preserving today's behaviour.
35
+ * there), for invalid identifiers, and `undefined` when `information_schema`
36
+ * is unreadable. Unknown must stay distinct from absent: treating a timed-out
37
+ * probe as missing starts a DDL lock storm on a busy serverless database.
38
38
  *
39
39
  * This is a plain read (no lock), so it never blocks on an `ACCESS EXCLUSIVE`
40
40
  * lock the way `CREATE`/`ALTER` would.
41
41
  */
42
- export declare function pgTableExists(table: string, injectedClient?: DbExec, dialectIsPostgres?: boolean): Promise<boolean>;
42
+ export declare function pgTableExists(table: string, injectedClient?: DbExec, dialectIsPostgres?: boolean): Promise<boolean | undefined>;
43
43
  /**
44
44
  * True when running against Postgres AND the given column already exists on the
45
45
  * given table in the `public` schema. Returns `false` on SQLite, for invalid
46
- * identifiers, or when `information_schema` is unreadable.
46
+ * identifiers, and `undefined` when `information_schema` is unreadable.
47
47
  *
48
48
  * Plain read — no lock taken.
49
49
  */
50
- export declare function pgColumnExists(table: string, column: string, injectedClient?: DbExec): Promise<boolean>;
50
+ export declare function pgColumnExists(table: string, column: string, injectedClient?: DbExec): Promise<boolean | undefined>;
51
51
  /**
52
52
  * True when running against Postgres AND an index with the given name already
53
53
  * exists in the `public` schema. Returns `false` on SQLite, for invalid
54
- * identifiers, or when `pg_indexes` is unreadable.
54
+ * identifiers, and `undefined` when `pg_indexes` is unreadable.
55
55
  *
56
56
  * `CREATE INDEX` (without CONCURRENTLY) takes a `SHARE` lock that blocks
57
57
  * writes, so on a fresh background-worker process behind a concurrent
58
58
  * connection this can hang just like a `CREATE`/`ALTER` would; checking first
59
59
  * skips the lock on the already-migrated hot path.
60
60
  */
61
- export declare function pgIndexExists(indexName: string, injectedClient?: DbExec, dialectIsPostgres?: boolean): Promise<boolean>;
61
+ export declare function pgIndexExists(indexName: string, injectedClient?: DbExec, dialectIsPostgres?: boolean): Promise<boolean | undefined>;
62
62
  /**
63
63
  * Probe → guarded-DDL → re-probe sequence for one piece of on-demand schema.
64
64
  *
@@ -86,8 +86,8 @@ export declare function pgIndexExists(indexName: string, injectedClient?: DbExec
86
86
  * `false` only when it already existed up front (no DDL issued).
87
87
  */
88
88
  export declare function ensureSchemaObject(options: {
89
- /** Lock-free existence check; `true` ⇒ already present, skip DDL. */
90
- probe: () => Promise<boolean>;
89
+ /** Lock-free existence check; `true` ⇒ present, `undefined` ⇒ unreadable. */
90
+ probe: () => Promise<boolean | undefined>;
91
91
  /** DDL to run only when `probe()` reports the object missing. */
92
92
  ddl: string;
93
93
  /** Human-readable name of what's being ensured, for the error message. */
@@ -150,6 +150,7 @@ export declare function isLockTimeoutError(err: unknown): boolean;
150
150
  */
151
151
  export declare function runGuardedDdl(ddl: string, options?: {
152
152
  lockTimeout?: string;
153
+ idleInTransactionTimeout?: string;
153
154
  injectedClient?: DbExec;
154
155
  dialectIsPostgres?: boolean;
155
156
  }): Promise<boolean>;