@agent-native/core 0.90.11 → 0.91.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 (315) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +22 -0
  3. package/corpus/core/docs/content/toolkit-settings.mdx +56 -3
  4. package/corpus/core/package.json +2 -1
  5. package/corpus/core/src/agent/run-ownership.ts +29 -1
  6. package/corpus/core/src/changelog/parse.ts +78 -0
  7. package/corpus/core/src/chat-threads/schema.ts +43 -0
  8. package/corpus/core/src/chat-threads/store.ts +144 -12
  9. package/corpus/core/src/cli/workspace-dev.ts +25 -5
  10. package/corpus/core/src/client/AgentPanel.tsx +79 -14
  11. package/corpus/core/src/client/AssistantChat.tsx +359 -425
  12. package/corpus/core/src/client/analytics-session.ts +70 -0
  13. package/corpus/core/src/client/analytics.ts +175 -49
  14. package/corpus/core/src/client/chat/message-components.tsx +22 -2
  15. package/corpus/core/src/client/components/ui/message-scroller.tsx +131 -0
  16. package/corpus/core/src/client/conversation/AgentConversation.tsx +63 -41
  17. package/corpus/core/src/client/error-capture.ts +616 -0
  18. package/corpus/core/src/client/index.ts +12 -0
  19. package/corpus/core/src/client/session-replay.ts +57 -7
  20. package/corpus/core/src/client/settings/SettingsPanel.tsx +123 -1
  21. package/corpus/core/src/client/settings/SettingsTabsPage.tsx +292 -45
  22. package/corpus/core/src/client/settings/index.ts +1 -0
  23. package/corpus/core/src/client/sharing/ShareButton.tsx +14 -11
  24. package/corpus/core/src/client/sharing/ShareDialog.tsx +13 -10
  25. package/corpus/core/src/mcp/builtin-tools.ts +29 -2
  26. package/corpus/core/src/server/agent-chat-plugin.ts +174 -79
  27. package/corpus/core/src/server/onboarding-html.ts +28 -16
  28. package/corpus/core/src/sharing/actions/list-resource-shares.ts +45 -1
  29. package/corpus/core/src/sharing/actions/share-resource.ts +9 -0
  30. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
  31. package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
  32. package/corpus/core/src/vite/client.ts +217 -35
  33. package/corpus/templates/analytics/.agents/skills/adhoc-analysis/SKILL.md +8 -7
  34. package/corpus/templates/analytics/.agents/skills/analysis-workspace/SKILL.md +14 -10
  35. package/corpus/templates/analytics/.agents/skills/bigquery/SKILL.md +15 -15
  36. package/corpus/templates/analytics/.agents/skills/cross-source-analysis/SKILL.md +1 -0
  37. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +38 -22
  38. package/corpus/templates/analytics/.agents/skills/data-programs/SKILL.md +114 -61
  39. package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +1 -0
  40. package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +7 -7
  41. package/corpus/templates/analytics/.agents/skills/hubspot/SKILL.md +1 -0
  42. package/corpus/templates/analytics/.agents/skills/prometheus/SKILL.md +1 -1
  43. package/corpus/templates/analytics/.builder/skills/bigquery/SKILL.md +17 -17
  44. package/corpus/templates/analytics/.builder/skills/gcloud/SKILL.md +5 -5
  45. package/corpus/templates/analytics/.builder/skills/github/SKILL.md +7 -7
  46. package/corpus/templates/analytics/.builder/skills/gong/SKILL.md +12 -12
  47. package/corpus/templates/analytics/.builder/skills/grafana/SKILL.md +7 -7
  48. package/corpus/templates/analytics/.builder/skills/sentry/SKILL.md +7 -7
  49. package/corpus/templates/analytics/.builder/skills/slack/SKILL.md +6 -6
  50. package/corpus/templates/analytics/.builder/skills/stripe/SKILL.md +7 -7
  51. package/corpus/templates/analytics/AGENTS.md +47 -2
  52. package/corpus/templates/analytics/actions/add-status-page-monitor.ts +36 -0
  53. package/corpus/templates/analytics/actions/capture-test-error.ts +33 -0
  54. package/corpus/templates/analytics/actions/delete-monitor.ts +24 -0
  55. package/corpus/templates/analytics/actions/delete-status-page.ts +23 -0
  56. package/corpus/templates/analytics/actions/get-error-issue.ts +36 -0
  57. package/corpus/templates/analytics/actions/get-monitor-stats.ts +55 -0
  58. package/corpus/templates/analytics/actions/get-monitor.ts +27 -0
  59. package/corpus/templates/analytics/actions/get-public-status-page.ts +41 -0
  60. package/corpus/templates/analytics/actions/get-status-page.ts +29 -0
  61. package/corpus/templates/analytics/actions/list-error-issues.ts +40 -0
  62. package/corpus/templates/analytics/actions/list-monitors.ts +21 -0
  63. package/corpus/templates/analytics/actions/list-status-pages.ts +21 -0
  64. package/corpus/templates/analytics/actions/match-error-issues.ts +51 -0
  65. package/corpus/templates/analytics/actions/navigate.ts +58 -4
  66. package/corpus/templates/analytics/actions/remove-status-page-monitor.ts +22 -0
  67. package/corpus/templates/analytics/actions/reorder-status-page-monitors.ts +25 -0
  68. package/corpus/templates/analytics/actions/resolve-error-issue.ts +38 -0
  69. package/corpus/templates/analytics/actions/run-monitor-check.ts +23 -0
  70. package/corpus/templates/analytics/actions/save-analysis.ts +1 -0
  71. package/corpus/templates/analytics/actions/save-monitor.ts +145 -0
  72. package/corpus/templates/analytics/actions/save-status-page.ts +47 -0
  73. package/corpus/templates/analytics/actions/view-screen.ts +212 -0
  74. package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
  75. package/corpus/templates/analytics/app/components/layout/Layout.tsx +10 -1
  76. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +134 -39
  77. package/corpus/templates/analytics/app/components/monitoring/PublicStatusView.tsx +351 -0
  78. package/corpus/templates/analytics/app/components/monitoring/ResponseTimeChart.tsx +174 -0
  79. package/corpus/templates/analytics/app/components/monitoring/UptimeStatCards.tsx +85 -0
  80. package/corpus/templates/analytics/app/components/monitoring/UptimeTimelineBars.tsx +106 -0
  81. package/corpus/templates/analytics/app/components/monitoring/chart-utils.ts +101 -0
  82. package/corpus/templates/analytics/app/components/monitoring/index.ts +28 -0
  83. package/corpus/templates/analytics/app/components/monitoring/types.ts +42 -0
  84. package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +34 -0
  85. package/corpus/templates/analytics/app/i18n/zh-TW.ts +6 -0
  86. package/corpus/templates/analytics/app/i18n-data.ts +33 -0
  87. package/corpus/templates/analytics/app/pages/DataSources.tsx +28 -0
  88. package/corpus/templates/analytics/app/pages/Settings.tsx +77 -9
  89. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +3 -3
  90. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/dashboard-layout.ts +7 -0
  91. package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +205 -0
  92. package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +100 -0
  93. package/corpus/templates/analytics/app/pages/monitoring/UptimePanel.tsx +475 -0
  94. package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +372 -0
  95. package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +360 -0
  96. package/corpus/templates/analytics/app/pages/monitoring/errors/Sparkline.tsx +55 -0
  97. package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +106 -0
  98. package/corpus/templates/analytics/app/pages/monitoring/errors/types.ts +75 -0
  99. package/corpus/templates/analytics/app/pages/monitoring/errors/utils.ts +132 -0
  100. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorDetail.tsx +535 -0
  101. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +1026 -0
  102. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorList.tsx +311 -0
  103. package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +235 -0
  104. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPageEditor.tsx +661 -0
  105. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPagesView.tsx +355 -0
  106. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/i18n.ts +106 -0
  107. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/slug.ts +24 -0
  108. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/types.ts +20 -0
  109. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-summary.ts +87 -0
  110. package/corpus/templates/analytics/app/pages/monitoring/uptime/types.ts +161 -0
  111. package/corpus/templates/analytics/app/pages/monitoring/uptime/utils.ts +210 -0
  112. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +76 -1
  113. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +74 -9
  114. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +197 -20
  115. package/corpus/templates/analytics/app/root.tsx +33 -1
  116. package/corpus/templates/analytics/app/routes/monitoring._index.tsx +10 -0
  117. package/corpus/templates/analytics/app/routes/status.$slug.tsx +118 -0
  118. package/corpus/templates/analytics/changelog/2026-07-08-add-uptime-monitors-that-ping-your-urls-and-alert-you-when-t.md +6 -0
  119. package/corpus/templates/analytics/changelog/2026-07-08-analytics-chats-keep-large-data-dictionaries-compact-so-prov.md +6 -0
  120. package/corpus/templates/analytics/changelog/2026-07-08-create-public-status-pages-that-share-the-live-health-of-cho.md +6 -0
  121. package/corpus/templates/analytics/changelog/2026-07-08-dashboard-extension-panels-use-clearer-open-copy.md +6 -0
  122. package/corpus/templates/analytics/changelog/2026-07-08-error-capture.md +6 -0
  123. package/corpus/templates/analytics/changelog/2026-07-08-fixed-single-panel-dashboard-drags-so-they-no-longer-rewrite.md +6 -0
  124. package/corpus/templates/analytics/changelog/2026-07-08-jump-straight-from-an-error-in-a-session-recording-to-its-fu.md +6 -0
  125. package/corpus/templates/analytics/changelog/2026-07-08-monitor-detail-and-list-now-show-colorful-uptime-timelines-r.md +6 -0
  126. package/corpus/templates/analytics/changelog/2026-07-08-pinned-ask-chats-now-show-a-pin-icon-in-the-sidebar.md +6 -0
  127. package/corpus/templates/analytics/changelog/2026-07-08-publish-a-public-uptime-status-page-with-colorful-uptime-tim.md +6 -0
  128. package/corpus/templates/analytics/changelog/2026-07-08-sessions-now-hide-visitor-emails-in-demo-mode-and-show-clean.md +6 -0
  129. package/corpus/templates/analytics/changelog/2026-07-08-settings-are-cleaner-searchable-and-alerts-have-their-own-tab.md +5 -0
  130. package/corpus/templates/analytics/changelog/2026-07-08-sidebar-sections-stay-collapsed-until-opened.md +5 -0
  131. package/corpus/templates/analytics/changelog/2026-07-08-the-uptime-monitor-list-now-has-a-current-status-overview-wi.md +6 -0
  132. package/corpus/templates/analytics/docs/error-capture.md +172 -0
  133. package/corpus/templates/analytics/docs/uptime-monitoring.md +150 -0
  134. package/corpus/templates/analytics/server/db/schema-errors.ts +150 -0
  135. package/corpus/templates/analytics/server/db/schema-monitoring.ts +177 -0
  136. package/corpus/templates/analytics/server/db/schema.ts +6 -0
  137. package/corpus/templates/analytics/server/jobs/uptime-monitors.ts +123 -0
  138. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +41 -0
  139. package/corpus/templates/analytics/server/lib/data-dictionary-context.ts +55 -12
  140. package/corpus/templates/analytics/server/lib/error-capture.ts +1331 -0
  141. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +47 -1
  142. package/corpus/templates/analytics/server/lib/monitor-stats.ts +494 -0
  143. package/corpus/templates/analytics/server/lib/status-pages.ts +798 -0
  144. package/corpus/templates/analytics/server/lib/uptime-monitors.ts +1665 -0
  145. package/corpus/templates/analytics/server/plugins/agent-chat.ts +7 -37
  146. package/corpus/templates/analytics/server/plugins/auth.ts +11 -1
  147. package/corpus/templates/analytics/server/plugins/db.ts +408 -0
  148. package/corpus/templates/analytics/server/plugins/uptime-monitor-jobs.ts +63 -0
  149. package/corpus/templates/assets/app/routes/_index.tsx +1 -1
  150. package/corpus/templates/assets/app/routes/settings.tsx +22 -1
  151. package/corpus/templates/assets/changelog/2026-07-08-recent-drafts-keep-comfortable-side-padding.md +6 -0
  152. package/corpus/templates/assets/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  153. package/corpus/templates/brain/app/routes/settings.tsx +43 -5
  154. package/corpus/templates/brain/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  155. package/corpus/templates/calendar/app/pages/Settings.tsx +44 -6
  156. package/corpus/templates/calendar/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  157. package/corpus/templates/chat/app/routes/settings.tsx +16 -1
  158. package/corpus/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  159. package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +79 -37
  160. package/corpus/templates/clips/app/components/player/player-controls.tsx +35 -0
  161. package/corpus/templates/clips/app/components/player/video-player.tsx +162 -18
  162. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +63 -6
  163. package/corpus/templates/clips/app/routes/record.tsx +18 -1
  164. package/corpus/templates/clips/changelog/2026-07-07-shared-clips-start-playback-reliably-from-the-first-play-click.md +6 -0
  165. package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-camera-and-microphone-menus-now-show-which-.md +6 -0
  166. package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-copies-new-clip-links-after-saving.md +6 -0
  167. package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-recordings-now-continue-after-granting-came.md +6 -0
  168. package/corpus/templates/clips/changelog/2026-07-08-mobile-shared-clips-now-have-loom-style-tap-and-skip-controls.md +6 -0
  169. package/corpus/templates/clips/changelog/2026-07-08-recordings-and-uploads-copy-links-after-saving.md +6 -0
  170. package/corpus/templates/clips/changelog/2026-07-08-settings-are-cleaner-searchable-and-collapse-s3-with-builder.md +5 -0
  171. package/corpus/templates/clips/changelog/2026-07-08-transcripts-are-more-reliable-for-longer-desktop-recordings-.md +6 -0
  172. package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -0
  173. package/corpus/templates/clips/chrome-extension/src/background.ts +162 -13
  174. package/corpus/templates/clips/chrome-extension/src/content-script.ts +14 -0
  175. package/corpus/templates/clips/chrome-extension/src/offscreen.ts +36 -0
  176. package/corpus/templates/clips/chrome-extension/src/overlay.ts +99 -25
  177. package/corpus/templates/clips/chrome-extension/src/permission.ts +63 -14
  178. package/corpus/templates/clips/chrome-extension/src/popup.ts +123 -23
  179. package/corpus/templates/content/actions/_builder-cms-read-client.ts +47 -0
  180. package/corpus/templates/content/actions/_database-source-utils.ts +33 -4
  181. package/corpus/templates/content/actions/add-content-database-source-field-property.ts +214 -29
  182. package/corpus/templates/content/actions/attach-content-database-source.ts +3 -0
  183. package/corpus/templates/content/actions/change-content-database-source-role.ts +1 -0
  184. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +42 -32
  185. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +352 -81
  186. package/corpus/templates/content/app/components/editor/database/settings.tsx +49 -24
  187. package/corpus/templates/content/app/routes/_app.settings.tsx +19 -1
  188. package/corpus/templates/content/changelog/2026-07-07-builder-source-tag-fields-now-import-as-multi-select.md +6 -0
  189. package/corpus/templates/content/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  190. package/corpus/templates/content/shared/api.ts +3 -0
  191. package/corpus/templates/content/shared/properties.ts +42 -0
  192. package/corpus/templates/design/actions/generate-design.ts +3 -0
  193. package/corpus/templates/design/actions/get-design-system.ts +147 -1
  194. package/corpus/templates/design/app/routes/settings.tsx +16 -1
  195. package/corpus/templates/design/changelog/2026-07-08-design-generation-now-follows-hydrated-builder-design-system.md +6 -0
  196. package/corpus/templates/design/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  197. package/corpus/templates/dispatch/app/routes/settings.tsx +23 -2
  198. package/corpus/templates/dispatch/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  199. package/corpus/templates/forms/app/routes/_app.settings.tsx +16 -1
  200. package/corpus/templates/forms/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  201. package/corpus/templates/macros/app/routes/settings.tsx +16 -1
  202. package/corpus/templates/macros/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  203. package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +1 -1
  204. package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +1 -1
  205. package/corpus/templates/mail/app/pages/SettingsPage.tsx +123 -105
  206. package/corpus/templates/mail/changelog/2026-07-08-settings-redesigned-with-a-consistent-searchable-layout.md +5 -0
  207. package/corpus/templates/plan/app/routes/settings.tsx +23 -2
  208. package/corpus/templates/plan/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  209. package/corpus/templates/slides/actions/add-slide.ts +1 -0
  210. package/corpus/templates/slides/actions/get-design-system.ts +147 -1
  211. package/corpus/templates/slides/app/pages/Index.tsx +46 -1
  212. package/corpus/templates/slides/app/routes/settings.tsx +16 -1
  213. package/corpus/templates/slides/changelog/2026-07-08-deck-generation-now-follows-hydrated-builder-design-system-g.md +6 -0
  214. package/corpus/templates/slides/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  215. package/dist/agent/run-ownership.d.ts +6 -0
  216. package/dist/agent/run-ownership.d.ts.map +1 -1
  217. package/dist/agent/run-ownership.js +11 -1
  218. package/dist/agent/run-ownership.js.map +1 -1
  219. package/dist/changelog/parse.d.ts +7 -0
  220. package/dist/changelog/parse.d.ts.map +1 -1
  221. package/dist/changelog/parse.js +64 -0
  222. package/dist/changelog/parse.js.map +1 -1
  223. package/dist/chat-threads/schema.d.ts +445 -0
  224. package/dist/chat-threads/schema.d.ts.map +1 -0
  225. package/dist/chat-threads/schema.js +39 -0
  226. package/dist/chat-threads/schema.js.map +1 -0
  227. package/dist/chat-threads/store.d.ts +12 -0
  228. package/dist/chat-threads/store.d.ts.map +1 -1
  229. package/dist/chat-threads/store.js +99 -10
  230. package/dist/chat-threads/store.js.map +1 -1
  231. package/dist/cli/workspace-dev.d.ts.map +1 -1
  232. package/dist/cli/workspace-dev.js +20 -5
  233. package/dist/cli/workspace-dev.js.map +1 -1
  234. package/dist/client/AgentPanel.d.ts.map +1 -1
  235. package/dist/client/AgentPanel.js +35 -7
  236. package/dist/client/AgentPanel.js.map +1 -1
  237. package/dist/client/AssistantChat.d.ts.map +1 -1
  238. package/dist/client/AssistantChat.js +105 -183
  239. package/dist/client/AssistantChat.js.map +1 -1
  240. package/dist/client/analytics-session.d.ts +3 -0
  241. package/dist/client/analytics-session.d.ts.map +1 -0
  242. package/dist/client/analytics-session.js +66 -0
  243. package/dist/client/analytics-session.js.map +1 -0
  244. package/dist/client/analytics.d.ts +32 -0
  245. package/dist/client/analytics.d.ts.map +1 -1
  246. package/dist/client/analytics.js +116 -46
  247. package/dist/client/analytics.js.map +1 -1
  248. package/dist/client/chat/message-components.d.ts +2 -1
  249. package/dist/client/chat/message-components.d.ts.map +1 -1
  250. package/dist/client/chat/message-components.js +16 -6
  251. package/dist/client/chat/message-components.js.map +1 -1
  252. package/dist/client/components/ui/message-scroller.d.ts +16 -0
  253. package/dist/client/components/ui/message-scroller.d.ts.map +1 -0
  254. package/dist/client/components/ui/message-scroller.js +25 -0
  255. package/dist/client/components/ui/message-scroller.js.map +1 -0
  256. package/dist/client/conversation/AgentConversation.d.ts +1 -1
  257. package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
  258. package/dist/client/conversation/AgentConversation.js +3 -8
  259. package/dist/client/conversation/AgentConversation.js.map +1 -1
  260. package/dist/client/error-capture.d.ts +99 -0
  261. package/dist/client/error-capture.d.ts.map +1 -0
  262. package/dist/client/error-capture.js +437 -0
  263. package/dist/client/error-capture.js.map +1 -0
  264. package/dist/client/index.d.ts +2 -2
  265. package/dist/client/index.d.ts.map +1 -1
  266. package/dist/client/index.js +3 -1
  267. package/dist/client/index.js.map +1 -1
  268. package/dist/client/session-replay.d.ts +22 -0
  269. package/dist/client/session-replay.d.ts.map +1 -1
  270. package/dist/client/session-replay.js +45 -4
  271. package/dist/client/session-replay.js.map +1 -1
  272. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  273. package/dist/client/settings/SettingsPanel.js +100 -5
  274. package/dist/client/settings/SettingsPanel.js.map +1 -1
  275. package/dist/client/settings/SettingsTabsPage.d.ts +49 -1
  276. package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
  277. package/dist/client/settings/SettingsTabsPage.js +131 -19
  278. package/dist/client/settings/SettingsTabsPage.js.map +1 -1
  279. package/dist/client/settings/index.d.ts +1 -1
  280. package/dist/client/settings/index.d.ts.map +1 -1
  281. package/dist/client/settings/index.js.map +1 -1
  282. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  283. package/dist/client/sharing/ShareButton.js +13 -8
  284. package/dist/client/sharing/ShareButton.js.map +1 -1
  285. package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
  286. package/dist/client/sharing/ShareDialog.js +12 -7
  287. package/dist/client/sharing/ShareDialog.js.map +1 -1
  288. package/dist/collab/struct-routes.d.ts +1 -1
  289. package/dist/mcp/builtin-tools.d.ts.map +1 -1
  290. package/dist/mcp/builtin-tools.js +21 -2
  291. package/dist/mcp/builtin-tools.js.map +1 -1
  292. package/dist/notifications/routes.d.ts +1 -1
  293. package/dist/org/schema.d.ts +15 -15
  294. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  295. package/dist/resources/handlers.d.ts +3 -3
  296. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  297. package/dist/server/agent-chat-plugin.js +109 -73
  298. package/dist/server/agent-chat-plugin.js.map +1 -1
  299. package/dist/server/agent-engine-api-key-route.d.ts +1 -1
  300. package/dist/server/onboarding-html.d.ts.map +1 -1
  301. package/dist/server/onboarding-html.js +28 -16
  302. package/dist/server/onboarding-html.js.map +1 -1
  303. package/dist/sharing/actions/list-resource-shares.js +30 -1
  304. package/dist/sharing/actions/list-resource-shares.js.map +1 -1
  305. package/dist/sharing/actions/share-resource.js +6 -0
  306. package/dist/sharing/actions/share-resource.js.map +1 -1
  307. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
  308. package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
  309. package/dist/vite/client.d.ts.map +1 -1
  310. package/dist/vite/client.js +192 -30
  311. package/dist/vite/client.js.map +1 -1
  312. package/docs/content/toolkit-settings.mdx +56 -3
  313. package/package.json +2 -1
  314. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
  315. package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
@@ -7,6 +7,10 @@ import { fileURLToPath } from "url";
7
7
 
8
8
  import type { ConfigEnv, Plugin, UserConfig } from "vite";
9
9
 
10
+ import {
11
+ mergePendingChangelog,
12
+ parsePendingEntry,
13
+ } from "../changelog/parse.js";
10
14
  import { getViteDevRecoveryScript } from "../client/vite-dev-recovery-script.js";
11
15
  import { findWorkspaceRoot } from "../scripts/utils.js";
12
16
  import { verifyEmbedSessionToken } from "../server/embed-session.js";
@@ -302,9 +306,8 @@ function findWorkspaceCoreSync(
302
306
 
303
307
  function findLocalWorkspacePackageDeps(
304
308
  startDir: string,
305
- workspaceRoot: string | null,
309
+ _workspaceRoot: string | null,
306
310
  ): Array<{ packageName: string; packageDir: string }> {
307
- if (!workspaceRoot) return [];
308
311
  const pkgPath = path.join(startDir, "package.json");
309
312
  if (!fs.existsSync(pkgPath)) return [];
310
313
 
@@ -315,23 +318,26 @@ function findLocalWorkspacePackageDeps(
315
318
  ...(pkg.devDependencies ?? {}),
316
319
  ...(pkg.peerDependencies ?? {}),
317
320
  } as Record<string, string>;
318
- const req = createRequire(pkgPath);
319
321
  const seen = new Set<string>();
320
322
  const packages: Array<{ packageName: string; packageDir: string }> = [];
321
323
 
322
324
  for (const [packageName, range] of Object.entries(deps)) {
323
- if (!range.startsWith("workspace:")) continue;
324
325
  if (seen.has(packageName)) continue;
325
326
  seen.add(packageName);
326
327
 
327
328
  try {
328
- const packageJsonPath =
329
- findInstalledPackageJsonPath(pkgPath, packageName) ??
330
- findPackageJsonFromEntry(req.resolve(packageName));
329
+ let packageJsonPath: string | null = null;
330
+ if (range.startsWith("file:")) {
331
+ packageJsonPath = findFilePackageJsonPath(pkgPath, range);
332
+ } else {
333
+ continue;
334
+ }
331
335
  if (!packageJsonPath) continue;
332
336
  const packageDir = fs.realpathSync(path.dirname(packageJsonPath));
333
- if (!packageDir.startsWith(path.join(workspaceRoot, "packages")))
334
- continue;
337
+ const packageJson = JSON.parse(
338
+ fs.readFileSync(packageJsonPath, "utf-8"),
339
+ );
340
+ if (packageJson?.name !== packageName) continue;
335
341
  packages.push({ packageName, packageDir });
336
342
  } catch {
337
343
  // Dependency may not have been installed yet; ignore it for dev config.
@@ -344,31 +350,16 @@ function findLocalWorkspacePackageDeps(
344
350
  }
345
351
  }
346
352
 
347
- function findInstalledPackageJsonPath(
353
+ function findFilePackageJsonPath(
348
354
  pkgPath: string,
349
- packageName: string,
355
+ range: string,
350
356
  ): string | null {
351
- const candidate = path.join(
352
- path.dirname(pkgPath),
353
- "node_modules",
354
- ...packageName.split("/"),
355
- "package.json",
356
- );
357
- return fs.existsSync(candidate) ? candidate : null;
358
- }
359
-
360
- function findPackageJsonFromEntry(entryPath: string): string | null {
361
- let dir = fs.statSync(entryPath).isDirectory()
362
- ? entryPath
363
- : path.dirname(entryPath);
364
- for (let i = 0; i < 20; i++) {
365
- const candidate = path.join(dir, "package.json");
366
- if (fs.existsSync(candidate)) return candidate;
367
- const parent = path.dirname(dir);
368
- if (parent === dir) break;
369
- dir = parent;
370
- }
371
- return null;
357
+ const spec = range.slice("file:".length);
358
+ const packageDir = spec.startsWith("//")
359
+ ? fileURLToPath(range)
360
+ : path.resolve(path.dirname(pkgPath), spec);
361
+ const packageJsonPath = path.join(packageDir, "package.json");
362
+ return fs.existsSync(packageJsonPath) ? packageJsonPath : null;
372
363
  }
373
364
 
374
365
  function findPnpmWorkspaceRoot(startDir: string): string | null {
@@ -600,6 +591,18 @@ const CORE_CLIENT_SUBPATHS = [
600
591
  "@agent-native/core/voice",
601
592
  ];
602
593
 
594
+ const TOOLKIT_CLIENT_SUBPATHS = [
595
+ "@agent-native/toolkit",
596
+ "@agent-native/toolkit/app-shell",
597
+ "@agent-native/toolkit/collab-ui",
598
+ "@agent-native/toolkit/hooks",
599
+ "@agent-native/toolkit/onboarding",
600
+ "@agent-native/toolkit/provider",
601
+ "@agent-native/toolkit/sharing",
602
+ "@agent-native/toolkit/ui",
603
+ "@agent-native/toolkit/utils",
604
+ ];
605
+
603
606
  const NODE_SSR_NATIVE_EXTERNALS = ["better-sqlite3", "bindings"];
604
607
 
605
608
  function getDefaultOptimizeDeps(cwd: string): string[] {
@@ -658,6 +661,10 @@ function getDefaultOptimizeDeps(cwd: string): string[] {
658
661
  specifier: "@agent-native/core/client/tools",
659
662
  packageName: "@agent-native/core",
660
663
  },
664
+ ...TOOLKIT_CLIENT_SUBPATHS.map((specifier) => ({
665
+ specifier,
666
+ packageName: "@agent-native/toolkit",
667
+ })),
661
668
  ] as Array<{ specifier: string; packageName?: string }>)),
662
669
  { specifier: "@libsql/client" },
663
670
  { specifier: "@amplitude/analytics-browser" },
@@ -1809,6 +1816,133 @@ function ssrStubPlugin(packages: string[]): Plugin | null {
1809
1816
  };
1810
1817
  }
1811
1818
 
1819
+ function splitViteRequest(id: string): { file: string; query: string } | null {
1820
+ const queryIndex = id.indexOf("?");
1821
+ if (queryIndex === -1) return null;
1822
+ return {
1823
+ file: id.slice(0, queryIndex),
1824
+ query: id.slice(queryIndex + 1),
1825
+ };
1826
+ }
1827
+
1828
+ function hasRawQuery(query: string): boolean {
1829
+ return new URLSearchParams(query).has("raw");
1830
+ }
1831
+
1832
+ function normalizeViteFilePath(file: string): string | null {
1833
+ if (!file || file.startsWith("\0")) return null;
1834
+ const fsPath = file.startsWith("/@fs/") ? file.slice("/@fs".length) : file;
1835
+ try {
1836
+ return decodeURI(fsPath);
1837
+ } catch {
1838
+ return fsPath;
1839
+ }
1840
+ }
1841
+
1842
+ function changelogRawPathFromId(id: string): string | null {
1843
+ const request = splitViteRequest(id);
1844
+ if (!request || !hasRawQuery(request.query)) return null;
1845
+ const file = normalizeViteFilePath(request.file);
1846
+ if (!file || path.basename(file) !== "CHANGELOG.md") return null;
1847
+ return path.resolve(file);
1848
+ }
1849
+
1850
+ function resolveChangelogRawImport(
1851
+ source: string,
1852
+ importer: string | undefined,
1853
+ ): string | null {
1854
+ const request = splitViteRequest(source);
1855
+ if (!request || !hasRawQuery(request.query)) return null;
1856
+ const rawFile = normalizeViteFilePath(request.file);
1857
+ if (!rawFile || path.basename(rawFile) !== "CHANGELOG.md") return null;
1858
+
1859
+ const rawImporter = importer?.split("?")[0];
1860
+ const importerFile =
1861
+ (rawImporter && normalizeViteFilePath(rawImporter)) ||
1862
+ rawImporter ||
1863
+ path.join(process.cwd(), "index.ts");
1864
+ const resolved = path.isAbsolute(rawFile)
1865
+ ? rawFile
1866
+ : path.resolve(path.dirname(importerFile), rawFile);
1867
+ return `${resolved}?${request.query}`;
1868
+ }
1869
+
1870
+ function readAppChangelogMarkdown(
1871
+ changelogPath: string,
1872
+ watchFile: (file: string) => void,
1873
+ ): string {
1874
+ // Only ever register real files with Vite's `addWatchFile`. Passing a
1875
+ // directory makes import-analysis try to resolve it as a module and fail
1876
+ // with "Failed to resolve import .../changelog", which breaks hydration for
1877
+ // every template in dev. New/removed pending files are still picked up via
1878
+ // `handleHotUpdate` (Vite watches the project root recursively).
1879
+ watchFile(changelogPath);
1880
+ const existing = fs.existsSync(changelogPath)
1881
+ ? fs.readFileSync(changelogPath, "utf-8")
1882
+ : "";
1883
+ const pendingDir = path.join(path.dirname(changelogPath), "changelog");
1884
+ if (!fs.existsSync(pendingDir)) {
1885
+ return existing;
1886
+ }
1887
+
1888
+ const pending = fs
1889
+ .readdirSync(pendingDir)
1890
+ .filter(
1891
+ (file) => file.endsWith(".md") && file.toLowerCase() !== "readme.md",
1892
+ )
1893
+ .sort()
1894
+ .map((file) => {
1895
+ const filePath = path.join(pendingDir, file);
1896
+ watchFile(filePath);
1897
+ return parsePendingEntry(fs.readFileSync(filePath, "utf-8"));
1898
+ });
1899
+ return mergePendingChangelog(existing, pending);
1900
+ }
1901
+
1902
+ function isChangelogSourceFile(file: string): boolean {
1903
+ if (path.basename(file) === "CHANGELOG.md") return true;
1904
+ return (
1905
+ path.basename(path.dirname(file)) === "changelog" &&
1906
+ file.endsWith(".md") &&
1907
+ path.basename(file).toLowerCase() !== "readme.md"
1908
+ );
1909
+ }
1910
+
1911
+ function invalidateChangelogRawModules(server: {
1912
+ moduleGraph?: { idToModuleMap?: Map<string, any>; invalidateModule?: any };
1913
+ }) {
1914
+ const moduleGraph = server.moduleGraph;
1915
+ if (!moduleGraph?.idToModuleMap || !moduleGraph.invalidateModule) return;
1916
+ for (const mod of moduleGraph.idToModuleMap.values()) {
1917
+ if (!mod?.id || !changelogRawPathFromId(mod.id)) continue;
1918
+ moduleGraph.invalidateModule(mod);
1919
+ }
1920
+ }
1921
+
1922
+ function appChangelogRawPlugin(): Plugin {
1923
+ return {
1924
+ name: "agent-native-app-changelog-raw",
1925
+ enforce: "pre",
1926
+ resolveId(source, importer) {
1927
+ return resolveChangelogRawImport(source, importer);
1928
+ },
1929
+ load(id) {
1930
+ const changelogPath = changelogRawPathFromId(id);
1931
+ if (!changelogPath) return null;
1932
+ const markdown = readAppChangelogMarkdown(changelogPath, (file) =>
1933
+ this.addWatchFile(file),
1934
+ );
1935
+ return `export default ${JSON.stringify(markdown)};`;
1936
+ },
1937
+ handleHotUpdate(ctx) {
1938
+ if (!isChangelogSourceFile(ctx.file)) return;
1939
+ invalidateChangelogRawModules(ctx.server as any);
1940
+ ctx.server.ws.send({ type: "full-reload" });
1941
+ return [];
1942
+ },
1943
+ };
1944
+ }
1945
+
1812
1946
  /**
1813
1947
  * Expose the resolved Vite dev server port as process.env.PORT so that
1814
1948
  * in-process scripts (which use localFetch → http://localhost:${PORT}/api/...)
@@ -2034,12 +2168,13 @@ function localWorkspacePackageAliases(
2034
2168
  if (!exportsMap || typeof exportsMap !== "object") continue;
2035
2169
 
2036
2170
  for (const [exportPath, target] of Object.entries(exportsMap)) {
2037
- if (typeof target !== "string") continue;
2171
+ const exportTarget = localWorkspaceExportTarget(packageDir, target);
2172
+ if (!exportTarget) continue;
2038
2173
  const importPath =
2039
2174
  exportPath === "."
2040
2175
  ? packageName
2041
2176
  : `${packageName}${exportPath.slice(1)}`;
2042
- const replacement = path.resolve(packageDir, target);
2177
+ const replacement = path.resolve(packageDir, exportTarget);
2043
2178
 
2044
2179
  if (importPath.includes("*") || replacement.includes("*")) {
2045
2180
  aliases.push({
@@ -2064,6 +2199,53 @@ function localWorkspacePackageAliases(
2064
2199
  return aliases;
2065
2200
  }
2066
2201
 
2202
+ function localWorkspaceExportTarget(
2203
+ packageDir: string,
2204
+ target: unknown,
2205
+ ): string | null {
2206
+ const rawTarget = pickLocalWorkspaceExportTarget(target);
2207
+ if (!rawTarget) return null;
2208
+ return distExportToSourceTarget(packageDir, rawTarget);
2209
+ }
2210
+
2211
+ function pickLocalWorkspaceExportTarget(target: unknown): string | null {
2212
+ if (typeof target === "string") return target;
2213
+ if (!target || typeof target !== "object" || Array.isArray(target)) {
2214
+ return null;
2215
+ }
2216
+
2217
+ const record = target as Record<string, unknown>;
2218
+ for (const condition of ["development", "browser", "import", "default"]) {
2219
+ const resolved = pickLocalWorkspaceExportTarget(record[condition]);
2220
+ if (resolved) return resolved;
2221
+ }
2222
+ return null;
2223
+ }
2224
+
2225
+ function distExportToSourceTarget(packageDir: string, target: string): string {
2226
+ if (!target.startsWith("./dist/")) return target;
2227
+
2228
+ if (target.includes("*")) {
2229
+ return target
2230
+ .replace("./dist/", "./src/")
2231
+ .replace(/\.d\.ts$/, "")
2232
+ .replace(/\.js$/, "");
2233
+ }
2234
+
2235
+ const sourceBase = target
2236
+ .replace("./dist/", "./src/")
2237
+ .replace(/\.d\.ts$/, "")
2238
+ .replace(/\.js$/, "");
2239
+ const candidates = target.endsWith(".css")
2240
+ ? [sourceBase]
2241
+ : [`${sourceBase}.tsx`, `${sourceBase}.ts`, sourceBase];
2242
+
2243
+ for (const candidate of candidates) {
2244
+ if (fs.existsSync(path.resolve(packageDir, candidate))) return candidate;
2245
+ }
2246
+ return target;
2247
+ }
2248
+
2067
2249
  function aliasArrayFrom(alias: unknown): any[] {
2068
2250
  if (!alias) return [];
2069
2251
  if (Array.isArray(alias)) return alias;
@@ -2082,7 +2264,6 @@ const DEFAULT_VITE_WATCH_IGNORES = [
2082
2264
  "**/.generated/**",
2083
2265
  "**/.agents/**",
2084
2266
  "**/.claude/**",
2085
- "**/changelog/**",
2086
2267
  "**/data/**",
2087
2268
  "**/dist/**",
2088
2269
  "**/build/**",
@@ -2118,6 +2299,7 @@ function createAgentNativePlugins(
2118
2299
  // the server, so we can't blanket-stub it here).
2119
2300
  ssrStubPlugin(options.ssrStubs ?? []),
2120
2301
  ...userPlugins,
2302
+ appChangelogRawPlugin(),
2121
2303
  actionTypesPlugin(),
2122
2304
  agentsBundlePlugin(),
2123
2305
  autoReloadOnOptimizeDep(),
@@ -52,14 +52,14 @@ Use the available actions to pull data. Read the relevant `.agents/skills/<provi
52
52
 
53
53
  **Common data source combinations:**
54
54
 
55
- | Analysis type | Data sources |
56
- | ----------------------- | --------------------------------------------------------------- |
55
+ | Analysis type | Data sources |
56
+ | ----------------------- | ---------------------------------------------------------------- |
57
57
  | Deal/account deep dive | `account-deep-dive` bundle, then targeted HubSpot/Gong follow-up |
58
- | Sales pipeline analysis | HubSpot deals + Gong calls + Slack mentions |
59
- | Customer health check | HubSpot deals + Pylon support tickets + BigQuery usage events |
60
- | Content performance | BigQuery pageviews + GA4 + SEO keywords + HubSpot signups |
61
- | Engineering velocity | GitHub PRs + Jira tickets + BigQuery deploy events |
62
- | Churn investigation | Stripe billing + HubSpot deals + Pylon tickets + BigQuery usage |
58
+ | Sales pipeline analysis | HubSpot deals + Gong calls + Slack mentions |
59
+ | Customer health check | HubSpot deals + Pylon support tickets + BigQuery usage events |
60
+ | Content performance | BigQuery pageviews + GA4 + SEO keywords + HubSpot signups |
61
+ | Engineering velocity | GitHub PRs + Jira tickets + BigQuery deploy events |
62
+ | Churn investigation | Stripe billing + HubSpot deals + Pylon tickets + BigQuery usage |
63
63
 
64
64
  **Tips for data gathering:**
65
65
 
@@ -270,6 +270,7 @@ iteration independent.
270
270
 
271
271
  After completing a significant analysis, update `LEARNINGS.md` (via the
272
272
  `resources` tool) or `save-memory` with newly confirmed:
273
+
273
274
  - Metric definitions (how a metric is actually calculated in this dataset)
274
275
  - Provider gotchas discovered during the analysis
275
276
  - Schema discoveries (table names, column names, join patterns that worked)
@@ -52,13 +52,13 @@ window, then read them back selectively for synthesis.
52
52
 
53
53
  Inside `run-code`, use the workspace helper functions:
54
54
 
55
- | Helper | Use |
56
- |--------|-----|
57
- | `workspaceWrite(path, content, contentType?)` | Create or overwrite a file |
58
- | `workspaceAppend(path, content)` | Append text to a file |
59
- | `workspaceRead(path, opts?)` | Read content, with optional paging |
60
- | `workspaceReadMeta(path, opts?)` | Read content plus metadata/truncation info |
61
- | `workspaceList(prefix?)` | List files under a prefix |
55
+ | Helper | Use |
56
+ | --------------------------------------------- | ------------------------------------------ |
57
+ | `workspaceWrite(path, content, contentType?)` | Create or overwrite a file |
58
+ | `workspaceAppend(path, content)` | Append text to a file |
59
+ | `workspaceRead(path, opts?)` | Read content, with optional paging |
60
+ | `workspaceReadMeta(path, opts?)` | Read content plus metadata/truncation info |
61
+ | `workspaceList(prefix?)` | List files under a prefix |
62
62
 
63
63
  - `read` supports `{ offset, maxChars }` for paging large files.
64
64
  - `list` supports a prefix filter, e.g. `workspaceList("scratch/q2/")`.
@@ -78,7 +78,7 @@ For large fan-outs (account deep dives, Gong call reviews, deal cohorts):
78
78
  await workspaceWrite(
79
79
  "scratch/analysis/q2-churn/acme-corp.md",
80
80
  "## Acme Corp\n\n**ARR**: $120k\n**Risk signals**: ...",
81
- "text/markdown"
81
+ "text/markdown",
82
82
  );
83
83
  ```
84
84
  4. **Synthesize**: after all items are processed, list files and read each memo:
@@ -131,8 +131,11 @@ provider-api-request
131
131
  Returns: `{ savedToFile: true, savedTo, status, bytes, contentType, preview }`.
132
132
 
133
133
  Then use `run-code` to process the saved file:
134
+
134
135
  ```javascript
135
- const raw = await workspaceRead("scratch/analysis/provider-records-2026-q2.json");
136
+ const raw = await workspaceRead(
137
+ "scratch/analysis/provider-records-2026-q2.json",
138
+ );
136
139
  const records = JSON.parse(raw);
137
140
  // … aggregate, filter, join …
138
141
  ```
@@ -157,6 +160,7 @@ provider-api-request
157
160
  ```
158
161
 
159
162
  Common cursor paths:
163
+
160
164
  - HubSpot: `paging.next.after` / `after`
161
165
  - Gong: `records.cursor` / `cursor`
162
166
  - Pylon: `nextCursor` / `cursor`
@@ -183,7 +187,7 @@ for (const deal of deals) {
183
187
  await workspaceWrite(
184
188
  "scratch/analysis/deals-by-stage.json",
185
189
  JSON.stringify(byStage, null, 2),
186
- "application/json"
190
+ "application/json",
187
191
  );
188
192
  console.log(JSON.stringify(byStage, null, 2));
189
193
  ```
@@ -13,7 +13,7 @@ description: >-
13
13
  **`bigquery` is available directly in the agent's tool list as a native callable tool.**
14
14
 
15
15
  - If you see `bigquery` in your available tools — **call it directly with your SQL**. Do not use HTTP workarounds, web-request hacks, or scripts as a substitute.
16
- - The `server/lib/bigquery.ts` description below is the *underlying implementation*. It does **not** mean BigQuery is only accessible via terminal commands or scripts.
16
+ - The `server/lib/bigquery.ts` description below is the _underlying implementation_. It does **not** mean BigQuery is only accessible via terminal commands or scripts.
17
17
  - **When uncertain if the tool works, call it — don't reason your way to "it won't work".** Empirically test by calling the tool.
18
18
 
19
19
  ## Data-Dictionary-First Discipline
@@ -71,12 +71,12 @@ answers the question.
71
71
 
72
72
  ## Actions
73
73
 
74
- | Action | Use |
75
- | --- | --- |
76
- | `data-source-status --key bigquery` | Check whether BigQuery credentials and project are configured. |
77
- | `list-data-dictionary --search <topic>` | Find canonical metric/table definitions before SQL. |
78
- | `search-bigquery-schema` | List datasets, list tables in a dataset, or describe table columns. |
79
- | `bigquery --sql "<sql>"` | Run a real warehouse query after table/column names are known. |
74
+ | Action | Use |
75
+ | --------------------------------------- | ------------------------------------------------------------------- |
76
+ | `data-source-status --key bigquery` | Check whether BigQuery credentials and project are configured. |
77
+ | `list-data-dictionary --search <topic>` | Find canonical metric/table definitions before SQL. |
78
+ | `search-bigquery-schema` | List datasets, list tables in a dataset, or describe table columns. |
79
+ | `bigquery --sql "<sql>"` | Run a real warehouse query after table/column names are known. |
80
80
 
81
81
  For direct Amplitude/PostHog/Mixpanel product-event data (outside the warehouse
82
82
  copy), there is no first-class action — call `provider-api-catalog` /
@@ -122,15 +122,15 @@ prefer saving a reviewed dictionary update once the meaning is clear.
122
122
 
123
123
  ## Column Name Differences (Common Bug Sources)
124
124
 
125
- | Spec Column | Actual Column | Table |
126
- |---|---|---|
125
+ | Spec Column | Actual Column | Table |
126
+ | --------------------- | -------------------------- | --------------- |
127
127
  | `first_pageview_date` | `created_date` (TIMESTAMP) | first_pageviews |
128
- | `channel` (pageviews) | `first_touch_channel` | all_pageviews |
129
- | `referrer` | `c_referrer` | all_pageviews |
130
- | `referrer_channel` | `session_channel` | all_pageviews |
131
- | `user_create_date` | `user_create_d` | product_signups |
132
- | `deal_stage` | `stage_name` | dim_deals |
133
- | `deal_amount` | `amount` | dim_deals |
128
+ | `channel` (pageviews) | `first_touch_channel` | all_pageviews |
129
+ | `referrer` | `c_referrer` | all_pageviews |
130
+ | `referrer_channel` | `session_channel` | all_pageviews |
131
+ | `user_create_date` | `user_create_d` | product_signups |
132
+ | `deal_stage` | `stage_name` | dim_deals |
133
+ | `deal_amount` | `amount` | dim_deals |
134
134
 
135
135
  Always verify with `search-bigquery-schema` before writing SQL against an unfamiliar table.
136
136
 
@@ -151,6 +151,7 @@ Example provenance footer:
151
151
 
152
152
  ```markdown
153
153
  ## Methodology
154
+
154
155
  - Identities: HubSpot contacts (joined to BigQuery on contact_id + lowercased email)
155
156
  - Usage: BigQuery `analytics.events`, 2026-04-01 .. 2026-05-01 UTC
156
157
  - Support: Pylon tickets, same window
@@ -237,8 +237,24 @@ type DashboardPatch = {
237
237
  type PanelPatch = {
238
238
  title?: string;
239
239
  sql?: string;
240
- source?: "bigquery" | "ga4" | "amplitude" | "first-party" | "demo" | "prometheus";
241
- chartType?: "line" | "area" | "bar" | "metric" | "table" | "pie" | "section" | "heatmap" | "callout" | "extension";
240
+ source?:
241
+ | "bigquery"
242
+ | "ga4"
243
+ | "amplitude"
244
+ | "first-party"
245
+ | "demo"
246
+ | "prometheus";
247
+ chartType?:
248
+ | "line"
249
+ | "area"
250
+ | "bar"
251
+ | "metric"
252
+ | "table"
253
+ | "pie"
254
+ | "section"
255
+ | "heatmap"
256
+ | "callout"
257
+ | "extension";
242
258
  width?: number;
243
259
  columns?: number;
244
260
  tab?: string;
@@ -302,27 +318,27 @@ Examples:
302
318
  dashboard.panels(["dau-over-time", "wau-over-time"]).moveToTop();
303
319
  dashboard.panel("top-referrers").setTitle("Top Referrers by Domain");
304
320
  dashboard.panel("retention").set({
305
- "width": 2,
306
- "config": { "description": "Updated definition." }
321
+ width: 2,
322
+ config: { description: "Updated definition." },
307
323
  });
308
- dashboard.panelsMatching({ "source": "first-party" }).setWidth(2);
309
- dashboard.panelsMatching({ "titleIncludes": "Revenue" }).setConfigPath(
310
- "yAxis.format",
311
- "currency"
312
- );
313
- dashboard.panelsMatching({ "titleIncludes": "Signed-In" }).moveToTop();
314
- dashboard.section("retention-activity-section").append([
315
- "repeat-users",
316
- "retention-over-time"
317
- ]);
318
- dashboard.insertPanel({
319
- "id": "new-kpi",
320
- "title": "New KPI",
321
- "source": "first-party",
322
- "chartType": "metric",
323
- "width": 1,
324
- "sql": "SELECT COUNT(*) AS value FROM analytics_events"
325
- }).atTop();
324
+ dashboard.panelsMatching({ source: "first-party" }).setWidth(2);
325
+ dashboard
326
+ .panelsMatching({ titleIncludes: "Revenue" })
327
+ .setConfigPath("yAxis.format", "currency");
328
+ dashboard.panelsMatching({ titleIncludes: "Signed-In" }).moveToTop();
329
+ dashboard
330
+ .section("retention-activity-section")
331
+ .append(["repeat-users", "retention-over-time"]);
332
+ dashboard
333
+ .insertPanel({
334
+ id: "new-kpi",
335
+ title: "New KPI",
336
+ source: "first-party",
337
+ chartType: "metric",
338
+ width: 1,
339
+ sql: "SELECT COUNT(*) AS value FROM analytics_events",
340
+ })
341
+ .atTop();
326
342
  ```
327
343
 
328
344
  Native tool call: