@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
@@ -1 +1 @@
1
- {"version":3,"file":"request-context.js","sourceRoot":"","sources":["../../src/server/request-context.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Per-request context using AsyncLocalStorage.\n *\n * Replaces the unsafe pattern of mutating `process.env.AGENT_USER_EMAIL` /\n * `process.env.AGENT_ORG_ID` on every request. On Node.js (Netlify, self-hosted)\n * concurrent requests would overwrite each other's env vars. AsyncLocalStorage\n * gives each async call-chain its own isolated context.\n *\n * Supported on all deployment targets:\n * - Node.js (native)\n * - Cloudflare Workers (via nodejs_compat flag)\n * - Deno Deploy (via node:async_hooks compat)\n *\n * For CLI scripts that run outside a request context, the getters fall back to\n * process.env so existing `AGENT_USER_EMAIL=x pnpm action foo` invocations\n * continue to work.\n */\nimport { AsyncLocalStorage } from \"node:async_hooks\";\n\n/**\n * Per-request agent-run state. Lives on `RequestContext.run` so the\n * agent-chat plugin can populate fields as the run progresses (owner,\n * resolved API key, system prompt, engine, model, threadId) without\n * mutating module-scope `let` bindings — those leak across concurrent\n * requests on a single Node.js process.\n *\n * Mutated in-place by `prepareRun`, `onEngineResolved`, `onRunStart` so\n * tool factory closures (automation, fetch, team, builder-browser) read\n * the live per-request value via `getRequestRunContext()`.\n */\nexport interface RequestRunContext {\n /** Origin of the current request (used by the builder-browser tool). */\n requestOrigin?: string;\n /** Stable browser tab id for tab-scoped app-state reads/writes. */\n browserTabId?: string;\n /** Resource scope for the current chat thread, e.g. the active deck. */\n chatScope?: {\n type: string;\n id: string;\n label?: string;\n } | null;\n /** Resolved owner email (set by prepareRun). */\n owner?: string;\n /** Owner's active Anthropic API key (set by prepareRun). */\n userApiKey?: string;\n /** Thread ID for the current run (set by onRunStart). */\n threadId?: string;\n /** System prompt actually sent to the model for this run. */\n systemPrompt?: string;\n /** Engine instance for this run (set by onEngineResolved). */\n engine?: import(\"../agent/engine/types.js\").AgentEngine;\n /** Model name for this run (set by onEngineResolved). */\n model?: string;\n /**\n * True when this run is executing inside the durable background-function\n * worker (the `_process-run` self-dispatch), not the synchronous foreground\n * request. Template `extraContext` / system-prompt builders can read this to\n * skip heavy, hang-prone enrichment (large data-dictionary DB reads, etc.)\n * in the worker so it reliably claims its run within the setup budget.\n */\n isBackgroundWorker?: boolean;\n /** Tool calls made so far in the current agent loop. */\n toolCalls?: Array<{ name: string; input: unknown }>;\n /** Tool results returned so far in the current agent loop. */\n toolResults?: Array<{ name: string; content: string; isError: boolean }>;\n}\n\nexport interface RequestContext {\n userEmail?: string;\n userName?: string;\n orgId?: string;\n timezone?: string;\n /**\n * Set when code reads authenticated request context. Public SSR shell/data\n * should not depend on this value; user/org-specific reads belong behind\n * client-side actions/API after hydration.\n */\n authContextAccessed?: boolean;\n /**\n * Origin of the inbound request (e.g. `http://127.0.0.1:8100`). Set by the\n * MCP mount from the request headers so actions that build externally\n * fetchable URLs (e.g. design `export-coding-handoff`'s signed raw-code URL)\n * resolve the real local-workspace origin instead of a prod/localhost\n * fallback. Optional — absent on paths that don't populate it.\n */\n requestOrigin?: string;\n /**\n * True when this request is being processed by an integration-platform\n * webhook (Slack, Telegram, etc.) where the function timeout is the\n * binding constraint. Code that calls slow remote APIs can use this to apply\n * tighter budgets on this path while leaving normal agent-chat callers\n * (5+ min budget) unaffected.\n */\n isIntegrationCaller?: boolean;\n /**\n * Metadata for the currently-processing integration task. This lets tools\n * that start long-running remote work persist a continuation that can update\n * the originating platform thread after the current function budget ends.\n */\n integration?: {\n taskId: string;\n attempts?: number;\n incoming: import(\"../integrations/types.js\").IncomingMessage;\n placeholderRef?: string;\n };\n /**\n * Mutable per-request agent-run state. Populated by the agent-chat plugin\n * during a run; tool closures dereference it on each invocation.\n */\n run?: RequestRunContext;\n}\n\nconst GLOBAL_KEY = \"__agentNativeRequestContextAls\" as const;\nconst OBSERVERS_KEY = \"__agentNativeRequestContextObservers\" as const;\ntype RequestContextObserver = (ctx: RequestContext) => void;\ntype GlobalWithRequestContext = typeof globalThis & {\n [GLOBAL_KEY]?: AsyncLocalStorage<RequestContext>;\n [OBSERVERS_KEY]?: RequestContextObserver[];\n};\nconst globalRef = globalThis as GlobalWithRequestContext;\nif (!globalRef[GLOBAL_KEY]) {\n globalRef[GLOBAL_KEY] = new AsyncLocalStorage<RequestContext>();\n}\nif (!globalRef[OBSERVERS_KEY]) {\n globalRef[OBSERVERS_KEY] = [];\n}\nconst als = globalRef[GLOBAL_KEY]!;\nconst observers = globalRef[OBSERVERS_KEY]!;\n\n/**\n * Register a callback fired every time `runWithRequestContext` enters a new\n * scope. The hook runs INSIDE the AsyncLocalStorage scope, so observability\n * helpers that read the current isolation scope (e.g. Sentry) attach to the\n * right per-request context.\n *\n * Returned function unregisters the observer. Observers must never throw —\n * any error is swallowed so a misbehaving observer can't break the request\n * path.\n */\nexport function addRequestContextObserver(\n observer: RequestContextObserver,\n): () => void {\n observers.push(observer);\n return () => {\n const i = observers.indexOf(observer);\n if (i !== -1) observers.splice(i, 1);\n };\n}\n\n/**\n * Run a callback within a per-request context. The context is available to all\n * async operations spawned from `fn` via `getRequestUserEmail()` / `getRequestOrgId()`.\n *\n * Any registered `addRequestContextObserver` callbacks fire inside the new\n * scope before `fn` runs, so observability code can pin user/org info onto\n * isolation-scoped backends (Sentry, OpenTelemetry, etc.).\n */\nexport function runWithRequestContext<T>(\n ctx: RequestContext,\n fn: () => T | Promise<T>,\n): T | Promise<T> {\n return als.run(ctx, () => {\n if (observers.length > 0) {\n for (const obs of observers) {\n try {\n obs(ctx);\n } catch {\n // Observers must never break the request path.\n }\n }\n }\n return fn();\n });\n}\n\n/**\n * Return the active request context, if this call chain is running under one.\n *\n * This is intentionally distinct from `getRequestUserEmail()`: callers that\n * have an active context with no authenticated user must not fall through to\n * process-wide CLI fallbacks such as `AGENT_USER_EMAIL` or \"latest session\".\n */\nexport function getRequestContext(): RequestContext | undefined {\n const store = als.getStore();\n markAuthContextAccess(store);\n return store;\n}\n\n/**\n * True when AsyncLocalStorage has an active context for this call chain.\n * Useful for helpers that support both HTTP requests and standalone CLI runs.\n */\nexport function hasRequestContext(): boolean {\n return als.getStore() !== undefined;\n}\n\n/**\n * Get the current request's user email.\n *\n * - If a request context exists (HTTP/A2A path), returns its `userEmail` —\n * even when that value is `undefined`. The env fallback MUST NOT fire here:\n * a stale process-wide `AGENT_USER_EMAIL` from a CLI run or previous bug\n * would leak into an unauthenticated A2A/API call (e.g. unsigned or API-key\n * modes where `runWithRequestContext({ userEmail: undefined })` is used).\n * - Only when there is NO request context (CLI scripts) do we fall back to\n * `process.env.AGENT_USER_EMAIL`.\n */\nexport function getRequestUserEmail(): string | undefined {\n const store = als.getStore();\n if (store !== undefined) {\n if (store.userEmail) markAuthContextAccess(store);\n return store.userEmail;\n }\n return process.env.AGENT_USER_EMAIL;\n}\n\n/**\n * Get the current request's display name, when the auth provider supplied one.\n *\n * The same request-context fallback rules as `getRequestUserEmail()` apply:\n * HTTP/A2A calls only read AsyncLocalStorage, while CLI scripts may opt in via\n * `AGENT_USER_NAME`.\n */\nexport function getRequestUserName(): string | undefined {\n const store = als.getStore();\n if (store !== undefined) {\n if (store.userName) markAuthContextAccess(store);\n return store.userName;\n }\n return process.env.AGENT_USER_NAME;\n}\n\n/**\n * Get the current request's org ID.\n *\n * Same store-aware semantics as `getRequestUserEmail()` — env fallback is\n * CLI-only, so a request that explicitly has no org doesn't inherit a stale\n * `process.env.AGENT_ORG_ID` from a prior request on the same Lambda instance.\n */\nexport function getRequestOrgId(): string | undefined {\n const store = als.getStore();\n if (store !== undefined) {\n if (store.orgId) markAuthContextAccess(store);\n return store.orgId;\n }\n return process.env.AGENT_ORG_ID;\n}\n\nfunction markAuthContextAccess(ctx: RequestContext | undefined) {\n if (!ctx) return;\n if (ctx.userEmail || ctx.userName || ctx.orgId) {\n ctx.authContextAccessed = true;\n }\n}\n\nexport function hasAuthContextAccess(ctx: RequestContext | undefined): boolean {\n return Boolean(ctx?.authContextAccessed);\n}\n\n/**\n * Get the current request's IANA timezone (e.g. \"America/Los_Angeles\").\n * The UI sends this via the `x-user-timezone` header on every action call, and\n * the agent chat plugin propagates it into the request context so that\n * agent-initiated tool calls also see the user's timezone. Falls back to\n * `process.env.AGENT_USER_TIMEZONE` only for CLI scripts (no request context).\n */\nexport function getRequestTimezone(): string | undefined {\n const store = als.getStore();\n if (store !== undefined) return store.timezone;\n return process.env.AGENT_USER_TIMEZONE;\n}\n\n/**\n * Returns true when this request is on an integration-platform path (Slack,\n * Telegram, etc.) — i.e. we're inside the integration plugin's processor\n * function and the platform's deliver-by deadline plus the host's function\n * timeout are the binding budget. Non-integration callers (CLI, normal\n * agent chat) should treat this as `false`.\n */\nexport function isIntegrationCallerRequest(): boolean {\n return als.getStore()?.isIntegrationCaller === true;\n}\n\nexport function getIntegrationRequestContext():\n | NonNullable<RequestContext[\"integration\"]>\n | undefined {\n return als.getStore()?.integration;\n}\n\n/**\n * Convenience: returns `{ userEmail, orgId }` from the active request context,\n * suitable for passing to `resolveCredential(key, ctx)`. Returns `null` when\n * no user is associated with the call (e.g. an unauthenticated public route).\n *\n * For framework actions auto-mounted at `/_agent-native/actions/...` this is\n * always populated because action-routes wraps every invocation in\n * `runWithRequestContext`. For hand-written `/api/*` routes the calling code\n * is responsible for setting up the context (see `runWithRequestContext`).\n */\nexport function getCredentialContext(): {\n userEmail: string;\n orgId: string | null;\n} | null {\n const userEmail = getRequestUserEmail();\n if (!userEmail) return null;\n return { userEmail, orgId: getRequestOrgId() ?? null };\n}\n\n/**\n * Get the active request's mutable agent-run state. Returns `undefined` when\n * called outside an agent run (e.g. before `prepareRun` or in a non-agent\n * code path). Callers must tolerate the field absence; use the helper\n * `requireRequestRunContext()` if missing context is a programming error.\n */\nexport function getRequestRunContext(): RequestRunContext | undefined {\n const store = als.getStore();\n if (!store) return undefined;\n return store.run;\n}\n\n/**\n * Ensure a `RequestRunContext` exists on the active request store and\n * return it. Used by the agent-chat handler to attach run state once it\n * starts processing a chat request. Returns `undefined` if there is no\n * active request store (caller should not be invoking this outside ALS).\n */\nexport function ensureRequestRunContext(): RequestRunContext | undefined {\n const store = als.getStore();\n if (!store) return undefined;\n if (!store.run) store.run = {};\n return store.run;\n}\n"]}
1
+ {"version":3,"file":"request-context.js","sourceRoot":"","sources":["../../src/server/request-context.ts"],"names":[],"mappings":"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","sourcesContent":["/**\n * Per-request context using AsyncLocalStorage.\n *\n * Replaces the unsafe pattern of mutating `process.env.AGENT_USER_EMAIL` /\n * `process.env.AGENT_ORG_ID` on every request. On Node.js (Netlify, self-hosted)\n * concurrent requests would overwrite each other's env vars. AsyncLocalStorage\n * gives each async call-chain its own isolated context.\n *\n * Supported on all deployment targets:\n * - Node.js (native)\n * - Cloudflare Workers (via nodejs_compat flag)\n * - Deno Deploy (via node:async_hooks compat)\n *\n * For CLI scripts that run outside a request context, the getters fall back to\n * process.env so existing `AGENT_USER_EMAIL=x pnpm action foo` invocations\n * continue to work.\n */\n\ntype AsyncLocalStorageLike<T> = {\n getStore(): T | undefined;\n run<R>(store: T, callback: () => R): R;\n};\n\ntype AsyncLocalStorageCtor = new <T>() => AsyncLocalStorageLike<T>;\n\nclass StackAsyncLocalStorage<T> implements AsyncLocalStorageLike<T> {\n private readonly stack: T[] = [];\n\n getStore(): T | undefined {\n return this.stack.at(-1);\n }\n\n run<R>(store: T, callback: () => R): R {\n this.stack.push(store);\n try {\n const result = callback();\n const maybePromise = result as unknown as\n | { finally?: (callback: () => void) => unknown }\n | undefined;\n if (maybePromise && typeof maybePromise.finally === \"function\") {\n return maybePromise.finally(() => {\n this.stack.pop();\n }) as R;\n }\n this.stack.pop();\n return result;\n } catch (error) {\n this.stack.pop();\n throw error;\n }\n }\n}\n\nfunction getAsyncLocalStorageCtor(): AsyncLocalStorageCtor | 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:async_hooks\")?.AsyncLocalStorage as\n | AsyncLocalStorageCtor\n | undefined;\n}\n\nconst AsyncLocalStorageCtor = getAsyncLocalStorageCtor();\n\nfunction processEnv(name: string): string | undefined {\n if (typeof process === \"undefined\") return undefined;\n return process.env?.[name];\n}\n\n/**\n * Per-request agent-run state. Lives on `RequestContext.run` so the\n * agent-chat plugin can populate fields as the run progresses (owner,\n * resolved API key, system prompt, engine, model, threadId) without\n * mutating module-scope `let` bindings — those leak across concurrent\n * requests on a single Node.js process.\n *\n * Mutated in-place by `prepareRun`, `onEngineResolved`, `onRunStart` so\n * tool factory closures (automation, fetch, team, builder-browser) read\n * the live per-request value via `getRequestRunContext()`.\n */\nexport interface RequestRunContext {\n /** Origin of the current request (used by the builder-browser tool). */\n requestOrigin?: string;\n /** Stable browser tab id for tab-scoped app-state reads/writes. */\n browserTabId?: string;\n /** Resource scope for the current chat thread, e.g. the active deck. */\n chatScope?: {\n type: string;\n id: string;\n label?: string;\n } | null;\n /** Resolved owner email (set by prepareRun). */\n owner?: string;\n /** Owner's active Anthropic API key (set by prepareRun). */\n userApiKey?: string;\n /** Thread ID for the current run (set by onRunStart). */\n threadId?: string;\n /** System prompt actually sent to the model for this run. */\n systemPrompt?: string;\n /** Engine instance for this run (set by onEngineResolved). */\n engine?: import(\"../agent/engine/types.js\").AgentEngine;\n /** Model name for this run (set by onEngineResolved). */\n model?: string;\n /**\n * True when this run is executing inside the durable background-function\n * worker (the `_process-run` self-dispatch), not the synchronous foreground\n * request. Template `extraContext` / system-prompt builders can read this to\n * skip heavy, hang-prone enrichment (large data-dictionary DB reads, etc.)\n * in the worker so it reliably claims its run within the setup budget.\n */\n isBackgroundWorker?: boolean;\n /** Tool calls made so far in the current agent loop. */\n toolCalls?: Array<{ name: string; input: unknown }>;\n /** Tool results returned so far in the current agent loop. */\n toolResults?: Array<{ name: string; content: string; isError: boolean }>;\n}\n\nexport interface RequestContext {\n userEmail?: string;\n userName?: string;\n orgId?: string;\n timezone?: string;\n /**\n * Set when code reads authenticated request context. Public SSR shell/data\n * should not depend on this value; user/org-specific reads belong behind\n * client-side actions/API after hydration.\n */\n authContextAccessed?: boolean;\n /**\n * Origin of the inbound request (e.g. `http://127.0.0.1:8100`). Set by the\n * MCP mount from the request headers so actions that build externally\n * fetchable URLs (e.g. design `export-coding-handoff`'s signed raw-code URL)\n * resolve the real local-workspace origin instead of a prod/localhost\n * fallback. Optional — absent on paths that don't populate it.\n */\n requestOrigin?: string;\n /**\n * True when this request is being processed by an integration-platform\n * webhook (Slack, Telegram, etc.) where the function timeout is the\n * binding constraint. Code that calls slow remote APIs can use this to apply\n * tighter budgets on this path while leaving normal agent-chat callers\n * (5+ min budget) unaffected.\n */\n isIntegrationCaller?: boolean;\n /**\n * Metadata for the currently-processing integration task. This lets tools\n * that start long-running remote work persist a continuation that can update\n * the originating platform thread after the current function budget ends.\n */\n integration?: {\n taskId: string;\n attempts?: number;\n incoming: import(\"../integrations/types.js\").IncomingMessage;\n placeholderRef?: string;\n };\n /**\n * Mutable per-request agent-run state. Populated by the agent-chat plugin\n * during a run; tool closures dereference it on each invocation.\n */\n run?: RequestRunContext;\n}\n\nconst GLOBAL_KEY = \"__agentNativeRequestContextAls\" as const;\nconst OBSERVERS_KEY = \"__agentNativeRequestContextObservers\" as const;\ntype RequestContextObserver = (ctx: RequestContext) => void;\ntype GlobalWithRequestContext = typeof globalThis & {\n [GLOBAL_KEY]?: AsyncLocalStorageLike<RequestContext>;\n [OBSERVERS_KEY]?: RequestContextObserver[];\n};\nconst globalRef = globalThis as GlobalWithRequestContext;\nif (!globalRef[GLOBAL_KEY]) {\n globalRef[GLOBAL_KEY] = AsyncLocalStorageCtor\n ? new AsyncLocalStorageCtor<RequestContext>()\n : new StackAsyncLocalStorage<RequestContext>();\n}\nif (!globalRef[OBSERVERS_KEY]) {\n globalRef[OBSERVERS_KEY] = [];\n}\nconst als = globalRef[GLOBAL_KEY]!;\nconst observers = globalRef[OBSERVERS_KEY]!;\n\n/**\n * Register a callback fired every time `runWithRequestContext` enters a new\n * scope. The hook runs INSIDE the AsyncLocalStorage scope, so observability\n * helpers that read the current isolation scope (e.g. Sentry) attach to the\n * right per-request context.\n *\n * Returned function unregisters the observer. Observers must never throw —\n * any error is swallowed so a misbehaving observer can't break the request\n * path.\n */\nexport function addRequestContextObserver(\n observer: RequestContextObserver,\n): () => void {\n observers.push(observer);\n return () => {\n const i = observers.indexOf(observer);\n if (i !== -1) observers.splice(i, 1);\n };\n}\n\n/**\n * Run a callback within a per-request context. The context is available to all\n * async operations spawned from `fn` via `getRequestUserEmail()` / `getRequestOrgId()`.\n *\n * Any registered `addRequestContextObserver` callbacks fire inside the new\n * scope before `fn` runs, so observability code can pin user/org info onto\n * isolation-scoped backends (Sentry, OpenTelemetry, etc.).\n */\nexport function runWithRequestContext<T>(\n ctx: RequestContext,\n fn: () => T | Promise<T>,\n): T | Promise<T> {\n return als.run(ctx, () => {\n if (observers.length > 0) {\n for (const obs of observers) {\n try {\n obs(ctx);\n } catch {\n // Observers must never break the request path.\n }\n }\n }\n return fn();\n });\n}\n\n/**\n * Return the active request context, if this call chain is running under one.\n *\n * This is intentionally distinct from `getRequestUserEmail()`: callers that\n * have an active context with no authenticated user must not fall through to\n * process-wide CLI fallbacks such as `AGENT_USER_EMAIL` or \"latest session\".\n */\nexport function getRequestContext(): RequestContext | undefined {\n const store = als.getStore();\n markAuthContextAccess(store);\n return store;\n}\n\n/**\n * True when AsyncLocalStorage has an active context for this call chain.\n * Useful for helpers that support both HTTP requests and standalone CLI runs.\n */\nexport function hasRequestContext(): boolean {\n return als.getStore() !== undefined;\n}\n\n/**\n * Get the current request's user email.\n *\n * - If a request context exists (HTTP/A2A path), returns its `userEmail` —\n * even when that value is `undefined`. The env fallback MUST NOT fire here:\n * a stale process-wide `AGENT_USER_EMAIL` from a CLI run or previous bug\n * would leak into an unauthenticated A2A/API call (e.g. unsigned or API-key\n * modes where `runWithRequestContext({ userEmail: undefined })` is used).\n * - Only when there is NO request context (CLI scripts) do we fall back to\n * `process.env.AGENT_USER_EMAIL`.\n */\nexport function getRequestUserEmail(): string | undefined {\n const store = als.getStore();\n if (store !== undefined) {\n if (store.userEmail) markAuthContextAccess(store);\n return store.userEmail;\n }\n return processEnv(\"AGENT_USER_EMAIL\");\n}\n\n/**\n * Get the current request's display name, when the auth provider supplied one.\n *\n * The same request-context fallback rules as `getRequestUserEmail()` apply:\n * HTTP/A2A calls only read AsyncLocalStorage, while CLI scripts may opt in via\n * `AGENT_USER_NAME`.\n */\nexport function getRequestUserName(): string | undefined {\n const store = als.getStore();\n if (store !== undefined) {\n if (store.userName) markAuthContextAccess(store);\n return store.userName;\n }\n return processEnv(\"AGENT_USER_NAME\");\n}\n\n/**\n * Get the current request's org ID.\n *\n * Same store-aware semantics as `getRequestUserEmail()` — env fallback is\n * CLI-only, so a request that explicitly has no org doesn't inherit a stale\n * `process.env.AGENT_ORG_ID` from a prior request on the same Lambda instance.\n */\nexport function getRequestOrgId(): string | undefined {\n const store = als.getStore();\n if (store !== undefined) {\n if (store.orgId) markAuthContextAccess(store);\n return store.orgId;\n }\n return processEnv(\"AGENT_ORG_ID\");\n}\n\nfunction markAuthContextAccess(ctx: RequestContext | undefined) {\n if (!ctx) return;\n if (ctx.userEmail || ctx.userName || ctx.orgId) {\n ctx.authContextAccessed = true;\n }\n}\n\nexport function hasAuthContextAccess(ctx: RequestContext | undefined): boolean {\n return Boolean(ctx?.authContextAccessed);\n}\n\n/**\n * Get the current request's IANA timezone (e.g. \"America/Los_Angeles\").\n * The UI sends this via the `x-user-timezone` header on every action call, and\n * the agent chat plugin propagates it into the request context so that\n * agent-initiated tool calls also see the user's timezone. Falls back to\n * `process.env.AGENT_USER_TIMEZONE` only for CLI scripts (no request context).\n */\nexport function getRequestTimezone(): string | undefined {\n const store = als.getStore();\n if (store !== undefined) return store.timezone;\n return processEnv(\"AGENT_USER_TIMEZONE\");\n}\n\n/**\n * Returns true when this request is on an integration-platform path (Slack,\n * Telegram, etc.) — i.e. we're inside the integration plugin's processor\n * function and the platform's deliver-by deadline plus the host's function\n * timeout are the binding budget. Non-integration callers (CLI, normal\n * agent chat) should treat this as `false`.\n */\nexport function isIntegrationCallerRequest(): boolean {\n return als.getStore()?.isIntegrationCaller === true;\n}\n\nexport function getIntegrationRequestContext():\n | NonNullable<RequestContext[\"integration\"]>\n | undefined {\n return als.getStore()?.integration;\n}\n\n/**\n * Convenience: returns `{ userEmail, orgId }` from the active request context,\n * suitable for passing to `resolveCredential(key, ctx)`. Returns `null` when\n * no user is associated with the call (e.g. an unauthenticated public route).\n *\n * For framework actions auto-mounted at `/_agent-native/actions/...` this is\n * always populated because action-routes wraps every invocation in\n * `runWithRequestContext`. For hand-written `/api/*` routes the calling code\n * is responsible for setting up the context (see `runWithRequestContext`).\n */\nexport function getCredentialContext(): {\n userEmail: string;\n orgId: string | null;\n} | null {\n const userEmail = getRequestUserEmail();\n if (!userEmail) return null;\n return { userEmail, orgId: getRequestOrgId() ?? null };\n}\n\n/**\n * Get the active request's mutable agent-run state. Returns `undefined` when\n * called outside an agent run (e.g. before `prepareRun` or in a non-agent\n * code path). Callers must tolerate the field absence; use the helper\n * `requireRequestRunContext()` if missing context is a programming error.\n */\nexport function getRequestRunContext(): RequestRunContext | undefined {\n const store = als.getStore();\n if (!store) return undefined;\n return store.run;\n}\n\n/**\n * Ensure a `RequestRunContext` exists on the active request store and\n * return it. Used by the agent-chat handler to attach run state once it\n * starts processing a chat request. Returns `undefined` if there is no\n * active request store (caller should not be invoking this outside ALS).\n */\nexport function ensureRequestRunContext(): RequestRunContext | undefined {\n const store = als.getStore();\n if (!store) return undefined;\n if (!store.run) store.run = {};\n return store.run;\n}\n"]}
@@ -20,7 +20,7 @@ export declare function createTranscribeVoiceHandler(): import("h3").EventHandle
20
20
  error: string;
21
21
  text?: undefined;
22
22
  } | {
23
- error?: undefined;
24
23
  text: string;
24
+ error?: undefined;
25
25
  }>>;
26
26
  //# sourceMappingURL=transcribe-voice.d.ts.map
@@ -0,0 +1,29 @@
1
+ export declare const AGENT_ACCESS_PARAM = "agent_access";
2
+ export declare const DEFAULT_AGENT_ACCESS_TTL_SECONDS: number;
3
+ export interface AgentAccessResourceScope {
4
+ resourceKind: string;
5
+ resourceId: string;
6
+ }
7
+ export interface AgentAccessUrlOptions {
8
+ origin?: string;
9
+ basePath?: string;
10
+ tokenParam?: string;
11
+ }
12
+ export interface AgentAccessApiUrlOptions extends AgentAccessUrlOptions {
13
+ endpoint: string;
14
+ resourceId: string;
15
+ idParam?: string;
16
+ token?: string | null;
17
+ extraParams?: Array<[string, string | number | boolean | null | undefined]>;
18
+ }
19
+ export declare function scopedAgentAccessResourceId(resourceKind: string, resourceId: string): string;
20
+ export declare function normalizeAgentAccessBasePath(basePath?: string): string;
21
+ export declare function normalizeAgentAccessOrigin(origin?: string): string;
22
+ export declare function toAgentAccessUrl(pathOrUrl: string, options?: Pick<AgentAccessUrlOptions, "origin" | "basePath">): string;
23
+ export declare function appendAgentAccessParam(urlOrPath: string, token: string, param?: string): string;
24
+ export declare function buildAgentAccessUrl({ path, token, origin, basePath, tokenParam, }: AgentAccessUrlOptions & {
25
+ path: string;
26
+ token: string;
27
+ }): string;
28
+ export declare function buildAgentAccessApiUrl({ endpoint, resourceId, idParam, token, tokenParam, extraParams, origin, basePath, }: AgentAccessApiUrlOptions): string;
29
+ //# sourceMappingURL=agent-access.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-access.d.ts","sourceRoot":"","sources":["../../src/shared/agent-access.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB,iBAAiB,CAAC;AACjD,eAAO,MAAM,gCAAgC,QAAc,CAAC;AAE5D,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC,CAAC;CAC7E;AAQD,wBAAgB,2BAA2B,CACzC,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM,GACjB,MAAM,CAER;AAMD,wBAAgB,4BAA4B,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAGtE;AAED,wBAAgB,0BAA0B,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAGlE;AAMD,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,IAAI,CAAC,qBAAqB,EAAE,QAAQ,GAAG,UAAU,CAAM,GAC/D,MAAM,CAIR;AAED,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,KAAK,SAAqB,GACzB,MAAM,CAMR;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,MAAM,EACN,QAAQ,EACR,UAA+B,GAChC,EAAE,qBAAqB,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CAMT;AAED,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,UAAU,EACV,OAAc,EACd,KAAK,EACL,UAA+B,EAC/B,WAAW,EACX,MAAM,EACN,QAAQ,GACT,EAAE,wBAAwB,GAAG,MAAM,CAWnC"}
@@ -0,0 +1,57 @@
1
+ export const AGENT_ACCESS_PARAM = "agent_access";
2
+ export const DEFAULT_AGENT_ACCESS_TTL_SECONDS = 2 * 60 * 60;
3
+ function normalizeResourcePart(value, label) {
4
+ const trimmed = value.trim();
5
+ if (!trimmed)
6
+ throw new Error(`${label} is required`);
7
+ return trimmed;
8
+ }
9
+ export function scopedAgentAccessResourceId(resourceKind, resourceId) {
10
+ return `${normalizeResourcePart(resourceKind, "resourceKind")}:${normalizeResourcePart(resourceId, "resourceId")}`;
11
+ }
12
+ function trimSlashes(value) {
13
+ return value.replace(/^\/+|\/+$/g, "");
14
+ }
15
+ export function normalizeAgentAccessBasePath(basePath) {
16
+ const trimmed = trimSlashes(basePath ?? "");
17
+ return trimmed ? `/${trimmed}` : "";
18
+ }
19
+ export function normalizeAgentAccessOrigin(origin) {
20
+ if (!origin)
21
+ return "";
22
+ return origin.replace(/\/+$/g, "");
23
+ }
24
+ function isAbsoluteUrl(value) {
25
+ return /^[a-z][a-z0-9+.-]*:\/\//i.test(value);
26
+ }
27
+ export function toAgentAccessUrl(pathOrUrl, options = {}) {
28
+ if (isAbsoluteUrl(pathOrUrl))
29
+ return pathOrUrl;
30
+ const path = pathOrUrl.startsWith("/") ? pathOrUrl : `/${pathOrUrl}`;
31
+ return `${normalizeAgentAccessOrigin(options.origin)}${normalizeAgentAccessBasePath(options.basePath)}${path}`;
32
+ }
33
+ export function appendAgentAccessParam(urlOrPath, token, param = AGENT_ACCESS_PARAM) {
34
+ const hashIndex = urlOrPath.indexOf("#");
35
+ const base = hashIndex >= 0 ? urlOrPath.slice(0, hashIndex) : urlOrPath;
36
+ const hash = hashIndex >= 0 ? urlOrPath.slice(hashIndex) : "";
37
+ const sep = base.includes("?") ? "&" : "?";
38
+ return `${base}${sep}${encodeURIComponent(param)}=${encodeURIComponent(token)}${hash}`;
39
+ }
40
+ export function buildAgentAccessUrl({ path, token, origin, basePath, tokenParam = AGENT_ACCESS_PARAM, }) {
41
+ return appendAgentAccessParam(toAgentAccessUrl(path, { origin, basePath }), token, tokenParam);
42
+ }
43
+ export function buildAgentAccessApiUrl({ endpoint, resourceId, idParam = "id", token, tokenParam = AGENT_ACCESS_PARAM, extraParams, origin, basePath, }) {
44
+ const params = new URLSearchParams({ [idParam]: resourceId });
45
+ if (token)
46
+ params.set(tokenParam, token);
47
+ for (const [key, value] of extraParams ?? []) {
48
+ if (value === undefined || value === null || value === "")
49
+ continue;
50
+ params.set(key, String(value));
51
+ }
52
+ return toAgentAccessUrl(`${endpoint}?${params.toString()}`, {
53
+ origin,
54
+ basePath,
55
+ });
56
+ }
57
+ //# sourceMappingURL=agent-access.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-access.js","sourceRoot":"","sources":["../../src/shared/agent-access.ts"],"names":[],"mappings":"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","sourcesContent":["export const AGENT_ACCESS_PARAM = \"agent_access\";\nexport const DEFAULT_AGENT_ACCESS_TTL_SECONDS = 2 * 60 * 60;\n\nexport interface AgentAccessResourceScope {\n resourceKind: string;\n resourceId: string;\n}\n\nexport interface AgentAccessUrlOptions {\n origin?: string;\n basePath?: string;\n tokenParam?: string;\n}\n\nexport interface AgentAccessApiUrlOptions extends AgentAccessUrlOptions {\n endpoint: string;\n resourceId: string;\n idParam?: string;\n token?: string | null;\n extraParams?: Array<[string, string | number | boolean | null | undefined]>;\n}\n\nfunction normalizeResourcePart(value: string, label: string): string {\n const trimmed = value.trim();\n if (!trimmed) throw new Error(`${label} is required`);\n return trimmed;\n}\n\nexport function scopedAgentAccessResourceId(\n resourceKind: string,\n resourceId: string,\n): string {\n return `${normalizeResourcePart(resourceKind, \"resourceKind\")}:${normalizeResourcePart(resourceId, \"resourceId\")}`;\n}\n\nfunction trimSlashes(value: string): string {\n return value.replace(/^\\/+|\\/+$/g, \"\");\n}\n\nexport function normalizeAgentAccessBasePath(basePath?: string): string {\n const trimmed = trimSlashes(basePath ?? \"\");\n return trimmed ? `/${trimmed}` : \"\";\n}\n\nexport function normalizeAgentAccessOrigin(origin?: string): string {\n if (!origin) return \"\";\n return origin.replace(/\\/+$/g, \"\");\n}\n\nfunction isAbsoluteUrl(value: string): boolean {\n return /^[a-z][a-z0-9+.-]*:\\/\\//i.test(value);\n}\n\nexport function toAgentAccessUrl(\n pathOrUrl: string,\n options: Pick<AgentAccessUrlOptions, \"origin\" | \"basePath\"> = {},\n): string {\n if (isAbsoluteUrl(pathOrUrl)) return pathOrUrl;\n const path = pathOrUrl.startsWith(\"/\") ? pathOrUrl : `/${pathOrUrl}`;\n return `${normalizeAgentAccessOrigin(options.origin)}${normalizeAgentAccessBasePath(options.basePath)}${path}`;\n}\n\nexport function appendAgentAccessParam(\n urlOrPath: string,\n token: string,\n param = AGENT_ACCESS_PARAM,\n): string {\n const hashIndex = urlOrPath.indexOf(\"#\");\n const base = hashIndex >= 0 ? urlOrPath.slice(0, hashIndex) : urlOrPath;\n const hash = hashIndex >= 0 ? urlOrPath.slice(hashIndex) : \"\";\n const sep = base.includes(\"?\") ? \"&\" : \"?\";\n return `${base}${sep}${encodeURIComponent(param)}=${encodeURIComponent(token)}${hash}`;\n}\n\nexport function buildAgentAccessUrl({\n path,\n token,\n origin,\n basePath,\n tokenParam = AGENT_ACCESS_PARAM,\n}: AgentAccessUrlOptions & {\n path: string;\n token: string;\n}): string {\n return appendAgentAccessParam(\n toAgentAccessUrl(path, { origin, basePath }),\n token,\n tokenParam,\n );\n}\n\nexport function buildAgentAccessApiUrl({\n endpoint,\n resourceId,\n idParam = \"id\",\n token,\n tokenParam = AGENT_ACCESS_PARAM,\n extraParams,\n origin,\n basePath,\n}: AgentAccessApiUrlOptions): string {\n const params = new URLSearchParams({ [idParam]: resourceId });\n if (token) params.set(tokenParam, token);\n for (const [key, value] of extraParams ?? []) {\n if (value === undefined || value === null || value === \"\") continue;\n params.set(key, String(value));\n }\n return toAgentAccessUrl(`${endpoint}?${params.toString()}`, {\n origin,\n basePath,\n });\n}\n"]}
@@ -8,4 +8,5 @@ export { DEFAULT_WORKSPACE_APP_AUDIENCE, WORKSPACE_APP_AUDIENCES, normalizeWorks
8
8
  export { AGENT_NATIVE_OPEN_PATH, AGENT_SIDEBAR_QUERY_PARAM, AGENT_SIDEBAR_QUERY_VALUE_CLOSED, isAgentNativeOpenDeepLink, withCollapsedAgentSidebarParam, } from "./agent-sidebar-url.js";
9
9
  export { AGENT_NATIVE_DEFAULT_SOCIAL_IMAGE, AGENT_NATIVE_SOCIAL_IMAGE_CACHE_BUSTER, AGENT_NATIVE_SOCIAL_IMAGE_ALT, AGENT_NATIVE_SOCIAL_IMAGE_HEIGHT, AGENT_NATIVE_SOCIAL_IMAGE_PATH, AGENT_NATIVE_SOCIAL_IMAGE_TYPE, AGENT_NATIVE_SOCIAL_IMAGE_WIDTH, defaultSocialImageMeta, withAgentNativeSocialImageCacheBuster, withDefaultSocialImage, type SocialMetaDescriptor, } from "./social-meta.js";
10
10
  export { EMBED_MODE_QUERY_PARAM, EMBED_SESSION_COOKIE, EMBED_START_PATH, EMBED_TOKEN_QUERY_PARAM, } from "./embed-auth.js";
11
+ export { AGENT_ACCESS_PARAM, DEFAULT_AGENT_ACCESS_TTL_SECONDS, appendAgentAccessParam, buildAgentAccessApiUrl, buildAgentAccessUrl, normalizeAgentAccessBasePath, normalizeAgentAccessOrigin, scopedAgentAccessResourceId, toAgentAccessUrl, type AgentAccessApiUrlOptions, type AgentAccessResourceScope, type AgentAccessUrlOptions, } from "./agent-access.js";
11
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACtB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,yBAAyB,EACzB,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC3B,mCAAmC,EACnC,8BAA8B,EAC9B,sCAAsC,EACtC,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iCAAiC,EACjC,sCAAsC,EACtC,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,qCAAqC,EACrC,sBAAsB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,EACtB,KAAK,mBAAmB,GACzB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,yBAAyB,EACzB,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC3B,mCAAmC,EACnC,8BAA8B,EAC9B,sCAAsC,EACtC,KAAK,uBAAuB,EAC5B,KAAK,iCAAiC,EACtC,KAAK,oBAAoB,GAC1B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iCAAiC,EACjC,sCAAsC,EACtC,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,qCAAqC,EACrC,sBAAsB,EACtB,KAAK,oBAAoB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,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,mBAAmB,CAAC"}
@@ -8,4 +8,5 @@ export { DEFAULT_WORKSPACE_APP_AUDIENCE, WORKSPACE_APP_AUDIENCES, normalizeWorks
8
8
  export { AGENT_NATIVE_OPEN_PATH, AGENT_SIDEBAR_QUERY_PARAM, AGENT_SIDEBAR_QUERY_VALUE_CLOSED, isAgentNativeOpenDeepLink, withCollapsedAgentSidebarParam, } from "./agent-sidebar-url.js";
9
9
  export { AGENT_NATIVE_DEFAULT_SOCIAL_IMAGE, AGENT_NATIVE_SOCIAL_IMAGE_CACHE_BUSTER, AGENT_NATIVE_SOCIAL_IMAGE_ALT, AGENT_NATIVE_SOCIAL_IMAGE_HEIGHT, AGENT_NATIVE_SOCIAL_IMAGE_PATH, AGENT_NATIVE_SOCIAL_IMAGE_TYPE, AGENT_NATIVE_SOCIAL_IMAGE_WIDTH, defaultSocialImageMeta, withAgentNativeSocialImageCacheBuster, withDefaultSocialImage, } from "./social-meta.js";
10
10
  export { EMBED_MODE_QUERY_PARAM, EMBED_SESSION_COOKIE, EMBED_START_PATH, EMBED_TOKEN_QUERY_PARAM, } from "./embed-auth.js";
11
+ export { AGENT_ACCESS_PARAM, DEFAULT_AGENT_ACCESS_TTL_SECONDS, appendAgentAccessParam, buildAgentAccessApiUrl, buildAgentAccessUrl, normalizeAgentAccessBasePath, normalizeAgentAccessOrigin, scopedAgentAccessResourceId, toAgentAccessUrl, } from "./agent-access.js";
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,GAIV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,GAEvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,yBAAyB,EACzB,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC3B,mCAAmC,EACnC,8BAA8B,EAC9B,sCAAsC,GAIvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iCAAiC,EACjC,sCAAsC,EACtC,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,qCAAqC,EACrC,sBAAsB,GAEvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC","sourcesContent":["export {\n agentChat,\n type AgentChatMessage,\n type AgentChatCallOptions,\n type AgentChatResponse,\n} from \"./agent-chat.js\";\nexport { agentEnv, type EnvVar } from \"./agent-env.js\";\nexport { extractOAuthStateAppId } from \"./oauth-state.js\";\nexport { truncate } from \"./truncate.js\";\nexport {\n llmConnectionTrackingProperties,\n normalizeLlmConnection,\n type LlmConnectionStatus,\n} from \"./llm-connection.js\";\nexport {\n DISPATCH_WORKSPACE_ROOT_REDIRECTS,\n RESERVED_WORKSPACE_APP_IDS,\n assertValidWorkspaceAppId,\n getWorkspaceAppIdValidationError,\n isValidWorkspaceAppIdFormat,\n} from \"./workspace-app-id.js\";\nexport {\n DEFAULT_WORKSPACE_APP_AUDIENCE,\n WORKSPACE_APP_AUDIENCES,\n normalizeWorkspaceAppAudience,\n normalizeWorkspaceAppPathList,\n workspaceAppAudienceFromEnv,\n workspaceAppAudienceFromPackageJson,\n workspaceAppRouteAccessFromEnv,\n workspaceAppRouteAccessFromPackageJson,\n type WorkspaceAppRouteAccess,\n type WorkspaceAppRouteAccessFromConfig,\n type WorkspaceAppAudience,\n} from \"./workspace-app-audience.js\";\nexport {\n AGENT_NATIVE_OPEN_PATH,\n AGENT_SIDEBAR_QUERY_PARAM,\n AGENT_SIDEBAR_QUERY_VALUE_CLOSED,\n isAgentNativeOpenDeepLink,\n withCollapsedAgentSidebarParam,\n} from \"./agent-sidebar-url.js\";\nexport {\n AGENT_NATIVE_DEFAULT_SOCIAL_IMAGE,\n AGENT_NATIVE_SOCIAL_IMAGE_CACHE_BUSTER,\n AGENT_NATIVE_SOCIAL_IMAGE_ALT,\n AGENT_NATIVE_SOCIAL_IMAGE_HEIGHT,\n AGENT_NATIVE_SOCIAL_IMAGE_PATH,\n AGENT_NATIVE_SOCIAL_IMAGE_TYPE,\n AGENT_NATIVE_SOCIAL_IMAGE_WIDTH,\n defaultSocialImageMeta,\n withAgentNativeSocialImageCacheBuster,\n withDefaultSocialImage,\n type SocialMetaDescriptor,\n} from \"./social-meta.js\";\nexport {\n EMBED_MODE_QUERY_PARAM,\n EMBED_SESSION_COOKIE,\n EMBED_START_PATH,\n EMBED_TOKEN_QUERY_PARAM,\n} from \"./embed-auth.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,GAIV,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAe,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EACL,+BAA+B,EAC/B,sBAAsB,GAEvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,iCAAiC,EACjC,0BAA0B,EAC1B,yBAAyB,EACzB,gCAAgC,EAChC,2BAA2B,GAC5B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,8BAA8B,EAC9B,uBAAuB,EACvB,6BAA6B,EAC7B,6BAA6B,EAC7B,2BAA2B,EAC3B,mCAAmC,EACnC,8BAA8B,EAC9B,sCAAsC,GAIvC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,sBAAsB,EACtB,yBAAyB,EACzB,gCAAgC,EAChC,yBAAyB,EACzB,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,iCAAiC,EACjC,sCAAsC,EACtC,6BAA6B,EAC7B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,+BAA+B,EAC/B,sBAAsB,EACtB,qCAAqC,EACrC,sBAAsB,GAEvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,EACnB,4BAA4B,EAC5B,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,GAIjB,MAAM,mBAAmB,CAAC","sourcesContent":["export {\n agentChat,\n type AgentChatMessage,\n type AgentChatCallOptions,\n type AgentChatResponse,\n} from \"./agent-chat.js\";\nexport { agentEnv, type EnvVar } from \"./agent-env.js\";\nexport { extractOAuthStateAppId } from \"./oauth-state.js\";\nexport { truncate } from \"./truncate.js\";\nexport {\n llmConnectionTrackingProperties,\n normalizeLlmConnection,\n type LlmConnectionStatus,\n} from \"./llm-connection.js\";\nexport {\n DISPATCH_WORKSPACE_ROOT_REDIRECTS,\n RESERVED_WORKSPACE_APP_IDS,\n assertValidWorkspaceAppId,\n getWorkspaceAppIdValidationError,\n isValidWorkspaceAppIdFormat,\n} from \"./workspace-app-id.js\";\nexport {\n DEFAULT_WORKSPACE_APP_AUDIENCE,\n WORKSPACE_APP_AUDIENCES,\n normalizeWorkspaceAppAudience,\n normalizeWorkspaceAppPathList,\n workspaceAppAudienceFromEnv,\n workspaceAppAudienceFromPackageJson,\n workspaceAppRouteAccessFromEnv,\n workspaceAppRouteAccessFromPackageJson,\n type WorkspaceAppRouteAccess,\n type WorkspaceAppRouteAccessFromConfig,\n type WorkspaceAppAudience,\n} from \"./workspace-app-audience.js\";\nexport {\n AGENT_NATIVE_OPEN_PATH,\n AGENT_SIDEBAR_QUERY_PARAM,\n AGENT_SIDEBAR_QUERY_VALUE_CLOSED,\n isAgentNativeOpenDeepLink,\n withCollapsedAgentSidebarParam,\n} from \"./agent-sidebar-url.js\";\nexport {\n AGENT_NATIVE_DEFAULT_SOCIAL_IMAGE,\n AGENT_NATIVE_SOCIAL_IMAGE_CACHE_BUSTER,\n AGENT_NATIVE_SOCIAL_IMAGE_ALT,\n AGENT_NATIVE_SOCIAL_IMAGE_HEIGHT,\n AGENT_NATIVE_SOCIAL_IMAGE_PATH,\n AGENT_NATIVE_SOCIAL_IMAGE_TYPE,\n AGENT_NATIVE_SOCIAL_IMAGE_WIDTH,\n defaultSocialImageMeta,\n withAgentNativeSocialImageCacheBuster,\n withDefaultSocialImage,\n type SocialMetaDescriptor,\n} from \"./social-meta.js\";\nexport {\n EMBED_MODE_QUERY_PARAM,\n EMBED_SESSION_COOKIE,\n EMBED_START_PATH,\n EMBED_TOKEN_QUERY_PARAM,\n} from \"./embed-auth.js\";\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 \"./agent-access.js\";\n"]}
@@ -25,6 +25,19 @@ Avoid importing UI components from the bare `@agent-native/core` package. Use
25
25
  `@agent-native/core/client` or a focused `@agent-native/core/client/*` subpath
26
26
  so bundlers choose the browser-safe entry.
27
27
 
28
+ Use `@agent-native/toolkit` for reusable app-building pieces that are not part
29
+ of the foundational runtime contract: shadcn-style UI primitives, shared hooks,
30
+ simple app shell helpers, and other template composition modules. Core keeps
31
+ compatibility re-exports for migrated internals during the transition, but new
32
+ template and app code should import toolkit modules directly:
33
+
34
+ ```tsx
35
+ import { Button } from "@agent-native/toolkit/ui/button";
36
+ import { Toaster } from "@agent-native/toolkit/ui/sonner";
37
+ import { useToast } from "@agent-native/toolkit/hooks/use-toast";
38
+ import { useSetHeaderActions } from "@agent-native/toolkit/app-shell";
39
+ ```
40
+
28
41
  <Diagram id="doc-block-u3yfqy" title="Drop down a layer, not out of the framework" summary={"Each layer keeps the same runtime — actions, thread state, and SQL-backed sync — while giving you more control over the chrome."}>
29
42
 
30
43
  ```html
@@ -7,6 +7,13 @@ description: "How to create and publish your own agent-native app templates."
7
7
 
8
8
  Templates are complete, forkable agent-native apps that solve a real workflow. The first-party templates are built with the same framework surface you use: React routes for the UI, Drizzle SQL for data, actions for operations, workspace resources for agent behavior, and polling sync so the agent and UI stay aligned.
9
9
 
10
+ Use `@agent-native/core` for the runtime contract: actions, server plugins,
11
+ database helpers, app state, routing helpers, and agent chat. Use
12
+ `@agent-native/toolkit` for reusable app-building UI and helpers such as shared
13
+ shadcn-style primitives, toast/mobile hooks, date pickers, and simple app shell
14
+ slots. Keep template-specific variants local when they encode product behavior
15
+ or visual identity.
16
+
10
17
  A good template:
11
18
 
12
19
  - Solves one workflow end-to-end, with useful seed data or an empty-state flow.
@@ -25,6 +25,15 @@ import { ResourcesPanel } from "@agent-native/core/client/resources";
25
25
  `@agent-native/core/client` أو مسار فرعي `@agent-native/core/client/*` مركّز
26
26
  لذلك يختار القائمون على التجميع الإدخال الآمن للمتصفح.
27
27
 
28
+ استخدم `@agent-native/toolkit` للقطع القابلة لإعادة الاستخدام في بناء التطبيقات التي ليست جزءا من عقد وقت التشغيل الأساسي: عناصر UI بأسلوب shadcn، hooks المشتركة، مساعدات هيكل التطبيق البسيطة، ووحدات تركيب القوالب. يحتفظ Core بإعادة تصدير توافقية أثناء الانتقال، لكن يجب أن تستورد القوالب والتطبيقات الجديدة وحدات toolkit مباشرة:
29
+
30
+ ```tsx
31
+ import { Button } from "@agent-native/toolkit/ui/button";
32
+ import { Toaster } from "@agent-native/toolkit/ui/sonner";
33
+ import { useToast } from "@agent-native/toolkit/hooks/use-toast";
34
+ import { useSetHeaderActions } from "@agent-native/toolkit/app-shell";
35
+ ```
36
+
28
37
  <Diagram id="doc-block-1vw6fvr" title={"المنسدلة طبقة، وليس خارج الإطار"} summary={"تحتفظ كل طبقة بنفس وقت التشغيل — الإجراءات، وحالة مؤشر الترابط، ومزامنة SQL-backed — بينما تمنحك مزيدًا من التحكم في Chrome."}>
29
38
 
30
39
  ```html
@@ -7,6 +7,8 @@ description: "كيفية إنشاء ونشر قوالب تطبيقات الوك
7
7
 
8
8
  النماذج عبارة عن تطبيقات متكاملة ومتشعبة للوكلاء الأصليين تعمل على حل سير العمل الحقيقي. تم إنشاء قوالب الطرف الأول بنفس سطح إطار العمل الذي تستخدمه: مسارات React لـ UI، وDrizzle SQL للبيانات، وactions للعمليات، وموارد مساحة العمل لسلوك الوكيل، ومزامنة الاستقصاء بحيث يظل الوكيل وUI متوازيين.
9
9
 
10
+ استخدم `@agent-native/core` لعقد وقت التشغيل: actions، مكونات server الإضافية، مساعدات قاعدة البيانات، حالة التطبيق، مساعدات التوجيه، ودردشة الوكيل. استخدم `@agent-native/toolkit` لعناصر UI ومساعدات بناء التطبيقات القابلة لإعادة الاستخدام مثل primitives المشتركة، hooks للتنبيه والجوال، منتقيات التاريخ، وفتحات هيكل التطبيق البسيطة. أبق المتغيرات الخاصة بالقالب محلية عندما تعبّر عن سلوك المنتج أو هويته البصرية.
11
+
10
12
  نموذج جيد:
11
13
 
12
14
  - يعمل على حل سير عمل واحد من البداية إلى النهاية، باستخدام بيانات أولية مفيدة أو تدفق في حالة فارغة.
@@ -149,6 +149,12 @@ pnpm dev
149
149
 
150
150
  **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
151
 
152
+ Implementation note: use the shared core agent-access helpers
153
+ (`createScopedAgentAccessGrant`, `verifyScopedAgentAccessToken`,
154
+ `buildAgentAccessUrl`, and `buildAgentAccessApiUrl`) for the SSR/bot-visible
155
+ URL contract. Keep replay chunk authorization, diagnostics payloads, and the
156
+ session detail UI local to Analytics.
157
+
152
158
  ### العمل مع الوكيل
153
159
 
154
160
  يعرف الوكيل دائمًا ما تنظر إليه. يتم إدخال حالة الشاشة الحالية في كل رسالة ككتلة `<current-screen>` - فهي تحتوي على العرض النشط، ولوحة المعلومات المفتوحة أو التحليل، وأي عوامل تصفية محددة.
@@ -133,6 +133,13 @@ API، لذا فإن النماذج التي تقبل النص أو الصور ا
133
133
 
134
134
  Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
135
 
136
+ Implementation note: use the shared core agent-access helpers
137
+ (`createScopedAgentAccessGrant`, `verifyScopedAgentAccessToken`,
138
+ `buildAgentAccessUrl`, and `buildAgentAccessApiUrl`) for the SSR/bot-visible
139
+ URL contract. Keep Clips-specific visibility checks, transcript/frame payloads,
140
+ and player UI local. New links use `agent_access`; routes should continue
141
+ accepting the legacy `t` query where existing agent API URLs may already use it.
142
+
136
143
  تتبع نقاط النهاية نفس القواعد العامة/كلمة المرور/انتهاء الصلاحية مثل صفحة المشاركة.
137
144
  تتطلب المقاطع المحمية بكلمة مرور كلمة المرور مرة واحدة؛ تعود الاستجابات الناجحة
138
145
  روابط رمزية قصيرة العمر بحيث لا يحتاج وكلاء المراحل النهائية إلى النص العادي
@@ -241,6 +241,12 @@ VITE_AGENT_NATIVE_SESSION_REPLAY_SAMPLE_RATE=0.1
241
241
 
242
242
  عندما تحتاج إلى تسليم تسجيل خاص إلى وكيل خارجي، استخدم عنصر التحكم **نسخ للوكيل** في صفحة تفاصيل الجلسة. فهو يُنشئ رابط `agent_access` محدد النطاق بالتسجيل ومدته ساعتان، ويقوم بعرض SSR لحمولة اكتشاف صغيرة على `/sessions/:recordingId`، ولا يكشف إلا عن واجهات برمجة تطبيقات JSON الخاصة بسياق/أحداث الوكيل. لا تتغير رؤية التسجيل.
243
243
 
244
+ Implementation note: the reusable layer is the core agent-access URL contract,
245
+ not a replay-specific UI abstraction. Use `createScopedAgentAccessGrant`,
246
+ `verifyScopedAgentAccessToken`, `buildAgentAccessUrl`, and
247
+ `buildAgentAccessApiUrl` for scoped SSR and JSON API links; keep replay storage,
248
+ diagnostics shaping, and access policy inside the Analytics template.
249
+
244
250
  للتطوير المحلي فقط، يمكن لـ Analytics الرجوع إلى أجزاء SQL مضمّنة محدودة السعة عندما يكون تخزين blob الخاص غير متاح. يجب أن تُهيّئ عمليات النشر في الإنتاج تخزين blob خاصًا أو مشفّرًا بدلاً من الاعتماد على Postgres لحمولات إعادة التشغيل.
245
251
 
246
252
  ## متقدم: الموفرون المخصصون والداخليون {#advanced}
@@ -25,6 +25,15 @@ Vermeiden Sie den Import von UI-Komponenten aus dem bloßen `@agent-native/core`
25
25
  `@agent-native/core/client` oder ein fokussierter `@agent-native/core/client/*`-Unterpfad
26
26
  daher wählen Bundler den browsersicheren Eintrag.
27
27
 
28
+ Verwenden Sie `@agent-native/toolkit` für wiederverwendbare App-Bausteine, die nicht Teil des grundlegenden Laufzeitvertrags sind: shadcn-artige UI-Primitives, gemeinsame Hooks, einfache App-Shell-Helfer und weitere Template-Kompositionsmodule. Core behält während der Umstellung Kompatibilitäts-Reexports, aber neuer Template- und App-Code sollte Toolkit-Module direkt importieren:
29
+
30
+ ```tsx
31
+ import { Button } from "@agent-native/toolkit/ui/button";
32
+ import { Toaster } from "@agent-native/toolkit/ui/sonner";
33
+ import { useToast } from "@agent-native/toolkit/hooks/use-toast";
34
+ import { useSetHeaderActions } from "@agent-native/toolkit/app-shell";
35
+ ```
36
+
28
37
  <Diagram id="doc-block-6bst90" title="Lassen Sie eine Ebene nach unten fallen, nicht aus dem Framework heraus" summary={"Jede Ebene behält die gleiche Laufzeit bei – Aktionen, Thread-Status und SQL-backed-Synchronisierung – und gibt Ihnen gleichzeitig mehr Kontrolle über Chrome."}>
29
38
 
30
39
  ```html
@@ -7,6 +7,8 @@ description: "So erstellen und veröffentlichen Sie Ihre eigenen agentennativen
7
7
 
8
8
  Vorlagen sind vollständige, forkbare agentennative Apps, die einen echten Arbeitsablauf lösen. Die Erstanbieter-Vorlagen werden mit derselben Framework-Oberfläche erstellt, die Sie verwenden: React-Routen für UI, Drizzle SQL für Daten, actions für Vorgänge, Arbeitsbereichsressourcen für Agentenverhalten und Abfragesynchronisierung, damit der Agent und UI aufeinander abgestimmt bleiben.
9
9
 
10
+ Verwenden Sie `@agent-native/core` für den Laufzeitvertrag: Actions, Server-Plugins, Datenbank-Helfer, App-State, Routing-Helfer und Agent-Chat. Verwenden Sie `@agent-native/toolkit` für wiederverwendbare App-Building-UI und Helfer wie gemeinsame Primitives, Toast- und Mobile-Hooks, Date-Picker und einfache App-Shell-Slots. Halten Sie template-spezifische Varianten lokal, wenn sie Produktverhalten oder visuelle Identität kodieren.
11
+
10
12
  Eine gute Vorlage:
11
13
 
12
14
  - Löst einen Workflow durchgängig, mit nützlichen Seed-Daten oder einem Leerzustandsfluss.
@@ -149,6 +149,12 @@ CLI gibt den lokalen Entwickler URL aus. Melden Sie sich bei Google an und öffn
149
149
 
150
150
  **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
151
 
152
+ Implementation note: use the shared core agent-access helpers
153
+ (`createScopedAgentAccessGrant`, `verifyScopedAgentAccessToken`,
154
+ `buildAgentAccessUrl`, and `buildAgentAccessApiUrl`) for the SSR/bot-visible
155
+ URL contract. Keep replay chunk authorization, diagnostics payloads, and the
156
+ session detail UI local to Analytics.
157
+
152
158
  ### Zusammenarbeit mit dem Agenten
153
159
 
154
160
  Der Agent weiß immer, was Sie sehen. Der aktuelle Bildschirmstatus wird als `<current-screen>`-Block in jede Nachricht eingefügt – er enthält die aktive Ansicht, das geöffnete Dashboard oder die geöffnete Analyse und alle ausgewählten Filter.
@@ -133,6 +133,13 @@ Agent.
133
133
 
134
134
  Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
135
 
136
+ Implementation note: use the shared core agent-access helpers
137
+ (`createScopedAgentAccessGrant`, `verifyScopedAgentAccessToken`,
138
+ `buildAgentAccessUrl`, and `buildAgentAccessApiUrl`) for the SSR/bot-visible
139
+ URL contract. Keep Clips-specific visibility checks, transcript/frame payloads,
140
+ and player UI local. New links use `agent_access`; routes should continue
141
+ accepting the legacy `t` query where existing agent API URLs may already use it.
142
+
136
143
  Die Endpunkte folgen denselben öffentlichen/Passwort-/Ablaufregeln wie die Freigabeseite.
137
144
  Passwortgeschützte Clips erfordern das einmalige Passwort; Erfolgreiche Antworten werden zurückgegeben
138
145
  kurzlebige tokenisierte Links, sodass nachgeschaltete Agenten den Klartext nicht benötigen
@@ -241,6 +241,12 @@ Das Analytics-Template speichert Replay-Metadaten in SQL (`session_recordings`)
241
241
 
242
242
  Wenn Sie eine private Aufzeichnung an einen externen Agenten übergeben müssen, verwenden Sie auf der Sitzungsdetailseite die Funktion **Copy for agent**. Sie erzeugt einen zwei Stunden gültigen, aufzeichnungsgebundenen `agent_access`-Link, rendert eine kleine Discovery-Payload per SSR unter `/sessions/:recordingId` und stellt ausschließlich die JSON-APIs für Agent-Kontext/-Ereignisse bereit. Die Sichtbarkeit der Aufzeichnung ändert sich dadurch nicht.
243
243
 
244
+ Implementation note: the reusable layer is the core agent-access URL contract,
245
+ not a replay-specific UI abstraction. Use `createScopedAgentAccessGrant`,
246
+ `verifyScopedAgentAccessToken`, `buildAgentAccessUrl`, and
247
+ `buildAgentAccessApiUrl` for scoped SSR and JSON API links; keep replay storage,
248
+ diagnostics shaping, and access policy inside the Analytics template.
249
+
244
250
  Nur für die lokale Entwicklung kann Analytics auf begrenzte SQL-Inline-Chunks zurückgreifen, wenn kein privater Blob-Speicher verfügbar ist. Produktions-Deployments sollten privaten oder verschlüsselten Blob-Speicher konfigurieren, anstatt sich für Replay-Payloads auf Postgres zu verlassen.
245
251
 
246
252
  ## Erweitert: benutzerdefinierte Anbieter und Interna {#advanced}
@@ -25,6 +25,15 @@ Evite importar componentes UI desde el paquete básico `@agent-native/core`. Usa
25
25
  `@agent-native/core/client` o una subruta `@agent-native/core/client/*` enfocada
26
26
  para que los paquetes elijan la entrada segura para el navegador.
27
27
 
28
+ Use `@agent-native/toolkit` para piezas reutilizables de construcción de aplicaciones que no forman parte del contrato fundacional del runtime: primitivas UI estilo shadcn, hooks compartidos, ayudantes simples de shell de aplicación y otros módulos para componer plantillas. Core conserva reexports de compatibilidad durante la transición, pero el código nuevo de plantillas y aplicaciones debe importar módulos de toolkit directamente:
29
+
30
+ ```tsx
31
+ import { Button } from "@agent-native/toolkit/ui/button";
32
+ import { Toaster } from "@agent-native/toolkit/ui/sonner";
33
+ import { useToast } from "@agent-native/toolkit/hooks/use-toast";
34
+ import { useSetHeaderActions } from "@agent-native/toolkit/app-shell";
35
+ ```
36
+
28
37
  <Diagram id="doc-block-1v79shu" title="Bajar una capa, no fuera del marco." summary={"Cada capa mantiene el mismo tiempo de ejecución (acciones, estado del subproceso y sincronización SQL-backed) al tiempo que le brinda más control sobre Chrome."}>
29
38
 
30
39
  ```html
@@ -7,6 +7,8 @@ description: "Cómo crear y publicar sus propias plantillas de aplicaciones nati
7
7
 
8
8
  Las plantillas son aplicaciones nativas del agente completas y bifurcables que resuelven un flujo de trabajo real. Las plantillas propias se crean con la misma superficie de marco que usted utiliza: rutas React para UI, Drizzle SQL para datos, actions para operaciones, recursos del espacio de trabajo para el comportamiento del agente y sincronización de sondeos para que el agente y UI permanezcan alineados.
9
9
 
10
+ Use `@agent-native/core` para el contrato de runtime: actions, plugins de servidor, helpers de base de datos, estado de aplicación, helpers de rutas y chat del agente. Use `@agent-native/toolkit` para UI reutilizable y helpers de construcción de apps, como primitivas compartidas, hooks de toast/móvil, selectores de fecha y slots simples de shell de aplicación. Mantenga locales las variantes específicas de una plantilla cuando codifiquen comportamiento de producto o identidad visual.
11
+
10
12
  Una buena plantilla:
11
13
 
12
14
  - Resuelve un flujo de trabajo de principio a fin, con datos iniciales útiles o un flujo de estado vacío.
@@ -149,6 +149,12 @@ El CLI imprime el desarrollador local URL. Inicia sesión con Google y luego abr
149
149
 
150
150
  **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
151
 
152
+ Implementation note: use the shared core agent-access helpers
153
+ (`createScopedAgentAccessGrant`, `verifyScopedAgentAccessToken`,
154
+ `buildAgentAccessUrl`, and `buildAgentAccessApiUrl`) for the SSR/bot-visible
155
+ URL contract. Keep replay chunk authorization, diagnostics payloads, and the
156
+ session detail UI local to Analytics.
157
+
152
158
  ### Trabajar con el agente
153
159
 
154
160
  El agente siempre sabe lo que estás mirando. El estado actual de la pantalla se inyecta en cada mensaje como un bloque `<current-screen>`: contiene la vista activa, el panel o análisis abierto y los filtros seleccionados.
@@ -133,6 +133,13 @@ agente.
133
133
 
134
134
  Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
135
 
136
+ Implementation note: use the shared core agent-access helpers
137
+ (`createScopedAgentAccessGrant`, `verifyScopedAgentAccessToken`,
138
+ `buildAgentAccessUrl`, and `buildAgentAccessApiUrl`) for the SSR/bot-visible
139
+ URL contract. Keep Clips-specific visibility checks, transcript/frame payloads,
140
+ and player UI local. New links use `agent_access`; routes should continue
141
+ accepting the legacy `t` query where existing agent API URLs may already use it.
142
+
136
143
  Los puntos finales siguen las mismas reglas de público/contraseña/caducidad que la página para compartir.
137
144
  Los clips protegidos con contraseña requieren la contraseña una vez; regresan respuestas exitosas
138
145
  Enlaces tokenizados de corta duración para que los agentes posteriores no necesiten el texto sin formato
@@ -241,6 +241,12 @@ La plantilla de Analytics almacena los metadatos de repetición en SQL (`session
241
241
 
242
242
  Cuando necesite entregar una grabación privada a un agente externo, use el control **Copiar para el agente** de la página de detalle de la sesión. Este genera un enlace `agent_access` de dos horas con alcance limitado a la grabación, renderiza en el servidor (SSR) una pequeña carga útil de descubrimiento en `/sessions/:recordingId`, y expone únicamente las API JSON de contexto/eventos del agente. La visibilidad de la grabación no cambia.
243
243
 
244
+ Implementation note: the reusable layer is the core agent-access URL contract,
245
+ not a replay-specific UI abstraction. Use `createScopedAgentAccessGrant`,
246
+ `verifyScopedAgentAccessToken`, `buildAgentAccessUrl`, and
247
+ `buildAgentAccessApiUrl` for scoped SSR and JSON API links; keep replay storage,
248
+ diagnostics shaping, and access policy inside the Analytics template.
249
+
244
250
  Solo para desarrollo local, Analytics puede recurrir a fragmentos en línea de SQL limitados cuando el almacenamiento de blob privado no está disponible. Las implementaciones de producción deberían configurar almacenamiento de blob privado o cifrado en lugar de depender de Postgres para las cargas útiles de repetición.
245
251
 
246
252
  ## Avanzado: proveedores personalizados e internos {#advanced}
@@ -25,6 +25,15 @@ import { ResourcesPanel } from "@agent-native/core/client/resources";
25
25
  `@agent-native/core/client` ou un sous-chemin `@agent-native/core/client/*` ciblé
26
26
  les bundlers choisissent donc l'entrée sécurisée pour le navigateur.
27
27
 
28
+ Utilisez `@agent-native/toolkit` pour les éléments réutilisables de construction d'applications qui ne font pas partie du contrat fondamental du runtime : primitives UI de style shadcn, hooks partagés, aides simples de shell d'application et autres modules de composition de modèles. Core conserve des réexportations de compatibilité pendant la transition, mais le nouveau code de modèle et d'application doit importer directement les modules toolkit :
29
+
30
+ ```tsx
31
+ import { Button } from "@agent-native/toolkit/ui/button";
32
+ import { Toaster } from "@agent-native/toolkit/ui/sonner";
33
+ import { useToast } from "@agent-native/toolkit/hooks/use-toast";
34
+ import { useSetHeaderActions } from "@agent-native/toolkit/app-shell";
35
+ ```
36
+
28
37
  <Diagram id="doc-block-n2zqzy" title={"Déposez un calque, pas hors du cadre"} summary={"Chaque couche conserve le même temps d'exécution (actions, état du thread et synchronisation SQL-backed) tout en vous donnant plus de contrôle sur le chrome."}>
29
38
 
30
39
  ```html
@@ -7,6 +7,8 @@ description: "Comment créer et publier vos propres modèles d'applications nati
7
7
 
8
8
  Les modèles sont des applications natives d'agent complètes et exploitables qui résolvent un véritable flux de travail. Les modèles propriétaires sont créés avec la même surface de structure que vous utilisez : routes React pour le UI, Drizzle SQL pour les données, actions pour les opérations, ressources d'espace de travail pour le comportement de l'agent et synchronisation des interrogations afin que l'agent et le UI restent alignés.
9
9
 
10
+ Utilisez `@agent-native/core` pour le contrat de runtime : actions, plugins serveur, aides de base de données, état de l'application, aides de routage et chat de l'agent. Utilisez `@agent-native/toolkit` pour l'UI réutilisable de construction d'applications et les aides comme les primitives partagées, les hooks toast/mobile, les sélecteurs de date et les slots simples de shell d'application. Gardez les variantes propres au modèle locales lorsqu'elles encodent un comportement produit ou une identité visuelle.
11
+
10
12
  Un bon modèle :
11
13
 
12
14
  - Résout un flux de travail de bout en bout, avec des données de départ utiles ou un flux à état vide.
@@ -149,6 +149,12 @@ Le CLI imprime le développement local URL. Connectez-vous avec Google, puis ouv
149
149
 
150
150
  **Session replay agent handoff.** Session recordings stay private, but the session detail page can mint a temporary **Copy for agent** link. The two-hour `agent_access` URL lets an external agent read replay summaries, timelines, and bounded event details without exposing blob/provider URLs or making the recording public.
151
151
 
152
+ Implementation note: use the shared core agent-access helpers
153
+ (`createScopedAgentAccessGrant`, `verifyScopedAgentAccessToken`,
154
+ `buildAgentAccessUrl`, and `buildAgentAccessApiUrl`) for the SSR/bot-visible
155
+ URL contract. Keep replay chunk authorization, diagnostics payloads, and the
156
+ session detail UI local to Analytics.
157
+
152
158
  ### Travailler avec l'agent
153
159
 
154
160
  L'agent sait toujours ce que vous regardez. L'état actuel de l'écran est injecté dans chaque message sous forme de bloc `<current-screen>` : il contient la vue active, le tableau de bord ou l'analyse ouvert et tous les filtres sélectionnés.
@@ -133,6 +133,13 @@ agent.
133
133
 
134
134
  Temporary private agent links are also supported: the Share dialog can mint a two-hour `agent_access` URL for any recording the viewer can access. Agents use that token with the share page and JSON APIs, and the clip does not become public.
135
135
 
136
+ Implementation note: use the shared core agent-access helpers
137
+ (`createScopedAgentAccessGrant`, `verifyScopedAgentAccessToken`,
138
+ `buildAgentAccessUrl`, and `buildAgentAccessApiUrl`) for the SSR/bot-visible
139
+ URL contract. Keep Clips-specific visibility checks, transcript/frame payloads,
140
+ and player UI local. New links use `agent_access`; routes should continue
141
+ accepting the legacy `t` query where existing agent API URLs may already use it.
142
+
136
143
  Les points de terminaison suivent les mêmes règles de public/mot de passe/expiration que la page de partage.
137
144
  Les clips protégés par mot de passe nécessitent le mot de passe une seule fois ; les réponses positives reviennent
138
145
  Liens tokenisés de courte durée afin que les agents en aval n'aient pas besoin du texte brut
@@ -241,6 +241,12 @@ Le modèle Analytics stocke les métadonnées de relecture en SQL (`session_reco
241
241
 
242
242
  Lorsque vous devez transmettre un enregistrement privé à un agent externe, utilisez le contrôle **Copy for agent** de la page de détail de session. Il génère un lien `agent_access` limité à l'enregistrement, valide deux heures, effectue le rendu SSR d'une petite charge utile de découverte sur `/sessions/:recordingId`, et n'expose que les API JSON de contexte/événements de l'agent. La visibilité de l'enregistrement ne change pas.
243
243
 
244
+ Implementation note: the reusable layer is the core agent-access URL contract,
245
+ not a replay-specific UI abstraction. Use `createScopedAgentAccessGrant`,
246
+ `verifyScopedAgentAccessToken`, `buildAgentAccessUrl`, and
247
+ `buildAgentAccessApiUrl` for scoped SSR and JSON API links; keep replay storage,
248
+ diagnostics shaping, and access policy inside the Analytics template.
249
+
244
250
  Pour le développement local uniquement, Analytics peut se replier sur des blocs SQL en ligne plafonnés lorsque le stockage blob privé n'est pas disponible. Les déploiements en production doivent configurer un stockage blob privé ou chiffré plutôt que de s'appuyer sur Postgres pour les charges utiles de relecture.
245
251
 
246
252
  ## Avancé : fournisseurs personnalisés et éléments internes {#advanced}
@@ -25,6 +25,15 @@ import { ResourcesPanel } from "@agent-native/core/client/resources";
25
25
  `@agent-native/core/client` या एक केंद्रित `@agent-native/core/client/*` उपपथ
26
26
  इसलिए बंडलर ब्राउज़र-सुरक्षित प्रविष्टि चुनते हैं।
27
27
 
28
+ `@agent-native/toolkit` का उपयोग उन पुन: उपयोग योग्य ऐप-बिल्डिंग हिस्सों के लिए करें जो मूल रनटाइम अनुबंध का भाग नहीं हैं: shadcn-शैली UI primitives, साझा hooks, सरल ऐप shell helpers, और अन्य template composition modules. संक्रमण के दौरान Core compatibility re-exports रखता है, लेकिन नए template और app code को toolkit modules सीधे import करने चाहिए:
29
+
30
+ ```tsx
31
+ import { Button } from "@agent-native/toolkit/ui/button";
32
+ import { Toaster } from "@agent-native/toolkit/ui/sonner";
33
+ import { useToast } from "@agent-native/toolkit/hooks/use-toast";
34
+ import { useSetHeaderActions } from "@agent-native/toolkit/app-shell";
35
+ ```
36
+
28
37
  <Diagram id="doc-block-109zkj3" title={"एक परत नीचे गिराएं, ढांचे से बाहर नहीं"} summary={"प्रत्येक परत आपको क्रोम पर अधिक नियंत्रण प्रदान करते हुए समान रनटाइम - क्रियाएं, थ्रेड स्थिति और SQL-backed सिंक रखती है।"}>
29
38
 
30
39
  ```html