@agent-native/core 0.90.11 → 0.91.1

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 (322) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +34 -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/design-connect.ts +53 -9
  10. package/corpus/core/src/cli/workspace-dev.ts +25 -5
  11. package/corpus/core/src/client/AgentPanel.tsx +79 -14
  12. package/corpus/core/src/client/AssistantChat.tsx +359 -425
  13. package/corpus/core/src/client/analytics-session.ts +70 -0
  14. package/corpus/core/src/client/analytics.ts +175 -49
  15. package/corpus/core/src/client/chat/message-components.tsx +22 -2
  16. package/corpus/core/src/client/components/ui/message-scroller.tsx +131 -0
  17. package/corpus/core/src/client/conversation/AgentConversation.tsx +63 -41
  18. package/corpus/core/src/client/error-capture.ts +616 -0
  19. package/corpus/core/src/client/index.ts +12 -0
  20. package/corpus/core/src/client/session-replay.ts +57 -7
  21. package/corpus/core/src/client/settings/SettingsPanel.tsx +123 -1
  22. package/corpus/core/src/client/settings/SettingsTabsPage.tsx +292 -45
  23. package/corpus/core/src/client/settings/index.ts +1 -0
  24. package/corpus/core/src/client/sharing/ShareButton.tsx +14 -11
  25. package/corpus/core/src/client/sharing/ShareDialog.tsx +13 -10
  26. package/corpus/core/src/mcp/builtin-tools.ts +29 -2
  27. package/corpus/core/src/server/agent-chat-plugin.ts +174 -79
  28. package/corpus/core/src/server/onboarding-html.ts +28 -16
  29. package/corpus/core/src/sharing/actions/list-resource-shares.ts +45 -1
  30. package/corpus/core/src/sharing/actions/share-resource.ts +9 -0
  31. package/corpus/core/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
  32. package/corpus/core/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
  33. package/corpus/core/src/vite/client.ts +217 -35
  34. package/corpus/templates/analytics/.agents/skills/adhoc-analysis/SKILL.md +8 -7
  35. package/corpus/templates/analytics/.agents/skills/analysis-workspace/SKILL.md +14 -10
  36. package/corpus/templates/analytics/.agents/skills/bigquery/SKILL.md +15 -15
  37. package/corpus/templates/analytics/.agents/skills/cross-source-analysis/SKILL.md +1 -0
  38. package/corpus/templates/analytics/.agents/skills/dashboard-management/SKILL.md +38 -22
  39. package/corpus/templates/analytics/.agents/skills/data-programs/SKILL.md +114 -61
  40. package/corpus/templates/analytics/.agents/skills/data-querying/SKILL.md +1 -0
  41. package/corpus/templates/analytics/.agents/skills/gong/SKILL.md +7 -7
  42. package/corpus/templates/analytics/.agents/skills/hubspot/SKILL.md +1 -0
  43. package/corpus/templates/analytics/.agents/skills/prometheus/SKILL.md +1 -1
  44. package/corpus/templates/analytics/.builder/skills/bigquery/SKILL.md +17 -17
  45. package/corpus/templates/analytics/.builder/skills/gcloud/SKILL.md +5 -5
  46. package/corpus/templates/analytics/.builder/skills/github/SKILL.md +7 -7
  47. package/corpus/templates/analytics/.builder/skills/gong/SKILL.md +12 -12
  48. package/corpus/templates/analytics/.builder/skills/grafana/SKILL.md +7 -7
  49. package/corpus/templates/analytics/.builder/skills/sentry/SKILL.md +7 -7
  50. package/corpus/templates/analytics/.builder/skills/slack/SKILL.md +6 -6
  51. package/corpus/templates/analytics/.builder/skills/stripe/SKILL.md +7 -7
  52. package/corpus/templates/analytics/AGENTS.md +47 -2
  53. package/corpus/templates/analytics/actions/add-status-page-monitor.ts +36 -0
  54. package/corpus/templates/analytics/actions/capture-test-error.ts +33 -0
  55. package/corpus/templates/analytics/actions/delete-monitor.ts +24 -0
  56. package/corpus/templates/analytics/actions/delete-status-page.ts +23 -0
  57. package/corpus/templates/analytics/actions/get-error-issue.ts +36 -0
  58. package/corpus/templates/analytics/actions/get-monitor-stats.ts +55 -0
  59. package/corpus/templates/analytics/actions/get-monitor.ts +27 -0
  60. package/corpus/templates/analytics/actions/get-public-status-page.ts +41 -0
  61. package/corpus/templates/analytics/actions/get-status-page.ts +29 -0
  62. package/corpus/templates/analytics/actions/list-error-issues.ts +40 -0
  63. package/corpus/templates/analytics/actions/list-monitors.ts +21 -0
  64. package/corpus/templates/analytics/actions/list-status-pages.ts +21 -0
  65. package/corpus/templates/analytics/actions/match-error-issues.ts +51 -0
  66. package/corpus/templates/analytics/actions/navigate.ts +58 -4
  67. package/corpus/templates/analytics/actions/remove-status-page-monitor.ts +22 -0
  68. package/corpus/templates/analytics/actions/reorder-status-page-monitors.ts +25 -0
  69. package/corpus/templates/analytics/actions/resolve-error-issue.ts +38 -0
  70. package/corpus/templates/analytics/actions/run-monitor-check.ts +23 -0
  71. package/corpus/templates/analytics/actions/save-analysis.ts +1 -0
  72. package/corpus/templates/analytics/actions/save-monitor.ts +145 -0
  73. package/corpus/templates/analytics/actions/save-status-page.ts +47 -0
  74. package/corpus/templates/analytics/actions/view-screen.ts +212 -0
  75. package/corpus/templates/analytics/app/components/layout/Header.tsx +1 -0
  76. package/corpus/templates/analytics/app/components/layout/Layout.tsx +10 -1
  77. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +134 -39
  78. package/corpus/templates/analytics/app/components/monitoring/PublicStatusView.tsx +351 -0
  79. package/corpus/templates/analytics/app/components/monitoring/ResponseTimeChart.tsx +174 -0
  80. package/corpus/templates/analytics/app/components/monitoring/UptimeStatCards.tsx +85 -0
  81. package/corpus/templates/analytics/app/components/monitoring/UptimeTimelineBars.tsx +106 -0
  82. package/corpus/templates/analytics/app/components/monitoring/chart-utils.ts +101 -0
  83. package/corpus/templates/analytics/app/components/monitoring/index.ts +28 -0
  84. package/corpus/templates/analytics/app/components/monitoring/types.ts +42 -0
  85. package/corpus/templates/analytics/app/hooks/use-navigation-state.ts +34 -0
  86. package/corpus/templates/analytics/app/i18n/zh-TW.ts +6 -0
  87. package/corpus/templates/analytics/app/i18n-data.ts +33 -0
  88. package/corpus/templates/analytics/app/pages/DataSources.tsx +28 -0
  89. package/corpus/templates/analytics/app/pages/Settings.tsx +77 -9
  90. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +3 -3
  91. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/dashboard-layout.ts +7 -0
  92. package/corpus/templates/analytics/app/pages/monitoring/ErrorsPanel.tsx +205 -0
  93. package/corpus/templates/analytics/app/pages/monitoring/MonitoringPage.tsx +100 -0
  94. package/corpus/templates/analytics/app/pages/monitoring/UptimePanel.tsx +475 -0
  95. package/corpus/templates/analytics/app/pages/monitoring/errors/IssueDetail.tsx +372 -0
  96. package/corpus/templates/analytics/app/pages/monitoring/errors/IssueList.tsx +360 -0
  97. package/corpus/templates/analytics/app/pages/monitoring/errors/Sparkline.tsx +55 -0
  98. package/corpus/templates/analytics/app/pages/monitoring/errors/i18n.ts +106 -0
  99. package/corpus/templates/analytics/app/pages/monitoring/errors/types.ts +75 -0
  100. package/corpus/templates/analytics/app/pages/monitoring/errors/utils.ts +132 -0
  101. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorDetail.tsx +535 -0
  102. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorFormPage.tsx +1026 -0
  103. package/corpus/templates/analytics/app/pages/monitoring/uptime/MonitorList.tsx +311 -0
  104. package/corpus/templates/analytics/app/pages/monitoring/uptime/i18n.ts +235 -0
  105. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPageEditor.tsx +661 -0
  106. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/StatusPagesView.tsx +355 -0
  107. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/i18n.ts +106 -0
  108. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/slug.ts +24 -0
  109. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-pages/types.ts +20 -0
  110. package/corpus/templates/analytics/app/pages/monitoring/uptime/status-summary.ts +87 -0
  111. package/corpus/templates/analytics/app/pages/monitoring/uptime/types.ts +161 -0
  112. package/corpus/templates/analytics/app/pages/monitoring/uptime/utils.ts +210 -0
  113. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +76 -1
  114. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +74 -9
  115. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +197 -20
  116. package/corpus/templates/analytics/app/root.tsx +33 -1
  117. package/corpus/templates/analytics/app/routes/monitoring._index.tsx +10 -0
  118. package/corpus/templates/analytics/app/routes/status.$slug.tsx +118 -0
  119. package/corpus/templates/analytics/changelog/2026-07-08-add-uptime-monitors-that-ping-your-urls-and-alert-you-when-t.md +6 -0
  120. package/corpus/templates/analytics/changelog/2026-07-08-analytics-chats-keep-large-data-dictionaries-compact-so-prov.md +6 -0
  121. package/corpus/templates/analytics/changelog/2026-07-08-create-public-status-pages-that-share-the-live-health-of-cho.md +6 -0
  122. package/corpus/templates/analytics/changelog/2026-07-08-dashboard-extension-panels-use-clearer-open-copy.md +6 -0
  123. package/corpus/templates/analytics/changelog/2026-07-08-error-capture.md +6 -0
  124. package/corpus/templates/analytics/changelog/2026-07-08-fixed-single-panel-dashboard-drags-so-they-no-longer-rewrite.md +6 -0
  125. package/corpus/templates/analytics/changelog/2026-07-08-jump-straight-from-an-error-in-a-session-recording-to-its-fu.md +6 -0
  126. package/corpus/templates/analytics/changelog/2026-07-08-monitor-detail-and-list-now-show-colorful-uptime-timelines-r.md +6 -0
  127. package/corpus/templates/analytics/changelog/2026-07-08-pinned-ask-chats-now-show-a-pin-icon-in-the-sidebar.md +6 -0
  128. package/corpus/templates/analytics/changelog/2026-07-08-publish-a-public-uptime-status-page-with-colorful-uptime-tim.md +6 -0
  129. package/corpus/templates/analytics/changelog/2026-07-08-sessions-now-hide-visitor-emails-in-demo-mode-and-show-clean.md +6 -0
  130. package/corpus/templates/analytics/changelog/2026-07-08-settings-are-cleaner-searchable-and-alerts-have-their-own-tab.md +5 -0
  131. package/corpus/templates/analytics/changelog/2026-07-08-sidebar-sections-stay-collapsed-until-opened.md +5 -0
  132. package/corpus/templates/analytics/changelog/2026-07-08-the-uptime-monitor-list-now-has-a-current-status-overview-wi.md +6 -0
  133. package/corpus/templates/analytics/docs/error-capture.md +172 -0
  134. package/corpus/templates/analytics/docs/uptime-monitoring.md +150 -0
  135. package/corpus/templates/analytics/server/db/schema-errors.ts +150 -0
  136. package/corpus/templates/analytics/server/db/schema-monitoring.ts +177 -0
  137. package/corpus/templates/analytics/server/db/schema.ts +6 -0
  138. package/corpus/templates/analytics/server/jobs/uptime-monitors.ts +123 -0
  139. package/corpus/templates/analytics/server/lib/agent-chat-plan-mode.ts +41 -0
  140. package/corpus/templates/analytics/server/lib/data-dictionary-context.ts +55 -12
  141. package/corpus/templates/analytics/server/lib/error-capture.ts +1331 -0
  142. package/corpus/templates/analytics/server/lib/first-party-analytics.ts +47 -1
  143. package/corpus/templates/analytics/server/lib/monitor-stats.ts +494 -0
  144. package/corpus/templates/analytics/server/lib/status-pages.ts +798 -0
  145. package/corpus/templates/analytics/server/lib/uptime-monitors.ts +1665 -0
  146. package/corpus/templates/analytics/server/plugins/agent-chat.ts +7 -37
  147. package/corpus/templates/analytics/server/plugins/auth.ts +11 -1
  148. package/corpus/templates/analytics/server/plugins/db.ts +408 -0
  149. package/corpus/templates/analytics/server/plugins/uptime-monitor-jobs.ts +63 -0
  150. package/corpus/templates/assets/app/routes/_index.tsx +1 -1
  151. package/corpus/templates/assets/app/routes/settings.tsx +22 -1
  152. package/corpus/templates/assets/changelog/2026-07-08-recent-drafts-keep-comfortable-side-padding.md +6 -0
  153. package/corpus/templates/assets/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  154. package/corpus/templates/brain/app/routes/settings.tsx +43 -5
  155. package/corpus/templates/brain/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  156. package/corpus/templates/calendar/app/pages/Settings.tsx +44 -6
  157. package/corpus/templates/calendar/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  158. package/corpus/templates/chat/app/routes/settings.tsx +16 -1
  159. package/corpus/templates/chat/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  160. package/corpus/templates/clips/actions/lib/audio-only-transcription.ts +79 -37
  161. package/corpus/templates/clips/app/components/player/player-controls.tsx +35 -0
  162. package/corpus/templates/clips/app/components/player/video-player.tsx +162 -18
  163. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +63 -6
  164. package/corpus/templates/clips/app/routes/record.tsx +18 -1
  165. package/corpus/templates/clips/changelog/2026-07-07-shared-clips-start-playback-reliably-from-the-first-play-click.md +6 -0
  166. package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-camera-and-microphone-menus-now-show-which-.md +6 -0
  167. package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-copies-new-clip-links-after-saving.md +6 -0
  168. package/corpus/templates/clips/changelog/2026-07-08-chrome-extension-recordings-now-continue-after-granting-came.md +6 -0
  169. package/corpus/templates/clips/changelog/2026-07-08-mobile-shared-clips-now-have-loom-style-tap-and-skip-controls.md +6 -0
  170. package/corpus/templates/clips/changelog/2026-07-08-recordings-and-uploads-copy-links-after-saving.md +6 -0
  171. package/corpus/templates/clips/changelog/2026-07-08-settings-are-cleaner-searchable-and-collapse-s3-with-builder.md +5 -0
  172. package/corpus/templates/clips/changelog/2026-07-08-transcripts-are-more-reliable-for-longer-desktop-recordings-.md +6 -0
  173. package/corpus/templates/clips/chrome-extension/public/manifest.json +1 -0
  174. package/corpus/templates/clips/chrome-extension/src/background.ts +162 -13
  175. package/corpus/templates/clips/chrome-extension/src/content-script.ts +14 -0
  176. package/corpus/templates/clips/chrome-extension/src/offscreen.ts +36 -0
  177. package/corpus/templates/clips/chrome-extension/src/overlay.ts +99 -25
  178. package/corpus/templates/clips/chrome-extension/src/permission.ts +63 -14
  179. package/corpus/templates/clips/chrome-extension/src/popup.ts +123 -23
  180. package/corpus/templates/content/actions/_builder-cms-read-client.ts +47 -0
  181. package/corpus/templates/content/actions/_database-source-utils.ts +33 -4
  182. package/corpus/templates/content/actions/add-content-database-source-field-property.ts +214 -29
  183. package/corpus/templates/content/actions/attach-content-database-source.ts +3 -0
  184. package/corpus/templates/content/actions/change-content-database-source-role.ts +1 -0
  185. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +42 -32
  186. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +352 -81
  187. package/corpus/templates/content/app/components/editor/database/settings.tsx +49 -24
  188. package/corpus/templates/content/app/routes/_app.settings.tsx +19 -1
  189. package/corpus/templates/content/changelog/2026-07-07-builder-source-tag-fields-now-import-as-multi-select.md +6 -0
  190. package/corpus/templates/content/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  191. package/corpus/templates/content/shared/api.ts +3 -0
  192. package/corpus/templates/content/shared/properties.ts +42 -0
  193. package/corpus/templates/design/AGENTS.md +9 -0
  194. package/corpus/templates/design/actions/generate-design.ts +3 -0
  195. package/corpus/templates/design/actions/get-design-system.ts +147 -1
  196. package/corpus/templates/design/actions/request-localhost-write-consent.ts +141 -0
  197. package/corpus/templates/design/app/components/design/DesignCanvas.tsx +13 -19
  198. package/corpus/templates/design/app/routes/settings.tsx +16 -1
  199. package/corpus/templates/design/changelog/2026-07-08-design-generation-now-follows-hydrated-builder-design-system.md +6 -0
  200. package/corpus/templates/design/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  201. package/corpus/templates/design/server/lib/verify-write-grant.ts +4 -2
  202. package/corpus/templates/dispatch/app/routes/settings.tsx +23 -2
  203. package/corpus/templates/dispatch/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  204. package/corpus/templates/forms/app/routes/_app.settings.tsx +16 -1
  205. package/corpus/templates/forms/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  206. package/corpus/templates/macros/app/routes/settings.tsx +16 -1
  207. package/corpus/templates/macros/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  208. package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +1 -1
  209. package/corpus/templates/mail/app/components/settings/SnippetsSection.tsx +1 -1
  210. package/corpus/templates/mail/app/pages/SettingsPage.tsx +123 -105
  211. package/corpus/templates/mail/changelog/2026-07-08-settings-redesigned-with-a-consistent-searchable-layout.md +5 -0
  212. package/corpus/templates/plan/app/routes/settings.tsx +23 -2
  213. package/corpus/templates/plan/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  214. package/corpus/templates/slides/actions/add-slide.ts +1 -0
  215. package/corpus/templates/slides/actions/get-design-system.ts +147 -1
  216. package/corpus/templates/slides/app/pages/Index.tsx +46 -1
  217. package/corpus/templates/slides/app/routes/settings.tsx +16 -1
  218. package/corpus/templates/slides/changelog/2026-07-08-deck-generation-now-follows-hydrated-builder-design-system-g.md +6 -0
  219. package/corpus/templates/slides/changelog/2026-07-08-settings-are-cleaner-and-searchable.md +5 -0
  220. package/dist/agent/run-ownership.d.ts +6 -0
  221. package/dist/agent/run-ownership.d.ts.map +1 -1
  222. package/dist/agent/run-ownership.js +11 -1
  223. package/dist/agent/run-ownership.js.map +1 -1
  224. package/dist/changelog/parse.d.ts +7 -0
  225. package/dist/changelog/parse.d.ts.map +1 -1
  226. package/dist/changelog/parse.js +64 -0
  227. package/dist/changelog/parse.js.map +1 -1
  228. package/dist/chat-threads/schema.d.ts +445 -0
  229. package/dist/chat-threads/schema.d.ts.map +1 -0
  230. package/dist/chat-threads/schema.js +39 -0
  231. package/dist/chat-threads/schema.js.map +1 -0
  232. package/dist/chat-threads/store.d.ts +12 -0
  233. package/dist/chat-threads/store.d.ts.map +1 -1
  234. package/dist/chat-threads/store.js +99 -10
  235. package/dist/chat-threads/store.js.map +1 -1
  236. package/dist/cli/design-connect.d.ts.map +1 -1
  237. package/dist/cli/design-connect.js +40 -10
  238. package/dist/cli/design-connect.js.map +1 -1
  239. package/dist/cli/workspace-dev.d.ts.map +1 -1
  240. package/dist/cli/workspace-dev.js +20 -5
  241. package/dist/cli/workspace-dev.js.map +1 -1
  242. package/dist/client/AgentPanel.d.ts.map +1 -1
  243. package/dist/client/AgentPanel.js +35 -7
  244. package/dist/client/AgentPanel.js.map +1 -1
  245. package/dist/client/AssistantChat.d.ts.map +1 -1
  246. package/dist/client/AssistantChat.js +105 -183
  247. package/dist/client/AssistantChat.js.map +1 -1
  248. package/dist/client/analytics-session.d.ts +3 -0
  249. package/dist/client/analytics-session.d.ts.map +1 -0
  250. package/dist/client/analytics-session.js +66 -0
  251. package/dist/client/analytics-session.js.map +1 -0
  252. package/dist/client/analytics.d.ts +32 -0
  253. package/dist/client/analytics.d.ts.map +1 -1
  254. package/dist/client/analytics.js +116 -46
  255. package/dist/client/analytics.js.map +1 -1
  256. package/dist/client/chat/message-components.d.ts +2 -1
  257. package/dist/client/chat/message-components.d.ts.map +1 -1
  258. package/dist/client/chat/message-components.js +16 -6
  259. package/dist/client/chat/message-components.js.map +1 -1
  260. package/dist/client/components/ui/message-scroller.d.ts +16 -0
  261. package/dist/client/components/ui/message-scroller.d.ts.map +1 -0
  262. package/dist/client/components/ui/message-scroller.js +25 -0
  263. package/dist/client/components/ui/message-scroller.js.map +1 -0
  264. package/dist/client/conversation/AgentConversation.d.ts +1 -1
  265. package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
  266. package/dist/client/conversation/AgentConversation.js +3 -8
  267. package/dist/client/conversation/AgentConversation.js.map +1 -1
  268. package/dist/client/error-capture.d.ts +99 -0
  269. package/dist/client/error-capture.d.ts.map +1 -0
  270. package/dist/client/error-capture.js +437 -0
  271. package/dist/client/error-capture.js.map +1 -0
  272. package/dist/client/index.d.ts +2 -2
  273. package/dist/client/index.d.ts.map +1 -1
  274. package/dist/client/index.js +3 -1
  275. package/dist/client/index.js.map +1 -1
  276. package/dist/client/session-replay.d.ts +22 -0
  277. package/dist/client/session-replay.d.ts.map +1 -1
  278. package/dist/client/session-replay.js +45 -4
  279. package/dist/client/session-replay.js.map +1 -1
  280. package/dist/client/settings/SettingsPanel.d.ts.map +1 -1
  281. package/dist/client/settings/SettingsPanel.js +100 -5
  282. package/dist/client/settings/SettingsPanel.js.map +1 -1
  283. package/dist/client/settings/SettingsTabsPage.d.ts +49 -1
  284. package/dist/client/settings/SettingsTabsPage.d.ts.map +1 -1
  285. package/dist/client/settings/SettingsTabsPage.js +131 -19
  286. package/dist/client/settings/SettingsTabsPage.js.map +1 -1
  287. package/dist/client/settings/index.d.ts +1 -1
  288. package/dist/client/settings/index.d.ts.map +1 -1
  289. package/dist/client/settings/index.js.map +1 -1
  290. package/dist/client/sharing/ShareButton.d.ts.map +1 -1
  291. package/dist/client/sharing/ShareButton.js +13 -8
  292. package/dist/client/sharing/ShareButton.js.map +1 -1
  293. package/dist/client/sharing/ShareDialog.d.ts.map +1 -1
  294. package/dist/client/sharing/ShareDialog.js +12 -7
  295. package/dist/client/sharing/ShareDialog.js.map +1 -1
  296. package/dist/collab/routes.d.ts +1 -1
  297. package/dist/file-upload/actions/upload-image.d.ts +1 -1
  298. package/dist/mcp/builtin-tools.d.ts.map +1 -1
  299. package/dist/mcp/builtin-tools.js +21 -2
  300. package/dist/mcp/builtin-tools.js.map +1 -1
  301. package/dist/observability/routes.d.ts +1 -1
  302. package/dist/org/schema.d.ts +15 -15
  303. package/dist/provider-api/corpus-jobs.d.ts +2 -2
  304. package/dist/server/agent-chat-plugin.d.ts.map +1 -1
  305. package/dist/server/agent-chat-plugin.js +109 -73
  306. package/dist/server/agent-chat-plugin.js.map +1 -1
  307. package/dist/server/onboarding-html.d.ts.map +1 -1
  308. package/dist/server/onboarding-html.js +28 -16
  309. package/dist/server/onboarding-html.js.map +1 -1
  310. package/dist/sharing/actions/list-resource-shares.js +30 -1
  311. package/dist/sharing/actions/list-resource-shares.js.map +1 -1
  312. package/dist/sharing/actions/share-resource.js +6 -0
  313. package/dist/sharing/actions/share-resource.js.map +1 -1
  314. package/dist/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
  315. package/dist/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
  316. package/dist/vite/client.d.ts.map +1 -1
  317. package/dist/vite/client.js +192 -30
  318. package/dist/vite/client.js.map +1 -1
  319. package/docs/content/toolkit-settings.mdx +56 -3
  320. package/package.json +2 -1
  321. package/src/templates/workspace-core/.agents/skills/agent-native-toolkit/SKILL.md +4 -2
  322. package/src/templates/workspace-core/.agents/skills/changelog/SKILL.md +9 -6
@@ -0,0 +1,36 @@
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 { addStatusPageMonitor } from "../server/lib/status-pages";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "Add a monitor to a status page (appended to the end, deduplicated). The monitor must be owned by the current user.",
13
+ schema: z.object({
14
+ id: z.string().describe("Status page id."),
15
+ monitorId: z.string().describe("Monitor id to add."),
16
+ displayName: z
17
+ .string()
18
+ .nullable()
19
+ .optional()
20
+ .describe("Optional public display-name override."),
21
+ showUrl: z
22
+ .boolean()
23
+ .optional()
24
+ .describe("Opt in to publicly showing this monitor's URL/host."),
25
+ }),
26
+ run: async ({ id, monitorId, displayName, showUrl }) => {
27
+ const email = getRequestUserEmail();
28
+ if (!email) throw new Error("no authenticated user");
29
+ const orgId = getRequestOrgId() || null;
30
+ return addStatusPageMonitor(
31
+ id,
32
+ { monitorId, displayName, showUrl },
33
+ { email, orgId },
34
+ );
35
+ },
36
+ });
@@ -0,0 +1,33 @@
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 { captureTestError } from "../server/lib/error-capture.js";
9
+
10
+ function resolveScope() {
11
+ const userEmail = getRequestUserEmail();
12
+ if (!userEmail) throw new Error("no authenticated user");
13
+ return { userEmail, orgId: getRequestOrgId() || null };
14
+ }
15
+
16
+ export default defineAction({
17
+ description:
18
+ "Generate a sample captured error to verify the Error capture pipeline end-to-end. Creates or reopens an error issue owned by the current user/org so it shows up in the Monitoring → Errors view.",
19
+ schema: z.object({
20
+ message: z
21
+ .string()
22
+ .optional()
23
+ .describe("Optional custom error message for the sample error."),
24
+ type: z
25
+ .string()
26
+ .optional()
27
+ .describe("Optional error type/name, e.g. TypeError. Defaults to Error."),
28
+ }),
29
+ http: { method: "POST" },
30
+ run: async (args) => {
31
+ return captureTestError(resolveScope(), args);
32
+ },
33
+ });
@@ -0,0 +1,24 @@
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 { deleteMonitor } from "../server/lib/uptime-monitors";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "Delete an uptime monitor and its check history and incident records.",
13
+ schema: z.object({
14
+ id: z.string().describe("Monitor id to delete."),
15
+ }),
16
+ http: { method: "POST" },
17
+ run: async ({ id }) => {
18
+ const email = getRequestUserEmail();
19
+ if (!email) throw new Error("no authenticated user");
20
+ const orgId = getRequestOrgId() || null;
21
+ await deleteMonitor(id, { email, orgId });
22
+ return { ok: true, id };
23
+ },
24
+ });
@@ -0,0 +1,23 @@
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 { deleteStatusPage } from "../server/lib/status-pages";
9
+
10
+ export default defineAction({
11
+ description: "Delete one of the current user's public status pages by id.",
12
+ schema: z.object({
13
+ id: z.string().describe("Status page id."),
14
+ }),
15
+ http: { method: "DELETE" },
16
+ run: async ({ id }) => {
17
+ const email = getRequestUserEmail();
18
+ if (!email) throw new Error("no authenticated user");
19
+ const orgId = getRequestOrgId() || null;
20
+ await deleteStatusPage(id, { email, orgId });
21
+ return { id, deleted: true };
22
+ },
23
+ });
@@ -0,0 +1,36 @@
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 { getErrorIssue } from "../server/lib/error-capture.js";
9
+
10
+ function resolveScope() {
11
+ const userEmail = getRequestUserEmail();
12
+ if (!userEmail) throw new Error("no authenticated user");
13
+ return { userEmail, orgId: getRequestOrgId() || null };
14
+ }
15
+
16
+ export default defineAction({
17
+ description:
18
+ "Get one captured error issue with its recent occurrences (parsed stack frames, breadcrumbs, tags/extra) and links to the session replays where the error happened. Use this to triage a specific issue and jump to the replay.",
19
+ schema: z.object({
20
+ id: z.string().describe("Error issue id (erriss_...)."),
21
+ eventsLimit: z.coerce
22
+ .number()
23
+ .int()
24
+ .min(1)
25
+ .max(200)
26
+ .optional()
27
+ .describe("Max recent occurrences to return. Defaults to 50."),
28
+ }),
29
+ http: { method: "GET" },
30
+ readOnly: true,
31
+ run: async (args) => {
32
+ return getErrorIssue(resolveScope(), args.id, {
33
+ eventsLimit: args.eventsLimit,
34
+ });
35
+ },
36
+ });
@@ -0,0 +1,55 @@
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 {
9
+ getMonitorStats,
10
+ listOwnedMonitorIds,
11
+ type MonitorStats,
12
+ } from "../server/lib/monitor-stats";
13
+
14
+ export default defineAction({
15
+ description:
16
+ "Get aggregated uptime stats for the current user's monitors: current status, uptime % over 24h/7d/30d/90d, a bucketed uptime timeline, a recent response-time series, incident count, and MTBF. Pass monitorIds to scope to specific monitors, or omit to include all.",
17
+ schema: z.object({
18
+ monitorIds: z
19
+ .array(z.string())
20
+ .optional()
21
+ .describe("Monitor ids to include. Omit for all of the user's monitors."),
22
+ timelineDays: z.coerce
23
+ .number()
24
+ .int()
25
+ .min(1)
26
+ .max(365)
27
+ .optional()
28
+ .describe("Trailing daily buckets for the uptime timeline (default 90)."),
29
+ responseWindowHours: z.coerce
30
+ .number()
31
+ .int()
32
+ .min(1)
33
+ .max(24 * 90)
34
+ .optional()
35
+ .describe(
36
+ "Trailing hours for the hourly response-time series (default 24).",
37
+ ),
38
+ }),
39
+ http: { method: "GET" },
40
+ run: async ({ monitorIds, timelineDays, responseWindowHours }) => {
41
+ const email = getRequestUserEmail();
42
+ if (!email) throw new Error("no authenticated user");
43
+ const orgId = getRequestOrgId() || null;
44
+ const ctx = { email, orgId };
45
+ const ids =
46
+ monitorIds && monitorIds.length > 0
47
+ ? monitorIds
48
+ : await listOwnedMonitorIds(ctx);
49
+ const stats = await getMonitorStats(ctx, ids, {
50
+ timelineDays,
51
+ responseWindowHours,
52
+ });
53
+ return Array.from(stats.values()) satisfies MonitorStats[];
54
+ },
55
+ });
@@ -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 { getMonitor } from "../server/lib/uptime-monitors";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "Get one uptime monitor with its recent check results and incident history.",
13
+ schema: z.object({
14
+ id: z.string().describe("Monitor id."),
15
+ }),
16
+ http: { method: "GET" },
17
+ run: async ({ id }) => {
18
+ const email = getRequestUserEmail();
19
+ if (!email) throw new Error("no authenticated user");
20
+ const orgId = getRequestOrgId() || null;
21
+ const detail = await getMonitor(id, { email, orgId });
22
+ if (!detail) {
23
+ throw Object.assign(new Error("Monitor not found"), { statusCode: 404 });
24
+ }
25
+ return detail;
26
+ },
27
+ });
@@ -0,0 +1,41 @@
1
+ import { defineAction } from "@agent-native/core";
2
+ import { z } from "zod";
3
+
4
+ import { getPublicStatusPage } from "../server/lib/status-pages";
5
+
6
+ /**
7
+ * UNAUTHENTICATED read of a PUBLISHED status page by slug. Returns only the
8
+ * sanitized public projection (display name/host, current status, uptime %s,
9
+ * timeline buckets, optional response time) — never monitor URLs (unless the
10
+ * owner enabled per-monitor "show URL"), headers, assertions, or alert config.
11
+ *
12
+ * Its HTTP route is whitelisted in server/plugins/auth.ts so link visitors and
13
+ * the public SSR page's light auto-refresh can read it without a session. It is
14
+ * hidden from the agent tool surface (`agentTool: false`) — the agent already
15
+ * has the owner-scoped `list-status-pages` / `get-status-page`.
16
+ */
17
+ export default defineAction({
18
+ description:
19
+ "Read a published public status page by slug (unauthenticated, safe fields only).",
20
+ schema: z.object({
21
+ slug: z.string().describe("Public status page slug."),
22
+ }),
23
+ http: { method: "GET" },
24
+ // Public, unauthenticated read: no session is required and no owner context is
25
+ // used (the page owner is resolved from the row itself). The HTTP route is
26
+ // also whitelisted in server/plugins/auth.ts.
27
+ requiresAuth: false,
28
+ readOnly: true,
29
+ // Hidden from the agent tool surface — the agent uses the owner-scoped
30
+ // list-status-pages / get-status-page instead.
31
+ agentTool: false,
32
+ run: async ({ slug }) => {
33
+ const page = await getPublicStatusPage(slug);
34
+ if (!page) {
35
+ throw Object.assign(new Error("Status page not found"), {
36
+ statusCode: 404,
37
+ });
38
+ }
39
+ return page;
40
+ },
41
+ });
@@ -0,0 +1,29 @@
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 { getStatusPagePreview } from "../server/lib/status-pages";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "Get one of the current user's status pages by id, with its config and a live preview (the same sanitized view the public page renders, including drafts).",
13
+ schema: z.object({
14
+ id: z.string().describe("Status page id."),
15
+ }),
16
+ http: { method: "GET" },
17
+ run: async ({ id }) => {
18
+ const email = getRequestUserEmail();
19
+ if (!email) throw new Error("no authenticated user");
20
+ const orgId = getRequestOrgId() || null;
21
+ const result = await getStatusPagePreview(id, { email, orgId });
22
+ if (!result) {
23
+ throw Object.assign(new Error("Status page not found"), {
24
+ statusCode: 404,
25
+ });
26
+ }
27
+ return result;
28
+ },
29
+ });
@@ -0,0 +1,40 @@
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 { listErrorIssues } from "../server/lib/error-capture.js";
9
+
10
+ function resolveScope() {
11
+ const userEmail = getRequestUserEmail();
12
+ if (!userEmail) throw new Error("no authenticated user");
13
+ return { userEmail, orgId: getRequestOrgId() || null };
14
+ }
15
+
16
+ export default defineAction({
17
+ description:
18
+ "List captured JavaScript error issues (Sentry-style groups) accessible to the current user/org. Each issue groups occurrences by fingerprint with counts, users affected, first/last seen, status, and a recent-volume sparkline.",
19
+ schema: z.object({
20
+ status: z
21
+ .enum(["unresolved", "resolved", "ignored", "all"])
22
+ .optional()
23
+ .describe("Filter by triage status. Defaults to all."),
24
+ query: z
25
+ .string()
26
+ .optional()
27
+ .describe("Search across issue title, type, culprit, and fingerprint."),
28
+ app: z.string().optional().describe("Optional app filter."),
29
+ sort: z
30
+ .enum(["lastSeen", "eventCount", "firstSeen"])
31
+ .optional()
32
+ .describe("Sort order; defaults to most recently seen."),
33
+ limit: z.coerce.number().int().min(1).max(100).optional().default(50),
34
+ }),
35
+ http: { method: "GET" },
36
+ readOnly: true,
37
+ run: async (args) => {
38
+ return listErrorIssues(resolveScope(), args);
39
+ },
40
+ });
@@ -0,0 +1,21 @@
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 { listMonitors } from "../server/lib/uptime-monitors";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "List the current user's uptime monitors with their latest status, latency, and 24h/7d uptime percentage.",
13
+ schema: z.object({}),
14
+ http: { method: "GET" },
15
+ run: async () => {
16
+ const email = getRequestUserEmail();
17
+ if (!email) throw new Error("no authenticated user");
18
+ const orgId = getRequestOrgId() || null;
19
+ return listMonitors({ email, orgId });
20
+ },
21
+ });
@@ -0,0 +1,21 @@
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 { listStatusPages } from "../server/lib/status-pages";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "List the current user's public status pages with their slug, title, published state, layout options, and included monitors.",
13
+ schema: z.object({}),
14
+ http: { method: "GET" },
15
+ run: async () => {
16
+ const email = getRequestUserEmail();
17
+ if (!email) throw new Error("no authenticated user");
18
+ const orgId = getRequestOrgId() || null;
19
+ return listStatusPages({ email, orgId });
20
+ },
21
+ });
@@ -0,0 +1,51 @@
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 { matchErrorIssuesBySignatures } from "../server/lib/error-capture.js";
9
+
10
+ function resolveScope() {
11
+ const userEmail = getRequestUserEmail();
12
+ if (!userEmail) throw new Error("no authenticated user");
13
+ return { userEmail, orgId: getRequestOrgId() || null };
14
+ }
15
+
16
+ export default defineAction({
17
+ description:
18
+ "Resolve session console error lines to their captured error issues. Given each line's message/stack/source (as shown in a session recording's devtools console), returns the matching Sentry-style issue id per line so the UI or agent can deep-link to /monitoring?view=errors&issue=<id>. Fingerprints are computed with the same grouping logic as ingest, so a match is the exact issue the error was filed under; lines with no captured issue are omitted. Read-only.",
19
+ schema: z.object({
20
+ signatures: z
21
+ .array(
22
+ z.object({
23
+ key: z
24
+ .string()
25
+ .describe("Caller-chosen id echoed back as the result key."),
26
+ source: z
27
+ .string()
28
+ .optional()
29
+ .describe(
30
+ "Console source, e.g. window-error / unhandledrejection / console.",
31
+ ),
32
+ message: z
33
+ .string()
34
+ .describe(
35
+ 'Console error message, e.g. "TypeError: x is not a function".',
36
+ ),
37
+ stack: z
38
+ .string()
39
+ .optional()
40
+ .describe("Raw stack string for the error, if captured."),
41
+ }),
42
+ )
43
+ .max(100)
44
+ .describe("Session console error lines to resolve to issues."),
45
+ }),
46
+ http: { method: "POST" },
47
+ readOnly: true,
48
+ run: async (args) => {
49
+ return matchErrorIssuesBySignatures(resolveScope(), args.signatures);
50
+ },
51
+ });
@@ -4,13 +4,13 @@ import { z } from "zod";
4
4
 
5
5
  export default defineAction({
6
6
  description:
7
- "Navigate the UI to a specific view, dashboard, analysis, extension, Analytics session recording, or Analytics agent-admin surface. For filter changes (dashboard filter query params like ?f_date=... or session filters like ?range=30d&q=signup), use the framework-level `set-search-params` tool instead of this action.",
7
+ "Navigate the UI to a specific view, dashboard, analysis, extension, Analytics session recording, Monitoring tab (uptime checks, public status pages, or captured errors), or Analytics agent-admin surface. For filter changes (dashboard filter query params like ?f_date=... or session filters like ?range=30d&q=signup), use the framework-level `set-search-params` tool instead of this action.",
8
8
  schema: z.object({
9
9
  view: z
10
10
  .string()
11
11
  .optional()
12
12
  .describe(
13
- "View to navigate to (ask, adhoc, analyses, extensions, sessions, agents, catalog, data-dictionary, data-sources, settings)",
13
+ "View to navigate to (ask, adhoc, analyses, extensions, sessions, monitoring, agents, catalog, data-dictionary, data-sources, settings)",
14
14
  ),
15
15
  dashboardId: z
16
16
  .string()
@@ -38,6 +38,30 @@ export default defineAction({
38
38
  .describe(
39
39
  "Connected app database id to select when navigating to agentsView=database",
40
40
  ),
41
+ monitoringView: z
42
+ .enum(["uptime", "errors"])
43
+ .optional()
44
+ .describe(
45
+ "Monitoring tab subview to open (uptime checks or captured errors). Used with view=monitoring; defaults to uptime.",
46
+ ),
47
+ monitorId: z
48
+ .string()
49
+ .optional()
50
+ .describe(
51
+ 'Uptime monitor id to open (used with view=monitoring; implies the uptime subview). Pass "new" to open the create-monitor form.',
52
+ ),
53
+ statusPageId: z
54
+ .string()
55
+ .optional()
56
+ .describe(
57
+ 'Public status page to open in the uptime subview\'s Status pages config (used with view=monitoring; implies the uptime subview). Pass "list" for the index, "new" for the create form, or a status page id to edit that page.',
58
+ ),
59
+ errorIssueId: z
60
+ .string()
61
+ .optional()
62
+ .describe(
63
+ "Captured error issue id to open (used with view=monitoring; implies the errors subview).",
64
+ ),
41
65
  }),
42
66
  http: false,
43
67
  run: async (args) => {
@@ -48,10 +72,14 @@ export default defineAction({
48
72
  !args.extensionId &&
49
73
  !args.recordingId &&
50
74
  !args.agentsView &&
51
- !args.dbAdminConnectionId
75
+ !args.dbAdminConnectionId &&
76
+ !args.monitoringView &&
77
+ !args.monitorId &&
78
+ !args.statusPageId &&
79
+ !args.errorIssueId
52
80
  ) {
53
81
  throw new Error(
54
- "At least --view, --dashboardId, --analysisId, --extensionId, --recordingId, --agentsView, or --dbAdminConnectionId is required.",
82
+ "At least --view, --dashboardId, --analysisId, --extensionId, --recordingId, --agentsView, --dbAdminConnectionId, --monitoringView, --monitorId, --statusPageId, or --errorIssueId is required.",
55
83
  );
56
84
  }
57
85
  const nav: Record<string, string> = {};
@@ -81,6 +109,28 @@ export default defineAction({
81
109
  nav.agentsView = "database";
82
110
  if (!args.view) nav.view = "agents";
83
111
  }
112
+ if (args.monitoringView) {
113
+ nav.monitoringView = args.monitoringView;
114
+ if (!args.view) nav.view = "monitoring";
115
+ }
116
+ if (args.monitorId) {
117
+ nav.monitorId = args.monitorId;
118
+ // Monitors live under the uptime subview.
119
+ nav.monitoringView = "uptime";
120
+ if (!args.view) nav.view = "monitoring";
121
+ }
122
+ if (args.statusPageId) {
123
+ nav.statusPageId = args.statusPageId;
124
+ // Status pages are configured under the uptime subview.
125
+ nav.monitoringView = "uptime";
126
+ if (!args.view) nav.view = "monitoring";
127
+ }
128
+ if (args.errorIssueId) {
129
+ nav.errorIssueId = args.errorIssueId;
130
+ // Error issues live under the errors subview.
131
+ nav.monitoringView = "errors";
132
+ if (!args.view) nav.view = "monitoring";
133
+ }
84
134
  await writeAppState("navigate", nav);
85
135
 
86
136
  const parts: string[] = [];
@@ -92,6 +142,10 @@ export default defineAction({
92
142
  if (nav.agentsView) parts.push(`agents:${nav.agentsView}`);
93
143
  if (nav.dbAdminConnectionId)
94
144
  parts.push(`db-admin:${nav.dbAdminConnectionId}`);
145
+ if (nav.monitoringView) parts.push(`monitoring:${nav.monitoringView}`);
146
+ if (nav.monitorId) parts.push(`monitor:${nav.monitorId}`);
147
+ if (nav.statusPageId) parts.push(`status-page:${nav.statusPageId}`);
148
+ if (nav.errorIssueId) parts.push(`issue:${nav.errorIssueId}`);
95
149
  return `Navigating to ${parts.join(" ")}`;
96
150
  },
97
151
  });
@@ -0,0 +1,22 @@
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 { removeStatusPageMonitor } from "../server/lib/status-pages";
9
+
10
+ export default defineAction({
11
+ description: "Remove a monitor from a status page.",
12
+ schema: z.object({
13
+ id: z.string().describe("Status page id."),
14
+ monitorId: z.string().describe("Monitor id to remove."),
15
+ }),
16
+ run: async ({ id, monitorId }) => {
17
+ const email = getRequestUserEmail();
18
+ if (!email) throw new Error("no authenticated user");
19
+ const orgId = getRequestOrgId() || null;
20
+ return removeStatusPageMonitor(id, monitorId, { email, orgId });
21
+ },
22
+ });
@@ -0,0 +1,25 @@
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 { reorderStatusPageMonitors } from "../server/lib/status-pages";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "Reorder the monitors on a status page. Pass the full list of monitor ids in the desired display order.",
13
+ schema: z.object({
14
+ id: z.string().describe("Status page id."),
15
+ monitorIds: z
16
+ .array(z.string())
17
+ .describe("All included monitor ids, in the desired order."),
18
+ }),
19
+ run: async ({ id, monitorIds }) => {
20
+ const email = getRequestUserEmail();
21
+ if (!email) throw new Error("no authenticated user");
22
+ const orgId = getRequestOrgId() || null;
23
+ return reorderStatusPageMonitors(id, monitorIds, { email, orgId });
24
+ },
25
+ });
@@ -0,0 +1,38 @@
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 { updateErrorIssue } from "../server/lib/error-capture.js";
9
+
10
+ function resolveScope() {
11
+ const userEmail = getRequestUserEmail();
12
+ if (!userEmail) throw new Error("no authenticated user");
13
+ return { userEmail, orgId: getRequestOrgId() || null };
14
+ }
15
+
16
+ export default defineAction({
17
+ description:
18
+ "Update the triage state of a captured error issue: set status to unresolved (reopen), resolved, or ignored, and optionally (re)assign a triage owner.",
19
+ schema: z.object({
20
+ id: z.string().describe("Error issue id (erriss_...)."),
21
+ status: z
22
+ .enum(["unresolved", "resolved", "ignored"])
23
+ .optional()
24
+ .describe("New triage status."),
25
+ assignee: z
26
+ .string()
27
+ .nullable()
28
+ .optional()
29
+ .describe("Assignee email, or null to clear the assignment."),
30
+ }),
31
+ http: { method: "POST" },
32
+ run: async (args) => {
33
+ return updateErrorIssue(resolveScope(), args.id, {
34
+ status: args.status,
35
+ assignee: args.assignee,
36
+ });
37
+ },
38
+ });
@@ -0,0 +1,23 @@
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 { runMonitorNow } from "../server/lib/uptime-monitors";
9
+
10
+ export default defineAction({
11
+ description:
12
+ "Run one uptime check now for a monitor. Probes the URL, records the result, opens/resolves incidents, and returns the outcome.",
13
+ schema: z.object({
14
+ id: z.string().describe("Monitor id to check now."),
15
+ }),
16
+ http: { method: "POST" },
17
+ run: async ({ id }) => {
18
+ const email = getRequestUserEmail();
19
+ if (!email) throw new Error("no authenticated user");
20
+ const orgId = getRequestOrgId() || null;
21
+ return runMonitorNow(id, { email, orgId });
22
+ },
23
+ });