@agent-native/core 0.145.5 → 0.145.6

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 (387) hide show
  1. package/corpus/README.md +1 -1
  2. package/corpus/templates/analytics/.agents/skills/actions/SKILL.md +18 -0
  3. package/corpus/templates/analytics/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  4. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +17 -1
  5. package/corpus/templates/analytics/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  6. package/corpus/templates/analytics/.agents/skills/frontend-design/SKILL.md +1 -0
  7. package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +22 -3
  8. package/corpus/templates/analytics/.agents/skills/turn-into-app/SKILL.md +76 -23
  9. package/corpus/templates/analytics/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  10. package/corpus/templates/analytics/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  11. package/corpus/templates/analytics/AGENTS.md +2 -1
  12. package/corpus/templates/analytics/actions/account-deep-dive.ts +83 -47
  13. package/corpus/templates/analytics/actions/create-dashboard-folder.ts +27 -0
  14. package/corpus/templates/analytics/actions/gong-calls.ts +3 -3
  15. package/corpus/templates/analytics/actions/list-dashboard-folders.ts +26 -0
  16. package/corpus/templates/analytics/actions/list-sql-dashboards.ts +1 -0
  17. package/corpus/templates/analytics/actions/set-dashboard-folder.ts +26 -0
  18. package/corpus/templates/analytics/app/components/ProviderCorpusJobNotifier.tsx +18 -3
  19. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +6 -4
  20. package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
  21. package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +12 -2
  22. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +35 -20
  23. package/corpus/templates/analytics/app/global.css +17 -0
  24. package/corpus/templates/analytics/app/hooks/use-dashboard-revisions.ts +29 -15
  25. package/corpus/templates/analytics/app/hooks/use-dashboard-views.ts +15 -3
  26. package/corpus/templates/analytics/app/i18n-data.ts +296 -0
  27. package/corpus/templates/analytics/app/lib/prefetch-keys.ts +23 -2
  28. package/corpus/templates/analytics/app/pages/DashboardOverview.tsx +642 -0
  29. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +66 -31
  30. package/corpus/templates/analytics/app/root.tsx +4 -0
  31. package/corpus/templates/analytics/app/routes/dashboards._index.tsx +5 -1
  32. package/corpus/templates/analytics/changelog/2026-08-07-added-a-dashboards-overview-with-personal-and-shared-folders.md +6 -0
  33. package/corpus/templates/analytics/changelog/2026-08-07-analytics-tracking-and-chat-startup-no-longer-emit-avoidable.md +6 -0
  34. package/corpus/templates/analytics/changelog/2026-08-07-dashboard-panels-now-load-custom-api-data-programs-reliably.md +6 -0
  35. package/corpus/templates/analytics/changelog/2026-08-07-gong-searches-conserve-api-quota-and-report-incomplete-coverage.md +6 -0
  36. package/corpus/templates/analytics/changelog/2026-08-07-searchable-dashboards-make-personal-and-shared-folders-easie.md +6 -0
  37. package/corpus/templates/analytics/netlify.toml +3 -0
  38. package/corpus/templates/analytics/scripts/emit-netlify-dashboard-report-cron.ts +112 -0
  39. package/corpus/templates/analytics/server/db/index.ts +12 -0
  40. package/corpus/templates/analytics/server/db/schema.ts +14 -0
  41. package/corpus/templates/analytics/server/jobs/analytics-rollup-backfill.ts +4 -0
  42. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +1 -0
  43. package/corpus/templates/analytics/server/lib/analytics-query-catalog.ts +85 -15
  44. package/corpus/templates/analytics/server/lib/dashboard-folders-store.ts +168 -0
  45. package/corpus/templates/analytics/server/lib/dashboard-panel-query.ts +9 -4
  46. package/corpus/templates/analytics/server/lib/dashboards-store.ts +116 -1
  47. package/corpus/templates/analytics/server/lib/first-party-analytics-rollups.ts +4 -8
  48. package/corpus/templates/analytics/server/lib/gong.ts +139 -78
  49. package/corpus/templates/analytics/server/plugins/db.ts +55 -15
  50. package/corpus/templates/analytics/server/plugins/session-replay-retention-jobs.ts +6 -2
  51. package/corpus/templates/analytics/server/routes/api/session-replay/retention.post.ts +65 -0
  52. package/corpus/templates/assets/.agents/skills/actions/SKILL.md +18 -0
  53. package/corpus/templates/assets/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  54. package/corpus/templates/assets/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  55. package/corpus/templates/assets/.agents/skills/frontend-design/SKILL.md +1 -0
  56. package/corpus/templates/assets/.agents/skills/turn-into-app/SKILL.md +76 -23
  57. package/corpus/templates/assets/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  58. package/corpus/templates/assets/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  59. package/corpus/templates/brain/.agents/skills/actions/SKILL.md +18 -0
  60. package/corpus/templates/brain/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  61. package/corpus/templates/brain/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  62. package/corpus/templates/brain/.agents/skills/frontend-design/SKILL.md +1 -0
  63. package/corpus/templates/brain/.agents/skills/turn-into-app/SKILL.md +76 -23
  64. package/corpus/templates/brain/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  65. package/corpus/templates/brain/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  66. package/corpus/templates/calendar/.agents/skills/actions/SKILL.md +18 -0
  67. package/corpus/templates/calendar/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  68. package/corpus/templates/calendar/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  69. package/corpus/templates/calendar/.agents/skills/frontend-design/SKILL.md +1 -0
  70. package/corpus/templates/calendar/.agents/skills/turn-into-app/SKILL.md +76 -23
  71. package/corpus/templates/calendar/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  72. package/corpus/templates/calendar/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  73. package/corpus/templates/chat/.agents/skills/actions/SKILL.md +18 -0
  74. package/corpus/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  75. package/corpus/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  76. package/corpus/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
  77. package/corpus/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
  78. package/corpus/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  79. package/corpus/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  80. package/corpus/templates/chat/.env.example +3 -0
  81. package/corpus/templates/chat/AGENTS.md +4 -0
  82. package/corpus/templates/clips/.agents/skills/actions/SKILL.md +18 -0
  83. package/corpus/templates/clips/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  84. package/corpus/templates/clips/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  85. package/corpus/templates/clips/.agents/skills/frontend-design/SKILL.md +1 -0
  86. package/corpus/templates/clips/.agents/skills/turn-into-app/SKILL.md +76 -23
  87. package/corpus/templates/clips/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  88. package/corpus/templates/clips/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  89. package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +4 -0
  90. package/corpus/templates/clips/actions/request-transcript.ts +52 -3
  91. package/corpus/templates/clips/app/components/recorder/recorder-engine.ts +3 -10
  92. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +1 -0
  93. package/corpus/templates/clips/changelog/2026-08-07-screen-recordings-now-capture-tab-and-system-audio-even-when.md +6 -0
  94. package/corpus/templates/clips/changelog/2026-08-07-transcription-now-retries-transient-cloud-failures-automatic.md +6 -0
  95. package/corpus/templates/clips/server/db/schema.ts +7 -0
  96. package/corpus/templates/clips/server/plugins/db.ts +8 -0
  97. package/corpus/templates/clips/shared/recording-capture.ts +38 -0
  98. package/corpus/templates/clips/shared/transcript-failure.ts +89 -0
  99. package/corpus/templates/content/.agents/skills/actions/SKILL.md +18 -0
  100. package/corpus/templates/content/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  101. package/corpus/templates/content/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  102. package/corpus/templates/content/.agents/skills/frontend-design/SKILL.md +1 -0
  103. package/corpus/templates/content/.agents/skills/turn-into-app/SKILL.md +76 -23
  104. package/corpus/templates/content/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  105. package/corpus/templates/content/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  106. package/corpus/templates/content/.env.example +9 -3
  107. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +1 -0
  108. package/corpus/templates/content/changelog/2026-08-07-collapsed-sidebar-utility-buttons-stay-anchored-at-the-botto.md +6 -0
  109. package/corpus/templates/crm/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  110. package/corpus/templates/crm/.agents/skills/turn-into-app/SKILL.md +76 -23
  111. package/corpus/templates/crm/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  112. package/corpus/templates/crm/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  113. package/corpus/templates/design/.agents/skills/actions/SKILL.md +18 -0
  114. package/corpus/templates/design/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  115. package/corpus/templates/design/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  116. package/corpus/templates/design/.agents/skills/frontend-design/SKILL.md +1 -0
  117. package/corpus/templates/design/.agents/skills/turn-into-app/SKILL.md +76 -23
  118. package/corpus/templates/design/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  119. package/corpus/templates/design/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  120. package/corpus/templates/dispatch/.agents/skills/actions/SKILL.md +18 -0
  121. package/corpus/templates/dispatch/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  122. package/corpus/templates/dispatch/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  123. package/corpus/templates/dispatch/.agents/skills/frontend-design/SKILL.md +1 -0
  124. package/corpus/templates/dispatch/.agents/skills/turn-into-app/SKILL.md +76 -23
  125. package/corpus/templates/dispatch/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  126. package/corpus/templates/dispatch/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  127. package/corpus/templates/factory/.agents/skills/actions/SKILL.md +18 -0
  128. package/corpus/templates/factory/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  129. package/corpus/templates/factory/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  130. package/corpus/templates/factory/.agents/skills/frontend-design/SKILL.md +1 -0
  131. package/corpus/templates/factory/.agents/skills/turn-into-app/SKILL.md +76 -23
  132. package/corpus/templates/factory/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  133. package/corpus/templates/factory/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  134. package/corpus/templates/factory/actions/babysit-agent-native-pull-request.ts +279 -0
  135. package/corpus/templates/factory/actions/get-factory-automation-health.ts +23 -4
  136. package/corpus/templates/factory/app/components/factory/FactoryCanvas.tsx +1 -1
  137. package/corpus/templates/factory/app/routes/factory.tsx +21 -3
  138. package/corpus/templates/factory/changelog/2026-08-07-factory-can-keep-builder-bot-pull-requests-moving-by-request.md +6 -0
  139. package/corpus/templates/factory/server/lib/require-factory-automation.ts +1 -0
  140. package/corpus/templates/factory/server/plugins/agent-chat.ts +4 -1
  141. package/corpus/templates/factory/server/plugins/factory-scheduler-job.ts +81 -12
  142. package/corpus/templates/factory/server/triage/github-client.ts +31 -0
  143. package/corpus/templates/factory/server/triage/pr-babysit.ts +75 -1
  144. package/corpus/templates/forms/.agents/skills/actions/SKILL.md +18 -0
  145. package/corpus/templates/forms/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  146. package/corpus/templates/forms/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  147. package/corpus/templates/forms/.agents/skills/frontend-design/SKILL.md +1 -0
  148. package/corpus/templates/forms/.agents/skills/turn-into-app/SKILL.md +76 -23
  149. package/corpus/templates/forms/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  150. package/corpus/templates/forms/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  151. package/corpus/templates/macros/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  152. package/corpus/templates/macros/.agents/skills/frontend-design/SKILL.md +1 -0
  153. package/corpus/templates/macros/.agents/skills/turn-into-app/SKILL.md +76 -23
  154. package/corpus/templates/macros/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  155. package/corpus/templates/macros/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  156. package/corpus/templates/mail/.agents/skills/actions/SKILL.md +18 -0
  157. package/corpus/templates/mail/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  158. package/corpus/templates/mail/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  159. package/corpus/templates/mail/.agents/skills/frontend-design/SKILL.md +1 -0
  160. package/corpus/templates/mail/.agents/skills/turn-into-app/SKILL.md +76 -23
  161. package/corpus/templates/mail/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  162. package/corpus/templates/mail/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  163. package/corpus/templates/plan/.agents/skills/actions/SKILL.md +18 -0
  164. package/corpus/templates/plan/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  165. package/corpus/templates/plan/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  166. package/corpus/templates/plan/.agents/skills/frontend-design/SKILL.md +1 -0
  167. package/corpus/templates/plan/.agents/skills/turn-into-app/SKILL.md +76 -23
  168. package/corpus/templates/plan/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  169. package/corpus/templates/plan/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  170. package/corpus/templates/plan/app/pages/PlansPage.tsx +2 -1
  171. package/corpus/templates/plan/changelog/2026-08-07-inline-help-icons-now-stay-visually-balanced-with-nearby-tex.md +6 -0
  172. package/corpus/templates/slides/.agents/skills/actions/SKILL.md +18 -0
  173. package/corpus/templates/slides/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  174. package/corpus/templates/slides/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  175. package/corpus/templates/slides/.agents/skills/frontend-design/SKILL.md +1 -0
  176. package/corpus/templates/slides/.agents/skills/turn-into-app/SKILL.md +76 -23
  177. package/corpus/templates/slides/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  178. package/corpus/templates/slides/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  179. package/corpus/templates/slides/.env.example +5 -0
  180. package/corpus/templates/slides/changelog/2026-08-07-fixed-generated-slides-briefly-disappearing-while-they-are-b.md +6 -0
  181. package/corpus/templates/slides/server/plugins/collab.ts +20 -8
  182. package/corpus/templates/tasks/.agents/skills/actions/SKILL.md +18 -0
  183. package/corpus/templates/tasks/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  184. package/corpus/templates/tasks/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  185. package/corpus/templates/tasks/.agents/skills/frontend-design/SKILL.md +1 -0
  186. package/corpus/templates/tasks/.agents/skills/turn-into-app/SKILL.md +76 -23
  187. package/corpus/templates/tasks/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  188. package/corpus/templates/tasks/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  189. package/corpus/templates/tasks/.env.example +3 -0
  190. package/dist/agent/production-agent.js +24 -3
  191. package/dist/client/AgentPanel.d.ts +6 -0
  192. package/dist/client/AgentPanel.js +176 -30
  193. package/dist/client/AssistantChat.d.ts +2 -0
  194. package/dist/client/AssistantChat.js +4 -1
  195. package/dist/client/ConnectBuilderCard.js +6 -11
  196. package/dist/client/MultiTabAssistantChat.js +1 -1
  197. package/dist/client/RuntimeConfigNotice.d.ts +1 -0
  198. package/dist/client/RuntimeConfigNotice.js +94 -0
  199. package/dist/client/agent-chat/index.d.ts +1 -1
  200. package/dist/client/agent-chat/index.js +1 -1
  201. package/dist/client/agent-chat-adapter.js +85 -4
  202. package/dist/client/agent-page/AgentTabsPage.js +1 -1
  203. package/dist/client/agent-sidebar-state.d.ts +6 -0
  204. package/dist/client/agent-sidebar-state.js +25 -0
  205. package/dist/client/app-providers.js +2 -1
  206. package/dist/client/assistant-ui-recovery.js +1 -1
  207. package/dist/client/chat/index.d.ts +1 -1
  208. package/dist/client/chat/index.js +1 -1
  209. package/dist/client/chat/markdown-renderer.d.ts +2 -1
  210. package/dist/client/chat/markdown-renderer.js +48 -2
  211. package/dist/client/chat/message-components.d.ts +6 -0
  212. package/dist/client/chat/message-components.js +182 -53
  213. package/dist/client/chat/tool-call-display.d.ts +16 -4
  214. package/dist/client/chat/tool-call-display.js +225 -18
  215. package/dist/client/extensions/ExtensionsSidebarSection.js +1 -1
  216. package/dist/client/frame-protocol.d.ts +4 -0
  217. package/dist/client/i18n.js +9 -0
  218. package/dist/client/integrations/IntegrationsPanel.js +2 -5
  219. package/dist/client/onboarding/FirstRunOnboarding.js +2 -3
  220. package/dist/client/org/TeamPage.js +49 -6
  221. package/dist/client/org/hooks.d.ts +7 -2
  222. package/dist/client/org/hooks.js +11 -4
  223. package/dist/client/resources/McpConnectionSuggestion.js +2 -3
  224. package/dist/client/resources/McpIntegrationDialog.js +2 -16
  225. package/dist/client/resources/McpIntegrationLogo.d.ts +11 -0
  226. package/dist/client/resources/McpIntegrationLogo.js +14 -0
  227. package/dist/client/resources/ResourceTree.js +1 -1
  228. package/dist/client/resources/mcp-integration-logos.d.ts +1 -0
  229. package/dist/client/resources/mcp-integration-logos.js +47 -18
  230. package/dist/client/settings/useBuilderStatus.js +6 -0
  231. package/dist/client/ui/index.d.ts +1 -0
  232. package/dist/client/ui/index.js +1 -0
  233. package/dist/collab/routes.d.ts +1 -1
  234. package/dist/config.d.ts +26 -3
  235. package/dist/config.js +106 -14
  236. package/dist/db/ddl-guard.d.ts +15 -2
  237. package/dist/db/ddl-guard.js +53 -5
  238. package/dist/jobs/scheduler.js +7 -0
  239. package/dist/localization/default-messages.d.ts +17 -0
  240. package/dist/localization/default-messages.js +17 -0
  241. package/dist/mcp/oauth-client-metadata.js +5 -1
  242. package/dist/mcp/oauth-route.d.ts +5 -4
  243. package/dist/mcp/oauth-route.js +25 -9
  244. package/dist/mcp/screen-memory-stdio.d.ts +7 -7
  245. package/dist/mcp/server.d.ts +1 -1
  246. package/dist/mcp/server.js +9 -10
  247. package/dist/notifications/routes.d.ts +3 -3
  248. package/dist/org/handlers.d.ts +1 -0
  249. package/dist/org/handlers.js +17 -2
  250. package/dist/provider-api/actions/custom-provider-registration.d.ts +5 -5
  251. package/dist/provider-api/actions/provider-api.d.ts +7 -7
  252. package/dist/provider-api/corpus-jobs.d.ts +12 -2
  253. package/dist/provider-api/corpus-jobs.js +31 -1
  254. package/dist/provider-api/index.d.ts +2 -0
  255. package/dist/provider-api/index.js +7 -1
  256. package/dist/resources/handlers.d.ts +1 -1
  257. package/dist/secrets/routes.d.ts +3 -3
  258. package/dist/server/agent-chat/recurring-jobs-runtime.d.ts +1 -1
  259. package/dist/server/agent-chat/recurring-jobs-runtime.js +14 -2
  260. package/dist/server/agent-chat/script-entries.js +12 -1
  261. package/dist/server/agent-chat-plugin.js +2 -2
  262. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  263. package/dist/server/auth.d.ts +1 -0
  264. package/dist/server/auth.js +85 -1
  265. package/dist/server/better-auth-instance.d.ts +9 -0
  266. package/dist/server/better-auth-instance.js +25 -11
  267. package/dist/server/core-routes-plugin.d.ts +7 -0
  268. package/dist/server/core-routes-plugin.js +51 -5
  269. package/dist/server/create-server.js +23 -2
  270. package/dist/server/db-pressure.d.ts +38 -0
  271. package/dist/server/db-pressure.js +147 -0
  272. package/dist/server/index.d.ts +1 -0
  273. package/dist/server/index.js +1 -0
  274. package/dist/server/legacy-auth-migration.d.ts +10 -0
  275. package/dist/server/legacy-auth-migration.js +37 -0
  276. package/dist/server/onboarding-html.js +206 -2
  277. package/dist/server/poll.d.ts +26 -0
  278. package/dist/server/poll.js +108 -13
  279. package/dist/server/ssr-handler.js +4 -1
  280. package/dist/shared/index.d.ts +1 -0
  281. package/dist/shared/index.js +1 -0
  282. package/dist/shared/runtime-config.d.ts +44 -0
  283. package/dist/shared/runtime-config.js +284 -0
  284. package/dist/styles/agent-native.css +48 -1
  285. package/dist/templates/chat/.agents/skills/actions/SKILL.md +18 -0
  286. package/dist/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  287. package/dist/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  288. package/dist/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
  289. package/dist/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
  290. package/dist/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  291. package/dist/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  292. package/dist/templates/chat/.env.example +3 -0
  293. package/dist/templates/chat/AGENTS.md +4 -0
  294. package/dist/templates/default/.agents/skills/actions/SKILL.md +18 -0
  295. package/dist/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  296. package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  297. package/dist/templates/default/.agents/skills/frontend-design/SKILL.md +1 -0
  298. package/dist/templates/default/.agents/skills/turn-into-app/SKILL.md +76 -23
  299. package/dist/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  300. package/dist/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  301. package/dist/templates/default/AGENTS.md +6 -1
  302. package/dist/templates/default/app/i18n/ar-SA.ts +6 -0
  303. package/dist/templates/default/app/i18n/de-DE.ts +6 -0
  304. package/dist/templates/default/app/i18n/en-US.ts +6 -0
  305. package/dist/templates/default/app/i18n/es-ES.ts +6 -0
  306. package/dist/templates/default/app/i18n/fr-FR.ts +6 -0
  307. package/dist/templates/default/app/i18n/hi-IN.ts +6 -0
  308. package/dist/templates/default/app/i18n/ja-JP.ts +6 -0
  309. package/dist/templates/default/app/i18n/ko-KR.ts +6 -0
  310. package/dist/templates/default/app/i18n/pt-BR.ts +6 -0
  311. package/dist/templates/default/app/i18n/zh-CN.ts +6 -0
  312. package/dist/templates/default/app/i18n/zh-TW.ts +6 -0
  313. package/dist/templates/headless/.agents/skills/actions/SKILL.md +18 -0
  314. package/dist/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  315. package/dist/templates/headless/.agents/skills/turn-into-app/SKILL.md +76 -23
  316. package/dist/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  317. package/dist/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  318. package/dist/templates/workspace-core/.agents/skills/actions/SKILL.md +18 -0
  319. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  320. package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  321. package/dist/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -0
  322. package/dist/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +76 -23
  323. package/dist/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  324. package/dist/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  325. package/dist/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -0
  326. package/dist/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +8 -0
  327. package/dist/templates/workspace-core/AGENTS.md +7 -2
  328. package/dist/templates/workspace-root/AGENTS.md +5 -0
  329. package/dist/vite/client.d.ts +3 -3
  330. package/dist/vite/client.js +47 -1
  331. package/dist/vite/index.d.ts +1 -1
  332. package/docs/content/agent-native-config.mdx +240 -139
  333. package/docs/content/authentication.mdx +17 -0
  334. package/docs/content/deployment.mdx +19 -14
  335. package/docs/content/drop-in-agent.mdx +19 -2
  336. package/docs/content/environment-variables.mdx +63 -38
  337. package/docs/content/getting-started-actions.mdx +15 -6
  338. package/docs/content/getting-started-database.mdx +14 -10
  339. package/docs/content/getting-started-pages.mdx +32 -35
  340. package/docs/content/getting-started.mdx +7 -6
  341. package/package.json +1 -1
  342. package/src/templates/chat/.agents/skills/actions/SKILL.md +18 -0
  343. package/src/templates/chat/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  344. package/src/templates/chat/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  345. package/src/templates/chat/.agents/skills/frontend-design/SKILL.md +1 -0
  346. package/src/templates/chat/.agents/skills/turn-into-app/SKILL.md +76 -23
  347. package/src/templates/chat/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  348. package/src/templates/chat/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  349. package/src/templates/chat/.env.example +3 -0
  350. package/src/templates/chat/AGENTS.md +4 -0
  351. package/src/templates/default/.agents/skills/actions/SKILL.md +18 -0
  352. package/src/templates/default/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  353. package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  354. package/src/templates/default/.agents/skills/frontend-design/SKILL.md +1 -0
  355. package/src/templates/default/.agents/skills/turn-into-app/SKILL.md +76 -23
  356. package/src/templates/default/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  357. package/src/templates/default/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  358. package/src/templates/default/AGENTS.md +6 -1
  359. package/src/templates/default/app/i18n/ar-SA.ts +6 -0
  360. package/src/templates/default/app/i18n/de-DE.ts +6 -0
  361. package/src/templates/default/app/i18n/en-US.ts +6 -0
  362. package/src/templates/default/app/i18n/es-ES.ts +6 -0
  363. package/src/templates/default/app/i18n/fr-FR.ts +6 -0
  364. package/src/templates/default/app/i18n/hi-IN.ts +6 -0
  365. package/src/templates/default/app/i18n/ja-JP.ts +6 -0
  366. package/src/templates/default/app/i18n/ko-KR.ts +6 -0
  367. package/src/templates/default/app/i18n/pt-BR.ts +6 -0
  368. package/src/templates/default/app/i18n/zh-CN.ts +6 -0
  369. package/src/templates/default/app/i18n/zh-TW.ts +6 -0
  370. package/src/templates/headless/.agents/skills/actions/SKILL.md +18 -0
  371. package/src/templates/headless/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  372. package/src/templates/headless/.agents/skills/turn-into-app/SKILL.md +76 -23
  373. package/src/templates/headless/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  374. package/src/templates/headless/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  375. package/src/templates/workspace-core/.agents/skills/actions/SKILL.md +18 -0
  376. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +5 -0
  377. package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +45 -47
  378. package/src/templates/workspace-core/.agents/skills/frontend-design/SKILL.md +1 -0
  379. package/src/templates/workspace-core/.agents/skills/turn-into-app/SKILL.md +76 -23
  380. package/src/templates/workspace-core/.agents/skills/turn-into-app/agents/openai.yaml +2 -2
  381. package/src/templates/workspace-core/.agents/skills/turn-into-app/references/fresh-project.md +64 -0
  382. package/src/templates/workspace-core/.agents/skills/workspace-conventions/SKILL.md +4 -0
  383. package/src/templates/workspace-core/.agents/skills/writing-agent-instructions/SKILL.md +8 -0
  384. package/src/templates/workspace-core/AGENTS.md +7 -2
  385. package/src/templates/workspace-root/AGENTS.md +5 -0
  386. package/corpus/templates/dispatch/app/routes/admin.apps.$appId.tsx +0 -1
  387. package/corpus/templates/dispatch/app/routes/admin.apps.tsx +0 -1
@@ -2,8 +2,8 @@ import { defineAction } from "@agent-native/core";
2
2
  import { z } from "zod";
3
3
 
4
4
  import {
5
- getCallDetail,
6
- getCallTranscript,
5
+ getCallDetails,
6
+ getCallTranscripts,
7
7
  searchCallsForQueries,
8
8
  type GongCall,
9
9
  } from "../server/lib/gong";
@@ -230,6 +230,20 @@ function recordTimestampMs(record: HubSpotObjectRecord) {
230
230
  return Number.isFinite(time) ? time : 0;
231
231
  }
232
232
 
233
+ function transcriptRowsByCallId(payload: unknown): Map<string, unknown> {
234
+ const rows = new Map<string, unknown>();
235
+ if (!payload || typeof payload !== "object") return rows;
236
+ const callTranscripts = (payload as { callTranscripts?: unknown })
237
+ .callTranscripts;
238
+ if (!Array.isArray(callTranscripts)) return rows;
239
+ for (const row of callTranscripts) {
240
+ if (!row || typeof row !== "object") continue;
241
+ const callId = (row as { callId?: unknown }).callId;
242
+ if (typeof callId === "string" && callId) rows.set(callId, row);
243
+ }
244
+ return rows;
245
+ }
246
+
233
247
  async function loadGongEvidence(options: {
234
248
  queries: string[];
235
249
  days: number;
@@ -269,55 +283,77 @@ async function loadGongEvidence(options: {
269
283
  );
270
284
  }
271
285
 
272
- const callDetails = await Promise.all(
273
- calls.slice(0, Math.min(5, options.gongLimit)).map(async (call) => {
274
- try {
275
- return await getCallDetail(call.id);
276
- } catch (err) {
277
- gaps.push(
278
- `Gong call detail ${call.id}: ${
279
- err instanceof Error ? err.message : String(err)
280
- }`,
281
- );
282
- return null;
286
+ const detailCalls = calls.slice(0, Math.min(5, options.gongLimit));
287
+ let callDetails: Awaited<ReturnType<typeof getCallDetails>> = [];
288
+ if (detailCalls.length) {
289
+ try {
290
+ const details = await getCallDetails(detailCalls.map((call) => call.id));
291
+ const detailsById = new Map(details.map((detail) => [detail.id, detail]));
292
+ callDetails = detailCalls.flatMap((call) => {
293
+ const detail = detailsById.get(call.id);
294
+ if (!detail) {
295
+ gaps.push(`Gong call detail ${call.id}: no detail was returned.`);
296
+ return [];
297
+ }
298
+ return [detail];
299
+ });
300
+ } catch (err) {
301
+ gaps.push(
302
+ `Gong call details: ${err instanceof Error ? err.message : String(err)}`,
303
+ );
304
+ }
305
+ }
306
+
307
+ const transcripts: Array<Record<string, unknown>> = [];
308
+ if (options.includeTranscripts) {
309
+ const transcriptCalls = calls.slice(0, options.transcriptLimit);
310
+ try {
311
+ const rows = transcriptRowsByCallId(
312
+ await getCallTranscripts(transcriptCalls.map((call) => call.id)),
313
+ );
314
+ for (const call of transcriptCalls) {
315
+ const transcript = rows.get(call.id);
316
+ if (transcript) {
317
+ transcripts.push({
318
+ callId: call.id,
319
+ title: call.title,
320
+ started: call.started,
321
+ ...extractTranscriptText(transcript, options.transcriptMaxChars),
322
+ });
323
+ } else {
324
+ const error = "Gong did not return a transcript for this call.";
325
+ gaps.push(`Gong transcript ${call.id}: ${error}`);
326
+ transcripts.push({
327
+ callId: call.id,
328
+ title: call.title,
329
+ started: call.started,
330
+ text: "",
331
+ sentenceCount: 0,
332
+ truncated: false,
333
+ error,
334
+ });
335
+ }
283
336
  }
284
- }),
285
- );
286
-
287
- const transcripts = options.includeTranscripts
288
- ? await Promise.all(
289
- calls.slice(0, options.transcriptLimit).map(async (call) => {
290
- try {
291
- const transcript = await getCallTranscript(call.id);
292
- return {
293
- callId: call.id,
294
- title: call.title,
295
- started: call.started,
296
- ...extractTranscriptText(transcript, options.transcriptMaxChars),
297
- };
298
- } catch (err) {
299
- gaps.push(
300
- `Gong transcript ${call.id}: ${
301
- err instanceof Error ? err.message : String(err)
302
- }`,
303
- );
304
- return {
305
- callId: call.id,
306
- title: call.title,
307
- started: call.started,
308
- text: "",
309
- sentenceCount: 0,
310
- truncated: false,
311
- error: err instanceof Error ? err.message : String(err),
312
- };
313
- }
314
- }),
315
- )
316
- : [];
337
+ } catch (err) {
338
+ const error = err instanceof Error ? err.message : String(err);
339
+ for (const call of transcriptCalls) {
340
+ gaps.push(`Gong transcript ${call.id}: ${error}`);
341
+ transcripts.push({
342
+ callId: call.id,
343
+ title: call.title,
344
+ started: call.started,
345
+ text: "",
346
+ sentenceCount: 0,
347
+ truncated: false,
348
+ error,
349
+ });
350
+ }
351
+ }
352
+ }
317
353
 
318
354
  return {
319
355
  calls,
320
- callDetails: callDetails.filter((detail) => detail !== null),
356
+ callDetails,
321
357
  transcripts,
322
358
  searchCoverage,
323
359
  gaps,
@@ -0,0 +1,27 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import {
3
+ getRequestOrgId,
4
+ getRequestUserEmail,
5
+ } from "@agent-native/core/server";
6
+ import { z } from "zod";
7
+
8
+ import { createDashboardFolder } from "../server/lib/dashboard-folders-store";
9
+
10
+ export default defineAction({
11
+ description: "Create a personal or shared dashboard folder.",
12
+ schema: z.object({
13
+ name: z.string().min(1).max(120),
14
+ scope: z.enum(["personal", "shared"]),
15
+ }),
16
+ http: { method: "POST" },
17
+ run: async ({ name, scope }) => {
18
+ const email = getRequestUserEmail();
19
+ if (!email) throw new Error("no authenticated user");
20
+ return {
21
+ folder: await createDashboardFolder(name, scope, {
22
+ email,
23
+ orgId: getRequestOrgId() || null,
24
+ }),
25
+ };
26
+ },
27
+ });
@@ -63,7 +63,7 @@ interface TranscriptSearchError {
63
63
 
64
64
  function callLimitGuidance(limit: number, truncated: boolean): string {
65
65
  return truncated
66
- ? `Returned the ${limit} most recent matching calls. If this coverage is insufficient for the analysis, increase the limit and page through more calls; for very large datasets prefer chunked background processing.`
66
+ ? `Coverage is incomplete: returned the ${limit} most recent matching calls and more Gong pages remain. Do not increase the limit or page this action for broad or exhaustive analysis. Switch to tracker staging with provider-api-request plus query-staged-dataset or a Data Program, or use provider-corpus-job when raw transcript bodies are required.`
67
67
  : `Returned ${limit} or fewer matching calls. Answer from these calls; expand limit if broader coverage is needed.`;
68
68
  }
69
69
 
@@ -719,7 +719,7 @@ export default defineAction({
719
719
  : {}),
720
720
  guidance: [
721
721
  transcriptSearch
722
- ? `Transcript search inspected ${transcriptSearch.inspectedCalls} of ${result.calls.length} matching call(s) for "${transcriptQuery}" and found ${transcriptSearch.matches.length} matching call(s). Use coverageComplete/errors before making absence claims; increase transcriptScanLimit or narrow the window if coverage is incomplete.`
722
+ ? `Transcript search inspected ${transcriptSearch.inspectedCalls} of ${result.calls.length} matching call(s) for "${transcriptQuery}" and found ${transcriptSearch.matches.length} matching call(s). Use coverageComplete/errors before making absence claims; if coverage is incomplete, keep any retry bounded by narrowing the window, or switch broad/exhaustive work to tracker staging or provider-corpus-job.`
723
723
  : "",
724
724
  exhaustive
725
725
  ? shouldLoadTranscripts
@@ -854,7 +854,7 @@ export default defineAction({
854
854
  ...(transcripts ? { transcripts } : {}),
855
855
  guidance: [
856
856
  transcriptSearch
857
- ? `Transcript search inspected ${transcriptSearch.inspectedCalls} of ${returnedCalls.length} returned call(s) for "${transcriptQuery}" and found ${transcriptSearch.matches.length} matching call(s). Use coverageComplete/errors before making absence claims; increase limit/transcriptScanLimit or narrow the window if coverage is incomplete.`
857
+ ? `Transcript search inspected ${transcriptSearch.inspectedCalls} of ${returnedCalls.length} returned call(s) for "${transcriptQuery}" and found ${transcriptSearch.matches.length} matching call(s). Use coverageComplete/errors before making absence claims; if coverage is incomplete, keep any retry bounded by narrowing the window, or switch broad/exhaustive work to tracker staging or provider-corpus-job.`
858
858
  : "",
859
859
  exhaustive
860
860
  ? `Exhaustive discovery returned ${returnedCalls.length} call(s) from the date window${truncated ? ", but Gong has more pages than this request covered" : ""}.`
@@ -0,0 +1,26 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import {
3
+ getRequestOrgId,
4
+ getRequestUserEmail,
5
+ } from "@agent-native/core/server";
6
+ import { z } from "zod";
7
+
8
+ import { listDashboardFolders } from "../server/lib/dashboard-folders-store";
9
+
10
+ export default defineAction({
11
+ description: "List dashboard folders accessible to the current user.",
12
+ schema: z.object({}),
13
+ http: { method: "GET" },
14
+ readOnly: true,
15
+ publicAgent: { expose: true, readOnly: true, requiresAuth: true },
16
+ run: async () => {
17
+ const email = getRequestUserEmail();
18
+ if (!email) throw new Error("no authenticated user");
19
+ return {
20
+ folders: await listDashboardFolders({
21
+ email,
22
+ orgId: getRequestOrgId() || null,
23
+ }),
24
+ };
25
+ },
26
+ });
@@ -74,6 +74,7 @@ export default defineAction({
74
74
  id: d.id,
75
75
  name: d.name,
76
76
  ...(d.parentId ? { parentId: d.parentId } : {}),
77
+ ...(d.folderId ? { folderId: d.folderId } : {}),
77
78
  ownerEmail: d.ownerEmail,
78
79
  orgId: d.orgId,
79
80
  visibility: d.visibility,
@@ -0,0 +1,26 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import {
3
+ getRequestOrgId,
4
+ getRequestUserEmail,
5
+ } from "@agent-native/core/server";
6
+ import { z } from "zod";
7
+
8
+ import { assignDashboardToFolder } from "../server/lib/dashboard-folders-store";
9
+
10
+ export default defineAction({
11
+ description: "Assign or remove a dashboard's folder membership.",
12
+ schema: z.object({
13
+ dashboardId: z.string(),
14
+ folderId: z.string().nullable(),
15
+ }),
16
+ http: { method: "POST" },
17
+ run: async ({ dashboardId, folderId }) => {
18
+ const email = getRequestUserEmail();
19
+ if (!email) throw new Error("no authenticated user");
20
+ const dashboard = await assignDashboardToFolder(dashboardId, folderId, {
21
+ email,
22
+ orgId: getRequestOrgId() || null,
23
+ });
24
+ return { id: dashboard.id, folderId };
25
+ },
26
+ });
@@ -31,6 +31,8 @@ type ProviderCorpusJobEntry = {
31
31
  totalHits: number;
32
32
  storedHits: number;
33
33
  truncatedHits: boolean;
34
+ paginationComplete: boolean;
35
+ paginationStopReason: string | null;
34
36
  };
35
37
  error: string | null;
36
38
  nextResumeAt: string | null;
@@ -117,18 +119,31 @@ function notificationKey(entry: ProviderCorpusJobEntry): string {
117
119
  entry.coverage.itemsProcessed,
118
120
  entry.coverage.totalHits,
119
121
  entry.coverage.storedHits,
122
+ entry.coverage.paginationComplete,
123
+ entry.coverage.paginationStopReason ?? "",
120
124
  entry.nextResumeAt ?? "",
121
125
  entry.error ?? "",
122
126
  ].join(":");
123
127
  }
124
128
 
129
+ export function providerCorpusJobIsIncomplete(
130
+ entry: ProviderCorpusJobEntry,
131
+ ): boolean {
132
+ return (
133
+ entry.job.status === "completed" &&
134
+ entry.coverage.paginationComplete === false
135
+ );
136
+ }
137
+
125
138
  function showJobToast(
126
139
  entry: ProviderCorpusJobEntry,
127
140
  openAsk: () => void, // i18n-ignore TypeScript helper signature
128
141
  t: ReturnType<typeof useT>, // i18n-ignore TypeScript helper type
129
142
  ) {
130
- const title =
131
- entry.job.status === "completed"
143
+ const incomplete = providerCorpusJobIsIncomplete(entry);
144
+ const title = incomplete
145
+ ? t("providerCorpusNotifier.incomplete")
146
+ : entry.job.status === "completed"
132
147
  ? t("providerCorpusNotifier.completed")
133
148
  : entry.job.status === "quota_wait"
134
149
  ? t("providerCorpusNotifier.quotaWait")
@@ -156,7 +171,7 @@ function showJobToast(
156
171
  },
157
172
  };
158
173
 
159
- if (entry.job.status === "failed") {
174
+ if (entry.job.status === "failed" || incomplete) {
160
175
  toast.error(title, options);
161
176
  } else if (entry.job.status === "completed") {
162
177
  toast.success(title, options);
@@ -33,6 +33,7 @@ import {
33
33
  } from "react";
34
34
  import { useNavigate } from "react-router";
35
35
 
36
+ import { useAuth } from "@/components/auth/AuthProvider";
36
37
  import {
37
38
  CommandDialog,
38
39
  CommandInput,
@@ -49,6 +50,7 @@ import {
49
50
  import { Label } from "@/components/ui/label";
50
51
  import { Skeleton } from "@/components/ui/skeleton";
51
52
  import { useReplayStorageStatus } from "@/hooks/use-replay-storage-status";
53
+ import { dashboardCacheScope } from "@/lib/prefetch-keys";
52
54
  import { dashboards } from "@/pages/adhoc/registry";
53
55
  import {
54
56
  buildAnalyticsGeneralSettingsSearchEntries,
@@ -257,6 +259,8 @@ function persistThemePreference(theme: "light" | "dark") {
257
259
  export function CommandPalette() {
258
260
  const t = useT();
259
261
  const { canManageOrg } = useOrgRole();
262
+ const { auth } = useAuth();
263
+ const dashboardScope = dashboardCacheScope(auth);
260
264
  const [open, setOpen] = useState(false);
261
265
  const [changelogOpen, setChangelogOpen] = useState(false);
262
266
  const [languageOpen, setLanguageOpen] = useState(false);
@@ -285,19 +289,17 @@ export function CommandPalette() {
285
289
  const dashboardsSync = useChangeVersions(["dashboards", "action"]);
286
290
 
287
291
  const explorerDashboardsQuery = useQuery({
288
- queryKey: ["explorer-dashboards-palette", dashboardsSync],
292
+ queryKey: ["explorer-dashboards-palette", dashboardScope, dashboardsSync],
289
293
  queryFn: fetchExplorerDashboards,
290
294
  staleTime: 30_000,
291
295
  enabled: open,
292
- placeholderData: (prev) => prev,
293
296
  });
294
297
 
295
298
  const sqlDashboardsQuery = useQuery({
296
- queryKey: ["sql-dashboards-palette", dashboardsSync],
299
+ queryKey: ["sql-dashboards-palette", dashboardScope, dashboardsSync],
297
300
  queryFn: () => fetchSqlDashboards(t),
298
301
  staleTime: 30_000,
299
302
  enabled: open,
300
- placeholderData: (prev) => prev,
301
303
  });
302
304
 
303
305
  const savedCharts = savedChartsQuery.data ?? [];
@@ -17,6 +17,7 @@ const pageTitleKeys: Record<string, string> = {
17
17
  "/ask": "navigation.ask",
18
18
  "/data-sources": "navigation.dataSources",
19
19
  "/data-dictionary": "navigation.dataDictionary",
20
+ "/dashboards": "navigation.dashboards",
20
21
  "/analyses": "navigation.analyses",
21
22
  "/sessions": "navigation.sessions",
22
23
  "/monitoring": "navigation.monitoring",
@@ -9,6 +9,7 @@ import {
9
9
  PopoverContent,
10
10
  PopoverTrigger,
11
11
  } from "@/components/ui/popover";
12
+ import { cn } from "@/lib/utils";
12
13
 
13
14
  const DASHBOARD_CONTEXT =
14
15
  "The user wants to create a new analytics dashboard. " +
@@ -32,7 +33,11 @@ const DASHBOARD_CONTEXT =
32
33
  "Do not create code files for an ordinary native dashboard. Use `connect-builder` only for an explicitly reusable/native code request. " +
33
34
  "After saving, call the `navigate` action with view='adhoc' and dashboardId so the new dashboard opens immediately.";
34
35
 
35
- export function NewDashboardDialog() {
36
+ export function NewDashboardDialog({
37
+ triggerClassName,
38
+ }: {
39
+ triggerClassName?: string;
40
+ } = {}) {
36
41
  const t = useT();
37
42
  const [open, setOpen] = useState(false);
38
43
  const { send, isGenerating } = useSendToAgentChat();
@@ -47,7 +52,12 @@ export function NewDashboardDialog() {
47
52
  return (
48
53
  <Popover open={open} onOpenChange={setOpen}>
49
54
  <PopoverTrigger asChild>
50
- <button className="flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-1.5 text-xs text-muted-foreground/60 hover:bg-sidebar-accent/50 hover:text-primary">
55
+ <button
56
+ className={cn(
57
+ "flex w-full cursor-pointer items-center gap-2 rounded-lg px-3 py-1.5 text-xs text-muted-foreground/60 hover:bg-sidebar-accent/50 hover:text-primary",
58
+ triggerClassName,
59
+ )}
60
+ >
51
61
  <IconPlus className="h-3 w-3" />
52
62
  {t("dialogs.newDashboard")}
53
63
  </button>
@@ -44,6 +44,7 @@ import {
44
44
  import { Link, useLocation, useNavigate } from "react-router";
45
45
  import { toast } from "sonner";
46
46
 
47
+ import { useAuth } from "@/components/auth/AuthProvider";
47
48
  import { getIdToken } from "@/lib/auth";
48
49
  import { ANALYTICS_CHAT_STORAGE_KEY } from "@/lib/chat-handoff";
49
50
  import { cn, shortcutModifierLabel } from "@/lib/utils";
@@ -143,6 +144,7 @@ import { useUserPref } from "@/hooks/use-user-pref";
143
144
  import { shouldRenderDashboardList } from "@/lib/dashboard-list-loading";
144
145
  import { usePopularity, popularityOf } from "@/lib/item-popularity";
145
146
  import {
147
+ dashboardCacheScope,
146
148
  sqlDashboardPrefetchKey,
147
149
  type PrefetchSnapshot,
148
150
  } from "@/lib/prefetch-keys";
@@ -1124,17 +1126,22 @@ async function fetchSqlDashboards(
1124
1126
  ): Promise<SqlDashboardListItem[]> {
1125
1127
  const rows = await callAction("list-sql-dashboards", {}, { method: "GET" });
1126
1128
  return (Array.isArray(rows) ? rows : [])
1127
- .filter((d: any) => d && typeof d.id === "string" && d.id.length > 0)
1129
+ .filter(
1130
+ (d: any) =>
1131
+ d &&
1132
+ typeof d.id === "string" &&
1133
+ d.id.length > 0 &&
1134
+ (d.visibility === "private" ||
1135
+ d.visibility === "org" ||
1136
+ d.visibility === "public"),
1137
+ )
1128
1138
  .map((d: any) => ({
1129
1139
  id: d.id,
1130
1140
  name:
1131
1141
  typeof d.name === "string" && d.name.trim().length > 0
1132
1142
  ? d.name
1133
1143
  : t("sidebar.untitledDashboard"),
1134
- visibility:
1135
- d.visibility === "org" || d.visibility === "public"
1136
- ? (d.visibility as Visibility)
1137
- : ("private" as Visibility),
1144
+ visibility: d.visibility as Visibility,
1138
1145
  parentId:
1139
1146
  typeof d.parentId === "string" && d.parentId.trim().length > 0
1140
1147
  ? d.parentId
@@ -1463,6 +1470,8 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1463
1470
  const t = useT();
1464
1471
  const queryClient = useQueryClient();
1465
1472
  const { setTheme } = useTheme();
1473
+ const { auth } = useAuth();
1474
+ const dashboardScope = dashboardCacheScope(auth);
1466
1475
 
1467
1476
  const isAskRoute = location.pathname === "/ask";
1468
1477
  const activeDashboardId = useMemo(() => {
@@ -1623,10 +1632,9 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1623
1632
  isError: sqlDashboardsError,
1624
1633
  refetch: refetchSqlDashboards,
1625
1634
  } = useQuery({
1626
- queryKey: ["sql-dashboards-sidebar", dashboardsSync],
1635
+ queryKey: ["sql-dashboards-sidebar", dashboardScope, dashboardsSync],
1627
1636
  queryFn: () => fetchSqlDashboards(t),
1628
1637
  staleTime: 30_000,
1629
- placeholderData: (prev) => prev,
1630
1638
  });
1631
1639
 
1632
1640
  const {
@@ -1655,7 +1663,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1655
1663
  const prefetchDashboard = useCallback(
1656
1664
  (d: SidebarDashboard) => {
1657
1665
  if (d.source !== "sql") return;
1658
- const queryKey = sqlDashboardPrefetchKey(d.id);
1666
+ const queryKey = sqlDashboardPrefetchKey(d.id, dashboardScope);
1659
1667
  const cached =
1660
1668
  queryClient.getQueryData<
1661
1669
  PrefetchSnapshot<PrefetchedSqlDashboard | null>
@@ -1670,7 +1678,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1670
1678
  staleTime: cached?.syncVersion === dashboardsSync ? 30_000 : 0,
1671
1679
  });
1672
1680
  },
1673
- [dashboardsSync, queryClient, t],
1681
+ [dashboardScope, dashboardsSync, queryClient, t],
1674
1682
  );
1675
1683
 
1676
1684
  const visibleDashboards = useMemo<SidebarDashboard[]>(() => {
@@ -1824,7 +1832,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1824
1832
  // Optimistic: remove from the sidebar query cache immediately so the row
1825
1833
  // disappears without waiting for the DELETE round-trip. Snapshot the
1826
1834
  // prior value so we can roll back on failure.
1827
- const activeKey = ["sql-dashboards-sidebar"] as const;
1835
+ const activeKey = ["sql-dashboards-sidebar", dashboardScope] as const;
1828
1836
  const prevActive = getQuerySnapshots<SqlDashboardListItem[]>(
1829
1837
  queryClient,
1830
1838
  activeKey,
@@ -1835,14 +1843,16 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1835
1843
  );
1836
1844
  try {
1837
1845
  await deleteSqlDashboard({ id: d.id });
1838
- queryClient.removeQueries({ queryKey: sqlDashboardPrefetchKey(d.id) });
1846
+ queryClient.removeQueries({
1847
+ queryKey: sqlDashboardPrefetchKey(d.id, dashboardScope),
1848
+ });
1839
1849
  queryClient.invalidateQueries({ queryKey: activeKey });
1840
1850
  } catch (err) {
1841
1851
  restoreQuerySnapshots(queryClient, prevActive);
1842
1852
  throw err;
1843
1853
  }
1844
1854
  },
1845
- [deleteAnalysisMut, deleteSqlDashboard, queryClient],
1855
+ [dashboardScope, deleteAnalysisMut, deleteSqlDashboard, queryClient],
1846
1856
  );
1847
1857
 
1848
1858
  const handleDashboardArchive = useCallback(
@@ -1855,7 +1865,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1855
1865
  setHiddenIds(getHiddenDashboards());
1856
1866
  return;
1857
1867
  }
1858
- const activeKey = ["sql-dashboards-sidebar"] as const;
1868
+ const activeKey = ["sql-dashboards-sidebar", dashboardScope] as const;
1859
1869
  const prevActive = getQuerySnapshots<SqlDashboardListItem[]>(
1860
1870
  queryClient,
1861
1871
  activeKey,
@@ -1866,7 +1876,9 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1866
1876
  );
1867
1877
  try {
1868
1878
  await archiveDashboardMut({ id: d.id, archived: true });
1869
- queryClient.removeQueries({ queryKey: sqlDashboardPrefetchKey(d.id) });
1879
+ queryClient.removeQueries({
1880
+ queryKey: sqlDashboardPrefetchKey(d.id, dashboardScope),
1881
+ });
1870
1882
  queryClient.invalidateQueries({ queryKey: activeKey });
1871
1883
  toast.success(t("sidebar.archivedName", { name: d.name }));
1872
1884
  } catch (err) {
@@ -1874,7 +1886,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1874
1886
  throw err;
1875
1887
  }
1876
1888
  },
1877
- [queryClient, archiveDashboardMut, t],
1889
+ [dashboardScope, queryClient, archiveDashboardMut, t],
1878
1890
  );
1879
1891
 
1880
1892
  const handleDashboardRename = useCallback(
@@ -1901,7 +1913,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1901
1913
  return;
1902
1914
  }
1903
1915
 
1904
- const queryKey = ["sql-dashboards-sidebar"] as const;
1916
+ const queryKey = ["sql-dashboards-sidebar", dashboardScope] as const;
1905
1917
  const prev = getQuerySnapshots<SqlDashboardListItem[]>(
1906
1918
  queryClient,
1907
1919
  queryKey,
@@ -1913,17 +1925,19 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1913
1925
  );
1914
1926
  try {
1915
1927
  await renameDashboard({ id: d.id, name: trimmed });
1916
- queryClient.removeQueries({ queryKey: sqlDashboardPrefetchKey(d.id) });
1928
+ queryClient.removeQueries({
1929
+ queryKey: sqlDashboardPrefetchKey(d.id, dashboardScope),
1930
+ });
1917
1931
  queryClient.invalidateQueries({ queryKey });
1918
1932
  queryClient.invalidateQueries({
1919
- queryKey: ["sql-dashboards-palette"],
1933
+ queryKey: ["sql-dashboards-palette", dashboardScope],
1920
1934
  });
1921
1935
  } catch (err) {
1922
1936
  restoreQuerySnapshots(queryClient, prev);
1923
1937
  throw err;
1924
1938
  }
1925
1939
  },
1926
- [queryClient, renameAnalysis, renameDashboard],
1940
+ [dashboardScope, queryClient, renameAnalysis, renameDashboard],
1927
1941
  );
1928
1942
 
1929
1943
  const handleDashboardSetVisibility = useCallback(
@@ -1946,6 +1960,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1946
1960
  }
1947
1961
  const queryKey = [
1948
1962
  "sql-dashboards-sidebar",
1963
+ dashboardScope,
1949
1964
  dashboardsSyncRef.current,
1950
1965
  ] as const;
1951
1966
  const prev = getQuerySnapshots<SqlDashboardListItem[]>(
@@ -1974,7 +1989,7 @@ export function Sidebar({ mobile }: { mobile?: boolean } = {}) {
1974
1989
  throw err;
1975
1990
  }
1976
1991
  },
1977
- [queryClient, setResourceVisibility, t],
1992
+ [dashboardScope, queryClient, setResourceVisibility, t],
1978
1993
  );
1979
1994
 
1980
1995
  const sensors = useSensors(
@@ -457,6 +457,16 @@
457
457
  container: data-sources / inline-size;
458
458
  }
459
459
 
460
+ .dashboard-overview-layout {
461
+ container: dashboard-overview / inline-size;
462
+ }
463
+
464
+ .dashboard-overview-toolbar {
465
+ display: flex;
466
+ flex-direction: column;
467
+ gap: 0.5rem;
468
+ }
469
+
460
470
  .data-sources-toolbar {
461
471
  display: flex;
462
472
  flex-direction: column;
@@ -505,6 +515,13 @@
505
515
  }
506
516
  }
507
517
 
518
+ @container dashboard-overview (min-width: 640px) {
519
+ .dashboard-overview-toolbar {
520
+ flex-direction: row;
521
+ align-items: center;
522
+ }
523
+ }
524
+
508
525
  @container data-sources (min-width: 768px) {
509
526
  .data-sources-grid {
510
527
  grid-template-columns: repeat(2, minmax(0, 1fr));