@agent-native/core 0.86.1 → 0.87.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 (1180) hide show
  1. package/corpus/README.md +2 -2
  2. package/corpus/core/CHANGELOG.md +12 -0
  3. package/corpus/core/docs/content/components.mdx +13 -0
  4. package/corpus/core/docs/content/creating-templates.mdx +7 -0
  5. package/corpus/core/docs/content/locales/ar-SA/components.mdx +9 -0
  6. package/corpus/core/docs/content/locales/ar-SA/creating-templates.mdx +2 -0
  7. package/corpus/core/docs/content/locales/ar-SA/template-analytics.mdx +6 -0
  8. package/corpus/core/docs/content/locales/ar-SA/template-clips.mdx +7 -0
  9. package/corpus/core/docs/content/locales/ar-SA/tracking.mdx +6 -0
  10. package/corpus/core/docs/content/locales/de-DE/components.mdx +9 -0
  11. package/corpus/core/docs/content/locales/de-DE/creating-templates.mdx +2 -0
  12. package/corpus/core/docs/content/locales/de-DE/template-analytics.mdx +6 -0
  13. package/corpus/core/docs/content/locales/de-DE/template-clips.mdx +7 -0
  14. package/corpus/core/docs/content/locales/de-DE/tracking.mdx +6 -0
  15. package/corpus/core/docs/content/locales/es-ES/components.mdx +9 -0
  16. package/corpus/core/docs/content/locales/es-ES/creating-templates.mdx +2 -0
  17. package/corpus/core/docs/content/locales/es-ES/template-analytics.mdx +6 -0
  18. package/corpus/core/docs/content/locales/es-ES/template-clips.mdx +7 -0
  19. package/corpus/core/docs/content/locales/es-ES/tracking.mdx +6 -0
  20. package/corpus/core/docs/content/locales/fr-FR/components.mdx +9 -0
  21. package/corpus/core/docs/content/locales/fr-FR/creating-templates.mdx +2 -0
  22. package/corpus/core/docs/content/locales/fr-FR/template-analytics.mdx +6 -0
  23. package/corpus/core/docs/content/locales/fr-FR/template-clips.mdx +7 -0
  24. package/corpus/core/docs/content/locales/fr-FR/tracking.mdx +6 -0
  25. package/corpus/core/docs/content/locales/hi-IN/components.mdx +9 -0
  26. package/corpus/core/docs/content/locales/hi-IN/creating-templates.mdx +2 -0
  27. package/corpus/core/docs/content/locales/hi-IN/template-analytics.mdx +6 -0
  28. package/corpus/core/docs/content/locales/hi-IN/template-clips.mdx +7 -0
  29. package/corpus/core/docs/content/locales/hi-IN/tracking.mdx +6 -0
  30. package/corpus/core/docs/content/locales/ja-JP/components.mdx +9 -0
  31. package/corpus/core/docs/content/locales/ja-JP/creating-templates.mdx +2 -0
  32. package/corpus/core/docs/content/locales/ja-JP/template-analytics.mdx +6 -0
  33. package/corpus/core/docs/content/locales/ja-JP/template-clips.mdx +7 -0
  34. package/corpus/core/docs/content/locales/ja-JP/tracking.mdx +6 -0
  35. package/corpus/core/docs/content/locales/ko-KR/components.mdx +9 -0
  36. package/corpus/core/docs/content/locales/ko-KR/creating-templates.mdx +2 -0
  37. package/corpus/core/docs/content/locales/ko-KR/template-analytics.mdx +6 -0
  38. package/corpus/core/docs/content/locales/ko-KR/template-clips.mdx +7 -0
  39. package/corpus/core/docs/content/locales/ko-KR/tracking.mdx +6 -0
  40. package/corpus/core/docs/content/locales/pt-BR/components.mdx +9 -0
  41. package/corpus/core/docs/content/locales/pt-BR/creating-templates.mdx +2 -0
  42. package/corpus/core/docs/content/locales/pt-BR/template-analytics.mdx +6 -0
  43. package/corpus/core/docs/content/locales/pt-BR/template-clips.mdx +7 -0
  44. package/corpus/core/docs/content/locales/pt-BR/tracking.mdx +6 -0
  45. package/corpus/core/docs/content/locales/zh-CN/components.mdx +9 -0
  46. package/corpus/core/docs/content/locales/zh-CN/creating-templates.mdx +2 -0
  47. package/corpus/core/docs/content/locales/zh-CN/template-analytics.mdx +6 -0
  48. package/corpus/core/docs/content/locales/zh-CN/template-clips.mdx +7 -0
  49. package/corpus/core/docs/content/locales/zh-CN/tracking.mdx +6 -0
  50. package/corpus/core/docs/content/locales/zh-TW/components.mdx +9 -0
  51. package/corpus/core/docs/content/locales/zh-TW/creating-templates.mdx +2 -0
  52. package/corpus/core/docs/content/locales/zh-TW/template-analytics.mdx +6 -0
  53. package/corpus/core/docs/content/locales/zh-TW/template-clips.mdx +7 -0
  54. package/corpus/core/docs/content/locales/zh-TW/tracking.mdx +6 -0
  55. package/corpus/core/docs/content/template-analytics.mdx +6 -0
  56. package/corpus/core/docs/content/template-clips.mdx +7 -0
  57. package/corpus/core/docs/content/tracking.mdx +6 -0
  58. package/corpus/core/package.json +8 -1
  59. package/corpus/core/src/application-state/emitter.ts +37 -5
  60. package/corpus/core/src/cli/create.ts +55 -3
  61. package/corpus/core/src/cli/workspacify.ts +10 -4
  62. package/corpus/core/src/client/components/ui/dialog.tsx +1 -91
  63. package/corpus/core/src/client/components/ui/dropdown-menu.tsx +1 -191
  64. package/corpus/core/src/client/components/ui/hover-card.tsx +1 -29
  65. package/corpus/core/src/client/components/ui/popover.tsx +1 -31
  66. package/corpus/core/src/client/components/ui/sheet.tsx +1 -96
  67. package/corpus/core/src/client/components/ui/tooltip.tsx +1 -53
  68. package/corpus/core/src/secrets/crypto.ts +47 -9
  69. package/corpus/core/src/server/agent-access.ts +72 -0
  70. package/corpus/core/src/server/h3-helpers.ts +14 -2
  71. package/corpus/core/src/server/index.ts +19 -0
  72. package/corpus/core/src/server/request-context.ts +64 -7
  73. package/corpus/core/src/shared/agent-access.ts +112 -0
  74. package/corpus/core/src/shared/index.ts +14 -0
  75. package/corpus/templates/analytics/AGENTS.md +4 -0
  76. package/corpus/templates/analytics/app/components/InlineMetric.tsx +2 -2
  77. package/corpus/templates/analytics/app/components/dashboard/CumulativeNetChart.tsx +7 -2
  78. package/corpus/templates/analytics/app/components/dashboard/DataTable.tsx +16 -11
  79. package/corpus/templates/analytics/app/components/dashboard/DateRangePicker.tsx +2 -1
  80. package/corpus/templates/analytics/app/components/dashboard/MetricCard.tsx +7 -2
  81. package/corpus/templates/analytics/app/components/dashboard/RecentActivity.tsx +6 -3
  82. package/corpus/templates/analytics/app/components/dashboard/RevenueChart.tsx +6 -1
  83. package/corpus/templates/analytics/app/components/dashboard/RevenueComparisonChart.tsx +7 -2
  84. package/corpus/templates/analytics/app/components/dashboard/SqlChart.tsx +15 -11
  85. package/corpus/templates/analytics/app/components/dashboard/StatsCard.tsx +7 -1
  86. package/corpus/templates/analytics/app/components/dashboard/TimeSeriesChart.tsx +7 -2
  87. package/corpus/templates/analytics/app/components/layout/CommandPalette.tsx +16 -16
  88. package/corpus/templates/analytics/app/components/layout/HeaderActions.tsx +1 -2
  89. package/corpus/templates/analytics/app/components/layout/MobileNav.tsx +5 -2
  90. package/corpus/templates/analytics/app/components/layout/NewAnalysisDialog.tsx +6 -6
  91. package/corpus/templates/analytics/app/components/layout/NewDashboardDialog.tsx +3 -4
  92. package/corpus/templates/analytics/app/components/layout/Sidebar.tsx +12 -9
  93. package/corpus/templates/analytics/app/components/ui/calendar.tsx +1 -1
  94. package/corpus/templates/analytics/app/pages/Agents.tsx +19 -19
  95. package/corpus/templates/analytics/app/pages/DataDictionary.tsx +21 -21
  96. package/corpus/templates/analytics/app/pages/DataSources.tsx +28 -28
  97. package/corpus/templates/analytics/app/pages/NotFound.tsx +1 -2
  98. package/corpus/templates/analytics/app/pages/Placeholder.tsx +1 -2
  99. package/corpus/templates/analytics/app/pages/Settings.tsx +16 -16
  100. package/corpus/templates/analytics/app/pages/adhoc/DashboardSkeleton.tsx +2 -3
  101. package/corpus/templates/analytics/app/pages/adhoc/_shared/KpiChart.tsx +13 -8
  102. package/corpus/templates/analytics/app/pages/adhoc/_shared/components/DateRangeInput.tsx +2 -1
  103. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ChartTypePicker.tsx +4 -2
  104. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/DateRangePicker.tsx +2 -1
  105. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventCombobox.tsx +7 -7
  106. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventPanel.tsx +1 -2
  107. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/EventRow.tsx +1 -2
  108. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/ExplorerChart.tsx +8 -3
  109. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/FilterBuilder.tsx +4 -5
  110. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/GroupByPicker.tsx +1 -2
  111. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyCombobox.tsx +7 -7
  112. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/PropertyValueCombobox.tsx +7 -7
  113. package/corpus/templates/analytics/app/pages/adhoc/explorer/components/SqlPreview.tsx +1 -1
  114. package/corpus/templates/analytics/app/pages/adhoc/explorer/index.tsx +16 -16
  115. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/ChartCard.tsx +21 -16
  116. package/corpus/templates/analytics/app/pages/adhoc/explorer-dashboard/index.tsx +32 -32
  117. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/DashboardFilterBar.tsx +14 -14
  118. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/EmailReportDialog.tsx +13 -14
  119. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/PanelEditorDialog.tsx +21 -13
  120. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/SqlChartCard.tsx +28 -23
  121. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewSqlPopover.tsx +12 -12
  122. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/ViewsMenu.tsx +15 -15
  123. package/corpus/templates/analytics/app/pages/adhoc/sql-dashboard/index.tsx +33 -29
  124. package/corpus/templates/analytics/app/pages/analyses/AnalysesList.tsx +7 -8
  125. package/corpus/templates/analytics/app/pages/analyses/AnalysisDetail.tsx +19 -19
  126. package/corpus/templates/analytics/app/pages/analyses/LegacyFusionAnalysis.tsx +15 -11
  127. package/corpus/templates/analytics/app/pages/sessions/SessionDetailPage.tsx +42 -23
  128. package/corpus/templates/analytics/app/pages/sessions/SessionDevToolsPanel.tsx +12 -7
  129. package/corpus/templates/analytics/app/pages/sessions/SessionsPage.tsx +12 -12
  130. package/corpus/templates/analytics/app/pages/settings/AlertRulesSettingsCard.tsx +25 -25
  131. package/corpus/templates/analytics/app/root.tsx +2 -2
  132. package/corpus/templates/analytics/app/routes/catalog.tsx +8 -8
  133. package/corpus/templates/analytics/package.json +1 -0
  134. package/corpus/templates/analytics/server/lib/session-replay-agent-context.ts +59 -59
  135. package/corpus/templates/analytics/shared/session-replay-agent-access.ts +14 -3
  136. package/corpus/templates/assets/app/components/create/RecentDraftsSection.tsx +2 -3
  137. package/corpus/templates/assets/app/components/generation/GenerationResults.tsx +9 -9
  138. package/corpus/templates/assets/app/components/layout/Header.tsx +4 -2
  139. package/corpus/templates/assets/app/components/layout/Layout.tsx +1 -1
  140. package/corpus/templates/assets/app/components/layout/PageShell.tsx +5 -6
  141. package/corpus/templates/assets/app/components/layout/Sidebar.tsx +12 -12
  142. package/corpus/templates/assets/app/components/library/CreateLibraryDialog.tsx +8 -8
  143. package/corpus/templates/assets/app/components/library/EditLibraryDialog.tsx +7 -7
  144. package/corpus/templates/assets/app/components/library/LibraryCard.tsx +8 -8
  145. package/corpus/templates/assets/app/components/library/LibraryPresetGrid.tsx +2 -3
  146. package/corpus/templates/assets/app/root.tsx +1 -1
  147. package/corpus/templates/assets/app/routes/asset.$id.tsx +19 -19
  148. package/corpus/templates/assets/app/routes/audit.tsx +14 -15
  149. package/corpus/templates/assets/app/routes/brand-kits.$id.tsx +54 -49
  150. package/corpus/templates/assets/app/routes/library.tsx +31 -31
  151. package/corpus/templates/assets/app/routes/settings.tsx +18 -18
  152. package/corpus/templates/assets/package.json +1 -0
  153. package/corpus/templates/brain/app/components/brain/CanonicalPreviewSheet.tsx +5 -6
  154. package/corpus/templates/brain/app/components/brain/Surface.tsx +8 -3
  155. package/corpus/templates/brain/app/components/layout/Layout.tsx +7 -7
  156. package/corpus/templates/brain/app/components/layout/Sidebar.tsx +6 -6
  157. package/corpus/templates/brain/app/routes/knowledge.tsx +19 -19
  158. package/corpus/templates/brain/app/routes/ops.tsx +18 -18
  159. package/corpus/templates/brain/app/routes/review.tsx +27 -22
  160. package/corpus/templates/brain/app/routes/search.tsx +20 -20
  161. package/corpus/templates/brain/app/routes/settings.tsx +22 -22
  162. package/corpus/templates/brain/app/routes/sources.tsx +23 -23
  163. package/corpus/templates/brain/package.json +1 -0
  164. package/corpus/templates/calendar/app/components/ThemeToggle.tsx +5 -5
  165. package/corpus/templates/calendar/app/components/TimezoneCombobox.tsx +6 -6
  166. package/corpus/templates/calendar/app/components/booking/BookingConfirmation.tsx +1 -2
  167. package/corpus/templates/calendar/app/components/booking/BookingForm.tsx +8 -9
  168. package/corpus/templates/calendar/app/components/booking/DatePicker.tsx +2 -2
  169. package/corpus/templates/calendar/app/components/booking/TimeSlotPicker.tsx +2 -3
  170. package/corpus/templates/calendar/app/components/calendar/AddCalendarDialog.tsx +15 -10
  171. package/corpus/templates/calendar/app/components/calendar/AttendeeAutocomplete.tsx +6 -6
  172. package/corpus/templates/calendar/app/components/calendar/CreateEventDialog.tsx +27 -27
  173. package/corpus/templates/calendar/app/components/calendar/DeleteEventDialog.tsx +12 -9
  174. package/corpus/templates/calendar/app/components/calendar/EventAttendeesSection.tsx +13 -10
  175. package/corpus/templates/calendar/app/components/calendar/EventDetailPanel.tsx +7 -7
  176. package/corpus/templates/calendar/app/components/calendar/EventDetailPopover.tsx +21 -21
  177. package/corpus/templates/calendar/app/components/calendar/EventDialog.tsx +11 -11
  178. package/corpus/templates/calendar/app/components/calendar/EventOptionControls.tsx +9 -9
  179. package/corpus/templates/calendar/app/components/calendar/FindTimePanel.tsx +9 -9
  180. package/corpus/templates/calendar/app/components/calendar/GoogleConnectBanner.tsx +6 -6
  181. package/corpus/templates/calendar/app/components/calendar/GoogleSetupWizard.tsx +3 -3
  182. package/corpus/templates/calendar/app/components/calendar/GoogleSyncButton.tsx +1 -1
  183. package/corpus/templates/calendar/app/components/calendar/GuestNotificationDialog.tsx +10 -8
  184. package/corpus/templates/calendar/app/components/calendar/IntegrationsSidebar.tsx +12 -12
  185. package/corpus/templates/calendar/app/components/calendar/KeyboardShortcutsHelp.tsx +2 -2
  186. package/corpus/templates/calendar/app/components/calendar/MonthView.tsx +1 -1
  187. package/corpus/templates/calendar/app/components/calendar/PeopleSearchDialog.tsx +6 -6
  188. package/corpus/templates/calendar/app/components/calendar/WeekView.tsx +6 -6
  189. package/corpus/templates/calendar/app/components/layout/AppLayout.tsx +2 -2
  190. package/corpus/templates/calendar/app/components/layout/Sidebar.tsx +16 -16
  191. package/corpus/templates/calendar/app/pages/AvailabilitySettings.tsx +11 -11
  192. package/corpus/templates/calendar/app/pages/BookingLinksPage.tsx +50 -45
  193. package/corpus/templates/calendar/app/pages/BookingPage.tsx +2 -2
  194. package/corpus/templates/calendar/app/pages/BookingsList.tsx +12 -12
  195. package/corpus/templates/calendar/app/pages/CalendarView.tsx +17 -17
  196. package/corpus/templates/calendar/app/pages/ManageBookingPage.tsx +13 -13
  197. package/corpus/templates/calendar/app/pages/Settings.tsx +12 -12
  198. package/corpus/templates/calendar/app/routes/event.tsx +2 -2
  199. package/corpus/templates/calendar/package.json +1 -0
  200. package/corpus/templates/chat/app/components/layout/Header.tsx +4 -2
  201. package/corpus/templates/chat/app/components/layout/Layout.tsx +7 -7
  202. package/corpus/templates/chat/app/components/layout/Sidebar.tsx +12 -12
  203. package/corpus/templates/chat/app/routes/database.tsx +1 -2
  204. package/corpus/templates/chat/app/routes/observability.tsx +1 -1
  205. package/corpus/templates/chat/app/routes/settings.tsx +5 -5
  206. package/corpus/templates/chat/package.json +1 -0
  207. package/corpus/templates/clips/AGENTS.md +5 -0
  208. package/corpus/templates/clips/actions/create-recording-agent-link.ts +15 -20
  209. package/corpus/templates/clips/actions/delete-recording-permanent.ts +74 -34
  210. package/corpus/templates/clips/app/components/capture-install-options.tsx +6 -6
  211. package/corpus/templates/clips/app/components/editable-recording-title.tsx +2 -2
  212. package/corpus/templates/clips/app/components/editor/chapters-editor.tsx +7 -7
  213. package/corpus/templates/clips/app/components/editor/editor-layout.tsx +165 -3
  214. package/corpus/templates/clips/app/components/editor/editor-toolbar.tsx +101 -57
  215. package/corpus/templates/clips/app/components/editor/split-button.tsx +4 -5
  216. package/corpus/templates/clips/app/components/editor/stitch-manager.tsx +9 -9
  217. package/corpus/templates/clips/app/components/editor/thumbnail-picker.tsx +16 -11
  218. package/corpus/templates/clips/app/components/editor/timeline.tsx +4 -6
  219. package/corpus/templates/clips/app/components/editor/transcript-editor.tsx +5 -5
  220. package/corpus/templates/clips/app/components/editor/trim-handles.tsx +4 -7
  221. package/corpus/templates/clips/app/components/editor/waveform.tsx +13 -4
  222. package/corpus/templates/clips/app/components/layout/Header.tsx +4 -2
  223. package/corpus/templates/clips/app/components/layout/Layout.tsx +2 -3
  224. package/corpus/templates/clips/app/components/library/bulk-action-toolbar.tsx +4 -4
  225. package/corpus/templates/clips/app/components/library/create-space-dialog.tsx +8 -8
  226. package/corpus/templates/clips/app/components/library/empty-state.tsx +1 -2
  227. package/corpus/templates/clips/app/components/library/folder-tree.tsx +14 -14
  228. package/corpus/templates/clips/app/components/library/library-grid.tsx +7 -7
  229. package/corpus/templates/clips/app/components/library/library-layout.tsx +16 -16
  230. package/corpus/templates/clips/app/components/library/organization-switcher.tsx +11 -11
  231. package/corpus/templates/clips/app/components/library/recording-card.tsx +16 -12
  232. package/corpus/templates/clips/app/components/library/search-bar.tsx +5 -5
  233. package/corpus/templates/clips/app/components/library/sort-menu.tsx +3 -4
  234. package/corpus/templates/clips/app/components/library/tag-input.tsx +4 -4
  235. package/corpus/templates/clips/app/components/meetings/attendee-stack.tsx +6 -2
  236. package/corpus/templates/clips/app/components/meetings/auto-record-prompt.tsx +1 -1
  237. package/corpus/templates/clips/app/components/meetings/bullet-link.tsx +4 -4
  238. package/corpus/templates/clips/app/components/meetings/canvas-editor.tsx +5 -5
  239. package/corpus/templates/clips/app/components/meetings/meeting-card.tsx +3 -3
  240. package/corpus/templates/clips/app/components/meetings/quick-ask-sidebar.tsx +9 -9
  241. package/corpus/templates/clips/app/components/meetings/share-meeting-dialog.tsx +11 -6
  242. package/corpus/templates/clips/app/components/meetings/transcript-bubbles.tsx +4 -4
  243. package/corpus/templates/clips/app/components/player/access-password-prompt.tsx +2 -3
  244. package/corpus/templates/clips/app/components/player/comments-panel.tsx +14 -14
  245. package/corpus/templates/clips/app/components/player/delete-recording-menu.tsx +6 -7
  246. package/corpus/templates/clips/app/components/player/insights-panel.tsx +1 -2
  247. package/corpus/templates/clips/app/components/player/player-controls.tsx +15 -15
  248. package/corpus/templates/clips/app/components/player/reactions-tray.tsx +3 -3
  249. package/corpus/templates/clips/app/components/player/settings-panel.tsx +12 -13
  250. package/corpus/templates/clips/app/components/player/share-dialog.tsx +20 -11
  251. package/corpus/templates/clips/app/components/player/sign-in-prompt-dialog.tsx +2 -3
  252. package/corpus/templates/clips/app/components/player/timestamped-comment-button.tsx +2 -2
  253. package/corpus/templates/clips/app/components/player/transcript-panel.tsx +7 -7
  254. package/corpus/templates/clips/app/components/player/video-player.tsx +9 -9
  255. package/corpus/templates/clips/app/components/recorder/camera-visualizer.tsx +1 -1
  256. package/corpus/templates/clips/app/components/recorder/microphone-visualizer.tsx +1 -1
  257. package/corpus/templates/clips/app/components/recorder/pre-record-panel.tsx +21 -21
  258. package/corpus/templates/clips/app/components/recorder/recording-toolbar.tsx +5 -6
  259. package/corpus/templates/clips/app/components/recorder/storage-setup-card.tsx +6 -7
  260. package/corpus/templates/clips/app/components/sharing/share-ui.tsx +10 -10
  261. package/corpus/templates/clips/app/components/workspace/branding-editor.tsx +9 -5
  262. package/corpus/templates/clips/app/components/workspace/insights-hub.tsx +19 -9
  263. package/corpus/templates/clips/app/components/workspace/invite-dialog.tsx +9 -10
  264. package/corpus/templates/clips/app/components/workspace/members-list.tsx +10 -11
  265. package/corpus/templates/clips/app/components/workspace/notifications-list.tsx +1 -2
  266. package/corpus/templates/clips/app/components/workspace/top-creators-table.tsx +2 -3
  267. package/corpus/templates/clips/app/components/workspace/top-videos-table.tsx +2 -3
  268. package/corpus/templates/clips/app/hooks/use-desktop-promo.ts +1 -2
  269. package/corpus/templates/clips/app/root.tsx +10 -10
  270. package/corpus/templates/clips/app/routes/_app.dictate.tsx +13 -13
  271. package/corpus/templates/clips/app/routes/_app.meetings.$meetingId.tsx +35 -26
  272. package/corpus/templates/clips/app/routes/_app.meetings._index.tsx +20 -20
  273. package/corpus/templates/clips/app/routes/_app.notifications.tsx +3 -3
  274. package/corpus/templates/clips/app/routes/_app.settings._index.tsx +31 -31
  275. package/corpus/templates/clips/app/routes/_app.settings.organization.tsx +13 -8
  276. package/corpus/templates/clips/app/routes/_app.spaces._index.tsx +1 -1
  277. package/corpus/templates/clips/app/routes/_app.trash.tsx +10 -10
  278. package/corpus/templates/clips/app/routes/bug-report.done.tsx +1 -1
  279. package/corpus/templates/clips/app/routes/bug-report.tsx +11 -11
  280. package/corpus/templates/clips/app/routes/download.tsx +2 -2
  281. package/corpus/templates/clips/app/routes/embed.$shareId.tsx +1 -1
  282. package/corpus/templates/clips/app/routes/invite.$token.tsx +13 -8
  283. package/corpus/templates/clips/app/routes/r.$recordingId.tsx +28 -23
  284. package/corpus/templates/clips/app/routes/record.tsx +3 -3
  285. package/corpus/templates/clips/app/routes/share.$shareId.tsx +41 -20
  286. package/corpus/templates/clips/app/routes/share.meeting.$meetingId.tsx +2 -2
  287. package/corpus/templates/clips/changelog/2026-07-05-desktop-full-screen-recordings-with-system-audio-now-finaliz.md +6 -0
  288. package/corpus/templates/clips/changelog/2026-07-05-desktop-recording-shortcut-start-stop.md +6 -0
  289. package/corpus/templates/clips/changelog/2026-07-05-desktop-recordings-no-longer-fail-when-saved-capture-constra.md +6 -0
  290. package/corpus/templates/clips/changelog/2026-07-05-permanently-deleted-clips-now-clean-up-s3-media-objects.md +6 -0
  291. package/corpus/templates/clips/changelog/2026-07-05-timeline-zoom-controls-are-now-visible-in-the-clip-editor-an.md +6 -0
  292. package/corpus/templates/clips/desktop/src/app.tsx +98 -1
  293. package/corpus/templates/clips/desktop/src/components/MediaDeviceRow.tsx +3 -2
  294. package/corpus/templates/clips/desktop/src/lib/media-capture-constraints.ts +121 -0
  295. package/corpus/templates/clips/desktop/src/lib/recorder.ts +55 -84
  296. package/corpus/templates/clips/desktop/src-tauri/src/native_screen.rs +77 -39
  297. package/corpus/templates/clips/desktop/src-tauri/src/shortcuts.rs +60 -8
  298. package/corpus/templates/clips/package.json +1 -0
  299. package/corpus/templates/clips/server/lib/public-agent-context.ts +17 -12
  300. package/corpus/templates/clips/server/lib/recording-media-cleanup.ts +110 -0
  301. package/corpus/templates/clips/server/lib/s3-upload-provider.ts +126 -0
  302. package/corpus/templates/clips/server/routes/api/public-recording.get.ts +47 -11
  303. package/corpus/templates/clips/shared/agent-context.ts +23 -21
  304. package/corpus/templates/content/app/blocks/contentBlockRegistry.tsx +4 -4
  305. package/corpus/templates/content/app/components/EmptyState.tsx +1 -1
  306. package/corpus/templates/content/app/components/ThemeToggle.tsx +6 -6
  307. package/corpus/templates/content/app/components/editor/BubbleToolbar.tsx +5 -5
  308. package/corpus/templates/content/app/components/editor/CommentsSidebar.tsx +5 -5
  309. package/corpus/templates/content/app/components/editor/ContentReferencePreview.tsx +1 -1
  310. package/corpus/templates/content/app/components/editor/DocumentDatabase.tsx +36 -36
  311. package/corpus/templates/content/app/components/editor/DocumentEditor.tsx +3 -3
  312. package/corpus/templates/content/app/components/editor/DocumentProperties.tsx +29 -29
  313. package/corpus/templates/content/app/components/editor/DocumentToolbar.tsx +23 -23
  314. package/corpus/templates/content/app/components/editor/EmojiPicker.tsx +4 -5
  315. package/corpus/templates/content/app/components/editor/LinkHoverPreview.tsx +4 -5
  316. package/corpus/templates/content/app/components/editor/NotionConflictBanner.tsx +1 -1
  317. package/corpus/templates/content/app/components/editor/NotionSyncBar.tsx +2 -2
  318. package/corpus/templates/content/app/components/editor/SlashCommandMenu.tsx +5 -5
  319. package/corpus/templates/content/app/components/editor/TableHoverControls.tsx +13 -13
  320. package/corpus/templates/content/app/components/editor/VersionHistoryPanel.tsx +10 -10
  321. package/corpus/templates/content/app/components/editor/database/DatabaseView.tsx +41 -41
  322. package/corpus/templates/content/app/components/editor/database/shared.tsx +19 -19
  323. package/corpus/templates/content/app/components/editor/database-sources/BuilderSourceReviewDialog.tsx +8 -9
  324. package/corpus/templates/content/app/components/editor/extensions/AudioBlock.tsx +18 -19
  325. package/corpus/templates/content/app/components/editor/extensions/ImageBlock.tsx +20 -21
  326. package/corpus/templates/content/app/components/editor/extensions/LocalMdxComponentNode.tsx +8 -8
  327. package/corpus/templates/content/app/components/editor/extensions/VideoBlock.tsx +18 -19
  328. package/corpus/templates/content/app/components/layout/Header.tsx +4 -2
  329. package/corpus/templates/content/app/components/layout/Layout.tsx +3 -3
  330. package/corpus/templates/content/app/components/sidebar/DocumentSidebar.tsx +22 -22
  331. package/corpus/templates/content/app/components/sidebar/DocumentTreeItem.tsx +22 -22
  332. package/corpus/templates/content/app/components/sidebar/NotionButton.tsx +11 -11
  333. package/corpus/templates/content/app/root.tsx +4 -5
  334. package/corpus/templates/content/app/routes/_app._index.tsx +1 -1
  335. package/corpus/templates/content/app/routes/_app.local-files.tsx +11 -11
  336. package/corpus/templates/content/app/routes/_app.settings.tsx +3 -3
  337. package/corpus/templates/content/package.json +1 -0
  338. package/corpus/templates/design/app/components/ThemeToggle.tsx +6 -6
  339. package/corpus/templates/design/app/components/design/CanvasContextMenu.tsx +11 -11
  340. package/corpus/templates/design/app/components/design/DesignEditorSkeleton.tsx +2 -2
  341. package/corpus/templates/design/app/components/design/DesignExtensionsPanel.tsx +21 -16
  342. package/corpus/templates/design/app/components/design/DesignImportPanel.tsx +3 -3
  343. package/corpus/templates/design/app/components/design/DrawOverlay.tsx +7 -7
  344. package/corpus/templates/design/app/components/design/EditPanel.tsx +30 -30
  345. package/corpus/templates/design/app/components/design/FusionAppBanner.tsx +8 -9
  346. package/corpus/templates/design/app/components/design/LayersPanel.tsx +14 -14
  347. package/corpus/templates/design/app/components/design/LocalhostWriteConsentDialog.tsx +5 -6
  348. package/corpus/templates/design/app/components/design/MotionDock.tsx +15 -15
  349. package/corpus/templates/design/app/components/design/QuestionFlow.tsx +3 -3
  350. package/corpus/templates/design/app/components/design/ReviewPanel.tsx +3 -3
  351. package/corpus/templates/design/app/components/design/StatesPanel.tsx +13 -13
  352. package/corpus/templates/design/app/components/design/TokensPanel.tsx +14 -14
  353. package/corpus/templates/design/app/components/design/TweaksPanel.tsx +6 -6
  354. package/corpus/templates/design/app/components/design/code-workbench/ActivityBar.tsx +3 -3
  355. package/corpus/templates/design/app/components/design/code-workbench/SideBar.tsx +3 -3
  356. package/corpus/templates/design/app/components/design/code-workbench/editor/EditorTabs.tsx +6 -6
  357. package/corpus/templates/design/app/components/design/code-workbench/editor/MonacoHost.tsx +1 -2
  358. package/corpus/templates/design/app/components/design/code-workbench/explorer/FileTree.tsx +17 -17
  359. package/corpus/templates/design/app/components/design/code-workbench/search/SearchView.tsx +6 -6
  360. package/corpus/templates/design/app/components/design/inspector/AlignmentMatrix.tsx +3 -3
  361. package/corpus/templates/design/app/components/design/inspector/AutoLayoutMatrix.tsx +7 -7
  362. package/corpus/templates/design/app/components/design/inspector/ConstraintsWidget.tsx +3 -3
  363. package/corpus/templates/design/app/components/design/inspector/DesignColorPicker.tsx +18 -18
  364. package/corpus/templates/design/app/components/design/inspector/ExportSettingsPanel.tsx +6 -6
  365. package/corpus/templates/design/app/components/design/inspector/ImageFillControls.tsx +6 -6
  366. package/corpus/templates/design/app/components/design/inspector/InspectorAiActions.tsx +7 -7
  367. package/corpus/templates/design/app/components/design/inspector/ScrubInput.tsx +7 -7
  368. package/corpus/templates/design/app/components/design/inspector/ShaderControls.tsx +14 -14
  369. package/corpus/templates/design/app/components/design/inspector/ShaderEffectRow.tsx +9 -9
  370. package/corpus/templates/design/app/components/design/inspector/ShaderFillsPanel.tsx +6 -6
  371. package/corpus/templates/design/app/components/design-system/DesignSystemCard.tsx +2 -3
  372. package/corpus/templates/design/app/components/editor/PromptDialog.tsx +18 -15
  373. package/corpus/templates/design/app/components/layout/Header.tsx +4 -2
  374. package/corpus/templates/design/app/components/layout/Layout.tsx +1 -1
  375. package/corpus/templates/design/app/components/layout/Sidebar.tsx +5 -5
  376. package/corpus/templates/design/app/components/visual-editor/CanvasCommentPins.tsx +7 -7
  377. package/corpus/templates/design/app/components/visual-editor/DrawOverlay.tsx +7 -7
  378. package/corpus/templates/design/app/components/visual-editor/SaveStatusIndicator.tsx +3 -3
  379. package/corpus/templates/design/app/pages/DesignEditor.tsx +51 -47
  380. package/corpus/templates/design/app/pages/DesignSystemSetup.tsx +8 -8
  381. package/corpus/templates/design/app/pages/DesignSystems.tsx +32 -32
  382. package/corpus/templates/design/app/pages/Index.tsx +28 -28
  383. package/corpus/templates/design/app/pages/NotFound.tsx +1 -2
  384. package/corpus/templates/design/app/pages/Present.tsx +1 -2
  385. package/corpus/templates/design/app/pages/VisualEdit.tsx +1 -2
  386. package/corpus/templates/design/app/root.tsx +1 -1
  387. package/corpus/templates/design/app/routes/settings.tsx +3 -3
  388. package/corpus/templates/design/package.json +1 -0
  389. package/corpus/templates/forms/app/components/CloudUpgrade.tsx +10 -10
  390. package/corpus/templates/forms/app/components/ThemeToggle.tsx +5 -5
  391. package/corpus/templates/forms/app/components/builder/FieldPropertiesPanel.tsx +10 -11
  392. package/corpus/templates/forms/app/components/builder/FieldRenderer.tsx +13 -10
  393. package/corpus/templates/forms/app/components/layout/Header.tsx +4 -2
  394. package/corpus/templates/forms/app/components/layout/Layout.tsx +1 -1
  395. package/corpus/templates/forms/app/components/layout/Sidebar.tsx +15 -15
  396. package/corpus/templates/forms/app/components/ui/calendar.tsx +1 -1
  397. package/corpus/templates/forms/app/components/ui/command.tsx +1 -1
  398. package/corpus/templates/forms/app/pages/FormBuilderPage.tsx +24 -24
  399. package/corpus/templates/forms/app/pages/FormFillPage.tsx +2 -2
  400. package/corpus/templates/forms/app/pages/FormsListPage.tsx +25 -25
  401. package/corpus/templates/forms/app/pages/ResponseInsightsPage.tsx +11 -11
  402. package/corpus/templates/forms/app/pages/ResponsesPage.tsx +4 -4
  403. package/corpus/templates/forms/app/routes/_app.settings.tsx +5 -5
  404. package/corpus/templates/forms/app/routes/form-preview.tsx +3 -3
  405. package/corpus/templates/forms/package.json +1 -0
  406. package/corpus/templates/macros/app/components/AddExerciseDialog.tsx +1 -1
  407. package/corpus/templates/macros/app/components/AddMealDialog.tsx +1 -1
  408. package/corpus/templates/macros/app/components/AddWeightDialog.tsx +1 -1
  409. package/corpus/templates/macros/app/components/DailyProgress.tsx +7 -7
  410. package/corpus/templates/macros/app/components/WeeklyCaloriesChart.tsx +1 -2
  411. package/corpus/templates/macros/app/components/WeightCard.tsx +10 -10
  412. package/corpus/templates/macros/app/components/WeightTracker.tsx +1 -1
  413. package/corpus/templates/macros/app/components/layout/AppLayout.tsx +11 -7
  414. package/corpus/templates/macros/app/components/layout/Header.tsx +4 -2
  415. package/corpus/templates/macros/app/root.tsx +1 -1
  416. package/corpus/templates/macros/app/routes/_index.tsx +1 -1
  417. package/corpus/templates/macros/app/routes/analytics.tsx +9 -9
  418. package/corpus/templates/macros/app/routes/settings.tsx +2 -2
  419. package/corpus/templates/macros/package.json +1 -0
  420. package/corpus/templates/mail/app/components/GoogleConnectBanner.tsx +1 -1
  421. package/corpus/templates/mail/app/components/ThemeToggle.tsx +6 -6
  422. package/corpus/templates/mail/app/components/agent-engine-picker.tsx +10 -10
  423. package/corpus/templates/mail/app/components/email/CodeBlockLangPicker.tsx +3 -4
  424. package/corpus/templates/mail/app/components/email/ComposeBubbleToolbar.tsx +5 -5
  425. package/corpus/templates/mail/app/components/email/ComposeEditor.tsx +9 -9
  426. package/corpus/templates/mail/app/components/email/ComposeModal.tsx +18 -18
  427. package/corpus/templates/mail/app/components/email/EmailList.tsx +17 -17
  428. package/corpus/templates/mail/app/components/email/EmailListItem.tsx +5 -5
  429. package/corpus/templates/mail/app/components/email/EmailThread.tsx +6 -6
  430. package/corpus/templates/mail/app/components/email/InlineReplyComposer.tsx +11 -11
  431. package/corpus/templates/mail/app/components/email/IntegrationsSidebar.tsx +13 -13
  432. package/corpus/templates/mail/app/components/email/MobileActionBar.tsx +13 -13
  433. package/corpus/templates/mail/app/components/email/RecipientInput.tsx +13 -13
  434. package/corpus/templates/mail/app/components/email/SendLaterButton.tsx +4 -5
  435. package/corpus/templates/mail/app/components/email/SnoozeModal.tsx +1 -1
  436. package/corpus/templates/mail/app/components/email/SnoozePopover.tsx +6 -6
  437. package/corpus/templates/mail/app/components/layout/AppLayout.tsx +12 -12
  438. package/corpus/templates/mail/app/components/layout/SearchBar.tsx +5 -5
  439. package/corpus/templates/mail/app/components/settings/GmailFiltersSection.tsx +23 -23
  440. package/corpus/templates/mail/app/components/ui/calendar.tsx +1 -1
  441. package/corpus/templates/mail/app/components/ui/command.tsx +1 -1
  442. package/corpus/templates/mail/app/pages/DraftQueuePage.tsx +14 -14
  443. package/corpus/templates/mail/app/pages/NotFound.tsx +1 -2
  444. package/corpus/templates/mail/app/pages/SettingsPage.tsx +25 -25
  445. package/corpus/templates/mail/app/root.tsx +1 -1
  446. package/corpus/templates/mail/app/routes/_index.tsx +1 -2
  447. package/corpus/templates/mail/app/routes/email.tsx +2 -2
  448. package/corpus/templates/mail/package.json +1 -0
  449. package/corpus/templates/plan/app/components/layout/Header.tsx +4 -2
  450. package/corpus/templates/plan/app/components/layout/Layout.tsx +5 -6
  451. package/corpus/templates/plan/app/components/layout/Sidebar.tsx +20 -20
  452. package/corpus/templates/plan/app/components/plan/CanvasArea.tsx +2 -3
  453. package/corpus/templates/plan/app/components/plan/DocumentArea.tsx +2 -2
  454. package/corpus/templates/plan/app/components/plan/GuestModeBanner.tsx +1 -2
  455. package/corpus/templates/plan/app/components/plan/LocalCodebasePicker.tsx +8 -8
  456. package/corpus/templates/plan/app/components/plan/PlanContentRenderer.tsx +1 -1
  457. package/corpus/templates/plan/app/components/plan/PlanImageViewer.tsx +83 -82
  458. package/corpus/templates/plan/app/components/plan/PlanVisualSurface.tsx +3 -3
  459. package/corpus/templates/plan/app/components/plan/planBlocks.tsx +4 -4
  460. package/corpus/templates/plan/app/pages/PlansPage.tsx +84 -77
  461. package/corpus/templates/plan/app/root.tsx +1 -1
  462. package/corpus/templates/plan/app/routes/_index.tsx +2 -1
  463. package/corpus/templates/plan/app/routes/local-plans.$slug.tsx +1 -1
  464. package/corpus/templates/plan/app/routes/plans.$id.tsx +2 -1
  465. package/corpus/templates/plan/app/routes/plans.tsx +2 -1
  466. package/corpus/templates/plan/app/routes/recaps.$id.tsx +2 -1
  467. package/corpus/templates/plan/app/routes/recaps.tsx +2 -1
  468. package/corpus/templates/plan/app/routes/settings.tsx +5 -5
  469. package/corpus/templates/plan/changelog/2026-07-05-images-in-plan-documents-open-reliably-in-the-full-size-prev.md +6 -0
  470. package/corpus/templates/plan/package.json +1 -0
  471. package/corpus/templates/slides/app/components/ThemeToggle.tsx +6 -6
  472. package/corpus/templates/slides/app/components/comments/SlideCommentsPanel.tsx +5 -5
  473. package/corpus/templates/slides/app/components/deck/DeckCard.tsx +7 -7
  474. package/corpus/templates/slides/app/components/deck/ExcalidrawSlide.tsx +1 -2
  475. package/corpus/templates/slides/app/components/deck/SlideRenderer.tsx +1 -1
  476. package/corpus/templates/slides/app/components/design-system/DesignSystemCard.tsx +2 -3
  477. package/corpus/templates/slides/app/components/design-system/DesignSystemSetup.tsx +13 -14
  478. package/corpus/templates/slides/app/components/editor/AnimationsPanel.tsx +7 -7
  479. package/corpus/templates/slides/app/components/editor/BlockBubbleMenu.tsx +5 -5
  480. package/corpus/templates/slides/app/components/editor/EditorSidebar.tsx +6 -6
  481. package/corpus/templates/slides/app/components/editor/EditorToolbar.tsx +13 -13
  482. package/corpus/templates/slides/app/components/editor/ExportMenu.tsx +9 -10
  483. package/corpus/templates/slides/app/components/editor/GenerateSlidesDialog.tsx +5 -6
  484. package/corpus/templates/slides/app/components/editor/HistoryPanel.tsx +12 -12
  485. package/corpus/templates/slides/app/components/editor/ImageDropPromptPopover.tsx +3 -4
  486. package/corpus/templates/slides/app/components/editor/ImageSearchPanel.tsx +4 -5
  487. package/corpus/templates/slides/app/components/editor/ImportButton.tsx +3 -4
  488. package/corpus/templates/slides/app/components/editor/PromptDialog.tsx +1 -2
  489. package/corpus/templates/slides/app/components/editor/ShareDialog.tsx +10 -10
  490. package/corpus/templates/slides/app/components/editor/SlideBubbleMenu.tsx +10 -10
  491. package/corpus/templates/slides/app/components/editor/SlideEditor.tsx +6 -6
  492. package/corpus/templates/slides/app/components/editor/SlideStyleInspector.tsx +1 -2
  493. package/corpus/templates/slides/app/components/editor/TweaksPanel.tsx +1 -1
  494. package/corpus/templates/slides/app/components/layout/Header.tsx +4 -2
  495. package/corpus/templates/slides/app/components/layout/Layout.tsx +1 -1
  496. package/corpus/templates/slides/app/components/layout/Sidebar.tsx +5 -5
  497. package/corpus/templates/slides/app/components/visual-editor/CanvasCommentPins.tsx +6 -6
  498. package/corpus/templates/slides/app/components/visual-editor/DrawOverlay.tsx +7 -7
  499. package/corpus/templates/slides/app/pages/DeckEditor.tsx +3 -3
  500. package/corpus/templates/slides/app/pages/DesignSystems.tsx +5 -5
  501. package/corpus/templates/slides/app/pages/Index.tsx +18 -15
  502. package/corpus/templates/slides/app/root.tsx +3 -3
  503. package/corpus/templates/slides/app/routes/settings.tsx +5 -5
  504. package/corpus/templates/slides/package.json +1 -0
  505. package/dist/application-state/emitter.d.ts +9 -2
  506. package/dist/application-state/emitter.d.ts.map +1 -1
  507. package/dist/application-state/emitter.js +25 -3
  508. package/dist/application-state/emitter.js.map +1 -1
  509. package/dist/cli/create.d.ts +2 -1
  510. package/dist/cli/create.d.ts.map +1 -1
  511. package/dist/cli/create.js +52 -4
  512. package/dist/cli/create.js.map +1 -1
  513. package/dist/cli/workspacify.d.ts +2 -0
  514. package/dist/cli/workspacify.d.ts.map +1 -1
  515. package/dist/cli/workspacify.js +8 -4
  516. package/dist/cli/workspacify.js.map +1 -1
  517. package/dist/client/components/ui/dialog.d.ts +1 -13
  518. package/dist/client/components/ui/dialog.d.ts.map +1 -1
  519. package/dist/client/components/ui/dialog.js +1 -20
  520. package/dist/client/components/ui/dialog.js.map +1 -1
  521. package/dist/client/components/ui/dropdown-menu.d.ts +1 -27
  522. package/dist/client/components/ui/dropdown-menu.d.ts.map +1 -1
  523. package/dist/client/components/ui/dropdown-menu.js +1 -33
  524. package/dist/client/components/ui/dropdown-menu.js.map +1 -1
  525. package/dist/client/components/ui/hover-card.d.ts +1 -6
  526. package/dist/client/components/ui/hover-card.d.ts.map +1 -1
  527. package/dist/client/components/ui/hover-card.js +1 -9
  528. package/dist/client/components/ui/hover-card.js.map +1 -1
  529. package/dist/client/components/ui/popover.d.ts +1 -7
  530. package/dist/client/components/ui/popover.d.ts.map +1 -1
  531. package/dist/client/components/ui/popover.js +1 -10
  532. package/dist/client/components/ui/popover.js.map +1 -1
  533. package/dist/client/components/ui/sheet.d.ts +1 -15
  534. package/dist/client/components/ui/sheet.d.ts.map +1 -1
  535. package/dist/client/components/ui/sheet.js +1 -22
  536. package/dist/client/components/ui/sheet.js.map +1 -1
  537. package/dist/client/components/ui/tooltip.d.ts +1 -8
  538. package/dist/client/components/ui/tooltip.d.ts.map +1 -1
  539. package/dist/client/components/ui/tooltip.js +1 -17
  540. package/dist/client/components/ui/tooltip.js.map +1 -1
  541. package/dist/notifications/routes.d.ts +1 -1
  542. package/dist/resources/handlers.d.ts +1 -1
  543. package/dist/secrets/crypto.d.ts.map +1 -1
  544. package/dist/secrets/crypto.js +37 -4
  545. package/dist/secrets/crypto.js.map +1 -1
  546. package/dist/server/agent-access.d.ts +16 -0
  547. package/dist/server/agent-access.d.ts.map +1 -0
  548. package/dist/server/agent-access.js +25 -0
  549. package/dist/server/agent-access.js.map +1 -0
  550. package/dist/server/h3-helpers.d.ts.map +1 -1
  551. package/dist/server/h3-helpers.js +12 -2
  552. package/dist/server/h3-helpers.js.map +1 -1
  553. package/dist/server/index.d.ts +1 -0
  554. package/dist/server/index.d.ts.map +1 -1
  555. package/dist/server/index.js +1 -0
  556. package/dist/server/index.js.map +1 -1
  557. package/dist/server/request-context.d.ts +17 -0
  558. package/dist/server/request-context.d.ts.map +1 -1
  559. package/dist/server/request-context.js +46 -6
  560. package/dist/server/request-context.js.map +1 -1
  561. package/dist/server/transcribe-voice.d.ts +1 -1
  562. package/dist/shared/agent-access.d.ts +29 -0
  563. package/dist/shared/agent-access.d.ts.map +1 -0
  564. package/dist/shared/agent-access.js +57 -0
  565. package/dist/shared/agent-access.js.map +1 -0
  566. package/dist/shared/index.d.ts +1 -0
  567. package/dist/shared/index.d.ts.map +1 -1
  568. package/dist/shared/index.js +1 -0
  569. package/dist/shared/index.js.map +1 -1
  570. package/docs/content/components.mdx +13 -0
  571. package/docs/content/creating-templates.mdx +7 -0
  572. package/docs/content/locales/ar-SA/components.mdx +9 -0
  573. package/docs/content/locales/ar-SA/creating-templates.mdx +2 -0
  574. package/docs/content/locales/ar-SA/template-analytics.mdx +6 -0
  575. package/docs/content/locales/ar-SA/template-clips.mdx +7 -0
  576. package/docs/content/locales/ar-SA/tracking.mdx +6 -0
  577. package/docs/content/locales/de-DE/components.mdx +9 -0
  578. package/docs/content/locales/de-DE/creating-templates.mdx +2 -0
  579. package/docs/content/locales/de-DE/template-analytics.mdx +6 -0
  580. package/docs/content/locales/de-DE/template-clips.mdx +7 -0
  581. package/docs/content/locales/de-DE/tracking.mdx +6 -0
  582. package/docs/content/locales/es-ES/components.mdx +9 -0
  583. package/docs/content/locales/es-ES/creating-templates.mdx +2 -0
  584. package/docs/content/locales/es-ES/template-analytics.mdx +6 -0
  585. package/docs/content/locales/es-ES/template-clips.mdx +7 -0
  586. package/docs/content/locales/es-ES/tracking.mdx +6 -0
  587. package/docs/content/locales/fr-FR/components.mdx +9 -0
  588. package/docs/content/locales/fr-FR/creating-templates.mdx +2 -0
  589. package/docs/content/locales/fr-FR/template-analytics.mdx +6 -0
  590. package/docs/content/locales/fr-FR/template-clips.mdx +7 -0
  591. package/docs/content/locales/fr-FR/tracking.mdx +6 -0
  592. package/docs/content/locales/hi-IN/components.mdx +9 -0
  593. package/docs/content/locales/hi-IN/creating-templates.mdx +2 -0
  594. package/docs/content/locales/hi-IN/template-analytics.mdx +6 -0
  595. package/docs/content/locales/hi-IN/template-clips.mdx +7 -0
  596. package/docs/content/locales/hi-IN/tracking.mdx +6 -0
  597. package/docs/content/locales/ja-JP/components.mdx +9 -0
  598. package/docs/content/locales/ja-JP/creating-templates.mdx +2 -0
  599. package/docs/content/locales/ja-JP/template-analytics.mdx +6 -0
  600. package/docs/content/locales/ja-JP/template-clips.mdx +7 -0
  601. package/docs/content/locales/ja-JP/tracking.mdx +6 -0
  602. package/docs/content/locales/ko-KR/components.mdx +9 -0
  603. package/docs/content/locales/ko-KR/creating-templates.mdx +2 -0
  604. package/docs/content/locales/ko-KR/template-analytics.mdx +6 -0
  605. package/docs/content/locales/ko-KR/template-clips.mdx +7 -0
  606. package/docs/content/locales/ko-KR/tracking.mdx +6 -0
  607. package/docs/content/locales/pt-BR/components.mdx +9 -0
  608. package/docs/content/locales/pt-BR/creating-templates.mdx +2 -0
  609. package/docs/content/locales/pt-BR/template-analytics.mdx +6 -0
  610. package/docs/content/locales/pt-BR/template-clips.mdx +7 -0
  611. package/docs/content/locales/pt-BR/tracking.mdx +6 -0
  612. package/docs/content/locales/zh-CN/components.mdx +9 -0
  613. package/docs/content/locales/zh-CN/creating-templates.mdx +2 -0
  614. package/docs/content/locales/zh-CN/template-analytics.mdx +6 -0
  615. package/docs/content/locales/zh-CN/template-clips.mdx +7 -0
  616. package/docs/content/locales/zh-CN/tracking.mdx +6 -0
  617. package/docs/content/locales/zh-TW/components.mdx +9 -0
  618. package/docs/content/locales/zh-TW/creating-templates.mdx +2 -0
  619. package/docs/content/locales/zh-TW/template-analytics.mdx +6 -0
  620. package/docs/content/locales/zh-TW/template-clips.mdx +7 -0
  621. package/docs/content/locales/zh-TW/tracking.mdx +6 -0
  622. package/docs/content/template-analytics.mdx +6 -0
  623. package/docs/content/template-clips.mdx +7 -0
  624. package/docs/content/tracking.mdx +6 -0
  625. package/package.json +9 -2
  626. package/corpus/templates/analytics/app/components/ui/accordion.tsx +0 -56
  627. package/corpus/templates/analytics/app/components/ui/alert-dialog.tsx +0 -139
  628. package/corpus/templates/analytics/app/components/ui/alert.tsx +0 -59
  629. package/corpus/templates/analytics/app/components/ui/aspect-ratio.tsx +0 -5
  630. package/corpus/templates/analytics/app/components/ui/avatar.tsx +0 -48
  631. package/corpus/templates/analytics/app/components/ui/badge.tsx +0 -37
  632. package/corpus/templates/analytics/app/components/ui/breadcrumb.tsx +0 -115
  633. package/corpus/templates/analytics/app/components/ui/button.tsx +0 -57
  634. package/corpus/templates/analytics/app/components/ui/card.tsx +0 -86
  635. package/corpus/templates/analytics/app/components/ui/carousel.tsx +0 -260
  636. package/corpus/templates/analytics/app/components/ui/checkbox.tsx +0 -28
  637. package/corpus/templates/analytics/app/components/ui/collapsible.tsx +0 -9
  638. package/corpus/templates/analytics/app/components/ui/command.tsx +0 -154
  639. package/corpus/templates/analytics/app/components/ui/context-menu.tsx +0 -202
  640. package/corpus/templates/analytics/app/components/ui/date-picker.tsx +0 -68
  641. package/corpus/templates/analytics/app/components/ui/dialog.tsx +0 -130
  642. package/corpus/templates/analytics/app/components/ui/drawer.tsx +0 -116
  643. package/corpus/templates/analytics/app/components/ui/dropdown-menu.tsx +0 -212
  644. package/corpus/templates/analytics/app/components/ui/form.tsx +0 -177
  645. package/corpus/templates/analytics/app/components/ui/hover-card.tsx +0 -27
  646. package/corpus/templates/analytics/app/components/ui/input-otp.tsx +0 -69
  647. package/corpus/templates/analytics/app/components/ui/input.tsx +0 -22
  648. package/corpus/templates/analytics/app/components/ui/label.tsx +0 -24
  649. package/corpus/templates/analytics/app/components/ui/menubar.tsx +0 -234
  650. package/corpus/templates/analytics/app/components/ui/navigation-menu.tsx +0 -128
  651. package/corpus/templates/analytics/app/components/ui/pagination.tsx +0 -121
  652. package/corpus/templates/analytics/app/components/ui/popover.tsx +0 -44
  653. package/corpus/templates/analytics/app/components/ui/progress.tsx +0 -26
  654. package/corpus/templates/analytics/app/components/ui/radio-group.tsx +0 -42
  655. package/corpus/templates/analytics/app/components/ui/resizable.tsx +0 -43
  656. package/corpus/templates/analytics/app/components/ui/scroll-area.tsx +0 -46
  657. package/corpus/templates/analytics/app/components/ui/select.tsx +0 -158
  658. package/corpus/templates/analytics/app/components/ui/separator.tsx +0 -29
  659. package/corpus/templates/analytics/app/components/ui/sheet.tsx +0 -160
  660. package/corpus/templates/analytics/app/components/ui/sidebar.tsx +0 -782
  661. package/corpus/templates/analytics/app/components/ui/skeleton.tsx +0 -15
  662. package/corpus/templates/analytics/app/components/ui/slider.tsx +0 -26
  663. package/corpus/templates/analytics/app/components/ui/sonner.tsx +0 -58
  664. package/corpus/templates/analytics/app/components/ui/spinner.tsx +0 -17
  665. package/corpus/templates/analytics/app/components/ui/switch.tsx +0 -27
  666. package/corpus/templates/analytics/app/components/ui/table.tsx +0 -117
  667. package/corpus/templates/analytics/app/components/ui/tabs.tsx +0 -53
  668. package/corpus/templates/analytics/app/components/ui/textarea.tsx +0 -23
  669. package/corpus/templates/analytics/app/components/ui/toast.tsx +0 -127
  670. package/corpus/templates/analytics/app/components/ui/toaster.tsx +0 -33
  671. package/corpus/templates/analytics/app/components/ui/toggle-group.tsx +0 -59
  672. package/corpus/templates/analytics/app/components/ui/toggle.tsx +0 -43
  673. package/corpus/templates/analytics/app/components/ui/tooltip.tsx +0 -30
  674. package/corpus/templates/analytics/app/components/ui/use-toast.ts +0 -3
  675. package/corpus/templates/analytics/app/hooks/use-mobile.tsx +0 -21
  676. package/corpus/templates/analytics/app/hooks/use-toast.ts +0 -188
  677. package/corpus/templates/assets/app/components/layout/HeaderActions.tsx +0 -84
  678. package/corpus/templates/assets/app/components/ui/alert-dialog.tsx +0 -139
  679. package/corpus/templates/assets/app/components/ui/alert.tsx +0 -59
  680. package/corpus/templates/assets/app/components/ui/avatar.tsx +0 -48
  681. package/corpus/templates/assets/app/components/ui/badge.tsx +0 -37
  682. package/corpus/templates/assets/app/components/ui/breadcrumb.tsx +0 -115
  683. package/corpus/templates/assets/app/components/ui/button.tsx +0 -57
  684. package/corpus/templates/assets/app/components/ui/card.tsx +0 -86
  685. package/corpus/templates/assets/app/components/ui/checkbox.tsx +0 -28
  686. package/corpus/templates/assets/app/components/ui/dialog.tsx +0 -130
  687. package/corpus/templates/assets/app/components/ui/dropdown-menu.tsx +0 -212
  688. package/corpus/templates/assets/app/components/ui/hover-card.tsx +0 -27
  689. package/corpus/templates/assets/app/components/ui/input.tsx +0 -22
  690. package/corpus/templates/assets/app/components/ui/label.tsx +0 -24
  691. package/corpus/templates/assets/app/components/ui/pagination.tsx +0 -121
  692. package/corpus/templates/assets/app/components/ui/popover.tsx +0 -44
  693. package/corpus/templates/assets/app/components/ui/progress.tsx +0 -26
  694. package/corpus/templates/assets/app/components/ui/scroll-area.tsx +0 -46
  695. package/corpus/templates/assets/app/components/ui/select.tsx +0 -158
  696. package/corpus/templates/assets/app/components/ui/separator.tsx +0 -29
  697. package/corpus/templates/assets/app/components/ui/sheet.tsx +0 -160
  698. package/corpus/templates/assets/app/components/ui/skeleton.tsx +0 -15
  699. package/corpus/templates/assets/app/components/ui/slider.tsx +0 -26
  700. package/corpus/templates/assets/app/components/ui/sonner.tsx +0 -58
  701. package/corpus/templates/assets/app/components/ui/spinner.tsx +0 -17
  702. package/corpus/templates/assets/app/components/ui/table.tsx +0 -117
  703. package/corpus/templates/assets/app/components/ui/tabs.tsx +0 -53
  704. package/corpus/templates/assets/app/components/ui/tooltip.tsx +0 -30
  705. package/corpus/templates/brain/app/components/ui/badge.tsx +0 -37
  706. package/corpus/templates/brain/app/components/ui/button.tsx +0 -57
  707. package/corpus/templates/brain/app/components/ui/card.tsx +0 -86
  708. package/corpus/templates/brain/app/components/ui/input.tsx +0 -22
  709. package/corpus/templates/brain/app/components/ui/label.tsx +0 -24
  710. package/corpus/templates/brain/app/components/ui/progress.tsx +0 -26
  711. package/corpus/templates/brain/app/components/ui/select.tsx +0 -158
  712. package/corpus/templates/brain/app/components/ui/separator.tsx +0 -29
  713. package/corpus/templates/brain/app/components/ui/sheet.tsx +0 -160
  714. package/corpus/templates/brain/app/components/ui/skeleton.tsx +0 -15
  715. package/corpus/templates/brain/app/components/ui/sonner.tsx +0 -58
  716. package/corpus/templates/brain/app/components/ui/switch.tsx +0 -27
  717. package/corpus/templates/brain/app/components/ui/table.tsx +0 -117
  718. package/corpus/templates/brain/app/components/ui/textarea.tsx +0 -23
  719. package/corpus/templates/brain/app/components/ui/tooltip.tsx +0 -30
  720. package/corpus/templates/calendar/app/components/ui/accordion.tsx +0 -56
  721. package/corpus/templates/calendar/app/components/ui/alert-dialog.tsx +0 -139
  722. package/corpus/templates/calendar/app/components/ui/alert.tsx +0 -59
  723. package/corpus/templates/calendar/app/components/ui/aspect-ratio.tsx +0 -5
  724. package/corpus/templates/calendar/app/components/ui/avatar.tsx +0 -48
  725. package/corpus/templates/calendar/app/components/ui/badge.tsx +0 -37
  726. package/corpus/templates/calendar/app/components/ui/breadcrumb.tsx +0 -115
  727. package/corpus/templates/calendar/app/components/ui/button.tsx +0 -57
  728. package/corpus/templates/calendar/app/components/ui/calendar.tsx +0 -68
  729. package/corpus/templates/calendar/app/components/ui/card.tsx +0 -86
  730. package/corpus/templates/calendar/app/components/ui/carousel.tsx +0 -260
  731. package/corpus/templates/calendar/app/components/ui/chart.tsx +0 -375
  732. package/corpus/templates/calendar/app/components/ui/checkbox.tsx +0 -28
  733. package/corpus/templates/calendar/app/components/ui/collapsible.tsx +0 -9
  734. package/corpus/templates/calendar/app/components/ui/command.tsx +0 -154
  735. package/corpus/templates/calendar/app/components/ui/context-menu.tsx +0 -202
  736. package/corpus/templates/calendar/app/components/ui/dialog.tsx +0 -130
  737. package/corpus/templates/calendar/app/components/ui/drawer.tsx +0 -116
  738. package/corpus/templates/calendar/app/components/ui/dropdown-menu.tsx +0 -212
  739. package/corpus/templates/calendar/app/components/ui/form.tsx +0 -177
  740. package/corpus/templates/calendar/app/components/ui/hover-card.tsx +0 -27
  741. package/corpus/templates/calendar/app/components/ui/input-otp.tsx +0 -69
  742. package/corpus/templates/calendar/app/components/ui/input.tsx +0 -22
  743. package/corpus/templates/calendar/app/components/ui/label.tsx +0 -24
  744. package/corpus/templates/calendar/app/components/ui/menubar.tsx +0 -234
  745. package/corpus/templates/calendar/app/components/ui/navigation-menu.tsx +0 -128
  746. package/corpus/templates/calendar/app/components/ui/pagination.tsx +0 -121
  747. package/corpus/templates/calendar/app/components/ui/popover.tsx +0 -44
  748. package/corpus/templates/calendar/app/components/ui/progress.tsx +0 -26
  749. package/corpus/templates/calendar/app/components/ui/radio-group.tsx +0 -42
  750. package/corpus/templates/calendar/app/components/ui/resizable.tsx +0 -43
  751. package/corpus/templates/calendar/app/components/ui/scroll-area.tsx +0 -46
  752. package/corpus/templates/calendar/app/components/ui/select.tsx +0 -158
  753. package/corpus/templates/calendar/app/components/ui/separator.tsx +0 -29
  754. package/corpus/templates/calendar/app/components/ui/sheet.tsx +0 -160
  755. package/corpus/templates/calendar/app/components/ui/sidebar.tsx +0 -782
  756. package/corpus/templates/calendar/app/components/ui/skeleton.tsx +0 -15
  757. package/corpus/templates/calendar/app/components/ui/slider.tsx +0 -26
  758. package/corpus/templates/calendar/app/components/ui/spinner.tsx +0 -17
  759. package/corpus/templates/calendar/app/components/ui/switch.tsx +0 -27
  760. package/corpus/templates/calendar/app/components/ui/table.tsx +0 -117
  761. package/corpus/templates/calendar/app/components/ui/tabs.tsx +0 -53
  762. package/corpus/templates/calendar/app/components/ui/textarea.tsx +0 -23
  763. package/corpus/templates/calendar/app/components/ui/toast.tsx +0 -127
  764. package/corpus/templates/calendar/app/components/ui/toaster.tsx +0 -33
  765. package/corpus/templates/calendar/app/components/ui/toggle-group.tsx +0 -59
  766. package/corpus/templates/calendar/app/components/ui/toggle.tsx +0 -43
  767. package/corpus/templates/calendar/app/components/ui/tooltip.tsx +0 -30
  768. package/corpus/templates/calendar/app/components/ui/use-toast.ts +0 -3
  769. package/corpus/templates/calendar/app/hooks/use-mobile.tsx +0 -21
  770. package/corpus/templates/calendar/app/hooks/use-toast.ts +0 -188
  771. package/corpus/templates/chat/app/components/layout/HeaderActions.tsx +0 -84
  772. package/corpus/templates/chat/app/components/ui/accordion.tsx +0 -56
  773. package/corpus/templates/chat/app/components/ui/alert-dialog.tsx +0 -139
  774. package/corpus/templates/chat/app/components/ui/alert.tsx +0 -59
  775. package/corpus/templates/chat/app/components/ui/aspect-ratio.tsx +0 -5
  776. package/corpus/templates/chat/app/components/ui/avatar.tsx +0 -48
  777. package/corpus/templates/chat/app/components/ui/badge.tsx +0 -37
  778. package/corpus/templates/chat/app/components/ui/breadcrumb.tsx +0 -115
  779. package/corpus/templates/chat/app/components/ui/button.tsx +0 -57
  780. package/corpus/templates/chat/app/components/ui/calendar.tsx +0 -68
  781. package/corpus/templates/chat/app/components/ui/card.tsx +0 -86
  782. package/corpus/templates/chat/app/components/ui/carousel.tsx +0 -260
  783. package/corpus/templates/chat/app/components/ui/chart.tsx +0 -375
  784. package/corpus/templates/chat/app/components/ui/checkbox.tsx +0 -28
  785. package/corpus/templates/chat/app/components/ui/collapsible.tsx +0 -9
  786. package/corpus/templates/chat/app/components/ui/command.tsx +0 -154
  787. package/corpus/templates/chat/app/components/ui/context-menu.tsx +0 -202
  788. package/corpus/templates/chat/app/components/ui/dialog.tsx +0 -130
  789. package/corpus/templates/chat/app/components/ui/drawer.tsx +0 -116
  790. package/corpus/templates/chat/app/components/ui/dropdown-menu.tsx +0 -212
  791. package/corpus/templates/chat/app/components/ui/form.tsx +0 -177
  792. package/corpus/templates/chat/app/components/ui/hover-card.tsx +0 -27
  793. package/corpus/templates/chat/app/components/ui/input-otp.tsx +0 -69
  794. package/corpus/templates/chat/app/components/ui/input.tsx +0 -22
  795. package/corpus/templates/chat/app/components/ui/label.tsx +0 -24
  796. package/corpus/templates/chat/app/components/ui/menubar.tsx +0 -234
  797. package/corpus/templates/chat/app/components/ui/navigation-menu.tsx +0 -128
  798. package/corpus/templates/chat/app/components/ui/pagination.tsx +0 -121
  799. package/corpus/templates/chat/app/components/ui/popover.tsx +0 -44
  800. package/corpus/templates/chat/app/components/ui/progress.tsx +0 -26
  801. package/corpus/templates/chat/app/components/ui/radio-group.tsx +0 -42
  802. package/corpus/templates/chat/app/components/ui/resizable.tsx +0 -43
  803. package/corpus/templates/chat/app/components/ui/scroll-area.tsx +0 -46
  804. package/corpus/templates/chat/app/components/ui/select.tsx +0 -158
  805. package/corpus/templates/chat/app/components/ui/separator.tsx +0 -29
  806. package/corpus/templates/chat/app/components/ui/sheet.tsx +0 -160
  807. package/corpus/templates/chat/app/components/ui/sidebar.tsx +0 -782
  808. package/corpus/templates/chat/app/components/ui/skeleton.tsx +0 -15
  809. package/corpus/templates/chat/app/components/ui/slider.tsx +0 -26
  810. package/corpus/templates/chat/app/components/ui/sonner.tsx +0 -58
  811. package/corpus/templates/chat/app/components/ui/spinner.tsx +0 -17
  812. package/corpus/templates/chat/app/components/ui/switch.tsx +0 -27
  813. package/corpus/templates/chat/app/components/ui/table.tsx +0 -117
  814. package/corpus/templates/chat/app/components/ui/tabs.tsx +0 -53
  815. package/corpus/templates/chat/app/components/ui/textarea.tsx +0 -23
  816. package/corpus/templates/chat/app/components/ui/toast.tsx +0 -127
  817. package/corpus/templates/chat/app/components/ui/toaster.tsx +0 -33
  818. package/corpus/templates/chat/app/components/ui/toggle-group.tsx +0 -59
  819. package/corpus/templates/chat/app/components/ui/toggle.tsx +0 -43
  820. package/corpus/templates/chat/app/components/ui/tooltip.tsx +0 -30
  821. package/corpus/templates/chat/app/components/ui/use-toast.ts +0 -3
  822. package/corpus/templates/chat/app/hooks/use-mobile.tsx +0 -21
  823. package/corpus/templates/chat/app/hooks/use-toast.ts +0 -188
  824. package/corpus/templates/clips/app/components/layout/HeaderActions.tsx +0 -84
  825. package/corpus/templates/clips/app/components/ui/accordion.tsx +0 -56
  826. package/corpus/templates/clips/app/components/ui/alert-dialog.tsx +0 -139
  827. package/corpus/templates/clips/app/components/ui/alert.tsx +0 -59
  828. package/corpus/templates/clips/app/components/ui/aspect-ratio.tsx +0 -5
  829. package/corpus/templates/clips/app/components/ui/avatar.tsx +0 -48
  830. package/corpus/templates/clips/app/components/ui/badge.tsx +0 -37
  831. package/corpus/templates/clips/app/components/ui/breadcrumb.tsx +0 -115
  832. package/corpus/templates/clips/app/components/ui/button.tsx +0 -57
  833. package/corpus/templates/clips/app/components/ui/calendar.tsx +0 -68
  834. package/corpus/templates/clips/app/components/ui/card.tsx +0 -86
  835. package/corpus/templates/clips/app/components/ui/carousel.tsx +0 -260
  836. package/corpus/templates/clips/app/components/ui/chart.tsx +0 -375
  837. package/corpus/templates/clips/app/components/ui/checkbox.tsx +0 -28
  838. package/corpus/templates/clips/app/components/ui/collapsible.tsx +0 -9
  839. package/corpus/templates/clips/app/components/ui/command.tsx +0 -154
  840. package/corpus/templates/clips/app/components/ui/context-menu.tsx +0 -202
  841. package/corpus/templates/clips/app/components/ui/dialog.tsx +0 -130
  842. package/corpus/templates/clips/app/components/ui/drawer.tsx +0 -116
  843. package/corpus/templates/clips/app/components/ui/dropdown-menu.tsx +0 -212
  844. package/corpus/templates/clips/app/components/ui/form.tsx +0 -177
  845. package/corpus/templates/clips/app/components/ui/hover-card.tsx +0 -27
  846. package/corpus/templates/clips/app/components/ui/input-otp.tsx +0 -69
  847. package/corpus/templates/clips/app/components/ui/input.tsx +0 -22
  848. package/corpus/templates/clips/app/components/ui/label.tsx +0 -24
  849. package/corpus/templates/clips/app/components/ui/menubar.tsx +0 -234
  850. package/corpus/templates/clips/app/components/ui/navigation-menu.tsx +0 -128
  851. package/corpus/templates/clips/app/components/ui/pagination.tsx +0 -121
  852. package/corpus/templates/clips/app/components/ui/popover.tsx +0 -44
  853. package/corpus/templates/clips/app/components/ui/progress.tsx +0 -26
  854. package/corpus/templates/clips/app/components/ui/radio-group.tsx +0 -42
  855. package/corpus/templates/clips/app/components/ui/resizable.tsx +0 -43
  856. package/corpus/templates/clips/app/components/ui/scroll-area.tsx +0 -46
  857. package/corpus/templates/clips/app/components/ui/select.tsx +0 -158
  858. package/corpus/templates/clips/app/components/ui/separator.tsx +0 -29
  859. package/corpus/templates/clips/app/components/ui/sheet.tsx +0 -160
  860. package/corpus/templates/clips/app/components/ui/sidebar.tsx +0 -782
  861. package/corpus/templates/clips/app/components/ui/skeleton.tsx +0 -15
  862. package/corpus/templates/clips/app/components/ui/slider.tsx +0 -26
  863. package/corpus/templates/clips/app/components/ui/sonner.tsx +0 -58
  864. package/corpus/templates/clips/app/components/ui/spinner.tsx +0 -17
  865. package/corpus/templates/clips/app/components/ui/switch.tsx +0 -27
  866. package/corpus/templates/clips/app/components/ui/table.tsx +0 -117
  867. package/corpus/templates/clips/app/components/ui/tabs.tsx +0 -53
  868. package/corpus/templates/clips/app/components/ui/textarea.tsx +0 -23
  869. package/corpus/templates/clips/app/components/ui/toast.tsx +0 -127
  870. package/corpus/templates/clips/app/components/ui/toaster.tsx +0 -33
  871. package/corpus/templates/clips/app/components/ui/toggle-group.tsx +0 -59
  872. package/corpus/templates/clips/app/components/ui/toggle.tsx +0 -43
  873. package/corpus/templates/clips/app/components/ui/tooltip.tsx +0 -30
  874. package/corpus/templates/clips/app/components/ui/use-toast.ts +0 -3
  875. package/corpus/templates/clips/app/hooks/use-mobile.tsx +0 -21
  876. package/corpus/templates/clips/app/hooks/use-toast.ts +0 -188
  877. package/corpus/templates/content/app/components/layout/HeaderActions.tsx +0 -84
  878. package/corpus/templates/content/app/components/ui/alert-dialog.tsx +0 -139
  879. package/corpus/templates/content/app/components/ui/button.tsx +0 -57
  880. package/corpus/templates/content/app/components/ui/dialog.tsx +0 -130
  881. package/corpus/templates/content/app/components/ui/dropdown-menu.tsx +0 -212
  882. package/corpus/templates/content/app/components/ui/input.tsx +0 -22
  883. package/corpus/templates/content/app/components/ui/label.tsx +0 -24
  884. package/corpus/templates/content/app/components/ui/popover.tsx +0 -44
  885. package/corpus/templates/content/app/components/ui/separator.tsx +0 -29
  886. package/corpus/templates/content/app/components/ui/sheet.tsx +0 -160
  887. package/corpus/templates/content/app/components/ui/skeleton.tsx +0 -15
  888. package/corpus/templates/content/app/components/ui/sonner.tsx +0 -58
  889. package/corpus/templates/content/app/components/ui/spinner.tsx +0 -17
  890. package/corpus/templates/content/app/components/ui/table.tsx +0 -117
  891. package/corpus/templates/content/app/components/ui/toast.tsx +0 -127
  892. package/corpus/templates/content/app/components/ui/toaster.tsx +0 -33
  893. package/corpus/templates/content/app/components/ui/toggle.tsx +0 -43
  894. package/corpus/templates/content/app/components/ui/tooltip.tsx +0 -30
  895. package/corpus/templates/content/app/components/ui/use-toast.ts +0 -3
  896. package/corpus/templates/content/app/hooks/use-mobile.tsx +0 -21
  897. package/corpus/templates/content/app/hooks/use-toast.ts +0 -188
  898. package/corpus/templates/design/app/components/layout/HeaderActions.tsx +0 -84
  899. package/corpus/templates/design/app/components/ui/accordion.tsx +0 -56
  900. package/corpus/templates/design/app/components/ui/alert-dialog.tsx +0 -139
  901. package/corpus/templates/design/app/components/ui/alert.tsx +0 -59
  902. package/corpus/templates/design/app/components/ui/aspect-ratio.tsx +0 -5
  903. package/corpus/templates/design/app/components/ui/avatar.tsx +0 -48
  904. package/corpus/templates/design/app/components/ui/badge.tsx +0 -37
  905. package/corpus/templates/design/app/components/ui/breadcrumb.tsx +0 -115
  906. package/corpus/templates/design/app/components/ui/button.tsx +0 -57
  907. package/corpus/templates/design/app/components/ui/calendar.tsx +0 -68
  908. package/corpus/templates/design/app/components/ui/card.tsx +0 -86
  909. package/corpus/templates/design/app/components/ui/carousel.tsx +0 -260
  910. package/corpus/templates/design/app/components/ui/chart.tsx +0 -375
  911. package/corpus/templates/design/app/components/ui/checkbox.tsx +0 -28
  912. package/corpus/templates/design/app/components/ui/collapsible.tsx +0 -9
  913. package/corpus/templates/design/app/components/ui/command.tsx +0 -154
  914. package/corpus/templates/design/app/components/ui/context-menu.tsx +0 -202
  915. package/corpus/templates/design/app/components/ui/dialog.tsx +0 -130
  916. package/corpus/templates/design/app/components/ui/drawer.tsx +0 -116
  917. package/corpus/templates/design/app/components/ui/dropdown-menu.tsx +0 -212
  918. package/corpus/templates/design/app/components/ui/form.tsx +0 -177
  919. package/corpus/templates/design/app/components/ui/hover-card.tsx +0 -27
  920. package/corpus/templates/design/app/components/ui/input-otp.tsx +0 -69
  921. package/corpus/templates/design/app/components/ui/input.tsx +0 -22
  922. package/corpus/templates/design/app/components/ui/label.tsx +0 -24
  923. package/corpus/templates/design/app/components/ui/menubar.tsx +0 -234
  924. package/corpus/templates/design/app/components/ui/navigation-menu.tsx +0 -128
  925. package/corpus/templates/design/app/components/ui/pagination.tsx +0 -121
  926. package/corpus/templates/design/app/components/ui/popover.tsx +0 -44
  927. package/corpus/templates/design/app/components/ui/progress.tsx +0 -26
  928. package/corpus/templates/design/app/components/ui/radio-group.tsx +0 -42
  929. package/corpus/templates/design/app/components/ui/resizable.tsx +0 -43
  930. package/corpus/templates/design/app/components/ui/scroll-area.tsx +0 -46
  931. package/corpus/templates/design/app/components/ui/select.tsx +0 -158
  932. package/corpus/templates/design/app/components/ui/separator.tsx +0 -29
  933. package/corpus/templates/design/app/components/ui/sheet.tsx +0 -160
  934. package/corpus/templates/design/app/components/ui/sidebar.tsx +0 -782
  935. package/corpus/templates/design/app/components/ui/skeleton.tsx +0 -15
  936. package/corpus/templates/design/app/components/ui/slider.tsx +0 -26
  937. package/corpus/templates/design/app/components/ui/sonner.tsx +0 -58
  938. package/corpus/templates/design/app/components/ui/spinner.tsx +0 -17
  939. package/corpus/templates/design/app/components/ui/switch.tsx +0 -27
  940. package/corpus/templates/design/app/components/ui/table.tsx +0 -117
  941. package/corpus/templates/design/app/components/ui/tabs.tsx +0 -53
  942. package/corpus/templates/design/app/components/ui/textarea.tsx +0 -23
  943. package/corpus/templates/design/app/components/ui/toast.tsx +0 -127
  944. package/corpus/templates/design/app/components/ui/toaster.tsx +0 -33
  945. package/corpus/templates/design/app/components/ui/toggle-group.tsx +0 -59
  946. package/corpus/templates/design/app/components/ui/toggle.tsx +0 -43
  947. package/corpus/templates/design/app/components/ui/tooltip.tsx +0 -30
  948. package/corpus/templates/design/app/components/ui/use-toast.ts +0 -3
  949. package/corpus/templates/design/app/hooks/use-mobile.tsx +0 -21
  950. package/corpus/templates/design/app/hooks/use-toast.ts +0 -188
  951. package/corpus/templates/forms/app/components/layout/HeaderActions.tsx +0 -84
  952. package/corpus/templates/forms/app/components/ui/accordion.tsx +0 -56
  953. package/corpus/templates/forms/app/components/ui/alert-dialog.tsx +0 -139
  954. package/corpus/templates/forms/app/components/ui/alert.tsx +0 -59
  955. package/corpus/templates/forms/app/components/ui/aspect-ratio.tsx +0 -5
  956. package/corpus/templates/forms/app/components/ui/avatar.tsx +0 -48
  957. package/corpus/templates/forms/app/components/ui/badge.tsx +0 -37
  958. package/corpus/templates/forms/app/components/ui/breadcrumb.tsx +0 -115
  959. package/corpus/templates/forms/app/components/ui/button.tsx +0 -57
  960. package/corpus/templates/forms/app/components/ui/card.tsx +0 -86
  961. package/corpus/templates/forms/app/components/ui/carousel.tsx +0 -260
  962. package/corpus/templates/forms/app/components/ui/checkbox.tsx +0 -28
  963. package/corpus/templates/forms/app/components/ui/collapsible.tsx +0 -9
  964. package/corpus/templates/forms/app/components/ui/dialog.tsx +0 -130
  965. package/corpus/templates/forms/app/components/ui/drawer.tsx +0 -116
  966. package/corpus/templates/forms/app/components/ui/dropdown-menu.tsx +0 -212
  967. package/corpus/templates/forms/app/components/ui/form.tsx +0 -177
  968. package/corpus/templates/forms/app/components/ui/hover-card.tsx +0 -27
  969. package/corpus/templates/forms/app/components/ui/input-otp.tsx +0 -69
  970. package/corpus/templates/forms/app/components/ui/input.tsx +0 -22
  971. package/corpus/templates/forms/app/components/ui/label.tsx +0 -24
  972. package/corpus/templates/forms/app/components/ui/navigation-menu.tsx +0 -128
  973. package/corpus/templates/forms/app/components/ui/pagination.tsx +0 -121
  974. package/corpus/templates/forms/app/components/ui/popover.tsx +0 -44
  975. package/corpus/templates/forms/app/components/ui/progress.tsx +0 -26
  976. package/corpus/templates/forms/app/components/ui/radio-group.tsx +0 -42
  977. package/corpus/templates/forms/app/components/ui/resizable.tsx +0 -43
  978. package/corpus/templates/forms/app/components/ui/scroll-area.tsx +0 -46
  979. package/corpus/templates/forms/app/components/ui/select.tsx +0 -158
  980. package/corpus/templates/forms/app/components/ui/separator.tsx +0 -29
  981. package/corpus/templates/forms/app/components/ui/sheet.tsx +0 -160
  982. package/corpus/templates/forms/app/components/ui/sidebar.tsx +0 -782
  983. package/corpus/templates/forms/app/components/ui/skeleton.tsx +0 -15
  984. package/corpus/templates/forms/app/components/ui/slider.tsx +0 -26
  985. package/corpus/templates/forms/app/components/ui/sonner.tsx +0 -58
  986. package/corpus/templates/forms/app/components/ui/spinner.tsx +0 -17
  987. package/corpus/templates/forms/app/components/ui/switch.tsx +0 -27
  988. package/corpus/templates/forms/app/components/ui/table.tsx +0 -117
  989. package/corpus/templates/forms/app/components/ui/tabs.tsx +0 -53
  990. package/corpus/templates/forms/app/components/ui/textarea.tsx +0 -23
  991. package/corpus/templates/forms/app/components/ui/toast.tsx +0 -127
  992. package/corpus/templates/forms/app/components/ui/toaster.tsx +0 -33
  993. package/corpus/templates/forms/app/components/ui/toggle-group.tsx +0 -59
  994. package/corpus/templates/forms/app/components/ui/toggle.tsx +0 -43
  995. package/corpus/templates/forms/app/components/ui/tooltip.tsx +0 -30
  996. package/corpus/templates/forms/app/hooks/use-mobile.tsx +0 -21
  997. package/corpus/templates/forms/app/hooks/use-toast.ts +0 -188
  998. package/corpus/templates/macros/app/components/layout/HeaderActions.tsx +0 -84
  999. package/corpus/templates/macros/app/components/ui/accordion.tsx +0 -56
  1000. package/corpus/templates/macros/app/components/ui/alert-dialog.tsx +0 -139
  1001. package/corpus/templates/macros/app/components/ui/alert.tsx +0 -59
  1002. package/corpus/templates/macros/app/components/ui/aspect-ratio.tsx +0 -5
  1003. package/corpus/templates/macros/app/components/ui/avatar.tsx +0 -48
  1004. package/corpus/templates/macros/app/components/ui/badge.tsx +0 -37
  1005. package/corpus/templates/macros/app/components/ui/breadcrumb.tsx +0 -115
  1006. package/corpus/templates/macros/app/components/ui/chart.tsx +0 -375
  1007. package/corpus/templates/macros/app/components/ui/checkbox.tsx +0 -28
  1008. package/corpus/templates/macros/app/components/ui/collapsible.tsx +0 -9
  1009. package/corpus/templates/macros/app/components/ui/command.tsx +0 -154
  1010. package/corpus/templates/macros/app/components/ui/context-menu.tsx +0 -202
  1011. package/corpus/templates/macros/app/components/ui/drawer.tsx +0 -116
  1012. package/corpus/templates/macros/app/components/ui/dropdown-menu.tsx +0 -212
  1013. package/corpus/templates/macros/app/components/ui/form.tsx +0 -177
  1014. package/corpus/templates/macros/app/components/ui/hover-card.tsx +0 -27
  1015. package/corpus/templates/macros/app/components/ui/label.tsx +0 -24
  1016. package/corpus/templates/macros/app/components/ui/logo.tsx +0 -36
  1017. package/corpus/templates/macros/app/components/ui/navigation-menu.tsx +0 -128
  1018. package/corpus/templates/macros/app/components/ui/pagination.tsx +0 -121
  1019. package/corpus/templates/macros/app/components/ui/popover.tsx +0 -44
  1020. package/corpus/templates/macros/app/components/ui/radio-group.tsx +0 -42
  1021. package/corpus/templates/macros/app/components/ui/scroll-area.tsx +0 -46
  1022. package/corpus/templates/macros/app/components/ui/select.tsx +0 -158
  1023. package/corpus/templates/macros/app/components/ui/separator.tsx +0 -29
  1024. package/corpus/templates/macros/app/components/ui/sheet.tsx +0 -160
  1025. package/corpus/templates/macros/app/components/ui/skeleton.tsx +0 -15
  1026. package/corpus/templates/macros/app/components/ui/slider.tsx +0 -26
  1027. package/corpus/templates/macros/app/components/ui/sonner.tsx +0 -58
  1028. package/corpus/templates/macros/app/components/ui/switch.tsx +0 -27
  1029. package/corpus/templates/macros/app/components/ui/table.tsx +0 -117
  1030. package/corpus/templates/macros/app/components/ui/toast.tsx +0 -127
  1031. package/corpus/templates/macros/app/components/ui/toggle-group.tsx +0 -59
  1032. package/corpus/templates/macros/app/components/ui/toggle.tsx +0 -43
  1033. package/corpus/templates/macros/app/components/ui/tooltip.tsx +0 -30
  1034. package/corpus/templates/mail/app/components/ui/accordion.tsx +0 -56
  1035. package/corpus/templates/mail/app/components/ui/alert-dialog.tsx +0 -139
  1036. package/corpus/templates/mail/app/components/ui/alert.tsx +0 -59
  1037. package/corpus/templates/mail/app/components/ui/aspect-ratio.tsx +0 -5
  1038. package/corpus/templates/mail/app/components/ui/avatar.tsx +0 -48
  1039. package/corpus/templates/mail/app/components/ui/badge.tsx +0 -37
  1040. package/corpus/templates/mail/app/components/ui/breadcrumb.tsx +0 -115
  1041. package/corpus/templates/mail/app/components/ui/button.tsx +0 -57
  1042. package/corpus/templates/mail/app/components/ui/card.tsx +0 -86
  1043. package/corpus/templates/mail/app/components/ui/carousel.tsx +0 -260
  1044. package/corpus/templates/mail/app/components/ui/checkbox.tsx +0 -28
  1045. package/corpus/templates/mail/app/components/ui/collapsible.tsx +0 -9
  1046. package/corpus/templates/mail/app/components/ui/dialog.tsx +0 -130
  1047. package/corpus/templates/mail/app/components/ui/drawer.tsx +0 -116
  1048. package/corpus/templates/mail/app/components/ui/dropdown-menu.tsx +0 -212
  1049. package/corpus/templates/mail/app/components/ui/form.tsx +0 -177
  1050. package/corpus/templates/mail/app/components/ui/hover-card.tsx +0 -27
  1051. package/corpus/templates/mail/app/components/ui/input-otp.tsx +0 -69
  1052. package/corpus/templates/mail/app/components/ui/label.tsx +0 -24
  1053. package/corpus/templates/mail/app/components/ui/navigation-menu.tsx +0 -128
  1054. package/corpus/templates/mail/app/components/ui/pagination.tsx +0 -121
  1055. package/corpus/templates/mail/app/components/ui/popover.tsx +0 -44
  1056. package/corpus/templates/mail/app/components/ui/progress.tsx +0 -26
  1057. package/corpus/templates/mail/app/components/ui/radio-group.tsx +0 -42
  1058. package/corpus/templates/mail/app/components/ui/resizable.tsx +0 -43
  1059. package/corpus/templates/mail/app/components/ui/scroll-area.tsx +0 -46
  1060. package/corpus/templates/mail/app/components/ui/select.tsx +0 -158
  1061. package/corpus/templates/mail/app/components/ui/separator.tsx +0 -29
  1062. package/corpus/templates/mail/app/components/ui/sheet.tsx +0 -160
  1063. package/corpus/templates/mail/app/components/ui/sidebar.tsx +0 -782
  1064. package/corpus/templates/mail/app/components/ui/skeleton.tsx +0 -15
  1065. package/corpus/templates/mail/app/components/ui/slider.tsx +0 -26
  1066. package/corpus/templates/mail/app/components/ui/spinner.tsx +0 -17
  1067. package/corpus/templates/mail/app/components/ui/switch.tsx +0 -27
  1068. package/corpus/templates/mail/app/components/ui/table.tsx +0 -117
  1069. package/corpus/templates/mail/app/components/ui/tabs.tsx +0 -53
  1070. package/corpus/templates/mail/app/components/ui/toast.tsx +0 -127
  1071. package/corpus/templates/mail/app/components/ui/toaster.tsx +0 -33
  1072. package/corpus/templates/mail/app/components/ui/toggle-group.tsx +0 -59
  1073. package/corpus/templates/mail/app/components/ui/toggle.tsx +0 -43
  1074. package/corpus/templates/mail/app/components/ui/tooltip.tsx +0 -30
  1075. package/corpus/templates/mail/app/hooks/use-toast.ts +0 -188
  1076. package/corpus/templates/plan/app/components/layout/HeaderActions.tsx +0 -84
  1077. package/corpus/templates/plan/app/components/ui/accordion.tsx +0 -56
  1078. package/corpus/templates/plan/app/components/ui/alert-dialog.tsx +0 -139
  1079. package/corpus/templates/plan/app/components/ui/alert.tsx +0 -59
  1080. package/corpus/templates/plan/app/components/ui/aspect-ratio.tsx +0 -5
  1081. package/corpus/templates/plan/app/components/ui/avatar.tsx +0 -48
  1082. package/corpus/templates/plan/app/components/ui/badge.tsx +0 -37
  1083. package/corpus/templates/plan/app/components/ui/breadcrumb.tsx +0 -115
  1084. package/corpus/templates/plan/app/components/ui/button.tsx +0 -57
  1085. package/corpus/templates/plan/app/components/ui/calendar.tsx +0 -68
  1086. package/corpus/templates/plan/app/components/ui/card.tsx +0 -86
  1087. package/corpus/templates/plan/app/components/ui/carousel.tsx +0 -260
  1088. package/corpus/templates/plan/app/components/ui/chart.tsx +0 -375
  1089. package/corpus/templates/plan/app/components/ui/checkbox.tsx +0 -28
  1090. package/corpus/templates/plan/app/components/ui/collapsible.tsx +0 -9
  1091. package/corpus/templates/plan/app/components/ui/command.tsx +0 -154
  1092. package/corpus/templates/plan/app/components/ui/context-menu.tsx +0 -202
  1093. package/corpus/templates/plan/app/components/ui/dialog.tsx +0 -130
  1094. package/corpus/templates/plan/app/components/ui/drawer.tsx +0 -116
  1095. package/corpus/templates/plan/app/components/ui/dropdown-menu.tsx +0 -212
  1096. package/corpus/templates/plan/app/components/ui/form.tsx +0 -177
  1097. package/corpus/templates/plan/app/components/ui/hover-card.tsx +0 -27
  1098. package/corpus/templates/plan/app/components/ui/input-otp.tsx +0 -69
  1099. package/corpus/templates/plan/app/components/ui/input.tsx +0 -22
  1100. package/corpus/templates/plan/app/components/ui/label.tsx +0 -24
  1101. package/corpus/templates/plan/app/components/ui/menubar.tsx +0 -234
  1102. package/corpus/templates/plan/app/components/ui/navigation-menu.tsx +0 -128
  1103. package/corpus/templates/plan/app/components/ui/pagination.tsx +0 -121
  1104. package/corpus/templates/plan/app/components/ui/popover.tsx +0 -44
  1105. package/corpus/templates/plan/app/components/ui/progress.tsx +0 -26
  1106. package/corpus/templates/plan/app/components/ui/radio-group.tsx +0 -42
  1107. package/corpus/templates/plan/app/components/ui/resizable.tsx +0 -43
  1108. package/corpus/templates/plan/app/components/ui/scroll-area.tsx +0 -46
  1109. package/corpus/templates/plan/app/components/ui/select.tsx +0 -158
  1110. package/corpus/templates/plan/app/components/ui/separator.tsx +0 -29
  1111. package/corpus/templates/plan/app/components/ui/sheet.tsx +0 -160
  1112. package/corpus/templates/plan/app/components/ui/sidebar.tsx +0 -782
  1113. package/corpus/templates/plan/app/components/ui/skeleton.tsx +0 -15
  1114. package/corpus/templates/plan/app/components/ui/slider.tsx +0 -26
  1115. package/corpus/templates/plan/app/components/ui/sonner.tsx +0 -58
  1116. package/corpus/templates/plan/app/components/ui/spinner.tsx +0 -17
  1117. package/corpus/templates/plan/app/components/ui/switch.tsx +0 -27
  1118. package/corpus/templates/plan/app/components/ui/table.tsx +0 -117
  1119. package/corpus/templates/plan/app/components/ui/textarea.tsx +0 -23
  1120. package/corpus/templates/plan/app/components/ui/toast.tsx +0 -127
  1121. package/corpus/templates/plan/app/components/ui/toaster.tsx +0 -33
  1122. package/corpus/templates/plan/app/components/ui/toggle-group.tsx +0 -59
  1123. package/corpus/templates/plan/app/components/ui/toggle.tsx +0 -43
  1124. package/corpus/templates/plan/app/components/ui/tooltip.tsx +0 -30
  1125. package/corpus/templates/plan/app/components/ui/use-toast.ts +0 -3
  1126. package/corpus/templates/plan/app/hooks/use-mobile.tsx +0 -21
  1127. package/corpus/templates/plan/app/hooks/use-toast.ts +0 -188
  1128. package/corpus/templates/slides/app/components/layout/HeaderActions.tsx +0 -84
  1129. package/corpus/templates/slides/app/components/ui/accordion.tsx +0 -56
  1130. package/corpus/templates/slides/app/components/ui/alert-dialog.tsx +0 -139
  1131. package/corpus/templates/slides/app/components/ui/alert.tsx +0 -59
  1132. package/corpus/templates/slides/app/components/ui/aspect-ratio.tsx +0 -5
  1133. package/corpus/templates/slides/app/components/ui/avatar.tsx +0 -48
  1134. package/corpus/templates/slides/app/components/ui/badge.tsx +0 -37
  1135. package/corpus/templates/slides/app/components/ui/breadcrumb.tsx +0 -115
  1136. package/corpus/templates/slides/app/components/ui/button.tsx +0 -57
  1137. package/corpus/templates/slides/app/components/ui/calendar.tsx +0 -68
  1138. package/corpus/templates/slides/app/components/ui/card.tsx +0 -86
  1139. package/corpus/templates/slides/app/components/ui/carousel.tsx +0 -260
  1140. package/corpus/templates/slides/app/components/ui/chart.tsx +0 -375
  1141. package/corpus/templates/slides/app/components/ui/checkbox.tsx +0 -28
  1142. package/corpus/templates/slides/app/components/ui/collapsible.tsx +0 -9
  1143. package/corpus/templates/slides/app/components/ui/command.tsx +0 -154
  1144. package/corpus/templates/slides/app/components/ui/context-menu.tsx +0 -202
  1145. package/corpus/templates/slides/app/components/ui/dialog.tsx +0 -130
  1146. package/corpus/templates/slides/app/components/ui/drawer.tsx +0 -116
  1147. package/corpus/templates/slides/app/components/ui/dropdown-menu.tsx +0 -212
  1148. package/corpus/templates/slides/app/components/ui/form.tsx +0 -177
  1149. package/corpus/templates/slides/app/components/ui/hover-card.tsx +0 -27
  1150. package/corpus/templates/slides/app/components/ui/input-otp.tsx +0 -69
  1151. package/corpus/templates/slides/app/components/ui/input.tsx +0 -22
  1152. package/corpus/templates/slides/app/components/ui/label.tsx +0 -24
  1153. package/corpus/templates/slides/app/components/ui/menubar.tsx +0 -234
  1154. package/corpus/templates/slides/app/components/ui/navigation-menu.tsx +0 -128
  1155. package/corpus/templates/slides/app/components/ui/pagination.tsx +0 -121
  1156. package/corpus/templates/slides/app/components/ui/popover.tsx +0 -44
  1157. package/corpus/templates/slides/app/components/ui/progress.tsx +0 -26
  1158. package/corpus/templates/slides/app/components/ui/radio-group.tsx +0 -42
  1159. package/corpus/templates/slides/app/components/ui/resizable.tsx +0 -43
  1160. package/corpus/templates/slides/app/components/ui/scroll-area.tsx +0 -46
  1161. package/corpus/templates/slides/app/components/ui/select.tsx +0 -158
  1162. package/corpus/templates/slides/app/components/ui/separator.tsx +0 -29
  1163. package/corpus/templates/slides/app/components/ui/sheet.tsx +0 -160
  1164. package/corpus/templates/slides/app/components/ui/sidebar.tsx +0 -782
  1165. package/corpus/templates/slides/app/components/ui/skeleton.tsx +0 -15
  1166. package/corpus/templates/slides/app/components/ui/slider.tsx +0 -26
  1167. package/corpus/templates/slides/app/components/ui/sonner.tsx +0 -58
  1168. package/corpus/templates/slides/app/components/ui/spinner.tsx +0 -17
  1169. package/corpus/templates/slides/app/components/ui/switch.tsx +0 -27
  1170. package/corpus/templates/slides/app/components/ui/table.tsx +0 -117
  1171. package/corpus/templates/slides/app/components/ui/tabs.tsx +0 -53
  1172. package/corpus/templates/slides/app/components/ui/textarea.tsx +0 -23
  1173. package/corpus/templates/slides/app/components/ui/toast.tsx +0 -127
  1174. package/corpus/templates/slides/app/components/ui/toaster.tsx +0 -33
  1175. package/corpus/templates/slides/app/components/ui/toggle-group.tsx +0 -59
  1176. package/corpus/templates/slides/app/components/ui/toggle.tsx +0 -43
  1177. package/corpus/templates/slides/app/components/ui/tooltip.tsx +0 -30
  1178. package/corpus/templates/slides/app/components/ui/use-toast.ts +0 -3
  1179. package/corpus/templates/slides/app/hooks/use-mobile.tsx +0 -21
  1180. package/corpus/templates/slides/app/hooks/use-toast.ts +0 -188
@@ -15,16 +15,47 @@
15
15
  * Encrypted values are tagged `v1:<iv-hex>:<ct-hex>:<tag-hex>`. The `v1:` prefix
16
16
  * lets readers distinguish ciphertext from legacy plaintext during migration.
17
17
  */
18
- import { randomBytes, createCipheriv, createDecipheriv, createHash, } from "node:crypto";
18
+ function getNodeCrypto() {
19
+ if (typeof window !== "undefined" ||
20
+ typeof process === "undefined" ||
21
+ !process.versions?.node ||
22
+ typeof process.getBuiltinModule !== "function") {
23
+ return undefined;
24
+ }
25
+ return process.getBuiltinModule("node:crypto");
26
+ }
27
+ const nodeCrypto = getNodeCrypto();
19
28
  let _warnedFallback = false;
29
+ function requireNodeCrypto() {
30
+ if (!nodeCrypto) {
31
+ throw new Error("[agent-native/secrets] Secret encryption is only available in server/runtime code.");
32
+ }
33
+ return nodeCrypto;
34
+ }
35
+ function processNodeEnv() {
36
+ if (typeof process === "undefined")
37
+ return undefined;
38
+ return process.env.NODE_ENV;
39
+ }
40
+ function processCwd() {
41
+ if (typeof process === "undefined")
42
+ return ".";
43
+ return process.cwd();
44
+ }
20
45
  /**
21
46
  * Derive a 32-byte AES key from the configured secret material via SHA-256.
22
47
  * Re-derived per call (cheap, stateless, and makes rotation easy).
23
48
  */
24
49
  export function getSecretEncryptionKey() {
25
- const explicit = process.env.SECRETS_ENCRYPTION_KEY || process.env.BETTER_AUTH_SECRET;
50
+ const { createHash } = requireNodeCrypto();
51
+ const explicit = (typeof process === "undefined"
52
+ ? undefined
53
+ : process.env.SECRETS_ENCRYPTION_KEY) ||
54
+ (typeof process === "undefined"
55
+ ? undefined
56
+ : process.env.BETTER_AUTH_SECRET);
26
57
  if (!explicit) {
27
- if (process.env.NODE_ENV === "production") {
58
+ if (processNodeEnv() === "production") {
28
59
  throw new Error("[agent-native/secrets] Refusing to start in production without an encryption key. " +
29
60
  "Set SECRETS_ENCRYPTION_KEY (preferred) or BETTER_AUTH_SECRET in the deploy environment. " +
30
61
  "The previous CWD-derived fallback was effectively static (e.g. `/var/task` on Lambda), " +
@@ -38,11 +69,12 @@ export function getSecretEncryptionKey() {
38
69
  "Production deploys without one of these env vars now hard-fail.");
39
70
  }
40
71
  }
41
- const material = explicit || `agent-native-secrets:${process.cwd()}`;
72
+ const material = explicit || `agent-native-secrets:${processCwd()}`;
42
73
  return createHash("sha256").update(material).digest();
43
74
  }
44
75
  /** Encrypt a plain-text value. Returns `v1:<iv-hex>:<ct-hex>:<tag-hex>`. */
45
76
  export function encryptSecretValue(plaintext) {
77
+ const { createCipheriv, randomBytes } = requireNodeCrypto();
46
78
  const key = getSecretEncryptionKey();
47
79
  const iv = randomBytes(12);
48
80
  const cipher = createCipheriv("aes-256-gcm", key, iv);
@@ -52,6 +84,7 @@ export function encryptSecretValue(plaintext) {
52
84
  }
53
85
  /** Decrypt a value produced by `encryptSecretValue`. Throws on tampering. */
54
86
  export function decryptSecretValue(encrypted) {
87
+ const { createDecipheriv } = requireNodeCrypto();
55
88
  if (!encrypted.startsWith("v1:")) {
56
89
  throw new Error("Unrecognised secret encoding");
57
90
  }
@@ -1 +1 @@
1
- {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src/secrets/crypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,WAAW,EACX,cAAc,EACd,gBAAgB,EAChB,UAAU,GACX,MAAM,aAAa,CAAC;AAErB,IAAI,eAAe,GAAG,KAAK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AAC","sourcesContent":["/**\n * Shared AES-256-GCM encryption for secret values at rest.\n *\n * Used by both the framework secrets vault (`app_secrets`) and per-user/per-org\n * credentials (`resolveCredential` / `saveCredential`, stored in `settings`) so\n * there is a single crypto implementation and a single key story.\n *\n * The encryption key is derived from `SECRETS_ENCRYPTION_KEY` (preferred) or the\n * existing `BETTER_AUTH_SECRET` env var (fallback so templates don't need a\n * second secret during development). In production we refuse to start without\n * one of them — a CWD-derived fallback would be effectively static (e.g.\n * `/var/task` on Lambda), so anyone with read access to the DB could decrypt\n * every secret.\n *\n * Encrypted values are tagged `v1:<iv-hex>:<ct-hex>:<tag-hex>`. The `v1:` prefix\n * lets readers distinguish ciphertext from legacy plaintext during migration.\n */\n\nimport {\n randomBytes,\n createCipheriv,\n createDecipheriv,\n createHash,\n} from \"node:crypto\";\n\nlet _warnedFallback = false;\n\n/**\n * Derive a 32-byte AES key from the configured secret material via SHA-256.\n * Re-derived per call (cheap, stateless, and makes rotation easy).\n */\nexport function getSecretEncryptionKey(): Buffer {\n const explicit =\n process.env.SECRETS_ENCRYPTION_KEY || process.env.BETTER_AUTH_SECRET;\n\n if (!explicit) {\n if (process.env.NODE_ENV === \"production\") {\n throw new Error(\n \"[agent-native/secrets] Refusing to start in production without an encryption key. \" +\n \"Set SECRETS_ENCRYPTION_KEY (preferred) or BETTER_AUTH_SECRET in the deploy environment. \" +\n \"The previous CWD-derived fallback was effectively static (e.g. `/var/task` on Lambda), \" +\n \"which means anyone with read access to the secrets table could decrypt every user's secrets.\",\n );\n }\n if (!_warnedFallback) {\n _warnedFallback = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"[agent-native/secrets] SECRETS_ENCRYPTION_KEY not set — using a machine-local fallback. \" +\n \"Set SECRETS_ENCRYPTION_KEY (or BETTER_AUTH_SECRET) for production. \" +\n \"Production deploys without one of these env vars now hard-fail.\",\n );\n }\n }\n\n const material = explicit || `agent-native-secrets:${process.cwd()}`;\n return createHash(\"sha256\").update(material).digest();\n}\n\n/** Encrypt a plain-text value. Returns `v1:<iv-hex>:<ct-hex>:<tag-hex>`. */\nexport function encryptSecretValue(plaintext: string): string {\n const key = getSecretEncryptionKey();\n const iv = randomBytes(12);\n const cipher = createCipheriv(\"aes-256-gcm\", key, iv);\n const ct = Buffer.concat([cipher.update(plaintext, \"utf8\"), cipher.final()]);\n const tag = cipher.getAuthTag();\n return `v1:${iv.toString(\"hex\")}:${ct.toString(\"hex\")}:${tag.toString(\"hex\")}`;\n}\n\n/** Decrypt a value produced by `encryptSecretValue`. Throws on tampering. */\nexport function decryptSecretValue(encrypted: string): string {\n if (!encrypted.startsWith(\"v1:\")) {\n throw new Error(\"Unrecognised secret encoding\");\n }\n const [, ivHex, ctHex, tagHex] = encrypted.split(\":\");\n if (!ivHex || !ctHex || !tagHex) {\n throw new Error(\"Corrupt secret payload\");\n }\n const key = getSecretEncryptionKey();\n const decipher = createDecipheriv(\n \"aes-256-gcm\",\n key,\n Buffer.from(ivHex, \"hex\"),\n );\n decipher.setAuthTag(Buffer.from(tagHex, \"hex\"));\n const pt = Buffer.concat([\n decipher.update(Buffer.from(ctHex, \"hex\")),\n decipher.final(),\n ]);\n return pt.toString(\"utf8\");\n}\n\n/**\n * Strict check for a value produced by `encryptSecretValue`: `v1:` followed by\n * three hex segments. Intentionally strict so a legacy plaintext credential\n * that merely happens to start with `v1:` is treated as plaintext (and read via\n * the legacy fallback) rather than mis-decrypted.\n */\nconst ENCRYPTED_VALUE_RE = /^v1:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+$/;\n\nexport function isEncryptedSecretValue(value: unknown): value is string {\n return typeof value === \"string\" && ENCRYPTED_VALUE_RE.test(value);\n}\n"]}
1
+ {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../src/secrets/crypto.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,SAAS,aAAa;IACpB,IACE,OAAO,MAAM,KAAK,WAAW;QAC7B,OAAO,OAAO,KAAK,WAAW;QAC9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;QACjC,MAAM,IAAI,KAAK,CAAC,8BAA8B,CAAC,CAAC;IAClD,CAAC;IACD,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,GAAG,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAC5C,CAAC;IACD,MAAM,GAAG,GAAG,sBAAsB,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,gBAAgB,CAC/B,aAAa,EACb,GAAG,EACH,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAC1B,CAAC;IACF,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;IAChD,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC;QACvB,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC1C,QAAQ,CAAC,KAAK,EAAE;KACjB,CAAC,CAAC;IACH,OAAO,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;AAC7B,CAAC;AAED;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,oCAAoC,CAAC;AAEhE,MAAM,UAAU,sBAAsB,CAAC,KAAc;IACnD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,kBAAkB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACrE,CAAC","sourcesContent":["/**\n * Shared AES-256-GCM encryption for secret values at rest.\n *\n * Used by both the framework secrets vault (`app_secrets`) and per-user/per-org\n * credentials (`resolveCredential` / `saveCredential`, stored in `settings`) so\n * there is a single crypto implementation and a single key story.\n *\n * The encryption key is derived from `SECRETS_ENCRYPTION_KEY` (preferred) or the\n * existing `BETTER_AUTH_SECRET` env var (fallback so templates don't need a\n * second secret during development). In production we refuse to start without\n * one of them — a CWD-derived fallback would be effectively static (e.g.\n * `/var/task` on Lambda), so anyone with read access to the DB could decrypt\n * every secret.\n *\n * Encrypted values are tagged `v1:<iv-hex>:<ct-hex>:<tag-hex>`. The `v1:` prefix\n * lets readers distinguish ciphertext from legacy plaintext during migration.\n */\n\ntype NodeCryptoModule = typeof import(\"node:crypto\");\n\nfunction getNodeCrypto(): NodeCryptoModule | undefined {\n if (\n typeof window !== \"undefined\" ||\n typeof process === \"undefined\" ||\n !process.versions?.node ||\n typeof process.getBuiltinModule !== \"function\"\n ) {\n return undefined;\n }\n return process.getBuiltinModule(\"node:crypto\") as\n | NodeCryptoModule\n | undefined;\n}\n\nconst nodeCrypto = getNodeCrypto();\n\nlet _warnedFallback = false;\n\nfunction requireNodeCrypto(): NonNullable<typeof nodeCrypto> {\n if (!nodeCrypto) {\n throw new Error(\n \"[agent-native/secrets] Secret encryption is only available in server/runtime code.\",\n );\n }\n return nodeCrypto;\n}\n\nfunction processNodeEnv(): string | undefined {\n if (typeof process === \"undefined\") return undefined;\n return process.env.NODE_ENV;\n}\n\nfunction processCwd(): string {\n if (typeof process === \"undefined\") return \".\";\n return process.cwd();\n}\n\n/**\n * Derive a 32-byte AES key from the configured secret material via SHA-256.\n * Re-derived per call (cheap, stateless, and makes rotation easy).\n */\nexport function getSecretEncryptionKey(): Buffer {\n const { createHash } = requireNodeCrypto();\n const explicit =\n (typeof process === \"undefined\"\n ? undefined\n : process.env.SECRETS_ENCRYPTION_KEY) ||\n (typeof process === \"undefined\"\n ? undefined\n : process.env.BETTER_AUTH_SECRET);\n\n if (!explicit) {\n if (processNodeEnv() === \"production\") {\n throw new Error(\n \"[agent-native/secrets] Refusing to start in production without an encryption key. \" +\n \"Set SECRETS_ENCRYPTION_KEY (preferred) or BETTER_AUTH_SECRET in the deploy environment. \" +\n \"The previous CWD-derived fallback was effectively static (e.g. `/var/task` on Lambda), \" +\n \"which means anyone with read access to the secrets table could decrypt every user's secrets.\",\n );\n }\n if (!_warnedFallback) {\n _warnedFallback = true;\n // eslint-disable-next-line no-console\n console.warn(\n \"[agent-native/secrets] SECRETS_ENCRYPTION_KEY not set — using a machine-local fallback. \" +\n \"Set SECRETS_ENCRYPTION_KEY (or BETTER_AUTH_SECRET) for production. \" +\n \"Production deploys without one of these env vars now hard-fail.\",\n );\n }\n }\n\n const material = explicit || `agent-native-secrets:${processCwd()}`;\n return createHash(\"sha256\").update(material).digest();\n}\n\n/** Encrypt a plain-text value. Returns `v1:<iv-hex>:<ct-hex>:<tag-hex>`. */\nexport function encryptSecretValue(plaintext: string): string {\n const { createCipheriv, randomBytes } = requireNodeCrypto();\n const key = getSecretEncryptionKey();\n const iv = randomBytes(12);\n const cipher = createCipheriv(\"aes-256-gcm\", key, iv);\n const ct = Buffer.concat([cipher.update(plaintext, \"utf8\"), cipher.final()]);\n const tag = cipher.getAuthTag();\n return `v1:${iv.toString(\"hex\")}:${ct.toString(\"hex\")}:${tag.toString(\"hex\")}`;\n}\n\n/** Decrypt a value produced by `encryptSecretValue`. Throws on tampering. */\nexport function decryptSecretValue(encrypted: string): string {\n const { createDecipheriv } = requireNodeCrypto();\n if (!encrypted.startsWith(\"v1:\")) {\n throw new Error(\"Unrecognised secret encoding\");\n }\n const [, ivHex, ctHex, tagHex] = encrypted.split(\":\");\n if (!ivHex || !ctHex || !tagHex) {\n throw new Error(\"Corrupt secret payload\");\n }\n const key = getSecretEncryptionKey();\n const decipher = createDecipheriv(\n \"aes-256-gcm\",\n key,\n Buffer.from(ivHex, \"hex\"),\n );\n decipher.setAuthTag(Buffer.from(tagHex, \"hex\"));\n const pt = Buffer.concat([\n decipher.update(Buffer.from(ctHex, \"hex\")),\n decipher.final(),\n ]);\n return pt.toString(\"utf8\");\n}\n\n/**\n * Strict check for a value produced by `encryptSecretValue`: `v1:` followed by\n * three hex segments. Intentionally strict so a legacy plaintext credential\n * that merely happens to start with `v1:` is treated as plaintext (and read via\n * the legacy fallback) rather than mis-decrypted.\n */\nconst ENCRYPTED_VALUE_RE = /^v1:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+$/;\n\nexport function isEncryptedSecretValue(value: unknown): value is string {\n return typeof value === \"string\" && ENCRYPTED_VALUE_RE.test(value);\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { type AgentAccessResourceScope } from "../shared/agent-access.js";
2
+ import { type VerifyResult } from "./short-lived-token.js";
3
+ export { AGENT_ACCESS_PARAM, DEFAULT_AGENT_ACCESS_TTL_SECONDS, appendAgentAccessParam, buildAgentAccessApiUrl, buildAgentAccessUrl, normalizeAgentAccessBasePath, normalizeAgentAccessOrigin, scopedAgentAccessResourceId, toAgentAccessUrl, type AgentAccessApiUrlOptions, type AgentAccessResourceScope, type AgentAccessUrlOptions, } from "../shared/agent-access.js";
4
+ export interface ScopedAgentAccessTokenOptions extends AgentAccessResourceScope {
5
+ viewerEmail?: string;
6
+ ttlSeconds?: number;
7
+ }
8
+ export interface ScopedAgentAccessGrant {
9
+ token: string;
10
+ expiresAt: string;
11
+ ttlSeconds: number;
12
+ }
13
+ export declare function signScopedAgentAccessToken({ resourceKind, resourceId, viewerEmail, ttlSeconds, }: ScopedAgentAccessTokenOptions): string;
14
+ export declare function verifyScopedAgentAccessToken(token: string, scope: AgentAccessResourceScope): VerifyResult;
15
+ export declare function createScopedAgentAccessGrant(options: ScopedAgentAccessTokenOptions): ScopedAgentAccessGrant;
16
+ //# sourceMappingURL=agent-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-access.d.ts","sourceRoot":"","sources":["../../src/server/agent-access.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAGL,KAAK,YAAY,EAClB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,GAC3B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,WAAW,6BAA8B,SAAQ,wBAAwB;IAC7E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,0BAA0B,CAAC,EACzC,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAA6C,GAC9C,EAAE,6BAA6B,GAAG,MAAM,CAMxC;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,wBAAwB,GAC9B,YAAY,CAMd;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,6BAA6B,GACrC,sBAAsB,CAQxB"}
@@ -0,0 +1,25 @@
1
+ import { DEFAULT_AGENT_ACCESS_TTL_SECONDS, scopedAgentAccessResourceId, } from "../shared/agent-access.js";
2
+ import { signShortLivedToken, verifyShortLivedToken, } from "./short-lived-token.js";
3
+ export { AGENT_ACCESS_PARAM, DEFAULT_AGENT_ACCESS_TTL_SECONDS, appendAgentAccessParam, buildAgentAccessApiUrl, buildAgentAccessUrl, normalizeAgentAccessBasePath, normalizeAgentAccessOrigin, scopedAgentAccessResourceId, toAgentAccessUrl, } from "../shared/agent-access.js";
4
+ export function signScopedAgentAccessToken({ resourceKind, resourceId, viewerEmail, ttlSeconds = DEFAULT_AGENT_ACCESS_TTL_SECONDS, }) {
5
+ return signShortLivedToken({
6
+ resourceId: scopedAgentAccessResourceId(resourceKind, resourceId),
7
+ viewerEmail,
8
+ ttlSeconds,
9
+ });
10
+ }
11
+ export function verifyScopedAgentAccessToken(token, scope) {
12
+ if (!token)
13
+ return { ok: false, reason: "missing" };
14
+ return verifyShortLivedToken(token, scopedAgentAccessResourceId(scope.resourceKind, scope.resourceId));
15
+ }
16
+ export function createScopedAgentAccessGrant(options) {
17
+ const ttlSeconds = options.ttlSeconds ?? DEFAULT_AGENT_ACCESS_TTL_SECONDS;
18
+ const token = signScopedAgentAccessToken({ ...options, ttlSeconds });
19
+ return {
20
+ token,
21
+ expiresAt: new Date(Date.now() + ttlSeconds * 1000).toISOString(),
22
+ ttlSeconds,
23
+ };
24
+ }
25
+ //# sourceMappingURL=agent-access.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-access.js","sourceRoot":"","sources":["../../src/server/agent-access.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gCAAgC,EAChC,2BAA2B,GAE5B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAEtB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,GAIjB,MAAM,2BAA2B,CAAC;AAanC,MAAM,UAAU,0BAA0B,CAAC,EACzC,YAAY,EACZ,UAAU,EACV,WAAW,EACX,UAAU,GAAG,gCAAgC,GACf;IAC9B,OAAO,mBAAmB,CAAC;QACzB,UAAU,EAAE,2BAA2B,CAAC,YAAY,EAAE,UAAU,CAAC;QACjE,WAAW;QACX,UAAU;KACX,CAAC,CAAC;AACL,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,KAAa,EACb,KAA+B;IAE/B,IAAI,CAAC,KAAK;QAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;IACpD,OAAO,qBAAqB,CAC1B,KAAK,EACL,2BAA2B,CAAC,KAAK,CAAC,YAAY,EAAE,KAAK,CAAC,UAAU,CAAC,CAClE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC1C,OAAsC;IAEtC,MAAM,UAAU,GAAG,OAAO,CAAC,UAAU,IAAI,gCAAgC,CAAC;IAC1E,MAAM,KAAK,GAAG,0BAA0B,CAAC,EAAE,GAAG,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC;IACrE,OAAO;QACL,KAAK;QACL,SAAS,EAAE,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,UAAU,GAAG,IAAI,CAAC,CAAC,WAAW,EAAE;QACjE,UAAU;KACX,CAAC;AACJ,CAAC","sourcesContent":["import {\n DEFAULT_AGENT_ACCESS_TTL_SECONDS,\n scopedAgentAccessResourceId,\n type AgentAccessResourceScope,\n} from \"../shared/agent-access.js\";\nimport {\n signShortLivedToken,\n verifyShortLivedToken,\n type VerifyResult,\n} from \"./short-lived-token.js\";\n\nexport {\n AGENT_ACCESS_PARAM,\n DEFAULT_AGENT_ACCESS_TTL_SECONDS,\n appendAgentAccessParam,\n buildAgentAccessApiUrl,\n buildAgentAccessUrl,\n normalizeAgentAccessBasePath,\n normalizeAgentAccessOrigin,\n scopedAgentAccessResourceId,\n toAgentAccessUrl,\n type AgentAccessApiUrlOptions,\n type AgentAccessResourceScope,\n type AgentAccessUrlOptions,\n} from \"../shared/agent-access.js\";\n\nexport interface ScopedAgentAccessTokenOptions extends AgentAccessResourceScope {\n viewerEmail?: string;\n ttlSeconds?: number;\n}\n\nexport interface ScopedAgentAccessGrant {\n token: string;\n expiresAt: string;\n ttlSeconds: number;\n}\n\nexport function signScopedAgentAccessToken({\n resourceKind,\n resourceId,\n viewerEmail,\n ttlSeconds = DEFAULT_AGENT_ACCESS_TTL_SECONDS,\n}: ScopedAgentAccessTokenOptions): string {\n return signShortLivedToken({\n resourceId: scopedAgentAccessResourceId(resourceKind, resourceId),\n viewerEmail,\n ttlSeconds,\n });\n}\n\nexport function verifyScopedAgentAccessToken(\n token: string,\n scope: AgentAccessResourceScope,\n): VerifyResult {\n if (!token) return { ok: false, reason: \"missing\" };\n return verifyShortLivedToken(\n token,\n scopedAgentAccessResourceId(scope.resourceKind, scope.resourceId),\n );\n}\n\nexport function createScopedAgentAccessGrant(\n options: ScopedAgentAccessTokenOptions,\n): ScopedAgentAccessGrant {\n const ttlSeconds = options.ttlSeconds ?? DEFAULT_AGENT_ACCESS_TTL_SECONDS;\n const token = signScopedAgentAccessToken({ ...options, ttlSeconds });\n return {\n token,\n expiresAt: new Date(Date.now() + ttlSeconds * 1000).toISOString(),\n ttlSeconds,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"h3-helpers.d.ts","sourceRoot":"","sources":["../../src/server/h3-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAmB1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,QAAmB,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,6BAA6B,QAAmB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,UAaxC,CAAC;AAWF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMjE;AAED;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAElE;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,GAAG,GAAG,EACjD,KAAK,EAAE,OAAO,EACd,QAAQ,GAAE,MAAoC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAwCZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CAE7D"}
1
+ {"version":3,"file":"h3-helpers.d.ts","sourceRoot":"","sources":["../../src/server/h3-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAkB1C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAElC;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,QAAmB,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,6BAA6B,QAAmB,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAEnD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,UAaxC,CAAC;AAWF;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAMjE;AAED;;;;;;;;GAQG;AACH,wBAAsB,QAAQ,CAAC,CAAC,GAAG,GAAG,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAElE;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CAAC,CAAC,GAAG,GAAG,EACjD,KAAK,EAAE,OAAO,EACd,QAAQ,GAAE,MAAoC,GAC7C,OAAO,CAAC,CAAC,CAAC,CAwCZ;AAED;;;;;;;;GAQG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,cAAc,CAe7D"}
@@ -1,4 +1,3 @@
1
- import { Readable } from "node:stream";
2
1
  /**
3
2
  * Small helpers around h3 v2 that polish ergonomics for templates.
4
3
  *
@@ -135,6 +134,17 @@ export async function readBodyWithSizeLimit(event, maxBytes = DEFAULT_CHAT_MAX_B
135
134
  * return streamFile(fs.createReadStream(filePath));
136
135
  */
137
136
  export function streamFile(stream) {
138
- return Readable.toWeb(stream);
137
+ return new ReadableStream({
138
+ start(controller) {
139
+ stream.on("data", (chunk) => {
140
+ controller.enqueue(typeof chunk === "string" ? new TextEncoder().encode(chunk) : chunk);
141
+ });
142
+ stream.on("end", () => controller.close());
143
+ stream.on("error", (error) => controller.error(error));
144
+ },
145
+ cancel() {
146
+ stream.destroy();
147
+ },
148
+ });
139
149
  }
140
150
  //# sourceMappingURL=h3-helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"h3-helpers.js","sourceRoot":"","sources":["../../src/server/h3-helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,QAAQ,IAAI,SAAS,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,IAAI,CAAC;AAGzE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5D;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,EAAE,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAEnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG;IAC1C,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,kBAAkB;IAClB,mBAAmB;IACnB,0BAA0B;IAC1B,+CAA+C;IAC/C,oBAAoB;CACrB,CAAC;AAEF,oEAAoE;AACpE,MAAM,yBAAyB,GAAG,IAAI,GAAG,CAAC;IACxC,0BAA0B;IAC1B,0BAA0B;IAC1B,kBAAkB;IAClB,mBAAmB;IACnB,6BAA6B;CAC9B,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,QAAgB;IACtD,MAAM,KAAK,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAClE,IAAI,yBAAyB,CAAC,GAAG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IAAI,CAAC;gBACH,WAAW,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC;YAChE,CAAC;YAAC,MAAM,CAAC;gBACP,WAAW,GAAG,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;QACD,IAAI,WAAW,GAAG,QAAQ,EAAE,CAAC;YAC3B,iBAAiB,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YAC9B,MAAM,MAAM,CAAC,MAAM,CACjB,IAAI,KAAK,CAAC,+BAA+B,QAAQ,SAAS,CAAC,EAC3D,EAAE,UAAU,EAAE,GAAG,EAAE,CACpB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,IAAI,EAAE,CAAM,CAAC;AAC3B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,MAAkB;IAC3C,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAmB,CAAC;AAClD,CAAC","sourcesContent":["import type { ReadStream } from \"node:fs\";\nimport { Readable } from \"node:stream\";\n\n/**\n * Small helpers around h3 v2 that polish ergonomics for templates.\n *\n * `readBody` — wraps h3's `readBody` so the result is typed `any` by default\n * (h3 v2 infers `unknown`, which forces `as` casts at every call site).\n *\n * `readBodyWithSizeLimit` — like `readBody` but rejects with a 413 response\n * when the `content-length` header (or the buffered body size) exceeds the\n * given threshold. Use this on any route whose payload can include inline\n * base64 attachments (chat POST, upload routes).\n *\n * `streamFile` — converts a Node `ReadStream` to a web `ReadableStream` so\n * route handlers can return file content without importing `node:stream`\n * inline. h3 v2 expects web streams everywhere.\n */\nimport { readBody as _readBody, getHeader, setResponseStatus } from \"h3\";\nimport type { H3Event } from \"h3\";\n\n/**\n * Default maximum chat-POST body size (25 MB uncompressed). The agent chat\n * body carries base64-encoded attachments so a 25 MB cap is generous while\n * still protecting against runaway payloads. Override per-route by passing a\n * different `maxBytes` value to `readBodyWithSizeLimit`.\n */\nexport const DEFAULT_CHAT_MAX_BODY_BYTES = 25 * 1024 * 1024;\n\n/**\n * Maximum file size for upload routes (25 MB). Mirrors Whisper's hard limit\n * so audio, image, and document uploads share a consistent ceiling.\n */\nexport const DEFAULT_UPLOAD_MAX_FILE_BYTES = 25 * 1024 * 1024;\n\n/**\n * Maximum number of attachments per chat message. Guards against pathological\n * requests that would fan out into hundreds of parallel model content-parts.\n */\nexport const MAX_CHAT_ATTACHMENTS_PER_MESSAGE = 20;\n\n/**\n * MIME types allowed on the file-upload routes. Executables and scripts are\n * explicitly excluded; everything else is allowed at the default tier.\n * Pass `allowedMimeTypes` to `assertAllowedMimeType` to enforce on a route.\n */\nexport const UPLOAD_ALLOWED_MIME_PREFIXES = [\n \"image/\",\n \"video/\",\n \"audio/\",\n \"text/\",\n \"application/pdf\",\n \"application/json\",\n \"application/zip\",\n \"application/gzip\",\n \"application/x-tar\",\n \"application/vnd.ms-excel\",\n \"application/vnd.openxmlformats-officedocument\",\n \"application/msword\",\n];\n\n/** Mime types that are always rejected even if a prefix matches. */\nconst UPLOAD_BLOCKED_MIME_TYPES = new Set([\n \"application/x-msdownload\",\n \"application/x-executable\",\n \"application/x-sh\",\n \"application/x-bat\",\n \"application/x-msdos-program\",\n]);\n\n/**\n * Returns true when the given MIME type is acceptable for uploads.\n * Blocks executables and scripts; allows everything else in the allow-prefix list.\n */\nexport function isAllowedUploadMimeType(mimeType: string): boolean {\n const lower = (mimeType || \"\").toLowerCase().split(\";\")[0].trim();\n if (UPLOAD_BLOCKED_MIME_TYPES.has(lower)) return false;\n return UPLOAD_ALLOWED_MIME_PREFIXES.some((prefix) =>\n lower.startsWith(prefix),\n );\n}\n\n/**\n * Parse a JSON request body. Returns `{}` if the body is empty or absent\n * so callers don't have to null-check before destructuring.\n *\n * Defaults T to `any` for ergonomic field access. Pass an explicit type\n * argument when you want a typed result:\n *\n * const { email, password } = await readBody<LoginRequest>(event);\n */\nexport async function readBody<T = any>(event: H3Event): Promise<T> {\n return ((await _readBody(event)) ?? {}) as T;\n}\n\n/**\n * Like `readBody` but rejects with a 413 response when the declared\n * `content-length` (or the actual buffered body) exceeds `maxBytes`.\n *\n * @param event - H3 event\n * @param maxBytes - Maximum allowed body size in bytes (default: 25 MB)\n * @returns Parsed body or `{}` when absent\n * @throws Never — on over-size it sets status 413 and throws an object with\n * `{ statusCode: 413, message }` so the h3 handler can propagate it.\n */\nexport async function readBodyWithSizeLimit<T = any>(\n event: H3Event,\n maxBytes: number = DEFAULT_CHAT_MAX_BODY_BYTES,\n): Promise<T> {\n // Fast-path: check Content-Length before buffering the body.\n const clRaw = getHeader(event, \"content-length\");\n if (clRaw) {\n const declared = parseInt(clRaw, 10);\n if (!Number.isNaN(declared) && declared > maxBytes) {\n setResponseStatus(event, 413);\n throw Object.assign(\n new Error(`Request body too large (max ${maxBytes} bytes)`),\n {\n statusCode: 413,\n },\n );\n }\n }\n\n const body = await _readBody(event);\n\n // Also check the actual serialised size for chunked requests that omit C-L.\n if (body !== null && body !== undefined) {\n let actualBytes: number;\n if (typeof body === \"string\") {\n actualBytes = Buffer.byteLength(body, \"utf8\");\n } else {\n try {\n actualBytes = Buffer.byteLength(JSON.stringify(body), \"utf8\");\n } catch {\n actualBytes = 0;\n }\n }\n if (actualBytes > maxBytes) {\n setResponseStatus(event, 413);\n throw Object.assign(\n new Error(`Request body too large (max ${maxBytes} bytes)`),\n { statusCode: 413 },\n );\n }\n }\n\n return (body ?? {}) as T;\n}\n\n/**\n * Convert a Node `ReadStream` (e.g. from `fs.createReadStream`) into a web\n * `ReadableStream`, suitable for returning directly from an h3 v2 handler.\n *\n * import { streamFile } from \"@agent-native/core/server\";\n * import fs from \"node:fs\";\n *\n * return streamFile(fs.createReadStream(filePath));\n */\nexport function streamFile(stream: ReadStream): ReadableStream {\n return Readable.toWeb(stream) as ReadableStream;\n}\n"]}
1
+ {"version":3,"file":"h3-helpers.js","sourceRoot":"","sources":["../../src/server/h3-helpers.ts"],"names":[],"mappings":"AAEA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AAK,EAAE,GAAG,CAAC,CAAC;YAC9B,MAAM,MAAM,CAAC,MAAM,CACjB,IAAI,KAAK,CAAC,+BAA+B,QAAQ,SAAS,CAAC,EAC3D,EAAE,UAAU,EAAE,GAAG,EAAE,CACpB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,CAAC,IAAI,IAAI,EAAE,CAAM,CAAC;AAC3B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,UAAU,CAAC,MAAkB;IAC3C,OAAO,IAAI,cAAc,CAAa;QACpC,KAAK,CAAC,UAAU;YACd,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAA0B,EAAE,EAAE;gBAC/C,UAAU,CAAC,OAAO,CAChB,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,WAAW,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CACpE,CAAC;YACJ,CAAC,CAAC,CAAC;YACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC;YAC3C,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;QACzD,CAAC;QACD,MAAM;YACJ,MAAM,CAAC,OAAO,EAAE,CAAC;QACnB,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { ReadStream } from \"node:fs\";\n\n/**\n * Small helpers around h3 v2 that polish ergonomics for templates.\n *\n * `readBody` — wraps h3's `readBody` so the result is typed `any` by default\n * (h3 v2 infers `unknown`, which forces `as` casts at every call site).\n *\n * `readBodyWithSizeLimit` — like `readBody` but rejects with a 413 response\n * when the `content-length` header (or the buffered body size) exceeds the\n * given threshold. Use this on any route whose payload can include inline\n * base64 attachments (chat POST, upload routes).\n *\n * `streamFile` — converts a Node `ReadStream` to a web `ReadableStream` so\n * route handlers can return file content without importing `node:stream`\n * inline. h3 v2 expects web streams everywhere.\n */\nimport { readBody as _readBody, getHeader, setResponseStatus } from \"h3\";\nimport type { H3Event } from \"h3\";\n\n/**\n * Default maximum chat-POST body size (25 MB uncompressed). The agent chat\n * body carries base64-encoded attachments so a 25 MB cap is generous while\n * still protecting against runaway payloads. Override per-route by passing a\n * different `maxBytes` value to `readBodyWithSizeLimit`.\n */\nexport const DEFAULT_CHAT_MAX_BODY_BYTES = 25 * 1024 * 1024;\n\n/**\n * Maximum file size for upload routes (25 MB). Mirrors Whisper's hard limit\n * so audio, image, and document uploads share a consistent ceiling.\n */\nexport const DEFAULT_UPLOAD_MAX_FILE_BYTES = 25 * 1024 * 1024;\n\n/**\n * Maximum number of attachments per chat message. Guards against pathological\n * requests that would fan out into hundreds of parallel model content-parts.\n */\nexport const MAX_CHAT_ATTACHMENTS_PER_MESSAGE = 20;\n\n/**\n * MIME types allowed on the file-upload routes. Executables and scripts are\n * explicitly excluded; everything else is allowed at the default tier.\n * Pass `allowedMimeTypes` to `assertAllowedMimeType` to enforce on a route.\n */\nexport const UPLOAD_ALLOWED_MIME_PREFIXES = [\n \"image/\",\n \"video/\",\n \"audio/\",\n \"text/\",\n \"application/pdf\",\n \"application/json\",\n \"application/zip\",\n \"application/gzip\",\n \"application/x-tar\",\n \"application/vnd.ms-excel\",\n \"application/vnd.openxmlformats-officedocument\",\n \"application/msword\",\n];\n\n/** Mime types that are always rejected even if a prefix matches. */\nconst UPLOAD_BLOCKED_MIME_TYPES = new Set([\n \"application/x-msdownload\",\n \"application/x-executable\",\n \"application/x-sh\",\n \"application/x-bat\",\n \"application/x-msdos-program\",\n]);\n\n/**\n * Returns true when the given MIME type is acceptable for uploads.\n * Blocks executables and scripts; allows everything else in the allow-prefix list.\n */\nexport function isAllowedUploadMimeType(mimeType: string): boolean {\n const lower = (mimeType || \"\").toLowerCase().split(\";\")[0].trim();\n if (UPLOAD_BLOCKED_MIME_TYPES.has(lower)) return false;\n return UPLOAD_ALLOWED_MIME_PREFIXES.some((prefix) =>\n lower.startsWith(prefix),\n );\n}\n\n/**\n * Parse a JSON request body. Returns `{}` if the body is empty or absent\n * so callers don't have to null-check before destructuring.\n *\n * Defaults T to `any` for ergonomic field access. Pass an explicit type\n * argument when you want a typed result:\n *\n * const { email, password } = await readBody<LoginRequest>(event);\n */\nexport async function readBody<T = any>(event: H3Event): Promise<T> {\n return ((await _readBody(event)) ?? {}) as T;\n}\n\n/**\n * Like `readBody` but rejects with a 413 response when the declared\n * `content-length` (or the actual buffered body) exceeds `maxBytes`.\n *\n * @param event - H3 event\n * @param maxBytes - Maximum allowed body size in bytes (default: 25 MB)\n * @returns Parsed body or `{}` when absent\n * @throws Never — on over-size it sets status 413 and throws an object with\n * `{ statusCode: 413, message }` so the h3 handler can propagate it.\n */\nexport async function readBodyWithSizeLimit<T = any>(\n event: H3Event,\n maxBytes: number = DEFAULT_CHAT_MAX_BODY_BYTES,\n): Promise<T> {\n // Fast-path: check Content-Length before buffering the body.\n const clRaw = getHeader(event, \"content-length\");\n if (clRaw) {\n const declared = parseInt(clRaw, 10);\n if (!Number.isNaN(declared) && declared > maxBytes) {\n setResponseStatus(event, 413);\n throw Object.assign(\n new Error(`Request body too large (max ${maxBytes} bytes)`),\n {\n statusCode: 413,\n },\n );\n }\n }\n\n const body = await _readBody(event);\n\n // Also check the actual serialised size for chunked requests that omit C-L.\n if (body !== null && body !== undefined) {\n let actualBytes: number;\n if (typeof body === \"string\") {\n actualBytes = Buffer.byteLength(body, \"utf8\");\n } else {\n try {\n actualBytes = Buffer.byteLength(JSON.stringify(body), \"utf8\");\n } catch {\n actualBytes = 0;\n }\n }\n if (actualBytes > maxBytes) {\n setResponseStatus(event, 413);\n throw Object.assign(\n new Error(`Request body too large (max ${maxBytes} bytes)`),\n { statusCode: 413 },\n );\n }\n }\n\n return (body ?? {}) as T;\n}\n\n/**\n * Convert a Node `ReadStream` (e.g. from `fs.createReadStream`) into a web\n * `ReadableStream`, suitable for returning directly from an h3 v2 handler.\n *\n * import { streamFile } from \"@agent-native/core/server\";\n * import fs from \"node:fs\";\n *\n * return streamFile(fs.createReadStream(filePath));\n */\nexport function streamFile(stream: ReadStream): ReadableStream {\n return new ReadableStream<Uint8Array>({\n start(controller) {\n stream.on(\"data\", (chunk: string | Uint8Array) => {\n controller.enqueue(\n typeof chunk === \"string\" ? new TextEncoder().encode(chunk) : chunk,\n );\n });\n stream.on(\"end\", () => controller.close());\n stream.on(\"error\", (error) => controller.error(error));\n },\n cancel() {\n stream.destroy();\n },\n });\n}\n"]}
@@ -60,6 +60,7 @@ export { renderEmail, emailStrong, emailLink, type RenderEmailArgs, type Rendere
60
60
  export { getAppProductionUrl, getFirstPartyProdUrl } from "./app-url.js";
61
61
  export { getConfiguredAppBasePath, normalizeAppBasePath, withConfiguredAppBasePath, } from "./app-base-path.js";
62
62
  export { signShortLivedToken, verifyShortLivedToken, type ShortLivedTokenClaims, type VerifyResult as ShortLivedTokenVerifyResult, } from "./short-lived-token.js";
63
+ export { AGENT_ACCESS_PARAM, DEFAULT_AGENT_ACCESS_TTL_SECONDS, appendAgentAccessParam, buildAgentAccessApiUrl, buildAgentAccessUrl, createScopedAgentAccessGrant, normalizeAgentAccessBasePath, normalizeAgentAccessOrigin, scopedAgentAccessResourceId, signScopedAgentAccessToken, toAgentAccessUrl, verifyScopedAgentAccessToken, type AgentAccessApiUrlOptions, type AgentAccessResourceScope, type AgentAccessUrlOptions, type ScopedAgentAccessGrant, type ScopedAgentAccessTokenOptions, } from "./agent-access.js";
63
64
  export type NitroPluginDef = (nitroApp: any) => void | Promise<void>;
64
65
  export declare function defineNitroPlugin(def: NitroPluginDef): NitroPluginDef;
65
66
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,YAAY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;AACzE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,YAAY,IAAI,2BAA2B,GACjD,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,gBAAgB,EAChB,4BAA4B,EAC5B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,GACnC,MAAM,mBAAmB,CAAC;AAU3B,MAAM,MAAM,cAAc,GAAG,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACrE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,cAAc,CAErE"}
@@ -61,6 +61,7 @@ export { renderEmail, emailStrong, emailLink, } from "./email-template.js";
61
61
  export { getAppProductionUrl, getFirstPartyProdUrl } from "./app-url.js";
62
62
  export { getConfiguredAppBasePath, normalizeAppBasePath, withConfiguredAppBasePath, } from "./app-base-path.js";
63
63
  export { signShortLivedToken, verifyShortLivedToken, } from "./short-lived-token.js";
64
+ export { AGENT_ACCESS_PARAM, DEFAULT_AGENT_ACCESS_TTL_SECONDS, appendAgentAccessParam, buildAgentAccessApiUrl, buildAgentAccessUrl, createScopedAgentAccessGrant, normalizeAgentAccessBasePath, normalizeAgentAccessOrigin, scopedAgentAccessResourceId, signScopedAgentAccessToken, toAgentAccessUrl, verifyScopedAgentAccessToken, } from "./agent-access.js";
64
65
  export function defineNitroPlugin(def) {
65
66
  return def;
66
67
  }
@@ -1 +1 @@
1
- {"version":3,"file":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BAAwB,EACxB,2BAA2B,EAC3B,mCAAmC,EACnC,yBAAyB,EACzB,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,wBAAwB,EACxB,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,sBAAsB,EACtB,kCAAkC,EAClC,oCAAoC,EACpC,4BAA4B,EAC5B,8BAA8B,EAC9B,mCAAmC,EACnC,0BAA0B,EAC1B,sCAAsC,EACtC,sCAAsC,EACtC,6BAA6B,GAY9B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,yBAAyB,EACzB,yBAAyB,EACzB,6BAA6B,EAC7B,gCAAgC,EAChC,eAAe,GAEhB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,EACnB,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,GAIpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,gBAAgB,GAIjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,GAIV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,wBAAwB,CAAC;AAWhC,MAAM,UAAU,iBAAiB,CAAC,GAAmB;IACnD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["export {\n createServer,\n type CreateServerOptions,\n type EnvKeyConfig,\n} from \"./create-server.js\";\n\nexport {\n readBody,\n readBodyWithSizeLimit,\n streamFile,\n DEFAULT_CHAT_MAX_BODY_BYTES,\n DEFAULT_UPLOAD_MAX_FILE_BYTES,\n MAX_CHAT_ATTACHMENTS_PER_MESSAGE,\n isAllowedUploadMimeType,\n} from \"./h3-helpers.js\";\nexport {\n buildDeepLink,\n toAbsoluteOpenUrl,\n toDesktopOpenUrl,\n toVsCodeOpenUrl,\n OPEN_ROUTE_SUBPATH,\n DESKTOP_OPEN_URL,\n VSCODE_OPEN_URL,\n type DeepLinkInput,\n} from \"./deep-link.js\";\nexport { createOpenRouteHandler, type OpenRouteOptions } from \"./open-route.js\";\nexport {\n createEmbedStartRouteHandler,\n buildEmbedStartPath,\n type EmbedStartRouteOptions,\n} from \"./embed-route.js\";\nexport {\n createEmbedSessionTicket,\n consumeEmbedSessionTicket,\n normalizeEmbedTargetPath,\n requestHasEmbedAuthMarker,\n resolveEmbedSessionFromRequest,\n setEmbedSessionCookie,\n signEmbedSessionToken,\n verifyEmbedSessionToken,\n type ConsumedEmbedSessionTicket,\n type ConsumeEmbedSessionTicketOptions,\n type EmbedSessionTicket,\n type EmbedSessionTicketInput,\n type EmbedSessionTokenClaims,\n type ResolvedEmbedSession,\n type VerifyEmbedSessionTokenResult,\n} from \"./embed-session.js\";\nexport { createSSEHandler, type SSEHandlerOptions } from \"./sse.js\";\nexport {\n mountAuthMiddleware,\n autoMountAuth,\n getSession,\n COOKIE_NAME,\n addSession,\n removeSession,\n getSessionEmail,\n getFrameworkSessionCookieValues,\n setFrameworkSessionCookie,\n clearFrameworkSessionCookies,\n runAuthGuard,\n setDesktopExchange,\n setDesktopExchangeError,\n safeReturnPath,\n type DesktopExchangeErrorPayload,\n type AuthSession,\n type AuthOptions,\n} from \"./auth.js\";\nexport {\n handleIdentitySso,\n getIdentityHubUrl,\n isIdentitySsoEnabled,\n isIdentitySsoBypassPath,\n identitySsoLoginButtonHtml,\n IDENTITY_SSO_PROVIDER_ID,\n IDENTITY_SSO_SCOPE,\n} from \"./identity-sso.js\";\nexport { requireEnvKey, type MissingKeyResponse } from \"./missing-key.js\";\nexport { verifyCaptcha, type CaptchaVerifyResult } from \"./captcha.js\";\nexport {\n getLocaleInitScript,\n parseAcceptLanguage,\n resolveLocaleFromRequest,\n type LocaleInitScriptOptions,\n type ResolveLocaleFromRequestOptions,\n type ResolvedRequestLocale,\n} from \"../localization/server.js\";\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n type AgentChatReference,\n type MentionProvider,\n type MentionProviderItem,\n type AgentLoopFinalResponseGuard,\n type AgentLoopFinalResponseGuardContext,\n type AgentLoopFinalResponseGuardResult,\n type AgentLoopToolCallSummary,\n type AgentLoopToolResultSummary,\n} from \"../agent/index.js\";\nexport {\n actionsToEngineTools,\n getOwnerActiveApiKey,\n runAgentLoop,\n} from \"../agent/production-agent.js\";\nexport {\n getStoredModelForEngine,\n resolveEngine,\n} from \"../agent/engine/index.js\";\nexport {\n completeText,\n type CompleteTextMessage,\n type CompleteTextOptions,\n type CompleteTextResult,\n type CompleteTextUsage,\n} from \"./complete-text.js\";\nexport { createDevScriptRegistry } from \"../scripts/dev/index.js\";\n\nexport {\n createPollHandler,\n recordChange,\n getVersion,\n getChangesSince,\n getPollEmitter,\n canSeeChangeForUser,\n POLL_CHANGE_EVENT,\n} from \"./poll.js\";\nexport { createPollEventsHandler } from \"./poll-events.js\";\nexport { createAuthPlugin, defaultAuthPlugin } from \"./auth-plugin.js\";\nexport {\n initServerSentry,\n isServerSentryEnabled,\n setSentryUserForRequest,\n captureRouteError,\n type RouteErrorContext,\n} from \"./sentry.js\";\nexport {\n captureError,\n captureServerError,\n registerErrorCaptureProvider,\n type CaptureErrorContext,\n type CaptureErrorProvider,\n} from \"./capture-error.js\";\nexport { createSentryPlugin, defaultSentryPlugin } from \"./sentry-plugin.js\";\n// Re-export the org plugin so the auto-discovery's DEFAULT_PLUGIN_REGISTRY\n// (which references \"defaultOrgPlugin\" from @agent-native/core/server) can\n// resolve it during the deploy build worker-entry generation.\nexport { createOrgPlugin, defaultOrgPlugin } from \"../org/plugin.js\";\nexport {\n createContextXrayPlugin,\n defaultContextXrayPlugin,\n} from \"../agent/context-xray/plugin.js\";\nexport {\n createObservationalMemoryPlugin,\n defaultObservationalMemoryPlugin,\n} from \"../agent/observational-memory/plugin.js\";\nexport {\n createGoogleAuthPlugin,\n type GoogleAuthPluginOptions,\n} from \"./google-auth-plugin.js\";\nexport type { GoogleAuthMode } from \"./google-auth-mode.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n refreshGlobalMcpManager,\n type AgentChatPluginOptions,\n} from \"./agent-chat-plugin.js\";\nexport {\n configureAgentNativeEmbeddedEnvironment,\n createAgentNativeEmbeddedAuthOptions,\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n normalizeAgentNativeEmbeddedSession,\n type AgentNativeEmbeddedAuthOptions,\n type AgentNativeEmbeddedGetSession,\n type AgentNativeEmbeddedHostSession,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./embedded.js\";\nexport {\n createThread,\n getThread,\n listThreads,\n updateThreadData,\n deleteThread,\n setThreadArchived,\n setThreadPinned,\n setThreadScope,\n type ChatThread,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ListThreadsOptions,\n} from \"../chat-threads/store.js\";\nexport {\n createResourcesPlugin,\n defaultResourcesPlugin,\n} from \"./resources-plugin.js\";\nexport {\n createCoreRoutesPlugin,\n defaultCoreRoutesPlugin,\n FRAMEWORK_ROUTE_PREFIX,\n type CoreRoutesPluginOptions,\n} from \"./core-routes-plugin.js\";\nexport {\n AGENT_NATIVE_OG_IMAGE_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_HEIGHT,\n AGENT_NATIVE_OG_IMAGE_NETLIFY_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_WIDTH,\n agentNativeOgImageResponseHeaders,\n createAgentNativeOgImageHandler,\n renderAgentNativeOgImagePng,\n renderAgentNativeOgImageSvg,\n type AgentNativeOgImageInput,\n} from \"./social-og-image.js\";\nexport {\n createBrowserSessionActionEntries,\n type CreateBrowserSessionActionEntriesOptions,\n} from \"../browser-sessions/actions.js\";\nexport {\n DEFAULT_BROWSER_SESSION_REQUEST_POLL_MS,\n DEFAULT_BROWSER_SESSION_REQUEST_TIMEOUT_MS,\n DEFAULT_BROWSER_SESSION_TTL_MS,\n callBrowserSession,\n claimBrowserSessionRequest,\n completeBrowserSessionRequest,\n createBrowserSessionRequest,\n disconnectBrowserSession,\n getBrowserSession,\n getBrowserSessionRequest,\n listBrowserSessions,\n registerBrowserSession,\n waitForBrowserSessionRequest,\n} from \"../browser-sessions/store.js\";\nexport {\n mountBrowserSessionRoutes,\n type MountBrowserSessionRoutesOptions,\n} from \"../browser-sessions/routes.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n createTerminalPlugin,\n defaultTerminalPlugin,\n type TerminalPluginOptions,\n} from \"../terminal/terminal-plugin.js\";\nexport {\n createCollabPlugin,\n type CollabPluginOptions,\n} from \"./collab-plugin.js\";\n\nexport {\n spawnTask,\n getTask,\n getTaskByThread,\n listTasks,\n sendToTask,\n markTaskErrored,\n type AgentTask,\n type SpawnTaskOptions,\n} from \"./agent-teams.js\";\nexport { isOAuthConnected, getOAuthAccounts } from \"./oauth-helpers.js\";\nexport {\n hasGoogleSignInCredentials,\n resolveGoogleLegacyProviderCredentials,\n resolveGoogleProviderCredentialCandidates,\n resolveGoogleProviderCredentials,\n resolveGoogleSignInCredentials,\n type GoogleOAuthCredentials,\n} from \"./google-oauth-credentials.js\";\nexport { wrapWithAnalytics } from \"./analytics.js\";\nexport {\n getH3App,\n awaitBootstrap,\n markDefaultPluginProvided,\n type H3AppShim,\n} from \"./framework-request-handler.js\";\nexport {\n autoDiscoverActions,\n autoDiscoverScripts,\n loadActionsFromStaticRegistry,\n mergeCoreSharingActions,\n registerPackageActions,\n} from \"./action-discovery.js\";\nexport {\n mountActionRoutes,\n type MountActionRoutesOptions,\n} from \"./action-routes.js\";\nexport {\n runWithRequestContext,\n hasRequestContext,\n getRequestContext,\n getRequestUserEmail,\n getRequestUserName,\n getRequestOrgId,\n getRequestTimezone,\n getRequestRunContext,\n getCredentialContext,\n isIntegrationCallerRequest,\n type RequestContext,\n type RequestRunContext,\n} from \"./request-context.js\";\nexport { formatDateInTimezone, todayInTimezone } from \"./date-utils.js\";\n\nexport {\n createOnboardingPlugin,\n defaultOnboardingPlugin,\n} from \"../onboarding/plugin.js\";\n\nexport {\n registerFileUploadProvider,\n unregisterFileUploadProvider,\n listFileUploadProviders,\n getActiveFileUploadProvider,\n getActiveFileUploadProviderForRequest,\n uploadFile,\n builderFileUploadProvider,\n type FileUploadInput,\n type FileUploadProvider,\n type FileUploadResult,\n} from \"../file-upload/index.js\";\n\nexport {\n createIntegrationsPlugin,\n defaultIntegrationsPlugin,\n enqueueRemoteCommand,\n slackAdapter,\n telegramAdapter,\n whatsappAdapter,\n emailAdapter,\n type PlatformAdapter,\n type IncomingMessage,\n type OutgoingMessage,\n type IntegrationStatus,\n type IntegrationsPluginOptions,\n} from \"../integrations/index.js\";\n\nexport {\n isElectron,\n isMobile,\n getOrigin,\n getAppBasePath,\n getAppUrl,\n resolveOAuthRedirectUri,\n isAllowedOAuthRedirectUri,\n encodeOAuthState,\n decodeOAuthState,\n resolveOAuthOwner,\n createOAuthSession,\n oauthCallbackResponse,\n oauthErrorPage,\n oauthDesktopExchangePage,\n type OAuthStatePayload,\n type OAuthOwnerResult,\n type OAuthSessionResult,\n} from \"./google-oauth.js\";\n\nexport {\n FeatureNotConfiguredError,\n hasBuilderPrivateKey,\n isBuilderEnvManaged,\n getBuilderProxyOrigin,\n getBuilderImageGenerationBaseUrl,\n getBuilderWebSearchBaseUrl,\n getBuilderAuthHeader,\n resolveBuilderPrivateKey,\n resolveBuilderAuthHeader,\n resolveHasBuilderPrivateKey,\n resolveHasCompleteBuilderConnection,\n resolveBuilderCredentials,\n resolveBuilderCredential,\n readDeployCredentialEnv,\n writeBuilderCredentials,\n deleteBuilderCredentials,\n resolveSecret,\n} from \"./credential-provider.js\";\nexport {\n builderDesignSystemUrl,\n buildBuilderDesignSystemIndexFiles,\n createBuilderDesignSystemProxyFields,\n fetchBuilderDesignSystemDocs,\n getBuilderDesignSystemsBaseUrl,\n hydrateBuilderDesignSystemReference,\n localBuilderDesignSystemId,\n mimeTypeForBuilderDesignSystemFilename,\n parseBuilderDesignSystemProxyReference,\n startBuilderDesignSystemIndex,\n type BuildBuilderDesignSystemIndexFilesOptions,\n type BuilderDesignSystemCodeFileInput,\n type BuilderDesignSystemDocsOptions,\n type BuilderDesignSystemDocument,\n type BuilderDesignSystemHydratedReference,\n type BuilderDesignSystemIndexFile,\n type BuilderDesignSystemIndexOptions,\n type BuilderDesignSystemIndexResult,\n type BuilderDesignSystemProxyFields,\n type BuilderDesignSystemProxyFieldsOptions,\n type BuilderDesignSystemProxyReference,\n} from \"./builder-design-systems.js\";\nexport {\n getBuilderBranchProjectId,\n isBuilderBranchingEnabled,\n resolveBuilderBranchProjectId,\n resolveIsBuilderBranchingEnabled,\n runBuilderAgent,\n type RunBuilderAgentResult,\n} from \"./builder-browser.js\";\nexport {\n ensureFusionContainer,\n sendFusionBranchMessage,\n pushFusionBranch,\n reserveFusionHostingSlug,\n deployFusionProject,\n getFusionDeploys,\n getFusionBranchEditorUrl,\n getFusionHostingUrl,\n type FusionBranchRef,\n type EnsureFusionContainerResult,\n type SendFusionMessageResult,\n} from \"./fusion-app.js\";\n\nexport {\n sendEmail,\n isEmailConfigured,\n getEmailProvider,\n type EmailAttachment,\n type EmailProvider,\n type SendEmailArgs,\n} from \"./email.js\";\nexport {\n renderEmail,\n emailStrong,\n emailLink,\n type RenderEmailArgs,\n type RenderedEmail,\n type EmailCta,\n} from \"./email-template.js\";\nexport { getAppProductionUrl, getFirstPartyProdUrl } from \"./app-url.js\";\nexport {\n getConfiguredAppBasePath,\n normalizeAppBasePath,\n withConfiguredAppBasePath,\n} from \"./app-base-path.js\";\nexport {\n signShortLivedToken,\n verifyShortLivedToken,\n type ShortLivedTokenClaims,\n type VerifyResult as ShortLivedTokenVerifyResult,\n} from \"./short-lived-token.js\";\n\n// SSR handler is NOT re-exported here — it uses a virtual module\n// (virtual:react-router/server-build) that only exists at Vite dev/build time.\n// Including it in this barrel would break the esbuild CF Pages bundler.\n// Templates import directly: import { ssrHandler } from \"@agent-native/core/server/ssr-handler\"\n\n// Nitro plugin helper — re-exported so templates don't need nitro as a direct dependency.\n// defineNitroPlugin is an identity function; this typed wrapper lets templates use it\n// without resolving `nitro/runtime` (which requires Nitro's virtual modules at runtime).\nexport type NitroPluginDef = (nitroApp: any) => void | Promise<void>;\nexport function defineNitroPlugin(def: NitroPluginDef): NitroPluginDef {\n return def;\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,GAGb,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,QAAQ,EACR,qBAAqB,EACrB,UAAU,EACV,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,EAChC,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EAChB,eAAe,GAEhB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAyB,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,4BAA4B,EAC5B,mBAAmB,GAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,yBAAyB,EACzB,8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AAmB,GAIpB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,SAAS,EACT,iBAAiB,EACjB,gBAAgB,GAIjB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,SAAS,GAIV,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzE,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAGtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC5B,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,gBAAgB,EAChB,4BAA4B,GAM7B,MAAM,mBAAmB,CAAC;AAW3B,MAAM,UAAU,iBAAiB,CAAC,GAAmB;IACnD,OAAO,GAAG,CAAC;AACb,CAAC","sourcesContent":["export {\n createServer,\n type CreateServerOptions,\n type EnvKeyConfig,\n} from \"./create-server.js\";\n\nexport {\n readBody,\n readBodyWithSizeLimit,\n streamFile,\n DEFAULT_CHAT_MAX_BODY_BYTES,\n DEFAULT_UPLOAD_MAX_FILE_BYTES,\n MAX_CHAT_ATTACHMENTS_PER_MESSAGE,\n isAllowedUploadMimeType,\n} from \"./h3-helpers.js\";\nexport {\n buildDeepLink,\n toAbsoluteOpenUrl,\n toDesktopOpenUrl,\n toVsCodeOpenUrl,\n OPEN_ROUTE_SUBPATH,\n DESKTOP_OPEN_URL,\n VSCODE_OPEN_URL,\n type DeepLinkInput,\n} from \"./deep-link.js\";\nexport { createOpenRouteHandler, type OpenRouteOptions } from \"./open-route.js\";\nexport {\n createEmbedStartRouteHandler,\n buildEmbedStartPath,\n type EmbedStartRouteOptions,\n} from \"./embed-route.js\";\nexport {\n createEmbedSessionTicket,\n consumeEmbedSessionTicket,\n normalizeEmbedTargetPath,\n requestHasEmbedAuthMarker,\n resolveEmbedSessionFromRequest,\n setEmbedSessionCookie,\n signEmbedSessionToken,\n verifyEmbedSessionToken,\n type ConsumedEmbedSessionTicket,\n type ConsumeEmbedSessionTicketOptions,\n type EmbedSessionTicket,\n type EmbedSessionTicketInput,\n type EmbedSessionTokenClaims,\n type ResolvedEmbedSession,\n type VerifyEmbedSessionTokenResult,\n} from \"./embed-session.js\";\nexport { createSSEHandler, type SSEHandlerOptions } from \"./sse.js\";\nexport {\n mountAuthMiddleware,\n autoMountAuth,\n getSession,\n COOKIE_NAME,\n addSession,\n removeSession,\n getSessionEmail,\n getFrameworkSessionCookieValues,\n setFrameworkSessionCookie,\n clearFrameworkSessionCookies,\n runAuthGuard,\n setDesktopExchange,\n setDesktopExchangeError,\n safeReturnPath,\n type DesktopExchangeErrorPayload,\n type AuthSession,\n type AuthOptions,\n} from \"./auth.js\";\nexport {\n handleIdentitySso,\n getIdentityHubUrl,\n isIdentitySsoEnabled,\n isIdentitySsoBypassPath,\n identitySsoLoginButtonHtml,\n IDENTITY_SSO_PROVIDER_ID,\n IDENTITY_SSO_SCOPE,\n} from \"./identity-sso.js\";\nexport { requireEnvKey, type MissingKeyResponse } from \"./missing-key.js\";\nexport { verifyCaptcha, type CaptchaVerifyResult } from \"./captcha.js\";\nexport {\n getLocaleInitScript,\n parseAcceptLanguage,\n resolveLocaleFromRequest,\n type LocaleInitScriptOptions,\n type ResolveLocaleFromRequestOptions,\n type ResolvedRequestLocale,\n} from \"../localization/server.js\";\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n type AgentChatReference,\n type MentionProvider,\n type MentionProviderItem,\n type AgentLoopFinalResponseGuard,\n type AgentLoopFinalResponseGuardContext,\n type AgentLoopFinalResponseGuardResult,\n type AgentLoopToolCallSummary,\n type AgentLoopToolResultSummary,\n} from \"../agent/index.js\";\nexport {\n actionsToEngineTools,\n getOwnerActiveApiKey,\n runAgentLoop,\n} from \"../agent/production-agent.js\";\nexport {\n getStoredModelForEngine,\n resolveEngine,\n} from \"../agent/engine/index.js\";\nexport {\n completeText,\n type CompleteTextMessage,\n type CompleteTextOptions,\n type CompleteTextResult,\n type CompleteTextUsage,\n} from \"./complete-text.js\";\nexport { createDevScriptRegistry } from \"../scripts/dev/index.js\";\n\nexport {\n createPollHandler,\n recordChange,\n getVersion,\n getChangesSince,\n getPollEmitter,\n canSeeChangeForUser,\n POLL_CHANGE_EVENT,\n} from \"./poll.js\";\nexport { createPollEventsHandler } from \"./poll-events.js\";\nexport { createAuthPlugin, defaultAuthPlugin } from \"./auth-plugin.js\";\nexport {\n initServerSentry,\n isServerSentryEnabled,\n setSentryUserForRequest,\n captureRouteError,\n type RouteErrorContext,\n} from \"./sentry.js\";\nexport {\n captureError,\n captureServerError,\n registerErrorCaptureProvider,\n type CaptureErrorContext,\n type CaptureErrorProvider,\n} from \"./capture-error.js\";\nexport { createSentryPlugin, defaultSentryPlugin } from \"./sentry-plugin.js\";\n// Re-export the org plugin so the auto-discovery's DEFAULT_PLUGIN_REGISTRY\n// (which references \"defaultOrgPlugin\" from @agent-native/core/server) can\n// resolve it during the deploy build worker-entry generation.\nexport { createOrgPlugin, defaultOrgPlugin } from \"../org/plugin.js\";\nexport {\n createContextXrayPlugin,\n defaultContextXrayPlugin,\n} from \"../agent/context-xray/plugin.js\";\nexport {\n createObservationalMemoryPlugin,\n defaultObservationalMemoryPlugin,\n} from \"../agent/observational-memory/plugin.js\";\nexport {\n createGoogleAuthPlugin,\n type GoogleAuthPluginOptions,\n} from \"./google-auth-plugin.js\";\nexport type { GoogleAuthMode } from \"./google-auth-mode.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n refreshGlobalMcpManager,\n type AgentChatPluginOptions,\n} from \"./agent-chat-plugin.js\";\nexport {\n configureAgentNativeEmbeddedEnvironment,\n createAgentNativeEmbeddedAuthOptions,\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n normalizeAgentNativeEmbeddedSession,\n type AgentNativeEmbeddedAuthOptions,\n type AgentNativeEmbeddedGetSession,\n type AgentNativeEmbeddedHostSession,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./embedded.js\";\nexport {\n createThread,\n getThread,\n listThreads,\n updateThreadData,\n deleteThread,\n setThreadArchived,\n setThreadPinned,\n setThreadScope,\n type ChatThread,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ListThreadsOptions,\n} from \"../chat-threads/store.js\";\nexport {\n createResourcesPlugin,\n defaultResourcesPlugin,\n} from \"./resources-plugin.js\";\nexport {\n createCoreRoutesPlugin,\n defaultCoreRoutesPlugin,\n FRAMEWORK_ROUTE_PREFIX,\n type CoreRoutesPluginOptions,\n} from \"./core-routes-plugin.js\";\nexport {\n AGENT_NATIVE_OG_IMAGE_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_HEIGHT,\n AGENT_NATIVE_OG_IMAGE_NETLIFY_CACHE_CONTROL,\n AGENT_NATIVE_OG_IMAGE_WIDTH,\n agentNativeOgImageResponseHeaders,\n createAgentNativeOgImageHandler,\n renderAgentNativeOgImagePng,\n renderAgentNativeOgImageSvg,\n type AgentNativeOgImageInput,\n} from \"./social-og-image.js\";\nexport {\n createBrowserSessionActionEntries,\n type CreateBrowserSessionActionEntriesOptions,\n} from \"../browser-sessions/actions.js\";\nexport {\n DEFAULT_BROWSER_SESSION_REQUEST_POLL_MS,\n DEFAULT_BROWSER_SESSION_REQUEST_TIMEOUT_MS,\n DEFAULT_BROWSER_SESSION_TTL_MS,\n callBrowserSession,\n claimBrowserSessionRequest,\n completeBrowserSessionRequest,\n createBrowserSessionRequest,\n disconnectBrowserSession,\n getBrowserSession,\n getBrowserSessionRequest,\n listBrowserSessions,\n registerBrowserSession,\n waitForBrowserSessionRequest,\n} from \"../browser-sessions/store.js\";\nexport {\n mountBrowserSessionRoutes,\n type MountBrowserSessionRoutesOptions,\n} from \"../browser-sessions/routes.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n createTerminalPlugin,\n defaultTerminalPlugin,\n type TerminalPluginOptions,\n} from \"../terminal/terminal-plugin.js\";\nexport {\n createCollabPlugin,\n type CollabPluginOptions,\n} from \"./collab-plugin.js\";\n\nexport {\n spawnTask,\n getTask,\n getTaskByThread,\n listTasks,\n sendToTask,\n markTaskErrored,\n type AgentTask,\n type SpawnTaskOptions,\n} from \"./agent-teams.js\";\nexport { isOAuthConnected, getOAuthAccounts } from \"./oauth-helpers.js\";\nexport {\n hasGoogleSignInCredentials,\n resolveGoogleLegacyProviderCredentials,\n resolveGoogleProviderCredentialCandidates,\n resolveGoogleProviderCredentials,\n resolveGoogleSignInCredentials,\n type GoogleOAuthCredentials,\n} from \"./google-oauth-credentials.js\";\nexport { wrapWithAnalytics } from \"./analytics.js\";\nexport {\n getH3App,\n awaitBootstrap,\n markDefaultPluginProvided,\n type H3AppShim,\n} from \"./framework-request-handler.js\";\nexport {\n autoDiscoverActions,\n autoDiscoverScripts,\n loadActionsFromStaticRegistry,\n mergeCoreSharingActions,\n registerPackageActions,\n} from \"./action-discovery.js\";\nexport {\n mountActionRoutes,\n type MountActionRoutesOptions,\n} from \"./action-routes.js\";\nexport {\n runWithRequestContext,\n hasRequestContext,\n getRequestContext,\n getRequestUserEmail,\n getRequestUserName,\n getRequestOrgId,\n getRequestTimezone,\n getRequestRunContext,\n getCredentialContext,\n isIntegrationCallerRequest,\n type RequestContext,\n type RequestRunContext,\n} from \"./request-context.js\";\nexport { formatDateInTimezone, todayInTimezone } from \"./date-utils.js\";\n\nexport {\n createOnboardingPlugin,\n defaultOnboardingPlugin,\n} from \"../onboarding/plugin.js\";\n\nexport {\n registerFileUploadProvider,\n unregisterFileUploadProvider,\n listFileUploadProviders,\n getActiveFileUploadProvider,\n getActiveFileUploadProviderForRequest,\n uploadFile,\n builderFileUploadProvider,\n type FileUploadInput,\n type FileUploadProvider,\n type FileUploadResult,\n} from \"../file-upload/index.js\";\n\nexport {\n createIntegrationsPlugin,\n defaultIntegrationsPlugin,\n enqueueRemoteCommand,\n slackAdapter,\n telegramAdapter,\n whatsappAdapter,\n emailAdapter,\n type PlatformAdapter,\n type IncomingMessage,\n type OutgoingMessage,\n type IntegrationStatus,\n type IntegrationsPluginOptions,\n} from \"../integrations/index.js\";\n\nexport {\n isElectron,\n isMobile,\n getOrigin,\n getAppBasePath,\n getAppUrl,\n resolveOAuthRedirectUri,\n isAllowedOAuthRedirectUri,\n encodeOAuthState,\n decodeOAuthState,\n resolveOAuthOwner,\n createOAuthSession,\n oauthCallbackResponse,\n oauthErrorPage,\n oauthDesktopExchangePage,\n type OAuthStatePayload,\n type OAuthOwnerResult,\n type OAuthSessionResult,\n} from \"./google-oauth.js\";\n\nexport {\n FeatureNotConfiguredError,\n hasBuilderPrivateKey,\n isBuilderEnvManaged,\n getBuilderProxyOrigin,\n getBuilderImageGenerationBaseUrl,\n getBuilderWebSearchBaseUrl,\n getBuilderAuthHeader,\n resolveBuilderPrivateKey,\n resolveBuilderAuthHeader,\n resolveHasBuilderPrivateKey,\n resolveHasCompleteBuilderConnection,\n resolveBuilderCredentials,\n resolveBuilderCredential,\n readDeployCredentialEnv,\n writeBuilderCredentials,\n deleteBuilderCredentials,\n resolveSecret,\n} from \"./credential-provider.js\";\nexport {\n builderDesignSystemUrl,\n buildBuilderDesignSystemIndexFiles,\n createBuilderDesignSystemProxyFields,\n fetchBuilderDesignSystemDocs,\n getBuilderDesignSystemsBaseUrl,\n hydrateBuilderDesignSystemReference,\n localBuilderDesignSystemId,\n mimeTypeForBuilderDesignSystemFilename,\n parseBuilderDesignSystemProxyReference,\n startBuilderDesignSystemIndex,\n type BuildBuilderDesignSystemIndexFilesOptions,\n type BuilderDesignSystemCodeFileInput,\n type BuilderDesignSystemDocsOptions,\n type BuilderDesignSystemDocument,\n type BuilderDesignSystemHydratedReference,\n type BuilderDesignSystemIndexFile,\n type BuilderDesignSystemIndexOptions,\n type BuilderDesignSystemIndexResult,\n type BuilderDesignSystemProxyFields,\n type BuilderDesignSystemProxyFieldsOptions,\n type BuilderDesignSystemProxyReference,\n} from \"./builder-design-systems.js\";\nexport {\n getBuilderBranchProjectId,\n isBuilderBranchingEnabled,\n resolveBuilderBranchProjectId,\n resolveIsBuilderBranchingEnabled,\n runBuilderAgent,\n type RunBuilderAgentResult,\n} from \"./builder-browser.js\";\nexport {\n ensureFusionContainer,\n sendFusionBranchMessage,\n pushFusionBranch,\n reserveFusionHostingSlug,\n deployFusionProject,\n getFusionDeploys,\n getFusionBranchEditorUrl,\n getFusionHostingUrl,\n type FusionBranchRef,\n type EnsureFusionContainerResult,\n type SendFusionMessageResult,\n} from \"./fusion-app.js\";\n\nexport {\n sendEmail,\n isEmailConfigured,\n getEmailProvider,\n type EmailAttachment,\n type EmailProvider,\n type SendEmailArgs,\n} from \"./email.js\";\nexport {\n renderEmail,\n emailStrong,\n emailLink,\n type RenderEmailArgs,\n type RenderedEmail,\n type EmailCta,\n} from \"./email-template.js\";\nexport { getAppProductionUrl, getFirstPartyProdUrl } from \"./app-url.js\";\nexport {\n getConfiguredAppBasePath,\n normalizeAppBasePath,\n withConfiguredAppBasePath,\n} from \"./app-base-path.js\";\nexport {\n signShortLivedToken,\n verifyShortLivedToken,\n type ShortLivedTokenClaims,\n type VerifyResult as ShortLivedTokenVerifyResult,\n} from \"./short-lived-token.js\";\nexport {\n AGENT_ACCESS_PARAM,\n DEFAULT_AGENT_ACCESS_TTL_SECONDS,\n appendAgentAccessParam,\n buildAgentAccessApiUrl,\n buildAgentAccessUrl,\n createScopedAgentAccessGrant,\n normalizeAgentAccessBasePath,\n normalizeAgentAccessOrigin,\n scopedAgentAccessResourceId,\n signScopedAgentAccessToken,\n toAgentAccessUrl,\n verifyScopedAgentAccessToken,\n type AgentAccessApiUrlOptions,\n type AgentAccessResourceScope,\n type AgentAccessUrlOptions,\n type ScopedAgentAccessGrant,\n type ScopedAgentAccessTokenOptions,\n} from \"./agent-access.js\";\n\n// SSR handler is NOT re-exported here — it uses a virtual module\n// (virtual:react-router/server-build) that only exists at Vite dev/build time.\n// Including it in this barrel would break the esbuild CF Pages bundler.\n// Templates import directly: import { ssrHandler } from \"@agent-native/core/server/ssr-handler\"\n\n// Nitro plugin helper — re-exported so templates don't need nitro as a direct dependency.\n// defineNitroPlugin is an identity function; this typed wrapper lets templates use it\n// without resolving `nitro/runtime` (which requires Nitro's virtual modules at runtime).\nexport type NitroPluginDef = (nitroApp: any) => void | Promise<void>;\nexport function defineNitroPlugin(def: NitroPluginDef): NitroPluginDef {\n return def;\n}\n"]}
@@ -1,3 +1,20 @@
1
+ /**
2
+ * Per-request context using AsyncLocalStorage.
3
+ *
4
+ * Replaces the unsafe pattern of mutating `process.env.AGENT_USER_EMAIL` /
5
+ * `process.env.AGENT_ORG_ID` on every request. On Node.js (Netlify, self-hosted)
6
+ * concurrent requests would overwrite each other's env vars. AsyncLocalStorage
7
+ * gives each async call-chain its own isolated context.
8
+ *
9
+ * Supported on all deployment targets:
10
+ * - Node.js (native)
11
+ * - Cloudflare Workers (via nodejs_compat flag)
12
+ * - Deno Deploy (via node:async_hooks compat)
13
+ *
14
+ * For CLI scripts that run outside a request context, the getters fall back to
15
+ * process.env so existing `AGENT_USER_EMAIL=x pnpm action foo` invocations
16
+ * continue to work.
17
+ */
1
18
  /**
2
19
  * Per-request agent-run state. Lives on `RequestContext.run` so the
3
20
  * agent-chat plugin can populate fields as the run progresses (owner,
@@ -1 +1 @@
1
- {"version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AS,CAIvD;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD;AAED,wBAAgB,4BAA4B,IACxC,WAAW,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,GAC1C,SAAS,CAEZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,IAAI;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,GAAG,IAAI,CAIP;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,GAAG,SAAS,CAIpE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,iBAAiB,GAAG,SAAS,CAKvE"}
1
+ {"version":3,"file":"request-context.d.ts","sourceRoot":"","sources":["../../src/server/request-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AA0DH;;;;;;;;;;GAUG;AACH,MAAM,WAAW,iBAAiB;IAChC,wEAAwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mEAAmE;IACnE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wEAAwE;IACxE,SAAS,CAAC,EAAE;QACV,IAAI,EAAE,MAAM,CAAC;QACb,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,IAAI,CAAC;IACT,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,4DAA4D;IAC5D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6DAA6D;IAC7D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,0BAA0B,EAAE,WAAW,CAAC;IACxD,yDAAyD;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,kBAAkB,CAAC,EAAE,OAAO,C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AC,CAAC,CAahB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,GAAG,SAAS,CAI9D;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAOxD;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAOvD;AAED;;;;;;GAMG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,SAAS,CAOpD;AASD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO,CAE7E;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAIvD;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,IAAI,OAAO,CAEpD;AAED,wBAAgB,4BAA4B,IACxC,WAAW,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,GAC1C,SAAS,CAEZ;AAED;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,IAAI;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB,GAAG,IAAI,CAIP;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,GAAG,SAAS,CAIpE;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,IAAI,iBAAiB,GAAG,SAAS,CAKvE"}
@@ -15,12 +15,52 @@
15
15
  * process.env so existing `AGENT_USER_EMAIL=x pnpm action foo` invocations
16
16
  * continue to work.
17
17
  */
18
- import { AsyncLocalStorage } from "node:async_hooks";
18
+ class StackAsyncLocalStorage {
19
+ stack = [];
20
+ getStore() {
21
+ return this.stack.at(-1);
22
+ }
23
+ run(store, callback) {
24
+ this.stack.push(store);
25
+ try {
26
+ const result = callback();
27
+ const maybePromise = result;
28
+ if (maybePromise && typeof maybePromise.finally === "function") {
29
+ return maybePromise.finally(() => {
30
+ this.stack.pop();
31
+ });
32
+ }
33
+ this.stack.pop();
34
+ return result;
35
+ }
36
+ catch (error) {
37
+ this.stack.pop();
38
+ throw error;
39
+ }
40
+ }
41
+ }
42
+ function getAsyncLocalStorageCtor() {
43
+ if (typeof window !== "undefined" ||
44
+ typeof process === "undefined" ||
45
+ !process.versions?.node ||
46
+ typeof process.getBuiltinModule !== "function") {
47
+ return undefined;
48
+ }
49
+ return process.getBuiltinModule("node:async_hooks")?.AsyncLocalStorage;
50
+ }
51
+ const AsyncLocalStorageCtor = getAsyncLocalStorageCtor();
52
+ function processEnv(name) {
53
+ if (typeof process === "undefined")
54
+ return undefined;
55
+ return process.env?.[name];
56
+ }
19
57
  const GLOBAL_KEY = "__agentNativeRequestContextAls";
20
58
  const OBSERVERS_KEY = "__agentNativeRequestContextObservers";
21
59
  const globalRef = globalThis;
22
60
  if (!globalRef[GLOBAL_KEY]) {
23
- globalRef[GLOBAL_KEY] = new AsyncLocalStorage();
61
+ globalRef[GLOBAL_KEY] = AsyncLocalStorageCtor
62
+ ? new AsyncLocalStorageCtor()
63
+ : new StackAsyncLocalStorage();
24
64
  }
25
65
  if (!globalRef[OBSERVERS_KEY]) {
26
66
  globalRef[OBSERVERS_KEY] = [];
@@ -105,7 +145,7 @@ export function getRequestUserEmail() {
105
145
  markAuthContextAccess(store);
106
146
  return store.userEmail;
107
147
  }
108
- return process.env.AGENT_USER_EMAIL;
148
+ return processEnv("AGENT_USER_EMAIL");
109
149
  }
110
150
  /**
111
151
  * Get the current request's display name, when the auth provider supplied one.
@@ -121,7 +161,7 @@ export function getRequestUserName() {
121
161
  markAuthContextAccess(store);
122
162
  return store.userName;
123
163
  }
124
- return process.env.AGENT_USER_NAME;
164
+ return processEnv("AGENT_USER_NAME");
125
165
  }
126
166
  /**
127
167
  * Get the current request's org ID.
@@ -137,7 +177,7 @@ export function getRequestOrgId() {
137
177
  markAuthContextAccess(store);
138
178
  return store.orgId;
139
179
  }
140
- return process.env.AGENT_ORG_ID;
180
+ return processEnv("AGENT_ORG_ID");
141
181
  }
142
182
  function markAuthContextAccess(ctx) {
143
183
  if (!ctx)
@@ -160,7 +200,7 @@ export function getRequestTimezone() {
160
200
  const store = als.getStore();
161
201
  if (store !== undefined)
162
202
  return store.timezone;
163
- return process.env.AGENT_USER_TIMEZONE;
203
+ return processEnv("AGENT_USER_TIMEZONE");
164
204
  }
165
205
  /**
166
206
  * Returns true when this request is on an integration-platform path (Slack,